diff --git a/contracts/abi/L2MessageService.abi b/contracts/abi/L2MessageServiceV1.0.abi similarity index 97% rename from contracts/abi/L2MessageService.abi rename to contracts/abi/L2MessageServiceV1.0.abi index 47020555..7439ad36 100644 --- a/contracts/abi/L2MessageService.abi +++ b/contracts/abi/L2MessageServiceV1.0.abi @@ -1,4 +1,9 @@ [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, { "inputs": [], "name": "ArrayLengthsDoNotMatch", @@ -106,6 +111,11 @@ "name": "MessageHashesListLengthHigherThanOneHundred", "type": "error" }, + { + "inputs": [], + "name": "MessageHashesListLengthIsZero", + "type": "error" + }, { "inputs": [ { @@ -503,6 +513,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "CONTRACT_VERSION", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "DEFAULT_ADMIN_ROLE", @@ -1004,7 +1027,7 @@ "type": "bytes32" } ], - "internalType": "struct IPauseManager.RoleAddress[]", + "internalType": "struct IPermissionsManager.RoleAddress[]", "name": "_roleAddresses", "type": "tuple[]" }, @@ -1198,7 +1221,7 @@ "type": "bytes32" } ], - "internalType": "struct IPauseManager.RoleAddress[]", + "internalType": "struct IPermissionsManager.RoleAddress[]", "name": "_roleAddresses", "type": "tuple[]" }, diff --git a/contracts/abi/LineaRollupV6.0.abi b/contracts/abi/LineaRollupV6.0.abi new file mode 100644 index 00000000..4be65285 --- /dev/null +++ b/contracts/abi/LineaRollupV6.0.abi @@ -0,0 +1,2590 @@ +[ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ArrayLengthsDoNotMatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "emptyBlobIndex", + "type": "uint256" + } + ], + "name": "BlobSubmissionDataEmpty", + "type": "error" + }, + { + "inputs": [], + "name": "BlobSubmissionDataIsMissing", + "type": "error" + }, + { + "inputs": [], + "name": "BytesLengthNotMultipleOf32", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "bytesLength", + "type": "uint256" + } + ], + "name": "BytesLengthNotMultipleOfTwo", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "currentDataHash", + "type": "bytes32" + } + ], + "name": "DataAlreadySubmitted", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "actual", + "type": "uint256" + } + ], + "name": "DataStartingBlockDoesNotMatch", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyBlobData", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "EmptyBlobDataAtIndex", + "type": "error" + }, + { + "inputs": [], + "name": "EmptySubmissionData", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "name": "FeePaymentFailed", + "type": "error" + }, + { + "inputs": [], + "name": "FeeTooLow", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "actual", + "type": "uint256" + } + ], + "name": "FinalBlockDoesNotMatchShnarfFinalBlock", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "finalBlockNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastFinalizedBlock", + "type": "uint256" + } + ], + "name": "FinalBlockNumberLessThanOrEqualToLastFinalizedBlock", + "type": "error" + }, + { + "inputs": [], + "name": "FinalBlockStateEqualsZeroHash", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "expected", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "value", + "type": "bytes32" + } + ], + "name": "FinalShnarfWrong", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "l2BlockTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "currentBlockTimestamp", + "type": "uint256" + } + ], + "name": "FinalizationInTheFuture", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "expected", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "value", + "type": "bytes32" + } + ], + "name": "FinalizationStateIncorrect", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "firstBlockNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "finalBlockNumber", + "type": "uint256" + } + ], + "name": "FirstBlockGreaterThanFinalBlock", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "firstBlockNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastFinalizedBlock", + "type": "uint256" + } + ], + "name": "FirstBlockLessThanOrEqualToLastFinalizedBlock", + "type": "error" + }, + { + "inputs": [], + "name": "FirstByteIsNotZero", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMerkleProof", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidProof", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "errorReason", + "type": "string" + } + ], + "name": "InvalidProofOrProofVerificationRanOutOfGas", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidProofType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "pauseType", + "type": "uint256" + } + ], + "name": "IsNotPaused", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "pauseType", + "type": "uint256" + } + ], + "name": "IsPaused", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "messageNumber", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "rollingHash", + "type": "bytes32" + } + ], + "name": "L1RollingHashDoesNotExistOnL1", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + } + ], + "name": "L2MerkleRootAlreadyAnchored", + "type": "error" + }, + { + "inputs": [], + "name": "L2MerkleRootDoesNotExist", + "type": "error" + }, + { + "inputs": [], + "name": "LastFinalizationTimeNotLapsed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "expected", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "actual", + "type": "bytes32" + } + ], + "name": "LastFinalizedShnarfWrong", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "leafIndex", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "maxAllowedIndex", + "type": "uint32" + } + ], + "name": "LeafIndexOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "LimitIsZero", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "messageIndex", + "type": "uint256" + } + ], + "name": "MessageAlreadyClaimed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "messageHash", + "type": "bytes32" + } + ], + "name": "MessageDoesNotExistOrHasAlreadyBeenClaimed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "name": "MessageSendingFailed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "rollingHash", + "type": "bytes32" + } + ], + "name": "MissingMessageNumberForRollingHash", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "messageNumber", + "type": "uint256" + } + ], + "name": "MissingRollingHashForMessageNumber", + "type": "error" + }, + { + "inputs": [], + "name": "PeriodIsZero", + "type": "error" + }, + { + "inputs": [], + "name": "PointEvaluationFailed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "fieldElements", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blsCurveModulus", + "type": "uint256" + } + ], + "name": "PointEvaluationResponseInvalid", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "actual", + "type": "uint256" + } + ], + "name": "PrecompileReturnDataLengthWrong", + "type": "error" + }, + { + "inputs": [], + "name": "ProofIsEmpty", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "actual", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + } + ], + "name": "ProofLengthDifferentThanMerkleDepth", + "type": "error" + }, + { + "inputs": [], + "name": "RateLimitExceeded", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrantCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shnarfsLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "finalBlockNumbers", + "type": "uint256" + } + ], + "name": "ShnarfAndFinalBlockNumberLengthsMismatched", + "type": "error" + }, + { + "inputs": [], + "name": "SnarkHashIsZeroHash", + "type": "error" + }, + { + "inputs": [], + "name": "StartingRootHashDoesNotMatch", + "type": "error" + }, + { + "inputs": [], + "name": "ValueSentTooLow", + "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": "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": true, + "internalType": "uint256", + "name": "lastBlockFinalized", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "startingRootHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "finalRootHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bool", + "name": "withProof", + "type": "bool" + } + ], + "name": "DataFinalized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "shnarf", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "startBlock", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "endBlock", + "type": "uint256" + } + ], + "name": "DataSubmittedV2", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "gatewayOperatorAddress", + "type": "address" + } + ], + "name": "GatewayOperatorRoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "l2MerkleRoot", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "treeDepth", + "type": "uint256" + } + ], + "name": "L2MerkleRootAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "l2Block", + "type": "uint256" + } + ], + "name": "L2MessagingBlockAnchored", + "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": true, + "internalType": "uint256", + "name": "pauseType", + "type": "uint256" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "periodInSeconds", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "limitInWei", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "currentPeriodEnd", + "type": "uint256" + } + ], + "name": "RateLimitInitialized", + "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": "messageNumber", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "rollingHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "messageHash", + "type": "bytes32" + } + ], + "name": "RollingHashUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messageSender", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pauseType", + "type": "uint256" + } + ], + "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" + }, + { + "indexed": false, + "internalType": "address", + "name": "oldVerifierAddress", + "type": "address" + } + ], + "name": "VerifierAddressChanged", + "type": "event" + }, + { + "inputs": [], + "name": "BLOB_SUBMISSION_PAUSE_TYPE", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CALLDATA_SUBMISSION_PAUSE_TYPE", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COMPLETE_TOKEN_BRIDGING_PAUSE_TYPE", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CONTRACT_VERSION", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "FINALIZATION_PAUSE_TYPE", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "FINALIZE_WITHOUT_PROOF_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "GENERAL_PAUSE_TYPE", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "GENESIS_SHNARF", + "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": "INITIATE_TOKEN_BRIDGING_PAUSE_TYPE", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "L1_L2_PAUSE_TYPE", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "L2_L1_PAUSE_TYPE", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "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_ALL_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PAUSE_FINALIZE_WITHPROOF_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PAUSE_L1_L2_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PAUSE_L2_BLOB_SUBMISSION_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PAUSE_L2_L1_ROLE", + "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": [], + "name": "UNPAUSE_ALL_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UNPAUSE_FINALIZE_WITHPROOF_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UNPAUSE_L1_L2_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UNPAUSE_L2_BLOB_SUBMISSION_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UNPAUSE_L2_L1_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "USED_RATE_LIMIT_RESETTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "VERIFIER_SETTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "VERIFIER_UNSETTER_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": [ + { + "components": [ + { + "internalType": "bytes32[]", + "name": "proof", + "type": "bytes32[]" + }, + { + "internalType": "uint256", + "name": "messageNumber", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "leafIndex", + "type": "uint32" + }, + { + "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": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct IL1MessageService.ClaimMessageWithProofParams", + "name": "_params", + "type": "tuple" + } + ], + "name": "claimMessageWithProof", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "currentFinalizedShnarf", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "currentFinalizedState", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "currentL2BlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "currentL2StoredL1MessageNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "currentL2StoredL1RollingHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "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": [ + { + "internalType": "bytes32", + "name": "dataHash", + "type": "bytes32" + } + ], + "name": "dataEndingBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "endingBlock", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "dataHash", + "type": "bytes32" + } + ], + "name": "dataFinalStateRootHashes", + "outputs": [ + { + "internalType": "bytes32", + "name": "finalStateRootHash", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "dataHash", + "type": "bytes32" + } + ], + "name": "dataParents", + "outputs": [ + { + "internalType": "bytes32", + "name": "parentHash", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "dataHash", + "type": "bytes32" + } + ], + "name": "dataShnarfHashes", + "outputs": [ + { + "internalType": "bytes32", + "name": "shnarfHash", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "dataHash", + "type": "bytes32" + } + ], + "name": "dataStartingBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "startingBlock", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_aggregatedProof", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_proofType", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "parentStateRootHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "lastFinalizedShnarf", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "finalBlockInData", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "parentShnarf", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "snarkHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "finalStateRootHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "dataEvaluationPoint", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "dataEvaluationClaim", + "type": "bytes32" + } + ], + "internalType": "struct ILineaRollup.ShnarfData", + "name": "shnarfData", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "lastFinalizedTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "finalTimestamp", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "lastFinalizedL1RollingHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "l1RollingHash", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "lastFinalizedL1RollingHashMessageNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "l1RollingHashMessageNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "l2MerkleTreesDepth", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "l2MerkleRoots", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "l2MessagingBlocksOffsets", + "type": "bytes" + } + ], + "internalType": "struct ILineaRollup.FinalizationDataV2", + "name": "_finalizationData", + "type": "tuple" + } + ], + "name": "finalizeBlocksWithProof", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "gatewayOperator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "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": "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": "messageHash", + "type": "bytes32" + } + ], + "name": "inboxL2L1MessageStatus", + "outputs": [ + { + "internalType": "uint256", + "name": "messageStatus", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "initialStateRootHash", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "initialL2BlockNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "genesisTimestamp", + "type": "uint256" + }, + { + "internalType": "address", + "name": "defaultVerifier", + "type": "address" + }, + { + "internalType": "uint256", + "name": "rateLimitPeriodInSeconds", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rateLimitAmountInWei", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "addressWithRole", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "internalType": "struct IPermissionsManager.RoleAddress[]", + "name": "roleAddresses", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "pauseType", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "internalType": "struct IPauseManager.PauseTypeRole[]", + "name": "pauseTypeRoles", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "pauseType", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "internalType": "struct IPauseManager.PauseTypeRole[]", + "name": "unpauseTypeRoles", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "gatewayOperator", + "type": "address" + } + ], + "internalType": "struct ILineaRollup.InitializationData", + "name": "_initializationData", + "type": "tuple" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_messageNumber", + "type": "uint256" + } + ], + "name": "isMessageClaimed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "_pauseType", + "type": "uint8" + } + ], + "name": "isPaused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + } + ], + "name": "l2MerkleRootsDepths", + "outputs": [ + { + "internalType": "uint256", + "name": "treeDepth", + "type": "uint256" + } + ], + "stateMutability": "view", + "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": "messageHash", + "type": "bytes32" + } + ], + "name": "outboxL1L2MessageStatus", + "outputs": [ + { + "internalType": "uint256", + "name": "messageStatus", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "_pauseType", + "type": "uint8" + } + ], + "name": "pauseByType", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "pauseType", + "type": "bytes32" + } + ], + "name": "pauseTypeStatuses", + "outputs": [ + { + "internalType": "bool", + "name": "pauseStatus", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "periodInSeconds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "addressWithRole", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "internalType": "struct IPermissionsManager.RoleAddress[]", + "name": "_roleAddresses", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "pauseType", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "internalType": "struct IPauseManager.PauseTypeRole[]", + "name": "_pauseTypeRoles", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "pauseType", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "internalType": "struct IPauseManager.PauseTypeRole[]", + "name": "_unpauseTypeRoles", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "_gatewayOperator", + "type": "address" + } + ], + "name": "reinitializePauseTypesAndPermissions", + "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": "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": "uint256", + "name": "messageNumber", + "type": "uint256" + } + ], + "name": "rollingHashes", + "outputs": [ + { + "internalType": "bytes32", + "name": "rollingHash", + "type": "bytes32" + } + ], + "stateMutability": "view", + "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": "addr", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_messageNumber", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_rollingHash", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_lastFinalizedTimestamp", + "type": "uint256" + } + ], + "name": "setGatewayOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newVerifierAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_proofType", + "type": "uint256" + } + ], + "name": "setVerifierAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "shnarf", + "type": "bytes32" + } + ], + "name": "shnarfFinalBlockNumbers", + "outputs": [ + { + "internalType": "uint256", + "name": "finalBlockNumber", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "stateRootHashes", + "outputs": [ + { + "internalType": "bytes32", + "name": "stateRootHash", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "finalStateRootHash", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "firstBlockInData", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "finalBlockInData", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "snarkHash", + "type": "bytes32" + } + ], + "internalType": "struct ILineaRollup.SupportingSubmissionDataV2", + "name": "submissionData", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "dataEvaluationClaim", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "kzgCommitment", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "kzgProof", + "type": "bytes" + } + ], + "internalType": "struct ILineaRollup.BlobSubmissionData[]", + "name": "_blobSubmissionData", + "type": "tuple[]" + }, + { + "internalType": "bytes32", + "name": "_parentShnarf", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_finalBlobShnarf", + "type": "bytes32" + } + ], + "name": "submitBlobs", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "finalStateRootHash", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "firstBlockInData", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "finalBlockInData", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "snarkHash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "compressedData", + "type": "bytes" + } + ], + "internalType": "struct ILineaRollup.SubmissionDataV2", + "name": "_submissionData", + "type": "tuple" + }, + { + "internalType": "bytes32", + "name": "_parentShnarf", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_expectedShnarf", + "type": "bytes32" + } + ], + "name": "submitDataAsCalldata", + "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": [], + "name": "systemMigrationBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "_pauseType", + "type": "uint8" + } + ], + "name": "unPauseByType", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_proofType", + "type": "uint256" + } + ], + "name": "unsetVerifierAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proofType", + "type": "uint256" + } + ], + "name": "verifiers", + "outputs": [ + { + "internalType": "address", + "name": "verifierAddress", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } +] \ No newline at end of file diff --git a/contracts/abi/ZkEvmV2.abi b/contracts/abi/ZkEvmV2.abi deleted file mode 100644 index c7b8cd2b..00000000 --- a/contracts/abi/ZkEvmV2.abi +++ /dev/null @@ -1,1272 +0,0 @@ -[ - { - "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/contracts/contracts/messageService/l2/L2MessageService.sol b/contracts/contracts/messageService/l2/L2MessageService.sol index 22fec5be..43011803 100644 --- a/contracts/contracts/messageService/l2/L2MessageService.sol +++ b/contracts/contracts/messageService/l2/L2MessageService.sol @@ -12,6 +12,9 @@ import { PermissionsManager } from "../../lib/PermissionsManager.sol"; * @custom:security-contact security-report@linea.build */ contract L2MessageService is AccessControlUpgradeable, L2MessageServiceV1, L2MessageManager, PermissionsManager { + /// @dev This is the ABI version and not the reinitialize version. + string public constant CONTRACT_VERSION = "1.0"; + /// @dev Total contract storage is 50 slots with the gap below. /// @dev Keep 50 free storage slots for future implementation updates to avoid storage collision. uint256[50] private __gap_L2MessageService; diff --git a/contracts/scripts/hardhat/postCompile.ts b/contracts/scripts/hardhat/postCompile.ts index 097c39e2..a57ae78e 100644 --- a/contracts/scripts/hardhat/postCompile.ts +++ b/contracts/scripts/hardhat/postCompile.ts @@ -9,7 +9,7 @@ const MAX_UNCHANGED_PART_LEN = 100; const EXPOSED_CONTRACTS = ["L2MessageService", "LineaRollup", "TimeLock"]; const CONTRACT_OUPUT_ABIS: { [contractName: string]: string } = { - L2MessageService: "L2MessageService.abi", + L2MessageService: "L2MessageServiceV1.0.abi", LineaRollup: "LineaRollupV6.0.abi", // next version TimeLock: "TimeLock.abi", }; diff --git a/jvm-libs/linea-contracts/l2-message-service/build.gradle b/jvm-libs/linea-contracts/l2-message-service/build.gradle index 19d6b452..aacec29d 100644 --- a/jvm-libs/linea-contracts/l2-message-service/build.gradle +++ b/jvm-libs/linea-contracts/l2-message-service/build.gradle @@ -17,7 +17,7 @@ dependencies { web3jContractWrappers { def contractAbi = layout.buildDirectory.dir("${rootProject.projectDir}/contracts/abi").get() - .file("L2MessageService.abi").asFile.absolutePath + .file("L2MessageServiceV1.0.abi").asFile.absolutePath contractsPackage = "net.consensys.linea.contract" contracts = ["$contractAbi": "L2MessageService"]