diff --git a/archive/scripts/vote_dg_easy_track_tw_holesky.py b/archive/scripts/vote_dg_easy_track_tw_holesky.py new file mode 100644 index 000000000..bf54075b3 --- /dev/null +++ b/archive/scripts/vote_dg_easy_track_tw_holesky.py @@ -0,0 +1,105 @@ +""" +Vote XX/06/2025 [HOLESKY] + +1. Grant SUBMIT_REPORT_HASH_ROLE role to the EasyTrack EVM Script Executor +2. Connect TRIGGERABLE_WITHDRAWALS_GATEWAY to Dual Governance tiebreaker +3. Add `SubmitValidatorsExitRequestHashes` (SDVT) EVM script factory to Easy Track +4. Add `SubmitValidatorsExitRequestHashes` (Curated Module) EVM script factory to Easy Track +""" +import time + +from typing import Any, Dict +from typing import Tuple, Optional +from utils.config import ( + AGENT, + contracts, + get_deployer_account, + get_priority_fee, + get_is_live +) +from utils.dg_decorators import forward_agent, forward_dg_admin, forward_voting, process_voting_items +from utils.ipfs import upload_vote_ipfs_description, calculate_vote_ipfs_description +from utils.voting import confirm_vote_script, create_vote, bake_vote_items +from utils.permissions import encode_oz_grant_role +from utils.easy_track import ( + add_evmscript_factory, + create_permissions, +) +from typing import Optional, Tuple, Dict +from utils.config import contracts + + + +TRIGGERABLE_WITHDRAWALS_GATEWAY = "0x4FD4113f2B92856B59BC3be77f2943B7F4eaa9a5" + +EASYTRACK_EVMSCRIPT_EXECUTOR = "0x2819B65021E13CEEB9AC33E77DB32c7e64e7520D" + +EASYTRACK_SDVT_SUBMIT_VALIDATOR_EXIT_REQUEST_HASHES_FACTORY = "0x4aB23f409F8F6EdeF321C735e941E4670804a1B4" +EASYTRACK_CURATED_SUBMIT_VALIDATOR_EXIT_REQUEST_HASHES_FACTORY = "0x7A1c5af4625dc1160a7c67d00335B6Ad492bE53f" + +DESCRIPTION = "Add Triggerable Withdrawals Gateway to Dual Governance and new Easy Tracks (HOLESKY)" + +def start_vote(tx_params: Dict[str, str], silent: bool) -> Tuple[int, Optional[Any]]: + voting_unprepared_items = [ + ( + f"Grant SUBMIT_REPORT_HASH_ROLE on Validator Exit Bus Oracle to the EasyTrack EVM Script Executor", + forward_agent( + *encode_oz_grant_role( + contract=contracts.validators_exit_bus_oracle, + role_name="SUBMIT_REPORT_HASH_ROLE", + grant_to=EASYTRACK_EVMSCRIPT_EXECUTOR, + ), + ), + ), + ( + "Connect TRIGGERABLE_WITHDRAWALS_GATEWAY to Dual Governance tiebreaker", + forward_dg_admin( + contracts.dual_governance.address, + contracts.dual_governance.addTiebreakerSealableWithdrawalBlocker.encode_input( + TRIGGERABLE_WITHDRAWALS_GATEWAY + ), + ) + ), + ( + f"Add `SubmitValidatorsExitRequestHashes` (SDVT) EVM script factory with address `{EASYTRACK_SDVT_SUBMIT_VALIDATOR_EXIT_REQUEST_HASHES_FACTORY}` to Easy Track `{contracts.easy_track.address}`", + forward_voting( + *add_evmscript_factory( + factory=EASYTRACK_SDVT_SUBMIT_VALIDATOR_EXIT_REQUEST_HASHES_FACTORY, + permissions=(create_permissions(contracts.validators_exit_bus_oracle, "submitExitRequestsHash")), + ) + ) + ), + ( + f"Add `SubmitValidatorsExitRequestHashes` (Curated Module) EVM script factory with address `{EASYTRACK_CURATED_SUBMIT_VALIDATOR_EXIT_REQUEST_HASHES_FACTORY}` to Easy Track `{contracts.easy_track.address}`", + forward_voting( + *add_evmscript_factory( + factory=EASYTRACK_CURATED_SUBMIT_VALIDATOR_EXIT_REQUEST_HASHES_FACTORY, + permissions=(create_permissions(contracts.validators_exit_bus_oracle, "submitExitRequestsHash")), + ) + ) + ) + ] + + if silent: + desc_ipfs = calculate_vote_ipfs_description(DESCRIPTION) + else: + desc_ipfs = upload_vote_ipfs_description(DESCRIPTION) + + + vote_items = process_voting_items(voting_unprepared_items) + assert confirm_vote_script(vote_items, silent, desc_ipfs) + + return create_vote(vote_items, tx_params, desc_ipfs=desc_ipfs) + + + +def main(): + tx_params = {"from": get_deployer_account()} + 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}.") + + time.sleep(5) # hack for waiting thread #2. diff --git a/archive/scripts/vote_tw_csm2_holesky.py b/archive/scripts/vote_tw_csm2_holesky.py new file mode 100644 index 000000000..d05351b79 --- /dev/null +++ b/archive/scripts/vote_tw_csm2_holesky.py @@ -0,0 +1,722 @@ +""" +Vote XX/06/2025 [HOLESKY] + +--- Locator +1. Update locator implementation +--- VEB +2. Update VEBO implementation +3. Call finalizeUpgrade_v2(maxValidatorsPerReport, maxExitRequestsLimit, exitsPerFrame, frameDurationInSec) on VEBO +4. Grant VEBO role MANAGE_CONSENSUS_VERSION_ROLE to the AGENT +5. Bump VEBO consensus version to `4` +6. Revoke VEBO role MANAGE_CONSENSUS_VERSION_ROLE from the AGENT +--- Triggerable Withdrawals Gateway (TWG) +7. Grant TWG role ADD_FULL_WITHDRAWAL_REQUEST_ROLE to the CS Ejector +8. Grant TWG role ADD_FULL_WITHDRAWAL_REQUEST_ROLE to the VEB +--- WV +9. Update WithdrawalVault implementation +10. Call finalizeUpgrade_v2() on WithdrawalVault +--- AO +11. Update Accounting Oracle implementation +12. Grant AO MANAGE_CONSENSUS_VERSION_ROLE to the AGENT +13. Bump AO consensus version to `4` +14. Revoke AO MANAGE_CONSENSUS_VERSION_ROLE from the AGENT +--- SR +15. Update SR implementation +16. Grant SR role REPORT_VALIDATOR_EXITING_STATUS_ROLE to ValidatorExitVerifier +17. Grant SR role REPORT_VALIDATOR_EXIT_TRIGGERED_ROLE to TWG +--- NOR +18. Grant APP_MANAGER_ROLE role to the AGENT on Kernel +19. Update `NodeOperatorsRegistry` implementation +20. Call finalizeUpgrade_v4 on NOR +--- sDVT +21. Update `SimpleDVT` implementation +22. Call finalizeUpgrade_v4 on sDVT +23. Revoke APP_MANAGER_ROLE role from the AGENT on Kernel +--- Oracle configs --- +24. Grant CONFIG_MANAGER_ROLE role to the AGENT +25. Remove NODE_OPERATOR_NETWORK_PENETRATION_THRESHOLD_BP variable from OracleDaemonConfig +26. Remove VALIDATOR_DELAYED_TIMEOUT_IN_SLOTS variable from OracleDaemonConfig +27. Remove VALIDATOR_DELINQUENT_TIMEOUT_IN_SLOTS variable from OracleDaemonConfig +28. Add EXIT_EVENTS_LOOKBACK_WINDOW_IN_SLOTS variable to OracleDaemonConfig +--- CSM --- +29. Upgrade CSM implementation on proxy +30. Call `finalizeUpgradeV2()` on CSM contract +31. Upgrade CSAccounting implementation on proxy +32. Call `finalizeUpgradeV2(bondCurves)` on CSAccounting contract +33. Upgrade CSFeeOracle implementation on proxy +34. Call `finalizeUpgradeV2(consensusVersion)` on CSFeeOracle contract +35. Upgrade CSFeeDistributor implementation on proxy +36. Call `finalizeUpgradeV2(admin)` on CSFeeDistributor contract +37. Revoke CSAccounting role SET_BOND_CURVE_ROLE from the CSM contract +38. Revoke CSAccounting role RESET_BOND_CURVE_ROLE from the CSM contract +39. Revoke CSAccounting role RESET_BOND_CURVE_ROLE from the CSM committee +40. Grant CSM role CREATE_NODE_OPERATOR_ROLE for the permissionless gate +41. Grant CSM role CREATE_NODE_OPERATOR_ROLE for the vetted gate +42. Grant CSAccounting role SET_BOND_CURVE_ROLE for the vetted gate +43. Revoke role VERIFIER_ROLE from the previous instance of the Verifier contract +44. Grant role VERIFIER_ROLE to the new instance of the Verifier contract +45. Revoke CSM role PAUSE_ROLE from the previous GateSeal instance +46. Revoke CSAccounting role PAUSE_ROLE from the previous GateSeal instance +47. Revoke CSFeeOracle role PAUSE_ROLE from the previous GateSeal instance +48. Grant CSM role PAUSE_ROLE for the new GateSeal instance +49. Grant CSAccounting role PAUSE_ROLE for the new GateSeal instance +50. Grant CSFeeOracle role PAUSE_ROLE for the new GateSeal instance +51. Grant MANAGE_BOND_CURVES_ROLE to the AGENT +52. Add Identified Community Stakers Gate Bond Curve +53. Revoke MANAGE_BOND_CURVES_ROLE from the AGENT +54. Increase CSM share in Staking Router from 15% to 20% +--- Gate Seals --- +55. Revoke PAUSE_ROLE on WithdrawalQueue from the old GateSeal +56. Revoke PAUSE_ROLE on ValidatorsExitBusOracle from the old GateSeal +57. Grant PAUSE_ROLE on WithdrawalQueue to the new WithdrawalQueue GateSeal +58. Grant PAUSE_ROLE on ValidatorsExitBusOracle to the new Triggerable Withdrawals GateSeal +59. Grant PAUSE_ROLE on TriggerableWithdrawalsGateway to the new Triggerable Withdrawals GateSeal +--- ResealManager --- +60. Grant PAUSE_ROLE on TriggerableWithdrawalsGateway to ResealManager +61. Grant RESUME_ROLE on TriggerableWithdrawalsGateway to ResealManager +62. Call finalizeUpgrade_v3 on AO contract (TODO: move to beginning of the vote in Hoodi script) +63. Add CSSetVettedGateTree factory to EasyTrack with permissions +""" +import time + +from typing import TYPE_CHECKING, Any, Dict +from typing import Tuple, Optional, Sequence +from brownie import interface, web3, convert, ZERO_ADDRESS # type: ignore +from utils.config import ( + CSM_COMMITTEE_MS, + CS_MODULE_ID, + CS_MODULE_MODULE_FEE_BP, + CS_MODULE_TREASURY_FEE_BP, + CS_MODULE_MAX_DEPOSITS_PER_BLOCK, + CS_MODULE_MIN_DEPOSIT_BLOCK_DISTANCE, + CS_GATE_SEAL_ADDRESS, + NODE_OPERATORS_REGISTRY_ARAGON_APP_ID, + SIMPLE_DVT_ARAGON_APP_ID, + ARAGON_KERNEL, + AGENT, + contracts, +) +from utils.ipfs import upload_vote_ipfs_description, calculate_vote_ipfs_description +from utils.permissions import encode_oz_grant_role, encode_oz_revoke_role +from utils.easy_track import ( + add_evmscript_factory, + create_permissions, +) +from utils.agent import dual_governance_agent_forward +from utils.voting import confirm_vote_script, create_vote +from utils.config import get_deployer_account, get_priority_fee, get_is_live + +DESCRIPTION = "Triggerable withdrawals and CSM v2 upgrade voting (HOLESKY)" + +# New core contracts implementations +LIDO_LOCATOR_IMPL = "0xa437ab5614033d071493C88Fd351aFEbc802521f" +ACCOUNTING_ORACLE_IMPL = "0xE63267AAaC507A329213593e8A9bCa37e2994F1C" +VALIDATORS_EXIT_BUS_ORACLE_IMPL = "0xeCE105ABd3F2653398BE75e680dB033A238E2aD6" +WITHDRAWAL_VAULT_IMPL = "0x6aAA28C515E02ED0fe1B51e74323e14E910eA7d7" +STAKING_ROUTER_IMPL = "0xE6E775C6AdF8753588237b1De32f61937bC54341" +NODE_OPERATORS_REGISTRY_IMPL = "0x834aa47DCd21A32845099a78B4aBb17A7f0bD503" + +TRIGGERABLE_WITHDRAWALS_GATEWAY = "0x4FD4113f2B92856B59BC3be77f2943B7F4eaa9a5" +VALIDATOR_EXIT_VERIFIER = "0x9c5da60e54fcae8592132Fc9a67511e686b52BE8" + +# Oracle consensus versions +AO_CONSENSUS_VERSION = 4 +VEBO_CONSENSUS_VERSION = 4 +CSM_CONSENSUS_VERSION = 3 + +EXIT_EVENTS_LOOKBACK_WINDOW_IN_SLOTS = 7 * 7200 + +NOR_EXIT_DEADLINE_IN_SEC = 172800 + +MAX_VALIDATORS_PER_REPORT = 600 +MAX_EXIT_REQUESTS_LIMIT = 13000 +EXITS_PER_FRAME = 1 +FRAME_DURATION_IN_SEC = 48 + +# CSM +CS_MODULE_NEW_TARGET_SHARE_BP = 2000 # 20% +CS_MODULE_NEW_PRIORITY_EXIT_THRESHOLD_BP = 2500 # 25% + +CS_ACCOUNTING_IMPL_V2_ADDRESS = "0xbd78207826CfdBE125cFf0a7075EaB90F5f9FCbb" +CS_FEE_DISTRIBUTOR_IMPL_V2_ADDRESS = "0x6e00A87690A1CAF4abb135B549408cEfca2fd6f5" +CS_FEE_ORACLE_IMPL_V2_ADDRESS = "0xD6F44e196A5b4A1C3863Bdd87233465ef42aBB40" +CSM_IMPL_V2_ADDRESS = "0xaF370636f618bC97c8Af2aBC33aAD426b1f4164A" + +CS_GATE_SEAL_V2_ADDRESS = "0x86E4aFE068f30A41f650601Df9A097bc7CddFb76" +CS_SET_VETTED_GATE_TREE_FACTORY = "0x26CDa8f9D84956efC743c8432658Ae9a5B7939da" +CS_EJECTOR_ADDRESS = "0x477589D5A8cB67Bd6682AF3612f99ADB72d09582" +CS_PERMISSIONLESS_GATE_ADDRESS = "0x676626c3940ae32eF1e4F609938F785fF064ee22" +CS_VETTED_GATE_ADDRESS = "0x92A5aB5e4f98e67Fb7295fe439A652d0E51033bf" +CS_VERIFIER_V2_ADDRESS = "0xBC88b4b56A58b33716C3C2e879b4B1F964152AD4" + +CS_DEFAULT_BOND_CURVE = ( + [1, 2 * 10**18], [2, 1.9 * 10**18], [3, 1.8 * 10**18], [4, 1.7 * 10**18], [5, 1.6 * 10**18], [6, 1.5 * 10**18] +) +CS_LEGACY_EA_BOND_CURVE = ( + ([1, 1.5 * 10**18], [2, 1.9 * 10**18], [3, 1.8 * 10**18], [4, 1.7 * 10**18], [5, 1.6 * 10**18], [6, 1.5 * 10**18]) +) +CS_EXTRA_CURVES = [ + ([1, 3 * 10**18], [2, 1.9 * 10**18], [3, 1.8 * 10**18], [4, 1.7 * 10**18], [5, 1.6 * 10**18], [6, 1.5 * 10**18]), + ([1, 4 * 10**18], [2, 1 * 10**18]) +] +CS_CURVES = [CS_DEFAULT_BOND_CURVE, CS_LEGACY_EA_BOND_CURVE, *CS_EXTRA_CURVES] +CS_ICS_GATE_BOND_CURVE = ([1, 1.5 * 10**18], [2, 1.3 * 10**18]) # Identified Community Stakers Gate Bond Curve + +OLD_GATE_SEAL_ADDRESS = "0xAE6eCd77DCC656c5533c4209454Fd56fB46e1778" + +NEW_WQ_GATE_SEAL = "0xE900BC859EB750562E1009e912B63743BC877662" +NEW_TW_GATE_SEAL = "0xaEEF47C61f2A9CCe4C4D0363911C5d49e2cFb6f1" + +RESEAL_MANAGER = "0x9dE2273f9f1e81145171CcA927EFeE7aCC64c9fb" + +def encode_staking_router_proxy_update(implementation: str) -> Tuple[str, str]: + proxy = interface.OssifiableProxy(contracts.staking_router) + return proxy.address, proxy.proxy__upgradeTo.encode_input(implementation) + + +def encode_proxy_upgrade_to(proxy: Any, implementation: str) -> Tuple[str, str]: + proxy = interface.OssifiableProxy(proxy) + return proxy.address, proxy.proxy__upgradeTo.encode_input(implementation) + + +def encode_wv_proxy_upgrade_to(proxy: Any, implementation: str) -> Tuple[str, str]: + proxy = interface.WithdrawalContractProxy(proxy) + + return proxy.address, proxy.proxy_upgradeTo.encode_input(implementation, b'') + + +def encode_oracle_upgrade_consensus(proxy: Any, consensus_version: int) -> Tuple[str, str]: + oracle = interface.BaseOracle(proxy) + return oracle.address, oracle.setConsensusVersion.encode_input(consensus_version) + + +def encode_staking_router_update_csm_module_share() -> Tuple[str, str]: + """Encode call to update CSM share limit""" + return ( + contracts.staking_router.address, + contracts.staking_router.updateStakingModule.encode_input( + CS_MODULE_ID, + CS_MODULE_NEW_TARGET_SHARE_BP, + CS_MODULE_NEW_PRIORITY_EXIT_THRESHOLD_BP, + CS_MODULE_MODULE_FEE_BP, + CS_MODULE_TREASURY_FEE_BP, + CS_MODULE_MAX_DEPOSITS_PER_BLOCK, + CS_MODULE_MIN_DEPOSIT_BLOCK_DISTANCE, + ) + ) + + +def start_vote(tx_params: Dict[str, str], silent: bool) -> Tuple[int, Optional[Any]]: + vote_desc_items, call_script_items = zip( + # --- locator + ( + f"1. Update locator implementation", + encode_proxy_upgrade_to(contracts.lido_locator, LIDO_LOCATOR_IMPL) + ), + # --- VEB + ( + f"2. Update VEBO implementation", + encode_proxy_upgrade_to(contracts.validators_exit_bus_oracle, VALIDATORS_EXIT_BUS_ORACLE_IMPL) + ), + ( + f"3. Call finalizeUpgrade_v2 on VEBO", + ( + contracts.validators_exit_bus_oracle.address, + contracts.validators_exit_bus_oracle.finalizeUpgrade_v2.encode_input(MAX_VALIDATORS_PER_REPORT, MAX_EXIT_REQUESTS_LIMIT, EXITS_PER_FRAME, FRAME_DURATION_IN_SEC), + ) + ), + ( + f"4. Grant VEBO role MANAGE_CONSENSUS_VERSION_ROLE to the AGENT", + encode_oz_grant_role( + contract=contracts.validators_exit_bus_oracle, + role_name="MANAGE_CONSENSUS_VERSION_ROLE", + grant_to=contracts.agent, + ) + ), + ( + f"5. Bump VEBO consensus version to `{VEBO_CONSENSUS_VERSION}`", + encode_oracle_upgrade_consensus(contracts.validators_exit_bus_oracle, VEBO_CONSENSUS_VERSION) + ), + ( + f"6. Revoke VEBO role MANAGE_CONSENSUS_VERSION_ROLE from the AGENT", + encode_oz_revoke_role( + contract=contracts.validators_exit_bus_oracle, + role_name="MANAGE_CONSENSUS_VERSION_ROLE", + revoke_from=contracts.agent, + ) + ), + # --- Triggerable Withdrawals Gateway (TWG) + ( + f"7. Grant TWG role ADD_FULL_WITHDRAWAL_REQUEST_ROLE to the CS Ejector", + encode_oz_grant_role( + contract=interface.TriggerableWithdrawalsGateway(TRIGGERABLE_WITHDRAWALS_GATEWAY), + role_name="ADD_FULL_WITHDRAWAL_REQUEST_ROLE", + grant_to=CS_EJECTOR_ADDRESS, + ) + ), + ( + f"8. Grant TWG role ADD_FULL_WITHDRAWAL_REQUEST_ROLE to the VEB", + encode_oz_grant_role( + contract=interface.TriggerableWithdrawalsGateway(TRIGGERABLE_WITHDRAWALS_GATEWAY), + role_name="ADD_FULL_WITHDRAWAL_REQUEST_ROLE", + grant_to=contracts.validators_exit_bus_oracle, + ) + ), + # --- WV + ( + f"9. Update WithdrawalVault implementation", + encode_wv_proxy_upgrade_to(contracts.withdrawal_vault, WITHDRAWAL_VAULT_IMPL) + ), + ( + f"10. Call finalizeUpgrade_v2 on WithdrawalVault", + ( + contracts.withdrawal_vault.address, + contracts.withdrawal_vault.finalizeUpgrade_v2.encode_input(), + ) + ), + # --- AO + ( + f"11. Update Accounting Oracle implementation", + encode_proxy_upgrade_to(contracts.accounting_oracle, ACCOUNTING_ORACLE_IMPL), + ), + ( + f"12. Grant AO MANAGE_CONSENSUS_VERSION_ROLE to the AGENT", + encode_oz_grant_role( + contract=contracts.accounting_oracle, + role_name="MANAGE_CONSENSUS_VERSION_ROLE", + grant_to=contracts.agent, + ) + ), + ( + f"13. Bump AO consensus version to `{AO_CONSENSUS_VERSION}`", + encode_oracle_upgrade_consensus(contracts.accounting_oracle, AO_CONSENSUS_VERSION) + ), + ( + f"14. Revoke AO MANAGE_CONSENSUS_VERSION_ROLE from the AGENT", + encode_oz_revoke_role( + contract=contracts.accounting_oracle, + role_name="MANAGE_CONSENSUS_VERSION_ROLE", + revoke_from=contracts.agent, + ) + ), + # --- SR + ( + f"15. Update SR implementation", + encode_staking_router_proxy_update(STAKING_ROUTER_IMPL) + ), + ( + f"16. Grant SR role REPORT_VALIDATOR_EXITING_STATUS_ROLE to ValidatorExitDelayVerifier", + encode_oz_grant_role( + contract=contracts.staking_router, + role_name="REPORT_VALIDATOR_EXITING_STATUS_ROLE", + grant_to=VALIDATOR_EXIT_VERIFIER, + ) + ), + ( + f"17. Grant SR role REPORT_VALIDATOR_EXIT_TRIGGERED_ROLE to TWG", + encode_oz_grant_role( + contract=contracts.staking_router, + role_name="REPORT_VALIDATOR_EXIT_TRIGGERED_ROLE", + grant_to=interface.TriggerableWithdrawalsGateway(TRIGGERABLE_WITHDRAWALS_GATEWAY), + ) + ), + # --- NOR and sDVT + ( + f"18. Grant APP_MANAGER_ROLE role to the AGENT", + ( + contracts.acl.address, + contracts.acl.grantPermission.encode_input( + AGENT, + ARAGON_KERNEL, + convert.to_uint(web3.keccak(text="APP_MANAGER_ROLE")) + ) + ) + ), + ( + f"19. Update `NodeOperatorsRegistry` implementation", + ( + contracts.kernel.address, + contracts.kernel.setApp.encode_input( + contracts.kernel.APP_BASES_NAMESPACE(), + NODE_OPERATORS_REGISTRY_ARAGON_APP_ID, + NODE_OPERATORS_REGISTRY_IMPL + ) + ) + ), + ( + f"20. Call finalizeUpgrade_v4 on NOR", + ( + interface.NodeOperatorsRegistry(contracts.node_operators_registry).address, + interface.NodeOperatorsRegistry(contracts.node_operators_registry).finalizeUpgrade_v4.encode_input( + NOR_EXIT_DEADLINE_IN_SEC + ) + ) + ), + ( + f"21. Update `SDVT` implementation", + ( + contracts.kernel.address, + contracts.kernel.setApp.encode_input( + contracts.kernel.APP_BASES_NAMESPACE(), + SIMPLE_DVT_ARAGON_APP_ID, + NODE_OPERATORS_REGISTRY_IMPL + ) + ) + ), + ( + f"22. Call finalizeUpgrade_v4 on SDVT", + ( + interface.NodeOperatorsRegistry(contracts.simple_dvt).address, + interface.NodeOperatorsRegistry(contracts.simple_dvt).finalizeUpgrade_v4.encode_input( + NOR_EXIT_DEADLINE_IN_SEC + ) + ) + ), + ( + f"23. Revoke APP_MANAGER_ROLE role from the AGENT", + ( + contracts.acl.address, + contracts.acl.revokePermission.encode_input( + AGENT, + ARAGON_KERNEL, + convert.to_uint(web3.keccak(text="APP_MANAGER_ROLE")) + ) + ) + ), + # --- Oracle configs --- + ( + f"24. Grant CONFIG_MANAGER_ROLE role to the AGENT", + encode_oz_grant_role( + contract=contracts.oracle_daemon_config, + role_name="CONFIG_MANAGER_ROLE", + grant_to=contracts.agent, + ) + ), + ( + f"25. Remove NODE_OPERATOR_NETWORK_PENETRATION_THRESHOLD_BP variable from OracleDaemonConfig", + ( + contracts.oracle_daemon_config.address, + contracts.oracle_daemon_config.unset.encode_input('NODE_OPERATOR_NETWORK_PENETRATION_THRESHOLD_BP'), + ), + ), + ( + f"26. Remove VALIDATOR_DELAYED_TIMEOUT_IN_SLOTS variable from OracleDaemonConfig", + ( + contracts.oracle_daemon_config.address, + contracts.oracle_daemon_config.unset.encode_input('VALIDATOR_DELAYED_TIMEOUT_IN_SLOTS'), + ), + ), + ( + f"27. Remove VALIDATOR_DELINQUENT_TIMEOUT_IN_SLOTS variable from OracleDaemonConfig", + ( + contracts.oracle_daemon_config.address, + contracts.oracle_daemon_config.unset.encode_input('VALIDATOR_DELINQUENT_TIMEOUT_IN_SLOTS'), + ), + ), + ( + f"28. Add EXIT_EVENTS_LOOKBACK_WINDOW_IN_SLOTS variable to OracleDaemonConfig", + ( + contracts.oracle_daemon_config.address, + contracts.oracle_daemon_config.set.encode_input('EXIT_EVENTS_LOOKBACK_WINDOW_IN_SLOTS', EXIT_EVENTS_LOOKBACK_WINDOW_IN_SLOTS), + ), + ), + # --- CSM + ( + f"29. Upgrade CSM implementation on proxy", + encode_proxy_upgrade_to( + contracts.csm, + CSM_IMPL_V2_ADDRESS, + ) + ), + ( + f"30. Call `finalizeUpgradeV2()` on CSM contract", + ( + contracts.csm.address, + contracts.csm.finalizeUpgradeV2.encode_input(), + ), + ), + ( + f"31. Upgrade CSAccounting implementation on proxy", + encode_proxy_upgrade_to( + contracts.cs_accounting, + CS_ACCOUNTING_IMPL_V2_ADDRESS, + ) + ), + ( + f"32. Call `finalizeUpgradeV2(bondCurves)` on CSAccounting contract", + ( + contracts.cs_accounting.address, + contracts.cs_accounting.finalizeUpgradeV2.encode_input(CS_CURVES), + ), + ), + ( + f"33. Upgrade CSFeeOracle implementation on proxy", + encode_proxy_upgrade_to( + contracts.cs_fee_oracle, + CS_FEE_ORACLE_IMPL_V2_ADDRESS, + ) + ), + ( + f"34. Call `finalizeUpgradeV2(consensusVersion)` on CSFeeOracle contract", + ( + contracts.cs_fee_oracle.address, + contracts.cs_fee_oracle.finalizeUpgradeV2.encode_input(CSM_CONSENSUS_VERSION), + ) + ), + ( + f"35. Upgrade CSFeeDistributor implementation on proxy", + encode_proxy_upgrade_to( + contracts.cs_fee_distributor, + CS_FEE_DISTRIBUTOR_IMPL_V2_ADDRESS, + ) + ), + ( + f"36. Call `finalizeUpgradeV2(admin)` on CSFeeDistributor contract", + ( + contracts.cs_fee_distributor.address, + contracts.cs_fee_distributor.finalizeUpgradeV2.encode_input(contracts.agent), + ) + ), + ( + f"37. Revoke CSAccounting role SET_BOND_CURVE_ROLE from the CSM contract", + encode_oz_revoke_role( + contract=contracts.cs_accounting, + role_name="SET_BOND_CURVE_ROLE", + revoke_from=contracts.csm, + ) + ), + ( + f"38. Revoke CSAccounting role RESET_BOND_CURVE_ROLE from the CSM contract", + encode_oz_revoke_role( + contract=contracts.cs_accounting, + role_name="RESET_BOND_CURVE_ROLE", + revoke_from=contracts.csm, + ) + ), + ( + f"39. Revoke CSAccounting role RESET_BOND_CURVE_ROLE from the CSM committee", + encode_oz_revoke_role( + contract=contracts.cs_accounting, + role_name="RESET_BOND_CURVE_ROLE", + revoke_from=CSM_COMMITTEE_MS, + ) + ), + ( + f"40. Grant CSM role CREATE_NODE_OPERATOR_ROLE for the permissionless gate", + encode_oz_grant_role( + contract=contracts.csm, + role_name="CREATE_NODE_OPERATOR_ROLE", + grant_to=CS_PERMISSIONLESS_GATE_ADDRESS, + ) + ), + ( + f"41. Grant CSM role CREATE_NODE_OPERATOR_ROLE for the vetted gate", + encode_oz_grant_role( + contract=contracts.csm, + role_name="CREATE_NODE_OPERATOR_ROLE", + grant_to=CS_VETTED_GATE_ADDRESS, + ) + ), + ( + f"42. Grant CSAccounting role SET_BOND_CURVE_ROLE for the vetted gate", + encode_oz_grant_role( + contract=contracts.cs_accounting, + role_name="SET_BOND_CURVE_ROLE", + grant_to=CS_VETTED_GATE_ADDRESS, + ) + ), + ( + f"43. Revoke role VERIFIER_ROLE from the previous instance of the Verifier contract", + encode_oz_revoke_role( + contract=contracts.csm, + role_name="VERIFIER_ROLE", + revoke_from=contracts.cs_verifier, + ) + ), + ( + f"44. Grant role VERIFIER_ROLE to the new instance of the Verifier contract", + encode_oz_grant_role( + contract=contracts.csm, + role_name="VERIFIER_ROLE", + grant_to=CS_VERIFIER_V2_ADDRESS, + ) + ), + ( + f"45. Revoke CSM role PAUSE_ROLE from the previous GateSeal instance", + encode_oz_revoke_role( + contract=contracts.csm, + role_name="PAUSE_ROLE", + revoke_from=CS_GATE_SEAL_ADDRESS, + ) + ), + ( + f"46. Revoke CSAccounting role PAUSE_ROLE from the previous GateSeal instance", + encode_oz_revoke_role( + contract=contracts.cs_accounting, + role_name="PAUSE_ROLE", + revoke_from=CS_GATE_SEAL_ADDRESS, + ) + ), + ( + f"47. Revoke CSFeeOracle role PAUSE_ROLE from the previous GateSeal instance", + encode_oz_revoke_role( + contract=contracts.cs_fee_oracle, + role_name="PAUSE_ROLE", + revoke_from=CS_GATE_SEAL_ADDRESS, + ) + ), + ( + f"48. Grant CSM role PAUSE_ROLE for the new GateSeal instance", + encode_oz_grant_role( + contract=contracts.csm, + role_name="PAUSE_ROLE", + grant_to=CS_GATE_SEAL_V2_ADDRESS, + ) + ), + ( + f"49. Grant CSAccounting role PAUSE_ROLE for the new GateSeal instance", + encode_oz_grant_role( + contract=contracts.cs_accounting, + role_name="PAUSE_ROLE", + grant_to=CS_GATE_SEAL_V2_ADDRESS, + ) + ), + ( + f"50. Grant CSFeeOracle role PAUSE_ROLE for the new GateSeal instance", + encode_oz_grant_role( + contract=contracts.cs_fee_oracle, + role_name="PAUSE_ROLE", + grant_to=CS_GATE_SEAL_V2_ADDRESS, + ) + ), + ( + "51. Grant MANAGE_BOND_CURVES_ROLE to the AGENT", + encode_oz_grant_role( + contract=contracts.cs_accounting, + role_name="MANAGE_BOND_CURVES_ROLE", + grant_to=contracts.agent, + ) + ), + ( + "52. Add Identified Community Stakers Gate Bond Curve", + ( + contracts.cs_accounting.address, + contracts.cs_accounting.addBondCurve.encode_input(CS_ICS_GATE_BOND_CURVE), + ), + ), + ( + "53. Revoke MANAGE_BOND_CURVES_ROLE from the AGENT", + encode_oz_revoke_role( + contract=contracts.cs_accounting, + role_name="MANAGE_BOND_CURVES_ROLE", + revoke_from=contracts.agent, + ) + ), + ( + "54. Increase CSM share in Staking Router from 3% to 5%", + encode_staking_router_update_csm_module_share() + ), + # --- Core Gate seals --- + # Revoke old GateSeal + ( + "55. Revoke PAUSE_ROLE on WithdrawalQueue 0xc7cc160b58F8Bb0baC94b80847E2CF2800565C50 from the old GateSeal 0xA34d620EA9F3e86bf8B8a7699B4dE44CD9D3202d", + encode_oz_revoke_role( + contract=contracts.withdrawal_queue, + role_name="PAUSE_ROLE", + revoke_from=OLD_GATE_SEAL_ADDRESS, + ), + ), + ( + "56. Revoke PAUSE_ROLE on ValidatorsExitBusOracle 0xffDDF7025410412deaa05E3E1cE68FE53208afcb from the old GateSeal 0xA34d620EA9F3e86bf8B8a7699B4dE44CD9D3202d", + encode_oz_revoke_role( + contract=contracts.validators_exit_bus_oracle, + role_name="PAUSE_ROLE", + revoke_from=OLD_GATE_SEAL_ADDRESS, + ) + ), + # Add new GateSeal + # Now we have two GateSeals: one for WithdrawalQueue and one for ValidatorsExitBusOracle and TriggerableWithdrawalsGateway. + ( + "57. Grant PAUSE_ROLE on WithdrawalQueue to the new GateSeal", + encode_oz_grant_role( + contract=contracts.withdrawal_queue, + role_name="PAUSE_ROLE", + grant_to=NEW_WQ_GATE_SEAL, + ) + ), + ( + "58. Grant PAUSE_ROLE on ValidatorsExitBusOracle to the new GateSeal", + encode_oz_grant_role( + contract=contracts.validators_exit_bus_oracle, + role_name="PAUSE_ROLE", + grant_to=NEW_TW_GATE_SEAL, + ) + ), + ( + "59. Grant PAUSE_ROLE on TWG to the new GateSeal", + encode_oz_grant_role( + contract=interface.TriggerableWithdrawalsGateway(TRIGGERABLE_WITHDRAWALS_GATEWAY), + role_name="PAUSE_ROLE", + grant_to=NEW_TW_GATE_SEAL, + ) + ), + # --- ResealManager --- + # Grant ResealManager PAUSE_ROLE on WithdrawalQueue, ValidatorsExitBusOracle and TWG + ( + "60. Grant PAUSE_ROLE on TWG to the new GateSeal", + encode_oz_grant_role( + contract=interface.TriggerableWithdrawalsGateway(TRIGGERABLE_WITHDRAWALS_GATEWAY), + role_name="PAUSE_ROLE", + grant_to=RESEAL_MANAGER, + ) + ), + # Grant ResealManager RESUME_ROLE on WithdrawalQueue, ValidatorsExitBusOracle and TWG + ( + "61. Grant PAUSE_ROLE on TWG to the new GateSeal", + encode_oz_grant_role( + contract=interface.TriggerableWithdrawalsGateway(TRIGGERABLE_WITHDRAWALS_GATEWAY), + role_name="RESUME_ROLE", + grant_to=RESEAL_MANAGER, + ) + ), + ( + "62. Call finalizeUpgrade_v3 on AO contract", + ( + contracts.accounting_oracle.address, + contracts.accounting_oracle.finalizeUpgrade_v3.encode_input(), + ) + ) + ) + + + dg_bypass_item = { + "63. Add CSSetVettedGateTree factory to EasyTrack with permissions": add_evmscript_factory( + factory=CS_SET_VETTED_GATE_TREE_FACTORY, + permissions=(create_permissions(interface.CSVettedGate(CS_VETTED_GATE_ADDRESS), "setTreeParams")), + ) + } + + if silent: + desc_ipfs = calculate_vote_ipfs_description(DESCRIPTION) + else: + desc_ipfs = upload_vote_ipfs_description(DESCRIPTION) + + dg_desc = "\n".join(vote_desc_items) + dg_vote = dual_governance_agent_forward(call_script_items, dg_desc) + vote_items = {dg_desc: dg_vote, **dg_bypass_item} + + assert confirm_vote_script(vote_items, silent, desc_ipfs) + + return create_vote(vote_items, tx_params, desc_ipfs=desc_ipfs) + + +def main(): + tx_params = {"from": get_deployer_account()} + 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}.") + + time.sleep(5) # hack for waiting thread #2. diff --git a/archive/scripts/vote_tw_csm2_hoodi.py b/archive/scripts/vote_tw_csm2_hoodi.py new file mode 100644 index 000000000..da0f3bd32 --- /dev/null +++ b/archive/scripts/vote_tw_csm2_hoodi.py @@ -0,0 +1,901 @@ +""" +Vote 23/07/2025 [HOODI] + +--- Locator +1. Update locator implementation +--- VEB +2. Update VEBO implementation +3. Call finalizeUpgrade_v2(maxValidatorsPerReport, maxExitRequestsLimit, exitsPerFrame, frameDurationInSec) on VEBO +4. Grant VEBO role MANAGE_CONSENSUS_VERSION_ROLE to the AGENT +5. Bump VEBO consensus version to `4` +6. Revoke VEBO role MANAGE_CONSENSUS_VERSION_ROLE from the AGENT +7. Grant SUBMIT_REPORT_HASH_ROLE on Validator Exit Bus Oracle to the EasyTrack EVM Script Executor +--- Triggerable Withdrawals Gateway (TWG) +8. Grant TWG role ADD_FULL_WITHDRAWAL_REQUEST_ROLE to the CS Ejector +9. Grant TWG role ADD_FULL_WITHDRAWAL_REQUEST_ROLE to the VEB +10. Connect TRIGGERABLE_WITHDRAWALS_GATEWAY to Dual Governance tiebreaker +--- WV +11. Update WithdrawalVault implementation +12. Call finalizeUpgrade_v2() on WithdrawalVault +--- AO +13. Update Accounting Oracle implementation +14. Grant AO MANAGE_CONSENSUS_VERSION_ROLE to the AGENT +15. Bump AO consensus version to `4` +16. Revoke AO MANAGE_CONSENSUS_VERSION_ROLE from the AGENT +17. Call finalizeUpgrade_v3() on AO +--- SR +18. Update SR implementation +19. Call finalizeUpgrade_v3() on SR +20. Grant SR role REPORT_VALIDATOR_EXITING_STATUS_ROLE to ValidatorExitVerifier +21. Grant SR role REPORT_VALIDATOR_EXIT_TRIGGERED_ROLE to TWG +--- Curated Staking Module +22. Grant APP_MANAGER_ROLE role to the AGENT on Kernel +23. Update `NodeOperatorsRegistry` implementation +24. Call finalizeUpgrade_v4 on Curated Staking Module +--- sDVT +25. Update `SimpleDVT` implementation +26. Call finalizeUpgrade_v4 on sDVT +27. Revoke APP_MANAGER_ROLE role from the AGENT on Kernel +--- Oracle configs --- +28. Grant CONFIG_MANAGER_ROLE role to the AGENT +29. Remove NODE_OPERATOR_NETWORK_PENETRATION_THRESHOLD_BP variable from OracleDaemonConfig +30. Remove VALIDATOR_DELAYED_TIMEOUT_IN_SLOTS variable from OracleDaemonConfig +31. Remove VALIDATOR_DELINQUENT_TIMEOUT_IN_SLOTS variable from OracleDaemonConfig +32. Add EXIT_EVENTS_LOOKBACK_WINDOW_IN_SLOTS variable to OracleDaemonConfig +33. Revoke CONFIG_MANAGER_ROLE role from the AGENT +--- CSM --- +34. Upgrade CSM implementation on proxy +35. Call `finalizeUpgradeV2()` on CSM contract +36. Upgrade CSAccounting implementation on proxy +37. Call `finalizeUpgradeV2(bondCurves)` on CSAccounting contract +38. Upgrade CSFeeOracle implementation on proxy +39. Call `finalizeUpgradeV2(consensusVersion)` on CSFeeOracle contract +40. Upgrade CSFeeDistributor implementation on proxy +41. Call `finalizeUpgradeV2(admin)` on CSFeeDistributor contract +42. Revoke CSAccounting role SET_BOND_CURVE_ROLE from the CSM contract +43. Revoke CSAccounting role RESET_BOND_CURVE_ROLE from the CSM contract +44. Revoke CSAccounting role RESET_BOND_CURVE_ROLE from the CSM committee +45. Grant CSM role CREATE_NODE_OPERATOR_ROLE for the permissionless gate +46. Grant CSM role CREATE_NODE_OPERATOR_ROLE for the vetted gate +47. Grant CSAccounting role SET_BOND_CURVE_ROLE for the vetted gate +48. Revoke role VERIFIER_ROLE from the previous instance of the Verifier contract +49. Grant role VERIFIER_ROLE to the new instance of the Verifier contract +50. Revoke CSM role PAUSE_ROLE from the previous GateSeal instance +51. Revoke CSAccounting role PAUSE_ROLE from the previous GateSeal instance +52. Revoke CSFeeOracle role PAUSE_ROLE from the previous GateSeal instance +53. Grant CSM role PAUSE_ROLE for the new GateSeal instance +54. Grant CSAccounting role PAUSE_ROLE for the new GateSeal instance +55. Grant CSFeeOracle role PAUSE_ROLE for the new GateSeal instance +56. Grant MANAGE_BOND_CURVES_ROLE to the AGENT +57. Add Identified Community Stakers Gate Bond Curve +58. Revoke MANAGE_BOND_CURVES_ROLE from the AGENT +59. Increase CSM share in Staking Router from 15% to 16% +--- Gate Seals --- +60. Revoke PAUSE_ROLE on WithdrawalQueue from the old GateSeal +61. Revoke PAUSE_ROLE on ValidatorsExitBusOracle from the old GateSeal +62. Grant PAUSE_ROLE on WithdrawalQueue to the new WithdrawalQueue GateSeal +63. Grant PAUSE_ROLE on ValidatorsExitBusOracle to the new Triggerable Withdrawals GateSeal +64. Grant PAUSE_ROLE on TriggerableWithdrawalsGateway to the new Triggerable Withdrawals GateSeal +--- ResealManager --- +65. Grant PAUSE_ROLE on TriggerableWithdrawalsGateway to ResealManager +66. Grant RESUME_ROLE on TriggerableWithdrawalsGateway to ResealManager +--- EasyTrack --- +67. Add CSSetVettedGateTree factory to EasyTrack with permissions +68. Add `SubmitValidatorsExitRequestHashes` (SDVT) EVM script factory to Easy Track +69. Add `SubmitValidatorsExitRequestHashes` (Curated Module) EVM script factory to Easy Track + +Vote passed & executed on Jul-23-2025 12:54:36 PM UTC, block 862608 +""" +import time + +from typing import TYPE_CHECKING, Any, Dict +from typing import Tuple, Optional, Sequence +from brownie import interface, web3, convert, ZERO_ADDRESS # type: ignore +from utils.agent import agent_forward +from utils.config import ( + CSM_COMMITTEE_MS, + CS_MODULE_ID, + CS_MODULE_MODULE_FEE_BP, + CS_MODULE_TREASURY_FEE_BP, + CS_MODULE_MAX_DEPOSITS_PER_BLOCK, + CS_MODULE_MIN_DEPOSIT_BLOCK_DISTANCE, + CS_MODULE_TARGET_SHARE_BP, + CS_GATE_SEAL_ADDRESS, + NODE_OPERATORS_REGISTRY_ARAGON_APP_ID, + SIMPLE_DVT_ARAGON_APP_ID, + ARAGON_KERNEL, + AGENT, + contracts, +) +from utils.ipfs import upload_vote_ipfs_description, calculate_vote_ipfs_description +from utils.permissions import encode_oz_grant_role, encode_oz_revoke_role +from utils.easy_track import ( + add_evmscript_factory, + create_permissions, +) +from utils.voting import confirm_vote_script, create_vote +from utils.config import get_deployer_account, get_priority_fee, get_is_live + +DESCRIPTION = "Triggerable withdrawals and CSM v2 upgrade voting (HOODI)" + +# New core contracts implementations +LIDO_LOCATOR_IMPL = "0x003f20CD17e7683A7F88A7AfF004f0C44F0cfB31" +ACCOUNTING_ORACLE_IMPL = "0x2341c9BE0E639f262f8170f9ef1efeCC92cCF617" +VALIDATORS_EXIT_BUS_ORACLE_IMPL = "0x7E6d9C9C44417bf2EaF69685981646e9752D623A" +WITHDRAWAL_VAULT_IMPL = "0xfe7A58960Af333eAdeAeC39149F9d6A71dc3E668" +STAKING_ROUTER_IMPL = "0xd5F04A81ac472B2cB32073CE9dDABa6FaF022827" +NODE_OPERATORS_REGISTRY_IMPL = "0x95F00b016bB31b7182D96D25074684518246E42a" + +TRIGGERABLE_WITHDRAWALS_GATEWAY = "0x6679090D92b08a2a686eF8614feECD8cDFE209db" +VALIDATOR_EXIT_VERIFIER = "0xFd4386A8795956f4B6D01cbb6dB116749731D7bD" + +# Oracle consensus versions +AO_CONSENSUS_VERSION = 4 +VEBO_CONSENSUS_VERSION = 4 +CSM_CONSENSUS_VERSION = 3 + +# Fixed constants from Holesky version +EXIT_EVENTS_LOOKBACK_WINDOW_IN_SLOTS = 14 * 7200 # 14 days in slots (assuming 12 seconds per slot) +NOR_EXIT_DEADLINE_IN_SEC = 172800 # 172800 + +# VEB parameters from Holesky +MAX_VALIDATORS_PER_REPORT = 600 +MAX_EXIT_REQUESTS_LIMIT = 11200 +EXITS_PER_FRAME = 1 +FRAME_DURATION_IN_SEC = 48 + +# CSM +CS_MODULE_NEW_TARGET_SHARE_BP = 1600 # 16% +CS_MODULE_NEW_PRIORITY_EXIT_THRESHOLD_BP = 2100 # 21% + +CS_ACCOUNTING_IMPL_V2_ADDRESS = "0x9483b34504292a0E4f6509e5887D2c68f7129638" +CS_FEE_DISTRIBUTOR_IMPL_V2_ADDRESS = "0xe05F7Aab7177D73f26e62a5296120583F5F18031" +CS_FEE_ORACLE_IMPL_V2_ADDRESS = "0x752fF00fcacdB66Bc512a067F15A5E0B0b50EADB" +CSM_IMPL_V2_ADDRESS = "0x9aE387EB2abA80B9B1ebc145597D593EFAE61f31" + +CS_GATE_SEAL_V2_ADDRESS = "0x94a3aEB0E9148F64CB453Be2BDe2Bc0148f6AC24" +CS_EJECTOR_ADDRESS = "0x21e271cBa32672B106737AbeB3a45E53Fe9a0df4" +CS_PERMISSIONLESS_GATE_ADDRESS = "0x5553077102322689876A6AdFd48D75014c28acfb" +CS_VETTED_GATE_ADDRESS = "0x10a254E724fe2b7f305F76f3F116a3969c53845f" +CS_VERIFIER_V2_ADDRESS = "0xf805b3711cBB48F15Ae2bb27095ddC38c5339968" + +CS_CURVES = [ + ([1, 2.4 * 10**18], [2, 1.3 * 10**18]), # Default Curve + ([1, 1.5 * 10**18], [2, 1.3 * 10**18]), # Legacy EA Curve +] +CS_ICS_GATE_BOND_CURVE = ([1, 1.5 * 10**18], [2, 1.3 * 10**18]) # Identified Community Stakers Gate Bond Curve + +# Add missing constants +OLD_GATE_SEAL_ADDRESS = "0x2168Ea6D948Ab49c3D34c667A7e02F92369F3A9C" +NEW_WQ_GATE_SEAL = "0x73d76Bd3D589B2b2185c402da82cdAfbc18b958D" +NEW_TW_GATE_SEAL = "0x368f2fcb593170823cc844F1B29e75E3d26879A1" +RESEAL_MANAGER = "0x05172CbCDb7307228F781436b327679e4DAE166B" + +# Add EasyTrack constants +EASYTRACK_EVMSCRIPT_EXECUTOR = "0x79a20FD0FA36453B2F45eAbab19bfef43575Ba9E" +EASYTRACK_SDVT_SUBMIT_VALIDATOR_EXIT_REQUEST_HASHES_FACTORY = "0xAa3D6A8B52447F272c1E8FAaA06EA06658bd95E2" +EASYTRACK_CURATED_SUBMIT_VALIDATOR_EXIT_REQUEST_HASHES_FACTORY = "0x397206ecdbdcb1A55A75e60Fc4D054feC72E5f63" +EASYTRACK_CS_SET_VETTED_GATE_TREE_FACTORY = "0xa890fc73e1b771Ee6073e2402E631c312FF92Cd9" + + +def encode_staking_router_proxy_update(implementation: str) -> Tuple[str, str]: + proxy = interface.OssifiableProxy(contracts.staking_router) + return proxy.address, proxy.proxy__upgradeTo.encode_input(implementation) + + +def encode_proxy_upgrade_to(proxy: Any, implementation: str) -> Tuple[str, str]: + proxy = interface.OssifiableProxy(proxy) + return proxy.address, proxy.proxy__upgradeTo.encode_input(implementation) + + +def encode_wv_proxy_upgrade_to(proxy: Any, implementation: str) -> Tuple[str, str]: + proxy = interface.WithdrawalContractProxy(proxy) + + return proxy.address, proxy.proxy_upgradeTo.encode_input(implementation, b'') + + +def encode_oracle_upgrade_consensus(proxy: Any, consensus_version: int) -> Tuple[str, str]: + oracle = interface.BaseOracle(proxy) + return oracle.address, oracle.setConsensusVersion.encode_input(consensus_version) + + +def encode_staking_router_update_csm_module_share() -> Tuple[str, str]: + """Encode call to update CSM share limit""" + return ( + contracts.staking_router.address, + contracts.staking_router.updateStakingModule.encode_input( + CS_MODULE_ID, + CS_MODULE_NEW_TARGET_SHARE_BP, + CS_MODULE_NEW_PRIORITY_EXIT_THRESHOLD_BP, + CS_MODULE_MODULE_FEE_BP, + CS_MODULE_TREASURY_FEE_BP, + CS_MODULE_MAX_DEPOSITS_PER_BLOCK, + CS_MODULE_MIN_DEPOSIT_BLOCK_DISTANCE, + ) + ) + + +def to_percent(bp: int) -> float: + """ + Convert basis points to percentage. + """ + return bp / 10000 * 100 + + +def start_vote(tx_params: Dict[str, str], silent: bool) -> Tuple[int, Optional[Any]]: + vote_desc_items, call_script_items = zip( + # --- locator + ( + "1. Update locator implementation", + agent_forward([encode_proxy_upgrade_to(contracts.lido_locator, LIDO_LOCATOR_IMPL)]) + ), + # --- VEB + ( + "2. Update VEBO implementation", + agent_forward([encode_proxy_upgrade_to(contracts.validators_exit_bus_oracle, VALIDATORS_EXIT_BUS_ORACLE_IMPL)]) + ), + ( + "3. Call finalizeUpgrade_v2 on VEBO", + agent_forward([ + ( + contracts.validators_exit_bus_oracle.address, + contracts.validators_exit_bus_oracle.finalizeUpgrade_v2.encode_input( + MAX_VALIDATORS_PER_REPORT, MAX_EXIT_REQUESTS_LIMIT, EXITS_PER_FRAME, FRAME_DURATION_IN_SEC + ), + ) + ]) + ), + ( + "4. Grant VEBO role MANAGE_CONSENSUS_VERSION_ROLE to the AGENT", + agent_forward([ + encode_oz_grant_role( + contract=contracts.validators_exit_bus_oracle, + role_name="MANAGE_CONSENSUS_VERSION_ROLE", + grant_to=contracts.agent, + ) + ]) + ), + ( + "5. Bump VEBO consensus version to `4`", + agent_forward([encode_oracle_upgrade_consensus(contracts.validators_exit_bus_oracle, VEBO_CONSENSUS_VERSION)]) + ), + ( + "6. Revoke VEBO role MANAGE_CONSENSUS_VERSION_ROLE from the AGENT", + agent_forward([ + encode_oz_revoke_role( + contract=contracts.validators_exit_bus_oracle, + role_name="MANAGE_CONSENSUS_VERSION_ROLE", + revoke_from=contracts.agent, + ) + ]) + ), + ( + "7. Grant SUBMIT_REPORT_HASH_ROLE on Validator Exit Bus Oracle to the EasyTrack EVM Script Executor", + agent_forward([ + encode_oz_grant_role( + contract=contracts.validators_exit_bus_oracle, + role_name="SUBMIT_REPORT_HASH_ROLE", + grant_to=EASYTRACK_EVMSCRIPT_EXECUTOR, + ) + ]) + ), + # --- Triggerable Withdrawals Gateway (TWG) + ( + "8. Grant TWG role ADD_FULL_WITHDRAWAL_REQUEST_ROLE to the CS Ejector", + agent_forward([ + encode_oz_grant_role( + contract=interface.TriggerableWithdrawalsGateway(TRIGGERABLE_WITHDRAWALS_GATEWAY), + role_name="ADD_FULL_WITHDRAWAL_REQUEST_ROLE", + grant_to=CS_EJECTOR_ADDRESS, + ) + ]) + ), + ( + "9. Grant TWG role ADD_FULL_WITHDRAWAL_REQUEST_ROLE to the VEB", + agent_forward([ + encode_oz_grant_role( + contract=interface.TriggerableWithdrawalsGateway(TRIGGERABLE_WITHDRAWALS_GATEWAY), + role_name="ADD_FULL_WITHDRAWAL_REQUEST_ROLE", + grant_to=contracts.validators_exit_bus_oracle, + ) + ]) + ), + ( + "10. Connect TRIGGERABLE_WITHDRAWALS_GATEWAY to Dual Governance tiebreaker", + ( + contracts.dual_governance.address, + contracts.dual_governance.addTiebreakerSealableWithdrawalBlocker.encode_input( + TRIGGERABLE_WITHDRAWALS_GATEWAY + ), + ) + ), + # --- WV + ( + "11. Update WithdrawalVault implementation", + agent_forward([encode_wv_proxy_upgrade_to(contracts.withdrawal_vault, WITHDRAWAL_VAULT_IMPL)]) + ), + ( + "12. Call finalizeUpgrade_v2 on WithdrawalVault", + agent_forward([ + ( + contracts.withdrawal_vault.address, + contracts.withdrawal_vault.finalizeUpgrade_v2.encode_input(), + ) + ]) + ), + # --- AO + ( + "13. Update Accounting Oracle implementation", + agent_forward([encode_proxy_upgrade_to(contracts.accounting_oracle, ACCOUNTING_ORACLE_IMPL)]) + ), + ( + "14. Grant AO MANAGE_CONSENSUS_VERSION_ROLE to the AGENT", + agent_forward([ + encode_oz_grant_role( + contract=contracts.accounting_oracle, + role_name="MANAGE_CONSENSUS_VERSION_ROLE", + grant_to=contracts.agent, + ) + ]) + ), + ( + "15. Bump AO consensus version to `4`", + agent_forward([encode_oracle_upgrade_consensus(contracts.accounting_oracle, AO_CONSENSUS_VERSION)]) + ), + ( + "16. Revoke AO MANAGE_CONSENSUS_VERSION_ROLE from the AGENT", + agent_forward([ + encode_oz_revoke_role( + contract=contracts.accounting_oracle, + role_name="MANAGE_CONSENSUS_VERSION_ROLE", + revoke_from=contracts.agent, + ) + ]) + ), + ( + "17. Call finalizeUpgrade_v3() on AO", + agent_forward([ + ( + contracts.accounting_oracle.address, + contracts.accounting_oracle.finalizeUpgrade_v3.encode_input(), + ) + ]) + ), + # --- SR + ( + "18. Update SR implementation", + agent_forward([encode_staking_router_proxy_update(STAKING_ROUTER_IMPL)]) + ), + ( + "19. Call finalizeUpgrade_v3() on SR", + agent_forward([( + contracts.staking_router.address, + contracts.staking_router.finalizeUpgrade_v3.encode_input(), + )]) + ), + ( + "20. Grant SR role REPORT_VALIDATOR_EXITING_STATUS_ROLE to ValidatorExitDelayVerifier", + agent_forward([ + encode_oz_grant_role( + contract=contracts.staking_router, + role_name="REPORT_VALIDATOR_EXITING_STATUS_ROLE", + grant_to=VALIDATOR_EXIT_VERIFIER, + ) + ]) + ), + ( + "21. Grant SR role REPORT_VALIDATOR_EXIT_TRIGGERED_ROLE to TWG", + agent_forward([ + encode_oz_grant_role( + contract=contracts.staking_router, + role_name="REPORT_VALIDATOR_EXIT_TRIGGERED_ROLE", + grant_to=interface.TriggerableWithdrawalsGateway(TRIGGERABLE_WITHDRAWALS_GATEWAY), + ) + ]) + ), + # --- Curated Staking Module and sDVT + ( + "22. Grant APP_MANAGER_ROLE role to the AGENT", + agent_forward([ + ( + contracts.acl.address, + contracts.acl.grantPermission.encode_input( + AGENT, + ARAGON_KERNEL, + convert.to_uint(web3.keccak(text="APP_MANAGER_ROLE")) + ) + ) + ]) + ), + ( + "23. Update `NodeOperatorsRegistry` implementation", + agent_forward([ + ( + contracts.kernel.address, + contracts.kernel.setApp.encode_input( + contracts.kernel.APP_BASES_NAMESPACE(), + NODE_OPERATORS_REGISTRY_ARAGON_APP_ID, + NODE_OPERATORS_REGISTRY_IMPL + ) + ) + ]) + ), + ( + "24. Call finalizeUpgrade_v4 on Curated Staking Module", + agent_forward([ + ( + interface.NodeOperatorsRegistry(contracts.node_operators_registry).address, + interface.NodeOperatorsRegistry(contracts.node_operators_registry).finalizeUpgrade_v4.encode_input( + NOR_EXIT_DEADLINE_IN_SEC + ) + ) + ]) + ), + ( + "25. Update `SDVT` implementation", + agent_forward([ + ( + contracts.kernel.address, + contracts.kernel.setApp.encode_input( + contracts.kernel.APP_BASES_NAMESPACE(), + SIMPLE_DVT_ARAGON_APP_ID, + NODE_OPERATORS_REGISTRY_IMPL + ) + ) + ]) + ), + ( + "26. Call finalizeUpgrade_v4 on SDVT", + agent_forward([ + ( + interface.NodeOperatorsRegistry(contracts.simple_dvt).address, + interface.NodeOperatorsRegistry(contracts.simple_dvt).finalizeUpgrade_v4.encode_input( + NOR_EXIT_DEADLINE_IN_SEC + ) + ) + ]) + ), + ( + "27. Revoke APP_MANAGER_ROLE role from the AGENT", + agent_forward([ + ( + contracts.acl.address, + contracts.acl.revokePermission.encode_input( + AGENT, + ARAGON_KERNEL, + convert.to_uint(web3.keccak(text="APP_MANAGER_ROLE")) + ) + ) + ]) + ), + # --- Oracle configs + ( + "28. Grant CONFIG_MANAGER_ROLE role to the AGENT", + agent_forward([ + encode_oz_grant_role( + contract=contracts.oracle_daemon_config, + role_name="CONFIG_MANAGER_ROLE", + grant_to=contracts.agent, + ) + ]) + ), + ( + "29. Remove NODE_OPERATOR_NETWORK_PENETRATION_THRESHOLD_BP variable from OracleDaemonConfig", + agent_forward([ + ( + contracts.oracle_daemon_config.address, + contracts.oracle_daemon_config.unset.encode_input('NODE_OPERATOR_NETWORK_PENETRATION_THRESHOLD_BP'), + ) + ]) + ), + ( + "30. Remove VALIDATOR_DELAYED_TIMEOUT_IN_SLOTS variable from OracleDaemonConfig", + agent_forward([ + ( + contracts.oracle_daemon_config.address, + contracts.oracle_daemon_config.unset.encode_input('VALIDATOR_DELAYED_TIMEOUT_IN_SLOTS'), + ) + ]) + ), + ( + "31. Remove VALIDATOR_DELINQUENT_TIMEOUT_IN_SLOTS variable from OracleDaemonConfig", + agent_forward([ + ( + contracts.oracle_daemon_config.address, + contracts.oracle_daemon_config.unset.encode_input('VALIDATOR_DELINQUENT_TIMEOUT_IN_SLOTS'), + ) + ]) + ), + ( + "32. Add EXIT_EVENTS_LOOKBACK_WINDOW_IN_SLOTS variable to OracleDaemonConfig", + agent_forward([ + ( + contracts.oracle_daemon_config.address, + contracts.oracle_daemon_config.set.encode_input('EXIT_EVENTS_LOOKBACK_WINDOW_IN_SLOTS', EXIT_EVENTS_LOOKBACK_WINDOW_IN_SLOTS), + ) + ]) + ), + ( + "33. Revoke CONFIG_MANAGER_ROLE role from the AGENT", + agent_forward([ + encode_oz_revoke_role( + contract=contracts.oracle_daemon_config, + role_name="CONFIG_MANAGER_ROLE", + revoke_from=contracts.agent, + ) + ]) + ), + # --- CSM + ( + "34. Upgrade CSM implementation on proxy", + agent_forward([ + encode_proxy_upgrade_to( + contracts.csm, + CSM_IMPL_V2_ADDRESS, + ) + ]) + ), + ( + "35. Call `finalizeUpgradeV2()` on CSM contract", + agent_forward([ + ( + contracts.csm.address, + contracts.csm.finalizeUpgradeV2.encode_input(), + ) + ]) + ), + ( + "36. Upgrade CSAccounting implementation on proxy", + agent_forward([ + encode_proxy_upgrade_to( + contracts.cs_accounting, + CS_ACCOUNTING_IMPL_V2_ADDRESS, + ) + ]) + ), + ( + "37. Call `finalizeUpgradeV2(bondCurves)` on CSAccounting contract", + agent_forward([ + ( + contracts.cs_accounting.address, + contracts.cs_accounting.finalizeUpgradeV2.encode_input(CS_CURVES), + ) + ]) + ), + ( + "38. Upgrade CSFeeOracle implementation on proxy", + agent_forward([ + encode_proxy_upgrade_to( + contracts.cs_fee_oracle, + CS_FEE_ORACLE_IMPL_V2_ADDRESS, + ) + ]) + ), + ( + "39. Call `finalizeUpgradeV2(consensusVersion)` on CSFeeOracle contract", + agent_forward([ + ( + contracts.cs_fee_oracle.address, + contracts.cs_fee_oracle.finalizeUpgradeV2.encode_input(CSM_CONSENSUS_VERSION), + ) + ]) + ), + ( + "40. Upgrade CSFeeDistributor implementation on proxy", + agent_forward([ + encode_proxy_upgrade_to( + contracts.cs_fee_distributor, + CS_FEE_DISTRIBUTOR_IMPL_V2_ADDRESS, + ) + ]) + ), + ( + "41. Call `finalizeUpgradeV2(admin)` on CSFeeDistributor contract", + agent_forward([ + ( + contracts.cs_fee_distributor.address, + contracts.cs_fee_distributor.finalizeUpgradeV2.encode_input(contracts.agent), + ) + ]) + ), + ( + "42. Revoke CSAccounting role SET_BOND_CURVE_ROLE from the CSM contract", + agent_forward([ + encode_oz_revoke_role( + contract=contracts.cs_accounting, + role_name="SET_BOND_CURVE_ROLE", + revoke_from=contracts.csm, + ) + ]) + ), + ( + "43. Revoke CSAccounting role RESET_BOND_CURVE_ROLE from the CSM contract", + agent_forward([ + encode_oz_revoke_role( + contract=contracts.cs_accounting, + role_name="RESET_BOND_CURVE_ROLE", + revoke_from=contracts.csm, + ) + ]) + ), + ( + "44. Revoke CSAccounting role RESET_BOND_CURVE_ROLE from the CSM committee", + agent_forward([ + encode_oz_revoke_role( + contract=contracts.cs_accounting, + role_name="RESET_BOND_CURVE_ROLE", + revoke_from=CSM_COMMITTEE_MS, + ) + ]) + ), + ( + "45. Grant CSM role CREATE_NODE_OPERATOR_ROLE for the permissionless gate", + agent_forward([ + encode_oz_grant_role( + contract=contracts.csm, + role_name="CREATE_NODE_OPERATOR_ROLE", + grant_to=CS_PERMISSIONLESS_GATE_ADDRESS, + ) + ]) + ), + ( + "46. Grant CSM role CREATE_NODE_OPERATOR_ROLE for the vetted gate", + agent_forward([ + encode_oz_grant_role( + contract=contracts.csm, + role_name="CREATE_NODE_OPERATOR_ROLE", + grant_to=CS_VETTED_GATE_ADDRESS, + ) + ]) + ), + ( + "47. Grant CSAccounting role SET_BOND_CURVE_ROLE for the vetted gate", + agent_forward([ + encode_oz_grant_role( + contract=contracts.cs_accounting, + role_name="SET_BOND_CURVE_ROLE", + grant_to=CS_VETTED_GATE_ADDRESS, + ) + ]) + ), + ( + "48. Revoke role VERIFIER_ROLE from the previous instance of the Verifier contract", + agent_forward([ + encode_oz_revoke_role( + contract=contracts.csm, + role_name="VERIFIER_ROLE", + revoke_from=contracts.cs_verifier, + ) + ]) + ), + ( + "49. Grant role VERIFIER_ROLE to the new instance of the Verifier contract", + agent_forward([ + encode_oz_grant_role( + contract=contracts.csm, + role_name="VERIFIER_ROLE", + grant_to=CS_VERIFIER_V2_ADDRESS, + ) + ]) + ), + ( + "50. Revoke CSM role PAUSE_ROLE from the previous GateSeal instance", + agent_forward([ + encode_oz_revoke_role( + contract=contracts.csm, + role_name="PAUSE_ROLE", + revoke_from=CS_GATE_SEAL_ADDRESS, + ) + ]) + ), + ( + "51. Revoke CSAccounting role PAUSE_ROLE from the previous GateSeal instance", + agent_forward([ + encode_oz_revoke_role( + contract=contracts.cs_accounting, + role_name="PAUSE_ROLE", + revoke_from=CS_GATE_SEAL_ADDRESS, + ) + ]) + ), + ( + "52. Revoke CSFeeOracle role PAUSE_ROLE from the previous GateSeal instance", + agent_forward([ + encode_oz_revoke_role( + contract=contracts.cs_fee_oracle, + role_name="PAUSE_ROLE", + revoke_from=CS_GATE_SEAL_ADDRESS, + ) + ]) + ), + ( + "53. Grant CSM role PAUSE_ROLE for the new GateSeal instance", + agent_forward([ + encode_oz_grant_role( + contract=contracts.csm, + role_name="PAUSE_ROLE", + grant_to=CS_GATE_SEAL_V2_ADDRESS, + ) + ]) + ), + ( + "54. Grant CSAccounting role PAUSE_ROLE for the new GateSeal instance", + agent_forward([ + encode_oz_grant_role( + contract=contracts.cs_accounting, + role_name="PAUSE_ROLE", + grant_to=CS_GATE_SEAL_V2_ADDRESS, + ) + ]) + ), + ( + "55. Grant CSFeeOracle role PAUSE_ROLE for the new GateSeal instance", + agent_forward([ + encode_oz_grant_role( + contract=contracts.cs_fee_oracle, + role_name="PAUSE_ROLE", + grant_to=CS_GATE_SEAL_V2_ADDRESS, + ) + ]) + ), + ( + "56. Grant MANAGE_BOND_CURVES_ROLE to the AGENT", + agent_forward([ + encode_oz_grant_role( + contract=contracts.cs_accounting, + role_name="MANAGE_BOND_CURVES_ROLE", + grant_to=contracts.agent, + ) + ]) + ), + ( + "57. Add Identified Community Stakers Gate Bond Curve", + agent_forward([ + ( + contracts.cs_accounting.address, + contracts.cs_accounting.addBondCurve.encode_input(CS_ICS_GATE_BOND_CURVE), + ) + ]) + ), + ( + "58. Revoke MANAGE_BOND_CURVES_ROLE from the AGENT", + agent_forward([ + encode_oz_revoke_role( + contract=contracts.cs_accounting, + role_name="MANAGE_BOND_CURVES_ROLE", + revoke_from=contracts.agent, + ) + ]) + ), + ( + "59. Increase CSM share in Staking Router from 15% to 16%", + agent_forward([encode_staking_router_update_csm_module_share()]) + ), + # --- Gate Seals + ( + "60. Revoke PAUSE_ROLE on WithdrawalQueue from the old GateSeal", + agent_forward([ + encode_oz_revoke_role( + contract=contracts.withdrawal_queue, + role_name="PAUSE_ROLE", + revoke_from=OLD_GATE_SEAL_ADDRESS, + ) + ]) + ), + ( + "61. Revoke PAUSE_ROLE on ValidatorsExitBusOracle from the old GateSeal", + agent_forward([ + encode_oz_revoke_role( + contract=contracts.validators_exit_bus_oracle, + role_name="PAUSE_ROLE", + revoke_from=OLD_GATE_SEAL_ADDRESS, + ) + ]) + ), + ( + "62. Grant PAUSE_ROLE on WithdrawalQueue to the new WithdrawalQueue GateSeal", + agent_forward([ + encode_oz_grant_role( + contract=contracts.withdrawal_queue, + role_name="PAUSE_ROLE", + grant_to=NEW_WQ_GATE_SEAL, + ) + ]) + ), + ( + "63. Grant PAUSE_ROLE on ValidatorsExitBusOracle to the new Triggerable Withdrawals GateSeal", + agent_forward([ + encode_oz_grant_role( + contract=contracts.validators_exit_bus_oracle, + role_name="PAUSE_ROLE", + grant_to=NEW_TW_GATE_SEAL, + ) + ]) + ), + ( + "64. Grant PAUSE_ROLE on TriggerableWithdrawalsGateway to the new Triggerable Withdrawals GateSeal", + agent_forward([ + encode_oz_grant_role( + contract=interface.TriggerableWithdrawalsGateway(TRIGGERABLE_WITHDRAWALS_GATEWAY), + role_name="PAUSE_ROLE", + grant_to=NEW_TW_GATE_SEAL, + ) + ]) + ), + ( + "65. Grant PAUSE_ROLE on TriggerableWithdrawalsGateway to ResealManager", + agent_forward([ + encode_oz_grant_role( + contract=interface.TriggerableWithdrawalsGateway(TRIGGERABLE_WITHDRAWALS_GATEWAY), + role_name="PAUSE_ROLE", + grant_to=RESEAL_MANAGER, + ) + ]) + ), + ( + "66. Grant RESUME_ROLE on TriggerableWithdrawalsGateway to ResealManager", + agent_forward([ + encode_oz_grant_role( + contract=interface.TriggerableWithdrawalsGateway(TRIGGERABLE_WITHDRAWALS_GATEWAY), + role_name="RESUME_ROLE", + grant_to=RESEAL_MANAGER, + ) + ]) + ), + ) + + dg_bypass_item = { + "67. Add CSSetVettedGateTree factory to EasyTrack with permissions": add_evmscript_factory( + factory=EASYTRACK_CS_SET_VETTED_GATE_TREE_FACTORY, + permissions=(create_permissions(interface.CSVettedGate(CS_VETTED_GATE_ADDRESS), "setTreeParams")), + ), + "68. Add `SubmitValidatorsExitRequestHashes` (SDVT) EVM script factory to Easy Track": add_evmscript_factory( + factory=EASYTRACK_SDVT_SUBMIT_VALIDATOR_EXIT_REQUEST_HASHES_FACTORY, + permissions=(create_permissions(contracts.validators_exit_bus_oracle, "submitExitRequestsHash")), + ), + "69. Add `SubmitValidatorsExitRequestHashes` (Curated Module) EVM script factory to Easy Track": add_evmscript_factory( + factory=EASYTRACK_CURATED_SUBMIT_VALIDATOR_EXIT_REQUEST_HASHES_FACTORY, + permissions=(create_permissions(contracts.validators_exit_bus_oracle, "submitExitRequestsHash")), + ) + } + + if silent: + desc_ipfs = calculate_vote_ipfs_description(DESCRIPTION) + else: + desc_ipfs = upload_vote_ipfs_description(DESCRIPTION) + + dg_desc = "\n".join(vote_desc_items) + + dg_vote = prepare_proposal(call_script_items, dg_desc) + vote_items = {dg_desc: dg_vote, **dg_bypass_item} + + assert confirm_vote_script(vote_items, silent, desc_ipfs) + + return create_vote(vote_items, tx_params, desc_ipfs=desc_ipfs) + +def prepare_proposal( + call_script: Sequence[Tuple], + description: Optional[str] = "", +) -> Tuple[str, str]: + dual_governance = contracts.dual_governance + forwarded = [] + + for _call in call_script: + forwarded.append((_call[0], _call[1])) + + print(f"Forwarding call script to dual governance: {forwarded}") + return ( + contracts.dual_governance.address, + dual_governance.submitProposal.encode_input([(_call[0], 0, _call[1]) for _call in forwarded], description), + ) + +def main(): + tx_params = {"from": get_deployer_account()} + 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}.") + + time.sleep(5) # hack for waiting thread #2. diff --git a/archive/scripts/vote_update_sandbox_impl_holesky.py b/archive/scripts/vote_update_sandbox_impl_holesky.py new file mode 100644 index 000000000..00d0bbf34 --- /dev/null +++ b/archive/scripts/vote_update_sandbox_impl_holesky.py @@ -0,0 +1,102 @@ +""" +Vote XX/06/2025 [HOLESKY] + +1. Grant APP_MANAGER_ROLE role to the AGENT +2. Update `Sandbox Module` implementation +3. Call finalizeUpgrade_v4 on `Sandbox Module` +4. Revoke APP_MANAGER_ROLE role from the AGENT +""" +import time + +from typing import Any, Dict +from typing import Tuple, Optional +from brownie import interface, web3, convert # type: ignore +from utils.config import ( + ARAGON_KERNEL, + AGENT, + contracts, + get_deployer_account, + get_priority_fee, + get_is_live +) +from utils.ipfs import upload_vote_ipfs_description, calculate_vote_ipfs_description +from utils.agent import dual_governance_agent_forward +from utils.voting import confirm_vote_script, create_vote + +SANDBOX_APP_ID = "0x85d2fceef13a6c14c43527594f79fb91a8ef8f15024a43486efac8df2b11e632" +NODE_OPERATORS_REGISTRY_IMPL = "0x834aa47DCd21A32845099a78B4aBb17A7f0bD503" +NOR_EXIT_DEADLINE_IN_SEC = 172800 + +DESCRIPTION = "Update Sanbox Module Implementation (HOLESKY)" + +def start_vote(tx_params: Dict[str, str], silent: bool) -> Tuple[int, Optional[Any]]: + vote_desc_items, call_script_items = zip( + # --- Update Sanbox Module implementation [TESTNET ONLY] --- + ( + f"1. Grant APP_MANAGER_ROLE role to the AGENT", + ( + contracts.acl.address, + contracts.acl.grantPermission.encode_input( + AGENT, + ARAGON_KERNEL, + convert.to_uint(web3.keccak(text="APP_MANAGER_ROLE")) + ) + ) + ), + ( + f"2. Update `Sandbox Module` implementation", + ( + contracts.kernel.address, + contracts.kernel.setApp.encode_input( + contracts.kernel.APP_BASES_NAMESPACE(), + SANDBOX_APP_ID, + NODE_OPERATORS_REGISTRY_IMPL + ) + ) + ), + ( + f"3. Call finalizeUpgrade_v4 on `Sandbox Module`", + ( + interface.NodeOperatorsRegistry(contracts.sandbox).address, + interface.NodeOperatorsRegistry(contracts.sandbox).finalizeUpgrade_v4.encode_input( + NOR_EXIT_DEADLINE_IN_SEC + ) + ) + ), + ( + f"4. Revoke APP_MANAGER_ROLE role from the AGENT", + ( + contracts.acl.address, + contracts.acl.revokePermission.encode_input( + AGENT, + ARAGON_KERNEL, + convert.to_uint(web3.keccak(text="APP_MANAGER_ROLE")) + ) + ) + ), + ) + + if silent: + desc_ipfs = calculate_vote_ipfs_description(DESCRIPTION) + else: + desc_ipfs = upload_vote_ipfs_description(DESCRIPTION) + + dg_desc = "\n".join(vote_desc_items) + dg_vote = dual_governance_agent_forward(call_script_items, dg_desc) + vote_items = {dg_desc: dg_vote} + + assert confirm_vote_script(vote_items, silent, desc_ipfs) + + return create_vote(vote_items, tx_params, desc_ipfs=desc_ipfs) + + +def main(): + tx_params = {"from": get_deployer_account()} + 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}.") + + time.sleep(5) # hack for waiting thread #2. diff --git a/archive/scripts/vote_update_sandbox_impl_hoodi.py b/archive/scripts/vote_update_sandbox_impl_hoodi.py new file mode 100644 index 000000000..7489916d0 --- /dev/null +++ b/archive/scripts/vote_update_sandbox_impl_hoodi.py @@ -0,0 +1,105 @@ +""" +Vote 23/07/2025 [HOODI] + +1. Grant APP_MANAGER_ROLE role to the AGENT +2. Update `Sandbox Module` implementation +3. Call finalizeUpgrade_v4 on `Sandbox Module` +4. Revoke APP_MANAGER_ROLE role from the AGENT + +Vote passed & executed on Jul-23-2025 01:29:48 PM UTC, block 862773 +""" +import time + +from typing import Any, Dict +from typing import Tuple, Optional +from brownie import interface, web3, convert # type: ignore +from scripts.vote_tw_csm2_hoodi import prepare_proposal +from utils.agent import agent_forward +from utils.config import ( + ARAGON_KERNEL, + AGENT, + contracts, + get_deployer_account, + get_priority_fee, + get_is_live +) +from utils.ipfs import upload_vote_ipfs_description, calculate_vote_ipfs_description +from utils.voting import confirm_vote_script, create_vote + +SANDBOX_APP_ID = "0x85d2fceef13a6c14c43527594f79fb91a8ef8f15024a43486efac8df2b11e632" +NODE_OPERATORS_REGISTRY_IMPL = "0x95F00b016bB31b7182D96D25074684518246E42a" # Updated for Hoodi +NOR_EXIT_DEADLINE_IN_SEC = 172800 # 48 hours in seconds + +DESCRIPTION = "Update Sandbox Module Implementation (HOODI)" + +def start_vote(tx_params: Dict[str, str], silent: bool) -> Tuple[int, Optional[Any]]: + vote_desc_items, call_script_items = zip( + # --- Update Sandbox Module implementation [TESTNET ONLY] --- + ( + f"1. Grant APP_MANAGER_ROLE role to the AGENT", + agent_forward([( + contracts.acl.address, + contracts.acl.grantPermission.encode_input( + AGENT, + ARAGON_KERNEL, + convert.to_uint(web3.keccak(text="APP_MANAGER_ROLE")) + ) + )]) + ), + ( + f"2. Update `Sandbox Module` implementation", + agent_forward([( + contracts.kernel.address, + contracts.kernel.setApp.encode_input( + contracts.kernel.APP_BASES_NAMESPACE(), + SANDBOX_APP_ID, + NODE_OPERATORS_REGISTRY_IMPL + ) + )]) + ), + ( + f"3. Call finalizeUpgrade_v4 on `Sandbox Module`", + agent_forward([( + interface.NodeOperatorsRegistry(contracts.sandbox).address, + interface.NodeOperatorsRegistry(contracts.sandbox).finalizeUpgrade_v4.encode_input( + NOR_EXIT_DEADLINE_IN_SEC + ) + )]), + ), + ( + f"4. Revoke APP_MANAGER_ROLE role from the AGENT", + agent_forward([( + contracts.acl.address, + contracts.acl.revokePermission.encode_input( + AGENT, + ARAGON_KERNEL, + convert.to_uint(web3.keccak(text="APP_MANAGER_ROLE")) + ) + )]), + ), + ) + + if silent: + desc_ipfs = calculate_vote_ipfs_description(DESCRIPTION) + else: + desc_ipfs = upload_vote_ipfs_description(DESCRIPTION) + + dg_desc = "\n".join(vote_desc_items) + dg_vote = prepare_proposal(call_script_items, dg_desc) + vote_items = {dg_desc: dg_vote} + + assert confirm_vote_script(vote_items, silent, desc_ipfs) + + return create_vote(vote_items, tx_params, desc_ipfs=desc_ipfs) + + +def main(): + tx_params = {"from": get_deployer_account()} + 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}.") + + time.sleep(5) # hack for waiting thread #2. diff --git a/archive/tests/test_vote_dg_easy_track_tw_holesky.py b/archive/tests/test_vote_dg_easy_track_tw_holesky.py new file mode 100644 index 000000000..f70d7235d --- /dev/null +++ b/archive/tests/test_vote_dg_easy_track_tw_holesky.py @@ -0,0 +1,77 @@ +from archive.scripts.vote_dg_easy_track_tw_holesky import start_vote +from brownie import interface, chain, web3 # type: ignore +from utils.dual_governance import wait_for_noon_utc_to_satisfy_time_constrains +from utils.config import ( + DUAL_GOVERNANCE, + TIMELOCK, + LDO_HOLDER_ADDRESS_FOR_TESTS, + contracts, +) + +# Implementation address from vote script +TRIGGERABLE_WITHDRAWALS_GATEWAY = "0x4FD4113f2B92856B59BC3be77f2943B7F4eaa9a5" + +EASYTRACK_EVMSCRIPT_EXECUTOR = "0x2819B65021E13CEEB9AC33E77DB32c7e64e7520D" + +EASYTRACK_SDVT_SUBMIT_VALIDATOR_EXIT_REQUEST_HASHES_FACTORY = "0x4aB23f409F8F6EdeF321C735e941E4670804a1B4" +EASYTRACK_CURATED_SUBMIT_VALIDATOR_EXIT_REQUEST_HASHES_FACTORY = "0x7A1c5af4625dc1160a7c67d00335B6Ad492bE53f" + + +def test_vote(helpers, accounts, vote_ids_from_env, stranger): + triggerable_withdrawals_gateway = interface.TriggerableWithdrawalsGateway(TRIGGERABLE_WITHDRAWALS_GATEWAY) + + timelock = interface.EmergencyProtectedTimelock(TIMELOCK) + dual_governance = interface.DualGovernance(DUAL_GOVERNANCE) + submit_exit_hashes_role = web3.keccak(text="SUBMIT_REPORT_HASH_ROLE") + initial_factories = contracts.easy_track.getEVMScriptFactories() + DG_OLD_WITHDRAWAL_BLOCKERS = ( + contracts.withdrawal_queue.address, + contracts.validators_exit_bus_oracle.address, + ) + + DG_NEW_WITHDRAWAL_BLOCKERS = ( + contracts.withdrawal_queue.address, + contracts.validators_exit_bus_oracle.address, + triggerable_withdrawals_gateway.address, + ) + + tiebreaker_details = contracts.dual_governance.getTiebreakerDetails() + assert tiebreaker_details[3] == DG_OLD_WITHDRAWAL_BLOCKERS, "Old withdrawal blockers should be set in Dual Governance before vote" + + + assert not contracts.validators_exit_bus_oracle.hasRole(submit_exit_hashes_role, EASYTRACK_EVMSCRIPT_EXECUTOR) + # SDVT EVM script factory is not in Easy Track + assert EASYTRACK_SDVT_SUBMIT_VALIDATOR_EXIT_REQUEST_HASHES_FACTORY not in initial_factories, "EasyTrack should not have SDVT Submit Validator Exit Request Hashes factory before vote" + # Curated EVM script factory is not in Easy Track + assert EASYTRACK_CURATED_SUBMIT_VALIDATOR_EXIT_REQUEST_HASHES_FACTORY not in initial_factories, "EasyTrack should not have Curated Submit Validator Exit Request Hashes factory before vote" + # START VOTE + if len(vote_ids_from_env) > 0: + (vote_id,) = vote_ids_from_env + else: + tx_params = {"from": LDO_HOLDER_ADDRESS_FOR_TESTS} + vote_id, _ = start_vote(tx_params, silent=True) + + vote_tx = helpers.execute_vote(accounts, vote_id, contracts.voting) + print(f"voteId = {vote_id}") + + proposal_id = vote_tx.events["ProposalSubmitted"][1]["proposalId"] + print(f"proposalId = {proposal_id}") + + chain.sleep(timelock.getAfterSubmitDelay() + 1) + dual_governance.scheduleProposal(proposal_id, {"from": stranger}) + + chain.sleep(timelock.getAfterScheduleDelay() + 1) + wait_for_noon_utc_to_satisfy_time_constrains() + + dg_tx = timelock.execute(proposal_id, {"from": stranger}) + # Check DG WITHDRAWAL_BLOCKERS + tiebreaker_details = contracts.dual_governance.getTiebreakerDetails() + print(f"tiebreaker_details = {tiebreaker_details[3]}") + assert tiebreaker_details[3] == DG_NEW_WITHDRAWAL_BLOCKERS, "New withdrawal blockers should be set in Dual Governance after vote" + + assert contracts.validators_exit_bus_oracle.hasRole(submit_exit_hashes_role, EASYTRACK_EVMSCRIPT_EXECUTOR) + new_factories = contracts.easy_track.getEVMScriptFactories() + # SDVT EVM script factory is added to Easy Track + assert EASYTRACK_SDVT_SUBMIT_VALIDATOR_EXIT_REQUEST_HASHES_FACTORY in new_factories, "EasyTrack should have SDVT Submit Validator Exit Request Hashes factory after vote" + # Curated EVM script factory is added to Easy Track + assert EASYTRACK_CURATED_SUBMIT_VALIDATOR_EXIT_REQUEST_HASHES_FACTORY in new_factories, "EasyTrack should have Curated Submit Validator Exit Request Hashes factory after vote" diff --git a/archive/tests/test_vote_tw_csm2_holesky.py b/archive/tests/test_vote_tw_csm2_holesky.py new file mode 100644 index 000000000..70275d18a --- /dev/null +++ b/archive/tests/test_vote_tw_csm2_holesky.py @@ -0,0 +1,938 @@ +from typing import Optional +from scripts.vote_tw_csm2_holesky import start_vote +from brownie import interface, reverts, chain, convert, web3, ZERO_ADDRESS # type: ignore +from brownie.network.event import EventDict +from utils.easy_track import create_permissions +from utils.test.tx_tracing_helpers import group_voting_events_from_receipt, group_dg_events_from_receipt +from utils.test.event_validators.easy_track import validate_evmscript_factory_added_event, EVMScriptFactoryAdded +from utils.test.event_validators.dual_governance import validate_dual_governance_submit_event +from utils.dual_governance import wait_for_noon_utc_to_satisfy_time_constrains +from utils.config import ( + DUAL_GOVERNANCE, + TIMELOCK, + DUAL_GOVERNANCE_EXECUTORS, + LDO_HOLDER_ADDRESS_FOR_TESTS, + CS_MODULE_ID, + CS_MODULE_MODULE_FEE_BP, + CS_MODULE_MAX_DEPOSITS_PER_BLOCK, + CS_MODULE_MIN_DEPOSIT_BLOCK_DISTANCE, + CS_MODULE_TREASURY_FEE_BP, + CS_GATE_SEAL_ADDRESS, + CSM_COMMITTEE_MS, + ARAGON_KERNEL, + AGENT, + VOTING, + contracts, +) + + +def validate_proxy_upgrade_event(event: EventDict, implementation: str, emitted_by: Optional[str] = None): + assert "Upgraded" in event, "No Upgraded event found" + + assert event["Upgraded"][0]["implementation"] == implementation, "Wrong implementation address" + + if emitted_by is not None: + assert convert.to_address(event["Upgraded"][0]["_emitted_by"]) == convert.to_address(emitted_by), "Wrong event emitter" + + +def validate_consensus_version_set_event(event: EventDict, new_version: int, prev_version: int, emitted_by: Optional[str] = None): + assert "ConsensusVersionSet" in event, "No ConsensusVersionSet event found" + + assert event["ConsensusVersionSet"][0]["version"] == new_version, "Wrong new version" + + assert event["ConsensusVersionSet"][0]["prevVersion"] == prev_version, "Wrong previous version" + + if emitted_by is not None: + assert convert.to_address(event["ConsensusVersionSet"][0]["_emitted_by"]) == convert.to_address(emitted_by), "Wrong event emitter" + + +def validate_role_grant_event(event: EventDict, role_hash: str, account: str, emitted_by: Optional[str] = None): + assert "RoleGranted" in event, "No RoleGranted event found" + + # Strip 0x prefix for consistent comparison + expected_role_hash = role_hash.replace('0x', '') + actual_role_hash = event["RoleGranted"][0]["role"].hex().replace('0x', '') + + assert actual_role_hash == expected_role_hash, "Wrong role hash" + + assert convert.to_address(event["RoleGranted"][0]["account"]) == convert.to_address(account), "Wrong account" + + if emitted_by is not None: + assert convert.to_address(event["RoleGranted"][0]["_emitted_by"]) == convert.to_address(emitted_by), "Wrong event emitter" + + +def validate_role_revoke_event(event: EventDict, role_hash: str, account: str, emitted_by: Optional[str] = None): + assert "RoleRevoked" in event, "No RoleRevoked event found" + + # Strip 0x prefix for consistent comparison + expected_role_hash = role_hash.replace('0x', '') + actual_role_hash = event["RoleRevoked"][0]["role"].hex().replace('0x', '') + + assert actual_role_hash == expected_role_hash, "Wrong role hash" + + assert convert.to_address(event["RoleRevoked"][0]["account"]) == convert.to_address(account), "Wrong account" + + if emitted_by is not None: + assert convert.to_address(event["RoleRevoked"][0]["_emitted_by"]) == convert.to_address(emitted_by), "Wrong event emitter" + + +def validate_contract_version_set_event(event: EventDict, version: int, emitted_by: Optional[str] = None): + assert "ContractVersionSet" in event, "No ContractVersionSet event found" + + assert event["ContractVersionSet"][0]["version"] == version, "Wrong version" + + if emitted_by is not None: + assert convert.to_address(event["ContractVersionSet"][0]["_emitted_by"]) == convert.to_address(emitted_by), "Wrong event emitter" + + +def validate_bond_curve_added_event(event: EventDict, curve_id: int, emitted_by: Optional[str] = None): + assert "BondCurveAdded" in event, "No BondCurveAdded event found" + + assert event["BondCurveAdded"][0]["curveId"] == curve_id, "Wrong curve ID" + + if emitted_by is not None: + assert convert.to_address(event["BondCurveAdded"][0]["_emitted_by"]) == convert.to_address(emitted_by), "Wrong event emitter" + + +def validate_staking_module_update_event( + event: EventDict, + module_id: int, + share_limit: int, + priority_share_threshold: int, + module_fee_points_bp: int, + treasury_fee_points_bp: int, + max_deposits_per_block: int, + min_deposit_block_distance: int, + emitted_by: Optional[str] = None +): + assert "StakingModuleShareLimitSet" in event, "No StakingModuleShareLimitSet event found" + assert "StakingModuleFeesSet" in event, "No StakingModuleFeesSet event found" + assert "StakingModuleMaxDepositsPerBlockSet" in event, "No StakingModuleMaxDepositsPerBlockSet event found" + assert "StakingModuleMinDepositBlockDistanceSet" in event, "No StakingModuleMinDepositBlockDistanceSet event found" + + assert len(event["StakingModuleShareLimitSet"]) == 1, "Multiple StakingModuleShareLimitSet events found" + assert len(event["StakingModuleFeesSet"]) == 1, "Multiple StakingModuleFeesSet events found" + assert len(event["StakingModuleMaxDepositsPerBlockSet"]) == 1, "Multiple StakingModuleMaxDepositsPerBlockSet events found" + assert len(event["StakingModuleMinDepositBlockDistanceSet"]) == 1, "Multiple StakingModuleMinDepositBlockDistanceSet events found" + + assert event["StakingModuleShareLimitSet"][0]["stakingModuleId"] == module_id, "Wrong module ID" + assert event["StakingModuleShareLimitSet"][0]["stakeShareLimit"] == share_limit, "Wrong share limit" + assert event["StakingModuleShareLimitSet"][0]["priorityExitShareThreshold"] == priority_share_threshold, "Wrong priority threshold" + + assert event["StakingModuleFeesSet"][0]["stakingModuleFee"] == module_fee_points_bp, "Wrong fee points" + assert event["StakingModuleFeesSet"][0]["treasuryFee"] == treasury_fee_points_bp, "Wrong treasury fee points" + + assert event["StakingModuleMaxDepositsPerBlockSet"][0]["maxDepositsPerBlock"] == max_deposits_per_block, "Wrong max deposits" + + assert event["StakingModuleMinDepositBlockDistanceSet"][0]["minDepositBlockDistance"] == min_deposit_block_distance, "Wrong min distance" + + if emitted_by is not None: + assert convert.to_address(event["StakingModuleShareLimitSet"][0]["_emitted_by"]) == convert.to_address(emitted_by), "Wrong event emitter" + assert convert.to_address(event["StakingModuleFeesSet"][0]["_emitted_by"]) == convert.to_address(emitted_by), "Wrong event emitter" + assert convert.to_address(event["StakingModuleMaxDepositsPerBlockSet"][0]["_emitted_by"]) == convert.to_address(emitted_by), "Wrong event emitter" + assert convert.to_address(event["StakingModuleMinDepositBlockDistanceSet"][0]["_emitted_by"]) == convert.to_address(emitted_by), "Wrong event emitter" + + +def get_ossifiable_proxy_impl(proxy_address): + """Get implementation address from an OssifiableProxy""" + proxy = interface.OssifiableProxy(proxy_address) + return proxy.proxy__getImplementation() + + +def get_wv_contract_proxy_impl(proxy_address): + """Get implementation address from an WithdrawalContractProxy""" + proxy = interface.WithdrawalContractProxy(proxy_address) + return proxy.implementation() + + +def check_proxy_implementation(proxy_address, expected_impl): + """Check that proxy has expected implementation""" + actual_impl = get_ossifiable_proxy_impl(proxy_address) + assert actual_impl == expected_impl, f"Expected impl {expected_impl}, got {actual_impl}" + + +# New core contracts implementations +LIDO_LOCATOR_IMPL = "0xa437ab5614033d071493C88Fd351aFEbc802521f" +ACCOUNTING_ORACLE_IMPL = "0xE63267AAaC507A329213593e8A9bCa37e2994F1C" +VALIDATORS_EXIT_BUS_ORACLE_IMPL = "0xeCE105ABd3F2653398BE75e680dB033A238E2aD6" +WITHDRAWAL_VAULT_IMPL = "0x6aAA28C515E02ED0fe1B51e74323e14E910eA7d7" +STAKING_ROUTER_IMPL = "0xE6E775C6AdF8753588237b1De32f61937bC54341" +NODE_OPERATORS_REGISTRY_IMPL = "0x834aa47DCd21A32845099a78B4aBb17A7f0bD503" + +TRIGGERABLE_WITHDRAWALS_GATEWAY = "0x4FD4113f2B92856B59BC3be77f2943B7F4eaa9a5" +VALIDATOR_EXIT_VERIFIER = "0x9c5da60e54fcae8592132Fc9a67511e686b52BE8" + +# Oracle consensus versions +AO_CONSENSUS_VERSION = 4 +VEBO_CONSENSUS_VERSION = 4 +CSM_CONSENSUS_VERSION = 3 + +EXIT_EVENTS_LOOKBACK_WINDOW_IN_SLOTS = 7 * 7200 + +NOR_EXIT_DEADLINE_IN_SEC = 172800 + +# CSM +CS_MODULE_NEW_TARGET_SHARE_BP = 2000 # 20% +CS_MODULE_NEW_PRIORITY_EXIT_THRESHOLD_BP = 2500 # 25% + +CS_ACCOUNTING_IMPL_V2_ADDRESS = "0xbd78207826CfdBE125cFf0a7075EaB90F5f9FCbb" +CS_FEE_DISTRIBUTOR_IMPL_V2_ADDRESS = "0x6e00A87690A1CAF4abb135B549408cEfca2fd6f5" +CS_FEE_ORACLE_IMPL_V2_ADDRESS = "0xD6F44e196A5b4A1C3863Bdd87233465ef42aBB40" +CSM_IMPL_V2_ADDRESS = "0xaF370636f618bC97c8Af2aBC33aAD426b1f4164A" + +CS_GATE_SEAL_V2_ADDRESS = "0x86E4aFE068f30A41f650601Df9A097bc7CddFb76" +CS_SET_VETTED_GATE_TREE_FACTORY = "0x26CDa8f9D84956efC743c8432658Ae9a5B7939da" +CS_EJECTOR_ADDRESS = "0x477589D5A8cB67Bd6682AF3612f99ADB72d09582" +CS_PERMISSIONLESS_GATE_ADDRESS = "0x676626c3940ae32eF1e4F609938F785fF064ee22" +CS_VETTED_GATE_ADDRESS = "0x92A5aB5e4f98e67Fb7295fe439A652d0E51033bf" +CS_VERIFIER_V2_ADDRESS = "0xBC88b4b56A58b33716C3C2e879b4B1F964152AD4" + +CS_DEFAULT_BOND_CURVE = ( + [1, 2 * 10**18], [2, 1.9 * 10**18], [3, 1.8 * 10**18], [4, 1.7 * 10**18], [5, 1.6 * 10**18], [6, 1.5 * 10**18] +) +CS_LEGACY_EA_BOND_CURVE = ( + ([1, 1.5 * 10**18], [2, 1.9 * 10**18], [3, 1.8 * 10**18], [4, 1.7 * 10**18], [5, 1.6 * 10**18], [6, 1.5 * 10**18]) +) +CS_EXTRA_CURVES = [ + ([1, 3 * 10**18], [2, 1.9 * 10**18], [3, 1.8 * 10**18], [4, 1.7 * 10**18], [5, 1.6 * 10**18], [6, 1.5 * 10**18]), + ([1, 4 * 10**18], [2, 1 * 10**18]) +] +CS_CURVES = [CS_DEFAULT_BOND_CURVE, CS_LEGACY_EA_BOND_CURVE, *CS_EXTRA_CURVES] +CS_ICS_GATE_BOND_CURVE = ([1, 1.5 * 10**18], [2, 1.3 * 10**18]) # Identified Community Stakers Gate Bond Curve + +# Contract versions expected after upgrade +CSM_V2_VERSION = 2 +CS_ACCOUNTING_V2_VERSION = 2 +CS_FEE_ORACLE_V2_VERSION = 2 +CS_FEE_DISTRIBUTOR_V2_VERSION = 2 + + +# Add imports for Gate Seal and ResealManager constants +OLD_GATE_SEAL_ADDRESS = "0xAE6eCd77DCC656c5533c4209454Fd56fB46e1778" +NEW_WQ_GATE_SEAL = "0xE900BC859EB750562E1009e912B63743BC877662" +NEW_TW_GATE_SEAL = "0xaEEF47C61f2A9CCe4C4D0363911C5d49e2cFb6f1" +RESEAL_MANAGER = "0x9dE2273f9f1e81145171CcA927EFeE7aCC64c9fb" + +def test_tw_vote(helpers, accounts, vote_ids_from_env, stranger): + # Save original implementations for comparison + locator_impl_before = get_ossifiable_proxy_impl(contracts.lido_locator) + accounting_oracle_impl_before = get_ossifiable_proxy_impl(contracts.accounting_oracle) + vebo_impl_before = get_ossifiable_proxy_impl(contracts.validators_exit_bus_oracle) + withdrawal_vault_impl_before = get_wv_contract_proxy_impl(contracts.withdrawal_vault) + staking_router_impl_before = get_ossifiable_proxy_impl(contracts.staking_router) + + csm_impl_before = get_ossifiable_proxy_impl(contracts.csm.address) + cs_accounting_impl_before = get_ossifiable_proxy_impl(contracts.cs_accounting.address) + cs_fee_oracle_impl_before = get_ossifiable_proxy_impl(contracts.cs_fee_oracle.address) + cs_fee_distributor_impl_before = get_ossifiable_proxy_impl(contracts.cs_fee_distributor.address) + + timelock = interface.EmergencyProtectedTimelock(TIMELOCK) + dual_governance = interface.DualGovernance(DUAL_GOVERNANCE) + + # Not yet used by the protocol, but needed for the test + triggerable_withdrawals_gateway = interface.TriggerableWithdrawalsGateway(TRIGGERABLE_WITHDRAWALS_GATEWAY) + cs_ejector = interface.CSEjector(CS_EJECTOR_ADDRESS) + cs_permissionless_gate = interface.CSPermissionlessGate(CS_PERMISSIONLESS_GATE_ADDRESS) + cs_vetted_gate = interface.CSVettedGate(CS_VETTED_GATE_ADDRESS) + cs_verifier_v2 = interface.CSVerifierV2(CS_VERIFIER_V2_ADDRESS) + + # --- Initial state checks --- + + # Step 1: Check Lido Locator implementation initial state + assert locator_impl_before != LIDO_LOCATOR_IMPL, "Locator implementation should be different before upgrade" + + # Step 2: Check VEBO implementation initial state + assert vebo_impl_before != VALIDATORS_EXIT_BUS_ORACLE_IMPL, "VEBO implementation should be different before upgrade" + + # Step 3: Check VEBO finalizeUpgrade_v2 state + try: + assert contracts.validators_exit_bus_oracle.getMaxValidatorsPerReport() != 600, "VEBO max validators per report should not be 600 before upgrade" + except Exception: + pass # Function might not exist yet + + # Steps 4-6: Check VEBO consensus version management + initial_vebo_consensus_version = contracts.validators_exit_bus_oracle.getConsensusVersion() + assert initial_vebo_consensus_version < VEBO_CONSENSUS_VERSION, f"VEBO consensus version should be less than {VEBO_CONSENSUS_VERSION}" + assert not contracts.validators_exit_bus_oracle.hasRole(contracts.validators_exit_bus_oracle.MANAGE_CONSENSUS_VERSION_ROLE(), contracts.validators_exit_bus_oracle), "Agent should not have MANAGE_CONSENSUS_VERSION_ROLE on VEBO before upgrade" + + # Step 7: Check TWG role for CS Ejector initial state + add_full_withdrawal_request_role = triggerable_withdrawals_gateway.ADD_FULL_WITHDRAWAL_REQUEST_ROLE() + assert not triggerable_withdrawals_gateway.hasRole(add_full_withdrawal_request_role, cs_ejector), "CS Ejector should not have ADD_FULL_WITHDRAWAL_REQUEST_ROLE before upgrade" + + # Step 8: Check TWG role for VEB initial state + assert not triggerable_withdrawals_gateway.hasRole(add_full_withdrawal_request_role, contracts.validators_exit_bus_oracle), "VEBO should not have ADD_FULL_WITHDRAWAL_REQUEST_ROLE before upgrade" + + # Step 9: Check Withdrawal Vault implementation initial state + assert withdrawal_vault_impl_before != WITHDRAWAL_VAULT_IMPL, "Withdrawal Vault implementation should be different before upgrade" + + # Step 10: Withdrawal Vault finalizeUpgrade_v2 check is done post-execution + assert contracts.withdrawal_vault.getContractVersion() == 1, "Withdrawal Vault version should be 1 before upgrade" + + # Step 11: Check Accounting Oracle implementation initial state + assert accounting_oracle_impl_before != ACCOUNTING_ORACLE_IMPL, "Accounting Oracle implementation should be different before upgrade" + + # Steps 12-14: Check AO consensus version management + initial_ao_consensus_version = contracts.accounting_oracle.getConsensusVersion() + assert initial_ao_consensus_version < AO_CONSENSUS_VERSION, f"AO consensus version should be less than {AO_CONSENSUS_VERSION}" + assert not contracts.accounting_oracle.hasRole(contracts.accounting_oracle.MANAGE_CONSENSUS_VERSION_ROLE(), contracts.agent), "Agent should not have MANAGE_CONSENSUS_VERSION_ROLE on AO before upgrade" + assert contracts.accounting_oracle.getContractVersion() == 2, "Accounting Oracle version should be 2 before upgrade" + # Step 15: Check Staking Router implementation initial state + assert staking_router_impl_before != STAKING_ROUTER_IMPL, "Staking Router implementation should be different before upgrade" + + # Steps 16-17: Check SR roles initial state + try: + report_validator_exiting_status_role = contracts.staking_router.REPORT_VALIDATOR_EXITING_STATUS_ROLE() + report_validator_exit_triggered_role = contracts.staking_router.REPORT_VALIDATOR_EXIT_TRIGGERED_ROLE() + except Exception as e: + assert "Unknown typed error: 0x" in str(e), f"Unexpected error: {e}" + report_validator_exiting_status_role = ZERO_ADDRESS + report_validator_exit_triggered_role = ZERO_ADDRESS + + assert report_validator_exiting_status_role == ZERO_ADDRESS, "REPORT_VALIDATOR_EXITING_STATUS_ROLE should not exist before upgrade" + assert report_validator_exit_triggered_role == ZERO_ADDRESS, "REPORT_VALIDATOR_EXIT_TRIGGERED_ROLE should not exist before upgrade" + + # Step 18: Check APP_MANAGER_ROLE initial state + app_manager_role = web3.keccak(text="APP_MANAGER_ROLE") + assert contracts.acl.getPermissionManager(ARAGON_KERNEL, app_manager_role) == AGENT, "AGENT should be the permission manager for APP_MANAGER_ROLE" + assert contracts.node_operators_registry.kernel() == ARAGON_KERNEL, "Node Operators Registry must use the correct kernel" + assert not contracts.acl.hasPermission(VOTING, ARAGON_KERNEL, app_manager_role), "VOTING should not have APP_MANAGER_ROLE before the upgrade" + assert not contracts.acl.hasPermission(AGENT, ARAGON_KERNEL, app_manager_role), "AGENT should not have APP_MANAGER_ROLE before the upgrade" + + # Steps 19-23: Check NOR and sDVT initial state + assert not contracts.acl.hasPermission(contracts.agent, contracts.kernel, app_manager_role), "Agent should not have APP_MANAGER_ROLE before upgrade" + assert contracts.node_operators_registry.getContractVersion() == 3, "Node Operators Registry version should be 3 before upgrade" + assert contracts.simple_dvt.getContractVersion() == 3, "Simple DVT version should be 3 before upgrade" + + # Step 24: Check CONFIG_MANAGER_ROLE initial state + config_manager_role = contracts.oracle_daemon_config.CONFIG_MANAGER_ROLE() + assert not contracts.oracle_daemon_config.hasRole(config_manager_role, contracts.agent), "Agent should not have CONFIG_MANAGER_ROLE on Oracle Daemon Config before upgrade" + + # Steps 25-27: Check Oracle Daemon Config variables to be removed + try: + contracts.oracle_daemon_config.get('NODE_OPERATOR_NETWORK_PENETRATION_THRESHOLD_BP') + contracts.oracle_daemon_config.get('VALIDATOR_DELAYED_TIMEOUT_IN_SLOTS') + contracts.oracle_daemon_config.get('VALIDATOR_DELINQUENT_TIMEOUT_IN_SLOTS') + except Exception as e: + assert False, f"Expected variables to exist before removal: {e}" + + # Step 28: Check that EXIT_EVENTS_LOOKBACK_WINDOW_IN_SLOTS doesn't exist yet + try: + contracts.oracle_daemon_config.get('EXIT_EVENTS_LOOKBACK_WINDOW_IN_SLOTS') + assert False, "EXIT_EVENTS_LOOKBACK_WINDOW_IN_SLOTS should not exist before vote" + except Exception: + pass # Expected to fail + + # Step 29: Check CSM implementation initial state + assert csm_impl_before != CSM_IMPL_V2_ADDRESS, "CSM implementation should be different before vote" + + # Step 30: Check CSM finalizeUpgradeV2 initial state + with reverts(): + # The function should not exist yet + contracts.csm.getInitializedVersion() + + # CSM Step 32: Check CSAccounting implementation (pre-vote state) + assert cs_accounting_impl_before != CS_ACCOUNTING_IMPL_V2_ADDRESS, "CSAccounting implementation should be different before vote" + + # CSM Step 33: Check CSAccounting finalizeUpgradeV2 was not called (pre-vote state) + with reverts(): + # The function should not exist yet + contracts.cs_accounting.getInitializedVersion() + + # CSM Step 34: Check CSFeeOracle implementation (pre-vote state) + assert cs_fee_oracle_impl_before != CS_FEE_ORACLE_IMPL_V2_ADDRESS, "CSFeeOracle implementation should be different before vote" + + # CSM Step 35: Check CSFeeOracle finalizeUpgradeV2 was not called (pre-vote state) + assert contracts.cs_fee_oracle.getContractVersion() < CS_FEE_ORACLE_V2_VERSION, f"CSFeeOracle version should be less than {CS_FEE_ORACLE_V2_VERSION} before vote" + assert contracts.cs_fee_oracle.getConsensusVersion() < 3, "CSFeeOracle consensus version should be less than 3 before vote" + + # CSM Step 36: Check CSFeeDistributor implementation (pre-vote state) + assert cs_fee_distributor_impl_before != CS_FEE_DISTRIBUTOR_IMPL_V2_ADDRESS, "CSFeeDistributor implementation should be different before vote" + + # CSM Step 37: Check CSFeeDistributor finalizeUpgradeV2 was not called (pre-vote state) + with reverts(): + # The function should not exist yet + contracts.cs_fee_distributor.getInitializedVersion() + + # CSM Steps 38-40: CSAccounting roles (pre-vote state) + assert contracts.cs_accounting.hasRole(contracts.cs_accounting.SET_BOND_CURVE_ROLE(), contracts.csm.address), "CSM should have SET_BOND_CURVE_ROLE on CSAccounting before vote" + assert contracts.cs_accounting.hasRole(web3.keccak(text="RESET_BOND_CURVE_ROLE"), contracts.csm.address), "CSM should have RESET_BOND_CURVE_ROLE on CSAccounting before vote" + assert contracts.cs_accounting.hasRole(web3.keccak(text="RESET_BOND_CURVE_ROLE"), CSM_COMMITTEE_MS), "CSM committee should have RESET_BOND_CURVE_ROLE on CSAccounting before vote" + + # CSM Steps 41-42: CSM roles (pre-vote state) + assert not contracts.csm.hasRole(web3.keccak(text="CREATE_NODE_OPERATOR_ROLE"), cs_permissionless_gate.address), "Permissionless gate should not have CREATE_NODE_OPERATOR_ROLE on CSM before vote" + assert not contracts.csm.hasRole(web3.keccak(text="CREATE_NODE_OPERATOR_ROLE"), cs_vetted_gate.address), "Vetted gate should not have CREATE_NODE_OPERATOR_ROLE on CSM before vote" + + # CSM Step 43: CSAccounting bond curve role for vetted gate (pre-vote state) + assert not contracts.cs_accounting.hasRole(contracts.cs_accounting.SET_BOND_CURVE_ROLE(), cs_vetted_gate.address), "Vetted gate should not have SET_BOND_CURVE_ROLE on CSAccounting before vote" + + # CSM Steps 44-45: Verifier roles (pre-vote state) + assert contracts.csm.hasRole(contracts.csm.VERIFIER_ROLE(), contracts.cs_verifier.address), "Old verifier should have VERIFIER_ROLE on CSM before vote" + assert not contracts.csm.hasRole(contracts.csm.VERIFIER_ROLE(), cs_verifier_v2.address), "New verifier should not have VERIFIER_ROLE on CSM before vote" + + # CSM Steps 46-51: GateSeal roles (pre-vote state) + assert contracts.csm.hasRole(contracts.csm.PAUSE_ROLE(), CS_GATE_SEAL_ADDRESS), "Old GateSeal should have PAUSE_ROLE on CSM before vote" + assert contracts.cs_accounting.hasRole(contracts.cs_accounting.PAUSE_ROLE(), CS_GATE_SEAL_ADDRESS), "Old GateSeal should have PAUSE_ROLE on CSAccounting before vote" + assert contracts.cs_fee_oracle.hasRole(contracts.cs_fee_oracle.PAUSE_ROLE(), CS_GATE_SEAL_ADDRESS), "Old GateSeal should have PAUSE_ROLE on CSFeeOracle before vote" + + assert not contracts.csm.hasRole(contracts.csm.PAUSE_ROLE(), CS_GATE_SEAL_V2_ADDRESS), "New GateSeal should not have PAUSE_ROLE on CSM before vote" + assert not contracts.cs_accounting.hasRole(contracts.cs_accounting.PAUSE_ROLE(), CS_GATE_SEAL_V2_ADDRESS), "New GateSeal should not have PAUSE_ROLE on CSAccounting before vote" + assert not contracts.cs_fee_oracle.hasRole(contracts.cs_fee_oracle.PAUSE_ROLE(), CS_GATE_SEAL_V2_ADDRESS), "New GateSeal should not have PAUSE_ROLE on CSFeeOracle before vote" + + # CSM Step 52: Staking Router CSM module state before vote (pre-vote state) + csm_module_before = contracts.staking_router.getStakingModule(CS_MODULE_ID) + csm_share_before = csm_module_before['stakeShareLimit'] + csm_priority_exit_threshold_before = csm_module_before['priorityExitShareThreshold'] + assert csm_share_before != CS_MODULE_NEW_TARGET_SHARE_BP, f"CSM share should not be {CS_MODULE_NEW_TARGET_SHARE_BP} before vote, current: {csm_share_before}" + assert csm_priority_exit_threshold_before != CS_MODULE_NEW_PRIORITY_EXIT_THRESHOLD_BP, f"CSM priority exit threshold should not be {CS_MODULE_NEW_PRIORITY_EXIT_THRESHOLD_BP} before vote, current: {csm_priority_exit_threshold_before}" + + # CSM Step 53: EasyTrack factories before vote (pre-vote state) + initial_factories = contracts.easy_track.getEVMScriptFactories() + assert CS_SET_VETTED_GATE_TREE_FACTORY not in initial_factories, "EasyTrack should not have CSMSetVettedGateTree factory before vote" + + # Steps 55-56: Check that old GateSeal has PAUSE_ROLE initially + assert contracts.withdrawal_queue.hasRole(contracts.withdrawal_queue.PAUSE_ROLE(), OLD_GATE_SEAL_ADDRESS), "Old GateSeal should have PAUSE_ROLE on WithdrawalQueue before vote" + assert contracts.validators_exit_bus_oracle.hasRole(contracts.validators_exit_bus_oracle.PAUSE_ROLE(), OLD_GATE_SEAL_ADDRESS), "Old GateSeal should have PAUSE_ROLE on VEBO before vote" + + # Steps 57-59: Check new Gate Seals don't have roles yet + assert not contracts.withdrawal_queue.hasRole(contracts.withdrawal_queue.PAUSE_ROLE(), NEW_WQ_GATE_SEAL), "New WQ GateSeal should not have PAUSE_ROLE on WithdrawalQueue before vote" + assert not contracts.validators_exit_bus_oracle.hasRole(contracts.validators_exit_bus_oracle.PAUSE_ROLE(), NEW_TW_GATE_SEAL), "New TW GateSeal should not have PAUSE_ROLE on VEBO before vote" + assert not triggerable_withdrawals_gateway.hasRole(triggerable_withdrawals_gateway.PAUSE_ROLE(), NEW_TW_GATE_SEAL), "New TW GateSeal should not have PAUSE_ROLE on TWG before vote" + + # Steps 60-65: Check ResealManager doesn't have roles yet + # There should already be a role granted on the network for all contracts except TWG + assert contracts.withdrawal_queue.hasRole(contracts.withdrawal_queue.PAUSE_ROLE(), RESEAL_MANAGER), "ResealManager should have PAUSE_ROLE on WithdrawalQueue after vote" + assert contracts.validators_exit_bus_oracle.hasRole(contracts.validators_exit_bus_oracle.PAUSE_ROLE(), RESEAL_MANAGER), "ResealManager should have PAUSE_ROLE on VEBO after vote" + assert not triggerable_withdrawals_gateway.hasRole(triggerable_withdrawals_gateway.PAUSE_ROLE(), RESEAL_MANAGER), "ResealManager should have PAUSE_ROLE on TWG after vote" + assert contracts.withdrawal_queue.hasRole(contracts.withdrawal_queue.RESUME_ROLE(), RESEAL_MANAGER), "ResealManager should have RESUME_ROLE on WithdrawalQueue after vote" + assert contracts.validators_exit_bus_oracle.hasRole(contracts.validators_exit_bus_oracle.RESUME_ROLE(), RESEAL_MANAGER), "ResealManager should have RESUME_ROLE on VEBO after vote" + assert not triggerable_withdrawals_gateway.hasRole(triggerable_withdrawals_gateway.RESUME_ROLE(), RESEAL_MANAGER), "ResealManager should have RESUME_ROLE on TWG after vote" + + # START VOTE + if len(vote_ids_from_env) > 0: + (vote_id,) = vote_ids_from_env + else: + tx_params = {"from": LDO_HOLDER_ADDRESS_FOR_TESTS} + vote_id, _ = start_vote(tx_params, silent=True) + + vote_tx = helpers.execute_vote(accounts, vote_id, contracts.voting) + print(f"voteId = {vote_id}") + + proposal_id = vote_tx.events["ProposalSubmitted"][1]["proposalId"] + print(f"proposalId = {proposal_id}") + + chain.sleep(timelock.getAfterSubmitDelay() + 1) + dual_governance.scheduleProposal(proposal_id, {"from": stranger}) + + chain.sleep(timelock.getAfterScheduleDelay() + 1) + wait_for_noon_utc_to_satisfy_time_constrains() + + dg_tx = timelock.execute(proposal_id, {"from": stranger}) + + # --- VALIDATE EXECUTION RESULTS --- + + # Step 1: Validate Lido Locator implementation was updated + assert get_ossifiable_proxy_impl(contracts.lido_locator) == LIDO_LOCATOR_IMPL, "Locator implementation should be updated to the new value" + + # Step 2-3: Validate VEBO implementation was updated and configured + assert get_ossifiable_proxy_impl(contracts.validators_exit_bus_oracle) == VALIDATORS_EXIT_BUS_ORACLE_IMPL, "VEBO implementation should be updated" + assert contracts.validators_exit_bus_oracle.getMaxValidatorsPerReport() == 600, "VEBO max validators per report should be set to 600" + + # Validate exit request limit parameters from finalizeUpgrade_v2 call + exit_request_limits = contracts.validators_exit_bus_oracle.getExitRequestLimitFullInfo() + assert exit_request_limits[0] == 11200, "maxExitRequestsLimit should be 11200" + assert exit_request_limits[1] == 1, "exitsPerFrame should be 1" + assert exit_request_limits[2] == 48, "frameDurationInSec should be 48 hours in seconds" + + # Steps 4-6: Validate VEBO consensus version management + assert not contracts.validators_exit_bus_oracle.hasRole(contracts.validators_exit_bus_oracle.MANAGE_CONSENSUS_VERSION_ROLE(), contracts.agent), "Agent should not have MANAGE_CONSENSUS_VERSION_ROLE on VEBO" + assert contracts.validators_exit_bus_oracle.getConsensusVersion() == VEBO_CONSENSUS_VERSION, f"VEBO consensus version should be set to {VEBO_CONSENSUS_VERSION}" + + # Steps 7-8: Validate TWG roles + assert triggerable_withdrawals_gateway.hasRole(add_full_withdrawal_request_role, cs_ejector), "CS Ejector should have ADD_FULL_WITHDRAWAL_REQUEST_ROLE on TWG" + assert triggerable_withdrawals_gateway.hasRole(add_full_withdrawal_request_role, contracts.validators_exit_bus_oracle), "VEBO should have ADD_FULL_WITHDRAWAL_REQUEST_ROLE on TWG" + + # Steps 9-10: Validate Withdrawal Vault upgrade + assert get_wv_contract_proxy_impl(contracts.withdrawal_vault) == WITHDRAWAL_VAULT_IMPL, "Withdrawal Vault implementation should be updated" + assert contracts.withdrawal_vault.getContractVersion() == 2, "Withdrawal Vault version should be 2 after finalizeUpgrade_v2" + + # Steps 11-14: Validate Accounting Oracle upgrade + assert get_ossifiable_proxy_impl(contracts.accounting_oracle) == ACCOUNTING_ORACLE_IMPL, "Accounting Oracle implementation should be updated" + assert not contracts.accounting_oracle.hasRole(contracts.accounting_oracle.MANAGE_CONSENSUS_VERSION_ROLE(), contracts.agent), "Agent should not have MANAGE_CONSENSUS_VERSION_ROLE on AO" + assert contracts.accounting_oracle.getConsensusVersion() == AO_CONSENSUS_VERSION, f"AO consensus version should be set to {AO_CONSENSUS_VERSION}" + assert contracts.accounting_oracle.getContractVersion() == 3, "Accounting Oracle version should be updated to 3" + # Steps 15-17: Validate Staking Router upgrade + assert get_ossifiable_proxy_impl(contracts.staking_router) == STAKING_ROUTER_IMPL, "Staking Router implementation should be updated" + assert contracts.staking_router.hasRole(contracts.staking_router.REPORT_VALIDATOR_EXITING_STATUS_ROLE(), VALIDATOR_EXIT_VERIFIER), "ValidatorExitVerifier should have REPORT_VALIDATOR_EXITING_STATUS_ROLE on SR" + assert contracts.staking_router.hasRole(contracts.staking_router.REPORT_VALIDATOR_EXIT_TRIGGERED_ROLE(), triggerable_withdrawals_gateway), "TWG should have REPORT_VALIDATOR_EXIT_TRIGGERED_ROLE on SR" + + # Steps 18-23: Validate NOR and sDVT updates + assert not contracts.acl.hasPermission(contracts.agent, contracts.kernel, app_manager_role), "Agent should not have APP_MANAGER_ROLE after vote" + assert contracts.node_operators_registry.getContractVersion() == 4, "Node Operators Registry version should be updated to 4" + assert contracts.simple_dvt.getContractVersion() == 4, "Simple DVT version should be updated to 4" + assert contracts.node_operators_registry.exitDeadlineThreshold(0) == NOR_EXIT_DEADLINE_IN_SEC, "NOR exit deadline threshold should be set correctly" + assert contracts.simple_dvt.exitDeadlineThreshold(0) == NOR_EXIT_DEADLINE_IN_SEC, "sDVT exit deadline threshold should be set correctly" + + # Steps 24-28: Validate Oracle Daemon Config changes + assert contracts.oracle_daemon_config.hasRole(config_manager_role, contracts.agent), "Agent should have CONFIG_MANAGER_ROLE on Oracle Daemon Config" + for var_name in ['NODE_OPERATOR_NETWORK_PENETRATION_THRESHOLD_BP', 'VALIDATOR_DELAYED_TIMEOUT_IN_SLOTS', 'VALIDATOR_DELINQUENT_TIMEOUT_IN_SLOTS']: + try: + contracts.oracle_daemon_config.get(var_name) + assert False, f"Variable {var_name} should have been removed" + except Exception: + pass # Expected to fail - variable should be removed + assert convert.to_uint(contracts.oracle_daemon_config.get('EXIT_EVENTS_LOOKBACK_WINDOW_IN_SLOTS')) == EXIT_EVENTS_LOOKBACK_WINDOW_IN_SLOTS, f"EXIT_EVENTS_LOOKBACK_WINDOW_IN_SLOTS should be set to {EXIT_EVENTS_LOOKBACK_WINDOW_IN_SLOTS}" + + # Step 29: Validate CSM implementation upgrade + check_proxy_implementation(contracts.csm.address, CSM_IMPL_V2_ADDRESS) + + # Step 30: Validate CSM finalizeUpgradeV2 was called + assert contracts.csm.getInitializedVersion() == CSM_V2_VERSION, f"CSM version should be {CSM_V2_VERSION} after vote" + + # Step 31: Validate CSAccounting implementation upgrade + check_proxy_implementation(contracts.cs_accounting.address, CS_ACCOUNTING_IMPL_V2_ADDRESS) + + # Step 32: Validate CSAccounting finalizeUpgradeV2 was called with bond curves + assert contracts.cs_accounting.getInitializedVersion() == CS_ACCOUNTING_V2_VERSION, f"CSAccounting version should be {CS_ACCOUNTING_V2_VERSION} after vote" + + # Step 33: Validate CSFeeOracle implementation upgrade + check_proxy_implementation(contracts.cs_fee_oracle.address, CS_FEE_ORACLE_IMPL_V2_ADDRESS) + + # Step 34: Validate CSFeeOracle finalizeUpgradeV2 was called with consensus version 3 + assert contracts.cs_fee_oracle.getContractVersion() == CS_FEE_ORACLE_V2_VERSION, f"CSFeeOracle version should be {CS_FEE_ORACLE_V2_VERSION} after vote" + assert contracts.cs_fee_oracle.getConsensusVersion() == CSM_CONSENSUS_VERSION, "CSFeeOracle consensus version should be 3 after vote" + + # Step 35: Validate CSFeeDistributor implementation upgrade + check_proxy_implementation(contracts.cs_fee_distributor.address, CS_FEE_DISTRIBUTOR_IMPL_V2_ADDRESS) + + # Step 36: Validate CSFeeDistributor finalizeUpgradeV2 was called + assert contracts.cs_fee_distributor.getInitializedVersion() == CS_FEE_DISTRIBUTOR_V2_VERSION, f"CSFeeDistributor version should be {CS_FEE_DISTRIBUTOR_V2_VERSION} after vote" + + # Step 37: Validate SET_BOND_CURVE_ROLE was revoked from CSM on CSAccounting + assert not contracts.cs_accounting.hasRole(contracts.cs_accounting.SET_BOND_CURVE_ROLE(), contracts.csm.address), "CSM should not have SET_BOND_CURVE_ROLE on CSAccounting after vote" + + # Step 38: Validate RESET_BOND_CURVE_ROLE was revoked from CSM on CSAccounting + assert not contracts.cs_accounting.hasRole(web3.keccak(text="RESET_BOND_CURVE_ROLE"), contracts.csm.address), "CSM should not have RESET_BOND_CURVE_ROLE on CSAccounting after vote" + + # Step 39: Validate RESET_BOND_CURVE_ROLE was revoked from CSM committee on CSAccounting + assert not contracts.cs_accounting.hasRole(web3.keccak(text="RESET_BOND_CURVE_ROLE"), CSM_COMMITTEE_MS), "CSM committee should not have RESET_BOND_CURVE_ROLE on CSAccounting after vote" + + # Step 40: Validate CREATE_NODE_OPERATOR_ROLE was granted to permissionless gate on CSM + assert contracts.csm.hasRole(contracts.csm.CREATE_NODE_OPERATOR_ROLE(), cs_permissionless_gate.address), "Permissionless gate should have CREATE_NODE_OPERATOR_ROLE on CSM after vote" + + # Step 41: Validate CREATE_NODE_OPERATOR_ROLE was granted to vetted gate on CSM + assert contracts.csm.hasRole(contracts.csm.CREATE_NODE_OPERATOR_ROLE(), cs_vetted_gate.address), "Vetted gate should have CREATE_NODE_OPERATOR_ROLE on CSM after vote" + + # Step 42: Validate SET_BOND_CURVE_ROLE was granted to vetted gate on CSAccounting + assert contracts.cs_accounting.hasRole(contracts.cs_accounting.SET_BOND_CURVE_ROLE(), cs_vetted_gate.address), "Vetted gate should have SET_BOND_CURVE_ROLE on CSAccounting after vote" + + # Step 43: Validate VERIFIER_ROLE was revoked from old verifier on CSM + assert not contracts.csm.hasRole(contracts.csm.VERIFIER_ROLE(), contracts.cs_verifier.address), "Old verifier should not have VERIFIER_ROLE on CSM after vote" + + # Step 44: Validate VERIFIER_ROLE was granted to new verifier on CSM + assert contracts.csm.hasRole(contracts.csm.VERIFIER_ROLE(), cs_verifier_v2.address), "New verifier should have VERIFIER_ROLE on CSM after vote" + + # Step 45: Validate PAUSE_ROLE was revoked from old GateSeal on CSM + assert not contracts.csm.hasRole(contracts.csm.PAUSE_ROLE(), CS_GATE_SEAL_ADDRESS), "Old GateSeal should not have PAUSE_ROLE on CSM after vote" + + # Step 46: Validate PAUSE_ROLE was revoked from old GateSeal on CSAccounting + assert not contracts.cs_accounting.hasRole(contracts.cs_accounting.PAUSE_ROLE(), CS_GATE_SEAL_ADDRESS), "Old GateSeal should not have PAUSE_ROLE on CSAccounting after vote" + + # Step 47: Validate PAUSE_ROLE was revoked from old GateSeal on CSFeeOracle + assert not contracts.cs_fee_oracle.hasRole(contracts.cs_fee_oracle.PAUSE_ROLE(), CS_GATE_SEAL_ADDRESS), "Old GateSeal should not have PAUSE_ROLE on CSFeeOracle after vote" + + # Step 48: Validate PAUSE_ROLE was granted to new GateSeal on CSM + assert contracts.csm.hasRole(contracts.csm.PAUSE_ROLE(), CS_GATE_SEAL_V2_ADDRESS), "New GateSeal should have PAUSE_ROLE on CSM after vote" + + # Step 49: Validate PAUSE_ROLE was granted to new GateSeal on CSAccounting + assert contracts.cs_accounting.hasRole(contracts.cs_accounting.PAUSE_ROLE(), CS_GATE_SEAL_V2_ADDRESS), "New GateSeal should have PAUSE_ROLE on CSAccounting after vote" + + # Step 50: Validate PAUSE_ROLE was granted to new GateSeal on CSFeeOracle + assert contracts.cs_fee_oracle.hasRole(contracts.cs_fee_oracle.PAUSE_ROLE(), CS_GATE_SEAL_V2_ADDRESS), "New GateSeal should have PAUSE_ROLE on CSFeeOracle after vote" + + # Step 50-52: Check add ICS Bond Curve to CSAccounting + assert not contracts.cs_accounting.hasRole(contracts.cs_accounting.MANAGE_BOND_CURVES_ROLE(), contracts.agent), "Agent should not have MANAGE_BOND_CURVES_ROLE on CSAccounting after vote" + assert contracts.cs_accounting.getCurvesCount() == len(CS_CURVES) + 1, "CSAccounting should have legacy bond curves and ICS Bond Curve after vote" + + # Step 53: Increase CSM share in Staking Router + csm_module_after = contracts.staking_router.getStakingModule(CS_MODULE_ID) + csm_share_after = csm_module_after['stakeShareLimit'] + assert csm_share_after == CS_MODULE_NEW_TARGET_SHARE_BP, f"CSM share should be {CS_MODULE_NEW_TARGET_SHARE_BP} after vote, but got {csm_share_after}" + + csm_priority_exit_threshold_after = csm_module_after['priorityExitShareThreshold'] + assert csm_priority_exit_threshold_after == CS_MODULE_NEW_PRIORITY_EXIT_THRESHOLD_BP, f"CSM priority exit threshold should be {CS_MODULE_NEW_PRIORITY_EXIT_THRESHOLD_BP} after vote, but got {csm_priority_exit_threshold_after}" + + # Step 54: Add EasyTrack factory for CSSetVettedGateTree + new_factories = contracts.easy_track.getEVMScriptFactories() + assert CS_SET_VETTED_GATE_TREE_FACTORY in new_factories, "EasyTrack should have CSSetVettedGateTree factory after vote" + + # Steps 55-56: Validate old GateSeal no longer has PAUSE_ROLE + assert not contracts.withdrawal_queue.hasRole(contracts.withdrawal_queue.PAUSE_ROLE(), OLD_GATE_SEAL_ADDRESS), "Old GateSeal should not have PAUSE_ROLE on WithdrawalQueue after vote" + assert not contracts.validators_exit_bus_oracle.hasRole(contracts.validators_exit_bus_oracle.PAUSE_ROLE(), OLD_GATE_SEAL_ADDRESS), "Old GateSeal should not have PAUSE_ROLE on VEBO after vote" + + # Steps 57-59: Validate new Gate Seals have PAUSE_ROLE + assert contracts.withdrawal_queue.hasRole(contracts.withdrawal_queue.PAUSE_ROLE(), NEW_WQ_GATE_SEAL), "New WQ GateSeal should have PAUSE_ROLE on WithdrawalQueue after vote" + assert contracts.validators_exit_bus_oracle.hasRole(contracts.validators_exit_bus_oracle.PAUSE_ROLE(), NEW_TW_GATE_SEAL), "New TW GateSeal should have PAUSE_ROLE on VEBO after vote" + assert triggerable_withdrawals_gateway.hasRole(triggerable_withdrawals_gateway.PAUSE_ROLE(), NEW_TW_GATE_SEAL), "New TW GateSeal should have PAUSE_ROLE on TWG after vote" + + # Steps 60-65: Validate ResealManager has PAUSE_ROLE and RESUME_ROLE + assert contracts.withdrawal_queue.hasRole(contracts.withdrawal_queue.PAUSE_ROLE(), RESEAL_MANAGER), "ResealManager should have PAUSE_ROLE on WithdrawalQueue after vote" + assert contracts.validators_exit_bus_oracle.hasRole(contracts.validators_exit_bus_oracle.PAUSE_ROLE(), RESEAL_MANAGER), "ResealManager should have PAUSE_ROLE on VEBO after vote" + assert triggerable_withdrawals_gateway.hasRole(triggerable_withdrawals_gateway.PAUSE_ROLE(), RESEAL_MANAGER), "ResealManager should have PAUSE_ROLE on TWG after vote" + assert contracts.withdrawal_queue.hasRole(contracts.withdrawal_queue.RESUME_ROLE(), RESEAL_MANAGER), "ResealManager should have RESUME_ROLE on WithdrawalQueue after vote" + assert contracts.validators_exit_bus_oracle.hasRole(contracts.validators_exit_bus_oracle.RESUME_ROLE(), RESEAL_MANAGER), "ResealManager should have RESUME_ROLE on VEBO after vote" + assert triggerable_withdrawals_gateway.hasRole(triggerable_withdrawals_gateway.RESUME_ROLE(), RESEAL_MANAGER), "ResealManager should have RESUME_ROLE on TWG after vote" + + # --- VALIDATE EVENTS --- + + voting_events = group_voting_events_from_receipt(vote_tx) + assert len(voting_events) == 2, "Unexpected number of voting events" + dg_voting_event, dg_bypass_voting_event = voting_events + + validate_dual_governance_submit_event( + dg_voting_event, + proposal_id, + proposer=VOTING, + executor=DUAL_GOVERNANCE_EXECUTORS[0], + ) + dg_execution_events = group_dg_events_from_receipt(dg_tx, timelock=TIMELOCK, admin_executor=DUAL_GOVERNANCE_EXECUTORS[0]) + assert len(dg_execution_events) == 62, "Unexpected number of dual governance events" + + # 1. Lido Locator upgrade events + validate_proxy_upgrade_event(dg_execution_events[0], LIDO_LOCATOR_IMPL, emitted_by=contracts.lido_locator) + + # 2. VEBO upgrade events + validate_proxy_upgrade_event(dg_execution_events[1], VALIDATORS_EXIT_BUS_ORACLE_IMPL, emitted_by=contracts.validators_exit_bus_oracle) + + # 3. VEBO finalize upgrade events + validate_contract_version_set_event(dg_execution_events[2], version=2, emitted_by=contracts.validators_exit_bus_oracle) + assert 'ExitRequestsLimitSet' in dg_execution_events[2], "ExitRequestsLimitSet event not found" + assert dg_execution_events[2]['ExitRequestsLimitSet'][0]['maxExitRequestsLimit'] == 11200, "Wrong maxExitRequestsLimit" + assert dg_execution_events[2]['ExitRequestsLimitSet'][0]['exitsPerFrame'] == 1, "Wrong exitsPerFrame" + assert dg_execution_events[2]['ExitRequestsLimitSet'][0]['frameDurationInSec'] == 48, "Wrong frameDurationInSec" + + # 4. Grant VEBO MANAGE_CONSENSUS_VERSION_ROLE to Agent + validate_role_grant_event( + dg_execution_events[3], + role_hash=web3.keccak(text="MANAGE_CONSENSUS_VERSION_ROLE").hex(), + account=contracts.agent.address, + emitted_by=contracts.validators_exit_bus_oracle + ) + + # 5. Set VEBO consensus version to 4 + validate_consensus_version_set_event( + dg_execution_events[4], + new_version=4, + prev_version=3, + emitted_by=contracts.validators_exit_bus_oracle + ) + + # 6. Revoke VEBO MANAGE_CONSENSUS_VERSION_ROLE from Agent + validate_role_revoke_event( + dg_execution_events[5], + role_hash=web3.keccak(text="MANAGE_CONSENSUS_VERSION_ROLE").hex(), + account=contracts.agent.address, + emitted_by=contracts.validators_exit_bus_oracle + ) + + # 7. Grant TWG ADD_FULL_WITHDRAWAL_REQUEST_ROLE to CS Ejector + validate_role_grant_event( + dg_execution_events[6], + role_hash=web3.keccak(text="ADD_FULL_WITHDRAWAL_REQUEST_ROLE").hex(), + account=cs_ejector.address, + emitted_by=triggerable_withdrawals_gateway + ) + + # 8. Grant TWG ADD_FULL_WITHDRAWAL_REQUEST_ROLE to VEBO + validate_role_grant_event( + dg_execution_events[7], + role_hash=web3.keccak(text="ADD_FULL_WITHDRAWAL_REQUEST_ROLE").hex(), + account=contracts.validators_exit_bus_oracle.address, + emitted_by=triggerable_withdrawals_gateway + ) + + # 9. Update WithdrawalVault implementation + validate_proxy_upgrade_event(dg_execution_events[8], WITHDRAWAL_VAULT_IMPL, emitted_by=contracts.withdrawal_vault) + + # 10. Call finalizeUpgrade_v2 on WithdrawalVault + validate_contract_version_set_event(dg_execution_events[9], version=2, emitted_by=contracts.withdrawal_vault) + + # 11. Update AO implementation + validate_proxy_upgrade_event(dg_execution_events[10], ACCOUNTING_ORACLE_IMPL, emitted_by=contracts.accounting_oracle) + + # 12. Grant AO MANAGE_CONSENSUS_VERSION_ROLE to the AGENT + validate_role_grant_event( + dg_execution_events[11], + role_hash=web3.keccak(text="MANAGE_CONSENSUS_VERSION_ROLE").hex(), + account=contracts.agent.address, + emitted_by=contracts.accounting_oracle + ) + + # 13. Bump AO consensus version to 4 + validate_consensus_version_set_event( + dg_execution_events[12], + new_version=4, + prev_version=3, + emitted_by=contracts.accounting_oracle + ) + + # 14. Revoke AO MANAGE_CONSENSUS_VERSION_ROLE from the AGENT + validate_role_revoke_event( + dg_execution_events[13], + role_hash=web3.keccak(text="MANAGE_CONSENSUS_VERSION_ROLE").hex(), + account=contracts.agent.address, + emitted_by=contracts.accounting_oracle + ) + + # 15. Update SR implementation + validate_proxy_upgrade_event(dg_execution_events[14], STAKING_ROUTER_IMPL, emitted_by=contracts.staking_router) + + # 16. Grant SR REPORT_VALIDATOR_EXITING_STATUS_ROLE to ValidatorExitVerifier + validate_role_grant_event( + dg_execution_events[15], + role_hash=web3.keccak(text="REPORT_VALIDATOR_EXITING_STATUS_ROLE").hex(), + account=VALIDATOR_EXIT_VERIFIER, + emitted_by=contracts.staking_router + ) + + # 17. Grant SR REPORT_VALIDATOR_EXIT_TRIGGERED_ROLE to TWG + validate_role_grant_event( + dg_execution_events[16], + role_hash=web3.keccak(text="REPORT_VALIDATOR_EXIT_TRIGGERED_ROLE").hex(), + account=triggerable_withdrawals_gateway.address, + emitted_by=contracts.staking_router + ) + + # 18. Grant APP_MANAGER_ROLE on Kernel to Voting + assert 'SetPermission' in dg_execution_events[17] + assert dg_execution_events[17]['SetPermission'][0]['allowed'] is True + + # 19. Set new implementation for NOR + assert 'SetApp' in dg_execution_events[18] + + # 20. Finalize upgrade for NOR + validate_contract_version_set_event(dg_execution_events[19], version=4, emitted_by=contracts.node_operators_registry) + assert 'ExitDeadlineThresholdChanged' in dg_execution_events[19] + assert dg_execution_events[19]['ExitDeadlineThresholdChanged'][0]['threshold'] == 172800 + + # 21. Set new implementation for sDVT + assert 'SetApp' in dg_execution_events[20] + + # 22. Finalize upgrade for sDVT + validate_contract_version_set_event(dg_execution_events[21], version=4, emitted_by=contracts.simple_dvt) + assert 'ExitDeadlineThresholdChanged' in dg_execution_events[21] + assert dg_execution_events[21]['ExitDeadlineThresholdChanged'][0]['threshold'] == 172800 + + # 23. Revoke APP_MANAGER_ROLE on Kernel from Voting + assert 'SetPermission' in dg_execution_events[22] + assert dg_execution_events[22]['SetPermission'][0]['allowed'] is False + + # 24. Grant CONFIG_MANAGER_ROLE on OracleDaemonConfig to Agent + validate_role_grant_event( + dg_execution_events[23], + role_hash=contracts.oracle_daemon_config.CONFIG_MANAGER_ROLE().hex(), + account=contracts.agent.address, + emitted_by=contracts.oracle_daemon_config + ) + + # 25. Unset NODE_OPERATOR_NETWORK_PENETRATION_THRESHOLD_BP + assert 'ConfigValueUnset' in dg_execution_events[24] + assert 'NODE_OPERATOR_NETWORK_PENETRATION_THRESHOLD_BP' in dg_execution_events[24]['ConfigValueUnset'][0]['key'] + + # 26. Unset VALIDATOR_DELAYED_TIMEOUT_IN_SLOTS + assert 'ConfigValueUnset' in dg_execution_events[25] + assert 'VALIDATOR_DELAYED_TIMEOUT_IN_SLOTS' in dg_execution_events[25]['ConfigValueUnset'][0]['key'] + + # 27. Unset VALIDATOR_DELINQUENT_TIMEOUT_IN_SLOTS + assert 'ConfigValueUnset' in dg_execution_events[26] + assert 'VALIDATOR_DELINQUENT_TIMEOUT_IN_SLOTS' in dg_execution_events[26]['ConfigValueUnset'][0]['key'] + + # 28. Set EXIT_EVENTS_LOOKBACK_WINDOW_IN_SLOTS + assert 'ConfigValueSet' in dg_execution_events[27] + assert 'EXIT_EVENTS_LOOKBACK_WINDOW_IN_SLOTS' in dg_execution_events[27]['ConfigValueSet'][0]['key'] + assert convert.to_int(dg_execution_events[27]['ConfigValueSet'][0]['value']) == EXIT_EVENTS_LOOKBACK_WINDOW_IN_SLOTS + + # 29. CSM implementation upgrade + validate_proxy_upgrade_event(dg_execution_events[28], CSM_IMPL_V2_ADDRESS, emitted_by=contracts.csm) + + # 30. CSM finalize upgrade validation + assert 'Initialized' in dg_execution_events[29] + assert dg_execution_events[29]['Initialized'][0]['version'] == 2 + + # 31. CSAccounting implementation upgrade + validate_proxy_upgrade_event(dg_execution_events[30], CS_ACCOUNTING_IMPL_V2_ADDRESS, emitted_by=contracts.cs_accounting) + + # 32. CSAccounting finalize upgrade with bond curves + assert 'BondCurveAdded' in dg_execution_events[31] + assert len(dg_execution_events[31]['BondCurveAdded']) == len(CS_CURVES) + assert 'Initialized' in dg_execution_events[31] + assert dg_execution_events[31]['Initialized'][0]['version'] == 2 + + # 33. CSFeeOracle implementation upgrade + validate_proxy_upgrade_event(dg_execution_events[32], CS_FEE_ORACLE_IMPL_V2_ADDRESS, emitted_by=contracts.cs_fee_oracle) + + # 34. CSFeeOracle finalize upgrade with consensus version + validate_consensus_version_set_event(dg_execution_events[33], new_version=3, prev_version=2, emitted_by=contracts.cs_fee_oracle) + validate_contract_version_set_event(dg_execution_events[33], version=2, emitted_by=contracts.cs_fee_oracle) + + # 35. CSFeeDistributor implementation upgrade + validate_proxy_upgrade_event(dg_execution_events[34], CS_FEE_DISTRIBUTOR_IMPL_V2_ADDRESS, emitted_by=contracts.cs_fee_distributor) + + # 36. CSFeeDistributor finalize upgrade + assert 'RebateRecipientSet' in dg_execution_events[35] + assert 'Initialized' in dg_execution_events[35] + assert dg_execution_events[35]['Initialized'][0]['version'] == CS_FEE_DISTRIBUTOR_V2_VERSION + + # 37. Revoke SET_BOND_CURVE_ROLE from CSM on CSAccounting + validate_role_revoke_event( + dg_execution_events[36], + role_hash=contracts.cs_accounting.SET_BOND_CURVE_ROLE().hex(), + account=contracts.csm.address, + emitted_by=contracts.cs_accounting + ) + + # 38. Revoke RESET_BOND_CURVE_ROLE from CSM on CSAccounting + validate_role_revoke_event( + dg_execution_events[37], + role_hash=web3.keccak(text="RESET_BOND_CURVE_ROLE").hex(), + account=contracts.csm.address, + emitted_by=contracts.cs_accounting + ) + + # 39. Revoke RESET_BOND_CURVE_ROLE from CSM committee on CSAccounting + validate_role_revoke_event( + dg_execution_events[38], + role_hash=web3.keccak(text="RESET_BOND_CURVE_ROLE").hex(), + account=CSM_COMMITTEE_MS, + emitted_by=contracts.cs_accounting + ) + + # 40. Grant CREATE_NODE_OPERATOR_ROLE to permissionless gate on CSM + validate_role_grant_event( + dg_execution_events[39], + role_hash=contracts.csm.CREATE_NODE_OPERATOR_ROLE().hex(), + account=cs_permissionless_gate.address, + emitted_by=contracts.csm + ) + + # 41. Grant CREATE_NODE_OPERATOR_ROLE to vetted gate on CSM + validate_role_grant_event( + dg_execution_events[40], + role_hash=contracts.csm.CREATE_NODE_OPERATOR_ROLE().hex(), + account=cs_vetted_gate.address, + emitted_by=contracts.csm + ) + + # 42. Grant SET_BOND_CURVE_ROLE to vetted gate on CSAccounting + validate_role_grant_event( + dg_execution_events[41], + role_hash=contracts.cs_accounting.SET_BOND_CURVE_ROLE().hex(), + account=cs_vetted_gate.address, + emitted_by=contracts.cs_accounting + ) + + # 43. Revoke VERIFIER_ROLE from old verifier on CSM + validate_role_revoke_event( + dg_execution_events[42], + role_hash=contracts.csm.VERIFIER_ROLE().hex(), + account=contracts.cs_verifier.address, + emitted_by=contracts.csm + ) + + # 44. Grant VERIFIER_ROLE to new verifier on CSM + validate_role_grant_event( + dg_execution_events[43], + role_hash=contracts.csm.VERIFIER_ROLE().hex(), + account=cs_verifier_v2.address, + emitted_by=contracts.csm + ) + + # 45. Revoke PAUSE_ROLE from old GateSeal on CSM + validate_role_revoke_event( + dg_execution_events[44], + role_hash=contracts.csm.PAUSE_ROLE().hex(), + account=CS_GATE_SEAL_ADDRESS, + emitted_by=contracts.csm + ) + + # 46. Revoke PAUSE_ROLE from old GateSeal on CSAccounting + validate_role_revoke_event( + dg_execution_events[45], + role_hash=contracts.cs_accounting.PAUSE_ROLE().hex(), + account=CS_GATE_SEAL_ADDRESS, + emitted_by=contracts.cs_accounting + ) + + # 47. Revoke PAUSE_ROLE from old GateSeal on CSFeeOracle + validate_role_revoke_event( + dg_execution_events[46], + role_hash=contracts.cs_fee_oracle.PAUSE_ROLE().hex(), + account=CS_GATE_SEAL_ADDRESS, + emitted_by=contracts.cs_fee_oracle + ) + + # 48. Grant PAUSE_ROLE to new GateSeal on CSM + validate_role_grant_event( + dg_execution_events[47], + role_hash=contracts.csm.PAUSE_ROLE().hex(), + account=CS_GATE_SEAL_V2_ADDRESS, + emitted_by=contracts.csm + ) + + # 49. Grant PAUSE_ROLE to new GateSeal on CSAccounting + validate_role_grant_event( + dg_execution_events[48], + role_hash=contracts.cs_accounting.PAUSE_ROLE().hex(), + account=CS_GATE_SEAL_V2_ADDRESS, + emitted_by=contracts.cs_accounting + ) + + # 50. Grant PAUSE_ROLE to new GateSeal on CSFeeOracle + validate_role_grant_event( + dg_execution_events[49], + role_hash=contracts.cs_fee_oracle.PAUSE_ROLE().hex(), + account=CS_GATE_SEAL_V2_ADDRESS, + emitted_by=contracts.cs_fee_oracle + ) + + # 51. Grant MANAGE_BOND_CURVES_ROLE to agent on CSAccounting + validate_role_grant_event( + dg_execution_events[50], + role_hash=contracts.cs_accounting.MANAGE_BOND_CURVES_ROLE().hex(), + account=contracts.agent.address, + emitted_by=contracts.cs_accounting + ) + + # 52. Add ICS bond curve + ics_curve_id = len(CS_CURVES) + validate_bond_curve_added_event(dg_execution_events[51], curve_id=ics_curve_id, emitted_by=contracts.cs_accounting) + + # 53. Revoke MANAGE_BOND_CURVES_ROLE from agent on CSAccounting + validate_role_revoke_event( + dg_execution_events[52], + role_hash=contracts.cs_accounting.MANAGE_BOND_CURVES_ROLE().hex(), + account=contracts.agent.address, + emitted_by=contracts.cs_accounting + ) + + # 54. Increase CSM share in Staking Router + validate_staking_module_update_event( + dg_execution_events[53], + module_id=CS_MODULE_ID, + share_limit=CS_MODULE_NEW_TARGET_SHARE_BP, + priority_share_threshold=CS_MODULE_NEW_PRIORITY_EXIT_THRESHOLD_BP, + module_fee_points_bp=CS_MODULE_MODULE_FEE_BP, + treasury_fee_points_bp=CS_MODULE_TREASURY_FEE_BP, + max_deposits_per_block=CS_MODULE_MAX_DEPOSITS_PER_BLOCK, + min_deposit_block_distance=CS_MODULE_MIN_DEPOSIT_BLOCK_DISTANCE, + emitted_by=contracts.staking_router + ) + + # 55. Add EasyTrack factory for CSSetVettedGateTree + validate_evmscript_factory_added_event( + event=dg_bypass_voting_event, + p=EVMScriptFactoryAdded( + factory_addr=CS_SET_VETTED_GATE_TREE_FACTORY, + permissions=create_permissions(cs_vetted_gate, "setTreeParams") + ), + emitted_by=contracts.easy_track, + ) diff --git a/archive/tests/test_vote_tw_csm2_hoodi.py b/archive/tests/test_vote_tw_csm2_hoodi.py new file mode 100644 index 000000000..01b224f14 --- /dev/null +++ b/archive/tests/test_vote_tw_csm2_hoodi.py @@ -0,0 +1,1062 @@ +from typing import Optional +from archive.scripts.vote_tw_csm2_hoodi import start_vote +from brownie import interface, reverts, chain, convert, web3, ZERO_ADDRESS # type: ignore +from brownie.network.event import EventDict +from utils.easy_track import create_permissions +from utils.test.tx_tracing_helpers import group_voting_events_from_receipt, group_dg_events_from_receipt +from utils.test.event_validators.easy_track import validate_evmscript_factory_added_event, EVMScriptFactoryAdded +from utils.test.event_validators.dual_governance import validate_dual_governance_submit_event +from utils.dual_governance import wait_for_noon_utc_to_satisfy_time_constrains +from utils.config import ( + DUAL_GOVERNANCE, + TIMELOCK, + DUAL_GOVERNANCE_EXECUTORS, + LDO_HOLDER_ADDRESS_FOR_TESTS, + CS_MODULE_ID, + CS_MODULE_MODULE_FEE_BP, + CS_MODULE_MAX_DEPOSITS_PER_BLOCK, + CS_MODULE_MIN_DEPOSIT_BLOCK_DISTANCE, + CS_MODULE_TREASURY_FEE_BP, + CS_GATE_SEAL_ADDRESS, + CSM_COMMITTEE_MS, + ARAGON_KERNEL, + AGENT, + VOTING, + contracts, +) + + +def validate_proxy_upgrade_event(event: EventDict, implementation: str, emitted_by: Optional[str] = None): + assert "Upgraded" in event, "No Upgraded event found" + + assert event["Upgraded"][0]["implementation"] == implementation, "Wrong implementation address" + + if emitted_by is not None: + assert convert.to_address(event["Upgraded"][0]["_emitted_by"]) == convert.to_address(emitted_by), "Wrong event emitter" + + +def validate_consensus_version_set_event(event: EventDict, new_version: int, prev_version: int, emitted_by: Optional[str] = None): + assert "ConsensusVersionSet" in event, "No ConsensusVersionSet event found" + + assert event["ConsensusVersionSet"][0]["version"] == new_version, "Wrong new version" + + assert event["ConsensusVersionSet"][0]["prevVersion"] == prev_version, "Wrong previous version" + + if emitted_by is not None: + assert convert.to_address(event["ConsensusVersionSet"][0]["_emitted_by"]) == convert.to_address(emitted_by), "Wrong event emitter" + + +def validate_role_grant_event(event: EventDict, role_hash: str, account: str, emitted_by: Optional[str] = None): + assert "RoleGranted" in event, "No RoleGranted event found" + + # Strip 0x prefix for consistent comparison + expected_role_hash = role_hash.replace('0x', '') + actual_role_hash = event["RoleGranted"][0]["role"].hex().replace('0x', '') + + assert actual_role_hash == expected_role_hash, "Wrong role hash" + + assert convert.to_address(event["RoleGranted"][0]["account"]) == convert.to_address(account), "Wrong account" + + if emitted_by is not None: + assert convert.to_address(event["RoleGranted"][0]["_emitted_by"]) == convert.to_address(emitted_by), "Wrong event emitter" + + +def validate_role_revoke_event(event: EventDict, role_hash: str, account: str, emitted_by: Optional[str] = None): + assert "RoleRevoked" in event, "No RoleRevoked event found" + + # Strip 0x prefix for consistent comparison + expected_role_hash = role_hash.replace('0x', '') + actual_role_hash = event["RoleRevoked"][0]["role"].hex().replace('0x', '') + + assert actual_role_hash == expected_role_hash, "Wrong role hash" + + assert convert.to_address(event["RoleRevoked"][0]["account"]) == convert.to_address(account), "Wrong account" + + if emitted_by is not None: + assert convert.to_address(event["RoleRevoked"][0]["_emitted_by"]) == convert.to_address(emitted_by), "Wrong event emitter" + + +def validate_contract_version_set_event(event: EventDict, version: int, emitted_by: Optional[str] = None): + assert "ContractVersionSet" in event, "No ContractVersionSet event found" + + assert event["ContractVersionSet"][0]["version"] == version, "Wrong version" + + if emitted_by is not None: + assert convert.to_address(event["ContractVersionSet"][0]["_emitted_by"]) == convert.to_address(emitted_by), "Wrong event emitter" + + +def validate_bond_curve_added_event(event: EventDict, curve_id: int, emitted_by: Optional[str] = None): + assert "BondCurveAdded" in event, "No BondCurveAdded event found" + + assert event["BondCurveAdded"][0]["curveId"] == curve_id, "Wrong curve ID" + + if emitted_by is not None: + assert convert.to_address(event["BondCurveAdded"][0]["_emitted_by"]) == convert.to_address(emitted_by), "Wrong event emitter" + + +def validate_staking_module_update_event( + event: EventDict, + module_id: int, + share_limit: int, + priority_share_threshold: int, + module_fee_points_bp: int, + treasury_fee_points_bp: int, + max_deposits_per_block: int, + min_deposit_block_distance: int, + emitted_by: Optional[str] = None +): + assert "StakingModuleShareLimitSet" in event, "No StakingModuleShareLimitSet event found" + assert "StakingModuleFeesSet" in event, "No StakingModuleFeesSet event found" + assert "StakingModuleMaxDepositsPerBlockSet" in event, "No StakingModuleMaxDepositsPerBlockSet event found" + assert "StakingModuleMinDepositBlockDistanceSet" in event, "No StakingModuleMinDepositBlockDistanceSet event found" + + assert len(event["StakingModuleShareLimitSet"]) == 1, "Multiple StakingModuleShareLimitSet events found" + assert len(event["StakingModuleFeesSet"]) == 1, "Multiple StakingModuleFeesSet events found" + assert len(event["StakingModuleMaxDepositsPerBlockSet"]) == 1, "Multiple StakingModuleMaxDepositsPerBlockSet events found" + assert len(event["StakingModuleMinDepositBlockDistanceSet"]) == 1, "Multiple StakingModuleMinDepositBlockDistanceSet events found" + + assert event["StakingModuleShareLimitSet"][0]["stakingModuleId"] == module_id, "Wrong module ID" + assert event["StakingModuleShareLimitSet"][0]["stakeShareLimit"] == share_limit, "Wrong share limit" + assert event["StakingModuleShareLimitSet"][0]["priorityExitShareThreshold"] == priority_share_threshold, "Wrong priority threshold" + + assert event["StakingModuleFeesSet"][0]["stakingModuleFee"] == module_fee_points_bp, "Wrong fee points" + assert event["StakingModuleFeesSet"][0]["treasuryFee"] == treasury_fee_points_bp, "Wrong treasury fee points" + + assert event["StakingModuleMaxDepositsPerBlockSet"][0]["maxDepositsPerBlock"] == max_deposits_per_block, "Wrong max deposits" + + assert event["StakingModuleMinDepositBlockDistanceSet"][0]["minDepositBlockDistance"] == min_deposit_block_distance, "Wrong min distance" + + if emitted_by is not None: + assert convert.to_address(event["StakingModuleShareLimitSet"][0]["_emitted_by"]) == convert.to_address(emitted_by), "Wrong event emitter" + assert convert.to_address(event["StakingModuleFeesSet"][0]["_emitted_by"]) == convert.to_address(emitted_by), "Wrong event emitter" + assert convert.to_address(event["StakingModuleMaxDepositsPerBlockSet"][0]["_emitted_by"]) == convert.to_address(emitted_by), "Wrong event emitter" + assert convert.to_address(event["StakingModuleMinDepositBlockDistanceSet"][0]["_emitted_by"]) == convert.to_address(emitted_by), "Wrong event emitter" + + +def get_ossifiable_proxy_impl(proxy_address): + """Get implementation address from an OssifiableProxy""" + proxy = interface.OssifiableProxy(proxy_address) + return proxy.proxy__getImplementation() + + +def get_wv_contract_proxy_impl(proxy_address): + """Get implementation address from an WithdrawalContractProxy""" + proxy = interface.WithdrawalContractProxy(proxy_address) + return proxy.implementation() + + +def check_proxy_implementation(proxy_address, expected_impl): + """Check that proxy has expected implementation""" + actual_impl = get_ossifiable_proxy_impl(proxy_address) + assert actual_impl == expected_impl, f"Expected impl {expected_impl}, got {actual_impl}" + + +# New core contracts implementations +LIDO_LOCATOR_IMPL = "0x003f20CD17e7683A7F88A7AfF004f0C44F0cfB31" +ACCOUNTING_ORACLE_IMPL = "0x2341c9BE0E639f262f8170f9ef1efeCC92cCF617" +VALIDATORS_EXIT_BUS_ORACLE_IMPL = "0x7E6d9C9C44417bf2EaF69685981646e9752D623A" +WITHDRAWAL_VAULT_IMPL = "0xfe7A58960Af333eAdeAeC39149F9d6A71dc3E668" +STAKING_ROUTER_IMPL = "0xd5F04A81ac472B2cB32073CE9dDABa6FaF022827" +NODE_OPERATORS_REGISTRY_IMPL = "0x95F00b016bB31b7182D96D25074684518246E42a" + +TRIGGERABLE_WITHDRAWALS_GATEWAY = "0x6679090D92b08a2a686eF8614feECD8cDFE209db" +VALIDATOR_EXIT_VERIFIER = "0xFd4386A8795956f4B6D01cbb6dB116749731D7bD" + +# Add missing constants +OLD_GATE_SEAL_ADDRESS = "0x2168Ea6D948Ab49c3D34c667A7e02F92369F3A9C" +NEW_WQ_GATE_SEAL = "0x73d76Bd3D589B2b2185c402da82cdAfbc18b958D" +NEW_TW_GATE_SEAL = "0x368f2fcb593170823cc844F1B29e75E3d26879A1" +RESEAL_MANAGER = "0x05172CbCDb7307228F781436b327679e4DAE166B" + +# Add EasyTrack constants +EASYTRACK_EVMSCRIPT_EXECUTOR = "0x79a20FD0FA36453B2F45eAbab19bfef43575Ba9E" +EASYTRACK_SDVT_SUBMIT_VALIDATOR_EXIT_REQUEST_HASHES_FACTORY = "0xAa3D6A8B52447F272c1E8FAaA06EA06658bd95E2" +EASYTRACK_CURATED_SUBMIT_VALIDATOR_EXIT_REQUEST_HASHES_FACTORY = "0x397206ecdbdcb1A55A75e60Fc4D054feC72E5f63" + +# Oracle consensus versions +AO_CONSENSUS_VERSION = 4 +VEBO_CONSENSUS_VERSION = 4 +CSM_CONSENSUS_VERSION = 3 + +EXIT_EVENTS_LOOKBACK_WINDOW_IN_SLOTS = 14 * 7200 + +NOR_EXIT_DEADLINE_IN_SEC = 172800 + +# CSM +CS_MODULE_NEW_TARGET_SHARE_BP = 1600 # 16% +CS_MODULE_NEW_PRIORITY_EXIT_THRESHOLD_BP = 2100 # 21% + +CS_ACCOUNTING_IMPL_V2_ADDRESS = "0x9483b34504292a0E4f6509e5887D2c68f7129638" +CS_FEE_DISTRIBUTOR_IMPL_V2_ADDRESS = "0xe05F7Aab7177D73f26e62a5296120583F5F18031" +CS_FEE_ORACLE_IMPL_V2_ADDRESS = "0x752fF00fcacdB66Bc512a067F15A5E0B0b50EADB" +CSM_IMPL_V2_ADDRESS = "0x9aE387EB2abA80B9B1ebc145597D593EFAE61f31" + +CS_GATE_SEAL_V2_ADDRESS = "0x94a3aEB0E9148F64CB453Be2BDe2Bc0148f6AC24" +CS_EJECTOR_ADDRESS = "0x21e271cBa32672B106737AbeB3a45E53Fe9a0df4" +CS_PERMISSIONLESS_GATE_ADDRESS = "0x5553077102322689876A6AdFd48D75014c28acfb" +CS_VETTED_GATE_ADDRESS = "0x10a254E724fe2b7f305F76f3F116a3969c53845f" +CS_VERIFIER_V2_ADDRESS = "0xf805b3711cBB48F15Ae2bb27095ddC38c5339968" + +CS_CURVES = [ + ([1, 2.4 * 10**18], [2, 1.3 * 10**18]), # Default Curve + ([1, 1.5 * 10**18], [2, 1.3 * 10**18]), # Legacy EA Curve +] +CS_ICS_GATE_BOND_CURVE = ([1, 1.5 * 10**18], [2, 1.3 * 10**18]) # Identified Community Stakers Gate Bond Curve + +# Contract versions expected after upgrade +CSM_V2_VERSION = 2 +CS_ACCOUNTING_V2_VERSION = 2 +CS_FEE_ORACLE_V2_VERSION = 2 +CS_FEE_DISTRIBUTOR_V2_VERSION = 2 + +EASYTRACK_CS_SET_VETTED_GATE_TREE_FACTORY = "0xa890fc73e1b771Ee6073e2402E631c312FF92Cd9" + + +def test_tw_vote(helpers, accounts, vote_ids_from_env, stranger): + # Save original implementations for comparison + locator_impl_before = get_ossifiable_proxy_impl(contracts.lido_locator) + accounting_oracle_impl_before = get_ossifiable_proxy_impl(contracts.accounting_oracle) + vebo_impl_before = get_ossifiable_proxy_impl(contracts.validators_exit_bus_oracle) + withdrawal_vault_impl_before = get_wv_contract_proxy_impl(contracts.withdrawal_vault) + staking_router_impl_before = get_ossifiable_proxy_impl(contracts.staking_router) + + csm_impl_before = get_ossifiable_proxy_impl(contracts.csm.address) + cs_accounting_impl_before = get_ossifiable_proxy_impl(contracts.cs_accounting.address) + cs_fee_oracle_impl_before = get_ossifiable_proxy_impl(contracts.cs_fee_oracle.address) + cs_fee_distributor_impl_before = get_ossifiable_proxy_impl(contracts.cs_fee_distributor.address) + + timelock = interface.EmergencyProtectedTimelock(TIMELOCK) + dual_governance = interface.DualGovernance(DUAL_GOVERNANCE) + + # Not yet used by the protocol, but needed for the test + triggerable_withdrawals_gateway = interface.TriggerableWithdrawalsGateway(TRIGGERABLE_WITHDRAWALS_GATEWAY) + cs_ejector = interface.CSEjector(CS_EJECTOR_ADDRESS) + cs_permissionless_gate = interface.CSPermissionlessGate(CS_PERMISSIONLESS_GATE_ADDRESS) + cs_vetted_gate = interface.CSVettedGate(CS_VETTED_GATE_ADDRESS) + cs_verifier_v2 = interface.CSVerifierV2(CS_VERIFIER_V2_ADDRESS) + + # --- Initial state checks --- + + # Step 1: Check Lido Locator implementation initial state + assert locator_impl_before != LIDO_LOCATOR_IMPL, "Locator implementation should be different before upgrade" + + # Step 2: Check VEBO implementation initial state + assert vebo_impl_before != VALIDATORS_EXIT_BUS_ORACLE_IMPL, "VEBO implementation should be different before upgrade" + + # Step 3: Check VEBO finalizeUpgrade_v2 state + try: + assert contracts.validators_exit_bus_oracle.getMaxValidatorsPerReport() != 600, "VEBO max validators per report should not be 600 before upgrade" + except Exception: + pass # Function might not exist yet + + # Steps 4-6: Check VEBO consensus version management + initial_vebo_consensus_version = contracts.validators_exit_bus_oracle.getConsensusVersion() + assert initial_vebo_consensus_version < VEBO_CONSENSUS_VERSION, f"VEBO consensus version should be less than {VEBO_CONSENSUS_VERSION}" + + # Step 7: Check TWG role for CS Ejector initial state + add_full_withdrawal_request_role = triggerable_withdrawals_gateway.ADD_FULL_WITHDRAWAL_REQUEST_ROLE() + assert not triggerable_withdrawals_gateway.hasRole(add_full_withdrawal_request_role, cs_ejector), "CS Ejector should not have ADD_FULL_WITHDRAWAL_REQUEST_ROLE before upgrade" + + # Step 8: Check TWG role for VEB initial state + assert not triggerable_withdrawals_gateway.hasRole(add_full_withdrawal_request_role, contracts.validators_exit_bus_oracle), "VEBO should not have ADD_FULL_WITHDRAWAL_REQUEST_ROLE before upgrade" + + # Step 9: Check EasyTrack VEB SUBMIT_REPORT_HASH_ROLE initial state + submit_report_hash_role = web3.keccak(text="SUBMIT_REPORT_HASH_ROLE") + assert not contracts.validators_exit_bus_oracle.hasRole(submit_report_hash_role, EASYTRACK_EVMSCRIPT_EXECUTOR), "EasyTrack executor should not have SUBMIT_REPORT_HASH_ROLE on VEBO before upgrade" + + # Step 10: Check DualGovernance tiebreaker initial state + tiebreaker_details = contracts.dual_governance.getTiebreakerDetails() + initial_tiebreakers = tiebreaker_details[3] # sealableWithdrawalBlockers + assert TRIGGERABLE_WITHDRAWALS_GATEWAY not in initial_tiebreakers, "TWG should not be in tiebreaker list before upgrade" + + # Step 9: Check Withdrawal Vault implementation initial state + assert withdrawal_vault_impl_before != WITHDRAWAL_VAULT_IMPL, "Withdrawal Vault implementation should be different before upgrade" + + # Step 10: Withdrawal Vault finalizeUpgrade_v2 check is done post-execution + assert contracts.withdrawal_vault.getContractVersion() == 1, "Withdrawal Vault version should be 1 before upgrade" + + # Step 11: Check Accounting Oracle implementation initial state + assert accounting_oracle_impl_before != ACCOUNTING_ORACLE_IMPL, "Accounting Oracle implementation should be different before upgrade" + + # Steps 12-14: Check AO consensus version management + initial_ao_consensus_version = contracts.accounting_oracle.getConsensusVersion() + assert initial_ao_consensus_version < AO_CONSENSUS_VERSION, f"AO consensus version should be less than {AO_CONSENSUS_VERSION}" + assert not contracts.accounting_oracle.hasRole(contracts.accounting_oracle.MANAGE_CONSENSUS_VERSION_ROLE(), contracts.agent), "Agent should not have MANAGE_CONSENSUS_VERSION_ROLE on AO before upgrade" + + # Step 17: Check AO version before finalizeUpgrade_v3 + assert contracts.accounting_oracle.getContractVersion() == 2, "AO contract version should be 2 before finalizeUpgrade_v3" + + # Step 15: Check Staking Router implementation initial state + assert staking_router_impl_before != STAKING_ROUTER_IMPL, "Staking Router implementation should be different before upgrade" + + # Steps 16-17: Check SR roles initial state + try: + report_validator_exiting_status_role = contracts.staking_router.REPORT_VALIDATOR_EXITING_STATUS_ROLE() + report_validator_exit_triggered_role = contracts.staking_router.REPORT_VALIDATOR_EXIT_TRIGGERED_ROLE() + except Exception as e: + assert "Unknown typed error: 0x" in str(e), f"Unexpected error: {e}" + report_validator_exiting_status_role = ZERO_ADDRESS + report_validator_exit_triggered_role = ZERO_ADDRESS + + assert report_validator_exiting_status_role == ZERO_ADDRESS, "REPORT_VALIDATOR_EXITING_STATUS_ROLE should not exist before upgrade" + assert report_validator_exit_triggered_role == ZERO_ADDRESS, "REPORT_VALIDATOR_EXIT_TRIGGERED_ROLE should not exist before upgrade" + + # Step 18: Check APP_MANAGER_ROLE initial state + app_manager_role = web3.keccak(text="APP_MANAGER_ROLE") + assert contracts.acl.getPermissionManager(ARAGON_KERNEL, app_manager_role) == AGENT, "AGENT should be the permission manager for APP_MANAGER_ROLE" + assert contracts.node_operators_registry.kernel() == ARAGON_KERNEL, "Node Operators Registry must use the correct kernel" + assert not contracts.acl.hasPermission(VOTING, ARAGON_KERNEL, app_manager_role), "VOTING should not have APP_MANAGER_ROLE before the upgrade" + assert not contracts.acl.hasPermission(AGENT, ARAGON_KERNEL, app_manager_role), "AGENT should not have APP_MANAGER_ROLE before the upgrade" + + # Steps 19-23: Check NOR and sDVT initial state + assert not contracts.acl.hasPermission(contracts.agent, contracts.kernel, app_manager_role), "Agent should not have APP_MANAGER_ROLE before upgrade" + assert contracts.node_operators_registry.getContractVersion() == 3, "Node Operators Registry version should be 3 before upgrade" + assert contracts.simple_dvt.getContractVersion() == 3, "Simple DVT version should be 3 before upgrade" + + # Step 24: Check CONFIG_MANAGER_ROLE initial state + config_manager_role = contracts.oracle_daemon_config.CONFIG_MANAGER_ROLE() + assert not contracts.oracle_daemon_config.hasRole(config_manager_role, contracts.agent), "Agent should not have CONFIG_MANAGER_ROLE on Oracle Daemon Config before upgrade" + + # Steps 25-27: Check Oracle Daemon Config variables to be removed + try: + contracts.oracle_daemon_config.get('NODE_OPERATOR_NETWORK_PENETRATION_THRESHOLD_BP') + contracts.oracle_daemon_config.get('VALIDATOR_DELAYED_TIMEOUT_IN_SLOTS') + contracts.oracle_daemon_config.get('VALIDATOR_DELINQUENT_TIMEOUT_IN_SLOTS') + except Exception as e: + assert False, f"Expected variables to exist before removal: {e}" + + # Step 28: Check that EXIT_EVENTS_LOOKBACK_WINDOW_IN_SLOTS doesn't exist yet + try: + contracts.oracle_daemon_config.get('EXIT_EVENTS_LOOKBACK_WINDOW_IN_SLOTS') + assert False, "EXIT_EVENTS_LOOKBACK_WINDOW_IN_SLOTS should not exist before vote" + except Exception: + pass # Expected to fail + + # Step 29: Check CSM implementation initial state + assert csm_impl_before != CSM_IMPL_V2_ADDRESS, "CSM implementation should be different before vote" + + # Step 30: Check CSM finalizeUpgradeV2 initial state + with reverts(): + # The function should not exist yet + contracts.csm.getInitializedVersion() + + # CSM Step 32: Check CSAccounting implementation (pre-vote state) + assert cs_accounting_impl_before != CS_ACCOUNTING_IMPL_V2_ADDRESS, "CSAccounting implementation should be different before vote" + + # CSM Step 33: Check CSAccounting finalizeUpgradeV2 was not called (pre-vote state) + with reverts(): + # The function should not exist yet + contracts.cs_accounting.getInitializedVersion() + + # CSM Step 34: Check CSFeeOracle implementation (pre-vote state) + assert cs_fee_oracle_impl_before != CS_FEE_ORACLE_IMPL_V2_ADDRESS, "CSFeeOracle implementation should be different before vote" + + # CSM Step 35: Check CSFeeOracle finalizeUpgradeV2 was not called (pre-vote state) + assert contracts.cs_fee_oracle.getContractVersion() < CS_FEE_ORACLE_V2_VERSION, f"CSFeeOracle version should be less than {CS_FEE_ORACLE_V2_VERSION} before vote" + assert contracts.cs_fee_oracle.getConsensusVersion() < 3, "CSFeeOracle consensus version should be less than 3 before vote" + + # CSM Step 36: Check CSFeeDistributor implementation (pre-vote state) + assert cs_fee_distributor_impl_before != CS_FEE_DISTRIBUTOR_IMPL_V2_ADDRESS, "CSFeeDistributor implementation should be different before vote" + + # CSM Step 37: Check CSFeeDistributor finalizeUpgradeV2 was not called (pre-vote state) + with reverts(): + # The function should not exist yet + contracts.cs_fee_distributor.getInitializedVersion() + + # CSM Steps 38-40: CSAccounting roles (pre-vote state) + assert contracts.cs_accounting.hasRole(contracts.cs_accounting.SET_BOND_CURVE_ROLE(), contracts.csm.address), "CSM should have SET_BOND_CURVE_ROLE on CSAccounting before vote" + assert contracts.cs_accounting.hasRole(web3.keccak(text="RESET_BOND_CURVE_ROLE"), contracts.csm.address), "CSM should have RESET_BOND_CURVE_ROLE on CSAccounting before vote" + assert contracts.cs_accounting.hasRole(web3.keccak(text="RESET_BOND_CURVE_ROLE"), CSM_COMMITTEE_MS), "CSM committee should have RESET_BOND_CURVE_ROLE on CSAccounting before vote" + + # CSM Steps 41-42: CSM roles (pre-vote state) + assert not contracts.csm.hasRole(web3.keccak(text="CREATE_NODE_OPERATOR_ROLE"), cs_permissionless_gate.address), "Permissionless gate should not have CREATE_NODE_OPERATOR_ROLE on CSM before vote" + assert not contracts.csm.hasRole(web3.keccak(text="CREATE_NODE_OPERATOR_ROLE"), cs_vetted_gate.address), "Vetted gate should not have CREATE_NODE_OPERATOR_ROLE on CSM before vote" + + # CSM Step 43: CSAccounting bond curve role for vetted gate (pre-vote state) + assert not contracts.cs_accounting.hasRole(contracts.cs_accounting.SET_BOND_CURVE_ROLE(), cs_vetted_gate.address), "Vetted gate should not have SET_BOND_CURVE_ROLE on CSAccounting before vote" + + # CSM Steps 44-45: Verifier roles (pre-vote state) + assert contracts.csm.hasRole(contracts.csm.VERIFIER_ROLE(), contracts.cs_verifier.address), "Old verifier should have VERIFIER_ROLE on CSM before vote" + assert not contracts.csm.hasRole(contracts.csm.VERIFIER_ROLE(), cs_verifier_v2.address), "New verifier should not have VERIFIER_ROLE on CSM before vote" + + # CSM Steps 46-51: GateSeal roles (pre-vote state) + assert contracts.csm.hasRole(contracts.csm.PAUSE_ROLE(), CS_GATE_SEAL_ADDRESS), "Old GateSeal should have PAUSE_ROLE on CSM before vote" + assert contracts.cs_accounting.hasRole(contracts.cs_accounting.PAUSE_ROLE(), CS_GATE_SEAL_ADDRESS), "Old GateSeal should have PAUSE_ROLE on CSAccounting before vote" + assert contracts.cs_fee_oracle.hasRole(contracts.cs_fee_oracle.PAUSE_ROLE(), CS_GATE_SEAL_ADDRESS), "Old GateSeal should have PAUSE_ROLE on CSFeeOracle before vote" + + assert not contracts.csm.hasRole(contracts.csm.PAUSE_ROLE(), CS_GATE_SEAL_V2_ADDRESS), "New GateSeal should not have PAUSE_ROLE on CSM before vote" + assert not contracts.cs_accounting.hasRole(contracts.cs_accounting.PAUSE_ROLE(), CS_GATE_SEAL_V2_ADDRESS), "New GateSeal should not have PAUSE_ROLE on CSAccounting before vote" + assert not contracts.cs_fee_oracle.hasRole(contracts.cs_fee_oracle.PAUSE_ROLE(), CS_GATE_SEAL_V2_ADDRESS), "New GateSeal should not have PAUSE_ROLE on CSFeeOracle before vote" + + # CSM Step 52: Staking Router CSM module state before vote (pre-vote state) + csm_module_before = contracts.staking_router.getStakingModule(CS_MODULE_ID) + csm_share_before = csm_module_before['stakeShareLimit'] + csm_priority_exit_threshold_before = csm_module_before['priorityExitShareThreshold'] + assert csm_share_before != CS_MODULE_NEW_TARGET_SHARE_BP, f"CSM share should not be {CS_MODULE_NEW_TARGET_SHARE_BP} before vote, current: {csm_share_before}" + assert csm_priority_exit_threshold_before != CS_MODULE_NEW_PRIORITY_EXIT_THRESHOLD_BP, f"CSM priority exit threshold should not be {CS_MODULE_NEW_PRIORITY_EXIT_THRESHOLD_BP} before vote, current: {csm_priority_exit_threshold_before}" + + # CSM Step 65: EasyTrack factories before vote (pre-vote state) + initial_factories = contracts.easy_track.getEVMScriptFactories() + assert EASYTRACK_CS_SET_VETTED_GATE_TREE_FACTORY not in initial_factories, "EasyTrack should not have CSMSetVettedGateTree factory before vote" + assert EASYTRACK_SDVT_SUBMIT_VALIDATOR_EXIT_REQUEST_HASHES_FACTORY not in initial_factories, "EasyTrack should not have SDVT validator exit request hashes factory before vote" + assert EASYTRACK_CURATED_SUBMIT_VALIDATOR_EXIT_REQUEST_HASHES_FACTORY not in initial_factories, "EasyTrack should not have Curated validator exit request hashes factory before vote" + + # Gate Seals: Check initial states before vote + assert contracts.withdrawal_queue.hasRole(contracts.withdrawal_queue.PAUSE_ROLE(), OLD_GATE_SEAL_ADDRESS), "Old GateSeal should have PAUSE_ROLE on WithdrawalQueue before vote" + assert contracts.validators_exit_bus_oracle.hasRole(contracts.validators_exit_bus_oracle.PAUSE_ROLE(), OLD_GATE_SEAL_ADDRESS), "Old GateSeal should have PAUSE_ROLE on VEBO before vote" + assert not contracts.withdrawal_queue.hasRole(contracts.withdrawal_queue.PAUSE_ROLE(), NEW_WQ_GATE_SEAL), "New WQ GateSeal should not have PAUSE_ROLE on WithdrawalQueue before vote" + assert not contracts.validators_exit_bus_oracle.hasRole(contracts.validators_exit_bus_oracle.PAUSE_ROLE(), NEW_TW_GATE_SEAL), "New TW GateSeal should not have PAUSE_ROLE on VEBO before vote" + assert not triggerable_withdrawals_gateway.hasRole(triggerable_withdrawals_gateway.PAUSE_ROLE(), NEW_TW_GATE_SEAL), "New TW GateSeal should not have PAUSE_ROLE on TWG before vote" + + # ResealManager: Check initial states before vote + assert not triggerable_withdrawals_gateway.hasRole(triggerable_withdrawals_gateway.PAUSE_ROLE(), RESEAL_MANAGER), "ResealManager should not have PAUSE_ROLE on TWG before vote" + assert not triggerable_withdrawals_gateway.hasRole(triggerable_withdrawals_gateway.RESUME_ROLE(), RESEAL_MANAGER), "ResealManager should not have RESUME_ROLE on TWG before vote" + + # START VOTE + if len(vote_ids_from_env) > 0: + (vote_id,) = vote_ids_from_env + else: + tx_params = {"from": LDO_HOLDER_ADDRESS_FOR_TESTS} + vote_id, _ = start_vote(tx_params, silent=True) + + vote_tx = helpers.execute_vote(accounts, vote_id, contracts.voting) + print(f"voteId = {vote_id}") + + proposal_id = vote_tx.events["ProposalSubmitted"][1]["proposalId"] + print(f"proposalId = {proposal_id}") + + chain.sleep(timelock.getAfterSubmitDelay() + 1) + dual_governance.scheduleProposal(proposal_id, {"from": stranger}) + + chain.sleep(timelock.getAfterScheduleDelay() + 1) + wait_for_noon_utc_to_satisfy_time_constrains() + + dg_tx = timelock.execute(proposal_id, {"from": stranger}) + + # --- VALIDATE EXECUTION RESULTS --- + + # Step 1: Validate Lido Locator implementation was updated + assert get_ossifiable_proxy_impl(contracts.lido_locator) == LIDO_LOCATOR_IMPL, "Locator implementation should be updated to the new value" + + # Step 2-3: Validate VEBO implementation was updated and configured + assert get_ossifiable_proxy_impl(contracts.validators_exit_bus_oracle) == VALIDATORS_EXIT_BUS_ORACLE_IMPL, "VEBO implementation should be updated" + assert contracts.validators_exit_bus_oracle.getMaxValidatorsPerReport() == 600, "VEBO max validators per report should be set to 600" + + # Validate exit request limit parameters from finalizeUpgrade_v2 call + exit_request_limits = contracts.validators_exit_bus_oracle.getExitRequestLimitFullInfo() + assert exit_request_limits[0] == 11200, "maxExitRequestsLimit should be 11200" + assert exit_request_limits[1] == 1, "exitsPerFrame should be 1" + assert exit_request_limits[2] == 48, "frameDurationInSec should be 48 hours in seconds" + + # Steps 4-6: Validate VEBO consensus version management + assert not contracts.validators_exit_bus_oracle.hasRole(contracts.validators_exit_bus_oracle.MANAGE_CONSENSUS_VERSION_ROLE(), contracts.agent), "Agent should not have MANAGE_CONSENSUS_VERSION_ROLE on VEBO" + assert contracts.validators_exit_bus_oracle.getConsensusVersion() == VEBO_CONSENSUS_VERSION, f"VEBO consensus version should be set to {VEBO_CONSENSUS_VERSION}" + + # Steps 7-8: Validate TWG roles + assert triggerable_withdrawals_gateway.hasRole(add_full_withdrawal_request_role, cs_ejector), "CS Ejector should have ADD_FULL_WITHDRAWAL_REQUEST_ROLE on TWG" + assert triggerable_withdrawals_gateway.hasRole(add_full_withdrawal_request_role, contracts.validators_exit_bus_oracle), "VEBO should have ADD_FULL_WITHDRAWAL_REQUEST_ROLE on TWG" + + # Step 9: Validate EasyTrack VEB SUBMIT_REPORT_HASH_ROLE + assert contracts.validators_exit_bus_oracle.hasRole(submit_report_hash_role, EASYTRACK_EVMSCRIPT_EXECUTOR), "EasyTrack executor should have SUBMIT_REPORT_HASH_ROLE on VEBO" + + # Step 10: Validate DualGovernance tiebreaker connection + final_tiebreaker_details = contracts.dual_governance.getTiebreakerDetails() + final_tiebreakers = final_tiebreaker_details[3] # sealableWithdrawalBlockers + assert TRIGGERABLE_WITHDRAWALS_GATEWAY in final_tiebreakers, "TWG should be in tiebreaker list after upgrade" + + # Steps 9-10: Validate Withdrawal Vault upgrade + assert get_wv_contract_proxy_impl(contracts.withdrawal_vault) == WITHDRAWAL_VAULT_IMPL, "Withdrawal Vault implementation should be updated" + assert contracts.withdrawal_vault.getContractVersion() == 2, "Withdrawal Vault version should be 2 after finalizeUpgrade_v2" + + # Steps 11-14: Validate Accounting Oracle upgrade + assert get_ossifiable_proxy_impl(contracts.accounting_oracle) == ACCOUNTING_ORACLE_IMPL, "Accounting Oracle implementation should be updated" + assert not contracts.accounting_oracle.hasRole(contracts.accounting_oracle.MANAGE_CONSENSUS_VERSION_ROLE(), contracts.agent), "Agent should not have MANAGE_CONSENSUS_VERSION_ROLE on AO" + assert contracts.accounting_oracle.getConsensusVersion() == AO_CONSENSUS_VERSION, f"AO consensus version should be set to {AO_CONSENSUS_VERSION}" + + # Step 17: Validate AO finalizeUpgrade_v3 + assert contracts.accounting_oracle.getContractVersion() == 3, "AO contract version should be 3 after finalizeUpgrade_v3" + + # Steps 15-17: Validate Staking Router upgrade + assert get_ossifiable_proxy_impl(contracts.staking_router) == STAKING_ROUTER_IMPL, "Staking Router implementation should be updated" + assert contracts.staking_router.hasRole(contracts.staking_router.REPORT_VALIDATOR_EXITING_STATUS_ROLE(), VALIDATOR_EXIT_VERIFIER), "ValidatorExitVerifier should have REPORT_VALIDATOR_EXITING_STATUS_ROLE on SR" + assert contracts.staking_router.hasRole(contracts.staking_router.REPORT_VALIDATOR_EXIT_TRIGGERED_ROLE(), triggerable_withdrawals_gateway), "TWG should have REPORT_VALIDATOR_EXIT_TRIGGERED_ROLE on SR" + + # Steps 18-23: Validate NOR and sDVT updates + assert not contracts.acl.hasPermission(contracts.agent, contracts.kernel, app_manager_role), "Agent should not have APP_MANAGER_ROLE after vote" + assert contracts.node_operators_registry.getContractVersion() == 4, "Node Operators Registry version should be updated to 4" + assert contracts.simple_dvt.getContractVersion() == 4, "Simple DVT version should be updated to 4" + assert contracts.node_operators_registry.exitDeadlineThreshold(0) == NOR_EXIT_DEADLINE_IN_SEC, "NOR exit deadline threshold should be set correctly" + assert contracts.simple_dvt.exitDeadlineThreshold(0) == NOR_EXIT_DEADLINE_IN_SEC, "sDVT exit deadline threshold should be set correctly" + + # Steps 24-28: Validate Oracle Daemon Config changes + assert not contracts.oracle_daemon_config.hasRole(config_manager_role, contracts.agent), "Agent should not have CONFIG_MANAGER_ROLE on Oracle Daemon Config" + for var_name in ['NODE_OPERATOR_NETWORK_PENETRATION_THRESHOLD_BP', 'VALIDATOR_DELAYED_TIMEOUT_IN_SLOTS', 'VALIDATOR_DELINQUENT_TIMEOUT_IN_SLOTS']: + try: + contracts.oracle_daemon_config.get(var_name) + assert False, f"Variable {var_name} should have been removed" + except Exception: + pass # Expected to fail - variable should be removed + assert convert.to_uint(contracts.oracle_daemon_config.get('EXIT_EVENTS_LOOKBACK_WINDOW_IN_SLOTS')) == EXIT_EVENTS_LOOKBACK_WINDOW_IN_SLOTS, f"EXIT_EVENTS_LOOKBACK_WINDOW_IN_SLOTS should be set to {EXIT_EVENTS_LOOKBACK_WINDOW_IN_SLOTS}" + + # Step 29: Validate CSM implementation upgrade + check_proxy_implementation(contracts.csm.address, CSM_IMPL_V2_ADDRESS) + + # Step 30: Validate CSM finalizeUpgradeV2 was called + assert contracts.csm.getInitializedVersion() == CSM_V2_VERSION, f"CSM version should be {CSM_V2_VERSION} after vote" + + # Step 31: Validate CSAccounting implementation upgrade + check_proxy_implementation(contracts.cs_accounting.address, CS_ACCOUNTING_IMPL_V2_ADDRESS) + + # Step 32: Validate CSAccounting finalizeUpgradeV2 was called with bond curves + assert contracts.cs_accounting.getInitializedVersion() == CS_ACCOUNTING_V2_VERSION, f"CSAccounting version should be {CS_ACCOUNTING_V2_VERSION} after vote" + + # Step 33: Validate CSFeeOracle implementation upgrade + check_proxy_implementation(contracts.cs_fee_oracle.address, CS_FEE_ORACLE_IMPL_V2_ADDRESS) + + # Step 34: Validate CSFeeOracle finalizeUpgradeV2 was called with consensus version 3 + assert contracts.cs_fee_oracle.getContractVersion() == CS_FEE_ORACLE_V2_VERSION, f"CSFeeOracle version should be {CS_FEE_ORACLE_V2_VERSION} after vote" + assert contracts.cs_fee_oracle.getConsensusVersion() == CSM_CONSENSUS_VERSION, "CSFeeOracle consensus version should be 3 after vote" + + # Step 35: Validate CSFeeDistributor implementation upgrade + check_proxy_implementation(contracts.cs_fee_distributor.address, CS_FEE_DISTRIBUTOR_IMPL_V2_ADDRESS) + + # Step 36: Validate CSFeeDistributor finalizeUpgradeV2 was called + assert contracts.cs_fee_distributor.getInitializedVersion() == CS_FEE_DISTRIBUTOR_V2_VERSION, f"CSFeeDistributor version should be {CS_FEE_DISTRIBUTOR_V2_VERSION} after vote" + + # Step 37: Validate SET_BOND_CURVE_ROLE was revoked from CSM on CSAccounting + assert not contracts.cs_accounting.hasRole(contracts.cs_accounting.SET_BOND_CURVE_ROLE(), contracts.csm.address), "CSM should not have SET_BOND_CURVE_ROLE on CSAccounting after vote" + + # Step 38: Validate RESET_BOND_CURVE_ROLE was revoked from CSM on CSAccounting + assert not contracts.cs_accounting.hasRole(web3.keccak(text="RESET_BOND_CURVE_ROLE"), contracts.csm.address), "CSM should not have RESET_BOND_CURVE_ROLE on CSAccounting after vote" + + # Step 39: Validate RESET_BOND_CURVE_ROLE was revoked from CSM committee on CSAccounting + assert not contracts.cs_accounting.hasRole(web3.keccak(text="RESET_BOND_CURVE_ROLE"), CSM_COMMITTEE_MS), "CSM committee should not have RESET_BOND_CURVE_ROLE on CSAccounting after vote" + + # Step 40: Validate CREATE_NODE_OPERATOR_ROLE was granted to permissionless gate on CSM + assert contracts.csm.hasRole(contracts.csm.CREATE_NODE_OPERATOR_ROLE(), cs_permissionless_gate.address), "Permissionless gate should have CREATE_NODE_OPERATOR_ROLE on CSM after vote" + + # Step 41: Validate CREATE_NODE_OPERATOR_ROLE was granted to vetted gate on CSM + assert contracts.csm.hasRole(contracts.csm.CREATE_NODE_OPERATOR_ROLE(), cs_vetted_gate.address), "Vetted gate should have CREATE_NODE_OPERATOR_ROLE on CSM after vote" + + # Step 42: Validate SET_BOND_CURVE_ROLE was granted to vetted gate on CSAccounting + assert contracts.cs_accounting.hasRole(contracts.cs_accounting.SET_BOND_CURVE_ROLE(), cs_vetted_gate.address), "Vetted gate should have SET_BOND_CURVE_ROLE on CSAccounting after vote" + + # Step 43: Validate VERIFIER_ROLE was revoked from old verifier on CSM + assert not contracts.csm.hasRole(contracts.csm.VERIFIER_ROLE(), contracts.cs_verifier.address), "Old verifier should not have VERIFIER_ROLE on CSM after vote" + + # Step 44: Validate VERIFIER_ROLE was granted to new verifier on CSM + assert contracts.csm.hasRole(contracts.csm.VERIFIER_ROLE(), cs_verifier_v2.address), "New verifier should have VERIFIER_ROLE on CSM after vote" + + # Step 45: Validate PAUSE_ROLE was revoked from old GateSeal on CSM + assert not contracts.csm.hasRole(contracts.csm.PAUSE_ROLE(), CS_GATE_SEAL_ADDRESS), "Old GateSeal should not have PAUSE_ROLE on CSM after vote" + + # Step 46: Validate PAUSE_ROLE was revoked from old GateSeal on CSAccounting + assert not contracts.cs_accounting.hasRole(contracts.cs_accounting.PAUSE_ROLE(), CS_GATE_SEAL_ADDRESS), "Old GateSeal should not have PAUSE_ROLE on CSAccounting after vote" + + # Step 47: Validate PAUSE_ROLE was revoked from old GateSeal on CSFeeOracle + assert not contracts.cs_fee_oracle.hasRole(contracts.cs_fee_oracle.PAUSE_ROLE(), CS_GATE_SEAL_ADDRESS), "Old GateSeal should not have PAUSE_ROLE on CSFeeOracle after vote" + + # Step 48: Validate PAUSE_ROLE was granted to new GateSeal on CSM + assert contracts.csm.hasRole(contracts.csm.PAUSE_ROLE(), CS_GATE_SEAL_V2_ADDRESS), "New GateSeal should have PAUSE_ROLE on CSM after vote" + + # Step 49: Validate PAUSE_ROLE was granted to new GateSeal on CSAccounting + assert contracts.cs_accounting.hasRole(contracts.cs_accounting.PAUSE_ROLE(), CS_GATE_SEAL_V2_ADDRESS), "New GateSeal should have PAUSE_ROLE on CSAccounting after vote" + + # Step 50: Validate PAUSE_ROLE was granted to new GateSeal on CSFeeOracle + assert contracts.cs_fee_oracle.hasRole(contracts.cs_fee_oracle.PAUSE_ROLE(), CS_GATE_SEAL_V2_ADDRESS), "New GateSeal should have PAUSE_ROLE on CSFeeOracle after vote" + + # Step 50-52: Check add ICS Bond Curve to CSAccounting + assert not contracts.cs_accounting.hasRole(contracts.cs_accounting.MANAGE_BOND_CURVES_ROLE(), contracts.agent), "Agent should not have MANAGE_BOND_CURVES_ROLE on CSAccounting after vote" + assert contracts.cs_accounting.getCurvesCount() == len(CS_CURVES) + 1, "CSAccounting should have legacy bond curves and ICS Bond Curve after vote" + + # Step 53: Increase CSM share in Staking Router + csm_module_after = contracts.staking_router.getStakingModule(CS_MODULE_ID) + csm_share_after = csm_module_after['stakeShareLimit'] + assert csm_share_after == CS_MODULE_NEW_TARGET_SHARE_BP, f"CSM share should be {CS_MODULE_NEW_TARGET_SHARE_BP} after vote, but got {csm_share_after}" + + csm_priority_exit_threshold_after = csm_module_after['priorityExitShareThreshold'] + assert csm_priority_exit_threshold_after == CS_MODULE_NEW_PRIORITY_EXIT_THRESHOLD_BP, f"CSM priority exit threshold should be {CS_MODULE_NEW_PRIORITY_EXIT_THRESHOLD_BP} after vote, but got {csm_priority_exit_threshold_after}" + + + # Steps 58-62: Validate Gate Seals updates + assert not contracts.withdrawal_queue.hasRole(contracts.withdrawal_queue.PAUSE_ROLE(), OLD_GATE_SEAL_ADDRESS), "Old GateSeal should not have PAUSE_ROLE on WithdrawalQueue after vote" + assert not contracts.validators_exit_bus_oracle.hasRole(contracts.validators_exit_bus_oracle.PAUSE_ROLE(), OLD_GATE_SEAL_ADDRESS), "Old GateSeal should not have PAUSE_ROLE on VEBO after vote" + assert contracts.withdrawal_queue.hasRole(contracts.withdrawal_queue.PAUSE_ROLE(), NEW_WQ_GATE_SEAL), "New WQ GateSeal should have PAUSE_ROLE on WithdrawalQueue after vote" + assert contracts.validators_exit_bus_oracle.hasRole(contracts.validators_exit_bus_oracle.PAUSE_ROLE(), NEW_TW_GATE_SEAL), "New TW GateSeal should have PAUSE_ROLE on VEBO after vote" + assert triggerable_withdrawals_gateway.hasRole(triggerable_withdrawals_gateway.PAUSE_ROLE(), NEW_TW_GATE_SEAL), "New TW GateSeal should have PAUSE_ROLE on TWG after vote" + + # Steps 63-64: Validate ResealManager roles + assert triggerable_withdrawals_gateway.hasRole(triggerable_withdrawals_gateway.PAUSE_ROLE(), RESEAL_MANAGER), "ResealManager should have PAUSE_ROLE on TWG after vote" + assert triggerable_withdrawals_gateway.hasRole(triggerable_withdrawals_gateway.RESUME_ROLE(), RESEAL_MANAGER), "ResealManager should have RESUME_ROLE on TWG after vote" + + # Step 65: Add EasyTrack factory for CSSetVettedGateTree + new_factories = contracts.easy_track.getEVMScriptFactories() + assert EASYTRACK_CS_SET_VETTED_GATE_TREE_FACTORY in new_factories, "EasyTrack should have CSSetVettedGateTree factory after vote" + + # Steps 66-67: Validate EasyTrack factories for validator exit request hashes + assert EASYTRACK_SDVT_SUBMIT_VALIDATOR_EXIT_REQUEST_HASHES_FACTORY in new_factories, "EasyTrack should have SDVT validator exit request hashes factory after vote" + assert EASYTRACK_CURATED_SUBMIT_VALIDATOR_EXIT_REQUEST_HASHES_FACTORY in new_factories, "EasyTrack should have Curated validator exit request hashes factory after vote" + + # --- VALIDATE EVENTS --- + + voting_events = group_voting_events_from_receipt(vote_tx) + dg_execution_events = group_dg_events_from_receipt(dg_tx, timelock=TIMELOCK, admin_executor=DUAL_GOVERNANCE_EXECUTORS[0]) + + # Validate voting events structure + assert len(voting_events) == 4, "Unexpected number of voting events" + dg_voting_event, dg_bypass_voting_event1, dg_bypass_voting_event2, dg_bypass_voting_event3 = voting_events + + # Validate DG execution events structure + assert len(dg_execution_events) == 66, "Unexpected number of dual governance events" + + + # Main DG voting event validation + validate_dual_governance_submit_event( + dg_voting_event, + proposal_id, + proposer=VOTING, + executor=DUAL_GOVERNANCE_EXECUTORS[0], + ) + + # Validate EasyTrack bypass events for new factories + validate_evmscript_factory_added_event( + event=dg_bypass_voting_event1, + p=EVMScriptFactoryAdded( + factory_addr=EASYTRACK_CS_SET_VETTED_GATE_TREE_FACTORY, + permissions=create_permissions(interface.CSVettedGate(CS_VETTED_GATE_ADDRESS), "setTreeParams") + ), + emitted_by=contracts.easy_track, + ) + + validate_evmscript_factory_added_event( + event=dg_bypass_voting_event2, + p=EVMScriptFactoryAdded( + factory_addr=EASYTRACK_SDVT_SUBMIT_VALIDATOR_EXIT_REQUEST_HASHES_FACTORY, + permissions=create_permissions(contracts.validators_exit_bus_oracle, "submitExitRequestsHash") + ), + emitted_by=contracts.easy_track, + ) + + validate_evmscript_factory_added_event( + event=dg_bypass_voting_event3, + p=EVMScriptFactoryAdded( + factory_addr=EASYTRACK_CURATED_SUBMIT_VALIDATOR_EXIT_REQUEST_HASHES_FACTORY, + permissions=create_permissions(contracts.validators_exit_bus_oracle, "submitExitRequestsHash") + ), + emitted_by=contracts.easy_track, + ) + + # === DG EXECUTION EVENTS VALIDATION === + + # 0. Lido Locator upgrade events + validate_proxy_upgrade_event(dg_execution_events[0], LIDO_LOCATOR_IMPL, emitted_by=contracts.lido_locator) + + # 1. VEBO upgrade events + validate_proxy_upgrade_event(dg_execution_events[1], VALIDATORS_EXIT_BUS_ORACLE_IMPL, emitted_by=contracts.validators_exit_bus_oracle) + + # 2. VEBO finalize upgrade events + validate_contract_version_set_event(dg_execution_events[2], version=2, emitted_by=contracts.validators_exit_bus_oracle) + assert 'ExitRequestsLimitSet' in dg_execution_events[2], "ExitRequestsLimitSet event not found" + assert dg_execution_events[2]['ExitRequestsLimitSet'][0]['maxExitRequestsLimit'] == 11200, "Wrong maxExitRequestsLimit" + assert dg_execution_events[2]['ExitRequestsLimitSet'][0]['exitsPerFrame'] == 1, "Wrong exitsPerFrame" + assert dg_execution_events[2]['ExitRequestsLimitSet'][0]['frameDurationInSec'] == 48, "Wrong frameDurationInSec" + + # 3. Grant VEBO MANAGE_CONSENSUS_VERSION_ROLE to Agent + validate_role_grant_event( + dg_execution_events[3], + role_hash=web3.keccak(text="MANAGE_CONSENSUS_VERSION_ROLE").hex(), + account=contracts.agent.address, + emitted_by=contracts.validators_exit_bus_oracle + ) + + # 4. Set VEBO consensus version to 4 + validate_consensus_version_set_event( + dg_execution_events[4], + new_version=4, + prev_version=3, + emitted_by=contracts.validators_exit_bus_oracle + ) + + # 5. Revoke VEBO MANAGE_CONSENSUS_VERSION_ROLE from Agent + validate_role_revoke_event( + dg_execution_events[5], + role_hash=web3.keccak(text="MANAGE_CONSENSUS_VERSION_ROLE").hex(), + account=contracts.agent.address, + emitted_by=contracts.validators_exit_bus_oracle + ) + + # 6. Grant VEBO SUBMIT_REPORT_HASH_ROLE to EasyTrack executor + validate_role_grant_event( + dg_execution_events[6], + role_hash=web3.keccak(text="SUBMIT_REPORT_HASH_ROLE").hex(), + account=EASYTRACK_EVMSCRIPT_EXECUTOR, + emitted_by=contracts.validators_exit_bus_oracle + ) + + # 7. Grant TWG ADD_FULL_WITHDRAWAL_REQUEST_ROLE to CS Ejector + validate_role_grant_event( + dg_execution_events[7], + role_hash=web3.keccak(text="ADD_FULL_WITHDRAWAL_REQUEST_ROLE").hex(), + account=CS_EJECTOR_ADDRESS, + emitted_by=triggerable_withdrawals_gateway + ) + + # 8. Grant TWG ADD_FULL_WITHDRAWAL_REQUEST_ROLE to VEBO + validate_role_grant_event( + dg_execution_events[8], + role_hash=web3.keccak(text="ADD_FULL_WITHDRAWAL_REQUEST_ROLE").hex(), + account=contracts.validators_exit_bus_oracle.address, + emitted_by=triggerable_withdrawals_gateway + ) + + # 9. Connect TWG to Dual Governance tiebreaker + assert 'SealableWithdrawalBlockerAdded' in dg_execution_events[9], "SealableWithdrawalBlockerAdded event not found" + assert dg_execution_events[9]['SealableWithdrawalBlockerAdded'][0]['sealable'] == TRIGGERABLE_WITHDRAWALS_GATEWAY, "Wrong sealableWithdrawalBlocker" + + # 10. Update WithdrawalVault implementation + validate_proxy_upgrade_event(dg_execution_events[10], WITHDRAWAL_VAULT_IMPL, emitted_by=contracts.withdrawal_vault) + + # 11. Call finalizeUpgrade_v2 on WithdrawalVault + validate_contract_version_set_event(dg_execution_events[11], version=2, emitted_by=contracts.withdrawal_vault) + + # 12. Update AO implementation + validate_proxy_upgrade_event(dg_execution_events[12], ACCOUNTING_ORACLE_IMPL, emitted_by=contracts.accounting_oracle) + + # 13. Grant AO MANAGE_CONSENSUS_VERSION_ROLE to the AGENT + validate_role_grant_event( + dg_execution_events[13], + role_hash=web3.keccak(text="MANAGE_CONSENSUS_VERSION_ROLE").hex(), + account=contracts.agent.address, + emitted_by=contracts.accounting_oracle + ) + + # 14. Bump AO consensus version to 4 + validate_consensus_version_set_event( + dg_execution_events[14], + new_version=4, + prev_version=3, + emitted_by=contracts.accounting_oracle + ) + + # 15. Revoke AO MANAGE_CONSENSUS_VERSION_ROLE from the AGENT + validate_role_revoke_event( + dg_execution_events[15], + role_hash=web3.keccak(text="MANAGE_CONSENSUS_VERSION_ROLE").hex(), + account=contracts.agent.address, + emitted_by=contracts.accounting_oracle + ) + + # 16. Call finalizeUpgrade_v3() on AO + validate_contract_version_set_event(dg_execution_events[16], version=3, emitted_by=contracts.accounting_oracle) + + # 17. Update SR implementation + validate_proxy_upgrade_event(dg_execution_events[17], STAKING_ROUTER_IMPL, emitted_by=contracts.staking_router) + + # 18. Call finalizeUpgrade_v3() on SR + validate_contract_version_set_event(dg_execution_events[18], version=3, emitted_by=contracts.staking_router) + + # 19. Grant SR REPORT_VALIDATOR_EXITING_STATUS_ROLE to ValidatorExitVerifier + validate_role_grant_event( + dg_execution_events[19], + role_hash=web3.keccak(text="REPORT_VALIDATOR_EXITING_STATUS_ROLE").hex(), + account=VALIDATOR_EXIT_VERIFIER, + emitted_by=contracts.staking_router + ) + + # 20. Grant SR REPORT_VALIDATOR_EXIT_TRIGGERED_ROLE to TWG + validate_role_grant_event( + dg_execution_events[20], + role_hash=web3.keccak(text="REPORT_VALIDATOR_EXIT_TRIGGERED_ROLE").hex(), + account=triggerable_withdrawals_gateway.address, + emitted_by=contracts.staking_router + ) + + # 21. Grant APP_MANAGER_ROLE on Kernel to Voting + assert 'SetPermission' in dg_execution_events[21] + assert dg_execution_events[21]['SetPermission'][0]['allowed'] is True + + # 22. Set new implementation for NOR + assert 'SetApp' in dg_execution_events[22] + + # 23. Finalize upgrade for NOR + validate_contract_version_set_event(dg_execution_events[23], version=4, emitted_by=contracts.node_operators_registry) + assert 'ExitDeadlineThresholdChanged' in dg_execution_events[23] + assert dg_execution_events[23]['ExitDeadlineThresholdChanged'][0]['threshold'] == NOR_EXIT_DEADLINE_IN_SEC + + # 24. Set new implementation for sDVT + assert 'SetApp' in dg_execution_events[24] + + # 25. Finalize upgrade for sDVT + validate_contract_version_set_event(dg_execution_events[25], version=4, emitted_by=contracts.simple_dvt) + assert 'ExitDeadlineThresholdChanged' in dg_execution_events[25] + assert dg_execution_events[25]['ExitDeadlineThresholdChanged'][0]['threshold'] == NOR_EXIT_DEADLINE_IN_SEC + + # 26. Revoke APP_MANAGER_ROLE on Kernel from Voting + assert 'SetPermission' in dg_execution_events[26] + assert dg_execution_events[26]['SetPermission'][0]['allowed'] is False + + # 27. Grant CONFIG_MANAGER_ROLE on OracleDaemonConfig to Agent + validate_role_grant_event( + dg_execution_events[27], + role_hash=contracts.oracle_daemon_config.CONFIG_MANAGER_ROLE().hex(), + account=contracts.agent.address, + emitted_by=contracts.oracle_daemon_config + ) + + # 28. Unset NODE_OPERATOR_NETWORK_PENETRATION_THRESHOLD_BP + assert 'ConfigValueUnset' in dg_execution_events[28] + assert 'NODE_OPERATOR_NETWORK_PENETRATION_THRESHOLD_BP' in dg_execution_events[28]['ConfigValueUnset'][0]['key'] + + # 29. Unset VALIDATOR_DELAYED_TIMEOUT_IN_SLOTS + assert 'ConfigValueUnset' in dg_execution_events[29] + assert 'VALIDATOR_DELAYED_TIMEOUT_IN_SLOTS' in dg_execution_events[29]['ConfigValueUnset'][0]['key'] + + # 30. Unset VALIDATOR_DELINQUENT_TIMEOUT_IN_SLOTS + assert 'ConfigValueUnset' in dg_execution_events[30] + assert 'VALIDATOR_DELINQUENT_TIMEOUT_IN_SLOTS' in dg_execution_events[30]['ConfigValueUnset'][0]['key'] + + # 31. Set EXIT_EVENTS_LOOKBACK_WINDOW_IN_SLOTS + assert 'ConfigValueSet' in dg_execution_events[31] + assert 'EXIT_EVENTS_LOOKBACK_WINDOW_IN_SLOTS' in dg_execution_events[31]['ConfigValueSet'][0]['key'] + assert convert.to_int(dg_execution_events[31]['ConfigValueSet'][0]['value']) == EXIT_EVENTS_LOOKBACK_WINDOW_IN_SLOTS + + # 32. Revoke CONFIG_MANAGER_ROLE from the AGENT + validate_role_revoke_event( + dg_execution_events[32], + role_hash=contracts.oracle_daemon_config.CONFIG_MANAGER_ROLE().hex(), + account=contracts.agent.address, + emitted_by=contracts.oracle_daemon_config + ) + + # 33. CSM implementation upgrade + validate_proxy_upgrade_event(dg_execution_events[33], CSM_IMPL_V2_ADDRESS, emitted_by=contracts.csm) + + # 34. CSM finalize upgrade validation + assert 'Initialized' in dg_execution_events[34] + assert dg_execution_events[34]['Initialized'][0]['version'] == CSM_V2_VERSION + + # 35. CSAccounting implementation upgrade + validate_proxy_upgrade_event(dg_execution_events[35], CS_ACCOUNTING_IMPL_V2_ADDRESS, emitted_by=contracts.cs_accounting) + + # 36. CSAccounting finalize upgrade with bond curves + assert 'BondCurveAdded' in dg_execution_events[36] + assert len(dg_execution_events[36]['BondCurveAdded']) == len(CS_CURVES) + assert 'Initialized' in dg_execution_events[36] + assert dg_execution_events[36]['Initialized'][0]['version'] == CS_ACCOUNTING_V2_VERSION + + # 37. CSFeeOracle implementation upgrade + validate_proxy_upgrade_event(dg_execution_events[37], CS_FEE_ORACLE_IMPL_V2_ADDRESS, emitted_by=contracts.cs_fee_oracle) + + # 38. CSFeeOracle finalize upgrade with consensus version + validate_consensus_version_set_event(dg_execution_events[38], new_version=3, prev_version=2, emitted_by=contracts.cs_fee_oracle) + validate_contract_version_set_event(dg_execution_events[38], version=CS_FEE_ORACLE_V2_VERSION, emitted_by=contracts.cs_fee_oracle) + + # 39. CSFeeDistributor implementation upgrade + validate_proxy_upgrade_event(dg_execution_events[39], CS_FEE_DISTRIBUTOR_IMPL_V2_ADDRESS, emitted_by=contracts.cs_fee_distributor) + + # 40. CSFeeDistributor finalize upgrade + assert 'RebateRecipientSet' in dg_execution_events[40] + assert 'Initialized' in dg_execution_events[40] + assert dg_execution_events[40]['Initialized'][0]['version'] == CS_FEE_DISTRIBUTOR_V2_VERSION + + # 41. Revoke SET_BOND_CURVE_ROLE from CSM on CSAccounting + validate_role_revoke_event( + dg_execution_events[41], + role_hash=contracts.cs_accounting.SET_BOND_CURVE_ROLE().hex(), + account=contracts.csm.address, + emitted_by=contracts.cs_accounting + ) + + # 42. Revoke RESET_BOND_CURVE_ROLE from CSM on CSAccounting + validate_role_revoke_event( + dg_execution_events[42], + role_hash=web3.keccak(text="RESET_BOND_CURVE_ROLE").hex(), + account=contracts.csm.address, + emitted_by=contracts.cs_accounting + ) + + # 43. Revoke RESET_BOND_CURVE_ROLE from CSM committee on CSAccounting + validate_role_revoke_event( + dg_execution_events[43], + role_hash=web3.keccak(text="RESET_BOND_CURVE_ROLE").hex(), + account=CSM_COMMITTEE_MS, + emitted_by=contracts.cs_accounting + ) + + # 44. Grant CREATE_NODE_OPERATOR_ROLE to permissionless gate on CSM + validate_role_grant_event( + dg_execution_events[44], + role_hash=contracts.csm.CREATE_NODE_OPERATOR_ROLE().hex(), + account=CS_PERMISSIONLESS_GATE_ADDRESS, + emitted_by=contracts.csm + ) + + # 45. Grant CREATE_NODE_OPERATOR_ROLE to vetted gate on CSM + validate_role_grant_event( + dg_execution_events[45], + role_hash=contracts.csm.CREATE_NODE_OPERATOR_ROLE().hex(), + account=CS_VETTED_GATE_ADDRESS, + emitted_by=contracts.csm + ) + + # 46. Grant SET_BOND_CURVE_ROLE to vetted gate on CSAccounting + validate_role_grant_event( + dg_execution_events[46], + role_hash=contracts.cs_accounting.SET_BOND_CURVE_ROLE().hex(), + account=CS_VETTED_GATE_ADDRESS, + emitted_by=contracts.cs_accounting + ) + + # 47. Revoke VERIFIER_ROLE from old verifier on CSM + validate_role_revoke_event( + dg_execution_events[47], + role_hash=contracts.csm.VERIFIER_ROLE().hex(), + account=contracts.cs_verifier.address, + emitted_by=contracts.csm + ) + + # 48. Grant VERIFIER_ROLE to new verifier on CSM + validate_role_grant_event( + dg_execution_events[48], + role_hash=contracts.csm.VERIFIER_ROLE().hex(), + account=CS_VERIFIER_V2_ADDRESS, + emitted_by=contracts.csm + ) + + # 49. Revoke PAUSE_ROLE from old GateSeal on CSM + validate_role_revoke_event( + dg_execution_events[49], + role_hash=contracts.csm.PAUSE_ROLE().hex(), + account=CS_GATE_SEAL_ADDRESS, + emitted_by=contracts.csm + ) + + # 50. Revoke PAUSE_ROLE from old GateSeal on CSAccounting + validate_role_revoke_event( + dg_execution_events[50], + role_hash=contracts.cs_accounting.PAUSE_ROLE().hex(), + account=CS_GATE_SEAL_ADDRESS, + emitted_by=contracts.cs_accounting + ) + + # 51. Revoke PAUSE_ROLE from old GateSeal on CSFeeOracle + validate_role_revoke_event( + dg_execution_events[51], + role_hash=contracts.cs_fee_oracle.PAUSE_ROLE().hex(), + account=CS_GATE_SEAL_ADDRESS, + emitted_by=contracts.cs_fee_oracle + ) + + # 52. Grant PAUSE_ROLE to new GateSeal on CSM + validate_role_grant_event( + dg_execution_events[52], + role_hash=contracts.csm.PAUSE_ROLE().hex(), + account=CS_GATE_SEAL_V2_ADDRESS, + emitted_by=contracts.csm + ) + + # 53. Grant PAUSE_ROLE to new GateSeal on CSAccounting + validate_role_grant_event( + dg_execution_events[53], + role_hash=contracts.cs_accounting.PAUSE_ROLE().hex(), + account=CS_GATE_SEAL_V2_ADDRESS, + emitted_by=contracts.cs_accounting + ) + + # 54. Grant PAUSE_ROLE to new GateSeal on CSFeeOracle + validate_role_grant_event( + dg_execution_events[54], + role_hash=contracts.cs_fee_oracle.PAUSE_ROLE().hex(), + account=CS_GATE_SEAL_V2_ADDRESS, + emitted_by=contracts.cs_fee_oracle + ) + + # 55. Grant MANAGE_BOND_CURVES_ROLE to agent on CSAccounting + validate_role_grant_event( + dg_execution_events[55], + role_hash=contracts.cs_accounting.MANAGE_BOND_CURVES_ROLE().hex(), + account=contracts.agent.address, + emitted_by=contracts.cs_accounting + ) + + # 56. Add ICS bond curve + ics_curve_id = len(CS_CURVES) + validate_bond_curve_added_event(dg_execution_events[56], curve_id=ics_curve_id, emitted_by=contracts.cs_accounting) + + # 57. Revoke MANAGE_BOND_CURVES_ROLE from agent on CSAccounting + validate_role_revoke_event( + dg_execution_events[57], + role_hash=contracts.cs_accounting.MANAGE_BOND_CURVES_ROLE().hex(), + account=contracts.agent.address, + emitted_by=contracts.cs_accounting + ) + + # 58. Increase CSM share in Staking Router + validate_staking_module_update_event( + dg_execution_events[58], + module_id=CS_MODULE_ID, + share_limit=CS_MODULE_NEW_TARGET_SHARE_BP, + priority_share_threshold=CS_MODULE_NEW_PRIORITY_EXIT_THRESHOLD_BP, + module_fee_points_bp=CS_MODULE_MODULE_FEE_BP, + treasury_fee_points_bp=CS_MODULE_TREASURY_FEE_BP, + max_deposits_per_block=CS_MODULE_MAX_DEPOSITS_PER_BLOCK, + min_deposit_block_distance=CS_MODULE_MIN_DEPOSIT_BLOCK_DISTANCE, + emitted_by=contracts.staking_router + ) + + # 59-65. Gate Seals and ResealManager role updates + # 59. Revoke PAUSE_ROLE on WithdrawalQueue from the old GateSeal + validate_role_revoke_event( + dg_execution_events[59], + role_hash=contracts.withdrawal_queue.PAUSE_ROLE().hex(), + account=OLD_GATE_SEAL_ADDRESS, + emitted_by=contracts.withdrawal_queue + ) + + # 60. Revoke PAUSE_ROLE on ValidatorsExitBusOracle from the old GateSeal + validate_role_revoke_event( + dg_execution_events[60], + role_hash=contracts.validators_exit_bus_oracle.PAUSE_ROLE().hex(), + account=OLD_GATE_SEAL_ADDRESS, + emitted_by=contracts.validators_exit_bus_oracle + ) + + # 61. Grant PAUSE_ROLE on WithdrawalQueue to the new WithdrawalQueue GateSeal + validate_role_grant_event( + dg_execution_events[61], + role_hash=contracts.withdrawal_queue.PAUSE_ROLE().hex(), + account=NEW_WQ_GATE_SEAL, + emitted_by=contracts.withdrawal_queue + ) + + # 62. Grant PAUSE_ROLE on ValidatorsExitBusOracle to the new Triggerable Withdrawals GateSeal + validate_role_grant_event( + dg_execution_events[62], + role_hash=contracts.validators_exit_bus_oracle.PAUSE_ROLE().hex(), + account=NEW_TW_GATE_SEAL, + emitted_by=contracts.validators_exit_bus_oracle + ) + + # 63. Grant PAUSE_ROLE on TriggerableWithdrawalsGateway to the new Triggerable Withdrawals GateSeal + validate_role_grant_event( + dg_execution_events[63], + role_hash=triggerable_withdrawals_gateway.PAUSE_ROLE().hex(), + account=NEW_TW_GATE_SEAL, + emitted_by=triggerable_withdrawals_gateway + ) + + # 64. Grant PAUSE_ROLE on TriggerableWithdrawalsGateway to ResealManager + validate_role_grant_event( + dg_execution_events[64], + role_hash=triggerable_withdrawals_gateway.PAUSE_ROLE().hex(), + account=RESEAL_MANAGER, + emitted_by=triggerable_withdrawals_gateway + ) + + # 65. Grant RESUME_ROLE on TriggerableWithdrawalsGateway to ResealManager + validate_role_grant_event( + dg_execution_events[65], + role_hash=triggerable_withdrawals_gateway.RESUME_ROLE().hex(), + account=RESEAL_MANAGER, + emitted_by=triggerable_withdrawals_gateway + ) diff --git a/archive/tests/test_vote_update_sandbox_impl_holesky.py b/archive/tests/test_vote_update_sandbox_impl_holesky.py new file mode 100644 index 000000000..2e8ba9ff3 --- /dev/null +++ b/archive/tests/test_vote_update_sandbox_impl_holesky.py @@ -0,0 +1,136 @@ +from typing import Optional +from scripts.vote_update_sandbox_impl_holesky import start_vote +from brownie import interface, chain, convert, web3 # type: ignore +from brownie.network.event import EventDict +from utils.test.tx_tracing_helpers import group_voting_events_from_receipt, group_dg_events_from_receipt +from utils.test.event_validators.dual_governance import validate_dual_governance_submit_event +from utils.dual_governance import wait_for_noon_utc_to_satisfy_time_constrains +from utils.config import ( + DUAL_GOVERNANCE, + TIMELOCK, + DUAL_GOVERNANCE_EXECUTORS, + LDO_HOLDER_ADDRESS_FOR_TESTS, + ARAGON_KERNEL, + AGENT, + VOTING, + contracts, +) + +# Implementation address from vote script +NODE_OPERATORS_REGISTRY_IMPL = "0x834aa47DCd21A32845099a78B4aBb17A7f0bD503" +NOR_EXIT_DEADLINE_IN_SEC = 172800 +SANDBOX_APP_ID = "0x85d2fceef13a6c14c43527594f79fb91a8ef8f15024a43486efac8df2b11e632" + +def validate_role_grant_event(event: EventDict, role_name: str, account: str, emitted_by: Optional[str] = None): + """Validates a permission grant event from ACL""" + assert "SetPermission" in event, "No SetPermission event found" + assert event["SetPermission"][0]["allowed"] is True, "Permission was not granted" + assert event["SetPermission"][0]["entity"] == convert.to_address(account), "Wrong account" + + role_hash = convert.to_uint(web3.keccak(text=role_name)) + assert convert.to_uint(event["SetPermission"][0]["role"]) == role_hash, "Wrong role hash" + + if emitted_by is not None: + assert convert.to_address(event["SetPermission"][0]["_emitted_by"]) == convert.to_address(emitted_by), "Wrong event emitter" + + +def validate_role_revoke_event(event: EventDict, role_name: str, account: str, emitted_by: Optional[str] = None): + """Validates a permission revoke event from ACL""" + assert "SetPermission" in event, "No SetPermission event found" + assert event["SetPermission"][0]["allowed"] is False, "Permission was not revoked" + assert event["SetPermission"][0]["entity"] == convert.to_address(account), "Wrong account" + + role_hash = convert.to_uint(web3.keccak(text=role_name)) + assert convert.to_uint(event["SetPermission"][0]["role"]) == role_hash, "Wrong role hash" + + if emitted_by is not None: + assert convert.to_address(event["SetPermission"][0]["_emitted_by"]) == convert.to_address(emitted_by), "Wrong event emitter" + + +def validate_app_set_event(event: EventDict, app_id: str, app_addr: str, emitted_by: Optional[str] = None): + """Validates SetApp event from Kernel""" + assert "SetApp" in event, "No SetApp event found" + + app_id_bytes = bytes.fromhex(app_id.replace('0x', '')) + assert event["SetApp"][0]["appId"] == app_id_bytes, "Wrong app ID" + assert event["SetApp"][0]["appAddress"] == app_addr, "Wrong app address" + + if emitted_by is not None: + assert convert.to_address(event["SetApp"][0]["_emitted_by"]) == convert.to_address(emitted_by), "Wrong event emitter" + + +def validate_contract_version_set_event(event: EventDict, version: int, emitted_by: Optional[str] = None): + assert "ContractVersionSet" in event, "No ContractVersionSet event found" + assert event["ContractVersionSet"][0]["version"] == version, "Wrong version" + if emitted_by is not None: + assert convert.to_address(event["ContractVersionSet"][0]["_emitted_by"]) == convert.to_address(emitted_by), "Wrong event emitter" + + +def test_vote_update_sandbox_impl(helpers, accounts, vote_ids_from_env, stranger): + # Save original state for comparison + app_manager_role = web3.keccak(text="APP_MANAGER_ROLE") + + # Check initial state + assert not contracts.acl.hasPermission(AGENT, ARAGON_KERNEL, app_manager_role), "AGENT should not have APP_MANAGER_ROLE before upgrade" + + # Get sandbox contract + sandbox = interface.NodeOperatorsRegistry(contracts.sandbox) + + # Check initial sandbox version + assert sandbox.getContractVersion() < 4, "Sandbox module version should be less than 4 before upgrade" + + # Get current implementation + base_namespace = contracts.kernel.APP_BASES_NAMESPACE() + sandbox_impl_before = contracts.kernel.getApp(base_namespace, SANDBOX_APP_ID) + assert sandbox_impl_before.lower() != NODE_OPERATORS_REGISTRY_IMPL.lower(), "Sandbox implementation should be different before upgrade" + + timelock = interface.EmergencyProtectedTimelock(TIMELOCK) + dual_governance = interface.DualGovernance(DUAL_GOVERNANCE) + + # START VOTE + if len(vote_ids_from_env) > 0: + (vote_id,) = vote_ids_from_env + else: + tx_params = {"from": LDO_HOLDER_ADDRESS_FOR_TESTS} + vote_id, _ = start_vote(tx_params, silent=True) + + vote_tx = helpers.execute_vote(accounts, vote_id, contracts.voting) + print(f"voteId = {vote_id}") + + proposal_id = vote_tx.events["ProposalSubmitted"][1]["proposalId"] + print(f"proposalId = {proposal_id}") + + chain.sleep(timelock.getAfterSubmitDelay() + 1) + dual_governance.scheduleProposal(proposal_id, {"from": stranger}) + + chain.sleep(timelock.getAfterScheduleDelay() + 1) + wait_for_noon_utc_to_satisfy_time_constrains() + + dg_tx = timelock.execute(proposal_id, {"from": stranger}) + + # --- VALIDATE EXECUTION RESULTS --- + + # 1. Verify APP_MANAGER_ROLE was granted and then revoked (final state is revoked) + assert not contracts.acl.hasPermission(AGENT, ARAGON_KERNEL, app_manager_role), "AGENT should not have APP_MANAGER_ROLE after upgrade" + + # 2. Verify Sandbox implementation was updated + sandbox_impl_after = contracts.kernel.getApp(base_namespace, SANDBOX_APP_ID) + assert sandbox_impl_after.lower() == NODE_OPERATORS_REGISTRY_IMPL.lower(), "Sandbox implementation should be updated" + + # 3. Verify finalizeUpgrade_v4 was called + assert sandbox.getContractVersion() == 4, "Sandbox module version should be 4 after upgrade" + assert sandbox.exitDeadlineThreshold(0) == NOR_EXIT_DEADLINE_IN_SEC, "Sandbox exit deadline threshold should be set correctly" + + # --- VALIDATE EVENTS --- + voting_events = group_voting_events_from_receipt(vote_tx) + assert len(voting_events) >= 1, "No voting events found" + + validate_dual_governance_submit_event( + voting_events[0], + proposal_id, + proposer=VOTING, + executor=DUAL_GOVERNANCE_EXECUTORS[0], + ) + + dg_execution_events = group_dg_events_from_receipt(dg_tx, timelock=TIMELOCK, admin_executor=DUAL_GOVERNANCE_EXECUTORS[0]) + assert len(dg_execution_events) == 4, "Unexpected number of dual governance events" diff --git a/archive/tests/test_vote_update_sandbox_impl_hoodi.py b/archive/tests/test_vote_update_sandbox_impl_hoodi.py new file mode 100644 index 000000000..e1bccbe84 --- /dev/null +++ b/archive/tests/test_vote_update_sandbox_impl_hoodi.py @@ -0,0 +1,179 @@ +from typing import Optional +from scripts.vote_update_sandbox_impl_hoodi import start_vote +from brownie import interface, chain, convert, web3 # type: ignore +from brownie.network.event import EventDict +from utils.test.tx_tracing_helpers import group_voting_events_from_receipt, group_dg_events_from_receipt +from utils.test.event_validators.dual_governance import validate_dual_governance_submit_event +from utils.dual_governance import wait_for_noon_utc_to_satisfy_time_constrains +from utils.config import ( + DUAL_GOVERNANCE, + TIMELOCK, + DUAL_GOVERNANCE_EXECUTORS, + LDO_HOLDER_ADDRESS_FOR_TESTS, + ARAGON_KERNEL, + AGENT, + VOTING, + contracts, +) + +# Implementation address from vote script +NODE_OPERATORS_REGISTRY_IMPL = "0x95F00b016bB31b7182D96D25074684518246E42a" +NOR_EXIT_DEADLINE_IN_SEC = 172800 +SANDBOX_APP_ID = "0x85d2fceef13a6c14c43527594f79fb91a8ef8f15024a43486efac8df2b11e632" + +def validate_role_grant_event(event: EventDict, role_name: str, account: str, emitted_by: Optional[str] = None): + """Validates a permission grant event from ACL""" + assert "SetPermission" in event, "No SetPermission event found" + assert event["SetPermission"][0]["allowed"] is True, "Permission was not granted" + assert event["SetPermission"][0]["entity"] == convert.to_address(account), "Wrong account" + + role_hash = convert.to_uint(web3.keccak(text=role_name)) + assert convert.to_uint(event["SetPermission"][0]["role"]) == role_hash, "Wrong role hash" + + if emitted_by is not None: + assert convert.to_address(event["SetPermission"][0]["_emitted_by"]) == convert.to_address(emitted_by), "Wrong event emitter" + + +def validate_role_revoke_event(event: EventDict, role_name: str, account: str, emitted_by: Optional[str] = None): + """Validates a permission revoke event from ACL""" + assert "SetPermission" in event, "No SetPermission event found" + assert event["SetPermission"][0]["allowed"] is False, "Permission was not revoked" + assert event["SetPermission"][0]["entity"] == convert.to_address(account), "Wrong account" + + role_hash = convert.to_uint(web3.keccak(text=role_name)) + assert convert.to_uint(event["SetPermission"][0]["role"]) == role_hash, "Wrong role hash" + + if emitted_by is not None: + assert convert.to_address(event["SetPermission"][0]["_emitted_by"]) == convert.to_address(emitted_by), "Wrong event emitter" + + +def validate_app_set_event(event: EventDict, app_id: str, app_addr: str, emitted_by: Optional[str] = None): + """Validates SetApp event from Kernel""" + assert "SetApp" in event, "No SetApp event found" + + # Convert event appId to hex string for comparison + actual_app_id = event["SetApp"][0]["appId"] + if isinstance(actual_app_id, bytes): + actual_app_id_hex = "0x" + actual_app_id.hex() + else: + actual_app_id_hex = str(actual_app_id) + + expected_app_id = app_id.lower() + assert actual_app_id_hex.lower() == expected_app_id, f"Wrong app ID: expected {expected_app_id}, got {actual_app_id_hex.lower()}" + assert convert.to_address(event["SetApp"][0]["app"]) == convert.to_address(app_addr), "Wrong app address" + + if emitted_by is not None: + assert convert.to_address(event["SetApp"][0]["_emitted_by"]) == convert.to_address(emitted_by), "Wrong event emitter" + + +def validate_contract_version_set_event(event: EventDict, version: int, emitted_by: Optional[str] = None): + assert "ContractVersionSet" in event, "No ContractVersionSet event found" + assert event["ContractVersionSet"][0]["version"] == version, "Wrong version" + if emitted_by is not None: + assert convert.to_address(event["ContractVersionSet"][0]["_emitted_by"]) == convert.to_address(emitted_by), "Wrong event emitter" + + +def test_vote_update_sandbox_impl(helpers, accounts, vote_ids_from_env, stranger): + # Save original state for comparison + app_manager_role = web3.keccak(text="APP_MANAGER_ROLE") + + # Check initial state + assert not contracts.acl.hasPermission(AGENT, ARAGON_KERNEL, app_manager_role), "AGENT should not have APP_MANAGER_ROLE before upgrade" + + # Get sandbox contract + sandbox = interface.NodeOperatorsRegistry(contracts.sandbox) + + # Check initial sandbox version + assert sandbox.getContractVersion() < 4, "Sandbox module version should be less than 4 before upgrade" + + # Get current implementation + base_namespace = contracts.kernel.APP_BASES_NAMESPACE() + sandbox_impl_before = contracts.kernel.getApp(base_namespace, SANDBOX_APP_ID) + assert sandbox_impl_before.lower() != NODE_OPERATORS_REGISTRY_IMPL.lower(), "Sandbox implementation should be different before upgrade" + + timelock = interface.EmergencyProtectedTimelock(TIMELOCK) + dual_governance = interface.DualGovernance(DUAL_GOVERNANCE) + + # START VOTE + if len(vote_ids_from_env) > 0: + (vote_id,) = vote_ids_from_env + else: + tx_params = {"from": LDO_HOLDER_ADDRESS_FOR_TESTS} + vote_id, _ = start_vote(tx_params, silent=True) + + vote_tx = helpers.execute_vote(accounts, vote_id, contracts.voting) + print(f"voteId = {vote_id}") + + proposal_id = vote_tx.events["ProposalSubmitted"][1]["proposalId"] + print(f"proposalId = {proposal_id}") + + chain.sleep(timelock.getAfterSubmitDelay() + 1) + dual_governance.scheduleProposal(proposal_id, {"from": stranger}) + + chain.sleep(timelock.getAfterScheduleDelay() + 1) + wait_for_noon_utc_to_satisfy_time_constrains() + + dg_tx = timelock.execute(proposal_id, {"from": stranger}) + + # --- VALIDATE EXECUTION RESULTS --- + + # 1. Verify APP_MANAGER_ROLE was granted and then revoked (final state is revoked) + assert not contracts.acl.hasPermission(AGENT, ARAGON_KERNEL, app_manager_role), "AGENT should not have APP_MANAGER_ROLE after upgrade" + + # 2. Verify Sandbox implementation was updated + sandbox_impl_after = contracts.kernel.getApp(base_namespace, SANDBOX_APP_ID) + assert sandbox_impl_after.lower() == NODE_OPERATORS_REGISTRY_IMPL.lower(), "Sandbox implementation should be updated" + + # 3. Verify finalizeUpgrade_v4 was called + assert sandbox.getContractVersion() == 4, "Sandbox module version should be 4 after upgrade" + assert sandbox.exitDeadlineThreshold(0) == NOR_EXIT_DEADLINE_IN_SEC, "Sandbox exit deadline threshold should be set correctly" + + # --- VALIDATE EVENTS --- + voting_events = group_voting_events_from_receipt(vote_tx) + assert len(voting_events) >= 1, "No voting events found" + + validate_dual_governance_submit_event( + voting_events[0], + proposal_id, + proposer=VOTING, + executor=DUAL_GOVERNANCE_EXECUTORS[0], + ) + + dg_execution_events = group_dg_events_from_receipt(dg_tx, timelock=TIMELOCK, admin_executor=DUAL_GOVERNANCE_EXECUTORS[0]) + assert len(dg_execution_events) == 4, "Unexpected number of dual governance events" + + # 0. Grant APP_MANAGER_ROLE to AGENT + validate_role_grant_event( + dg_execution_events[0], + "APP_MANAGER_ROLE", + AGENT, + emitted_by=contracts.acl + ) + + # 1. Update Sandbox Module implementation + validate_app_set_event( + dg_execution_events[1], + SANDBOX_APP_ID, + NODE_OPERATORS_REGISTRY_IMPL, + emitted_by=contracts.kernel + ) + + # 2. Call finalizeUpgrade_v4 on Sandbox Module + validate_contract_version_set_event( + dg_execution_events[2], + version=4, + emitted_by=contracts.sandbox + ) + + # Check that ExitDeadlineThresholdChanged event was emitted + assert 'ExitDeadlineThresholdChanged' in dg_execution_events[2], "ExitDeadlineThresholdChanged event not found" + assert dg_execution_events[2]['ExitDeadlineThresholdChanged'][0]['threshold'] == NOR_EXIT_DEADLINE_IN_SEC, "Wrong exit deadline threshold" + + # 3. Revoke APP_MANAGER_ROLE from AGENT + validate_role_revoke_event( + dg_execution_events[3], + "APP_MANAGER_ROLE", + AGENT, + emitted_by=contracts.acl + ) + diff --git a/configs/config_holesky.py b/configs/config_holesky.py index 6927fc841..daca2417c 100644 --- a/configs/config_holesky.py +++ b/configs/config_holesky.py @@ -101,6 +101,8 @@ DEPOSIT_SECURITY_MODULE_V2 = "0x045dd46212A178428c088573A7d102B9d89a022A" # dsm address before SR V2 enact ACCOUNTING_ORACLE = "0x4E97A3972ce8511D87F334dA17a2C332542a5246" ACCOUNTING_ORACLE_IMPL = "0x748CE008ac6b15634ceD5a6083796f75695052a2" +HASH_CONSENSUS_FOR_AO = "0xa067FC95c22D51c3bC35fd4BE37414Ee8cc890d2" +AO_CONSENSUS_VERSION = 4 VALIDATORS_EXIT_BUS_ORACLE = "0xffDDF7025410412deaa05E3E1cE68FE53208afcb" EIP712_STETH = "0xE154732c5Eab277fd88a9fF6Bdff7805eD97BCB1" STAKING_ROUTER = "0xd6EbF043D30A7fe46D1Db32BA90a0A51207FE229" @@ -110,7 +112,7 @@ # GateSeal GATE_SEAL_FACTORY = "0x1134F7077055b0B3559BE52AfeF9aA22A0E1eEC2" -GATE_SEAL = "0x7f6FA688d4C12a2d51936680b241f3B0F0F9ca60" +GATE_SEAL = "0xAE6eCd77DCC656c5533c4209454Fd56fB46e1778" GATE_SEAL_PAUSE_DURATION = 518400 # 6 days GATE_SEAL_EXPIRY_TIMESTAMP = 1714521600 # 2024-05-01 00:00GMT GATE_SEAL_COMMITTEE = "0x6165267E76D609465640bffc158aff7905D47B46" @@ -134,14 +136,46 @@ SANDBOX_IMPL = "0x605A3AFadF35A8a8fa4f4Cd4fe34a09Bbcea7718" +CS_MODULE_ID = 4 +CS_MODULE_NAME = "Community Staking" +CS_MODULE_MODULE_FEE_BP = 700 +CS_MODULE_TREASURY_FEE_BP = 300 +CS_MODULE_TARGET_SHARE_BP = 1500 +CS_MODULE_PRIORITY_EXIT_SHARE_THRESHOLD = 2000 +CS_MODULE_MAX_DEPOSITS_PER_BLOCK = 30 +CS_MODULE_MIN_DEPOSIT_BLOCK_DISTANCE = 25 +ORACLE_QUORUM = 2 +ORACLE_COMMITTEE = () + +CSM_COMMITTEE_MS = "0xc4DAB3a3ef68C6DFd8614a870D64D475bA44F164" # EOA CSM_ADDRESS = "0x4562c3e63c2e586cD1651B958C22F88135aCAd4f" CS_ACCOUNTING_ADDRESS = "0xc093e53e8F4b55A223c18A2Da6fA00e60DD5EFE1" CS_ORACLE_HASH_CONSENSUS_ADDRESS = "0xbF38618Ea09B503c1dED867156A0ea276Ca1AE37" CS_EARLY_ADOPTION_ADDRESS = "0x71E92eA77C198a770d9f33A03277DbeB99989660" CS_FEE_DISTRIBUTOR_ADDRESS = "0xD7ba648C8F72669C6aE649648B516ec03D07c8ED" CS_FEE_ORACLE_ADDRESS = "0xaF57326C7d513085051b50912D51809ECC5d98Ee" -CS_GATE_SEAL_ADDRESS = "0x41F2677fae0222cF1f08Cd1c0AAa607B469654Ce" -CS_VERIFIER_ADDRESS = "0xc099dfd61f6e5420e0ca7e84d820daad17fc1d44" +CS_GATE_SEAL_ADDRESS = "0xf1C03536dbC77B1bD493a2D1C0b1831Ea78B540a" +CS_VERIFIER_ADDRESS = "0xBC88b4b56A58b33716C3C2e879b4B1F964152AD4" CS_ORACLE_EPOCHS_PER_FRAME = 225 * 7 # 7 days CS_VERIFIER_ADDRESS_OLD = "0x6FDAA094227CF8E1593f9fB9C1b867C1f846F916" + +# DUAL_GOVERNANCE +DUAL_GOVERNANCE = "0x490bf377734CA134A8E207525E8576745652212e" +TIMELOCK = "0xe9c5FfEAd0668AFdBB9aac16163840d649DB76DD" +DUAL_GOVERNANCE_ADMIN_EXECUTOR = "0x8BD0a916faDa88Ba3accb595a3Acd28F467130e8" +DUAL_GOVERNANCE_EXECUTORS = [DUAL_GOVERNANCE_ADMIN_EXECUTOR] +RESEAL_MANAGER = "0x9dE2273f9f1e81145171CcA927EFeE7aCC64c9fb" +DAO_EMERGENCY_GOVERNANCE = "0x46c6C7E1Cc438456d658Eed61A764a475abDa0C1" +AGENT_MANAGER = "0xc807d4036B400dE8f6cD2aDbd8d9cf9a3a01CC30" +TIME_CONSTRAINTS = "0x4D36598EA14bd70a1040CF59ABF6f9439afBf5d9" +ROLES_VALIDATOR = "0xf532fC0a18D3339A52b3f1152FcA9925De5855AA" +ALLOWED_TOKENS_REGISTRY = "0x091C0eC8B4D54a9fcB36269B5D5E5AF43309e666" + +# CSM v2 Contracts +CS_PERMISSIONLESS_GATE_ADDRESS = "0x676626c3940ae32eF1e4F609938F785fF064ee22" +CS_VETTED_GATE_ADDRESS = "0x92A5aB5e4f98e67Fb7295fe439A652d0E51033bf" +CS_PARAMS_REGISTRY_ADDRESS = "0x25Cb2bA01849Ff577DD5223C4C8E46292cB15550" +CS_STRIKES_ADDRESS = "0xa3806442E717308dc7FED0cb4d7b0de1F643546C" +CS_EJECTOR_ADDRESS = "0x477589D5A8cB67Bd6682AF3612f99ADB72d09582" +CS_EXIT_PENALTIES_ADDRESS = "0xCF153E01322Ffd038737A25A2A139ECccF1A5bAD" diff --git a/configs/config_hoodi.py b/configs/config_hoodi.py index b433e0d0a..b73b72629 100644 --- a/configs/config_hoodi.py +++ b/configs/config_hoodi.py @@ -1,10 +1,30 @@ -ACCOUNTING_ORACLE = "0xcb883B1bD0a41512b42D2dB267F2A2cd919FB216" -VALIDATORS_EXIT_BUS_ORACLE = "0x8664d394C2B3278F26A1B44B967aEf99707eeAB2" -AO_CONSENSUS_VERSION = 3 - +# Ethereum Chain parameters CHAIN_NETWORK_NAME = "hoodi" +CHAIN_SECONDS_PER_SLOT = 12 +CHAIN_SLOTS_PER_EPOCH = 32 +CHAIN_GENESIS_TIME = 1742213400 +ORACLE_QUORUM = 7 +ORACLE_COMMITTEE = [ + '0x1932f53B1457a5987791a40Ba91f71c5Efd5788F', + '0x219743f1911d84B32599BdC2Df21fC8Dba6F81a2', + '0x43C45C2455C49eed320F463fF4f1Ece3D2BF5aE2', + '0x4c75FA734a39f3a21C57e583c1c29942F021C6B7', + '0x948A62cc0414979dc7aa9364BA5b96ECb29f8736', + '0x99B2B75F490fFC9A29E4E1f5987BE8e30E690aDF', + '0xB1cC91878c1831893D39C2Bb0988404ca5Fa7918', + '0xD3b1e36A372Ca250eefF61f90E833Ca070559970', + '0xcA80ee7313A315879f326105134F938676Cfd7a9', + '0xf03B8DC8762B97F13Ac82e6F94bE3Ed002FF7459', + '0xf7aE520e99ed3C41180B5E12681d31Aa7302E4e5', + '0xfe43A8B0b481Ae9fB1862d31826532047d2d538c' +] + +WSTETH_TOKEN = "0x7E99eE3C66636DE415D2d7C880938F2f40f94De4" +BURNER = "0x4e9A9ea2F154bA34BE919CD16a4A953DCd888165" + # DAO +ARAGON_KERNEL = "0xA48DF029Fd2e5FCECB3886c5c2F60e3625A1E87d" LDO_TOKEN = "0xEf2573966D009CcEA0Fc74451dee2193564198dc" # Standard (or forked) Aragon apps @@ -14,14 +34,17 @@ VOTING = "0x49B3512c44891bef83F8967d075121Bd1b07a01B" TOKEN_MANAGER = "0x8ab4a56721Ad8e68c6Ad86F9D9929782A78E39E5" -# Custom Aragon apps +SANDBOX = "0x682E94d2630846a503BDeE8b6810DF71C9806891" +SANDBOX_IMPL = "0x95F00b016bB31b7182D96D25074684518246E42a" +SANDBOX_REPO = "0x89D37eC788988e98BEceB32a8774394F1338B09C" + +# Our custom Aragon apps LIDO = "0x3508A952176b3c15387C97BE809eaffB1982176a" +NODE_OPERATORS_REGISTRY = "0x5cDbE1590c083b5A2A64427fAA63A7cfDB91FbB5" SIMPLE_DVT = "0x0B5236BECA68004DB89434462DfC3BB074d2c830" -CS_FEE_ORACLE_ADDRESS = "0xe7314f561B2e72f9543F1004e741bab6Fc51028B" -CS_VERIFIER_ADDRESS = "0xB6bafBD970a4537077dE59cebE33081d794513d6" -CS_VERIFIER_ADDRESS_OLD = "0x16D0f6068D211608e3703323314aa976a6492D09" -CSM_ADDRESS = "0x79CEf36D84743222f37765204Bec41E92a93E59d" +# Other (non-aragon) protocol contracts +WITHDRAWAL_VAULT = "0x4473dCDDbf77679A643BdB654dbd86D67F8d32f2" # EasyTracks EASYTRACK = "0x284D91a7D47850d21A6DEaaC6E538AC7E5E6fc2a" @@ -29,7 +52,6 @@ EASYTRACK_EVMSCRIPT_EXECUTOR = "0x79a20FD0FA36453B2F45eAbab19bfef43575Ba9E" EASYTRACK_INCREASE_NOP_STAKING_LIMIT_FACTORY = "0x0f121e4069e17a2Dc5bAbF39d769313a1e20f323" EASYTRACK_SIMPLE_DVT_TRUSTED_CALLER = "0xbB958292042c604855d23F8db458855d20e16996" - EASYTRACK_SIMPLE_DVT_ADD_NODE_OPERATORS_FACTORY = "0x42f2532ab3d41dfD6030db1EC2fF3DBC8DCdf89a" EASYTRACK_SIMPLE_DVT_ACTIVATE_NODE_OPERATORS_FACTORY = "0xfA3B3EE204E1f0f165379326768667300992530e" EASYTRACK_SIMPLE_DVT_DEACTIVATE_NODE_OPERATORS_FACTORY = "0x3114bEbC222Faec27DF8AB7f9bD8dF2063d7fc77" @@ -41,11 +63,12 @@ EASYTRACK_MEV_BOOST_ADD_RELAYS_FACTORY = "0xF02DbeaA1Bbc90226CaB995db4C190DbE25983af" EASYTRACK_MEV_BOOST_REMOVE_RELAYS_FACTORY = "0x7FCc2901C6C3D62784cB178B14d44445B038f736" EASYTRACK_MEV_BOOST_EDIT_RELAYS_FACTORY = "0x27A99a7104190DdA297B222104A6C70A4Ca5A17e" +EASYTRACK_SDVT_SUBMIT_VALIDATOR_EXIT_REQUEST_HASHES_FACTORY = "0xAa3D6A8B52447F272c1E8FAaA06EA06658bd95E2" +EASYTRACK_CURATED_SUBMIT_VALIDATOR_EXIT_REQUEST_HASHES_FACTORY = "0x397206ecdbdcb1A55A75e60Fc4D054feC72E5f63" +EASYTRACK_CS_SET_VETTED_GATE_TREE_FACTORY = "0xa890fc73e1b771Ee6073e2402E631c312FF92Cd9" # Other RELAY_ALLOWED_LIST = "0x279d3A456212a1294DaEd0faEE98675a52E8A4Bf" - -# Other (non-aragon) protocol contracts WSTETH_TOKEN = "0x7E99eE3C66636DE415D2d7C880938F2f40f94De4" LDO_HOLDER_ADDRESS_FOR_TESTS = "0xD500a8aDB182F55741E267730dfbfb4F1944C205" @@ -55,12 +78,79 @@ "0xc3C65cB7aa6D36F051f875708b8E17f9a0B210eD", ] +# LidoLocator +LIDO_LOCATOR = "0xe2EF9536DAAAEBFf5b1c130957AB3E80056b06D8" + +# NodeOperatorsRegistry aka Curated Staking Module +## see NodeOperatorsRegistry's proxy appId() +NODE_OPERATORS_REGISTRY_ARAGON_APP_ID = "0x7071f283424072341f856ac9e947e7ec0eb68719f757a7e785979b6b8717579d" + +# NodeOperatorsRegistry clone aka SimpleDVT +## see SimpleDVT's proxy appId() +SIMPLE_DVT_ARAGON_APP_ID = "0xe1635b63b5f7b5e545f2a637558a4029dea7905361a2f0fc28c66e9136cf86a4" + +# CSM staking router parameters +CS_MODULE_ID = 4 +CS_MODULE_NAME = "Community Staking" +CS_MODULE_MODULE_FEE_BP = 600 +CS_MODULE_TREASURY_FEE_BP = 400 +CS_MODULE_TARGET_SHARE_BP = 1600 +CS_MODULE_PRIORITY_EXIT_SHARE_THRESHOLD = 2100 +CS_MODULE_MAX_DEPOSITS_PER_BLOCK = 30 +CS_MODULE_MIN_DEPOSIT_BLOCK_DISTANCE = 25 + +# OracleDaemonConfig +ORACLE_DAEMON_CONFIG = "0x2a833402e3F46fFC1ecAb3598c599147a78731a9" + +# AccountingOracle +# and its corresponding HashConsensus +ACCOUNTING_ORACLE = "0xcb883B1bD0a41512b42D2dB267F2A2cd919FB216" +ACCOUNTING_ORACLE_CONSENSUS_VERSION = 4 # updated from 3 to 4 after vote + +# ValidatorsExitBusOracle +VALIDATORS_EXIT_BUS_ORACLE = "0x8664d394C2B3278F26A1B44B967aEf99707eeAB2" +VALIDATORS_EXIT_BUS_CONSENSUS_VERSION = 4 # added after vote + +# CSOracle +CS_ORACLE_EPOCHS_PER_FRAME = 225 * 7 # 7 days +CS_ORACLE_CONSENSUS_VERSION = 3 + # WithdrawalQueueERC721 WITHDRAWAL_QUEUE = "0xfe56573178f1bcdf53F01A6E9977670dcBBD9186" # StakingRouter STAKING_ROUTER = "0xCc820558B39ee15C7C45B59390B503b83fb499A8" +# Triggerable Withdrawals Gateway +TRIGGERABLE_WITHDRAWALS_GATEWAY = "0x6679090D92b08a2a686eF8614feECD8cDFE209db" +VALIDATOR_EXIT_VERIFIER = "0xFd4386A8795956f4B6D01cbb6dB116749731D7bD" + +# CSM addresses +CSM_COMMITTEE_MS = "0x4AF43Ee34a6fcD1fEcA1e1F832124C763561dA53" +CSM_ADDRESS = "0x79CEf36D84743222f37765204Bec41E92a93E59d" +CS_ACCOUNTING_ADDRESS = "0xA54b90BA34C5f326BC1485054080994e38FB4C60" +CS_ORACLE_HASH_CONSENSUS_ADDRESS = "0x54f74a10e4397dDeF85C4854d9dfcA129D72C637" +CS_EARLY_ADOPTION_ADDRESS = "0x3281b9E45518F462E594697f8fba1896a8B43939" +CS_FEE_DISTRIBUTOR_ADDRESS = "0xaCd9820b0A2229a82dc1A0770307ce5522FF3582" +CS_FEE_ORACLE_ADDRESS = "0xe7314f561B2e72f9543F1004e741bab6Fc51028B" +CS_VERIFIER_ADDRESS = "0xf805b3711cBB48F15Ae2bb27095ddC38c5339968" +CS_EJECTOR_ADDRESS = "0x21e271cBa32672B106737AbeB3a45E53Fe9a0df4" +CS_PERMISSIONLESS_GATE_ADDRESS = "0x5553077102322689876A6AdFd48D75014c28acfb" +CS_VETTED_GATE_ADDRESS = "0x10a254E724fe2b7f305F76f3F116a3969c53845f" + +# Gate Seals +CS_GATE_SEAL_ADDRESS = "0x94a3aEB0E9148F64CB453Be2BDe2Bc0148f6AC24" +WITHDRAWAL_QUEUE_GATE_SEAL_ADDRESS = "0x73d76Bd3D589B2b2185c402da82cdAfbc18b958D" +TRIGGERABLE_WITHDRAWALS_GATE_SEAL_ADDRESS = "0x368f2fcb593170823cc844F1B29e75E3d26879A1" + +CS_PARAMS_REGISTRY_ADDRESS = "0xA4aD5236963f9Fe4229864712269D8d79B65C5Ad" +CS_EXIT_PENALTIES_ADDRESS = "0xD259b31083Be841E5C85b2D481Cfc17C14276800" +CS_STRIKES_ADDRESS = "0x8fBA385C3c334D251eE413e79d4D3890db98693c" +CS_VETTED_GATE_ADDRESS = "0x10a254E724fe2b7f305F76f3F116a3969c53845f" +CS_PERMISSIONLESS_GATE_ADDRESS = "0x5553077102322689876A6AdFd48D75014c28acfb" +CS_EJECTOR_ADDRESS = "0x21e271cBa32672B106737AbeB3a45E53Fe9a0df4" +CS_VERIFIER_V2_ADDRESS = "0xf805b3711cBB48F15Ae2bb27095ddC38c5339968" + # DualGovernance DUAL_GOVERNANCE = "0x9CAaCCc62c66d817CC59c44780D1b722359795bF" @@ -83,8 +173,8 @@ DUAL_GOVERNANCE_CONFIG_PROVIDER_VALUES = { - "FIRST_SEAL_RAGE_QUIT_SUPPORT": 3 * 10**16, # 3% in PercentD16 - "SECOND_SEAL_RAGE_QUIT_SUPPORT": 15 * 10**16, # 15% in PercentD16 + "FIRST_SEAL_RAGE_QUIT_SUPPORT": 3 * 10 ** 16, # 3% in PercentD16 + "SECOND_SEAL_RAGE_QUIT_SUPPORT": 15 * 10 ** 16, # 15% in PercentD16 "MIN_ASSETS_LOCK_DURATION": 300, # 5 mins "RAGE_QUIT_ETH_WITHDRAWALS_DELAY_GROWTH": 1200, # 20 mins "RAGE_QUIT_ETH_WITHDRAWALS_MIN_DELAY": 600, # 10 min diff --git a/interfaces/AccountingOracle.json b/interfaces/AccountingOracle.json index 069da4f74..35c6e7e9f 100644 --- a/interfaces/AccountingOracle.json +++ b/interfaces/AccountingOracle.json @@ -50,6 +50,22 @@ "name": "CannotSubmitExtraDataBeforeMainData", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "itemIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "dataType", + "type": "uint256" + } + ], + "name": "DeprecatedExtraDataType", + "type": "error" + }, { "inputs": [], "name": "ExtraDataAlreadyProcessed", @@ -334,11 +350,6 @@ "name": "UnexpectedExtraDataItemsCount", "type": "error" }, - { - "inputs": [], - "name": "UnexpectedExtraDataLength", - "type": "error" - }, { "inputs": [ { @@ -834,6 +845,13 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "finalizeUpgrade_v3", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "getConsensusContract", diff --git a/interfaces/CSAccounting.json b/interfaces/CSAccounting.json new file mode 100644 index 000000000..8eaef61dc --- /dev/null +++ b/interfaces/CSAccounting.json @@ -0,0 +1 @@ +[{"type":"constructor","inputs":[{"name":"lidoLocator","type":"address","internalType":"address"},{"name":"module","type":"address","internalType":"address"},{"name":"_feeDistributor","type":"address","internalType":"address"},{"name":"maxCurveLength","type":"uint256","internalType":"uint256"},{"name":"minBondLockPeriod","type":"uint256","internalType":"uint256"},{"name":"maxBondLockPeriod","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"type":"function","name":"DEFAULT_ADMIN_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"DEFAULT_BOND_CURVE_ID","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"FEE_DISTRIBUTOR","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ICSFeeDistributor"}],"stateMutability":"view"},{"type":"function","name":"LIDO","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ILido"}],"stateMutability":"view"},{"type":"function","name":"LIDO_LOCATOR","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ILidoLocator"}],"stateMutability":"view"},{"type":"function","name":"MANAGE_BOND_CURVES_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"MAX_BOND_LOCK_PERIOD","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"MAX_CURVE_LENGTH","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"MIN_BOND_LOCK_PERIOD","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"MIN_CURVE_LENGTH","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"MODULE","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ICSModule"}],"stateMutability":"view"},{"type":"function","name":"PAUSE_INFINITELY","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"PAUSE_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"RECOVERER_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"RESUME_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"SET_BOND_CURVE_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"WITHDRAWAL_QUEUE","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IWithdrawalQueue"}],"stateMutability":"view"},{"type":"function","name":"WSTETH","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IWstETH"}],"stateMutability":"view"},{"type":"function","name":"addBondCurve","inputs":[{"name":"bondCurve","type":"tuple[]","internalType":"struct ICSBondCurve.BondCurveIntervalInput[]","components":[{"name":"minKeysCount","type":"uint256","internalType":"uint256"},{"name":"trend","type":"uint256","internalType":"uint256"}]}],"outputs":[{"name":"id","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"type":"function","name":"chargeFee","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"chargePenaltyRecipient","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"claimRewardsStETH","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"stETHAmount","type":"uint256","internalType":"uint256"},{"name":"cumulativeFeeShares","type":"uint256","internalType":"uint256"},{"name":"rewardsProof","type":"bytes32[]","internalType":"bytes32[]"}],"outputs":[{"name":"claimedShares","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"type":"function","name":"claimRewardsUnstETH","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"stEthAmount","type":"uint256","internalType":"uint256"},{"name":"cumulativeFeeShares","type":"uint256","internalType":"uint256"},{"name":"rewardsProof","type":"bytes32[]","internalType":"bytes32[]"}],"outputs":[{"name":"requestId","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"type":"function","name":"claimRewardsWstETH","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"wstETHAmount","type":"uint256","internalType":"uint256"},{"name":"cumulativeFeeShares","type":"uint256","internalType":"uint256"},{"name":"rewardsProof","type":"bytes32[]","internalType":"bytes32[]"}],"outputs":[{"name":"claimedWstETH","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"type":"function","name":"compensateLockedBondETH","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"payable"},{"type":"function","name":"depositETH","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"payable"},{"type":"function","name":"depositETH","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"payable"},{"type":"function","name":"depositStETH","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"stETHAmount","type":"uint256","internalType":"uint256"},{"name":"permit","type":"tuple","internalType":"struct ICSAccounting.PermitInput","components":[{"name":"value","type":"uint256","internalType":"uint256"},{"name":"deadline","type":"uint256","internalType":"uint256"},{"name":"v","type":"uint8","internalType":"uint8"},{"name":"r","type":"bytes32","internalType":"bytes32"},{"name":"s","type":"bytes32","internalType":"bytes32"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"depositStETH","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"stETHAmount","type":"uint256","internalType":"uint256"},{"name":"permit","type":"tuple","internalType":"struct ICSAccounting.PermitInput","components":[{"name":"value","type":"uint256","internalType":"uint256"},{"name":"deadline","type":"uint256","internalType":"uint256"},{"name":"v","type":"uint8","internalType":"uint8"},{"name":"r","type":"bytes32","internalType":"bytes32"},{"name":"s","type":"bytes32","internalType":"bytes32"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"depositWstETH","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"wstETHAmount","type":"uint256","internalType":"uint256"},{"name":"permit","type":"tuple","internalType":"struct ICSAccounting.PermitInput","components":[{"name":"value","type":"uint256","internalType":"uint256"},{"name":"deadline","type":"uint256","internalType":"uint256"},{"name":"v","type":"uint8","internalType":"uint8"},{"name":"r","type":"bytes32","internalType":"bytes32"},{"name":"s","type":"bytes32","internalType":"bytes32"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"depositWstETH","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"wstETHAmount","type":"uint256","internalType":"uint256"},{"name":"permit","type":"tuple","internalType":"struct ICSAccounting.PermitInput","components":[{"name":"value","type":"uint256","internalType":"uint256"},{"name":"deadline","type":"uint256","internalType":"uint256"},{"name":"v","type":"uint8","internalType":"uint8"},{"name":"r","type":"bytes32","internalType":"bytes32"},{"name":"s","type":"bytes32","internalType":"bytes32"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"feeDistributor","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ICSFeeDistributor"}],"stateMutability":"view"},{"type":"function","name":"finalizeUpgradeV2","inputs":[{"name":"bondCurvesInputs","type":"tuple[][]","internalType":"struct ICSBondCurve.BondCurveIntervalInput[][]","components":[{"name":"minKeysCount","type":"uint256","internalType":"uint256"},{"name":"trend","type":"uint256","internalType":"uint256"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getActualLockedBond","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getBond","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getBondAmountByKeysCount","inputs":[{"name":"keys","type":"uint256","internalType":"uint256"},{"name":"curveId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getBondAmountByKeysCountWstETH","inputs":[{"name":"keysCount","type":"uint256","internalType":"uint256"},{"name":"curveId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getBondCurve","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"tuple","internalType":"struct ICSBondCurve.BondCurve","components":[{"name":"intervals","type":"tuple[]","internalType":"struct ICSBondCurve.BondCurveInterval[]","components":[{"name":"minKeysCount","type":"uint256","internalType":"uint256"},{"name":"minBond","type":"uint256","internalType":"uint256"},{"name":"trend","type":"uint256","internalType":"uint256"}]}]}],"stateMutability":"view"},{"type":"function","name":"getBondCurveId","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getBondLockPeriod","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getBondShares","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getBondSummary","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"current","type":"uint256","internalType":"uint256"},{"name":"required","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getBondSummaryShares","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"current","type":"uint256","internalType":"uint256"},{"name":"required","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getClaimableBondShares","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getClaimableRewardsAndBondShares","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"cumulativeFeeShares","type":"uint256","internalType":"uint256"},{"name":"rewardsProof","type":"bytes32[]","internalType":"bytes32[]"}],"outputs":[{"name":"claimableShares","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getCurveInfo","inputs":[{"name":"curveId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"tuple","internalType":"struct ICSBondCurve.BondCurve","components":[{"name":"intervals","type":"tuple[]","internalType":"struct ICSBondCurve.BondCurveInterval[]","components":[{"name":"minKeysCount","type":"uint256","internalType":"uint256"},{"name":"minBond","type":"uint256","internalType":"uint256"},{"name":"trend","type":"uint256","internalType":"uint256"}]}]}],"stateMutability":"view"},{"type":"function","name":"getCurvesCount","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getInitializedVersion","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"type":"function","name":"getKeysCountByBondAmount","inputs":[{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"curveId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getLockedBondInfo","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"tuple","internalType":"struct ICSBondLock.BondLock","components":[{"name":"amount","type":"uint128","internalType":"uint128"},{"name":"until","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getRequiredBondForNextKeys","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"additionalKeys","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getRequiredBondForNextKeysWstETH","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"additionalKeys","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getResumeSinceTimestamp","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getRoleAdmin","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"getRoleMember","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"index","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRoleMemberCount","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getUnbondedKeysCount","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getUnbondedKeysCountToEject","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"grantRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"hasRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"initialize","inputs":[{"name":"bondCurve","type":"tuple[]","internalType":"struct ICSBondCurve.BondCurveIntervalInput[]","components":[{"name":"minKeysCount","type":"uint256","internalType":"uint256"},{"name":"trend","type":"uint256","internalType":"uint256"}]},{"name":"admin","type":"address","internalType":"address"},{"name":"bondLockPeriod","type":"uint256","internalType":"uint256"},{"name":"_chargePenaltyRecipient","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"isPaused","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"lockBondETH","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"pauseFor","inputs":[{"name":"duration","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"penalize","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"pullFeeRewards","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"cumulativeFeeShares","type":"uint256","internalType":"uint256"},{"name":"rewardsProof","type":"bytes32[]","internalType":"bytes32[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"recoverERC1155","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"recoverERC20","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"recoverERC721","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"recoverEther","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"recoverStETHShares","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"releaseLockedBondETH","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"renewBurnerAllowance","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"renounceRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"callerConfirmation","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"resume","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"revokeRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setBondCurve","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"curveId","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setBondLockPeriod","inputs":[{"name":"period","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setChargePenaltyRecipient","inputs":[{"name":"_chargePenaltyRecipient","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"settleLockedBondETH","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"applied","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"totalBondShares","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"updateBondCurve","inputs":[{"name":"curveId","type":"uint256","internalType":"uint256"},{"name":"bondCurve","type":"tuple[]","internalType":"struct ICSBondCurve.BondCurveIntervalInput[]","components":[{"name":"minKeysCount","type":"uint256","internalType":"uint256"},{"name":"trend","type":"uint256","internalType":"uint256"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"BondBurned","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"toBurnAmount","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"burnedAmount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"BondCharged","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"toChargeAmount","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"chargedAmount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"BondClaimedStETH","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"to","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"BondClaimedUnstETH","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"to","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"requestId","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"BondClaimedWstETH","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"to","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"BondCurveAdded","inputs":[{"name":"curveId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"bondCurveIntervals","type":"tuple[]","indexed":false,"internalType":"struct ICSBondCurve.BondCurveIntervalInput[]","components":[{"name":"minKeysCount","type":"uint256","internalType":"uint256"},{"name":"trend","type":"uint256","internalType":"uint256"}]}],"anonymous":false},{"type":"event","name":"BondCurveSet","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"curveId","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"BondCurveUpdated","inputs":[{"name":"curveId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"bondCurveIntervals","type":"tuple[]","indexed":false,"internalType":"struct ICSBondCurve.BondCurveIntervalInput[]","components":[{"name":"minKeysCount","type":"uint256","internalType":"uint256"},{"name":"trend","type":"uint256","internalType":"uint256"}]}],"anonymous":false},{"type":"event","name":"BondDepositedETH","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"from","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"BondDepositedStETH","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"from","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"BondDepositedWstETH","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"from","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"BondLockChanged","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"newAmount","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"until","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"BondLockCompensated","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"BondLockPeriodChanged","inputs":[{"name":"period","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"BondLockRemoved","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"ChargePenaltyRecipientSet","inputs":[{"name":"chargePenaltyRecipient","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"ERC1155Recovered","inputs":[{"name":"token","type":"address","indexed":true,"internalType":"address"},{"name":"tokenId","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"recipient","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"ERC20Recovered","inputs":[{"name":"token","type":"address","indexed":true,"internalType":"address"},{"name":"recipient","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"ERC721Recovered","inputs":[{"name":"token","type":"address","indexed":true,"internalType":"address"},{"name":"tokenId","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"recipient","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"EtherRecovered","inputs":[{"name":"recipient","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Initialized","inputs":[{"name":"version","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"Paused","inputs":[{"name":"duration","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Resumed","inputs":[],"anonymous":false},{"type":"event","name":"RoleAdminChanged","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"previousAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"newAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"StETHSharesRecovered","inputs":[{"name":"recipient","type":"address","indexed":true,"internalType":"address"},{"name":"shares","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"error","name":"AccessControlBadConfirmation","inputs":[]},{"type":"error","name":"AccessControlUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"neededRole","type":"bytes32","internalType":"bytes32"}]},{"type":"error","name":"ElRewardsVaultReceiveFailed","inputs":[]},{"type":"error","name":"FailedToSendEther","inputs":[]},{"type":"error","name":"InvalidBondCurveId","inputs":[]},{"type":"error","name":"InvalidBondCurveLength","inputs":[]},{"type":"error","name":"InvalidBondCurveMaxLength","inputs":[]},{"type":"error","name":"InvalidBondCurveValues","inputs":[]},{"type":"error","name":"InvalidBondCurvesLength","inputs":[]},{"type":"error","name":"InvalidBondLockAmount","inputs":[]},{"type":"error","name":"InvalidBondLockPeriod","inputs":[]},{"type":"error","name":"InvalidInitialization","inputs":[]},{"type":"error","name":"InvalidInitializationCurveId","inputs":[]},{"type":"error","name":"NodeOperatorDoesNotExist","inputs":[]},{"type":"error","name":"NotAllowedToRecover","inputs":[]},{"type":"error","name":"NotInitializing","inputs":[]},{"type":"error","name":"NothingToClaim","inputs":[]},{"type":"error","name":"PauseUntilMustBeInFuture","inputs":[]},{"type":"error","name":"PausedExpected","inputs":[]},{"type":"error","name":"ResumedExpected","inputs":[]},{"type":"error","name":"SafeCastOverflowedUintDowncast","inputs":[{"name":"bits","type":"uint8","internalType":"uint8"},{"name":"value","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"SenderIsNotEligible","inputs":[]},{"type":"error","name":"SenderIsNotModule","inputs":[]},{"type":"error","name":"ZeroAdminAddress","inputs":[]},{"type":"error","name":"ZeroChargePenaltyRecipientAddress","inputs":[]},{"type":"error","name":"ZeroFeeDistributorAddress","inputs":[]},{"type":"error","name":"ZeroLocatorAddress","inputs":[]},{"type":"error","name":"ZeroModuleAddress","inputs":[]},{"type":"error","name":"ZeroPauseDuration","inputs":[]}] diff --git a/interfaces/csm/CSEarlyAdoption.json b/interfaces/CSEarlyAdoption.json similarity index 100% rename from interfaces/csm/CSEarlyAdoption.json rename to interfaces/CSEarlyAdoption.json diff --git a/interfaces/CSEjector.json b/interfaces/CSEjector.json new file mode 100644 index 000000000..c27efed2b --- /dev/null +++ b/interfaces/CSEjector.json @@ -0,0 +1 @@ +[{"type":"constructor","inputs":[{"name":"module","type":"address","internalType":"address"},{"name":"strikes","type":"address","internalType":"address"},{"name":"twg","type":"address","internalType":"address"},{"name":"stakingModuleId","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"type":"function","name":"DEFAULT_ADMIN_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"MODULE","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ICSModule"}],"stateMutability":"view"},{"type":"function","name":"PAUSE_INFINITELY","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"PAUSE_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"RESUME_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"STAKING_MODULE_ID","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"STRIKES","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"STRIKES_EXIT_TYPE_ID","inputs":[],"outputs":[{"name":"","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"TWG","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ITriggerableWithdrawalsGateway"}],"stateMutability":"view"},{"type":"function","name":"VOLUNTARY_EXIT_TYPE_ID","inputs":[],"outputs":[{"name":"","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"ejectBadPerformer","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"keyIndex","type":"uint256","internalType":"uint256"},{"name":"refundRecipient","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"payable"},{"type":"function","name":"getResumeSinceTimestamp","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getRoleAdmin","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"getRoleMember","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"index","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRoleMemberCount","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"grantRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"hasRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"initialize","inputs":[{"name":"admin","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"isPaused","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"pauseFor","inputs":[{"name":"duration","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"renounceRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"callerConfirmation","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"resume","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"revokeRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"voluntaryEject","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"startFrom","type":"uint256","internalType":"uint256"},{"name":"keysCount","type":"uint256","internalType":"uint256"},{"name":"refundRecipient","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"payable"},{"type":"function","name":"voluntaryEjectByArray","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"keyIndices","type":"uint256[]","internalType":"uint256[]"},{"name":"refundRecipient","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"payable"},{"type":"event","name":"Initialized","inputs":[{"name":"version","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"Paused","inputs":[{"name":"duration","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Resumed","inputs":[],"anonymous":false},{"type":"event","name":"RoleAdminChanged","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"previousAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"newAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"error","name":"AccessControlBadConfirmation","inputs":[]},{"type":"error","name":"AccessControlUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"neededRole","type":"bytes32","internalType":"bytes32"}]},{"type":"error","name":"AlreadyWithdrawn","inputs":[]},{"type":"error","name":"InvalidInitialization","inputs":[]},{"type":"error","name":"NodeOperatorDoesNotExist","inputs":[]},{"type":"error","name":"NotInitializing","inputs":[]},{"type":"error","name":"PauseUntilMustBeInFuture","inputs":[]},{"type":"error","name":"PausedExpected","inputs":[]},{"type":"error","name":"ResumedExpected","inputs":[]},{"type":"error","name":"SenderIsNotEligible","inputs":[]},{"type":"error","name":"SenderIsNotStrikes","inputs":[]},{"type":"error","name":"SigningKeysInvalidOffset","inputs":[]},{"type":"error","name":"ZeroAdminAddress","inputs":[]},{"type":"error","name":"ZeroModuleAddress","inputs":[]},{"type":"error","name":"ZeroPauseDuration","inputs":[]},{"type":"error","name":"ZeroStrikesAddress","inputs":[]},{"type":"error","name":"ZeroTWGAddress","inputs":[]}] diff --git a/interfaces/CSExitPenalties.json b/interfaces/CSExitPenalties.json new file mode 100644 index 000000000..e45976af2 --- /dev/null +++ b/interfaces/CSExitPenalties.json @@ -0,0 +1 @@ +[{"type":"constructor","inputs":[{"name":"module","type":"address","internalType":"address"},{"name":"parametersRegistry","type":"address","internalType":"address"},{"name":"strikes","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"ACCOUNTING","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ICSAccounting"}],"stateMutability":"view"},{"type":"function","name":"MODULE","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ICSModule"}],"stateMutability":"view"},{"type":"function","name":"PARAMETERS_REGISTRY","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ICSParametersRegistry"}],"stateMutability":"view"},{"type":"function","name":"STRIKES","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"STRIKES_EXIT_TYPE_ID","inputs":[],"outputs":[{"name":"","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"VOLUNTARY_EXIT_TYPE_ID","inputs":[],"outputs":[{"name":"","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"getExitPenaltyInfo","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"publicKey","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"tuple","internalType":"struct ExitPenaltyInfo","components":[{"name":"delayPenalty","type":"tuple","internalType":"struct MarkedUint248","components":[{"name":"value","type":"uint248","internalType":"uint248"},{"name":"isValue","type":"bool","internalType":"bool"}]},{"name":"strikesPenalty","type":"tuple","internalType":"struct MarkedUint248","components":[{"name":"value","type":"uint248","internalType":"uint248"},{"name":"isValue","type":"bool","internalType":"bool"}]},{"name":"withdrawalRequestFee","type":"tuple","internalType":"struct MarkedUint248","components":[{"name":"value","type":"uint248","internalType":"uint248"},{"name":"isValue","type":"bool","internalType":"bool"}]}]}],"stateMutability":"view"},{"type":"function","name":"isValidatorExitDelayPenaltyApplicable","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"publicKey","type":"bytes","internalType":"bytes"},{"name":"eligibleToExitInSec","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"processExitDelayReport","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"publicKey","type":"bytes","internalType":"bytes"},{"name":"eligibleToExitInSec","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"processStrikesReport","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"publicKey","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"processTriggeredExit","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"publicKey","type":"bytes","internalType":"bytes"},{"name":"withdrawalRequestPaidFee","type":"uint256","internalType":"uint256"},{"name":"exitType","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"StrikesPenaltyProcessed","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"pubkey","type":"bytes","indexed":false,"internalType":"bytes"},{"name":"strikesPenalty","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"TriggeredExitFeeRecorded","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"exitType","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"pubkey","type":"bytes","indexed":false,"internalType":"bytes"},{"name":"withdrawalRequestFee","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"ValidatorExitDelayProcessed","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"pubkey","type":"bytes","indexed":false,"internalType":"bytes"},{"name":"delayPenalty","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"error","name":"SafeCastOverflowedUintDowncast","inputs":[{"name":"bits","type":"uint8","internalType":"uint8"},{"name":"value","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"SenderIsNotModule","inputs":[]},{"type":"error","name":"SenderIsNotStrikes","inputs":[]},{"type":"error","name":"ValidatorExitDelayAlreadyReported","inputs":[]},{"type":"error","name":"ValidatorExitDelayNotApplicable","inputs":[]},{"type":"error","name":"ZeroAccountingAddress","inputs":[]},{"type":"error","name":"ZeroModuleAddress","inputs":[]},{"type":"error","name":"ZeroParametersRegistryAddress","inputs":[]},{"type":"error","name":"ZeroStrikesAddress","inputs":[]}] diff --git a/interfaces/CSFeeDistributor.json b/interfaces/CSFeeDistributor.json new file mode 100644 index 000000000..e5f46981c --- /dev/null +++ b/interfaces/CSFeeDistributor.json @@ -0,0 +1 @@ +[{"type":"constructor","inputs":[{"name":"stETH","type":"address","internalType":"address"},{"name":"accounting","type":"address","internalType":"address"},{"name":"oracle","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"ACCOUNTING","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"DEFAULT_ADMIN_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"ORACLE","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"RECOVERER_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"STETH","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IStETH"}],"stateMutability":"view"},{"type":"function","name":"distributeFees","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"shares","type":"uint256","internalType":"uint256"},{"name":"proof","type":"bytes32[]","internalType":"bytes32[]"}],"outputs":[{"name":"sharesToDistribute","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"type":"function","name":"distributedShares","inputs":[{"name":"","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"distributionDataHistoryCount","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"finalizeUpgradeV2","inputs":[{"name":"_rebateRecipient","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getFeesToDistribute","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"shares","type":"uint256","internalType":"uint256"},{"name":"proof","type":"bytes32[]","internalType":"bytes32[]"}],"outputs":[{"name":"sharesToDistribute","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getHistoricalDistributionData","inputs":[{"name":"index","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"tuple","internalType":"struct ICSFeeDistributor.DistributionData","components":[{"name":"refSlot","type":"uint256","internalType":"uint256"},{"name":"treeRoot","type":"bytes32","internalType":"bytes32"},{"name":"treeCid","type":"string","internalType":"string"},{"name":"logCid","type":"string","internalType":"string"},{"name":"distributed","type":"uint256","internalType":"uint256"},{"name":"rebate","type":"uint256","internalType":"uint256"}]}],"stateMutability":"view"},{"type":"function","name":"getInitializedVersion","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"type":"function","name":"getRoleAdmin","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"getRoleMember","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"index","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRoleMemberCount","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"grantRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"hasRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"hashLeaf","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"shares","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"pure"},{"type":"function","name":"initialize","inputs":[{"name":"admin","type":"address","internalType":"address"},{"name":"_rebateRecipient","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"logCid","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"pendingSharesToDistribute","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"processOracleReport","inputs":[{"name":"_treeRoot","type":"bytes32","internalType":"bytes32"},{"name":"_treeCid","type":"string","internalType":"string"},{"name":"_logCid","type":"string","internalType":"string"},{"name":"distributed","type":"uint256","internalType":"uint256"},{"name":"rebate","type":"uint256","internalType":"uint256"},{"name":"refSlot","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"rebateRecipient","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"recoverERC1155","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"recoverERC20","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"recoverERC721","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"recoverEther","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"renounceRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"callerConfirmation","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"revokeRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRebateRecipient","inputs":[{"name":"_rebateRecipient","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"totalClaimableShares","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"treeCid","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"treeRoot","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"event","name":"DistributionDataUpdated","inputs":[{"name":"totalClaimableShares","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"treeRoot","type":"bytes32","indexed":false,"internalType":"bytes32"},{"name":"treeCid","type":"string","indexed":false,"internalType":"string"}],"anonymous":false},{"type":"event","name":"DistributionLogUpdated","inputs":[{"name":"logCid","type":"string","indexed":false,"internalType":"string"}],"anonymous":false},{"type":"event","name":"ERC1155Recovered","inputs":[{"name":"token","type":"address","indexed":true,"internalType":"address"},{"name":"tokenId","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"recipient","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"ERC20Recovered","inputs":[{"name":"token","type":"address","indexed":true,"internalType":"address"},{"name":"recipient","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"ERC721Recovered","inputs":[{"name":"token","type":"address","indexed":true,"internalType":"address"},{"name":"tokenId","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"recipient","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"EtherRecovered","inputs":[{"name":"recipient","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Initialized","inputs":[{"name":"version","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"ModuleFeeDistributed","inputs":[{"name":"shares","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OperatorFeeDistributed","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"shares","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"RebateRecipientSet","inputs":[{"name":"recipient","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RebateTransferred","inputs":[{"name":"shares","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"RoleAdminChanged","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"previousAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"newAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"StETHSharesRecovered","inputs":[{"name":"recipient","type":"address","indexed":true,"internalType":"address"},{"name":"shares","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"error","name":"AccessControlBadConfirmation","inputs":[]},{"type":"error","name":"AccessControlUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"neededRole","type":"bytes32","internalType":"bytes32"}]},{"type":"error","name":"FailedToSendEther","inputs":[]},{"type":"error","name":"FeeSharesDecrease","inputs":[]},{"type":"error","name":"InvalidInitialization","inputs":[]},{"type":"error","name":"InvalidLogCID","inputs":[]},{"type":"error","name":"InvalidProof","inputs":[]},{"type":"error","name":"InvalidReportData","inputs":[]},{"type":"error","name":"InvalidShares","inputs":[]},{"type":"error","name":"InvalidTreeCid","inputs":[]},{"type":"error","name":"InvalidTreeRoot","inputs":[]},{"type":"error","name":"NotAccounting","inputs":[]},{"type":"error","name":"NotAllowedToRecover","inputs":[]},{"type":"error","name":"NotEnoughShares","inputs":[]},{"type":"error","name":"NotInitializing","inputs":[]},{"type":"error","name":"NotOracle","inputs":[]},{"type":"error","name":"ZeroAccountingAddress","inputs":[]},{"type":"error","name":"ZeroAdminAddress","inputs":[]},{"type":"error","name":"ZeroOracleAddress","inputs":[]},{"type":"error","name":"ZeroRebateRecipientAddress","inputs":[]},{"type":"error","name":"ZeroStEthAddress","inputs":[]}] diff --git a/interfaces/CSFeeOracle.json b/interfaces/CSFeeOracle.json new file mode 100644 index 000000000..6d13c0c2c --- /dev/null +++ b/interfaces/CSFeeOracle.json @@ -0,0 +1 @@ +[{"type":"constructor","inputs":[{"name":"feeDistributor","type":"address","internalType":"address"},{"name":"strikes","type":"address","internalType":"address"},{"name":"secondsPerSlot","type":"uint256","internalType":"uint256"},{"name":"genesisTime","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"type":"function","name":"DEFAULT_ADMIN_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"FEE_DISTRIBUTOR","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ICSFeeDistributor"}],"stateMutability":"view"},{"type":"function","name":"GENESIS_TIME","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"MANAGE_CONSENSUS_CONTRACT_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"MANAGE_CONSENSUS_VERSION_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"PAUSE_INFINITELY","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"PAUSE_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"RECOVERER_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"RESUME_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"SECONDS_PER_SLOT","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"STRIKES","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ICSStrikes"}],"stateMutability":"view"},{"type":"function","name":"SUBMIT_DATA_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"discardConsensusReport","inputs":[{"name":"refSlot","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"finalizeUpgradeV2","inputs":[{"name":"consensusVersion","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getConsensusContract","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getConsensusReport","inputs":[],"outputs":[{"name":"hash","type":"bytes32","internalType":"bytes32"},{"name":"refSlot","type":"uint256","internalType":"uint256"},{"name":"processingDeadlineTime","type":"uint256","internalType":"uint256"},{"name":"processingStarted","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"getConsensusVersion","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getContractVersion","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getLastProcessingRefSlot","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getResumeSinceTimestamp","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getRoleAdmin","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"getRoleMember","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"index","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRoleMemberCount","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"grantRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"hasRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"initialize","inputs":[{"name":"admin","type":"address","internalType":"address"},{"name":"consensusContract","type":"address","internalType":"address"},{"name":"consensusVersion","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"isPaused","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"pauseFor","inputs":[{"name":"duration","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"pauseUntil","inputs":[{"name":"pauseUntilInclusive","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"recoverERC1155","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"recoverERC20","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"recoverERC721","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"recoverEther","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"renounceRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"callerConfirmation","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"resume","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"revokeRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setConsensusContract","inputs":[{"name":"addr","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setConsensusVersion","inputs":[{"name":"version","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"submitConsensusReport","inputs":[{"name":"reportHash","type":"bytes32","internalType":"bytes32"},{"name":"refSlot","type":"uint256","internalType":"uint256"},{"name":"deadline","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"submitReportData","inputs":[{"name":"data","type":"tuple","internalType":"struct ICSFeeOracle.ReportData","components":[{"name":"consensusVersion","type":"uint256","internalType":"uint256"},{"name":"refSlot","type":"uint256","internalType":"uint256"},{"name":"treeRoot","type":"bytes32","internalType":"bytes32"},{"name":"treeCid","type":"string","internalType":"string"},{"name":"logCid","type":"string","internalType":"string"},{"name":"distributed","type":"uint256","internalType":"uint256"},{"name":"rebate","type":"uint256","internalType":"uint256"},{"name":"strikesTreeRoot","type":"bytes32","internalType":"bytes32"},{"name":"strikesTreeCid","type":"string","internalType":"string"}]},{"name":"contractVersion","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"event","name":"ConsensusHashContractSet","inputs":[{"name":"addr","type":"address","indexed":true,"internalType":"address"},{"name":"prevAddr","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"ConsensusVersionSet","inputs":[{"name":"version","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"prevVersion","type":"uint256","indexed":true,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"ContractVersionSet","inputs":[{"name":"version","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"ERC1155Recovered","inputs":[{"name":"token","type":"address","indexed":true,"internalType":"address"},{"name":"tokenId","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"recipient","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"ERC20Recovered","inputs":[{"name":"token","type":"address","indexed":true,"internalType":"address"},{"name":"recipient","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"ERC721Recovered","inputs":[{"name":"token","type":"address","indexed":true,"internalType":"address"},{"name":"tokenId","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"recipient","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"EtherRecovered","inputs":[{"name":"recipient","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Initialized","inputs":[{"name":"version","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"Paused","inputs":[{"name":"duration","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"ProcessingStarted","inputs":[{"name":"refSlot","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"hash","type":"bytes32","indexed":false,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"ReportDiscarded","inputs":[{"name":"refSlot","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"hash","type":"bytes32","indexed":false,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"ReportSubmitted","inputs":[{"name":"refSlot","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"hash","type":"bytes32","indexed":false,"internalType":"bytes32"},{"name":"processingDeadlineTime","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Resumed","inputs":[],"anonymous":false},{"type":"event","name":"RoleAdminChanged","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"previousAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"newAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"StETHSharesRecovered","inputs":[{"name":"recipient","type":"address","indexed":true,"internalType":"address"},{"name":"shares","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"WarnProcessingMissed","inputs":[{"name":"refSlot","type":"uint256","indexed":true,"internalType":"uint256"}],"anonymous":false},{"type":"error","name":"AccessControlBadConfirmation","inputs":[]},{"type":"error","name":"AccessControlUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"neededRole","type":"bytes32","internalType":"bytes32"}]},{"type":"error","name":"AddressCannotBeSame","inputs":[]},{"type":"error","name":"AddressCannotBeZero","inputs":[]},{"type":"error","name":"FailedToSendEther","inputs":[]},{"type":"error","name":"HashCannotBeZero","inputs":[]},{"type":"error","name":"InitialRefSlotCannotBeLessThanProcessingOne","inputs":[{"name":"initialRefSlot","type":"uint256","internalType":"uint256"},{"name":"processingRefSlot","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidContractVersion","inputs":[]},{"type":"error","name":"InvalidContractVersionIncrement","inputs":[]},{"type":"error","name":"InvalidInitialization","inputs":[]},{"type":"error","name":"NoConsensusReportToProcess","inputs":[]},{"type":"error","name":"NonZeroContractVersionOnInit","inputs":[]},{"type":"error","name":"NotAllowedToRecover","inputs":[]},{"type":"error","name":"NotInitializing","inputs":[]},{"type":"error","name":"PauseUntilMustBeInFuture","inputs":[]},{"type":"error","name":"PausedExpected","inputs":[]},{"type":"error","name":"ProcessingDeadlineMissed","inputs":[{"name":"deadline","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"RefSlotAlreadyProcessing","inputs":[]},{"type":"error","name":"RefSlotCannotDecrease","inputs":[{"name":"refSlot","type":"uint256","internalType":"uint256"},{"name":"prevRefSlot","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"RefSlotMustBeGreaterThanProcessingOne","inputs":[{"name":"refSlot","type":"uint256","internalType":"uint256"},{"name":"processingRefSlot","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ResumedExpected","inputs":[]},{"type":"error","name":"SafeCastOverflowedUintDowncast","inputs":[{"name":"bits","type":"uint8","internalType":"uint8"},{"name":"value","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"SecondsPerSlotCannotBeZero","inputs":[]},{"type":"error","name":"SenderIsNotTheConsensusContract","inputs":[]},{"type":"error","name":"SenderNotAllowed","inputs":[]},{"type":"error","name":"UnexpectedChainConfig","inputs":[]},{"type":"error","name":"UnexpectedConsensusVersion","inputs":[{"name":"expectedVersion","type":"uint256","internalType":"uint256"},{"name":"receivedVersion","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"UnexpectedContractVersion","inputs":[{"name":"expected","type":"uint256","internalType":"uint256"},{"name":"received","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"UnexpectedDataHash","inputs":[{"name":"consensusHash","type":"bytes32","internalType":"bytes32"},{"name":"receivedHash","type":"bytes32","internalType":"bytes32"}]},{"type":"error","name":"UnexpectedRefSlot","inputs":[{"name":"consensusRefSlot","type":"uint256","internalType":"uint256"},{"name":"dataRefSlot","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"VersionCannotBeSame","inputs":[]},{"type":"error","name":"VersionCannotBeZero","inputs":[]},{"type":"error","name":"ZeroAdminAddress","inputs":[]},{"type":"error","name":"ZeroFeeDistributorAddress","inputs":[]},{"type":"error","name":"ZeroPauseDuration","inputs":[]},{"type":"error","name":"ZeroStrikesAddress","inputs":[]}] diff --git a/interfaces/CSHashConsensus.json b/interfaces/CSHashConsensus.json new file mode 100644 index 000000000..bb18bbdca --- /dev/null +++ b/interfaces/CSHashConsensus.json @@ -0,0 +1 @@ +[{"type":"constructor","inputs":[{"name":"slotsPerEpoch","type":"uint256","internalType":"uint256"},{"name":"secondsPerSlot","type":"uint256","internalType":"uint256"},{"name":"genesisTime","type":"uint256","internalType":"uint256"},{"name":"epochsPerFrame","type":"uint256","internalType":"uint256"},{"name":"fastLaneLengthSlots","type":"uint256","internalType":"uint256"},{"name":"admin","type":"address","internalType":"address"},{"name":"reportProcessor","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"DEFAULT_ADMIN_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"DISABLE_CONSENSUS_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"MANAGE_FAST_LANE_CONFIG_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"MANAGE_FRAME_CONFIG_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"MANAGE_MEMBERS_AND_QUORUM_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"MANAGE_REPORT_PROCESSOR_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"addMember","inputs":[{"name":"addr","type":"address","internalType":"address"},{"name":"quorum","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"disableConsensus","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getChainConfig","inputs":[],"outputs":[{"name":"slotsPerEpoch","type":"uint256","internalType":"uint256"},{"name":"secondsPerSlot","type":"uint256","internalType":"uint256"},{"name":"genesisTime","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getConsensusState","inputs":[],"outputs":[{"name":"refSlot","type":"uint256","internalType":"uint256"},{"name":"consensusReport","type":"bytes32","internalType":"bytes32"},{"name":"isReportProcessing","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"getConsensusStateForMember","inputs":[{"name":"addr","type":"address","internalType":"address"}],"outputs":[{"name":"result","type":"tuple","internalType":"struct HashConsensus.MemberConsensusState","components":[{"name":"currentFrameRefSlot","type":"uint256","internalType":"uint256"},{"name":"currentFrameConsensusReport","type":"bytes32","internalType":"bytes32"},{"name":"isMember","type":"bool","internalType":"bool"},{"name":"isFastLane","type":"bool","internalType":"bool"},{"name":"canReport","type":"bool","internalType":"bool"},{"name":"lastMemberReportRefSlot","type":"uint256","internalType":"uint256"},{"name":"currentFrameMemberReport","type":"bytes32","internalType":"bytes32"}]}],"stateMutability":"view"},{"type":"function","name":"getCurrentFrame","inputs":[],"outputs":[{"name":"refSlot","type":"uint256","internalType":"uint256"},{"name":"reportProcessingDeadlineSlot","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getFastLaneMembers","inputs":[],"outputs":[{"name":"addresses","type":"address[]","internalType":"address[]"},{"name":"lastReportedRefSlots","type":"uint256[]","internalType":"uint256[]"}],"stateMutability":"view"},{"type":"function","name":"getFrameConfig","inputs":[],"outputs":[{"name":"initialEpoch","type":"uint256","internalType":"uint256"},{"name":"epochsPerFrame","type":"uint256","internalType":"uint256"},{"name":"fastLaneLengthSlots","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getInitialRefSlot","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getIsFastLaneMember","inputs":[{"name":"addr","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"getIsMember","inputs":[{"name":"addr","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"getMembers","inputs":[],"outputs":[{"name":"addresses","type":"address[]","internalType":"address[]"},{"name":"lastReportedRefSlots","type":"uint256[]","internalType":"uint256[]"}],"stateMutability":"view"},{"type":"function","name":"getQuorum","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getReportProcessor","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getReportVariants","inputs":[],"outputs":[{"name":"variants","type":"bytes32[]","internalType":"bytes32[]"},{"name":"support","type":"uint256[]","internalType":"uint256[]"}],"stateMutability":"view"},{"type":"function","name":"getRoleAdmin","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"getRoleMember","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"index","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRoleMemberCount","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"grantRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"hasRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"removeMember","inputs":[{"name":"addr","type":"address","internalType":"address"},{"name":"quorum","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"renounceRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"callerConfirmation","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"revokeRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setFastLaneLengthSlots","inputs":[{"name":"fastLaneLengthSlots","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setFrameConfig","inputs":[{"name":"epochsPerFrame","type":"uint256","internalType":"uint256"},{"name":"fastLaneLengthSlots","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setQuorum","inputs":[{"name":"quorum","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setReportProcessor","inputs":[{"name":"newProcessor","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"submitReport","inputs":[{"name":"slot","type":"uint256","internalType":"uint256"},{"name":"report","type":"bytes32","internalType":"bytes32"},{"name":"consensusVersion","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"updateInitialEpoch","inputs":[{"name":"initialEpoch","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"ConsensusLost","inputs":[{"name":"refSlot","type":"uint256","indexed":true,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"ConsensusReached","inputs":[{"name":"refSlot","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"report","type":"bytes32","indexed":false,"internalType":"bytes32"},{"name":"support","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FastLaneConfigSet","inputs":[{"name":"fastLaneLengthSlots","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FrameConfigSet","inputs":[{"name":"newInitialEpoch","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"newEpochsPerFrame","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Initialized","inputs":[{"name":"version","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"MemberAdded","inputs":[{"name":"addr","type":"address","indexed":true,"internalType":"address"},{"name":"newTotalMembers","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"newQuorum","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"MemberRemoved","inputs":[{"name":"addr","type":"address","indexed":true,"internalType":"address"},{"name":"newTotalMembers","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"newQuorum","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"QuorumSet","inputs":[{"name":"newQuorum","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"totalMembers","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"prevQuorum","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"ReportProcessorSet","inputs":[{"name":"processor","type":"address","indexed":true,"internalType":"address"},{"name":"prevProcessor","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"ReportReceived","inputs":[{"name":"refSlot","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"member","type":"address","indexed":true,"internalType":"address"},{"name":"report","type":"bytes32","indexed":false,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"RoleAdminChanged","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"previousAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"newAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"error","name":"AccessControlBadConfirmation","inputs":[]},{"type":"error","name":"AccessControlUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"neededRole","type":"bytes32","internalType":"bytes32"}]},{"type":"error","name":"AddressCannotBeZero","inputs":[]},{"type":"error","name":"AdminCannotBeZero","inputs":[]},{"type":"error","name":"ConsensusReportAlreadyProcessing","inputs":[]},{"type":"error","name":"DuplicateMember","inputs":[]},{"type":"error","name":"DuplicateReport","inputs":[]},{"type":"error","name":"EmptyReport","inputs":[]},{"type":"error","name":"EpochsPerFrameCannotBeZero","inputs":[]},{"type":"error","name":"FastLanePeriodCannotBeLongerThanFrame","inputs":[]},{"type":"error","name":"InitialEpochAlreadyArrived","inputs":[]},{"type":"error","name":"InitialEpochIsYetToArrive","inputs":[]},{"type":"error","name":"InitialEpochRefSlotCannotBeEarlierThanProcessingSlot","inputs":[]},{"type":"error","name":"InvalidChainConfig","inputs":[]},{"type":"error","name":"InvalidInitialization","inputs":[]},{"type":"error","name":"InvalidSlot","inputs":[]},{"type":"error","name":"NewProcessorCannotBeTheSame","inputs":[]},{"type":"error","name":"NonFastLaneMemberCannotReportWithinFastLaneInterval","inputs":[]},{"type":"error","name":"NonMember","inputs":[]},{"type":"error","name":"NotInitializing","inputs":[]},{"type":"error","name":"NumericOverflow","inputs":[]},{"type":"error","name":"QuorumTooSmall","inputs":[{"name":"minQuorum","type":"uint256","internalType":"uint256"},{"name":"receivedQuorum","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ReportProcessorCannotBeZero","inputs":[]},{"type":"error","name":"SafeCastOverflowedUintDowncast","inputs":[{"name":"bits","type":"uint8","internalType":"uint8"},{"name":"value","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"StaleReport","inputs":[]},{"type":"error","name":"UnexpectedConsensusVersion","inputs":[{"name":"expected","type":"uint256","internalType":"uint256"},{"name":"received","type":"uint256","internalType":"uint256"}]}] diff --git a/interfaces/CSModule.json b/interfaces/CSModule.json new file mode 100644 index 000000000..67ac8332a --- /dev/null +++ b/interfaces/CSModule.json @@ -0,0 +1 @@ +[{"type":"constructor","inputs":[{"name":"moduleType","type":"bytes32","internalType":"bytes32"},{"name":"lidoLocator","type":"address","internalType":"address"},{"name":"parametersRegistry","type":"address","internalType":"address"},{"name":"_accounting","type":"address","internalType":"address"},{"name":"exitPenalties","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"ACCOUNTING","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ICSAccounting"}],"stateMutability":"view"},{"type":"function","name":"CREATE_NODE_OPERATOR_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"DEFAULT_ADMIN_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"DEPOSIT_SIZE","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"EXIT_PENALTIES","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ICSExitPenalties"}],"stateMutability":"view"},{"type":"function","name":"LIDO_LOCATOR","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ILidoLocator"}],"stateMutability":"view"},{"type":"function","name":"PARAMETERS_REGISTRY","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ICSParametersRegistry"}],"stateMutability":"view"},{"type":"function","name":"PAUSE_INFINITELY","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"PAUSE_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"QUEUE_LEGACY_PRIORITY","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"QUEUE_LOWEST_PRIORITY","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"RECOVERER_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"REPORT_EL_REWARDS_STEALING_PENALTY_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"RESUME_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"SETTLE_EL_REWARDS_STEALING_PENALTY_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"STAKING_ROUTER_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"STETH","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IStETH"}],"stateMutability":"view"},{"type":"function","name":"VERIFIER_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"accounting","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ICSAccounting"}],"stateMutability":"view"},{"type":"function","name":"addValidatorKeysETH","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"keysCount","type":"uint256","internalType":"uint256"},{"name":"publicKeys","type":"bytes","internalType":"bytes"},{"name":"signatures","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"payable"},{"type":"function","name":"addValidatorKeysStETH","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"keysCount","type":"uint256","internalType":"uint256"},{"name":"publicKeys","type":"bytes","internalType":"bytes"},{"name":"signatures","type":"bytes","internalType":"bytes"},{"name":"permit","type":"tuple","internalType":"struct ICSAccounting.PermitInput","components":[{"name":"value","type":"uint256","internalType":"uint256"},{"name":"deadline","type":"uint256","internalType":"uint256"},{"name":"v","type":"uint8","internalType":"uint8"},{"name":"r","type":"bytes32","internalType":"bytes32"},{"name":"s","type":"bytes32","internalType":"bytes32"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"addValidatorKeysWstETH","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"keysCount","type":"uint256","internalType":"uint256"},{"name":"publicKeys","type":"bytes","internalType":"bytes"},{"name":"signatures","type":"bytes","internalType":"bytes"},{"name":"permit","type":"tuple","internalType":"struct ICSAccounting.PermitInput","components":[{"name":"value","type":"uint256","internalType":"uint256"},{"name":"deadline","type":"uint256","internalType":"uint256"},{"name":"v","type":"uint8","internalType":"uint8"},{"name":"r","type":"bytes32","internalType":"bytes32"},{"name":"s","type":"bytes32","internalType":"bytes32"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"cancelELRewardsStealingPenalty","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"changeNodeOperatorRewardAddress","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"newAddress","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"cleanDepositQueue","inputs":[{"name":"maxItems","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"removed","type":"uint256","internalType":"uint256"},{"name":"lastRemovedAtDepth","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"type":"function","name":"compensateELRewardsStealingPenalty","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"payable"},{"type":"function","name":"confirmNodeOperatorManagerAddressChange","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"confirmNodeOperatorRewardAddressChange","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"createNodeOperator","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"managementProperties","type":"tuple","internalType":"struct NodeOperatorManagementProperties","components":[{"name":"managerAddress","type":"address","internalType":"address"},{"name":"rewardAddress","type":"address","internalType":"address"},{"name":"extendedManagerPermissions","type":"bool","internalType":"bool"}]},{"name":"referrer","type":"address","internalType":"address"}],"outputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"type":"function","name":"decreaseVettedSigningKeysCount","inputs":[{"name":"nodeOperatorIds","type":"bytes","internalType":"bytes"},{"name":"vettedSigningKeysCounts","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"depositQueueItem","inputs":[{"name":"queuePriority","type":"uint256","internalType":"uint256"},{"name":"index","type":"uint128","internalType":"uint128"}],"outputs":[{"name":"","type":"uint256","internalType":"Batch"}],"stateMutability":"view"},{"type":"function","name":"depositQueuePointers","inputs":[{"name":"queuePriority","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"head","type":"uint128","internalType":"uint128"},{"name":"tail","type":"uint128","internalType":"uint128"}],"stateMutability":"view"},{"type":"function","name":"exitDeadlineThreshold","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"finalizeUpgradeV2","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getActiveNodeOperatorsCount","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getInitializedVersion","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"type":"function","name":"getNodeOperator","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"tuple","internalType":"struct NodeOperator","components":[{"name":"totalAddedKeys","type":"uint32","internalType":"uint32"},{"name":"totalWithdrawnKeys","type":"uint32","internalType":"uint32"},{"name":"totalDepositedKeys","type":"uint32","internalType":"uint32"},{"name":"totalVettedKeys","type":"uint32","internalType":"uint32"},{"name":"stuckValidatorsCount","type":"uint32","internalType":"uint32"},{"name":"depositableValidatorsCount","type":"uint32","internalType":"uint32"},{"name":"targetLimit","type":"uint32","internalType":"uint32"},{"name":"targetLimitMode","type":"uint8","internalType":"uint8"},{"name":"totalExitedKeys","type":"uint32","internalType":"uint32"},{"name":"enqueuedCount","type":"uint32","internalType":"uint32"},{"name":"managerAddress","type":"address","internalType":"address"},{"name":"proposedManagerAddress","type":"address","internalType":"address"},{"name":"rewardAddress","type":"address","internalType":"address"},{"name":"proposedRewardAddress","type":"address","internalType":"address"},{"name":"extendedManagerPermissions","type":"bool","internalType":"bool"},{"name":"usedPriorityQueue","type":"bool","internalType":"bool"}]}],"stateMutability":"view"},{"type":"function","name":"getNodeOperatorIds","inputs":[{"name":"offset","type":"uint256","internalType":"uint256"},{"name":"limit","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"nodeOperatorIds","type":"uint256[]","internalType":"uint256[]"}],"stateMutability":"view"},{"type":"function","name":"getNodeOperatorIsActive","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"getNodeOperatorManagementProperties","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"tuple","internalType":"struct NodeOperatorManagementProperties","components":[{"name":"managerAddress","type":"address","internalType":"address"},{"name":"rewardAddress","type":"address","internalType":"address"},{"name":"extendedManagerPermissions","type":"bool","internalType":"bool"}]}],"stateMutability":"view"},{"type":"function","name":"getNodeOperatorNonWithdrawnKeys","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getNodeOperatorSummary","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"targetLimitMode","type":"uint256","internalType":"uint256"},{"name":"targetValidatorsCount","type":"uint256","internalType":"uint256"},{"name":"stuckValidatorsCount","type":"uint256","internalType":"uint256"},{"name":"refundedValidatorsCount","type":"uint256","internalType":"uint256"},{"name":"stuckPenaltyEndTimestamp","type":"uint256","internalType":"uint256"},{"name":"totalExitedValidators","type":"uint256","internalType":"uint256"},{"name":"totalDepositedValidators","type":"uint256","internalType":"uint256"},{"name":"depositableValidatorsCount","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getNodeOperatorTotalDepositedKeys","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"totalDepositedKeys","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getNodeOperatorsCount","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getNonce","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getResumeSinceTimestamp","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getRoleAdmin","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"getRoleMember","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"index","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRoleMemberCount","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getSigningKeys","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"startIndex","type":"uint256","internalType":"uint256"},{"name":"keysCount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"type":"function","name":"getSigningKeysWithSignatures","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"startIndex","type":"uint256","internalType":"uint256"},{"name":"keysCount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"keys","type":"bytes","internalType":"bytes"},{"name":"signatures","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"type":"function","name":"getStakingModuleSummary","inputs":[],"outputs":[{"name":"totalExitedValidators","type":"uint256","internalType":"uint256"},{"name":"totalDepositedValidators","type":"uint256","internalType":"uint256"},{"name":"depositableValidatorsCount","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getType","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"grantRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"hasRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"initialize","inputs":[{"name":"admin","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"isPaused","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isValidatorExitDelayPenaltyApplicable","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"","type":"uint256","internalType":"uint256"},{"name":"publicKey","type":"bytes","internalType":"bytes"},{"name":"eligibleToExitInSec","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isValidatorWithdrawn","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"keyIndex","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"legacyQueue","inputs":[],"outputs":[{"name":"head","type":"uint128","internalType":"uint128"},{"name":"tail","type":"uint128","internalType":"uint128"}],"stateMutability":"view"},{"type":"function","name":"migrateToPriorityQueue","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"obtainDepositData","inputs":[{"name":"depositsCount","type":"uint256","internalType":"uint256"},{"name":"","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"publicKeys","type":"bytes","internalType":"bytes"},{"name":"signatures","type":"bytes","internalType":"bytes"}],"stateMutability":"nonpayable"},{"type":"function","name":"onExitedAndStuckValidatorsCountsUpdated","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"onRewardsMinted","inputs":[{"name":"totalShares","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"onValidatorExitTriggered","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"publicKey","type":"bytes","internalType":"bytes"},{"name":"withdrawalRequestPaidFee","type":"uint256","internalType":"uint256"},{"name":"exitType","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"onWithdrawalCredentialsChanged","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"pauseFor","inputs":[{"name":"duration","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"proposeNodeOperatorManagerAddressChange","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"proposedAddress","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"proposeNodeOperatorRewardAddressChange","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"proposedAddress","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"recoverERC1155","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"recoverERC20","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"recoverERC721","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"recoverEther","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"removeKeys","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"startIndex","type":"uint256","internalType":"uint256"},{"name":"keysCount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"renounceRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"callerConfirmation","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"reportELRewardsStealingPenalty","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"blockHash","type":"bytes32","internalType":"bytes32"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"reportValidatorExitDelay","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"","type":"uint256","internalType":"uint256"},{"name":"publicKey","type":"bytes","internalType":"bytes"},{"name":"eligibleToExitInSec","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"resetNodeOperatorManagerAddress","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"resume","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"revokeRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"settleELRewardsStealingPenalty","inputs":[{"name":"nodeOperatorIds","type":"uint256[]","internalType":"uint256[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"submitWithdrawals","inputs":[{"name":"withdrawalsInfo","type":"tuple[]","internalType":"struct ValidatorWithdrawalInfo[]","components":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"keyIndex","type":"uint256","internalType":"uint256"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"isSlashed","type":"bool","internalType":"bool"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"unsafeUpdateValidatorsCount","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"exitedValidatorsKeysCount","type":"uint256","internalType":"uint256"},{"name":"stuckValidatorsKeysCount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"updateDepositableValidatorsCount","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"updateExitedValidatorsCount","inputs":[{"name":"nodeOperatorIds","type":"bytes","internalType":"bytes"},{"name":"exitedValidatorsCounts","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"updateTargetValidatorsLimits","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"targetLimitMode","type":"uint256","internalType":"uint256"},{"name":"targetLimit","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"BatchEnqueued","inputs":[{"name":"queuePriority","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"count","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"DelayedValidatorExitPenalized","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"penaltyValue","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"DepositableSigningKeysCountChanged","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"depositableKeysCount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"DepositedSigningKeysCountChanged","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"depositedKeysCount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"ELRewardsStealingPenaltyCancelled","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"ELRewardsStealingPenaltyCompensated","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"ELRewardsStealingPenaltyReported","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"proposedBlockHash","type":"bytes32","indexed":false,"internalType":"bytes32"},{"name":"stolenAmount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"ELRewardsStealingPenaltySettled","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"ERC1155Recovered","inputs":[{"name":"token","type":"address","indexed":true,"internalType":"address"},{"name":"tokenId","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"recipient","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"ERC20Recovered","inputs":[{"name":"token","type":"address","indexed":true,"internalType":"address"},{"name":"recipient","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"ERC721Recovered","inputs":[{"name":"token","type":"address","indexed":true,"internalType":"address"},{"name":"tokenId","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"recipient","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"EtherRecovered","inputs":[{"name":"recipient","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"ExitedSigningKeysCountChanged","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"exitedKeysCount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Initialized","inputs":[{"name":"version","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"KeyRemovalChargeApplied","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"NodeOperatorAdded","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"managerAddress","type":"address","indexed":true,"internalType":"address"},{"name":"rewardAddress","type":"address","indexed":true,"internalType":"address"},{"name":"extendedManagerPermissions","type":"bool","indexed":false,"internalType":"bool"}],"anonymous":false},{"type":"event","name":"NodeOperatorManagerAddressChangeProposed","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"oldProposedAddress","type":"address","indexed":true,"internalType":"address"},{"name":"newProposedAddress","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"NodeOperatorManagerAddressChanged","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"oldAddress","type":"address","indexed":true,"internalType":"address"},{"name":"newAddress","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"NodeOperatorRewardAddressChangeProposed","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"oldProposedAddress","type":"address","indexed":true,"internalType":"address"},{"name":"newProposedAddress","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"NodeOperatorRewardAddressChanged","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"oldAddress","type":"address","indexed":true,"internalType":"address"},{"name":"newAddress","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"NonceChanged","inputs":[{"name":"nonce","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Paused","inputs":[{"name":"duration","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"ReferrerSet","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"referrer","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"Resumed","inputs":[],"anonymous":false},{"type":"event","name":"RoleAdminChanged","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"previousAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"newAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"SigningKeyAdded","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"pubkey","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"SigningKeyRemoved","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"pubkey","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"StETHSharesRecovered","inputs":[{"name":"recipient","type":"address","indexed":true,"internalType":"address"},{"name":"shares","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"TargetValidatorsCountChanged","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"targetLimitMode","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"targetValidatorsCount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"TotalSigningKeysCountChanged","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"totalKeysCount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"VettedSigningKeysCountChanged","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"vettedKeysCount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"VettedSigningKeysCountDecreased","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"WithdrawalSubmitted","inputs":[{"name":"nodeOperatorId","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"keyIndex","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"pubkey","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"error","name":"AccessControlBadConfirmation","inputs":[]},{"type":"error","name":"AccessControlUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"neededRole","type":"bytes32","internalType":"bytes32"}]},{"type":"error","name":"AlreadyProposed","inputs":[]},{"type":"error","name":"AlreadyWithdrawn","inputs":[]},{"type":"error","name":"CannotAddKeys","inputs":[]},{"type":"error","name":"EmptyKey","inputs":[]},{"type":"error","name":"ExitedKeysDecrease","inputs":[]},{"type":"error","name":"ExitedKeysHigherThanTotalDeposited","inputs":[]},{"type":"error","name":"FailedToSendEther","inputs":[]},{"type":"error","name":"InvalidAmount","inputs":[]},{"type":"error","name":"InvalidInitialization","inputs":[]},{"type":"error","name":"InvalidInput","inputs":[]},{"type":"error","name":"InvalidKeysCount","inputs":[]},{"type":"error","name":"InvalidLength","inputs":[]},{"type":"error","name":"InvalidReportData","inputs":[]},{"type":"error","name":"InvalidVetKeysPointer","inputs":[]},{"type":"error","name":"KeysLimitExceeded","inputs":[]},{"type":"error","name":"MethodCallIsNotAllowed","inputs":[]},{"type":"error","name":"NodeOperatorDoesNotExist","inputs":[]},{"type":"error","name":"NotAllowedToRecover","inputs":[]},{"type":"error","name":"NotEnoughKeys","inputs":[]},{"type":"error","name":"NotInitializing","inputs":[]},{"type":"error","name":"PauseUntilMustBeInFuture","inputs":[]},{"type":"error","name":"PausedExpected","inputs":[]},{"type":"error","name":"PriorityQueueAlreadyUsed","inputs":[]},{"type":"error","name":"QueueIsEmpty","inputs":[]},{"type":"error","name":"QueueLookupNoLimit","inputs":[]},{"type":"error","name":"ResumedExpected","inputs":[]},{"type":"error","name":"SameAddress","inputs":[]},{"type":"error","name":"SenderIsNotEligible","inputs":[]},{"type":"error","name":"SenderIsNotManagerAddress","inputs":[]},{"type":"error","name":"SenderIsNotProposedAddress","inputs":[]},{"type":"error","name":"SenderIsNotRewardAddress","inputs":[]},{"type":"error","name":"SigningKeysInvalidOffset","inputs":[]},{"type":"error","name":"ZeroAccountingAddress","inputs":[]},{"type":"error","name":"ZeroAdminAddress","inputs":[]},{"type":"error","name":"ZeroExitPenaltiesAddress","inputs":[]},{"type":"error","name":"ZeroLocatorAddress","inputs":[]},{"type":"error","name":"ZeroParametersRegistryAddress","inputs":[]},{"type":"error","name":"ZeroPauseDuration","inputs":[]},{"type":"error","name":"ZeroRewardAddress","inputs":[]},{"type":"error","name":"ZeroSenderAddress","inputs":[]}] diff --git a/interfaces/CSPermissionlessGate.json b/interfaces/CSPermissionlessGate.json new file mode 100644 index 000000000..bda444b61 --- /dev/null +++ b/interfaces/CSPermissionlessGate.json @@ -0,0 +1 @@ +[{"type":"constructor","inputs":[{"name":"module","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"CURVE_ID","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"MODULE","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ICSModule"}],"stateMutability":"view"},{"type":"function","name":"addNodeOperatorETH","inputs":[{"name":"keysCount","type":"uint256","internalType":"uint256"},{"name":"publicKeys","type":"bytes","internalType":"bytes"},{"name":"signatures","type":"bytes","internalType":"bytes"},{"name":"managementProperties","type":"tuple","internalType":"struct NodeOperatorManagementProperties","components":[{"name":"managerAddress","type":"address","internalType":"address"},{"name":"rewardAddress","type":"address","internalType":"address"},{"name":"extendedManagerPermissions","type":"bool","internalType":"bool"}]},{"name":"referrer","type":"address","internalType":"address"}],"outputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"stateMutability":"payable"},{"type":"function","name":"addNodeOperatorStETH","inputs":[{"name":"keysCount","type":"uint256","internalType":"uint256"},{"name":"publicKeys","type":"bytes","internalType":"bytes"},{"name":"signatures","type":"bytes","internalType":"bytes"},{"name":"managementProperties","type":"tuple","internalType":"struct NodeOperatorManagementProperties","components":[{"name":"managerAddress","type":"address","internalType":"address"},{"name":"rewardAddress","type":"address","internalType":"address"},{"name":"extendedManagerPermissions","type":"bool","internalType":"bool"}]},{"name":"permit","type":"tuple","internalType":"struct ICSAccounting.PermitInput","components":[{"name":"value","type":"uint256","internalType":"uint256"},{"name":"deadline","type":"uint256","internalType":"uint256"},{"name":"v","type":"uint8","internalType":"uint8"},{"name":"r","type":"bytes32","internalType":"bytes32"},{"name":"s","type":"bytes32","internalType":"bytes32"}]},{"name":"referrer","type":"address","internalType":"address"}],"outputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"type":"function","name":"addNodeOperatorWstETH","inputs":[{"name":"keysCount","type":"uint256","internalType":"uint256"},{"name":"publicKeys","type":"bytes","internalType":"bytes"},{"name":"signatures","type":"bytes","internalType":"bytes"},{"name":"managementProperties","type":"tuple","internalType":"struct NodeOperatorManagementProperties","components":[{"name":"managerAddress","type":"address","internalType":"address"},{"name":"rewardAddress","type":"address","internalType":"address"},{"name":"extendedManagerPermissions","type":"bool","internalType":"bool"}]},{"name":"permit","type":"tuple","internalType":"struct ICSAccounting.PermitInput","components":[{"name":"value","type":"uint256","internalType":"uint256"},{"name":"deadline","type":"uint256","internalType":"uint256"},{"name":"v","type":"uint8","internalType":"uint8"},{"name":"r","type":"bytes32","internalType":"bytes32"},{"name":"s","type":"bytes32","internalType":"bytes32"}]},{"name":"referrer","type":"address","internalType":"address"}],"outputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"type":"error","name":"ZeroModuleAddress","inputs":[]}] diff --git a/interfaces/CSStrikes.json b/interfaces/CSStrikes.json new file mode 100644 index 000000000..6ccc28dd3 --- /dev/null +++ b/interfaces/CSStrikes.json @@ -0,0 +1 @@ +[{"type":"constructor","inputs":[{"name":"module","type":"address","internalType":"address"},{"name":"oracle","type":"address","internalType":"address"},{"name":"exitPenalties","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"ACCOUNTING","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ICSAccounting"}],"stateMutability":"view"},{"type":"function","name":"DEFAULT_ADMIN_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"EXIT_PENALTIES","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ICSExitPenalties"}],"stateMutability":"view"},{"type":"function","name":"MODULE","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ICSModule"}],"stateMutability":"view"},{"type":"function","name":"ORACLE","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"PARAMETERS_REGISTRY","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ICSParametersRegistry"}],"stateMutability":"view"},{"type":"function","name":"ejector","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ICSEjector"}],"stateMutability":"view"},{"type":"function","name":"getInitializedVersion","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"type":"function","name":"getRoleAdmin","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"getRoleMember","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"index","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRoleMemberCount","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"grantRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"hasRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"hashLeaf","inputs":[{"name":"keyStrikes","type":"tuple","internalType":"struct ICSStrikes.ModuleKeyStrikes","components":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"keyIndex","type":"uint256","internalType":"uint256"},{"name":"data","type":"uint256[]","internalType":"uint256[]"}]},{"name":"pubkey","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"pure"},{"type":"function","name":"initialize","inputs":[{"name":"admin","type":"address","internalType":"address"},{"name":"_ejector","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"processBadPerformanceProof","inputs":[{"name":"keyStrikesList","type":"tuple[]","internalType":"struct ICSStrikes.ModuleKeyStrikes[]","components":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"keyIndex","type":"uint256","internalType":"uint256"},{"name":"data","type":"uint256[]","internalType":"uint256[]"}]},{"name":"proof","type":"bytes32[]","internalType":"bytes32[]"},{"name":"proofFlags","type":"bool[]","internalType":"bool[]"},{"name":"refundRecipient","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"processOracleReport","inputs":[{"name":"_treeRoot","type":"bytes32","internalType":"bytes32"},{"name":"_treeCid","type":"string","internalType":"string"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"renounceRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"callerConfirmation","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"revokeRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setEjector","inputs":[{"name":"_ejector","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"treeCid","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"treeRoot","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"verifyProof","inputs":[{"name":"keyStrikesList","type":"tuple[]","internalType":"struct ICSStrikes.ModuleKeyStrikes[]","components":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"keyIndex","type":"uint256","internalType":"uint256"},{"name":"data","type":"uint256[]","internalType":"uint256[]"}]},{"name":"pubkeys","type":"bytes[]","internalType":"bytes[]"},{"name":"proof","type":"bytes32[]","internalType":"bytes32[]"},{"name":"proofFlags","type":"bool[]","internalType":"bool[]"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"event","name":"EjectorSet","inputs":[{"name":"ejector","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"Initialized","inputs":[{"name":"version","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"RoleAdminChanged","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"previousAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"newAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"StrikesDataUpdated","inputs":[{"name":"treeRoot","type":"bytes32","indexed":false,"internalType":"bytes32"},{"name":"treeCid","type":"string","indexed":false,"internalType":"string"}],"anonymous":false},{"type":"event","name":"StrikesDataWiped","inputs":[],"anonymous":false},{"type":"error","name":"AccessControlBadConfirmation","inputs":[]},{"type":"error","name":"AccessControlUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"neededRole","type":"bytes32","internalType":"bytes32"}]},{"type":"error","name":"InvalidInitialization","inputs":[]},{"type":"error","name":"InvalidProof","inputs":[]},{"type":"error","name":"InvalidReportData","inputs":[]},{"type":"error","name":"MerkleProofInvalidMultiproof","inputs":[]},{"type":"error","name":"NotEnoughStrikesToEject","inputs":[]},{"type":"error","name":"NotInitializing","inputs":[]},{"type":"error","name":"NotOracle","inputs":[]},{"type":"error","name":"ZeroAdminAddress","inputs":[]},{"type":"error","name":"ZeroBadPerformancePenaltyAmount","inputs":[]},{"type":"error","name":"ZeroEjectionFeeAmount","inputs":[]},{"type":"error","name":"ZeroEjectorAddress","inputs":[]},{"type":"error","name":"ZeroExitPenaltiesAddress","inputs":[]},{"type":"error","name":"ZeroModuleAddress","inputs":[]},{"type":"error","name":"ZeroOracleAddress","inputs":[]}] diff --git a/interfaces/csm/CSVerifier.json b/interfaces/CSVerifier.json similarity index 100% rename from interfaces/csm/CSVerifier.json rename to interfaces/CSVerifier.json diff --git a/interfaces/CSVerifierV2.json b/interfaces/CSVerifierV2.json new file mode 100644 index 000000000..267204b21 --- /dev/null +++ b/interfaces/CSVerifierV2.json @@ -0,0 +1 @@ +[{"type":"constructor","inputs":[{"name":"withdrawalAddress","type":"address","internalType":"address"},{"name":"module","type":"address","internalType":"address"},{"name":"slotsPerEpoch","type":"uint64","internalType":"uint64"},{"name":"gindices","type":"tuple","internalType":"struct ICSVerifier.GIndices","components":[{"name":"gIFirstWithdrawalPrev","type":"bytes32","internalType":"GIndex"},{"name":"gIFirstWithdrawalCurr","type":"bytes32","internalType":"GIndex"},{"name":"gIFirstValidatorPrev","type":"bytes32","internalType":"GIndex"},{"name":"gIFirstValidatorCurr","type":"bytes32","internalType":"GIndex"},{"name":"gIHistoricalSummariesPrev","type":"bytes32","internalType":"GIndex"},{"name":"gIHistoricalSummariesCurr","type":"bytes32","internalType":"GIndex"}]},{"name":"firstSupportedSlot","type":"uint64","internalType":"Slot"},{"name":"pivotSlot","type":"uint64","internalType":"Slot"},{"name":"admin","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"BEACON_ROOTS","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"DEFAULT_ADMIN_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"FIRST_SUPPORTED_SLOT","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"Slot"}],"stateMutability":"view"},{"type":"function","name":"GI_FIRST_VALIDATOR_CURR","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"GIndex"}],"stateMutability":"view"},{"type":"function","name":"GI_FIRST_VALIDATOR_PREV","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"GIndex"}],"stateMutability":"view"},{"type":"function","name":"GI_FIRST_WITHDRAWAL_CURR","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"GIndex"}],"stateMutability":"view"},{"type":"function","name":"GI_FIRST_WITHDRAWAL_PREV","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"GIndex"}],"stateMutability":"view"},{"type":"function","name":"GI_HISTORICAL_SUMMARIES_CURR","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"GIndex"}],"stateMutability":"view"},{"type":"function","name":"GI_HISTORICAL_SUMMARIES_PREV","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"GIndex"}],"stateMutability":"view"},{"type":"function","name":"MODULE","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ICSModule"}],"stateMutability":"view"},{"type":"function","name":"PAUSE_INFINITELY","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"PAUSE_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"PIVOT_SLOT","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"Slot"}],"stateMutability":"view"},{"type":"function","name":"RESUME_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"SLOTS_PER_EPOCH","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"type":"function","name":"WITHDRAWAL_ADDRESS","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getResumeSinceTimestamp","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getRoleAdmin","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"getRoleMember","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"index","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRoleMemberCount","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"grantRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"hasRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isPaused","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"pauseFor","inputs":[{"name":"duration","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"processHistoricalWithdrawalProof","inputs":[{"name":"beaconBlock","type":"tuple","internalType":"struct ICSVerifier.ProvableBeaconBlockHeader","components":[{"name":"header","type":"tuple","internalType":"struct BeaconBlockHeader","components":[{"name":"slot","type":"uint64","internalType":"Slot"},{"name":"proposerIndex","type":"uint64","internalType":"uint64"},{"name":"parentRoot","type":"bytes32","internalType":"bytes32"},{"name":"stateRoot","type":"bytes32","internalType":"bytes32"},{"name":"bodyRoot","type":"bytes32","internalType":"bytes32"}]},{"name":"rootsTimestamp","type":"uint64","internalType":"uint64"}]},{"name":"oldBlock","type":"tuple","internalType":"struct ICSVerifier.HistoricalHeaderWitness","components":[{"name":"header","type":"tuple","internalType":"struct BeaconBlockHeader","components":[{"name":"slot","type":"uint64","internalType":"Slot"},{"name":"proposerIndex","type":"uint64","internalType":"uint64"},{"name":"parentRoot","type":"bytes32","internalType":"bytes32"},{"name":"stateRoot","type":"bytes32","internalType":"bytes32"},{"name":"bodyRoot","type":"bytes32","internalType":"bytes32"}]},{"name":"rootGIndex","type":"bytes32","internalType":"GIndex"},{"name":"proof","type":"bytes32[]","internalType":"bytes32[]"}]},{"name":"witness","type":"tuple","internalType":"struct ICSVerifier.WithdrawalWitness","components":[{"name":"withdrawalOffset","type":"uint8","internalType":"uint8"},{"name":"withdrawalIndex","type":"uint64","internalType":"uint64"},{"name":"validatorIndex","type":"uint64","internalType":"uint64"},{"name":"amount","type":"uint64","internalType":"uint64"},{"name":"withdrawalCredentials","type":"bytes32","internalType":"bytes32"},{"name":"effectiveBalance","type":"uint64","internalType":"uint64"},{"name":"slashed","type":"bool","internalType":"bool"},{"name":"activationEligibilityEpoch","type":"uint64","internalType":"uint64"},{"name":"activationEpoch","type":"uint64","internalType":"uint64"},{"name":"exitEpoch","type":"uint64","internalType":"uint64"},{"name":"withdrawableEpoch","type":"uint64","internalType":"uint64"},{"name":"withdrawalProof","type":"bytes32[]","internalType":"bytes32[]"},{"name":"validatorProof","type":"bytes32[]","internalType":"bytes32[]"}]},{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"keyIndex","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"processWithdrawalProof","inputs":[{"name":"beaconBlock","type":"tuple","internalType":"struct ICSVerifier.ProvableBeaconBlockHeader","components":[{"name":"header","type":"tuple","internalType":"struct BeaconBlockHeader","components":[{"name":"slot","type":"uint64","internalType":"Slot"},{"name":"proposerIndex","type":"uint64","internalType":"uint64"},{"name":"parentRoot","type":"bytes32","internalType":"bytes32"},{"name":"stateRoot","type":"bytes32","internalType":"bytes32"},{"name":"bodyRoot","type":"bytes32","internalType":"bytes32"}]},{"name":"rootsTimestamp","type":"uint64","internalType":"uint64"}]},{"name":"witness","type":"tuple","internalType":"struct ICSVerifier.WithdrawalWitness","components":[{"name":"withdrawalOffset","type":"uint8","internalType":"uint8"},{"name":"withdrawalIndex","type":"uint64","internalType":"uint64"},{"name":"validatorIndex","type":"uint64","internalType":"uint64"},{"name":"amount","type":"uint64","internalType":"uint64"},{"name":"withdrawalCredentials","type":"bytes32","internalType":"bytes32"},{"name":"effectiveBalance","type":"uint64","internalType":"uint64"},{"name":"slashed","type":"bool","internalType":"bool"},{"name":"activationEligibilityEpoch","type":"uint64","internalType":"uint64"},{"name":"activationEpoch","type":"uint64","internalType":"uint64"},{"name":"exitEpoch","type":"uint64","internalType":"uint64"},{"name":"withdrawableEpoch","type":"uint64","internalType":"uint64"},{"name":"withdrawalProof","type":"bytes32[]","internalType":"bytes32[]"},{"name":"validatorProof","type":"bytes32[]","internalType":"bytes32[]"}]},{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"keyIndex","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"renounceRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"callerConfirmation","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"resume","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"revokeRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"event","name":"Paused","inputs":[{"name":"duration","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Resumed","inputs":[],"anonymous":false},{"type":"event","name":"RoleAdminChanged","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"previousAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"newAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"error","name":"AccessControlBadConfirmation","inputs":[]},{"type":"error","name":"AccessControlUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"neededRole","type":"bytes32","internalType":"bytes32"}]},{"type":"error","name":"IndexOutOfRange","inputs":[]},{"type":"error","name":"InvalidBlockHeader","inputs":[]},{"type":"error","name":"InvalidChainConfig","inputs":[]},{"type":"error","name":"InvalidGIndex","inputs":[]},{"type":"error","name":"InvalidPivotSlot","inputs":[]},{"type":"error","name":"InvalidWithdrawalAddress","inputs":[]},{"type":"error","name":"PartialWithdrawal","inputs":[]},{"type":"error","name":"PauseUntilMustBeInFuture","inputs":[]},{"type":"error","name":"PausedExpected","inputs":[]},{"type":"error","name":"ResumedExpected","inputs":[]},{"type":"error","name":"RootNotFound","inputs":[]},{"type":"error","name":"UnsupportedSlot","inputs":[{"name":"slot","type":"uint64","internalType":"Slot"}]},{"type":"error","name":"ValidatorNotWithdrawn","inputs":[]},{"type":"error","name":"ZeroAdminAddress","inputs":[]},{"type":"error","name":"ZeroModuleAddress","inputs":[]},{"type":"error","name":"ZeroPauseDuration","inputs":[]},{"type":"error","name":"ZeroWithdrawalAddress","inputs":[]}] diff --git a/interfaces/CSVettedGate.json b/interfaces/CSVettedGate.json new file mode 100644 index 000000000..5c966b2ae --- /dev/null +++ b/interfaces/CSVettedGate.json @@ -0,0 +1 @@ +[{"type":"constructor","inputs":[{"name":"module","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"ACCOUNTING","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ICSAccounting"}],"stateMutability":"view"},{"type":"function","name":"DEFAULT_ADMIN_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"END_REFERRAL_SEASON_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"MODULE","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ICSModule"}],"stateMutability":"view"},{"type":"function","name":"PAUSE_INFINITELY","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"PAUSE_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"RESUME_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"SET_TREE_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"START_REFERRAL_SEASON_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"addNodeOperatorETH","inputs":[{"name":"keysCount","type":"uint256","internalType":"uint256"},{"name":"publicKeys","type":"bytes","internalType":"bytes"},{"name":"signatures","type":"bytes","internalType":"bytes"},{"name":"managementProperties","type":"tuple","internalType":"struct NodeOperatorManagementProperties","components":[{"name":"managerAddress","type":"address","internalType":"address"},{"name":"rewardAddress","type":"address","internalType":"address"},{"name":"extendedManagerPermissions","type":"bool","internalType":"bool"}]},{"name":"proof","type":"bytes32[]","internalType":"bytes32[]"},{"name":"referrer","type":"address","internalType":"address"}],"outputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"stateMutability":"payable"},{"type":"function","name":"addNodeOperatorStETH","inputs":[{"name":"keysCount","type":"uint256","internalType":"uint256"},{"name":"publicKeys","type":"bytes","internalType":"bytes"},{"name":"signatures","type":"bytes","internalType":"bytes"},{"name":"managementProperties","type":"tuple","internalType":"struct NodeOperatorManagementProperties","components":[{"name":"managerAddress","type":"address","internalType":"address"},{"name":"rewardAddress","type":"address","internalType":"address"},{"name":"extendedManagerPermissions","type":"bool","internalType":"bool"}]},{"name":"permit","type":"tuple","internalType":"struct ICSAccounting.PermitInput","components":[{"name":"value","type":"uint256","internalType":"uint256"},{"name":"deadline","type":"uint256","internalType":"uint256"},{"name":"v","type":"uint8","internalType":"uint8"},{"name":"r","type":"bytes32","internalType":"bytes32"},{"name":"s","type":"bytes32","internalType":"bytes32"}]},{"name":"proof","type":"bytes32[]","internalType":"bytes32[]"},{"name":"referrer","type":"address","internalType":"address"}],"outputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"type":"function","name":"addNodeOperatorWstETH","inputs":[{"name":"keysCount","type":"uint256","internalType":"uint256"},{"name":"publicKeys","type":"bytes","internalType":"bytes"},{"name":"signatures","type":"bytes","internalType":"bytes"},{"name":"managementProperties","type":"tuple","internalType":"struct NodeOperatorManagementProperties","components":[{"name":"managerAddress","type":"address","internalType":"address"},{"name":"rewardAddress","type":"address","internalType":"address"},{"name":"extendedManagerPermissions","type":"bool","internalType":"bool"}]},{"name":"permit","type":"tuple","internalType":"struct ICSAccounting.PermitInput","components":[{"name":"value","type":"uint256","internalType":"uint256"},{"name":"deadline","type":"uint256","internalType":"uint256"},{"name":"v","type":"uint8","internalType":"uint8"},{"name":"r","type":"bytes32","internalType":"bytes32"},{"name":"s","type":"bytes32","internalType":"bytes32"}]},{"name":"proof","type":"bytes32[]","internalType":"bytes32[]"},{"name":"referrer","type":"address","internalType":"address"}],"outputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"type":"function","name":"claimBondCurve","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"proof","type":"bytes32[]","internalType":"bytes32[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"claimReferrerBondCurve","inputs":[{"name":"nodeOperatorId","type":"uint256","internalType":"uint256"},{"name":"proof","type":"bytes32[]","internalType":"bytes32[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"curveId","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"endCurrentReferralProgramSeason","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getInitializedVersion","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"type":"function","name":"getReferralsCount","inputs":[{"name":"referrer","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getResumeSinceTimestamp","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getRoleAdmin","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"getRoleMember","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"index","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRoleMemberCount","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"grantRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"hasRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"hashLeaf","inputs":[{"name":"member","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"pure"},{"type":"function","name":"initialize","inputs":[{"name":"_curveId","type":"uint256","internalType":"uint256"},{"name":"_treeRoot","type":"bytes32","internalType":"bytes32"},{"name":"_treeCid","type":"string","internalType":"string"},{"name":"admin","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"isConsumed","inputs":[{"name":"member","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isPaused","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isReferralProgramSeasonActive","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isReferrerConsumed","inputs":[{"name":"referrer","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"pauseFor","inputs":[{"name":"duration","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"referralCounts","inputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"referralCurveId","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"referralProgramSeasonNumber","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"referralsThreshold","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"renounceRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"callerConfirmation","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"resume","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"revokeRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setTreeParams","inputs":[{"name":"_treeRoot","type":"bytes32","internalType":"bytes32"},{"name":"_treeCid","type":"string","internalType":"string"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"startNewReferralProgramSeason","inputs":[{"name":"_referralCurveId","type":"uint256","internalType":"uint256"},{"name":"_referralsThreshold","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"treeCid","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"treeRoot","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"verifyProof","inputs":[{"name":"member","type":"address","internalType":"address"},{"name":"proof","type":"bytes32[]","internalType":"bytes32[]"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"event","name":"Consumed","inputs":[{"name":"member","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"Initialized","inputs":[{"name":"version","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"Paused","inputs":[{"name":"duration","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"ReferralProgramSeasonEnded","inputs":[{"name":"season","type":"uint256","indexed":true,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"ReferralProgramSeasonStarted","inputs":[{"name":"season","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"referralCurveId","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"referralsThreshold","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"ReferrerConsumed","inputs":[{"name":"referrer","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"Resumed","inputs":[],"anonymous":false},{"type":"event","name":"RoleAdminChanged","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"previousAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"newAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"TreeSet","inputs":[{"name":"treeRoot","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"treeCid","type":"string","indexed":false,"internalType":"string"}],"anonymous":false},{"type":"error","name":"AccessControlBadConfirmation","inputs":[]},{"type":"error","name":"AccessControlUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"neededRole","type":"bytes32","internalType":"bytes32"}]},{"type":"error","name":"AlreadyConsumed","inputs":[]},{"type":"error","name":"InvalidCurveId","inputs":[]},{"type":"error","name":"InvalidInitialization","inputs":[]},{"type":"error","name":"InvalidProof","inputs":[]},{"type":"error","name":"InvalidReferralsThreshold","inputs":[]},{"type":"error","name":"InvalidTreeCid","inputs":[]},{"type":"error","name":"InvalidTreeRoot","inputs":[]},{"type":"error","name":"NotAllowedToClaim","inputs":[]},{"type":"error","name":"NotEnoughReferrals","inputs":[]},{"type":"error","name":"NotInitializing","inputs":[]},{"type":"error","name":"PauseUntilMustBeInFuture","inputs":[]},{"type":"error","name":"PausedExpected","inputs":[]},{"type":"error","name":"ReferralProgramIsActive","inputs":[]},{"type":"error","name":"ReferralProgramIsNotActive","inputs":[]},{"type":"error","name":"ResumedExpected","inputs":[]},{"type":"error","name":"ZeroAdminAddress","inputs":[]},{"type":"error","name":"ZeroModuleAddress","inputs":[]},{"type":"error","name":"ZeroPauseDuration","inputs":[]}] diff --git a/interfaces/NodeOperatorsRegistry.json b/interfaces/NodeOperatorsRegistry.json index 4e15f855d..835d9c9fa 100644 --- a/interfaces/NodeOperatorsRegistry.json +++ b/interfaces/NodeOperatorsRegistry.json @@ -79,15 +79,15 @@ "constant": true, "inputs": [ { - "name": "_script", - "type": "bytes" + "name": "", + "type": "uint256" } ], - "name": "getEVMScriptExecutor", + "name": "exitDeadlineThreshold", "outputs": [ { "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -95,22 +95,22 @@ "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "name": "_nodeOperatorId", - "type": "uint256" + "name": "_script", + "type": "bytes" } ], - "name": "clearNodeOperatorPenalty", + "name": "getEVMScriptExecutor", "outputs": [ { "name": "", - "type": "bool" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { @@ -150,6 +150,32 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "name": "_nodeOperatorId", + "type": "uint256" + }, + { + "name": "_proofSlotTimestamp", + "type": "uint256" + }, + { + "name": "_publicKey", + "type": "bytes" + }, + { + "name": "_eligibleToExitInSec", + "type": "uint256" + } + ], + "name": "reportValidatorExitDelay", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [ @@ -301,7 +327,7 @@ "type": "bytes32" }, { - "name": "_stuckPenaltyDelay", + "name": "_exitDeadlineThresholdInSeconds", "type": "uint256" } ], @@ -315,20 +341,23 @@ "constant": false, "inputs": [ { - "name": "_delay", + "name": "_nodeOperatorId", + "type": "uint256" + }, + { + "name": "_publicKey", + "type": "bytes" + }, + { + "name": "_withdrawalRequestPaidFee", + "type": "uint256" + }, + { + "name": "_exitType", "type": "uint256" } ], - "name": "setStuckPenaltyDelay", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "finalizeUpgrade_v3", + "name": "onValidatorExitTriggered", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -345,7 +374,7 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "pure", "type": "function" }, { @@ -406,7 +435,7 @@ "constant": true, "inputs": [ { - "name": "_nodeOperatorId", + "name": "", "type": "uint256" } ], @@ -418,7 +447,7 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "pure", "type": "function" }, { @@ -508,6 +537,37 @@ "stateMutability": "view", "type": "function" }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "uint256" + }, + { + "name": "_proofSlotTimestamp", + "type": "uint256" + }, + { + "name": "_publicKey", + "type": "bytes" + }, + { + "name": "_eligibleToExitInSec", + "type": "uint256" + } + ], + "name": "isValidatorExitDelayPenaltyApplicable", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [], @@ -620,6 +680,20 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "name": "_exitDeadlineThresholdInSeconds", + "type": "uint256" + } + ], + "name": "finalizeUpgrade_v4", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [], @@ -652,6 +726,24 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "name": "_nodeOperatorId", + "type": "uint256" + }, + { + "name": "_exitedValidatorsCount", + "type": "uint256" + } + ], + "name": "unsafeUpdateValidatorsCount", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ @@ -717,28 +809,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "name": "_locator", - "type": "address" - }, - { - "name": "_type", - "type": "bytes32" - }, - { - "name": "_stuckPenaltyDelay", - "type": "uint256" - } - ], - "name": "finalizeUpgrade_v2", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -779,24 +849,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "name": "_nodeOperatorIds", - "type": "bytes" - }, - { - "name": "_stuckValidatorsCounts", - "type": "bytes" - } - ], - "name": "updateStuckValidatorsCount", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ @@ -838,24 +890,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "name": "_nodeOperatorId", - "type": "uint256" - }, - { - "name": "_refundedValidatorsCount", - "type": "uint256" - } - ], - "name": "updateRefundedValidatorsCount", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -1034,6 +1068,43 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [ + { + "name": "_publicKey", + "type": "bytes" + } + ], + "name": "isValidatorExitingKeyReported", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_threshold", + "type": "uint256" + }, + { + "name": "_lateReportingWindow", + "type": "uint256" + } + ], + "name": "setExitDeadlineThreshold", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ @@ -1061,6 +1132,20 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "exitPenaltyCutoffTimestamp", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [], @@ -1219,28 +1304,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "name": "_nodeOperatorId", - "type": "uint256" - }, - { - "name": "_exitedValidatorsCount", - "type": "uint256" - }, - { - "name": "_stuckValidatorsCount", - "type": "uint256" - } - ], - "name": "unsafeUpdateValidatorsCount", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -1259,7 +1322,7 @@ "constant": true, "inputs": [ { - "name": "_nodeOperatorId", + "name": "", "type": "uint256" } ], @@ -1271,7 +1334,7 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "pure", "type": "function" }, { @@ -1517,13 +1580,23 @@ { "anonymous": false, "inputs": [ + { + "indexed": true, + "name": "nodeOperatorId", + "type": "uint256" + }, + { + "indexed": false, + "name": "targetValidatorsCount", + "type": "uint256" + }, { "indexed": false, - "name": "stuckPenaltyDelay", + "name": "targetLimitMode", "type": "uint256" } ], - "name": "StuckPenaltyDelayChanged", + "name": "TargetValidatorsCountChanged", "type": "event" }, { @@ -1536,21 +1609,21 @@ }, { "indexed": false, - "name": "stuckValidatorsCount", - "type": "uint256" + "name": "publicKey", + "type": "bytes" }, { "indexed": false, - "name": "refundedValidatorsCount", + "name": "eligibleToExitInSec", "type": "uint256" }, { "indexed": false, - "name": "stuckPenaltyEndTimestamp", + "name": "proofSlotTimestamp", "type": "uint256" } ], - "name": "StuckPenaltyStateChanged", + "name": "ValidatorExitStatusUpdated", "type": "event" }, { @@ -1563,33 +1636,38 @@ }, { "indexed": false, - "name": "targetValidatorsCount", + "name": "publicKey", + "type": "bytes" + }, + { + "indexed": false, + "name": "withdrawalRequestPaidFee", "type": "uint256" }, { "indexed": false, - "name": "targetLimitMode", + "name": "exitType", "type": "uint256" } ], - "name": "TargetValidatorsCountChanged", + "name": "ValidatorExitTriggered", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, - "name": "recipientAddress", - "type": "address" + "indexed": false, + "name": "threshold", + "type": "uint256" }, { "indexed": false, - "name": "sharesPenalizedAmount", + "name": "reportingWindow", "type": "uint256" } ], - "name": "NodeOperatorPenalized", + "name": "ExitDeadlineThresholdChanged", "type": "event" }, { diff --git a/interfaces/Sandbox.json b/interfaces/Sandbox.json index 632231338..e42569137 100644 --- a/interfaces/Sandbox.json +++ b/interfaces/Sandbox.json @@ -1 +1,1734 @@ -[{"constant":true,"inputs":[],"name":"hasInitialized","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_nodeOperatorId","type":"uint256"},{"name":"_keysCount","type":"uint256"},{"name":"_publicKeys","type":"bytes"},{"name":"_signatures","type":"bytes"}],"name":"addSigningKeys","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getType","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","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":"_nodeOperatorId","type":"uint256"}],"name":"clearNodeOperatorPenalty","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getRecoveryVault","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_offset","type":"uint256"},{"name":"_limit","type":"uint256"}],"name":"getNodeOperatorIds","outputs":[{"name":"nodeOperatorIds","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_nodeOperatorId","type":"uint256"},{"name":"_offset","type":"uint256"},{"name":"_limit","type":"uint256"}],"name":"getSigningKeys","outputs":[{"name":"pubkeys","type":"bytes"},{"name":"signatures","type":"bytes"},{"name":"used","type":"bool[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_nodeOperatorId","type":"uint256"},{"name":"_fromIndex","type":"uint256"},{"name":"_keysCount","type":"uint256"}],"name":"removeSigningKeysOperatorBH","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_nodeOperatorId","type":"uint256"}],"name":"getNodeOperatorIsActive","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_nodeOperatorId","type":"uint256"},{"name":"_name","type":"string"}],"name":"setNodeOperatorName","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_totalRewardShares","type":"uint256"}],"name":"getRewardsDistribution","outputs":[{"name":"recipients","type":"address[]"},{"name":"shares","type":"uint256[]"},{"name":"penalized","type":"bool[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_indexFrom","type":"uint256"},{"name":"_indexTo","type":"uint256"}],"name":"invalidateReadyToDepositKeysRange","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_locator","type":"address"},{"name":"_type","type":"bytes32"},{"name":"_stuckPenaltyDelay","type":"uint256"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_delay","type":"uint256"}],"name":"setStuckPenaltyDelay","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getStuckPenaltyDelay","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_nodeOperatorId","type":"uint256"},{"name":"_index","type":"uint256"}],"name":"removeSigningKey","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_nodeOperatorId","type":"uint256"},{"name":"_fromIndex","type":"uint256"},{"name":"_keysCount","type":"uint256"}],"name":"removeSigningKeys","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_nodeOperatorId","type":"uint256"}],"name":"isOperatorPenalized","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_nodeOperatorId","type":"uint256"}],"name":"deactivateNodeOperator","outputs":[],"payable":false,"stateMutability":"nonpayable","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":"STAKING_ROUTER_ROLE","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_nodeOperatorId","type":"uint256"},{"name":"_keysCount","type":"uint256"},{"name":"_publicKeys","type":"bytes"},{"name":"_signatures","type":"bytes"}],"name":"addSigningKeysOperatorBH","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"appId","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getActiveNodeOperatorsCount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"string"},{"name":"_rewardAddress","type":"address"}],"name":"addNodeOperator","outputs":[{"name":"id","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","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":true,"inputs":[{"name":"_nodeOperatorId","type":"uint256"}],"name":"getUnusedSigningKeyCount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"onRewardsMinted","outputs":[],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MANAGE_NODE_OPERATOR_ROLE","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"onWithdrawalCredentialsChanged","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_nodeOperatorId","type":"uint256"}],"name":"activateNodeOperator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_nodeOperatorId","type":"uint256"},{"name":"_rewardAddress","type":"address"}],"name":"setNodeOperatorRewardAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_nodeOperatorId","type":"uint256"},{"name":"_fullInfo","type":"bool"}],"name":"getNodeOperator","outputs":[{"name":"active","type":"bool"},{"name":"name","type":"string"},{"name":"rewardAddress","type":"address"},{"name":"totalVettedValidators","type":"uint64"},{"name":"totalExitedValidators","type":"uint64"},{"name":"totalAddedValidators","type":"uint64"},{"name":"totalDepositedValidators","type":"uint64"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_locator","type":"address"},{"name":"_type","type":"bytes32"},{"name":"_stuckPenaltyDelay","type":"uint256"}],"name":"finalizeUpgrade_v2","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getStakingModuleSummary","outputs":[{"name":"totalExitedValidators","type":"uint256"},{"name":"totalDepositedValidators","type":"uint256"},{"name":"depositableValidatorsCount","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_nodeOperatorIds","type":"bytes"},{"name":"_exitedValidatorsCounts","type":"bytes"}],"name":"updateExitedValidatorsCount","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_nodeOperatorIds","type":"bytes"},{"name":"_stuckValidatorsCounts","type":"bytes"}],"name":"updateStuckValidatorsCount","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_token","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":"_nodeOperatorId","type":"uint256"},{"name":"_refundedValidatorsCount","type":"uint256"}],"name":"updateRefundedValidatorsCount","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getEVMScriptRegistry","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getNodeOperatorsCount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_nodeOperatorId","type":"uint256"},{"name":"_isTargetLimitActive","type":"bool"},{"name":"_targetLimit","type":"uint256"}],"name":"updateTargetValidatorsLimits","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_nodeOperatorId","type":"uint256"},{"name":"_vettedSigningKeysCount","type":"uint64"}],"name":"setNodeOperatorStakingLimit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_nodeOperatorId","type":"uint256"}],"name":"getNodeOperatorSummary","outputs":[{"name":"isTargetLimitActive","type":"bool"},{"name":"targetValidatorsCount","type":"uint256"},{"name":"stuckValidatorsCount","type":"uint256"},{"name":"refundedValidatorsCount","type":"uint256"},{"name":"stuckPenaltyEndTimestamp","type":"uint256"},{"name":"totalExitedValidators","type":"uint256"},{"name":"totalDepositedValidators","type":"uint256"},{"name":"depositableValidatorsCount","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_nodeOperatorId","type":"uint256"},{"name":"_index","type":"uint256"}],"name":"getSigningKey","outputs":[{"name":"key","type":"bytes"},{"name":"depositSignature","type":"bytes"},{"name":"used","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAX_NODE_OPERATOR_NAME_LENGTH","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_depositsCount","type":"uint256"},{"name":"","type":"bytes"}],"name":"obtainDepositData","outputs":[{"name":"publicKeys","type":"bytes"},{"name":"signatures","type":"bytes"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getKeysOpIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getNonce","outputs":[{"name":"","type":"uint256"}],"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":"getLocator","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SET_NODE_OPERATOR_LIMIT_ROLE","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_nodeOperatorId","type":"uint256"}],"name":"getTotalSigningKeyCount","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":"MAX_STUCK_PENALTY_DELAY","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"onExitedAndStuckValidatorsCountsUpdated","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"MAX_NODE_OPERATORS_COUNT","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_nodeOperatorId","type":"uint256"},{"name":"_index","type":"uint256"}],"name":"removeSigningKeyOperatorBH","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_nodeOperatorId","type":"uint256"},{"name":"_exitedValidatorsCount","type":"uint256"},{"name":"_stuckValidatorsCount","type":"uint256"}],"name":"unsafeUpdateValidatorsCount","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"MANAGE_SIGNING_KEYS","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_nodeOperatorId","type":"uint256"}],"name":"isOperatorPenaltyCleared","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"nodeOperatorId","type":"uint256"},{"indexed":false,"name":"name","type":"string"},{"indexed":false,"name":"rewardAddress","type":"address"},{"indexed":false,"name":"stakingLimit","type":"uint64"}],"name":"NodeOperatorAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"nodeOperatorId","type":"uint256"},{"indexed":false,"name":"active","type":"bool"}],"name":"NodeOperatorActiveSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"nodeOperatorId","type":"uint256"},{"indexed":false,"name":"name","type":"string"}],"name":"NodeOperatorNameSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"nodeOperatorId","type":"uint256"},{"indexed":false,"name":"rewardAddress","type":"address"}],"name":"NodeOperatorRewardAddressSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"nodeOperatorId","type":"uint256"},{"indexed":false,"name":"totalKeysTrimmed","type":"uint64"}],"name":"NodeOperatorTotalKeysTrimmed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"keysOpIndex","type":"uint256"}],"name":"KeysOpIndexSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"moduleType","type":"bytes32"}],"name":"StakingModuleTypeSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"rewardAddress","type":"address"},{"indexed":false,"name":"sharesAmount","type":"uint256"}],"name":"RewardsDistributed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"locatorAddress","type":"address"}],"name":"LocatorContractSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"nodeOperatorId","type":"uint256"},{"indexed":false,"name":"approvedValidatorsCount","type":"uint256"}],"name":"VettedSigningKeysCountChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"nodeOperatorId","type":"uint256"},{"indexed":false,"name":"depositedValidatorsCount","type":"uint256"}],"name":"DepositedSigningKeysCountChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"nodeOperatorId","type":"uint256"},{"indexed":false,"name":"exitedValidatorsCount","type":"uint256"}],"name":"ExitedSigningKeysCountChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"nodeOperatorId","type":"uint256"},{"indexed":false,"name":"totalValidatorsCount","type":"uint256"}],"name":"TotalSigningKeysCountChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"nonce","type":"uint256"}],"name":"NonceChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"stuckPenaltyDelay","type":"uint256"}],"name":"StuckPenaltyDelayChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"nodeOperatorId","type":"uint256"},{"indexed":false,"name":"stuckValidatorsCount","type":"uint256"},{"indexed":false,"name":"refundedValidatorsCount","type":"uint256"},{"indexed":false,"name":"stuckPenaltyEndTimestamp","type":"uint256"}],"name":"StuckPenaltyStateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"nodeOperatorId","type":"uint256"},{"indexed":false,"name":"targetValidatorsCount","type":"uint256"}],"name":"TargetValidatorsCountChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"recipientAddress","type":"address"},{"indexed":false,"name":"sharesPenalizedAmount","type":"uint256"}],"name":"NodeOperatorPenalized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"version","type":"uint256"}],"name":"ContractVersionSet","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"}] \ No newline at end of file +[ + { + "constant": true, + "inputs": [], + "name": "hasInitialized", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_nodeOperatorId", + "type": "uint256" + }, + { + "name": "_targetLimitMode", + "type": "uint256" + }, + { + "name": "_targetLimit", + "type": "uint256" + } + ], + "name": "updateTargetValidatorsLimits", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_nodeOperatorId", + "type": "uint256" + }, + { + "name": "_keysCount", + "type": "uint256" + }, + { + "name": "_publicKeys", + "type": "bytes" + }, + { + "name": "_signatures", + "type": "bytes" + } + ], + "name": "addSigningKeys", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getType", + "outputs": [ + { + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "uint256" + } + ], + "name": "exitDeadlineThreshold", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_script", + "type": "bytes" + } + ], + "name": "getEVMScriptExecutor", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getRecoveryVault", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_offset", + "type": "uint256" + }, + { + "name": "_limit", + "type": "uint256" + } + ], + "name": "getNodeOperatorIds", + "outputs": [ + { + "name": "nodeOperatorIds", + "type": "uint256[]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_nodeOperatorId", + "type": "uint256" + }, + { + "name": "_proofSlotTimestamp", + "type": "uint256" + }, + { + "name": "_publicKey", + "type": "bytes" + }, + { + "name": "_eligibleToExitInSec", + "type": "uint256" + } + ], + "name": "reportValidatorExitDelay", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_nodeOperatorId", + "type": "uint256" + }, + { + "name": "_offset", + "type": "uint256" + }, + { + "name": "_limit", + "type": "uint256" + } + ], + "name": "getSigningKeys", + "outputs": [ + { + "name": "pubkeys", + "type": "bytes" + }, + { + "name": "signatures", + "type": "bytes" + }, + { + "name": "used", + "type": "bool[]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_nodeOperatorId", + "type": "uint256" + }, + { + "name": "_fromIndex", + "type": "uint256" + }, + { + "name": "_keysCount", + "type": "uint256" + } + ], + "name": "removeSigningKeysOperatorBH", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_nodeOperatorId", + "type": "uint256" + } + ], + "name": "getNodeOperatorIsActive", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_nodeOperatorId", + "type": "uint256" + }, + { + "name": "_name", + "type": "string" + } + ], + "name": "setNodeOperatorName", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_totalRewardShares", + "type": "uint256" + } + ], + "name": "getRewardsDistribution", + "outputs": [ + { + "name": "recipients", + "type": "address[]" + }, + { + "name": "shares", + "type": "uint256[]" + }, + { + "name": "penalized", + "type": "bool[]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_indexFrom", + "type": "uint256" + }, + { + "name": "_indexTo", + "type": "uint256" + } + ], + "name": "invalidateReadyToDepositKeysRange", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_locator", + "type": "address" + }, + { + "name": "_type", + "type": "bytes32" + }, + { + "name": "_exitDeadlineThresholdInSeconds", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_nodeOperatorId", + "type": "uint256" + }, + { + "name": "_publicKey", + "type": "bytes" + }, + { + "name": "_withdrawalRequestPaidFee", + "type": "uint256" + }, + { + "name": "_exitType", + "type": "uint256" + } + ], + "name": "onValidatorExitTriggered", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getStuckPenaltyDelay", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_nodeOperatorId", + "type": "uint256" + }, + { + "name": "_index", + "type": "uint256" + } + ], + "name": "removeSigningKey", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getRewardDistributionState", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_nodeOperatorId", + "type": "uint256" + }, + { + "name": "_fromIndex", + "type": "uint256" + }, + { + "name": "_keysCount", + "type": "uint256" + } + ], + "name": "removeSigningKeys", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "uint256" + } + ], + "name": "isOperatorPenalized", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_nodeOperatorId", + "type": "uint256" + } + ], + "name": "deactivateNodeOperator", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "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": "STAKING_ROUTER_ROLE", + "outputs": [ + { + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_nodeOperatorId", + "type": "uint256" + }, + { + "name": "_keysCount", + "type": "uint256" + }, + { + "name": "_publicKeys", + "type": "bytes" + }, + { + "name": "_signatures", + "type": "bytes" + } + ], + "name": "addSigningKeysOperatorBH", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "appId", + "outputs": [ + { + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "uint256" + }, + { + "name": "_proofSlotTimestamp", + "type": "uint256" + }, + { + "name": "_publicKey", + "type": "bytes" + }, + { + "name": "_eligibleToExitInSec", + "type": "uint256" + } + ], + "name": "isValidatorExitDelayPenaltyApplicable", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getActiveNodeOperatorsCount", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_name", + "type": "string" + }, + { + "name": "_rewardAddress", + "type": "address" + } + ], + "name": "addNodeOperator", + "outputs": [ + { + "name": "id", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "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": true, + "inputs": [ + { + "name": "_nodeOperatorId", + "type": "uint256" + } + ], + "name": "getUnusedSigningKeyCount", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "", + "type": "uint256" + } + ], + "name": "onRewardsMinted", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MANAGE_NODE_OPERATOR_ROLE", + "outputs": [ + { + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_exitDeadlineThresholdInSeconds", + "type": "uint256" + } + ], + "name": "finalizeUpgrade_v4", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "distributeReward", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "onWithdrawalCredentialsChanged", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_nodeOperatorId", + "type": "uint256" + } + ], + "name": "activateNodeOperator", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_nodeOperatorId", + "type": "uint256" + }, + { + "name": "_exitedValidatorsCount", + "type": "uint256" + } + ], + "name": "unsafeUpdateValidatorsCount", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_nodeOperatorId", + "type": "uint256" + }, + { + "name": "_rewardAddress", + "type": "address" + } + ], + "name": "setNodeOperatorRewardAddress", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_nodeOperatorId", + "type": "uint256" + }, + { + "name": "_fullInfo", + "type": "bool" + } + ], + "name": "getNodeOperator", + "outputs": [ + { + "name": "active", + "type": "bool" + }, + { + "name": "name", + "type": "string" + }, + { + "name": "rewardAddress", + "type": "address" + }, + { + "name": "totalVettedValidators", + "type": "uint64" + }, + { + "name": "totalExitedValidators", + "type": "uint64" + }, + { + "name": "totalAddedValidators", + "type": "uint64" + }, + { + "name": "totalDepositedValidators", + "type": "uint64" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getStakingModuleSummary", + "outputs": [ + { + "name": "totalExitedValidators", + "type": "uint256" + }, + { + "name": "totalDepositedValidators", + "type": "uint256" + }, + { + "name": "depositableValidatorsCount", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_nodeOperatorIds", + "type": "bytes" + }, + { + "name": "_exitedValidatorsCounts", + "type": "bytes" + } + ], + "name": "updateExitedValidatorsCount", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_token", + "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": true, + "inputs": [], + "name": "getEVMScriptRegistry", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getNodeOperatorsCount", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_nodeOperatorId", + "type": "uint256" + }, + { + "name": "_isTargetLimitActive", + "type": "bool" + }, + { + "name": "_targetLimit", + "type": "uint256" + } + ], + "name": "updateTargetValidatorsLimits", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_nodeOperatorId", + "type": "uint256" + }, + { + "name": "_vettedSigningKeysCount", + "type": "uint64" + } + ], + "name": "setNodeOperatorStakingLimit", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_nodeOperatorId", + "type": "uint256" + } + ], + "name": "getNodeOperatorSummary", + "outputs": [ + { + "name": "targetLimitMode", + "type": "uint256" + }, + { + "name": "targetValidatorsCount", + "type": "uint256" + }, + { + "name": "stuckValidatorsCount", + "type": "uint256" + }, + { + "name": "refundedValidatorsCount", + "type": "uint256" + }, + { + "name": "stuckPenaltyEndTimestamp", + "type": "uint256" + }, + { + "name": "totalExitedValidators", + "type": "uint256" + }, + { + "name": "totalDepositedValidators", + "type": "uint256" + }, + { + "name": "depositableValidatorsCount", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_nodeOperatorId", + "type": "uint256" + }, + { + "name": "_index", + "type": "uint256" + } + ], + "name": "getSigningKey", + "outputs": [ + { + "name": "key", + "type": "bytes" + }, + { + "name": "depositSignature", + "type": "bytes" + }, + { + "name": "used", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_NODE_OPERATOR_NAME_LENGTH", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_nodeOperatorIds", + "type": "bytes" + }, + { + "name": "_vettedSigningKeysCounts", + "type": "bytes" + } + ], + "name": "decreaseVettedSigningKeysCount", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_publicKey", + "type": "bytes" + } + ], + "name": "isValidatorExitingKeyReported", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_threshold", + "type": "uint256" + }, + { + "name": "_lateReportingWindow", + "type": "uint256" + } + ], + "name": "setExitDeadlineThreshold", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_depositsCount", + "type": "uint256" + }, + { + "name": "", + "type": "bytes" + } + ], + "name": "obtainDepositData", + "outputs": [ + { + "name": "publicKeys", + "type": "bytes" + }, + { + "name": "signatures", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "exitPenaltyCutoffTimestamp", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getKeysOpIndex", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getNonce", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "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": "getLocator", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "SET_NODE_OPERATOR_LIMIT_ROLE", + "outputs": [ + { + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_nodeOperatorId", + "type": "uint256" + } + ], + "name": "getTotalSigningKeyCount", + "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": "MAX_STUCK_PENALTY_DELAY", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "onExitedAndStuckValidatorsCountsUpdated", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_NODE_OPERATORS_COUNT", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_nodeOperatorId", + "type": "uint256" + }, + { + "name": "_index", + "type": "uint256" + } + ], + "name": "removeSigningKeyOperatorBH", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MANAGE_SIGNING_KEYS", + "outputs": [ + { + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "uint256" + } + ], + "name": "isOperatorPenaltyCleared", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "nodeOperatorId", + "type": "uint256" + }, + { + "indexed": false, + "name": "name", + "type": "string" + }, + { + "indexed": false, + "name": "rewardAddress", + "type": "address" + }, + { + "indexed": false, + "name": "stakingLimit", + "type": "uint64" + } + ], + "name": "NodeOperatorAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "nodeOperatorId", + "type": "uint256" + }, + { + "indexed": false, + "name": "active", + "type": "bool" + } + ], + "name": "NodeOperatorActiveSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "nodeOperatorId", + "type": "uint256" + }, + { + "indexed": false, + "name": "name", + "type": "string" + } + ], + "name": "NodeOperatorNameSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "nodeOperatorId", + "type": "uint256" + }, + { + "indexed": false, + "name": "rewardAddress", + "type": "address" + } + ], + "name": "NodeOperatorRewardAddressSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "nodeOperatorId", + "type": "uint256" + }, + { + "indexed": false, + "name": "totalKeysTrimmed", + "type": "uint64" + } + ], + "name": "NodeOperatorTotalKeysTrimmed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "keysOpIndex", + "type": "uint256" + } + ], + "name": "KeysOpIndexSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "moduleType", + "type": "bytes32" + } + ], + "name": "StakingModuleTypeSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "rewardAddress", + "type": "address" + }, + { + "indexed": false, + "name": "sharesAmount", + "type": "uint256" + } + ], + "name": "RewardsDistributed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "state", + "type": "uint8" + } + ], + "name": "RewardDistributionStateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "locatorAddress", + "type": "address" + } + ], + "name": "LocatorContractSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "nodeOperatorId", + "type": "uint256" + }, + { + "indexed": false, + "name": "approvedValidatorsCount", + "type": "uint256" + } + ], + "name": "VettedSigningKeysCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "nodeOperatorId", + "type": "uint256" + }, + { + "indexed": false, + "name": "depositedValidatorsCount", + "type": "uint256" + } + ], + "name": "DepositedSigningKeysCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "nodeOperatorId", + "type": "uint256" + }, + { + "indexed": false, + "name": "exitedValidatorsCount", + "type": "uint256" + } + ], + "name": "ExitedSigningKeysCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "nodeOperatorId", + "type": "uint256" + }, + { + "indexed": false, + "name": "totalValidatorsCount", + "type": "uint256" + } + ], + "name": "TotalSigningKeysCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "nonce", + "type": "uint256" + } + ], + "name": "NonceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "nodeOperatorId", + "type": "uint256" + }, + { + "indexed": false, + "name": "targetValidatorsCount", + "type": "uint256" + }, + { + "indexed": false, + "name": "targetLimitMode", + "type": "uint256" + } + ], + "name": "TargetValidatorsCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "nodeOperatorId", + "type": "uint256" + }, + { + "indexed": false, + "name": "publicKey", + "type": "bytes" + }, + { + "indexed": false, + "name": "eligibleToExitInSec", + "type": "uint256" + }, + { + "indexed": false, + "name": "proofSlotTimestamp", + "type": "uint256" + } + ], + "name": "ValidatorExitStatusUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "nodeOperatorId", + "type": "uint256" + }, + { + "indexed": false, + "name": "publicKey", + "type": "bytes" + }, + { + "indexed": false, + "name": "withdrawalRequestPaidFee", + "type": "uint256" + }, + { + "indexed": false, + "name": "exitType", + "type": "uint256" + } + ], + "name": "ValidatorExitTriggered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "threshold", + "type": "uint256" + }, + { + "indexed": false, + "name": "reportingWindow", + "type": "uint256" + } + ], + "name": "ExitDeadlineThresholdChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "version", + "type": "uint256" + } + ], + "name": "ContractVersionSet", + "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" + } + ] diff --git a/interfaces/SimpleDVT.json b/interfaces/SimpleDVT.json index 4e15f855d..835d9c9fa 100644 --- a/interfaces/SimpleDVT.json +++ b/interfaces/SimpleDVT.json @@ -79,15 +79,15 @@ "constant": true, "inputs": [ { - "name": "_script", - "type": "bytes" + "name": "", + "type": "uint256" } ], - "name": "getEVMScriptExecutor", + "name": "exitDeadlineThreshold", "outputs": [ { "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -95,22 +95,22 @@ "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "name": "_nodeOperatorId", - "type": "uint256" + "name": "_script", + "type": "bytes" } ], - "name": "clearNodeOperatorPenalty", + "name": "getEVMScriptExecutor", "outputs": [ { "name": "", - "type": "bool" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { @@ -150,6 +150,32 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "name": "_nodeOperatorId", + "type": "uint256" + }, + { + "name": "_proofSlotTimestamp", + "type": "uint256" + }, + { + "name": "_publicKey", + "type": "bytes" + }, + { + "name": "_eligibleToExitInSec", + "type": "uint256" + } + ], + "name": "reportValidatorExitDelay", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [ @@ -301,7 +327,7 @@ "type": "bytes32" }, { - "name": "_stuckPenaltyDelay", + "name": "_exitDeadlineThresholdInSeconds", "type": "uint256" } ], @@ -315,20 +341,23 @@ "constant": false, "inputs": [ { - "name": "_delay", + "name": "_nodeOperatorId", + "type": "uint256" + }, + { + "name": "_publicKey", + "type": "bytes" + }, + { + "name": "_withdrawalRequestPaidFee", + "type": "uint256" + }, + { + "name": "_exitType", "type": "uint256" } ], - "name": "setStuckPenaltyDelay", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "finalizeUpgrade_v3", + "name": "onValidatorExitTriggered", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -345,7 +374,7 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "pure", "type": "function" }, { @@ -406,7 +435,7 @@ "constant": true, "inputs": [ { - "name": "_nodeOperatorId", + "name": "", "type": "uint256" } ], @@ -418,7 +447,7 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "pure", "type": "function" }, { @@ -508,6 +537,37 @@ "stateMutability": "view", "type": "function" }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "uint256" + }, + { + "name": "_proofSlotTimestamp", + "type": "uint256" + }, + { + "name": "_publicKey", + "type": "bytes" + }, + { + "name": "_eligibleToExitInSec", + "type": "uint256" + } + ], + "name": "isValidatorExitDelayPenaltyApplicable", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [], @@ -620,6 +680,20 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "name": "_exitDeadlineThresholdInSeconds", + "type": "uint256" + } + ], + "name": "finalizeUpgrade_v4", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [], @@ -652,6 +726,24 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "name": "_nodeOperatorId", + "type": "uint256" + }, + { + "name": "_exitedValidatorsCount", + "type": "uint256" + } + ], + "name": "unsafeUpdateValidatorsCount", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ @@ -717,28 +809,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "name": "_locator", - "type": "address" - }, - { - "name": "_type", - "type": "bytes32" - }, - { - "name": "_stuckPenaltyDelay", - "type": "uint256" - } - ], - "name": "finalizeUpgrade_v2", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -779,24 +849,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "name": "_nodeOperatorIds", - "type": "bytes" - }, - { - "name": "_stuckValidatorsCounts", - "type": "bytes" - } - ], - "name": "updateStuckValidatorsCount", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ @@ -838,24 +890,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "name": "_nodeOperatorId", - "type": "uint256" - }, - { - "name": "_refundedValidatorsCount", - "type": "uint256" - } - ], - "name": "updateRefundedValidatorsCount", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -1034,6 +1068,43 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [ + { + "name": "_publicKey", + "type": "bytes" + } + ], + "name": "isValidatorExitingKeyReported", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_threshold", + "type": "uint256" + }, + { + "name": "_lateReportingWindow", + "type": "uint256" + } + ], + "name": "setExitDeadlineThreshold", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ @@ -1061,6 +1132,20 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "exitPenaltyCutoffTimestamp", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [], @@ -1219,28 +1304,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "name": "_nodeOperatorId", - "type": "uint256" - }, - { - "name": "_exitedValidatorsCount", - "type": "uint256" - }, - { - "name": "_stuckValidatorsCount", - "type": "uint256" - } - ], - "name": "unsafeUpdateValidatorsCount", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -1259,7 +1322,7 @@ "constant": true, "inputs": [ { - "name": "_nodeOperatorId", + "name": "", "type": "uint256" } ], @@ -1271,7 +1334,7 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "pure", "type": "function" }, { @@ -1517,13 +1580,23 @@ { "anonymous": false, "inputs": [ + { + "indexed": true, + "name": "nodeOperatorId", + "type": "uint256" + }, + { + "indexed": false, + "name": "targetValidatorsCount", + "type": "uint256" + }, { "indexed": false, - "name": "stuckPenaltyDelay", + "name": "targetLimitMode", "type": "uint256" } ], - "name": "StuckPenaltyDelayChanged", + "name": "TargetValidatorsCountChanged", "type": "event" }, { @@ -1536,21 +1609,21 @@ }, { "indexed": false, - "name": "stuckValidatorsCount", - "type": "uint256" + "name": "publicKey", + "type": "bytes" }, { "indexed": false, - "name": "refundedValidatorsCount", + "name": "eligibleToExitInSec", "type": "uint256" }, { "indexed": false, - "name": "stuckPenaltyEndTimestamp", + "name": "proofSlotTimestamp", "type": "uint256" } ], - "name": "StuckPenaltyStateChanged", + "name": "ValidatorExitStatusUpdated", "type": "event" }, { @@ -1563,33 +1636,38 @@ }, { "indexed": false, - "name": "targetValidatorsCount", + "name": "publicKey", + "type": "bytes" + }, + { + "indexed": false, + "name": "withdrawalRequestPaidFee", "type": "uint256" }, { "indexed": false, - "name": "targetLimitMode", + "name": "exitType", "type": "uint256" } ], - "name": "TargetValidatorsCountChanged", + "name": "ValidatorExitTriggered", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, - "name": "recipientAddress", - "type": "address" + "indexed": false, + "name": "threshold", + "type": "uint256" }, { "indexed": false, - "name": "sharesPenalizedAmount", + "name": "reportingWindow", "type": "uint256" } ], - "name": "NodeOperatorPenalized", + "name": "ExitDeadlineThresholdChanged", "type": "event" }, { diff --git a/interfaces/StakingRouter.json b/interfaces/StakingRouter.json index dfd058948..63233f2d2 100644 --- a/interfaces/StakingRouter.json +++ b/interfaces/StakingRouter.json @@ -77,6 +77,11 @@ "name": "InvalidFeeSum", "type": "error" }, + { + "inputs": [], + "name": "InvalidMaxDepositPerBlockValue", + "type": "error" + }, { "inputs": [], "name": "InvalidMinDepositBlockDistance", @@ -213,14 +218,25 @@ "internalType": "uint256", "name": "currentNodeOpExitedValidatorsCount", "type": "uint256" + } + ], + "name": "UnexpectedCurrentValidatorsCount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newModuleTotalExitedValidatorsCount", + "type": "uint256" }, { "internalType": "uint256", - "name": "currentNodeOpStuckValidatorsCount", + "name": "newModuleTotalExitedValidatorsCountInStakingRouter", "type": "uint256" } ], - "name": "UnexpectedCurrentValidatorsCount", + "name": "UnexpectedFinalExitedValidatorsCount", "type": "error" }, { @@ -717,6 +733,32 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "REPORT_VALIDATOR_EXITING_STATUS_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "REPORT_VALIDATOR_EXIT_TRIGGERED_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "STAKING_MODULE_MANAGE_ROLE", @@ -864,24 +906,8 @@ "type": "function" }, { - "inputs": [ - { - "internalType": "uint256[]", - "name": "_priorityExitShareThresholds", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "_maxDepositsPerBlock", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "_minDepositBlockDistances", - "type": "uint256[]" - } - ], - "name": "finalizeUpgrade_v2", + "inputs": [], + "name": "finalizeUpgrade_v3", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -2164,6 +2190,39 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_stakingModuleId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_nodeOperatorId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_publicKey", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_withdrawalRequestPaidFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_exitType", + "type": "uint256" + } + ], + "name": "onValidatorExitTriggered", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "onValidatorsCountsByNodeOperatorReportingFinished", @@ -2238,17 +2297,27 @@ "type": "uint256" }, { - "internalType": "bytes", - "name": "_nodeOperatorIds", - "type": "bytes" + "internalType": "uint256", + "name": "_nodeOperatorId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_proofSlotTimestamp", + "type": "uint256" }, { "internalType": "bytes", - "name": "_stuckValidatorsCounts", + "name": "_publicKey", "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_eligibleToExitInSec", + "type": "uint256" } ], - "name": "reportStakingModuleStuckValidatorsCountByNodeOperator", + "name": "reportValidatorExitDelay", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -2350,11 +2419,6 @@ "name": "currentNodeOperatorExitedValidatorsCount", "type": "uint256" }, - { - "internalType": "uint256", - "name": "currentNodeOperatorStuckValidatorsCount", - "type": "uint256" - }, { "internalType": "uint256", "name": "newModuleExitedValidatorsCount", @@ -2364,11 +2428,6 @@ "internalType": "uint256", "name": "newNodeOperatorExitedValidatorsCount", "type": "uint256" - }, - { - "internalType": "uint256", - "name": "newNodeOperatorStuckValidatorsCount", - "type": "uint256" } ], "internalType": "struct StakingRouter.ValidatorsCountsCorrection", diff --git a/interfaces/TriggerableWithdrawalsGateway.json b/interfaces/TriggerableWithdrawalsGateway.json new file mode 100644 index 000000000..f46463094 --- /dev/null +++ b/interfaces/TriggerableWithdrawalsGateway.json @@ -0,0 +1,703 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "admin", + "type": "address" + }, + { + "internalType": "address", + "name": "lidoLocator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "maxExitRequestsLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "exitsPerFrame", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "frameDurationInSec", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AdminCannotBeZero", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "requestsCount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "remainingLimit", + "type": "uint256" + } + ], + "name": "ExitRequestsLimitExceeded", + "type": "error" + }, + { + "inputs": [], + "name": "FeeRefundFailed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "feeRequired", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "passedValue", + "type": "uint256" + } + ], + "name": "InsufficientFee", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidRequestsDataLength", + "type": "error" + }, + { + "inputs": [], + "name": "LimitExceeded", + "type": "error" + }, + { + "inputs": [], + "name": "PauseUntilMustBeInFuture", + "type": "error" + }, + { + "inputs": [], + "name": "PausedExpected", + "type": "error" + }, + { + "inputs": [], + "name": "ResumedExpected", + "type": "error" + }, + { + "inputs": [], + "name": "TooLargeExitsPerFrame", + "type": "error" + }, + { + "inputs": [], + "name": "TooLargeFrameDuration", + "type": "error" + }, + { + "inputs": [], + "name": "TooLargeMaxExitRequestsLimit", + "type": "error" + }, + { + "inputs": [], + "name": "UnrecoverableModuleError", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "name": "ZeroArgument", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroFrameDuration", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroPauseDuration", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "maxExitRequestsLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "exitsPerFrame", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "frameDurationInSec", + "type": "uint256" + } + ], + "name": "ExitRequestsLimitSet", + "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": false, + "internalType": "uint256", + "name": "stakingModuleId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nodeOperatorId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "validatorPubkey", + "type": "bytes" + } + ], + "name": "StakingModuleExitNotificationFailed", + "type": "event" + }, + { + "inputs": [], + "name": "ADD_FULL_WITHDRAWAL_REQUEST_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "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": "RESUME_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "TWR_LIMIT_POSITION", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "TW_EXIT_LIMIT_MANAGER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "VERSION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getExitRequestLimitFullInfo", + "outputs": [ + { + "internalType": "uint256", + "name": "maxExitRequestsLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "exitsPerFrame", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "frameDurationInSec", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "prevExitRequestsLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "currentExitRequestsLimit", + "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" + }, + { + "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": [], + "name": "isPaused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "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": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "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": "uint256", + "name": "maxExitRequestsLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "exitsPerFrame", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "frameDurationInSec", + "type": "uint256" + } + ], + "name": "setExitRequestLimit", + "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": "uint256", + "name": "stakingModuleId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nodeOperatorId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + } + ], + "internalType": "struct TriggerableWithdrawalsGateway.ValidatorData[]", + "name": "validatorsData", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "refundRecipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "exitType", + "type": "uint256" + } + ], + "name": "triggerFullWithdrawals", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } +] diff --git a/interfaces/ValidatorExitVerifier.json b/interfaces/ValidatorExitVerifier.json new file mode 100644 index 000000000..39e5cc8aa --- /dev/null +++ b/interfaces/ValidatorExitVerifier.json @@ -0,0 +1 @@ +[{"inputs":[{"internalType":"address","name":"lidoLocator","type":"address"},{"internalType":"GIndex","name":"gIFirstValidatorPrev","type":"bytes32"},{"internalType":"GIndex","name":"gIFirstValidatorCurr","type":"bytes32"},{"internalType":"GIndex","name":"gIHistoricalSummariesPrev","type":"bytes32"},{"internalType":"GIndex","name":"gIHistoricalSummariesCurr","type":"bytes32"},{"internalType":"uint64","name":"firstSupportedSlot","type":"uint64"},{"internalType":"uint64","name":"pivotSlot","type":"uint64"},{"internalType":"uint32","name":"slotsPerEpoch","type":"uint32"},{"internalType":"uint32","name":"secondsPerSlot","type":"uint32"},{"internalType":"uint64","name":"genesisTime","type":"uint64"},{"internalType":"uint32","name":"shardCommitteePeriodInSeconds","type":"uint32"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint64","name":"provableBeaconBlockTimestamp","type":"uint64"},{"internalType":"uint64","name":"eligibleExitRequestTimestamp","type":"uint64"}],"name":"ExitRequestNotEligibleOnProvableBeaconBlock","type":"error"},{"inputs":[],"name":"IndexOutOfRange","type":"error"},{"inputs":[],"name":"InvalidBlockHeader","type":"error"},{"inputs":[],"name":"InvalidGIndex","type":"error"},{"inputs":[],"name":"InvalidPivotSlot","type":"error"},{"inputs":[{"internalType":"uint256","name":"keyIndex","type":"uint256"},{"internalType":"uint256","name":"totalItemsCount","type":"uint256"}],"name":"KeyIndexOutOfRange","type":"error"},{"inputs":[{"internalType":"uint256","name":"keyIndex","type":"uint256"},{"internalType":"uint256","name":"lastUnpackedKeyIndex","type":"uint256"}],"name":"KeyWasNotUnpacked","type":"error"},{"inputs":[],"name":"RootNotFound","type":"error"},{"inputs":[{"internalType":"uint64","name":"slot","type":"uint64"}],"name":"UnsupportedSlot","type":"error"},{"inputs":[],"name":"ZeroLidoLocatorAddress","type":"error"},{"inputs":[],"name":"BEACON_ROOTS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FIRST_SUPPORTED_SLOT","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GENESIS_TIME","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"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_HISTORICAL_SUMMARIES_CURR","outputs":[{"internalType":"GIndex","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GI_HISTORICAL_SUMMARIES_PREV","outputs":[{"internalType":"GIndex","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LOCATOR","outputs":[{"internalType":"contract ILidoLocator","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PIVOT_SLOT","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SECONDS_PER_SLOT","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SHARD_COMMITTEE_PERIOD_IN_SECONDS","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SLOTS_PER_EPOCH","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"uint64","name":"slot","type":"uint64"},{"internalType":"uint64","name":"proposerIndex","type":"uint64"},{"internalType":"bytes32","name":"parentRoot","type":"bytes32"},{"internalType":"bytes32","name":"stateRoot","type":"bytes32"},{"internalType":"bytes32","name":"bodyRoot","type":"bytes32"}],"internalType":"struct BeaconBlockHeader","name":"header","type":"tuple"},{"internalType":"uint64","name":"rootsTimestamp","type":"uint64"}],"internalType":"struct ProvableBeaconBlockHeader","name":"beaconBlock","type":"tuple"},{"components":[{"internalType":"uint32","name":"exitRequestIndex","type":"uint32"},{"internalType":"bytes32","name":"withdrawalCredentials","type":"bytes32"},{"internalType":"uint64","name":"effectiveBalance","type":"uint64"},{"internalType":"bool","name":"slashed","type":"bool"},{"internalType":"uint64","name":"activationEligibilityEpoch","type":"uint64"},{"internalType":"uint64","name":"activationEpoch","type":"uint64"},{"internalType":"uint64","name":"withdrawableEpoch","type":"uint64"},{"internalType":"bytes32[]","name":"validatorProof","type":"bytes32[]"}],"internalType":"struct ValidatorWitness[]","name":"validatorWitnesses","type":"tuple[]"},{"components":[{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"dataFormat","type":"uint256"}],"internalType":"struct ExitRequestData","name":"exitRequests","type":"tuple"}],"name":"verifyActiveValidatorsAfterExitRequest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"uint64","name":"slot","type":"uint64"},{"internalType":"uint64","name":"proposerIndex","type":"uint64"},{"internalType":"bytes32","name":"parentRoot","type":"bytes32"},{"internalType":"bytes32","name":"stateRoot","type":"bytes32"},{"internalType":"bytes32","name":"bodyRoot","type":"bytes32"}],"internalType":"struct BeaconBlockHeader","name":"header","type":"tuple"},{"internalType":"uint64","name":"rootsTimestamp","type":"uint64"}],"internalType":"struct ProvableBeaconBlockHeader","name":"beaconBlock","type":"tuple"},{"components":[{"components":[{"internalType":"uint64","name":"slot","type":"uint64"},{"internalType":"uint64","name":"proposerIndex","type":"uint64"},{"internalType":"bytes32","name":"parentRoot","type":"bytes32"},{"internalType":"bytes32","name":"stateRoot","type":"bytes32"},{"internalType":"bytes32","name":"bodyRoot","type":"bytes32"}],"internalType":"struct BeaconBlockHeader","name":"header","type":"tuple"},{"internalType":"GIndex","name":"rootGIndex","type":"bytes32"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"internalType":"struct HistoricalHeaderWitness","name":"oldBlock","type":"tuple"},{"components":[{"internalType":"uint32","name":"exitRequestIndex","type":"uint32"},{"internalType":"bytes32","name":"withdrawalCredentials","type":"bytes32"},{"internalType":"uint64","name":"effectiveBalance","type":"uint64"},{"internalType":"bool","name":"slashed","type":"bool"},{"internalType":"uint64","name":"activationEligibilityEpoch","type":"uint64"},{"internalType":"uint64","name":"activationEpoch","type":"uint64"},{"internalType":"uint64","name":"withdrawableEpoch","type":"uint64"},{"internalType":"bytes32[]","name":"validatorProof","type":"bytes32[]"}],"internalType":"struct ValidatorWitness[]","name":"validatorWitnesses","type":"tuple[]"},{"components":[{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"dataFormat","type":"uint256"}],"internalType":"struct ExitRequestData","name":"exitRequests","type":"tuple"}],"name":"verifyHistoricalActiveValidatorsAfterExitRequest","outputs":[],"stateMutability":"nonpayable","type":"function"}] diff --git a/interfaces/ValidatorsExitBusOracle.json b/interfaces/ValidatorsExitBusOracle.json index 9c30845be..837da4724 100644 --- a/interfaces/ValidatorsExitBusOracle.json +++ b/interfaces/ValidatorsExitBusOracle.json @@ -1 +1,1641 @@ -[{"inputs":[{"internalType":"uint256","name":"secondsPerSlot","type":"uint256"},{"internalType":"uint256","name":"genesisTime","type":"uint256"},{"internalType":"address","name":"lidoLocator","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AddressCannotBeSame","type":"error"},{"inputs":[],"name":"AddressCannotBeZero","type":"error"},{"inputs":[],"name":"AdminCannotBeZero","type":"error"},{"inputs":[],"name":"ArgumentOutOfBounds","type":"error"},{"inputs":[],"name":"HashCannotBeZero","type":"error"},{"inputs":[{"internalType":"uint256","name":"initialRefSlot","type":"uint256"},{"internalType":"uint256","name":"processingRefSlot","type":"uint256"}],"name":"InitialRefSlotCannotBeLessThanProcessingOne","type":"error"},{"inputs":[],"name":"InvalidContractVersionIncrement","type":"error"},{"inputs":[],"name":"InvalidRequestsData","type":"error"},{"inputs":[],"name":"InvalidRequestsDataLength","type":"error"},{"inputs":[],"name":"InvalidRequestsDataSortOrder","type":"error"},{"inputs":[],"name":"NoConsensusReportToProcess","type":"error"},{"inputs":[{"internalType":"uint256","name":"moduleId","type":"uint256"},{"internalType":"uint256","name":"nodeOpId","type":"uint256"},{"internalType":"uint256","name":"prevRequestedValidatorIndex","type":"uint256"},{"internalType":"uint256","name":"requestedValidatorIndex","type":"uint256"}],"name":"NodeOpValidatorIndexMustIncrease","type":"error"},{"inputs":[],"name":"NonZeroContractVersionOnInit","type":"error"},{"inputs":[],"name":"PauseUntilMustBeInFuture","type":"error"},{"inputs":[],"name":"PausedExpected","type":"error"},{"inputs":[{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"ProcessingDeadlineMissed","type":"error"},{"inputs":[],"name":"RefSlotAlreadyProcessing","type":"error"},{"inputs":[{"internalType":"uint256","name":"refSlot","type":"uint256"},{"internalType":"uint256","name":"prevRefSlot","type":"uint256"}],"name":"RefSlotCannotDecrease","type":"error"},{"inputs":[{"internalType":"uint256","name":"refSlot","type":"uint256"},{"internalType":"uint256","name":"processingRefSlot","type":"uint256"}],"name":"RefSlotMustBeGreaterThanProcessingOne","type":"error"},{"inputs":[],"name":"ResumedExpected","type":"error"},{"inputs":[],"name":"SecondsPerSlotCannotBeZero","type":"error"},{"inputs":[],"name":"SenderIsNotTheConsensusContract","type":"error"},{"inputs":[],"name":"SenderNotAllowed","type":"error"},{"inputs":[],"name":"UnexpectedChainConfig","type":"error"},{"inputs":[{"internalType":"uint256","name":"expectedVersion","type":"uint256"},{"internalType":"uint256","name":"receivedVersion","type":"uint256"}],"name":"UnexpectedConsensusVersion","type":"error"},{"inputs":[{"internalType":"uint256","name":"expected","type":"uint256"},{"internalType":"uint256","name":"received","type":"uint256"}],"name":"UnexpectedContractVersion","type":"error"},{"inputs":[{"internalType":"bytes32","name":"consensusHash","type":"bytes32"},{"internalType":"bytes32","name":"receivedHash","type":"bytes32"}],"name":"UnexpectedDataHash","type":"error"},{"inputs":[{"internalType":"uint256","name":"consensusRefSlot","type":"uint256"},{"internalType":"uint256","name":"dataRefSlot","type":"uint256"}],"name":"UnexpectedRefSlot","type":"error"},{"inputs":[],"name":"UnexpectedRequestsDataLength","type":"error"},{"inputs":[{"internalType":"uint256","name":"format","type":"uint256"}],"name":"UnsupportedRequestsDataFormat","type":"error"},{"inputs":[],"name":"VersionCannotBeSame","type":"error"},{"inputs":[],"name":"ZeroPauseDuration","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"addr","type":"address"},{"indexed":true,"internalType":"address","name":"prevAddr","type":"address"}],"name":"ConsensusHashContractSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"version","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"prevVersion","type":"uint256"}],"name":"ConsensusVersionSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"version","type":"uint256"}],"name":"ContractVersionSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"refSlot","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"hash","type":"bytes32"}],"name":"ProcessingStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"refSlot","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"hash","type":"bytes32"}],"name":"ReportDiscarded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"refSlot","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"hash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"processingDeadlineTime","type":"uint256"}],"name":"ReportSubmitted","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":"uint256","name":"stakingModuleId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"nodeOperatorId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"validatorIndex","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"validatorPubkey","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"ValidatorExitRequest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"refSlot","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"requestsProcessed","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"requestsCount","type":"uint256"}],"name":"WarnDataIncompleteProcessing","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"refSlot","type":"uint256"}],"name":"WarnProcessingMissed","type":"event"},{"inputs":[],"name":"DATA_FORMAT_LIST","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GENESIS_TIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MANAGE_CONSENSUS_CONTRACT_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MANAGE_CONSENSUS_VERSION_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"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":"RESUME_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SECONDS_PER_SLOT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SUBMIT_DATA_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"refSlot","type":"uint256"}],"name":"discardConsensusReport","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getConsensusContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getConsensusReport","outputs":[{"internalType":"bytes32","name":"hash","type":"bytes32"},{"internalType":"uint256","name":"refSlot","type":"uint256"},{"internalType":"uint256","name":"processingDeadlineTime","type":"uint256"},{"internalType":"bool","name":"processingStarted","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getConsensusVersion","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getContractVersion","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLastProcessingRefSlot","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"moduleId","type":"uint256"},{"internalType":"uint256[]","name":"nodeOpIds","type":"uint256[]"}],"name":"getLastRequestedValidatorIndices","outputs":[{"internalType":"int256[]","name":"","type":"int256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getProcessingState","outputs":[{"components":[{"internalType":"uint256","name":"currentFrameRefSlot","type":"uint256"},{"internalType":"uint256","name":"processingDeadlineTime","type":"uint256"},{"internalType":"bytes32","name":"dataHash","type":"bytes32"},{"internalType":"bool","name":"dataSubmitted","type":"bool"},{"internalType":"uint256","name":"dataFormat","type":"uint256"},{"internalType":"uint256","name":"requestsCount","type":"uint256"},{"internalType":"uint256","name":"requestsSubmitted","type":"uint256"}],"internalType":"struct ValidatorsExitBusOracle.ProcessingState","name":"result","type":"tuple"}],"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":[],"name":"getTotalRequestsProcessed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"address","name":"consensusContract","type":"address"},{"internalType":"uint256","name":"consensusVersion","type":"uint256"},{"internalType":"uint256","name":"lastProcessingRefSlot","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","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":"addr","type":"address"}],"name":"setConsensusContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"version","type":"uint256"}],"name":"setConsensusVersion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"reportHash","type":"bytes32"},{"internalType":"uint256","name":"refSlot","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"submitConsensusReport","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"consensusVersion","type":"uint256"},{"internalType":"uint256","name":"refSlot","type":"uint256"},{"internalType":"uint256","name":"requestsCount","type":"uint256"},{"internalType":"uint256","name":"dataFormat","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct ValidatorsExitBusOracle.ReportData","name":"data","type":"tuple"},{"internalType":"uint256","name":"contractVersion","type":"uint256"}],"name":"submitReportData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}] \ No newline at end of file +[ + { + "inputs": [ + { + "internalType": "uint256", + "name": "secondsPerSlot", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "genesisTime", + "type": "uint256" + }, + { + "internalType": "address", + "name": "lidoLocator", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AddressCannotBeSame", + "type": "error" + }, + { + "inputs": [], + "name": "AddressCannotBeZero", + "type": "error" + }, + { + "inputs": [], + "name": "AdminCannotBeZero", + "type": "error" + }, + { + "inputs": [], + "name": "ArgumentOutOfBounds", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "exitDataIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "requestsCount", + "type": "uint256" + } + ], + "name": "ExitDataIndexOutOfRange", + "type": "error" + }, + { + "inputs": [], + "name": "ExitHashAlreadySubmitted", + "type": "error" + }, + { + "inputs": [], + "name": "ExitHashNotSubmitted", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "requestsCount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "remainingLimit", + "type": "uint256" + } + ], + "name": "ExitRequestsLimitExceeded", + "type": "error" + }, + { + "inputs": [], + "name": "HashCannotBeZero", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "initialRefSlot", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "processingRefSlot", + "type": "uint256" + } + ], + "name": "InitialRefSlotCannotBeLessThanProcessingOne", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidContractVersionIncrement", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidExitDataIndexSortOrder", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidModuleId", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidRequestsDataLength", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidRequestsDataSortOrder", + "type": "error" + }, + { + "inputs": [], + "name": "LimitExceeded", + "type": "error" + }, + { + "inputs": [], + "name": "NoConsensusReportToProcess", + "type": "error" + }, + { + "inputs": [], + "name": "NonZeroContractVersionOnInit", + "type": "error" + }, + { + "inputs": [], + "name": "PauseUntilMustBeInFuture", + "type": "error" + }, + { + "inputs": [], + "name": "PausedExpected", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "ProcessingDeadlineMissed", + "type": "error" + }, + { + "inputs": [], + "name": "RefSlotAlreadyProcessing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "refSlot", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "prevRefSlot", + "type": "uint256" + } + ], + "name": "RefSlotCannotDecrease", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "refSlot", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "processingRefSlot", + "type": "uint256" + } + ], + "name": "RefSlotMustBeGreaterThanProcessingOne", + "type": "error" + }, + { + "inputs": [], + "name": "RequestsAlreadyDelivered", + "type": "error" + }, + { + "inputs": [], + "name": "RequestsNotDelivered", + "type": "error" + }, + { + "inputs": [], + "name": "ResumedExpected", + "type": "error" + }, + { + "inputs": [], + "name": "SecondsPerSlotCannotBeZero", + "type": "error" + }, + { + "inputs": [], + "name": "SenderIsNotTheConsensusContract", + "type": "error" + }, + { + "inputs": [], + "name": "SenderNotAllowed", + "type": "error" + }, + { + "inputs": [], + "name": "TooLargeExitsPerFrame", + "type": "error" + }, + { + "inputs": [], + "name": "TooLargeFrameDuration", + "type": "error" + }, + { + "inputs": [], + "name": "TooLargeMaxExitRequestsLimit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "requestsCount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxRequestsPerReport", + "type": "uint256" + } + ], + "name": "TooManyExitRequestsInReport", + "type": "error" + }, + { + "inputs": [], + "name": "UnexpectedChainConfig", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedVersion", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "receivedVersion", + "type": "uint256" + } + ], + "name": "UnexpectedConsensusVersion", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "UnexpectedContractVersion", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "consensusHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "receivedHash", + "type": "bytes32" + } + ], + "name": "UnexpectedDataHash", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "consensusRefSlot", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "dataRefSlot", + "type": "uint256" + } + ], + "name": "UnexpectedRefSlot", + "type": "error" + }, + { + "inputs": [], + "name": "UnexpectedRequestsDataLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "format", + "type": "uint256" + } + ], + "name": "UnsupportedRequestsDataFormat", + "type": "error" + }, + { + "inputs": [], + "name": "VersionCannotBeSame", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "name": "ZeroArgument", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroFrameDuration", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroPauseDuration", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "prevAddr", + "type": "address" + } + ], + "name": "ConsensusHashContractSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "version", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "prevVersion", + "type": "uint256" + } + ], + "name": "ConsensusVersionSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "version", + "type": "uint256" + } + ], + "name": "ContractVersionSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "exitRequestsHash", + "type": "bytes32" + } + ], + "name": "ExitDataProcessing", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "maxExitRequestsLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "exitsPerFrame", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "frameDurationInSec", + "type": "uint256" + } + ], + "name": "ExitRequestsLimitSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "duration", + "type": "uint256" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "refSlot", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + } + ], + "name": "ProcessingStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "refSlot", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + } + ], + "name": "ReportDiscarded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "refSlot", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "processingDeadlineTime", + "type": "uint256" + } + ], + "name": "ReportSubmitted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "exitRequestsHash", + "type": "bytes32" + } + ], + "name": "RequestsHashSubmitted", + "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": "uint256", + "name": "stakingModuleId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "nodeOperatorId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "validatorIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "validatorPubkey", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "ValidatorExitRequest", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "refSlot", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "requestsProcessed", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "requestsCount", + "type": "uint256" + } + ], + "name": "WarnDataIncompleteProcessing", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "refSlot", + "type": "uint256" + } + ], + "name": "WarnProcessingMissed", + "type": "event" + }, + { + "inputs": [], + "name": "DATA_FORMAT_LIST", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXIT_REQUEST_LIMIT_MANAGER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXIT_TYPE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "GENESIS_TIME", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MANAGE_CONSENSUS_CONTRACT_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MANAGE_CONSENSUS_VERSION_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "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": "RESUME_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "SECONDS_PER_SLOT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "SUBMIT_DATA_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "SUBMIT_REPORT_HASH_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "refSlot", + "type": "uint256" + } + ], + "name": "discardConsensusReport", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "maxValidatorsPerReport", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxExitRequestsLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "exitsPerFrame", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "frameDurationInSec", + "type": "uint256" + } + ], + "name": "finalizeUpgrade_v2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getConsensusContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getConsensusReport", + "outputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "refSlot", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "processingDeadlineTime", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "processingStarted", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getConsensusVersion", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getContractVersion", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "exitRequestsHash", + "type": "bytes32" + } + ], + "name": "getDeliveryTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "deliveryDateTimestamp", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getExitRequestLimitFullInfo", + "outputs": [ + { + "internalType": "uint256", + "name": "maxExitRequestsLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "exitsPerFrame", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "frameDurationInSec", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "prevExitRequestsLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "currentExitRequestsLimit", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getLastProcessingRefSlot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMaxValidatorsPerReport", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getProcessingState", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "currentFrameRefSlot", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "processingDeadlineTime", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "dataHash", + "type": "bytes32" + }, + { + "internalType": "bool", + "name": "dataSubmitted", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "dataFormat", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "requestsCount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "requestsSubmitted", + "type": "uint256" + } + ], + "internalType": "struct ValidatorsExitBusOracle.ProcessingState", + "name": "result", + "type": "tuple" + } + ], + "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": [], + "name": "getTotalRequestsProcessed", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "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": "address", + "name": "consensusContract", + "type": "address" + }, + { + "internalType": "uint256", + "name": "consensusVersion", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastProcessingRefSlot", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxValidatorsPerRequest", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxExitRequestsLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "exitsPerFrame", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "frameDurationInSec", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isPaused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "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": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "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": "addr", + "type": "address" + } + ], + "name": "setConsensusContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "version", + "type": "uint256" + } + ], + "name": "setConsensusVersion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "maxExitRequestsLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "exitsPerFrame", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "frameDurationInSec", + "type": "uint256" + } + ], + "name": "setExitRequestLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "maxRequests", + "type": "uint256" + } + ], + "name": "setMaxValidatorsPerReport", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "reportHash", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "refSlot", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "submitConsensusReport", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "dataFormat", + "type": "uint256" + } + ], + "internalType": "struct ValidatorsExitBus.ExitRequestsData", + "name": "request", + "type": "tuple" + } + ], + "name": "submitExitRequestsData", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "exitRequestsHash", + "type": "bytes32" + } + ], + "name": "submitExitRequestsHash", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "consensusVersion", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "refSlot", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "requestsCount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "dataFormat", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct ValidatorsExitBusOracle.ReportData", + "name": "data", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "contractVersion", + "type": "uint256" + } + ], + "name": "submitReportData", + "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": "data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "dataFormat", + "type": "uint256" + } + ], + "internalType": "struct ValidatorsExitBus.ExitRequestsData", + "name": "exitsData", + "type": "tuple" + }, + { + "internalType": "uint256[]", + "name": "exitDataIndexes", + "type": "uint256[]" + }, + { + "internalType": "address", + "name": "refundRecipient", + "type": "address" + } + ], + "name": "triggerExits", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "exitRequests", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "dataFormat", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "unpackExitRequest", + "outputs": [ + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "nodeOpId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "moduleId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "valIndex", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + } +] diff --git a/interfaces/WithdrawalVault.json b/interfaces/WithdrawalVault.json index cf8287e26..4d6c2157a 100644 --- a/interfaces/WithdrawalVault.json +++ b/interfaces/WithdrawalVault.json @@ -1 +1,371 @@ -[{"inputs":[{"internalType":"contract ILido","name":"_lido","type":"address"},{"internalType":"address","name":"_treasury","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidContractVersionIncrement","type":"error"},{"inputs":[],"name":"LidoZeroAddress","type":"error"},{"inputs":[],"name":"NonZeroContractVersionOnInit","type":"error"},{"inputs":[{"internalType":"uint256","name":"requested","type":"uint256"},{"internalType":"uint256","name":"balance","type":"uint256"}],"name":"NotEnoughEther","type":"error"},{"inputs":[],"name":"NotLido","type":"error"},{"inputs":[],"name":"TreasuryZeroAddress","type":"error"},{"inputs":[{"internalType":"uint256","name":"expected","type":"uint256"},{"internalType":"uint256","name":"received","type":"uint256"}],"name":"UnexpectedContractVersion","type":"error"},{"inputs":[],"name":"ZeroAmount","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"version","type":"uint256"}],"name":"ContractVersionSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"requestedBy","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20Recovered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"requestedBy","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721Recovered","type":"event"},{"inputs":[],"name":"LIDO","outputs":[{"internalType":"contract ILido","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TREASURY","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getContractVersion","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"_token","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"recoverERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawWithdrawals","outputs":[],"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file +[ + { + "inputs": [ + { + "internalType": "address", + "name": "_lido", + "type": "address" + }, + { + "internalType": "address", + "name": "_treasury", + "type": "address" + }, + { + "internalType": "address", + "name": "_triggerableWithdrawalsGateway", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "firstArrayLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "secondArrayLength", + "type": "uint256" + } + ], + "name": "ArraysLengthMismatch", + "type": "error" + }, + { + "inputs": [], + "name": "FeeInvalidData", + "type": "error" + }, + { + "inputs": [], + "name": "FeeReadFailed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "providedFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "requiredFee", + "type": "uint256" + } + ], + "name": "IncorrectFee", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidContractVersionIncrement", + "type": "error" + }, + { + "inputs": [], + "name": "NonZeroContractVersionOnInit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "requested", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "name": "NotEnoughEther", + "type": "error" + }, + { + "inputs": [], + "name": "NotLido", + "type": "error" + }, + { + "inputs": [], + "name": "NotTriggerableWithdrawalsGateway", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "callData", + "type": "bytes" + } + ], + "name": "RequestAdditionFailed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } + ], + "name": "UnexpectedContractVersion", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAmount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "name": "ZeroArgument", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "version", + "type": "uint256" + } + ], + "name": "ContractVersionSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "requestedBy", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ERC20Recovered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "requestedBy", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721Recovered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "request", + "type": "bytes" + } + ], + "name": "WithdrawalRequestAdded", + "type": "event" + }, + { + "inputs": [], + "name": "LIDO", + "outputs": [ + { + "internalType": "contract ILido", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "TREASURY", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "TRIGGERABLE_WITHDRAWALS_GATEWAY", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "pubkeys", + "type": "bytes[]" + }, + { + "internalType": "uint64[]", + "name": "amounts", + "type": "uint64[]" + } + ], + "name": "addWithdrawalRequests", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "finalizeUpgrade_v2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getContractVersion", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getWithdrawalRequestFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "recoverERC20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC721", + "name": "_token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "recoverERC721", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawWithdrawals", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/interfaces/WithdrawalsManagerProxy.json b/interfaces/WithdrawalsManagerProxy.json new file mode 100644 index 000000000..92f4356bb --- /dev/null +++ b/interfaces/WithdrawalsManagerProxy.json @@ -0,0 +1,81 @@ +[ + { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { "stateMutability": "payable", "type": "fallback" }, + { + "inputs": [], + "name": "implementation", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "newAdmin", "type": "address" } + ], + "name": "proxy_changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "proxy_getAdmin", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxy_getIsOssified", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { "internalType": "bytes", "name": "setupCalldata", "type": "bytes" } + ], + "name": "proxy_upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { "stateMutability": "payable", "type": "receive" } +] diff --git a/interfaces/csm/CSAccounting.json b/interfaces/csm/CSAccounting.json deleted file mode 100644 index 8dc94bed9..000000000 --- a/interfaces/csm/CSAccounting.json +++ /dev/null @@ -1,2299 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "lidoLocator", - "type": "address", - "internalType": "address" - }, - { - "name": "communityStakingModule", - "type": "address", - "internalType": "address" - }, - { - "name": "maxCurveLength", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "minBondLockRetentionPeriod", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "maxBondLockRetentionPeriod", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "ACCOUNTING_MANAGER_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "CSM", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract ICSModule" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "DEFAULT_ADMIN_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "DEFAULT_BOND_CURVE_ID", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "LIDO", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract ILido" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "LIDO_LOCATOR", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract ILidoLocator" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "MANAGE_BOND_CURVES_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "MAX_BOND_LOCK_RETENTION_PERIOD", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "MAX_CURVE_LENGTH", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "MIN_BOND_LOCK_RETENTION_PERIOD", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "MIN_CURVE_LENGTH", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PAUSE_INFINITELY", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PAUSE_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "RECOVERER_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "RESET_BOND_CURVE_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "RESUME_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "SET_BOND_CURVE_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "WITHDRAWAL_QUEUE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IWithdrawalQueue" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "WSTETH", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IWstETH" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "addBondCurve", - "inputs": [ - { - "name": "bondCurve", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "outputs": [ - { - "name": "id", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "chargeFee", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "chargePenaltyRecipient", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "claimRewardsStETH", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "stETHAmount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "rewardAddress", - "type": "address", - "internalType": "address" - }, - { - "name": "cumulativeFeeShares", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "rewardsProof", - "type": "bytes32[]", - "internalType": "bytes32[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "claimRewardsUnstETH", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "stEthAmount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "rewardAddress", - "type": "address", - "internalType": "address" - }, - { - "name": "cumulativeFeeShares", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "rewardsProof", - "type": "bytes32[]", - "internalType": "bytes32[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "claimRewardsWstETH", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "wstETHAmount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "rewardAddress", - "type": "address", - "internalType": "address" - }, - { - "name": "cumulativeFeeShares", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "rewardsProof", - "type": "bytes32[]", - "internalType": "bytes32[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "compensateLockedBondETH", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "depositETH", - "inputs": [ - { - "name": "from", - "type": "address", - "internalType": "address" - }, - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "depositStETH", - "inputs": [ - { - "name": "from", - "type": "address", - "internalType": "address" - }, - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "stETHAmount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "permit", - "type": "tuple", - "internalType": "struct ICSAccounting.PermitInput", - "components": [ - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "v", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "r", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "depositWstETH", - "inputs": [ - { - "name": "from", - "type": "address", - "internalType": "address" - }, - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "wstETHAmount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "permit", - "type": "tuple", - "internalType": "struct ICSAccounting.PermitInput", - "components": [ - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "v", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "r", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "feeDistributor", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract ICSFeeDistributor" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getActualLockedBond", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getBond", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getBondAmountByKeysCount", - "inputs": [ - { - "name": "keys", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "curve", - "type": "tuple", - "internalType": "struct ICSBondCurve.BondCurve", - "components": [ - { - "name": "points", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "trend", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "pure" - }, - { - "type": "function", - "name": "getBondAmountByKeysCount", - "inputs": [ - { - "name": "keys", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "curveId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getBondAmountByKeysCountWstETH", - "inputs": [ - { - "name": "keysCount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "curveId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getBondAmountByKeysCountWstETH", - "inputs": [ - { - "name": "keysCount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "curve", - "type": "tuple", - "internalType": "struct ICSBondCurve.BondCurve", - "components": [ - { - "name": "points", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "trend", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getBondCurve", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct ICSBondCurve.BondCurve", - "components": [ - { - "name": "points", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "trend", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getBondCurveId", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getBondLockRetentionPeriod", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getBondShares", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getBondSummary", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "current", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "required", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getBondSummaryShares", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "current", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "required", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getCurveInfo", - "inputs": [ - { - "name": "curveId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct ICSBondCurve.BondCurve", - "components": [ - { - "name": "points", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "trend", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getKeysCountByBondAmount", - "inputs": [ - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "curve", - "type": "tuple", - "internalType": "struct ICSBondCurve.BondCurve", - "components": [ - { - "name": "points", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "trend", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "pure" - }, - { - "type": "function", - "name": "getKeysCountByBondAmount", - "inputs": [ - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "curveId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getLockedBondInfo", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct ICSBondLock.BondLock", - "components": [ - { - "name": "amount", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "retentionUntil", - "type": "uint128", - "internalType": "uint128" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getRequiredBondForNextKeys", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "additionalKeys", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getRequiredBondForNextKeysWstETH", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "additionalKeys", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getResumeSinceTimestamp", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getRoleAdmin", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getRoleMember", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "index", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getRoleMemberCount", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getUnbondedKeysCount", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getUnbondedKeysCountToEject", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "grantRole", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "hasRole", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "bondCurve", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "admin", - "type": "address", - "internalType": "address" - }, - { - "name": "_feeDistributor", - "type": "address", - "internalType": "address" - }, - { - "name": "bondLockRetentionPeriod", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "_chargePenaltyRecipient", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "isPaused", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "lockBondETH", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "pauseFor", - "inputs": [ - { - "name": "duration", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "penalize", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "pullFeeRewards", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "cumulativeFeeShares", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "rewardsProof", - "type": "bytes32[]", - "internalType": "bytes32[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "recoverERC1155", - "inputs": [ - { - "name": "token", - "type": "address", - "internalType": "address" - }, - { - "name": "tokenId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "recoverERC20", - "inputs": [ - { - "name": "token", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "recoverERC721", - "inputs": [ - { - "name": "token", - "type": "address", - "internalType": "address" - }, - { - "name": "tokenId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "recoverEther", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "recoverStETHShares", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "releaseLockedBondETH", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "renewBurnerAllowance", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "renounceRole", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "callerConfirmation", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "resetBondCurve", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "resume", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "revokeRole", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setBondCurve", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "curveId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setChargePenaltyRecipient", - "inputs": [ - { - "name": "_chargePenaltyRecipient", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setLockedBondRetentionPeriod", - "inputs": [ - { - "name": "retention", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "settleLockedBondETH", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "settledAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "supportsInterface", - "inputs": [ - { - "name": "interfaceId", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "totalBondShares", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "updateBondCurve", - "inputs": [ - { - "name": "curveId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "bondCurve", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "BondBurned", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "toBurnAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "burnedAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "BondCharged", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "toChargeAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "chargedAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "BondClaimedStETH", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "to", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "BondClaimedUnstETH", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "to", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "requestId", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "BondClaimedWstETH", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "to", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "BondCurveAdded", - "inputs": [ - { - "name": "bondCurve", - "type": "uint256[]", - "indexed": false, - "internalType": "uint256[]" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "BondCurveSet", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "curveId", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "BondCurveUpdated", - "inputs": [ - { - "name": "curveId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "bondCurve", - "type": "uint256[]", - "indexed": false, - "internalType": "uint256[]" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "BondDepositedETH", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "from", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "BondDepositedStETH", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "from", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "BondDepositedWstETH", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "from", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "BondLockChanged", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "newAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "retentionUntil", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "BondLockCompensated", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "BondLockRemoved", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "BondLockRetentionPeriodChanged", - "inputs": [ - { - "name": "retentionPeriod", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ChargePenaltyRecipientSet", - "inputs": [ - { - "name": "chargePenaltyRecipient", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ERC1155Recovered", - "inputs": [ - { - "name": "token", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "tokenId", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "recipient", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ERC20Recovered", - "inputs": [ - { - "name": "token", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "recipient", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ERC721Recovered", - "inputs": [ - { - "name": "token", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "tokenId", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "recipient", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "EtherRecovered", - "inputs": [ - { - "name": "recipient", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Initialized", - "inputs": [ - { - "name": "version", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Paused", - "inputs": [ - { - "name": "duration", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Resumed", - "inputs": [], - "anonymous": false - }, - { - "type": "event", - "name": "RoleAdminChanged", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "previousAdminRole", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "newAdminRole", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RoleGranted", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "sender", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RoleRevoked", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "sender", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "StETHSharesRecovered", - "inputs": [ - { - "name": "recipient", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "shares", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AccessControlBadConfirmation", - "inputs": [] - }, - { - "type": "error", - "name": "AccessControlUnauthorizedAccount", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - }, - { - "name": "neededRole", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "ElRewardsVaultReceiveFailed", - "inputs": [] - }, - { - "type": "error", - "name": "FailedToSendEther", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidBondCurveId", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidBondCurveLength", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidBondCurveMaxLength", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidBondCurveValues", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidBondLockAmount", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidBondLockRetentionPeriod", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInitialisationCurveId", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "NodeOperatorDoesNotExist", - "inputs": [] - }, - { - "type": "error", - "name": "NotAllowedToRecover", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "NothingToClaim", - "inputs": [] - }, - { - "type": "error", - "name": "PauseUntilMustBeInFuture", - "inputs": [] - }, - { - "type": "error", - "name": "PausedExpected", - "inputs": [] - }, - { - "type": "error", - "name": "ResumedExpected", - "inputs": [] - }, - { - "type": "error", - "name": "SafeCastOverflowedUintDowncast", - "inputs": [ - { - "name": "bits", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "SenderIsNotCSM", - "inputs": [] - }, - { - "type": "error", - "name": "ZeroAdminAddress", - "inputs": [] - }, - { - "type": "error", - "name": "ZeroChargePenaltyRecipientAddress", - "inputs": [] - }, - { - "type": "error", - "name": "ZeroFeeDistributorAddress", - "inputs": [] - }, - { - "type": "error", - "name": "ZeroLocatorAddress", - "inputs": [] - }, - { - "type": "error", - "name": "ZeroModuleAddress", - "inputs": [] - }, - { - "type": "error", - "name": "ZeroPauseDuration", - "inputs": [] - } - ] diff --git a/interfaces/csm/CSFeeDistributor.json b/interfaces/csm/CSFeeDistributor.json deleted file mode 100644 index 26a88ba29..000000000 --- a/interfaces/csm/CSFeeDistributor.json +++ /dev/null @@ -1,849 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "stETH", - "type": "address", - "internalType": "address" - }, - { - "name": "accounting", - "type": "address", - "internalType": "address" - }, - { - "name": "oracle", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "ACCOUNTING", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "DEFAULT_ADMIN_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "ORACLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "RECOVERER_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "STETH", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IStETH" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "distributeFees", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "shares", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "proof", - "type": "bytes32[]", - "internalType": "bytes32[]" - } - ], - "outputs": [ - { - "name": "sharesToDistribute", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "distributedShares", - "inputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getFeesToDistribute", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "shares", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "proof", - "type": "bytes32[]", - "internalType": "bytes32[]" - } - ], - "outputs": [ - { - "name": "sharesToDistribute", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getRoleAdmin", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getRoleMember", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "index", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getRoleMemberCount", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "grantRole", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "hasRole", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "hashLeaf", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "shares", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "pure" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "admin", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "pendingSharesToDistribute", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "processOracleReport", - "inputs": [ - { - "name": "_treeRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "_treeCid", - "type": "string", - "internalType": "string" - }, - { - "name": "distributed", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "recoverERC1155", - "inputs": [ - { - "name": "token", - "type": "address", - "internalType": "address" - }, - { - "name": "tokenId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "recoverERC20", - "inputs": [ - { - "name": "token", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "recoverERC721", - "inputs": [ - { - "name": "token", - "type": "address", - "internalType": "address" - }, - { - "name": "tokenId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "recoverEther", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "renounceRole", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "callerConfirmation", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "revokeRole", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "supportsInterface", - "inputs": [ - { - "name": "interfaceId", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "totalClaimableShares", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "treeCid", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "treeRoot", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "event", - "name": "DistributionDataUpdated", - "inputs": [ - { - "name": "totalClaimableShares", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "treeRoot", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - }, - { - "name": "treeCid", - "type": "string", - "indexed": false, - "internalType": "string" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ERC1155Recovered", - "inputs": [ - { - "name": "token", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "tokenId", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "recipient", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ERC20Recovered", - "inputs": [ - { - "name": "token", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "recipient", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ERC721Recovered", - "inputs": [ - { - "name": "token", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "tokenId", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "recipient", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "EtherRecovered", - "inputs": [ - { - "name": "recipient", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "FeeDistributed", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "shares", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Initialized", - "inputs": [ - { - "name": "version", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RoleAdminChanged", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "previousAdminRole", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "newAdminRole", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RoleGranted", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "sender", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RoleRevoked", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "sender", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "StETHSharesRecovered", - "inputs": [ - { - "name": "recipient", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "shares", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AccessControlBadConfirmation", - "inputs": [] - }, - { - "type": "error", - "name": "AccessControlUnauthorizedAccount", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - }, - { - "name": "neededRole", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "FailedToSendEther", - "inputs": [] - }, - { - "type": "error", - "name": "FeeSharesDecrease", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidProof", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidShares", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidTreeCID", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidTreeRoot", - "inputs": [] - }, - { - "type": "error", - "name": "NotAccounting", - "inputs": [] - }, - { - "type": "error", - "name": "NotAllowedToRecover", - "inputs": [] - }, - { - "type": "error", - "name": "NotEnoughShares", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "NotOracle", - "inputs": [] - }, - { - "type": "error", - "name": "ZeroAccountingAddress", - "inputs": [] - }, - { - "type": "error", - "name": "ZeroAdminAddress", - "inputs": [] - }, - { - "type": "error", - "name": "ZeroOracleAddress", - "inputs": [] - }, - { - "type": "error", - "name": "ZeroStEthAddress", - "inputs": [] - } - ] diff --git a/interfaces/csm/CSFeeOracle.json b/interfaces/csm/CSFeeOracle.json deleted file mode 100644 index d08f0a893..000000000 --- a/interfaces/csm/CSFeeOracle.json +++ /dev/null @@ -1,1381 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "uint256", - "name": "secondsPerSlot", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "genesisTime", - "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": [], - "name": "AddressCannotBeSame", - "type": "error" - }, - { - "inputs": [], - "name": "AddressCannotBeZero", - "type": "error" - }, - { - "inputs": [], - "name": "FailedToSendEther", - "type": "error" - }, - { - "inputs": [], - "name": "HashCannotBeZero", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "initialRefSlot", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "processingRefSlot", - "type": "uint256" - } - ], - "name": "InitialRefSlotCannotBeLessThanProcessingOne", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidContractVersion", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidContractVersionIncrement", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidInitialization", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidPerfLeeway", - "type": "error" - }, - { - "inputs": [], - "name": "NoConsensusReportToProcess", - "type": "error" - }, - { - "inputs": [], - "name": "NonZeroContractVersionOnInit", - "type": "error" - }, - { - "inputs": [], - "name": "NotAllowedToRecover", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "PauseUntilMustBeInFuture", - "type": "error" - }, - { - "inputs": [], - "name": "PausedExpected", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "ProcessingDeadlineMissed", - "type": "error" - }, - { - "inputs": [], - "name": "RefSlotAlreadyProcessing", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "refSlot", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "prevRefSlot", - "type": "uint256" - } - ], - "name": "RefSlotCannotDecrease", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "refSlot", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "processingRefSlot", - "type": "uint256" - } - ], - "name": "RefSlotMustBeGreaterThanProcessingOne", - "type": "error" - }, - { - "inputs": [], - "name": "ResumedExpected", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint8", - "name": "bits", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "SafeCastOverflowedUintDowncast", - "type": "error" - }, - { - "inputs": [], - "name": "SecondsPerSlotCannotBeZero", - "type": "error" - }, - { - "inputs": [], - "name": "SenderIsNotTheConsensusContract", - "type": "error" - }, - { - "inputs": [], - "name": "SenderNotAllowed", - "type": "error" - }, - { - "inputs": [], - "name": "UnexpectedChainConfig", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expectedVersion", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "receivedVersion", - "type": "uint256" - } - ], - "name": "UnexpectedConsensusVersion", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "received", - "type": "uint256" - } - ], - "name": "UnexpectedContractVersion", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "consensusHash", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "receivedHash", - "type": "bytes32" - } - ], - "name": "UnexpectedDataHash", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "consensusRefSlot", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "dataRefSlot", - "type": "uint256" - } - ], - "name": "UnexpectedRefSlot", - "type": "error" - }, - { - "inputs": [], - "name": "VersionCannotBeSame", - "type": "error" - }, - { - "inputs": [], - "name": "VersionCannotBeZero", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroAdminAddress", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroFeeDistributorAddress", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroPauseDuration", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "prevAddr", - "type": "address" - } - ], - "name": "ConsensusHashContractSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "version", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "prevVersion", - "type": "uint256" - } - ], - "name": "ConsensusVersionSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "version", - "type": "uint256" - } - ], - "name": "ContractVersionSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "ERC1155Recovered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "ERC20Recovered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - } - ], - "name": "ERC721Recovered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "EtherRecovered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "feeDistributorContract", - "type": "address" - } - ], - "name": "FeeDistributorContractSet", - "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": [ - { - "indexed": false, - "internalType": "uint256", - "name": "valueBP", - "type": "uint256" - } - ], - "name": "PerfLeewaySet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "refSlot", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "hash", - "type": "bytes32" - } - ], - "name": "ProcessingStarted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "refSlot", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "hash", - "type": "bytes32" - } - ], - "name": "ReportDiscarded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "refSlot", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "hash", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "processingDeadlineTime", - "type": "uint256" - } - ], - "name": "ReportSubmitted", - "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": "recipient", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "name": "StETHSharesRecovered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "refSlot", - "type": "uint256" - } - ], - "name": "WarnProcessingMissed", - "type": "event" - }, - { - "inputs": [], - "name": "CONTRACT_MANAGER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GENESIS_TIME", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MANAGE_CONSENSUS_CONTRACT_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MANAGE_CONSENSUS_VERSION_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "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": "RECOVERER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "RESUME_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "SECONDS_PER_SLOT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "SUBMIT_DATA_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "avgPerfLeewayBP", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "refSlot", - "type": "uint256" - } - ], - "name": "discardConsensusReport", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "feeDistributor", - "outputs": [ - { - "internalType": "contract ICSFeeDistributor", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getConsensusContract", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getConsensusReport", - "outputs": [ - { - "internalType": "bytes32", - "name": "hash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "refSlot", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "processingDeadlineTime", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "processingStarted", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getConsensusVersion", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getContractVersion", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getLastProcessingRefSlot", - "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" - }, - { - "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": "address", - "name": "feeDistributorContract", - "type": "address" - }, - { - "internalType": "address", - "name": "consensusContract", - "type": "address" - }, - { - "internalType": "uint256", - "name": "consensusVersion", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_avgPerfLeewayBP", - "type": "uint256" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "isPaused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "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": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "recoverERC1155", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "recoverERC20", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "recoverERC721", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "recoverEther", - "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": "addr", - "type": "address" - } - ], - "name": "setConsensusContract", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "version", - "type": "uint256" - } - ], - "name": "setConsensusVersion", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "feeDistributorContract", - "type": "address" - } - ], - "name": "setFeeDistributorContract", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "valueBP", - "type": "uint256" - } - ], - "name": "setPerformanceLeeway", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "reportHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "refSlot", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "submitConsensusReport", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "consensusVersion", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "refSlot", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "treeRoot", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "treeCid", - "type": "string" - }, - { - "internalType": "string", - "name": "logCid", - "type": "string" - }, - { - "internalType": "uint256", - "name": "distributed", - "type": "uint256" - } - ], - "internalType": "struct CSFeeOracle.ReportData", - "name": "data", - "type": "tuple" - }, - { - "internalType": "uint256", - "name": "contractVersion", - "type": "uint256" - } - ], - "name": "submitReportData", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/interfaces/csm/CSHashConsensus.json b/interfaces/csm/CSHashConsensus.json deleted file mode 100644 index afa2ea3cf..000000000 --- a/interfaces/csm/CSHashConsensus.json +++ /dev/null @@ -1,1141 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "slotsPerEpoch", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "secondsPerSlot", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "genesisTime", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "epochsPerFrame", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "fastLaneLengthSlots", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "admin", - "type": "address", - "internalType": "address" - }, - { - "name": "reportProcessor", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "DEFAULT_ADMIN_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "DISABLE_CONSENSUS_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "MANAGE_FAST_LANE_CONFIG_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "MANAGE_FRAME_CONFIG_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "MANAGE_MEMBERS_AND_QUORUM_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "MANAGE_REPORT_PROCESSOR_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "addMember", - "inputs": [ - { - "name": "addr", - "type": "address", - "internalType": "address" - }, - { - "name": "quorum", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "disableConsensus", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "getChainConfig", - "inputs": [], - "outputs": [ - { - "name": "slotsPerEpoch", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "secondsPerSlot", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "genesisTime", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getConsensusState", - "inputs": [], - "outputs": [ - { - "name": "refSlot", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "consensusReport", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "isReportProcessing", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getConsensusStateForMember", - "inputs": [ - { - "name": "addr", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "result", - "type": "tuple", - "internalType": "struct HashConsensus.MemberConsensusState", - "components": [ - { - "name": "currentFrameRefSlot", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "currentFrameConsensusReport", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "isMember", - "type": "bool", - "internalType": "bool" - }, - { - "name": "isFastLane", - "type": "bool", - "internalType": "bool" - }, - { - "name": "canReport", - "type": "bool", - "internalType": "bool" - }, - { - "name": "lastMemberReportRefSlot", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "currentFrameMemberReport", - "type": "bytes32", - "internalType": "bytes32" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getCurrentFrame", - "inputs": [], - "outputs": [ - { - "name": "refSlot", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "reportProcessingDeadlineSlot", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getFastLaneMembers", - "inputs": [], - "outputs": [ - { - "name": "addresses", - "type": "address[]", - "internalType": "address[]" - }, - { - "name": "lastReportedRefSlots", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getFrameConfig", - "inputs": [], - "outputs": [ - { - "name": "initialEpoch", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "epochsPerFrame", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "fastLaneLengthSlots", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getInitialRefSlot", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getIsFastLaneMember", - "inputs": [ - { - "name": "addr", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getIsMember", - "inputs": [ - { - "name": "addr", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getMembers", - "inputs": [], - "outputs": [ - { - "name": "addresses", - "type": "address[]", - "internalType": "address[]" - }, - { - "name": "lastReportedRefSlots", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getQuorum", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getReportProcessor", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getReportVariants", - "inputs": [], - "outputs": [ - { - "name": "variants", - "type": "bytes32[]", - "internalType": "bytes32[]" - }, - { - "name": "support", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getRoleAdmin", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getRoleMember", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "index", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getRoleMemberCount", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "grantRole", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "hasRole", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "removeMember", - "inputs": [ - { - "name": "addr", - "type": "address", - "internalType": "address" - }, - { - "name": "quorum", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "renounceRole", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "callerConfirmation", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "revokeRole", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setFastLaneLengthSlots", - "inputs": [ - { - "name": "fastLaneLengthSlots", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setFrameConfig", - "inputs": [ - { - "name": "epochsPerFrame", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "fastLaneLengthSlots", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setQuorum", - "inputs": [ - { - "name": "quorum", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setReportProcessor", - "inputs": [ - { - "name": "newProcessor", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "submitReport", - "inputs": [ - { - "name": "slot", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "report", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "consensusVersion", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "supportsInterface", - "inputs": [ - { - "name": "interfaceId", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "updateInitialEpoch", - "inputs": [ - { - "name": "initialEpoch", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "ConsensusLost", - "inputs": [ - { - "name": "refSlot", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ConsensusReached", - "inputs": [ - { - "name": "refSlot", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "report", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - }, - { - "name": "support", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "FastLaneConfigSet", - "inputs": [ - { - "name": "fastLaneLengthSlots", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "FrameConfigSet", - "inputs": [ - { - "name": "newInitialEpoch", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newEpochsPerFrame", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Initialized", - "inputs": [ - { - "name": "version", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "MemberAdded", - "inputs": [ - { - "name": "addr", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newTotalMembers", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newQuorum", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "MemberRemoved", - "inputs": [ - { - "name": "addr", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newTotalMembers", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newQuorum", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "QuorumSet", - "inputs": [ - { - "name": "newQuorum", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "totalMembers", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "prevQuorum", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ReportProcessorSet", - "inputs": [ - { - "name": "processor", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "prevProcessor", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ReportReceived", - "inputs": [ - { - "name": "refSlot", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "member", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "report", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RoleAdminChanged", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "previousAdminRole", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "newAdminRole", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RoleGranted", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "sender", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RoleRevoked", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "sender", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AccessControlBadConfirmation", - "inputs": [] - }, - { - "type": "error", - "name": "AccessControlUnauthorizedAccount", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - }, - { - "name": "neededRole", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "AddressCannotBeZero", - "inputs": [] - }, - { - "type": "error", - "name": "AdminCannotBeZero", - "inputs": [] - }, - { - "type": "error", - "name": "ConsensusReportAlreadyProcessing", - "inputs": [] - }, - { - "type": "error", - "name": "DuplicateMember", - "inputs": [] - }, - { - "type": "error", - "name": "DuplicateReport", - "inputs": [] - }, - { - "type": "error", - "name": "EmptyReport", - "inputs": [] - }, - { - "type": "error", - "name": "EpochsPerFrameCannotBeZero", - "inputs": [] - }, - { - "type": "error", - "name": "FastLanePeriodCannotBeLongerThanFrame", - "inputs": [] - }, - { - "type": "error", - "name": "InitialEpochAlreadyArrived", - "inputs": [] - }, - { - "type": "error", - "name": "InitialEpochIsYetToArrive", - "inputs": [] - }, - { - "type": "error", - "name": "InitialEpochRefSlotCannotBeEarlierThanProcessingSlot", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidChainConfig", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidSlot", - "inputs": [] - }, - { - "type": "error", - "name": "NewProcessorCannotBeTheSame", - "inputs": [] - }, - { - "type": "error", - "name": "NonFastLaneMemberCannotReportWithinFastLaneInterval", - "inputs": [] - }, - { - "type": "error", - "name": "NonMember", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "NumericOverflow", - "inputs": [] - }, - { - "type": "error", - "name": "QuorumTooSmall", - "inputs": [ - { - "name": "minQuorum", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "receivedQuorum", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "ReportProcessorCannotBeZero", - "inputs": [] - }, - { - "type": "error", - "name": "SafeCastOverflowedUintDowncast", - "inputs": [ - { - "name": "bits", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "StaleReport", - "inputs": [] - }, - { - "type": "error", - "name": "UnexpectedConsensusVersion", - "inputs": [ - { - "name": "expected", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "received", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ] diff --git a/interfaces/csm/CSModule.json b/interfaces/csm/CSModule.json deleted file mode 100644 index d2a5e9255..000000000 --- a/interfaces/csm/CSModule.json +++ /dev/null @@ -1,2986 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "moduleType", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "minSlashingPenaltyQuotient", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "elRewardsStealingFine", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "maxKeysPerOperatorEA", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "lidoLocator", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "DEFAULT_ADMIN_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "EL_REWARDS_STEALING_FINE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "INITIAL_SLASHING_PENALTY", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "LIDO_LOCATOR", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract ILidoLocator" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "MAX_SIGNING_KEYS_PER_OPERATOR_BEFORE_PUBLIC_RELEASE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "MODULE_MANAGER_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PAUSE_INFINITELY", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PAUSE_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "RECOVERER_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "REPORT_EL_REWARDS_STEALING_PENALTY_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "RESUME_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "SETTLE_EL_REWARDS_STEALING_PENALTY_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "STAKING_ROUTER_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "STETH", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IStETH" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "VERIFIER_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "accounting", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract ICSAccounting" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "activatePublicRelease", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "addNodeOperatorETH", - "inputs": [ - { - "name": "keysCount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "publicKeys", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "signatures", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "managementProperties", - "type": "tuple", - "internalType": "struct NodeOperatorManagementProperties", - "components": [ - { - "name": "managerAddress", - "type": "address", - "internalType": "address" - }, - { - "name": "rewardAddress", - "type": "address", - "internalType": "address" - }, - { - "name": "extendedManagerPermissions", - "type": "bool", - "internalType": "bool" - } - ] - }, - { - "name": "eaProof", - "type": "bytes32[]", - "internalType": "bytes32[]" - }, - { - "name": "referrer", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "addNodeOperatorStETH", - "inputs": [ - { - "name": "keysCount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "publicKeys", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "signatures", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "managementProperties", - "type": "tuple", - "internalType": "struct NodeOperatorManagementProperties", - "components": [ - { - "name": "managerAddress", - "type": "address", - "internalType": "address" - }, - { - "name": "rewardAddress", - "type": "address", - "internalType": "address" - }, - { - "name": "extendedManagerPermissions", - "type": "bool", - "internalType": "bool" - } - ] - }, - { - "name": "permit", - "type": "tuple", - "internalType": "struct ICSAccounting.PermitInput", - "components": [ - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "v", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "r", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "name": "eaProof", - "type": "bytes32[]", - "internalType": "bytes32[]" - }, - { - "name": "referrer", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "addNodeOperatorWstETH", - "inputs": [ - { - "name": "keysCount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "publicKeys", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "signatures", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "managementProperties", - "type": "tuple", - "internalType": "struct NodeOperatorManagementProperties", - "components": [ - { - "name": "managerAddress", - "type": "address", - "internalType": "address" - }, - { - "name": "rewardAddress", - "type": "address", - "internalType": "address" - }, - { - "name": "extendedManagerPermissions", - "type": "bool", - "internalType": "bool" - } - ] - }, - { - "name": "permit", - "type": "tuple", - "internalType": "struct ICSAccounting.PermitInput", - "components": [ - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "v", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "r", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "name": "eaProof", - "type": "bytes32[]", - "internalType": "bytes32[]" - }, - { - "name": "referrer", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "addValidatorKeysETH", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "keysCount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "publicKeys", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "signatures", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "addValidatorKeysStETH", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "keysCount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "publicKeys", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "signatures", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "permit", - "type": "tuple", - "internalType": "struct ICSAccounting.PermitInput", - "components": [ - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "v", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "r", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "addValidatorKeysWstETH", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "keysCount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "publicKeys", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "signatures", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "permit", - "type": "tuple", - "internalType": "struct ICSAccounting.PermitInput", - "components": [ - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "v", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "r", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "cancelELRewardsStealingPenalty", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "changeNodeOperatorRewardAddress", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "newAddress", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "claimRewardsStETH", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "stETHAmount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "cumulativeFeeShares", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "rewardsProof", - "type": "bytes32[]", - "internalType": "bytes32[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "claimRewardsUnstETH", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "stEthAmount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "cumulativeFeeShares", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "rewardsProof", - "type": "bytes32[]", - "internalType": "bytes32[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "claimRewardsWstETH", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "wstETHAmount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "cumulativeFeeShares", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "rewardsProof", - "type": "bytes32[]", - "internalType": "bytes32[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "cleanDepositQueue", - "inputs": [ - { - "name": "maxItems", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "compensateELRewardsStealingPenalty", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "confirmNodeOperatorManagerAddressChange", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "confirmNodeOperatorRewardAddressChange", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "decreaseVettedSigningKeysCount", - "inputs": [ - { - "name": "nodeOperatorIds", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "vettedSigningKeysCounts", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "depositETH", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "depositQueue", - "inputs": [], - "outputs": [ - { - "name": "head", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "tail", - "type": "uint128", - "internalType": "uint128" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "depositQueueItem", - "inputs": [ - { - "name": "index", - "type": "uint128", - "internalType": "uint128" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "Batch" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "depositStETH", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "stETHAmount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "permit", - "type": "tuple", - "internalType": "struct ICSAccounting.PermitInput", - "components": [ - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "v", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "r", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "depositWstETH", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "wstETHAmount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "permit", - "type": "tuple", - "internalType": "struct ICSAccounting.PermitInput", - "components": [ - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "v", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "r", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "earlyAdoption", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract ICSEarlyAdoption" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getActiveNodeOperatorsCount", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getNodeOperator", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct NodeOperator", - "components": [ - { - "name": "totalAddedKeys", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "totalWithdrawnKeys", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "totalDepositedKeys", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "totalVettedKeys", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "stuckValidatorsCount", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "depositableValidatorsCount", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "targetLimit", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "targetLimitMode", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "totalExitedKeys", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "enqueuedCount", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "managerAddress", - "type": "address", - "internalType": "address" - }, - { - "name": "proposedManagerAddress", - "type": "address", - "internalType": "address" - }, - { - "name": "rewardAddress", - "type": "address", - "internalType": "address" - }, - { - "name": "proposedRewardAddress", - "type": "address", - "internalType": "address" - }, - { - "name": "extendedManagerPermissions", - "type": "bool", - "internalType": "bool" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getNodeOperatorIds", - "inputs": [ - { - "name": "offset", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "limit", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "nodeOperatorIds", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getNodeOperatorIsActive", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getNodeOperatorNonWithdrawnKeys", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getNodeOperatorSummary", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "targetLimitMode", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "targetValidatorsCount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "stuckValidatorsCount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "refundedValidatorsCount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "stuckPenaltyEndTimestamp", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "totalExitedValidators", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "totalDepositedValidators", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "depositableValidatorsCount", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getNodeOperatorsCount", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getNonce", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getResumeSinceTimestamp", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getRoleAdmin", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getRoleMember", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "index", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getRoleMemberCount", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getSigningKeys", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "startIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "keysCount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes", - "internalType": "bytes" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getSigningKeysWithSignatures", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "startIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "keysCount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "keys", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "signatures", - "type": "bytes", - "internalType": "bytes" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getStakingModuleSummary", - "inputs": [], - "outputs": [ - { - "name": "totalExitedValidators", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "totalDepositedValidators", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "depositableValidatorsCount", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getType", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "grantRole", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "hasRole", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "_accounting", - "type": "address", - "internalType": "address" - }, - { - "name": "_earlyAdoption", - "type": "address", - "internalType": "address" - }, - { - "name": "_keyRemovalCharge", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "admin", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "isPaused", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isValidatorSlashed", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "keyIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isValidatorWithdrawn", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "keyIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "keyRemovalCharge", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "normalizeQueue", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "obtainDepositData", - "inputs": [ - { - "name": "depositsCount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "publicKeys", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "signatures", - "type": "bytes", - "internalType": "bytes" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "onExitedAndStuckValidatorsCountsUpdated", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "onRewardsMinted", - "inputs": [ - { - "name": "totalShares", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "onWithdrawalCredentialsChanged", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "pauseFor", - "inputs": [ - { - "name": "duration", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "proposeNodeOperatorManagerAddressChange", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "proposedAddress", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "proposeNodeOperatorRewardAddressChange", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "proposedAddress", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "publicRelease", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "recoverERC1155", - "inputs": [ - { - "name": "token", - "type": "address", - "internalType": "address" - }, - { - "name": "tokenId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "recoverERC20", - "inputs": [ - { - "name": "token", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "recoverERC721", - "inputs": [ - { - "name": "token", - "type": "address", - "internalType": "address" - }, - { - "name": "tokenId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "recoverEther", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "recoverStETHShares", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "removeKeys", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "startIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "keysCount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "renounceRole", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "callerConfirmation", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "reportELRewardsStealingPenalty", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "blockHash", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "resetNodeOperatorManagerAddress", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "resume", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "revokeRole", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setKeyRemovalCharge", - "inputs": [ - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "settleELRewardsStealingPenalty", - "inputs": [ - { - "name": "nodeOperatorIds", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "submitInitialSlashing", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "keyIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "submitWithdrawal", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "keyIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "isSlashed", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "supportsInterface", - "inputs": [ - { - "name": "interfaceId", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "unsafeUpdateValidatorsCount", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "exitedValidatorsKeysCount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "stuckValidatorsKeysCount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateExitedValidatorsCount", - "inputs": [ - { - "name": "nodeOperatorIds", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "exitedValidatorsCounts", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateRefundedValidatorsCount", - "inputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateStuckValidatorsCount", - "inputs": [ - { - "name": "nodeOperatorIds", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "stuckValidatorsCounts", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateTargetValidatorsLimits", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "targetLimitMode", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "targetLimit", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "BatchEnqueued", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "count", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "DepositableSigningKeysCountChanged", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "depositableKeysCount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "DepositedSigningKeysCountChanged", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "depositedKeysCount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ELRewardsStealingPenaltyCancelled", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ELRewardsStealingPenaltyReported", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "proposedBlockHash", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - }, - { - "name": "stolenAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ELRewardsStealingPenaltySettled", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ERC1155Recovered", - "inputs": [ - { - "name": "token", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "tokenId", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "recipient", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ERC20Recovered", - "inputs": [ - { - "name": "token", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "recipient", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ERC721Recovered", - "inputs": [ - { - "name": "token", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "tokenId", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "recipient", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "EtherRecovered", - "inputs": [ - { - "name": "recipient", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ExitedSigningKeysCountChanged", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "exitedKeysCount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "InitialSlashingSubmitted", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "keyIndex", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Initialized", - "inputs": [ - { - "name": "version", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "KeyRemovalChargeApplied", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "KeyRemovalChargeSet", - "inputs": [ - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "NodeOperatorAdded", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "managerAddress", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "rewardAddress", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "NodeOperatorManagerAddressChangeProposed", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "oldProposedAddress", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newProposedAddress", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "NodeOperatorManagerAddressChanged", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "oldAddress", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newAddress", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "NodeOperatorRewardAddressChangeProposed", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "oldProposedAddress", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newProposedAddress", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "NodeOperatorRewardAddressChanged", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "oldAddress", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newAddress", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "NonceChanged", - "inputs": [ - { - "name": "nonce", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Paused", - "inputs": [ - { - "name": "duration", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "PublicRelease", - "inputs": [], - "anonymous": false - }, - { - "type": "event", - "name": "ReferrerSet", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "referrer", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Resumed", - "inputs": [], - "anonymous": false - }, - { - "type": "event", - "name": "RoleAdminChanged", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "previousAdminRole", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "newAdminRole", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RoleGranted", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "sender", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RoleRevoked", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "sender", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "SigningKeyAdded", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "pubkey", - "type": "bytes", - "indexed": false, - "internalType": "bytes" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "SigningKeyRemoved", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "pubkey", - "type": "bytes", - "indexed": false, - "internalType": "bytes" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "StETHSharesRecovered", - "inputs": [ - { - "name": "recipient", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "shares", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "StuckSigningKeysCountChanged", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "stuckKeysCount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "TargetValidatorsCountChanged", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "targetLimitMode", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "targetValidatorsCount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "TotalSigningKeysCountChanged", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "totalKeysCount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "VettedSigningKeysCountChanged", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "vettedKeysCount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "VettedSigningKeysCountDecreased", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "WithdrawalSubmitted", - "inputs": [ - { - "name": "nodeOperatorId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "keyIndex", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AccessControlBadConfirmation", - "inputs": [] - }, - { - "type": "error", - "name": "AccessControlUnauthorizedAccount", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - }, - { - "name": "neededRole", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "AlreadyActivated", - "inputs": [] - }, - { - "type": "error", - "name": "AlreadyProposed", - "inputs": [] - }, - { - "type": "error", - "name": "AlreadySubmitted", - "inputs": [] - }, - { - "type": "error", - "name": "AlreadyWithdrawn", - "inputs": [] - }, - { - "type": "error", - "name": "EmptyKey", - "inputs": [] - }, - { - "type": "error", - "name": "ExitedKeysDecrease", - "inputs": [] - }, - { - "type": "error", - "name": "ExitedKeysHigherThanTotalDeposited", - "inputs": [] - }, - { - "type": "error", - "name": "FailedToSendEther", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidAmount", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInput", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidKeysCount", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidLength", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidReportData", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidVetKeysPointer", - "inputs": [] - }, - { - "type": "error", - "name": "MaxSigningKeysCountExceeded", - "inputs": [] - }, - { - "type": "error", - "name": "MethodCallIsNotAllowed", - "inputs": [] - }, - { - "type": "error", - "name": "NodeOperatorDoesNotExist", - "inputs": [] - }, - { - "type": "error", - "name": "NotAllowedToJoinYet", - "inputs": [] - }, - { - "type": "error", - "name": "NotAllowedToRecover", - "inputs": [] - }, - { - "type": "error", - "name": "NotEnoughKeys", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "NotSupported", - "inputs": [] - }, - { - "type": "error", - "name": "PauseUntilMustBeInFuture", - "inputs": [] - }, - { - "type": "error", - "name": "PausedExpected", - "inputs": [] - }, - { - "type": "error", - "name": "QueueIsEmpty", - "inputs": [] - }, - { - "type": "error", - "name": "QueueLookupNoLimit", - "inputs": [] - }, - { - "type": "error", - "name": "ResumedExpected", - "inputs": [] - }, - { - "type": "error", - "name": "SameAddress", - "inputs": [] - }, - { - "type": "error", - "name": "SenderIsNotEligible", - "inputs": [] - }, - { - "type": "error", - "name": "SenderIsNotManagerAddress", - "inputs": [] - }, - { - "type": "error", - "name": "SenderIsNotProposedAddress", - "inputs": [] - }, - { - "type": "error", - "name": "SenderIsNotRewardAddress", - "inputs": [] - }, - { - "type": "error", - "name": "SigningKeysInvalidOffset", - "inputs": [] - }, - { - "type": "error", - "name": "StuckKeysHigherThanNonExited", - "inputs": [] - }, - { - "type": "error", - "name": "ZeroAccountingAddress", - "inputs": [] - }, - { - "type": "error", - "name": "ZeroAdminAddress", - "inputs": [] - }, - { - "type": "error", - "name": "ZeroLocatorAddress", - "inputs": [] - }, - { - "type": "error", - "name": "ZeroPauseDuration", - "inputs": [] - } - ] diff --git a/scripts/ci/prepare_environment.py b/scripts/ci/prepare_environment.py index 3d8cfd0d2..0c89dc6ea 100644 --- a/scripts/ci/prepare_environment.py +++ b/scripts/ci/prepare_environment.py @@ -98,4 +98,4 @@ def retrieve_vote_script() -> Tuple[Callable, Callable] | None: f"'start_vote' and/or 'get_vote_items' not found in {script_path}." ) except Exception as e: - raise RuntimeError(f"An unexpected error occurred while importing from {script_path}: {e}") \ No newline at end of file + raise RuntimeError(f"An unexpected error occurred while importing from {script_path}: {e}") diff --git a/utils/agent.py b/utils/agent.py index 88a7f48dc..9fc0ad270 100644 --- a/utils/agent.py +++ b/utils/agent.py @@ -1,10 +1,17 @@ -from utils.config import contracts, AGENT -from utils.evm_script import encode_call_script -from typing import Tuple, Sequence +from utils.config import network_name, contracts, AGENT +from utils.evm_script import ( + encode_call_script, +) +from typing import ( + Tuple, + Optional, + Sequence, +) def agent_forward(call_script: Sequence[Tuple[str, str]]) -> Tuple[str, str]: agent = contracts.agent + print(f"Forwarding call script to agent: {call_script}") return (AGENT, agent.forward.encode_input(encode_call_script(call_script))) diff --git a/utils/config.py b/utils/config.py index 8e36dc08a..a8877702b 100644 --- a/utils/config.py +++ b/utils/config.py @@ -99,9 +99,9 @@ def local_deployer() -> LocalAccount: def get_deployer_account() -> Union[LocalAccount, Account]: is_live = get_is_live() - deployer = os.environ.get("DEPLOYER") if is_live: + deployer = os.environ.get("DEPLOYER") if deployer is None: raise EnvironmentError("For live deployment please set DEPLOYER env variable to the deployer account name") return accounts.load(deployer) @@ -212,8 +212,17 @@ def csm(self) -> interface.CSModule: @property def cs_early_adoption(self) -> interface.CSEarlyAdoption: + """Deprecated""" return interface.CSEarlyAdoption(CS_EARLY_ADOPTION_ADDRESS) + @property + def cs_permissionless_gate(self) -> interface.CSPermissionlessGate: + return interface.CSPermissionlessGate(CS_PERMISSIONLESS_GATE_ADDRESS) + + @property + def cs_vetted_gate(self) -> interface.CSVettedGate: + return interface.CSVettedGate(CS_VETTED_GATE_ADDRESS) + @property def cs_accounting(self) -> interface.CSAccounting: return interface.CSAccounting(CS_ACCOUNTING_ADDRESS) @@ -234,6 +243,22 @@ def csm_hash_consensus(self) -> interface.CSHashConsensus: def cs_verifier(self) -> interface.CSVerifier: return interface.CSVerifier(CS_VERIFIER_ADDRESS) + @property + def cs_verifier_v2(self) -> interface.CSVerifierV2: + return interface.CSVerifierV2(CS_VERIFIER_V2_ADDRESS) + + @property + def cs_exit_penalties(self) -> interface.CSExitPenalties: + return interface.CSExitPenalties(CS_EXIT_PENALTIES) + + @property + def cs_ejector(self) -> interface.CSEjector: + return interface.CSEjector(CS_EJECTOR_ADDRESS) + + @property + def cs_strikes(self) -> interface.CSStrikes: + return interface.CSStrikes(CS_STRIKES_ADDRESS) + @property def sandbox(self) -> interface.SimpleDVT: return interface.Sandbox(SANDBOX) @@ -286,6 +311,10 @@ def validators_exit_bus_oracle(self) -> interface.ValidatorsExitBusOracle: def oracle_report_sanity_checker(self) -> interface.OracleReportSanityChecker: return interface.OracleReportSanityChecker(ORACLE_REPORT_SANITY_CHECKER) + @property + def triggerable_withdrawals_gateway(self): + return interface.TriggerableWithdrawalsGateway(TRIGGERABLE_WITHDRAWALS_GATEWAY) + @property def withdrawal_queue(self) -> interface.WithdrawalQueueERC721: return interface.WithdrawalQueueERC721(WITHDRAWAL_QUEUE) @@ -406,6 +435,10 @@ def trp_escrow_factory(self) -> interface.VestingEscrowFactory: def token_rate_notifier(self) -> interface.TokenRateNotifier: return interface.TokenRateNotifier(L1_TOKEN_RATE_NOTIFIER) + @property + def validator_exit_verifier(self) -> interface.ValidatorsExitBusOracle: + return interface.ValidatorExitVerifier(VALIDATOR_EXIT_VERIFIER) + @property def dual_governance(self) -> interface.DualGovernance: return interface.DualGovernance(DUAL_GOVERNANCE) diff --git a/utils/test/event_validators/dual_governance.py b/utils/test/event_validators/dual_governance.py index a6b84c833..11d2d5f44 100644 --- a/utils/test/event_validators/dual_governance.py +++ b/utils/test/event_validators/dual_governance.py @@ -8,8 +8,8 @@ def validate_dual_governance_submit_event( proposal_id: int, proposer: str, executor: str, - metadata: str, - proposal_calls: any, + metadata: str = None, + proposal_calls: any = None, emitted_by: list[str] = None, ) -> None: _events_chain = ["LogScriptCall", "ProposalSubmitted", "ProposalSubmitted"] @@ -21,20 +21,21 @@ def validate_dual_governance_submit_event( assert event["ProposalSubmitted"][0]["id"] == proposal_id, "Wrong proposalId" assert event["ProposalSubmitted"][0]["executor"] == executor, "Wrong executor" - assert len(event["ProposalSubmitted"][0]["calls"]) == len(proposal_calls), "Wrong callsCount" - - for i in range(0, len(proposal_calls)): - assert event["ProposalSubmitted"][0]["calls"][i][0] == proposal_calls[i]["target"], "Wrong target" - assert event["ProposalSubmitted"][0]["calls"][i][1] == proposal_calls[i]["value"], "Wrong value" - assert event["ProposalSubmitted"][0]["calls"][i][2] == proposal_calls[i]["data"], "Wrong data" + if proposal_calls: + assert len(event["ProposalSubmitted"][0]["calls"]) == len(proposal_calls), "Wrong callsCount" + for i in range(0, len(proposal_calls)): + assert event["ProposalSubmitted"][0]["calls"][i][0] == proposal_calls[i]["target"], "Wrong target" + assert event["ProposalSubmitted"][0]["calls"][i][1] == proposal_calls[i]["value"], "Wrong value" + assert event["ProposalSubmitted"][0]["calls"][i][2] == proposal_calls[i]["data"], "Wrong data" assert event["ProposalSubmitted"][1]["proposalId"] == proposal_id, "Wrong proposalId" assert event["ProposalSubmitted"][1]["proposerAccount"] == proposer, "Wrong proposer" - assert event["ProposalSubmitted"][1]["metadata"] == metadata, "Wrong metadata" - assert len(event["ProposalSubmitted"]) == len(emitted_by), "Wrong emitted_by count" + if metadata: + assert event["ProposalSubmitted"][1]["metadata"] == metadata, "Wrong metadata" if emitted_by is not None: + assert len(event["ProposalSubmitted"]) == len(emitted_by), "Wrong emitted_by count" for i in range(0, len(emitted_by)): assert convert.to_address(event["ProposalSubmitted"][i]["_emitted_by"]) == convert.to_address( emitted_by[i]