UNPKG

@zero-tech/zkevm-contracts

Version:
1,938 lines 156 kB
{ "_format": "hh-sol-artifact-1", "contractName": "PolygonZkEVMMock", "sourceName": "contracts/mocks/PolygonZkEVMMock.sol", "abi": [ { "inputs": [ { "internalType": "contract IPolygonZkEVMGlobalExitRoot", "name": "_globalExitRootManager", "type": "address" }, { "internalType": "contract IERC20Upgradeable", "name": "_matic", "type": "address" }, { "internalType": "contract IVerifierRollup", "name": "_rollupVerifier", "type": "address" }, { "internalType": "contract IPolygonZkEVMBridge", "name": "_bridgeAddress", "type": "address" }, { "internalType": "uint64", "name": "_chainID", "type": "uint64" }, { "internalType": "uint64", "name": "_forkID", "type": "uint64" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [], "name": "BatchAlreadyVerified", "type": "error" }, { "inputs": [], "name": "BatchNotSequencedOrNotSequenceEnd", "type": "error" }, { "inputs": [], "name": "ExceedMaxVerifyBatches", "type": "error" }, { "inputs": [], "name": "FinalNumBatchBelowLastVerifiedBatch", "type": "error" }, { "inputs": [], "name": "FinalNumBatchDoesNotMatchPendingState", "type": "error" }, { "inputs": [], "name": "FinalPendingStateNumInvalid", "type": "error" }, { "inputs": [], "name": "ForceBatchNotAllowed", "type": "error" }, { "inputs": [], "name": "ForceBatchTimeoutNotExpired", "type": "error" }, { "inputs": [], "name": "ForceBatchesAlreadyActive", "type": "error" }, { "inputs": [], "name": "ForceBatchesOverflow", "type": "error" }, { "inputs": [], "name": "ForcedDataDoesNotMatch", "type": "error" }, { "inputs": [], "name": "GlobalExitRootNotExist", "type": "error" }, { "inputs": [], "name": "HaltTimeoutNotExpired", "type": "error" }, { "inputs": [], "name": "InitNumBatchAboveLastVerifiedBatch", "type": "error" }, { "inputs": [], "name": "InitNumBatchDoesNotMatchPendingState", "type": "error" }, { "inputs": [], "name": "InvalidProof", "type": "error" }, { "inputs": [], "name": "InvalidRangeBatchTimeTarget", "type": "error" }, { "inputs": [], "name": "InvalidRangeForceBatchTimeout", "type": "error" }, { "inputs": [], "name": "InvalidRangeMultiplierBatchFee", "type": "error" }, { "inputs": [], "name": "NewAccInputHashDoesNotExist", "type": "error" }, { "inputs": [], "name": "NewPendingStateTimeoutMustBeLower", "type": "error" }, { "inputs": [], "name": "NewStateRootNotInsidePrime", "type": "error" }, { "inputs": [], "name": "NewTrustedAggregatorTimeoutMustBeLower", "type": "error" }, { "inputs": [], "name": "NotEnoughMaticAmount", "type": "error" }, { "inputs": [], "name": "OldAccInputHashDoesNotExist", "type": "error" }, { "inputs": [], "name": "OldStateRootDoesNotExist", "type": "error" }, { "inputs": [], "name": "OnlyAdmin", "type": "error" }, { "inputs": [], "name": "OnlyEmergencyState", "type": "error" }, { "inputs": [], "name": "OnlyNotEmergencyState", "type": "error" }, { "inputs": [], "name": "OnlyPendingAdmin", "type": "error" }, { "inputs": [], "name": "OnlyTrustedAggregator", "type": "error" }, { "inputs": [], "name": "OnlyTrustedSequencer", "type": "error" }, { "inputs": [], "name": "PendingStateDoesNotExist", "type": "error" }, { "inputs": [], "name": "PendingStateInvalid", "type": "error" }, { "inputs": [], "name": "PendingStateNotConsolidable", "type": "error" }, { "inputs": [], "name": "PendingStateTimeoutExceedHaltAggregationTimeout", "type": "error" }, { "inputs": [], "name": "SequenceZeroBatches", "type": "error" }, { "inputs": [], "name": "SequencedTimestampBelowForcedTimestamp", "type": "error" }, { "inputs": [], "name": "SequencedTimestampInvalid", "type": "error" }, { "inputs": [], "name": "StoredRootMustBeDifferentThanNewRoot", "type": "error" }, { "inputs": [], "name": "TransactionsLengthAboveMax", "type": "error" }, { "inputs": [], "name": "TrustedAggregatorTimeoutExceedHaltAggregationTimeout", "type": "error" }, { "inputs": [], "name": "TrustedAggregatorTimeoutNotExpired", "type": "error" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "newAdmin", "type": "address" } ], "name": "AcceptAdminRole", "type": "event" }, { "anonymous": false, "inputs": [], "name": "ActivateForceBatches", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint64", "name": "numBatch", "type": "uint64" }, { "indexed": false, "internalType": "bytes32", "name": "stateRoot", "type": "bytes32" }, { "indexed": true, "internalType": "uint64", "name": "pendingStateNum", "type": "uint64" } ], "name": "ConsolidatePendingState", "type": "event" }, { "anonymous": false, "inputs": [], "name": "EmergencyStateActivated", "type": "event" }, { "anonymous": false, "inputs": [], "name": "EmergencyStateDeactivated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint64", "name": "forceBatchNum", "type": "uint64" }, { "indexed": false, "internalType": "bytes32", "name": "lastGlobalExitRoot", "type": "bytes32" }, { "indexed": false, "internalType": "address", "name": "sequencer", "type": "address" }, { "indexed": false, "internalType": "bytes", "name": "transactions", "type": "bytes" } ], "name": "ForceBatch", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint8", "name": "version", "type": "uint8" } ], "name": "Initialized", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint64", "name": "numBatch", "type": "uint64" }, { "indexed": false, "internalType": "bytes32", "name": "stateRoot", "type": "bytes32" }, { "indexed": true, "internalType": "address", "name": "aggregator", "type": "address" } ], "name": "OverridePendingState", "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": "bytes32", "name": "storedStateRoot", "type": "bytes32" }, { "indexed": false, "internalType": "bytes32", "name": "provedStateRoot", "type": "bytes32" } ], "name": "ProveNonDeterministicPendingState", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint64", "name": "numBatch", "type": "uint64" } ], "name": "SequenceBatches", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint64", "name": "numBatch", "type": "uint64" } ], "name": "SequenceForceBatches", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint64", "name": "newforceBatchTimeout", "type": "uint64" } ], "name": "SetForceBatchTimeout", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint16", "name": "newMultiplierBatchFee", "type": "uint16" } ], "name": "SetMultiplierBatchFee", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint64", "name": "newPendingStateTimeout", "type": "uint64" } ], "name": "SetPendingStateTimeout", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "newTrustedAggregator", "type": "address" } ], "name": "SetTrustedAggregator", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint64", "name": "newTrustedAggregatorTimeout", "type": "uint64" } ], "name": "SetTrustedAggregatorTimeout", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "newTrustedSequencer", "type": "address" } ], "name": "SetTrustedSequencer", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "string", "name": "newTrustedSequencerURL", "type": "string" } ], "name": "SetTrustedSequencerURL", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint64", "name": "newVerifyBatchTimeTarget", "type": "uint64" } ], "name": "SetVerifyBatchTimeTarget", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "newPendingAdmin", "type": "address" } ], "name": "TransferAdminRole", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint64", "name": "numBatch", "type": "uint64" }, { "indexed": false, "internalType": "uint64", "name": "forkID", "type": "uint64" }, { "indexed": false, "internalType": "string", "name": "version", "type": "string" } ], "name": "UpdateZkEVMVersion", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint64", "name": "numBatch", "type": "uint64" }, { "indexed": false, "internalType": "bytes32", "name": "stateRoot", "type": "bytes32" }, { "indexed": true, "internalType": "address", "name": "aggregator", "type": "address" } ], "name": "VerifyBatches", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint64", "name": "numBatch", "type": "uint64" }, { "indexed": false, "internalType": "bytes32", "name": "stateRoot", "type": "bytes32" }, { "indexed": true, "internalType": "address", "name": "aggregator", "type": "address" } ], "name": "VerifyBatchesTrustedAggregator", "type": "event" }, { "inputs": [], "name": "acceptAdminRole", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "sequencedBatchNum", "type": "uint64" } ], "name": "activateEmergencyState", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "activateForceBatches", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "admin", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "batchFee", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "", "type": "uint64" } ], "name": "batchNumToStateRoot", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "bridgeAddress", "outputs": [ { "internalType": "contract IPolygonZkEVMBridge", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "currentAccInputHash", "type": "bytes32" }, { "internalType": "bytes", "name": "transactions", "type": "bytes" }, { "internalType": "bytes32", "name": "globalExitRoot", "type": "bytes32" }, { "internalType": "uint64", "name": "timestamp", "type": "uint64" }, { "internalType": "address", "name": "sequencerAddress", "type": "address" } ], "name": "calculateAccInputHash", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [], "name": "calculateRewardPerBatch", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "chainID", "outputs": [ { "internalType": "uint64", "name": "", "type": "uint64" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "newStateRoot", "type": "uint256" } ], "name": "checkStateRootInsidePrime", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "pendingStateNum", "type": "uint64" } ], "name": "consolidatePendingState", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "deactivateEmergencyState", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes", "name": "transactions", "type": "bytes" }, { "internalType": "uint256", "name": "maticAmount", "type": "uint256" } ], "name": "forceBatch", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "forceBatchTimeout", "outputs": [ { "internalType": "uint64", "name": "", "type": "uint64" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "", "type": "uint64" } ], "name": "forcedBatches", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "forkID", "outputs": [ { "internalType": "uint64", "name": "", "type": "uint64" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getForcedBatchFee", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "initNumBatch", "type": "uint64" }, { "internalType": "uint64", "name": "finalNewBatch", "type": "uint64" }, { "internalType": "bytes32", "name": "newLocalExitRoot", "type": "bytes32" }, { "internalType": "bytes32", "name": "oldStateRoot", "type": "bytes32" }, { "internalType": "bytes32", "name": "newStateRoot", "type": "bytes32" } ], "name": "getInputSnarkBytes", "outputs": [ { "internalType": "bytes", "name": "", "type": "bytes" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getLastVerifiedBatch", "outputs": [ { "internalType": "uint64", "name": "", "type": "uint64" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "pendingStateNum", "type": "uint64" }, { "internalType": "uint64", "name": "initNumBatch", "type": "uint64" }, { "internalType": "uint64", "name": "finalNewBatch", "type": "uint64" }, { "internalType": "bytes32", "name": "newLocalExitRoot", "type": "bytes32" }, { "internalType": "bytes32", "name": "newStateRoot", "type": "bytes32" } ], "name": "getNextSnarkInput", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "globalExitRootManager", "outputs": [ { "internalType": "contract IPolygonZkEVMGlobalExitRoot", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "address", "name": "admin", "type": "address" }, { "internalType": "address", "name": "trustedSequencer", "type": "address" }, { "internalType": "uint64", "name": "pendingStateTimeout", "type": "uint64" }, { "internalType": "address", "name": "trustedAggregator", "type": "address" }, { "internalType": "uint64", "name": "trustedAggregatorTimeout", "type": "uint64" } ], "internalType": "struct PolygonZkEVM.InitializePackedParameters", "name": "initializePackedParameters", "type": "tuple" }, { "internalType": "bytes32", "name": "genesisRoot", "type": "bytes32" }, { "internalType": "string", "name": "_trustedSequencerURL", "type": "string" }, { "internalType": "string", "name": "_networkName", "type": "string" }, { "internalType": "string", "name": "_version", "type": "string" } ], "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "isEmergencyState", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "isForcedBatchDisallowed", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "pendingStateNum", "type": "uint64" } ], "name": "isPendingStateConsolidable", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "lastBatchSequenced", "outputs": [ { "internalType": "uint64", "name": "", "type": "uint64" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "lastForceBatch", "outputs": [ { "internalType": "uint64", "name": "", "type": "uint64" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "lastForceBatchSequenced", "outputs": [ { "internalType": "uint64", "name": "", "type": "uint64" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "lastPendingState", "outputs": [ { "internalType": "uint64", "name": "", "type": "uint64" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "lastPendingStateConsolidated", "outputs": [ { "internalType": "uint64", "name": "", "type": "uint64" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "lastTimestamp", "outputs": [ { "internalType": "uint64", "name": "", "type": "uint64" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "lastVerifiedBatch", "outputs": [ { "internalType": "uint64", "name": "", "type": "uint64" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "matic", "outputs": [ { "internalType": "contract IERC20Upgradeable", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "multiplierBatchFee", "outputs": [ { "internalType": "uint16", "name": "", "type": "uint16" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "networkName", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "initPendingStateNum", "type": "uint64" }, { "internalType": "uint64", "name": "finalPendingStateNum", "type": "uint64" }, { "internalType": "uint64", "name": "initNumBatch", "type": "uint64" }, { "internalType": "uint64", "name": "finalNewBatch", "type": "uint64" }, { "internalType": "bytes32", "name": "newLocalExitRoot", "type": "bytes32" }, { "internalType": "bytes32", "name": "newStateRoot", "type": "bytes32" }, { "internalType": "bytes32[24]", "name": "proof", "type": "bytes32[24]" } ], "name": "overridePendingState", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "pendingAdmin", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "pendingStateTimeout", "outputs": [ { "internalType": "uint64", "name": "", "type": "uint64" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "pendingStateTransitions", "outputs": [ { "internalType": "uint64", "name": "timestamp", "type": "uint64" }, { "internalType": "uint64", "name": "lastVerifiedBatch", "type": "uint64" }, { "internalType": "bytes32", "name": "exitRoot", "type": "bytes32" }, { "internalType": "bytes32", "name": "stateRoot", "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "initPendingStateNum", "type": "uint64" }, { "internalType": "uint64", "name": "finalPendingStateNum", "type": "uint64" }, { "internalType": "uint64", "name": "initNumBatch", "type": "uint64" }, { "internalType": "uint64", "name": "finalNewBatch", "type": "uint64" }, { "internalType": "bytes32", "name": "newLocalExitRoot", "type": "bytes32" }, { "internalType": "bytes32", "name": "newStateRoot", "type": "bytes32" }, { "internalType": "bytes32[24]", "name": "proof", "type": "bytes32[24]" } ], "name": "proveNonDeterministicPendingState", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "rollupVerifier", "outputs": [ { "internalType": "contract IVerifierRollup", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "bytes", "name": "transactions", "type": "bytes" }, { "internalType": "bytes32", "name": "globalExitRoot", "type": "bytes32" }, { "internalType": "uint64", "name": "timestamp", "type": "uint64" }, { "internalType": "uint64", "name": "minForcedTimestamp", "type": "uint64" } ], "internalType": "struct PolygonZkEVM.BatchData[]", "name": "batches", "type": "tuple[]" }, { "internalType": "address", "name": "l2Coinbase", "type": "address" } ], "name": "sequenceBatches", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "bytes", "name": "transactions", "type": "bytes" }, { "internalType": "bytes32", "name": "globalExitRoot", "type": "bytes32" }, { "internalType": "uint64", "name": "minForcedTimestamp", "type": "uint64" } ], "internalType": "struct PolygonZkEVM.ForcedBatchData[]", "name": "batches", "type": "tuple[]" } ], "name": "sequenceForceBatches", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "", "type": "uint64" } ], "name": "sequencedBatches", "outputs": [ { "internalType": "bytes32", "name": "accInputHash", "type": "bytes32" }, { "internalType": "uint64", "name": "sequencedTimestamp", "type": "uint64" }, { "internalType": "uint64", "name": "previousLastBatchSequenced", "type": "uint64" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "newforceBatchTimeout", "type": "uint64" } ], "name": "setForceBatchTimeout", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint16", "name": "newMultiplierBatchFee", "type": "uint16" } ], "name": "setMultiplierBatchFee", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "_networkName", "type": "string" } ], "name": "setNetworkName", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "newPendingStateTimeout", "type": "uint64" } ], "name": "setPendingStateTimeout", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "_numBatch", "type": "uint64" } ], "name": "setSequencedBatch", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "batchNum", "type": "uint64" }, { "internalType": "bytes32", "name": "accInputData", "type": "bytes32" }, { "internalType": "uint64", "name": "timestamp", "type": "uint64" }, { "internalType": "uint64", "name": "lastPendingStateConsolidated", "type": "uint64" } ], "name": "setSequencedBatches", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "newStateRoot", "type": "bytes32" }, { "internalType": "uint64", "name": "batchNum", "type": "uint64" } ], "name": "setStateRoot", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newTrustedAggregator", "type": "address" } ], "name": "setTrustedAggregator", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "newTrustedAggregatorTimeout", "type": "uint64" } ], "name": "setTrustedAggregatorTimeout", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newTrustedSequencer", "type": "address" } ], "name": "setTrustedSequencer", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "newTrustedSequencerURL", "type": "string" } ], "name": "setTrustedSequencerURL", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "_numBatch", "type": "uint64" } ], "name": "setVerifiedBatch", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "newVerifyBatchTimeTarget", "type": "uint64" } ], "name": "setVerifyBatchTimeTarget", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newPendingAdmin", "type": "address" } ], "name": "transferAdminRole", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "trustedAggregator", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "trustedAggregatorTimeout", "outputs": [ { "internalType": "uint64", "name": "", "type": "uint64" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "trustedSequencer", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "trustedSequencerURL", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "pendingStateNum", "type": "uint64" }, { "internalType": "uint64", "name": "initNumBatch", "type": "uint64" }, { "internalType": "uint64", "name": "finalNewBatch", "type": "uint64" }, { "internalType": "bytes32", "name": "newLocalExitRoot", "type": "bytes32" }, { "internalType": "bytes32", "name": "newStateRoot", "type": "bytes32" }, { "internalType": "uint256[2]", "name": "proofA", "type": "uint256[2]" }, { "internalType": "uint256[2][2]", "name": "proofB", "type": "uint256[2][2]" }, { "internalType": "uint256[2]", "name": "proofC", "type": "uint256[2]" } ], "name": "trustedVerifyBatchesMock", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "newLastVerifiedBatch", "type": "uint64" } ], "name": "updateBatchFee", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "verifyBatchTimeTarget", "outputs": [ { "internalType": "uint64", "name": "", "type": "uint64" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "pendingStateNum", "type": "uint64" }, { "internalType": "uint64", "name": "initNumBatch", "type": "uint64" }, { "internalType": "uint64", "name": "finalNewBatch", "type": "uint64" }, { "internalType": "bytes32", "name": "newLocalExitRoot", "type": "bytes32" }, { "internalType": "bytes32", "name": "newStateRoot", "type": "bytes32" }, { "internalType": "bytes32[24]", "name": "proof", "type": "bytes32[24]" } ], "name": "verifyBatches", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "pendingStateNum", "type": "uint64" }, { "internalType": "uint64", "name": "initNumBatch", "type": "uint64" }, { "internalType": "uint64", "name": "finalNewBatch", "type": "uint64" }, { "internalType": "bytes32", "name": "newLocalExitRoot", "type": "bytes32" }, { "internalType": "bytes32", "name": "newStateRoot", "type": "bytes32" }, { "internalType": "bytes32[24]", "name": "proof", "type": "bytes32[24]" } ], "name": "verifyBatchesTrustedAggregator", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "bytecode": "0x6101406040523480156200001257600080fd5b5060405162007064380380620070648339810160408190526200003591620000a5565b6001600160a01b0395861660c05293851660805291841660a05290921660e0526001600160401b0391821661010052166101205262000131565b6001600160a01b03811681146200008557600080fd5b50565b80516001600160401b0381168114620000a057600080fd5b919050565b60008060008060008060c08789031215620000bf57600080fd5b8651620000cc816200006f565b6020880151909650620000df816200006f565b6040880151909550620000f2816200006f565b606088015190945062000105816200006f565b9250620001156080880162000088565b91506200012560a0880162000088565b90509295509295509295565b60805160a05160c05160e0516101005161012051616e5e620002066000396000818161083001528181611a880152613ec80152600081816109c30152611a5e01526000818161098901528181612a2d015281816145610152615a90015260008181610b550152818161173801528181611bfb01528181611dcc0152818161263501528181612e06015281816147d901526155df015260008181610c1501528181614f3a0152615392015260008181610a92015281816129fb0152818161333a015281816147ad01526150280152616e5e6000f3fe608060405234801561001057600080fd5b506004361061048d5760003560e01c80638c3d73011161026b578063c754c7ed11610150578063e7a7ed02116100c8578063f14916d611610097578063f851a4401161007c578063f851a44014610c9d578063f8b823e414610cbd578063fe16564f14610cc657600080fd5b8063f14916d614610c77578063f2fde38b14610c8a57600080fd5b8063e7a7ed0214610be0578063e8bf92ed14610c10578063eaeb077b14610c37578063ed6b010414610c4a57600080fd5b8063d2e129f91161011f578063d939b31511610104578063d939b31514610b9d578063dbc1697614610bc5578063e0d1744114610bcd57600080fd5b8063d2e129f914610b77578063d8d1091b14610b8a57600080fd5b8063c754c7ed14610ae2578063c89e42df14610b0e578063cfa8ed4714610b21578063d02103ca14610b5057600080fd5b8063ada8f919116101e3578063b4f77ea9116101b2578063ba58ae3911610197578063ba58ae3914610ab4578063c0cad30214610ac7578063c0ed84e014610ada57600080fd5b8063b4f77ea914610a7a578063b6b0b09714610a8d57600080fd5b8063ada8f919146109ab578063adc879e9146109be578063afd23cbe146109e5578063b4d63f5814610a1357600080fd5b80639aa972a31161023a5780639c9f3dfe1161021f5780639c9f3dfe1461095e578063a066215c14610971578063a3c573eb1461098457600080fd5b80639aa972a3146109385780639b7967601461094b57600080fd5b80638c3d7301146108f75780638da5cb5b146108ff57806396dc3d391461091d57806399f5634e1461093057600080fd5b80634a1a89a711610391578063621dd411116103095780637215541a116102d8578063831c7ead116102bd578063831c7ead1461082b578063837a473814610852578063841b24d7146108c757600080fd5b80637215541a146108045780637fcb36531461081757600080fd5b8063621dd411146107b65780636b8616ce146107c95780636ff512cc146107e9578063715018a6146107fc57600080fd5b8063542028d5116103605780635e9145c9116103455780635e9145c9146107935780635ec91958146107a657806360469169146107ae57600080fd5b8063542028d5146106ea578063574f649e146106f257600080fd5b80634a1a89a7146106845780634a910e6a146106a45780634e487706146106b75780635392c5e0146106ca57600080fd5b80632678224711610424578063383b3be8116103f3578063423fa856116103d8578063423fa856146106285780634560526714610648578063458c04771461067057600080fd5b8063383b3be814610602578063394218e91461061557600080fd5b8063267822471461056b57806329878983146105b05780632b0006fa146105dc5780632c1f816a146105ef57600080fd5b806315064c961161046057806315064c96146105145780631816b7e51461053157806319d8ac6114610544578063220d78991461055857600080fd5b80630a0d9fbe146104925780630eaa86ea146104c9578063107bf28c146104ea57806310a01a72146104ff575b600080fd5b606f546104ab90610100900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6104dc6104d7366004616066565b610cd9565b6040519081526020016104c0565b6104f26111b1565b6040516104c09190616129565b61051261050d36600461615a565b61123f565b005b606f546105219060ff1681565b60405190151581526020016104c0565b61051261053f3660046161ed565b6117f7565b6073546104ab9067ffffffffffffffff1681565b6104f2610566366004616211565b61190f565b607b5461058b9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016104c0565b60745461058b9068010000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b6105126105ea366004616270565b611ae6565b6105126105fd3660046162d8565b611cb6565b610521610610366004616352565b611ec4565b610512610623366004616352565b611f1a565b6073546104ab9068010000000000000000900467ffffffffffffffff1681565b6073546104ab90700100000000000000000000000000000000900467ffffffffffffffff1681565b6079546104ab9067ffffffffffffffff1681565b6079546104ab9068010000000000000000900467ffffffffffffffff1681565b6105126106b2366004616352565b61209e565b6105126106c5366004616352565b612151565b6104dc6106d8366004616352565b60756020526000908152604090205481565b6104f26122d5565b6104dc61070036600461646b565b835160209485012060408051808701979097528681019190915260608087019490945260c09290921b7fffffffffffffffff00000000000000000000000000000000000000000000000016608086015290911b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660888401528051808403607c018152609c9093019052815191012090565b6105126107a1366004616529565b6122e2565b610512612aec565b6104dc612bec565b6105126107c4366004616270565b612c02565b6104dc6107d7366004616352565b60716020526000908152604090205481565b6105126107f736600461657d565b612f8a565b61051261305f565b610512610812366004616352565b613073565b6074546104ab9067ffffffffffffffff1681565b6104ab7f000000000000000000000000000000000000000000000000000000000000000081565b61089b610860366004616598565b60786020526000908152604090208054600182015460029092015467ffffffffffffffff808316936801000000000000000090930416919084565b6040805167ffffffffffffffff95861681529490931660208501529183015260608201526080016104c0565b6079546104ab907801000000000000000000000000000000000000000000000000900467ffffffffffffffff1681565b6105126131e3565b60335473ffffffffffffffffffffffffffffffffffffffff1661058b565b61051261092b366004616352565b6132af565b6104dc6132f2565b6105126109463660046162d8565b61344b565b610512610959366004616352565b6134fc565b61051261096c366004616352565b61354b565b61051261097f366004616352565b6136c7565b61058b7f000000000000000000000000000000000000000000000000000000000000000081565b6105126109b936600461657d565b6137cd565b6104ab7f000000000000000000000000000000000000000000000000000000000000000081565b606f54610a00906901000000000000000000900461ffff1681565b60405161ffff90911681526020016104c0565b610a54610a21366004616352565b6072602052600090815260409020805460019091015467ffffffffffffffff808216916801000000000000000090041683565b6040805193845267ffffffffffffffff92831660208501529116908201526060016104c0565b610512610a88366004616352565b613891565b61058b7f000000000000000000000000000000000000000000000000000000000000000081565b610521610ac2366004616598565b6138a2565b610512610ad53660046165b1565b61392c565b6104ab613944565b607b546104ab9074010000000000000000000000000000000000000000900467ffffffffffffffff1681565b610512610b1c3660046165b1565b613999565b606f5461058b906b010000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b61058b7f000000000000000000000000000000000000000000000000000000000000000081565b610512610b85366004616628565b613a26565b610512610b983660046166db565b613f6c565b6079546104ab90700100000000000000000000000000000000900467ffffffffffffffff1681565b61051261450e565b610512610bdb36600461671d565b6145e7565b6073546104ab907801000000000000000000000000000000000000000000000000900467ffffffffffffffff1681565b61058b7f000000000000000000000000000000000000000000000000000000000000000081565b610512610c4536600461676a565b614677565b607b54610521907c0100000000000000000000000000000000000000000000000000000000900460ff1681565b610512610c8536600461657d565b614a6d565b610512610c9836600461657d565b614b3f565b607a5461058b9073ffffffffffffffffffffffffffffffffffffffff1681565b6104dc60705481565b610512610cd43660046167b6565b614bf3565b6000806000610ce6613944565b905067ffffffffffffffff881615610eb35760795467ffffffffffffffff9081169089161115610dc3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605860248201527f506f6c79676f6e5a6b45564d3a