From 91c939c6ab6baec7294c508aebc1fb6f780fff75 Mon Sep 17 00:00:00 2001 From: George Avsetsin Date: Sun, 24 Mar 2024 10:41:26 +0300 Subject: [PATCH 01/26] feat: gnosis singleton check --- programs/staking-module/simple-dvt.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/programs/staking-module/simple-dvt.ts b/programs/staking-module/simple-dvt.ts index 76c1dc5..609c8a9 100644 --- a/programs/staking-module/simple-dvt.ts +++ b/programs/staking-module/simple-dvt.ts @@ -1,6 +1,6 @@ import { provider } from '@providers'; import { logger } from '@utils'; -import { Contract, EventLog, ZeroAddress } from 'ethers'; +import { AbiCoder, Contract, EventLog, ZeroAddress } from 'ethers'; import { lidoAddress, wstethAddress, @@ -14,6 +14,7 @@ import { splitMainAddress, gnosisSafeAbi, gnosisSafeProxyFactoryContract, + gnosisSafeSingletonAddress, } from '@contracts'; import chalk from 'chalk'; import Table from 'cli-table3'; @@ -199,13 +200,18 @@ export const checkGnosisSafe = async (safeAddress: string, splitAccounts: string const isExpectedVersion = version === expectedGnosisVersion; const isExpectedThreshold = threshold >= expectedMinThreshold; + const singletonBytes = await provider.getStorage(safeAddress, 0); + const singletonAddress = AbiCoder.defaultAbiCoder().decode(['address'], singletonBytes).toString(); + const isGnosisSingleton = singletonAddress.toLocaleLowerCase() === gnosisSafeSingletonAddress.toLocaleLowerCase(); + logger.log(''); logger.log(header('GnosisSafe contract')); logger.log(''); + logger.log('Singleton: ', passOrFail(singletonAddress, isGnosisSingleton)); + logger.log('Proxy bytecode: ', passOrFail(`${isCodeMatch ? '' : 'do not '}match GnosisProxy`, isCodeMatch)); + logger.log('Gnosis version: ', passOrFail(version, isExpectedVersion)); logger.log('Threshold: ', passOrFail(threshold, isExpectedThreshold)); - logger.log('MS version: ', passOrFail(version, isExpectedVersion)); - logger.log('MS bytecode: ', passOrFail(`${isCodeMatch ? '' : 'do not '}match GnosisProxy`, isCodeMatch)); logger.log('Owners amount: ', passOrFail(`${isAmountMatch ? '' : 'do not '}match Split`, isAmountMatch)); logger.log('Owners: ', passOrWarn(`${isOwnersMatch ? '' : 'do not '}match Split`, isOwnersMatch)); From 01a8aa1f00efd4f3a9f3f7a6d8a6ab0be46390c6 Mon Sep 17 00:00:00 2001 From: George Avsetsin Date: Wed, 17 Apr 2024 13:02:26 +0300 Subject: [PATCH 02/26] feat: holesky devnet --- configs/deployed-holesky-devnet.json | 690 +++++++++++++++++++++ configs/extra-deployed-holesky-devnet.json | 1 + contracts/ens.ts | 2 +- package.json | 2 + programs/voting.ts | 31 +- utils/voting.ts | 39 +- yarn.lock | 14 + 7 files changed, 770 insertions(+), 9 deletions(-) create mode 100644 configs/deployed-holesky-devnet.json create mode 100644 configs/extra-deployed-holesky-devnet.json diff --git a/configs/deployed-holesky-devnet.json b/configs/deployed-holesky-devnet.json new file mode 100644 index 0000000..7d502a7 --- /dev/null +++ b/configs/deployed-holesky-devnet.json @@ -0,0 +1,690 @@ +{ + "accountingOracle": { + "deployParameters": { + "consensusVersion": 1 + }, + "proxy": { + "contract": "contracts/0.8.9/proxy/OssifiableProxy.sol", + "address": "0xe38B18b7656f47Dd65c86D17d828fF1c9499ABC9", + "constructorArgs": [ + "0xC192F327C92CAa62790f2ccc1648b824db641F95", + "0xB498933ADAaCC74dCf8f1291Cce0C46e66FAAf41", + "0x" + ] + }, + "implementation": { + "contract": "contracts/0.8.9/oracle/AccountingOracle.sol", + "address": "0xC192F327C92CAa62790f2ccc1648b824db641F95", + "constructorArgs": [ + "0x5bF85BadDac33F91B38617c18a3F829f912Ca060", + "0xFfC41725C09407E4713FB4d02bc814c40ed15FD1", + "0x233fCE0ED7Df9ac4D05D72f24bf2EF5dC284C2B7", + 12, + 1695902400 + ] + } + }, + "apmRegistryFactory": { + "contract": "@aragon/os/contracts/factory/APMRegistryFactory.sol", + "address": "0x47B7517E6837159fB949d73Dea95276223288e80", + "constructorArgs": [ + "0x312BA9De35A90bdDE4A6ff08b8E343126678Fa89", + "0x3390B2F6A574Ebe40eA8A066752c196CeaB85928", + "0xf2e3f86314F4e2C2cd307Bd9eE748A389d09555C", + "0x585017e1EfCE062C0A8818a8BB30576f7bBB8341", + "0x20B766eDCE96e30ec7d0dF9BfAB5528704D79ffA", + "0x0000000000000000000000000000000000000000" + ] + }, + "app:aragon-agent": { + "implementation": { + "contract": "@aragon/apps-agent/contracts/Agent.sol", + "address": "0x6cd24ad34F5E000FD91241f2f6C5a71BfA46Ac1E", + "constructorArgs": [] + }, + "aragonApp": { + "name": "aragon-agent", + "fullName": "aragon-agent.lidopm.eth", + "id": "0x701a4fd1f5174d12a0f1d9ad2c88d0ad11ab6aad0ac72b7d9ce621815f8016a9" + }, + "proxy": { + "address": "0x83bcD5963d07C1Bb4578068a639f51dB0699DeEd", + "contract": "@aragon/os/contracts/apps/AppProxyUpgradeable.sol", + "constructorArgs": [ + "0x71644381dc8849eb983333332E77A2311a1ea5D1", + "0x701a4fd1f5174d12a0f1d9ad2c88d0ad11ab6aad0ac72b7d9ce621815f8016a9", + "0x8129fc1c" + ] + } + }, + "app:aragon-finance": { + "implementation": { + "contract": "@aragon/apps-finance/contracts/Finance.sol", + "address": "0x977aEb3b397A7C57f4629F48237543bE04129b09", + "constructorArgs": [] + }, + "aragonApp": { + "name": "aragon-finance", + "fullName": "aragon-finance.lidopm.eth", + "id": "0x5c9918c99c4081ca9459c178381be71d9da40e49e151687da55099c49a4237f1" + }, + "proxy": { + "address": "0x963B15fd5724d952395C7b02A089048A6F2F8724", + "contract": "@aragon/os/contracts/apps/AppProxyUpgradeable.sol", + "constructorArgs": [ + "0x71644381dc8849eb983333332E77A2311a1ea5D1", + "0x5c9918c99c4081ca9459c178381be71d9da40e49e151687da55099c49a4237f1", + "0x1798de8100000000000000000000000083bcd5963d07c1bb4578068a639f51db0699deed0000000000000000000000000000000000000000000000000000000000278d00" + ] + } + }, + "app:aragon-token-manager": { + "implementation": { + "contract": "@aragon/apps-lido/apps/token-manager/contracts/TokenManager.sol", + "address": "0xcfbb84D72db4C1338523FA0b8d9551a7A2E93574", + "constructorArgs": [] + }, + "aragonApp": { + "name": "aragon-token-manager", + "fullName": "aragon-token-manager.lidopm.eth", + "id": "0xcd567bdf93dd0f6acc3bc7f2155f83244d56a65abbfbefb763e015420102c67b" + }, + "proxy": { + "address": "0x043De8B0587E7F7bdC6eB50835f4c5D521a91795", + "contract": "@aragon/os/contracts/apps/AppProxyUpgradeable.sol", + "constructorArgs": [ + "0x71644381dc8849eb983333332E77A2311a1ea5D1", + "0xcd567bdf93dd0f6acc3bc7f2155f83244d56a65abbfbefb763e015420102c67b", + "0x" + ] + } + }, + "app:aragon-voting": { + "implementation": { + "contract": "@aragon/apps-lido/apps/voting/contracts/Voting.sol", + "address": "0x5DB463A0eCE302C8fc83aDc6BF714b4F7368769e", + "constructorArgs": [] + }, + "aragonApp": { + "name": "aragon-voting", + "fullName": "aragon-voting.lidopm.eth", + "id": "0x0abcd104777321a82b010357f20887d61247493d89d2e987ff57bcecbde00e1e" + }, + "proxy": { + "address": "0xd8B7F4EFd16e913648C6E9B74772BC3C38203301", + "contract": "@aragon/os/contracts/apps/AppProxyUpgradeable.sol", + "constructorArgs": [ + "0x71644381dc8849eb983333332E77A2311a1ea5D1", + "0x0abcd104777321a82b010357f20887d61247493d89d2e987ff57bcecbde00e1e", + "0x13e094530000000000000000000000006776fbddd22c19b7fb8295d0f3ebbb2a00f675e800000000000000000000000000000000000000000000000006f05b59d3b2000000000000000000000000000000000000000000000000000000b1a2bc2ec500000000000000000000000000000000000000000000000000000000000000000384000000000000000000000000000000000000000000000000000000000000012c" + ] + } + }, + "app:lido": { + "implementation": { + "contract": "contracts/0.4.24/Lido.sol", + "address": "0xa85b84655028B0630d617ac70f9d188ba241ee7d", + "constructorArgs": [] + }, + "aragonApp": { + "name": "lido", + "fullName": "lido.lidopm.eth", + "id": "0x3ca7c3e38968823ccb4c78ea688df41356f182ae1d159e4ee608d30d68cef320" + }, + "proxy": { + "address": "0xFfC41725C09407E4713FB4d02bc814c40ed15FD1", + "contract": "@aragon/os/contracts/apps/AppProxyUpgradeable.sol", + "constructorArgs": [ + "0x71644381dc8849eb983333332E77A2311a1ea5D1", + "0x3ca7c3e38968823ccb4c78ea688df41356f182ae1d159e4ee608d30d68cef320", + "0x" + ] + } + }, + "app:node-operators-registry": { + "implementation": { + "contract": "contracts/0.4.24/nos/NodeOperatorsRegistry.sol", + "address": "0x1De515A9453FABf35D65f649079ea109d5D70383", + "constructorArgs": [] + }, + "aragonApp": { + "name": "node-operators-registry", + "fullName": "node-operators-registry.lidopm.eth", + "id": "0x7071f283424072341f856ac9e947e7ec0eb68719f757a7e785979b6b8717579d" + }, + "proxy": { + "address": "0xE12ABf35fA6f69C97Cc0AcF67B38D3000435790e", + "contract": "@aragon/os/contracts/apps/AppProxyUpgradeable.sol", + "constructorArgs": [ + "0x71644381dc8849eb983333332E77A2311a1ea5D1", + "0x7071f283424072341f856ac9e947e7ec0eb68719f757a7e785979b6b8717579d", + "0x" + ] + } + }, + "app:oracle": { + "implementation": { + "contract": "contracts/0.4.24/oracle/LegacyOracle.sol", + "address": "0xF12A13972304b68e172a6028C5Aad3f2C7D1C4D5", + "constructorArgs": [] + }, + "aragonApp": { + "name": "oracle", + "fullName": "oracle.lidopm.eth", + "id": "0x8b47ba2a8454ec799cd91646e7ec47168e91fd139b23f017455f3e5898aaba93" + }, + "proxy": { + "address": "0x233fCE0ED7Df9ac4D05D72f24bf2EF5dC284C2B7", + "contract": "@aragon/os/contracts/apps/AppProxyUpgradeable.sol", + "constructorArgs": [ + "0x71644381dc8849eb983333332E77A2311a1ea5D1", + "0x8b47ba2a8454ec799cd91646e7ec47168e91fd139b23f017455f3e5898aaba93", + "0x" + ] + } + }, + "aragon-acl": { + "implementation": { + "contract": "@aragon/os/contracts/acl/ACL.sol", + "address": "0x352Abf97af99000450E13ff686a6f53a180bE425", + "constructorArgs": [] + }, + "proxy": { + "address": "0xC82143255674c1d192FE8aD38bAC6F00c655bA07", + "constructorArgs": [ + "0x71644381dc8849eb983333332E77A2311a1ea5D1", + "0xe3262375f45a6e2026b7e7b18c2b807434f2508fe1a2a3dfb493c7df8f4aad6a", + "0x00" + ], + "contract": "@aragon/os/contracts/apps/AppProxyUpgradeable.sol" + }, + "aragonApp": { + "name": "aragon-acl", + "id": "0xe3262375f45a6e2026b7e7b18c2b807434f2508fe1a2a3dfb493c7df8f4aad6a" + } + }, + "aragon-apm-registry": { + "implementation": { + "contract": "@aragon/os/contracts/apm/APMRegistry.sol", + "address": "0x3390B2F6A574Ebe40eA8A066752c196CeaB85928", + "constructorArgs": [] + }, + "proxy": { + "address": "0x867283e151103376dfa981eD375EB5C348f9d2bA" + } + }, + "aragon-evm-script-registry": { + "proxy": { + "address": "0x823aEFDa94A0FCb5c2F46AaB743338086C652B9D", + "constructorArgs": [ + "0x71644381dc8849eb983333332E77A2311a1ea5D1", + "0xddbcfd564f642ab5627cf68b9b7d374fb4f8a36e941a75d89c87998cef03bd61", + "0x00" + ], + "contract": "@aragon/os/contracts/apps/AppProxyPinned.sol" + }, + "aragonApp": { + "name": "aragon-evm-script-registry", + "id": "0xddbcfd564f642ab5627cf68b9b7d374fb4f8a36e941a75d89c87998cef03bd61" + }, + "implementation": { + "address": "0x6A615CEc74fBd36dD0ccB3833800A28059bcBDF0", + "contract": "@aragon/os/contracts/evmscript/EVMScriptRegistry.sol", + "constructorArgs": [] + } + }, + "aragon-kernel": { + "implementation": { + "contract": "@aragon/os/contracts/kernel/Kernel.sol", + "address": "0xaCA871d161d4D5149cAF76B267456ddc876EA7B0", + "constructorArgs": [ + true + ] + }, + "proxy": { + "address": "0x71644381dc8849eb983333332E77A2311a1ea5D1", + "contract": "@aragon/os/contracts/kernel/KernelProxy.sol", + "constructorArgs": [ + "0xaCA871d161d4D5149cAF76B267456ddc876EA7B0" + ] + } + }, + "aragon-repo-base": { + "contract": "@aragon/os/contracts/apm/Repo.sol", + "address": "0xf2e3f86314F4e2C2cd307Bd9eE748A389d09555C", + "constructorArgs": [] + }, + "aragonEnsLabelName": "aragonpm", + "aragonID": { + "address": "0xa49E90C89F97f24fB8f37D2A5B5EdAB28Ad240C9", + "contract": "@aragon/id/contracts/FIFSResolvingRegistrar.sol", + "constructorArgs": [ + "0x20B766eDCE96e30ec7d0dF9BfAB5528704D79ffA", + "0x315442a9B600B7000ff6404c0346F3D5ef306Dd9", + "0x7e74a86b6e146964fb965db04dc2590516da77f720bb6759337bf5632415fd86" + ] + }, + "burner": { + "deployParameters": { + "totalCoverSharesBurnt": "0", + "totalNonCoverSharesBurnt": "0" + }, + "contract": "contracts/0.8.9/Burner.sol", + "address": "0x13543040D5100ca3b6c5301b5B9A76C1d1950823", + "constructorArgs": [ + "0xB498933ADAaCC74dCf8f1291Cce0C46e66FAAf41", + "0x83bcD5963d07C1Bb4578068a639f51dB0699DeEd", + "0xFfC41725C09407E4713FB4d02bc814c40ed15FD1", + "0", + "0" + ] + }, + "callsScript": { + "address": "0x7AbAE7A396dB7a5E51e3D83CeD14a5692E15decF", + "contract": "@aragon/os/contracts/evmscript/executors/CallsScript.sol", + "constructorArgs": [] + }, + "chainId": 17000, + "chainSpec": { + "slotsPerEpoch": 32, + "secondsPerSlot": 12, + "genesisTime": 1695902400, + "depositContract": "0x389Ead551Ca438506551270BB3eF27EC01d58A18" + }, + "createAppReposTx": "0xe0a7ba96b9de1e6ac7f59b5748e4b92912028ac8c1a73abc98c41bced0063294", + "daoAragonId": "lido-dao", + "daoFactory": { + "address": "0x312BA9De35A90bdDE4A6ff08b8E343126678Fa89", + "contract": "@aragon/os/contracts/factory/DAOFactory.sol", + "constructorArgs": [ + "0xaCA871d161d4D5149cAF76B267456ddc876EA7B0", + "0x352Abf97af99000450E13ff686a6f53a180bE425", + "0xDeeE59EB8Aa09B16C0149e5d36C866978a1dcE74" + ] + }, + "daoInitialSettings": { + "voting": { + "minSupportRequired": "500000000000000000", + "minAcceptanceQuorum": "50000000000000000", + "voteDuration": 900, + "objectionPhaseDuration": 300 + }, + "fee": { + "totalPercent": 10, + "treasuryPercent": 50, + "nodeOperatorsPercent": 50 + }, + "token": { + "name": "TEST Lido DAO Token", + "symbol": "TLDO" + } + }, + "deployer": "0xB498933ADAaCC74dCf8f1291Cce0C46e66FAAf41", + "depositContract": { + "contract": "contracts/0.6.11/deposit_contract.sol", + "address": "0x389Ead551Ca438506551270BB3eF27EC01d58A18", + "constructorArgs": [] + }, + "depositSecurityModule": { + "deployParameters": { + "maxDepositsPerBlock": 150, + "minDepositBlockDistance": 5, + "pauseIntentValidityPeriodBlocks": 6646, + "usePredefinedAddressInstead": null + }, + "contract": "contracts/0.8.9/DepositSecurityModule.sol", + "address": "0xcE70E91935F97562e82991dC2cb37Cb2A7BA8E4C", + "constructorArgs": [ + "0xFfC41725C09407E4713FB4d02bc814c40ed15FD1", + "0x389Ead551Ca438506551270BB3eF27EC01d58A18", + "0x7a290b0153eD799bc86202B7e59317a18Ed36a93", + 150, + 5, + 6646 + ] + }, + "dummyEmptyContract": { + "contract": "contracts/0.8.9/test_helpers/DummyEmptyContract.sol", + "address": "0x9e6518a79ABDeb9BACBb113a9E062fBAF5A345B6", + "constructorArgs": [] + }, + "eip712StETH": { + "contract": "contracts/0.8.9/EIP712StETH.sol", + "address": "0x907695490049c4B95F39bB38Bb8907Aa50430ecf", + "constructorArgs": [ + "0xFfC41725C09407E4713FB4d02bc814c40ed15FD1" + ] + }, + "ens": { + "address": "0x20B766eDCE96e30ec7d0dF9BfAB5528704D79ffA", + "constructorArgs": [ + "0xB498933ADAaCC74dCf8f1291Cce0C46e66FAAf41" + ], + "contract": "@aragon/os/contracts/lib/ens/ENS.sol" + }, + "ensFactory": { + "contract": "@aragon/os/contracts/factory/ENSFactory.sol", + "address": "0x195173de7fbE018C6ae42b04C9ce13333d3A5796", + "constructorArgs": [] + }, + "ensNode": { + "nodeName": "aragonpm.eth", + "nodeIs": "0x9065c3e7f7b7ef1ef4e53d2d0b8e0cef02874ab020c1ece79d5f0d3d0111c0ba" + }, + "ensSubdomainRegistrar": { + "implementation": { + "contract": "@aragon/os/contracts/ens/ENSSubdomainRegistrar.sol", + "address": "0x585017e1EfCE062C0A8818a8BB30576f7bBB8341", + "constructorArgs": [] + } + }, + "evmScriptRegistryFactory": { + "contract": "@aragon/os/contracts/factory/EVMScriptRegistryFactory.sol", + "address": "0xDeeE59EB8Aa09B16C0149e5d36C866978a1dcE74", + "constructorArgs": [] + }, + "executionLayerRewardsVault": { + "contract": "contracts/0.8.9/LidoExecutionLayerRewardsVault.sol", + "address": "0x3691a90399f0D0C0d031BB8eB3aB8F121b6cdDC9", + "constructorArgs": [ + "0xFfC41725C09407E4713FB4d02bc814c40ed15FD1", + "0x83bcD5963d07C1Bb4578068a639f51dB0699DeEd" + ] + }, + "gateSeal": { + "address": null, + "factoryAddress": null, + "sealDuration": 518400, + "expiryTimestamp": 1714521600, + "sealingCommittee": [] + }, + "hashConsensusForAccountingOracle": { + "deployParameters": { + "fastLaneLengthSlots": 10, + "epochsPerFrame": 12 + }, + "contract": "contracts/0.8.9/oracle/HashConsensus.sol", + "address": "0x8570FDc248537C9F22fBD2Ec1348805dE06F1f6b", + "constructorArgs": [ + 32, + 12, + 1695902400, + 12, + 10, + "0xB498933ADAaCC74dCf8f1291Cce0C46e66FAAf41", + "0xe38B18b7656f47Dd65c86D17d828fF1c9499ABC9" + ] + }, + "hashConsensusForValidatorsExitBusOracle": { + "deployParameters": { + "fastLaneLengthSlots": 10, + "epochsPerFrame": 4 + }, + "contract": "contracts/0.8.9/oracle/HashConsensus.sol", + "address": "0x1D5c8686a6f1c3A6bfeE257385e63941494Fb6B6", + "constructorArgs": [ + 32, + 12, + 1695902400, + 4, + 10, + "0xB498933ADAaCC74dCf8f1291Cce0C46e66FAAf41", + "0x390285e916212041ba7f97500605b968808a0aAD" + ] + }, + "ldo": { + "address": "0x6776FbdDd22c19b7FB8295D0f3eBbB2a00F675E8", + "contract": "@aragon/minime/contracts/MiniMeToken.sol", + "constructorArgs": [ + "0x499600e39900BBd04FD2c5e3043271df463A68dB", + "0x0000000000000000000000000000000000000000", + 0, + "TEST Lido DAO Token", + 18, + "TLDO", + true + ] + }, + "legacyOracle": { + "deployParameters": { + "lastCompletedEpochId": 0 + } + }, + "lidoApm": { + "deployArguments": [ + "0x93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae", + "0x90a9580abeb24937fc658e497221c81ce8553b560304f9525821f32b17dbdaec" + ], + "deployTx": "0xc5d16ff88f7b3fb2df13c4f04ec56990852711fbedde9b4c3c7b721cb0dc5845", + "address": "0x305b3814a5478dA38074389602D0b27f73c8BB1f" + }, + "lidoApmEnsName": "lidopm.eth", + "lidoApmEnsRegDurationSec": 94608000, + "lidoLocator": { + "proxy": { + "contract": "contracts/0.8.9/proxy/OssifiableProxy.sol", + "address": "0x5bF85BadDac33F91B38617c18a3F829f912Ca060", + "constructorArgs": [ + "0x9e6518a79ABDeb9BACBb113a9E062fBAF5A345B6", + "0xB498933ADAaCC74dCf8f1291Cce0C46e66FAAf41", + "0x" + ] + }, + "implementation": { + "contract": "contracts/0.8.9/LidoLocator.sol", + "address": "0x8531e595358551FBb5457b6733d27BA2B0EcA18b", + "constructorArgs": [ + [ + "0xe38B18b7656f47Dd65c86D17d828fF1c9499ABC9", + "0xcE70E91935F97562e82991dC2cb37Cb2A7BA8E4C", + "0x3691a90399f0D0C0d031BB8eB3aB8F121b6cdDC9", + "0x233fCE0ED7Df9ac4D05D72f24bf2EF5dC284C2B7", + "0xFfC41725C09407E4713FB4d02bc814c40ed15FD1", + "0x3f40cb2aFEc35e8Ae59D35182071872dEb6f73B5", + "0x233fCE0ED7Df9ac4D05D72f24bf2EF5dC284C2B7", + "0x13543040D5100ca3b6c5301b5B9A76C1d1950823", + "0x7a290b0153eD799bc86202B7e59317a18Ed36a93", + "0x83bcD5963d07C1Bb4578068a639f51dB0699DeEd", + "0x390285e916212041ba7f97500605b968808a0aAD", + "0x78D21947C2B47A8655B172258Ea4819E3E52e0e1", + "0x26d7E5d08Fa9E402c0E12492c5134FB26B53E3F2", + "0xe4B44A30fa18f0FE4f2fd0dF0CeC0FE9dA253A54" + ] + ] + } + }, + "lidoTemplate": { + "contract": "contracts/0.4.24/template/LidoTemplate.sol", + "address": "0x8f1551EF4556596210f9b3f870CB2e3dC7B4257B", + "constructorArgs": [ + "0xB498933ADAaCC74dCf8f1291Cce0C46e66FAAf41", + "0x312BA9De35A90bdDE4A6ff08b8E343126678Fa89", + "0x20B766eDCE96e30ec7d0dF9BfAB5528704D79ffA", + "0x499600e39900BBd04FD2c5e3043271df463A68dB", + "0xa49E90C89F97f24fB8f37D2A5B5EdAB28Ad240C9", + "0x47B7517E6837159fB949d73Dea95276223288e80" + ], + "deployBlock": 1360737 + }, + "lidoTemplateCreateStdAppReposTx": "0x19cb9472c94334c532432a5ad17bc2fbb8defa5ceda38a4d6c8a8fc7db0859f8", + "lidoTemplateNewDaoTx": "0x508dfd7eaaae56acdef13e541ef3fb34a351bb89104f8a63ff6a9d8eb046d70b", + "miniMeTokenFactory": { + "address": "0x499600e39900BBd04FD2c5e3043271df463A68dB", + "contract": "@aragon/minime/contracts/MiniMeToken.sol", + "constructorArgs": [] + }, + "networkId": 17000, + "nodeOperatorsRegistry": { + "deployParameters": { + "stakingModuleTypeId": "curated-onchain-v1", + "stuckPenaltyDelay": 172800 + } + }, + "oracleDaemonConfig": { + "deployParameters": { + "NORMALIZED_CL_REWARD_PER_EPOCH": 64, + "NORMALIZED_CL_REWARD_MISTAKE_RATE_BP": 1000, + "REBASE_CHECK_NEAREST_EPOCH_DISTANCE": 1, + "REBASE_CHECK_DISTANT_EPOCH_DISTANCE": 23, + "VALIDATOR_DELAYED_TIMEOUT_IN_SLOTS": 7200, + "VALIDATOR_DELINQUENT_TIMEOUT_IN_SLOTS": 28800, + "NODE_OPERATOR_NETWORK_PENETRATION_THRESHOLD_BP": 100, + "PREDICTION_DURATION_IN_SLOTS": 50400, + "FINALIZATION_MAX_NEGATIVE_REBASE_EPOCH_SHIFT": 1350 + }, + "contract": "contracts/0.8.9/OracleDaemonConfig.sol", + "address": "0xe4B44A30fa18f0FE4f2fd0dF0CeC0FE9dA253A54", + "constructorArgs": [ + "0xB498933ADAaCC74dCf8f1291Cce0C46e66FAAf41", + [] + ] + }, + "oracleReportSanityChecker": { + "deployParameters": { + "churnValidatorsPerDayLimit": 1500, + "oneOffCLBalanceDecreaseBPLimit": 500, + "annualBalanceIncreaseBPLimit": 1000, + "simulatedShareRateDeviationBPLimit": 250, + "maxValidatorExitRequestsPerReport": 2000, + "maxAccountingExtraDataListItemsCount": 100, + "maxNodeOperatorsPerExtraDataItemCount": 100, + "requestTimestampMargin": 128, + "maxPositiveTokenRebase": 5000000 + }, + "contract": "contracts/0.8.9/sanity_checks/OracleReportSanityChecker.sol", + "address": "0x3f40cb2aFEc35e8Ae59D35182071872dEb6f73B5", + "constructorArgs": [ + "0x5bF85BadDac33F91B38617c18a3F829f912Ca060", + "0xB498933ADAaCC74dCf8f1291Cce0C46e66FAAf41", + [ + 1500, + 500, + 1000, + 250, + 2000, + 100, + 100, + 128, + 5000000 + ], + [ + [], + [], + [], + [], + [], + [], + [], + [], + [], + [] + ] + ] + }, + "scratchDeployGasUsed": "122457977", + "stakingRouter": { + "proxy": { + "contract": "contracts/0.8.9/proxy/OssifiableProxy.sol", + "address": "0x7a290b0153eD799bc86202B7e59317a18Ed36a93", + "constructorArgs": [ + "0x272Ed9947cdE1022E631B09064B95c60Af84548C", + "0xB498933ADAaCC74dCf8f1291Cce0C46e66FAAf41", + "0x" + ] + }, + "implementation": { + "contract": "contracts/0.8.9/StakingRouter.sol", + "address": "0x272Ed9947cdE1022E631B09064B95c60Af84548C", + "constructorArgs": [ + "0x389Ead551Ca438506551270BB3eF27EC01d58A18" + ] + } + }, + "validatorsExitBusOracle": { + "deployParameters": { + "consensusVersion": 1 + }, + "proxy": { + "contract": "contracts/0.8.9/proxy/OssifiableProxy.sol", + "address": "0x390285e916212041ba7f97500605b968808a0aAD", + "constructorArgs": [ + "0x291cf7B094b380b1D60da243C8b19A8D052C7073", + "0xB498933ADAaCC74dCf8f1291Cce0C46e66FAAf41", + "0x" + ] + }, + "implementation": { + "contract": "contracts/0.8.9/oracle/ValidatorsExitBusOracle.sol", + "address": "0x291cf7B094b380b1D60da243C8b19A8D052C7073", + "constructorArgs": [ + 12, + 1695902400, + "0x5bF85BadDac33F91B38617c18a3F829f912Ca060" + ] + } + }, + "vestingParams": { + "unvestedTokensAmount": "0", + "holders": { + "0xCD1f9954330AF39a74Fd6e7B25781B4c24ee373f": "820000000000000000000000", + "0xaa6bfBCD634EE744CB8FE522b29ADD23124593D3": "60000000000000000000000", + "0xBA59A84C6440E8cccfdb5448877E26F1A431Fc8B": "60000000000000000000000", + "0x83bcD5963d07C1Bb4578068a639f51dB0699DeEd": "60000000000000000000000" + }, + "start": 0, + "cliff": 0, + "end": 0, + "revokable": false + }, + "withdrawalQueueERC721": { + "deployParameters": { + "name": "Lido: stETH Withdrawal NFT", + "symbol": "unstETH", + "baseUri": null + }, + "proxy": { + "contract": "contracts/0.8.9/proxy/OssifiableProxy.sol", + "address": "0x78D21947C2B47A8655B172258Ea4819E3E52e0e1", + "constructorArgs": [ + "0x50b19E0Da8D65931310DaE362A5052d68f90a804", + "0xB498933ADAaCC74dCf8f1291Cce0C46e66FAAf41", + "0x" + ] + }, + "implementation": { + "contract": "contracts/0.8.9/WithdrawalQueueERC721.sol", + "address": "0x50b19E0Da8D65931310DaE362A5052d68f90a804", + "constructorArgs": [ + "0xF1e88F0E4258a46D5299f3D512e0fC9782Cca47d", + "Lido: stETH Withdrawal NFT", + "unstETH" + ] + } + }, + "withdrawalVault": { + "implementation": { + "contract": "contracts/0.8.9/WithdrawalVault.sol", + "address": "0x9E048aD88e98DF97Cc7d832B2d0a9A616C45FC4C", + "constructorArgs": [ + "0xFfC41725C09407E4713FB4d02bc814c40ed15FD1", + "0x83bcD5963d07C1Bb4578068a639f51dB0699DeEd" + ] + }, + "proxy": { + "contract": "contracts/0.8.4/WithdrawalsManagerProxy.sol", + "address": "0x26d7E5d08Fa9E402c0E12492c5134FB26B53E3F2", + "constructorArgs": [ + "0xd8B7F4EFd16e913648C6E9B74772BC3C38203301", + "0x9E048aD88e98DF97Cc7d832B2d0a9A616C45FC4C" + ] + }, + "address": "0x26d7E5d08Fa9E402c0E12492c5134FB26B53E3F2" + }, + "wstETH": { + "contract": "contracts/0.6.12/WstETH.sol", + "address": "0xF1e88F0E4258a46D5299f3D512e0fC9782Cca47d", + "constructorArgs": [ + "0xFfC41725C09407E4713FB4d02bc814c40ed15FD1" + ] + } +} diff --git a/configs/extra-deployed-holesky-devnet.json b/configs/extra-deployed-holesky-devnet.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/configs/extra-deployed-holesky-devnet.json @@ -0,0 +1 @@ +{} diff --git a/contracts/ens.ts b/contracts/ens.ts index 1934754..669b156 100644 --- a/contracts/ens.ts +++ b/contracts/ens.ts @@ -3,5 +3,5 @@ import { wallet } from '@providers'; import { getDeployedAddress } from '@configs'; import abi from 'abi/ENS.json'; -export const ensAddress = getDeployedAddress('ensAddress'); +export const ensAddress = getDeployedAddress('ensAddress', 'ens.address'); export const ensContract = new Contract(ensAddress, abi, wallet); diff --git a/package.json b/package.json index f804519..dcc546a 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ }, "devDependencies": { "@swc/core": "1.3.82", + "@types/cli-progress": "^3.11.5", "@types/jsonstream": "^0.8.33", "@types/node": "^20.8.2", "@types/node-fetch": "2", @@ -29,6 +30,7 @@ "@chainsafe/ssz": "^0.13.0", "JSONStream": "^1.3.5", "chalk": "^4", + "cli-progress": "^3.12.0", "cli-table3": "^0.6.4", "commander": "^11.0.0", "ethers": "^6.2.2", diff --git a/programs/voting.ts b/programs/voting.ts index 9fb1085..3e7bb9c 100644 --- a/programs/voting.ts +++ b/programs/voting.ts @@ -1,10 +1,19 @@ import { program } from '@command'; import { tmContract, votingContract } from '@contracts'; -import { contractCallTxWithConfirm, executeVote, logger, voteAgainst, voteFor } from '@utils'; -import { addLogsCommands, addParsingCommands } from './common'; +import { + authorizedCall, + contractCallTxWithConfirm, + executeVote, + logger, + voteAgainst, + voteFor, + waitForEnd, +} from '@utils'; +import { addAragonAppSubCommands, addLogsCommands, addParsingCommands } from './common'; import { votingNewVote } from '@scripts'; const voting = program.command('voting').description('interact with voting contract'); +addAragonAppSubCommands(voting, votingContract); addParsingCommands(voting, votingContract); addLogsCommands(voting, votingContract); @@ -15,6 +24,8 @@ voting .action(async (voteId) => { const vote = await votingContract.getVote(voteId); logger.log('Vote', vote.toObject()); + + if (vote.open) await waitForEnd(voteId); }); voting @@ -25,6 +36,22 @@ voting logger.log('Vote time in seconds', Number(time)); }); +voting + .command('change-vote-time') + .description('changes vote time') + .argument('