UNPKG

@dydxfoundation/governance

Version:
21 lines (20 loc) 1.27 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)('SafetyModule contract bytecode', init, (ctx) => { it('The upgradeability proxy has the expected bytecode', async () => { await (0, verify_contract_bytecode_1.verifyContract)('contracts/dependencies/open-zeppelin/', 'InitializableAdminUpgradeabilityProxy', ctx.safetyModule.address, {}); }); it('The current implementation has the expected bytecode', async () => { const currentImplementationAddress = await ctx.safetyModuleProxyAdmin.getProxyImplementation(ctx.safetyModule.address); await (0, verify_contract_bytecode_1.verifyContract)('contracts/safety/v2/', 'SafetyModuleV2', currentImplementationAddress, { DISTRIBUTION_START: ctx.config.SM_RECOVERY_DISTRIBUTION_START, DISTRIBUTION_END: ctx.config.SM_RECOVERY_DISTRIBUTION_END, STAKED_TOKEN: ctx.dydxToken.address, REWARDS_TOKEN: ctx.dydxToken.address, REWARDS_TREASURY: ctx.rewardsTreasury.address, }); }); });