@mantleio/contracts
Version:
[Mantle] L1 and L2 smart contracts for Mantle
487 lines • 53 kB
JSON
{
"address": "0x1872Ce78A362c58D093EE107cAdeE2667b7Bd993",
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "ChildInboxSizeMismatch",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "address",
"name": "rollup",
"type": "address"
}
],
"name": "NotRollup",
"type": "error"
},
{
"inputs": [],
"name": "SiblingStateHashExists",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint8",
"name": "version",
"type": "uint8"
}
],
"name": "Initialized",
"type": "event"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "assertions",
"outputs": [
{
"internalType": "bytes32",
"name": "stateHash",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "inboxSize",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "parent",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "proposalTime",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "numStakers",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "childInboxSize",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "assertionID",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "stateHash",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "inboxSize",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "parentID",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256"
}
],
"name": "createAssertion",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "assertionID",
"type": "uint256"
}
],
"name": "deleteAssertion",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "assertionID",
"type": "uint256"
}
],
"name": "deleteAssertionForBatch",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "assertionID",
"type": "uint256"
}
],
"name": "getDeadline",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "assertionID",
"type": "uint256"
}
],
"name": "getInboxSize",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "assertionID",
"type": "uint256"
}
],
"name": "getNumStakers",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "assertionID",
"type": "uint256"
}
],
"name": "getParentID",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "assertionID",
"type": "uint256"
}
],
"name": "getProposalTime",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "assertionID",
"type": "uint256"
}
],
"name": "getStateHash",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "assertionID",
"type": "uint256"
},
{
"internalType": "address",
"name": "stakerAddress",
"type": "address"
}
],
"name": "isStaker",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "rollupAddress",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_rollupAddress",
"type": "address"
}
],
"name": "setRollupAddress",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "assertionID",
"type": "uint256"
},
{
"internalType": "address",
"name": "stakerAddress",
"type": "address"
}
],
"name": "stakeOnAssertion",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"transactionHash": "0x3aad52c6acd2f6b5148bde9556cfb3f1d80c7e2d9ce843b94250a5c683a3dc85",
"receipt": {
"to": null,
"from": "0x2A2954F3989a83Cc43DD58B0f038D5F276f21333",
"contractAddress": "0x1872Ce78A362c58D093EE107cAdeE2667b7Bd993",
"transactionIndex": 4,
"gasUsed": "605676",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000080000000000000000000000000000400000000000000000000000000000100000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000",
"blockHash": "0xb47438d54b2615e0d87a39d0c6baa78b2ad5e4912f9248b0108946831978a074",
"transactionHash": "0x3aad52c6acd2f6b5148bde9556cfb3f1d80c7e2d9ce843b94250a5c683a3dc85",
"logs": [
{
"transactionIndex": 4,
"blockNumber": 17578190,
"transactionHash": "0x3aad52c6acd2f6b5148bde9556cfb3f1d80c7e2d9ce843b94250a5c683a3dc85",
"address": "0x1872Ce78A362c58D093EE107cAdeE2667b7Bd993",
"topics": [
"0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"
],
"data": "0x00000000000000000000000000000000000000000000000000000000000000ff",
"logIndex": 45,
"blockHash": "0xb47438d54b2615e0d87a39d0c6baa78b2ad5e4912f9248b0108946831978a074"
}
],
"blockNumber": 17578190,
"cumulativeGasUsed": "1407658",
"status": 1,
"byzantium": true
},
"args": [],
"numDeployments": 1,
"solcInputHash": "55be54ef118a4ed0a7d7c0cb615240a5",
"metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ChildInboxSizeMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"rollup\",\"type\":\"address\"}],\"name\":\"NotRollup\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SiblingStateHashExists\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"assertions\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"stateHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"inboxSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"parent\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proposalTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"numStakers\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"childInboxSize\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assertionID\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"stateHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"inboxSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"parentID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"createAssertion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assertionID\",\"type\":\"uint256\"}],\"name\":\"deleteAssertion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assertionID\",\"type\":\"uint256\"}],\"name\":\"deleteAssertionForBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assertionID\",\"type\":\"uint256\"}],\"name\":\"getDeadline\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assertionID\",\"type\":\"uint256\"}],\"name\":\"getInboxSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assertionID\",\"type\":\"uint256\"}],\"name\":\"getNumStakers\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assertionID\",\"type\":\"uint256\"}],\"name\":\"getParentID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assertionID\",\"type\":\"uint256\"}],\"name\":\"getProposalTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assertionID\",\"type\":\"uint256\"}],\"name\":\"getStateHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assertionID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"stakerAddress\",\"type\":\"address\"}],\"name\":\"isStaker\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rollupAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rollupAddress\",\"type\":\"address\"}],\"name\":\"setRollupAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assertionID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"stakerAddress\",\"type\":\"address\"}],\"name\":\"stakeOnAssertion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"NotRollup(address,address)\":[{\"details\":\"Thrown when unauthorized (!rollup) address calls an only-rollup function\",\"params\":{\"rollup\":\"The rollup address authorized to call this function\",\"sender\":\"Address of the caller\"}}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/L1/fraud-proof/AssertionMap.sol\":\"AssertionMap\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0203dcadc5737d9ef2c211d6fa15d18ebc3b30dfa51903b64870b01a062b0b4e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x611aa3f23e59cfdd1863c536776407b3e33d695152a266fa7cfb34440a29a8a3\",\"license\":\"MIT\"},\"contracts/L1/fraud-proof/AssertionMap.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\n/*\\n * Modifications Copyright 2022, Specular contributors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"./libraries/Errors.sol\\\";\\n\\n// Exists only to reduce size of Rollup contract (maybe revert since Rollup fits under optimized compilation).\\ncontract AssertionMap is Initializable {\\n error ChildInboxSizeMismatch();\\n\\n error SiblingStateHashExists();\\n\\n struct Assertion {\\n bytes32 stateHash; // Hash of execution state associated with assertion (see `RollupLib.stateHash`)\\n uint256 inboxSize; // Inbox size this assertion advanced to\\n uint256 parent; // Parent assertion ID\\n uint256 deadline; // Confirmation deadline (L1 block timestamp)\\n uint256 proposalTime; // L1 block number at which assertion was proposed\\n // Staking state\\n uint256 numStakers; // total number of stakers that have ever staked on this assertion. increasing only.\\n // Child state\\n uint256 childInboxSize; // child assertion inbox state\\n }\\n\\n struct AssertionState {\\n mapping(address => bool) stakers; // all stakers that have ever staked on this assertion.\\n mapping(bytes32 => bool) childStateHashes; // child assertion vm hashes\\n }\\n\\n mapping(uint256 => Assertion) public assertions;\\n mapping(uint256 => AssertionState) private assertionStates; // mapping from assertionID to assertion state\\n address public rollupAddress;\\n\\n modifier rollupOnly() {\\n if (msg.sender != rollupAddress) {\\n revert NotRollup(msg.sender, rollupAddress);\\n }\\n _;\\n }\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n function initialize() public initializer {}\\n\\n function setRollupAddress(address _rollupAddress) public {\\n require(\\n address(rollupAddress) == address(0),\\n \\\"rollupAddress already initialized.\\\"\\n );\\n require(_rollupAddress != address(0), \\\"ZERO_ADDRESS\\\");\\n rollupAddress = _rollupAddress;\\n }\\n\\n function getStateHash(uint256 assertionID) external view returns (bytes32) {\\n return assertions[assertionID].stateHash;\\n }\\n\\n function getInboxSize(uint256 assertionID) external view returns (uint256) {\\n return assertions[assertionID].inboxSize;\\n }\\n\\n function getParentID(uint256 assertionID) external view returns (uint256) {\\n return assertions[assertionID].parent;\\n }\\n\\n function getDeadline(uint256 assertionID) external view returns (uint256) {\\n return assertions[assertionID].deadline;\\n }\\n\\n function getProposalTime(uint256 assertionID) external view returns (uint256) {\\n return assertions[assertionID].proposalTime;\\n }\\n\\n function getNumStakers(uint256 assertionID) external view returns (uint256) {\\n return assertions[assertionID].numStakers;\\n }\\n\\n function isStaker(uint256 assertionID, address stakerAddress) external view returns (bool) {\\n return assertionStates[assertionID].stakers[stakerAddress];\\n }\\n\\n function createAssertion(\\n uint256 assertionID,\\n bytes32 stateHash,\\n uint256 inboxSize,\\n uint256 parentID,\\n uint256 deadline\\n ) external rollupOnly {\\n Assertion storage parentAssertion = assertions[parentID];\\n AssertionState storage parentAssertionState = assertionStates[parentID];\\n // Child assertions must have same inbox size\\n uint256 parentChildInboxSize = parentAssertion.childInboxSize;\\n if (parentChildInboxSize == 0) {\\n parentAssertion.childInboxSize = inboxSize;\\n } else {\\n if (inboxSize != parentChildInboxSize) {\\n revert(\\\"ChildInboxSizeMismatch\\\");\\n }\\n }\\n if (parentAssertionState.childStateHashes[stateHash]) {\\n revert(\\\"SiblingStateHashExists\\\");\\n }\\n\\n parentAssertionState.childStateHashes[stateHash] = true;\\n\\n assertions[assertionID] = Assertion(\\n stateHash,\\n inboxSize,\\n parentID,\\n deadline,\\n block.number, // proposal time\\n 0, // numStakers\\n 0 // childInboxSize\\n );\\n }\\n\\n function stakeOnAssertion(uint256 assertionID, address stakerAddress) external rollupOnly {\\n Assertion storage assertion = assertions[assertionID];\\n assertionStates[assertionID].stakers[stakerAddress] = true;\\n assertion.numStakers++;\\n }\\n\\n function deleteAssertion(uint256 assertionID) external rollupOnly {\\n delete assertions[assertionID];\\n }\\n\\n function deleteAssertionForBatch(uint256 assertionID) external rollupOnly {\\n bytes32 stateHash = assertions[assertionID].stateHash;\\n uint256 parentID = assertions[assertionID].parent;\\n delete assertions[assertionID];\\n assertions[parentID].childInboxSize = 0;\\n assertionStates[parentID].childStateHashes[stateHash] = false;\\n }\\n}\\n\",\"keccak256\":\"0x41f3df4852c1706d878483cd898d3e2bbcb935880766231624cc101fe59e661c\",\"license\":\"Apache-2.0\"},\"contracts/L1/fraud-proof/libraries/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\n/*\\n * Copyright 2022, Specular contributors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\npragma solidity ^0.8.0;\\n\\n/// @dev Thrown when unauthorized (!rollup) address calls an only-rollup function\\n/// @param sender Address of the caller\\n/// @param rollup The rollup address authorized to call this function\\nerror NotRollup(address sender, address rollup);\\n\\n/// @dev Thrown when unauthorized (!challenge) address calls an only-challenge function\\n/// @param sender Address of the caller\\n/// @param challenge The challenge address authorized to call this function\\nerror NotChallenge(address sender, address challenge);\\n\\n/// @dev Thrown when unauthorized (!sequencer) address calls an only-sequencer function\\n/// @param sender Address of the caller\\n/// @param sequencer The sequencer address authorized to call this function\\nerror NotSequencer(address sender, address sequencer);\\n\\n/// @dev Thrown when function is called with a zero address argument\\nerror ZeroAddress();\\n\\n/// @dev Thrown when function is called with a zero address argument\\nerror RedundantInitialized();\\n\",\"keccak256\":\"0x291dce1c6076142cc427721f86cbabad6438166ed85c5b5c02fb24ec3f943c12\",\"license\":\"Apache-2.0\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b5061001961001e565b6100de565b600054610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100dc576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b610981806100ed6000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c806354823e6611610097578063873fd08911610066578063873fd089146102b7578063a832c3ae14610300578063d0087d6114610313578063d8a4e5af1461032657600080fd5b806354823e66146102415780635ec6a8df146102615780638129fc1c1461028c578063828622751461029457600080fd5b8063366b2b69116100d3578063366b2b6914610169578063422815841461018c5780634e04886d1461019f578063524232f6146101c257600080fd5b806307663706146100fa5780632b27e93b1461010f57806330b9477014610146575b600080fd5b61010d610108366004610880565b610339565b005b61013361011d3660046108a2565b6000908152600160208190526040909120015490565b6040519081526020015b60405180910390f35b6101336101543660046108a2565b60009081526001602052604090206002015490565b6101336101773660046108a2565b60009081526001602052604090206005015490565b61010d61019a3660046108bb565b610409565b6101336101ad3660046108a2565b60009081526001602052604090206004015490565b61020c6101d03660046108a2565b60016020819052600091825260409091208054918101546002820154600383015460048401546005850154600690950154939492939192909187565b604080519788526020880196909652948601939093526060850191909152608084015260a083015260c082015260e00161013d565b61013361024f3660046108a2565b60009081526001602052604090205490565b600354610274906001600160a01b031681565b6040516001600160a01b03909116815260200161013d565b61010d6105a7565b6101336102a23660046108a2565b60009081526001602052604090206003015490565b6102f06102c53660046108f6565b60009182526002602090815260408084206001600160a01b0393909316845291905290205460ff1690565b604051901515815260200161013d565b61010d61030e3660046108f6565b6106b0565b61010d6103213660046108a2565b610740565b61010d6103343660046108a2565b6107e9565b6003546001600160a01b0316156103a25760405162461bcd60e51b815260206004820152602260248201527f726f6c6c75704164647265737320616c726561647920696e697469616c697a65604482015261321760f11b60648201526084015b60405180910390fd5b6001600160a01b0381166103e75760405162461bcd60e51b815260206004820152600c60248201526b5a45524f5f4144445245535360a01b6044820152606401610399565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b0316331461044957600354604051630e4cf1bf60e21b81523360048201526001600160a01b039091166024820152604401610399565b6000828152600160209081526040808320600290925290912060068201548061047857600683018690556104c0565b8086146104c05760405162461bcd60e51b8152602060048201526016602482015275086d0d2d8c892dcc4def0a6d2f4ca9ad2e6dac2e8c6d60531b6044820152606401610399565b600087815260018301602052604090205460ff161561051a5760405162461bcd60e51b81526020600482015260166024820152755369626c696e6753746174654861736845786973747360501b6044820152606401610399565b506000868152600191820160209081526040808320805460ff191685179055805160e081018252988952888201978852888101968752606089019586524360808a0190815260a08a0184815260c08b018581529b85529285905292209751885595519187019190915592516002860155505160038401555160048301555160058201559051600690910155565b600054610100900460ff16158080156105c75750600054600160ff909116105b806105e15750303b1580156105e1575060005460ff166001145b6106445760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610399565b6000805460ff191660011790558015610667576000805461ff0019166101001790555b80156106ad576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6003546001600160a01b031633146106f057600354604051630e4cf1bf60e21b81523360048201526001600160a01b039091166024820152604401610399565b6000828152600160208181526040808420600283528185206001600160a01b03871686529092528320805460ff1916909217909155600581018054919261073683610922565b9190505550505050565b6003546001600160a01b0316331461078057600354604051630e4cf1bf60e21b81523360048201526001600160a01b039091166024820152604401610399565b6000908152600160208181526040808420805460028083018054888555848801899055908890556003840188905560048401889055600584018890556006938401889055875283872090920186905590835281852090855290920190529020805460ff19169055565b6003546001600160a01b0316331461082957600354604051630e4cf1bf60e21b81523360048201526001600160a01b039091166024820152604401610399565b600090815260016020819052604082208281559081018290556002810182905560038101829055600481018290556005810182905560060155565b80356001600160a01b038116811461087b57600080fd5b919050565b60006020828403121561089257600080fd5b61089b82610864565b9392505050565b6000602082840312156108b457600080fd5b5035919050565b600080600080600060a086880312156108d357600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b6000806040838503121561090957600080fd5b8235915061091960208401610864565b90509250929050565b600060001982141561094457634e487b7160e01b600052601160045260246000fd5b506001019056fea2646970667358221220a150566bf21c920790adc62952b4cfcc82068ec5fe990be17f7397ad067e2c9764736f6c63430008090033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100f55760003560e01c806354823e6611610097578063873fd08911610066578063873fd089146102b7578063a832c3ae14610300578063d0087d6114610313578063d8a4e5af1461032657600080fd5b806354823e66146102415780635ec6a8df146102615780638129fc1c1461028c578063828622751461029457600080fd5b8063366b2b69116100d3578063366b2b6914610169578063422815841461018c5780634e04886d1461019f578063524232f6146101c257600080fd5b806307663706146100fa5780632b27e93b1461010f57806330b9477014610146575b600080fd5b61010d610108366004610880565b610339565b005b61013361011d3660046108a2565b6000908152600160208190526040909120015490565b6040519081526020015b60405180910390f35b6101336101543660046108a2565b60009081526001602052604090206002015490565b6101336101773660046108a2565b60009081526001602052604090206005015490565b61010d61019a3660046108bb565b610409565b6101336101ad3660046108a2565b60009081526001602052604090206004015490565b61020c6101d03660046108a2565b60016020819052600091825260409091208054918101546002820154600383015460048401546005850154600690950154939492939192909187565b604080519788526020880196909652948601939093526060850191909152608084015260a083015260c082015260e00161013d565b61013361024f3660046108a2565b60009081526001602052604090205490565b600354610274906001600160a01b031681565b6040516001600160a01b03909116815260200161013d565b61010d6105a7565b6101336102a23660046108a2565b60009081526001602052604090206003015490565b6102f06102c53660046108f6565b60009182526002602090815260408084206001600160a01b0393909316845291905290205460ff1690565b604051901515815260200161013d565b61010d61030e3660046108f6565b6106b0565b61010d6103213660046108a2565b610740565b61010d6103343660046108a2565b6107e9565b6003546001600160a01b0316156103a25760405162461bcd60e51b815260206004820152602260248201527f726f6c6c75704164647265737320616c726561647920696e697469616c697a65604482015261321760f11b60648201526084015b60405180910390fd5b6001600160a01b0381166103e75760405162461bcd60e51b815260206004820152600c60248201526b5a45524f5f4144445245535360a01b6044820152606401610399565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b0316331461044957600354604051630e4cf1bf60e21b81523360048201526001600160a01b039091166024820152604401610399565b6000828152600160209081526040808320600290925290912060068201548061047857600683018690556104c0565b8086146104c05760405162461bcd60e51b8152602060048201526016602482015275086d0d2d8c892dcc4def0a6d2f4ca9ad2e6dac2e8c6d60531b6044820152606401610399565b600087815260018301602052604090205460ff161561051a5760405162461bcd60e51b81526020600482015260166024820152755369626c696e6753746174654861736845786973747360501b6044820152606401610399565b506000868152600191820160209081526040808320805460ff191685179055805160e081018252988952888201978852888101968752606089019586524360808a0190815260a08a0184815260c08b018581529b85529285905292209751885595519187019190915592516002860155505160038401555160048301555160058201559051600690910155565b600054610100900460ff16158080156105c75750600054600160ff909116105b806105e15750303b1580156105e1575060005460ff166001145b6106445760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610399565b6000805460ff191660011790558015610667576000805461ff0019166101001790555b80156106ad576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6003546001600160a01b031633146106f057600354604051630e4cf1bf60e21b81523360048201526001600160a01b039091166024820152604401610399565b6000828152600160208181526040808420600283528185206001600160a01b03871686529092528320805460ff1916909217909155600581018054919261073683610922565b9190505550505050565b6003546001600160a01b0316331461078057600354604051630e4cf1bf60e21b81523360048201526001600160a01b039091166024820152604401610399565b6000908152600160208181526040808420805460028083018054888555848801899055908890556003840188905560048401889055600584018890556006938401889055875283872090920186905590835281852090855290920190529020805460ff19169055565b6003546001600160a01b0316331461082957600354604051630e4cf1bf60e21b81523360048201526001600160a01b039091166024820152604401610399565b600090815260016020819052604082208281559081018290556002810182905560038101829055600481018290556005810182905560060155565b80356001600160a01b038116811461087b57600080fd5b919050565b60006020828403121561089257600080fd5b61089b82610864565b9392505050565b6000602082840312156108b457600080fd5b5035919050565b600080600080600060a086880312156108d357600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b6000806040838503121561090957600080fd5b8235915061091960208401610864565b90509250929050565b600060001982141561094457634e487b7160e01b600052601160045260246000fd5b506001019056fea2646970667358221220a150566bf21c920790adc62952b4cfcc82068ec5fe990be17f7397ad067e2c9764736f6c63430008090033",
"devdoc": {
"errors": {
"NotRollup(address,address)": [
{
"details": "Thrown when unauthorized (!rollup) address calls an only-rollup function",
"params": {
"rollup": "The rollup address authorized to call this function",
"sender": "Address of the caller"
}
}
]
},
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 216,
"contract": "contracts/L1/fraud-proof/AssertionMap.sol:AssertionMap",
"label": "_initialized",
"offset": 0,
"slot": "0",
"type": "t_uint8"
},
{
"astId": 219,
"contract": "contracts/L1/fraud-proof/AssertionMap.sol:AssertionMap",
"label": "_initializing",
"offset": 1,
"slot": "0",
"type": "t_bool"
},
{
"astId": 13404,
"contract": "contracts/L1/fraud-proof/AssertionMap.sol:AssertionMap",
"label": "assertions",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_uint256,t_struct(Assertion)13390_storage)"
},
{
"astId": 13409,
"contract": "contracts/L1/fraud-proof/AssertionMap.sol:AssertionMap",
"label": "assertionStates",
"offset": 0,
"slot": "2",
"type": "t_mapping(t_uint256,t_struct(AssertionState)13399_storage)"
},
{
"astId": 13411,
"contract": "contracts/L1/fraud-proof/AssertionMap.sol:AssertionMap",
"label": "rollupAddress",
"offset": 0,
"slot": "3",
"type": "t_address"
}
],
"types": {
"t_address": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
},
"t_bool": {
"encoding": "inplace",
"label": "bool",
"numberOfBytes": "1"
},
"t_bytes32": {
"encoding": "inplace",
"label": "bytes32",
"numberOfBytes": "32"
},
"t_mapping(t_address,t_bool)": {
"encoding": "mapping",
"key": "t_address",
"label": "mapping(address => bool)",
"numberOfBytes": "32",
"value": "t_bool"
},
"t_mapping(t_bytes32,t_bool)": {
"encoding": "mapping",
"key": "t_bytes32",
"label": "mapping(bytes32 => bool)",
"numberOfBytes": "32",
"value": "t_bool"
},
"t_mapping(t_uint256,t_struct(Assertion)13390_storage)": {
"encoding": "mapping",
"key": "t_uint256",
"label": "mapping(uint256 => struct AssertionMap.Assertion)",
"numberOfBytes": "32",
"value": "t_struct(Assertion)13390_storage"
},
"t_mapping(t_uint256,t_struct(AssertionState)13399_storage)": {
"encoding": "mapping",
"key": "t_uint256",
"label": "mapping(uint256 => struct AssertionMap.AssertionState)",
"numberOfBytes": "32",
"value": "t_struct(Assertion