diff --git a/.github/workflows/core_tests.yml b/.github/workflows/core_tests.yml index 1ab431351..8d55b30b6 100644 --- a/.github/workflows/core_tests.yml +++ b/.github/workflows/core_tests.yml @@ -9,7 +9,7 @@ on: - "feat/rc2" - "feat/rc1" - "feat/next-vote" - - "feat/v3-vote" + - "v2_dg2" schedule: - cron: "0 0 * * TUE" @@ -36,7 +36,7 @@ jobs: - name: Run init script run: docker exec -e CORE_BRANCH tests-runner bash -c 'PYTHONPATH=$PWD make init' env: - CORE_BRANCH: develop + CORE_BRANCH: master - name: Run node run: docker exec -e ETH_RPC_URL --detach tests-runner bash -c 'NODE_PORT=8545 make node' diff --git a/.github/workflows/dual_governance_regression.yml b/.github/workflows/dual_governance_regression.yml index 6cbf75777..78d05eea9 100644 --- a/.github/workflows/dual_governance_regression.yml +++ b/.github/workflows/dual_governance_regression.yml @@ -13,7 +13,7 @@ on: - "feat/rc2" - "feat/rc1" - "feat/next-vote" - - "feat/v3-vote" + - "v2_dg2" workflow_dispatch: jobs: @@ -50,7 +50,7 @@ jobs: uses: actions/checkout@v4 with: repository: lidofinance/dual-governance - ref: feature/report-simulation + ref: feature/escrow-mainnet-deploy path: dual-governance persist-credentials: false token: ${{ secrets.GITHUB_TOKEN }} diff --git a/configs/config_mainnet.py b/configs/config_mainnet.py index 5c63a9cd2..0a842fa6b 100644 --- a/configs/config_mainnet.py +++ b/configs/config_mainnet.py @@ -108,7 +108,7 @@ # LidoLocator LIDO_LOCATOR = "0xC1d0b3DE6792Bf6b4b37EccdcC24e45978Cfd2Eb" -LIDO_LOCATOR_IMPL = "0x2f8779042EFaEd4c53db2Ce293eB6B3f7096C72d" +LIDO_LOCATOR_IMPL = "0x2C298963FB763f74765829722a1ebe0784f4F5Cf" # Other upgrade addresses LIDO_V2_UPGRADE_TEMPLATE = "0xa818fF9EC93122Bf9401ab4340C42De638CD600a" @@ -121,7 +121,7 @@ WITHDRAWAL_CREDENTIALS = "0x010000000000000000000000b9d7934878b5fb9610b3fe8a5e441e8fad7e293f" # Lido -LIDO_IMPL = "0x6ca84080381E43938476814be61B779A8bB6a600" +LIDO_IMPL = "0x17144556fd3424EDC8Fc8A4C940B2D04936d17eb" # see Lido's proxy appId() LIDO_ARAGON_APP_ID = "0x3ca7c3e38968823ccb4c78ea688df41356f182ae1d159e4ee608d30d68cef320" LIDO_MAX_STAKE_LIMIT_ETH = 150_000 @@ -201,7 +201,7 @@ EXIT_EVENTS_LOOKBACK_WINDOW_IN_SLOTS = 14 * 7200 # 14 days # OracleReportSanityChecker -ORACLE_REPORT_SANITY_CHECKER = "0xf1647c86E6D7959f638DD9CE1d90e2F3C9503129" +ORACLE_REPORT_SANITY_CHECKER = "0x6232397ebac4f5772e53285B26c47914E9461E75" APPEARED_VALIDATORS_PER_DAY_LIMIT = 1800 EXITED_VALIDATORS_PER_DAY_LIMIT = 3600 ANNUAL_BALANCE_INCREASE_BP_LIMIT = 1000 # 10% @@ -216,7 +216,7 @@ CL_BALANCE_ORACLES_ERROR_UPPER_BP_LIMIT = 50 # Burner -BURNER = "0xE76c52750019b80B43E36DF30bf4060EB73F573a" +BURNER = "0xD15a672319Cf0352560eE76d9e89eAB0889046D3" TOTAL_NON_COVER_SHARES_BURNT = 32145684728326685744 TOTAL_COVER_SHARES_BURNT = 0 @@ -239,11 +239,11 @@ # AccountingOracle # and its corresponding HashConsensus ACCOUNTING_ORACLE = "0x852deD011285fe67063a08005c71a85690503Cee" -ACCOUNTING_ORACLE_IMPL = "0x1455B96780A93e08abFE41243Db92E2fCbb0141c" +ACCOUNTING_ORACLE_IMPL = "0xE9906E543274cebcd335d2C560094089e9547e8d" HASH_CONSENSUS_FOR_AO = "0xD624B08C83bAECF0807Dd2c6880C3154a5F0B288" AO_EPOCHS_PER_FRAME = 225 AO_FAST_LANE_LENGTH_SLOTS = 100 -AO_CONSENSUS_VERSION = 5 +AO_CONSENSUS_VERSION = 4 # ValidatorsExitBusOracle VALIDATORS_EXIT_BUS_ORACLE = "0x0De4Ea0184c2ad0BacA7183356Aea5B8d5Bf5c6e" @@ -364,7 +364,7 @@ OBOL_LIDO_SPLIT_IMPL = "0x2fB59065F049e0D0E3180C6312FA0FeB5Bbf0FE3" # Ethereum Part for Optimism bridge -L1_TOKEN_RATE_NOTIFIER = "0x25e35855783bec3E49355a29e110f02Ed8b05ba9" +L1_TOKEN_RATE_NOTIFIER = "0xe6793B9e4FbA7DE0ee833F9D02bba7DB5EB27823" L1_OPTIMISM_TOKEN_RATE_PUSHER = "0xd54c1c6413caac3477AC14b2a80D5398E3c32FfE" L1_OPTIMISM_TOKENS_BRIDGE = "0x76943C0D61395d8F2edF9060e1533529cAe05dE6" L1_OPTIMISM_TOKENS_BRIDGE_IMPL = "0x29C5c51A031165CE62F964966A6399b81165EFA4" @@ -522,16 +522,3 @@ "WITHDRAWAL_BLOCKERS": (WITHDRAWAL_QUEUE, VALIDATORS_EXIT_BUS_ORACLE, TRIGGERABLE_WITHDRAWALS_GATEWAY), } } - -# Lido V3 - stVaults -VAULT_HUB = "0x1d201BE093d847f6446530Efb0E8Fb426d176709" -ACCOUNTING = "0x23ED611be0e1a820978875C0122F92260804cdDf" -ACCOUNTING_IMPL = "0xd43a3E984071F40d5d840f60708Af0e9526785df" -OPERATOR_GRID = "0xC69685E89Cefc327b43B7234AC646451B27c544d" -LAZY_ORACLE = "0x5DB427080200c235F2Ae8Cd17A7be87921f7AD6c" -PREDEPOSIT_GUARANTEE = "0xF4bF42c6D6A0E38825785048124DBAD6c9eaaac3" -VAULTS_ADAPTER = "0xe2DE6d2DefF15588a71849c0429101F8ca9FB14D" -GATE_SEAL_V3 = "0x881dAd714679A6FeaA636446A0499101375A365c" -STAKING_VAULT_BEACON = "0x5FbE8cEf9CCc56ad245736D3C5bAf82ad54Ca789" - -INITIAL_MAX_EXTERNAL_RATIO_BP = 300 # 3% diff --git a/interfaces/Accounting.json b/interfaces/Accounting.json deleted file mode 100644 index 95eb78cc6..000000000 --- a/interfaces/Accounting.json +++ /dev/null @@ -1,327 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "contract ILidoLocator", - "name": "_lidoLocator", - "type": "address" - }, - { - "internalType": "contract ILido", - "name": "_lido", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "reportTimestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "upperBoundTimestamp", - "type": "uint256" - } - ], - "name": "IncorrectReportTimestamp", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "reportValidators", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minValidators", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxValidators", - "type": "uint256" - } - ], - "name": "IncorrectReportValidators", - "type": "error" - }, - { - "inputs": [], - "name": "InternalSharesCantBeZero", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "operation", - "type": "string" - }, - { - "internalType": "address", - "name": "addr", - "type": "address" - } - ], - "name": "NotAuthorized", - "type": "error" - }, - { - "inputs": [], - "name": "LIDO", - "outputs": [ - { - "internalType": "contract ILido", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LIDO_LOCATOR", - "outputs": [ - { - "internalType": "contract ILidoLocator", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "timeElapsed", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "clValidators", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "clBalance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "withdrawalVaultBalance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "elRewardsVaultBalance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "sharesRequestedToBurn", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "withdrawalFinalizationBatches", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "simulatedShareRate", - "type": "uint256" - } - ], - "internalType": "struct ReportValues", - "name": "_report", - "type": "tuple" - } - ], - "name": "handleOracleReport", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "timeElapsed", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "clValidators", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "clBalance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "withdrawalVaultBalance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "elRewardsVaultBalance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "sharesRequestedToBurn", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "withdrawalFinalizationBatches", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "simulatedShareRate", - "type": "uint256" - } - ], - "internalType": "struct ReportValues", - "name": "_report", - "type": "tuple" - } - ], - "name": "simulateOracleReport", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "withdrawalsVaultTransfer", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "elRewardsVaultTransfer", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "etherToFinalizeWQ", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "sharesToFinalizeWQ", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "sharesToBurnForWithdrawals", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalSharesToBurn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "sharesToMintAsFees", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "address[]", - "name": "moduleFeeRecipients", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "moduleIds", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "moduleSharesToMint", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "treasurySharesToMint", - "type": "uint256" - } - ], - "internalType": "struct Accounting.FeeDistribution", - "name": "feeDistribution", - "type": "tuple" - }, - { - "internalType": "uint256", - "name": "principalClBalance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "preTotalShares", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "preTotalPooledEther", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "postInternalShares", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "postInternalEther", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "postTotalShares", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "postTotalPooledEther", - "type": "uint256" - } - ], - "internalType": "struct Accounting.CalculatedValues", - "name": "update", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - } - ] diff --git a/interfaces/AccountingOracle.json b/interfaces/AccountingOracle.json index 73e7ef341..35c6e7e9f 100644 --- a/interfaces/AccountingOracle.json +++ b/interfaces/AccountingOracle.json @@ -6,6 +6,16 @@ "name": "lidoLocator", "type": "address" }, + { + "internalType": "address", + "name": "lido", + "type": "address" + }, + { + "internalType": "address", + "name": "legacyOracle", + "type": "address" + }, { "internalType": "uint256", "name": "secondsPerSlot", @@ -135,6 +145,11 @@ "name": "InvalidExtraDataSortOrder", "type": "error" }, + { + "inputs": [], + "name": "LegacyOracleCannotBeZero", + "type": "error" + }, { "inputs": [], "name": "LidoCannotBeZero", @@ -713,6 +728,32 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "LEGACY_ORACLE", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "LIDO", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "LOCATOR", @@ -799,7 +840,14 @@ "type": "uint256" } ], - "name": "finalizeUpgrade_v4", + "name": "finalizeUpgrade_v2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "finalizeUpgrade_v3", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -1048,6 +1096,29 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "admin", + "type": "address" + }, + { + "internalType": "address", + "name": "consensusContract", + "type": "address" + }, + { + "internalType": "uint256", + "name": "consensusVersion", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -1071,7 +1142,7 @@ "type": "uint256" } ], - "name": "initialize", + "name": "initializeWithoutMigration", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -1225,16 +1296,6 @@ "name": "isBunkerMode", "type": "bool" }, - { - "internalType": "bytes32", - "name": "vaultsDataTreeRoot", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "vaultsDataTreeCid", - "type": "string" - }, { "internalType": "uint256", "name": "extraDataFormat", diff --git a/interfaces/Burner.json b/interfaces/Burner.json index edaffbaa9..ac643f234 100644 --- a/interfaces/Burner.json +++ b/interfaces/Burner.json @@ -1,126 +1,45 @@ [ { "inputs": [ - { - "internalType": "address", - "name": "_locator", - "type": "address" - }, - { - "internalType": "address", - "name": "_stETH", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AppAuthFailed", - "type": "error" - }, - { - "inputs": [ + { "internalType": "address", "name": "_admin", "type": "address" }, + { "internalType": "address", "name": "_treasury", "type": "address" }, + { "internalType": "address", "name": "_stETH", "type": "address" }, { "internalType": "uint256", - "name": "requestedAmount", + "name": "_totalCoverSharesBurnt", "type": "uint256" }, { "internalType": "uint256", - "name": "actualAmount", + "name": "_totalNonCoverSharesBurnt", "type": "uint256" } ], - "name": "BurnAmountExceedsActual", - "type": "error" - }, - { - "inputs": [], - "name": "DirectETHTransfer", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidContractVersionIncrement", - "type": "error" - }, - { - "inputs": [], - "name": "MigrationNotAllowedOrAlreadyMigrated", - "type": "error" - }, - { - "inputs": [], - "name": "NonZeroContractVersionOnInit", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "OnlyLidoCanMigrate", - "type": "error" - }, - { - "inputs": [], - "name": "StETHRecoveryWrongFunc", - "type": "error" + "stateMutability": "nonpayable", + "type": "constructor" }, + { "inputs": [], "name": "AppAuthLidoFailed", "type": "error" }, { "inputs": [ { "internalType": "uint256", - "name": "expected", + "name": "requestedAmount", "type": "uint256" }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } + { "internalType": "uint256", "name": "actualAmount", "type": "uint256" } ], - "name": "UnexpectedContractVersion", + "name": "BurnAmountExceedsActual", "type": "error" }, + { "inputs": [], "name": "DirectETHTransfer", "type": "error" }, + { "inputs": [], "name": "StETHRecoveryWrongFunc", "type": "error" }, { - "inputs": [ - { - "internalType": "string", - "name": "field", - "type": "string" - } - ], + "inputs": [{ "internalType": "string", "name": "field", "type": "string" }], "name": "ZeroAddress", "type": "error" }, - { - "inputs": [], - "name": "ZeroBurnAmount", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroRecoveryAmount", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "version", - "type": "uint256" - } - ], - "name": "ContractVersionSet", - "type": "event" - }, + { "inputs": [], "name": "ZeroBurnAmount", "type": "error" }, + { "inputs": [], "name": "ZeroRecoveryAmount", "type": "error" }, { "anonymous": false, "inputs": [ @@ -330,192 +249,93 @@ { "inputs": [], "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], - "name": "LIDO", - "outputs": [ - { - "internalType": "contract ILido", - "name": "", - "type": "address" - } - ], + "name": "REQUEST_BURN_MY_STETH_ROLE", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], - "name": "LOCATOR", - "outputs": [ - { - "internalType": "contract ILidoLocator", - "name": "", - "type": "address" - } - ], + "name": "REQUEST_BURN_SHARES_ROLE", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], - "name": "REQUEST_BURN_MY_STETH_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], + "name": "STETH", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], - "name": "REQUEST_BURN_SHARES_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], + "name": "TREASURY", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [ - { - "internalType": "uint256", - "name": "_sharesToBurn", - "type": "uint256" - } + { "internalType": "uint256", "name": "_sharesToBurn", "type": "uint256" } ], "name": "commitSharesToBurn", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "getContractVersion", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "getCoverSharesBurnt", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getExcessStETH", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getNonCoverSharesBurnt", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } + { "internalType": "bytes32", "name": "role", "type": "bytes32" } ], "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } + { "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "internalType": "uint256", "name": "index", "type": "uint256" } ], "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } + { "internalType": "bytes32", "name": "role", "type": "bytes32" } ], "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, @@ -523,32 +343,16 @@ "inputs": [], "name": "getSharesRequestedToBurn", "outputs": [ - { - "internalType": "uint256", - "name": "coverShares", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nonCoverShares", - "type": "uint256" - } + { "internalType": "uint256", "name": "coverShares", "type": "uint256" }, + { "internalType": "uint256", "name": "nonCoverShares", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } + { "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "internalType": "address", "name": "account", "type": "address" } ], "name": "grantRole", "outputs": [], @@ -557,84 +361,18 @@ }, { "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } + { "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "internalType": "address", "name": "account", "type": "address" } ], "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [ - { - "internalType": "address", - "name": "_admin", - "type": "address" - }, - { - "internalType": "bool", - "name": "_isMigrationAllowed", - "type": "bool" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "isMigrationAllowed", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_oldBurner", - "type": "address" - } - ], - "name": "migrate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } + { "internalType": "address", "name": "_token", "type": "address" }, + { "internalType": "uint256", "name": "_amount", "type": "uint256" } ], "name": "recoverERC20", "outputs": [], @@ -643,16 +381,8 @@ }, { "inputs": [ - { - "internalType": "address", - "name": "_token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_tokenId", - "type": "uint256" - } + { "internalType": "address", "name": "_token", "type": "address" }, + { "internalType": "uint256", "name": "_tokenId", "type": "uint256" } ], "name": "recoverERC721", "outputs": [], @@ -668,35 +398,14 @@ }, { "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } + { "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "internalType": "address", "name": "account", "type": "address" } ], "name": "renounceRole", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_sharesAmountToBurn", - "type": "uint256" - } - ], - "name": "requestBurnMyShares", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -725,11 +434,7 @@ }, { "inputs": [ - { - "internalType": "address", - "name": "_from", - "type": "address" - }, + { "internalType": "address", "name": "_from", "type": "address" }, { "internalType": "uint256", "name": "_sharesAmountToBurn", @@ -743,11 +448,7 @@ }, { "inputs": [ - { - "internalType": "address", - "name": "_from", - "type": "address" - }, + { "internalType": "address", "name": "_from", "type": "address" }, { "internalType": "uint256", "name": "_sharesAmountToBurn", @@ -761,16 +462,8 @@ }, { "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } + { "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "internalType": "address", "name": "account", "type": "address" } ], "name": "revokeRole", "outputs": [], @@ -779,25 +472,12 @@ }, { "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } + { "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" } ], "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, - { - "stateMutability": "payable", - "type": "receive" - } + { "stateMutability": "payable", "type": "receive" } ] diff --git a/interfaces/LazyOracle.json b/interfaces/LazyOracle.json deleted file mode 100644 index 8e39d00b9..000000000 --- a/interfaces/LazyOracle.json +++ /dev/null @@ -1,1144 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "_lidoLocator", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AccessControlBadConfirmation", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "neededRole", - "type": "bytes32" - } - ], - "name": "AccessControlUnauthorizedAccount", - "type": "error" - }, - { - "inputs": [], - "name": "AdminCannotBeZero", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "feeIncrease", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxFeeIncrease", - "type": "uint256" - } - ], - "name": "CumulativeLidoFeesTooLarge", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "reportingFees", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "previousFees", - "type": "uint256" - } - ], - "name": "CumulativeLidoFeesTooLow", - "type": "error" - }, - { - "inputs": [], - "name": "InOutDeltaCacheIsOverwritten", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidInitialization", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidMaxLiabilityShares", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidProof", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "feeRate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxFeeRate", - "type": "uint256" - } - ], - "name": "MaxLidoFeeRatePerSecondTooLarge", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "rewardRatio", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxRewardRatio", - "type": "uint256" - } - ], - "name": "MaxRewardRatioTooLarge", - "type": "error" - }, - { - "inputs": [], - "name": "NotAuthorized", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "quarantinePeriod", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxQuarantinePeriod", - "type": "uint256" - } - ], - "name": "QuarantinePeriodTooLarge", - "type": "error" - }, - { - "inputs": [], - "name": "TotalValueTooLarge", - "type": "error" - }, - { - "inputs": [], - "name": "UnderflowInTotalValueCalculation", - "type": "error" - }, - { - "inputs": [], - "name": "VaultReportIsFreshEnough", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "delta", - "type": "uint256" - } - ], - "name": "QuarantineActivated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "delta", - "type": "uint256" - } - ], - "name": "QuarantineReleased", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "vault", - "type": "address" - } - ], - "name": "QuarantineRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "totalValueReminder", - "type": "uint256" - } - ], - "name": "QuarantineUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "quarantinePeriod", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "maxRewardRatioBP", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "maxLidoFeeRatePerSecond", - "type": "uint256" - } - ], - "name": "SanityParamsUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "refSlot", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "root", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "string", - "name": "cid", - "type": "string" - } - ], - "name": "VaultsReportDataUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LIDO_LOCATOR", - "outputs": [ - { - "internalType": "contract ILidoLocator", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_LIDO_FEE_RATE_PER_SECOND", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_QUARANTINE_PERIOD", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_REWARD_RATIO", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "UPDATE_SANITY_PARAMS_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes[]", - "name": "_pubkeys", - "type": "bytes[]" - } - ], - "name": "batchValidatorStatuses", - "outputs": [ - { - "components": [ - { - "internalType": "enum IPredepositGuarantee.ValidatorStage", - "name": "stage", - "type": "uint8" - }, - { - "internalType": "contract IStakingVault", - "name": "stakingVault", - "type": "address" - }, - { - "internalType": "address", - "name": "nodeOperator", - "type": "address" - } - ], - "internalType": "struct IPredepositGuarantee.ValidatorStatus[]", - "name": "batch", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_offset", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_limit", - "type": "uint256" - } - ], - "name": "batchVaultsInfo", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "internalType": "uint256", - "name": "aggregatedBalance", - "type": "uint256" - }, - { - "internalType": "int256", - "name": "inOutDelta", - "type": "int256" - }, - { - "internalType": "bytes32", - "name": "withdrawalCredentials", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "liabilityShares", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxLiabilityShares", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "mintableStETH", - "type": "uint256" - }, - { - "internalType": "uint96", - "name": "shareLimit", - "type": "uint96" - }, - { - "internalType": "uint16", - "name": "reserveRatioBP", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "forcedRebalanceThresholdBP", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "infraFeeBP", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "liquidityFeeBP", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "reservationFeeBP", - "type": "uint16" - }, - { - "internalType": "bool", - "name": "pendingDisconnect", - "type": "bool" - } - ], - "internalType": "struct LazyOracle.VaultInfo[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMembers", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_admin", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_quarantinePeriod", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxRewardRatioBP", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxLidoFeeRatePerSecond", - "type": "uint256" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "latestReportData", - "outputs": [ - { - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "refSlot", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "treeRoot", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "reportCid", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "latestReportTimestamp", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maxLidoFeeRatePerSecond", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maxRewardRatioBP", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "quarantinePeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "name": "quarantineValue", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "name": "removeVaultQuarantine", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "callerConfirmation", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_vaultsDataTimestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_vaultsDataRefSlot", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "_vaultsDataTreeRoot", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "_vaultsDataReportCid", - "type": "string" - } - ], - "name": "updateReportData", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_quarantinePeriod", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxRewardRatioBP", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxLidoFeeRatePerSecond", - "type": "uint256" - } - ], - "name": "updateSanityParams", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_totalValue", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_cumulativeLidoFees", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_liabilityShares", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxLiabilityShares", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_slashingReserve", - "type": "uint256" - }, - { - "internalType": "bytes32[]", - "name": "_proof", - "type": "bytes32[]" - } - ], - "name": "updateVaultData", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "name": "vaultInfo", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "internalType": "uint256", - "name": "aggregatedBalance", - "type": "uint256" - }, - { - "internalType": "int256", - "name": "inOutDelta", - "type": "int256" - }, - { - "internalType": "bytes32", - "name": "withdrawalCredentials", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "liabilityShares", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxLiabilityShares", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "mintableStETH", - "type": "uint256" - }, - { - "internalType": "uint96", - "name": "shareLimit", - "type": "uint96" - }, - { - "internalType": "uint16", - "name": "reserveRatioBP", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "forcedRebalanceThresholdBP", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "infraFeeBP", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "liquidityFeeBP", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "reservationFeeBP", - "type": "uint16" - }, - { - "internalType": "bool", - "name": "pendingDisconnect", - "type": "bool" - } - ], - "internalType": "struct LazyOracle.VaultInfo", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "name": "vaultQuarantine", - "outputs": [ - { - "components": [ - { - "internalType": "bool", - "name": "isActive", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "pendingTotalValueIncrease", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "startTimestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endTimestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalValueRemainder", - "type": "uint256" - } - ], - "internalType": "struct LazyOracle.QuarantineInfo", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "vaultsCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/interfaces/Lido.json b/interfaces/Lido.json index e62344e9b..c28e25b8b 100644 --- a/interfaces/Lido.json +++ b/interfaces/Lido.json @@ -1,1926 +1 @@ -[ - { - "constant": true, - "inputs": [ - { - "name": "_sharesAmount", - "type": "uint256" - } - ], - "name": "getPooledEthBySharesRoundUp", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "resume", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_recipient", - "type": "address" - }, - { - "name": "_amountOfShares", - "type": "uint256" - } - ], - "name": "mintExternalShares", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "stop", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "hasInitialized", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_spender", - "type": "address" - }, - { - "name": "_amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "STAKING_CONTROL_ROLE", - "outputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_ethAmount", - "type": "uint256" - } - ], - "name": "getSharesByPooledEth", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_reportTimestamp", - "type": "uint256" - }, - { - "name": "_timeElapsed", - "type": "uint256" - }, - { - "name": "_preTotalShares", - "type": "uint256" - }, - { - "name": "_preTotalEther", - "type": "uint256" - }, - { - "name": "_postTotalShares", - "type": "uint256" - }, - { - "name": "_postTotalEther", - "type": "uint256" - }, - { - "name": "_postInternalShares", - "type": "uint256" - }, - { - "name": "_postInternalEther", - "type": "uint256" - }, - { - "name": "_sharesMintedAsFees", - "type": "uint256" - } - ], - "name": "emitTokenRebase", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isStakingPaused", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_sender", - "type": "address" - }, - { - "name": "_recipient", - "type": "address" - }, - { - "name": "_amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_script", - "type": "bytes" - } - ], - "name": "getEVMScriptExecutor", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_maxStakeLimit", - "type": "uint256" - }, - { - "name": "_stakeLimitIncreasePerBlock", - "type": "uint256" - } - ], - "name": "setStakingLimit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "RESUME_ROLE", - "outputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getRecoveryVault", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getTotalPooledEther", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_newDepositedValidators", - "type": "uint256" - } - ], - "name": "unsafeChangeDepositedValidators", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "PAUSE_ROLE", - "outputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_spender", - "type": "address" - }, - { - "name": "_addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getTreasury", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isStopped", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getBufferedEther", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_lidoLocator", - "type": "address" - }, - { - "name": "_eip712StETH", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "receiveELRewards", - "outputs": [], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_recipient", - "type": "address" - }, - { - "name": "_amountOfShares", - "type": "uint256" - } - ], - "name": "mintShares", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getWithdrawalCredentials", - "outputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_reportTimestamp", - "type": "uint256" - }, - { - "name": "_preClValidators", - "type": "uint256" - }, - { - "name": "_reportClValidators", - "type": "uint256" - }, - { - "name": "_reportClBalance", - "type": "uint256" - } - ], - "name": "processClStateUpdate", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCurrentStakeLimit", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getExternalShares", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_amountOfShares", - "type": "uint256" - } - ], - "name": "internalizeExternalBadDebt", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getStakeLimitFullInfo", - "outputs": [ - { - "name": "isStakingPaused_", - "type": "bool" - }, - { - "name": "isStakingLimitSet", - "type": "bool" - }, - { - "name": "currentStakeLimit", - "type": "uint256" - }, - { - "name": "maxStakeLimit", - "type": "uint256" - }, - { - "name": "maxStakeLimitGrowthBlocks", - "type": "uint256" - }, - { - "name": "prevStakeLimit", - "type": "uint256" - }, - { - "name": "prevStakeBlockNumber", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_sender", - "type": "address" - }, - { - "name": "_recipient", - "type": "address" - }, - { - "name": "_sharesAmount", - "type": "uint256" - } - ], - "name": "transferSharesFrom", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_amountOfShares", - "type": "uint256" - } - ], - "name": "burnExternalShares", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "resumeStaking", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getFeeDistribution", - "outputs": [ - { - "name": "treasuryFeeBasisPoints", - "type": "uint16" - }, - { - "name": "insuranceFeeBasisPoints", - "type": "uint16" - }, - { - "name": "operatorsFeeBasisPoints", - "type": "uint16" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "receiveWithdrawals", - "outputs": [], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_sharesAmount", - "type": "uint256" - } - ], - "name": "getPooledEthByShares", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_amountOfShares", - "type": "uint256" - } - ], - "name": "rebalanceExternalEtherToInternal", - "outputs": [], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "token", - "type": "address" - } - ], - "name": "allowRecoverability", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "owner", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "appId", - "outputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "eip712Domain", - "outputs": [ - { - "name": "name", - "type": "string" - }, - { - "name": "version", - "type": "string" - }, - { - "name": "chainId", - "type": "uint256" - }, - { - "name": "verifyingContract", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_amountOfShares", - "type": "uint256" - } - ], - "name": "burnShares", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_oldBurner", - "type": "address" - }, - { - "name": "_contractsWithBurnerAllowances", - "type": "address[]" - }, - { - "name": "_initialMaxExternalRatioBP", - "type": "uint256" - } - ], - "name": "finalizeUpgrade_v3", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getMaxMintableExternalShares", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getContractVersion", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getInitializationBlock", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_recipient", - "type": "address" - }, - { - "name": "_sharesAmount", - "type": "uint256" - } - ], - "name": "transferShares", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_reportTimestamp", - "type": "uint256" - }, - { - "name": "_reportClBalance", - "type": "uint256" - }, - { - "name": "_principalCLBalance", - "type": "uint256" - }, - { - "name": "_withdrawalsToWithdraw", - "type": "uint256" - }, - { - "name": "_elRewardsToWithdraw", - "type": "uint256" - }, - { - "name": "_lastWithdrawalRequestToFinalize", - "type": "uint256" - }, - { - "name": "_withdrawalsShareRate", - "type": "uint256" - }, - { - "name": "_etherToLockOnWithdrawalQueue", - "type": "uint256" - } - ], - "name": "collectRewardsAndProcessWithdrawals", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getEIP712StETH", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getMaxExternalRatioBP", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "", - "type": "address" - } - ], - "name": "transferToVault", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_sender", - "type": "address" - }, - { - "name": "_role", - "type": "bytes32" - }, - { - "name": "_params", - "type": "uint256[]" - } - ], - "name": "canPerform", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_referral", - "type": "address" - } - ], - "name": "submit", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_spender", - "type": "address" - }, - { - "name": "_subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getEVMScriptRegistry", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_recipient", - "type": "address" - }, - { - "name": "_amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_maxDepositsCount", - "type": "uint256" - }, - { - "name": "_stakingModuleId", - "type": "uint256" - }, - { - "name": "_depositCalldata", - "type": "bytes" - } - ], - "name": "deposit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "UNSAFE_CHANGE_DEPOSITED_VALIDATORS_ROLE", - "outputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getBeaconStat", - "outputs": [ - { - "name": "depositedValidators", - "type": "uint256" - }, - { - "name": "beaconValidators", - "type": "uint256" - }, - { - "name": "beaconBalance", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "removeStakingLimit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getFee", - "outputs": [ - { - "name": "totalFee", - "type": "uint16" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "kernel", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getTotalShares", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_owner", - "type": "address" - }, - { - "name": "_spender", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - }, - { - "name": "_deadline", - "type": "uint256" - }, - { - "name": "_v", - "type": "uint8" - }, - { - "name": "_r", - "type": "bytes32" - }, - { - "name": "_s", - "type": "bytes32" - } - ], - "name": "permit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - }, - { - "name": "_spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isPetrified", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getExternalEther", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getLidoLocator", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "canDeposit", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "STAKING_PAUSE_ROLE", - "outputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getDepositableEther", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_maxExternalRatioBP", - "type": "uint256" - } - ], - "name": "setMaxExternalRatioBP", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_account", - "type": "address" - } - ], - "name": "sharesOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "pauseStaking", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getTotalELRewardsCollected", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "anonymous": false, - "inputs": [], - "name": "StakingPaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "StakingResumed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "maxStakeLimit", - "type": "uint256" - }, - { - "indexed": false, - "name": "stakeLimitIncreasePerBlock", - "type": "uint256" - } - ], - "name": "StakingLimitSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "StakingLimitRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "reportTimestamp", - "type": "uint256" - }, - { - "indexed": false, - "name": "preCLValidators", - "type": "uint256" - }, - { - "indexed": false, - "name": "postCLValidators", - "type": "uint256" - } - ], - "name": "CLValidatorsUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "depositedValidators", - "type": "uint256" - } - ], - "name": "DepositedValidatorsChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "reportTimestamp", - "type": "uint256" - }, - { - "indexed": false, - "name": "preCLBalance", - "type": "uint256" - }, - { - "indexed": false, - "name": "postCLBalance", - "type": "uint256" - }, - { - "indexed": false, - "name": "withdrawalsWithdrawn", - "type": "uint256" - }, - { - "indexed": false, - "name": "executionLayerRewardsWithdrawn", - "type": "uint256" - }, - { - "indexed": false, - "name": "postBufferedEther", - "type": "uint256" - } - ], - "name": "ETHDistributed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "reportTimestamp", - "type": "uint256" - }, - { - "indexed": false, - "name": "timeElapsed", - "type": "uint256" - }, - { - "indexed": false, - "name": "preTotalShares", - "type": "uint256" - }, - { - "indexed": false, - "name": "preTotalEther", - "type": "uint256" - }, - { - "indexed": false, - "name": "postTotalShares", - "type": "uint256" - }, - { - "indexed": false, - "name": "postTotalEther", - "type": "uint256" - }, - { - "indexed": false, - "name": "sharesMintedAsFees", - "type": "uint256" - } - ], - "name": "TokenRebased", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "lidoLocator", - "type": "address" - } - ], - "name": "LidoLocatorSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "amount", - "type": "uint256" - } - ], - "name": "ELRewardsReceived", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "amount", - "type": "uint256" - } - ], - "name": "WithdrawalsReceived", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "sender", - "type": "address" - }, - { - "indexed": false, - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "name": "referral", - "type": "address" - } - ], - "name": "Submitted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "amount", - "type": "uint256" - } - ], - "name": "Unbuffered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "reportTimestamp", - "type": "uint256" - }, - { - "indexed": false, - "name": "postInternalShares", - "type": "uint256" - }, - { - "indexed": false, - "name": "postInternalEther", - "type": "uint256" - }, - { - "indexed": false, - "name": "sharesMintedAsFees", - "type": "uint256" - } - ], - "name": "InternalShareRateUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "name": "amountOfShares", - "type": "uint256" - } - ], - "name": "ExternalSharesMinted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "amountOfShares", - "type": "uint256" - } - ], - "name": "ExternalSharesBurnt", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "maxExternalRatioBP", - "type": "uint256" - } - ], - "name": "MaxExternalRatioBPSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "amount", - "type": "uint256" - } - ], - "name": "ExternalEtherTransferredToBuffer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "amountOfShares", - "type": "uint256" - } - ], - "name": "ExternalBadDebtInternalized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "executor", - "type": "address" - }, - { - "indexed": false, - "name": "script", - "type": "bytes" - }, - { - "indexed": false, - "name": "input", - "type": "bytes" - }, - { - "indexed": false, - "name": "returnData", - "type": "bytes" - } - ], - "name": "ScriptResult", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "vault", - "type": "address" - }, - { - "indexed": true, - "name": "token", - "type": "address" - }, - { - "indexed": false, - "name": "amount", - "type": "uint256" - } - ], - "name": "RecoverToVault", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "eip712StETH", - "type": "address" - } - ], - "name": "EIP712StETHInitialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "from", - "type": "address" - }, - { - "indexed": true, - "name": "to", - "type": "address" - }, - { - "indexed": false, - "name": "sharesValue", - "type": "uint256" - } - ], - "name": "TransferShares", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "account", - "type": "address" - }, - { - "indexed": false, - "name": "preRebaseTokenAmount", - "type": "uint256" - }, - { - "indexed": false, - "name": "postRebaseTokenAmount", - "type": "uint256" - }, - { - "indexed": false, - "name": "sharesAmount", - "type": "uint256" - } - ], - "name": "SharesBurnt", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "Stopped", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "Resumed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "from", - "type": "address" - }, - { - "indexed": true, - "name": "to", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "version", - "type": "uint256" - } - ], - "name": "ContractVersionSet", - "type": "event" - } -] +[{"constant":false,"inputs":[],"name":"resume","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[],"name":"stop","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"hasInitialized","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_amount","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"STAKING_CONTROL_ROLE","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_ethAmount","type":"uint256"}],"name":"getSharesByPooledEth","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isStakingPaused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_sender","type":"address"},{"name":"_recipient","type":"address"},{"name":"_amount","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_script","type":"bytes"}],"name":"getEVMScriptExecutor","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_maxStakeLimit","type":"uint256"},{"name":"_stakeLimitIncreasePerBlock","type":"uint256"}],"name":"setStakingLimit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"RESUME_ROLE","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_lidoLocator","type":"address"},{"name":"_eip712StETH","type":"address"}],"name":"finalizeUpgrade_v2","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"getRecoveryVault","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getTotalPooledEther","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newDepositedValidators","type":"uint256"}],"name":"unsafeChangeDepositedValidators","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"PAUSE_ROLE","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getTreasury","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isStopped","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getBufferedEther","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_lidoLocator","type":"address"},{"name":"_eip712StETH","type":"address"}],"name":"initialize","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[],"name":"receiveELRewards","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"getWithdrawalCredentials","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getCurrentStakeLimit","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getStakeLimitFullInfo","outputs":[{"name":"isStakingPaused","type":"bool"},{"name":"isStakingLimitSet","type":"bool"},{"name":"currentStakeLimit","type":"uint256"},{"name":"maxStakeLimit","type":"uint256"},{"name":"maxStakeLimitGrowthBlocks","type":"uint256"},{"name":"prevStakeLimit","type":"uint256"},{"name":"prevStakeBlockNumber","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_sender","type":"address"},{"name":"_recipient","type":"address"},{"name":"_sharesAmount","type":"uint256"}],"name":"transferSharesFrom","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_account","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"resumeStaking","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getFeeDistribution","outputs":[{"name":"treasuryFeeBasisPoints","type":"uint16"},{"name":"insuranceFeeBasisPoints","type":"uint16"},{"name":"operatorsFeeBasisPoints","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"receiveWithdrawals","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"_sharesAmount","type":"uint256"}],"name":"getPooledEthByShares","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"token","type":"address"}],"name":"allowRecoverability","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"nonces","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"appId","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getOracle","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"eip712Domain","outputs":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"},{"name":"verifyingContract","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getContractVersion","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getInitializationBlock","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_recipient","type":"address"},{"name":"_sharesAmount","type":"uint256"}],"name":"transferShares","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"getEIP712StETH","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"","type":"address"}],"name":"transferToVault","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_sender","type":"address"},{"name":"_role","type":"bytes32"},{"name":"_params","type":"uint256[]"}],"name":"canPerform","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_referral","type":"address"}],"name":"submit","outputs":[{"name":"","type":"uint256"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getEVMScriptRegistry","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_recipient","type":"address"},{"name":"_amount","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_maxDepositsCount","type":"uint256"},{"name":"_stakingModuleId","type":"uint256"},{"name":"_depositCalldata","type":"bytes"}],"name":"deposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"UNSAFE_CHANGE_DEPOSITED_VALIDATORS_ROLE","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getBeaconStat","outputs":[{"name":"depositedValidators","type":"uint256"},{"name":"beaconValidators","type":"uint256"},{"name":"beaconBalance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"removeStakingLimit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_reportTimestamp","type":"uint256"},{"name":"_timeElapsed","type":"uint256"},{"name":"_clValidators","type":"uint256"},{"name":"_clBalance","type":"uint256"},{"name":"_withdrawalVaultBalance","type":"uint256"},{"name":"_elRewardsVaultBalance","type":"uint256"},{"name":"_sharesRequestedToBurn","type":"uint256"},{"name":"_withdrawalFinalizationBatches","type":"uint256[]"},{"name":"_simulatedShareRate","type":"uint256"}],"name":"handleOracleReport","outputs":[{"name":"postRebaseAmounts","type":"uint256[4]"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getFee","outputs":[{"name":"totalFee","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"kernel","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getTotalShares","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"},{"name":"_deadline","type":"uint256"},{"name":"_v","type":"uint8"},{"name":"_r","type":"bytes32"},{"name":"_s","type":"bytes32"}],"name":"permit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isPetrified","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getLidoLocator","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"canDeposit","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"STAKING_PAUSE_ROLE","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getDepositableEther","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_account","type":"address"}],"name":"sharesOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"pauseStaking","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getTotalELRewardsCollected","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[],"name":"StakingPaused","type":"event"},{"anonymous":false,"inputs":[],"name":"StakingResumed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"maxStakeLimit","type":"uint256"},{"indexed":false,"name":"stakeLimitIncreasePerBlock","type":"uint256"}],"name":"StakingLimitSet","type":"event"},{"anonymous":false,"inputs":[],"name":"StakingLimitRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"reportTimestamp","type":"uint256"},{"indexed":false,"name":"preCLValidators","type":"uint256"},{"indexed":false,"name":"postCLValidators","type":"uint256"}],"name":"CLValidatorsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"depositedValidators","type":"uint256"}],"name":"DepositedValidatorsChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"reportTimestamp","type":"uint256"},{"indexed":false,"name":"preCLBalance","type":"uint256"},{"indexed":false,"name":"postCLBalance","type":"uint256"},{"indexed":false,"name":"withdrawalsWithdrawn","type":"uint256"},{"indexed":false,"name":"executionLayerRewardsWithdrawn","type":"uint256"},{"indexed":false,"name":"postBufferedEther","type":"uint256"}],"name":"ETHDistributed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"reportTimestamp","type":"uint256"},{"indexed":false,"name":"timeElapsed","type":"uint256"},{"indexed":false,"name":"preTotalShares","type":"uint256"},{"indexed":false,"name":"preTotalEther","type":"uint256"},{"indexed":false,"name":"postTotalShares","type":"uint256"},{"indexed":false,"name":"postTotalEther","type":"uint256"},{"indexed":false,"name":"sharesMintedAsFees","type":"uint256"}],"name":"TokenRebased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"lidoLocator","type":"address"}],"name":"LidoLocatorSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amount","type":"uint256"}],"name":"ELRewardsReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amount","type":"uint256"}],"name":"WithdrawalsReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"referral","type":"address"}],"name":"Submitted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amount","type":"uint256"}],"name":"Unbuffered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"executor","type":"address"},{"indexed":false,"name":"script","type":"bytes"},{"indexed":false,"name":"input","type":"bytes"},{"indexed":false,"name":"returnData","type":"bytes"}],"name":"ScriptResult","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"vault","type":"address"},{"indexed":true,"name":"token","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"RecoverToVault","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"eip712StETH","type":"address"}],"name":"EIP712StETHInitialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"sharesValue","type":"uint256"}],"name":"TransferShares","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"},{"indexed":false,"name":"preRebaseTokenAmount","type":"uint256"},{"indexed":false,"name":"postRebaseTokenAmount","type":"uint256"},{"indexed":false,"name":"sharesAmount","type":"uint256"}],"name":"SharesBurnt","type":"event"},{"anonymous":false,"inputs":[],"name":"Stopped","type":"event"},{"anonymous":false,"inputs":[],"name":"Resumed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"version","type":"uint256"}],"name":"ContractVersionSet","type":"event"}] \ No newline at end of file diff --git a/interfaces/LidoLocator.json b/interfaces/LidoLocator.json index 3c480986e..5bb321206 100644 --- a/interfaces/LidoLocator.json +++ b/interfaces/LidoLocator.json @@ -1,497 +1,2 @@ -[ - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "accountingOracle", - "type": "address" - }, - { - "internalType": "address", - "name": "depositSecurityModule", - "type": "address" - }, - { - "internalType": "address", - "name": "elRewardsVault", - "type": "address" - }, - { - "internalType": "address", - "name": "lido", - "type": "address" - }, - { - "internalType": "address", - "name": "oracleReportSanityChecker", - "type": "address" - }, - { - "internalType": "address", - "name": "postTokenRebaseReceiver", - "type": "address" - }, - { - "internalType": "address", - "name": "burner", - "type": "address" - }, - { - "internalType": "address", - "name": "stakingRouter", - "type": "address" - }, - { - "internalType": "address", - "name": "treasury", - "type": "address" - }, - { - "internalType": "address", - "name": "validatorsExitBusOracle", - "type": "address" - }, - { - "internalType": "address", - "name": "withdrawalQueue", - "type": "address" - }, - { - "internalType": "address", - "name": "withdrawalVault", - "type": "address" - }, - { - "internalType": "address", - "name": "oracleDaemonConfig", - "type": "address" - }, - { - "internalType": "address", - "name": "validatorExitDelayVerifier", - "type": "address" - }, - { - "internalType": "address", - "name": "triggerableWithdrawalsGateway", - "type": "address" - }, - { - "internalType": "address", - "name": "accounting", - "type": "address" - }, - { - "internalType": "address", - "name": "predepositGuarantee", - "type": "address" - }, - { - "internalType": "address", - "name": "wstETH", - "type": "address" - }, - { - "internalType": "address", - "name": "vaultHub", - "type": "address" - }, - { - "internalType": "address", - "name": "vaultFactory", - "type": "address" - }, - { - "internalType": "address", - "name": "lazyOracle", - "type": "address" - }, - { - "internalType": "address", - "name": "operatorGrid", - "type": "address" - } - ], - "internalType": "struct LidoLocator.Config", - "name": "_config", - "type": "tuple" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "ZeroAddress", - "type": "error" - }, - { - "inputs": [], - "name": "accounting", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "accountingOracle", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "burner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "coreComponents", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "depositSecurityModule", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "elRewardsVault", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lazyOracle", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lido", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "operatorGrid", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "oracleDaemonConfig", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "oracleReportComponents", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "oracleReportSanityChecker", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "postTokenRebaseReceiver", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "predepositGuarantee", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "stakingRouter", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "treasury", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "triggerableWithdrawalsGateway", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "validatorExitDelayVerifier", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "validatorsExitBusOracle", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "vaultFactory", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "vaultHub", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "withdrawalQueue", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "withdrawalVault", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wstETH", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } -] +[{"inputs":[{"components":[{"internalType":"address","name":"accountingOracle","type":"address"},{"internalType":"address","name":"depositSecurityModule","type":"address"},{"internalType":"address","name":"elRewardsVault","type":"address"},{"internalType":"address","name":"legacyOracle","type":"address"},{"internalType":"address","name":"lido","type":"address"},{"internalType":"address","name":"oracleReportSanityChecker","type":"address"},{"internalType":"address","name":"postTokenRebaseReceiver","type":"address"},{"internalType":"address","name":"burner","type":"address"},{"internalType":"address","name":"stakingRouter","type":"address"},{"internalType":"address","name":"treasury","type":"address"},{"internalType":"address","name":"validatorsExitBusOracle","type":"address"},{"internalType":"address","name":"withdrawalQueue","type":"address"},{"internalType":"address","name":"withdrawalVault","type":"address"},{"internalType":"address","name":"oracleDaemonConfig","type":"address"},{"internalType":"address","name":"validatorExitDelayVerifier","type":"address"},{"internalType":"address","name":"triggerableWithdrawalsGateway","type":"address"}],"internalType":"struct LidoLocator.Config","name":"_config","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"inputs":[],"name":"accountingOracle","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"burner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"coreComponents","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"depositSecurityModule","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"elRewardsVault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"legacyOracle","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lido","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oracleDaemonConfig","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oracleReportComponentsForLido","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oracleReportSanityChecker","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"postTokenRebaseReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingRouter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"triggerableWithdrawalsGateway","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"validatorExitDelayVerifier","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"validatorsExitBusOracle","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawalQueue","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawalVault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}] + diff --git a/interfaces/OperatorGrid.json b/interfaces/OperatorGrid.json deleted file mode 100644 index ddda111b1..000000000 --- a/interfaces/OperatorGrid.json +++ /dev/null @@ -1,1582 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "contract ILidoLocator", - "name": "_locator", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AccessControlBadConfirmation", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "neededRole", - "type": "bytes32" - } - ], - "name": "AccessControlUnauthorizedAccount", - "type": "error" - }, - { - "inputs": [], - "name": "ArrayLengthMismatch", - "type": "error" - }, - { - "inputs": [], - "name": "CannotChangeToDefaultTier", - "type": "error" - }, - { - "inputs": [], - "name": "ConfirmExpiryOutOfBounds", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tierId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "forcedRebalanceThresholdBP", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserveRatioBP", - "type": "uint256" - } - ], - "name": "ForcedRebalanceThresholdTooHigh", - "type": "error" - }, - { - "inputs": [], - "name": "GroupExists", - "type": "error" - }, - { - "inputs": [], - "name": "GroupLimitExceeded", - "type": "error" - }, - { - "inputs": [], - "name": "GroupNotExists", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tierId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "infraFeeBP", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxInfraFeeBP", - "type": "uint256" - } - ], - "name": "InfraFeeTooHigh", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "valueBP", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxValueBP", - "type": "uint256" - } - ], - "name": "InvalidBasisPoints", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidInitialization", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tierId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "liquidityFeeBP", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxLiquidityFeeBP", - "type": "uint256" - } - ], - "name": "LiquidityFeeTooHigh", - "type": "error" - }, - { - "inputs": [], - "name": "NodeOperatorNotExists", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "operation", - "type": "string" - }, - { - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "NotAuthorized", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "requestedShareLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "tierShareLimit", - "type": "uint256" - } - ], - "name": "RequestedShareLimitTooHigh", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "requestedSHareLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "vaultShares", - "type": "uint256" - } - ], - "name": "RequestedShareLimitTooLow", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tierId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reservationFeeBP", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxReservationFeeBP", - "type": "uint256" - } - ], - "name": "ReservationFeeTooHigh", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tierId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserveRatioBP", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxReserveRatioBP", - "type": "uint256" - } - ], - "name": "ReserveRatioTooHigh", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint8", - "name": "bits", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "SafeCastOverflowedUintDowncast", - "type": "error" - }, - { - "inputs": [], - "name": "SenderNotMember", - "type": "error" - }, - { - "inputs": [], - "name": "ShareLimitAlreadySet", - "type": "error" - }, - { - "inputs": [], - "name": "TierAlreadySet", - "type": "error" - }, - { - "inputs": [], - "name": "TierLimitExceeded", - "type": "error" - }, - { - "inputs": [], - "name": "TierNotExists", - "type": "error" - }, - { - "inputs": [], - "name": "TierNotInOperatorGroup", - "type": "error" - }, - { - "inputs": [], - "name": "VaultAlreadySyncedWithTier", - "type": "error" - }, - { - "inputs": [], - "name": "VaultInJail", - "type": "error" - }, - { - "inputs": [], - "name": "VaultInJailAlreadySet", - "type": "error" - }, - { - "inputs": [], - "name": "VaultNotConnected", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "argument", - "type": "string" - } - ], - "name": "ZeroArgument", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroConfirmingRoles", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldConfirmExpiry", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newConfirmExpiry", - "type": "uint256" - } - ], - "name": "ConfirmExpirySet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "nodeOperator", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "shareLimit", - "type": "uint256" - } - ], - "name": "GroupAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "nodeOperator", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "shareLimit", - "type": "uint256" - } - ], - "name": "GroupShareLimitUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "member", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "roleOrAddress", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "confirmTimestamp", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "expiryTimestamp", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "RoleMemberConfirmed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "nodeOperator", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tierId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "shareLimit", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reserveRatioBP", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "forcedRebalanceThresholdBP", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "infraFeeBP", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "liquidityFeeBP", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reservationFeeBP", - "type": "uint256" - } - ], - "name": "TierAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tierId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "shareLimit", - "type": "uint256" - } - ], - "name": "TierChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "tierId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "shareLimit", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reserveRatioBP", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "forcedRebalanceThresholdBP", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "infraFeeBP", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "liquidityFeeBP", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reservationFeeBP", - "type": "uint256" - } - ], - "name": "TierUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "isInJail", - "type": "bool" - } - ], - "name": "VaultJailStatusUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DEFAULT_TIER_ID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DEFAULT_TIER_OPERATOR", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LIDO_LOCATOR", - "outputs": [ - { - "internalType": "contract ILidoLocator", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_CONFIRM_EXPIRY", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MIN_CONFIRM_EXPIRY", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "REGISTRY_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "_tierIds", - "type": "uint256[]" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "shareLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserveRatioBP", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "forcedRebalanceThresholdBP", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "infraFeeBP", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "liquidityFeeBP", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reservationFeeBP", - "type": "uint256" - } - ], - "internalType": "struct TierParams[]", - "name": "_tierParams", - "type": "tuple[]" - } - ], - "name": "alterTiers", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_requestedTierId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_requestedShareLimit", - "type": "uint256" - } - ], - "name": "changeTier", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_callData", - "type": "bytes" - }, - { - "internalType": "bytes32", - "name": "_role", - "type": "bytes32" - } - ], - "name": "confirmation", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "name": "effectiveShareLimit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getConfirmExpiry", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMembers", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_nodeOperator", - "type": "address" - } - ], - "name": "group", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "uint96", - "name": "shareLimit", - "type": "uint96" - }, - { - "internalType": "uint96", - "name": "liabilityShares", - "type": "uint96" - }, - { - "internalType": "uint256[]", - "name": "tierIds", - "type": "uint256[]" - } - ], - "internalType": "struct OperatorGrid.Group", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_admin", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "shareLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserveRatioBP", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "forcedRebalanceThresholdBP", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "infraFeeBP", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "liquidityFeeBP", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reservationFeeBP", - "type": "uint256" - } - ], - "internalType": "struct TierParams", - "name": "_defaultTierParams", - "type": "tuple" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "name": "isVaultInJail", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_index", - "type": "uint256" - } - ], - "name": "nodeOperatorAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "nodeOperatorCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "onBurnedShares", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "_overrideLimits", - "type": "bool" - } - ], - "name": "onMintedShares", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_nodeOperator", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_shareLimit", - "type": "uint256" - } - ], - "name": "registerGroup", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_nodeOperator", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "shareLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserveRatioBP", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "forcedRebalanceThresholdBP", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "infraFeeBP", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "liquidityFeeBP", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reservationFeeBP", - "type": "uint256" - } - ], - "internalType": "struct TierParams[]", - "name": "_tiers", - "type": "tuple[]" - } - ], - "name": "registerTiers", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "callerConfirmation", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "name": "resetVaultTier", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_newConfirmExpiry", - "type": "uint256" - } - ], - "name": "setConfirmExpiry", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - }, - { - "internalType": "bool", - "name": "_isInJail", - "type": "bool" - } - ], - "name": "setVaultJailStatus", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "name": "syncTier", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_tierId", - "type": "uint256" - } - ], - "name": "tier", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "uint96", - "name": "shareLimit", - "type": "uint96" - }, - { - "internalType": "uint96", - "name": "liabilityShares", - "type": "uint96" - }, - { - "internalType": "uint16", - "name": "reserveRatioBP", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "forcedRebalanceThresholdBP", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "infraFeeBP", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "liquidityFeeBP", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "reservationFeeBP", - "type": "uint16" - } - ], - "internalType": "struct OperatorGrid.Tier", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "tiersCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_nodeOperator", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_shareLimit", - "type": "uint256" - } - ], - "name": "updateGroupShareLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_infraFeeBP", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_liquidityFeeBP", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_reservationFeeBP", - "type": "uint256" - } - ], - "name": "updateVaultFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_requestedShareLimit", - "type": "uint256" - } - ], - "name": "updateVaultShareLimit", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "name": "vaultTierInfo", - "outputs": [ - { - "internalType": "address", - "name": "nodeOperator", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tierId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "shareLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserveRatioBP", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "forcedRebalanceThresholdBP", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "infraFeeBP", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "liquidityFeeBP", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reservationFeeBP", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/interfaces/PredepositGuarantee.json b/interfaces/PredepositGuarantee.json deleted file mode 100644 index ee708d803..000000000 --- a/interfaces/PredepositGuarantee.json +++ /dev/null @@ -1,2001 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "bytes4", - "name": "_genesisForkVersion", - "type": "bytes4" - }, - { - "internalType": "GIndex", - "name": "_gIFirstValidator", - "type": "bytes32" - }, - { - "internalType": "GIndex", - "name": "_gIFirstValidatorAfterChange", - "type": "bytes32" - }, - { - "internalType": "uint64", - "name": "_pivotSlot", - "type": "uint64" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AccessControlBadConfirmation", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "neededRole", - "type": "bytes32" - } - ], - "name": "AccessControlUnauthorizedAccount", - "type": "error" - }, - { - "inputs": [], - "name": "ArrayLengthsNotMatch", - "type": "error" - }, - { - "inputs": [], - "name": "CompensateFailed", - "type": "error" - }, - { - "inputs": [], - "name": "EmptyDeposits", - "type": "error" - }, - { - "inputs": [], - "name": "IndexOutOfRange", - "type": "error" - }, - { - "inputs": [], - "name": "InputHasInfinityPoints", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidDepositYLength", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidInitialization", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidPubkeyLength", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidSignature", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidSlot", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "InvalidTopUpAmount", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "validatorPubkey", - "type": "bytes" - }, - { - "internalType": "enum IPredepositGuarantee.ValidatorStage", - "name": "stage", - "type": "uint8" - } - ], - "name": "InvalidValidatorStage", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "locked", - "type": "uint256" - } - ], - "name": "LockedIsNotZero", - "type": "error" - }, - { - "inputs": [], - "name": "NotDepositor", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "unlocked", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "NotEnoughUnlocked", - "type": "error" - }, - { - "inputs": [], - "name": "NotGuarantor", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "NotStakingVaultOwner", - "type": "error" - }, - { - "inputs": [], - "name": "NothingToRefund", - "type": "error" - }, - { - "inputs": [], - "name": "PauseUntilMustBeInFuture", - "type": "error" - }, - { - "inputs": [], - "name": "PausedExpected", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "validatorPubkey", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "depositAmount", - "type": "uint256" - } - ], - "name": "PredepositAmountInvalid", - "type": "error" - }, - { - "inputs": [], - "name": "RefundFailed", - "type": "error" - }, - { - "inputs": [], - "name": "ResumedExpected", - "type": "error" - }, - { - "inputs": [], - "name": "RootNotFound", - "type": "error" - }, - { - "inputs": [], - "name": "SameDepositor", - "type": "error" - }, - { - "inputs": [], - "name": "SameGuarantor", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "validatorPubkey", - "type": "bytes" - }, - { - "internalType": "enum IPredepositGuarantee.ValidatorStage", - "name": "stage", - "type": "uint8" - } - ], - "name": "ValidatorNotActivated", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "validatorPubkey", - "type": "bytes" - } - ], - "name": "ValidatorNotEligibleForActivation", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "validatorPubkey", - "type": "bytes" - }, - { - "internalType": "enum IPredepositGuarantee.ValidatorStage", - "name": "stage", - "type": "uint8" - } - ], - "name": "ValidatorNotNew", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "validatorPubkey", - "type": "bytes" - }, - { - "internalType": "enum IPredepositGuarantee.ValidatorStage", - "name": "stage", - "type": "uint8" - } - ], - "name": "ValidatorNotPreDeposited", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "validatorPubkey", - "type": "bytes" - }, - { - "internalType": "enum IPredepositGuarantee.ValidatorStage", - "name": "stage", - "type": "uint8" - } - ], - "name": "ValidatorNotProven", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "ValueNotMultipleOfPredepositAmount", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "WithdrawalCredentialsInvalidVersion", - "type": "error" - }, - { - "inputs": [], - "name": "WithdrawalCredentialsMatch", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "withdrawalCredentials", - "type": "bytes32" - } - ], - "name": "WithdrawalCredentialsMisformed", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "stakingVault", - "type": "address" - }, - { - "internalType": "address", - "name": "withdrawalCredentialsAddress", - "type": "address" - } - ], - "name": "WithdrawalCredentialsMismatch", - "type": "error" - }, - { - "inputs": [], - "name": "WithdrawalFailed", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "argument", - "type": "string" - } - ], - "name": "ZeroArgument", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroPauseDuration", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "nodeOperator", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "total", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "locked", - "type": "uint128" - } - ], - "name": "BalanceLocked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "nodeOperator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "BalanceRefunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "nodeOperator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "BalanceToppedUp", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "nodeOperator", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "total", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "locked", - "type": "uint128" - } - ], - "name": "BalanceUnlocked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "nodeOperator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "BalanceWithdrawn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "nodeOperator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newDepositor", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "prevDepositor", - "type": "address" - } - ], - "name": "DepositorSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "guarantor", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "nodeOperator", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "GuarantorRefundAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "guarantor", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "GuarantorRefundClaimed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "nodeOperator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newGuarantor", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "prevGuarantor", - "type": "address" - } - ], - "name": "GuarantorSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "duration", - "type": "uint256" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "Resumed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes", - "name": "validatorPubkey", - "type": "bytes" - }, - { - "indexed": true, - "internalType": "address", - "name": "nodeOperator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "stakingVault", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "withdrawalCredentials", - "type": "bytes32" - } - ], - "name": "ValidatorActivated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "stakingVault", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "nodeOperator", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes", - "name": "validatorPubkey", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "guaranteeTotal", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "guaranteeLocked", - "type": "uint256" - } - ], - "name": "ValidatorCompensated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes", - "name": "validatorPubkey", - "type": "bytes" - }, - { - "indexed": true, - "internalType": "address", - "name": "nodeOperator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "stakingVault", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "withdrawalCredentials", - "type": "bytes32" - } - ], - "name": "ValidatorPreDeposited", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes", - "name": "validatorPubkey", - "type": "bytes" - }, - { - "indexed": true, - "internalType": "address", - "name": "nodeOperator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "stakingVault", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "withdrawalCredentials", - "type": "bytes32" - } - ], - "name": "ValidatorProven", - "type": "event" - }, - { - "inputs": [], - "name": "ACTIVATION_DEPOSIT_AMOUNT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "BEACON_ROOTS", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DEPOSIT_DOMAIN", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GI_FIRST_VALIDATOR_CURR", - "outputs": [ - { - "internalType": "GIndex", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GI_FIRST_VALIDATOR_PREV", - "outputs": [ - { - "internalType": "GIndex", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GI_PUBKEY_WC_PARENT", - "outputs": [ - { - "internalType": "GIndex", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GI_STATE_ROOT", - "outputs": [ - { - "internalType": "GIndex", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_SUPPORTED_WC_VERSION", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_TOPUP_AMOUNT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MIN_SUPPORTED_WC_VERSION", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PAUSE_INFINITELY", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PAUSE_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PIVOT_SLOT", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PREDEPOSIT_AMOUNT", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "RESUME_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_pubkey", - "type": "bytes" - } - ], - "name": "activateValidator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_recipient", - "type": "address" - } - ], - "name": "claimGuarantorRefund", - "outputs": [ - { - "internalType": "uint256", - "name": "claimedEther", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_guarantor", - "type": "address" - } - ], - "name": "claimableRefund", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getResumeSinceTimestamp", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMembers", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_defaultAdmin", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "isPaused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_nodeOperator", - "type": "address" - } - ], - "name": "nodeOperatorBalance", - "outputs": [ - { - "components": [ - { - "internalType": "uint128", - "name": "total", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "locked", - "type": "uint128" - } - ], - "internalType": "struct PredepositGuarantee.NodeOperatorBalance", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_nodeOperator", - "type": "address" - } - ], - "name": "nodeOperatorDepositor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_nodeOperator", - "type": "address" - } - ], - "name": "nodeOperatorGuarantor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_duration", - "type": "uint256" - } - ], - "name": "pauseFor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_pauseUntilInclusive", - "type": "uint256" - } - ], - "name": "pauseUntil", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IStakingVault", - "name": "_vault", - "type": "address" - } - ], - "name": "pendingActivations", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IStakingVault", - "name": "_stakingVault", - "type": "address" - }, - { - "components": [ - { - "internalType": "bytes", - "name": "pubkey", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "depositDataRoot", - "type": "bytes32" - } - ], - "internalType": "struct IStakingVault.Deposit[]", - "name": "_deposits", - "type": "tuple[]" - }, - { - "components": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "a", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "b", - "type": "bytes32" - } - ], - "internalType": "struct BLS12_381.Fp", - "name": "pubkeyY", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "bytes32", - "name": "c0_a", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "c0_b", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "c1_a", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "c1_b", - "type": "bytes32" - } - ], - "internalType": "struct BLS12_381.Fp2", - "name": "signatureY", - "type": "tuple" - } - ], - "internalType": "struct BLS12_381.DepositY[]", - "name": "_depositsY", - "type": "tuple[]" - } - ], - "name": "predeposit", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes32[]", - "name": "proof", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "pubkey", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "validatorIndex", - "type": "uint256" - }, - { - "internalType": "uint64", - "name": "childBlockTimestamp", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "slot", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "proposerIndex", - "type": "uint64" - } - ], - "internalType": "struct IPredepositGuarantee.ValidatorWitness", - "name": "_witness", - "type": "tuple" - }, - { - "internalType": "bytes32", - "name": "_invalidWithdrawalCredentials", - "type": "bytes32" - } - ], - "name": "proveInvalidValidatorWC", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes32[]", - "name": "proof", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "pubkey", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "validatorIndex", - "type": "uint256" - }, - { - "internalType": "uint64", - "name": "childBlockTimestamp", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "slot", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "proposerIndex", - "type": "uint64" - } - ], - "internalType": "struct IPredepositGuarantee.ValidatorWitness", - "name": "_witness", - "type": "tuple" - }, - { - "internalType": "contract IStakingVault", - "name": "_stakingVault", - "type": "address" - } - ], - "name": "proveUnknownValidator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes32[]", - "name": "proof", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "pubkey", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "validatorIndex", - "type": "uint256" - }, - { - "internalType": "uint64", - "name": "childBlockTimestamp", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "slot", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "proposerIndex", - "type": "uint64" - } - ], - "internalType": "struct IPredepositGuarantee.ValidatorWitness[]", - "name": "_witnesses", - "type": "tuple[]" - }, - { - "internalType": "uint256[]", - "name": "_amounts", - "type": "uint256[]" - } - ], - "name": "proveWCActivateAndTopUpValidators", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes32[]", - "name": "proof", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "pubkey", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "validatorIndex", - "type": "uint256" - }, - { - "internalType": "uint64", - "name": "childBlockTimestamp", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "slot", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "proposerIndex", - "type": "uint64" - } - ], - "internalType": "struct IPredepositGuarantee.ValidatorWitness", - "name": "_witness", - "type": "tuple" - } - ], - "name": "proveWCAndActivate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "callerConfirmation", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "resume", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_newDepositor", - "type": "address" - } - ], - "name": "setNodeOperatorDepositor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_newGuarantor", - "type": "address" - } - ], - "name": "setNodeOperatorGuarantor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes", - "name": "pubkey", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "internalType": "struct PredepositGuarantee.ValidatorTopUp[]", - "name": "_topUps", - "type": "tuple[]" - } - ], - "name": "topUpExistingValidators", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_nodeOperator", - "type": "address" - } - ], - "name": "topUpNodeOperatorBalance", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_nodeOperator", - "type": "address" - } - ], - "name": "unlockedBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "unlocked", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes32[]", - "name": "proof", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "pubkey", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "validatorIndex", - "type": "uint256" - }, - { - "internalType": "uint64", - "name": "childBlockTimestamp", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "slot", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "proposerIndex", - "type": "uint64" - } - ], - "internalType": "struct IPredepositGuarantee.ValidatorWitness", - "name": "_witness", - "type": "tuple" - }, - { - "internalType": "bytes32", - "name": "_withdrawalCredentials", - "type": "bytes32" - } - ], - "name": "validatePubKeyWCProof", - "outputs": [], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_validatorPubkey", - "type": "bytes" - } - ], - "name": "validatorStatus", - "outputs": [ - { - "components": [ - { - "internalType": "enum IPredepositGuarantee.ValidatorStage", - "name": "stage", - "type": "uint8" - }, - { - "internalType": "contract IStakingVault", - "name": "stakingVault", - "type": "address" - }, - { - "internalType": "address", - "name": "nodeOperator", - "type": "address" - } - ], - "internalType": "struct IPredepositGuarantee.ValidatorStatus", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes", - "name": "pubkey", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "depositDataRoot", - "type": "bytes32" - } - ], - "internalType": "struct IStakingVault.Deposit", - "name": "_deposit", - "type": "tuple" - }, - { - "components": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "a", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "b", - "type": "bytes32" - } - ], - "internalType": "struct BLS12_381.Fp", - "name": "pubkeyY", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "bytes32", - "name": "c0_a", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "c0_b", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "c1_a", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "c1_b", - "type": "bytes32" - } - ], - "internalType": "struct BLS12_381.Fp2", - "name": "signatureY", - "type": "tuple" - } - ], - "internalType": "struct BLS12_381.DepositY", - "name": "_depositsY", - "type": "tuple" - }, - { - "internalType": "bytes32", - "name": "_withdrawalCredentials", - "type": "bytes32" - } - ], - "name": "verifyDepositMessage", - "outputs": [], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_nodeOperator", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_recipient", - "type": "address" - } - ], - "name": "withdrawNodeOperatorBalance", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/interfaces/UpgradeTemplateV3.json b/interfaces/UpgradeTemplateV3.json deleted file mode 100644 index 5c0209da1..000000000 --- a/interfaces/UpgradeTemplateV3.json +++ /dev/null @@ -1,1396 +0,0 @@ -[ - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "oldLocatorImpl", - "type": "address" - }, - { - "internalType": "address", - "name": "oldLidoImpl", - "type": "address" - }, - { - "internalType": "address", - "name": "oldAccountingOracleImpl", - "type": "address" - }, - { - "internalType": "address", - "name": "oldTokenRateNotifier", - "type": "address" - }, - { - "internalType": "address", - "name": "newLocatorImpl", - "type": "address" - }, - { - "internalType": "address", - "name": "newLidoImpl", - "type": "address" - }, - { - "internalType": "address", - "name": "newAccountingOracleImpl", - "type": "address" - }, - { - "internalType": "address", - "name": "newTokenRateNotifier", - "type": "address" - }, - { - "internalType": "address", - "name": "upgradeableBeacon", - "type": "address" - }, - { - "internalType": "address", - "name": "stakingVaultImpl", - "type": "address" - }, - { - "internalType": "address", - "name": "dashboardImpl", - "type": "address" - }, - { - "internalType": "address", - "name": "gateSealForVaults", - "type": "address" - }, - { - "internalType": "address", - "name": "kernel", - "type": "address" - }, - { - "internalType": "address", - "name": "agent", - "type": "address" - }, - { - "internalType": "address", - "name": "aragonAppLidoRepo", - "type": "address" - }, - { - "internalType": "address", - "name": "locator", - "type": "address" - }, - { - "internalType": "address", - "name": "voting", - "type": "address" - }, - { - "internalType": "address", - "name": "dualGovernance", - "type": "address" - }, - { - "internalType": "address", - "name": "acl", - "type": "address" - }, - { - "internalType": "address", - "name": "resealManager", - "type": "address" - }, - { - "internalType": "address", - "name": "easyTrack", - "type": "address" - }, - { - "internalType": "address", - "name": "vaultsAdapter", - "type": "address" - }, - { - "internalType": "address", - "name": "etfAlterTiersInOperatorGrid", - "type": "address" - }, - { - "internalType": "address", - "name": "etfRegisterGroupsInOperatorGrid", - "type": "address" - }, - { - "internalType": "address", - "name": "etfRegisterTiersInOperatorGrid", - "type": "address" - }, - { - "internalType": "address", - "name": "etfUpdateGroupsShareLimitInOperatorGrid", - "type": "address" - }, - { - "internalType": "address", - "name": "etfSetJailStatusInOperatorGrid", - "type": "address" - }, - { - "internalType": "address", - "name": "etfUpdateVaultsFeesInOperatorGrid", - "type": "address" - }, - { - "internalType": "address", - "name": "etfForceValidatorExitsInVaultHub", - "type": "address" - }, - { - "internalType": "address", - "name": "etfSetLiabilitySharesTargetInVaultHub", - "type": "address" - }, - { - "internalType": "address", - "name": "etfSocializeBadDebtInVaultHub", - "type": "address" - } - ], - "internalType": "struct V3Addresses.V3AddressesParams", - "name": "_params", - "type": "tuple" - }, - { - "internalType": "uint256", - "name": "_expireSinceInclusive", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_initialMaxExternalRatioBP", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "BurnerMigrationNotAllowed", - "type": "error" - }, - { - "inputs": [], - "name": "Expired", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "repo", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "IncorrectAragonAppImplementation", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "contractAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "burner", - "type": "address" - } - ], - "name": "IncorrectBurnerAllowance", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "IncorrectBurnerSharesMigration", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "contractAddress", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "IncorrectOZAccessControlRoleHolders", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "proxy", - "type": "address" - } - ], - "name": "IncorrectProxyAdmin", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "proxy", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "IncorrectProxyImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "IncorrectTokenRateNotifierObserversLengthMigration", - "type": "error" - }, - { - "inputs": [], - "name": "IncorrectTokenRateNotifierObserversMigration", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "notifier", - "type": "address" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "IncorrectTokenRateNotifierOwnerMigration", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "beacon", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "IncorrectUpgradeableBeaconImplementation", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "beacon", - "type": "address" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "IncorrectUpgradeableBeaconOwner", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "factory", - "type": "address" - }, - { - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "IncorrectVaultFactoryBeacon", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "factory", - "type": "address" - }, - { - "internalType": "address", - "name": "delegation", - "type": "address" - } - ], - "name": "IncorrectVaultFactoryDashboardImplementation", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "contractAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "actualVersion", - "type": "uint256" - } - ], - "name": "InvalidContractVersion", - "type": "error" - }, - { - "inputs": [], - "name": "NewAndOldLocatorImplementationsMustBeDifferent", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "contractAddress", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "NonZeroRoleHolders", - "type": "error" - }, - { - "inputs": [], - "name": "OldAndNewTokenRateNotifiersMustBeDifferent", - "type": "error" - }, - { - "inputs": [], - "name": "OnlyAgentCanUpgrade", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "moduleName", - "type": "string" - } - ], - "name": "StakingModuleNotFound", - "type": "error" - }, - { - "inputs": [], - "name": "StartAlreadyCalledInThisTx", - "type": "error" - }, - { - "inputs": [], - "name": "StartAndFinishMustBeInSameTx", - "type": "error" - }, - { - "inputs": [], - "name": "TotalSharesOrPooledEtherChanged", - "type": "error" - }, - { - "inputs": [], - "name": "UnexpectedEasyTrackFactories", - "type": "error" - }, - { - "inputs": [], - "name": "UpgradeAlreadyFinished", - "type": "error" - }, - { - "inputs": [], - "name": "UpgradeAlreadyStarted", - "type": "error" - }, - { - "anonymous": false, - "inputs": [], - "name": "UpgradeFinished", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "UpgradeStarted", - "type": "event" - }, - { - "inputs": [], - "name": "ACCOUNTING", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ACCOUNTING_ORACLE", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ACL", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "AGENT", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ARAGON_APP_LIDO_REPO", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "BURNER", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "CSM_ACCOUNTING", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "CSM_MODULE_NAME", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "CURATED_MODULE_NAME", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DASHBOARD_IMPL", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DUAL_GOVERNANCE", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "EASY_TRACK", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "EL_REWARDS_VAULT", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ETF_ALTER_TIERS_IN_OPERATOR_GRID", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ETF_FORCE_VALIDATOR_EXITS_IN_VAULT_HUB", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ETF_REGISTER_GROUPS_IN_OPERATOR_GRID", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ETF_REGISTER_TIERS_IN_OPERATOR_GRID", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ETF_SET_JAIL_STATUS_IN_OPERATOR_GRID", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ETF_SET_LIABILITY_SHARES_TARGET_IN_VAULT_HUB", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ETF_SOCIALIZE_BAD_DEBT_IN_VAULT_HUB", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ETF_UPDATE_GROUPS_SHARE_LIMIT_IN_OPERATOR_GRID", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ETF_UPDATE_VAULTS_FEES_IN_OPERATOR_GRID", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "EVM_SCRIPT_EXECUTOR", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "EXPECTED_FINAL_ACCOUNTING_ORACLE_CONSENSUS_VERSION", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "EXPECTED_FINAL_ACCOUNTING_ORACLE_VERSION", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "EXPECTED_FINAL_LIDO_VERSION", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "EXPIRE_SINCE_INCLUSIVE", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GATE_SEAL", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "INFINITE_ALLOWANCE", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "INITIAL_MAX_EXTERNAL_RATIO_BP", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "KERNEL", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LAZY_ORACLE", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LIDO", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LOCATOR", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "NEW_ACCOUNTING_ORACLE_IMPL", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "NEW_LIDO_IMPL", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "NEW_LOCATOR_IMPL", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "NEW_TOKEN_RATE_NOTIFIER", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "NODE_OPERATORS_REGISTRY", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "OLD_ACCOUNTING_ORACLE_IMPL", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "OLD_BURNER", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "OLD_LIDO_IMPL", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "OLD_LOCATOR_IMPL", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "OLD_TOKEN_RATE_NOTIFIER", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "OPERATOR_GRID", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ORACLE_DAEMON_CONFIG", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ORACLE_REPORT_SANITY_CHECKER", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PREDEPOSIT_GUARANTEE", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "RESEAL_MANAGER", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "SIMPLE_DVT", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "SIMPLE_DVT_MODULE_NAME", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "STAKING_ROUTER", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "STAKING_VAULT_IMPL", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "UPGRADEABLE_BEACON", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "UPGRADE_NOT_STARTED", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "UPGRADE_STARTED_SLOT", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "VALIDATORS_EXIT_BUS_ORACLE", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "VAULTS_ADAPTER", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "VAULT_FACTORY", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "VAULT_HUB", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "VOTING", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WITHDRAWAL_QUEUE", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WSTETH", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "contractsWithBurnerAllowances", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "finishUpgrade", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initialOldBurnerStethSharesBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialTotalPooledEther", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialTotalShares", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "isUpgradeFinished", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "startUpgrade", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "upgradeBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/interfaces/V3LaunchOmnibus.json b/interfaces/V3LaunchOmnibus.json deleted file mode 100644 index 6f6fcb07a..000000000 --- a/interfaces/V3LaunchOmnibus.json +++ /dev/null @@ -1,143 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "string", - "name": "proposalMetadata", - "type": "string" - } - ], - "name": "getEVMScript", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "description", - "type": "string" - }, - { - "internalType": "string", - "name": "proposalMetadata", - "type": "string" - } - ], - "name": "getNewVoteCallBytecode", - "outputs": [ - { - "internalType": "bytes", - "name": "newVoteBytecode", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getVoteItems", - "outputs": [ - { - "components": [ - { - "internalType": "string", - "name": "description", - "type": "string" - }, - { - "components": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "internalType": "struct OmnibusBase.ScriptCall", - "name": "call", - "type": "tuple" - } - ], - "internalType": "struct OmnibusBase.VoteItem[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getVotingVoteItems", - "outputs": [ - { - "components": [ - { - "internalType": "string", - "name": "description", - "type": "string" - }, - { - "components": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "internalType": "struct OmnibusBase.ScriptCall", - "name": "call", - "type": "tuple" - } - ], - "internalType": "struct OmnibusBase.VoteItem[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "voteId", - "type": "uint256" - }, - { - "internalType": "string", - "name": "proposalMetadata", - "type": "string" - } - ], - "name": "isValidVoteScript", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/interfaces/VaultHub.json b/interfaces/VaultHub.json deleted file mode 100644 index d10e932d8..000000000 --- a/interfaces/VaultHub.json +++ /dev/null @@ -1,2606 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "contract ILidoLocator", - "name": "_locator", - "type": "address" - }, - { - "internalType": "contract ILido", - "name": "_lido", - "type": "address" - }, - { - "internalType": "contract IHashConsensus", - "name": "_consensusContract", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_maxRelativeShareLimitBP", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AccessControlBadConfirmation", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "neededRole", - "type": "bytes32" - } - ], - "name": "AccessControlUnauthorizedAccount", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "AlreadyConnected", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "internalType": "uint256", - "name": "totalValue", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "withdrawAmount", - "type": "uint256" - } - ], - "name": "AmountExceedsTotalValue", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "internalType": "uint256", - "name": "withdrawable", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "requested", - "type": "uint256" - } - ], - "name": "AmountExceedsWithdrawableValue", - "type": "error" - }, - { - "inputs": [], - "name": "BadDebtSocializationNotAllowed", - "type": "error" - }, - { - "inputs": [], - "name": "ForcedValidatorExitNotAllowed", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "InsufficientSharesToBurn", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "vault", - "type": "address" - } - ], - "name": "InsufficientStagedBalance", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "internalType": "uint256", - "name": "etherToLock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxLockableValue", - "type": "uint256" - } - ], - "name": "InsufficientValue", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "valueBP", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxValueBP", - "type": "uint256" - } - ], - "name": "InvalidBasisPoints", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidInitialization", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "vault", - "type": "address" - } - ], - "name": "NoFundsForForceRebalance", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "internalType": "uint256", - "name": "unsettledLidoFees", - "type": "uint256" - } - ], - "name": "NoFundsToSettleLidoFees", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "internalType": "uint256", - "name": "liabilityShares", - "type": "uint256" - } - ], - "name": "NoLiabilitySharesShouldBeLeft", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "vault", - "type": "address" - } - ], - "name": "NoReasonForForceRebalance", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "internalType": "uint256", - "name": "unsettledLidoFees", - "type": "uint256" - } - ], - "name": "NoUnsettledLidoFeesShouldBeLeft", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "vault", - "type": "address" - } - ], - "name": "NoUnsettledLidoFeesToSettle", - "type": "error" - }, - { - "inputs": [], - "name": "NotAuthorized", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "vault", - "type": "address" - } - ], - "name": "NotConnectedToHub", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "vault", - "type": "address" - } - ], - "name": "PDGNotDepositor", - "type": "error" - }, - { - "inputs": [], - "name": "PartialValidatorWithdrawalNotAllowed", - "type": "error" - }, - { - "inputs": [], - "name": "PauseIntentAlreadySet", - "type": "error" - }, - { - "inputs": [], - "name": "PauseIntentAlreadyUnset", - "type": "error" - }, - { - "inputs": [], - "name": "PauseUntilMustBeInFuture", - "type": "error" - }, - { - "inputs": [], - "name": "PausedExpected", - "type": "error" - }, - { - "inputs": [], - "name": "ResumedExpected", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "int256", - "name": "value", - "type": "int256" - } - ], - "name": "SafeCastOverflowedIntToUint", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint8", - "name": "bits", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "SafeCastOverflowedUintDowncast", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "internalType": "uint256", - "name": "expectedSharesAfterMint", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "shareLimit", - "type": "uint256" - } - ], - "name": "ShareLimitExceeded", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "shareLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxShareLimit", - "type": "uint256" - } - ], - "name": "ShareLimitTooHigh", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "vault", - "type": "address" - } - ], - "name": "VaultHubNotPendingOwner", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "internalType": "uint256", - "name": "currentBalance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expectedBalance", - "type": "uint256" - } - ], - "name": "VaultInsufficientBalance", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "vault", - "type": "address" - } - ], - "name": "VaultIsDisconnecting", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "internalType": "uint256", - "name": "totalValue", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "liabilityShares", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "newRebalanceThresholdBP", - "type": "uint256" - } - ], - "name": "VaultMintingCapacityExceeded", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "vault", - "type": "address" - } - ], - "name": "VaultNotFactoryDeployed", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "vault", - "type": "address" - } - ], - "name": "VaultOssified", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "vault", - "type": "address" - } - ], - "name": "VaultReportStale", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroAddress", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroArgument", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroPauseDuration", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "vaultDonor", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "vaultAcceptor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "badDebtShares", - "type": "uint256" - } - ], - "name": "BadDebtSocialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "badDebtShares", - "type": "uint256" - } - ], - "name": "BadDebtWrittenOffToBeInternalized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "pauseIntent", - "type": "bool" - } - ], - "name": "BeaconChainDepositsPauseIntentSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountOfShares", - "type": "uint256" - } - ], - "name": "BurnedSharesOnVault", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "pubkeys", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "address", - "name": "refundRecipient", - "type": "address" - } - ], - "name": "ForcedValidatorExitTriggered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "transferred", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "cumulativeLidoFees", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "settledLidoFees", - "type": "uint256" - } - ], - "name": "LidoFeesSettled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountOfShares", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "lockedAmount", - "type": "uint256" - } - ], - "name": "MintedSharesOnVault", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "duration", - "type": "uint256" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "Resumed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "shareLimit", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reserveRatioBP", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "forcedRebalanceThresholdBP", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "infraFeeBP", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "liquidityFeeBP", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reservationFeeBP", - "type": "uint256" - } - ], - "name": "VaultConnected", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "nodeOperator", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "shareLimit", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reserveRatioBP", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "forcedRebalanceThresholdBP", - "type": "uint256" - } - ], - "name": "VaultConnectionUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "slashingReserve", - "type": "uint256" - } - ], - "name": "VaultDisconnectAborted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "vault", - "type": "address" - } - ], - "name": "VaultDisconnectCompleted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "vault", - "type": "address" - } - ], - "name": "VaultDisconnectInitiated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "preInfraFeeBP", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "preLiquidityFeeBP", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "preReservationFeeBP", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "infraFeeBP", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "liquidityFeeBP", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reservationFeeBP", - "type": "uint256" - } - ], - "name": "VaultFeesUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "indexed": false, - "internalType": "int256", - "name": "inOutDelta", - "type": "int256" - } - ], - "name": "VaultInOutDeltaUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "oldOwner", - "type": "address" - } - ], - "name": "VaultOwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "sharesBurned", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "etherWithdrawn", - "type": "uint256" - } - ], - "name": "VaultRebalanced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redemptionShares", - "type": "uint256" - } - ], - "name": "VaultRedemptionSharesUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reportTimestamp", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reportTotalValue", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "reportInOutDelta", - "type": "int256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reportCumulativeLidoFees", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reportLiabilityShares", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reportMaxLiabilityShares", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reportSlashingReserve", - "type": "uint256" - } - ], - "name": "VaultReportApplied", - "type": "event" - }, - { - "inputs": [], - "name": "BAD_DEBT_MASTER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "CONNECT_DEPOSIT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "CONSENSUS_CONTRACT", - "outputs": [ - { - "internalType": "contract IHashConsensus", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LIDO", - "outputs": [ - { - "internalType": "contract ILido", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LIDO_LOCATOR", - "outputs": [ - { - "internalType": "contract ILidoLocator", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_RELATIVE_SHARE_LIMIT_BP", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PAUSE_INFINITELY", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PAUSE_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "REDEMPTION_MASTER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "REPORT_FRESHNESS_DELTA", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "RESUME_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "VALIDATOR_EXIT_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "VAULT_MASTER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_reportTimestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_reportTotalValue", - "type": "uint256" - }, - { - "internalType": "int256", - "name": "_reportInOutDelta", - "type": "int256" - }, - { - "internalType": "uint256", - "name": "_reportCumulativeLidoFees", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_reportLiabilityShares", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_reportMaxLiabilityShares", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_reportSlashingReserve", - "type": "uint256" - } - ], - "name": "applyVaultReport", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "badDebtToInternalize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amountOfShares", - "type": "uint256" - } - ], - "name": "burnShares", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - }, - { - "internalType": "address", - "name": "_token", - "type": "address" - }, - { - "internalType": "address", - "name": "_recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "collectERC20FromVault", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "name": "connectVault", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_amountOfShares", - "type": "uint256" - } - ], - "name": "decreaseInternalizedBadDebt", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "name": "disconnect", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "name": "forceRebalance", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_pubkeys", - "type": "bytes" - }, - { - "internalType": "address", - "name": "_refundRecipient", - "type": "address" - } - ], - "name": "forceValidatorExit", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "name": "fund", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "getResumeSinceTimestamp", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMembers", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "name": "healthShortfallShares", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_admin", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_badDebtVault", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_maxSharesToInternalize", - "type": "uint256" - } - ], - "name": "internalizeBadDebt", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "isPaused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "name": "isPendingDisconnect", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "name": "isReportFresh", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "name": "isVaultConnected", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "name": "isVaultHealthy", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "name": "latestReport", - "outputs": [ - { - "components": [ - { - "internalType": "uint104", - "name": "totalValue", - "type": "uint104" - }, - { - "internalType": "int104", - "name": "inOutDelta", - "type": "int104" - }, - { - "internalType": "uint48", - "name": "timestamp", - "type": "uint48" - } - ], - "internalType": "struct VaultHub.Report", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "name": "liabilityShares", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "name": "locked", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "name": "maxLockableValue", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - }, - { - "internalType": "address", - "name": "_recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amountOfShares", - "type": "uint256" - } - ], - "name": "mintShares", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "name": "obligations", - "outputs": [ - { - "internalType": "uint256", - "name": "sharesToBurn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "feesToSettle", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "name": "obligationsShortfallValue", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "name": "pauseBeaconChainDeposits", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_duration", - "type": "uint256" - } - ], - "name": "pauseFor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_pauseUntilInclusive", - "type": "uint256" - } - ], - "name": "pauseUntil", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - }, - { - "components": [ - { - "internalType": "bytes32[]", - "name": "proof", - "type": "bytes32[]" - }, - { - "internalType": "bytes", - "name": "pubkey", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "validatorIndex", - "type": "uint256" - }, - { - "internalType": "uint64", - "name": "childBlockTimestamp", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "slot", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "proposerIndex", - "type": "uint64" - } - ], - "internalType": "struct IPredepositGuarantee.ValidatorWitness", - "name": "_witness", - "type": "tuple" - } - ], - "name": "proveUnknownValidatorToPDG", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_shares", - "type": "uint256" - } - ], - "name": "rebalance", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "callerConfirmation", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_pubkeys", - "type": "bytes" - } - ], - "name": "requestValidatorExit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "resume", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "name": "resumeBeaconChainDeposits", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_liabilitySharesTarget", - "type": "uint256" - } - ], - "name": "setLiabilitySharesTarget", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "name": "settleLidoFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "name": "settleableLidoFeesValue", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_badDebtVault", - "type": "address" - }, - { - "internalType": "address", - "name": "_vaultAcceptor", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_maxSharesToSocialize", - "type": "uint256" - } - ], - "name": "socializeBadDebt", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - }, - { - "internalType": "int256", - "name": "_deltaValue", - "type": "int256" - } - ], - "name": "totalMintingCapacityShares", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "name": "totalValue", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amountOfShares", - "type": "uint256" - } - ], - "name": "transferAndBurnShares", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - }, - { - "internalType": "address", - "name": "_newOwner", - "type": "address" - } - ], - "name": "transferVaultOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_pubkeys", - "type": "bytes" - }, - { - "internalType": "uint64[]", - "name": "_amountsInGwei", - "type": "uint64[]" - }, - { - "internalType": "address", - "name": "_refundRecipient", - "type": "address" - } - ], - "name": "triggerValidatorWithdrawals", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_shareLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_reserveRatioBP", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_forcedRebalanceThresholdBP", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_infraFeeBP", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_liquidityFeeBP", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_reservationFeeBP", - "type": "uint256" - } - ], - "name": "updateConnection", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_index", - "type": "uint256" - } - ], - "name": "vaultByIndex", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "name": "vaultConnection", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "uint96", - "name": "shareLimit", - "type": "uint96" - }, - { - "internalType": "uint96", - "name": "vaultIndex", - "type": "uint96" - }, - { - "internalType": "uint48", - "name": "disconnectInitiatedTs", - "type": "uint48" - }, - { - "internalType": "uint16", - "name": "reserveRatioBP", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "forcedRebalanceThresholdBP", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "infraFeeBP", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "liquidityFeeBP", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "reservationFeeBP", - "type": "uint16" - }, - { - "internalType": "bool", - "name": "beaconChainDepositsPauseIntent", - "type": "bool" - } - ], - "internalType": "struct VaultHub.VaultConnection", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "name": "vaultRecord", - "outputs": [ - { - "components": [ - { - "components": [ - { - "internalType": "uint104", - "name": "totalValue", - "type": "uint104" - }, - { - "internalType": "int104", - "name": "inOutDelta", - "type": "int104" - }, - { - "internalType": "uint48", - "name": "timestamp", - "type": "uint48" - } - ], - "internalType": "struct VaultHub.Report", - "name": "report", - "type": "tuple" - }, - { - "internalType": "uint96", - "name": "maxLiabilityShares", - "type": "uint96" - }, - { - "internalType": "uint96", - "name": "liabilityShares", - "type": "uint96" - }, - { - "components": [ - { - "internalType": "int104", - "name": "value", - "type": "int104" - }, - { - "internalType": "int104", - "name": "valueOnRefSlot", - "type": "int104" - }, - { - "internalType": "uint48", - "name": "refSlot", - "type": "uint48" - } - ], - "internalType": "struct DoubleRefSlotCache.Int104WithCache[2]", - "name": "inOutDelta", - "type": "tuple[2]" - }, - { - "internalType": "uint128", - "name": "minimalReserve", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "redemptionShares", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "cumulativeLidoFees", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "settledLidoFees", - "type": "uint128" - } - ], - "internalType": "struct VaultHub.VaultRecord", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "vaultsCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "name": "voluntaryDisconnect", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - }, - { - "internalType": "address", - "name": "_recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_ether", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "name": "withdrawableValue", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ] diff --git a/scripts/upgrade_2025_12_15_mainnet_v3.py b/scripts/upgrade_2025_12_15_mainnet_v3.py deleted file mode 100644 index b9b0a4c69..000000000 --- a/scripts/upgrade_2025_12_15_mainnet_v3.py +++ /dev/null @@ -1,136 +0,0 @@ -""" -# Vote 2025_12_15 - -=== 1. DG PROPOSAL === -1.1. Check execution time window (14:00–23:00 UTC) -1.2. Call V3Template.startUpgrade() -1.3. Upgrade LidoLocator implementation -1.4. Grant APP_MANAGER_ROLE to Agent -1.5. Set Lido implementation in Aragon Kernel -1.6. Revoke APP_MANAGER_ROLE from Agent -1.7. Revoke REQUEST_BURN_SHARES_ROLE from Lido on old Burner -1.8. Revoke REQUEST_BURN_SHARES_ROLE from Curated Module on old Burner -1.9. Revoke REQUEST_BURN_SHARES_ROLE from SimpleDVT on old Burner -1.10. Revoke REQUEST_BURN_SHARES_ROLE from CSM Accounting on old Burner -1.11. Upgrade AccountingOracle implementation -1.12. Revoke REPORT_REWARDS_MINTED_ROLE from Lido on StakingRouter -1.13. Grant REPORT_REWARDS_MINTED_ROLE to Accounting on StakingRouter -1.14. Grant CONFIG_MANAGER_ROLE to Agent on OracleDaemonConfig -1.15. Set SLASHING_RESERVE_WE_RIGHT_SHIFT in OracleDaemonConfig -1.16. Set SLASHING_RESERVE_WE_LEFT_SHIFT in OracleDaemonConfig -1.17. Revoke CONFIG_MANAGER_ROLE from Agent on OracleDaemonConfig -1.18. Grant PAUSE_ROLE to Agent -1.19. Pause PredepositGuarantee -1.20. Revoke PAUSE_ROLE from Agent -1.21. Call V3Template.finishUpgrade() - -=== NON-DG ITEMS === -2. Add AlterTiersInOperatorGrid factory to Easy Track (permissions: operatorGrid.alterTiers) -3. Add RegisterGroupsInOperatorGrid factory to Easy Track (permissions: operatorGrid.registerGroup, operatorGrid.registerTiers) -4. Add RegisterTiersInOperatorGrid factory to Easy Track (permissions: operatorGrid.registerTiers) -5. Add UpdateGroupsShareLimitInOperatorGrid factory to Easy Track (permissions: operatorGrid.updateGroupShareLimit) -6. Add SetJailStatusInOperatorGrid factory to Easy Track (permissions: vaultsAdapter.setVaultJailStatus) -7. Add UpdateVaultsFeesInOperatorGrid factory to Easy Track (permissions: vaultsAdapter.updateVaultFees) -8. Add ForceValidatorExitsInVaultHub factory to Easy Track (permissions: vaultsAdapter.forceValidatorExit) -9. Add SocializeBadDebtInVaultHub factory to Easy Track (permissions: vaultsAdapter.socializeBadDebt) - -# TODO (after vote) Vote #{vote number} passed & executed on ${date+time}, block ${blockNumber}. -""" - -from typing import Dict, List, Tuple - -from utils.voting import bake_vote_items, confirm_vote_script, create_vote -from utils.ipfs import upload_vote_ipfs_description, calculate_vote_ipfs_description -from utils.config import get_deployer_account, get_is_live, get_priority_fee -from utils.mainnet_fork import pass_and_exec_dao_vote -from utils.dual_governance import submit_proposals -from brownie import interface - - -# ============================== Addresses =================================== -OMNIBUS_CONTRACT = "0xE1F4c16908fCE6935b5Ad38C6e3d58830fe86442" - - -# ============================= Description ================================== -IPFS_DESCRIPTION = """ -**Activate Lido V3: Phase 1 (Soft Launch)** — a major upgrade to the Lido protocol introduces non-custodial, over-collateralized staking vaults (“stVaults”) that enable stakers to opt into specific operators or strategies while still minting stETH. The Lido V3 design and implementation follow the DAO-approved [Snapshot](https://snapshot.box/#/s:lido-snapshot.eth/proposal/0x01cd474645cc7c3ddf68314d475d421ef833499297f508fee5f7411fafff3954). Phase 1 is intentionally [proposed in a constrained soft launch](https://research.lido.fi/t/lido-v3-design-implementation-proposal/10665/8) mode to enable early adopters and partners while maintaining a conservative security posture. - -Deployment verification: [MixBytes](https://github.com/lidofinance/audits/blob/main/MixBytes%20Lido%20V3%20Security%20Audit%20Report%20-%2012-2025.pdf) | Formal verification: [Certora](https://github.com/lidofinance/audits/blob/main/Certora%20Lido%20V3%20Formal%20Verification%20Report%20-%2012-2025.pdf) | Audits: [MixBytes](https://github.com/lidofinance/audits/blob/main/MixBytes%20Lido%20V3%20Security%20Audit%20Report%20-%2012-2025.pdf), [Certora](https://github.com/lidofinance/audits/blob/main/Certora%20Lido%20V3%20Audit%20Report%20-%2012-2025.pdf), [Consensys Diligence](https://github.com/lidofinance/audits/blob/main/Consensys%20Diligence%20Lido%20V3%20Security%20Audit%20-%2011-2025.pdf) | Offchain audits: [Certora](https://github.com/lidofinance/audits/blob/main/Certora%20Lido%20V3%20Oracle%20V7%20Audit%20Report%20-%2012-2025.pdf), [Composable Security](https://github.com/lidofinance/audits/blob/main/Composable%20Security%20Lido%20V3%20Oracle%20V7%20Audit%20Report%20-%2012-2025.pdf) - -[Dual Governance Items](https://research.lido.fi/t/lido-v3-design-implementation-proposal/10665/5#p-23638-part-2-dual-governance-items-21-items-subject-to-dg-veto-period-27) -- Ensure DG proposal execution occurs during the monitored time window and aligns with oracle reports. Item 1.1. -- Lock upgrade window and validate network state. Item 1.2. -- Upgrade proxy implementations, reassign roles and permissions, configure oracle slashing parameters. Items 1.3-1.17. -- Disable Predeposit Guarantee guided deposit flows as a part of [Soft Launch](https://research.lido.fi/t/lido-v3-design-implementation-proposal/10665/9). Items 1.18-1.20. -- Finalize upgrade and validate Lido V3 activation state. Item 1.21. - -[Voting Items](https://research.lido.fi/t/lido-v3-design-implementation-proposal/10665/5#p-23638-part-1-voting-items-8-items-execute-immediately-26) -- Add Easy Track factories enabling [stVault Committee](https://docs.lido.fi/multisigs/committees#216-stvaults-committee) to configure VaultHub and OperatorGrid contracts. Items 2–9.""" -DG_PROPOSAL_DESCRIPTION = "Activate Lido V3: Phase 1 (Soft Launch)" -DG_SUBMISSION_DESCRIPTION = "1. Submit a Dual Governance proposal to activate Lido V3: Phase 1 (Soft Launch)" - - -# ================================ Main ====================================== -def get_vote_items() -> Tuple[List[str], List[Tuple[str, str]]]: - vote_desc_items = [] - call_script_items = [] - - # 1. receive DG vote items from omnibus contract - contract_dg_items = interface.V3LaunchOmnibus(OMNIBUS_CONTRACT).getVoteItems() - - dg_items = [] - for _, call_script in contract_dg_items: - dg_items.append((call_script[0], call_script[1].hex())) - - dg_call_script = submit_proposals([ - (dg_items, DG_PROPOSAL_DESCRIPTION) - ]) - - vote_desc_items.append(DG_SUBMISSION_DESCRIPTION) - call_script_items.append(dg_call_script[0]) - - # 2. receive non-DG vote items from omnibus contract - voting_items = interface.V3LaunchOmnibus(OMNIBUS_CONTRACT).getVotingVoteItems() - - for desc, call_script in voting_items: - vote_desc_items.append(desc) - call_script_items.append((call_script[0], call_script[1].hex())) - - return vote_desc_items, call_script_items - - -def start_vote(tx_params: Dict[str, str], silent: bool = False): - vote_desc_items, call_script_items = get_vote_items() - vote_items = bake_vote_items(list(vote_desc_items), list(call_script_items)) - - desc_ipfs = ( - calculate_vote_ipfs_description(IPFS_DESCRIPTION) - if silent else upload_vote_ipfs_description(IPFS_DESCRIPTION) - ) - - vote_id, tx = confirm_vote_script(vote_items, silent, desc_ipfs) and list( - create_vote(vote_items, tx_params, desc_ipfs=desc_ipfs) - ) - - assert interface.V3LaunchOmnibus(OMNIBUS_CONTRACT).isValidVoteScript(vote_id, DG_PROPOSAL_DESCRIPTION) - - return vote_id, tx - - -def main(): - tx_params: Dict[str, str] = {"from": get_deployer_account().address} - if get_is_live(): - tx_params["priority_fee"] = get_priority_fee() - - vote_id, _ = start_vote(tx_params=tx_params, silent=False) - vote_id >= 0 and print(f"Vote created: {vote_id}.") - - -def start_and_execute_vote_on_fork_manual(): - if get_is_live(): - raise Exception("This script is for local testing only.") - - tx_params = {"from": get_deployer_account()} - vote_id, _ = start_vote(tx_params=tx_params, silent=True) - print(f"Vote created: {vote_id}.") - pass_and_exec_dao_vote(int(vote_id), step_by_step=True) diff --git a/tests/acceptance/test_accounting_oracle.py b/tests/acceptance/test_accounting_oracle.py index a0459ee6e..919b48287 100644 --- a/tests/acceptance/test_accounting_oracle.py +++ b/tests/acceptance/test_accounting_oracle.py @@ -29,7 +29,9 @@ def test_proxy(contract): def test_constants(contract): + assert contract.LIDO() == contracts.lido assert contract.LOCATOR() == contracts.lido_locator + assert contract.LEGACY_ORACLE() == contracts.legacy_oracle assert contract.EXTRA_DATA_FORMAT_EMPTY() == 0 assert contract.EXTRA_DATA_FORMAT_LIST() == 1 assert contract.EXTRA_DATA_TYPE_STUCK_VALIDATORS() == 1 @@ -39,15 +41,22 @@ def test_constants(contract): def test_versioned(contract): - assert contract.getContractVersion() == 4 + assert contract.getContractVersion() == 3 def test_initialize(contract): - with reverts("NonZeroContractVersionOnInit: "): + with reverts(encode_error("IncorrectOracleMigration(uint256)", [2])): contract.initialize( contract.getRoleMember(contract.DEFAULT_ADMIN_ROLE(), 0), HASH_CONSENSUS_FOR_AO, - AO_CONSENSUS_VERSION, + 1, + {"from": contracts.voting}, + ) + with reverts(encode_error("NonZeroContractVersionOnInit()")): + contract.initializeWithoutMigration( + contract.getRoleMember(contract.DEFAULT_ADMIN_ROLE(), 0), + HASH_CONSENSUS_FOR_AO, + 1, 1, {"from": contracts.voting}, ) @@ -55,11 +64,18 @@ def test_initialize(contract): def test_petrified(contract): impl = interface.AccountingOracle(ACCOUNTING_ORACLE_IMPL) - with reverts("NonZeroContractVersionOnInit: "): + with reverts(encode_error("IncorrectOracleMigration(uint256)", [2])): impl.initialize( contract.getRoleMember(contract.DEFAULT_ADMIN_ROLE(), 0), HASH_CONSENSUS_FOR_AO, - AO_CONSENSUS_VERSION, + 1, + {"from": contracts.voting}, + ) + with reverts(encode_error("NonZeroContractVersionOnInit()")): + impl.initializeWithoutMigration( + contract.getRoleMember(contract.DEFAULT_ADMIN_ROLE(), 0), + HASH_CONSENSUS_FOR_AO, + 1, 1, {"from": contracts.voting}, ) diff --git a/tests/acceptance/test_accounting_oracle_negative.py b/tests/acceptance/test_accounting_oracle_negative.py index 7c80a19d1..7e175e672 100644 --- a/tests/acceptance/test_accounting_oracle_negative.py +++ b/tests/acceptance/test_accounting_oracle_negative.py @@ -184,12 +184,12 @@ def test_setConsensusContract(accounting_oracle: Contract, aragon_agent: Account def test_finalize_upgrade(accounting_oracle: Contract, stranger: Account): with reverts(encode_error("InvalidContractVersionIncrement()")): - accounting_oracle.finalizeUpgrade_v4( + accounting_oracle.finalizeUpgrade_v2( 1, {"from": stranger}, ) with reverts(encode_error("InvalidContractVersionIncrement()")): - accounting_oracle.finalizeUpgrade_v4( + accounting_oracle.finalizeUpgrade_v2( 2, {"from": stranger}, ) diff --git a/tests/acceptance/test_burner.py b/tests/acceptance/test_burner.py index 95234854f..31913dde2 100644 --- a/tests/acceptance/test_burner.py +++ b/tests/acceptance/test_burner.py @@ -15,5 +15,5 @@ def contract() -> interface.Burner: def test_links(contract): - assert contract.LIDO() == contracts.lido - assert contract.LOCATOR() == contracts.lido_locator + assert contract.STETH() == contracts.lido + assert contract.TREASURY() == contracts.agent diff --git a/tests/acceptance/test_legacy_oracle.py b/tests/acceptance/test_legacy_oracle.py new file mode 100644 index 000000000..49848227c --- /dev/null +++ b/tests/acceptance/test_legacy_oracle.py @@ -0,0 +1,89 @@ +import pytest +from brownie import ZERO_ADDRESS, interface, chain, reverts # type: ignore + +from utils.config import ( + contracts, + LEGACY_ORACLE, + LEGACY_ORACLE_IMPL, + HASH_CONSENSUS_FOR_AO, + ACCOUNTING_ORACLE, + ORACLE_ARAGON_APP_ID, + ARAGON_EVMSCRIPT_REGISTRY, + CHAIN_SLOTS_PER_EPOCH, + CHAIN_SECONDS_PER_SLOT, + CHAIN_GENESIS_TIME, + AO_EPOCHS_PER_FRAME, +) + +lastSeenTotalPooledEther = 5879742251110033487920093 + +@pytest.fixture(scope="module") +def contract() -> interface.LegacyOracle: + return interface.LegacyOracle(LEGACY_ORACLE) + + +def test_links(contract): + assert contract.getLido() == contracts.lido + assert contract.getAccountingOracle() == contracts.accounting_oracle + assert contract.getEVMScriptRegistry() == ARAGON_EVMSCRIPT_REGISTRY + + +def test_aragon(contract): + proxy = interface.AppProxyUpgradeable(contract) + assert proxy.implementation() == LEGACY_ORACLE_IMPL + assert contract.kernel() == contracts.kernel + assert contract.appId() == ORACLE_ARAGON_APP_ID + assert contract.hasInitialized() == True + assert contract.isPetrified() == False + + +def test_versioned(contract): + assert contract.getContractVersion() == 4 + + +def test_initialize(contract): + with reverts("INIT_ALREADY_INITIALIZED"): + contract.initialize(contracts.lido_locator, HASH_CONSENSUS_FOR_AO, {"from": contracts.voting}) + + +def test_finalize_upgrade(contract): + with reverts("WRONG_BASE_VERSION"): + contract.finalizeUpgrade_v4(ACCOUNTING_ORACLE, {"from": contracts.voting}) + + +def test_petrified(): + impl = interface.LegacyOracle(LEGACY_ORACLE_IMPL) + with reverts("INIT_ALREADY_INITIALIZED"): + impl.initialize(contracts.lido_locator, HASH_CONSENSUS_FOR_AO, {"from": contracts.voting}) + + with reverts("WRONG_BASE_VERSION"): + impl.finalizeUpgrade_v4(ACCOUNTING_ORACLE, {"from": contracts.voting}) + + +def test_recoverability(contract): + assert contract.getRecoveryVault() == ZERO_ADDRESS + assert contract.allowRecoverability(contracts.ldo_token) == True + + +def test_legacy_oracle_state(contract): + reported_delta = contract.getLastCompletedReportDelta() + assert reported_delta["postTotalPooledEther"] > lastSeenTotalPooledEther + assert reported_delta["preTotalPooledEther"] >= lastSeenTotalPooledEther + assert reported_delta["timeElapsed"] >= 86400 + + current_frame = contract.getCurrentFrame() + assert current_frame["frameEpochId"] > 0 + assert current_frame["frameStartTime"] > 0 + assert current_frame["frameEndTime"] > 0 + + assert contract.getLastCompletedEpochId() > 0 + + assert contract.getInitializationBlock() > 0 + assert contract.getInitializationBlock() <= chain.height + + oracle_beacon_spec = contracts.legacy_oracle.getBeaconSpec() + + assert oracle_beacon_spec["epochsPerFrame"] == AO_EPOCHS_PER_FRAME + assert oracle_beacon_spec["slotsPerEpoch"] == CHAIN_SLOTS_PER_EPOCH + assert oracle_beacon_spec["secondsPerSlot"] == CHAIN_SECONDS_PER_SLOT + assert oracle_beacon_spec["genesisTime"] == CHAIN_GENESIS_TIME diff --git a/tests/acceptance/test_lido.py b/tests/acceptance/test_lido.py index d348e9026..0ac485621 100644 --- a/tests/acceptance/test_lido.py +++ b/tests/acceptance/test_lido.py @@ -45,7 +45,7 @@ def test_pausable(contract): def test_versioned(contract): - assert contract.getContractVersion() == 3 + assert contract.getContractVersion() == 2 def test_initialize(contract): @@ -55,7 +55,7 @@ def test_initialize(contract): def test_finalize_upgrade(contract): with reverts("UNEXPECTED_CONTRACT_VERSION"): - contract.finalizeUpgrade_v3(contracts.burner, [contracts.eip712_steth], 0, {"from": contracts.voting}) + contract.finalizeUpgrade_v2(contracts.lido_locator, contracts.eip712_steth, {"from": contracts.voting}) def test_petrified(): @@ -63,11 +63,8 @@ def test_petrified(): with reverts("INIT_ALREADY_INITIALIZED"): impl.initialize(contracts.lido_locator, contracts.eip712_steth, {"from": contracts.voting}) - # For petrified implementation, hasInitialized() returns false because - # AragonApp (LIDO) sets initializationBlock to PETRIFIED_BLOCK = uint256(-1) - # and hasInitialized() requires getBlockNumber() >= initializationBlock. - with reverts("NOT_INITIALIZED"): - impl.finalizeUpgrade_v3(contracts.burner, [contracts.eip712_steth], 0, {"from": contracts.voting}) + with reverts("UNEXPECTED_CONTRACT_VERSION"): + impl.finalizeUpgrade_v2(contracts.lido_locator, contracts.eip712_steth, {"from": contracts.voting}) def test_links(contract): @@ -95,7 +92,7 @@ def test_lido_state(contract): for module in modules ) - assert stake_limit["isStakingPaused_"] == False + assert stake_limit["isStakingPaused"] == False assert stake_limit["isStakingLimitSet"] == True assert stake_limit["maxStakeLimit"] == LIDO_MAX_STAKE_LIMIT_ETH * ONE_ETH diff --git a/tests/acceptance/test_locator.py b/tests/acceptance/test_locator.py index b39619003..e4e22a68a 100644 --- a/tests/acceptance/test_locator.py +++ b/tests/acceptance/test_locator.py @@ -19,6 +19,7 @@ def test_addresses(contract): assert contract.accountingOracle() == contracts.accounting_oracle assert contract.depositSecurityModule() == contracts.deposit_security_module assert contract.elRewardsVault() == contracts.execution_layer_rewards_vault + assert contract.legacyOracle() == contracts.legacy_oracle assert contract.lido() == contracts.lido assert contract.oracleReportSanityChecker() == contracts.oracle_report_sanity_checker assert contract.postTokenRebaseReceiver() == contracts.token_rate_notifier @@ -39,12 +40,12 @@ def test_addresses(contract): contracts.withdrawal_vault, ) - assert contract.oracleReportComponents() == ( + assert contract.oracleReportComponentsForLido() == ( contracts.accounting_oracle, + contracts.execution_layer_rewards_vault, contracts.oracle_report_sanity_checker, contracts.burner, contracts.withdrawal_queue, + contracts.withdrawal_vault, contracts.token_rate_notifier, - contracts.staking_router, - contracts.vault_hub, ) diff --git a/tests/regression/test_csm.py b/tests/regression/test_csm.py index 151c626b2..a16bcf854 100644 --- a/tests/regression/test_csm.py +++ b/tests/regression/test_csm.py @@ -88,45 +88,29 @@ def ejector(): def strikes(): return contracts.cs_strikes -@pytest.fixture(params=[pytest.param(1, id="1 key")]) -def keys_count(request): - return request.param @pytest.fixture -def depositable_node_operator(keys_count, csm, accounting, permissionless_gate, stranger): - return _depositable_node_operator(keys_count, csm, accounting, permissionless_gate, stranger) - - -def _depositable_node_operator(keys_count, csm, accounting, permissionless_gate, stranger): +def depositable_node_operator(csm, accounting, permissionless_gate, stranger): increase_staking_module_share(module_id=CSM_MODULE_ID, share_multiplier=2) csm.cleanDepositQueue(2 * csm.getNonce(), {"from": stranger.address}) - keys_to_deposit = 0 for queue_priority in range(0, 6): deposit_batch = csm.depositQueueItem(queue_priority, csm.depositQueuePointers(queue_priority)["head"]) if deposit_batch: node_operator_id = (deposit_batch >> 192) & ((1 << 64) - 1) - batch_keys_count = (deposit_batch >> 128) & ((1 << 64) - 1) - if batch_keys_count >= keys_count: - break + keys_count = (deposit_batch >> 128) & ((1 << 64) - 1) + break else: address = accounts[7].address + keys_count = 5 node_operator_id = csm_add_node_operator(csm, permissionless_gate, accounting, address, keys_count=keys_count) - return node_operator_id, keys_to_deposit + return node_operator_id, keys_count -@pytest.fixture() -def node_operator(keys_count, csm, accounting, permissionless_gate, stranger) -> int: - total_node_operators = contracts.csm.getNodeOperatorsCount() - for no_id in range(0, total_node_operators): - no = csm.getNodeOperator(no_id) - if no["totalDepositedKeys"] - no["totalWithdrawnKeys"] >= keys_count: - return no_id - - # Fallback: use _depositable_node_operator - node_operator, required_deposits = _depositable_node_operator(keys_count, csm, accounting, permissionless_gate, stranger) - to_deposit = required_deposits + keys_count - fill_deposit_buffer(to_deposit) - contracts.lido.deposit(to_deposit, CSM_MODULE_ID, "0x", {"from": contracts.deposit_security_module}) +@pytest.fixture +def node_operator(depositable_node_operator, csm, accounting) -> int: + node_operator, keys_count = depositable_node_operator + fill_deposit_buffer(keys_count) + contracts.lido.deposit(keys_count, CSM_MODULE_ID, "0x", {"from": contracts.deposit_security_module}) return node_operator @@ -210,12 +194,11 @@ def test_add_node_operator_permissionless(csm, permissionless_gate, accounting, @pytest.mark.usefixtures("pause_modules") -def test_deposit(depositable_node_operator, csm, remove_stake_limit, keys_count): - (node_operator, required_deposits) = depositable_node_operator - to_deposit = required_deposits + keys_count - fill_deposit_buffer(to_deposit) +def test_deposit(depositable_node_operator, csm, remove_stake_limit): + (node_operator, keys_count) = depositable_node_operator + fill_deposit_buffer(keys_count) total_deposited_before = csm.getNodeOperator(node_operator)["totalDepositedKeys"] - contracts.lido.deposit(to_deposit, CSM_MODULE_ID, "0x", {"from": contracts.deposit_security_module}) + contracts.lido.deposit(keys_count, CSM_MODULE_ID, "0x", {"from": contracts.deposit_security_module}) no = csm.getNodeOperator(node_operator) assert no["totalDepositedKeys"] == total_deposited_before + keys_count @@ -246,8 +229,7 @@ def test_csm_target_limits(csm, node_operator): def test_csm_report_exited(csm, node_operator, extra_data_service): total_exited = csm.getStakingModuleSummary()["totalExitedValidators"] - no = csm.getNodeOperator(node_operator) - exited_keys = no["totalExitedKeys"] + 1 + exited_keys = 5 extra_data = extra_data_service.collect({(CSM_MODULE_ID, node_operator): exited_keys}, exited_keys, exited_keys) oracle_report( extraDataFormat=1, @@ -262,13 +244,13 @@ def test_csm_report_exited(csm, node_operator, extra_data_service): assert no["totalExitedKeys"] == exited_keys -@pytest.mark.usefixtures("pause_modules") -def test_csm_get_staking_module_summary(csm, accounting, node_operator, extra_data_service, remove_stake_limit, permissionless_gate, stranger): +def test_csm_get_staking_module_summary(csm, accounting, node_operator, extra_data_service, remove_stake_limit): + (exited_before, deposited_before, depositable_before) = contracts.staking_router.getStakingModuleSummary( + CSM_MODULE_ID + ) # Assure there are new exited keys - (exited_before, _, _) = contracts.staking_router.getStakingModuleSummary(CSM_MODULE_ID) - no = csm.getNodeOperator(node_operator) - exited_keys = no["totalExitedKeys"] + 1 + exited_keys = 5 extra_data = extra_data_service.collect({(CSM_MODULE_ID, node_operator): exited_keys}, exited_keys, exited_keys) oracle_report( extraDataFormat=1, @@ -280,23 +262,20 @@ def test_csm_get_staking_module_summary(csm, accounting, node_operator, extra_da ) # Assure there are new deposited keys - keys_to_deposit = 2 - depositable_no, required_deposits = _depositable_node_operator(keys_to_deposit, csm, accounting, permissionless_gate, stranger) - (_, deposited_before, _) = contracts.staking_router.getStakingModuleSummary(CSM_MODULE_ID) - to_deposit = required_deposits + keys_to_deposit - fill_deposit_buffer(to_deposit) - contracts.lido.deposit(to_deposit, CSM_MODULE_ID, "0x", {"from": contracts.deposit_security_module}) + deposits_count = 3 + new_keys = 5 + new_depositable = new_keys - deposits_count + csm_upload_keys(csm, accounting, node_operator, new_keys) + increase_staking_module_share(module_id=CSM_MODULE_ID, share_multiplier=2) - # Assure there are new depositable keys - (_, _, depositable_before) = contracts.staking_router.getStakingModuleSummary(CSM_MODULE_ID) - new_depositable = 5 - csm_upload_keys(csm, accounting, node_operator, new_depositable) + fill_deposit_buffer(deposits_count) + contracts.lido.deposit(deposits_count, CSM_MODULE_ID, "0x", {"from": contracts.deposit_security_module}) (exited_after, deposited_after, depositable_after) = contracts.staking_router.getStakingModuleSummary(CSM_MODULE_ID) assert exited_after == exited_before + exited_keys - assert deposited_after == deposited_before + to_deposit + assert deposited_after == deposited_before + deposits_count assert depositable_after == depositable_before + new_depositable @@ -330,9 +309,7 @@ def test_csm_get_node_operator_summary(csm, node_operator, extra_data_service): def test_csm_decrease_vetted_keys(csm, depositable_node_operator, stranger): - (node_operator, _) = depositable_node_operator - no = csm.getNodeOperator(node_operator) - depositable_keys = no["depositableValidatorsCount"] - no["totalWithdrawnKeys"] + (node_operator, keys_count) = depositable_node_operator total_added_keys = csm.getNodeOperator(node_operator)["totalAddedKeys"] block_number = web3.eth.get_block_number() block = web3.eth.get_block(block_number) @@ -343,7 +320,7 @@ def test_csm_decrease_vetted_keys(csm, depositable_node_operator, stranger): staking_module_id=CSM_MODULE_ID, nonce=staking_module_nonce, node_operator_ids=to_bytes(node_operator, 16), - vetted_signing_keys_counts=to_bytes(total_added_keys - depositable_keys, 32), + vetted_signing_keys_counts=to_bytes(total_added_keys - keys_count, 32), ) set_single_guardian(contracts.deposit_security_module, contracts.agent, stranger) @@ -351,7 +328,7 @@ def test_csm_decrease_vetted_keys(csm, depositable_node_operator, stranger): contracts.deposit_security_module.unvetSigningKeys(*unvet_args.to_tuple(), (0, 0), {"from": stranger.address}) no = csm.getNodeOperator(node_operator) - assert no["totalVettedKeys"] == total_added_keys - depositable_keys + assert no["totalVettedKeys"] == total_added_keys - keys_count def test_csm_penalize_node_operator(csm, accounting, node_operator, helpers): @@ -462,10 +439,8 @@ def test_csm_remove_key(csm, parameters_registry, accounting, node_operator): assert no["totalAddedKeys"] == keys_before - 1 -@pytest.mark.parametrize("keys_count", [pytest.param(2, id="2 keys")], indirect=True) -def test_eject_bad_performer(csm, accounting, ejector, strikes, node_operator, stranger, keys_count): - no = csm.getNodeOperator(node_operator) - index_to_eject = no["totalDepositedKeys"] - 2 +def test_eject_bad_performer(csm, accounting, ejector, strikes, node_operator, stranger): + index_to_eject = 0 pubkey_to_eject = csm.getSigningKeys(node_operator, index_to_eject, 1) leaf_to_eject = (node_operator, pubkey_to_eject, [1, 1, 1, 1, 1, 1]) another_pubkey = csm.getSigningKeys(node_operator, index_to_eject + 1, 1) @@ -509,22 +484,18 @@ def test_eject_bad_performer(csm, accounting, ejector, strikes, node_operator, s def test_voluntary_eject(csm, ejector, node_operator): eject_payment_value = get_sys_fee_to_eject() operator_address = csm.getNodeOperatorOwner(node_operator) - no = csm.getNodeOperator(node_operator) - index_to_eject = no["totalDepositedKeys"] - 1 tx = ejector.voluntaryEject( - node_operator, index_to_eject, 1, ZERO_ADDRESS, {"value": eject_payment_value, "from": operator_address} + node_operator, 0, 1, ZERO_ADDRESS, {"value": eject_payment_value, "from": operator_address} ) assert "TriggeredExitFeeRecorded" not in tx.events def test_report_validator_exit_delay(csm, accounting, parameters_registry, node_operator): + pubkey = csm.getSigningKeys(node_operator, 0, 1) day_in_seconds = 60 * 60 * 24 - no = csm.getNodeOperator(node_operator) - index_to_report = no["totalDepositedKeys"] - 1 - pubkey = csm.getSigningKeys(node_operator, index_to_report, 1) - tx = csm.reportValidatorExitDelay(node_operator, index_to_report, pubkey, 7 * day_in_seconds, {"from": contracts.staking_router}) + tx = csm.reportValidatorExitDelay(node_operator, 0, pubkey, 7 * day_in_seconds, {"from": contracts.staking_router}) assert "ValidatorExitDelayProcessed" in tx.events assert tx.events["ValidatorExitDelayProcessed"]["nodeOperatorId"] == node_operator assert tx.events["ValidatorExitDelayProcessed"]["pubkey"] == pubkey @@ -536,9 +507,7 @@ def test_report_validator_exit_delay(csm, accounting, parameters_registry, node_ def test_on_validator_exit_triggered(csm, node_operator): eject_payment_value = 1 - no = csm.getNodeOperator(node_operator) - index_to_report = no["totalDepositedKeys"] - 1 - pubkey = csm.getSigningKeys(node_operator, index_to_report, 1) + pubkey = csm.getSigningKeys(node_operator, 0, 1) exit_type = 3 tx = csm.onValidatorExitTriggered(node_operator, pubkey, 1, exit_type, {"from": contracts.staking_router}) diff --git a/tests/regression/test_gate_seal.py b/tests/regression/test_gate_seal.py index 98b07daba..c5e05aa36 100644 --- a/tests/regression/test_gate_seal.py +++ b/tests/regression/test_gate_seal.py @@ -24,10 +24,6 @@ CHAIN_SLOTS_PER_EPOCH, CHAIN_SECONDS_PER_SLOT, AO_EPOCHS_PER_FRAME, - VAULT_HUB, - PREDEPOSIT_GUARANTEE, - GATE_SEAL_V3, - RESEAL_MANAGER, ) @@ -46,20 +42,6 @@ def test_gate_seal_expiration(gate_seal_committee): contracts.gate_seal.seal([WITHDRAWAL_QUEUE], {"from": gate_seal_committee}) -def test_gate_seal_v3_expiration(gate_seal_committee): - gate_seal_v3 = interface.GateSeal(GATE_SEAL_V3) - - assert not gate_seal_v3.is_expired() - time = chain.time() - expiry = gate_seal_v3.get_expiry_timestamp() - chain.sleep(expiry - time + 1) - chain.mine(1) - - assert gate_seal_v3.is_expired() - with reverts("gate seal: expired"): - gate_seal_v3.seal(gate_seal_v3.get_sealables(), {"from": gate_seal_committee}) - - def test_gate_seal_twg_veb_expiration(gate_seal_committee): assert not contracts.veb_twg_gate_seal.is_expired() time = chain.time() @@ -345,60 +327,6 @@ def test_gate_seal_twg_veb_scenario(steth_holder, gate_seal_committee, eth_whale assert validator_key == pubkey_hex -def test_gate_seal_v3_vaults_scenario(gate_seal_committee): - gate_seal_v3 = interface.GateSeal(GATE_SEAL_V3) - - assert not gate_seal_v3.is_expired() - - sealables = gate_seal_v3.get_sealables() - assert len(sealables) == 2 - assert contracts.vault_hub.address in sealables - assert contracts.predeposit_guarantee.address in sealables - - pause_duration = gate_seal_v3.get_seal_duration_seconds() - - # TODO remove this after PDG unpause - reseal_manager_account = accounts.at(RESEAL_MANAGER, force=True) - contracts.predeposit_guarantee.resume({"from": reseal_manager_account}) - - assert not contracts.vault_hub.isPaused() - assert not contracts.predeposit_guarantee.isPaused() - - seal_tx = gate_seal_v3.seal(sealables, {"from": gate_seal_committee}) - - assert seal_tx.events.count("Sealed") == len(sealables) - for i, seal_event in enumerate(seal_tx.events["Sealed"]): - assert seal_event["gate_seal"] == gate_seal_v3.address - assert seal_event["sealed_for"] == pause_duration - assert seal_event["sealed_by"] == gate_seal_committee - assert seal_event["sealable"] == sealables[i] - assert seal_event["sealed_at"] == seal_tx.timestamp - - for pause_event in seal_tx.events["Paused"]: - assert pause_event["duration"] == pause_duration - - assert gate_seal_v3.is_expired() - with reverts("gate seal: expired"): - gate_seal_v3.seal(sealables, {"from": gate_seal_committee}) - - assert contracts.vault_hub.isPaused() - assert ( - contracts.vault_hub.getResumeSinceTimestamp() - == seal_tx.timestamp + pause_duration - ) - - assert contracts.predeposit_guarantee.isPaused() - assert ( - contracts.predeposit_guarantee.getResumeSinceTimestamp() - == seal_tx.timestamp + pause_duration - ) - - chain.sleep(pause_duration + 1) - chain.mine(1) - - assert not contracts.vault_hub.isPaused() - assert not contracts.predeposit_guarantee.isPaused() - def _wait_for_next_ref_slot(): wait_to_next_available_report_time(contracts.hash_consensus_for_validators_exit_bus_oracle) ref_slot, _ = contracts.hash_consensus_for_validators_exit_bus_oracle.getCurrentFrame() diff --git a/tests/regression/test_neg_rebase_sanity_checks.py b/tests/regression/test_neg_rebase_sanity_checks.py index e7209ea2e..5f859864b 100644 --- a/tests/regression/test_neg_rebase_sanity_checks.py +++ b/tests/regression/test_neg_rebase_sanity_checks.py @@ -87,8 +87,6 @@ def test_blocked_huge_negative_rebase(oracle_report_sanity_checker): locator = contracts.lido_locator assert oracle_report_sanity_checker.address == locator.oracleReportSanityChecker() - oracle_report() - # Advance the chain 60 days more without accounting oracle reports # The idea is to simplify the calculation of the exited validators for 18 and 54 days ago chain.sleep(60 * 24 * 60 * 60) diff --git a/tests/regression/test_oracle_report_with_notifier.py b/tests/regression/test_oracle_report_with_notifier.py index 5daabf7a2..97868f041 100644 --- a/tests/regression/test_oracle_report_with_notifier.py +++ b/tests/regression/test_oracle_report_with_notifier.py @@ -1,22 +1,16 @@ import pytest from brownie import Contract, accounts, chain, interface, OpStackTokenRatePusherWithSomeErrorStub, web3, reverts from utils.test.oracle_report_helpers import oracle_report -from utils.config import ( - contracts, - get_deployer_account, - network_name, - L1_TOKEN_RATE_NOTIFIER, - WSTETH_TOKEN, - ACCOUNTING_ORACLE, - L1_OPTIMISM_CROSS_DOMAIN_MESSENGER, - L2_OPTIMISM_TOKEN_RATE_ORACLE, -) +from utils.config import contracts, get_deployer_account, network_name from utils.test.helpers import ZERO_ADDRESS, eth_balance from utils.evm_script import encode_error from typing import TypedDict, TypeVar, Any -# Use as mock for L2 TokenRateOracle -L2_TOKEN_RATE_ORACLE = WSTETH_TOKEN +WST_ETH = "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0" +ACCOUNTING_ORACLE = "0x852deD011285fe67063a08005c71a85690503Cee" +L1_TOKEN_RATE_NOTIFIER = "0xe6793B9e4FbA7DE0ee833F9D02bba7DB5EB27823" +L1_CROSS_DOMAIN_MESSENGER = "0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1" +L2_TOKEN_RATE_ORACLE = "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0" @pytest.fixture(scope="module") @@ -43,8 +37,8 @@ def test_oracle_report_revert(): """Test oracle report reverts when messenger is empty""" interface.TokenRateNotifier(L1_TOKEN_RATE_NOTIFIER) # load TokenRateNotifier contract ABI to catch correct error - web3.provider.make_request("hardhat_setCode", [L1_OPTIMISM_CROSS_DOMAIN_MESSENGER, "0x"]) - web3.provider.make_request("evm_setAccountCode", [L1_OPTIMISM_CROSS_DOMAIN_MESSENGER, "0x"]) + web3.provider.make_request("hardhat_setCode", [L1_CROSS_DOMAIN_MESSENGER, "0x"]) + web3.provider.make_request("evm_setAccountCode", [L1_CROSS_DOMAIN_MESSENGER, "0x"]) with reverts(encode_error("ErrorTokenRateNotifierRevertedWithNoData()")): oracle_report(cl_diff=0, report_el_vault=True, report_withdrawals_vault=False) @@ -79,7 +73,7 @@ def test_oracle_report_pushes_rate(): tokenRateOracle = interface.ITokenRateUpdatable(L2_TOKEN_RATE_ORACLE) - wstETH = interface.WstETH(WSTETH_TOKEN) + wstETH = interface.WstETH(WST_ETH) accountingOracle = interface.AccountingOracle(ACCOUNTING_ORACLE) tokenRate = wstETH.getStETHByWstETH(10**27) diff --git a/tests/regression/test_pause_resume.py b/tests/regression/test_pause_resume.py index 902223eca..96cb512ab 100644 --- a/tests/regression/test_pause_resume.py +++ b/tests/regression/test_pause_resume.py @@ -7,7 +7,6 @@ from utils.config import contracts from utils.evm_script import encode_error from utils.import_current_votes import is_there_any_vote_scripts, start_and_execute_votes -from utils.staking_module import calc_module_reward_shares from utils.test.oracle_report_helpers import oracle_report, prepare_exit_bus_report from utils.test.helpers import almostEqEth, almostEqWithDiff @@ -136,6 +135,11 @@ def test_revert_second_stop_resume(self): with brownie.reverts("CONTRACT_IS_ACTIVE"): contracts.lido.resume({"from": contracts.agent}) + @pytest.mark.skip( + reason="Second call of pause/resume staking is not reverted right now." + "It maybe should be fixed in the future to be consistent, " + "there's not a real problem with it." + ) def test_revert_second_pause_resume_staking(self): contracts.lido.pauseStaking({"from": contracts.agent}) @@ -144,7 +148,7 @@ def test_revert_second_pause_resume_staking(self): contracts.lido.resumeStaking({"from": contracts.agent}) - with brownie.reverts("ALREADY_RESUMED"): + with brownie.reverts(""): contracts.lido.resumeStaking({"from": contracts.agent}) def test_revert_second_stop_staking_module(self, helpers, stranger): @@ -214,15 +218,18 @@ def test_stopped_lido_cant_deposit(): contracts.lido.deposit(1, 1, "0x", {"from": contracts.deposit_security_module}), +@pytest.mark.usefixtures("stopped_lido") def test_resumed_staking_can_stake(stranger): - contracts.lido.pauseStaking({"from": contracts.agent}) contracts.lido.resumeStaking({"from": contracts.agent}) stranger.transfer(contracts.lido, DEPOSIT_AMOUNT) + @pytest.mark.usefixtures("stopped_lido") -def test_cant_resume_staking_on_stopped_lido(): - with brownie.reverts("CONTRACT_IS_STOPPED"): - contracts.lido.resumeStaking({"from": contracts.agent}), +def test_resumed_staking_cant_deposit(): + contracts.lido.resumeStaking({"from": contracts.agent}) + + with brownie.reverts("CAN_NOT_DEPOSIT"): + contracts.lido.deposit(1, 1, "0x", {"from": contracts.deposit_security_module}), @pytest.mark.usefixtures("stopped_lido") @@ -268,82 +275,28 @@ def test_paused_staking_module_can_reward(burner: Contract, stranger): contracts.staking_router.setStakingModuleStatus(1, StakingModuleStatus.DepositsPaused, {"from": stranger}) (report_tx, _) = oracle_report() - # print(report_tx.events["TransferShares"]) - - # zero index - mint to accounting contract, 1 index - module, 2 index - simple dvt, 3 index - csm - module_index = 1 - simple_dvt_index = 2 - csm_index = 3 + print(report_tx.events["Transfer"]) + curated_index = 0 + simple_dvt_index = 1 + csm_index = 2 - if report_tx.events["TransferShares"][module_index-1]["to"] == burner.address: - module_index += 1 + if report_tx.events["Transfer"][curated_index]["to"] == burner.address: + curated_index += 1 simple_dvt_index += 1 csm_index += 1 - agent_index = module_index + 3 - assert report_tx.events["TransferShares"][module_index]["to"] == module_address - assert report_tx.events["TransferShares"][module_index]["from"] == contracts.accounting.address - assert report_tx.events["TransferShares"][simple_dvt_index]["to"] == contracts.simple_dvt.address - assert report_tx.events["TransferShares"][simple_dvt_index]["from"] == contracts.accounting.address - assert report_tx.events["TransferShares"][csm_index]["to"] == contracts.csm.address - assert report_tx.events["TransferShares"][csm_index]["from"] == contracts.accounting.address - assert report_tx.events["TransferShares"][agent_index]["to"] == contracts.agent - assert report_tx.events["TransferShares"][agent_index]["from"] == contracts.accounting.address - - - # the staking modules ids starts from 1 - module_stats = contracts.staking_router.getStakingModule(1) - # module_treasury_fee = module_share / share_pct * treasury_pct - module_treasury_fee = ( - report_tx.events["TransferShares"][module_index]["sharesValue"] - * 100_00 - // module_stats["stakingModuleFee"] - * module_stats["treasuryFee"] - // 100_00 - ) - simple_dvt_stats = contracts.staking_router.getStakingModule(2) - simple_dvt_treasury_fee = ( - report_tx.events["TransferShares"][simple_dvt_index]["sharesValue"] - * 100_00 - // simple_dvt_stats["stakingModuleFee"] - * simple_dvt_stats["treasuryFee"] - // 100_00 - ) - csm_stats = contracts.staking_router.getStakingModule(3) - csm_treasury_fee = ( - report_tx.events["TransferShares"][csm_index]["sharesValue"] - * 100_00 - // csm_stats["stakingModuleFee"] - * csm_stats["treasuryFee"] - // 100_00 - ) - - assert almostEqWithDiff( - module_treasury_fee + simple_dvt_treasury_fee + csm_treasury_fee, - report_tx.events["TransferShares"][agent_index]["sharesValue"], - 100, - ) - assert report_tx.events["TransferShares"][module_index]["sharesValue"] > 0 - assert report_tx.events["TransferShares"][simple_dvt_index]["sharesValue"] > 0 - assert report_tx.events["TransferShares"][csm_index]["sharesValue"] > 0 - - # do the same checks for Transfer event ------------------------------------------------------- - - assert report_tx.events["Transfer"][module_index]["to"] == module_address - assert report_tx.events["Transfer"][module_index]["from"] == contracts.accounting.address - assert report_tx.events["Transfer"][simple_dvt_index]["to"] == contracts.simple_dvt.address - assert report_tx.events["Transfer"][simple_dvt_index]["from"] == contracts.accounting.address - assert report_tx.events["Transfer"][csm_index]["to"] == contracts.csm.address - assert report_tx.events["Transfer"][csm_index]["from"] == contracts.accounting.address + agent_index = curated_index + 3 + assert report_tx.events["Transfer"][curated_index]["to"] == module_address + assert report_tx.events["Transfer"][curated_index]["from"] == ZERO_ADDRESS assert report_tx.events["Transfer"][agent_index]["to"] == contracts.agent - assert report_tx.events["Transfer"][agent_index]["from"] == contracts.accounting.address + assert report_tx.events["Transfer"][agent_index]["from"] == ZERO_ADDRESS - # module_treasury_fee = module_share / share_pct * treasury_pct - module_treasury_fee = ( - report_tx.events["Transfer"][module_index]["value"] + curated_stats = contracts.staking_router.getStakingModule(1) + curated_treasury_fee = ( + report_tx.events["Transfer"][curated_index]["value"] * 100_00 - // module_stats["stakingModuleFee"] - * module_stats["treasuryFee"] + // curated_stats["stakingModuleFee"] + * curated_stats["treasuryFee"] // 100_00 ) simple_dvt_stats = contracts.staking_router.getStakingModule(2) @@ -362,13 +315,12 @@ def test_paused_staking_module_can_reward(burner: Contract, stranger): * csm_stats["treasuryFee"] // 100_00 ) - assert almostEqWithDiff( - module_treasury_fee + simple_dvt_treasury_fee + csm_treasury_fee, + curated_treasury_fee + simple_dvt_treasury_fee + csm_treasury_fee, report_tx.events["Transfer"][agent_index]["value"], 100, ) - assert report_tx.events["Transfer"][module_index]["value"] > 0 + assert report_tx.events["Transfer"][curated_index]["value"] > 0 assert report_tx.events["Transfer"][simple_dvt_index]["value"] > 0 assert report_tx.events["Transfer"][csm_index]["value"] > 0 diff --git a/tests/regression/test_permissions.py b/tests/regression/test_permissions.py index c32595189..6c1f52dd7 100644 --- a/tests/regression/test_permissions.py +++ b/tests/regression/test_permissions.py @@ -63,16 +63,7 @@ L1_EMERGENCY_BRAKES_MULTISIG, DUAL_GOVERNANCE_EXECUTORS, RESEAL_MANAGER, - INSURANCE_FUND, - VAULT_HUB, - OPERATOR_GRID, - LAZY_ORACLE, - ACCOUNTING, - PREDEPOSIT_GUARANTEE, - VAULTS_ADAPTER, - GATE_SEAL_V3, - L1_TOKEN_RATE_NOTIFIER, - STAKING_VAULT_BEACON + INSURANCE_FUND ) @@ -92,8 +83,8 @@ def protocol_permissions(): "type": "CustomApp", "roles": { "DEFAULT_ADMIN_ROLE": [contracts.agent], - "REQUEST_BURN_MY_STETH_ROLE": [], - "REQUEST_BURN_SHARES_ROLE": [contracts.accounting, contracts.csm.accounting()], + "REQUEST_BURN_MY_STETH_ROLE": [contracts.agent], + "REQUEST_BURN_SHARES_ROLE": [contracts.lido, contracts.node_operators_registry, contracts.simple_dvt, contracts.csm.accounting()], }, }, STAKING_ROUTER: { @@ -108,7 +99,7 @@ def protocol_permissions(): "STAKING_MODULE_MANAGE_ROLE": [contracts.agent], "REPORT_EXITED_VALIDATORS_ROLE": [contracts.accounting_oracle], "UNSAFE_SET_EXITED_VALIDATORS_ROLE": [], - "REPORT_REWARDS_MINTED_ROLE": [contracts.accounting], + "REPORT_REWARDS_MINTED_ROLE": [contracts.lido], "REPORT_VALIDATOR_EXITING_STATUS_ROLE": [contracts.validator_exit_verifier], "REPORT_VALIDATOR_EXIT_TRIGGERED_ROLE": [contracts.triggerable_withdrawals_gateway], }, @@ -503,92 +494,7 @@ def protocol_permissions(): "PAUSE_ROLE": [contracts.voting, L1_EMERGENCY_BRAKES_MULTISIG], "UNPAUSE_ROLE": [contracts.voting], }, - }, - VAULT_HUB: { - "contract_name": "VaultHub", - "contract": contracts.vault_hub, - "type": "CustomApp", - "proxy_owner": contracts.agent, - "roles": { - "DEFAULT_ADMIN_ROLE": [contracts.agent], - "VAULT_MASTER_ROLE": [], - "REDEMPTION_MASTER_ROLE": [], - "VALIDATOR_EXIT_ROLE": [VAULTS_ADAPTER], - "BAD_DEBT_MASTER_ROLE": [VAULTS_ADAPTER], - "PAUSE_ROLE": [GATE_SEAL_V3, RESEAL_MANAGER], - "RESUME_ROLE": [RESEAL_MANAGER], - }, - "role_preimages": { - "VAULT_MASTER_ROLE": "vaults.VaultHub.VaultMasterRole", - "REDEMPTION_MASTER_ROLE": "vaults.VaultHub.RedemptionMasterRole", - "VALIDATOR_EXIT_ROLE": "vaults.VaultHub.ValidatorExitRole", - "BAD_DEBT_MASTER_ROLE": "vaults.VaultHub.BadDebtMasterRole", - "PAUSE_ROLE": "PausableUntilWithRoles.PauseRole", - "RESUME_ROLE": "PausableUntilWithRoles.ResumeRole", - }, - }, - OPERATOR_GRID: { - "contract_name": "OperatorGrid", - "contract": contracts.operator_grid, - "type": "CustomApp", - "proxy_owner": contracts.agent, - "roles": { - "DEFAULT_ADMIN_ROLE": [contracts.agent], - "REGISTRY_ROLE": [EASYTRACK_EVMSCRIPT_EXECUTOR, VAULTS_ADAPTER], - }, - "role_preimages": { - "REGISTRY_ROLE": "vaults.OperatorsGrid.Registry", - }, - }, - LAZY_ORACLE: { - "contract_name": "LazyOracle", - "contract": contracts.lazy_oracle, - "type": "CustomApp", - "proxy_owner": contracts.agent, - "roles": { - "DEFAULT_ADMIN_ROLE": [contracts.agent], - "UPDATE_SANITY_PARAMS_ROLE": [], - }, - "role_preimages": { - "UPDATE_SANITY_PARAMS_ROLE": "vaults.LazyOracle.UpdateSanityParams", - }, - }, - ACCOUNTING: { - "contract_name": "Accounting", - "contract": contracts.accounting, - "type": "CustomApp", - "proxy_owner": contracts.agent, - "roles": {}, - }, - PREDEPOSIT_GUARANTEE: { - "contract_name": "PredepositGuarantee", - "contract": contracts.predeposit_guarantee, - "type": "CustomApp", - "proxy_owner": contracts.agent, - "roles": { - "DEFAULT_ADMIN_ROLE": [contracts.agent], - "PAUSE_ROLE": [GATE_SEAL_V3, RESEAL_MANAGER], - "RESUME_ROLE": [RESEAL_MANAGER], - }, - "role_preimages": { - "PAUSE_ROLE": "PausableUntilWithRoles.PauseRole", - "RESUME_ROLE": "PausableUntilWithRoles.ResumeRole", - }, - }, - L1_TOKEN_RATE_NOTIFIER: { - "contract_name": "TokenRateNotifier", - "contract": contracts.token_rate_notifier, - "type": "CustomApp", - "state": {"owner": contracts.agent}, - "roles": {}, - }, - STAKING_VAULT_BEACON: { - "contract_name": "UpgradeableBeacon", - "contract": contracts.staking_vault_beacon, - "type": "CustomApp", - "state": {"owner": contracts.agent}, - "roles": {}, - }, + } } @@ -653,12 +559,7 @@ def test_protocol_permissions(protocol_permissions): ) for role, holders in permissions_config["roles"].items(): - # Use custom preimage if specified, otherwise use role name - role_preimage = role - if "role_preimages" in permissions_config and role in permissions_config["role_preimages"]: - role_preimage = permissions_config["role_preimages"][role] - - role_keccak = web3.keccak(text=role_preimage).hex() if role != "DEFAULT_ADMIN_ROLE" else ZERO_BYTES32.hex() + role_keccak = web3.keccak(text=role).hex() if role != "DEFAULT_ADMIN_ROLE" else ZERO_BYTES32.hex() role_signature = permissions_config["contract"].signatures[role] assert permissions_config["contract"].get_method_object(role_signature)() == role_keccak diff --git a/tests/regression/test_sanity_checks.py b/tests/regression/test_sanity_checks.py index 719d74cdc..4dca87fba 100644 --- a/tests/regression/test_sanity_checks.py +++ b/tests/regression/test_sanity_checks.py @@ -41,14 +41,12 @@ def first_report(): def test_cant_report_more_validators_than_deposited(): (deposited, clValidators, _) = contracts.lido.getBeaconStat() - with reverts("IncorrectReportValidators: " + str(deposited + 1) + ", " + str(clValidators) + ", " + str(deposited)): + with reverts("REPORTED_MORE_DEPOSITED"): oracle_report(cl_appeared_validators=deposited - clValidators + 1, skip_withdrawals=True, silent=True) def test_validators_cant_decrease(): - # panic code 0x11 (Arithmetic overflow) - # Brownie sometimes fails to decode panic codes and throws AttributeError - with pytest.raises((Exception, AttributeError)): + with reverts("REPORTED_LESS_VALIDATORS"): oracle_report(cl_appeared_validators=-1, skip_withdrawals=True, silent=True) @@ -241,39 +239,20 @@ def test_accounting_oracle_too_much_extra_data(extra_data_service): ) +@pytest.mark.skip("ganache throws 'RPCRequestError: Invalid string length' on such long extra data") def test_accounting_oracle_too_node_ops_per_extra_data_item(extra_data_service): - node_ops_count = MAX_NODE_OPERATORS_PER_EXTRA_DATA_ITEM + 1 - - # Collect real operators with their current exited validators count - operators = {} - nor_module_id = 1 - nor_operators_count = contracts.node_operators_registry.getNodeOperatorsCount() - i = 0 - - for no_id in range(nor_operators_count): - (active, _, _, _, total_exited_validators_count, _, total_deposited_validators_count) = contracts.node_operators_registry.getNodeOperator(no_id, True) - - if active and total_exited_validators_count != total_deposited_validators_count: - operators[(nor_module_id, no_id)] = total_exited_validators_count + 1 - i += 1 - - if i == node_ops_count: - break - - # Create extra data with too many node operators in a single item - # by setting max_no_in_payload_count to a large value - extra_data = extra_data_service.collect(operators, 1, node_ops_count) - + item_count = MAX_NODE_OPERATORS_PER_EXTRA_DATA_ITEM * 10 + extra_data = extra_data_service.collect({(1, i): i for i in range(item_count)}, {}, 1, item_count) with reverts( encode_error( "TooManyNodeOpsPerExtraDataItem(uint256,uint256)", - [0, node_ops_count], # itemIndex=0, nodeOpsCount=25 + [MAX_NODE_OPERATORS_PER_EXTRA_DATA_ITEM, item_count], ) ): oracle_report( extraDataFormat=1, extraDataHashList=extra_data.extra_data_hash_list, - extraDataItemsCount=extra_data.items_count, + extraDataItemsCount=1, extraDataList=extra_data.extra_data_list, ) diff --git a/tests/regression/test_staking_module_happy_path.py b/tests/regression/test_staking_module_happy_path.py index 9807e4885..375bf74a9 100644 --- a/tests/regression/test_staking_module_happy_path.py +++ b/tests/regression/test_staking_module_happy_path.py @@ -198,15 +198,10 @@ def module_happy_path(staking_module, extra_data_service, impersonated_agent, st # - Check NOs stats # - Check Report events - # Get current exited validators count for operators - no1_exited_before = staking_module.getNodeOperatorSummary(no1_id)["totalExitedValidators"] - no2_exited_before = staking_module.getNodeOperatorSummary(no2_id)["totalExitedValidators"] - no3_exited_before = staking_module.getNodeOperatorSummary(no3_id)["totalExitedValidators"] - - # Prepare extra data - set 5 more exited validators for each operator + # Prepare extra data vals_exited_non_zero = { - node_operator_gindex(staking_module.module_id, no1_id): no1_exited_before + 5, - node_operator_gindex(staking_module.module_id, no2_id): no2_exited_before + 5, + node_operator_gindex(staking_module.module_id, no1_id): 5, + node_operator_gindex(staking_module.module_id, no2_id): 5, } extra_data = extra_data_service.collect(vals_exited_non_zero, 10, 10) @@ -252,20 +247,20 @@ def module_happy_path(staking_module, extra_data_service, impersonated_agent, st assert no2_balance_shares_after - no2_balance_shares_before == no2_rewards_after_second_report assert no3_balance_shares_after - no3_balance_shares_before == no3_rewards_after_second_report - # NO stats - check that exited validators increased by 5 for no1 and no2, and stayed the same for no3 - assert no1_summary["totalExitedValidators"] == no1_exited_before + 5 - assert no2_summary["totalExitedValidators"] == no2_exited_before + 5 - assert no3_summary["totalExitedValidators"] == no3_exited_before + # NO stats + assert no1_summary["totalExitedValidators"] == 5 + assert no2_summary["totalExitedValidators"] == 5 + assert no3_summary["totalExitedValidators"] == 0 # Events exited_signing_keys_count_events = parse_exited_signing_keys_count_changed_logs( filter_transfer_logs(extra_report_tx_list[0].logs, web3.keccak(text="ExitedSigningKeysCountChanged(uint256,uint256)")) ) assert exited_signing_keys_count_events[0]["nodeOperatorId"] == no1_id - assert exited_signing_keys_count_events[0]["exitedValidatorsCount"][0] == no1_exited_before + 5 + assert exited_signing_keys_count_events[0]["exitedValidatorsCount"][0] == 5 assert exited_signing_keys_count_events[1]["nodeOperatorId"] == no2_id - assert exited_signing_keys_count_events[1]["exitedValidatorsCount"][0] == no2_exited_before + 5 + assert exited_signing_keys_count_events[1]["exitedValidatorsCount"][0] == 5 # Deposit keys deposit_and_check_keys(staking_module, no1_id, no2_id, no3_id, 50, impersonated_agent) @@ -355,6 +350,9 @@ def module_happy_path(staking_module, extra_data_service, impersonated_agent, st assert no3_deposited_keys_before != no3_deposited_keys_after +@pytest.mark.skip( + "TODO: fix the test assumptions about the state of the chain (no exited validators, depositable ETH amount)" +) def test_node_operator_registry(impersonated_agent, stranger, helpers): nor = contracts.node_operators_registry nor.module_id = 1 diff --git a/tests/snapshot/test_first_slots.py b/tests/snapshot/test_first_slots.py index 0866aea18..390eb573d 100644 --- a/tests/snapshot/test_first_slots.py +++ b/tests/snapshot/test_first_slots.py @@ -49,14 +49,8 @@ def test_first_slots(sandwich_upgrade: SandwichFn): def skip_slots() -> Sequence[tuple[str, int]]: """Slots that are not checked for equality""" return [ - # Adding 8 new easy track factories - steps 2-9 of V3 upgrade - (contracts.easy_track.address, 0x05), - # Set soft-mode target validators limit to 0 for operator A41 - step 1.3 of operations voting - (contracts.node_operators_registry.address, 0x01), - # Transfer MATIC from Treasury to LOL Multisig - step 7 of operations voting - (contracts.finance.address, 0x07), - # periodsLength var - step 7 of operations voting can trigger _newPeriod in Finance - (contracts.finance.address, 0x09), + # reset slot in kernel + (contracts.kernel.address, 0x01), ] @@ -98,6 +92,7 @@ def _snap(): for contract in ( contracts.lido, contracts.node_operators_registry, + contracts.legacy_oracle, contracts.deposit_security_module, contracts.execution_layer_rewards_vault, contracts.withdrawal_vault, @@ -162,7 +157,7 @@ def far_block() -> int: @pytest.fixture(scope="module") def far_ts() -> int: - return chain.time() + 21 * 24 * 60 * 60 # 21 days + return chain.time() + 14 * 24 * 60 * 60 # 14 days def _sleep_till_block(block: int, ts: int) -> None: diff --git a/tests/snapshot/test_legacy_oracle_snapshot.py b/tests/snapshot/test_legacy_oracle_snapshot.py new file mode 100644 index 000000000..085739b30 --- /dev/null +++ b/tests/snapshot/test_legacy_oracle_snapshot.py @@ -0,0 +1,194 @@ +from contextlib import contextmanager +from typing import Any, Callable, Sequence, TypedDict + +import brownie +import pytest +from brownie import chain, web3, accounts +from brownie.network.account import Account +from pytest_check import check +from typing_extensions import Protocol + +from tests.conftest import Helpers +from utils.config import contracts, LDO_TOKEN +from utils.evm_script import EMPTY_CALLSCRIPT +from utils.test.governance_helpers import execute_vote_and_process_dg_proposals +from utils.test.snapshot_helpers import _chain_snapshot + +from .utils import get_slot + + +class Frame(TypedDict): + """A snapshot of the state before and after an action.""" + + snap: dict[str, Any] + func: str + + +Stack = Sequence[Frame] +SnapshotFn = Callable[[], dict] + + +class SandwichFn(Protocol): + @staticmethod + def __call__( + actions_list: Sequence[Callable], + snapshot_fn: SnapshotFn = ..., + snapshot_block: int = ..., + ) -> tuple[Stack, Stack]: + ... + + +def test_legacy_oracle_no_changes_in_views(sandwich_upgrade: SandwichFn): + """Test that no views change during the upgrade process""" + + stacks = sandwich_upgrade([]) + _stacks_equal(stacks) + + +@pytest.fixture(scope="module") +def do_snapshot( + interface, + some_contract: Account, +): + oracle = contracts.legacy_oracle + + def _snap(): + block = chain.height + res = {} + + with brownie.multicall(block_identifier=block): + res |= { + "block_number": chain.height, + "chain_time": web3.eth.get_block(chain.height)["timestamp"], + "address": oracle.address, + # AppProxyUpgradeable + "isDepositable": interface.AppProxyUpgradeable(oracle.address).isDepositable(), + # Oracle + "allowRecoverability(LDO)": oracle.allowRecoverability(LDO_TOKEN), + "allowRecoverability(SOME_CONTRACT)": oracle.allowRecoverability(some_contract), + "getBeaconSpec": oracle.getBeaconSpec(), + "getCurrentEpochId": oracle.getCurrentEpochId(), + "getCurrentFrame": oracle.getCurrentFrame(), + "getLastCompletedEpochId": oracle.getLastCompletedEpochId(), + "getLastCompletedReportDelta": oracle.getLastCompletedReportDelta(), + "getLido": oracle.getLido(), + # AragonApp + # "getRecoveryVault": oracle.getRecoveryVault(), + "kernel": oracle.kernel(), + "appId": oracle.appId(), + "getEVMScriptExecutor(nil)": oracle.getEVMScriptExecutor(EMPTY_CALLSCRIPT), + "getEVMScriptRegistry": oracle.getEVMScriptRegistry(), + "getInitializationBlock": oracle.getInitializationBlock(), + "hasInitialized": oracle.hasInitialized(), + } + + for v1_slot in ( + # LidoOracle.sol + "lido.LidoOracle.allowedBeaconBalanceAnnualRelativeIncrease", + "lido.LidoOracle.allowedBeaconBalanceDecrease", + "lido.LidoOracle.beaconReportReceiver", + "lido.LidoOracle.beaconSpec", + "lido.LidoOracle.expectedEpochId", + "lido.LidoOracle.lastCompletedEpochId", + "lido.LidoOracle.lastReportedEpochId", + "lido.LidoOracle.lido", + "lido.LidoOracle.postCompletedTotalPooledEther", + "lido.LidoOracle.preCompletedTotalPooledEther", + "lido.LidoOracle.quorum", + "lido.LidoOracle.reportsBitMask", + "lido.LidoOracle.timeElapsed", + # AragonApp.sol + "aragonOS.appStorage.kernel", + "aragonOS.appStorage.appId", + ): + res[v1_slot] = get_slot( + oracle.address, + name=v1_slot, + block=block, + ) + + res["members"] = get_slot( + oracle.address, + pos=0, + as_list=True, + block=block, + ) + + return res + + return _snap + + +@pytest.fixture(scope="module") +def some_contract(accounts) -> Account: + # Multicall3 contract deployed almost on the every network on the same address + return accounts.at("0xcA11bde05977b3631167028862bE2a173976CA11", force=True) + + +@pytest.fixture(scope="module") +def sandwich_upgrade( + do_snapshot: SnapshotFn, + far_block: int, + far_ts: int, + helpers: Helpers, + vote_ids_from_env: Any, + dg_proposal_ids_from_env: Any +) -> SandwichFn: + """Snapshot the state before and after the upgrade and return the two frames""" + + def _do( + actions_list: Sequence[Callable], + snapshot_fn=do_snapshot, + snapshot_block=far_block, + ): + def _actions_snaps(): + _sleep_till_block(snapshot_block, far_ts) + + yield Frame(snap=snapshot_fn(), func="init") + + for action_fn in actions_list: + action_fn() + yield Frame( + snap=snapshot_fn(), + func=repr(action_fn), + ) + + with _chain_snapshot(): + before = tuple(_actions_snaps()) + + execute_vote_and_process_dg_proposals(helpers, vote_ids_from_env, dg_proposal_ids_from_env) + + # do not call _chain_snapshot here to be able to interact with the environment in the test + after = tuple(_actions_snaps()) + + return before, after + + return _do + + +@pytest.fixture(scope="module") +def far_block() -> int: + return chain.height + 1_000 + + +@pytest.fixture(scope="module") +def far_ts() -> int: + return chain.time() + 14 * 24 * 60 * 60 # 14 days + + +def _sleep_till_block(block: int, ts: int) -> None: + curr_block = web3.eth.get_block_number() + + if curr_block > block: + raise ValueError(f"Current block {curr_block} is greater than the target block {block}") + + print(f"Forwarding chain to block {block}, may take a while...") + chain.mine(block - curr_block, timestamp=ts) + + +def _stacks_equal(stacks: tuple[Stack, Stack]) -> None: + """Compare two stacks, asserting that they are equal""" + + for v1_frame, v2_frame in zip(*stacks, strict=True): + with check: # soft asserts + assert v1_frame["snap"] == v2_frame["snap"], f"Snapshots after {v1_frame['func']} are not equal" diff --git a/tests/snapshot/test_lido_snapshot.py b/tests/snapshot/test_lido_snapshot.py index 9461342ce..217717de4 100644 --- a/tests/snapshot/test_lido_snapshot.py +++ b/tests/snapshot/test_lido_snapshot.py @@ -10,7 +10,7 @@ from web3.types import Wei from tests.conftest import Helpers -from utils.config import contracts, LDO_TOKEN, VOTING, AGENT, INITIAL_MAX_EXTERNAL_RATIO_BP +from utils.config import contracts, LDO_TOKEN, VOTING, AGENT from utils.evm_script import EMPTY_CALLSCRIPT from utils.test.governance_helpers import execute_vote_and_process_dg_proposals from utils.test.snapshot_helpers import _chain_snapshot @@ -32,24 +32,12 @@ class Frame(TypedDict): UINT256_MAX = 2**256 - 1 _1ETH = Wei(10**18) -ZERO_BYTES32 = b'\x00' * 32 - EXPECTED_SNAPSHOT_DIFFS: dict[str, Any] = { - "lido.Lido.beaconBalance": ZERO_BYTES32, - "lido.Lido.beaconValidators": ZERO_BYTES32, - "lido.Lido.bufferedEther": ZERO_BYTES32, - "lido.Lido.depositedValidators": ZERO_BYTES32, - "lido.Lido.lidoLocator": ZERO_BYTES32, - "lido.StETH.totalShares": ZERO_BYTES32, + "canPerform()": (True, False), + "getRecoveryVault": (AGENT, ZERO_ADDRESS) } - -IGNORED_SNAPSHOT_KEYS: set[str] = { - "getFeeDistribution", -} - - def test_lido_no_changes_in_views(sandwich_upgrade: SandwichFn): """Test that no views change during the upgrade process.""" @@ -246,7 +234,7 @@ def get_actions(from_address: Account | None = None): return ( _call(lido.pauseStaking, {"from": from_address}), _call(lido.stop, {"from": from_address}), - _call(lido.resume, {"from": from_address}), + _call(lido.resumeStaking, {"from": from_address}), _call(lido.pauseStaking, {"from": from_address}), _call(lido.removeStakingLimit, {"from": from_address}), _call(lido.resumeStaking, {"from": from_address}), @@ -259,6 +247,7 @@ def get_actions(from_address: Account | None = None): ), _call(lido.pauseStaking, {"from": from_address}), _call(lido.setStakingLimit, 17, 3, {"from": from_address}), + _call(lido.resume, {"from": from_address}), _call(lido.stop, {"from": from_address}), ) @@ -307,6 +296,7 @@ def _snap(): "getCurrentStakeLimit": lido.getCurrentStakeLimit(), "getFeeDistribution": lido.getFeeDistribution(), "getFee": lido.getFee(), + "getOracle": lido.getOracle(), "getStakeLimitFullInfo": lido.getStakeLimitFullInfo(), "getTotalELRewardsCollected": lido.getTotalELRewardsCollected(), "getTotalShares": lido.getTotalShares(), @@ -339,11 +329,8 @@ def _snap(): # Lido.sol "lido.Lido.beaconBalance", "lido.Lido.beaconValidators", - "lido.Lido.clBalanceAndClValidators", "lido.Lido.bufferedEther", - "lido.Lido.bufferedEtherAndDepositedValidators", "lido.Lido.depositContract", - "lido.Lido.lidoLocator", "lido.Lido.depositedValidators", "lido.Lido.ELRewardsWithdrawalLimit", "lido.Lido.executionLayerRewardsVault", @@ -358,10 +345,8 @@ def _snap(): "lido.Lido.treasury", "lido.Lido.treasuryFee", "lido.Lido.withdrawalCredentials", - "lido.Lido.lidoLocatorAndMaxExternalRatio", # StETH.sol "lido.StETH.totalShares", - "lido.StETH.totalAndExternalShares", # Pausable.sol "lido.Pausable.activeFlag", # AragonApp.sol @@ -485,52 +470,6 @@ def _stacks_equal(stacks: tuple[Stack, Stack]) -> None: with check: unexpected: dict[str, tuple[Any, Any]] = {} for key, before_val in v1_frame["snap"].items(): - if key == "lido.Lido.bufferedEtherAndDepositedValidators": - if not _combined_buffered_and_deposited_slot_ok( - v1_frame["snap"], - v2_frame["snap"], - ): - unexpected[key] = ( - v1_frame["snap"]["lido.Lido.bufferedEtherAndDepositedValidators"], - v2_frame["snap"]["lido.Lido.bufferedEtherAndDepositedValidators"], - ) - continue - - if key == "lido.Lido.clBalanceAndClValidators": - if not _combined_cl_balance_and_validators_slot_ok( - v1_frame["snap"], - v2_frame["snap"], - ): - unexpected[key] = ( - v1_frame["snap"]["lido.Lido.clBalanceAndClValidators"], - v2_frame["snap"]["lido.Lido.clBalanceAndClValidators"], - ) - continue - - if key == "lido.StETH.totalAndExternalShares": - if not _combined_steth_total_and_external_shares_slot_ok( - v1_frame["snap"], - v2_frame["snap"], - ): - unexpected[key] = ( - v1_frame["snap"]["lido.StETH.totalAndExternalShares"], - v2_frame["snap"]["lido.StETH.totalAndExternalShares"], - ) - continue - - if key == "lido.Lido.lidoLocatorAndMaxExternalRatio": - if not _combined_lido_locator_and_max_external_ratio_slot_ok( - v1_frame["snap"], - v2_frame["snap"], - ): - unexpected[key] = ( - v1_frame["snap"]["lido.Lido.lidoLocatorAndMaxExternalRatio"], - v2_frame["snap"]["lido.Lido.lidoLocatorAndMaxExternalRatio"], - ) - continue - - if key in IGNORED_SNAPSHOT_KEYS: - continue after_val = v2_frame["snap"].get(key) if before_val == after_val: continue @@ -541,135 +480,3 @@ def _stacks_equal(stacks: tuple[Stack, Stack]) -> None: assert not unexpected, ( f"Snapshots after {v1_frame['func']} differ unexpectedly: {unexpected}" ) - - -def _combined_buffered_and_deposited_slot_ok( - v1_snap: dict[str, Any], - v2_snap: dict[str, Any], -) -> bool: - """ - Since v3, buffered ether and deposited validators are packed into one slot: - |------ 128 bit -------|------ 128 bit -------| - | deposited validators | buffered ether | - """ - before_combined = v1_snap["lido.Lido.bufferedEtherAndDepositedValidators"] - after_combined = v2_snap["lido.Lido.bufferedEtherAndDepositedValidators"] - - # Before upgrade the new slot must be empty - if before_combined != ZERO_BYTES32: - return False - - # After upgrade the new slot packs high 128 bits as deposited validators - # and low 128 bits as buffered ether from the old slots. - old_buffered = int.from_bytes( - v1_snap["lido.Lido.bufferedEther"], - byteorder="big", - ) - old_deposited = int.from_bytes( - v1_snap["lido.Lido.depositedValidators"], - byteorder="big", - ) - combined_after = int.from_bytes(after_combined, byteorder="big") - low_mask = (1 << 128) - 1 - buffered_after = combined_after & low_mask - deposited_after = combined_after >> 128 - - return buffered_after == old_buffered and deposited_after == old_deposited - - -def _combined_cl_balance_and_validators_slot_ok( - v1_snap: dict[str, Any], - v2_snap: dict[str, Any], -) -> bool: - """ - Since v3, CL balance and CL validators are packed into one slot: - |----- 128 bit -----|------ 128 bit -------| - | CL validators | CL balance | - """ - before_combined = v1_snap["lido.Lido.clBalanceAndClValidators"] - after_combined = v2_snap["lido.Lido.clBalanceAndClValidators"] - - # Before upgrade the new slot must be empty - if before_combined != ZERO_BYTES32: - return False - - # After upgrade the new slot packs high 128 bits as validators count - # and low 128 bits as CL balance from the old slots. - old_balance = int.from_bytes( - v1_snap["lido.Lido.beaconBalance"], - byteorder="big", - ) - old_validators = int.from_bytes( - v1_snap["lido.Lido.beaconValidators"], - byteorder="big", - ) - combined_after = int.from_bytes(after_combined, byteorder="big") - low_mask = (1 << 128) - 1 - balance_after = combined_after & low_mask - validators_after = combined_after >> 128 - - return balance_after == old_balance and validators_after == old_validators - - -def _combined_steth_total_and_external_shares_slot_ok( - v1_snap: dict[str, Any], - v2_snap: dict[str, Any], -) -> bool: - """ - Since v3, total shares and external shares are packed into one slot: - |------ 128 bit -------|------ 128 bit -------| - | external shares | total shares | - """ - before_combined = v1_snap["lido.StETH.totalAndExternalShares"] - after_combined = v2_snap["lido.StETH.totalAndExternalShares"] - - # Before upgrade the new slot must be empty - if before_combined != ZERO_BYTES32: - return False - - combined_after = int.from_bytes(after_combined, byteorder="big") - low_mask = (1 << 128) - 1 - total_after_slot = combined_after & low_mask - external_after = combined_after >> 128 - - # External shares must be zero after upgrade - if external_after != 0: - return False - - # Total shares (low 128 bits) must equal the old storage slot value - total_shares_before_slot = int.from_bytes( - v1_snap["lido.StETH.totalShares"], - byteorder="big", - ) - return total_after_slot == total_shares_before_slot - - -def _combined_lido_locator_and_max_external_ratio_slot_ok( - v1_snap: dict[str, Any], - v2_snap: dict[str, Any], -) -> bool: - """ - Since v3, max external ratio and lido locator are packed into one slot: - |----- 96 bit -----|------ 160 bit -------| - |max external ratio| lido locator address | - """ - before_combined = v1_snap["lido.Lido.lidoLocatorAndMaxExternalRatio"] - after_combined = v2_snap["lido.Lido.lidoLocatorAndMaxExternalRatio"] - - # Before upgrade the new slot must be empty - if before_combined != ZERO_BYTES32: - return False - - combined_after = int.from_bytes(after_combined, byteorder="big") - - # Low 160 bits is locator address, high 96 bits is max external ratio BP - locator_mask = (1 << 160) - 1 - locator_after = combined_after & locator_mask - max_external_ratio_after = combined_after >> 160 - - if max_external_ratio_after != INITIAL_MAX_EXTERNAL_RATIO_BP: - return False - - # Locator address in the combined slot must match the old locator slot value - before_locator_int = int.from_bytes(v1_snap["lido.Lido.lidoLocator"], byteorder="big") - return locator_after == before_locator_int diff --git a/tests/snapshot/test_plain_submit.py b/tests/snapshot/test_plain_submit.py index b53ef7395..3bcb85684 100644 --- a/tests/snapshot/test_plain_submit.py +++ b/tests/snapshot/test_plain_submit.py @@ -45,6 +45,7 @@ def snapshot() -> Dict[str, any]: "allowRecoverability(LDO)": lido.allowRecoverability(LDO_TOKEN), "allowRecoverability(StETH)": lido.allowRecoverability(LIDO), "appId": lido.appId(), + "getOracle()": lido.getOracle(), "getInitializationBlock()": lido.getInitializationBlock(), "symbol": lido.symbol(), "getEVMScriptRegistry": lido.getEVMScriptRegistry(), @@ -79,19 +80,21 @@ def steps() -> Dict[str, Dict[str, any]]: before: Dict[str, Dict[str, any]] = steps() chain.revert() - + execute_vote_and_process_dg_proposals(helpers, vote_ids_from_env, dg_proposal_ids_from_env) after: Dict[str, Dict[str, any]] = steps() step_diffs: Dict[str, Dict[str, ValueChanged]] = {} expected_diffs = { + "canPerform()": ValueChanged(from_val=True, to_val=False), + "getRecoveryVault()": ValueChanged(from_val=contracts.agent.address, to_val=ZERO_ADDRESS), } for step, pair_of_snapshots in dict_zip(before, after).items(): (before, after) = pair_of_snapshots step_diffs[step] = dict_diff(before, after) - + for key in expected_diffs: if key in step_diffs[step] and step_diffs[step][key] == expected_diffs[key]: del step_diffs[step][key] diff --git a/tests/snapshot/test_voting.py b/tests/snapshot/test_voting.py index d6ea0d7ba..905bfeaba 100644 --- a/tests/snapshot/test_voting.py +++ b/tests/snapshot/test_voting.py @@ -110,7 +110,7 @@ def test_create_wait_enact(helpers, vote_time, call_target, vote_ids_from_env, d for step_name, diff in step_diffs.items(): if not vote_ids_from_env: assert_expected_diffs( - step_name, diff, {"votesLength": ValueChanged(from_val=votesLength + 1, to_val=votesLength + 3)} + step_name, diff, {"votesLength": ValueChanged(from_val=votesLength + 1, to_val=votesLength + 2)} ) assert_no_diffs(step_name, diff) diff --git a/tests/test_2025_12_15.py b/tests/test_2025_12_15.py index f74348c02..4e2820242 100644 --- a/tests/test_2025_12_15.py +++ b/tests/test_2025_12_15.py @@ -1,92 +1,10 @@ -import pytest -import brownie -import tests.utils_test_2025_12_15_lidov3 as lidov3 import tests.utils_test_2025_12_15_operations as ops -@pytest.fixture(autouse=True) -def isolation(): - brownie.chain.reset() -def test_vote_v1_v2_dg1_dg2(helpers, accounts, ldo_holder, vote_ids_from_env, stranger): - - lidov3.enact_and_test_voting(helpers, accounts, ldo_holder, vote_ids_from_env, stranger, - 194, 6, - ) - - ops.enact_and_test_voting(helpers, accounts, ldo_holder, vote_ids_from_env, stranger, - 195, 7, - ) - - lidov3.enact_and_test_dg(stranger, 6) - - ops.enact_and_test_dg(stranger, 7) - -def test_vote_v1_v2_dg2_dg1(helpers, accounts, ldo_holder, vote_ids_from_env, stranger): - - lidov3.enact_and_test_voting(helpers, accounts, ldo_holder, vote_ids_from_env, stranger, - 194, 6, - ) - - ops.enact_and_test_voting(helpers, accounts, ldo_holder, vote_ids_from_env, stranger, - 195, 7, - ) - - ops.enact_and_test_dg(stranger, 7) - - lidov3.enact_and_test_dg(stranger, 6) - -def test_vote_v1_dg1_v2_dg2(helpers, accounts, ldo_holder, vote_ids_from_env, stranger): - - lidov3.enact_and_test_voting(helpers, accounts, ldo_holder, vote_ids_from_env, stranger, - 194, 6, - ) - - lidov3.enact_and_test_dg(stranger, 6) - - ops.enact_and_test_voting(helpers, accounts, ldo_holder, vote_ids_from_env, stranger, - 195, 7, - ) - - ops.enact_and_test_dg(stranger, 7) - -def test_vote_v2_v1_dg1_dg2(helpers, accounts, ldo_holder, vote_ids_from_env, stranger): +def test_vote_v2_dg2(helpers, accounts, ldo_holder, vote_ids_from_env, stranger): ops.enact_and_test_voting(helpers, accounts, ldo_holder, vote_ids_from_env, stranger, 194, 6, ) - lidov3.enact_and_test_voting(helpers, accounts, ldo_holder, vote_ids_from_env, stranger, - 195, 7, - ) - - lidov3.enact_and_test_dg(stranger, 7) - ops.enact_and_test_dg(stranger, 6) - -def test_vote_v2_v1_dg2_dg1(helpers, accounts, ldo_holder, vote_ids_from_env, stranger): - - ops.enact_and_test_voting(helpers, accounts, ldo_holder, vote_ids_from_env, stranger, - 194, 6, - ) - - lidov3.enact_and_test_voting(helpers, accounts, ldo_holder, vote_ids_from_env, stranger, - 195, 7, - ) - - ops.enact_and_test_dg(stranger, 6) - - lidov3.enact_and_test_dg(stranger, 7) - -def test_vote_v2_dg2_v1_dg1(helpers, accounts, ldo_holder, vote_ids_from_env, stranger): - - ops.enact_and_test_voting(helpers, accounts, ldo_holder, vote_ids_from_env, stranger, - 194, 6, - ) - - ops.enact_and_test_dg(stranger, 6) - - lidov3.enact_and_test_voting(helpers, accounts, ldo_holder, vote_ids_from_env, stranger, - 195, 7, - ) - - lidov3.enact_and_test_dg(stranger, 7) diff --git a/tests/utils_test_2025_12_15_lidov3.py b/tests/utils_test_2025_12_15_lidov3.py deleted file mode 100644 index 09e3b97c0..000000000 --- a/tests/utils_test_2025_12_15_lidov3.py +++ /dev/null @@ -1,1529 +0,0 @@ -from brownie import chain, interface, web3, convert, accounts, reverts, ZERO_ADDRESS -from brownie.network.transaction import TransactionReceipt - -from utils.test.tx_tracing_helpers import ( - group_voting_events_from_receipt, - group_dg_events_from_receipt, - count_vote_items_by_events, - display_voting_events, - display_dg_events -) -from utils.evm_script import encode_call_script, encode_error -from utils.voting import find_metadata_by_vote_id -from utils.ipfs import get_lido_vote_cid_from_str -from utils.dual_governance import PROPOSAL_STATUS, wait_for_target_time_to_satisfy_time_constrains -from utils.test.event_validators.dual_governance import validate_dual_governance_submit_event - -from utils.agent import agent_forward -from utils.permissions import encode_oz_grant_role, encode_oz_revoke_role -from utils.test.event_validators.easy_track import validate_evmscript_factory_added_event, EVMScriptFactoryAdded -from utils.easy_track import create_permissions -from utils.test.event_validators.common import validate_events_chain -from utils.test.event_validators.proxy import validate_proxy_upgrade_event -from utils.test.event_validators.permission import validate_grant_role_event, validate_revoke_role_event -from utils.test.event_validators.aragon import validate_aragon_set_app_event, validate_aragon_grant_permission_event, validate_aragon_revoke_permission_event -from utils.test.easy_track_helpers import _encode_calldata, create_and_enact_motion -from utils.test.event_validators.unpause import validate_pause_for_event -from utils.test.event_validators.time_constraints import validate_dg_time_constraints_executed_within_day_time_event - - -# ============================================================================ -# ============================== Import vote ================================= -# ============================================================================ -from scripts.upgrade_2025_12_15_mainnet_v3 import start_vote, get_vote_items - - -# ============================================================================ -# ============================== Constants =================================== -# ============================================================================ - -DEFAULT_ADMIN_ROLE = "0x0000000000000000000000000000000000000000000000000000000000000000" - -# Voting addresses -VOTING = "0x2e59A20f205bB85a89C53f1936454680651E618e" -AGENT = "0x3e40D73EB977Dc6a537aF587D48316feE66E9C8c" -EMERGENCY_PROTECTED_TIMELOCK = "0xCE0425301C85c5Ea2A0873A2dEe44d78E02D2316" -DUAL_GOVERNANCE = "0xC1db28B3301331277e307FDCfF8DE28242A4486E" -DUAL_GOVERNANCE_ADMIN_EXECUTOR = "0x23E0B465633FF5178808F4A75186E2F2F9537021" -DUAL_GOVERNANCE_TIME_CONSTRAINTS = "0x2a30F5aC03187674553024296bed35Aa49749DDa" -ARAGON_KERNEL = "0xb8FFC3Cd6e7Cf5a098A1c92F48009765B24088Dc" -ACL = "0x9895F0F17cc1d1891b6f18ee0b483B6f221b37Bb" -EASYTRACK = "0xF0211b7660680B49De1A7E9f25C65660F0a13Fea" -EASYTRACK_EVMSCRIPT_EXECUTOR = "0xFE5986E06210aC1eCC1aDCafc0cc7f8D63B3F977" - -# Old Lido addresses -LIDO_LOCATOR = "0xC1d0b3DE6792Bf6b4b37EccdcC24e45978Cfd2Eb" -ACCOUNTING_ORACLE = "0x852deD011285fe67063a08005c71a85690503Cee" -HASH_CONSENSUS = "0xD624B08C83bAECF0807Dd2c6880C3154a5F0B288" # HashConsensus for AccountingOracle -STAKING_ROUTER = "0xFdDf38947aFB03C621C71b06C9C70bce73f12999" -ORACLE_DAEMON_CONFIG = "0xbf05A929c3D7885a6aeAd833a992dA6E5ac23b09" -CSM_ACCOUNTING = "0x4d72BFF1BeaC69925F8Bd12526a39BAAb069e5Da" -OLD_BURNER = "0xD15a672319Cf0352560eE76d9e89eAB0889046D3" -LIDO_APP_ID = "0x3ca7c3e38968823ccb4c78ea688df41356f182ae1d159e4ee608d30d68cef320" -WITHDRAWAL_QUEUE = "0x889edC2eDab5f40e902b864aD4d7AdE8E412F9B1" - -# Our custom Aragon apps -LIDO = "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84" -NODE_OPERATORS_REGISTRY = "0x55032650b14df07b85bF18A3a3eC8E0Af2e028d5" -SIMPLE_DVT = "0xaE7B191A31f627b4eB1d4DaC64eaB9976995b433" - -# New Lido V3 addresses -VAULT_HUB = "0x1d201BE093d847f6446530Efb0E8Fb426d176709" -ACCOUNTING = "0x23ED611be0e1a820978875C0122F92260804cdDf" -ACCOUNTING_IMPL = "0xd43a3E984071F40d5d840f60708Af0e9526785df" -OPERATOR_GRID = "0xC69685E89Cefc327b43B7234AC646451B27c544d" -LAZY_ORACLE = "0x5DB427080200c235F2Ae8Cd17A7be87921f7AD6c" -PREDEPOSIT_GUARANTEE = "0xF4bF42c6D6A0E38825785048124DBAD6c9eaaac3" -VAULTS_ADAPTER = "0xe2DE6d2DefF15588a71849c0429101F8ca9FB14D" -GATE_SEAL_V3 = "0x881dAd714679A6FeaA636446A0499101375A365c" -LIDO_IMPL = "0x6ca84080381E43938476814be61B779A8bB6a600" -UPGRADE_TEMPLATE = "0x34E01ecFebd403370b0879C628f8A5319dDb8507" -LIDO_LOCATOR_IMPL = "0x2f8779042EFaEd4c53db2Ce293eB6B3f7096C72d" -ACCOUNTING_ORACLE_IMPL = "0x1455B96780A93e08abFE41243Db92E2fCbb0141c" -RESEAL_MANAGER = "0x7914b5a1539b97Bd0bbd155757F25FD79A522d24" -BURNER = "0xE76c52750019b80B43E36DF30bf4060EB73F573a" -VAULTS_FACTORY = "0x02Ca7772FF14a9F6c1a08aF385aA96bb1b34175A" - -# New Easy Track factories -ST_VAULTS_COMMITTEE = "0x18A1065c81b0Cc356F1b1C843ddd5E14e4AefffF" -ALTER_TIERS_IN_OPERATOR_GRID_FACTORY = "0xa29173C7BCf39dA48D5E404146A652d7464aee14" -REGISTER_GROUPS_IN_OPERATOR_GRID_FACTORY = "0x194A46DA1947E98c9D79af13E06Cfbee0D8610cC" -REGISTER_TIERS_IN_OPERATOR_GRID_FACTORY = "0x5292A1284e4695B95C0840CF8ea25A818751C17F" -SET_JAIL_STATUS_IN_OPERATOR_GRID_FACTORY = "0x93F1DEE4473Ee9F42c8257C201e33a6Da30E5d67" -SOCIALIZE_BAD_DEBT_IN_VAULT_HUB_FACTORY = "0x1dF50522A1D868C12bF71747Bb6F24A18Fe6d32C" -FORCE_VALIDATOR_EXITS_IN_VAULT_HUB_FACTORY = "0x6C968cD89CA358fbAf57B18e77a8973Fa869a6aA" -UPDATE_GROUPS_SHARE_LIMIT_IN_OPERATOR_GRID_FACTORY = "0x8Bdc726a3147D8187820391D7c6F9F942606aEe6" -UPDATE_VAULTS_FEES_IN_OPERATOR_GRID_FACTORY = "0x5C3bDFa3E7f312d8cf72F56F2b797b026f6B471c" - -# New versions of apps after upgrade -NEW_LIDO_VERSION = 3 -NEW_ACCOUNTING_ORACLE_VERSION = 4 -NEW_HASH_CONSENSUS_VERSION = 5 - -UTC14 = 60 * 60 * 14 -UTC23 = 60 * 60 * 23 -SLASHING_RESERVE_SHIFT = 8192 -MAX_EXTERNAL_RATIO_BP = 300 # 3% -INFINITE_ALLOWANCE = 2**256 - 1 # type(uint256).max -PAUSE_INFINITELY = 2**256 - 1 # type(uint256).max - - -# ============================================================================ -# ============================== Helper functions ============================ -# ============================================================================ - -def get_ossifiable_proxy_impl(proxy_address): - """Get implementation address from an OssifiableProxy""" - proxy = interface.OssifiableProxy(proxy_address) - return proxy.proxy__getImplementation() - - -# ============================================================================ -# =================== Aragon event validators for DG ========================= -# ============================================================================ - -def validate_config_value_set_event( - event, - key: str, - value: int, - emitted_by: str, -) -> None: - """ - Validate OracleDaemonConfig ConfigValueSet event via DG proposal. - Ensures only expected events are fired and all parameters are correct. - """ - _events_chain = ["LogScriptCall", "ConfigValueSet", "ScriptResult", "Executed"] - - validate_events_chain([e.name for e in event], _events_chain) - - assert event.count("LogScriptCall") == 1, f"Expected 1 LogScriptCall, got {event.count('LogScriptCall')}" - assert event.count("ConfigValueSet") == 1, f"Expected 1 ConfigValueSet, got {event.count('ConfigValueSet')}" - assert event.count("ScriptResult") == 1, f"Expected 1 ScriptResult, got {event.count('ScriptResult')}" - assert event.count("Executed") == 1, f"Expected 1 Executed, got {event.count('Executed')}" - - assert key == event["ConfigValueSet"][0]["key"], f"Wrong key: expected {key} to be equal to {event['ConfigValueSet'][0]['key']}" - assert convert.to_int(event["ConfigValueSet"][0]["value"]) == value, f"Wrong value: expected {value}, got {convert.to_int(event['ConfigValueSet'][0]['value'])}" - - assert convert.to_address(event["ConfigValueSet"][0]["_emitted_by"]) == convert.to_address( - emitted_by - ), f"Wrong event emitter: expected {emitted_by}" - - -def validate_upgrade_started_event(events) -> None: - """ - Validate V3Template UpgradeStarted event via DG proposal. - Ensures only expected events are fired. - """ - _events_chain = ["LogScriptCall", "UpgradeStarted", "ScriptResult", "Executed"] - - validate_events_chain([e.name for e in events], _events_chain) - - assert events.count("LogScriptCall") == 1, f"Expected 1 LogScriptCall, got {events.count('LogScriptCall')}" - assert events.count("UpgradeStarted") == 1, f"Expected 1 UpgradeStarted, got {events.count('UpgradeStarted')}" - assert events.count("ScriptResult") == 1, f"Expected 1 ScriptResult, got {events.count('ScriptResult')}" - assert events.count("Executed") == 1, f"Expected 1 Executed, got {events.count('Executed')}" - - assert convert.to_address(events["UpgradeStarted"][0]["_emitted_by"]) == convert.to_address( - UPGRADE_TEMPLATE - ), f"Wrong event emitter: expected {UPGRADE_TEMPLATE}" - - -def validate_upgrade_finished_events(events) -> None: - """ - Validate V3Template UpgradeFinished events via DG proposal. - Ensures only expected events are fired. - """ - _events_chain = ["LogScriptCall", "ContractVersionSet", "Transfer", "TransferShares", "Approval", "Approval", "Approval", "Approval", - "MaxExternalRatioBPSet", "ContractVersionSet", "ConsensusVersionSet", "UpgradeFinished", "ScriptResult", "Executed"] - - validate_events_chain([e.name for e in events], _events_chain) - - assert events.count("LogScriptCall") == 1, f"Expected 1 LogScriptCall, got {events.count('LogScriptCall')}" - assert events.count("ContractVersionSet") == 2, f"Expected 1 ContractVersionSet, got {events.count('ContractVersionSet')}" - assert events.count("Approval") == 4, f"Expected 4 Approval, got {events.count('Approval')}" - assert events.count("MaxExternalRatioBPSet") == 1, f"Expected 1 MaxExternalRatioBPSet, got {events.count('MaxExternalRatioBPSet')}" - assert events.count("ConsensusVersionSet") == 1, f"Expected 1 ConsensusVersionSet, got {events.count('ConsensusVersionSet')}" - assert events.count("UpgradeFinished") == 1, f"Expected 1 UpgradeFinished, got {events.count('UpgradeFinished')}" - assert events.count("ScriptResult") == 1, f"Expected 1 ScriptResult, got {events.count('ScriptResult')}" - assert events.count("Executed") == 1, f"Expected 1 Executed, got {events.count('Executed')}" - - lido_version = events["ContractVersionSet"][0]["version"] - assert lido_version == NEW_LIDO_VERSION, f"Wrong version: expected {NEW_LIDO_VERSION}, got {lido_version}" - assert convert.to_address(events["ContractVersionSet"][0]["_emitted_by"]) == LIDO, f"Wrong event emitter: expected {LIDO}" - - # Transfer and TransferShares events are emitted only if old Burner has some shares on balance - if events.count("Transfer") > 0: - assert events.count("Transfer") == 1, "Transfer event should be emitted only once" - assert events.count("TransferShares") == 1, "TransferShares event should be emitted only once" - assert convert.to_address(events["Transfer"][0]["from"]) == OLD_BURNER, f"Wrong from: expected {OLD_BURNER}" - assert convert.to_address(events["Transfer"][0]["to"]) == BURNER, f"Wrong to: expected {BURNER}" - assert convert.to_address(events["Transfer"][0]["_emitted_by"]) == LIDO, f"Wrong event emitter: expected {LIDO}" - assert convert.to_address(events["TransferShares"][0]["from"]) == OLD_BURNER, f"Wrong from: expected {OLD_BURNER}" - assert convert.to_address(events["TransferShares"][0]["to"]) == BURNER, f"Wrong to: expected {BURNER}" - assert convert.to_address(events["TransferShares"][0]["_emitted_by"]) == LIDO, f"Wrong event emitter: expected {LIDO}" - - assert convert.to_address(events["Approval"][0]["owner"]) == WITHDRAWAL_QUEUE, f"Wrong owner: expected {WITHDRAWAL_QUEUE}" - assert convert.to_address(events["Approval"][0]["spender"]) == OLD_BURNER, f"Wrong spender: expected {OLD_BURNER}" - assert convert.to_uint(events["Approval"][0]["value"]) == 0, f"Wrong value: expected {0}" - assert convert.to_address(events["Approval"][0]["_emitted_by"]) == LIDO, f"Wrong event emitter: expected {LIDO}" - - assert convert.to_address(events["Approval"][1]["owner"]) == WITHDRAWAL_QUEUE, f"Wrong owner: expected {WITHDRAWAL_QUEUE}" - assert convert.to_address(events["Approval"][1]["spender"]) == BURNER, f"Wrong spender: expected {BURNER}" - assert convert.to_uint(events["Approval"][1]["value"]) == INFINITE_ALLOWANCE, f"Wrong value: expected {INFINITE_ALLOWANCE}" - assert convert.to_address(events["Approval"][1]["_emitted_by"]) == LIDO, f"Wrong event emitter: expected {LIDO}" - - assert convert.to_address(events["Approval"][2]["owner"]) == CSM_ACCOUNTING, f"Wrong owner: expected {CSM_ACCOUNTING}" - assert convert.to_address(events["Approval"][2]["spender"]) == OLD_BURNER, f"Wrong spender: expected {OLD_BURNER}" - assert convert.to_uint(events["Approval"][2]["value"]) == 0, f"Wrong value: expected {0}" - assert convert.to_address(events["Approval"][2]["_emitted_by"]) == LIDO, f"Wrong event emitter: expected {LIDO}" - - assert convert.to_address(events["Approval"][3]["owner"]) == CSM_ACCOUNTING, f"Wrong owner: expected {CSM_ACCOUNTING}" - assert convert.to_address(events["Approval"][3]["spender"]) == BURNER, f"Wrong spender: expected {BURNER}" - assert convert.to_uint(events["Approval"][3]["value"]) == INFINITE_ALLOWANCE, f"Wrong value: expected {INFINITE_ALLOWANCE}" - assert convert.to_address(events["Approval"][3]["_emitted_by"]) == LIDO, f"Wrong event emitter: expected {LIDO}" - - max_external_ratio_bp = events["MaxExternalRatioBPSet"][0]["maxExternalRatioBP"] - assert max_external_ratio_bp == MAX_EXTERNAL_RATIO_BP, f"Wrong max external ratio: expected {MAX_EXTERNAL_RATIO_BP}, got {max_external_ratio_bp}" - assert convert.to_address(events["MaxExternalRatioBPSet"][0]["_emitted_by"]) == LIDO, f"Wrong event emitter: expected {LIDO}" - - oracle_version = events["ContractVersionSet"][1]["version"] - assert oracle_version == NEW_ACCOUNTING_ORACLE_VERSION, f"Wrong version: expected {NEW_ACCOUNTING_ORACLE_VERSION}, got {oracle_version}" - assert convert.to_address(events["ContractVersionSet"][1]["_emitted_by"]) == ACCOUNTING_ORACLE, f"Wrong event emitter: expected {ACCOUNTING_ORACLE}" - - consensus_version = events["ConsensusVersionSet"][0]["version"] - assert consensus_version == NEW_HASH_CONSENSUS_VERSION, f"Wrong version: expected {NEW_HASH_CONSENSUS_VERSION}, got {consensus_version}" - assert convert.to_address(events["ConsensusVersionSet"][0]["_emitted_by"]) == ACCOUNTING_ORACLE, f"Wrong event emitter: expected {ACCOUNTING_ORACLE}" - - assert convert.to_address(events["UpgradeFinished"][0]["_emitted_by"]) == convert.to_address( - UPGRADE_TEMPLATE - ), f"Wrong event emitter: expected {UPGRADE_TEMPLATE}" - - -# ============================================================================ -# ============================== Test functions ============================== -# ============================================================================ - -def dual_governance_proposal_calls(): - """Returns list of dual governance proposal calls for events checking""" - - # Helper function to encode proxy upgrades - def encode_proxy_upgrade_to(proxy_contract, new_impl_address): - return (proxy_contract.address, proxy_contract.proxy__upgradeTo.encode_input(new_impl_address)) - - lido_locator_proxy = interface.OssifiableProxy(LIDO_LOCATOR) - upgradeTemplate = interface.UpgradeTemplateV3(UPGRADE_TEMPLATE) - old_burner = interface.Burner(OLD_BURNER) - oracle_daemon_config = interface.OracleDaemonConfig(ORACLE_DAEMON_CONFIG) - accounting_oracle_proxy = interface.OssifiableProxy(ACCOUNTING_ORACLE) - kernel = interface.Kernel(ARAGON_KERNEL) - acl = interface.ACL(ACL) - staking_router = interface.StakingRouter(STAKING_ROUTER) - predeposit_guarantee = interface.PredepositGuarantee(PREDEPOSIT_GUARANTEE) - - dg_items = [ - # 1.1. Ensure DG proposal execution is within daily time window (14:00 UTC - 23:00 UTC) - ( - DUAL_GOVERNANCE_TIME_CONSTRAINTS, - interface.TimeConstraints(DUAL_GOVERNANCE_TIME_CONSTRAINTS).checkTimeWithinDayTimeAndEmit.encode_input( - UTC14, # 14:00 UTC - UTC23 # 23:00 UTC - ), - ), - - # 1.2. Call V3Template.startUpgrade - agent_forward([ - (upgradeTemplate.address, upgradeTemplate.startUpgrade.encode_input()) - ]), - - # 1.3. Upgrade LidoLocator implementation - agent_forward([encode_proxy_upgrade_to(lido_locator_proxy, LIDO_LOCATOR_IMPL)]), - - # 1.4. Grant Aragon APP_MANAGER_ROLE to the AGENT - agent_forward([ - (acl.address, - acl.grantPermission.encode_input( - AGENT, - ARAGON_KERNEL, - web3.keccak(text="APP_MANAGER_ROLE") - )) - ]), - - # 1.5. Set Lido implementation in Kernel - agent_forward([ - (kernel.address, - kernel.setApp.encode_input( - kernel.APP_BASES_NAMESPACE(), - LIDO_APP_ID, - LIDO_IMPL - )) - ]), - - # 1.6. Revoke Aragon APP_MANAGER_ROLE from the AGENT - agent_forward([ - (acl.address, - acl.revokePermission.encode_input( - AGENT, - ARAGON_KERNEL, - web3.keccak(text="APP_MANAGER_ROLE") - )) - ]), - - # 1.7. Revoke REQUEST_BURN_SHARES_ROLE from Lido - agent_forward([ - encode_oz_revoke_role( - contract=old_burner, - role_name="REQUEST_BURN_SHARES_ROLE", - revoke_from=LIDO - ) - ]), - - # 1.8. Revoke REQUEST_BURN_SHARES_ROLE from Curated staking module - agent_forward([ - encode_oz_revoke_role( - contract=old_burner, - role_name="REQUEST_BURN_SHARES_ROLE", - revoke_from=NODE_OPERATORS_REGISTRY - ) - ]), - - # 1.9. Revoke REQUEST_BURN_SHARES_ROLE from SimpleDVT - agent_forward([ - encode_oz_revoke_role( - contract=old_burner, - role_name="REQUEST_BURN_SHARES_ROLE", - revoke_from=SIMPLE_DVT - ) - ]), - - # 1.10. Revoke REQUEST_BURN_SHARES_ROLE from Community Staking Accounting - agent_forward([ - encode_oz_revoke_role( - contract=old_burner, - role_name="REQUEST_BURN_SHARES_ROLE", - revoke_from=CSM_ACCOUNTING - ) - ]), - - # 1.11. Upgrade AccountingOracle implementation - agent_forward([encode_proxy_upgrade_to(accounting_oracle_proxy, ACCOUNTING_ORACLE_IMPL)]), - - # 1.12. Revoke REPORT_REWARDS_MINTED_ROLE from Lido - agent_forward([ - encode_oz_revoke_role( - contract=staking_router, - role_name="REPORT_REWARDS_MINTED_ROLE", - revoke_from=LIDO - ) - ]), - - # 1.13. Grant REPORT_REWARDS_MINTED_ROLE to Accounting - agent_forward([ - encode_oz_grant_role( - contract=staking_router, - role_name="REPORT_REWARDS_MINTED_ROLE", - grant_to=ACCOUNTING - ) - ]), - - # 1.14. Grant OracleDaemonConfig's CONFIG_MANAGER_ROLE to Agent - agent_forward([ - encode_oz_grant_role( - contract=oracle_daemon_config, - role_name="CONFIG_MANAGER_ROLE", - grant_to=AGENT - ) - ]), - - # 1.15. Set SLASHING_RESERVE_WE_RIGHT_SHIFT to 0x2000 at OracleDaemonConfig - agent_forward([ - (oracle_daemon_config.address, oracle_daemon_config.set.encode_input( - "SLASHING_RESERVE_WE_RIGHT_SHIFT", - web3.codec.encode(['uint256'], [SLASHING_RESERVE_SHIFT]) - )) - ]), - - # 1.16. Set SLASHING_RESERVE_WE_LEFT_SHIFT to 0x2000 at OracleDaemonConfig - agent_forward([ - (oracle_daemon_config.address, oracle_daemon_config.set.encode_input( - "SLASHING_RESERVE_WE_LEFT_SHIFT", - web3.codec.encode(['uint256'], [SLASHING_RESERVE_SHIFT]) - )) - ]), - - # 1.17. Revoke OracleDaemonConfig's CONFIG_MANAGER_ROLE from Agent - agent_forward([ - encode_oz_revoke_role( - contract=oracle_daemon_config, - role_name="CONFIG_MANAGER_ROLE", - revoke_from=AGENT - ) - ]), - - # 1.18. Grant PredepositGuarantee's PAUSE_ROLE to Agent - agent_forward([ - encode_oz_grant_role( - contract=predeposit_guarantee, - role_name="PausableUntilWithRoles.PauseRole", - grant_to=AGENT - ) - ]), - - # 1.19. Pause PredepositGuarantee - agent_forward([ - (predeposit_guarantee.address, predeposit_guarantee.pauseFor.encode_input(PAUSE_INFINITELY)) - ]), - - # 1.20. Revoke PredepositGuarantee's PAUSE_ROLE from Agent - agent_forward([ - encode_oz_revoke_role( - contract=predeposit_guarantee, - role_name="PausableUntilWithRoles.PauseRole", - revoke_from=AGENT - ) - ]), - - # 1.21. Call V3Template.finishUpgrade - agent_forward([ - (upgradeTemplate.address, upgradeTemplate.finishUpgrade.encode_input()) - ]), - ] - - # Convert each dg_item to the expected format - proposal_calls = [] - for dg_item in dg_items: - target, data = dg_item # agent_forward returns (target, data) - proposal_calls.append({ - "target": target, - "value": 0, - "data": data - }) - - return proposal_calls - - -def enact_and_test_voting( - helpers, - accounts, - ldo_holder, - vote_ids_from_env, - stranger, - expected_vote_id, - expected_dg_proposal_id, -): - """ - Submit, enact and test the voting proposal. - Includes all before/after voting checks and event validation. - """ - EXPECTED_VOTE_EVENTS_COUNT = 9 - IPFS_DESCRIPTION_HASH = "bafkreibvblxc6urod5fefbfadebtr5fy26ixeliyzctcn6lnwlfk6xxvmm" - - # ======================================================================= - # ========================= Arrange variables =========================== - # ======================================================================= - voting = interface.Voting(VOTING) - timelock = interface.EmergencyProtectedTimelock(EMERGENCY_PROTECTED_TIMELOCK) - easy_track = interface.EasyTrack(EASYTRACK) - - vault_hub = interface.VaultHub(VAULT_HUB) - operator_grid = interface.OperatorGrid(OPERATOR_GRID) - - # ========================================================================= - # ======================== Identify or Create vote ======================== - # ========================================================================= - if vote_ids_from_env: - vote_id = vote_ids_from_env[0] - if expected_vote_id is not None: - assert vote_id == expected_vote_id - elif expected_vote_id is not None and voting.votesLength() > expected_vote_id: - vote_id = expected_vote_id - else: - vote_id, _ = start_vote({"from": ldo_holder}, silent=True) - - _, call_script_items = get_vote_items() - onchain_script = voting.getVote(vote_id)["script"] - assert onchain_script == encode_call_script(call_script_items) - - - # ========================================================================= - # ============================= Execute Vote ============================== - # ========================================================================= - is_executed = voting.getVote(vote_id)["executed"] - if not is_executed: - # ======================================================================= - # ========================= Before voting checks ======================== - # ======================================================================= - - # Steps 2-9: Add EasyTrack factories - initial_factories = easy_track.getEVMScriptFactories() - assert ALTER_TIERS_IN_OPERATOR_GRID_FACTORY not in initial_factories, "EasyTrack should not have ALTER_TIERS_IN_OPERATOR_GRID_FACTORY factory before vote" - assert REGISTER_GROUPS_IN_OPERATOR_GRID_FACTORY not in initial_factories, "EasyTrack should not have REGISTER_GROUPS_IN_OPERATOR_GRID_FACTORY factory before vote" - assert REGISTER_TIERS_IN_OPERATOR_GRID_FACTORY not in initial_factories, "EasyTrack should not have REGISTER_TIERS_IN_OPERATOR_GRID_FACTORY factory before vote" - assert SET_JAIL_STATUS_IN_OPERATOR_GRID_FACTORY not in initial_factories, "EasyTrack should not have SET_JAIL_STATUS_IN_OPERATOR_GRID_FACTORY factory before vote" - assert SOCIALIZE_BAD_DEBT_IN_VAULT_HUB_FACTORY not in initial_factories, "EasyTrack should not have SOCIALIZE_BAD_DEBT_IN_VAULT_HUB_FACTORY factory before vote" - assert FORCE_VALIDATOR_EXITS_IN_VAULT_HUB_FACTORY not in initial_factories, "EasyTrack should not have FORCE_VALIDATOR_EXITS_IN_VAULT_HUB_FACTORY factory before vote" - assert UPDATE_GROUPS_SHARE_LIMIT_IN_OPERATOR_GRID_FACTORY not in initial_factories, "EasyTrack should not have UPDATE_GROUPS_SHARE_LIMIT_IN_OPERATOR_GRID_FACTORY factory before vote" - assert UPDATE_VAULTS_FEES_IN_OPERATOR_GRID_FACTORY not in initial_factories, "EasyTrack should not have UPDATE_VAULTS_FEES_IN_OPERATOR_GRID_FACTORY factory before vote" - - assert get_lido_vote_cid_from_str(find_metadata_by_vote_id(vote_id)) == IPFS_DESCRIPTION_HASH - - vote_tx: TransactionReceipt = helpers.execute_vote(vote_id=vote_id, accounts=accounts, dao_voting=voting) - display_voting_events(vote_tx) - - - # ======================================================================= - # ========================= After voting checks ========================= - # ======================================================================= - - # Check roles that are needed for Easy Track factories - registry_role = web3.keccak(text="vaults.OperatorsGrid.Registry") - assert operator_grid.hasRole(registry_role, VAULTS_ADAPTER), "Operator Grid should have REGISTRY_ROLE on VAULTS_ADAPTER after upgrade" - assert operator_grid.hasRole(registry_role, EASYTRACK_EVMSCRIPT_EXECUTOR), "Operator Grid should have REGISTRY_ROLE on EASYTRACK_EVMSCRIPT_EXECUTOR after upgrade" - validator_exit_role = web3.keccak(text="vaults.VaultHub.ValidatorExitRole") - assert vault_hub.hasRole(validator_exit_role, VAULTS_ADAPTER), "Vault Hub should have VALIDATOR_EXIT_ROLE on VAULTS_ADAPTER after upgrade" - bad_debt_master_role = web3.keccak(text="vaults.VaultHub.BadDebtMasterRole") - assert vault_hub.hasRole(bad_debt_master_role, VAULTS_ADAPTER), "Vault Hub should have BAD_DEBT_MASTER_ROLE on VAULTS_ADAPTER after upgrade" - - # Steps 2-9: Add EasyTrack factories - new_factories = easy_track.getEVMScriptFactories() - assert ALTER_TIERS_IN_OPERATOR_GRID_FACTORY in new_factories, "EasyTrack should have ALTER_TIERS_IN_OPERATOR_GRID_FACTORY factory after vote" - assert REGISTER_GROUPS_IN_OPERATOR_GRID_FACTORY in new_factories, "EasyTrack should have REGISTER_GROUPS_IN_OPERATOR_GRID_FACTORY factory after vote" - assert REGISTER_TIERS_IN_OPERATOR_GRID_FACTORY in new_factories, "EasyTrack should have REGISTER_TIERS_IN_OPERATOR_GRID_FACTORY factory after vote" - assert SET_JAIL_STATUS_IN_OPERATOR_GRID_FACTORY in new_factories, "EasyTrack should have SET_JAIL_STATUS_IN_OPERATOR_GRID_FACTORY factory after vote" - assert SOCIALIZE_BAD_DEBT_IN_VAULT_HUB_FACTORY in new_factories, "EasyTrack should have SOCIALIZE_BAD_DEBT_IN_VAULT_HUB_FACTORY factory after vote" - assert FORCE_VALIDATOR_EXITS_IN_VAULT_HUB_FACTORY in new_factories, "EasyTrack should have FORCE_VALIDATOR_EXITS_IN_VAULT_HUB_FACTORY factory after vote" - assert UPDATE_GROUPS_SHARE_LIMIT_IN_OPERATOR_GRID_FACTORY in new_factories, "EasyTrack should have UPDATE_GROUPS_SHARE_LIMIT_IN_OPERATOR_GRID_FACTORY factory after vote" - assert UPDATE_VAULTS_FEES_IN_OPERATOR_GRID_FACTORY in new_factories, "EasyTrack should have UPDATE_VAULTS_FEES_IN_OPERATOR_GRID_FACTORY factory after vote" - - # Check that after the Aragon vote has passed, creation of the vaults via VaultFactory still reverts - with reverts(): - interface.VaultFactory(VAULTS_FACTORY).createVaultWithDashboard( - stranger, - stranger, - stranger, - 100, - 3600, - [], - {"from": stranger, "value": "1 ether"}, - ) - - vote_events = group_voting_events_from_receipt(vote_tx) - assert len(vote_events) == EXPECTED_VOTE_EVENTS_COUNT - assert count_vote_items_by_events(vote_tx, voting.address) == EXPECTED_VOTE_EVENTS_COUNT - - if expected_dg_proposal_id is not None: - assert expected_dg_proposal_id == timelock.getProposalsCount() - - validate_dual_governance_submit_event( - vote_events[0], - proposal_id=expected_dg_proposal_id, - proposer=VOTING, - executor=DUAL_GOVERNANCE_ADMIN_EXECUTOR, - metadata="Activate Lido V3: Phase 1 (Soft Launch)", - proposal_calls=dual_governance_proposal_calls(), - ) - - # Validate EasyTrack bypass events for new factories - validate_evmscript_factory_added_event( - event=vote_events[1], - p=EVMScriptFactoryAdded( - factory_addr=ALTER_TIERS_IN_OPERATOR_GRID_FACTORY, - permissions=create_permissions(operator_grid, "alterTiers") - ), - emitted_by=easy_track, - ) - - validate_evmscript_factory_added_event( - event=vote_events[2], - p=EVMScriptFactoryAdded( - factory_addr=REGISTER_GROUPS_IN_OPERATOR_GRID_FACTORY, - permissions=create_permissions(operator_grid, "registerGroup") + create_permissions(operator_grid, "registerTiers")[2:] - ), - emitted_by=easy_track, - ) - - validate_evmscript_factory_added_event( - event=vote_events[3], - p=EVMScriptFactoryAdded( - factory_addr=REGISTER_TIERS_IN_OPERATOR_GRID_FACTORY, - permissions=create_permissions(operator_grid, "registerTiers") - ), - emitted_by=easy_track, - ) - - validate_evmscript_factory_added_event( - event=vote_events[4], - p=EVMScriptFactoryAdded( - factory_addr=UPDATE_GROUPS_SHARE_LIMIT_IN_OPERATOR_GRID_FACTORY, - permissions=create_permissions(operator_grid, "updateGroupShareLimit") - ), - emitted_by=easy_track, - ) - - vaults_adapter = interface.IVaultsAdapter(VAULTS_ADAPTER) - validate_evmscript_factory_added_event( - event=vote_events[5], - p=EVMScriptFactoryAdded( - factory_addr=SET_JAIL_STATUS_IN_OPERATOR_GRID_FACTORY, - permissions=create_permissions(vaults_adapter, "setVaultJailStatus") - ), - emitted_by=easy_track, - ) - - validate_evmscript_factory_added_event( - event=vote_events[6], - p=EVMScriptFactoryAdded( - factory_addr=UPDATE_VAULTS_FEES_IN_OPERATOR_GRID_FACTORY, - permissions=create_permissions(vaults_adapter, "updateVaultFees") - ), - emitted_by=easy_track, - ) - - validate_evmscript_factory_added_event( - event=vote_events[7], - p=EVMScriptFactoryAdded( - factory_addr=FORCE_VALIDATOR_EXITS_IN_VAULT_HUB_FACTORY, - permissions=create_permissions(vaults_adapter, "forceValidatorExit") - ), - emitted_by=easy_track, - ) - - validate_evmscript_factory_added_event( - event=vote_events[8], - p=EVMScriptFactoryAdded( - factory_addr=SOCIALIZE_BAD_DEBT_IN_VAULT_HUB_FACTORY, - permissions=create_permissions(vaults_adapter, "socializeBadDebt") - ), - emitted_by=easy_track, - ) - - -def enact_and_test_dg(stranger, expected_dg_proposal_id): - """ - Enact and test the dual governance proposal. - Includes all before/after DG checks and event validation. - """ - if expected_dg_proposal_id is None: - return - - EXPECTED_DG_EVENTS_FROM_AGENT = 20 - EXPECTED_DG_EVENTS_COUNT = 21 - - # ======================================================================= - # ========================= Arrange variables =========================== - # ======================================================================= - agent = interface.Agent(AGENT) - timelock = interface.EmergencyProtectedTimelock(EMERGENCY_PROTECTED_TIMELOCK) - dual_governance = interface.DualGovernance(DUAL_GOVERNANCE) - kernel = interface.Kernel(ARAGON_KERNEL) - acl = interface.ACL(ACL) - - lido_locator_proxy = interface.OssifiableProxy(LIDO_LOCATOR) - accounting_oracle_proxy = interface.OssifiableProxy(ACCOUNTING_ORACLE) - staking_router = interface.StakingRouter(STAKING_ROUTER) - old_burner = interface.Burner(OLD_BURNER) - oracle_daemon_config = interface.OracleDaemonConfig(ORACLE_DAEMON_CONFIG) - upgradeTemplate = interface.UpgradeTemplateV3(UPGRADE_TEMPLATE) - lido = interface.Lido(LIDO) - - vault_hub = interface.VaultHub(VAULT_HUB) - operator_grid = interface.OperatorGrid(OPERATOR_GRID) - lazy_oracle = interface.LazyOracle(LAZY_ORACLE) - vault_factory = interface.VaultFactory(VAULTS_FACTORY) - predeposit_guarantee = interface.PredepositGuarantee(PREDEPOSIT_GUARANTEE) - - # Save original implementations for comparison - locator_impl_before = get_ossifiable_proxy_impl(LIDO_LOCATOR) - accounting_oracle_impl_before = get_ossifiable_proxy_impl(ACCOUNTING_ORACLE) - - report_rewards_minted_role = web3.keccak(text="REPORT_REWARDS_MINTED_ROLE") - request_burn_shares_role = web3.keccak(text="REQUEST_BURN_SHARES_ROLE") - config_manager_role = web3.keccak(text="CONFIG_MANAGER_ROLE") - app_manager_role = web3.keccak(text="APP_MANAGER_ROLE") - pdg_pause_role = web3.keccak(text="PausableUntilWithRoles.PauseRole") - - details = timelock.getProposalDetails(expected_dg_proposal_id) - if details["status"] != PROPOSAL_STATUS["executed"]: - # ========================================================================= - # ================== DG before proposal executed checks =================== - # ========================================================================= - - # Step 1.2. Call V3Template.startUpgrade - assert upgradeTemplate.upgradeBlockNumber() == 0, "V3Template should have upgradeBlockNumber 0 before startUpgrade" - assert upgradeTemplate.initialTotalShares() == 0, "V3Template should have initialTotalShares 0 before startUpgrade" - assert upgradeTemplate.initialTotalPooledEther() == 0, "V3Template should have initialTotalPooledEther 0 before startUpgrade" - assert upgradeTemplate.initialOldBurnerStethSharesBalance() == 0, "V3Template should have initialOldBurnerStethSharesBalance 0 before startUpgrade" - initial_total_shares_before = lido.getTotalShares() - initial_total_pooled_ether_before = lido.getTotalPooledEther() - initial_burner_steth_shares_balance_before = lido.sharesOf(OLD_BURNER) - - # Step 1.3: Check Lido Locator implementation initial state - assert locator_impl_before != LIDO_LOCATOR_IMPL, "Locator implementation should be different before upgrade" - - # Step 1.4. Grant Aragon APP_MANAGER_ROLE to the AGENT - assert not acl.hasPermission(AGENT, ARAGON_KERNEL, app_manager_role), "AGENT should not have APP_MANAGER_ROLE before upgrade" - - # Step 1.5. Set Lido implementation in Kernel - assert not kernel.getApp(kernel.APP_BASES_NAMESPACE(), LIDO_APP_ID) == LIDO_IMPL, "Lido implementation should be different before upgrade" - - # Step 1.7. Revoke REQUEST_BURN_SHARES_ROLE from Lido - assert old_burner.hasRole(request_burn_shares_role, LIDO), "Old Burner should have REQUEST_BURN_SHARES_ROLE on Lido before upgrade" - - # Step 1.8. Revoke REQUEST_BURN_SHARES_ROLE from Curated staking module - assert old_burner.hasRole(request_burn_shares_role, NODE_OPERATORS_REGISTRY), "Old Burner should have REQUEST_BURN_SHARES_ROLE on Curated staking module before upgrade" - - # Step 1.9. Revoke REQUEST_BURN_SHARES_ROLE from SimpleDVT - assert old_burner.hasRole(request_burn_shares_role, SIMPLE_DVT), "Old Burner should have REQUEST_BURN_SHARES_ROLE on SimpleDVT before upgrade" - - # Step 1.10. Revoke REQUEST_BURN_SHARES_ROLE from Community Staking Accounting - assert old_burner.hasRole(request_burn_shares_role, CSM_ACCOUNTING), "Old Burner should have REQUEST_BURN_SHARES_ROLE on Community Staking Accounting before upgrade" - - # Step 1.11: Check Accounting Oracle implementation initial state - assert accounting_oracle_impl_before != ACCOUNTING_ORACLE_IMPL, "Accounting Oracle implementation should be different before upgrade" - - # Step 1.12. Revoke REPORT_REWARDS_MINTED_ROLE from Lido - assert staking_router.hasRole(report_rewards_minted_role, LIDO), "Staking Router should have REPORT_REWARDS_MINTED_ROLE on Lido before upgrade" - - # Step 1.13. Grant REPORT_REWARDS_MINTED_ROLE to Accounting - assert not staking_router.hasRole(report_rewards_minted_role, ACCOUNTING), "Staking Router should not have REPORT_REWARDS_MINTED_ROLE on Accounting before upgrade" - - # Step 1.14. Grant OracleDaemonConfig's CONFIG_MANAGER_ROLE to Agent - assert not oracle_daemon_config.hasRole(config_manager_role, AGENT), "OracleDaemonConfig should not have CONFIG_MANAGER_ROLE on Agent before upgrade" - - # Step 1.15. Set SLASHING_RESERVE_WE_RIGHT_SHIFT to 0x2000 at OracleDaemonConfig - try: - oracle_daemon_config.get('SLASHING_RESERVE_WE_RIGHT_SHIFT') - assert False, "SLASHING_RESERVE_WE_RIGHT_SHIFT should not exist before vote" - except Exception: - pass # Expected to fail - - # Step 1.16. Set SLASHING_RESERVE_WE_LEFT_SHIFT to 0x2000 at OracleDaemonConfig - try: - oracle_daemon_config.get('SLASHING_RESERVE_WE_LEFT_SHIFT') - assert False, "SLASHING_RESERVE_WE_LEFT_SHIFT should not exist before vote" - except Exception: - pass # Expected to fail - - # Step 1.18. Grant PredepositGuarantee's PAUSE_ROLE to Agent - assert not predeposit_guarantee.hasRole(pdg_pause_role, AGENT), "PredepositGuarantee should not have PAUSE_ROLE on Agent before upgrade" - - # Step 1.19. Pause PredepositGuarantee - assert predeposit_guarantee.isPaused() == False, "PredepositGuarantee should not be paused before upgrade" - assert predeposit_guarantee.getResumeSinceTimestamp() == 0, "PredepositGuarantee should have getResumeSinceTimestamp 0 before upgrade" - - # Step 1.21. Call V3Template.finishUpgrade - assert lido.getContractVersion() == NEW_LIDO_VERSION - 1, "LIDO should have version 2 before finishUpgrade" - assert lido.allowance(CSM_ACCOUNTING, BURNER) == 0, "No allowance from CSM_ACCOUNTING to BURNER before finishUpgrade" - assert lido.allowance(CSM_ACCOUNTING, OLD_BURNER) == INFINITE_ALLOWANCE, "Infinite allowance from CSM_ACCOUNTING to OLD_BURNER before finishUpgrade" - assert lido.allowance(WITHDRAWAL_QUEUE, BURNER) == 0, "No allowance from WITHDRAWAL_QUEUE to BURNER before finishUpgrade" - assert lido.allowance(WITHDRAWAL_QUEUE, OLD_BURNER) == INFINITE_ALLOWANCE, "Infinite allowance from WITHDRAWAL_QUEUE to OLD_BURNER before finishUpgrade" - - accounting_oracle = interface.AccountingOracle(ACCOUNTING_ORACLE) - assert accounting_oracle.getContractVersion() == NEW_ACCOUNTING_ORACLE_VERSION - 1, "AccountingOracle should have version 3 before finishUpgrade" - assert accounting_oracle.getConsensusVersion() == NEW_HASH_CONSENSUS_VERSION - 1, "HashConsensus should have version 4 before finishUpgrade" - - assert upgradeTemplate.isUpgradeFinished() == False, "V3Template should have isUpgradeFinished False before finishUpgrade" - - if details["status"] == PROPOSAL_STATUS["submitted"]: - chain.sleep(timelock.getAfterSubmitDelay() + 1) - dual_governance.scheduleProposal(expected_dg_proposal_id, {"from": stranger}) - - if timelock.getProposalDetails(expected_dg_proposal_id)["status"] == PROPOSAL_STATUS["scheduled"]: - chain.sleep(timelock.getAfterScheduleDelay() + 1) - - wait_for_target_time_to_satisfy_time_constrains() - - dg_tx: TransactionReceipt = timelock.execute(expected_dg_proposal_id, {"from": stranger}) - display_dg_events(dg_tx) - dg_events = group_dg_events_from_receipt( - dg_tx, - timelock=EMERGENCY_PROTECTED_TIMELOCK, - admin_executor=DUAL_GOVERNANCE_ADMIN_EXECUTOR, - ) - assert count_vote_items_by_events(dg_tx, agent.address) == EXPECTED_DG_EVENTS_FROM_AGENT - assert len(dg_events) == EXPECTED_DG_EVENTS_COUNT - - # === DG EXECUTION EVENTS VALIDATION === - - # 1.1. Check execution time window (14:00–23:00 UTC) - validate_dg_time_constraints_executed_within_day_time_event( - dg_events[0], - UTC14, - UTC23, - emitted_by=DUAL_GOVERNANCE_TIME_CONSTRAINTS - ) - - # 1.2. Call V3Template.startUpgrade - validate_upgrade_started_event(dg_events[1]) - - # 1.3. Lido Locator upgrade events - validate_proxy_upgrade_event(dg_events[2], LIDO_LOCATOR_IMPL, emitted_by=lido_locator_proxy) - - # 1.4. Grant Aragon APP_MANAGER_ROLE to the AGENT - validate_aragon_grant_permission_event( - dg_events[3], - entity=AGENT, - app=ARAGON_KERNEL, - role=app_manager_role.hex(), - emitted_by=ACL, - ) - - # 1.5. Set Lido implementation in Kernel - validate_aragon_set_app_event( - dg_events[4], - app_id=LIDO_APP_ID, - app=LIDO_IMPL, - emitted_by=ARAGON_KERNEL, - ) - - # 1.6. Revoke Aragon APP_MANAGER_ROLE from the AGENT - validate_aragon_revoke_permission_event( - dg_events[5], - entity=AGENT, - app=ARAGON_KERNEL, - role=app_manager_role.hex(), - emitted_by=ACL, - ) - - # 1.7. Revoke REQUEST_BURN_SHARES_ROLE from Lido - validate_revoke_role_event( - dg_events[6], - role=request_burn_shares_role.hex(), - revoke_from=LIDO, - sender=AGENT, - emitted_by=old_burner, - ) - - # 1.8. Revoke REQUEST_BURN_SHARES_ROLE from Curated staking module - validate_revoke_role_event( - dg_events[7], - role=request_burn_shares_role.hex(), - revoke_from=NODE_OPERATORS_REGISTRY, - sender=AGENT, - emitted_by=old_burner, - ) - - # 1.9. Revoke REQUEST_BURN_SHARES_ROLE from SimpleDVT - validate_revoke_role_event( - dg_events[8], - role=request_burn_shares_role.hex(), - revoke_from=SIMPLE_DVT, - sender=AGENT, - emitted_by=old_burner, - ) - - # 1.10. Revoke REQUEST_BURN_SHARES_ROLE from Community Staking Accounting - validate_revoke_role_event( - dg_events[9], - role=request_burn_shares_role.hex(), - revoke_from=CSM_ACCOUNTING, - sender=AGENT, - emitted_by=old_burner, - ) - - # 1.11. Accounting Oracle upgrade events - validate_proxy_upgrade_event(dg_events[10], ACCOUNTING_ORACLE_IMPL, emitted_by=accounting_oracle_proxy) - - # 1.12. Revoke Staking Router REPORT_REWARDS_MINTED_ROLE from the Lido - validate_revoke_role_event( - dg_events[11], - role=report_rewards_minted_role.hex(), - revoke_from=LIDO, - sender=AGENT, - emitted_by=staking_router, - ) - - # 1.13. Grant Staking Router REPORT_REWARDS_MINTED_ROLE to Accounting - validate_grant_role_event( - dg_events[12], - role=report_rewards_minted_role.hex(), - grant_to=ACCOUNTING, - sender=AGENT, - emitted_by=staking_router, - ) - - # 1.14. Grant OracleDaemonConfig's CONFIG_MANAGER_ROLE to Agent - validate_grant_role_event( - dg_events[13], - role=config_manager_role.hex(), - grant_to=AGENT, - sender=AGENT, - emitted_by=oracle_daemon_config, - ) - - # 1.15. Set SLASHING_RESERVE_WE_RIGHT_SHIFT to 0x2000 at OracleDaemonConfig - validate_config_value_set_event( - dg_events[14], - key='SLASHING_RESERVE_WE_RIGHT_SHIFT', - value=SLASHING_RESERVE_SHIFT, - emitted_by=oracle_daemon_config, - ) - - # 1.16. Set SLASHING_RESERVE_WE_LEFT_SHIFT to 0x2000 at OracleDaemonConfig - validate_config_value_set_event( - dg_events[15], - key='SLASHING_RESERVE_WE_LEFT_SHIFT', - value=SLASHING_RESERVE_SHIFT, - emitted_by=oracle_daemon_config, - ) - - # 1.17. Revoke OracleDaemonConfig's CONFIG_MANAGER_ROLE from Agent - validate_revoke_role_event( - dg_events[16], - role=config_manager_role.hex(), - revoke_from=AGENT, - sender=AGENT, - emitted_by=oracle_daemon_config, - ) - - # 1.18. Grant PredepositGuarantee's PAUSE_ROLE to Agent - validate_grant_role_event( - dg_events[17], - role=pdg_pause_role.hex(), - grant_to=AGENT, - sender=AGENT, - emitted_by=predeposit_guarantee, - ) - - # 1.19. Pause PredepositGuarantee - validate_pause_for_event( - dg_events[18], - pause_for=PAUSE_INFINITELY, - sender=AGENT, - emitted_by=predeposit_guarantee, - ) - - # 1.20. Revoke PredepositGuarantee's PAUSE_ROLE from Agent - validate_revoke_role_event( - dg_events[19], - role=pdg_pause_role.hex(), - revoke_from=AGENT, - sender=AGENT, - emitted_by=predeposit_guarantee, - ) - - # 1.21. Call V3Template.finishUpgrade - validate_upgrade_finished_events(dg_events[20]) - - # ========================================================================= - # ==================== After DG proposal executed checks ================== - # ========================================================================= - - # Step 1.2. Call V3Template.startUpgrade - assert upgradeTemplate.upgradeBlockNumber() != 0, "V3Template should have upgradeBlockNumber not 0 after startUpgrade" - assert upgradeTemplate.initialTotalShares() == initial_total_shares_before, "V3Template should have initialTotalShares equal to the initial total shares before upgrade" - assert upgradeTemplate.initialTotalPooledEther() == initial_total_pooled_ether_before, "V3Template should have initialTotalPooledEther equal to the initial total pooled ether before upgrade" - assert upgradeTemplate.initialOldBurnerStethSharesBalance() == initial_burner_steth_shares_balance_before, "V3Template should have initialOldBurnerStethSharesBalance equal to the initial burner steth shares balance before upgrade" - - # Step 1.3: Validate Lido Locator implementation was updated - assert get_ossifiable_proxy_impl(lido_locator_proxy) == LIDO_LOCATOR_IMPL, "Locator implementation should be updated to the new value" - - # Step 1.5. Set Lido implementation in Kernel - assert kernel.getApp(kernel.APP_BASES_NAMESPACE(), LIDO_APP_ID) == LIDO_IMPL, "Lido implementation should be updated to the new value" - - # Step 1.6. Revoke Aragon APP_MANAGER_ROLE from the AGENT - assert not acl.hasPermission(AGENT, ARAGON_KERNEL, app_manager_role), "AGENT should not have APP_MANAGER_ROLE after upgrade" - - # Step 1.7. Revoke REQUEST_BURN_SHARES_ROLE from Lido - assert not old_burner.hasRole(request_burn_shares_role, LIDO), "Old Burner should not have REQUEST_BURN_SHARES_ROLE on Lido after upgrade" - - # Step 1.8. Revoke REQUEST_BURN_SHARES_ROLE from Curated staking module - assert not old_burner.hasRole(request_burn_shares_role, NODE_OPERATORS_REGISTRY), "Old Burner should not have REQUEST_BURN_SHARES_ROLE on Curated staking module after upgrade" - - # Step 1.9. Revoke REQUEST_BURN_SHARES_ROLE from SimpleDVT - assert not old_burner.hasRole(request_burn_shares_role, SIMPLE_DVT), "Old Burner should not have REQUEST_BURN_SHARES_ROLE on SimpleDVT after upgrade" - - # Step 1.10. Revoke REQUEST_BURN_SHARES_ROLE from Community Staking Accounting - assert not old_burner.hasRole(request_burn_shares_role, CSM_ACCOUNTING), "Old Burner should not have REQUEST_BURN_SHARES_ROLE on Community Staking Accounting after upgrade" - - # Step 1.11: Validate Accounting Oracle implementation was updated - assert get_ossifiable_proxy_impl(accounting_oracle_proxy) == ACCOUNTING_ORACLE_IMPL, "Accounting Oracle implementation should be updated to the new value" - - # Step 1.12. Revoke REPORT_REWARDS_MINTED_ROLE from Lido - assert not staking_router.hasRole(report_rewards_minted_role, LIDO), "Staking Router should not have REPORT_REWARDS_MINTED_ROLE on Lido after upgrade" - - # Step 1.13. Grant REPORT_REWARDS_MINTED_ROLE to Accounting - assert staking_router.hasRole(report_rewards_minted_role, ACCOUNTING), "Staking Router should have REPORT_REWARDS_MINTED_ROLE on Accounting after upgrade" - - # Step 1.15. Set SLASHING_RESERVE_WE_RIGHT_SHIFT to 0x2000 at OracleDaemonConfig - assert convert.to_uint(oracle_daemon_config.get("SLASHING_RESERVE_WE_RIGHT_SHIFT")) == SLASHING_RESERVE_SHIFT, "OracleDaemonConfig should have SLASHING_RESERVE_WE_RIGHT_SHIFT set to 0x2000 after upgrade" - - # Step 1.16. Set SLASHING_RESERVE_WE_LEFT_SHIFT to 0x2000 at OracleDaemonConfig - assert convert.to_uint(oracle_daemon_config.get("SLASHING_RESERVE_WE_LEFT_SHIFT")) == SLASHING_RESERVE_SHIFT, "OracleDaemonConfig should have SLASHING_RESERVE_WE_LEFT_SHIFT set to 0x2000 after upgrade" - - # Step 1.17. Revoke OracleDaemonConfig's CONFIG_MANAGER_ROLE from Agent - assert not oracle_daemon_config.hasRole(config_manager_role, AGENT), "OracleDaemonConfig should not have CONFIG_MANAGER_ROLE on Agent after upgrade" - - # Step 1.19. Pause PredepositGuarantee - assert predeposit_guarantee.isPaused() == True, "PredepositGuarantee should be paused after upgrade" - assert predeposit_guarantee.getResumeSinceTimestamp() == PAUSE_INFINITELY, "PredepositGuarantee should have getResumeSinceTimestamp PAUSE_INFINITELY after upgrade" - - # Step 1.20. Revoke PredepositGuarantee's PAUSE_ROLE from Agent - assert not predeposit_guarantee.hasRole(pdg_pause_role, AGENT), "PredepositGuarantee should not have PAUSE_ROLE on Agent after upgrade" - - # Step 1.21. Call V3Template.finishUpgrade - lido = interface.Lido(LIDO) - assert lido.getContractVersion() == NEW_LIDO_VERSION, "LIDO should have version 3 after finishUpgrade" - assert lido.getMaxExternalRatioBP() == MAX_EXTERNAL_RATIO_BP, "LIDO should have max external ratio 3% after finishUpgrade" - assert lido.allowance(CSM_ACCOUNTING, OLD_BURNER) == 0, "No allowance from CSM_ACCOUNTING to OLD_BURNER after finishUpgrade" - assert lido.allowance(CSM_ACCOUNTING, BURNER) == INFINITE_ALLOWANCE, "Infinite allowance from CSM_ACCOUNTING to BURNER after finishUpgrade" - assert lido.allowance(WITHDRAWAL_QUEUE, OLD_BURNER) == 0, "No allowance from WITHDRAWAL_QUEUE to OLD_BURNER after finishUpgrade" - assert lido.allowance(WITHDRAWAL_QUEUE, BURNER) == INFINITE_ALLOWANCE, "Infinite allowance from WITHDRAWAL_QUEUE to BURNER after finishUpgrade" - - accounting_oracle = interface.AccountingOracle(ACCOUNTING_ORACLE) - assert accounting_oracle.getContractVersion() == NEW_ACCOUNTING_ORACLE_VERSION, "AccountingOracle should have version 4 after finishUpgrade" - assert accounting_oracle.getConsensusVersion() == NEW_HASH_CONSENSUS_VERSION, "HashConsensus should have version 5 after finishUpgrade" - assert upgradeTemplate.isUpgradeFinished() == True, "V3Template should have isUpgradeFinished True after finishUpgrade" - - # Check that a second call to finishUpgrade reverts - agent_account = accounts.at(AGENT, force=True) - with reverts(encode_error("UpgradeAlreadyFinished()")): - upgradeTemplate.finishUpgrade({"from": agent_account}) - - # Check that after the DG proposal has passed, creation of the vaults via VaultFactory can be done - creation_tx = vault_factory.createVaultWithDashboard( - stranger, - stranger, - stranger, - 100, - 3600, # 1 hour - [], - {"from": stranger, "value": "1 ether"}, - ) - assert creation_tx.events.count("VaultCreated") == 1 - assert creation_tx.events.count("DashboardCreated") == 1 - - # Scenario tests for Easy Track factories behavior after the vote - trusted_address = accounts.at(ST_VAULTS_COMMITTEE, force=True) - easy_track = interface.EasyTrack(EASYTRACK) - chain.snapshot() - test_register_groups_in_operator_grid(easy_track, trusted_address, stranger, operator_grid) - test_register_tiers_in_operator_grid(easy_track, trusted_address, stranger, operator_grid) - test_alter_tiers_in_operator_grid(easy_track, trusted_address, stranger, operator_grid) - test_update_groups_share_limit_in_operator_grid(easy_track, trusted_address, stranger, operator_grid) - test_set_jail_status_in_operator_grid(easy_track, trusted_address, stranger, operator_grid, vault_factory) - test_update_vaults_fees_in_operator_grid(easy_track, trusted_address, stranger, lazy_oracle, vault_hub, vault_factory) - test_force_validator_exits_in_vault_hub(easy_track, trusted_address, stranger, lazy_oracle, vault_hub, vault_factory) - test_socialize_bad_debt_in_vault_hub(easy_track, trusted_address, stranger, operator_grid, lazy_oracle, vault_hub, vault_factory) - chain.revert() - - -def test_register_groups_in_operator_grid(easy_track, trusted_address, stranger, operator_grid): - - operator_addresses = [ - "0x0000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000002", - ] - share_limits = [1000, 5000] - tiers_params_array = [ - [(500, 200, 100, 50, 40, 10), (800, 200, 100, 50, 40, 10)], - [(800, 200, 100, 50, 40, 10), (800, 200, 100, 50, 40, 10)], - ] - - calldata = _encode_calldata( - ["address[]", "uint256[]", "(uint256,uint256,uint256,uint256,uint256,uint256)[][]"], - [operator_addresses, share_limits, tiers_params_array] - ) - - # Check initial state - for i, operator_address in enumerate(operator_addresses): - group = operator_grid.group(operator_address) - assert group[0] == ZERO_ADDRESS # operator - assert group[1] == 0 # shareLimit - assert len(group[3]) == 0 # tiersId array should be empty - - create_and_enact_motion(easy_track, trusted_address, REGISTER_GROUPS_IN_OPERATOR_GRID_FACTORY, calldata, stranger) - - # Check final state - for i, operator_address in enumerate(operator_addresses): - group = operator_grid.group(operator_address) - assert group[0] == operator_address # operator - assert group[1] == share_limits[i] # shareLimit - assert len(group[3]) == len(tiers_params_array[i]) # tiersId array should have the same length as tiers_params - - # Check tier details - for j, tier_id in enumerate(group[3]): - tier = operator_grid.tier(tier_id) - assert tier[1] == tiers_params_array[i][j][0] # shareLimit - assert tier[3] == tiers_params_array[i][j][1] # reserveRatioBP - assert tier[4] == tiers_params_array[i][j][2] # forcedRebalanceThresholdBP - assert tier[5] == tiers_params_array[i][j][3] # infraFeeBP - assert tier[6] == tiers_params_array[i][j][4] # liquidityFeeBP - assert tier[7] == tiers_params_array[i][j][5] # reservationFeeBP - - -def test_register_tiers_in_operator_grid(easy_track, trusted_address, stranger, operator_grid): - - # Define operator addresses - operator_addresses = [ - "0x0000000000000000000000000000000000000003", - "0x0000000000000000000000000000000000000004" - ] - - # Define tier parameters for each operator - tiers_params_array = [ - [ # Tiers for operator 1 - (500, 200, 100, 50, 40, 10), - (300, 150, 75, 25, 20, 5), - ], - [ # Tiers for operator 2 - (800, 250, 125, 60, 50, 15), - (400, 180, 90, 30, 25, 8), - ] - ] - - # First register the groups to add tiers to - executor = accounts.at(EASYTRACK_EVMSCRIPT_EXECUTOR, force=True) - for operator_address in operator_addresses: - operator_grid.registerGroup(operator_address, 1000, {"from": executor}) - - # Check initial state - no tiers - for operator_address in operator_addresses: - group = operator_grid.group(operator_address) - assert len(group[3]) == 0 # tiersId array should be empty - - calldata = _encode_calldata( - ["address[]", "(uint256,uint256,uint256,uint256,uint256,uint256)[][]"], - [operator_addresses, tiers_params_array] - ) - - create_and_enact_motion(easy_track, trusted_address, REGISTER_TIERS_IN_OPERATOR_GRID_FACTORY, calldata, stranger) - - # Check final state - tiers should be registered - for i, operator_address in enumerate(operator_addresses): - group = operator_grid.group(operator_address) - assert len(group[3]) == len(tiers_params_array[i]) # tiersId array should have the same length as tiers_params - - # Check tier details - for j, tier_id in enumerate(group[3]): - tier = operator_grid.tier(tier_id) - assert tier[1] == tiers_params_array[i][j][0] # shareLimit - assert tier[3] == tiers_params_array[i][j][1] # reserveRatioBP - assert tier[4] == tiers_params_array[i][j][2] # forcedRebalanceThresholdBP - assert tier[5] == tiers_params_array[i][j][3] # infraFeeBP - assert tier[6] == tiers_params_array[i][j][4] # liquidityFeeBP - assert tier[7] == tiers_params_array[i][j][5] # reservationFeeBP - - -def test_alter_tiers_in_operator_grid(easy_track, trusted_address, stranger, operator_grid): - - # Define new tier parameters - # (shareLimit, reserveRatioBP, forcedRebalanceThresholdBP, infraFeeBP, liquidityFeeBP, reservationFeeBP) - new_tier_params = [(2000, 300, 150, 75, 60, 20), (3000, 400, 200, 100, 80, 30)] - - # First register a group and tier to alter - executor = accounts.at(EASYTRACK_EVMSCRIPT_EXECUTOR, force=True) - operator_address = "0x0000000000000000000000000000000000000005" - operator_grid.registerGroup(operator_address, 10000, {"from": executor}) - initial_tier_params = [(1000, 200, 100, 50, 40, 10), (1000, 200, 100, 50, 40, 10)] - operator_grid.registerTiers(operator_address, initial_tier_params, {"from": executor}) - - tiers_count = operator_grid.tiersCount() - tier_ids = [tiers_count - 2, tiers_count - 1] - - # Check initial state - for i, tier_id in enumerate(tier_ids): - tier = operator_grid.tier(tier_id) - assert tier[1] == initial_tier_params[i][0] # shareLimit - assert tier[3] == initial_tier_params[i][1] # reserveRatioBP - assert tier[4] == initial_tier_params[i][2] # forcedRebalanceThresholdBP - assert tier[5] == initial_tier_params[i][3] # infraFeeBP - assert tier[6] == initial_tier_params[i][4] # liquidityFeeBP - assert tier[7] == initial_tier_params[i][5] # reservationFeeBP - - calldata = _encode_calldata(["uint256[]", "(uint256,uint256,uint256,uint256,uint256,uint256)[]"], [tier_ids, new_tier_params]) - - create_and_enact_motion(easy_track, trusted_address, ALTER_TIERS_IN_OPERATOR_GRID_FACTORY, calldata, stranger) - - # Check final state - for i, tier_id in enumerate(tier_ids): - tier = operator_grid.tier(tier_id) - assert tier[1] == new_tier_params[i][0] # shareLimit - assert tier[3] == new_tier_params[i][1] # reserveRatioBP - assert tier[4] == new_tier_params[i][2] # forcedRebalanceThresholdBP - assert tier[5] == new_tier_params[i][3] # infraFeeBP - assert tier[6] == new_tier_params[i][4] # liquidityFeeBP - assert tier[7] == new_tier_params[i][5] # reservationFeeBP - - -def test_update_groups_share_limit_in_operator_grid(easy_track, trusted_address, stranger, operator_grid): - - operator_addresses = ["0x0000000000000000000000000000000000000006", "0x0000000000000000000000000000000000000007"] - new_share_limits = [2000, 3000] - - # First register the group to update - executor = accounts.at(EASYTRACK_EVMSCRIPT_EXECUTOR, force=True) - for i, operator_address in enumerate(operator_addresses): - operator_grid.registerGroup(operator_address, new_share_limits[i]*2, {"from": executor}) - - # Check initial state - for i, operator_address in enumerate(operator_addresses): - group = operator_grid.group(operator_address) - assert group[0] == operator_address # operator - assert group[1] == new_share_limits[i]*2 # shareLimit - - calldata = _encode_calldata( - ["address[]", "uint256[]"], - [operator_addresses, new_share_limits] - ) - - create_and_enact_motion(easy_track, trusted_address, UPDATE_GROUPS_SHARE_LIMIT_IN_OPERATOR_GRID_FACTORY, calldata, stranger) - - # Check final state - for i, operator_address in enumerate(operator_addresses): - group = operator_grid.group(operator_address) - assert group[0] == operator_address # operator - assert group[1] == new_share_limits[i] # shareLimit - - -def test_set_jail_status_in_operator_grid(easy_track, trusted_address, stranger, operator_grid, vault_factory): - - # First create the vaults - vaults = [] - for i in range(2): - creation_tx = vault_factory.createVaultWithDashboard( - stranger, - stranger, - stranger, - 100, - 3600, # 1 hour - [], - {"from": stranger, "value": "1 ether"}, - ) - vaults.append(creation_tx.events["VaultCreated"][0]["vault"]) - - # Check initial state - for vault in vaults: - is_in_jail = operator_grid.isVaultInJail(vault) - assert is_in_jail == False - - calldata = _encode_calldata(["address[]", "bool[]"], [vaults, [True, True]]) - - create_and_enact_motion(easy_track, trusted_address, SET_JAIL_STATUS_IN_OPERATOR_GRID_FACTORY, calldata, stranger) - - # Check final state - for i, vault in enumerate(vaults): - is_in_jail = operator_grid.isVaultInJail(vault) - assert is_in_jail == True - - -def test_update_vaults_fees_in_operator_grid(easy_track, trusted_address, stranger, lazy_oracle, vault_hub, vault_factory): - - initial_total_value = 2 * 10**18 - - # First create the vault - creation_tx = vault_factory.createVaultWithDashboard( - stranger, - stranger, - stranger, - 100, - 3600, # 1 hour - [], - {"from": stranger, "value": initial_total_value}, - ) - vault = creation_tx.events["VaultCreated"][0]["vault"] - - # Check initial state - connection = vault_hub.vaultConnection(vault) - assert connection[6] != 1 # infraFeeBP - assert connection[7] != 1 # liquidityFeeBP - assert connection[8] == 0 # reservationFeeBP - - calldata = _encode_calldata(["address[]", "uint256[]", "uint256[]", "uint256[]"], [[vault], [1], [1], [0]]) - - motions_before = easy_track.getMotions() - tx = easy_track.createMotion(UPDATE_VAULTS_FEES_IN_OPERATOR_GRID_FACTORY, calldata, {"from": trusted_address}) - motions = easy_track.getMotions() - assert len(motions) == len(motions_before) + 1 - - ( - motion_id, - _, - _, - motion_duration, - motion_start_date, - _, - _, - _, - _, - ) = motions[-1] - - chain.mine(1, motion_start_date + motion_duration + 1) - - # bring fresh report for vault - current_time = chain.time() - accounting_oracle = accounts.at(ACCOUNTING_ORACLE, force=True) - lazy_oracle.updateReportData( - current_time, - 1000, - "0x00", - "0x00", - {"from": accounting_oracle}) - - lazy_oracle_account = accounts.at(LAZY_ORACLE, force=True) - vault_hub.applyVaultReport( - vault, - current_time, - initial_total_value, - initial_total_value, - 0, - 0, - 0, - 0, - {"from": lazy_oracle_account}) - - easy_track.enactMotion( - motion_id, - tx.events["MotionCreated"]["_evmScriptCallData"], - {"from": stranger}, - ) - - # Check final state - connection = vault_hub.vaultConnection(vault) - assert connection[6] == 1 # infraFeeBP - assert connection[7] == 1 # liquidityFeeBP - assert connection[8] == 0 # reservationFeeBP - - -def test_force_validator_exits_in_vault_hub(easy_track, trusted_address, stranger, lazy_oracle, vault_hub, vault_factory): - - initial_total_value = 2 * 10**18 - - # top up VAULTS_ADAPTER - stranger.transfer(VAULTS_ADAPTER, 10**18) - - pubkey = b"01" * 48 - # First create the vault - creation_tx = vault_factory.createVaultWithDashboard( - stranger, - stranger, - stranger, - 100, - 3600, # 1 hour - [], - {"from": stranger, "value": initial_total_value}, - ) - vault = creation_tx.events["VaultCreated"][0]["vault"] - - calldata = _encode_calldata(["address[]", "bytes[]"], [[vault], [pubkey]]) - - motions_before = easy_track.getMotions() - tx = easy_track.createMotion(FORCE_VALIDATOR_EXITS_IN_VAULT_HUB_FACTORY, calldata, {"from": trusted_address}) - motions = easy_track.getMotions() - assert len(motions) == len(motions_before) + 1 - - ( - motion_id, - _, - _, - motion_duration, - motion_start_date, - _, - _, - _, - _, - ) = motions[-1] - - chain.mine(1, motion_start_date + motion_duration + 1) - - # bring fresh report for vault - current_time = chain.time() - accounting_oracle = accounts.at(ACCOUNTING_ORACLE, force=True) - lazy_oracle.updateReportData( - current_time, - 1000, - "0x00", - "0x00", - {"from": accounting_oracle}) - - # make vault unhealthy - lazy_oracle_account = accounts.at(LAZY_ORACLE, force=True) - vault_hub.applyVaultReport( - vault, - current_time, - initial_total_value, - initial_total_value, - 4 * initial_total_value, - 0, - 0, - 0, - {"from": lazy_oracle_account}) - - tx = easy_track.enactMotion( - motion_id, - tx.events["MotionCreated"]["_evmScriptCallData"], - {"from": stranger}, - ) - - # Check event was emitted - assert len(tx.events["ForcedValidatorExitTriggered"]) == 1 - event = tx.events["ForcedValidatorExitTriggered"][0] - assert event["vault"] == vault - assert event["pubkeys"] == "0x" + pubkey.hex() - assert event["refundRecipient"] == VAULTS_ADAPTER - - -def test_socialize_bad_debt_in_vault_hub(easy_track, trusted_address, stranger, operator_grid, lazy_oracle, vault_hub, vault_factory): - - initial_total_value = 2 * 10**18 - max_shares_to_socialize = 2 * 10**16 - - # Enable minting in default group - executor = accounts.at(EASYTRACK_EVMSCRIPT_EXECUTOR, force=True) - operator_grid.alterTiers([0], [(100_000 * 10**18, 300, 250, 50, 40, 10)], {"from": executor}) - - # First create the vaults - creation_tx = vault_factory.createVaultWithDashboard( - stranger, - stranger, - stranger, - 100, - 3600, # 1 hour - [], - {"from": stranger, "value": initial_total_value}, - ) - bad_debt_vault = creation_tx.events["VaultCreated"][0]["vault"] - - # Fresh report for bad debt vault - current_time = chain.time() - accounting_oracle = accounts.at(ACCOUNTING_ORACLE, force=True) - lazy_oracle.updateReportData(current_time, 1000, "0x00", "0x00", {"from": accounting_oracle}) - lazy_oracle_account = accounts.at(LAZY_ORACLE, force=True) - vault_hub.applyVaultReport( - bad_debt_vault, - current_time, - initial_total_value, - initial_total_value, - 0, - 0, - 0, - 0, - {"from": lazy_oracle_account}) - - bad_debt_dashboard = accounts.at(creation_tx.events["DashboardCreated"][0]["dashboard"], force=True) - vault_hub.mintShares(bad_debt_vault, stranger, 10 * max_shares_to_socialize, {"from": bad_debt_dashboard}) - - creation_tx = vault_factory.createVaultWithDashboard( - stranger, - stranger, - stranger, - 100, - 3600, # 1 hour - [], - {"from": stranger, "value": initial_total_value}, - ) - vault_acceptor = creation_tx.events["VaultCreated"][0]["vault"] - - calldata = _encode_calldata(["address[]", "address[]", "uint256[]"], [[bad_debt_vault], [vault_acceptor], [max_shares_to_socialize]]) - - motions_before = easy_track.getMotions() - tx = easy_track.createMotion(SOCIALIZE_BAD_DEBT_IN_VAULT_HUB_FACTORY, calldata, {"from": trusted_address}) - motions = easy_track.getMotions() - assert len(motions) == len(motions_before) + 1 - - ( - motion_id, - _, - _, - motion_duration, - motion_start_date, - _, - _, - _, - _, - ) = motions[-1] - - chain.mine(1, motion_start_date + motion_duration + 1) - - # Bring fresh report for vaults - current_time = chain.time() - lazy_oracle.updateReportData(current_time, 1000, "0x00", "0x00", {"from": accounting_oracle}) - - # Fresh report for acceptor vault - vault_hub.applyVaultReport( - vault_acceptor, - current_time, - initial_total_value, - initial_total_value, - 0, - 0, - 0, - 0, - {"from": lazy_oracle_account}) - - # Make bad debt on second vault - vault_hub.applyVaultReport( - bad_debt_vault, - current_time, - 10 * max_shares_to_socialize, - initial_total_value, - 0, - initial_total_value, - 0, - 0, - {"from": lazy_oracle_account}) - - bad_debt_record_before = vault_hub.vaultRecord(bad_debt_vault) - bad_liability_before = bad_debt_record_before[2] - acceptor_record_before = vault_hub.vaultRecord(vault_acceptor) - acceptor_liability_before = acceptor_record_before[2] - - tx = easy_track.enactMotion( - motion_id, - tx.events["MotionCreated"]["_evmScriptCallData"], - {"from": stranger}, - ) - - bad_debt_record_after = vault_hub.vaultRecord(bad_debt_vault) - bad_liability_after = bad_debt_record_after[2] - acceptor_record_after = vault_hub.vaultRecord(vault_acceptor) - acceptor_liability_after = acceptor_record_after[2] - - assert bad_liability_after == bad_liability_before - max_shares_to_socialize - assert acceptor_liability_after == acceptor_liability_before + max_shares_to_socialize - - # Check that events were emitted for failed socializations - assert len(tx.events["BadDebtSocialized"]) == 1 - event = tx.events["BadDebtSocialized"][0] - assert event["vaultDonor"] == bad_debt_vault - assert event["vaultAcceptor"] == vault_acceptor - assert event["badDebtShares"] == max_shares_to_socialize diff --git a/utils/config.py b/utils/config.py index 23b581247..ce9e5ddf0 100644 --- a/utils/config.py +++ b/utils/config.py @@ -310,30 +310,6 @@ def triggerable_withdrawals_gateway(self): def withdrawal_queue(self) -> interface.WithdrawalQueueERC721: return interface.WithdrawalQueueERC721(WITHDRAWAL_QUEUE) - @property - def vault_hub(self) -> interface.VaultHub: - return interface.VaultHub(VAULT_HUB) - - @property - def accounting(self) -> interface.Accounting: - return interface.Accounting(ACCOUNTING) - - @property - def operator_grid(self) -> interface.OperatorGrid: - return interface.OperatorGrid(OPERATOR_GRID) - - @property - def lazy_oracle(self) -> interface.LazyOracle: - return interface.LazyOracle(LAZY_ORACLE) - - @property - def predeposit_guarantee(self) -> interface.PredepositGuarantee: - return interface.PredepositGuarantee(PREDEPOSIT_GUARANTEE) - - @property - def staking_vault_beacon(self) -> interface.UpgradeableBeacon: - return interface.UpgradeableBeacon(STAKING_VAULT_BEACON) - @property def lido_locator(self) -> interface.LidoLocator: return interface.LidoLocator(LIDO_LOCATOR) diff --git a/utils/test/governance_helpers.py b/utils/test/governance_helpers.py index da4061c6d..ffec2e6bd 100644 --- a/utils/test/governance_helpers.py +++ b/utils/test/governance_helpers.py @@ -29,20 +29,31 @@ def execute_vote(helpers, vote_ids_from_env): def execute_vote_and_process_dg_proposals(helpers, vote_ids_from_env, dg_proposal_ids_from_env): - # V1 - proposals_count_before1 = contracts.emergency_protected_timelock.getProposalsCount() - start_and_execute_votes(contracts.voting, helpers, 0) - proposals_count_after1 = contracts.emergency_protected_timelock.getProposalsCount() - new_proposal_ids1 = list(range(proposals_count_before1 + 1, proposals_count_after1 + 1)) - - # DG1 - process_proposals(new_proposal_ids1) - - # V2 - proposals_count_before2 = contracts.emergency_protected_timelock.getProposalsCount() - start_and_execute_votes(contracts.voting, helpers, 1) - proposals_count_after2 = contracts.emergency_protected_timelock.getProposalsCount() - new_proposal_ids2 = list(range(proposals_count_before2 + 1, proposals_count_after2 + 1)) - - # DG2 - process_proposals(new_proposal_ids2) + sequence_key = "v1_dg1" + print("ACTION_SEQUENCE:", sequence_key) + + state = { + "v1_ids": None, + "v2_ids": None, + } + + def vote(id): + proposals_count_before1 = contracts.emergency_protected_timelock.getProposalsCount() + start_and_execute_votes(contracts.voting, helpers, id) + proposals_count_after1 = contracts.emergency_protected_timelock.getProposalsCount() + state[f"v{id+1}_ids"] = list(range(proposals_count_before1 + 1, proposals_count_after1 + 1)) + + def dual_governance(ids): + process_proposals(ids) + + actions = { + "v1": lambda: vote(0), + "dg1": lambda: dual_governance(state["v1_ids"]), + "v2": lambda: vote(1), + "dg2": lambda: dual_governance(state["v2_ids"]), + } + + steps = sequence_key.split("_") + for action in steps: + actions[action]() + diff --git a/utils/test/oracle_report_helpers.py b/utils/test/oracle_report_helpers.py index e584f147f..6b4598493 100644 --- a/utils/test/oracle_report_helpers.py +++ b/utils/test/oracle_report_helpers.py @@ -20,9 +20,6 @@ EXTRA_DATA_FORMAT_EMPTY = 0 EXTRA_DATA_FORMAT_LIST = 1 -MOCK_VAULTS_DATA_TREE_ROOT = HexBytes(ZERO_HASH) -MOCK_VAULTS_DATA_TREE_CID = "test_vaults_data_tree_cid" - @dataclass class AccountingReport: @@ -40,8 +37,6 @@ class AccountingReport: withdrawalFinalizationBatches: list[int] simulatedShareRate: int isBunkerMode: bool - vaultsDataTreeRoot: HexBytes - vaultsDataTreeCid: str extraDataFormat: int extraDataHash: HexBytes extraDataItemsCount: int @@ -95,8 +90,6 @@ def prepare_accounting_report( [int(i) for i in withdrawalFinalizationBatches], int(simulatedShareRate), bool(isBunkerMode), - MOCK_VAULTS_DATA_TREE_ROOT, - MOCK_VAULTS_DATA_TREE_CID, int(extraDataFormat), extraDataHashList[0], int(extraDataItemsCount), @@ -303,23 +296,20 @@ def simulate_report( } try: - calculatedValues = contracts.accounting.simulateOracleReport.call( - [ - reportTime, - ONE_DAY, - beaconValidators, - postCLBalance, - withdrawalVaultBalance, - elRewardsVaultBalance, - 0, - [], - 0, - ], + return contracts.lido.handleOracleReport.call( + reportTime, + ONE_DAY, + beaconValidators, + postCLBalance, + withdrawalVaultBalance, + elRewardsVaultBalance, + 0, + [], + 0, {"from": contracts.accounting_oracle.address}, block_identifier=block_identifier, override=state_override, ) - return (calculatedValues[14], calculatedValues[13], calculatedValues[0], calculatedValues[1]) except VirtualMachineError: # workaround for empty revert message from ganache on eth_call @@ -331,8 +321,16 @@ def simulate_report( [contracts.accounting_oracle.address, override_slot, refSlot], ) - contracts.accounting.handleOracleReport( - [reportTime, ONE_DAY, beaconValidators, postCLBalance, withdrawalVaultBalance, elRewardsVaultBalance, 0, [], 0], + contracts.lido.handleOracleReport( + reportTime, + ONE_DAY, + beaconValidators, + postCLBalance, + withdrawalVaultBalance, + elRewardsVaultBalance, + 0, + [], + 0, {"from": contracts.accounting_oracle.address}, ) raise # unreachable, for static analysis only @@ -353,7 +351,8 @@ def wait_to_next_available_report_time(consensus_contract): else: raise - time = web3.eth.get_block("latest").timestamp + # Use chain.time() instead of block timestamp for consistency + time = chain.time() (_, EPOCHS_PER_FRAME, _) = consensus_contract.getFrameConfig() frame_start_with_offset = GENESIS_TIME + (refSlot + SLOTS_PER_EPOCH * EPOCHS_PER_FRAME + 1) * SECONDS_PER_SLOT chain.sleep(frame_start_with_offset - time) @@ -521,8 +520,6 @@ def oracle_report( withdrawalFinalizationBatches=withdrawalFinalizationBatches, simulatedShareRate=simulatedShareRate, isBunkerMode=is_bunker, - vaultsDataTreeRoot=MOCK_VAULTS_DATA_TREE_ROOT, - vaultsDataTreeCid=MOCK_VAULTS_DATA_TREE_CID, extraDataFormat=extraDataFormat, extraDataHash=extraDataHashList[0], extraDataItemsCount=extraDataItemsCount,