@zero-tech/zkevm-contracts
Version:
Core contracts for the Polygon Hermez zkEVM
180 lines (179 loc) • 7.96 kB
JSON
{
"_format": "hh-sol-artifact-1",
"contractName": "PolygonZkEVMGlobalExitRootMock",
"sourceName": "contracts/mocks/PolygonZkEVMGlobalExitRootMock.sol",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_rollupAddress",
"type": "address"
},
{
"internalType": "address",
"name": "_bridgeAddress",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "OnlyAllowedContracts",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "mainnetExitRoot",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "rollupExitRoot",
"type": "bytes32"
}
],
"name": "UpdateGlobalExitRoot",
"type": "event"
},
{
"inputs": [],
"name": "bridgeAddress",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getLastGlobalExitRoot",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"name": "globalExitRootMap",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "lastMainnetExitRoot",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "lastRollupExitRoot",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "rollupAddress",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "globalExitRoot",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "timestamp",
"type": "uint256"
}
],
"name": "setGlobalExitRoot",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "timestamp",
"type": "uint256"
}
],
"name": "setLastGlobalExitRoot",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "newRoot",
"type": "bytes32"
}
],
"name": "updateExitRoot",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x60c060405234801561000f575f80fd5b5060405161047838038061047883398101604081905261002e91610060565b6001600160a01b0391821660a05216608052610091565b80516001600160a01b038116811461005b575f80fd5b919050565b5f8060408385031215610071575f80fd5b61007a83610045565b915061008860208401610045565b90509250929050565b60805160a0516103b86100c05f395f818161013a015261022c01525f818161018601526101e301526103b85ff3fe608060405234801561000f575f80fd5b506004361061009f575f3560e01c806333d6247d116100725780635bcef673116100585780635bcef673146101165780635ec6a8df14610135578063a3c573eb14610181575f80fd5b806333d6247d146100fb5780633ed691ef1461010e575f80fd5b806301fd9044146100a3578063051a9e28146100be578063257b3632146100d3578063319cf735146100f2575b5f80fd5b6100ab5f5481565b6040519081526020015b60405180910390f35b6100d16100cc36600461034b565b6101a8565b005b6100ab6100e136600461034b565b60026020525f908152604090205481565b6100ab60015481565b6100d161010936600461034b565b6101c7565b6100ab610311565b6100d1610124366004610362565b5f9182526002602052604090912055565b61015c7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100b5565b61015c7f000000000000000000000000000000000000000000000000000000000000000081565b8060025f6101b4610311565b815260208101919091526040015f205550565b5f5460015473ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633036102155750600182905581610290565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016330361025e575f839055829150610290565b6040517fb49365dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080516020808201849052818301859052825180830384018152606090920190925280519101205f905f818152600260205260408120549192500361030b575f8181526002602052604080822042905551849184917f61014378f82a0d809aefaf87a8ac9505b89c321808287a6e7810f29304c1fce39190a35b50505050565b5f6103466001545f54604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b905090565b5f6020828403121561035b575f80fd5b5035919050565b5f8060408385031215610373575f80fd5b5050803592602090910135915056fea26469706673582212200799b5f60aa8eaf6d49205025cc41bfba78ce4f6ad614164e5da3c0bdc94810464736f6c63430008140033",
"deployedBytecode": "0x608060405234801561000f575f80fd5b506004361061009f575f3560e01c806333d6247d116100725780635bcef673116100585780635bcef673146101165780635ec6a8df14610135578063a3c573eb14610181575f80fd5b806333d6247d146100fb5780633ed691ef1461010e575f80fd5b806301fd9044146100a3578063051a9e28146100be578063257b3632146100d3578063319cf735146100f2575b5f80fd5b6100ab5f5481565b6040519081526020015b60405180910390f35b6100d16100cc36600461034b565b6101a8565b005b6100ab6100e136600461034b565b60026020525f908152604090205481565b6100ab60015481565b6100d161010936600461034b565b6101c7565b6100ab610311565b6100d1610124366004610362565b5f9182526002602052604090912055565b61015c7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100b5565b61015c7f000000000000000000000000000000000000000000000000000000000000000081565b8060025f6101b4610311565b815260208101919091526040015f205550565b5f5460015473ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633036102155750600182905581610290565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016330361025e575f839055829150610290565b6040517fb49365dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080516020808201849052818301859052825180830384018152606090920190925280519101205f905f818152600260205260408120549192500361030b575f8181526002602052604080822042905551849184917f61014378f82a0d809aefaf87a8ac9505b89c321808287a6e7810f29304c1fce39190a35b50505050565b5f6103466001545f54604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b905090565b5f6020828403121561035b575f80fd5b5035919050565b5f8060408385031215610373575f80fd5b5050803592602090910135915056fea26469706673582212200799b5f60aa8eaf6d49205025cc41bfba78ce4f6ad614164e5da3c0bdc94810464736f6c63430008140033",
"linkReferences": {},
"deployedLinkReferences": {}
}