From f44fd7c8e1573075c1bc3e844f2a6de8dd642071 Mon Sep 17 00:00:00 2001 From: leovct Date: Fri, 1 Dec 2023 17:39:54 +0100 Subject: [PATCH] chore: revert unexpected change --- deploy-migrations/3_initialize_state.js | 35 +++++++++++++++---------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/deploy-migrations/3_initialize_state.js b/deploy-migrations/3_initialize_state.js index e4f1f56c..eb499510 100644 --- a/deploy-migrations/3_initialize_state.js +++ b/deploy-migrations/3_initialize_state.js @@ -16,6 +16,13 @@ const MaticWeth = artifacts.require('MaticWETH') const Governance = artifacts.require('Governance') const EventsHubProxy = artifacts.require('EventsHubProxy') +async function updateContractMap(governance, registry, nameHash, value) { + return governance.update( + registry.address, + registry.contract.methods.updateContractMap(nameHash, value).encodeABI() + ) +} + module.exports = async function(deployer) { deployer.then(async() => { await bluebird @@ -47,46 +54,46 @@ module.exports = async function(deployer) { TransferWithSigPredicate, EventsHubProxy ) { - await utils.updateContractMap( + await updateContractMap( governance, registry, - 'depositManager', + ethUtils.keccak256('depositManager'), depositManagerProxy.address ) - await utils.updateContractMap( + await updateContractMap( governance, registry, - 'withdrawManager', + ethUtils.keccak256('withdrawManager'), withdrawManagerProxy.address ) - await utils.updateContractMap( + await updateContractMap( governance, registry, - 'stakeManager', + ethUtils.keccak256('stakeManager'), stakeManagerProxy.address ) - await utils.updateContractMap( + await updateContractMap( governance, registry, - 'slashingManager', + ethUtils.keccak256('slashingManager'), slashingManager.address ) - await utils.updateContractMap( + await updateContractMap( governance, registry, - 'stateSender', + ethUtils.keccak256('stateSender'), stateSender.address ) - await utils.updateContractMap( + await updateContractMap( governance, registry, - 'wethToken', + ethUtils.keccak256('wethToken'), MaticWeth.address ) - await utils.updateContractMap( + await updateContractMap( governance, registry, - 'eventsHub', + ethUtils.keccak256('eventsHub'), EventsHubProxy.address )