UNPKG

@dydxfoundation/governance

Version:
22 lines (21 loc) 1.38 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const verify_contract_bytecode_1 = require("../../src/lib/verify-contract-bytecode"); const describe_contract_1 = require("../helpers/describe-contract"); function init() { } (0, describe_contract_1.describeContract)('StarkProxy contract bytecode', init, (ctx) => { ctx.config.STARK_PROXY_CONFIG.BORROWER_CONFIGS.forEach((_, i) => { it(`The upgradeability proxy for stark proxy ${i} has the expected bytecode`, async () => { await (0, verify_contract_bytecode_1.verifyContract)('contracts/dependencies/open-zeppelin/', 'InitializableAdminUpgradeabilityProxy', ctx.starkProxies[i].address, {}); }); it(`The current implementation for stark proxy ${i} has the expected bytecode`, async () => { const currentImplementationAddress = await ctx.starkProxyProxyAdmins[i].getProxyImplementation(ctx.starkProxies[i].address); await (0, verify_contract_bytecode_1.verifyContract)('contracts/stark-proxy/v2/', 'StarkProxyV2', currentImplementationAddress, { LIQUIDITY_STAKING: ctx.liquidityStaking.address, MERKLE_DISTRIBUTOR: ctx.merkleDistributor.address, STARK_PERPETUAL: ctx.starkPerpetual.address, TOKEN: ctx.dydxCollateralToken.address, }); }); }); });