diff --git a/README.md b/README.md index 811401ee7..7ac71e729 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,8 @@ pipx install poetry==1.5.0 Ensure that poetry bin path is added to your `$PATH` env variable. Usually it's `$HOME/.local/bin` for most Unix-like systems. -This is a workaround related `brownie` deps `pyyaml` issue https://github.com/eth-brownie/brownie/issues/1701 +This is a workaround related `brownie` deps `pyyaml` issue + ```shell poetry run pip install "cython<3.0" pyyaml==5.4.1 --no-build-isolation ``` @@ -85,21 +86,23 @@ poetry shell ### Network setup By default, you should start composing new scripts and test using forked networks. -You have two forked networks to work with: +You have three forked networks to work with: - `mainnet-fork` - `goerli-fork` +- `sepolia-fork` To start new voting on the live networks you could proceed with: - `mainnet` - `goerli` +- `sepolia` >Note: you can't run tests on the live networks. In a typical weekly omnibus workflow, you need only `mainnet-fork` and `mainnet` networks. In case of large test campaign on Lido upgrades, -it also could be useful to go with `goerli` and `goerli-fork` testnets first. +it also could be useful to go with `goerli`/`sepolia` and `goerli-fork`/`sepolia-fork` testnets first. ### Environment variables setup @@ -121,12 +124,14 @@ provide the etherscan API token: ```bash export ETHERSCAN_TOKEN= ``` + To upload Markdown vote description for a new vote to IPFS you should provide the [web3.storage](https://web3.storage/tokens/) API token: ```bash export WEB3_STORAGE_TOKEN= ``` + See [here](utils/README.md#ipfs) to learn more Markdown description To skip events decoding while testing set the following var: diff --git a/configs/config_sepolia.py b/configs/config_sepolia.py new file mode 100644 index 000000000..45f6ce7f7 --- /dev/null +++ b/configs/config_sepolia.py @@ -0,0 +1,57 @@ +# Use this config as address book only +CHAIN_NETWORK_NAME = "sepolia" +# DAO +ARAGON_KERNEL = "0x6155bD199ECcc79Ff4e8B392f6cBD9c9874E8916" +LDO_TOKEN = "0xd06dF83b8ad6D89C86a187fba4Eae918d497BdCB" +# Standard (or forked) Aragon apps +ACL = "0x8A1AA86d35b2EE8C9369618E7D7b40000cCD3295" +AGENT = "0x32A0E5828B62AAb932362a4816ae03b860b65e83" +FINANCE = "0x75c7b1D23f1cad7Fb4D60281d7069E46440BC179" +VOTING = "0x39A0EbdEE54cB319f4F42141daaBDb6ba25D341A" +TOKEN_MANAGER = "0xC73cd4B2A7c1CBC5BF046eB4A7019365558ABF66" +# Our custom Aragon apps +LIDO = "0x3e3FE7dBc6B4C189E7128855dD526361c49b40Af" +LIDO_LEGACY_ORACLE = "0x3483c140EF7F2716460198Ff831a8e53F05F1606" +LIDO_NODE_OPERATORS_REGISTRY = "0x33d6E15047E8644F8DDf5CD05d202dfE587DA6E3" +# Aragon APM Repos +VOTING_REPO = "" +LIDO_LIDO_REPO = "" +LIDO_NODE_OPERATORS_REGISTRY_REPO = "" +LIDO_LEGACY_ORACLE_REPO = "" + +DEPOSIT_SECURITY_MODULE_V1 = "0x6885E36BFcb68CB383DfE90023a462C03BCB2AE5" +LIDO_DEPOSIT_SECURITY_MODULE = "0x6885E36BFcb68CB383DfE90023a462C03BCB2AE5" + +DUMMY_IMPL = "" + +LIDO_LOCATOR = "0x8f6254332f69557A72b0DA2D5F0Bc07d4CA991E7" +BURNER = "0x61Bb0Ef69262d5EF1cc2873cf61766751D99B699" +EXECUTION_LAYER_REWARDS_VAULT = "0x94B1B8e2680882f8652882e7F196169dE3d9a3B2" +HASH_CONSENSUS_FOR_AO = "0x758D8c3CE794b3Dfe3b3A3482B7eD33de2109D95" +ACCOUNTING_ORACLE = "0xd497Be005638efCf09F6BFC8DAFBBB0BB72cD991" +HASH_CONSENSUS_FOR_VEBO = "0x098a952BD200005382aEb3229e38ae39A7616F56" +LIDO_VALIDATORS_EXIT_BUS_ORACLE = "0x7637d44c9f2e9cA584a8B5D2EA493012A5cdaEB6" +ORACLE_REPORT_SANITY_CHECKER = "0xbac2A471443F18aC5C31078b96C5797A78fCc680" +LIDO_WITHDRAWAL_QUEUE = "0x1583C7b3f4C3B008720E6BcE5726336b0aB25fdd" +GATE_SEAL = "" +EIP712_STETH = "0x9726CA9AEFF4BC8FB8C084BdAbdB71608248E3f8" +WITHDRAWAL_VAULT = "0xDe7318Afa67eaD6d6bbC8224dfCe5ed6e4b86d76" +STAKING_ROUTER = "0x4F36aAEb18Ab56A4e380241bea6ebF215b9cb12c" +ORACLE_DAEMON_CONFIG = "0x7bC76076b0f3879b4A750450C0Ccf02c6Ca11220" + +INSURANCE_FUND = "" +RELAY_ALLOWED_LIST = "" + +LDO_HOLDER_ADDRESS_FOR_TESTS = "0x8360927B5BC431771C21E347eA29529b6eE94b78" +LDO_VOTE_EXECUTORS_FOR_TESTS = [ + "0x32A0E5828B62AAb932362a4816ae03b860b65e83", + "0x8360927B5BC431771C21E347eA29529b6eE94b78", + "0xaa6bfBCD634EE744CB8FE522b29ADD23124593D3", +] + +ORACLE_COMMITTEE = [] + +DSM_GUARDIANS = [] + +WSTETH_TOKEN = "0xB82381A3fBD3FaFA77B3a7bE693342618240067b" +CHAIN_DEPOSIT_CONTRACT = "0x7f02C3E3c98b133055B8B348B2Ac625669Ed295D" diff --git a/interfaces/L1MessageService.json b/interfaces/L1MessageService.json new file mode 100644 index 000000000..6b4b1ee77 --- /dev/null +++ b/interfaces/L1MessageService.json @@ -0,0 +1,1272 @@ +[ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "BlockTimestampError", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyBlock", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "name": "FeePaymentFailed", + "type": "error" + }, + { + "inputs": [], + "name": "FeeTooLow", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidProof", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidProofType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "pauseType", + "type": "bytes32" + } + ], + "name": "IsNotPaused", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "pauseType", + "type": "bytes32" + } + ], + "name": "IsPaused", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "messageHash", + "type": "bytes32" + } + ], + "name": "L1L2MessageNotSent", + "type": "error" + }, + { + "inputs": [], + "name": "LimitIsZero", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "inde", + "type": "uint256" + } + ], + "name": "MemoryOutOfBounds", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "messageHash", + "type": "bytes32" + } + ], + "name": "MessageAlreadyReceived", + "type": "error" + }, + { + "inputs": [], + "name": "MessageAlreadySent", + "type": "error" + }, + { + "inputs": [], + "name": "MessageDoesNotExistOrHasAlreadyBeenClaimed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "name": "MessageSendingFailed", + "type": "error" + }, + { + "inputs": [], + "name": "NotList", + "type": "error" + }, + { + "inputs": [], + "name": "PeriodIsZero", + "type": "error" + }, + { + "inputs": [], + "name": "ProofIsEmpty", + "type": "error" + }, + { + "inputs": [], + "name": "RateLimitExceeded", + "type": "error" + }, + { + "inputs": [], + "name": "StartingRootHashDoesNotMatch", + "type": "error" + }, + { + "inputs": [], + "name": "TransactionShort", + "type": "error" + }, + { + "inputs": [], + "name": "UnknownTransactionType", + "type": "error" + }, + { + "inputs": [], + "name": "ValueSentTooLow", + "type": "error" + }, + { + "inputs": [], + "name": "ValueShouldBeGreaterThanFee", + "type": "error" + }, + { + "inputs": [], + "name": "WrongBytesLength", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "resettingAddress", + "type": "address" + } + ], + "name": "AmountUsedInPeriodReset", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "stateRootHash", + "type": "bytes32" + } + ], + "name": "BlockFinalized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "lastBlockFinalized", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "startingRootHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "finalRootHash", + "type": "bytes32" + } + ], + "name": "BlocksVerificationDone", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32[]", + "name": "messageHashes", + "type": "bytes32[]" + } + ], + "name": "L1L2MessagesReceivedOnL2", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "messageHash", + "type": "bytes32" + } + ], + "name": "L2L1MessageHashAddedToInbox", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "amountChangeBy", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "amountUsedLoweredToLimit", + "type": "bool" + }, + { + "indexed": false, + "internalType": "bool", + "name": "usedAmountResetToZero", + "type": "bool" + } + ], + "name": "LimitAmountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "_messageHash", + "type": "bytes32" + } + ], + "name": "MessageClaimed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_fee", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_nonce", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_calldata", + "type": "bytes" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "_messageHash", + "type": "bytes32" + } + ], + "name": "MessageSent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messageSender", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "pauseType", + "type": "bytes32" + } + ], + "name": "Paused", + "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": "address", + "name": "messageSender", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "pauseType", + "type": "bytes32" + } + ], + "name": "UnPaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "verifierAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "proofType", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifierSetBy", + "type": "address" + } + ], + "name": "VerifierAddressChanged", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "GENERAL_PAUSE_TYPE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "INBOX_STATUS_RECEIVED", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "INBOX_STATUS_UNKNOWN", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "L1_L2_PAUSE_TYPE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "L2_L1_PAUSE_TYPE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "OPERATOR_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "OUTBOX_STATUS_RECEIVED", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "OUTBOX_STATUS_SENT", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "OUTBOX_STATUS_UNKNOWN", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PAUSE_MANAGER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PROVING_SYSTEM_PAUSE_TYPE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "RATE_LIMIT_SETTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_fee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "_feeRecipient", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_calldata", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_nonce", + "type": "uint256" + } + ], + "name": "claimMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "currentL2BlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "currentPeriodAmountInWei", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "currentPeriodEnd", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "currentTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "blockRootHash", + "type": "bytes32" + }, + { + "internalType": "uint32", + "name": "l2BlockTimestamp", + "type": "uint32" + }, + { + "internalType": "bytes[]", + "name": "transactions", + "type": "bytes[]" + }, + { + "internalType": "bytes32[]", + "name": "l2ToL1MsgHashes", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "fromAddresses", + "type": "bytes" + }, + { + "internalType": "uint16[]", + "name": "batchReceptionIndices", + "type": "uint16[]" + } + ], + "internalType": "struct IZkEvmV2.BlockData[]", + "name": "_blocksData", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "_proof", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_proofType", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_parentStateRootHash", + "type": "bytes32" + } + ], + "name": "finalizeBlocks", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "blockRootHash", + "type": "bytes32" + }, + { + "internalType": "uint32", + "name": "l2BlockTimestamp", + "type": "uint32" + }, + { + "internalType": "bytes[]", + "name": "transactions", + "type": "bytes[]" + }, + { + "internalType": "bytes32[]", + "name": "l2ToL1MsgHashes", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "fromAddresses", + "type": "bytes" + }, + { + "internalType": "uint16[]", + "name": "batchReceptionIndices", + "type": "uint16[]" + } + ], + "internalType": "struct IZkEvmV2.BlockData[]", + "name": "_blocksData", + "type": "tuple[]" + } + ], + "name": "finalizeBlocksWithoutProof", + "outputs": [], + "stateMutability": "nonpayable", + "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": "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": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "inboxL2L1MessageStatus", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_initialStateRootHash", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_initialL2BlockNumber", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_defaultVerifier", + "type": "address" + }, + { + "internalType": "address", + "name": "_securityCouncil", + "type": "address" + }, + { + "internalType": "address[]", + "name": "_operators", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_rateLimitPeriodInSeconds", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_rateLimitAmountInWei", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "limitInWei", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "nextMessageNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "outboxL1L2MessageStatus", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_pauseType", + "type": "bytes32" + } + ], + "name": "pauseByType", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "pauseTypeStatuses", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "periodInSeconds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "resetAmountUsedInPeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "resetRateLimitAmount", + "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": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_fee", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_calldata", + "type": "bytes" + } + ], + "name": "sendMessage", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "sender", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newVerifierAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_proofType", + "type": "uint256" + } + ], + "name": "setVerifierAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "stateRootHashes", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_pauseType", + "type": "bytes32" + } + ], + "name": "unPauseByType", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "verifiers", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } +] diff --git a/interfaces/L1ScrollMessenger.json b/interfaces/L1ScrollMessenger.json new file mode 100644 index 000000000..e0eb68cba --- /dev/null +++ b/interfaces/L1ScrollMessenger.json @@ -0,0 +1,654 @@ +[ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "messageHash", + "type": "bytes32" + } + ], + "name": "FailedRelayedMessage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "messageHash", + "type": "bytes32" + } + ], + "name": "RelayedMessage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "messageNonce", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "gasLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "message", + "type": "bytes" + } + ], + "name": "SentMessage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_oldFeeVault", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_newFeeVault", + "type": "address" + } + ], + "name": "UpdateFeeVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxReplayTimes", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMaxReplayTimes", + "type": "uint256" + } + ], + "name": "UpdateMaxReplayTimes", + "type": "event" + }, + { + "inputs": [], + "name": "counterpart", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_messageNonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_message", + "type": "bytes" + } + ], + "name": "dropMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "feeVault", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_counterpart", + "type": "address" + }, + { + "internalType": "address", + "name": "_feeVault", + "type": "address" + }, + { + "internalType": "address", + "name": "_rollup", + "type": "address" + }, + { + "internalType": "address", + "name": "_messageQueue", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "isL1MessageDropped", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "isL2MessageExecuted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxReplayTimes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "messageQueue", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "messageSendTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "prevReplayIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_nonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_message", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "batchIndex", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "merkleProof", + "type": "bytes" + } + ], + "internalType": "struct IL1ScrollMessenger.L2MessageProof", + "name": "_proof", + "type": "tuple" + } + ], + "name": "relayMessageWithProof", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_messageNonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_message", + "type": "bytes" + }, + { + "internalType": "uint32", + "name": "_newGasLimit", + "type": "uint32" + }, + { + "internalType": "address", + "name": "_refundAddress", + "type": "address" + } + ], + "name": "replayMessage", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "replayStates", + "outputs": [ + { + "internalType": "uint128", + "name": "times", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "lastIndex", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rollup", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_message", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_gasLimit", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_refundAddress", + "type": "address" + } + ], + "name": "sendMessage", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_message", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_gasLimit", + "type": "uint256" + } + ], + "name": "sendMessage", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_status", + "type": "bool" + } + ], + "name": "setPause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newFeeVault", + "type": "address" + } + ], + "name": "updateFeeVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_newMaxReplayTimes", + "type": "uint256" + } + ], + "name": "updateMaxReplayTimes", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "xDomainMessageSender", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } +] diff --git a/interfaces/LineaBridgeExecutor.json b/interfaces/LineaBridgeExecutor.json new file mode 100644 index 000000000..e02077989 --- /dev/null +++ b/interfaces/LineaBridgeExecutor.json @@ -0,0 +1,705 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "lineaMessageService", + "type": "address" + }, + { + "internalType": "address", + "name": "ethereumGovernanceExecutor", + "type": "address" + }, + { + "internalType": "uint256", + "name": "delay", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "gracePeriod", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minimumDelay", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maximumDelay", + "type": "uint256" + }, + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "DelayLongerThanMax", + "type": "error" + }, + { + "inputs": [], + "name": "DelayShorterThanMin", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateAction", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyTargets", + "type": "error" + }, + { + "inputs": [], + "name": "FailedActionExecution", + "type": "error" + }, + { + "inputs": [], + "name": "GracePeriodTooShort", + "type": "error" + }, + { + "inputs": [], + "name": "InconsistentParamsLength", + "type": "error" + }, + { + "inputs": [], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidActionsSetId", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitParams", + "type": "error" + }, + { + "inputs": [], + "name": "MaximumDelayTooShort", + "type": "error" + }, + { + "inputs": [], + "name": "MinimumDelayTooLong", + "type": "error" + }, + { + "inputs": [], + "name": "NotGuardian", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCallableByThis", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyQueuedActions", + "type": "error" + }, + { + "inputs": [], + "name": "TimelockNotFinished", + "type": "error" + }, + { + "inputs": [], + "name": "UnauthorizedEthereumExecutor", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "ActionsSetCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "initiatorExecution", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "returnedData", + "type": "bytes[]" + } + ], + "name": "ActionsSetExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "bool[]", + "name": "withDelegatecalls", + "type": "bool[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "executionTime", + "type": "uint256" + } + ], + "name": "ActionsSetQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldDelay", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newDelay", + "type": "uint256" + } + ], + "name": "DelayUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldEthereumGovernanceExecutor", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newEthereumGovernanceExecutor", + "type": "address" + } + ], + "name": "EthereumGovernanceExecutorUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldGracePeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newGracePeriod", + "type": "uint256" + } + ], + "name": "GracePeriodUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldGuardian", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newGuardian", + "type": "address" + } + ], + "name": "GuardianUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaximumDelay", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMaximumDelay", + "type": "uint256" + } + ], + "name": "MaximumDelayUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldMinimumDelay", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMinimumDelay", + "type": "uint256" + } + ], + "name": "MinimumDelayUpdate", + "type": "event" + }, + { + "inputs": [], + "name": "LINEA_MESSAGE_SERVICE", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "actionsSetId", + "type": "uint256" + } + ], + "name": "cancel", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "actionsSetId", + "type": "uint256" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "executeDelegateCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "actionsSetId", + "type": "uint256" + } + ], + "name": "getActionsSetById", + "outputs": [ + { + "components": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bool[]", + "name": "withDelegatecalls", + "type": "bool[]" + }, + { + "internalType": "uint256", + "name": "executionTime", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "executed", + "type": "bool" + }, + { + "internalType": "bool", + "name": "canceled", + "type": "bool" + } + ], + "internalType": "struct IExecutorBase.ActionsSet", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getActionsSetCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "actionsSetId", + "type": "uint256" + } + ], + "name": "getCurrentState", + "outputs": [ + { + "internalType": "enum IExecutorBase.ActionsSetState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEthereumGovernanceExecutor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getGracePeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getGuardian", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMaximumDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinimumDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "actionHash", + "type": "bytes32" + } + ], + "name": "isActionQueued", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bool[]", + "name": "withDelegatecalls", + "type": "bool[]" + } + ], + "name": "queue", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "receiveFunds", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "delay", + "type": "uint256" + } + ], + "name": "updateDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "ethereumGovernanceExecutor", + "type": "address" + } + ], + "name": "updateEthereumGovernanceExecutor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "gracePeriod", + "type": "uint256" + } + ], + "name": "updateGracePeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "updateGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "maximumDelay", + "type": "uint256" + } + ], + "name": "updateMaximumDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "minimumDelay", + "type": "uint256" + } + ], + "name": "updateMinimumDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/interfaces/ScrollBridgeExecutor.json b/interfaces/ScrollBridgeExecutor.json new file mode 100644 index 000000000..f3f080da7 --- /dev/null +++ b/interfaces/ScrollBridgeExecutor.json @@ -0,0 +1,705 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "l2ScrollMessenger", + "type": "address" + }, + { + "internalType": "address", + "name": "ethereumGovernanceExecutor", + "type": "address" + }, + { + "internalType": "uint256", + "name": "delay", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "gracePeriod", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minimumDelay", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maximumDelay", + "type": "uint256" + }, + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "DelayLongerThanMax", + "type": "error" + }, + { + "inputs": [], + "name": "DelayShorterThanMin", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateAction", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyTargets", + "type": "error" + }, + { + "inputs": [], + "name": "FailedActionExecution", + "type": "error" + }, + { + "inputs": [], + "name": "GracePeriodTooShort", + "type": "error" + }, + { + "inputs": [], + "name": "InconsistentParamsLength", + "type": "error" + }, + { + "inputs": [], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidActionsSetId", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitParams", + "type": "error" + }, + { + "inputs": [], + "name": "MaximumDelayTooShort", + "type": "error" + }, + { + "inputs": [], + "name": "MinimumDelayTooLong", + "type": "error" + }, + { + "inputs": [], + "name": "NotGuardian", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCallableByThis", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyQueuedActions", + "type": "error" + }, + { + "inputs": [], + "name": "TimelockNotFinished", + "type": "error" + }, + { + "inputs": [], + "name": "UnauthorizedEthereumExecutor", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "ActionsSetCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "initiatorExecution", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "returnedData", + "type": "bytes[]" + } + ], + "name": "ActionsSetExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "bool[]", + "name": "withDelegatecalls", + "type": "bool[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "executionTime", + "type": "uint256" + } + ], + "name": "ActionsSetQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldDelay", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newDelay", + "type": "uint256" + } + ], + "name": "DelayUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldEthereumGovernanceExecutor", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newEthereumGovernanceExecutor", + "type": "address" + } + ], + "name": "EthereumGovernanceExecutorUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldGracePeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newGracePeriod", + "type": "uint256" + } + ], + "name": "GracePeriodUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldGuardian", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newGuardian", + "type": "address" + } + ], + "name": "GuardianUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaximumDelay", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMaximumDelay", + "type": "uint256" + } + ], + "name": "MaximumDelayUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldMinimumDelay", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMinimumDelay", + "type": "uint256" + } + ], + "name": "MinimumDelayUpdate", + "type": "event" + }, + { + "inputs": [], + "name": "L2_SCROLL_MESSENGER", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "actionsSetId", + "type": "uint256" + } + ], + "name": "cancel", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "actionsSetId", + "type": "uint256" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "executeDelegateCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "actionsSetId", + "type": "uint256" + } + ], + "name": "getActionsSetById", + "outputs": [ + { + "components": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bool[]", + "name": "withDelegatecalls", + "type": "bool[]" + }, + { + "internalType": "uint256", + "name": "executionTime", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "executed", + "type": "bool" + }, + { + "internalType": "bool", + "name": "canceled", + "type": "bool" + } + ], + "internalType": "struct IExecutorBase.ActionsSet", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getActionsSetCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "actionsSetId", + "type": "uint256" + } + ], + "name": "getCurrentState", + "outputs": [ + { + "internalType": "enum IExecutorBase.ActionsSetState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEthereumGovernanceExecutor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getGracePeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getGuardian", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMaximumDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinimumDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "actionHash", + "type": "bytes32" + } + ], + "name": "isActionQueued", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bool[]", + "name": "withDelegatecalls", + "type": "bool[]" + } + ], + "name": "queue", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "receiveFunds", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "delay", + "type": "uint256" + } + ], + "name": "updateDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "ethereumGovernanceExecutor", + "type": "address" + } + ], + "name": "updateEthereumGovernanceExecutor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "gracePeriod", + "type": "uint256" + } + ], + "name": "updateGracePeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "updateGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "maximumDelay", + "type": "uint256" + } + ], + "name": "updateMaximumDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "minimumDelay", + "type": "uint256" + } + ], + "name": "updateMinimumDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/network-config.yaml b/network-config.yaml index a57a33a3a..9730afa2f 100644 --- a/network-config.yaml +++ b/network-config.yaml @@ -1,3 +1,14 @@ +live: + - name: Ethereum + networks: + - chainid: 11155111 + explorer: https://api-sepolia.etherscan.io/api + host: $SEPOLIA_RPC_URL + id: sepolia + # New backward-compatible multicall contract. multicall2 is missing on Holesky. See https://github.com/mds1/multicall + multicall2: "0xeAA373D1973e5af44e91840ee097bf7AD64693c2" + name: Sepolia (Infura) + provider: infura development: - cmd: ./ganache.sh cmd_settings: @@ -24,6 +35,18 @@ development: id: goerli-fork name: goerli-fork timeout: 360 + - cmd: ./ganache.sh + cmd_settings: + accounts: 10 + chain_id: 11155111 + fork: $SEPOLIA_RPC_URL + gas_limit: 30000000 + mnemonic: brownie + port: 8545 + host: http://127.0.0.1 + id: sepolia-fork + name: sepolia-fork + timeout: 360 - cmd: ./ganache.sh cmd_settings: accounts: 10 diff --git a/scripts/vote_2023_11_22_goerli.py b/scripts/vote_2023_11_22_goerli.py new file mode 100644 index 000000000..baa030b1c --- /dev/null +++ b/scripts/vote_2023_11_22_goerli.py @@ -0,0 +1,86 @@ +""" +Voting 22/11/2023. +Linea upgrade test. +!! Goerli only +""" + +import time + +import eth_abi +from typing import Dict, Tuple, Optional + +from brownie import interface +from brownie.network.transaction import TransactionReceipt +from utils.voting import bake_vote_items, confirm_vote_script, create_vote +from utils.agent import agent_forward + +from utils.config import ( + get_deployer_account, + get_is_live, + get_priority_fee, +) + +# +# Calls chain: +# 1) Agent -> agent_forward +# 2) -> Linea Message service -> sendMessage +# 3) -> LineaBridgeExecutor -> queue +# 4) -> ProxyAdmin -> upgrade +# + +LINEA_BRIDGE_EXECUTOR: str = "0x4b38D24E70079f2dd1D79B86E2B52f4b13872a3B" +LINEA_L1_L2_MESSAGE_SERVICE: str = "0x70BaD09280FD342D02fe64119779BC1f0791BAC2" + +PROXY_ADMIN_ADDR: str = "0x71062fbc3da2d792285c3d5dabba12a42339e85c" +PROXY_TO_UPGRADE_ADDR: str = "0x9ceed01e39279a529f44deb9d35e09a04b1e67c8" +PROXY_NEW_IMPL_ADDR: str = "0x1c92Ff898f7c34fc6eD884aEC3859Fd6C655c1F0" # USDC + + +def encode_upgrade_call(proxy_admin: str, proxy: str, new_impl: str): + linea_executor = interface.LineaBridgeExecutor( + "0x70BaD09280FD342D02fe64119779BC1f0791BAC2" + ) # any address to bypass + + params = eth_abi.encode(["address", "address"], [proxy, new_impl]) + + return linea_executor.queue.encode_input([proxy_admin], [0], ["upgrade(address,address)"], [params], [False]) + + +def encode_l1_l2_sendMessage(to: str, fee: int, calldata: str): + l1_l2_msg_service = interface.L1MessageService(LINEA_L1_L2_MESSAGE_SERVICE) + + return (l1_l2_msg_service.address, l1_l2_msg_service.sendMessage.encode_input(to, fee, calldata)) + + +def start_vote(tx_params: Dict[str, str], silent: bool = False) -> Tuple[int, Optional[TransactionReceipt]]: + call_script_items = [ + agent_forward( + [ + encode_l1_l2_sendMessage( + LINEA_BRIDGE_EXECUTOR, + 0, + encode_upgrade_call(PROXY_ADMIN_ADDR, PROXY_TO_UPGRADE_ADDR, PROXY_NEW_IMPL_ADDR), + ) + ] + ) + ] + + vote_desc_items = [ + "1) Upgrade Linea Görli wstETH token", + ] + + vote_items = bake_vote_items(vote_desc_items, call_script_items) + return confirm_vote_script(vote_items, silent) and list(create_vote(vote_items, tx_params)) + + +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/scripts/vote_2024_02_07_sepolia.py b/scripts/vote_2024_02_07_sepolia.py new file mode 100644 index 000000000..0180d364b --- /dev/null +++ b/scripts/vote_2024_02_07_sepolia.py @@ -0,0 +1,87 @@ +""" +Voting 07/02/2024. +Scroll upgrade test. +!! Sepolia only +""" + +import time + +import eth_abi +from typing import Dict, Tuple, Optional + +from brownie import interface +from brownie.network.transaction import TransactionReceipt +from utils.voting import bake_vote_items, confirm_vote_script, create_vote +from utils.agent import agent_forward, agent_execute + +from utils.config import ( + get_deployer_account, + get_is_live, + get_priority_fee, +) + +# +# Calls chain: +# 1) Agent -> agent_execute +# 2) -> Scroll message service -> sendMessage +# 3) -> ScrollBridgeExecutor -> queue +# 4) -> ProxyAdmin -> upgrade +# + +SCROLL_BRIDGE_EXECUTOR: str = "0x6b314986E3737Ce23c2a13036e77b3f5A846F8AF" +SCROLL_L1_L2_MESSAGE_SERVICE: str = "0x50c7d3e7f7c656493D1D76aaa1a836CedfCBB16A" + +PROXY_ADMIN_ADDR: str = "0xc6cdc2839378d50e03c9737723d96d117b09bda5" +PROXY_TO_UPGRADE_ADDR: str = "0x2DAf22Caf40404ad8ff0Ab1E77F9C08Fef3953e2" +# PROXY_NEW_IMPL_ADDR: str = "0x2C9678042D52B97D27f2bD2947F7111d93F3dD0D" # USDC +PROXY_NEW_IMPL_ADDR: str = "0xaed405fc13d66e2f1055f6efe9a5ce736652fa55" # wstETH + + +def encode_upgrade_call(proxy_admin: str, proxy: str, new_impl: str): + scroll_executor = interface.ScrollBridgeExecutor( + "0xF22B24fa7c3168f30b17fd97b71bdd3162DDe029" + ) # any address to bypass + + params = eth_abi.encode(["address", "address"], [proxy, new_impl]) + + return scroll_executor.queue.encode_input([proxy_admin], [0], ["upgrade(address,address)"], [params], [False]) + + +def encode_l1_l2_sendMessage(to: str, fee: int, calldata: str): + l1_l2_msg_service = interface.L1ScrollMessenger(SCROLL_L1_L2_MESSAGE_SERVICE) + + return l1_l2_msg_service.sendMessage.encode_input(to, fee, calldata, 1_000_000) + + +def start_vote(tx_params: Dict[str, str], silent: bool = False) -> Tuple[int, Optional[TransactionReceipt]]: + call_script_items = [ + agent_execute( + SCROLL_L1_L2_MESSAGE_SERVICE, + 10**17, + encode_l1_l2_sendMessage( + SCROLL_BRIDGE_EXECUTOR, + 0, + encode_upgrade_call(PROXY_ADMIN_ADDR, PROXY_TO_UPGRADE_ADDR, PROXY_NEW_IMPL_ADDR), + ), + ) + ] + + vote_desc_items = [ + "1) Upgrade Scroll Sepolia wstETH token", + ] + + vote_items = bake_vote_items(vote_desc_items, call_script_items) + return confirm_vote_script(vote_items, silent) and list(create_vote(vote_items, tx_params)) + + +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/tests/test_2023_11_22_goerli.py b/tests/test_2023_11_22_goerli.py new file mode 100644 index 000000000..0ab99e0a6 --- /dev/null +++ b/tests/test_2023_11_22_goerli.py @@ -0,0 +1,49 @@ +""" +Tests for voting 22/11/2023. +!! goerli only +""" +from scripts.vote_2023_11_22_goerli import start_vote + +from brownie import ZERO_ADDRESS, chain, accounts +from brownie.network.transaction import TransactionReceipt + +from eth_abi.abi import encode_single + +from utils.config import ( + network_name, + contracts, + LDO_HOLDER_ADDRESS_FOR_TESTS, +) +from utils.test.tx_tracing_helpers import * +from utils.easy_track import create_permissions +from utils.agent import agent_forward +from utils.voting import create_vote, bake_vote_items + + +##### +# CONSTANTS +##### + + +def test_vote( + helpers, + bypass_events_decoding, + vote_ids_from_env, + accounts, + interface, + ldo_holder, + stranger, +): + if not network_name() in ("goerli", "goerli-fork"): + return + + # 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}, gasUsed = {vote_tx.gas_used}") diff --git a/tests/test_2024_02_07_sepolia.py b/tests/test_2024_02_07_sepolia.py new file mode 100644 index 000000000..ddc592490 --- /dev/null +++ b/tests/test_2024_02_07_sepolia.py @@ -0,0 +1,50 @@ +""" +Tests for voting 07/02/2024. +!! Sepolia only +""" + +from scripts.vote_2024_02_07_sepolia import start_vote + +from brownie import ZERO_ADDRESS, chain, accounts +from brownie.network.transaction import TransactionReceipt + +from eth_abi.abi import encode_single + +from utils.config import ( + network_name, + contracts, + LDO_HOLDER_ADDRESS_FOR_TESTS, +) +from utils.test.tx_tracing_helpers import * +from utils.easy_track import create_permissions +from utils.agent import agent_forward +from utils.voting import create_vote, bake_vote_items + + +##### +# CONSTANTS +##### + + +def test_vote( + helpers, + bypass_events_decoding, + vote_ids_from_env, + accounts, + interface, + ldo_holder, + stranger, +): + if not network_name() in ("sepolia", "sepolia-fork"): + return + + # 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}, gasUsed = {vote_tx.gas_used}") diff --git a/utils/config.py b/utils/config.py index 4a7c35932..a0498ebfe 100644 --- a/utils/config.py +++ b/utils/config.py @@ -29,13 +29,24 @@ def network_name() -> Optional[str]: if network_name() in ("goerli", "goerli-fork"): print(f'Using {color("cyan")}config_goerli.py{color} addresses') from configs.config_goerli import * +elif network_name() in ("sepolia", "sepolia-fork"): + print(f'Using {color("yellow")}config_sepolia.py{color} addresses') + from configs.config_sepolia import * else: print(f'Using {color("magenta")}config_mainnet.py{color} addresses') from configs.config_mainnet import * def get_is_live() -> bool: - dev_networks = ["development", "hardhat", "hardhat-fork", "goerli-fork", "local-fork", "mainnet-fork"] + dev_networks = [ + "development", + "hardhat", + "hardhat-fork", + "goerli-fork", + "sepolia-fork", + "local-fork", + "mainnet-fork", + ] return network.show_active() not in dev_networks @@ -227,7 +238,7 @@ def dai_token(self) -> interface.ERC20: @property def usdt_token(self) -> interface.ERC20: return interface.ERC20(USDT_TOKEN) - + @property def usdc_token(self) -> interface.ERC20: return interface.ERC20(USDC_TOKEN) diff --git a/utils/voting.py b/utils/voting.py index 0015e85c7..966e62c87 100644 --- a/utils/voting.py +++ b/utils/voting.py @@ -193,12 +193,13 @@ def confirm_vote_script( # Show detailed description of prepared voting. if not silent: - human_readable_script = decode_evm_script( - encoded_call_script, - verbose=False, - specific_net=CHAIN_NETWORK_NAME, - repeat_is_error=True, - ) + # human_readable_script = decode_evm_script( + # encoded_call_script, + # verbose=False, + # specific_net=CHAIN_NETWORK_NAME, + # repeat_is_error=True, + # ) + human_readable_script = "" vote_descriptions = list(vote_items.keys())