From d66db7262dc2f3df92bf94da55ea31d4a020d335 Mon Sep 17 00:00:00 2001 From: Artyom Veremeenko Date: Tue, 10 Oct 2023 17:27:40 +0300 Subject: [PATCH] refactor(deployed-x.json): 'owner' and 'multisigAddress' --> 'deployer' --- deployed-goerli.json | 2 +- deployed-holesky.json | 3 +- deployed-mainnet.json | 2 +- deployed-testnet-defaults.json | 3 +- .../00-populate-deploy-artifact-from-env.js | 3 +- .../01-deploy-lido-template-and-bases.js | 12 ++++---- .../scratch/02-obtain-deployed-instances.js | 4 +-- scripts/scratch/03-register-ens-domain.js | 16 +++++----- scripts/scratch/05-deploy-apm.js | 4 +-- scripts/scratch/07-create-app-repos.js | 4 +-- scripts/scratch/08-deploy-dao.js | 4 +-- scripts/scratch/10-issue-tokens.js | 2 +- scripts/scratch/11-finalize-dao.js | 3 +- scripts/scratch/13-gate-seal.js | 4 +-- scripts/scratch/15-grant-roles.js | 18 +++++------ .../scratch/16-plug-curated-staking-module.js | 11 ++++--- scripts/scratch/17-transfer-roles.js | 30 +++++++++---------- .../scratch/custom-deploy-aragon-std-apps.js | 4 +-- scripts/scratch/deploy-aragon-env.js | 22 +++++++------- .../scratch/deploy-lido-apm-and-template.js | 9 +++--- scripts/upgrade/deploy-new-app-instance.js | 2 +- .../obtain-deployed-new-app-instance.js | 2 +- scripts/upgrade/upgrade-app.js | 2 +- scripts/utils/31-start-protocol.js | 4 +-- scripts/utils/32-change-voting-time.js | 2 +- scripts/utils/verify-vote-tx.js | 1 - 26 files changed, 84 insertions(+), 89 deletions(-) diff --git a/deployed-goerli.json b/deployed-goerli.json index 1268216b3..20a8e851a 100644 --- a/deployed-goerli.json +++ b/deployed-goerli.json @@ -7,7 +7,7 @@ "apmRegistryFactoryAddress": "0x70B3284fD016a570146cE48fC54D7A81bCd94BBa", "miniMeTokenFactoryAddress": "0x92E2750729e04c9a5CF21A830Bd00cbd5139D992", "aragonIDAddress": "0x673cB86B60B9768Eebb05517fbF5a7F9f1Ab62C4", - "multisigAddress": "0x8303B3A462F4Cb4d2468DDcBD4c9f212914A3a7F", + "deployer": "0x8303B3A462F4Cb4d2468DDcBD4c9f212914A3a7F", "daoTemplateConstructorArgs": [ "0x8303B3A462F4Cb4d2468DDcBD4c9f212914A3a7F", "0x0B6769F500b293e3adacD97c3961189565069902", diff --git a/deployed-holesky.json b/deployed-holesky.json index 95b89f385..eee81747e 100644 --- a/deployed-holesky.json +++ b/deployed-holesky.json @@ -1,6 +1,5 @@ { - "multisigAddress": "0x22896Bfc68814BFD855b1a167255eE497006e730", - "owner": "0x22896Bfc68814BFD855b1a167255eE497006e730", + "deployer": "0x22896Bfc68814BFD855b1a167255eE497006e730", "gateSeal": { "factoryAddress": "0x1134F7077055b0B3559BE52AfeF9aA22A0E1eEC2", "sealDuration": 518400, diff --git a/deployed-mainnet.json b/deployed-mainnet.json index 5d6d3bc3a..97746c4bc 100644 --- a/deployed-mainnet.json +++ b/deployed-mainnet.json @@ -10,7 +10,7 @@ "apmRegistryFactoryAddress": "0xa0BC4B67F5FacDE4E50EAFF48691Cfc43F4E280A", "miniMeTokenFactoryAddress": "0x909d05f384d0663ed4be59863815ab43b4f347ec", "aragonIDAddress": "0x546aa2eae2514494eeadb7bbb35243348983c59d", - "multisigAddress": "0x55Bc991b2edF3DDb4c520B222bE4F378418ff0fA", + "deployer": "0x55Bc991b2edF3DDb4c520B222bE4F378418ff0fA", "daoInitialSettings": { "token": { "name": "Lido DAO Token", diff --git a/deployed-testnet-defaults.json b/deployed-testnet-defaults.json index 78b992c92..ab5fe9e7c 100644 --- a/deployed-testnet-defaults.json +++ b/deployed-testnet-defaults.json @@ -1,6 +1,5 @@ { - "multisigAddress": "", - "owner": "", + "deployer": "", "gateSeal": { "factoryAddress": "", "sealDuration": 518400, diff --git a/scripts/scratch/00-populate-deploy-artifact-from-env.js b/scripts/scratch/00-populate-deploy-artifact-from-env.js index f5a081920..5c961de3e 100644 --- a/scripts/scratch/00-populate-deploy-artifact-from-env.js +++ b/scripts/scratch/00-populate-deploy-artifact-from-env.js @@ -26,8 +26,7 @@ async function saveDeployParameters({ web3, artifacts }) { ? ZERO_ADDRESS : '' state.chainId = CHAIN_ID - state.multisigAddress = DEPLOYER - state.owner = DEPLOYER + state.deployer = DEPLOYER state.gateSeal = { ...state.gateSeal, factoryAddress: GATE_SEAL_FACTORY, diff --git a/scripts/scratch/01-deploy-lido-template-and-bases.js b/scripts/scratch/01-deploy-lido-template-and-bases.js index 58ba6d792..7f4d46793 100644 --- a/scripts/scratch/01-deploy-lido-template-and-bases.js +++ b/scripts/scratch/01-deploy-lido-template-and-bases.js @@ -12,7 +12,7 @@ const REQUIRED_NET_STATE = [ 'miniMeTokenFactoryAddress', 'aragonIDAddress', 'apmRegistryFactoryAddress', - 'multisigAddress' + 'deployer' ] async function deployTemplate({ web3, artifacts }) { @@ -25,7 +25,7 @@ async function deployTemplate({ web3, artifacts }) { assertRequiredNetworkState(state, REQUIRED_NET_STATE) const daoTemplateConstructorArgs = [ - state.multisigAddress, + state.deployer, state.daoFactoryAddress, state.ensAddress, state.miniMeTokenFactoryAddress, @@ -35,14 +35,14 @@ async function deployTemplate({ web3, artifacts }) { log.splitter() - await deployWithoutProxy('lidoTemplate', 'LidoTemplate', state.multisigAddress, daoTemplateConstructorArgs) + await deployWithoutProxy('lidoTemplate', 'LidoTemplate', state.deployer, daoTemplateConstructorArgs) const daoTemplateDeployBlock = (await ethers.provider.getBlock('latest')).number - await deployImplementation(`app:${APP_NAMES.LIDO}`, 'Lido', state.multisigAddress) + await deployImplementation(`app:${APP_NAMES.LIDO}`, 'Lido', state.deployer) - await deployImplementation(`app:${APP_NAMES.ORACLE}`, 'LegacyOracle', state.multisigAddress) + await deployImplementation(`app:${APP_NAMES.ORACLE}`, 'LegacyOracle', state.deployer) - await deployImplementation(`app:${APP_NAMES.NODE_OPERATORS_REGISTRY}`, 'NodeOperatorsRegistry', state.multisigAddress) + await deployImplementation(`app:${APP_NAMES.NODE_OPERATORS_REGISTRY}`, 'NodeOperatorsRegistry', state.deployer) persistNetworkState2(network.name, netId, readNetworkState(network.name, netId), { lidoTemplate: { diff --git a/scripts/scratch/02-obtain-deployed-instances.js b/scripts/scratch/02-obtain-deployed-instances.js index 7115dce4d..2a9622917 100644 --- a/scripts/scratch/02-obtain-deployed-instances.js +++ b/scripts/scratch/02-obtain-deployed-instances.js @@ -15,7 +15,7 @@ const REQUIRED_NET_STATE = [ 'miniMeTokenFactoryAddress', 'aragonIDAddress', 'apmRegistryFactoryAddress', - 'multisigAddress', + 'deployer', 'lidoTemplate', `app:${APP_NAMES.LIDO}`, `app:${APP_NAMES.ORACLE}`, @@ -38,7 +38,7 @@ async function deployTemplate({ web3, artifacts }) { log(`Checking...`) await assertDeployedBytecode(daoTemplate.address, 'LidoTemplate') const templateConfig = await daoTemplate.getConfig() - assert.addressEqual(templateConfig._owner, state.multisigAddress, 'tmpl: owner') + assert.addressEqual(templateConfig._owner, state.deployer, 'tmpl: owner') assert.addressEqual(templateConfig._daoFactory, state.daoFactoryAddress, 'tmpl: daoFactory') assert.addressEqual(templateConfig._ens, state.ensAddress, 'tmpl: ens') assert.addressEqual(templateConfig._miniMeFactory, state.miniMeTokenFactoryAddress, 'tmpl: miniMeFactory') diff --git a/scripts/scratch/03-register-ens-domain.js b/scripts/scratch/03-register-ens-domain.js index 0e8ee8ef0..a8510c895 100644 --- a/scripts/scratch/03-register-ens-domain.js +++ b/scripts/scratch/03-register-ens-domain.js @@ -15,7 +15,7 @@ const REQUIRED_NET_STATE = [ 'ensAddress', 'lidoApmEnsName', 'lidoApmEnsRegDurationSec', - 'multisigAddress', + 'deployer', 'lidoTemplate' ] @@ -53,7 +53,7 @@ async function deployTemplate({ web3, artifacts }) { log(`TLD node: ${chalk.yellow(TLD)} (${tldNode})`) log(`Label: ${chalk.yellow(domainLabel)} (${labelHash})`) - if ((await ens.owner(node)) !== state.multisigAddress && (await ens.owner(tldNode)) !== state.multisigAddress) { + if ((await ens.owner(node)) !== state.deployer && (await ens.owner(tldNode)) !== state.deployer) { const tldResolverAddr = await ens.resolver(tldNode) log(`Using TLD resolver:`, yl(tldResolverAddr)) const tldResolver = await artifacts.require('IInterfaceResolver').at(tldResolverAddr) @@ -100,22 +100,22 @@ async function deployTemplate({ web3, artifacts }) { log.splitter() - await log.makeTx(controller, 'commit', [commitment], { from: state.multisigAddress }) + await log.makeTx(controller, 'commit', [commitment], { from: state.deployer }) await log.makeTx(controller, 'register', [domainLabel, domainOwner, domainRegDuration, salt], { - from: state.multisigAddress, + from: state.deployer, value: '0x' + registerTxValue.toString(16), }) log.splitter() } else { log(`ENS domain new owner:`, yl(domainOwner)) - if ((await ens.owner(node)) === state.multisigAddress) { - log(`Transferring name ownership from owner ${chalk.yellow(state.multisigAddress)} to template ${chalk.yellow(domainOwner)}`) - await log.makeTx(ens, 'setOwner', [node, domainOwner], { from: state.multisigAddress }) + if ((await ens.owner(node)) === state.deployer) { + log(`Transferring name ownership from owner ${chalk.yellow(state.deployer)} to template ${chalk.yellow(domainOwner)}`) + await log.makeTx(ens, 'setOwner', [node, domainOwner], { from: state.deployer }) } else { log(`Creating the subdomain and assigning it to template ${chalk.yellow(domainOwner)}`) - await log.makeTx(ens, 'setSubnodeOwner', [tldNode, labelHash, domainOwner], { from: state.multisigAddress }) + await log.makeTx(ens, 'setSubnodeOwner', [tldNode, labelHash, domainOwner], { from: state.deployer }) } log.splitter() diff --git a/scripts/scratch/05-deploy-apm.js b/scripts/scratch/05-deploy-apm.js index bfba07481..cc1554b00 100644 --- a/scripts/scratch/05-deploy-apm.js +++ b/scripts/scratch/05-deploy-apm.js @@ -10,7 +10,7 @@ const { readNetworkState, assertRequiredNetworkState, persistNetworkState } = re const { getENSNodeOwner } = require('../components/ens') const REQUIRED_NET_STATE = [ - 'multisigAddress', + 'deployer', 'lidoTemplate', 'ensAddress', 'lidoApmEnsName', @@ -56,7 +56,7 @@ async function deployAPM({ web3, artifacts }) { logSplitter() - const from = state.multisigAddress + const from = state.deployer const lidoApmDeployArguments = [parentHash, subHash] const receipt = await log.makeTx(template, 'deployLidoAPM', lidoApmDeployArguments, { from }) diff --git a/scripts/scratch/07-create-app-repos.js b/scripts/scratch/07-create-app-repos.js index a8dd22f06..64515a802 100644 --- a/scripts/scratch/07-create-app-repos.js +++ b/scripts/scratch/07-create-app-repos.js @@ -12,7 +12,7 @@ const DULL_CONTENT_URI = "0x0000000000000000000000000000000000000000000000000000 const REQUIRED_NET_STATE = [ - 'multisigAddress', + 'deployer', 'lidoTemplate', `app:${APP_NAMES.LIDO}`, `app:${APP_NAMES.ORACLE}`, @@ -60,7 +60,7 @@ async function createAppRepos({ web3, artifacts }) { oracleAppState.implementation.address, DULL_CONTENT_URI, ] - const from = state.multisigAddress + const from = state.deployer console.log({arguments, from}) diff --git a/scripts/scratch/08-deploy-dao.js b/scripts/scratch/08-deploy-dao.js index 09b4439aa..2857d68d8 100644 --- a/scripts/scratch/08-deploy-dao.js +++ b/scripts/scratch/08-deploy-dao.js @@ -16,7 +16,7 @@ const VALID_APP_NAMES = Object.entries(APP_NAMES).map((e) => e[1]) const REQUIRED_NET_STATE = [ 'ensAddress', - 'multisigAddress', + 'deployer', 'lidoTemplate', `app:${APP_NAMES.LIDO}`, `app:${APP_NAMES.ORACLE}`, @@ -68,7 +68,7 @@ async function deployDAO({ web3, artifacts }) { daoInitialSettings.token.name, daoInitialSettings.token.symbol, votingSettings, - ], { from: state.multisigAddress }) + ], { from: state.deployer }) state.lidoTemplateNewDaoTx = receipt.tx persistNetworkState(network.name, netId, state) } diff --git a/scripts/scratch/10-issue-tokens.js b/scripts/scratch/10-issue-tokens.js index cf9b2203f..a36339300 100644 --- a/scripts/scratch/10-issue-tokens.js +++ b/scripts/scratch/10-issue-tokens.js @@ -78,7 +78,7 @@ async function issueTokens({ web3, artifacts }) { await log.makeTx(template, 'issueTokens', [iHolders, iAmounts, vesting.start, vesting.cliff, vesting.end, vesting.revokable, '0x' + endTotalSupply.toString(16)] - , { from: state.multisigAddress }, + , { from: state.deployer }, ) } } diff --git a/scripts/scratch/11-finalize-dao.js b/scripts/scratch/11-finalize-dao.js index 07a07c97c..eb1347b42 100644 --- a/scripts/scratch/11-finalize-dao.js +++ b/scripts/scratch/11-finalize-dao.js @@ -17,6 +17,7 @@ const REQUIRED_NET_STATE = [ 'vestingParams', `app:${APP_NAMES.ARAGON_TOKEN_MANAGER}`, 'stakingRouter', + 'deployer', ] async function finalizeDAO({ web3, artifacts }) { @@ -68,7 +69,7 @@ async function finalizeDAO({ web3, artifacts }) { state.daoAragonId, state.vestingParams.unvestedTokensAmount, state.stakingRouter.address - ], { from: state.multisigAddress }) + ], { from: state.deployer }) } module.exports = runOrWrapScript(finalizeDAO, module) diff --git a/scripts/scratch/13-gate-seal.js b/scripts/scratch/13-gate-seal.js index 9d6e99021..f13b6280d 100644 --- a/scripts/scratch/13-gate-seal.js +++ b/scripts/scratch/13-gate-seal.js @@ -6,7 +6,7 @@ const { getEventArgument } = require('@aragon/contract-helpers-test') const { APP_NAMES } = require('../constants') const REQUIRED_NET_STATE = [ - "multisigAddress", + "deployer", "gateSeal", "validatorsExitBusOracle", "withdrawalQueueERC721", @@ -25,7 +25,7 @@ async function deployNewContracts({ web3, artifacts }) { } const gateSealFactoryAddress = state.gateSeal.factoryAddress - const deployer = state.multisigAddress + const deployer = state.deployer const sealables = [ state.withdrawalQueueERC721.proxy.address, state.validatorsExitBusOracle.proxy.address, diff --git a/scripts/scratch/15-grant-roles.js b/scripts/scratch/15-grant-roles.js index fb5827600..117c722c3 100644 --- a/scripts/scratch/15-grant-roles.js +++ b/scripts/scratch/15-grant-roles.js @@ -45,31 +45,31 @@ async function deployNewContracts({ web3, artifacts }) { const validatorsExitBusOracleAddress = state["validatorsExitBusOracle"].address const depositSecurityModuleAddress = state.depositSecurityModule.address - const owner = state.owner + const deployer = state.deployer // // === StakingRouter // const stakingRouter = await artifacts.require('StakingRouter').at(stakingRouterAddress) - await log.makeTx(stakingRouter, 'grantRole', [await stakingRouter.STAKING_MODULE_PAUSE_ROLE(), depositSecurityModuleAddress], { from: owner }) - await log.makeTx(stakingRouter, 'grantRole', [await stakingRouter.REPORT_EXITED_VALIDATORS_ROLE(), accountingOracleAddress], { from: owner }) - await log.makeTx(stakingRouter, 'grantRole', [await stakingRouter.REPORT_REWARDS_MINTED_ROLE(), lidoAddress], { from: owner }) + await log.makeTx(stakingRouter, 'grantRole', [await stakingRouter.STAKING_MODULE_PAUSE_ROLE(), depositSecurityModuleAddress], { from: deployer }) + await log.makeTx(stakingRouter, 'grantRole', [await stakingRouter.REPORT_EXITED_VALIDATORS_ROLE(), accountingOracleAddress], { from: deployer }) + await log.makeTx(stakingRouter, 'grantRole', [await stakingRouter.REPORT_REWARDS_MINTED_ROLE(), lidoAddress], { from: deployer }) logWideSplitter() // // === ValidatorsExitBusOracle // const validatorsExitBusOracle = await artifacts.require('ValidatorsExitBusOracle').at(validatorsExitBusOracleAddress) - await log.makeTx(validatorsExitBusOracle, 'grantRole', [await validatorsExitBusOracle.PAUSE_ROLE(), gateSealAddress], { from: owner }) + await log.makeTx(validatorsExitBusOracle, 'grantRole', [await validatorsExitBusOracle.PAUSE_ROLE(), gateSealAddress], { from: deployer }) logWideSplitter() // // === WithdrawalQueue // const withdrawalQueue = await artifacts.require('WithdrawalQueueERC721').at(withdrawalQueueAddress) - await log.makeTx(withdrawalQueue, 'grantRole', [await withdrawalQueue.PAUSE_ROLE(), gateSealAddress], { from: owner }) - await log.makeTx(withdrawalQueue, 'grantRole', [await withdrawalQueue.FINALIZE_ROLE(), lidoAddress], { from: owner }) - await log.makeTx(withdrawalQueue, 'grantRole', [await withdrawalQueue.ORACLE_ROLE(), accountingOracleAddress], { from: owner }) + await log.makeTx(withdrawalQueue, 'grantRole', [await withdrawalQueue.PAUSE_ROLE(), gateSealAddress], { from: deployer }) + await log.makeTx(withdrawalQueue, 'grantRole', [await withdrawalQueue.FINALIZE_ROLE(), lidoAddress], { from: deployer }) + await log.makeTx(withdrawalQueue, 'grantRole', [await withdrawalQueue.ORACLE_ROLE(), accountingOracleAddress], { from: deployer }) logWideSplitter() // @@ -77,7 +77,7 @@ async function deployNewContracts({ web3, artifacts }) { // const burner = await artifacts.require('Burner').at(burnerAddress) // NB: REQUEST_BURN_SHARES_ROLE is already granted to Lido in Burner constructor - await log.makeTx(burner, 'grantRole', [await burner.REQUEST_BURN_SHARES_ROLE(), nodeOperatorsRegistryAddress], { from: owner }) + await log.makeTx(burner, 'grantRole', [await burner.REQUEST_BURN_SHARES_ROLE(), nodeOperatorsRegistryAddress], { from: deployer }) } diff --git a/scripts/scratch/16-plug-curated-staking-module.js b/scripts/scratch/16-plug-curated-staking-module.js index 9b5ebe929..b6afce185 100644 --- a/scripts/scratch/16-plug-curated-staking-module.js +++ b/scripts/scratch/16-plug-curated-staking-module.js @@ -8,8 +8,7 @@ const { APP_NAMES } = require('../constants') const REQUIRED_NET_STATE = [ "stakingRouter", "app:node-operators-registry", - "owner", - + "deployer", "app:aragon-agent", `app:${APP_NAMES.LIDO}`, `app:${APP_NAMES.ORACLE}`, @@ -40,11 +39,11 @@ async function deployNewContracts({ web3, artifacts }) { let state = readNetworkState(network.name, netId) assertRequiredNetworkState(state, REQUIRED_NET_STATE) - const owner = state.owner + const deployer = state.deployer const stakingRouter = await artifacts.require('StakingRouter').at(state.stakingRouter.address) const nodeOperatorsRegistry = await artifacts.require('NodeOperatorsRegistry').at(state['app:node-operators-registry'].proxy.address) - await log.makeTx(stakingRouter, 'grantRole', [STAKING_MODULE_MANAGE_ROLE, owner], { from: owner }) + await log.makeTx(stakingRouter, 'grantRole', [STAKING_MODULE_MANAGE_ROLE, deployer], { from: deployer }) await log.makeTx(stakingRouter, 'addStakingModule', [ state.nodeOperatorsRegistry.parameters.stakingModuleTypeId, @@ -52,8 +51,8 @@ async function deployNewContracts({ web3, artifacts }) { NOR_STAKING_MODULE_TARGET_SHARE_BP, NOR_STAKING_MODULE_MODULE_FEE_BP, NOR_STAKING_MODULE_TREASURY_FEE_BP, - ], { from: owner }) - await log.makeTx(stakingRouter, 'renounceRole', [STAKING_MODULE_MANAGE_ROLE, owner], { from: owner }) + ], { from: deployer }) + await log.makeTx(stakingRouter, 'renounceRole', [STAKING_MODULE_MANAGE_ROLE, deployer], { from: deployer }) } module.exports = runOrWrapScript(deployNewContracts, module) diff --git a/scripts/scratch/17-transfer-roles.js b/scripts/scratch/17-transfer-roles.js index be584f2ef..ba6fcd8b2 100644 --- a/scripts/scratch/17-transfer-roles.js +++ b/scripts/scratch/17-transfer-roles.js @@ -48,25 +48,25 @@ async function deployNewContracts({ web3, artifacts }) { let state = readNetworkState(network.name, netId) assertRequiredNetworkState(state, REQUIRED_NET_STATE) - const owner = state.owner + const deployer = state.deployer const agent = state["app:aragon-agent"].proxy.address - await transferOZAdmin('Burner', state.burner.address, owner, agent) - await transferOZAdmin('HashConsensus', state.hashConsensusForAccounting.address, owner, agent) - await transferOZAdmin('HashConsensus', state.hashConsensusForValidatorsExitBus.address, owner, agent) - await transferOZAdmin('StakingRouter', state.stakingRouter.address, owner, agent) - await transferOZAdmin('AccountingOracle', state.accountingOracle.address, owner, agent) - await transferOZAdmin('ValidatorsExitBusOracle', state.validatorsExitBusOracle.address, owner, agent) - await transferOZAdmin('WithdrawalQueueERC721', state.withdrawalQueueERC721.address, owner, agent) - await transferOZAdmin('OracleDaemonConfig', state.oracleDaemonConfig.address, owner, agent) + await transferOZAdmin('Burner', state.burner.address, deployer, agent) + await transferOZAdmin('HashConsensus', state.hashConsensusForAccounting.address, deployer, agent) + await transferOZAdmin('HashConsensus', state.hashConsensusForValidatorsExitBus.address, deployer, agent) + await transferOZAdmin('StakingRouter', state.stakingRouter.address, deployer, agent) + await transferOZAdmin('AccountingOracle', state.accountingOracle.address, deployer, agent) + await transferOZAdmin('ValidatorsExitBusOracle', state.validatorsExitBusOracle.address, deployer, agent) + await transferOZAdmin('WithdrawalQueueERC721', state.withdrawalQueueERC721.address, deployer, agent) + await transferOZAdmin('OracleDaemonConfig', state.oracleDaemonConfig.address, deployer, agent) - await changeOssifiableProxyAdmin(state.lidoLocator.address, owner, agent) - await changeOssifiableProxyAdmin(state.stakingRouter.address, owner, agent) - await changeOssifiableProxyAdmin(state.accountingOracle.address, owner, agent) - await changeOssifiableProxyAdmin(state.validatorsExitBusOracle.address, owner, agent) - await changeOssifiableProxyAdmin(state.withdrawalQueueERC721.address, owner, agent) + await changeOssifiableProxyAdmin(state.lidoLocator.address, deployer, agent) + await changeOssifiableProxyAdmin(state.stakingRouter.address, deployer, agent) + await changeOssifiableProxyAdmin(state.accountingOracle.address, deployer, agent) + await changeOssifiableProxyAdmin(state.validatorsExitBusOracle.address, deployer, agent) + await changeOssifiableProxyAdmin(state.withdrawalQueueERC721.address, deployer, agent) - await changeDepositSecurityModuleAdmin(state.depositSecurityModule.address, owner, agent) + await changeDepositSecurityModuleAdmin(state.depositSecurityModule.address, deployer, agent) } module.exports = runOrWrapScript(deployNewContracts, module) diff --git a/scripts/scratch/custom-deploy-aragon-std-apps.js b/scripts/scratch/custom-deploy-aragon-std-apps.js index 5fe253059..927d434f9 100644 --- a/scripts/scratch/custom-deploy-aragon-std-apps.js +++ b/scripts/scratch/custom-deploy-aragon-std-apps.js @@ -18,7 +18,7 @@ require('@aragon/buidler-aragon/dist/bootstrap-paths') const REQUIRED_NET_STATE = [ - 'multisigAddress', + 'deployer', ] @@ -27,7 +27,7 @@ async function deployAragonStdApps({ web3, artifacts, }) { const state = readNetworkState(network.name, netId) assertRequiredNetworkState(state, REQUIRED_NET_STATE) - const deployer = state["multisigAddress"] + const deployer = state.deployer await deployImplementation("app:aragon-agent", "Agent", deployer) await deployImplementation("app:aragon-finance", "Finance", deployer) await deployImplementation("app:aragon-token-manager", "TokenManager", deployer) diff --git a/scripts/scratch/deploy-aragon-env.js b/scripts/scratch/deploy-aragon-env.js index 5be60cb30..5763bb505 100644 --- a/scripts/scratch/deploy-aragon-env.js +++ b/scripts/scratch/deploy-aragon-env.js @@ -25,14 +25,14 @@ async function deployAragonEnv({ web3, artifacts, networkStateFile = NETWORK_STA let state = readNetworkState(network.name, netId) - if (state.owner) { - const lowercaseOwner = state.owner.toLowerCase() + if (state.deployer) { + const lowercaseOwner = state.deployer.toLowerCase() if (!accounts.some((acc) => acc.toLowerCase() === lowercaseOwner)) { - throw new Error(`owner account ${state.owner} is missing from provided accounts`) + throw new Error(`owner account ${state.deployer} is missing from provided accounts`) } } else { - state.owner = accounts[0] - log(`Setting owner to the first provided account: ${chalk.yellow(state.owner)}`) + state.deployer = accounts[0] + log(`Setting owner to the first provided account: ${chalk.yellow(state.deployer)}`) } if (!state.aragonEnsLabelName) { @@ -44,7 +44,7 @@ async function deployAragonEnv({ web3, artifacts, networkStateFile = NETWORK_STA logHeader(`ENS`) const ensResults = await useOrDeployENS({ artifacts, - owner: state.owner, + owner: state.deployer, ensAddress: state.ensAddress }) state = readNetworkState(network.name, netId) @@ -54,7 +54,7 @@ async function deployAragonEnv({ web3, artifacts, networkStateFile = NETWORK_STA logHeader(`DAO factory`) const daoFactoryResults = await useOrDeployDaoFactory({ artifacts, - owner: state.owner, + owner: state.deployer, daoFactoryAddress: state.daoFactoryAddress }) state = readNetworkState(network.name, netId) @@ -64,7 +64,7 @@ async function deployAragonEnv({ web3, artifacts, networkStateFile = NETWORK_STA logHeader(`APM registry factory`) const apmRegistryFactoryResults = await useOrDeployAPMRegistryFactory({ artifacts, - owner: state.owner, + owner: state.deployer, ens: ensResults.ens, daoFactory: daoFactoryResults.daoFactory, apmRegistryFactoryAddress: state.apmRegistryFactoryAddress, @@ -80,7 +80,7 @@ async function deployAragonEnv({ web3, artifacts, networkStateFile = NETWORK_STA const apmResults = await deployAPM({ web3, artifacts, - owner: state.owner, + owner: state.deployer, labelName: state.aragonEnsLabelName, ens: ensResults.ens, apmRegistryFactory: apmRegistryFactoryResults.apmRegistryFactory, @@ -97,7 +97,7 @@ async function deployAragonEnv({ web3, artifacts, networkStateFile = NETWORK_STA logHeader(`MiniMeTokenFactory`) const tokenFactoryResults = await deployMiniMeTokenFactory({ artifacts, - owner: state.owner, + owner: state.deployer, miniMeTokenFactoryAddress: state.miniMeTokenFactoryAddress }) state = readNetworkState(network.name, netId) @@ -107,7 +107,7 @@ async function deployAragonEnv({ web3, artifacts, networkStateFile = NETWORK_STA logHeader('AragonID') const aragonIDResults = await deployAragonID({ artifacts, - owner: state.owner, + owner: state.deployer, ens: ensResults.ens, aragonIDAddress: state.aragonIDAddress }) diff --git a/scripts/scratch/deploy-lido-apm-and-template.js b/scripts/scratch/deploy-lido-apm-and-template.js index 81d494f9e..c357db9a7 100644 --- a/scripts/scratch/deploy-lido-apm-and-template.js +++ b/scripts/scratch/deploy-lido-apm-and-template.js @@ -14,8 +14,7 @@ const DAO_TEMPLATE_ENS_LABEL = process.env.DAO_TEMPLATE_ENS_LABEL || 'template' const NETWORK_STATE_FILE = process.env.NETWORK_STATE_FILE || 'deployed.json' const REQUIRED_NET_STATE = [ - 'owner', - 'multisigAddress', + 'deployer', 'ensAddress', 'apmRegistryFactoryAddress', 'daoFactoryAddress', @@ -42,7 +41,7 @@ async function deployApmAndTemplate({ throw new Error(`missing following fields from network state file, make sure you've run previous deployment steps: ${missingDesc}`) } - log(`Owner: ${chalk.yellow(state.owner)}`) + log(`Deployer: ${chalk.yellow(state.deployer)}`) const ens = await artifacts.require('ENS').at(state.ensAddress) log(`Using ENS: ${chalk.yellow(ens.address)}`) @@ -64,7 +63,7 @@ async function deployApmAndTemplate({ artifacts, ens, apmRegistryFactory, - owner: state.owner, + owner: state.deployer, labelName: state.lidoEnsLabelName, apmRegistryAddress: state.lidoApmAddress }) @@ -79,7 +78,7 @@ async function deployApmAndTemplate({ const daoTemplateResults = await deployDaoTemplate({ artifacts, ens, - owner: state.owner, + owner: state.deployer, lidoEnsNodeName: state.lidoEnsNodeName, lidoApmAddress: state.lidoApmAddress, daoFactoryAddress: state.daoFactoryAddress, diff --git a/scripts/upgrade/deploy-new-app-instance.js b/scripts/upgrade/deploy-new-app-instance.js index 23e36ad27..08d5107a7 100644 --- a/scripts/upgrade/deploy-new-app-instance.js +++ b/scripts/upgrade/deploy-new-app-instance.js @@ -26,7 +26,7 @@ async function upgradeApp({ web3, artifacts, appName = APP }) { logSplitter() await saveDeployTx(appArtifact, `tx-13-1-deploy-${appName}-base.json`, { - from: DEPLOYER || state.multisigAddress + from: DEPLOYER || state.deployer }) logSplitter() diff --git a/scripts/upgrade/obtain-deployed-new-app-instance.js b/scripts/upgrade/obtain-deployed-new-app-instance.js index f04333b4a..b2a2d0139 100644 --- a/scripts/upgrade/obtain-deployed-new-app-instance.js +++ b/scripts/upgrade/obtain-deployed-new-app-instance.js @@ -8,7 +8,7 @@ const { APP_NAMES, APP_ARTIFACTS } = require('./constants') const VALID_APP_NAMES = Object.entries(APP_NAMES).map((e) => e[1]) const APP = process.env.APP || '' -const REQUIRED_NET_STATE = ['ensAddress', 'multisigAddress', 'lidoBaseDeployTx', 'oracleBaseDeployTx', 'nodeOperatorsRegistryBaseDeployTx'] +const REQUIRED_NET_STATE = ['ensAddress', 'deployer', 'lidoBaseDeployTx', 'oracleBaseDeployTx', 'nodeOperatorsRegistryBaseDeployTx'] async function obtainInstance({ web3, artifacts, appName = APP }) { if (!appName || !VALID_APP_NAMES.includes(appName)) { diff --git a/scripts/upgrade/upgrade-app.js b/scripts/upgrade/upgrade-app.js index b593336c2..964b442e0 100644 --- a/scripts/upgrade/upgrade-app.js +++ b/scripts/upgrade/upgrade-app.js @@ -73,7 +73,7 @@ async function upgradeAppImpl({ web3, artifacts, appName = APP }) { } const versionTo = currentVersion.map((n) => n.toNumber()) - const txSender = HOLDER || state.multisigAddress + const txSender = HOLDER || state.deployer log(`Upgrading app:`, yl(appName)) log(`App ID:`, yl(appId)) diff --git a/scripts/utils/31-start-protocol.js b/scripts/utils/31-start-protocol.js index b71d79a87..e5261adde 100644 --- a/scripts/utils/31-start-protocol.js +++ b/scripts/utils/31-start-protocol.js @@ -78,12 +78,12 @@ async function createVoting({ web3, artifacts }) { const txName = `tx-31-start-protocol.json` const votingDesc = `1) Unpause protocol -2) Unpause staking +2) Unpause staking 3) Set daily staking limit to ${fromE18ToString(dailyStakingLimit)}` await saveCallTxData(votingDesc, tokenManager, 'forward', txName, { arguments: [votingCallData], - from: DEPLOYER || state.multisigAddress + from: DEPLOYER || state.deployer }) log.splitter() diff --git a/scripts/utils/32-change-voting-time.js b/scripts/utils/32-change-voting-time.js index dcaa078f7..1e42f68b0 100644 --- a/scripts/utils/32-change-voting-time.js +++ b/scripts/utils/32-change-voting-time.js @@ -126,7 +126,7 @@ async function createVoting({ web3, artifacts }) { await saveCallTxData(votingDesc, tokenManager, 'forward', txName, { arguments: [votingCallData], - from: DEPLOYER || state.multisigAddress + from: DEPLOYER || state.deployer }) log.splitter() diff --git a/scripts/utils/verify-vote-tx.js b/scripts/utils/verify-vote-tx.js index 081e44e71..c1be3807e 100644 --- a/scripts/utils/verify-vote-tx.js +++ b/scripts/utils/verify-vote-tx.js @@ -7,7 +7,6 @@ const { readNetworkState, assertRequiredNetworkState } = require('../helpers/per const TX = process.env.TX const REQUIRED_NET_STATE = [ 'ensAddress', - 'multisigAddress', 'lidoBaseDeployTx', 'oracleBaseDeployTx', 'nodeOperatorsRegistryBaseDeployTx',