@zero-tech/zkevm-contracts
Version:
Core contracts for the Polygon Hermez zkEVM
2,019 lines • 146 kB
JSON
{
"_format": "hh-sol-artifact-1",
"contractName": "PolygonRollupManagerMock",
"sourceName": "contracts/v2/mocks/PolygonRollupManagerMock.sol",
"abi": [
{
"inputs": [
{
"internalType": "contract IPolygonZkEVMGlobalExitRootV2",
"name": "_globalExitRootManager",
"type": "address"
},
{
"internalType": "contract IERC20Upgradeable",
"name": "_pol",
"type": "address"
},
{
"internalType": "contract IPolygonZkEVMBridge",
"name": "_bridgeAddress",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "AccessControlOnlyCanRenounceRolesForSelf",
"type": "error"
},
{
"inputs": [],
"name": "AddressDoNotHaveRequiredRole",
"type": "error"
},
{
"inputs": [],
"name": "AllzkEVMSequencedBatchesMustBeVerified",
"type": "error"
},
{
"inputs": [],
"name": "BatchFeeOutOfRange",
"type": "error"
},
{
"inputs": [],
"name": "ChainIDAlreadyExist",
"type": "error"
},
{
"inputs": [],
"name": "ExceedMaxVerifyBatches",
"type": "error"
},
{
"inputs": [],
"name": "FinalNumBatchBelowLastVerifiedBatch",
"type": "error"
},
{
"inputs": [],
"name": "FinalNumBatchDoesNotMatchPendingState",
"type": "error"
},
{
"inputs": [],
"name": "FinalPendingStateNumInvalid",
"type": "error"
},
{
"inputs": [],
"name": "HaltTimeoutNotExpired",
"type": "error"
},
{
"inputs": [],
"name": "InitBatchMustMatchCurrentForkID",
"type": "error"
},
{
"inputs": [],
"name": "InitNumBatchAboveLastVerifiedBatch",
"type": "error"
},
{
"inputs": [],
"name": "InitNumBatchDoesNotMatchPendingState",
"type": "error"
},
{
"inputs": [],
"name": "InvalidProof",
"type": "error"
},
{
"inputs": [],
"name": "InvalidRangeBatchTimeTarget",
"type": "error"
},
{
"inputs": [],
"name": "InvalidRangeMultiplierBatchFee",
"type": "error"
},
{
"inputs": [],
"name": "MustSequenceSomeBatch",
"type": "error"
},
{
"inputs": [],
"name": "NewAccInputHashDoesNotExist",
"type": "error"
},
{
"inputs": [],
"name": "NewPendingStateTimeoutMustBeLower",
"type": "error"
},
{
"inputs": [],
"name": "NewStateRootNotInsidePrime",
"type": "error"
},
{
"inputs": [],
"name": "NewTrustedAggregatorTimeoutMustBeLower",
"type": "error"
},
{
"inputs": [],
"name": "OldAccInputHashDoesNotExist",
"type": "error"
},
{
"inputs": [],
"name": "OldStateRootDoesNotExist",
"type": "error"
},
{
"inputs": [],
"name": "OnlyEmergencyState",
"type": "error"
},
{
"inputs": [],
"name": "OnlyNotEmergencyState",
"type": "error"
},
{
"inputs": [],
"name": "PendingStateDoesNotExist",
"type": "error"
},
{
"inputs": [],
"name": "PendingStateInvalid",
"type": "error"
},
{
"inputs": [],
"name": "PendingStateNotConsolidable",
"type": "error"
},
{
"inputs": [],
"name": "RollupAddressAlreadyExist",
"type": "error"
},
{
"inputs": [],
"name": "RollupMustExist",
"type": "error"
},
{
"inputs": [],
"name": "RollupTypeDoesNotExist",
"type": "error"
},
{
"inputs": [],
"name": "RollupTypeObsolete",
"type": "error"
},
{
"inputs": [],
"name": "SenderMustBeRollup",
"type": "error"
},
{
"inputs": [],
"name": "StoredRootMustBeDifferentThanNewRoot",
"type": "error"
},
{
"inputs": [],
"name": "TrustedAggregatorTimeoutNotExpired",
"type": "error"
},
{
"inputs": [],
"name": "UpdateNotCompatible",
"type": "error"
},
{
"inputs": [],
"name": "UpdateToSameRollupTypeID",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint32",
"name": "rollupID",
"type": "uint32"
},
{
"indexed": false,
"internalType": "uint64",
"name": "forkID",
"type": "uint64"
},
{
"indexed": false,
"internalType": "address",
"name": "rollupAddress",
"type": "address"
},
{
"indexed": false,
"internalType": "uint64",
"name": "chainID",
"type": "uint64"
},
{
"indexed": false,
"internalType": "uint8",
"name": "rollupCompatibilityID",
"type": "uint8"
},
{
"indexed": false,
"internalType": "uint64",
"name": "lastVerifiedBatchBeforeUpgrade",
"type": "uint64"
}
],
"name": "AddExistingRollup",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint32",
"name": "rollupTypeID",
"type": "uint32"
},
{
"indexed": false,
"internalType": "address",
"name": "consensusImplementation",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "verifier",
"type": "address"
},
{
"indexed": false,
"internalType": "uint64",
"name": "forkID",
"type": "uint64"
},
{
"indexed": false,
"internalType": "uint8",
"name": "rollupCompatibilityID",
"type": "uint8"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "genesis",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "string",
"name": "description",
"type": "string"
}
],
"name": "AddNewRollupType",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint32",
"name": "rollupID",
"type": "uint32"
},
{
"indexed": false,
"internalType": "uint64",
"name": "numBatch",
"type": "uint64"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "stateRoot",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "exitRoot",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint64",
"name": "pendingStateNum",
"type": "uint64"
}
],
"name": "ConsolidatePendingState",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint32",
"name": "rollupID",
"type": "uint32"
},
{
"indexed": false,
"internalType": "uint32",
"name": "rollupTypeID",
"type": "uint32"
},
{
"indexed": false,
"internalType": "address",
"name": "rollupAddress",
"type": "address"
},
{
"indexed": false,
"internalType": "uint64",
"name": "chainID",
"type": "uint64"
},
{
"indexed": false,
"internalType": "address",
"name": "gasTokenAddress",
"type": "address"
}
],
"name": "CreateNewRollup",
"type": "event"
},
{
"anonymous": false,
"inputs": [],
"name": "EmergencyStateActivated",
"type": "event"
},
{
"anonymous": false,
"inputs": [],
"name": "EmergencyStateDeactivated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint8",
"name": "version",
"type": "uint8"
}
],
"name": "Initialized",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint32",
"name": "rollupTypeID",
"type": "uint32"
}
],
"name": "ObsoleteRollupType",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint32",
"name": "rollupID",
"type": "uint32"
},
{
"indexed": false,
"internalType": "uint64",
"name": "lastBatchSequenced",
"type": "uint64"
}
],
"name": "OnSequenceBatches",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint32",
"name": "rollupID",
"type": "uint32"
},
{
"indexed": false,
"internalType": "uint64",
"name": "numBatch",
"type": "uint64"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "stateRoot",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "exitRoot",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "address",
"name": "aggregator",
"type": "address"
}
],
"name": "OverridePendingState",
"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": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "previousAdminRole",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "newAdminRole",
"type": "bytes32"
}
],
"name": "RoleAdminChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "account",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "RoleGranted",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "account",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "RoleRevoked",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "newBatchFee",
"type": "uint256"
}
],
"name": "SetBatchFee",
"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": "uint64",
"name": "newVerifyBatchTimeTarget",
"type": "uint64"
}
],
"name": "SetVerifyBatchTimeTarget",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint32",
"name": "rollupID",
"type": "uint32"
},
{
"indexed": false,
"internalType": "uint32",
"name": "newRollupTypeID",
"type": "uint32"
},
{
"indexed": false,
"internalType": "uint64",
"name": "lastVerifiedBatchBeforeUpgrade",
"type": "uint64"
}
],
"name": "UpdateRollup",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint32",
"name": "rollupID",
"type": "uint32"
},
{
"indexed": false,
"internalType": "uint64",
"name": "numBatch",
"type": "uint64"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "stateRoot",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "exitRoot",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "aggregator",
"type": "address"
}
],
"name": "VerifyBatches",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint32",
"name": "rollupID",
"type": "uint32"
},
{
"indexed": false,
"internalType": "uint64",
"name": "numBatch",
"type": "uint64"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "stateRoot",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "exitRoot",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "aggregator",
"type": "address"
}
],
"name": "VerifyBatchesTrustedAggregator",
"type": "event"
},
{
"inputs": [],
"name": "DEFAULT_ADMIN_ROLE",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "activateEmergencyState",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "contract IPolygonRollupBase",
"name": "rollupAddress",
"type": "address"
},
{
"internalType": "contract IVerifierRollup",
"name": "verifier",
"type": "address"
},
{
"internalType": "uint64",
"name": "forkID",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "chainID",
"type": "uint64"
},
{
"internalType": "bytes32",
"name": "genesis",
"type": "bytes32"
},
{
"internalType": "uint8",
"name": "rollupCompatibilityID",
"type": "uint8"
}
],
"name": "addExistingRollup",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "consensusImplementation",
"type": "address"
},
{
"internalType": "contract IVerifierRollup",
"name": "verifier",
"type": "address"
},
{
"internalType": "uint64",
"name": "forkID",
"type": "uint64"
},
{
"internalType": "uint8",
"name": "rollupCompatibilityID",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "genesis",
"type": "bytes32"
},
{
"internalType": "string",
"name": "description",
"type": "string"
}
],
"name": "addNewRollupType",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "bridgeAddress",
"outputs": [
{
"internalType": "contract IPolygonZkEVMBridge",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "calculateRewardPerBatch",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "chainID",
"type": "uint64"
}
],
"name": "chainIDToRollupID",
"outputs": [
{
"internalType": "uint32",
"name": "rollupID",
"type": "uint32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint32",
"name": "rollupID",
"type": "uint32"
},
{
"internalType": "uint64",
"name": "pendingStateNum",
"type": "uint64"
}
],
"name": "consolidatePendingState",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint32",
"name": "rollupTypeID",
"type": "uint32"
},
{
"internalType": "uint64",
"name": "chainID",
"type": "uint64"
},
{
"internalType": "address",
"name": "admin",
"type": "address"
},
{
"internalType": "address",
"name": "sequencer",
"type": "address"
},
{
"internalType": "address",
"name": "gasTokenAddress",
"type": "address"
},
{
"internalType": "string",
"name": "sequencerURL",
"type": "string"
},
{
"internalType": "string",
"name": "networkName",
"type": "string"
}
],
"name": "createNewRollup",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "deactivateEmergencyState",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "getBatchFee",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getForcedBatchFee",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint32",
"name": "rollupID",
"type": "uint32"
},
{
"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": [
{
"internalType": "uint32",
"name": "rollupID",
"type": "uint32"
}
],
"name": "getLastVerifiedBatch",
"outputs": [
{
"internalType": "uint64",
"name": "",
"type": "uint64"
}
],
"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": "uint32",
"name": "rollupID",
"type": "uint32"
},
{
"internalType": "uint64",
"name": "batchNum",
"type": "uint64"
}
],
"name": "getRollupBatchNumToStateRoot",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getRollupExitRoot",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint32",
"name": "rollupID",
"type": "uint32"
},
{
"internalType": "uint64",
"name": "batchNum",
"type": "uint64"
}
],
"name": "getRollupPendingStateTransitions",
"outputs": [
{
"components": [
{
"internalType": "uint64",
"name": "timestamp",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "lastVerifiedBatch",
"type": "uint64"
},
{
"internalType": "bytes32",
"name": "exitRoot",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "stateRoot",
"type": "bytes32"
}
],
"internalType": "struct LegacyZKEVMStateVariables.PendingState",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint32",
"name": "rollupID",
"type": "uint32"
},
{
"internalType": "uint64",
"name": "batchNum",
"type": "uint64"
}
],
"name": "getRollupSequencedBatches",
"outputs": [
{
"components": [
{
"internalType": "bytes32",
"name": "accInputHash",
"type": "bytes32"
},
{
"internalType": "uint64",
"name": "sequencedTimestamp",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "previousLastBatchSequenced",
"type": "uint64"
}
],
"internalType": "struct LegacyZKEVMStateVariables.SequencedBatchData",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "globalExitRootManager",
"outputs": [
{
"internalType": "contract IPolygonZkEVMGlobalExitRootV2",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "grantRole",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "hasRole",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "trustedAggregator",
"type": "address"
},
{
"internalType": "uint64",
"name": "_pendingStateTimeout",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "_trustedAggregatorTimeout",
"type": "uint64"
},
{
"internalType": "address",
"name": "admin",
"type": "address"
},
{
"internalType": "address",
"name": "timelock",
"type": "address"
},
{
"internalType": "address",
"name": "emergencyCouncil",
"type": "address"
},
{
"internalType": "contract PolygonZkEVMExistentEtrog",
"name": "polygonZkEVM",
"type": "address"
},
{
"internalType": "contract IVerifierRollup",
"name": "zkEVMVerifier",
"type": "address"
},
{
"internalType": "uint64",
"name": "zkEVMForkID",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "zkEVMChainID",
"type": "uint64"
}
],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "trustedAggregator",
"type": "address"
},
{
"internalType": "uint64",
"name": "_pendingStateTimeout",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "_trustedAggregatorTimeout",
"type": "uint64"
},
{
"internalType": "address",
"name": "admin",
"type": "address"
},
{
"internalType": "address",
"name": "timelock",
"type": "address"
},
{
"internalType": "address",
"name": "emergencyCouncil",
"type": "address"
}
],
"name": "initializeMock",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "isEmergencyState",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint32",
"name": "rollupID",
"type": "uint32"
},
{
"internalType": "uint64",
"name": "pendingStateNum",
"type": "uint64"
}
],
"name": "isPendingStateConsolidable",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "lastAggregationTimestamp",
"outputs": [
{
"internalType": "uint64",
"name": "",
"type": "uint64"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "lastDeactivatedEmergencyStateTimestamp",
"outputs": [
{
"internalType": "uint64",
"name": "",
"type": "uint64"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "multiplierBatchFee",
"outputs": [
{
"internalType": "uint16",
"name": "",
"type": "uint16"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint32",
"name": "rollupTypeID",
"type": "uint32"
}
],
"name": "obsoleteRollupType",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "newSequencedBatches",
"type": "uint64"
},
{
"internalType": "bytes32",
"name": "newAccInputHash",
"type": "bytes32"
}
],
"name": "onSequenceBatches",
"outputs": [
{
"internalType": "uint64",
"name": "",
"type": "uint64"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint32",
"name": "rollupID",
"type": "uint32"
},
{
"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": "pendingStateTimeout",
"outputs": [
{
"internalType": "uint64",
"name": "",
"type": "uint64"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "pol",
"outputs": [
{
"internalType": "contract IERC20Upgradeable",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32[]",
"name": "localExitRoots",
"type": "bytes32[]"
}
],
"name": "prepareMockCalculateRoot",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint32",
"name": "rollupID",
"type": "uint32"
},
{
"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": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "renounceRole",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "revokeRole",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "rollupAddress",
"type": "address"
}
],
"name": "rollupAddressToID",
"outputs": [
{
"internalType": "uint32",
"name": "rollupID",
"type": "uint32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "rollupCount",
"outputs": [
{
"internalType": "uint32",
"name": "",
"type": "uint32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint32",
"name": "rollupID",
"type": "uint32"
}
],
"name": "rollupIDToRollupData",
"outputs": [
{
"internalType": "contract IPolygonRollupBase",
"name": "rollupContract",
"type": "address"
},
{
"internalType": "uint64",
"name": "chainID",
"type": "uint64"
},
{
"internalType": "contract IVerifierRollup",
"name": "verifier",
"type": "address"
},
{
"internalType": "uint64",
"name": "forkID",
"type": "uint64"
},
{
"internalType": "bytes32",
"name": "lastLocalExitRoot",
"type": "bytes32"
},
{
"internalType": "uint64",
"name": "lastBatchSequenced",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "lastVerifiedBatch",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "lastPendingState",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "lastPendingStateConsolidated",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "lastVerifiedBatchBeforeUpgrade",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "rollupTypeID",
"type": "uint64"
},
{
"internalType": "uint8",
"name": "rollupCompatibilityID",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "rollupTypeCount",
"outputs": [
{
"internalType": "uint32",
"name": "",
"type": "uint32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint32",
"name": "rollupTypeID",
"type": "uint32"
}
],
"name": "rollupTypeMap",
"outputs": [
{
"internalType": "address",
"name": "consensusImplementation",
"type": "address"
},
{
"internalType": "contract IVerifierRollup",
"name": "verifier",
"type": "address"
},
{
"internalType": "uint64",
"name": "forkID",
"type": "uint64"
},
{
"internalType": "uint8",
"name": "rollupCompatibilityID",
"type": "uint8"
},
{
"internalType": "bool",
"name": "obsolete",
"type": "bool"
},
{
"internalType": "bytes32",
"name": "genesis",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "newBatchFee",
"type": "uint256"
}
],
"name": "setBatchFee",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint16",
"name": "newMultiplierBatchFee",
"type": "uint16"
}
],
"name": "setMultiplierBatchFee",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "newPendingStateTimeout",
"type": "uint64"
}
],
"name": "setPendingStateTimeout",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "newTrustedAggregatorTimeout",
"type": "uint64"
}
],
"name": "setTrustedAggregatorTimeout",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "newVerifyBatchTimeTarget",
"type": "uint64"
}
],
"name": "setVerifyBatchTimeTarget",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "totalSequencedBatches",
"outputs": [
{
"internalType": "uint64",
"name": "",
"type": "uint64"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalVerifiedBatches",
"outputs": [
{
"internalType": "uint64",
"name": "",
"type": "uint64"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "trustedAggregatorTimeout",
"outputs": [
{
"internalType": "uint64",
"name": "",
"type": "uint64"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "contract ITransparentUpgradeableProxy",
"name": "rollupContract",
"type": "address"
},
{
"internalType": "uint32",
"name": "newRollupTypeID",
"type": "uint32"
},
{
"internalType": "bytes",
"name": "upgradeData",
"type": "bytes"
}
],
"name": "updateRollup",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "verifyBatchTimeTarget",
"outputs": [
{
"internalType": "uint64",
"name": "",
"type": "uint64"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint32",
"name": "rollupID",
"type": "uint32"
},
{
"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": "address",
"name": "beneficiary",
"type": "address"
},
{
"internalType": "bytes32[24]",
"name": "proof",
"type": "bytes32[24]"
}
],
"name": "verifyBatches",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint32",
"name": "rollupID",
"type": "uint32"
},
{
"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": "address",
"name": "beneficiary",
"type": "address"
},
{
"internalType": "bytes32[24]",
"name": "proof",
"type": "bytes32[24]"
}
],
"name": "verifyBatchesTrustedAggregator",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x60e06040523480156200001157600080fd5b506040516200635b3803806200635b833981016040819052620000349162000141565b6001600160a01b0380841660805280831660c052811660a0528282826200005a62000066565b50505050505062000195565b600054610100900460ff1615620000d35760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116101562000126576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b03811681146200013e57600080fd5b50565b6000806000606084860312156200015757600080fd5b8351620001648162000128565b6020850151909350620001778162000128565b60408501519092506200018a8162000128565b809150509250925092565b60805160a05160c05161615e620001fd600039600081816109dc0152818161231c0152613bfb0152600081816107a201528181612e960152613ef50152600081816109360152818161132f015281816114df01528181611ff90152613de4015261615e6000f3fe60806040523480156200001157600080fd5b5060043610620002b65760003560e01c80630645af0914620002bb578063066ec01214620002d4578063080b311114620003005780630a0d9fbe14620003285780630e36f582146200034357806311f6b287146200035a57806312b86e1914620003715780631489ed10146200038857806315064c96146200039f5780631608859c14620003ad5780631796a1ae14620003c45780631816b7e514620003eb5780632072f6c51462000402578063248a9ca3146200040c5780632528016914620004325780632f2ff15d14620004e757806330c27dde14620004fe57806336568abe1462000512578063394218e91462000529578063477fa270146200054057806355a71ee0146200054957806360469169146200058d57806365c0504d14620005975780637222020f1462000646578063727885e9146200065d5780637975fcfe14620006745780637fb6e76a146200069a578063841b24d714620006c357806387c20c0114620006de5780638bd4f07114620006f55780638f698ec5146200070c57806391d14854146200072357806399f5634e146200073a5780639a908e7314620007445780639c9f3dfe146200075b578063a066215c1462000772578063a217fddf1462000789578063a2967d991462000792578063a3c573eb146200079c578063afd23cbe14620007d3578063b99d0ad714620007fd578063c1acbc3414620008d5578063c4c928c214620008f0578063ceee281d1462000907578063d02103ca1462000930578063d5073f6f1462000958578063d547741f146200096f578063d939b3151462000986578063dbc16976146200099a578063dde0ff7714620009a4578063e0bfd3d214620009bf578063e46761c414620009d6578063f34eb8eb14620009fe578063f4e926751462000a15578063f9c4c2ae1462000a26575b600080fd5b620002d2620002cc366004620048ac565b62000b3d565b005b608454620002e8906001600160401b031681565b604051620002f7919062004987565b60405180910390f35b6200031762000311366004620049b0565b62000f8b565b6040519015158152602001620002f7565b608554620002e890600160401b90046001600160401b031681565b620002d262000354366004620049e8565b62000fb5565b620002e86200036b36600462004a73565b62001263565b620002d26200038236600462004aa4565b62001283565b620002d26200039936600462004b3b565b62001433565b606f54620003179060ff1681565b620002d2620003be366004620049b0565b620015c3565b607e54620003d59063ffffffff1681565b60405163ffffffff9091168152602001620002f7565b620002d2620003fc36600462004bc5565b62001658565b620002d262001704565b620004236200041d36600462004bf2565b620017ca565b604051908152602001620002f7565b620004b362000443366004620049b0565b60408051606080820183526000808352602080840182905292840181905263ffffffff959095168552608182528285206001600160401b03948516865260030182529382902082519485018352805485526001015480841691850191909152600160401b90049091169082015290565b60408051825181526020808401516001600160401b03908116918301919091529282015190921690820152606001620002f7565b620002d2620004f836600462004c0c565b620017df565b608754620002e8906001600160401b031681565b620002d26200052336600462004c0c565b62001801565b620002d26200053a36600462004c3f565b6200183b565b60865462000423565b620004236200055a366004620049b0565b63ffffffff821660009081526081602090815260408083206001600160401b038516845260020190915290205492915050565b62000423620018ea565b620005fc620005a836600462004a73565b607f602052600090815260409020805460018201546002909201546001600160a01b0391821692918216916001600160401b03600160a01b8204169160ff600160e01b8304811692600160e81b9004169086565b604080516001600160a01b0397881681529690951660208701526001600160401b039093169385019390935260ff166060840152901515608083015260a082015260c001620002f7565b620002d26200065736600462004a73565b62001902565b620002d26200066e36600462004d1c565b620019ed565b6200068b6200068536600462004de9565b62001e55565b604051620002f7919062004ea3565b620003d5620006ab36600462004c3f565b60836020526000908152604090205463ffffffff1681565b608454620002e890600160c01b90046001600160401b031681565b620002d2620006ef36600462004b3b565b62001e88565b620002d26200070636600462004aa4565b620021ac565b620002d26200071d36600462004eb8565b62002265565b620003176200073436600462004c0c565b620022ec565b6200042362002317565b620002e86200075536600462004f68565b62002403565b620002d26200076c36600462004c3f565b620025d0565b620002d26200078336600462004c3f565b62002673565b62000423600081565b6200042362002712565b620007c47f000000000000000000000000000000000000000000000000000000000000000081565b604051620002f7919062004f95565b608554620007e990600160801b900461ffff1681565b60405161ffff9091168152602001620002f7565b620008936200080e366004620049b0565b60408051608080820183526000808352602080840182905283850182905260609384018290