Commit 3bfb2d65 authored by Georgios Konstantopoulos's avatar Georgios Konstantopoulos Committed by GitHub

chore: import deployments (#425)

* chore: import public deployments

* chore: import scripts for address deployment verification/generation
parent 9f8c6618
{
"address": "0x5011A092e66B2c89e2d09dfb9E418B4bCFb24C80",
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "_name",
"type": "string"
},
{
"indexed": false,
"internalType": "address",
"name": "_newAddress",
"type": "address"
}
],
"name": "AddressSet",
"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"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "getAddress",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
},
{
"internalType": "address",
"name": "_address",
"type": "address"
}
],
"name": "setAddress",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"transactionHash": "0x39342ffdce6e6c76b8fa6534d0e5f24ba0917ed09ab713ad0eef7eee73dd08ed",
"receipt": {
"to": null,
"from": "0x558ba9b8d78713fbf768c1f8a584485B4003f43F",
"contractAddress": "0xE630cdf302880783364334455C8352fE0aB5b748",
"transactionIndex": 3,
"gasUsed": "413938",
"logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000022000000000000000000000000000000000040000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400040000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000001000000000000000000000000000000000000000000",
"blockHash": "0xf1c7969322d44cb9561c6af6b8499e1ee90e81c5e8e6409417454bf3d8bc598f",
"transactionHash": "0x39342ffdce6e6c76b8fa6534d0e5f24ba0917ed09ab713ad0eef7eee73dd08ed",
"logs": [
{
"transactionIndex": 3,
"blockNumber": 4573376,
"transactionHash": "0x39342ffdce6e6c76b8fa6534d0e5f24ba0917ed09ab713ad0eef7eee73dd08ed",
"address": "0xE630cdf302880783364334455C8352fE0aB5b748",
"topics": [
"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x000000000000000000000000558ba9b8d78713fbf768c1f8a584485b4003f43f"
],
"data": "0x",
"logIndex": 9,
"blockHash": "0xf1c7969322d44cb9561c6af6b8499e1ee90e81c5e8e6409417454bf3d8bc598f"
}
],
"blockNumber": 4573376,
"cumulativeGasUsed": "3107647",
"status": 1,
"byzantium": true
},
"args": [],
"solcInputHash": "cebcb515c1a9c570d96e0b8f6fd237e2",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_newAddress\",\"type\":\"address\"}],\"name\":\"AddressSet\",\"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\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"getAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"setAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"title\":\"Lib_AddressManager\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":\"Lib_AddressManager\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0xdf802e1cc6474df913626991e9fca3835c620a519f397afe04bf9c260e723257\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() internal {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xe0409fbd236d16ca6be439d9d97dd36d0d9a0697ee0062d49588b9d29c248e47\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b03191633178082556040516001600160a01b039190911691907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3610614806100696000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c8063715018a61461005c5780638da5cb5b146100665780639b2ea4bd1461008a578063bf40fac11461013b578063f2fde38b146101e1575b600080fd5b610064610207565b005b61006e6102b0565b604080516001600160a01b039092168252519081900360200190f35b610064600480360360408110156100a057600080fd5b8101906020810181356401000000008111156100bb57600080fd5b8201836020820111156100cd57600080fd5b803590602001918460018302840111640100000000831117156100ef57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b031691506102bf9050565b61006e6004803603602081101561015157600080fd5b81019060208101813564010000000081111561016c57600080fd5b82018360208201111561017e57600080fd5b803590602001918460018302840111640100000000831117156101a057600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061040c945050505050565b610064600480360360208110156101f757600080fd5b50356001600160a01b031661043b565b6000546001600160a01b03163314610266576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031681565b6000546001600160a01b0316331461031e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b7f188466739ff00cc68bfb2367d23ae4b855264264fe1624caa8884399af23454c82826040518080602001836001600160a01b03168152602001828103825284818151815260200191508051906020019080838360005b8381101561038d578181015183820152602001610375565b50505050905090810190601f1680156103ba5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a180600160006103d68561053a565b815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055505050565b60006001600061041b8461053a565b81526020810191909152604001600020546001600160a01b031692915050565b6000546001600160a01b0316331461049a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166104df5760405162461bcd60e51b815260040180806020018281038252602d8152602001806105b2602d913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000816040516020018082805190602001908083835b6020831061056f5780518252601f199092019160209182019101610550565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120905091905056fe4f776e61626c653a206e6577206f776e65722063616e6e6f7420626520746865207a65726f2061646472657373a2646970667358221220304b86da0b56c0241601472f57374abec2a11900a97043845283952624e4512364736f6c63430007060033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c8063715018a61461005c5780638da5cb5b146100665780639b2ea4bd1461008a578063bf40fac11461013b578063f2fde38b146101e1575b600080fd5b610064610207565b005b61006e6102b0565b604080516001600160a01b039092168252519081900360200190f35b610064600480360360408110156100a057600080fd5b8101906020810181356401000000008111156100bb57600080fd5b8201836020820111156100cd57600080fd5b803590602001918460018302840111640100000000831117156100ef57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b031691506102bf9050565b61006e6004803603602081101561015157600080fd5b81019060208101813564010000000081111561016c57600080fd5b82018360208201111561017e57600080fd5b803590602001918460018302840111640100000000831117156101a057600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061040c945050505050565b610064600480360360208110156101f757600080fd5b50356001600160a01b031661043b565b6000546001600160a01b03163314610266576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031681565b6000546001600160a01b0316331461031e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b7f188466739ff00cc68bfb2367d23ae4b855264264fe1624caa8884399af23454c82826040518080602001836001600160a01b03168152602001828103825284818151815260200191508051906020019080838360005b8381101561038d578181015183820152602001610375565b50505050905090810190601f1680156103ba5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a180600160006103d68561053a565b815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055505050565b60006001600061041b8461053a565b81526020810191909152604001600020546001600160a01b031692915050565b6000546001600160a01b0316331461049a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166104df5760405162461bcd60e51b815260040180806020018281038252602d8152602001806105b2602d913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000816040516020018082805190602001908083835b6020831061056f5780518252601f199092019160209182019101610550565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120905091905056fe4f776e61626c653a206e6577206f776e65722063616e6e6f7420626520746865207a65726f2061646472657373a2646970667358221220304b86da0b56c0241601472f57374abec2a11900a97043845283952624e4512364736f6c63430007060033",
"devdoc": {
"kind": "dev",
"methods": {},
"title": "Lib_AddressManager",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 11739,
"contract": "contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol:Lib_AddressManager",
"label": "owner",
"offset": 0,
"slot": "0",
"type": "t_address"
},
{
"astId": 11647,
"contract": "contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol:Lib_AddressManager",
"label": "addresses",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_bytes32,t_address)"
}
],
"types": {
"t_address": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
},
"t_bytes32": {
"encoding": "inplace",
"label": "bytes32",
"numberOfBytes": "32"
},
"t_mapping(t_bytes32,t_address)": {
"encoding": "mapping",
"key": "t_bytes32",
"label": "mapping(bytes32 => address)",
"numberOfBytes": "32",
"value": "t_address"
}
}
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"address": "0xe0992cB281cfb66cC53A98B7d32B0305d37F723D",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_libAddressManager",
"type": "address"
},
{
"internalType": "string",
"name": "_owner",
"type": "string"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "deleteElementsAfterInclusive",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "deleteElementsAfterInclusive",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "get",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getGlobalMetadata",
"outputs": [
{
"internalType": "bytes27",
"name": "",
"type": "bytes27"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "length",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_object",
"type": "bytes32"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "push",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_object",
"type": "bytes32"
}
],
"name": "push",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_objectA",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_objectB",
"type": "bytes32"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "push2",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_objectA",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_objectB",
"type": "bytes32"
}
],
"name": "push2",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "resolve",
"outputs": [
{
"internalType": "address",
"name": "_contract",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "setGlobalMetadata",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "setNextOverwritableIndex",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"transactionHash": "0x86b9f5af9ce79ad3dca2a59ed521e75d88ed6d816f85e49b15232731cf1b16eb",
"receipt": {
"to": null,
"from": "0x558ba9b8d78713fbf768c1f8a584485B4003f43F",
"contractAddress": "0x4C4a482b6bE75FDce6E94Be10423363108f34fDf",
"transactionIndex": 1,
"gasUsed": "1103714",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x7dc617150a7075769c500e7ebe66c4357400e4d7a81a26495e265d4949b2fdd6",
"transactionHash": "0x86b9f5af9ce79ad3dca2a59ed521e75d88ed6d816f85e49b15232731cf1b16eb",
"logs": [],
"blockNumber": 4573377,
"cumulativeGasUsed": "1155953",
"status": 1,
"byzantium": true
},
"args": [
"0xE630cdf302880783364334455C8352fE0aB5b748",
"OVM_CanonicalTransactionChain"
],
"solcInputHash": "cebcb515c1a9c570d96e0b8f6fd237e2",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_owner\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"deleteElementsAfterInclusive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"deleteElementsAfterInclusive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"get\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGlobalMetadata\",\"outputs\":[{\"internalType\":\"bytes27\",\"name\":\"\",\"type\":\"bytes27\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"length\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_object\",\"type\":\"bytes32\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"push\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_object\",\"type\":\"bytes32\"}],\"name\":\"push\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_objectA\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_objectB\",\"type\":\"bytes32\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"push2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_objectA\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_objectB\",\"type\":\"bytes32\"}],\"name\":\"push2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"setGlobalMetadata\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"setNextOverwritableIndex\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_libAddressManager\":\"Address of the Address Manager.\",\"_owner\":\"Name of the contract that owns this container (will be resolved later).\"}},\"deleteElementsAfterInclusive(uint256)\":{\"params\":{\"_index\":\"Object index to delete from.\"}},\"deleteElementsAfterInclusive(uint256,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_index\":\"Object index to delete from.\"}},\"get(uint256)\":{\"params\":{\"_index\":\"Index of the particular object to access.\"},\"returns\":{\"_0\":\"32 byte object value.\"}},\"getGlobalMetadata()\":{\"returns\":{\"_0\":\"Container global metadata field.\"}},\"length()\":{\"returns\":{\"_0\":\"Number of objects in the container.\"}},\"push(bytes32)\":{\"params\":{\"_object\":\"A 32 byte value to insert into the container.\"}},\"push(bytes32,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_object\":\"A 32 byte value to insert into the container.\"}},\"push2(bytes32,bytes32)\":{\"params\":{\"_objectA\":\"First 32 byte value to insert into the container.\",\"_objectB\":\"Second 32 byte value to insert into the container.\"}},\"push2(bytes32,bytes32,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_objectA\":\"First 32 byte value to insert into the container.\",\"_objectB\":\"Second 32 byte value to insert into the container.\"}},\"setGlobalMetadata(bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata to set.\"}}},\"title\":\"OVM_ChainStorageContainer\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deleteElementsAfterInclusive(uint256)\":{\"notice\":\"Removes all objects after and including a given index.\"},\"deleteElementsAfterInclusive(uint256,bytes27)\":{\"notice\":\"Removes all objects after and including a given index. Also allows setting the global metadata field.\"},\"get(uint256)\":{\"notice\":\"Retrieves an object from the container.\"},\"getGlobalMetadata()\":{\"notice\":\"Retrieves the container's global metadata field.\"},\"length()\":{\"notice\":\"Retrieves the number of objects stored in the container.\"},\"push(bytes32)\":{\"notice\":\"Pushes an object into the container.\"},\"push(bytes32,bytes27)\":{\"notice\":\"Pushes an object into the container. Function allows setting the global metadata since we'll need to touch the \\\"length\\\" storage slot anyway, which also contains the global metadata (it's an optimization).\"},\"push2(bytes32,bytes32)\":{\"notice\":\"Pushes two objects into the container at the same time. A useful optimization.\"},\"push2(bytes32,bytes32,bytes27)\":{\"notice\":\"Pushes two objects into the container at the same time. Also allows setting the global metadata field.\"},\"setGlobalMetadata(bytes27)\":{\"notice\":\"Sets the container's global metadata field. We're using `bytes27` here because we use five bytes to maintain the length of the underlying data structure, meaning we have an extra 27 bytes to store arbitrary data.\"},\"setNextOverwritableIndex(uint256)\":{\"notice\":\"Marks an index as overwritable, meaing the underlying buffer can start to write values over any objects before and including the given index.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol\":\"OVM_ChainStorageContainer\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol\":{\"content\":\"pragma solidity ^0.7.0;\\n\\n/* Library Imports */\\nimport { Lib_RingBuffer } from \\\"../../libraries/utils/Lib_RingBuffer.sol\\\";\\nimport { Lib_AddressResolver } from \\\"../../libraries/resolver/Lib_AddressResolver.sol\\\";\\n\\n/* Interface Imports */\\nimport { iOVM_ChainStorageContainer } from \\\"../../iOVM/chain/iOVM_ChainStorageContainer.sol\\\";\\n\\n/**\\n * @title OVM_ChainStorageContainer\\n */\\ncontract OVM_ChainStorageContainer is iOVM_ChainStorageContainer, Lib_AddressResolver {\\n\\n /*************\\n * Libraries *\\n *************/\\n\\n using Lib_RingBuffer for Lib_RingBuffer.RingBuffer;\\n\\n\\n /*************\\n * Variables *\\n *************/\\n\\n string public owner;\\n Lib_RingBuffer.RingBuffer internal buffer;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n \\n /**\\n * @param _libAddressManager Address of the Address Manager.\\n * @param _owner Name of the contract that owns this container (will be resolved later).\\n */\\n constructor(\\n address _libAddressManager,\\n string memory _owner\\n )\\n Lib_AddressResolver(_libAddressManager)\\n {\\n owner = _owner;\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n \\n modifier onlyOwner() {\\n require(\\n msg.sender == resolve(owner),\\n \\\"OVM_ChainStorageContainer: Function can only be called by the owner.\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function setGlobalMetadata(\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n return buffer.setExtraData(_globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function getGlobalMetadata()\\n override\\n public\\n view\\n returns (\\n bytes27\\n )\\n {\\n return buffer.getExtraData();\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function length()\\n override\\n public\\n view\\n returns (\\n uint256\\n )\\n {\\n return uint256(buffer.getLength());\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push(\\n bytes32 _object\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push(_object);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push(\\n bytes32 _object,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push(_object, _globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push2(_objectA, _objectB);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push2(_objectA, _objectB, _globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function get(\\n uint256 _index\\n )\\n override\\n public\\n view\\n returns (\\n bytes32\\n )\\n {\\n return buffer.get(uint40(_index));\\n }\\n \\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.deleteElementsAfterInclusive(\\n uint40(_index)\\n );\\n }\\n \\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.deleteElementsAfterInclusive(\\n uint40(_index),\\n _globalMetadata\\n );\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function setNextOverwritableIndex(\\n uint256 _index\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.nextOverwritableIndex = _index;\\n }\\n}\\n\",\"keccak256\":\"0xc722e9528988810bd754002dfe3923bc9ac9252c1d981c4803fd5053603bfb11\"},\"contracts/optimistic-ethereum/iOVM/chain/iOVM_ChainStorageContainer.sol\":{\"content\":\"pragma solidity ^0.7.0;\\n\\n/**\\n * @title iOVM_ChainStorageContainer\\n */\\ninterface iOVM_ChainStorageContainer {\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Sets the container's global metadata field. We're using `bytes27` here because we use five\\n * bytes to maintain the length of the underlying data structure, meaning we have an extra\\n * 27 bytes to store arbitrary data.\\n * @param _globalMetadata New global metadata to set.\\n */\\n function setGlobalMetadata(\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Retrieves the container's global metadata field.\\n * @return Container global metadata field.\\n */\\n function getGlobalMetadata()\\n external\\n view\\n returns (\\n bytes27\\n );\\n\\n /**\\n * Retrieves the number of objects stored in the container.\\n * @return Number of objects in the container.\\n */\\n function length()\\n external\\n view\\n returns (\\n uint256\\n );\\n\\n /**\\n * Pushes an object into the container.\\n * @param _object A 32 byte value to insert into the container.\\n */\\n function push(\\n bytes32 _object\\n )\\n external;\\n\\n /**\\n * Pushes an object into the container. Function allows setting the global metadata since\\n * we'll need to touch the \\\"length\\\" storage slot anyway, which also contains the global\\n * metadata (it's an optimization).\\n * @param _object A 32 byte value to insert into the container.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function push(\\n bytes32 _object,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Pushes two objects into the container at the same time. A useful optimization.\\n * @param _objectA First 32 byte value to insert into the container.\\n * @param _objectB Second 32 byte value to insert into the container.\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB\\n )\\n external;\\n\\n /**\\n * Pushes two objects into the container at the same time. Also allows setting the global\\n * metadata field.\\n * @param _objectA First 32 byte value to insert into the container.\\n * @param _objectB Second 32 byte value to insert into the container.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Retrieves an object from the container.\\n * @param _index Index of the particular object to access.\\n * @return 32 byte object value.\\n */\\n function get(\\n uint256 _index\\n )\\n external\\n view\\n returns (\\n bytes32\\n );\\n\\n /**\\n * Removes all objects after and including a given index.\\n * @param _index Object index to delete from.\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index\\n )\\n external;\\n\\n /**\\n * Removes all objects after and including a given index. Also allows setting the global\\n * metadata field.\\n * @param _index Object index to delete from.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Marks an index as overwritable, meaing the underlying buffer can start to write values over\\n * any objects before and including the given index.\\n */\\n function setNextOverwritableIndex(\\n uint256 _index\\n )\\n external;\\n}\\n\",\"keccak256\":\"0xcfca7da85b35d94c27581c2460b0d48fd0cc51fa72670cc7a2f7f760fb21a2f0\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0xdf802e1cc6474df913626991e9fca3835c620a519f397afe04bf9c260e723257\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_AddressResolver\\n */\\ncontract Lib_AddressResolver {\\n\\n /*******************************************\\n * Contract Variables: Contract References *\\n *******************************************/\\n\\n Lib_AddressManager internal libAddressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n */\\n constructor(\\n address _libAddressManager\\n ) public {\\n libAddressManager = Lib_AddressManager(_libAddressManager);\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function resolve(\\n string memory _name\\n )\\n public\\n view\\n returns (\\n address _contract\\n )\\n {\\n return libAddressManager.getAddress(_name);\\n }\\n}\\n\",\"keccak256\":\"0xf3b9d78b309ddeec259ce3e0e1cfdef3ca40938e9a81971b28ce2b8ea327f533\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() internal {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xe0409fbd236d16ca6be439d9d97dd36d0d9a0697ee0062d49588b9d29c248e47\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/utils/Lib_RingBuffer.sol\":{\"content\":\"pragma solidity ^0.7.0;\\n\\nlibrary Lib_RingBuffer {\\n using Lib_RingBuffer for RingBuffer;\\n\\n /***********\\n * Structs *\\n ***********/\\n\\n struct Buffer {\\n uint256 length;\\n mapping (uint256 => bytes32) buf;\\n }\\n\\n struct RingBuffer {\\n bytes32 contextA;\\n bytes32 contextB;\\n Buffer bufferA;\\n Buffer bufferB;\\n uint256 nextOverwritableIndex;\\n }\\n\\n struct RingBufferContext {\\n // contextA\\n uint40 globalIndex;\\n bytes27 extraData;\\n\\n // contextB\\n uint64 currBufferIndex;\\n uint40 prevResetIndex;\\n uint40 currResetIndex;\\n }\\n\\n\\n /*************\\n * Constants *\\n *************/\\n\\n uint256 constant MIN_CAPACITY = 16;\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * Pushes a single element to the buffer.\\n * @param _self Buffer to access.\\n * @param _value Value to push to the buffer.\\n * @param _extraData Optional global extra data.\\n */\\n function push(\\n RingBuffer storage _self,\\n bytes32 _value,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n\\n // Set a minimum capacity.\\n if (currBuffer.length == 0) {\\n currBuffer.length = MIN_CAPACITY;\\n }\\n\\n // Check if we need to expand the buffer.\\n if (ctx.globalIndex - ctx.currResetIndex >= currBuffer.length) {\\n if (ctx.currResetIndex < _self.nextOverwritableIndex) {\\n // We're going to overwrite the inactive buffer.\\n // Bump the buffer index, reset the delete offset, and set our reset indices.\\n ctx.currBufferIndex++;\\n ctx.prevResetIndex = ctx.currResetIndex;\\n ctx.currResetIndex = ctx.globalIndex;\\n\\n // Swap over to the next buffer.\\n currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n } else {\\n // We're not overwriting yet, double the length of the current buffer.\\n currBuffer.length *= 2;\\n }\\n }\\n\\n // Index to write to is the difference of the global and reset indices.\\n uint256 writeHead = ctx.globalIndex - ctx.currResetIndex;\\n currBuffer.buf[writeHead] = _value;\\n\\n // Bump the global index and insert our extra data, then save the context.\\n ctx.globalIndex++;\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Pushes a single element to the buffer.\\n * @param _self Buffer to access.\\n * @param _value Value to push to the buffer.\\n */\\n function push(\\n RingBuffer storage _self,\\n bytes32 _value\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n \\n _self.push(\\n _value,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Pushes a two elements to the buffer.\\n * @param _self Buffer to access.\\n * @param _valueA First value to push to the buffer.\\n * @param _valueA Second value to push to the buffer.\\n * @param _extraData Optional global extra data.\\n */\\n function push2(\\n RingBuffer storage _self,\\n bytes32 _valueA,\\n bytes32 _valueB,\\n bytes27 _extraData\\n )\\n internal\\n {\\n _self.push(_valueA, _extraData);\\n _self.push(_valueB, _extraData);\\n }\\n\\n /**\\n * Pushes a two elements to the buffer.\\n * @param _self Buffer to access.\\n * @param _valueA First value to push to the buffer.\\n * @param _valueA Second value to push to the buffer.\\n */\\n function push2(\\n RingBuffer storage _self,\\n bytes32 _valueA,\\n bytes32 _valueB\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n _self.push2(\\n _valueA,\\n _valueB,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Retrieves an element from the buffer.\\n * @param _self Buffer to access.\\n * @param _index Element index to retrieve.\\n * @return Value of the element at the given index.\\n */\\n function get(\\n RingBuffer storage _self,\\n uint256 _index\\n )\\n internal\\n view\\n returns (\\n bytes32 \\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n require(\\n _index < ctx.globalIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n Buffer storage prevBuffer = _self.getBuffer(ctx.currBufferIndex + 1);\\n\\n if (_index >= ctx.currResetIndex) {\\n // We're trying to load an element from the current buffer.\\n // Relative index is just the difference from the reset index.\\n uint256 relativeIndex = _index - ctx.currResetIndex;\\n\\n // Shouldn't happen but why not check.\\n require(\\n relativeIndex < currBuffer.length,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n return currBuffer.buf[relativeIndex];\\n } else {\\n // We're trying to load an element from the previous buffer.\\n // Relative index is the difference from the reset index in the other direction.\\n uint256 relativeIndex = ctx.currResetIndex - _index;\\n\\n // Condition only fails in the case that we deleted and flipped buffers.\\n require(\\n ctx.currResetIndex > ctx.prevResetIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n // Make sure we're not trying to read beyond the array.\\n require(\\n relativeIndex <= prevBuffer.length,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n return prevBuffer.buf[prevBuffer.length - relativeIndex];\\n }\\n }\\n\\n /**\\n * Deletes all elements after (and including) a given index.\\n * @param _self Buffer to access.\\n * @param _index Index of the element to delete from (inclusive).\\n * @param _extraData Optional global extra data.\\n */\\n function deleteElementsAfterInclusive(\\n RingBuffer storage _self,\\n uint40 _index,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n require(\\n _index < ctx.globalIndex && _index >= ctx.prevResetIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n Buffer storage prevBuffer = _self.getBuffer(ctx.currBufferIndex + 1);\\n\\n if (_index < ctx.currResetIndex) {\\n // We're switching back to the previous buffer.\\n // Reduce the buffer index, set the current reset index back to match the previous one.\\n // We use the equality of these two values to prevent reading beyond this buffer.\\n ctx.currBufferIndex--;\\n ctx.currResetIndex = ctx.prevResetIndex;\\n }\\n\\n // Set our global index and extra data, save the context.\\n ctx.globalIndex = _index;\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Deletes all elements after (and including) a given index.\\n * @param _self Buffer to access.\\n * @param _index Index of the element to delete from (inclusive).\\n */\\n function deleteElementsAfterInclusive(\\n RingBuffer storage _self,\\n uint40 _index\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n _self.deleteElementsAfterInclusive(\\n _index,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Retrieves the current global index.\\n * @param _self Buffer to access.\\n * @return Current global index.\\n */\\n function getLength(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n uint40\\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n return ctx.globalIndex;\\n }\\n\\n /**\\n * Changes current global extra data.\\n * @param _self Buffer to access.\\n * @param _extraData New global extra data.\\n */\\n function setExtraData(\\n RingBuffer storage _self,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Retrieves the current global extra data.\\n * @param _self Buffer to access.\\n * @return Current global extra data.\\n */\\n function getExtraData(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n bytes27\\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n return ctx.extraData;\\n }\\n\\n /**\\n * Sets the current ring buffer context.\\n * @param _self Buffer to access.\\n * @param _ctx Current ring buffer context.\\n */\\n function setContext(\\n RingBuffer storage _self,\\n RingBufferContext memory _ctx\\n )\\n internal\\n returns (\\n bytes32\\n )\\n {\\n bytes32 contextA;\\n bytes32 contextB;\\n\\n uint40 globalIndex = _ctx.globalIndex;\\n bytes27 extraData = _ctx.extraData;\\n assembly {\\n contextA := globalIndex\\n contextA := or(contextA, extraData)\\n }\\n\\n uint64 currBufferIndex = _ctx.currBufferIndex;\\n uint40 prevResetIndex = _ctx.prevResetIndex;\\n uint40 currResetIndex = _ctx.currResetIndex;\\n assembly {\\n contextB := currBufferIndex\\n contextB := or(contextB, shl(64, prevResetIndex))\\n contextB := or(contextB, shl(104, currResetIndex))\\n }\\n\\n if (_self.contextA != contextA) {\\n _self.contextA = contextA;\\n }\\n\\n if (_self.contextB != contextB) {\\n _self.contextB = contextB;\\n }\\n }\\n\\n /**\\n * Retrieves the current ring buffer context.\\n * @param _self Buffer to access.\\n * @return Current ring buffer context.\\n */\\n function getContext(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n RingBufferContext memory\\n )\\n {\\n bytes32 contextA = _self.contextA;\\n bytes32 contextB = _self.contextB;\\n\\n uint40 globalIndex;\\n bytes27 extraData;\\n assembly {\\n globalIndex := and(contextA, 0x000000000000000000000000000000000000000000000000000000FFFFFFFFFF)\\n extraData := and(contextA, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000)\\n }\\n\\n uint64 currBufferIndex;\\n uint40 prevResetIndex;\\n uint40 currResetIndex;\\n assembly {\\n currBufferIndex := and(contextB, 0x000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFF)\\n prevResetIndex := shr(64, and(contextB, 0x00000000000000000000000000000000000000FFFFFFFFFF0000000000000000))\\n currResetIndex := shr(104, and(contextB, 0x0000000000000000000000000000FFFFFFFFFF00000000000000000000000000))\\n }\\n\\n return RingBufferContext({\\n globalIndex: globalIndex,\\n extraData: extraData,\\n currBufferIndex: currBufferIndex,\\n prevResetIndex: prevResetIndex,\\n currResetIndex: currResetIndex\\n });\\n }\\n\\n /**\\n * Retrieves the a buffer from the ring buffer by index.\\n * @param _self Buffer to access.\\n * @param _which Index of the sub buffer to access.\\n * @return Sub buffer for the index.\\n */\\n function getBuffer(\\n RingBuffer storage _self,\\n uint256 _which\\n )\\n internal\\n view\\n returns (\\n Buffer storage\\n )\\n {\\n return _which % 2 == 0 ? _self.bufferA : _self.bufferB;\\n }\\n}\\n\",\"keccak256\":\"0x0c4bb53aba64441b2ec26e7a13de8f04f104bb654e550ccc30db500cac33d2a3\"}},\"version\":1}",
"bytecode": "0x60806040523480156200001157600080fd5b50604051620013f3380380620013f3833981810160405260408110156200003757600080fd5b8151602083018051604051929492938301929190846401000000008211156200005f57600080fd5b9083019060208201858111156200007557600080fd5b82516401000000008111828201881017156200009057600080fd5b82525081516020918201929091019080838360005b83811015620000bf578181015183820152602001620000a5565b50505050905090810190601f168015620000ed5780820380516001836020036101000a031916815260200191505b506040525050600080546001600160a01b0319166001600160a01b038516179055508051620001249060019060208401906200012d565b505050620001d9565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001655760008555620001b0565b82601f106200018057805160ff1916838001178555620001b0565b82800160010185558215620001b0579182015b82811115620001b057825182559160200191906001019062000193565b50620001be929150620001c2565b5090565b5b80821115620001be5760008155600101620001c3565b61120a80620001e96000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80634651d91e1161008c578063b298e36b11610066578063b298e36b14610315578063ccf8f96914610332578063d41c021814610355578063fa9e936c14610378576100cf565b80634651d91e1461025e5780638da5cb5b1461027b5780639507d39a146102f8576100cf565b806314f22255146100d4578063167fd681146101075780631f7b6d32146101325780632015276c1461014c57806329061de214610177578063461a44781461019c575b600080fd5b610105600480360360608110156100ea57600080fd5b508035906020810135906040013564ffffffffff1916610395565b005b6101056004803603604081101561011d57600080fd5b508035906020013564ffffffffff191661048c565b61013a61054c565b60408051918252519081900360200190f35b6101056004803603604081101561016257600080fd5b508035906020013564ffffffffff1916610564565b6101056004803603602081101561018d57600080fd5b503564ffffffffff1916610620565b610242600480360360208110156101b257600080fd5b8101906020810181356401000000008111156101cd57600080fd5b8201836020820111156101df57600080fd5b8035906020019184600183028401116401000000008311171561020157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506106de945050505050565b604080516001600160a01b039092168252519081900360200190f35b6101056004803603602081101561027457600080fd5b50356107ba565b610283610875565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102bd5781810151838201526020016102a5565b50505050905090810190601f1680156102ea5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61013a6004803603602081101561030e57600080fd5b5035610902565b6101056004803603602081101561032b57600080fd5b503561091c565b61033a6109d7565b6040805164ffffffffff199092168252519081900360200190f35b6101056004803603604081101561036b57600080fd5b50803590602001356109e8565b6101056004803603602081101561038e57600080fd5b5035610aa4565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261042b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b820191906000526020600020905b81548152906001019060200180831161040457829003601f168201915b50505050506106de565b6001600160a01b0316336001600160a01b03161461047a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6104876002848484610b59565b505050565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526104ed93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461053c5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610b75565b5050565b60006105586002610cb7565b64ffffffffff16905090565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526105c593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106145760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610ccb565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261068193909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106d05760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610dca565b50565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b8381101561073e578181015183820152602001610726565b50505050905090810190601f16801561076b5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561078857600080fd5b505afa15801561079c573d6000803e3d6000fd5b505050506040513d60208110156107b257600080fd5b505192915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261081b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461086a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610def565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108fa5780601f106108cf576101008083540402835291602001916108fa565b820191906000526020600020905b8154815290600101906020018083116108dd57829003601f168201915b505050505081565b6000610916600264ffffffffff8416610e15565b92915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261097d93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146109cc5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db60028261101e565b60006109e36002611044565b905090565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610a4993909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610a985760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6105486002838361105b565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610b0593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610b545760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b600855565b610b64848483610ccb565b610b6f848383610ccb565b50505050565b6000610b8084611083565b9050806000015164ffffffffff168364ffffffffff16108015610bb55750806060015164ffffffffff168364ffffffffff1610155b610bfd576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610c20826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610c48836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168564ffffffffff161015610c8c576040830180516000190167ffffffffffffffff169052606083015164ffffffffff1660808401525b64ffffffffff8516835264ffffffffff1984166020840152610cae8684611103565b50505050505050565b600080610cc383611083565b519392505050565b6000610cd684611083565b90506000610cfb826040015167ffffffffffffffff16866110e390919063ffffffff16565b8054909150610d0957601081555b8054608083015183510364ffffffffff1610610d80578460060154826080015164ffffffffff161015610d785760408201805160010167ffffffffffffffff169081905260808301805164ffffffffff90811660608601528451169052610d719086906110e3565b9050610d80565b805460020281555b608082015182510364ffffffffff9081166000818152600184810160209081526040909220889055855101909216845264ffffffffff19851691840191909152610cae8684611103565b6000610dd583611083565b64ffffffffff19831660208201529050610b6f8382611103565b6000610dfa83611083565b905061048782826020015185610b759092919063ffffffff16565b600080610e2184611083565b805190915064ffffffffff168310610e77576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610e9a826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610ec2836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168510610f4f576080830151825464ffffffffff9091168603908110610f33576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000908152600190920160205250604090205491506109169050565b6080830151606084015164ffffffffff9182168781039290911610610fb2576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154811115610fff576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154036000908152600190910160205260409020549250610916915050565b600061102983611083565b905061048782826020015185610ccb9092919063ffffffff16565b60008061105083611083565b602001519392505050565b600061106684611083565b9050610b6f8383836020015187610b59909392919063ffffffff16565b61108b611162565b5080546001909101546040805160a08101825264ffffffffff808516825264ffffffffff19909416602082015267ffffffffffffffff8316818301529082901c8316606082015260689190911c909116608082015290565b600060028206156110f757826004016110fc565b826002015b9392505050565b80516020820151604080840151606085015160808601518754600096868117969584901b8517606884901b17959094909390929091871461114257868a555b858a60010154146111555760018a018690555b5050505050505092915050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe4f564d5f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206f776e65722ea264697066735822122037f5f91f3a7302668798afaeee2c0c2d9aad06dfcc80e263efc2cd8f4842eebe64736f6c63430007060033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c80634651d91e1161008c578063b298e36b11610066578063b298e36b14610315578063ccf8f96914610332578063d41c021814610355578063fa9e936c14610378576100cf565b80634651d91e1461025e5780638da5cb5b1461027b5780639507d39a146102f8576100cf565b806314f22255146100d4578063167fd681146101075780631f7b6d32146101325780632015276c1461014c57806329061de214610177578063461a44781461019c575b600080fd5b610105600480360360608110156100ea57600080fd5b508035906020810135906040013564ffffffffff1916610395565b005b6101056004803603604081101561011d57600080fd5b508035906020013564ffffffffff191661048c565b61013a61054c565b60408051918252519081900360200190f35b6101056004803603604081101561016257600080fd5b508035906020013564ffffffffff1916610564565b6101056004803603602081101561018d57600080fd5b503564ffffffffff1916610620565b610242600480360360208110156101b257600080fd5b8101906020810181356401000000008111156101cd57600080fd5b8201836020820111156101df57600080fd5b8035906020019184600183028401116401000000008311171561020157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506106de945050505050565b604080516001600160a01b039092168252519081900360200190f35b6101056004803603602081101561027457600080fd5b50356107ba565b610283610875565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102bd5781810151838201526020016102a5565b50505050905090810190601f1680156102ea5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61013a6004803603602081101561030e57600080fd5b5035610902565b6101056004803603602081101561032b57600080fd5b503561091c565b61033a6109d7565b6040805164ffffffffff199092168252519081900360200190f35b6101056004803603604081101561036b57600080fd5b50803590602001356109e8565b6101056004803603602081101561038e57600080fd5b5035610aa4565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261042b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b820191906000526020600020905b81548152906001019060200180831161040457829003601f168201915b50505050506106de565b6001600160a01b0316336001600160a01b03161461047a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6104876002848484610b59565b505050565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526104ed93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461053c5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610b75565b5050565b60006105586002610cb7565b64ffffffffff16905090565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526105c593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106145760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610ccb565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261068193909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106d05760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610dca565b50565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b8381101561073e578181015183820152602001610726565b50505050905090810190601f16801561076b5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561078857600080fd5b505afa15801561079c573d6000803e3d6000fd5b505050506040513d60208110156107b257600080fd5b505192915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261081b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461086a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610def565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108fa5780601f106108cf576101008083540402835291602001916108fa565b820191906000526020600020905b8154815290600101906020018083116108dd57829003601f168201915b505050505081565b6000610916600264ffffffffff8416610e15565b92915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261097d93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146109cc5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db60028261101e565b60006109e36002611044565b905090565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610a4993909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610a985760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6105486002838361105b565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610b0593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610b545760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b600855565b610b64848483610ccb565b610b6f848383610ccb565b50505050565b6000610b8084611083565b9050806000015164ffffffffff168364ffffffffff16108015610bb55750806060015164ffffffffff168364ffffffffff1610155b610bfd576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610c20826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610c48836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168564ffffffffff161015610c8c576040830180516000190167ffffffffffffffff169052606083015164ffffffffff1660808401525b64ffffffffff8516835264ffffffffff1984166020840152610cae8684611103565b50505050505050565b600080610cc383611083565b519392505050565b6000610cd684611083565b90506000610cfb826040015167ffffffffffffffff16866110e390919063ffffffff16565b8054909150610d0957601081555b8054608083015183510364ffffffffff1610610d80578460060154826080015164ffffffffff161015610d785760408201805160010167ffffffffffffffff169081905260808301805164ffffffffff90811660608601528451169052610d719086906110e3565b9050610d80565b805460020281555b608082015182510364ffffffffff9081166000818152600184810160209081526040909220889055855101909216845264ffffffffff19851691840191909152610cae8684611103565b6000610dd583611083565b64ffffffffff19831660208201529050610b6f8382611103565b6000610dfa83611083565b905061048782826020015185610b759092919063ffffffff16565b600080610e2184611083565b805190915064ffffffffff168310610e77576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610e9a826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610ec2836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168510610f4f576080830151825464ffffffffff9091168603908110610f33576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000908152600190920160205250604090205491506109169050565b6080830151606084015164ffffffffff9182168781039290911610610fb2576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154811115610fff576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154036000908152600190910160205260409020549250610916915050565b600061102983611083565b905061048782826020015185610ccb9092919063ffffffff16565b60008061105083611083565b602001519392505050565b600061106684611083565b9050610b6f8383836020015187610b59909392919063ffffffff16565b61108b611162565b5080546001909101546040805160a08101825264ffffffffff808516825264ffffffffff19909416602082015267ffffffffffffffff8316818301529082901c8316606082015260689190911c909116608082015290565b600060028206156110f757826004016110fc565b826002015b9392505050565b80516020820151604080840151606085015160808601518754600096868117969584901b8517606884901b17959094909390929091871461114257868a555b858a60010154146111555760018a018690555b5050505050505092915050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe4f564d5f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206f776e65722ea264697066735822122037f5f91f3a7302668798afaeee2c0c2d9aad06dfcc80e263efc2cd8f4842eebe64736f6c63430007060033",
"devdoc": {
"kind": "dev",
"methods": {
"constructor": {
"params": {
"_libAddressManager": "Address of the Address Manager.",
"_owner": "Name of the contract that owns this container (will be resolved later)."
}
},
"deleteElementsAfterInclusive(uint256)": {
"params": {
"_index": "Object index to delete from."
}
},
"deleteElementsAfterInclusive(uint256,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_index": "Object index to delete from."
}
},
"get(uint256)": {
"params": {
"_index": "Index of the particular object to access."
},
"returns": {
"_0": "32 byte object value."
}
},
"getGlobalMetadata()": {
"returns": {
"_0": "Container global metadata field."
}
},
"length()": {
"returns": {
"_0": "Number of objects in the container."
}
},
"push(bytes32)": {
"params": {
"_object": "A 32 byte value to insert into the container."
}
},
"push(bytes32,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_object": "A 32 byte value to insert into the container."
}
},
"push2(bytes32,bytes32)": {
"params": {
"_objectA": "First 32 byte value to insert into the container.",
"_objectB": "Second 32 byte value to insert into the container."
}
},
"push2(bytes32,bytes32,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_objectA": "First 32 byte value to insert into the container.",
"_objectB": "Second 32 byte value to insert into the container."
}
},
"setGlobalMetadata(bytes27)": {
"params": {
"_globalMetadata": "New global metadata to set."
}
}
},
"title": "OVM_ChainStorageContainer",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {
"deleteElementsAfterInclusive(uint256)": {
"notice": "Removes all objects after and including a given index."
},
"deleteElementsAfterInclusive(uint256,bytes27)": {
"notice": "Removes all objects after and including a given index. Also allows setting the global metadata field."
},
"get(uint256)": {
"notice": "Retrieves an object from the container."
},
"getGlobalMetadata()": {
"notice": "Retrieves the container's global metadata field."
},
"length()": {
"notice": "Retrieves the number of objects stored in the container."
},
"push(bytes32)": {
"notice": "Pushes an object into the container."
},
"push(bytes32,bytes27)": {
"notice": "Pushes an object into the container. Function allows setting the global metadata since we'll need to touch the \"length\" storage slot anyway, which also contains the global metadata (it's an optimization)."
},
"push2(bytes32,bytes32)": {
"notice": "Pushes two objects into the container at the same time. A useful optimization."
},
"push2(bytes32,bytes32,bytes27)": {
"notice": "Pushes two objects into the container at the same time. Also allows setting the global metadata field."
},
"setGlobalMetadata(bytes27)": {
"notice": "Sets the container's global metadata field. We're using `bytes27` here because we use five bytes to maintain the length of the underlying data structure, meaning we have an extra 27 bytes to store arbitrary data."
},
"setNextOverwritableIndex(uint256)": {
"notice": "Marks an index as overwritable, meaing the underlying buffer can start to write values over any objects before and including the given index."
}
},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 11707,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "libAddressManager",
"offset": 0,
"slot": "0",
"type": "t_contract(Lib_AddressManager)11700"
},
{
"astId": 2888,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "owner",
"offset": 0,
"slot": "1",
"type": "t_string_storage"
},
{
"astId": 2890,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "buffer",
"offset": 0,
"slot": "2",
"type": "t_struct(RingBuffer)16365_storage"
}
],
"types": {
"t_bytes32": {
"encoding": "inplace",
"label": "bytes32",
"numberOfBytes": "32"
},
"t_contract(Lib_AddressManager)11700": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
},
"t_mapping(t_uint256,t_bytes32)": {
"encoding": "mapping",
"key": "t_uint256",
"label": "mapping(uint256 => bytes32)",
"numberOfBytes": "32",
"value": "t_bytes32"
},
"t_string_storage": {
"encoding": "bytes",
"label": "string",
"numberOfBytes": "32"
},
"t_struct(Buffer)16354_storage": {
"encoding": "inplace",
"label": "struct Lib_RingBuffer.Buffer",
"members": [
{
"astId": 16349,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "length",
"offset": 0,
"slot": "0",
"type": "t_uint256"
},
{
"astId": 16353,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "buf",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_uint256,t_bytes32)"
}
],
"numberOfBytes": "64"
},
"t_struct(RingBuffer)16365_storage": {
"encoding": "inplace",
"label": "struct Lib_RingBuffer.RingBuffer",
"members": [
{
"astId": 16356,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "contextA",
"offset": 0,
"slot": "0",
"type": "t_bytes32"
},
{
"astId": 16358,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "contextB",
"offset": 0,
"slot": "1",
"type": "t_bytes32"
},
{
"astId": 16360,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "bufferA",
"offset": 0,
"slot": "2",
"type": "t_struct(Buffer)16354_storage"
},
{
"astId": 16362,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "bufferB",
"offset": 0,
"slot": "4",
"type": "t_struct(Buffer)16354_storage"
},
{
"astId": 16364,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "nextOverwritableIndex",
"offset": 0,
"slot": "6",
"type": "t_uint256"
}
],
"numberOfBytes": "224"
},
"t_uint256": {
"encoding": "inplace",
"label": "uint256",
"numberOfBytes": "32"
}
}
}
}
\ No newline at end of file
{
"address": "0x85f5bDc9C0269D32154fa1CCdbf697B46AF37273",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_libAddressManager",
"type": "address"
},
{
"internalType": "string",
"name": "_owner",
"type": "string"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "deleteElementsAfterInclusive",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "deleteElementsAfterInclusive",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "get",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getGlobalMetadata",
"outputs": [
{
"internalType": "bytes27",
"name": "",
"type": "bytes27"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "length",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_object",
"type": "bytes32"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "push",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_object",
"type": "bytes32"
}
],
"name": "push",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_objectA",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_objectB",
"type": "bytes32"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "push2",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_objectA",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_objectB",
"type": "bytes32"
}
],
"name": "push2",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "resolve",
"outputs": [
{
"internalType": "address",
"name": "_contract",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "setGlobalMetadata",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "setNextOverwritableIndex",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"transactionHash": "0x99b89c2345373c5b66554e90da495293799b15988d76cbddc60ff7ab8e9cb996",
"receipt": {
"to": null,
"from": "0x558ba9b8d78713fbf768c1f8a584485B4003f43F",
"contractAddress": "0xC9DE904214A3496b23E54d7876e4A5CfD4584F49",
"transactionIndex": 0,
"gasUsed": "1103714",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0xc4de8bb6a3be0356605a754b0f0913dc2d1ce2a52dd31480cf90815785cd7e9e",
"transactionHash": "0x99b89c2345373c5b66554e90da495293799b15988d76cbddc60ff7ab8e9cb996",
"logs": [],
"blockNumber": 4573379,
"cumulativeGasUsed": "1103714",
"status": 1,
"byzantium": true
},
"args": [
"0xE630cdf302880783364334455C8352fE0aB5b748",
"OVM_CanonicalTransactionChain"
],
"solcInputHash": "cebcb515c1a9c570d96e0b8f6fd237e2",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_owner\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"deleteElementsAfterInclusive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"deleteElementsAfterInclusive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"get\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGlobalMetadata\",\"outputs\":[{\"internalType\":\"bytes27\",\"name\":\"\",\"type\":\"bytes27\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"length\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_object\",\"type\":\"bytes32\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"push\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_object\",\"type\":\"bytes32\"}],\"name\":\"push\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_objectA\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_objectB\",\"type\":\"bytes32\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"push2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_objectA\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_objectB\",\"type\":\"bytes32\"}],\"name\":\"push2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"setGlobalMetadata\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"setNextOverwritableIndex\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_libAddressManager\":\"Address of the Address Manager.\",\"_owner\":\"Name of the contract that owns this container (will be resolved later).\"}},\"deleteElementsAfterInclusive(uint256)\":{\"params\":{\"_index\":\"Object index to delete from.\"}},\"deleteElementsAfterInclusive(uint256,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_index\":\"Object index to delete from.\"}},\"get(uint256)\":{\"params\":{\"_index\":\"Index of the particular object to access.\"},\"returns\":{\"_0\":\"32 byte object value.\"}},\"getGlobalMetadata()\":{\"returns\":{\"_0\":\"Container global metadata field.\"}},\"length()\":{\"returns\":{\"_0\":\"Number of objects in the container.\"}},\"push(bytes32)\":{\"params\":{\"_object\":\"A 32 byte value to insert into the container.\"}},\"push(bytes32,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_object\":\"A 32 byte value to insert into the container.\"}},\"push2(bytes32,bytes32)\":{\"params\":{\"_objectA\":\"First 32 byte value to insert into the container.\",\"_objectB\":\"Second 32 byte value to insert into the container.\"}},\"push2(bytes32,bytes32,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_objectA\":\"First 32 byte value to insert into the container.\",\"_objectB\":\"Second 32 byte value to insert into the container.\"}},\"setGlobalMetadata(bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata to set.\"}}},\"title\":\"OVM_ChainStorageContainer\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deleteElementsAfterInclusive(uint256)\":{\"notice\":\"Removes all objects after and including a given index.\"},\"deleteElementsAfterInclusive(uint256,bytes27)\":{\"notice\":\"Removes all objects after and including a given index. Also allows setting the global metadata field.\"},\"get(uint256)\":{\"notice\":\"Retrieves an object from the container.\"},\"getGlobalMetadata()\":{\"notice\":\"Retrieves the container's global metadata field.\"},\"length()\":{\"notice\":\"Retrieves the number of objects stored in the container.\"},\"push(bytes32)\":{\"notice\":\"Pushes an object into the container.\"},\"push(bytes32,bytes27)\":{\"notice\":\"Pushes an object into the container. Function allows setting the global metadata since we'll need to touch the \\\"length\\\" storage slot anyway, which also contains the global metadata (it's an optimization).\"},\"push2(bytes32,bytes32)\":{\"notice\":\"Pushes two objects into the container at the same time. A useful optimization.\"},\"push2(bytes32,bytes32,bytes27)\":{\"notice\":\"Pushes two objects into the container at the same time. Also allows setting the global metadata field.\"},\"setGlobalMetadata(bytes27)\":{\"notice\":\"Sets the container's global metadata field. We're using `bytes27` here because we use five bytes to maintain the length of the underlying data structure, meaning we have an extra 27 bytes to store arbitrary data.\"},\"setNextOverwritableIndex(uint256)\":{\"notice\":\"Marks an index as overwritable, meaing the underlying buffer can start to write values over any objects before and including the given index.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol\":\"OVM_ChainStorageContainer\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol\":{\"content\":\"pragma solidity ^0.7.0;\\n\\n/* Library Imports */\\nimport { Lib_RingBuffer } from \\\"../../libraries/utils/Lib_RingBuffer.sol\\\";\\nimport { Lib_AddressResolver } from \\\"../../libraries/resolver/Lib_AddressResolver.sol\\\";\\n\\n/* Interface Imports */\\nimport { iOVM_ChainStorageContainer } from \\\"../../iOVM/chain/iOVM_ChainStorageContainer.sol\\\";\\n\\n/**\\n * @title OVM_ChainStorageContainer\\n */\\ncontract OVM_ChainStorageContainer is iOVM_ChainStorageContainer, Lib_AddressResolver {\\n\\n /*************\\n * Libraries *\\n *************/\\n\\n using Lib_RingBuffer for Lib_RingBuffer.RingBuffer;\\n\\n\\n /*************\\n * Variables *\\n *************/\\n\\n string public owner;\\n Lib_RingBuffer.RingBuffer internal buffer;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n \\n /**\\n * @param _libAddressManager Address of the Address Manager.\\n * @param _owner Name of the contract that owns this container (will be resolved later).\\n */\\n constructor(\\n address _libAddressManager,\\n string memory _owner\\n )\\n Lib_AddressResolver(_libAddressManager)\\n {\\n owner = _owner;\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n \\n modifier onlyOwner() {\\n require(\\n msg.sender == resolve(owner),\\n \\\"OVM_ChainStorageContainer: Function can only be called by the owner.\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function setGlobalMetadata(\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n return buffer.setExtraData(_globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function getGlobalMetadata()\\n override\\n public\\n view\\n returns (\\n bytes27\\n )\\n {\\n return buffer.getExtraData();\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function length()\\n override\\n public\\n view\\n returns (\\n uint256\\n )\\n {\\n return uint256(buffer.getLength());\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push(\\n bytes32 _object\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push(_object);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push(\\n bytes32 _object,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push(_object, _globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push2(_objectA, _objectB);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push2(_objectA, _objectB, _globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function get(\\n uint256 _index\\n )\\n override\\n public\\n view\\n returns (\\n bytes32\\n )\\n {\\n return buffer.get(uint40(_index));\\n }\\n \\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.deleteElementsAfterInclusive(\\n uint40(_index)\\n );\\n }\\n \\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.deleteElementsAfterInclusive(\\n uint40(_index),\\n _globalMetadata\\n );\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function setNextOverwritableIndex(\\n uint256 _index\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.nextOverwritableIndex = _index;\\n }\\n}\\n\",\"keccak256\":\"0xc722e9528988810bd754002dfe3923bc9ac9252c1d981c4803fd5053603bfb11\"},\"contracts/optimistic-ethereum/iOVM/chain/iOVM_ChainStorageContainer.sol\":{\"content\":\"pragma solidity ^0.7.0;\\n\\n/**\\n * @title iOVM_ChainStorageContainer\\n */\\ninterface iOVM_ChainStorageContainer {\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Sets the container's global metadata field. We're using `bytes27` here because we use five\\n * bytes to maintain the length of the underlying data structure, meaning we have an extra\\n * 27 bytes to store arbitrary data.\\n * @param _globalMetadata New global metadata to set.\\n */\\n function setGlobalMetadata(\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Retrieves the container's global metadata field.\\n * @return Container global metadata field.\\n */\\n function getGlobalMetadata()\\n external\\n view\\n returns (\\n bytes27\\n );\\n\\n /**\\n * Retrieves the number of objects stored in the container.\\n * @return Number of objects in the container.\\n */\\n function length()\\n external\\n view\\n returns (\\n uint256\\n );\\n\\n /**\\n * Pushes an object into the container.\\n * @param _object A 32 byte value to insert into the container.\\n */\\n function push(\\n bytes32 _object\\n )\\n external;\\n\\n /**\\n * Pushes an object into the container. Function allows setting the global metadata since\\n * we'll need to touch the \\\"length\\\" storage slot anyway, which also contains the global\\n * metadata (it's an optimization).\\n * @param _object A 32 byte value to insert into the container.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function push(\\n bytes32 _object,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Pushes two objects into the container at the same time. A useful optimization.\\n * @param _objectA First 32 byte value to insert into the container.\\n * @param _objectB Second 32 byte value to insert into the container.\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB\\n )\\n external;\\n\\n /**\\n * Pushes two objects into the container at the same time. Also allows setting the global\\n * metadata field.\\n * @param _objectA First 32 byte value to insert into the container.\\n * @param _objectB Second 32 byte value to insert into the container.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Retrieves an object from the container.\\n * @param _index Index of the particular object to access.\\n * @return 32 byte object value.\\n */\\n function get(\\n uint256 _index\\n )\\n external\\n view\\n returns (\\n bytes32\\n );\\n\\n /**\\n * Removes all objects after and including a given index.\\n * @param _index Object index to delete from.\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index\\n )\\n external;\\n\\n /**\\n * Removes all objects after and including a given index. Also allows setting the global\\n * metadata field.\\n * @param _index Object index to delete from.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Marks an index as overwritable, meaing the underlying buffer can start to write values over\\n * any objects before and including the given index.\\n */\\n function setNextOverwritableIndex(\\n uint256 _index\\n )\\n external;\\n}\\n\",\"keccak256\":\"0xcfca7da85b35d94c27581c2460b0d48fd0cc51fa72670cc7a2f7f760fb21a2f0\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0xdf802e1cc6474df913626991e9fca3835c620a519f397afe04bf9c260e723257\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_AddressResolver\\n */\\ncontract Lib_AddressResolver {\\n\\n /*******************************************\\n * Contract Variables: Contract References *\\n *******************************************/\\n\\n Lib_AddressManager internal libAddressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n */\\n constructor(\\n address _libAddressManager\\n ) public {\\n libAddressManager = Lib_AddressManager(_libAddressManager);\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function resolve(\\n string memory _name\\n )\\n public\\n view\\n returns (\\n address _contract\\n )\\n {\\n return libAddressManager.getAddress(_name);\\n }\\n}\\n\",\"keccak256\":\"0xf3b9d78b309ddeec259ce3e0e1cfdef3ca40938e9a81971b28ce2b8ea327f533\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() internal {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xe0409fbd236d16ca6be439d9d97dd36d0d9a0697ee0062d49588b9d29c248e47\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/utils/Lib_RingBuffer.sol\":{\"content\":\"pragma solidity ^0.7.0;\\n\\nlibrary Lib_RingBuffer {\\n using Lib_RingBuffer for RingBuffer;\\n\\n /***********\\n * Structs *\\n ***********/\\n\\n struct Buffer {\\n uint256 length;\\n mapping (uint256 => bytes32) buf;\\n }\\n\\n struct RingBuffer {\\n bytes32 contextA;\\n bytes32 contextB;\\n Buffer bufferA;\\n Buffer bufferB;\\n uint256 nextOverwritableIndex;\\n }\\n\\n struct RingBufferContext {\\n // contextA\\n uint40 globalIndex;\\n bytes27 extraData;\\n\\n // contextB\\n uint64 currBufferIndex;\\n uint40 prevResetIndex;\\n uint40 currResetIndex;\\n }\\n\\n\\n /*************\\n * Constants *\\n *************/\\n\\n uint256 constant MIN_CAPACITY = 16;\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * Pushes a single element to the buffer.\\n * @param _self Buffer to access.\\n * @param _value Value to push to the buffer.\\n * @param _extraData Optional global extra data.\\n */\\n function push(\\n RingBuffer storage _self,\\n bytes32 _value,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n\\n // Set a minimum capacity.\\n if (currBuffer.length == 0) {\\n currBuffer.length = MIN_CAPACITY;\\n }\\n\\n // Check if we need to expand the buffer.\\n if (ctx.globalIndex - ctx.currResetIndex >= currBuffer.length) {\\n if (ctx.currResetIndex < _self.nextOverwritableIndex) {\\n // We're going to overwrite the inactive buffer.\\n // Bump the buffer index, reset the delete offset, and set our reset indices.\\n ctx.currBufferIndex++;\\n ctx.prevResetIndex = ctx.currResetIndex;\\n ctx.currResetIndex = ctx.globalIndex;\\n\\n // Swap over to the next buffer.\\n currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n } else {\\n // We're not overwriting yet, double the length of the current buffer.\\n currBuffer.length *= 2;\\n }\\n }\\n\\n // Index to write to is the difference of the global and reset indices.\\n uint256 writeHead = ctx.globalIndex - ctx.currResetIndex;\\n currBuffer.buf[writeHead] = _value;\\n\\n // Bump the global index and insert our extra data, then save the context.\\n ctx.globalIndex++;\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Pushes a single element to the buffer.\\n * @param _self Buffer to access.\\n * @param _value Value to push to the buffer.\\n */\\n function push(\\n RingBuffer storage _self,\\n bytes32 _value\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n \\n _self.push(\\n _value,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Pushes a two elements to the buffer.\\n * @param _self Buffer to access.\\n * @param _valueA First value to push to the buffer.\\n * @param _valueA Second value to push to the buffer.\\n * @param _extraData Optional global extra data.\\n */\\n function push2(\\n RingBuffer storage _self,\\n bytes32 _valueA,\\n bytes32 _valueB,\\n bytes27 _extraData\\n )\\n internal\\n {\\n _self.push(_valueA, _extraData);\\n _self.push(_valueB, _extraData);\\n }\\n\\n /**\\n * Pushes a two elements to the buffer.\\n * @param _self Buffer to access.\\n * @param _valueA First value to push to the buffer.\\n * @param _valueA Second value to push to the buffer.\\n */\\n function push2(\\n RingBuffer storage _self,\\n bytes32 _valueA,\\n bytes32 _valueB\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n _self.push2(\\n _valueA,\\n _valueB,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Retrieves an element from the buffer.\\n * @param _self Buffer to access.\\n * @param _index Element index to retrieve.\\n * @return Value of the element at the given index.\\n */\\n function get(\\n RingBuffer storage _self,\\n uint256 _index\\n )\\n internal\\n view\\n returns (\\n bytes32 \\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n require(\\n _index < ctx.globalIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n Buffer storage prevBuffer = _self.getBuffer(ctx.currBufferIndex + 1);\\n\\n if (_index >= ctx.currResetIndex) {\\n // We're trying to load an element from the current buffer.\\n // Relative index is just the difference from the reset index.\\n uint256 relativeIndex = _index - ctx.currResetIndex;\\n\\n // Shouldn't happen but why not check.\\n require(\\n relativeIndex < currBuffer.length,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n return currBuffer.buf[relativeIndex];\\n } else {\\n // We're trying to load an element from the previous buffer.\\n // Relative index is the difference from the reset index in the other direction.\\n uint256 relativeIndex = ctx.currResetIndex - _index;\\n\\n // Condition only fails in the case that we deleted and flipped buffers.\\n require(\\n ctx.currResetIndex > ctx.prevResetIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n // Make sure we're not trying to read beyond the array.\\n require(\\n relativeIndex <= prevBuffer.length,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n return prevBuffer.buf[prevBuffer.length - relativeIndex];\\n }\\n }\\n\\n /**\\n * Deletes all elements after (and including) a given index.\\n * @param _self Buffer to access.\\n * @param _index Index of the element to delete from (inclusive).\\n * @param _extraData Optional global extra data.\\n */\\n function deleteElementsAfterInclusive(\\n RingBuffer storage _self,\\n uint40 _index,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n require(\\n _index < ctx.globalIndex && _index >= ctx.prevResetIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n Buffer storage prevBuffer = _self.getBuffer(ctx.currBufferIndex + 1);\\n\\n if (_index < ctx.currResetIndex) {\\n // We're switching back to the previous buffer.\\n // Reduce the buffer index, set the current reset index back to match the previous one.\\n // We use the equality of these two values to prevent reading beyond this buffer.\\n ctx.currBufferIndex--;\\n ctx.currResetIndex = ctx.prevResetIndex;\\n }\\n\\n // Set our global index and extra data, save the context.\\n ctx.globalIndex = _index;\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Deletes all elements after (and including) a given index.\\n * @param _self Buffer to access.\\n * @param _index Index of the element to delete from (inclusive).\\n */\\n function deleteElementsAfterInclusive(\\n RingBuffer storage _self,\\n uint40 _index\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n _self.deleteElementsAfterInclusive(\\n _index,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Retrieves the current global index.\\n * @param _self Buffer to access.\\n * @return Current global index.\\n */\\n function getLength(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n uint40\\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n return ctx.globalIndex;\\n }\\n\\n /**\\n * Changes current global extra data.\\n * @param _self Buffer to access.\\n * @param _extraData New global extra data.\\n */\\n function setExtraData(\\n RingBuffer storage _self,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Retrieves the current global extra data.\\n * @param _self Buffer to access.\\n * @return Current global extra data.\\n */\\n function getExtraData(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n bytes27\\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n return ctx.extraData;\\n }\\n\\n /**\\n * Sets the current ring buffer context.\\n * @param _self Buffer to access.\\n * @param _ctx Current ring buffer context.\\n */\\n function setContext(\\n RingBuffer storage _self,\\n RingBufferContext memory _ctx\\n )\\n internal\\n returns (\\n bytes32\\n )\\n {\\n bytes32 contextA;\\n bytes32 contextB;\\n\\n uint40 globalIndex = _ctx.globalIndex;\\n bytes27 extraData = _ctx.extraData;\\n assembly {\\n contextA := globalIndex\\n contextA := or(contextA, extraData)\\n }\\n\\n uint64 currBufferIndex = _ctx.currBufferIndex;\\n uint40 prevResetIndex = _ctx.prevResetIndex;\\n uint40 currResetIndex = _ctx.currResetIndex;\\n assembly {\\n contextB := currBufferIndex\\n contextB := or(contextB, shl(64, prevResetIndex))\\n contextB := or(contextB, shl(104, currResetIndex))\\n }\\n\\n if (_self.contextA != contextA) {\\n _self.contextA = contextA;\\n }\\n\\n if (_self.contextB != contextB) {\\n _self.contextB = contextB;\\n }\\n }\\n\\n /**\\n * Retrieves the current ring buffer context.\\n * @param _self Buffer to access.\\n * @return Current ring buffer context.\\n */\\n function getContext(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n RingBufferContext memory\\n )\\n {\\n bytes32 contextA = _self.contextA;\\n bytes32 contextB = _self.contextB;\\n\\n uint40 globalIndex;\\n bytes27 extraData;\\n assembly {\\n globalIndex := and(contextA, 0x000000000000000000000000000000000000000000000000000000FFFFFFFFFF)\\n extraData := and(contextA, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000)\\n }\\n\\n uint64 currBufferIndex;\\n uint40 prevResetIndex;\\n uint40 currResetIndex;\\n assembly {\\n currBufferIndex := and(contextB, 0x000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFF)\\n prevResetIndex := shr(64, and(contextB, 0x00000000000000000000000000000000000000FFFFFFFFFF0000000000000000))\\n currResetIndex := shr(104, and(contextB, 0x0000000000000000000000000000FFFFFFFFFF00000000000000000000000000))\\n }\\n\\n return RingBufferContext({\\n globalIndex: globalIndex,\\n extraData: extraData,\\n currBufferIndex: currBufferIndex,\\n prevResetIndex: prevResetIndex,\\n currResetIndex: currResetIndex\\n });\\n }\\n\\n /**\\n * Retrieves the a buffer from the ring buffer by index.\\n * @param _self Buffer to access.\\n * @param _which Index of the sub buffer to access.\\n * @return Sub buffer for the index.\\n */\\n function getBuffer(\\n RingBuffer storage _self,\\n uint256 _which\\n )\\n internal\\n view\\n returns (\\n Buffer storage\\n )\\n {\\n return _which % 2 == 0 ? _self.bufferA : _self.bufferB;\\n }\\n}\\n\",\"keccak256\":\"0x0c4bb53aba64441b2ec26e7a13de8f04f104bb654e550ccc30db500cac33d2a3\"}},\"version\":1}",
"bytecode": "0x60806040523480156200001157600080fd5b50604051620013f3380380620013f3833981810160405260408110156200003757600080fd5b8151602083018051604051929492938301929190846401000000008211156200005f57600080fd5b9083019060208201858111156200007557600080fd5b82516401000000008111828201881017156200009057600080fd5b82525081516020918201929091019080838360005b83811015620000bf578181015183820152602001620000a5565b50505050905090810190601f168015620000ed5780820380516001836020036101000a031916815260200191505b506040525050600080546001600160a01b0319166001600160a01b038516179055508051620001249060019060208401906200012d565b505050620001d9565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001655760008555620001b0565b82601f106200018057805160ff1916838001178555620001b0565b82800160010185558215620001b0579182015b82811115620001b057825182559160200191906001019062000193565b50620001be929150620001c2565b5090565b5b80821115620001be5760008155600101620001c3565b61120a80620001e96000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80634651d91e1161008c578063b298e36b11610066578063b298e36b14610315578063ccf8f96914610332578063d41c021814610355578063fa9e936c14610378576100cf565b80634651d91e1461025e5780638da5cb5b1461027b5780639507d39a146102f8576100cf565b806314f22255146100d4578063167fd681146101075780631f7b6d32146101325780632015276c1461014c57806329061de214610177578063461a44781461019c575b600080fd5b610105600480360360608110156100ea57600080fd5b508035906020810135906040013564ffffffffff1916610395565b005b6101056004803603604081101561011d57600080fd5b508035906020013564ffffffffff191661048c565b61013a61054c565b60408051918252519081900360200190f35b6101056004803603604081101561016257600080fd5b508035906020013564ffffffffff1916610564565b6101056004803603602081101561018d57600080fd5b503564ffffffffff1916610620565b610242600480360360208110156101b257600080fd5b8101906020810181356401000000008111156101cd57600080fd5b8201836020820111156101df57600080fd5b8035906020019184600183028401116401000000008311171561020157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506106de945050505050565b604080516001600160a01b039092168252519081900360200190f35b6101056004803603602081101561027457600080fd5b50356107ba565b610283610875565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102bd5781810151838201526020016102a5565b50505050905090810190601f1680156102ea5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61013a6004803603602081101561030e57600080fd5b5035610902565b6101056004803603602081101561032b57600080fd5b503561091c565b61033a6109d7565b6040805164ffffffffff199092168252519081900360200190f35b6101056004803603604081101561036b57600080fd5b50803590602001356109e8565b6101056004803603602081101561038e57600080fd5b5035610aa4565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261042b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b820191906000526020600020905b81548152906001019060200180831161040457829003601f168201915b50505050506106de565b6001600160a01b0316336001600160a01b03161461047a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6104876002848484610b59565b505050565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526104ed93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461053c5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610b75565b5050565b60006105586002610cb7565b64ffffffffff16905090565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526105c593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106145760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610ccb565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261068193909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106d05760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610dca565b50565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b8381101561073e578181015183820152602001610726565b50505050905090810190601f16801561076b5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561078857600080fd5b505afa15801561079c573d6000803e3d6000fd5b505050506040513d60208110156107b257600080fd5b505192915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261081b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461086a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610def565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108fa5780601f106108cf576101008083540402835291602001916108fa565b820191906000526020600020905b8154815290600101906020018083116108dd57829003601f168201915b505050505081565b6000610916600264ffffffffff8416610e15565b92915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261097d93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146109cc5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db60028261101e565b60006109e36002611044565b905090565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610a4993909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610a985760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6105486002838361105b565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610b0593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610b545760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b600855565b610b64848483610ccb565b610b6f848383610ccb565b50505050565b6000610b8084611083565b9050806000015164ffffffffff168364ffffffffff16108015610bb55750806060015164ffffffffff168364ffffffffff1610155b610bfd576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610c20826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610c48836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168564ffffffffff161015610c8c576040830180516000190167ffffffffffffffff169052606083015164ffffffffff1660808401525b64ffffffffff8516835264ffffffffff1984166020840152610cae8684611103565b50505050505050565b600080610cc383611083565b519392505050565b6000610cd684611083565b90506000610cfb826040015167ffffffffffffffff16866110e390919063ffffffff16565b8054909150610d0957601081555b8054608083015183510364ffffffffff1610610d80578460060154826080015164ffffffffff161015610d785760408201805160010167ffffffffffffffff169081905260808301805164ffffffffff90811660608601528451169052610d719086906110e3565b9050610d80565b805460020281555b608082015182510364ffffffffff9081166000818152600184810160209081526040909220889055855101909216845264ffffffffff19851691840191909152610cae8684611103565b6000610dd583611083565b64ffffffffff19831660208201529050610b6f8382611103565b6000610dfa83611083565b905061048782826020015185610b759092919063ffffffff16565b600080610e2184611083565b805190915064ffffffffff168310610e77576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610e9a826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610ec2836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168510610f4f576080830151825464ffffffffff9091168603908110610f33576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000908152600190920160205250604090205491506109169050565b6080830151606084015164ffffffffff9182168781039290911610610fb2576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154811115610fff576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154036000908152600190910160205260409020549250610916915050565b600061102983611083565b905061048782826020015185610ccb9092919063ffffffff16565b60008061105083611083565b602001519392505050565b600061106684611083565b9050610b6f8383836020015187610b59909392919063ffffffff16565b61108b611162565b5080546001909101546040805160a08101825264ffffffffff808516825264ffffffffff19909416602082015267ffffffffffffffff8316818301529082901c8316606082015260689190911c909116608082015290565b600060028206156110f757826004016110fc565b826002015b9392505050565b80516020820151604080840151606085015160808601518754600096868117969584901b8517606884901b17959094909390929091871461114257868a555b858a60010154146111555760018a018690555b5050505050505092915050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe4f564d5f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206f776e65722ea264697066735822122037f5f91f3a7302668798afaeee2c0c2d9aad06dfcc80e263efc2cd8f4842eebe64736f6c63430007060033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c80634651d91e1161008c578063b298e36b11610066578063b298e36b14610315578063ccf8f96914610332578063d41c021814610355578063fa9e936c14610378576100cf565b80634651d91e1461025e5780638da5cb5b1461027b5780639507d39a146102f8576100cf565b806314f22255146100d4578063167fd681146101075780631f7b6d32146101325780632015276c1461014c57806329061de214610177578063461a44781461019c575b600080fd5b610105600480360360608110156100ea57600080fd5b508035906020810135906040013564ffffffffff1916610395565b005b6101056004803603604081101561011d57600080fd5b508035906020013564ffffffffff191661048c565b61013a61054c565b60408051918252519081900360200190f35b6101056004803603604081101561016257600080fd5b508035906020013564ffffffffff1916610564565b6101056004803603602081101561018d57600080fd5b503564ffffffffff1916610620565b610242600480360360208110156101b257600080fd5b8101906020810181356401000000008111156101cd57600080fd5b8201836020820111156101df57600080fd5b8035906020019184600183028401116401000000008311171561020157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506106de945050505050565b604080516001600160a01b039092168252519081900360200190f35b6101056004803603602081101561027457600080fd5b50356107ba565b610283610875565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102bd5781810151838201526020016102a5565b50505050905090810190601f1680156102ea5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61013a6004803603602081101561030e57600080fd5b5035610902565b6101056004803603602081101561032b57600080fd5b503561091c565b61033a6109d7565b6040805164ffffffffff199092168252519081900360200190f35b6101056004803603604081101561036b57600080fd5b50803590602001356109e8565b6101056004803603602081101561038e57600080fd5b5035610aa4565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261042b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b820191906000526020600020905b81548152906001019060200180831161040457829003601f168201915b50505050506106de565b6001600160a01b0316336001600160a01b03161461047a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6104876002848484610b59565b505050565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526104ed93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461053c5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610b75565b5050565b60006105586002610cb7565b64ffffffffff16905090565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526105c593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106145760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610ccb565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261068193909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106d05760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610dca565b50565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b8381101561073e578181015183820152602001610726565b50505050905090810190601f16801561076b5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561078857600080fd5b505afa15801561079c573d6000803e3d6000fd5b505050506040513d60208110156107b257600080fd5b505192915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261081b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461086a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610def565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108fa5780601f106108cf576101008083540402835291602001916108fa565b820191906000526020600020905b8154815290600101906020018083116108dd57829003601f168201915b505050505081565b6000610916600264ffffffffff8416610e15565b92915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261097d93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146109cc5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db60028261101e565b60006109e36002611044565b905090565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610a4993909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610a985760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6105486002838361105b565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610b0593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610b545760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b600855565b610b64848483610ccb565b610b6f848383610ccb565b50505050565b6000610b8084611083565b9050806000015164ffffffffff168364ffffffffff16108015610bb55750806060015164ffffffffff168364ffffffffff1610155b610bfd576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610c20826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610c48836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168564ffffffffff161015610c8c576040830180516000190167ffffffffffffffff169052606083015164ffffffffff1660808401525b64ffffffffff8516835264ffffffffff1984166020840152610cae8684611103565b50505050505050565b600080610cc383611083565b519392505050565b6000610cd684611083565b90506000610cfb826040015167ffffffffffffffff16866110e390919063ffffffff16565b8054909150610d0957601081555b8054608083015183510364ffffffffff1610610d80578460060154826080015164ffffffffff161015610d785760408201805160010167ffffffffffffffff169081905260808301805164ffffffffff90811660608601528451169052610d719086906110e3565b9050610d80565b805460020281555b608082015182510364ffffffffff9081166000818152600184810160209081526040909220889055855101909216845264ffffffffff19851691840191909152610cae8684611103565b6000610dd583611083565b64ffffffffff19831660208201529050610b6f8382611103565b6000610dfa83611083565b905061048782826020015185610b759092919063ffffffff16565b600080610e2184611083565b805190915064ffffffffff168310610e77576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610e9a826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610ec2836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168510610f4f576080830151825464ffffffffff9091168603908110610f33576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000908152600190920160205250604090205491506109169050565b6080830151606084015164ffffffffff9182168781039290911610610fb2576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154811115610fff576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154036000908152600190910160205260409020549250610916915050565b600061102983611083565b905061048782826020015185610ccb9092919063ffffffff16565b60008061105083611083565b602001519392505050565b600061106684611083565b9050610b6f8383836020015187610b59909392919063ffffffff16565b61108b611162565b5080546001909101546040805160a08101825264ffffffffff808516825264ffffffffff19909416602082015267ffffffffffffffff8316818301529082901c8316606082015260689190911c909116608082015290565b600060028206156110f757826004016110fc565b826002015b9392505050565b80516020820151604080840151606085015160808601518754600096868117969584901b8517606884901b17959094909390929091871461114257868a555b858a60010154146111555760018a018690555b5050505050505092915050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe4f564d5f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206f776e65722ea264697066735822122037f5f91f3a7302668798afaeee2c0c2d9aad06dfcc80e263efc2cd8f4842eebe64736f6c63430007060033",
"devdoc": {
"kind": "dev",
"methods": {
"constructor": {
"params": {
"_libAddressManager": "Address of the Address Manager.",
"_owner": "Name of the contract that owns this container (will be resolved later)."
}
},
"deleteElementsAfterInclusive(uint256)": {
"params": {
"_index": "Object index to delete from."
}
},
"deleteElementsAfterInclusive(uint256,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_index": "Object index to delete from."
}
},
"get(uint256)": {
"params": {
"_index": "Index of the particular object to access."
},
"returns": {
"_0": "32 byte object value."
}
},
"getGlobalMetadata()": {
"returns": {
"_0": "Container global metadata field."
}
},
"length()": {
"returns": {
"_0": "Number of objects in the container."
}
},
"push(bytes32)": {
"params": {
"_object": "A 32 byte value to insert into the container."
}
},
"push(bytes32,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_object": "A 32 byte value to insert into the container."
}
},
"push2(bytes32,bytes32)": {
"params": {
"_objectA": "First 32 byte value to insert into the container.",
"_objectB": "Second 32 byte value to insert into the container."
}
},
"push2(bytes32,bytes32,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_objectA": "First 32 byte value to insert into the container.",
"_objectB": "Second 32 byte value to insert into the container."
}
},
"setGlobalMetadata(bytes27)": {
"params": {
"_globalMetadata": "New global metadata to set."
}
}
},
"title": "OVM_ChainStorageContainer",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {
"deleteElementsAfterInclusive(uint256)": {
"notice": "Removes all objects after and including a given index."
},
"deleteElementsAfterInclusive(uint256,bytes27)": {
"notice": "Removes all objects after and including a given index. Also allows setting the global metadata field."
},
"get(uint256)": {
"notice": "Retrieves an object from the container."
},
"getGlobalMetadata()": {
"notice": "Retrieves the container's global metadata field."
},
"length()": {
"notice": "Retrieves the number of objects stored in the container."
},
"push(bytes32)": {
"notice": "Pushes an object into the container."
},
"push(bytes32,bytes27)": {
"notice": "Pushes an object into the container. Function allows setting the global metadata since we'll need to touch the \"length\" storage slot anyway, which also contains the global metadata (it's an optimization)."
},
"push2(bytes32,bytes32)": {
"notice": "Pushes two objects into the container at the same time. A useful optimization."
},
"push2(bytes32,bytes32,bytes27)": {
"notice": "Pushes two objects into the container at the same time. Also allows setting the global metadata field."
},
"setGlobalMetadata(bytes27)": {
"notice": "Sets the container's global metadata field. We're using `bytes27` here because we use five bytes to maintain the length of the underlying data structure, meaning we have an extra 27 bytes to store arbitrary data."
},
"setNextOverwritableIndex(uint256)": {
"notice": "Marks an index as overwritable, meaing the underlying buffer can start to write values over any objects before and including the given index."
}
},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 11707,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "libAddressManager",
"offset": 0,
"slot": "0",
"type": "t_contract(Lib_AddressManager)11700"
},
{
"astId": 2888,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "owner",
"offset": 0,
"slot": "1",
"type": "t_string_storage"
},
{
"astId": 2890,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "buffer",
"offset": 0,
"slot": "2",
"type": "t_struct(RingBuffer)16365_storage"
}
],
"types": {
"t_bytes32": {
"encoding": "inplace",
"label": "bytes32",
"numberOfBytes": "32"
},
"t_contract(Lib_AddressManager)11700": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
},
"t_mapping(t_uint256,t_bytes32)": {
"encoding": "mapping",
"key": "t_uint256",
"label": "mapping(uint256 => bytes32)",
"numberOfBytes": "32",
"value": "t_bytes32"
},
"t_string_storage": {
"encoding": "bytes",
"label": "string",
"numberOfBytes": "32"
},
"t_struct(Buffer)16354_storage": {
"encoding": "inplace",
"label": "struct Lib_RingBuffer.Buffer",
"members": [
{
"astId": 16349,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "length",
"offset": 0,
"slot": "0",
"type": "t_uint256"
},
{
"astId": 16353,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "buf",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_uint256,t_bytes32)"
}
],
"numberOfBytes": "64"
},
"t_struct(RingBuffer)16365_storage": {
"encoding": "inplace",
"label": "struct Lib_RingBuffer.RingBuffer",
"members": [
{
"astId": 16356,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "contextA",
"offset": 0,
"slot": "0",
"type": "t_bytes32"
},
{
"astId": 16358,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "contextB",
"offset": 0,
"slot": "1",
"type": "t_bytes32"
},
{
"astId": 16360,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "bufferA",
"offset": 0,
"slot": "2",
"type": "t_struct(Buffer)16354_storage"
},
{
"astId": 16362,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "bufferB",
"offset": 0,
"slot": "4",
"type": "t_struct(Buffer)16354_storage"
},
{
"astId": 16364,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "nextOverwritableIndex",
"offset": 0,
"slot": "6",
"type": "t_uint256"
}
],
"numberOfBytes": "224"
},
"t_uint256": {
"encoding": "inplace",
"label": "uint256",
"numberOfBytes": "32"
}
}
}
}
\ No newline at end of file
{
"address": "0x2c68C92992c516b7Bdd816cc471938025672fd7a",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_libAddressManager",
"type": "address"
},
{
"internalType": "string",
"name": "_owner",
"type": "string"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "deleteElementsAfterInclusive",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "deleteElementsAfterInclusive",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "get",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getGlobalMetadata",
"outputs": [
{
"internalType": "bytes27",
"name": "",
"type": "bytes27"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "length",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_object",
"type": "bytes32"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "push",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_object",
"type": "bytes32"
}
],
"name": "push",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_objectA",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_objectB",
"type": "bytes32"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "push2",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_objectA",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_objectB",
"type": "bytes32"
}
],
"name": "push2",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "resolve",
"outputs": [
{
"internalType": "address",
"name": "_contract",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "setGlobalMetadata",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "setNextOverwritableIndex",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"transactionHash": "0x5168f58ec0e907689b4729909da455ae3f39f09f6808faafde219c910e6ef404",
"receipt": {
"to": null,
"from": "0x558ba9b8d78713fbf768c1f8a584485B4003f43F",
"contractAddress": "0x02A1e0C8d29Bf76989F18D56cd502Eba0AC0D212",
"transactionIndex": 1,
"gasUsed": "1103654",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x0a7b99f8dfb069836b98855e10f4febe0718604be13cfe614132e592cf0a134e",
"transactionHash": "0x5168f58ec0e907689b4729909da455ae3f39f09f6808faafde219c910e6ef404",
"logs": [],
"blockNumber": 4573381,
"cumulativeGasUsed": "1128075",
"status": 1,
"byzantium": true
},
"args": [
"0xE630cdf302880783364334455C8352fE0aB5b748",
"OVM_StateCommitmentChain"
],
"solcInputHash": "cebcb515c1a9c570d96e0b8f6fd237e2",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_owner\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"deleteElementsAfterInclusive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"deleteElementsAfterInclusive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"get\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGlobalMetadata\",\"outputs\":[{\"internalType\":\"bytes27\",\"name\":\"\",\"type\":\"bytes27\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"length\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_object\",\"type\":\"bytes32\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"push\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_object\",\"type\":\"bytes32\"}],\"name\":\"push\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_objectA\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_objectB\",\"type\":\"bytes32\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"push2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_objectA\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_objectB\",\"type\":\"bytes32\"}],\"name\":\"push2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"setGlobalMetadata\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"setNextOverwritableIndex\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_libAddressManager\":\"Address of the Address Manager.\",\"_owner\":\"Name of the contract that owns this container (will be resolved later).\"}},\"deleteElementsAfterInclusive(uint256)\":{\"params\":{\"_index\":\"Object index to delete from.\"}},\"deleteElementsAfterInclusive(uint256,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_index\":\"Object index to delete from.\"}},\"get(uint256)\":{\"params\":{\"_index\":\"Index of the particular object to access.\"},\"returns\":{\"_0\":\"32 byte object value.\"}},\"getGlobalMetadata()\":{\"returns\":{\"_0\":\"Container global metadata field.\"}},\"length()\":{\"returns\":{\"_0\":\"Number of objects in the container.\"}},\"push(bytes32)\":{\"params\":{\"_object\":\"A 32 byte value to insert into the container.\"}},\"push(bytes32,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_object\":\"A 32 byte value to insert into the container.\"}},\"push2(bytes32,bytes32)\":{\"params\":{\"_objectA\":\"First 32 byte value to insert into the container.\",\"_objectB\":\"Second 32 byte value to insert into the container.\"}},\"push2(bytes32,bytes32,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_objectA\":\"First 32 byte value to insert into the container.\",\"_objectB\":\"Second 32 byte value to insert into the container.\"}},\"setGlobalMetadata(bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata to set.\"}}},\"title\":\"OVM_ChainStorageContainer\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deleteElementsAfterInclusive(uint256)\":{\"notice\":\"Removes all objects after and including a given index.\"},\"deleteElementsAfterInclusive(uint256,bytes27)\":{\"notice\":\"Removes all objects after and including a given index. Also allows setting the global metadata field.\"},\"get(uint256)\":{\"notice\":\"Retrieves an object from the container.\"},\"getGlobalMetadata()\":{\"notice\":\"Retrieves the container's global metadata field.\"},\"length()\":{\"notice\":\"Retrieves the number of objects stored in the container.\"},\"push(bytes32)\":{\"notice\":\"Pushes an object into the container.\"},\"push(bytes32,bytes27)\":{\"notice\":\"Pushes an object into the container. Function allows setting the global metadata since we'll need to touch the \\\"length\\\" storage slot anyway, which also contains the global metadata (it's an optimization).\"},\"push2(bytes32,bytes32)\":{\"notice\":\"Pushes two objects into the container at the same time. A useful optimization.\"},\"push2(bytes32,bytes32,bytes27)\":{\"notice\":\"Pushes two objects into the container at the same time. Also allows setting the global metadata field.\"},\"setGlobalMetadata(bytes27)\":{\"notice\":\"Sets the container's global metadata field. We're using `bytes27` here because we use five bytes to maintain the length of the underlying data structure, meaning we have an extra 27 bytes to store arbitrary data.\"},\"setNextOverwritableIndex(uint256)\":{\"notice\":\"Marks an index as overwritable, meaing the underlying buffer can start to write values over any objects before and including the given index.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol\":\"OVM_ChainStorageContainer\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol\":{\"content\":\"pragma solidity ^0.7.0;\\n\\n/* Library Imports */\\nimport { Lib_RingBuffer } from \\\"../../libraries/utils/Lib_RingBuffer.sol\\\";\\nimport { Lib_AddressResolver } from \\\"../../libraries/resolver/Lib_AddressResolver.sol\\\";\\n\\n/* Interface Imports */\\nimport { iOVM_ChainStorageContainer } from \\\"../../iOVM/chain/iOVM_ChainStorageContainer.sol\\\";\\n\\n/**\\n * @title OVM_ChainStorageContainer\\n */\\ncontract OVM_ChainStorageContainer is iOVM_ChainStorageContainer, Lib_AddressResolver {\\n\\n /*************\\n * Libraries *\\n *************/\\n\\n using Lib_RingBuffer for Lib_RingBuffer.RingBuffer;\\n\\n\\n /*************\\n * Variables *\\n *************/\\n\\n string public owner;\\n Lib_RingBuffer.RingBuffer internal buffer;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n \\n /**\\n * @param _libAddressManager Address of the Address Manager.\\n * @param _owner Name of the contract that owns this container (will be resolved later).\\n */\\n constructor(\\n address _libAddressManager,\\n string memory _owner\\n )\\n Lib_AddressResolver(_libAddressManager)\\n {\\n owner = _owner;\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n \\n modifier onlyOwner() {\\n require(\\n msg.sender == resolve(owner),\\n \\\"OVM_ChainStorageContainer: Function can only be called by the owner.\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function setGlobalMetadata(\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n return buffer.setExtraData(_globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function getGlobalMetadata()\\n override\\n public\\n view\\n returns (\\n bytes27\\n )\\n {\\n return buffer.getExtraData();\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function length()\\n override\\n public\\n view\\n returns (\\n uint256\\n )\\n {\\n return uint256(buffer.getLength());\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push(\\n bytes32 _object\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push(_object);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push(\\n bytes32 _object,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push(_object, _globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push2(_objectA, _objectB);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push2(_objectA, _objectB, _globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function get(\\n uint256 _index\\n )\\n override\\n public\\n view\\n returns (\\n bytes32\\n )\\n {\\n return buffer.get(uint40(_index));\\n }\\n \\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.deleteElementsAfterInclusive(\\n uint40(_index)\\n );\\n }\\n \\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.deleteElementsAfterInclusive(\\n uint40(_index),\\n _globalMetadata\\n );\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function setNextOverwritableIndex(\\n uint256 _index\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.nextOverwritableIndex = _index;\\n }\\n}\\n\",\"keccak256\":\"0xc722e9528988810bd754002dfe3923bc9ac9252c1d981c4803fd5053603bfb11\"},\"contracts/optimistic-ethereum/iOVM/chain/iOVM_ChainStorageContainer.sol\":{\"content\":\"pragma solidity ^0.7.0;\\n\\n/**\\n * @title iOVM_ChainStorageContainer\\n */\\ninterface iOVM_ChainStorageContainer {\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Sets the container's global metadata field. We're using `bytes27` here because we use five\\n * bytes to maintain the length of the underlying data structure, meaning we have an extra\\n * 27 bytes to store arbitrary data.\\n * @param _globalMetadata New global metadata to set.\\n */\\n function setGlobalMetadata(\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Retrieves the container's global metadata field.\\n * @return Container global metadata field.\\n */\\n function getGlobalMetadata()\\n external\\n view\\n returns (\\n bytes27\\n );\\n\\n /**\\n * Retrieves the number of objects stored in the container.\\n * @return Number of objects in the container.\\n */\\n function length()\\n external\\n view\\n returns (\\n uint256\\n );\\n\\n /**\\n * Pushes an object into the container.\\n * @param _object A 32 byte value to insert into the container.\\n */\\n function push(\\n bytes32 _object\\n )\\n external;\\n\\n /**\\n * Pushes an object into the container. Function allows setting the global metadata since\\n * we'll need to touch the \\\"length\\\" storage slot anyway, which also contains the global\\n * metadata (it's an optimization).\\n * @param _object A 32 byte value to insert into the container.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function push(\\n bytes32 _object,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Pushes two objects into the container at the same time. A useful optimization.\\n * @param _objectA First 32 byte value to insert into the container.\\n * @param _objectB Second 32 byte value to insert into the container.\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB\\n )\\n external;\\n\\n /**\\n * Pushes two objects into the container at the same time. Also allows setting the global\\n * metadata field.\\n * @param _objectA First 32 byte value to insert into the container.\\n * @param _objectB Second 32 byte value to insert into the container.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Retrieves an object from the container.\\n * @param _index Index of the particular object to access.\\n * @return 32 byte object value.\\n */\\n function get(\\n uint256 _index\\n )\\n external\\n view\\n returns (\\n bytes32\\n );\\n\\n /**\\n * Removes all objects after and including a given index.\\n * @param _index Object index to delete from.\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index\\n )\\n external;\\n\\n /**\\n * Removes all objects after and including a given index. Also allows setting the global\\n * metadata field.\\n * @param _index Object index to delete from.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Marks an index as overwritable, meaing the underlying buffer can start to write values over\\n * any objects before and including the given index.\\n */\\n function setNextOverwritableIndex(\\n uint256 _index\\n )\\n external;\\n}\\n\",\"keccak256\":\"0xcfca7da85b35d94c27581c2460b0d48fd0cc51fa72670cc7a2f7f760fb21a2f0\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0xdf802e1cc6474df913626991e9fca3835c620a519f397afe04bf9c260e723257\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_AddressResolver\\n */\\ncontract Lib_AddressResolver {\\n\\n /*******************************************\\n * Contract Variables: Contract References *\\n *******************************************/\\n\\n Lib_AddressManager internal libAddressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n */\\n constructor(\\n address _libAddressManager\\n ) public {\\n libAddressManager = Lib_AddressManager(_libAddressManager);\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function resolve(\\n string memory _name\\n )\\n public\\n view\\n returns (\\n address _contract\\n )\\n {\\n return libAddressManager.getAddress(_name);\\n }\\n}\\n\",\"keccak256\":\"0xf3b9d78b309ddeec259ce3e0e1cfdef3ca40938e9a81971b28ce2b8ea327f533\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() internal {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xe0409fbd236d16ca6be439d9d97dd36d0d9a0697ee0062d49588b9d29c248e47\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/utils/Lib_RingBuffer.sol\":{\"content\":\"pragma solidity ^0.7.0;\\n\\nlibrary Lib_RingBuffer {\\n using Lib_RingBuffer for RingBuffer;\\n\\n /***********\\n * Structs *\\n ***********/\\n\\n struct Buffer {\\n uint256 length;\\n mapping (uint256 => bytes32) buf;\\n }\\n\\n struct RingBuffer {\\n bytes32 contextA;\\n bytes32 contextB;\\n Buffer bufferA;\\n Buffer bufferB;\\n uint256 nextOverwritableIndex;\\n }\\n\\n struct RingBufferContext {\\n // contextA\\n uint40 globalIndex;\\n bytes27 extraData;\\n\\n // contextB\\n uint64 currBufferIndex;\\n uint40 prevResetIndex;\\n uint40 currResetIndex;\\n }\\n\\n\\n /*************\\n * Constants *\\n *************/\\n\\n uint256 constant MIN_CAPACITY = 16;\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * Pushes a single element to the buffer.\\n * @param _self Buffer to access.\\n * @param _value Value to push to the buffer.\\n * @param _extraData Optional global extra data.\\n */\\n function push(\\n RingBuffer storage _self,\\n bytes32 _value,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n\\n // Set a minimum capacity.\\n if (currBuffer.length == 0) {\\n currBuffer.length = MIN_CAPACITY;\\n }\\n\\n // Check if we need to expand the buffer.\\n if (ctx.globalIndex - ctx.currResetIndex >= currBuffer.length) {\\n if (ctx.currResetIndex < _self.nextOverwritableIndex) {\\n // We're going to overwrite the inactive buffer.\\n // Bump the buffer index, reset the delete offset, and set our reset indices.\\n ctx.currBufferIndex++;\\n ctx.prevResetIndex = ctx.currResetIndex;\\n ctx.currResetIndex = ctx.globalIndex;\\n\\n // Swap over to the next buffer.\\n currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n } else {\\n // We're not overwriting yet, double the length of the current buffer.\\n currBuffer.length *= 2;\\n }\\n }\\n\\n // Index to write to is the difference of the global and reset indices.\\n uint256 writeHead = ctx.globalIndex - ctx.currResetIndex;\\n currBuffer.buf[writeHead] = _value;\\n\\n // Bump the global index and insert our extra data, then save the context.\\n ctx.globalIndex++;\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Pushes a single element to the buffer.\\n * @param _self Buffer to access.\\n * @param _value Value to push to the buffer.\\n */\\n function push(\\n RingBuffer storage _self,\\n bytes32 _value\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n \\n _self.push(\\n _value,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Pushes a two elements to the buffer.\\n * @param _self Buffer to access.\\n * @param _valueA First value to push to the buffer.\\n * @param _valueA Second value to push to the buffer.\\n * @param _extraData Optional global extra data.\\n */\\n function push2(\\n RingBuffer storage _self,\\n bytes32 _valueA,\\n bytes32 _valueB,\\n bytes27 _extraData\\n )\\n internal\\n {\\n _self.push(_valueA, _extraData);\\n _self.push(_valueB, _extraData);\\n }\\n\\n /**\\n * Pushes a two elements to the buffer.\\n * @param _self Buffer to access.\\n * @param _valueA First value to push to the buffer.\\n * @param _valueA Second value to push to the buffer.\\n */\\n function push2(\\n RingBuffer storage _self,\\n bytes32 _valueA,\\n bytes32 _valueB\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n _self.push2(\\n _valueA,\\n _valueB,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Retrieves an element from the buffer.\\n * @param _self Buffer to access.\\n * @param _index Element index to retrieve.\\n * @return Value of the element at the given index.\\n */\\n function get(\\n RingBuffer storage _self,\\n uint256 _index\\n )\\n internal\\n view\\n returns (\\n bytes32 \\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n require(\\n _index < ctx.globalIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n Buffer storage prevBuffer = _self.getBuffer(ctx.currBufferIndex + 1);\\n\\n if (_index >= ctx.currResetIndex) {\\n // We're trying to load an element from the current buffer.\\n // Relative index is just the difference from the reset index.\\n uint256 relativeIndex = _index - ctx.currResetIndex;\\n\\n // Shouldn't happen but why not check.\\n require(\\n relativeIndex < currBuffer.length,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n return currBuffer.buf[relativeIndex];\\n } else {\\n // We're trying to load an element from the previous buffer.\\n // Relative index is the difference from the reset index in the other direction.\\n uint256 relativeIndex = ctx.currResetIndex - _index;\\n\\n // Condition only fails in the case that we deleted and flipped buffers.\\n require(\\n ctx.currResetIndex > ctx.prevResetIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n // Make sure we're not trying to read beyond the array.\\n require(\\n relativeIndex <= prevBuffer.length,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n return prevBuffer.buf[prevBuffer.length - relativeIndex];\\n }\\n }\\n\\n /**\\n * Deletes all elements after (and including) a given index.\\n * @param _self Buffer to access.\\n * @param _index Index of the element to delete from (inclusive).\\n * @param _extraData Optional global extra data.\\n */\\n function deleteElementsAfterInclusive(\\n RingBuffer storage _self,\\n uint40 _index,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n require(\\n _index < ctx.globalIndex && _index >= ctx.prevResetIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n Buffer storage prevBuffer = _self.getBuffer(ctx.currBufferIndex + 1);\\n\\n if (_index < ctx.currResetIndex) {\\n // We're switching back to the previous buffer.\\n // Reduce the buffer index, set the current reset index back to match the previous one.\\n // We use the equality of these two values to prevent reading beyond this buffer.\\n ctx.currBufferIndex--;\\n ctx.currResetIndex = ctx.prevResetIndex;\\n }\\n\\n // Set our global index and extra data, save the context.\\n ctx.globalIndex = _index;\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Deletes all elements after (and including) a given index.\\n * @param _self Buffer to access.\\n * @param _index Index of the element to delete from (inclusive).\\n */\\n function deleteElementsAfterInclusive(\\n RingBuffer storage _self,\\n uint40 _index\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n _self.deleteElementsAfterInclusive(\\n _index,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Retrieves the current global index.\\n * @param _self Buffer to access.\\n * @return Current global index.\\n */\\n function getLength(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n uint40\\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n return ctx.globalIndex;\\n }\\n\\n /**\\n * Changes current global extra data.\\n * @param _self Buffer to access.\\n * @param _extraData New global extra data.\\n */\\n function setExtraData(\\n RingBuffer storage _self,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Retrieves the current global extra data.\\n * @param _self Buffer to access.\\n * @return Current global extra data.\\n */\\n function getExtraData(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n bytes27\\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n return ctx.extraData;\\n }\\n\\n /**\\n * Sets the current ring buffer context.\\n * @param _self Buffer to access.\\n * @param _ctx Current ring buffer context.\\n */\\n function setContext(\\n RingBuffer storage _self,\\n RingBufferContext memory _ctx\\n )\\n internal\\n returns (\\n bytes32\\n )\\n {\\n bytes32 contextA;\\n bytes32 contextB;\\n\\n uint40 globalIndex = _ctx.globalIndex;\\n bytes27 extraData = _ctx.extraData;\\n assembly {\\n contextA := globalIndex\\n contextA := or(contextA, extraData)\\n }\\n\\n uint64 currBufferIndex = _ctx.currBufferIndex;\\n uint40 prevResetIndex = _ctx.prevResetIndex;\\n uint40 currResetIndex = _ctx.currResetIndex;\\n assembly {\\n contextB := currBufferIndex\\n contextB := or(contextB, shl(64, prevResetIndex))\\n contextB := or(contextB, shl(104, currResetIndex))\\n }\\n\\n if (_self.contextA != contextA) {\\n _self.contextA = contextA;\\n }\\n\\n if (_self.contextB != contextB) {\\n _self.contextB = contextB;\\n }\\n }\\n\\n /**\\n * Retrieves the current ring buffer context.\\n * @param _self Buffer to access.\\n * @return Current ring buffer context.\\n */\\n function getContext(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n RingBufferContext memory\\n )\\n {\\n bytes32 contextA = _self.contextA;\\n bytes32 contextB = _self.contextB;\\n\\n uint40 globalIndex;\\n bytes27 extraData;\\n assembly {\\n globalIndex := and(contextA, 0x000000000000000000000000000000000000000000000000000000FFFFFFFFFF)\\n extraData := and(contextA, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000)\\n }\\n\\n uint64 currBufferIndex;\\n uint40 prevResetIndex;\\n uint40 currResetIndex;\\n assembly {\\n currBufferIndex := and(contextB, 0x000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFF)\\n prevResetIndex := shr(64, and(contextB, 0x00000000000000000000000000000000000000FFFFFFFFFF0000000000000000))\\n currResetIndex := shr(104, and(contextB, 0x0000000000000000000000000000FFFFFFFFFF00000000000000000000000000))\\n }\\n\\n return RingBufferContext({\\n globalIndex: globalIndex,\\n extraData: extraData,\\n currBufferIndex: currBufferIndex,\\n prevResetIndex: prevResetIndex,\\n currResetIndex: currResetIndex\\n });\\n }\\n\\n /**\\n * Retrieves the a buffer from the ring buffer by index.\\n * @param _self Buffer to access.\\n * @param _which Index of the sub buffer to access.\\n * @return Sub buffer for the index.\\n */\\n function getBuffer(\\n RingBuffer storage _self,\\n uint256 _which\\n )\\n internal\\n view\\n returns (\\n Buffer storage\\n )\\n {\\n return _which % 2 == 0 ? _self.bufferA : _self.bufferB;\\n }\\n}\\n\",\"keccak256\":\"0x0c4bb53aba64441b2ec26e7a13de8f04f104bb654e550ccc30db500cac33d2a3\"}},\"version\":1}",
"bytecode": "0x60806040523480156200001157600080fd5b50604051620013f3380380620013f3833981810160405260408110156200003757600080fd5b8151602083018051604051929492938301929190846401000000008211156200005f57600080fd5b9083019060208201858111156200007557600080fd5b82516401000000008111828201881017156200009057600080fd5b82525081516020918201929091019080838360005b83811015620000bf578181015183820152602001620000a5565b50505050905090810190601f168015620000ed5780820380516001836020036101000a031916815260200191505b506040525050600080546001600160a01b0319166001600160a01b038516179055508051620001249060019060208401906200012d565b505050620001d9565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001655760008555620001b0565b82601f106200018057805160ff1916838001178555620001b0565b82800160010185558215620001b0579182015b82811115620001b057825182559160200191906001019062000193565b50620001be929150620001c2565b5090565b5b80821115620001be5760008155600101620001c3565b61120a80620001e96000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80634651d91e1161008c578063b298e36b11610066578063b298e36b14610315578063ccf8f96914610332578063d41c021814610355578063fa9e936c14610378576100cf565b80634651d91e1461025e5780638da5cb5b1461027b5780639507d39a146102f8576100cf565b806314f22255146100d4578063167fd681146101075780631f7b6d32146101325780632015276c1461014c57806329061de214610177578063461a44781461019c575b600080fd5b610105600480360360608110156100ea57600080fd5b508035906020810135906040013564ffffffffff1916610395565b005b6101056004803603604081101561011d57600080fd5b508035906020013564ffffffffff191661048c565b61013a61054c565b60408051918252519081900360200190f35b6101056004803603604081101561016257600080fd5b508035906020013564ffffffffff1916610564565b6101056004803603602081101561018d57600080fd5b503564ffffffffff1916610620565b610242600480360360208110156101b257600080fd5b8101906020810181356401000000008111156101cd57600080fd5b8201836020820111156101df57600080fd5b8035906020019184600183028401116401000000008311171561020157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506106de945050505050565b604080516001600160a01b039092168252519081900360200190f35b6101056004803603602081101561027457600080fd5b50356107ba565b610283610875565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102bd5781810151838201526020016102a5565b50505050905090810190601f1680156102ea5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61013a6004803603602081101561030e57600080fd5b5035610902565b6101056004803603602081101561032b57600080fd5b503561091c565b61033a6109d7565b6040805164ffffffffff199092168252519081900360200190f35b6101056004803603604081101561036b57600080fd5b50803590602001356109e8565b6101056004803603602081101561038e57600080fd5b5035610aa4565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261042b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b820191906000526020600020905b81548152906001019060200180831161040457829003601f168201915b50505050506106de565b6001600160a01b0316336001600160a01b03161461047a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6104876002848484610b59565b505050565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526104ed93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461053c5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610b75565b5050565b60006105586002610cb7565b64ffffffffff16905090565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526105c593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106145760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610ccb565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261068193909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106d05760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610dca565b50565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b8381101561073e578181015183820152602001610726565b50505050905090810190601f16801561076b5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561078857600080fd5b505afa15801561079c573d6000803e3d6000fd5b505050506040513d60208110156107b257600080fd5b505192915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261081b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461086a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610def565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108fa5780601f106108cf576101008083540402835291602001916108fa565b820191906000526020600020905b8154815290600101906020018083116108dd57829003601f168201915b505050505081565b6000610916600264ffffffffff8416610e15565b92915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261097d93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146109cc5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db60028261101e565b60006109e36002611044565b905090565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610a4993909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610a985760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6105486002838361105b565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610b0593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610b545760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b600855565b610b64848483610ccb565b610b6f848383610ccb565b50505050565b6000610b8084611083565b9050806000015164ffffffffff168364ffffffffff16108015610bb55750806060015164ffffffffff168364ffffffffff1610155b610bfd576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610c20826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610c48836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168564ffffffffff161015610c8c576040830180516000190167ffffffffffffffff169052606083015164ffffffffff1660808401525b64ffffffffff8516835264ffffffffff1984166020840152610cae8684611103565b50505050505050565b600080610cc383611083565b519392505050565b6000610cd684611083565b90506000610cfb826040015167ffffffffffffffff16866110e390919063ffffffff16565b8054909150610d0957601081555b8054608083015183510364ffffffffff1610610d80578460060154826080015164ffffffffff161015610d785760408201805160010167ffffffffffffffff169081905260808301805164ffffffffff90811660608601528451169052610d719086906110e3565b9050610d80565b805460020281555b608082015182510364ffffffffff9081166000818152600184810160209081526040909220889055855101909216845264ffffffffff19851691840191909152610cae8684611103565b6000610dd583611083565b64ffffffffff19831660208201529050610b6f8382611103565b6000610dfa83611083565b905061048782826020015185610b759092919063ffffffff16565b600080610e2184611083565b805190915064ffffffffff168310610e77576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610e9a826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610ec2836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168510610f4f576080830151825464ffffffffff9091168603908110610f33576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000908152600190920160205250604090205491506109169050565b6080830151606084015164ffffffffff9182168781039290911610610fb2576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154811115610fff576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154036000908152600190910160205260409020549250610916915050565b600061102983611083565b905061048782826020015185610ccb9092919063ffffffff16565b60008061105083611083565b602001519392505050565b600061106684611083565b9050610b6f8383836020015187610b59909392919063ffffffff16565b61108b611162565b5080546001909101546040805160a08101825264ffffffffff808516825264ffffffffff19909416602082015267ffffffffffffffff8316818301529082901c8316606082015260689190911c909116608082015290565b600060028206156110f757826004016110fc565b826002015b9392505050565b80516020820151604080840151606085015160808601518754600096868117969584901b8517606884901b17959094909390929091871461114257868a555b858a60010154146111555760018a018690555b5050505050505092915050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe4f564d5f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206f776e65722ea264697066735822122037f5f91f3a7302668798afaeee2c0c2d9aad06dfcc80e263efc2cd8f4842eebe64736f6c63430007060033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c80634651d91e1161008c578063b298e36b11610066578063b298e36b14610315578063ccf8f96914610332578063d41c021814610355578063fa9e936c14610378576100cf565b80634651d91e1461025e5780638da5cb5b1461027b5780639507d39a146102f8576100cf565b806314f22255146100d4578063167fd681146101075780631f7b6d32146101325780632015276c1461014c57806329061de214610177578063461a44781461019c575b600080fd5b610105600480360360608110156100ea57600080fd5b508035906020810135906040013564ffffffffff1916610395565b005b6101056004803603604081101561011d57600080fd5b508035906020013564ffffffffff191661048c565b61013a61054c565b60408051918252519081900360200190f35b6101056004803603604081101561016257600080fd5b508035906020013564ffffffffff1916610564565b6101056004803603602081101561018d57600080fd5b503564ffffffffff1916610620565b610242600480360360208110156101b257600080fd5b8101906020810181356401000000008111156101cd57600080fd5b8201836020820111156101df57600080fd5b8035906020019184600183028401116401000000008311171561020157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506106de945050505050565b604080516001600160a01b039092168252519081900360200190f35b6101056004803603602081101561027457600080fd5b50356107ba565b610283610875565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102bd5781810151838201526020016102a5565b50505050905090810190601f1680156102ea5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61013a6004803603602081101561030e57600080fd5b5035610902565b6101056004803603602081101561032b57600080fd5b503561091c565b61033a6109d7565b6040805164ffffffffff199092168252519081900360200190f35b6101056004803603604081101561036b57600080fd5b50803590602001356109e8565b6101056004803603602081101561038e57600080fd5b5035610aa4565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261042b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b820191906000526020600020905b81548152906001019060200180831161040457829003601f168201915b50505050506106de565b6001600160a01b0316336001600160a01b03161461047a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6104876002848484610b59565b505050565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526104ed93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461053c5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610b75565b5050565b60006105586002610cb7565b64ffffffffff16905090565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526105c593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106145760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610ccb565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261068193909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106d05760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610dca565b50565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b8381101561073e578181015183820152602001610726565b50505050905090810190601f16801561076b5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561078857600080fd5b505afa15801561079c573d6000803e3d6000fd5b505050506040513d60208110156107b257600080fd5b505192915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261081b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461086a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610def565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108fa5780601f106108cf576101008083540402835291602001916108fa565b820191906000526020600020905b8154815290600101906020018083116108dd57829003601f168201915b505050505081565b6000610916600264ffffffffff8416610e15565b92915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261097d93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146109cc5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db60028261101e565b60006109e36002611044565b905090565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610a4993909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610a985760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6105486002838361105b565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610b0593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610b545760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b600855565b610b64848483610ccb565b610b6f848383610ccb565b50505050565b6000610b8084611083565b9050806000015164ffffffffff168364ffffffffff16108015610bb55750806060015164ffffffffff168364ffffffffff1610155b610bfd576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610c20826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610c48836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168564ffffffffff161015610c8c576040830180516000190167ffffffffffffffff169052606083015164ffffffffff1660808401525b64ffffffffff8516835264ffffffffff1984166020840152610cae8684611103565b50505050505050565b600080610cc383611083565b519392505050565b6000610cd684611083565b90506000610cfb826040015167ffffffffffffffff16866110e390919063ffffffff16565b8054909150610d0957601081555b8054608083015183510364ffffffffff1610610d80578460060154826080015164ffffffffff161015610d785760408201805160010167ffffffffffffffff169081905260808301805164ffffffffff90811660608601528451169052610d719086906110e3565b9050610d80565b805460020281555b608082015182510364ffffffffff9081166000818152600184810160209081526040909220889055855101909216845264ffffffffff19851691840191909152610cae8684611103565b6000610dd583611083565b64ffffffffff19831660208201529050610b6f8382611103565b6000610dfa83611083565b905061048782826020015185610b759092919063ffffffff16565b600080610e2184611083565b805190915064ffffffffff168310610e77576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610e9a826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610ec2836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168510610f4f576080830151825464ffffffffff9091168603908110610f33576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000908152600190920160205250604090205491506109169050565b6080830151606084015164ffffffffff9182168781039290911610610fb2576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154811115610fff576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154036000908152600190910160205260409020549250610916915050565b600061102983611083565b905061048782826020015185610ccb9092919063ffffffff16565b60008061105083611083565b602001519392505050565b600061106684611083565b9050610b6f8383836020015187610b59909392919063ffffffff16565b61108b611162565b5080546001909101546040805160a08101825264ffffffffff808516825264ffffffffff19909416602082015267ffffffffffffffff8316818301529082901c8316606082015260689190911c909116608082015290565b600060028206156110f757826004016110fc565b826002015b9392505050565b80516020820151604080840151606085015160808601518754600096868117969584901b8517606884901b17959094909390929091871461114257868a555b858a60010154146111555760018a018690555b5050505050505092915050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe4f564d5f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206f776e65722ea264697066735822122037f5f91f3a7302668798afaeee2c0c2d9aad06dfcc80e263efc2cd8f4842eebe64736f6c63430007060033",
"devdoc": {
"kind": "dev",
"methods": {
"constructor": {
"params": {
"_libAddressManager": "Address of the Address Manager.",
"_owner": "Name of the contract that owns this container (will be resolved later)."
}
},
"deleteElementsAfterInclusive(uint256)": {
"params": {
"_index": "Object index to delete from."
}
},
"deleteElementsAfterInclusive(uint256,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_index": "Object index to delete from."
}
},
"get(uint256)": {
"params": {
"_index": "Index of the particular object to access."
},
"returns": {
"_0": "32 byte object value."
}
},
"getGlobalMetadata()": {
"returns": {
"_0": "Container global metadata field."
}
},
"length()": {
"returns": {
"_0": "Number of objects in the container."
}
},
"push(bytes32)": {
"params": {
"_object": "A 32 byte value to insert into the container."
}
},
"push(bytes32,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_object": "A 32 byte value to insert into the container."
}
},
"push2(bytes32,bytes32)": {
"params": {
"_objectA": "First 32 byte value to insert into the container.",
"_objectB": "Second 32 byte value to insert into the container."
}
},
"push2(bytes32,bytes32,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_objectA": "First 32 byte value to insert into the container.",
"_objectB": "Second 32 byte value to insert into the container."
}
},
"setGlobalMetadata(bytes27)": {
"params": {
"_globalMetadata": "New global metadata to set."
}
}
},
"title": "OVM_ChainStorageContainer",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {
"deleteElementsAfterInclusive(uint256)": {
"notice": "Removes all objects after and including a given index."
},
"deleteElementsAfterInclusive(uint256,bytes27)": {
"notice": "Removes all objects after and including a given index. Also allows setting the global metadata field."
},
"get(uint256)": {
"notice": "Retrieves an object from the container."
},
"getGlobalMetadata()": {
"notice": "Retrieves the container's global metadata field."
},
"length()": {
"notice": "Retrieves the number of objects stored in the container."
},
"push(bytes32)": {
"notice": "Pushes an object into the container."
},
"push(bytes32,bytes27)": {
"notice": "Pushes an object into the container. Function allows setting the global metadata since we'll need to touch the \"length\" storage slot anyway, which also contains the global metadata (it's an optimization)."
},
"push2(bytes32,bytes32)": {
"notice": "Pushes two objects into the container at the same time. A useful optimization."
},
"push2(bytes32,bytes32,bytes27)": {
"notice": "Pushes two objects into the container at the same time. Also allows setting the global metadata field."
},
"setGlobalMetadata(bytes27)": {
"notice": "Sets the container's global metadata field. We're using `bytes27` here because we use five bytes to maintain the length of the underlying data structure, meaning we have an extra 27 bytes to store arbitrary data."
},
"setNextOverwritableIndex(uint256)": {
"notice": "Marks an index as overwritable, meaing the underlying buffer can start to write values over any objects before and including the given index."
}
},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 11707,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "libAddressManager",
"offset": 0,
"slot": "0",
"type": "t_contract(Lib_AddressManager)11700"
},
{
"astId": 2888,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "owner",
"offset": 0,
"slot": "1",
"type": "t_string_storage"
},
{
"astId": 2890,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "buffer",
"offset": 0,
"slot": "2",
"type": "t_struct(RingBuffer)16365_storage"
}
],
"types": {
"t_bytes32": {
"encoding": "inplace",
"label": "bytes32",
"numberOfBytes": "32"
},
"t_contract(Lib_AddressManager)11700": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
},
"t_mapping(t_uint256,t_bytes32)": {
"encoding": "mapping",
"key": "t_uint256",
"label": "mapping(uint256 => bytes32)",
"numberOfBytes": "32",
"value": "t_bytes32"
},
"t_string_storage": {
"encoding": "bytes",
"label": "string",
"numberOfBytes": "32"
},
"t_struct(Buffer)16354_storage": {
"encoding": "inplace",
"label": "struct Lib_RingBuffer.Buffer",
"members": [
{
"astId": 16349,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "length",
"offset": 0,
"slot": "0",
"type": "t_uint256"
},
{
"astId": 16353,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "buf",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_uint256,t_bytes32)"
}
],
"numberOfBytes": "64"
},
"t_struct(RingBuffer)16365_storage": {
"encoding": "inplace",
"label": "struct Lib_RingBuffer.RingBuffer",
"members": [
{
"astId": 16356,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "contextA",
"offset": 0,
"slot": "0",
"type": "t_bytes32"
},
{
"astId": 16358,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "contextB",
"offset": 0,
"slot": "1",
"type": "t_bytes32"
},
{
"astId": 16360,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "bufferA",
"offset": 0,
"slot": "2",
"type": "t_struct(Buffer)16354_storage"
},
{
"astId": 16362,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "bufferB",
"offset": 0,
"slot": "4",
"type": "t_struct(Buffer)16354_storage"
},
{
"astId": 16364,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "nextOverwritableIndex",
"offset": 0,
"slot": "6",
"type": "t_uint256"
}
],
"numberOfBytes": "224"
},
"t_uint256": {
"encoding": "inplace",
"label": "uint256",
"numberOfBytes": "32"
}
}
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"address": "0x0f94dA8E27A6116E341c5C807aD32c62EBc90eB6",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_libAddressManager",
"type": "address"
},
{
"internalType": "string",
"name": "_implementationName",
"type": "string"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"stateMutability": "nonpayable",
"type": "fallback"
}
],
"transactionHash": "0xf56350f6788ffb9ebfa35403412369a4fac3147ab5a612956ea8146fe14308ed",
"receipt": {
"to": null,
"from": "0x558ba9b8d78713fbf768c1f8a584485B4003f43F",
"contractAddress": "0x40C6cA6dDdd27E9B4d50da1E393B82b71B1C5D45",
"transactionIndex": 15,
"gasUsed": "228252",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x255fee49c39936345b0004796d61db7b0953cc70f0a9081d86d3447b23b491a2",
"transactionHash": "0xf56350f6788ffb9ebfa35403412369a4fac3147ab5a612956ea8146fe14308ed",
"logs": [],
"blockNumber": 4573449,
"cumulativeGasUsed": "1727110",
"status": 1,
"byzantium": true
},
"args": [
"0xE630cdf302880783364334455C8352fE0aB5b748",
"OVM_L1CrossDomainMessenger"
],
"solcInputHash": "cebcb515c1a9c570d96e0b8f6fd237e2",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_implementationName\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"nonpayable\",\"type\":\"fallback\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_implementationName\":\"implementationName of the contract to proxy to.\",\"_libAddressManager\":\"Address of the Lib_AddressManager.\"}}},\"title\":\"Lib_ResolvedDelegateProxy\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol\":\"Lib_ResolvedDelegateProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0xdf802e1cc6474df913626991e9fca3835c620a519f397afe04bf9c260e723257\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() internal {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xe0409fbd236d16ca6be439d9d97dd36d0d9a0697ee0062d49588b9d29c248e47\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.7.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_ResolvedDelegateProxy\\n */\\ncontract Lib_ResolvedDelegateProxy {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n // Using mappings to store fields to avoid overwriting storage slots in the\\n // implementation contract. For example, instead of storing these fields at\\n // storage slot `0` & `1`, they are stored at `hash(${FIELD_NAME} + address(this))`\\n // See: https://solidity.readthedocs.io/en/v0.7.0/internals/layout_in_storage.html\\n mapping(address=>string) private implementationName;\\n mapping(address=>Lib_AddressManager) private addressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n * @param _implementationName implementationName of the contract to proxy to.\\n */\\n constructor(\\n address _libAddressManager,\\n string memory _implementationName\\n )\\n {\\n addressManager[address(this)] = Lib_AddressManager(_libAddressManager);\\n implementationName[address(this)] = _implementationName;\\n }\\n\\n\\n /*********************\\n * Fallback Function *\\n *********************/\\n\\n fallback()\\n external\\n {\\n address target = addressManager[address(this)].getAddress((implementationName[address(this)]));\\n require(\\n target != address(0),\\n \\\"Target address must be initialized.\\\"\\n );\\n\\n (bool success, bytes memory returndata) = target.delegatecall(msg.data);\\n\\n if (success == true) {\\n assembly {\\n return(add(returndata, 0x20), mload(returndata))\\n }\\n } else {\\n assembly {\\n revert(add(returndata, 0x20), mload(returndata))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x7b94d77f1ceef7bf89687de3a9c574d994d531e4b98007b106fbac54bab7e8ea\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b506040516104173803806104178339818101604052604081101561003357600080fd5b81516020830180516040519294929383019291908464010000000082111561005a57600080fd5b90830190602082018581111561006f57600080fd5b825164010000000081118282018810171561008957600080fd5b82525081516020918201929091019080838360005b838110156100b657818101518382015260200161009e565b50505050905090810190601f1680156100e35780820380516001836020036101000a031916815260200191505b5060409081523060009081526001602090815282822080546001600160a01b0319166001600160a01b038a16179055818152919020855161012c95509093509085019150610134565b5050506101d5565b828054600181600116156101000203166002900490600052602060002090601f01602090048101928261016a57600085556101b0565b82601f1061018357805160ff19168380011785556101b0565b828001600101855582156101b0579182015b828111156101b0578251825591602001919060010190610195565b506101bc9291506101c0565b5090565b5b808211156101bc57600081556001016101c1565b610233806101e46000396000f3fe608060405234801561001057600080fd5b5030600090815260016020818152604080842054848352818520915163bf40fac160e01b815260048101938452825460026101009682161596909602600019011694909404602485018190526001600160a01b039091169363bf40fac19391829160440190849080156100c45780601f10610099576101008083540402835291602001916100c4565b820191906000526020600020905b8154815290600101906020018083116100a757829003601f168201915b50509250505060206040518083038186803b1580156100e257600080fd5b505afa1580156100f6573d6000803e3d6000fd5b505050506040513d602081101561010c57600080fd5b505190506001600160a01b0381166101555760405162461bcd60e51b81526004018080602001828103825260238152602001806101db6023913960400191505060405180910390fd5b600080826001600160a01b03166000366040518083838082843760405192019450600093509091505080830381855af49150503d80600081146101b4576040519150601f19603f3d011682016040523d82523d6000602084013e6101b9565b606091505b509092509050600182151514156101d257805160208201f35b805160208201fdfe5461726765742061646472657373206d75737420626520696e697469616c697a65642ea264697066735822122022cf2e6b66b75ae0d7a780704aa9d326dd541b72493bb1a405188ed67fed0b5964736f6c63430007060033",
"deployedBytecode": "0x608060405234801561001057600080fd5b5030600090815260016020818152604080842054848352818520915163bf40fac160e01b815260048101938452825460026101009682161596909602600019011694909404602485018190526001600160a01b039091169363bf40fac19391829160440190849080156100c45780601f10610099576101008083540402835291602001916100c4565b820191906000526020600020905b8154815290600101906020018083116100a757829003601f168201915b50509250505060206040518083038186803b1580156100e257600080fd5b505afa1580156100f6573d6000803e3d6000fd5b505050506040513d602081101561010c57600080fd5b505190506001600160a01b0381166101555760405162461bcd60e51b81526004018080602001828103825260238152602001806101db6023913960400191505060405180910390fd5b600080826001600160a01b03166000366040518083838082843760405192019450600093509091505080830381855af49150503d80600081146101b4576040519150601f19603f3d011682016040523d82523d6000602084013e6101b9565b606091505b509092509050600182151514156101d257805160208201f35b805160208201fdfe5461726765742061646472657373206d75737420626520696e697469616c697a65642ea264697066735822122022cf2e6b66b75ae0d7a780704aa9d326dd541b72493bb1a405188ed67fed0b5964736f6c63430007060033",
"devdoc": {
"kind": "dev",
"methods": {
"constructor": {
"params": {
"_implementationName": "implementationName of the contract to proxy to.",
"_libAddressManager": "Address of the Lib_AddressManager."
}
}
},
"title": "Lib_ResolvedDelegateProxy",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 11832,
"contract": "contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol:Lib_ResolvedDelegateProxy",
"label": "implementationName",
"offset": 0,
"slot": "0",
"type": "t_mapping(t_address,t_string_storage)"
},
{
"astId": 11836,
"contract": "contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol:Lib_ResolvedDelegateProxy",
"label": "addressManager",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_address,t_contract(Lib_AddressManager)11700)"
}
],
"types": {
"t_address": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
},
"t_contract(Lib_AddressManager)11700": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
},
"t_mapping(t_address,t_contract(Lib_AddressManager)11700)": {
"encoding": "mapping",
"key": "t_address",
"label": "mapping(address => contract Lib_AddressManager)",
"numberOfBytes": "32",
"value": "t_contract(Lib_AddressManager)11700"
},
"t_mapping(t_address,t_string_storage)": {
"encoding": "mapping",
"key": "t_address",
"label": "mapping(address => string)",
"numberOfBytes": "32",
"value": "t_string_storage"
},
"t_string_storage": {
"encoding": "bytes",
"label": "string",
"numberOfBytes": "32"
}
}
}
}
\ No newline at end of file
{
"address": "0x1F5AbC065D4B3F3dc127CA8B0042bD4Fcaf79EFC",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_libAddressManager",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "address",
"name": "_who",
"type": "address"
}
],
"name": "claim",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "deposit",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_preStateRoot",
"type": "bytes32"
},
{
"internalType": "address",
"name": "_publisher",
"type": "address"
},
{
"internalType": "uint256",
"name": "_timestamp",
"type": "uint256"
}
],
"name": "finalize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "finalizeWithdrawal",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_preStateRoot",
"type": "bytes32"
},
{
"internalType": "address",
"name": "_who",
"type": "address"
}
],
"name": "getGasSpent",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_who",
"type": "address"
}
],
"name": "isCollateralized",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_preStateRoot",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_txHash",
"type": "bytes32"
},
{
"internalType": "address",
"name": "_who",
"type": "address"
},
{
"internalType": "uint256",
"name": "_gasSpent",
"type": "uint256"
}
],
"name": "recordGasSpent",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "resolve",
"outputs": [
{
"internalType": "address",
"name": "_contract",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "startWithdrawal",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"transactionHash": "0xef2081df685c50aab54d3c8925d756ac3d5a8e3e8205ace17b9b9887a4181567",
"receipt": {
"to": null,
"from": "0x558ba9b8d78713fbf768c1f8a584485B4003f43F",
"contractAddress": "0x0C4BFBfB44090E1c1AB4a648366456ccFCF9bfA1",
"transactionIndex": 4,
"gasUsed": "291376",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0xc98e11cb9072c6fda982fe6445382fa34298a9a83d3bdfedc88fded88680fe97",
"transactionHash": "0xef2081df685c50aab54d3c8925d756ac3d5a8e3e8205ace17b9b9887a4181567",
"logs": [],
"blockNumber": 4573388,
"cumulativeGasUsed": "864063",
"status": 1,
"byzantium": true
},
"args": [
"0xE630cdf302880783364334455C8352fE0aB5b748"
],
"solcInputHash": "cebcb515c1a9c570d96e0b8f6fd237e2",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_who\",\"type\":\"address\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_preStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_publisher\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"finalize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"finalizeWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_preStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_who\",\"type\":\"address\"}],\"name\":\"getGasSpent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_who\",\"type\":\"address\"}],\"name\":\"isCollateralized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_preStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_txHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_who\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasSpent\",\"type\":\"uint256\"}],\"name\":\"recordGasSpent\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"title\":\"mockOVM_BondManager\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/mockOVM/verification/mockOVM_BondManager.sol\":\"mockOVM_BondManager\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/iOVM/verification/iOVM_BondManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\ninterface ERC20 {\\n function transfer(address, uint256) external returns (bool);\\n function transferFrom(address, address, uint256) external returns (bool);\\n}\\n\\n/// All the errors which may be encountered on the bond manager\\nlibrary Errors {\\n string constant ERC20_ERR = \\\"BondManager: Could not post bond\\\";\\n string constant ALREADY_FINALIZED = \\\"BondManager: Fraud proof for this pre-state root has already been finalized\\\";\\n string constant SLASHED = \\\"BondManager: Cannot finalize withdrawal, you probably got slashed\\\";\\n string constant WRONG_STATE = \\\"BondManager: Wrong bond state for proposer\\\";\\n string constant CANNOT_CLAIM = \\\"BondManager: Cannot claim yet. Dispute must be finalized first\\\";\\n\\n string constant WITHDRAWAL_PENDING = \\\"BondManager: Withdrawal already pending\\\";\\n string constant TOO_EARLY = \\\"BondManager: Too early to finalize your withdrawal\\\";\\n\\n string constant ONLY_TRANSITIONER = \\\"BondManager: Only the transitioner for this pre-state root may call this function\\\";\\n string constant ONLY_FRAUD_VERIFIER = \\\"BondManager: Only the fraud verifier may call this function\\\";\\n string constant ONLY_STATE_COMMITMENT_CHAIN = \\\"BondManager: Only the state commitment chain may call this function\\\";\\n string constant WAIT_FOR_DISPUTES = \\\"BondManager: Wait for other potential disputes\\\";\\n}\\n\\n/**\\n * @title iOVM_BondManager\\n */\\ninterface iOVM_BondManager {\\n\\n /*******************\\n * Data Structures *\\n *******************/\\n\\n /// The lifecycle of a proposer's bond\\n enum State {\\n // Before depositing or after getting slashed, a user is uncollateralized\\n NOT_COLLATERALIZED,\\n // After depositing, a user is collateralized\\n COLLATERALIZED,\\n // After a user has initiated a withdrawal\\n WITHDRAWING\\n }\\n\\n /// A bond posted by a proposer\\n struct Bond {\\n // The user's state\\n State state;\\n // The timestamp at which a proposer issued their withdrawal request\\n uint32 withdrawalTimestamp;\\n // The time when the first disputed was initiated for this bond\\n uint256 firstDisputeAt;\\n // The earliest observed state root for this bond which has had fraud\\n bytes32 earliestDisputedStateRoot;\\n // The state root's timestamp\\n uint256 earliestTimestamp;\\n }\\n\\n // Per pre-state root, store the number of state provisions that were made\\n // and how many of these calls were made by each user. Payouts will then be\\n // claimed by users proportionally for that dispute.\\n struct Rewards {\\n // Flag to check if rewards for a fraud proof are claimable\\n bool canClaim;\\n // Total number of `recordGasSpent` calls made\\n uint256 total;\\n // The gas spent by each user to provide witness data. The sum of all\\n // values inside this map MUST be equal to the value of `total`\\n mapping(address => uint256) gasSpent;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function recordGasSpent(\\n bytes32 _preStateRoot,\\n bytes32 _txHash,\\n address _who,\\n uint256 _gasSpent\\n ) external;\\n\\n function finalize(\\n bytes32 _preStateRoot,\\n address _publisher,\\n uint256 _timestamp\\n ) external;\\n\\n function deposit() external;\\n\\n function startWithdrawal() external;\\n\\n function finalizeWithdrawal() external;\\n\\n function claim(\\n address _who\\n ) external;\\n\\n function isCollateralized(\\n address _who\\n ) external view returns (bool);\\n\\n function getGasSpent(\\n bytes32 _preStateRoot,\\n address _who\\n ) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x3c2a8a399487857158649db1896749d86e39cba545a8aeb2e2bb0f3bdfa7a5b1\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0xdf802e1cc6474df913626991e9fca3835c620a519f397afe04bf9c260e723257\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_AddressResolver\\n */\\ncontract Lib_AddressResolver {\\n\\n /*******************************************\\n * Contract Variables: Contract References *\\n *******************************************/\\n\\n Lib_AddressManager internal libAddressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n */\\n constructor(\\n address _libAddressManager\\n ) public {\\n libAddressManager = Lib_AddressManager(_libAddressManager);\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function resolve(\\n string memory _name\\n )\\n public\\n view\\n returns (\\n address _contract\\n )\\n {\\n return libAddressManager.getAddress(_name);\\n }\\n}\\n\",\"keccak256\":\"0xf3b9d78b309ddeec259ce3e0e1cfdef3ca40938e9a81971b28ce2b8ea327f533\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() internal {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xe0409fbd236d16ca6be439d9d97dd36d0d9a0697ee0062d49588b9d29c248e47\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/mockOVM/verification/mockOVM_BondManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.7.0;\\n\\n/* Interface Imports */\\nimport { iOVM_BondManager } from \\\"../../iOVM/verification/iOVM_BondManager.sol\\\";\\n\\n/* Contract Imports */\\nimport { Lib_AddressResolver } from \\\"../../libraries/resolver/Lib_AddressResolver.sol\\\";\\n\\n/**\\n * @title mockOVM_BondManager\\n */\\ncontract mockOVM_BondManager is iOVM_BondManager, Lib_AddressResolver {\\n constructor(\\n address _libAddressManager\\n )\\n Lib_AddressResolver(_libAddressManager)\\n {}\\n\\n function recordGasSpent(\\n bytes32 _preStateRoot,\\n bytes32 _txHash,\\n address _who,\\n uint256 _gasSpent\\n )\\n override\\n public\\n {}\\n\\n function finalize(\\n bytes32 _preStateRoot,\\n address _publisher,\\n uint256 _timestamp\\n )\\n override\\n public\\n {}\\n\\n function deposit()\\n override\\n public\\n {}\\n\\n function startWithdrawal()\\n override\\n public\\n {}\\n\\n function finalizeWithdrawal()\\n override\\n public\\n {}\\n\\n function claim(\\n address _who\\n )\\n override\\n public\\n {}\\n\\n function isCollateralized(\\n address _who\\n )\\n override\\n public\\n view\\n returns (\\n bool\\n )\\n {\\n // Only authenticate sequencer to submit state root batches.\\n return _who == resolve(\\\"OVM_Sequencer\\\");\\n }\\n\\n function getGasSpent(\\n bytes32 _preStateRoot,\\n address _who\\n )\\n override\\n public\\n view\\n returns (\\n uint256\\n )\\n {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0x03c283c91205609fbc19856d9c7fb15da972c3499e00ed049453654723bfaa4c\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b506040516104463803806104468339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b03199092169190911790556103e1806100656000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063abfbbe1311610066578063abfbbe13146101f4578063bc2f8dd814610226578063c5b6aa2f14610226578063d0e30db014610226578063dc6453dc1461022e57610093565b806302ad4d2a146100985780631e16e92f146100d25780631e83409a1461010c578063461a447814610132575b600080fd5b6100be600480360360208110156100ae57600080fd5b50356001600160a01b031661026c565b604080519115158252519081900360200190f35b61010a600480360360808110156100e857600080fd5b508035906020810135906001600160a01b0360408201351690606001356102b7565b005b61010a6004803603602081101561012257600080fd5b50356001600160a01b03166102bd565b6101d86004803603602081101561014857600080fd5b81019060208101813564010000000081111561016357600080fd5b82018360208201111561017557600080fd5b8035906020019184600183028401116401000000008311171561019757600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506102c0945050505050565b604080516001600160a01b039092168252519081900360200190f35b61010a6004803603606081101561020a57600080fd5b508035906001600160a01b03602082013516906040013561039c565b61010a6103a1565b61025a6004803603604081101561024457600080fd5b50803590602001356001600160a01b03166103a3565b60408051918252519081900360200190f35b600061029c6040518060400160405280600d81526020016c27ab26afa9b2b8bab2b731b2b960991b8152506102c0565b6001600160a01b0316826001600160a01b0316149050919050565b50505050565b50565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b83811015610320578181015183820152602001610308565b50505050905090810190601f16801561034d5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561036a57600080fd5b505afa15801561037e573d6000803e3d6000fd5b505050506040513d602081101561039457600080fd5b505192915050565b505050565b565b60009291505056fea26469706673582212203f0728d2ffd5e87f3b2f160e5704cc5c07ae231349c1c6286f6360e26317c39b64736f6c63430007060033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063abfbbe1311610066578063abfbbe13146101f4578063bc2f8dd814610226578063c5b6aa2f14610226578063d0e30db014610226578063dc6453dc1461022e57610093565b806302ad4d2a146100985780631e16e92f146100d25780631e83409a1461010c578063461a447814610132575b600080fd5b6100be600480360360208110156100ae57600080fd5b50356001600160a01b031661026c565b604080519115158252519081900360200190f35b61010a600480360360808110156100e857600080fd5b508035906020810135906001600160a01b0360408201351690606001356102b7565b005b61010a6004803603602081101561012257600080fd5b50356001600160a01b03166102bd565b6101d86004803603602081101561014857600080fd5b81019060208101813564010000000081111561016357600080fd5b82018360208201111561017557600080fd5b8035906020019184600183028401116401000000008311171561019757600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506102c0945050505050565b604080516001600160a01b039092168252519081900360200190f35b61010a6004803603606081101561020a57600080fd5b508035906001600160a01b03602082013516906040013561039c565b61010a6103a1565b61025a6004803603604081101561024457600080fd5b50803590602001356001600160a01b03166103a3565b60408051918252519081900360200190f35b600061029c6040518060400160405280600d81526020016c27ab26afa9b2b8bab2b731b2b960991b8152506102c0565b6001600160a01b0316826001600160a01b0316149050919050565b50505050565b50565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b83811015610320578181015183820152602001610308565b50505050905090810190601f16801561034d5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561036a57600080fd5b505afa15801561037e573d6000803e3d6000fd5b505050506040513d602081101561039457600080fd5b505192915050565b505050565b565b60009291505056fea26469706673582212203f0728d2ffd5e87f3b2f160e5704cc5c07ae231349c1c6286f6360e26317c39b64736f6c63430007060033",
"devdoc": {
"kind": "dev",
"methods": {},
"title": "mockOVM_BondManager",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 11707,
"contract": "contracts/optimistic-ethereum/mockOVM/verification/mockOVM_BondManager.sol:mockOVM_BondManager",
"label": "libAddressManager",
"offset": 0,
"slot": "0",
"type": "t_contract(Lib_AddressManager)11700"
}
],
"types": {
"t_contract(Lib_AddressManager)11700": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
}
}
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"address": "0x72e6F5244828C10737cbC9659378B207246D26B2",
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "_name",
"type": "string"
},
{
"indexed": false,
"internalType": "address",
"name": "_newAddress",
"type": "address"
}
],
"name": "AddressSet",
"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"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "getAddress",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
},
{
"internalType": "address",
"name": "_address",
"type": "address"
}
],
"name": "setAddress",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"transactionHash": "0x39342ffdce6e6c76b8fa6534d0e5f24ba0917ed09ab713ad0eef7eee73dd08ed",
"receipt": {
"to": null,
"from": "0x558ba9b8d78713fbf768c1f8a584485B4003f43F",
"contractAddress": "0xE630cdf302880783364334455C8352fE0aB5b748",
"transactionIndex": 3,
"gasUsed": "413938",
"logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000022000000000000000000000000000000000040000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400040000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000001000000000000000000000000000000000000000000",
"blockHash": "0xf1c7969322d44cb9561c6af6b8499e1ee90e81c5e8e6409417454bf3d8bc598f",
"transactionHash": "0x39342ffdce6e6c76b8fa6534d0e5f24ba0917ed09ab713ad0eef7eee73dd08ed",
"logs": [
{
"transactionIndex": 3,
"blockNumber": 4573376,
"transactionHash": "0x39342ffdce6e6c76b8fa6534d0e5f24ba0917ed09ab713ad0eef7eee73dd08ed",
"address": "0xE630cdf302880783364334455C8352fE0aB5b748",
"topics": [
"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x000000000000000000000000558ba9b8d78713fbf768c1f8a584485b4003f43f"
],
"data": "0x",
"logIndex": 9,
"blockHash": "0xf1c7969322d44cb9561c6af6b8499e1ee90e81c5e8e6409417454bf3d8bc598f"
}
],
"blockNumber": 4573376,
"cumulativeGasUsed": "3107647",
"status": 1,
"byzantium": true
},
"args": [],
"solcInputHash": "cebcb515c1a9c570d96e0b8f6fd237e2",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_newAddress\",\"type\":\"address\"}],\"name\":\"AddressSet\",\"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\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"getAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"setAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"title\":\"Lib_AddressManager\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":\"Lib_AddressManager\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0xdf802e1cc6474df913626991e9fca3835c620a519f397afe04bf9c260e723257\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() internal {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xe0409fbd236d16ca6be439d9d97dd36d0d9a0697ee0062d49588b9d29c248e47\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b03191633178082556040516001600160a01b039190911691907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3610614806100696000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c8063715018a61461005c5780638da5cb5b146100665780639b2ea4bd1461008a578063bf40fac11461013b578063f2fde38b146101e1575b600080fd5b610064610207565b005b61006e6102b0565b604080516001600160a01b039092168252519081900360200190f35b610064600480360360408110156100a057600080fd5b8101906020810181356401000000008111156100bb57600080fd5b8201836020820111156100cd57600080fd5b803590602001918460018302840111640100000000831117156100ef57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b031691506102bf9050565b61006e6004803603602081101561015157600080fd5b81019060208101813564010000000081111561016c57600080fd5b82018360208201111561017e57600080fd5b803590602001918460018302840111640100000000831117156101a057600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061040c945050505050565b610064600480360360208110156101f757600080fd5b50356001600160a01b031661043b565b6000546001600160a01b03163314610266576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031681565b6000546001600160a01b0316331461031e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b7f188466739ff00cc68bfb2367d23ae4b855264264fe1624caa8884399af23454c82826040518080602001836001600160a01b03168152602001828103825284818151815260200191508051906020019080838360005b8381101561038d578181015183820152602001610375565b50505050905090810190601f1680156103ba5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a180600160006103d68561053a565b815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055505050565b60006001600061041b8461053a565b81526020810191909152604001600020546001600160a01b031692915050565b6000546001600160a01b0316331461049a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166104df5760405162461bcd60e51b815260040180806020018281038252602d8152602001806105b2602d913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000816040516020018082805190602001908083835b6020831061056f5780518252601f199092019160209182019101610550565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120905091905056fe4f776e61626c653a206e6577206f776e65722063616e6e6f7420626520746865207a65726f2061646472657373a2646970667358221220304b86da0b56c0241601472f57374abec2a11900a97043845283952624e4512364736f6c63430007060033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c8063715018a61461005c5780638da5cb5b146100665780639b2ea4bd1461008a578063bf40fac11461013b578063f2fde38b146101e1575b600080fd5b610064610207565b005b61006e6102b0565b604080516001600160a01b039092168252519081900360200190f35b610064600480360360408110156100a057600080fd5b8101906020810181356401000000008111156100bb57600080fd5b8201836020820111156100cd57600080fd5b803590602001918460018302840111640100000000831117156100ef57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b031691506102bf9050565b61006e6004803603602081101561015157600080fd5b81019060208101813564010000000081111561016c57600080fd5b82018360208201111561017e57600080fd5b803590602001918460018302840111640100000000831117156101a057600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061040c945050505050565b610064600480360360208110156101f757600080fd5b50356001600160a01b031661043b565b6000546001600160a01b03163314610266576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031681565b6000546001600160a01b0316331461031e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b7f188466739ff00cc68bfb2367d23ae4b855264264fe1624caa8884399af23454c82826040518080602001836001600160a01b03168152602001828103825284818151815260200191508051906020019080838360005b8381101561038d578181015183820152602001610375565b50505050905090810190601f1680156103ba5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a180600160006103d68561053a565b815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055505050565b60006001600061041b8461053a565b81526020810191909152604001600020546001600160a01b031692915050565b6000546001600160a01b0316331461049a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166104df5760405162461bcd60e51b815260040180806020018281038252602d8152602001806105b2602d913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000816040516020018082805190602001908083835b6020831061056f5780518252601f199092019160209182019101610550565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120905091905056fe4f776e61626c653a206e6577206f776e65722063616e6e6f7420626520746865207a65726f2061646472657373a2646970667358221220304b86da0b56c0241601472f57374abec2a11900a97043845283952624e4512364736f6c63430007060033",
"devdoc": {
"kind": "dev",
"methods": {},
"title": "Lib_AddressManager",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 11739,
"contract": "contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol:Lib_AddressManager",
"label": "owner",
"offset": 0,
"slot": "0",
"type": "t_address"
},
{
"astId": 11647,
"contract": "contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol:Lib_AddressManager",
"label": "addresses",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_bytes32,t_address)"
}
],
"types": {
"t_address": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
},
"t_bytes32": {
"encoding": "inplace",
"label": "bytes32",
"numberOfBytes": "32"
},
"t_mapping(t_bytes32,t_address)": {
"encoding": "mapping",
"key": "t_bytes32",
"label": "mapping(bytes32 => address)",
"numberOfBytes": "32",
"value": "t_address"
}
}
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"address": "0x095744753D5353C1FC43EFb1ab81D06f3e2F4630",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_libAddressManager",
"type": "address"
},
{
"internalType": "string",
"name": "_owner",
"type": "string"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "deleteElementsAfterInclusive",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "deleteElementsAfterInclusive",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "get",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getGlobalMetadata",
"outputs": [
{
"internalType": "bytes27",
"name": "",
"type": "bytes27"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "length",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_object",
"type": "bytes32"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "push",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_object",
"type": "bytes32"
}
],
"name": "push",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_objectA",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_objectB",
"type": "bytes32"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "push2",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_objectA",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_objectB",
"type": "bytes32"
}
],
"name": "push2",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "resolve",
"outputs": [
{
"internalType": "address",
"name": "_contract",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "setGlobalMetadata",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "setNextOverwritableIndex",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"transactionHash": "0x86b9f5af9ce79ad3dca2a59ed521e75d88ed6d816f85e49b15232731cf1b16eb",
"receipt": {
"to": null,
"from": "0x558ba9b8d78713fbf768c1f8a584485B4003f43F",
"contractAddress": "0x4C4a482b6bE75FDce6E94Be10423363108f34fDf",
"transactionIndex": 1,
"gasUsed": "1103714",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x7dc617150a7075769c500e7ebe66c4357400e4d7a81a26495e265d4949b2fdd6",
"transactionHash": "0x86b9f5af9ce79ad3dca2a59ed521e75d88ed6d816f85e49b15232731cf1b16eb",
"logs": [],
"blockNumber": 4573377,
"cumulativeGasUsed": "1155953",
"status": 1,
"byzantium": true
},
"args": [
"0x72e6F5244828C10737cbC9659378B207246D26B2",
"OVM_CanonicalTransactionChain"
],
"solcInputHash": "cebcb515c1a9c570d96e0b8f6fd237e2",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_owner\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"deleteElementsAfterInclusive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"deleteElementsAfterInclusive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"get\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGlobalMetadata\",\"outputs\":[{\"internalType\":\"bytes27\",\"name\":\"\",\"type\":\"bytes27\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"length\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_object\",\"type\":\"bytes32\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"push\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_object\",\"type\":\"bytes32\"}],\"name\":\"push\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_objectA\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_objectB\",\"type\":\"bytes32\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"push2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_objectA\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_objectB\",\"type\":\"bytes32\"}],\"name\":\"push2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"setGlobalMetadata\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"setNextOverwritableIndex\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_libAddressManager\":\"Address of the Address Manager.\",\"_owner\":\"Name of the contract that owns this container (will be resolved later).\"}},\"deleteElementsAfterInclusive(uint256)\":{\"params\":{\"_index\":\"Object index to delete from.\"}},\"deleteElementsAfterInclusive(uint256,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_index\":\"Object index to delete from.\"}},\"get(uint256)\":{\"params\":{\"_index\":\"Index of the particular object to access.\"},\"returns\":{\"_0\":\"32 byte object value.\"}},\"getGlobalMetadata()\":{\"returns\":{\"_0\":\"Container global metadata field.\"}},\"length()\":{\"returns\":{\"_0\":\"Number of objects in the container.\"}},\"push(bytes32)\":{\"params\":{\"_object\":\"A 32 byte value to insert into the container.\"}},\"push(bytes32,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_object\":\"A 32 byte value to insert into the container.\"}},\"push2(bytes32,bytes32)\":{\"params\":{\"_objectA\":\"First 32 byte value to insert into the container.\",\"_objectB\":\"Second 32 byte value to insert into the container.\"}},\"push2(bytes32,bytes32,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_objectA\":\"First 32 byte value to insert into the container.\",\"_objectB\":\"Second 32 byte value to insert into the container.\"}},\"setGlobalMetadata(bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata to set.\"}}},\"title\":\"OVM_ChainStorageContainer\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deleteElementsAfterInclusive(uint256)\":{\"notice\":\"Removes all objects after and including a given index.\"},\"deleteElementsAfterInclusive(uint256,bytes27)\":{\"notice\":\"Removes all objects after and including a given index. Also allows setting the global metadata field.\"},\"get(uint256)\":{\"notice\":\"Retrieves an object from the container.\"},\"getGlobalMetadata()\":{\"notice\":\"Retrieves the container's global metadata field.\"},\"length()\":{\"notice\":\"Retrieves the number of objects stored in the container.\"},\"push(bytes32)\":{\"notice\":\"Pushes an object into the container.\"},\"push(bytes32,bytes27)\":{\"notice\":\"Pushes an object into the container. Function allows setting the global metadata since we'll need to touch the \\\"length\\\" storage slot anyway, which also contains the global metadata (it's an optimization).\"},\"push2(bytes32,bytes32)\":{\"notice\":\"Pushes two objects into the container at the same time. A useful optimization.\"},\"push2(bytes32,bytes32,bytes27)\":{\"notice\":\"Pushes two objects into the container at the same time. Also allows setting the global metadata field.\"},\"setGlobalMetadata(bytes27)\":{\"notice\":\"Sets the container's global metadata field. We're using `bytes27` here because we use five bytes to maintain the length of the underlying data structure, meaning we have an extra 27 bytes to store arbitrary data.\"},\"setNextOverwritableIndex(uint256)\":{\"notice\":\"Marks an index as overwritable, meaing the underlying buffer can start to write values over any objects before and including the given index.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol\":\"OVM_ChainStorageContainer\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol\":{\"content\":\"pragma solidity ^0.7.0;\\n\\n/* Library Imports */\\nimport { Lib_RingBuffer } from \\\"../../libraries/utils/Lib_RingBuffer.sol\\\";\\nimport { Lib_AddressResolver } from \\\"../../libraries/resolver/Lib_AddressResolver.sol\\\";\\n\\n/* Interface Imports */\\nimport { iOVM_ChainStorageContainer } from \\\"../../iOVM/chain/iOVM_ChainStorageContainer.sol\\\";\\n\\n/**\\n * @title OVM_ChainStorageContainer\\n */\\ncontract OVM_ChainStorageContainer is iOVM_ChainStorageContainer, Lib_AddressResolver {\\n\\n /*************\\n * Libraries *\\n *************/\\n\\n using Lib_RingBuffer for Lib_RingBuffer.RingBuffer;\\n\\n\\n /*************\\n * Variables *\\n *************/\\n\\n string public owner;\\n Lib_RingBuffer.RingBuffer internal buffer;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n \\n /**\\n * @param _libAddressManager Address of the Address Manager.\\n * @param _owner Name of the contract that owns this container (will be resolved later).\\n */\\n constructor(\\n address _libAddressManager,\\n string memory _owner\\n )\\n Lib_AddressResolver(_libAddressManager)\\n {\\n owner = _owner;\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n \\n modifier onlyOwner() {\\n require(\\n msg.sender == resolve(owner),\\n \\\"OVM_ChainStorageContainer: Function can only be called by the owner.\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function setGlobalMetadata(\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n return buffer.setExtraData(_globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function getGlobalMetadata()\\n override\\n public\\n view\\n returns (\\n bytes27\\n )\\n {\\n return buffer.getExtraData();\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function length()\\n override\\n public\\n view\\n returns (\\n uint256\\n )\\n {\\n return uint256(buffer.getLength());\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push(\\n bytes32 _object\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push(_object);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push(\\n bytes32 _object,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push(_object, _globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push2(_objectA, _objectB);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push2(_objectA, _objectB, _globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function get(\\n uint256 _index\\n )\\n override\\n public\\n view\\n returns (\\n bytes32\\n )\\n {\\n return buffer.get(uint40(_index));\\n }\\n \\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.deleteElementsAfterInclusive(\\n uint40(_index)\\n );\\n }\\n \\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.deleteElementsAfterInclusive(\\n uint40(_index),\\n _globalMetadata\\n );\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function setNextOverwritableIndex(\\n uint256 _index\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.nextOverwritableIndex = _index;\\n }\\n}\\n\",\"keccak256\":\"0xc722e9528988810bd754002dfe3923bc9ac9252c1d981c4803fd5053603bfb11\"},\"contracts/optimistic-ethereum/iOVM/chain/iOVM_ChainStorageContainer.sol\":{\"content\":\"pragma solidity ^0.7.0;\\n\\n/**\\n * @title iOVM_ChainStorageContainer\\n */\\ninterface iOVM_ChainStorageContainer {\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Sets the container's global metadata field. We're using `bytes27` here because we use five\\n * bytes to maintain the length of the underlying data structure, meaning we have an extra\\n * 27 bytes to store arbitrary data.\\n * @param _globalMetadata New global metadata to set.\\n */\\n function setGlobalMetadata(\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Retrieves the container's global metadata field.\\n * @return Container global metadata field.\\n */\\n function getGlobalMetadata()\\n external\\n view\\n returns (\\n bytes27\\n );\\n\\n /**\\n * Retrieves the number of objects stored in the container.\\n * @return Number of objects in the container.\\n */\\n function length()\\n external\\n view\\n returns (\\n uint256\\n );\\n\\n /**\\n * Pushes an object into the container.\\n * @param _object A 32 byte value to insert into the container.\\n */\\n function push(\\n bytes32 _object\\n )\\n external;\\n\\n /**\\n * Pushes an object into the container. Function allows setting the global metadata since\\n * we'll need to touch the \\\"length\\\" storage slot anyway, which also contains the global\\n * metadata (it's an optimization).\\n * @param _object A 32 byte value to insert into the container.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function push(\\n bytes32 _object,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Pushes two objects into the container at the same time. A useful optimization.\\n * @param _objectA First 32 byte value to insert into the container.\\n * @param _objectB Second 32 byte value to insert into the container.\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB\\n )\\n external;\\n\\n /**\\n * Pushes two objects into the container at the same time. Also allows setting the global\\n * metadata field.\\n * @param _objectA First 32 byte value to insert into the container.\\n * @param _objectB Second 32 byte value to insert into the container.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Retrieves an object from the container.\\n * @param _index Index of the particular object to access.\\n * @return 32 byte object value.\\n */\\n function get(\\n uint256 _index\\n )\\n external\\n view\\n returns (\\n bytes32\\n );\\n\\n /**\\n * Removes all objects after and including a given index.\\n * @param _index Object index to delete from.\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index\\n )\\n external;\\n\\n /**\\n * Removes all objects after and including a given index. Also allows setting the global\\n * metadata field.\\n * @param _index Object index to delete from.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Marks an index as overwritable, meaing the underlying buffer can start to write values over\\n * any objects before and including the given index.\\n */\\n function setNextOverwritableIndex(\\n uint256 _index\\n )\\n external;\\n}\\n\",\"keccak256\":\"0xcfca7da85b35d94c27581c2460b0d48fd0cc51fa72670cc7a2f7f760fb21a2f0\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0xdf802e1cc6474df913626991e9fca3835c620a519f397afe04bf9c260e723257\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_AddressResolver\\n */\\ncontract Lib_AddressResolver {\\n\\n /*******************************************\\n * Contract Variables: Contract References *\\n *******************************************/\\n\\n Lib_AddressManager internal libAddressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n */\\n constructor(\\n address _libAddressManager\\n ) public {\\n libAddressManager = Lib_AddressManager(_libAddressManager);\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function resolve(\\n string memory _name\\n )\\n public\\n view\\n returns (\\n address _contract\\n )\\n {\\n return libAddressManager.getAddress(_name);\\n }\\n}\\n\",\"keccak256\":\"0xf3b9d78b309ddeec259ce3e0e1cfdef3ca40938e9a81971b28ce2b8ea327f533\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() internal {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xe0409fbd236d16ca6be439d9d97dd36d0d9a0697ee0062d49588b9d29c248e47\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/utils/Lib_RingBuffer.sol\":{\"content\":\"pragma solidity ^0.7.0;\\n\\nlibrary Lib_RingBuffer {\\n using Lib_RingBuffer for RingBuffer;\\n\\n /***********\\n * Structs *\\n ***********/\\n\\n struct Buffer {\\n uint256 length;\\n mapping (uint256 => bytes32) buf;\\n }\\n\\n struct RingBuffer {\\n bytes32 contextA;\\n bytes32 contextB;\\n Buffer bufferA;\\n Buffer bufferB;\\n uint256 nextOverwritableIndex;\\n }\\n\\n struct RingBufferContext {\\n // contextA\\n uint40 globalIndex;\\n bytes27 extraData;\\n\\n // contextB\\n uint64 currBufferIndex;\\n uint40 prevResetIndex;\\n uint40 currResetIndex;\\n }\\n\\n\\n /*************\\n * Constants *\\n *************/\\n\\n uint256 constant MIN_CAPACITY = 16;\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * Pushes a single element to the buffer.\\n * @param _self Buffer to access.\\n * @param _value Value to push to the buffer.\\n * @param _extraData Optional global extra data.\\n */\\n function push(\\n RingBuffer storage _self,\\n bytes32 _value,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n\\n // Set a minimum capacity.\\n if (currBuffer.length == 0) {\\n currBuffer.length = MIN_CAPACITY;\\n }\\n\\n // Check if we need to expand the buffer.\\n if (ctx.globalIndex - ctx.currResetIndex >= currBuffer.length) {\\n if (ctx.currResetIndex < _self.nextOverwritableIndex) {\\n // We're going to overwrite the inactive buffer.\\n // Bump the buffer index, reset the delete offset, and set our reset indices.\\n ctx.currBufferIndex++;\\n ctx.prevResetIndex = ctx.currResetIndex;\\n ctx.currResetIndex = ctx.globalIndex;\\n\\n // Swap over to the next buffer.\\n currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n } else {\\n // We're not overwriting yet, double the length of the current buffer.\\n currBuffer.length *= 2;\\n }\\n }\\n\\n // Index to write to is the difference of the global and reset indices.\\n uint256 writeHead = ctx.globalIndex - ctx.currResetIndex;\\n currBuffer.buf[writeHead] = _value;\\n\\n // Bump the global index and insert our extra data, then save the context.\\n ctx.globalIndex++;\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Pushes a single element to the buffer.\\n * @param _self Buffer to access.\\n * @param _value Value to push to the buffer.\\n */\\n function push(\\n RingBuffer storage _self,\\n bytes32 _value\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n \\n _self.push(\\n _value,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Pushes a two elements to the buffer.\\n * @param _self Buffer to access.\\n * @param _valueA First value to push to the buffer.\\n * @param _valueA Second value to push to the buffer.\\n * @param _extraData Optional global extra data.\\n */\\n function push2(\\n RingBuffer storage _self,\\n bytes32 _valueA,\\n bytes32 _valueB,\\n bytes27 _extraData\\n )\\n internal\\n {\\n _self.push(_valueA, _extraData);\\n _self.push(_valueB, _extraData);\\n }\\n\\n /**\\n * Pushes a two elements to the buffer.\\n * @param _self Buffer to access.\\n * @param _valueA First value to push to the buffer.\\n * @param _valueA Second value to push to the buffer.\\n */\\n function push2(\\n RingBuffer storage _self,\\n bytes32 _valueA,\\n bytes32 _valueB\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n _self.push2(\\n _valueA,\\n _valueB,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Retrieves an element from the buffer.\\n * @param _self Buffer to access.\\n * @param _index Element index to retrieve.\\n * @return Value of the element at the given index.\\n */\\n function get(\\n RingBuffer storage _self,\\n uint256 _index\\n )\\n internal\\n view\\n returns (\\n bytes32 \\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n require(\\n _index < ctx.globalIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n Buffer storage prevBuffer = _self.getBuffer(ctx.currBufferIndex + 1);\\n\\n if (_index >= ctx.currResetIndex) {\\n // We're trying to load an element from the current buffer.\\n // Relative index is just the difference from the reset index.\\n uint256 relativeIndex = _index - ctx.currResetIndex;\\n\\n // Shouldn't happen but why not check.\\n require(\\n relativeIndex < currBuffer.length,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n return currBuffer.buf[relativeIndex];\\n } else {\\n // We're trying to load an element from the previous buffer.\\n // Relative index is the difference from the reset index in the other direction.\\n uint256 relativeIndex = ctx.currResetIndex - _index;\\n\\n // Condition only fails in the case that we deleted and flipped buffers.\\n require(\\n ctx.currResetIndex > ctx.prevResetIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n // Make sure we're not trying to read beyond the array.\\n require(\\n relativeIndex <= prevBuffer.length,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n return prevBuffer.buf[prevBuffer.length - relativeIndex];\\n }\\n }\\n\\n /**\\n * Deletes all elements after (and including) a given index.\\n * @param _self Buffer to access.\\n * @param _index Index of the element to delete from (inclusive).\\n * @param _extraData Optional global extra data.\\n */\\n function deleteElementsAfterInclusive(\\n RingBuffer storage _self,\\n uint40 _index,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n require(\\n _index < ctx.globalIndex && _index >= ctx.prevResetIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n Buffer storage prevBuffer = _self.getBuffer(ctx.currBufferIndex + 1);\\n\\n if (_index < ctx.currResetIndex) {\\n // We're switching back to the previous buffer.\\n // Reduce the buffer index, set the current reset index back to match the previous one.\\n // We use the equality of these two values to prevent reading beyond this buffer.\\n ctx.currBufferIndex--;\\n ctx.currResetIndex = ctx.prevResetIndex;\\n }\\n\\n // Set our global index and extra data, save the context.\\n ctx.globalIndex = _index;\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Deletes all elements after (and including) a given index.\\n * @param _self Buffer to access.\\n * @param _index Index of the element to delete from (inclusive).\\n */\\n function deleteElementsAfterInclusive(\\n RingBuffer storage _self,\\n uint40 _index\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n _self.deleteElementsAfterInclusive(\\n _index,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Retrieves the current global index.\\n * @param _self Buffer to access.\\n * @return Current global index.\\n */\\n function getLength(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n uint40\\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n return ctx.globalIndex;\\n }\\n\\n /**\\n * Changes current global extra data.\\n * @param _self Buffer to access.\\n * @param _extraData New global extra data.\\n */\\n function setExtraData(\\n RingBuffer storage _self,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Retrieves the current global extra data.\\n * @param _self Buffer to access.\\n * @return Current global extra data.\\n */\\n function getExtraData(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n bytes27\\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n return ctx.extraData;\\n }\\n\\n /**\\n * Sets the current ring buffer context.\\n * @param _self Buffer to access.\\n * @param _ctx Current ring buffer context.\\n */\\n function setContext(\\n RingBuffer storage _self,\\n RingBufferContext memory _ctx\\n )\\n internal\\n returns (\\n bytes32\\n )\\n {\\n bytes32 contextA;\\n bytes32 contextB;\\n\\n uint40 globalIndex = _ctx.globalIndex;\\n bytes27 extraData = _ctx.extraData;\\n assembly {\\n contextA := globalIndex\\n contextA := or(contextA, extraData)\\n }\\n\\n uint64 currBufferIndex = _ctx.currBufferIndex;\\n uint40 prevResetIndex = _ctx.prevResetIndex;\\n uint40 currResetIndex = _ctx.currResetIndex;\\n assembly {\\n contextB := currBufferIndex\\n contextB := or(contextB, shl(64, prevResetIndex))\\n contextB := or(contextB, shl(104, currResetIndex))\\n }\\n\\n if (_self.contextA != contextA) {\\n _self.contextA = contextA;\\n }\\n\\n if (_self.contextB != contextB) {\\n _self.contextB = contextB;\\n }\\n }\\n\\n /**\\n * Retrieves the current ring buffer context.\\n * @param _self Buffer to access.\\n * @return Current ring buffer context.\\n */\\n function getContext(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n RingBufferContext memory\\n )\\n {\\n bytes32 contextA = _self.contextA;\\n bytes32 contextB = _self.contextB;\\n\\n uint40 globalIndex;\\n bytes27 extraData;\\n assembly {\\n globalIndex := and(contextA, 0x000000000000000000000000000000000000000000000000000000FFFFFFFFFF)\\n extraData := and(contextA, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000)\\n }\\n\\n uint64 currBufferIndex;\\n uint40 prevResetIndex;\\n uint40 currResetIndex;\\n assembly {\\n currBufferIndex := and(contextB, 0x000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFF)\\n prevResetIndex := shr(64, and(contextB, 0x00000000000000000000000000000000000000FFFFFFFFFF0000000000000000))\\n currResetIndex := shr(104, and(contextB, 0x0000000000000000000000000000FFFFFFFFFF00000000000000000000000000))\\n }\\n\\n return RingBufferContext({\\n globalIndex: globalIndex,\\n extraData: extraData,\\n currBufferIndex: currBufferIndex,\\n prevResetIndex: prevResetIndex,\\n currResetIndex: currResetIndex\\n });\\n }\\n\\n /**\\n * Retrieves the a buffer from the ring buffer by index.\\n * @param _self Buffer to access.\\n * @param _which Index of the sub buffer to access.\\n * @return Sub buffer for the index.\\n */\\n function getBuffer(\\n RingBuffer storage _self,\\n uint256 _which\\n )\\n internal\\n view\\n returns (\\n Buffer storage\\n )\\n {\\n return _which % 2 == 0 ? _self.bufferA : _self.bufferB;\\n }\\n}\\n\",\"keccak256\":\"0x0c4bb53aba64441b2ec26e7a13de8f04f104bb654e550ccc30db500cac33d2a3\"}},\"version\":1}",
"bytecode": "0x60806040523480156200001157600080fd5b50604051620013f3380380620013f3833981810160405260408110156200003757600080fd5b8151602083018051604051929492938301929190846401000000008211156200005f57600080fd5b9083019060208201858111156200007557600080fd5b82516401000000008111828201881017156200009057600080fd5b82525081516020918201929091019080838360005b83811015620000bf578181015183820152602001620000a5565b50505050905090810190601f168015620000ed5780820380516001836020036101000a031916815260200191505b506040525050600080546001600160a01b0319166001600160a01b038516179055508051620001249060019060208401906200012d565b505050620001d9565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001655760008555620001b0565b82601f106200018057805160ff1916838001178555620001b0565b82800160010185558215620001b0579182015b82811115620001b057825182559160200191906001019062000193565b50620001be929150620001c2565b5090565b5b80821115620001be5760008155600101620001c3565b61120a80620001e96000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80634651d91e1161008c578063b298e36b11610066578063b298e36b14610315578063ccf8f96914610332578063d41c021814610355578063fa9e936c14610378576100cf565b80634651d91e1461025e5780638da5cb5b1461027b5780639507d39a146102f8576100cf565b806314f22255146100d4578063167fd681146101075780631f7b6d32146101325780632015276c1461014c57806329061de214610177578063461a44781461019c575b600080fd5b610105600480360360608110156100ea57600080fd5b508035906020810135906040013564ffffffffff1916610395565b005b6101056004803603604081101561011d57600080fd5b508035906020013564ffffffffff191661048c565b61013a61054c565b60408051918252519081900360200190f35b6101056004803603604081101561016257600080fd5b508035906020013564ffffffffff1916610564565b6101056004803603602081101561018d57600080fd5b503564ffffffffff1916610620565b610242600480360360208110156101b257600080fd5b8101906020810181356401000000008111156101cd57600080fd5b8201836020820111156101df57600080fd5b8035906020019184600183028401116401000000008311171561020157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506106de945050505050565b604080516001600160a01b039092168252519081900360200190f35b6101056004803603602081101561027457600080fd5b50356107ba565b610283610875565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102bd5781810151838201526020016102a5565b50505050905090810190601f1680156102ea5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61013a6004803603602081101561030e57600080fd5b5035610902565b6101056004803603602081101561032b57600080fd5b503561091c565b61033a6109d7565b6040805164ffffffffff199092168252519081900360200190f35b6101056004803603604081101561036b57600080fd5b50803590602001356109e8565b6101056004803603602081101561038e57600080fd5b5035610aa4565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261042b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b820191906000526020600020905b81548152906001019060200180831161040457829003601f168201915b50505050506106de565b6001600160a01b0316336001600160a01b03161461047a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6104876002848484610b59565b505050565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526104ed93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461053c5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610b75565b5050565b60006105586002610cb7565b64ffffffffff16905090565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526105c593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106145760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610ccb565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261068193909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106d05760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610dca565b50565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b8381101561073e578181015183820152602001610726565b50505050905090810190601f16801561076b5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561078857600080fd5b505afa15801561079c573d6000803e3d6000fd5b505050506040513d60208110156107b257600080fd5b505192915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261081b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461086a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610def565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108fa5780601f106108cf576101008083540402835291602001916108fa565b820191906000526020600020905b8154815290600101906020018083116108dd57829003601f168201915b505050505081565b6000610916600264ffffffffff8416610e15565b92915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261097d93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146109cc5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db60028261101e565b60006109e36002611044565b905090565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610a4993909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610a985760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6105486002838361105b565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610b0593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610b545760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b600855565b610b64848483610ccb565b610b6f848383610ccb565b50505050565b6000610b8084611083565b9050806000015164ffffffffff168364ffffffffff16108015610bb55750806060015164ffffffffff168364ffffffffff1610155b610bfd576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610c20826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610c48836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168564ffffffffff161015610c8c576040830180516000190167ffffffffffffffff169052606083015164ffffffffff1660808401525b64ffffffffff8516835264ffffffffff1984166020840152610cae8684611103565b50505050505050565b600080610cc383611083565b519392505050565b6000610cd684611083565b90506000610cfb826040015167ffffffffffffffff16866110e390919063ffffffff16565b8054909150610d0957601081555b8054608083015183510364ffffffffff1610610d80578460060154826080015164ffffffffff161015610d785760408201805160010167ffffffffffffffff169081905260808301805164ffffffffff90811660608601528451169052610d719086906110e3565b9050610d80565b805460020281555b608082015182510364ffffffffff9081166000818152600184810160209081526040909220889055855101909216845264ffffffffff19851691840191909152610cae8684611103565b6000610dd583611083565b64ffffffffff19831660208201529050610b6f8382611103565b6000610dfa83611083565b905061048782826020015185610b759092919063ffffffff16565b600080610e2184611083565b805190915064ffffffffff168310610e77576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610e9a826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610ec2836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168510610f4f576080830151825464ffffffffff9091168603908110610f33576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000908152600190920160205250604090205491506109169050565b6080830151606084015164ffffffffff9182168781039290911610610fb2576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154811115610fff576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154036000908152600190910160205260409020549250610916915050565b600061102983611083565b905061048782826020015185610ccb9092919063ffffffff16565b60008061105083611083565b602001519392505050565b600061106684611083565b9050610b6f8383836020015187610b59909392919063ffffffff16565b61108b611162565b5080546001909101546040805160a08101825264ffffffffff808516825264ffffffffff19909416602082015267ffffffffffffffff8316818301529082901c8316606082015260689190911c909116608082015290565b600060028206156110f757826004016110fc565b826002015b9392505050565b80516020820151604080840151606085015160808601518754600096868117969584901b8517606884901b17959094909390929091871461114257868a555b858a60010154146111555760018a018690555b5050505050505092915050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe4f564d5f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206f776e65722ea264697066735822122037f5f91f3a7302668798afaeee2c0c2d9aad06dfcc80e263efc2cd8f4842eebe64736f6c63430007060033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c80634651d91e1161008c578063b298e36b11610066578063b298e36b14610315578063ccf8f96914610332578063d41c021814610355578063fa9e936c14610378576100cf565b80634651d91e1461025e5780638da5cb5b1461027b5780639507d39a146102f8576100cf565b806314f22255146100d4578063167fd681146101075780631f7b6d32146101325780632015276c1461014c57806329061de214610177578063461a44781461019c575b600080fd5b610105600480360360608110156100ea57600080fd5b508035906020810135906040013564ffffffffff1916610395565b005b6101056004803603604081101561011d57600080fd5b508035906020013564ffffffffff191661048c565b61013a61054c565b60408051918252519081900360200190f35b6101056004803603604081101561016257600080fd5b508035906020013564ffffffffff1916610564565b6101056004803603602081101561018d57600080fd5b503564ffffffffff1916610620565b610242600480360360208110156101b257600080fd5b8101906020810181356401000000008111156101cd57600080fd5b8201836020820111156101df57600080fd5b8035906020019184600183028401116401000000008311171561020157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506106de945050505050565b604080516001600160a01b039092168252519081900360200190f35b6101056004803603602081101561027457600080fd5b50356107ba565b610283610875565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102bd5781810151838201526020016102a5565b50505050905090810190601f1680156102ea5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61013a6004803603602081101561030e57600080fd5b5035610902565b6101056004803603602081101561032b57600080fd5b503561091c565b61033a6109d7565b6040805164ffffffffff199092168252519081900360200190f35b6101056004803603604081101561036b57600080fd5b50803590602001356109e8565b6101056004803603602081101561038e57600080fd5b5035610aa4565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261042b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b820191906000526020600020905b81548152906001019060200180831161040457829003601f168201915b50505050506106de565b6001600160a01b0316336001600160a01b03161461047a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6104876002848484610b59565b505050565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526104ed93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461053c5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610b75565b5050565b60006105586002610cb7565b64ffffffffff16905090565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526105c593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106145760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610ccb565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261068193909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106d05760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610dca565b50565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b8381101561073e578181015183820152602001610726565b50505050905090810190601f16801561076b5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561078857600080fd5b505afa15801561079c573d6000803e3d6000fd5b505050506040513d60208110156107b257600080fd5b505192915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261081b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461086a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610def565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108fa5780601f106108cf576101008083540402835291602001916108fa565b820191906000526020600020905b8154815290600101906020018083116108dd57829003601f168201915b505050505081565b6000610916600264ffffffffff8416610e15565b92915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261097d93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146109cc5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db60028261101e565b60006109e36002611044565b905090565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610a4993909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610a985760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6105486002838361105b565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610b0593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610b545760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b600855565b610b64848483610ccb565b610b6f848383610ccb565b50505050565b6000610b8084611083565b9050806000015164ffffffffff168364ffffffffff16108015610bb55750806060015164ffffffffff168364ffffffffff1610155b610bfd576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610c20826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610c48836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168564ffffffffff161015610c8c576040830180516000190167ffffffffffffffff169052606083015164ffffffffff1660808401525b64ffffffffff8516835264ffffffffff1984166020840152610cae8684611103565b50505050505050565b600080610cc383611083565b519392505050565b6000610cd684611083565b90506000610cfb826040015167ffffffffffffffff16866110e390919063ffffffff16565b8054909150610d0957601081555b8054608083015183510364ffffffffff1610610d80578460060154826080015164ffffffffff161015610d785760408201805160010167ffffffffffffffff169081905260808301805164ffffffffff90811660608601528451169052610d719086906110e3565b9050610d80565b805460020281555b608082015182510364ffffffffff9081166000818152600184810160209081526040909220889055855101909216845264ffffffffff19851691840191909152610cae8684611103565b6000610dd583611083565b64ffffffffff19831660208201529050610b6f8382611103565b6000610dfa83611083565b905061048782826020015185610b759092919063ffffffff16565b600080610e2184611083565b805190915064ffffffffff168310610e77576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610e9a826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610ec2836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168510610f4f576080830151825464ffffffffff9091168603908110610f33576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000908152600190920160205250604090205491506109169050565b6080830151606084015164ffffffffff9182168781039290911610610fb2576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154811115610fff576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154036000908152600190910160205260409020549250610916915050565b600061102983611083565b905061048782826020015185610ccb9092919063ffffffff16565b60008061105083611083565b602001519392505050565b600061106684611083565b9050610b6f8383836020015187610b59909392919063ffffffff16565b61108b611162565b5080546001909101546040805160a08101825264ffffffffff808516825264ffffffffff19909416602082015267ffffffffffffffff8316818301529082901c8316606082015260689190911c909116608082015290565b600060028206156110f757826004016110fc565b826002015b9392505050565b80516020820151604080840151606085015160808601518754600096868117969584901b8517606884901b17959094909390929091871461114257868a555b858a60010154146111555760018a018690555b5050505050505092915050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe4f564d5f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206f776e65722ea264697066735822122037f5f91f3a7302668798afaeee2c0c2d9aad06dfcc80e263efc2cd8f4842eebe64736f6c63430007060033",
"devdoc": {
"kind": "dev",
"methods": {
"constructor": {
"params": {
"_libAddressManager": "Address of the Address Manager.",
"_owner": "Name of the contract that owns this container (will be resolved later)."
}
},
"deleteElementsAfterInclusive(uint256)": {
"params": {
"_index": "Object index to delete from."
}
},
"deleteElementsAfterInclusive(uint256,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_index": "Object index to delete from."
}
},
"get(uint256)": {
"params": {
"_index": "Index of the particular object to access."
},
"returns": {
"_0": "32 byte object value."
}
},
"getGlobalMetadata()": {
"returns": {
"_0": "Container global metadata field."
}
},
"length()": {
"returns": {
"_0": "Number of objects in the container."
}
},
"push(bytes32)": {
"params": {
"_object": "A 32 byte value to insert into the container."
}
},
"push(bytes32,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_object": "A 32 byte value to insert into the container."
}
},
"push2(bytes32,bytes32)": {
"params": {
"_objectA": "First 32 byte value to insert into the container.",
"_objectB": "Second 32 byte value to insert into the container."
}
},
"push2(bytes32,bytes32,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_objectA": "First 32 byte value to insert into the container.",
"_objectB": "Second 32 byte value to insert into the container."
}
},
"setGlobalMetadata(bytes27)": {
"params": {
"_globalMetadata": "New global metadata to set."
}
}
},
"title": "OVM_ChainStorageContainer",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {
"deleteElementsAfterInclusive(uint256)": {
"notice": "Removes all objects after and including a given index."
},
"deleteElementsAfterInclusive(uint256,bytes27)": {
"notice": "Removes all objects after and including a given index. Also allows setting the global metadata field."
},
"get(uint256)": {
"notice": "Retrieves an object from the container."
},
"getGlobalMetadata()": {
"notice": "Retrieves the container's global metadata field."
},
"length()": {
"notice": "Retrieves the number of objects stored in the container."
},
"push(bytes32)": {
"notice": "Pushes an object into the container."
},
"push(bytes32,bytes27)": {
"notice": "Pushes an object into the container. Function allows setting the global metadata since we'll need to touch the \"length\" storage slot anyway, which also contains the global metadata (it's an optimization)."
},
"push2(bytes32,bytes32)": {
"notice": "Pushes two objects into the container at the same time. A useful optimization."
},
"push2(bytes32,bytes32,bytes27)": {
"notice": "Pushes two objects into the container at the same time. Also allows setting the global metadata field."
},
"setGlobalMetadata(bytes27)": {
"notice": "Sets the container's global metadata field. We're using `bytes27` here because we use five bytes to maintain the length of the underlying data structure, meaning we have an extra 27 bytes to store arbitrary data."
},
"setNextOverwritableIndex(uint256)": {
"notice": "Marks an index as overwritable, meaing the underlying buffer can start to write values over any objects before and including the given index."
}
},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 11707,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "libAddressManager",
"offset": 0,
"slot": "0",
"type": "t_contract(Lib_AddressManager)11700"
},
{
"astId": 2888,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "owner",
"offset": 0,
"slot": "1",
"type": "t_string_storage"
},
{
"astId": 2890,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "buffer",
"offset": 0,
"slot": "2",
"type": "t_struct(RingBuffer)16365_storage"
}
],
"types": {
"t_bytes32": {
"encoding": "inplace",
"label": "bytes32",
"numberOfBytes": "32"
},
"t_contract(Lib_AddressManager)11700": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
},
"t_mapping(t_uint256,t_bytes32)": {
"encoding": "mapping",
"key": "t_uint256",
"label": "mapping(uint256 => bytes32)",
"numberOfBytes": "32",
"value": "t_bytes32"
},
"t_string_storage": {
"encoding": "bytes",
"label": "string",
"numberOfBytes": "32"
},
"t_struct(Buffer)16354_storage": {
"encoding": "inplace",
"label": "struct Lib_RingBuffer.Buffer",
"members": [
{
"astId": 16349,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "length",
"offset": 0,
"slot": "0",
"type": "t_uint256"
},
{
"astId": 16353,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "buf",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_uint256,t_bytes32)"
}
],
"numberOfBytes": "64"
},
"t_struct(RingBuffer)16365_storage": {
"encoding": "inplace",
"label": "struct Lib_RingBuffer.RingBuffer",
"members": [
{
"astId": 16356,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "contextA",
"offset": 0,
"slot": "0",
"type": "t_bytes32"
},
{
"astId": 16358,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "contextB",
"offset": 0,
"slot": "1",
"type": "t_bytes32"
},
{
"astId": 16360,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "bufferA",
"offset": 0,
"slot": "2",
"type": "t_struct(Buffer)16354_storage"
},
{
"astId": 16362,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "bufferB",
"offset": 0,
"slot": "4",
"type": "t_struct(Buffer)16354_storage"
},
{
"astId": 16364,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "nextOverwritableIndex",
"offset": 0,
"slot": "6",
"type": "t_uint256"
}
],
"numberOfBytes": "224"
},
"t_uint256": {
"encoding": "inplace",
"label": "uint256",
"numberOfBytes": "32"
}
}
}
}
\ No newline at end of file
{
"address": "0xFCE31EC2Bc82553FaA4A9a6DF36c9b0DFDAdD4B8",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_libAddressManager",
"type": "address"
},
{
"internalType": "string",
"name": "_owner",
"type": "string"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "deleteElementsAfterInclusive",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "deleteElementsAfterInclusive",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "get",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getGlobalMetadata",
"outputs": [
{
"internalType": "bytes27",
"name": "",
"type": "bytes27"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "length",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_object",
"type": "bytes32"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "push",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_object",
"type": "bytes32"
}
],
"name": "push",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_objectA",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_objectB",
"type": "bytes32"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "push2",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_objectA",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_objectB",
"type": "bytes32"
}
],
"name": "push2",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "resolve",
"outputs": [
{
"internalType": "address",
"name": "_contract",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "setGlobalMetadata",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "setNextOverwritableIndex",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"transactionHash": "0x99b89c2345373c5b66554e90da495293799b15988d76cbddc60ff7ab8e9cb996",
"receipt": {
"to": null,
"from": "0x558ba9b8d78713fbf768c1f8a584485B4003f43F",
"contractAddress": "0xC9DE904214A3496b23E54d7876e4A5CfD4584F49",
"transactionIndex": 0,
"gasUsed": "1103714",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0xc4de8bb6a3be0356605a754b0f0913dc2d1ce2a52dd31480cf90815785cd7e9e",
"transactionHash": "0x99b89c2345373c5b66554e90da495293799b15988d76cbddc60ff7ab8e9cb996",
"logs": [],
"blockNumber": 4573379,
"cumulativeGasUsed": "1103714",
"status": 1,
"byzantium": true
},
"args": [
"0x72e6F5244828C10737cbC9659378B207246D26B2",
"OVM_CanonicalTransactionChain"
],
"solcInputHash": "cebcb515c1a9c570d96e0b8f6fd237e2",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_owner\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"deleteElementsAfterInclusive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"deleteElementsAfterInclusive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"get\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGlobalMetadata\",\"outputs\":[{\"internalType\":\"bytes27\",\"name\":\"\",\"type\":\"bytes27\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"length\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_object\",\"type\":\"bytes32\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"push\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_object\",\"type\":\"bytes32\"}],\"name\":\"push\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_objectA\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_objectB\",\"type\":\"bytes32\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"push2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_objectA\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_objectB\",\"type\":\"bytes32\"}],\"name\":\"push2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"setGlobalMetadata\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"setNextOverwritableIndex\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_libAddressManager\":\"Address of the Address Manager.\",\"_owner\":\"Name of the contract that owns this container (will be resolved later).\"}},\"deleteElementsAfterInclusive(uint256)\":{\"params\":{\"_index\":\"Object index to delete from.\"}},\"deleteElementsAfterInclusive(uint256,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_index\":\"Object index to delete from.\"}},\"get(uint256)\":{\"params\":{\"_index\":\"Index of the particular object to access.\"},\"returns\":{\"_0\":\"32 byte object value.\"}},\"getGlobalMetadata()\":{\"returns\":{\"_0\":\"Container global metadata field.\"}},\"length()\":{\"returns\":{\"_0\":\"Number of objects in the container.\"}},\"push(bytes32)\":{\"params\":{\"_object\":\"A 32 byte value to insert into the container.\"}},\"push(bytes32,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_object\":\"A 32 byte value to insert into the container.\"}},\"push2(bytes32,bytes32)\":{\"params\":{\"_objectA\":\"First 32 byte value to insert into the container.\",\"_objectB\":\"Second 32 byte value to insert into the container.\"}},\"push2(bytes32,bytes32,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_objectA\":\"First 32 byte value to insert into the container.\",\"_objectB\":\"Second 32 byte value to insert into the container.\"}},\"setGlobalMetadata(bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata to set.\"}}},\"title\":\"OVM_ChainStorageContainer\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deleteElementsAfterInclusive(uint256)\":{\"notice\":\"Removes all objects after and including a given index.\"},\"deleteElementsAfterInclusive(uint256,bytes27)\":{\"notice\":\"Removes all objects after and including a given index. Also allows setting the global metadata field.\"},\"get(uint256)\":{\"notice\":\"Retrieves an object from the container.\"},\"getGlobalMetadata()\":{\"notice\":\"Retrieves the container's global metadata field.\"},\"length()\":{\"notice\":\"Retrieves the number of objects stored in the container.\"},\"push(bytes32)\":{\"notice\":\"Pushes an object into the container.\"},\"push(bytes32,bytes27)\":{\"notice\":\"Pushes an object into the container. Function allows setting the global metadata since we'll need to touch the \\\"length\\\" storage slot anyway, which also contains the global metadata (it's an optimization).\"},\"push2(bytes32,bytes32)\":{\"notice\":\"Pushes two objects into the container at the same time. A useful optimization.\"},\"push2(bytes32,bytes32,bytes27)\":{\"notice\":\"Pushes two objects into the container at the same time. Also allows setting the global metadata field.\"},\"setGlobalMetadata(bytes27)\":{\"notice\":\"Sets the container's global metadata field. We're using `bytes27` here because we use five bytes to maintain the length of the underlying data structure, meaning we have an extra 27 bytes to store arbitrary data.\"},\"setNextOverwritableIndex(uint256)\":{\"notice\":\"Marks an index as overwritable, meaing the underlying buffer can start to write values over any objects before and including the given index.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol\":\"OVM_ChainStorageContainer\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol\":{\"content\":\"pragma solidity ^0.7.0;\\n\\n/* Library Imports */\\nimport { Lib_RingBuffer } from \\\"../../libraries/utils/Lib_RingBuffer.sol\\\";\\nimport { Lib_AddressResolver } from \\\"../../libraries/resolver/Lib_AddressResolver.sol\\\";\\n\\n/* Interface Imports */\\nimport { iOVM_ChainStorageContainer } from \\\"../../iOVM/chain/iOVM_ChainStorageContainer.sol\\\";\\n\\n/**\\n * @title OVM_ChainStorageContainer\\n */\\ncontract OVM_ChainStorageContainer is iOVM_ChainStorageContainer, Lib_AddressResolver {\\n\\n /*************\\n * Libraries *\\n *************/\\n\\n using Lib_RingBuffer for Lib_RingBuffer.RingBuffer;\\n\\n\\n /*************\\n * Variables *\\n *************/\\n\\n string public owner;\\n Lib_RingBuffer.RingBuffer internal buffer;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n \\n /**\\n * @param _libAddressManager Address of the Address Manager.\\n * @param _owner Name of the contract that owns this container (will be resolved later).\\n */\\n constructor(\\n address _libAddressManager,\\n string memory _owner\\n )\\n Lib_AddressResolver(_libAddressManager)\\n {\\n owner = _owner;\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n \\n modifier onlyOwner() {\\n require(\\n msg.sender == resolve(owner),\\n \\\"OVM_ChainStorageContainer: Function can only be called by the owner.\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function setGlobalMetadata(\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n return buffer.setExtraData(_globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function getGlobalMetadata()\\n override\\n public\\n view\\n returns (\\n bytes27\\n )\\n {\\n return buffer.getExtraData();\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function length()\\n override\\n public\\n view\\n returns (\\n uint256\\n )\\n {\\n return uint256(buffer.getLength());\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push(\\n bytes32 _object\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push(_object);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push(\\n bytes32 _object,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push(_object, _globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push2(_objectA, _objectB);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push2(_objectA, _objectB, _globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function get(\\n uint256 _index\\n )\\n override\\n public\\n view\\n returns (\\n bytes32\\n )\\n {\\n return buffer.get(uint40(_index));\\n }\\n \\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.deleteElementsAfterInclusive(\\n uint40(_index)\\n );\\n }\\n \\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.deleteElementsAfterInclusive(\\n uint40(_index),\\n _globalMetadata\\n );\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function setNextOverwritableIndex(\\n uint256 _index\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.nextOverwritableIndex = _index;\\n }\\n}\\n\",\"keccak256\":\"0xc722e9528988810bd754002dfe3923bc9ac9252c1d981c4803fd5053603bfb11\"},\"contracts/optimistic-ethereum/iOVM/chain/iOVM_ChainStorageContainer.sol\":{\"content\":\"pragma solidity ^0.7.0;\\n\\n/**\\n * @title iOVM_ChainStorageContainer\\n */\\ninterface iOVM_ChainStorageContainer {\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Sets the container's global metadata field. We're using `bytes27` here because we use five\\n * bytes to maintain the length of the underlying data structure, meaning we have an extra\\n * 27 bytes to store arbitrary data.\\n * @param _globalMetadata New global metadata to set.\\n */\\n function setGlobalMetadata(\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Retrieves the container's global metadata field.\\n * @return Container global metadata field.\\n */\\n function getGlobalMetadata()\\n external\\n view\\n returns (\\n bytes27\\n );\\n\\n /**\\n * Retrieves the number of objects stored in the container.\\n * @return Number of objects in the container.\\n */\\n function length()\\n external\\n view\\n returns (\\n uint256\\n );\\n\\n /**\\n * Pushes an object into the container.\\n * @param _object A 32 byte value to insert into the container.\\n */\\n function push(\\n bytes32 _object\\n )\\n external;\\n\\n /**\\n * Pushes an object into the container. Function allows setting the global metadata since\\n * we'll need to touch the \\\"length\\\" storage slot anyway, which also contains the global\\n * metadata (it's an optimization).\\n * @param _object A 32 byte value to insert into the container.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function push(\\n bytes32 _object,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Pushes two objects into the container at the same time. A useful optimization.\\n * @param _objectA First 32 byte value to insert into the container.\\n * @param _objectB Second 32 byte value to insert into the container.\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB\\n )\\n external;\\n\\n /**\\n * Pushes two objects into the container at the same time. Also allows setting the global\\n * metadata field.\\n * @param _objectA First 32 byte value to insert into the container.\\n * @param _objectB Second 32 byte value to insert into the container.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Retrieves an object from the container.\\n * @param _index Index of the particular object to access.\\n * @return 32 byte object value.\\n */\\n function get(\\n uint256 _index\\n )\\n external\\n view\\n returns (\\n bytes32\\n );\\n\\n /**\\n * Removes all objects after and including a given index.\\n * @param _index Object index to delete from.\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index\\n )\\n external;\\n\\n /**\\n * Removes all objects after and including a given index. Also allows setting the global\\n * metadata field.\\n * @param _index Object index to delete from.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Marks an index as overwritable, meaing the underlying buffer can start to write values over\\n * any objects before and including the given index.\\n */\\n function setNextOverwritableIndex(\\n uint256 _index\\n )\\n external;\\n}\\n\",\"keccak256\":\"0xcfca7da85b35d94c27581c2460b0d48fd0cc51fa72670cc7a2f7f760fb21a2f0\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0xdf802e1cc6474df913626991e9fca3835c620a519f397afe04bf9c260e723257\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_AddressResolver\\n */\\ncontract Lib_AddressResolver {\\n\\n /*******************************************\\n * Contract Variables: Contract References *\\n *******************************************/\\n\\n Lib_AddressManager internal libAddressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n */\\n constructor(\\n address _libAddressManager\\n ) public {\\n libAddressManager = Lib_AddressManager(_libAddressManager);\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function resolve(\\n string memory _name\\n )\\n public\\n view\\n returns (\\n address _contract\\n )\\n {\\n return libAddressManager.getAddress(_name);\\n }\\n}\\n\",\"keccak256\":\"0xf3b9d78b309ddeec259ce3e0e1cfdef3ca40938e9a81971b28ce2b8ea327f533\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() internal {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xe0409fbd236d16ca6be439d9d97dd36d0d9a0697ee0062d49588b9d29c248e47\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/utils/Lib_RingBuffer.sol\":{\"content\":\"pragma solidity ^0.7.0;\\n\\nlibrary Lib_RingBuffer {\\n using Lib_RingBuffer for RingBuffer;\\n\\n /***********\\n * Structs *\\n ***********/\\n\\n struct Buffer {\\n uint256 length;\\n mapping (uint256 => bytes32) buf;\\n }\\n\\n struct RingBuffer {\\n bytes32 contextA;\\n bytes32 contextB;\\n Buffer bufferA;\\n Buffer bufferB;\\n uint256 nextOverwritableIndex;\\n }\\n\\n struct RingBufferContext {\\n // contextA\\n uint40 globalIndex;\\n bytes27 extraData;\\n\\n // contextB\\n uint64 currBufferIndex;\\n uint40 prevResetIndex;\\n uint40 currResetIndex;\\n }\\n\\n\\n /*************\\n * Constants *\\n *************/\\n\\n uint256 constant MIN_CAPACITY = 16;\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * Pushes a single element to the buffer.\\n * @param _self Buffer to access.\\n * @param _value Value to push to the buffer.\\n * @param _extraData Optional global extra data.\\n */\\n function push(\\n RingBuffer storage _self,\\n bytes32 _value,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n\\n // Set a minimum capacity.\\n if (currBuffer.length == 0) {\\n currBuffer.length = MIN_CAPACITY;\\n }\\n\\n // Check if we need to expand the buffer.\\n if (ctx.globalIndex - ctx.currResetIndex >= currBuffer.length) {\\n if (ctx.currResetIndex < _self.nextOverwritableIndex) {\\n // We're going to overwrite the inactive buffer.\\n // Bump the buffer index, reset the delete offset, and set our reset indices.\\n ctx.currBufferIndex++;\\n ctx.prevResetIndex = ctx.currResetIndex;\\n ctx.currResetIndex = ctx.globalIndex;\\n\\n // Swap over to the next buffer.\\n currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n } else {\\n // We're not overwriting yet, double the length of the current buffer.\\n currBuffer.length *= 2;\\n }\\n }\\n\\n // Index to write to is the difference of the global and reset indices.\\n uint256 writeHead = ctx.globalIndex - ctx.currResetIndex;\\n currBuffer.buf[writeHead] = _value;\\n\\n // Bump the global index and insert our extra data, then save the context.\\n ctx.globalIndex++;\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Pushes a single element to the buffer.\\n * @param _self Buffer to access.\\n * @param _value Value to push to the buffer.\\n */\\n function push(\\n RingBuffer storage _self,\\n bytes32 _value\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n \\n _self.push(\\n _value,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Pushes a two elements to the buffer.\\n * @param _self Buffer to access.\\n * @param _valueA First value to push to the buffer.\\n * @param _valueA Second value to push to the buffer.\\n * @param _extraData Optional global extra data.\\n */\\n function push2(\\n RingBuffer storage _self,\\n bytes32 _valueA,\\n bytes32 _valueB,\\n bytes27 _extraData\\n )\\n internal\\n {\\n _self.push(_valueA, _extraData);\\n _self.push(_valueB, _extraData);\\n }\\n\\n /**\\n * Pushes a two elements to the buffer.\\n * @param _self Buffer to access.\\n * @param _valueA First value to push to the buffer.\\n * @param _valueA Second value to push to the buffer.\\n */\\n function push2(\\n RingBuffer storage _self,\\n bytes32 _valueA,\\n bytes32 _valueB\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n _self.push2(\\n _valueA,\\n _valueB,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Retrieves an element from the buffer.\\n * @param _self Buffer to access.\\n * @param _index Element index to retrieve.\\n * @return Value of the element at the given index.\\n */\\n function get(\\n RingBuffer storage _self,\\n uint256 _index\\n )\\n internal\\n view\\n returns (\\n bytes32 \\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n require(\\n _index < ctx.globalIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n Buffer storage prevBuffer = _self.getBuffer(ctx.currBufferIndex + 1);\\n\\n if (_index >= ctx.currResetIndex) {\\n // We're trying to load an element from the current buffer.\\n // Relative index is just the difference from the reset index.\\n uint256 relativeIndex = _index - ctx.currResetIndex;\\n\\n // Shouldn't happen but why not check.\\n require(\\n relativeIndex < currBuffer.length,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n return currBuffer.buf[relativeIndex];\\n } else {\\n // We're trying to load an element from the previous buffer.\\n // Relative index is the difference from the reset index in the other direction.\\n uint256 relativeIndex = ctx.currResetIndex - _index;\\n\\n // Condition only fails in the case that we deleted and flipped buffers.\\n require(\\n ctx.currResetIndex > ctx.prevResetIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n // Make sure we're not trying to read beyond the array.\\n require(\\n relativeIndex <= prevBuffer.length,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n return prevBuffer.buf[prevBuffer.length - relativeIndex];\\n }\\n }\\n\\n /**\\n * Deletes all elements after (and including) a given index.\\n * @param _self Buffer to access.\\n * @param _index Index of the element to delete from (inclusive).\\n * @param _extraData Optional global extra data.\\n */\\n function deleteElementsAfterInclusive(\\n RingBuffer storage _self,\\n uint40 _index,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n require(\\n _index < ctx.globalIndex && _index >= ctx.prevResetIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n Buffer storage prevBuffer = _self.getBuffer(ctx.currBufferIndex + 1);\\n\\n if (_index < ctx.currResetIndex) {\\n // We're switching back to the previous buffer.\\n // Reduce the buffer index, set the current reset index back to match the previous one.\\n // We use the equality of these two values to prevent reading beyond this buffer.\\n ctx.currBufferIndex--;\\n ctx.currResetIndex = ctx.prevResetIndex;\\n }\\n\\n // Set our global index and extra data, save the context.\\n ctx.globalIndex = _index;\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Deletes all elements after (and including) a given index.\\n * @param _self Buffer to access.\\n * @param _index Index of the element to delete from (inclusive).\\n */\\n function deleteElementsAfterInclusive(\\n RingBuffer storage _self,\\n uint40 _index\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n _self.deleteElementsAfterInclusive(\\n _index,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Retrieves the current global index.\\n * @param _self Buffer to access.\\n * @return Current global index.\\n */\\n function getLength(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n uint40\\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n return ctx.globalIndex;\\n }\\n\\n /**\\n * Changes current global extra data.\\n * @param _self Buffer to access.\\n * @param _extraData New global extra data.\\n */\\n function setExtraData(\\n RingBuffer storage _self,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Retrieves the current global extra data.\\n * @param _self Buffer to access.\\n * @return Current global extra data.\\n */\\n function getExtraData(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n bytes27\\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n return ctx.extraData;\\n }\\n\\n /**\\n * Sets the current ring buffer context.\\n * @param _self Buffer to access.\\n * @param _ctx Current ring buffer context.\\n */\\n function setContext(\\n RingBuffer storage _self,\\n RingBufferContext memory _ctx\\n )\\n internal\\n returns (\\n bytes32\\n )\\n {\\n bytes32 contextA;\\n bytes32 contextB;\\n\\n uint40 globalIndex = _ctx.globalIndex;\\n bytes27 extraData = _ctx.extraData;\\n assembly {\\n contextA := globalIndex\\n contextA := or(contextA, extraData)\\n }\\n\\n uint64 currBufferIndex = _ctx.currBufferIndex;\\n uint40 prevResetIndex = _ctx.prevResetIndex;\\n uint40 currResetIndex = _ctx.currResetIndex;\\n assembly {\\n contextB := currBufferIndex\\n contextB := or(contextB, shl(64, prevResetIndex))\\n contextB := or(contextB, shl(104, currResetIndex))\\n }\\n\\n if (_self.contextA != contextA) {\\n _self.contextA = contextA;\\n }\\n\\n if (_self.contextB != contextB) {\\n _self.contextB = contextB;\\n }\\n }\\n\\n /**\\n * Retrieves the current ring buffer context.\\n * @param _self Buffer to access.\\n * @return Current ring buffer context.\\n */\\n function getContext(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n RingBufferContext memory\\n )\\n {\\n bytes32 contextA = _self.contextA;\\n bytes32 contextB = _self.contextB;\\n\\n uint40 globalIndex;\\n bytes27 extraData;\\n assembly {\\n globalIndex := and(contextA, 0x000000000000000000000000000000000000000000000000000000FFFFFFFFFF)\\n extraData := and(contextA, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000)\\n }\\n\\n uint64 currBufferIndex;\\n uint40 prevResetIndex;\\n uint40 currResetIndex;\\n assembly {\\n currBufferIndex := and(contextB, 0x000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFF)\\n prevResetIndex := shr(64, and(contextB, 0x00000000000000000000000000000000000000FFFFFFFFFF0000000000000000))\\n currResetIndex := shr(104, and(contextB, 0x0000000000000000000000000000FFFFFFFFFF00000000000000000000000000))\\n }\\n\\n return RingBufferContext({\\n globalIndex: globalIndex,\\n extraData: extraData,\\n currBufferIndex: currBufferIndex,\\n prevResetIndex: prevResetIndex,\\n currResetIndex: currResetIndex\\n });\\n }\\n\\n /**\\n * Retrieves the a buffer from the ring buffer by index.\\n * @param _self Buffer to access.\\n * @param _which Index of the sub buffer to access.\\n * @return Sub buffer for the index.\\n */\\n function getBuffer(\\n RingBuffer storage _self,\\n uint256 _which\\n )\\n internal\\n view\\n returns (\\n Buffer storage\\n )\\n {\\n return _which % 2 == 0 ? _self.bufferA : _self.bufferB;\\n }\\n}\\n\",\"keccak256\":\"0x0c4bb53aba64441b2ec26e7a13de8f04f104bb654e550ccc30db500cac33d2a3\"}},\"version\":1}",
"bytecode": "0x60806040523480156200001157600080fd5b50604051620013f3380380620013f3833981810160405260408110156200003757600080fd5b8151602083018051604051929492938301929190846401000000008211156200005f57600080fd5b9083019060208201858111156200007557600080fd5b82516401000000008111828201881017156200009057600080fd5b82525081516020918201929091019080838360005b83811015620000bf578181015183820152602001620000a5565b50505050905090810190601f168015620000ed5780820380516001836020036101000a031916815260200191505b506040525050600080546001600160a01b0319166001600160a01b038516179055508051620001249060019060208401906200012d565b505050620001d9565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001655760008555620001b0565b82601f106200018057805160ff1916838001178555620001b0565b82800160010185558215620001b0579182015b82811115620001b057825182559160200191906001019062000193565b50620001be929150620001c2565b5090565b5b80821115620001be5760008155600101620001c3565b61120a80620001e96000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80634651d91e1161008c578063b298e36b11610066578063b298e36b14610315578063ccf8f96914610332578063d41c021814610355578063fa9e936c14610378576100cf565b80634651d91e1461025e5780638da5cb5b1461027b5780639507d39a146102f8576100cf565b806314f22255146100d4578063167fd681146101075780631f7b6d32146101325780632015276c1461014c57806329061de214610177578063461a44781461019c575b600080fd5b610105600480360360608110156100ea57600080fd5b508035906020810135906040013564ffffffffff1916610395565b005b6101056004803603604081101561011d57600080fd5b508035906020013564ffffffffff191661048c565b61013a61054c565b60408051918252519081900360200190f35b6101056004803603604081101561016257600080fd5b508035906020013564ffffffffff1916610564565b6101056004803603602081101561018d57600080fd5b503564ffffffffff1916610620565b610242600480360360208110156101b257600080fd5b8101906020810181356401000000008111156101cd57600080fd5b8201836020820111156101df57600080fd5b8035906020019184600183028401116401000000008311171561020157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506106de945050505050565b604080516001600160a01b039092168252519081900360200190f35b6101056004803603602081101561027457600080fd5b50356107ba565b610283610875565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102bd5781810151838201526020016102a5565b50505050905090810190601f1680156102ea5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61013a6004803603602081101561030e57600080fd5b5035610902565b6101056004803603602081101561032b57600080fd5b503561091c565b61033a6109d7565b6040805164ffffffffff199092168252519081900360200190f35b6101056004803603604081101561036b57600080fd5b50803590602001356109e8565b6101056004803603602081101561038e57600080fd5b5035610aa4565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261042b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b820191906000526020600020905b81548152906001019060200180831161040457829003601f168201915b50505050506106de565b6001600160a01b0316336001600160a01b03161461047a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6104876002848484610b59565b505050565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526104ed93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461053c5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610b75565b5050565b60006105586002610cb7565b64ffffffffff16905090565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526105c593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106145760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610ccb565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261068193909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106d05760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610dca565b50565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b8381101561073e578181015183820152602001610726565b50505050905090810190601f16801561076b5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561078857600080fd5b505afa15801561079c573d6000803e3d6000fd5b505050506040513d60208110156107b257600080fd5b505192915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261081b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461086a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610def565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108fa5780601f106108cf576101008083540402835291602001916108fa565b820191906000526020600020905b8154815290600101906020018083116108dd57829003601f168201915b505050505081565b6000610916600264ffffffffff8416610e15565b92915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261097d93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146109cc5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db60028261101e565b60006109e36002611044565b905090565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610a4993909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610a985760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6105486002838361105b565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610b0593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610b545760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b600855565b610b64848483610ccb565b610b6f848383610ccb565b50505050565b6000610b8084611083565b9050806000015164ffffffffff168364ffffffffff16108015610bb55750806060015164ffffffffff168364ffffffffff1610155b610bfd576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610c20826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610c48836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168564ffffffffff161015610c8c576040830180516000190167ffffffffffffffff169052606083015164ffffffffff1660808401525b64ffffffffff8516835264ffffffffff1984166020840152610cae8684611103565b50505050505050565b600080610cc383611083565b519392505050565b6000610cd684611083565b90506000610cfb826040015167ffffffffffffffff16866110e390919063ffffffff16565b8054909150610d0957601081555b8054608083015183510364ffffffffff1610610d80578460060154826080015164ffffffffff161015610d785760408201805160010167ffffffffffffffff169081905260808301805164ffffffffff90811660608601528451169052610d719086906110e3565b9050610d80565b805460020281555b608082015182510364ffffffffff9081166000818152600184810160209081526040909220889055855101909216845264ffffffffff19851691840191909152610cae8684611103565b6000610dd583611083565b64ffffffffff19831660208201529050610b6f8382611103565b6000610dfa83611083565b905061048782826020015185610b759092919063ffffffff16565b600080610e2184611083565b805190915064ffffffffff168310610e77576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610e9a826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610ec2836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168510610f4f576080830151825464ffffffffff9091168603908110610f33576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000908152600190920160205250604090205491506109169050565b6080830151606084015164ffffffffff9182168781039290911610610fb2576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154811115610fff576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154036000908152600190910160205260409020549250610916915050565b600061102983611083565b905061048782826020015185610ccb9092919063ffffffff16565b60008061105083611083565b602001519392505050565b600061106684611083565b9050610b6f8383836020015187610b59909392919063ffffffff16565b61108b611162565b5080546001909101546040805160a08101825264ffffffffff808516825264ffffffffff19909416602082015267ffffffffffffffff8316818301529082901c8316606082015260689190911c909116608082015290565b600060028206156110f757826004016110fc565b826002015b9392505050565b80516020820151604080840151606085015160808601518754600096868117969584901b8517606884901b17959094909390929091871461114257868a555b858a60010154146111555760018a018690555b5050505050505092915050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe4f564d5f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206f776e65722ea264697066735822122037f5f91f3a7302668798afaeee2c0c2d9aad06dfcc80e263efc2cd8f4842eebe64736f6c63430007060033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c80634651d91e1161008c578063b298e36b11610066578063b298e36b14610315578063ccf8f96914610332578063d41c021814610355578063fa9e936c14610378576100cf565b80634651d91e1461025e5780638da5cb5b1461027b5780639507d39a146102f8576100cf565b806314f22255146100d4578063167fd681146101075780631f7b6d32146101325780632015276c1461014c57806329061de214610177578063461a44781461019c575b600080fd5b610105600480360360608110156100ea57600080fd5b508035906020810135906040013564ffffffffff1916610395565b005b6101056004803603604081101561011d57600080fd5b508035906020013564ffffffffff191661048c565b61013a61054c565b60408051918252519081900360200190f35b6101056004803603604081101561016257600080fd5b508035906020013564ffffffffff1916610564565b6101056004803603602081101561018d57600080fd5b503564ffffffffff1916610620565b610242600480360360208110156101b257600080fd5b8101906020810181356401000000008111156101cd57600080fd5b8201836020820111156101df57600080fd5b8035906020019184600183028401116401000000008311171561020157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506106de945050505050565b604080516001600160a01b039092168252519081900360200190f35b6101056004803603602081101561027457600080fd5b50356107ba565b610283610875565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102bd5781810151838201526020016102a5565b50505050905090810190601f1680156102ea5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61013a6004803603602081101561030e57600080fd5b5035610902565b6101056004803603602081101561032b57600080fd5b503561091c565b61033a6109d7565b6040805164ffffffffff199092168252519081900360200190f35b6101056004803603604081101561036b57600080fd5b50803590602001356109e8565b6101056004803603602081101561038e57600080fd5b5035610aa4565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261042b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b820191906000526020600020905b81548152906001019060200180831161040457829003601f168201915b50505050506106de565b6001600160a01b0316336001600160a01b03161461047a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6104876002848484610b59565b505050565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526104ed93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461053c5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610b75565b5050565b60006105586002610cb7565b64ffffffffff16905090565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526105c593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106145760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610ccb565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261068193909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106d05760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610dca565b50565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b8381101561073e578181015183820152602001610726565b50505050905090810190601f16801561076b5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561078857600080fd5b505afa15801561079c573d6000803e3d6000fd5b505050506040513d60208110156107b257600080fd5b505192915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261081b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461086a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610def565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108fa5780601f106108cf576101008083540402835291602001916108fa565b820191906000526020600020905b8154815290600101906020018083116108dd57829003601f168201915b505050505081565b6000610916600264ffffffffff8416610e15565b92915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261097d93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146109cc5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db60028261101e565b60006109e36002611044565b905090565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610a4993909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610a985760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6105486002838361105b565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610b0593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610b545760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b600855565b610b64848483610ccb565b610b6f848383610ccb565b50505050565b6000610b8084611083565b9050806000015164ffffffffff168364ffffffffff16108015610bb55750806060015164ffffffffff168364ffffffffff1610155b610bfd576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610c20826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610c48836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168564ffffffffff161015610c8c576040830180516000190167ffffffffffffffff169052606083015164ffffffffff1660808401525b64ffffffffff8516835264ffffffffff1984166020840152610cae8684611103565b50505050505050565b600080610cc383611083565b519392505050565b6000610cd684611083565b90506000610cfb826040015167ffffffffffffffff16866110e390919063ffffffff16565b8054909150610d0957601081555b8054608083015183510364ffffffffff1610610d80578460060154826080015164ffffffffff161015610d785760408201805160010167ffffffffffffffff169081905260808301805164ffffffffff90811660608601528451169052610d719086906110e3565b9050610d80565b805460020281555b608082015182510364ffffffffff9081166000818152600184810160209081526040909220889055855101909216845264ffffffffff19851691840191909152610cae8684611103565b6000610dd583611083565b64ffffffffff19831660208201529050610b6f8382611103565b6000610dfa83611083565b905061048782826020015185610b759092919063ffffffff16565b600080610e2184611083565b805190915064ffffffffff168310610e77576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610e9a826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610ec2836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168510610f4f576080830151825464ffffffffff9091168603908110610f33576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000908152600190920160205250604090205491506109169050565b6080830151606084015164ffffffffff9182168781039290911610610fb2576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154811115610fff576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154036000908152600190910160205260409020549250610916915050565b600061102983611083565b905061048782826020015185610ccb9092919063ffffffff16565b60008061105083611083565b602001519392505050565b600061106684611083565b9050610b6f8383836020015187610b59909392919063ffffffff16565b61108b611162565b5080546001909101546040805160a08101825264ffffffffff808516825264ffffffffff19909416602082015267ffffffffffffffff8316818301529082901c8316606082015260689190911c909116608082015290565b600060028206156110f757826004016110fc565b826002015b9392505050565b80516020820151604080840151606085015160808601518754600096868117969584901b8517606884901b17959094909390929091871461114257868a555b858a60010154146111555760018a018690555b5050505050505092915050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe4f564d5f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206f776e65722ea264697066735822122037f5f91f3a7302668798afaeee2c0c2d9aad06dfcc80e263efc2cd8f4842eebe64736f6c63430007060033",
"devdoc": {
"kind": "dev",
"methods": {
"constructor": {
"params": {
"_libAddressManager": "Address of the Address Manager.",
"_owner": "Name of the contract that owns this container (will be resolved later)."
}
},
"deleteElementsAfterInclusive(uint256)": {
"params": {
"_index": "Object index to delete from."
}
},
"deleteElementsAfterInclusive(uint256,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_index": "Object index to delete from."
}
},
"get(uint256)": {
"params": {
"_index": "Index of the particular object to access."
},
"returns": {
"_0": "32 byte object value."
}
},
"getGlobalMetadata()": {
"returns": {
"_0": "Container global metadata field."
}
},
"length()": {
"returns": {
"_0": "Number of objects in the container."
}
},
"push(bytes32)": {
"params": {
"_object": "A 32 byte value to insert into the container."
}
},
"push(bytes32,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_object": "A 32 byte value to insert into the container."
}
},
"push2(bytes32,bytes32)": {
"params": {
"_objectA": "First 32 byte value to insert into the container.",
"_objectB": "Second 32 byte value to insert into the container."
}
},
"push2(bytes32,bytes32,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_objectA": "First 32 byte value to insert into the container.",
"_objectB": "Second 32 byte value to insert into the container."
}
},
"setGlobalMetadata(bytes27)": {
"params": {
"_globalMetadata": "New global metadata to set."
}
}
},
"title": "OVM_ChainStorageContainer",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {
"deleteElementsAfterInclusive(uint256)": {
"notice": "Removes all objects after and including a given index."
},
"deleteElementsAfterInclusive(uint256,bytes27)": {
"notice": "Removes all objects after and including a given index. Also allows setting the global metadata field."
},
"get(uint256)": {
"notice": "Retrieves an object from the container."
},
"getGlobalMetadata()": {
"notice": "Retrieves the container's global metadata field."
},
"length()": {
"notice": "Retrieves the number of objects stored in the container."
},
"push(bytes32)": {
"notice": "Pushes an object into the container."
},
"push(bytes32,bytes27)": {
"notice": "Pushes an object into the container. Function allows setting the global metadata since we'll need to touch the \"length\" storage slot anyway, which also contains the global metadata (it's an optimization)."
},
"push2(bytes32,bytes32)": {
"notice": "Pushes two objects into the container at the same time. A useful optimization."
},
"push2(bytes32,bytes32,bytes27)": {
"notice": "Pushes two objects into the container at the same time. Also allows setting the global metadata field."
},
"setGlobalMetadata(bytes27)": {
"notice": "Sets the container's global metadata field. We're using `bytes27` here because we use five bytes to maintain the length of the underlying data structure, meaning we have an extra 27 bytes to store arbitrary data."
},
"setNextOverwritableIndex(uint256)": {
"notice": "Marks an index as overwritable, meaing the underlying buffer can start to write values over any objects before and including the given index."
}
},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 11707,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "libAddressManager",
"offset": 0,
"slot": "0",
"type": "t_contract(Lib_AddressManager)11700"
},
{
"astId": 2888,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "owner",
"offset": 0,
"slot": "1",
"type": "t_string_storage"
},
{
"astId": 2890,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "buffer",
"offset": 0,
"slot": "2",
"type": "t_struct(RingBuffer)16365_storage"
}
],
"types": {
"t_bytes32": {
"encoding": "inplace",
"label": "bytes32",
"numberOfBytes": "32"
},
"t_contract(Lib_AddressManager)11700": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
},
"t_mapping(t_uint256,t_bytes32)": {
"encoding": "mapping",
"key": "t_uint256",
"label": "mapping(uint256 => bytes32)",
"numberOfBytes": "32",
"value": "t_bytes32"
},
"t_string_storage": {
"encoding": "bytes",
"label": "string",
"numberOfBytes": "32"
},
"t_struct(Buffer)16354_storage": {
"encoding": "inplace",
"label": "struct Lib_RingBuffer.Buffer",
"members": [
{
"astId": 16349,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "length",
"offset": 0,
"slot": "0",
"type": "t_uint256"
},
{
"astId": 16353,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "buf",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_uint256,t_bytes32)"
}
],
"numberOfBytes": "64"
},
"t_struct(RingBuffer)16365_storage": {
"encoding": "inplace",
"label": "struct Lib_RingBuffer.RingBuffer",
"members": [
{
"astId": 16356,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "contextA",
"offset": 0,
"slot": "0",
"type": "t_bytes32"
},
{
"astId": 16358,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "contextB",
"offset": 0,
"slot": "1",
"type": "t_bytes32"
},
{
"astId": 16360,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "bufferA",
"offset": 0,
"slot": "2",
"type": "t_struct(Buffer)16354_storage"
},
{
"astId": 16362,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "bufferB",
"offset": 0,
"slot": "4",
"type": "t_struct(Buffer)16354_storage"
},
{
"astId": 16364,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "nextOverwritableIndex",
"offset": 0,
"slot": "6",
"type": "t_uint256"
}
],
"numberOfBytes": "224"
},
"t_uint256": {
"encoding": "inplace",
"label": "uint256",
"numberOfBytes": "32"
}
}
}
}
\ No newline at end of file
{
"address": "0xcFf7ed66bC3C1eA64c6394FEBb2408D16c6cBC5E",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_libAddressManager",
"type": "address"
},
{
"internalType": "string",
"name": "_owner",
"type": "string"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "deleteElementsAfterInclusive",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "deleteElementsAfterInclusive",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "get",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getGlobalMetadata",
"outputs": [
{
"internalType": "bytes27",
"name": "",
"type": "bytes27"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "length",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_object",
"type": "bytes32"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "push",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_object",
"type": "bytes32"
}
],
"name": "push",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_objectA",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_objectB",
"type": "bytes32"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "push2",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_objectA",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_objectB",
"type": "bytes32"
}
],
"name": "push2",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "resolve",
"outputs": [
{
"internalType": "address",
"name": "_contract",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "setGlobalMetadata",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "setNextOverwritableIndex",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"transactionHash": "0x5168f58ec0e907689b4729909da455ae3f39f09f6808faafde219c910e6ef404",
"receipt": {
"to": null,
"from": "0x558ba9b8d78713fbf768c1f8a584485B4003f43F",
"contractAddress": "0x02A1e0C8d29Bf76989F18D56cd502Eba0AC0D212",
"transactionIndex": 1,
"gasUsed": "1103654",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x0a7b99f8dfb069836b98855e10f4febe0718604be13cfe614132e592cf0a134e",
"transactionHash": "0x5168f58ec0e907689b4729909da455ae3f39f09f6808faafde219c910e6ef404",
"logs": [],
"blockNumber": 4573381,
"cumulativeGasUsed": "1128075",
"status": 1,
"byzantium": true
},
"args": [
"0x72e6F5244828C10737cbC9659378B207246D26B2",
"OVM_StateCommitmentChain"
],
"solcInputHash": "cebcb515c1a9c570d96e0b8f6fd237e2",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_owner\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"deleteElementsAfterInclusive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"deleteElementsAfterInclusive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"get\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGlobalMetadata\",\"outputs\":[{\"internalType\":\"bytes27\",\"name\":\"\",\"type\":\"bytes27\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"length\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_object\",\"type\":\"bytes32\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"push\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_object\",\"type\":\"bytes32\"}],\"name\":\"push\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_objectA\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_objectB\",\"type\":\"bytes32\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"push2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_objectA\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_objectB\",\"type\":\"bytes32\"}],\"name\":\"push2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"setGlobalMetadata\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"setNextOverwritableIndex\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_libAddressManager\":\"Address of the Address Manager.\",\"_owner\":\"Name of the contract that owns this container (will be resolved later).\"}},\"deleteElementsAfterInclusive(uint256)\":{\"params\":{\"_index\":\"Object index to delete from.\"}},\"deleteElementsAfterInclusive(uint256,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_index\":\"Object index to delete from.\"}},\"get(uint256)\":{\"params\":{\"_index\":\"Index of the particular object to access.\"},\"returns\":{\"_0\":\"32 byte object value.\"}},\"getGlobalMetadata()\":{\"returns\":{\"_0\":\"Container global metadata field.\"}},\"length()\":{\"returns\":{\"_0\":\"Number of objects in the container.\"}},\"push(bytes32)\":{\"params\":{\"_object\":\"A 32 byte value to insert into the container.\"}},\"push(bytes32,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_object\":\"A 32 byte value to insert into the container.\"}},\"push2(bytes32,bytes32)\":{\"params\":{\"_objectA\":\"First 32 byte value to insert into the container.\",\"_objectB\":\"Second 32 byte value to insert into the container.\"}},\"push2(bytes32,bytes32,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_objectA\":\"First 32 byte value to insert into the container.\",\"_objectB\":\"Second 32 byte value to insert into the container.\"}},\"setGlobalMetadata(bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata to set.\"}}},\"title\":\"OVM_ChainStorageContainer\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deleteElementsAfterInclusive(uint256)\":{\"notice\":\"Removes all objects after and including a given index.\"},\"deleteElementsAfterInclusive(uint256,bytes27)\":{\"notice\":\"Removes all objects after and including a given index. Also allows setting the global metadata field.\"},\"get(uint256)\":{\"notice\":\"Retrieves an object from the container.\"},\"getGlobalMetadata()\":{\"notice\":\"Retrieves the container's global metadata field.\"},\"length()\":{\"notice\":\"Retrieves the number of objects stored in the container.\"},\"push(bytes32)\":{\"notice\":\"Pushes an object into the container.\"},\"push(bytes32,bytes27)\":{\"notice\":\"Pushes an object into the container. Function allows setting the global metadata since we'll need to touch the \\\"length\\\" storage slot anyway, which also contains the global metadata (it's an optimization).\"},\"push2(bytes32,bytes32)\":{\"notice\":\"Pushes two objects into the container at the same time. A useful optimization.\"},\"push2(bytes32,bytes32,bytes27)\":{\"notice\":\"Pushes two objects into the container at the same time. Also allows setting the global metadata field.\"},\"setGlobalMetadata(bytes27)\":{\"notice\":\"Sets the container's global metadata field. We're using `bytes27` here because we use five bytes to maintain the length of the underlying data structure, meaning we have an extra 27 bytes to store arbitrary data.\"},\"setNextOverwritableIndex(uint256)\":{\"notice\":\"Marks an index as overwritable, meaing the underlying buffer can start to write values over any objects before and including the given index.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol\":\"OVM_ChainStorageContainer\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol\":{\"content\":\"pragma solidity ^0.7.0;\\n\\n/* Library Imports */\\nimport { Lib_RingBuffer } from \\\"../../libraries/utils/Lib_RingBuffer.sol\\\";\\nimport { Lib_AddressResolver } from \\\"../../libraries/resolver/Lib_AddressResolver.sol\\\";\\n\\n/* Interface Imports */\\nimport { iOVM_ChainStorageContainer } from \\\"../../iOVM/chain/iOVM_ChainStorageContainer.sol\\\";\\n\\n/**\\n * @title OVM_ChainStorageContainer\\n */\\ncontract OVM_ChainStorageContainer is iOVM_ChainStorageContainer, Lib_AddressResolver {\\n\\n /*************\\n * Libraries *\\n *************/\\n\\n using Lib_RingBuffer for Lib_RingBuffer.RingBuffer;\\n\\n\\n /*************\\n * Variables *\\n *************/\\n\\n string public owner;\\n Lib_RingBuffer.RingBuffer internal buffer;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n \\n /**\\n * @param _libAddressManager Address of the Address Manager.\\n * @param _owner Name of the contract that owns this container (will be resolved later).\\n */\\n constructor(\\n address _libAddressManager,\\n string memory _owner\\n )\\n Lib_AddressResolver(_libAddressManager)\\n {\\n owner = _owner;\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n \\n modifier onlyOwner() {\\n require(\\n msg.sender == resolve(owner),\\n \\\"OVM_ChainStorageContainer: Function can only be called by the owner.\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function setGlobalMetadata(\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n return buffer.setExtraData(_globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function getGlobalMetadata()\\n override\\n public\\n view\\n returns (\\n bytes27\\n )\\n {\\n return buffer.getExtraData();\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function length()\\n override\\n public\\n view\\n returns (\\n uint256\\n )\\n {\\n return uint256(buffer.getLength());\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push(\\n bytes32 _object\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push(_object);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push(\\n bytes32 _object,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push(_object, _globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push2(_objectA, _objectB);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push2(_objectA, _objectB, _globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function get(\\n uint256 _index\\n )\\n override\\n public\\n view\\n returns (\\n bytes32\\n )\\n {\\n return buffer.get(uint40(_index));\\n }\\n \\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.deleteElementsAfterInclusive(\\n uint40(_index)\\n );\\n }\\n \\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.deleteElementsAfterInclusive(\\n uint40(_index),\\n _globalMetadata\\n );\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function setNextOverwritableIndex(\\n uint256 _index\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.nextOverwritableIndex = _index;\\n }\\n}\\n\",\"keccak256\":\"0xc722e9528988810bd754002dfe3923bc9ac9252c1d981c4803fd5053603bfb11\"},\"contracts/optimistic-ethereum/iOVM/chain/iOVM_ChainStorageContainer.sol\":{\"content\":\"pragma solidity ^0.7.0;\\n\\n/**\\n * @title iOVM_ChainStorageContainer\\n */\\ninterface iOVM_ChainStorageContainer {\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Sets the container's global metadata field. We're using `bytes27` here because we use five\\n * bytes to maintain the length of the underlying data structure, meaning we have an extra\\n * 27 bytes to store arbitrary data.\\n * @param _globalMetadata New global metadata to set.\\n */\\n function setGlobalMetadata(\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Retrieves the container's global metadata field.\\n * @return Container global metadata field.\\n */\\n function getGlobalMetadata()\\n external\\n view\\n returns (\\n bytes27\\n );\\n\\n /**\\n * Retrieves the number of objects stored in the container.\\n * @return Number of objects in the container.\\n */\\n function length()\\n external\\n view\\n returns (\\n uint256\\n );\\n\\n /**\\n * Pushes an object into the container.\\n * @param _object A 32 byte value to insert into the container.\\n */\\n function push(\\n bytes32 _object\\n )\\n external;\\n\\n /**\\n * Pushes an object into the container. Function allows setting the global metadata since\\n * we'll need to touch the \\\"length\\\" storage slot anyway, which also contains the global\\n * metadata (it's an optimization).\\n * @param _object A 32 byte value to insert into the container.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function push(\\n bytes32 _object,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Pushes two objects into the container at the same time. A useful optimization.\\n * @param _objectA First 32 byte value to insert into the container.\\n * @param _objectB Second 32 byte value to insert into the container.\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB\\n )\\n external;\\n\\n /**\\n * Pushes two objects into the container at the same time. Also allows setting the global\\n * metadata field.\\n * @param _objectA First 32 byte value to insert into the container.\\n * @param _objectB Second 32 byte value to insert into the container.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Retrieves an object from the container.\\n * @param _index Index of the particular object to access.\\n * @return 32 byte object value.\\n */\\n function get(\\n uint256 _index\\n )\\n external\\n view\\n returns (\\n bytes32\\n );\\n\\n /**\\n * Removes all objects after and including a given index.\\n * @param _index Object index to delete from.\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index\\n )\\n external;\\n\\n /**\\n * Removes all objects after and including a given index. Also allows setting the global\\n * metadata field.\\n * @param _index Object index to delete from.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Marks an index as overwritable, meaing the underlying buffer can start to write values over\\n * any objects before and including the given index.\\n */\\n function setNextOverwritableIndex(\\n uint256 _index\\n )\\n external;\\n}\\n\",\"keccak256\":\"0xcfca7da85b35d94c27581c2460b0d48fd0cc51fa72670cc7a2f7f760fb21a2f0\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0xdf802e1cc6474df913626991e9fca3835c620a519f397afe04bf9c260e723257\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_AddressResolver\\n */\\ncontract Lib_AddressResolver {\\n\\n /*******************************************\\n * Contract Variables: Contract References *\\n *******************************************/\\n\\n Lib_AddressManager internal libAddressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n */\\n constructor(\\n address _libAddressManager\\n ) public {\\n libAddressManager = Lib_AddressManager(_libAddressManager);\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function resolve(\\n string memory _name\\n )\\n public\\n view\\n returns (\\n address _contract\\n )\\n {\\n return libAddressManager.getAddress(_name);\\n }\\n}\\n\",\"keccak256\":\"0xf3b9d78b309ddeec259ce3e0e1cfdef3ca40938e9a81971b28ce2b8ea327f533\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() internal {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xe0409fbd236d16ca6be439d9d97dd36d0d9a0697ee0062d49588b9d29c248e47\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/utils/Lib_RingBuffer.sol\":{\"content\":\"pragma solidity ^0.7.0;\\n\\nlibrary Lib_RingBuffer {\\n using Lib_RingBuffer for RingBuffer;\\n\\n /***********\\n * Structs *\\n ***********/\\n\\n struct Buffer {\\n uint256 length;\\n mapping (uint256 => bytes32) buf;\\n }\\n\\n struct RingBuffer {\\n bytes32 contextA;\\n bytes32 contextB;\\n Buffer bufferA;\\n Buffer bufferB;\\n uint256 nextOverwritableIndex;\\n }\\n\\n struct RingBufferContext {\\n // contextA\\n uint40 globalIndex;\\n bytes27 extraData;\\n\\n // contextB\\n uint64 currBufferIndex;\\n uint40 prevResetIndex;\\n uint40 currResetIndex;\\n }\\n\\n\\n /*************\\n * Constants *\\n *************/\\n\\n uint256 constant MIN_CAPACITY = 16;\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * Pushes a single element to the buffer.\\n * @param _self Buffer to access.\\n * @param _value Value to push to the buffer.\\n * @param _extraData Optional global extra data.\\n */\\n function push(\\n RingBuffer storage _self,\\n bytes32 _value,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n\\n // Set a minimum capacity.\\n if (currBuffer.length == 0) {\\n currBuffer.length = MIN_CAPACITY;\\n }\\n\\n // Check if we need to expand the buffer.\\n if (ctx.globalIndex - ctx.currResetIndex >= currBuffer.length) {\\n if (ctx.currResetIndex < _self.nextOverwritableIndex) {\\n // We're going to overwrite the inactive buffer.\\n // Bump the buffer index, reset the delete offset, and set our reset indices.\\n ctx.currBufferIndex++;\\n ctx.prevResetIndex = ctx.currResetIndex;\\n ctx.currResetIndex = ctx.globalIndex;\\n\\n // Swap over to the next buffer.\\n currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n } else {\\n // We're not overwriting yet, double the length of the current buffer.\\n currBuffer.length *= 2;\\n }\\n }\\n\\n // Index to write to is the difference of the global and reset indices.\\n uint256 writeHead = ctx.globalIndex - ctx.currResetIndex;\\n currBuffer.buf[writeHead] = _value;\\n\\n // Bump the global index and insert our extra data, then save the context.\\n ctx.globalIndex++;\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Pushes a single element to the buffer.\\n * @param _self Buffer to access.\\n * @param _value Value to push to the buffer.\\n */\\n function push(\\n RingBuffer storage _self,\\n bytes32 _value\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n \\n _self.push(\\n _value,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Pushes a two elements to the buffer.\\n * @param _self Buffer to access.\\n * @param _valueA First value to push to the buffer.\\n * @param _valueA Second value to push to the buffer.\\n * @param _extraData Optional global extra data.\\n */\\n function push2(\\n RingBuffer storage _self,\\n bytes32 _valueA,\\n bytes32 _valueB,\\n bytes27 _extraData\\n )\\n internal\\n {\\n _self.push(_valueA, _extraData);\\n _self.push(_valueB, _extraData);\\n }\\n\\n /**\\n * Pushes a two elements to the buffer.\\n * @param _self Buffer to access.\\n * @param _valueA First value to push to the buffer.\\n * @param _valueA Second value to push to the buffer.\\n */\\n function push2(\\n RingBuffer storage _self,\\n bytes32 _valueA,\\n bytes32 _valueB\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n _self.push2(\\n _valueA,\\n _valueB,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Retrieves an element from the buffer.\\n * @param _self Buffer to access.\\n * @param _index Element index to retrieve.\\n * @return Value of the element at the given index.\\n */\\n function get(\\n RingBuffer storage _self,\\n uint256 _index\\n )\\n internal\\n view\\n returns (\\n bytes32 \\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n require(\\n _index < ctx.globalIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n Buffer storage prevBuffer = _self.getBuffer(ctx.currBufferIndex + 1);\\n\\n if (_index >= ctx.currResetIndex) {\\n // We're trying to load an element from the current buffer.\\n // Relative index is just the difference from the reset index.\\n uint256 relativeIndex = _index - ctx.currResetIndex;\\n\\n // Shouldn't happen but why not check.\\n require(\\n relativeIndex < currBuffer.length,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n return currBuffer.buf[relativeIndex];\\n } else {\\n // We're trying to load an element from the previous buffer.\\n // Relative index is the difference from the reset index in the other direction.\\n uint256 relativeIndex = ctx.currResetIndex - _index;\\n\\n // Condition only fails in the case that we deleted and flipped buffers.\\n require(\\n ctx.currResetIndex > ctx.prevResetIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n // Make sure we're not trying to read beyond the array.\\n require(\\n relativeIndex <= prevBuffer.length,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n return prevBuffer.buf[prevBuffer.length - relativeIndex];\\n }\\n }\\n\\n /**\\n * Deletes all elements after (and including) a given index.\\n * @param _self Buffer to access.\\n * @param _index Index of the element to delete from (inclusive).\\n * @param _extraData Optional global extra data.\\n */\\n function deleteElementsAfterInclusive(\\n RingBuffer storage _self,\\n uint40 _index,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n require(\\n _index < ctx.globalIndex && _index >= ctx.prevResetIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n Buffer storage prevBuffer = _self.getBuffer(ctx.currBufferIndex + 1);\\n\\n if (_index < ctx.currResetIndex) {\\n // We're switching back to the previous buffer.\\n // Reduce the buffer index, set the current reset index back to match the previous one.\\n // We use the equality of these two values to prevent reading beyond this buffer.\\n ctx.currBufferIndex--;\\n ctx.currResetIndex = ctx.prevResetIndex;\\n }\\n\\n // Set our global index and extra data, save the context.\\n ctx.globalIndex = _index;\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Deletes all elements after (and including) a given index.\\n * @param _self Buffer to access.\\n * @param _index Index of the element to delete from (inclusive).\\n */\\n function deleteElementsAfterInclusive(\\n RingBuffer storage _self,\\n uint40 _index\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n _self.deleteElementsAfterInclusive(\\n _index,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Retrieves the current global index.\\n * @param _self Buffer to access.\\n * @return Current global index.\\n */\\n function getLength(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n uint40\\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n return ctx.globalIndex;\\n }\\n\\n /**\\n * Changes current global extra data.\\n * @param _self Buffer to access.\\n * @param _extraData New global extra data.\\n */\\n function setExtraData(\\n RingBuffer storage _self,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Retrieves the current global extra data.\\n * @param _self Buffer to access.\\n * @return Current global extra data.\\n */\\n function getExtraData(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n bytes27\\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n return ctx.extraData;\\n }\\n\\n /**\\n * Sets the current ring buffer context.\\n * @param _self Buffer to access.\\n * @param _ctx Current ring buffer context.\\n */\\n function setContext(\\n RingBuffer storage _self,\\n RingBufferContext memory _ctx\\n )\\n internal\\n returns (\\n bytes32\\n )\\n {\\n bytes32 contextA;\\n bytes32 contextB;\\n\\n uint40 globalIndex = _ctx.globalIndex;\\n bytes27 extraData = _ctx.extraData;\\n assembly {\\n contextA := globalIndex\\n contextA := or(contextA, extraData)\\n }\\n\\n uint64 currBufferIndex = _ctx.currBufferIndex;\\n uint40 prevResetIndex = _ctx.prevResetIndex;\\n uint40 currResetIndex = _ctx.currResetIndex;\\n assembly {\\n contextB := currBufferIndex\\n contextB := or(contextB, shl(64, prevResetIndex))\\n contextB := or(contextB, shl(104, currResetIndex))\\n }\\n\\n if (_self.contextA != contextA) {\\n _self.contextA = contextA;\\n }\\n\\n if (_self.contextB != contextB) {\\n _self.contextB = contextB;\\n }\\n }\\n\\n /**\\n * Retrieves the current ring buffer context.\\n * @param _self Buffer to access.\\n * @return Current ring buffer context.\\n */\\n function getContext(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n RingBufferContext memory\\n )\\n {\\n bytes32 contextA = _self.contextA;\\n bytes32 contextB = _self.contextB;\\n\\n uint40 globalIndex;\\n bytes27 extraData;\\n assembly {\\n globalIndex := and(contextA, 0x000000000000000000000000000000000000000000000000000000FFFFFFFFFF)\\n extraData := and(contextA, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000)\\n }\\n\\n uint64 currBufferIndex;\\n uint40 prevResetIndex;\\n uint40 currResetIndex;\\n assembly {\\n currBufferIndex := and(contextB, 0x000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFF)\\n prevResetIndex := shr(64, and(contextB, 0x00000000000000000000000000000000000000FFFFFFFFFF0000000000000000))\\n currResetIndex := shr(104, and(contextB, 0x0000000000000000000000000000FFFFFFFFFF00000000000000000000000000))\\n }\\n\\n return RingBufferContext({\\n globalIndex: globalIndex,\\n extraData: extraData,\\n currBufferIndex: currBufferIndex,\\n prevResetIndex: prevResetIndex,\\n currResetIndex: currResetIndex\\n });\\n }\\n\\n /**\\n * Retrieves the a buffer from the ring buffer by index.\\n * @param _self Buffer to access.\\n * @param _which Index of the sub buffer to access.\\n * @return Sub buffer for the index.\\n */\\n function getBuffer(\\n RingBuffer storage _self,\\n uint256 _which\\n )\\n internal\\n view\\n returns (\\n Buffer storage\\n )\\n {\\n return _which % 2 == 0 ? _self.bufferA : _self.bufferB;\\n }\\n}\\n\",\"keccak256\":\"0x0c4bb53aba64441b2ec26e7a13de8f04f104bb654e550ccc30db500cac33d2a3\"}},\"version\":1}",
"bytecode": "0x60806040523480156200001157600080fd5b50604051620013f3380380620013f3833981810160405260408110156200003757600080fd5b8151602083018051604051929492938301929190846401000000008211156200005f57600080fd5b9083019060208201858111156200007557600080fd5b82516401000000008111828201881017156200009057600080fd5b82525081516020918201929091019080838360005b83811015620000bf578181015183820152602001620000a5565b50505050905090810190601f168015620000ed5780820380516001836020036101000a031916815260200191505b506040525050600080546001600160a01b0319166001600160a01b038516179055508051620001249060019060208401906200012d565b505050620001d9565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001655760008555620001b0565b82601f106200018057805160ff1916838001178555620001b0565b82800160010185558215620001b0579182015b82811115620001b057825182559160200191906001019062000193565b50620001be929150620001c2565b5090565b5b80821115620001be5760008155600101620001c3565b61120a80620001e96000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80634651d91e1161008c578063b298e36b11610066578063b298e36b14610315578063ccf8f96914610332578063d41c021814610355578063fa9e936c14610378576100cf565b80634651d91e1461025e5780638da5cb5b1461027b5780639507d39a146102f8576100cf565b806314f22255146100d4578063167fd681146101075780631f7b6d32146101325780632015276c1461014c57806329061de214610177578063461a44781461019c575b600080fd5b610105600480360360608110156100ea57600080fd5b508035906020810135906040013564ffffffffff1916610395565b005b6101056004803603604081101561011d57600080fd5b508035906020013564ffffffffff191661048c565b61013a61054c565b60408051918252519081900360200190f35b6101056004803603604081101561016257600080fd5b508035906020013564ffffffffff1916610564565b6101056004803603602081101561018d57600080fd5b503564ffffffffff1916610620565b610242600480360360208110156101b257600080fd5b8101906020810181356401000000008111156101cd57600080fd5b8201836020820111156101df57600080fd5b8035906020019184600183028401116401000000008311171561020157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506106de945050505050565b604080516001600160a01b039092168252519081900360200190f35b6101056004803603602081101561027457600080fd5b50356107ba565b610283610875565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102bd5781810151838201526020016102a5565b50505050905090810190601f1680156102ea5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61013a6004803603602081101561030e57600080fd5b5035610902565b6101056004803603602081101561032b57600080fd5b503561091c565b61033a6109d7565b6040805164ffffffffff199092168252519081900360200190f35b6101056004803603604081101561036b57600080fd5b50803590602001356109e8565b6101056004803603602081101561038e57600080fd5b5035610aa4565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261042b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b820191906000526020600020905b81548152906001019060200180831161040457829003601f168201915b50505050506106de565b6001600160a01b0316336001600160a01b03161461047a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6104876002848484610b59565b505050565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526104ed93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461053c5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610b75565b5050565b60006105586002610cb7565b64ffffffffff16905090565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526105c593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106145760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610ccb565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261068193909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106d05760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610dca565b50565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b8381101561073e578181015183820152602001610726565b50505050905090810190601f16801561076b5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561078857600080fd5b505afa15801561079c573d6000803e3d6000fd5b505050506040513d60208110156107b257600080fd5b505192915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261081b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461086a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610def565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108fa5780601f106108cf576101008083540402835291602001916108fa565b820191906000526020600020905b8154815290600101906020018083116108dd57829003601f168201915b505050505081565b6000610916600264ffffffffff8416610e15565b92915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261097d93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146109cc5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db60028261101e565b60006109e36002611044565b905090565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610a4993909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610a985760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6105486002838361105b565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610b0593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610b545760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b600855565b610b64848483610ccb565b610b6f848383610ccb565b50505050565b6000610b8084611083565b9050806000015164ffffffffff168364ffffffffff16108015610bb55750806060015164ffffffffff168364ffffffffff1610155b610bfd576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610c20826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610c48836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168564ffffffffff161015610c8c576040830180516000190167ffffffffffffffff169052606083015164ffffffffff1660808401525b64ffffffffff8516835264ffffffffff1984166020840152610cae8684611103565b50505050505050565b600080610cc383611083565b519392505050565b6000610cd684611083565b90506000610cfb826040015167ffffffffffffffff16866110e390919063ffffffff16565b8054909150610d0957601081555b8054608083015183510364ffffffffff1610610d80578460060154826080015164ffffffffff161015610d785760408201805160010167ffffffffffffffff169081905260808301805164ffffffffff90811660608601528451169052610d719086906110e3565b9050610d80565b805460020281555b608082015182510364ffffffffff9081166000818152600184810160209081526040909220889055855101909216845264ffffffffff19851691840191909152610cae8684611103565b6000610dd583611083565b64ffffffffff19831660208201529050610b6f8382611103565b6000610dfa83611083565b905061048782826020015185610b759092919063ffffffff16565b600080610e2184611083565b805190915064ffffffffff168310610e77576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610e9a826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610ec2836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168510610f4f576080830151825464ffffffffff9091168603908110610f33576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000908152600190920160205250604090205491506109169050565b6080830151606084015164ffffffffff9182168781039290911610610fb2576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154811115610fff576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154036000908152600190910160205260409020549250610916915050565b600061102983611083565b905061048782826020015185610ccb9092919063ffffffff16565b60008061105083611083565b602001519392505050565b600061106684611083565b9050610b6f8383836020015187610b59909392919063ffffffff16565b61108b611162565b5080546001909101546040805160a08101825264ffffffffff808516825264ffffffffff19909416602082015267ffffffffffffffff8316818301529082901c8316606082015260689190911c909116608082015290565b600060028206156110f757826004016110fc565b826002015b9392505050565b80516020820151604080840151606085015160808601518754600096868117969584901b8517606884901b17959094909390929091871461114257868a555b858a60010154146111555760018a018690555b5050505050505092915050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe4f564d5f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206f776e65722ea264697066735822122037f5f91f3a7302668798afaeee2c0c2d9aad06dfcc80e263efc2cd8f4842eebe64736f6c63430007060033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c80634651d91e1161008c578063b298e36b11610066578063b298e36b14610315578063ccf8f96914610332578063d41c021814610355578063fa9e936c14610378576100cf565b80634651d91e1461025e5780638da5cb5b1461027b5780639507d39a146102f8576100cf565b806314f22255146100d4578063167fd681146101075780631f7b6d32146101325780632015276c1461014c57806329061de214610177578063461a44781461019c575b600080fd5b610105600480360360608110156100ea57600080fd5b508035906020810135906040013564ffffffffff1916610395565b005b6101056004803603604081101561011d57600080fd5b508035906020013564ffffffffff191661048c565b61013a61054c565b60408051918252519081900360200190f35b6101056004803603604081101561016257600080fd5b508035906020013564ffffffffff1916610564565b6101056004803603602081101561018d57600080fd5b503564ffffffffff1916610620565b610242600480360360208110156101b257600080fd5b8101906020810181356401000000008111156101cd57600080fd5b8201836020820111156101df57600080fd5b8035906020019184600183028401116401000000008311171561020157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506106de945050505050565b604080516001600160a01b039092168252519081900360200190f35b6101056004803603602081101561027457600080fd5b50356107ba565b610283610875565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102bd5781810151838201526020016102a5565b50505050905090810190601f1680156102ea5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61013a6004803603602081101561030e57600080fd5b5035610902565b6101056004803603602081101561032b57600080fd5b503561091c565b61033a6109d7565b6040805164ffffffffff199092168252519081900360200190f35b6101056004803603604081101561036b57600080fd5b50803590602001356109e8565b6101056004803603602081101561038e57600080fd5b5035610aa4565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261042b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b820191906000526020600020905b81548152906001019060200180831161040457829003601f168201915b50505050506106de565b6001600160a01b0316336001600160a01b03161461047a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6104876002848484610b59565b505050565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526104ed93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461053c5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610b75565b5050565b60006105586002610cb7565b64ffffffffff16905090565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526105c593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106145760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610ccb565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261068193909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106d05760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610dca565b50565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b8381101561073e578181015183820152602001610726565b50505050905090810190601f16801561076b5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561078857600080fd5b505afa15801561079c573d6000803e3d6000fd5b505050506040513d60208110156107b257600080fd5b505192915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261081b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461086a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610def565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108fa5780601f106108cf576101008083540402835291602001916108fa565b820191906000526020600020905b8154815290600101906020018083116108dd57829003601f168201915b505050505081565b6000610916600264ffffffffff8416610e15565b92915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261097d93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146109cc5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db60028261101e565b60006109e36002611044565b905090565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610a4993909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610a985760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6105486002838361105b565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610b0593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610b545760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b600855565b610b64848483610ccb565b610b6f848383610ccb565b50505050565b6000610b8084611083565b9050806000015164ffffffffff168364ffffffffff16108015610bb55750806060015164ffffffffff168364ffffffffff1610155b610bfd576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610c20826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610c48836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168564ffffffffff161015610c8c576040830180516000190167ffffffffffffffff169052606083015164ffffffffff1660808401525b64ffffffffff8516835264ffffffffff1984166020840152610cae8684611103565b50505050505050565b600080610cc383611083565b519392505050565b6000610cd684611083565b90506000610cfb826040015167ffffffffffffffff16866110e390919063ffffffff16565b8054909150610d0957601081555b8054608083015183510364ffffffffff1610610d80578460060154826080015164ffffffffff161015610d785760408201805160010167ffffffffffffffff169081905260808301805164ffffffffff90811660608601528451169052610d719086906110e3565b9050610d80565b805460020281555b608082015182510364ffffffffff9081166000818152600184810160209081526040909220889055855101909216845264ffffffffff19851691840191909152610cae8684611103565b6000610dd583611083565b64ffffffffff19831660208201529050610b6f8382611103565b6000610dfa83611083565b905061048782826020015185610b759092919063ffffffff16565b600080610e2184611083565b805190915064ffffffffff168310610e77576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610e9a826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610ec2836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168510610f4f576080830151825464ffffffffff9091168603908110610f33576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000908152600190920160205250604090205491506109169050565b6080830151606084015164ffffffffff9182168781039290911610610fb2576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154811115610fff576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154036000908152600190910160205260409020549250610916915050565b600061102983611083565b905061048782826020015185610ccb9092919063ffffffff16565b60008061105083611083565b602001519392505050565b600061106684611083565b9050610b6f8383836020015187610b59909392919063ffffffff16565b61108b611162565b5080546001909101546040805160a08101825264ffffffffff808516825264ffffffffff19909416602082015267ffffffffffffffff8316818301529082901c8316606082015260689190911c909116608082015290565b600060028206156110f757826004016110fc565b826002015b9392505050565b80516020820151604080840151606085015160808601518754600096868117969584901b8517606884901b17959094909390929091871461114257868a555b858a60010154146111555760018a018690555b5050505050505092915050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe4f564d5f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206f776e65722ea264697066735822122037f5f91f3a7302668798afaeee2c0c2d9aad06dfcc80e263efc2cd8f4842eebe64736f6c63430007060033",
"devdoc": {
"kind": "dev",
"methods": {
"constructor": {
"params": {
"_libAddressManager": "Address of the Address Manager.",
"_owner": "Name of the contract that owns this container (will be resolved later)."
}
},
"deleteElementsAfterInclusive(uint256)": {
"params": {
"_index": "Object index to delete from."
}
},
"deleteElementsAfterInclusive(uint256,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_index": "Object index to delete from."
}
},
"get(uint256)": {
"params": {
"_index": "Index of the particular object to access."
},
"returns": {
"_0": "32 byte object value."
}
},
"getGlobalMetadata()": {
"returns": {
"_0": "Container global metadata field."
}
},
"length()": {
"returns": {
"_0": "Number of objects in the container."
}
},
"push(bytes32)": {
"params": {
"_object": "A 32 byte value to insert into the container."
}
},
"push(bytes32,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_object": "A 32 byte value to insert into the container."
}
},
"push2(bytes32,bytes32)": {
"params": {
"_objectA": "First 32 byte value to insert into the container.",
"_objectB": "Second 32 byte value to insert into the container."
}
},
"push2(bytes32,bytes32,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_objectA": "First 32 byte value to insert into the container.",
"_objectB": "Second 32 byte value to insert into the container."
}
},
"setGlobalMetadata(bytes27)": {
"params": {
"_globalMetadata": "New global metadata to set."
}
}
},
"title": "OVM_ChainStorageContainer",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {
"deleteElementsAfterInclusive(uint256)": {
"notice": "Removes all objects after and including a given index."
},
"deleteElementsAfterInclusive(uint256,bytes27)": {
"notice": "Removes all objects after and including a given index. Also allows setting the global metadata field."
},
"get(uint256)": {
"notice": "Retrieves an object from the container."
},
"getGlobalMetadata()": {
"notice": "Retrieves the container's global metadata field."
},
"length()": {
"notice": "Retrieves the number of objects stored in the container."
},
"push(bytes32)": {
"notice": "Pushes an object into the container."
},
"push(bytes32,bytes27)": {
"notice": "Pushes an object into the container. Function allows setting the global metadata since we'll need to touch the \"length\" storage slot anyway, which also contains the global metadata (it's an optimization)."
},
"push2(bytes32,bytes32)": {
"notice": "Pushes two objects into the container at the same time. A useful optimization."
},
"push2(bytes32,bytes32,bytes27)": {
"notice": "Pushes two objects into the container at the same time. Also allows setting the global metadata field."
},
"setGlobalMetadata(bytes27)": {
"notice": "Sets the container's global metadata field. We're using `bytes27` here because we use five bytes to maintain the length of the underlying data structure, meaning we have an extra 27 bytes to store arbitrary data."
},
"setNextOverwritableIndex(uint256)": {
"notice": "Marks an index as overwritable, meaing the underlying buffer can start to write values over any objects before and including the given index."
}
},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 11707,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "libAddressManager",
"offset": 0,
"slot": "0",
"type": "t_contract(Lib_AddressManager)11700"
},
{
"astId": 2888,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "owner",
"offset": 0,
"slot": "1",
"type": "t_string_storage"
},
{
"astId": 2890,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "buffer",
"offset": 0,
"slot": "2",
"type": "t_struct(RingBuffer)16365_storage"
}
],
"types": {
"t_bytes32": {
"encoding": "inplace",
"label": "bytes32",
"numberOfBytes": "32"
},
"t_contract(Lib_AddressManager)11700": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
},
"t_mapping(t_uint256,t_bytes32)": {
"encoding": "mapping",
"key": "t_uint256",
"label": "mapping(uint256 => bytes32)",
"numberOfBytes": "32",
"value": "t_bytes32"
},
"t_string_storage": {
"encoding": "bytes",
"label": "string",
"numberOfBytes": "32"
},
"t_struct(Buffer)16354_storage": {
"encoding": "inplace",
"label": "struct Lib_RingBuffer.Buffer",
"members": [
{
"astId": 16349,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "length",
"offset": 0,
"slot": "0",
"type": "t_uint256"
},
{
"astId": 16353,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "buf",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_uint256,t_bytes32)"
}
],
"numberOfBytes": "64"
},
"t_struct(RingBuffer)16365_storage": {
"encoding": "inplace",
"label": "struct Lib_RingBuffer.RingBuffer",
"members": [
{
"astId": 16356,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "contextA",
"offset": 0,
"slot": "0",
"type": "t_bytes32"
},
{
"astId": 16358,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "contextB",
"offset": 0,
"slot": "1",
"type": "t_bytes32"
},
{
"astId": 16360,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "bufferA",
"offset": 0,
"slot": "2",
"type": "t_struct(Buffer)16354_storage"
},
{
"astId": 16362,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "bufferB",
"offset": 0,
"slot": "4",
"type": "t_struct(Buffer)16354_storage"
},
{
"astId": 16364,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "nextOverwritableIndex",
"offset": 0,
"slot": "6",
"type": "t_uint256"
}
],
"numberOfBytes": "224"
},
"t_uint256": {
"encoding": "inplace",
"label": "uint256",
"numberOfBytes": "32"
}
}
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"address": "0xb89065D5eB05Cac554FDB11fC764C679b4202322",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_libAddressManager",
"type": "address"
},
{
"internalType": "string",
"name": "_implementationName",
"type": "string"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"stateMutability": "nonpayable",
"type": "fallback"
}
],
"transactionHash": "0xf56350f6788ffb9ebfa35403412369a4fac3147ab5a612956ea8146fe14308ed",
"receipt": {
"to": null,
"from": "0x558ba9b8d78713fbf768c1f8a584485B4003f43F",
"contractAddress": "0x40C6cA6dDdd27E9B4d50da1E393B82b71B1C5D45",
"transactionIndex": 15,
"gasUsed": "228252",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x255fee49c39936345b0004796d61db7b0953cc70f0a9081d86d3447b23b491a2",
"transactionHash": "0xf56350f6788ffb9ebfa35403412369a4fac3147ab5a612956ea8146fe14308ed",
"logs": [],
"blockNumber": 4573449,
"cumulativeGasUsed": "1727110",
"status": 1,
"byzantium": true
},
"args": [
"0x72e6F5244828C10737cbC9659378B207246D26B2",
"OVM_L1CrossDomainMessenger"
],
"solcInputHash": "cebcb515c1a9c570d96e0b8f6fd237e2",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_implementationName\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"nonpayable\",\"type\":\"fallback\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_implementationName\":\"implementationName of the contract to proxy to.\",\"_libAddressManager\":\"Address of the Lib_AddressManager.\"}}},\"title\":\"Lib_ResolvedDelegateProxy\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol\":\"Lib_ResolvedDelegateProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0xdf802e1cc6474df913626991e9fca3835c620a519f397afe04bf9c260e723257\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() internal {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xe0409fbd236d16ca6be439d9d97dd36d0d9a0697ee0062d49588b9d29c248e47\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.7.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_ResolvedDelegateProxy\\n */\\ncontract Lib_ResolvedDelegateProxy {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n // Using mappings to store fields to avoid overwriting storage slots in the\\n // implementation contract. For example, instead of storing these fields at\\n // storage slot `0` & `1`, they are stored at `hash(${FIELD_NAME} + address(this))`\\n // See: https://solidity.readthedocs.io/en/v0.7.0/internals/layout_in_storage.html\\n mapping(address=>string) private implementationName;\\n mapping(address=>Lib_AddressManager) private addressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n * @param _implementationName implementationName of the contract to proxy to.\\n */\\n constructor(\\n address _libAddressManager,\\n string memory _implementationName\\n )\\n {\\n addressManager[address(this)] = Lib_AddressManager(_libAddressManager);\\n implementationName[address(this)] = _implementationName;\\n }\\n\\n\\n /*********************\\n * Fallback Function *\\n *********************/\\n\\n fallback()\\n external\\n {\\n address target = addressManager[address(this)].getAddress((implementationName[address(this)]));\\n require(\\n target != address(0),\\n \\\"Target address must be initialized.\\\"\\n );\\n\\n (bool success, bytes memory returndata) = target.delegatecall(msg.data);\\n\\n if (success == true) {\\n assembly {\\n return(add(returndata, 0x20), mload(returndata))\\n }\\n } else {\\n assembly {\\n revert(add(returndata, 0x20), mload(returndata))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x7b94d77f1ceef7bf89687de3a9c574d994d531e4b98007b106fbac54bab7e8ea\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b506040516104173803806104178339818101604052604081101561003357600080fd5b81516020830180516040519294929383019291908464010000000082111561005a57600080fd5b90830190602082018581111561006f57600080fd5b825164010000000081118282018810171561008957600080fd5b82525081516020918201929091019080838360005b838110156100b657818101518382015260200161009e565b50505050905090810190601f1680156100e35780820380516001836020036101000a031916815260200191505b5060409081523060009081526001602090815282822080546001600160a01b0319166001600160a01b038a16179055818152919020855161012c95509093509085019150610134565b5050506101d5565b828054600181600116156101000203166002900490600052602060002090601f01602090048101928261016a57600085556101b0565b82601f1061018357805160ff19168380011785556101b0565b828001600101855582156101b0579182015b828111156101b0578251825591602001919060010190610195565b506101bc9291506101c0565b5090565b5b808211156101bc57600081556001016101c1565b610233806101e46000396000f3fe608060405234801561001057600080fd5b5030600090815260016020818152604080842054848352818520915163bf40fac160e01b815260048101938452825460026101009682161596909602600019011694909404602485018190526001600160a01b039091169363bf40fac19391829160440190849080156100c45780601f10610099576101008083540402835291602001916100c4565b820191906000526020600020905b8154815290600101906020018083116100a757829003601f168201915b50509250505060206040518083038186803b1580156100e257600080fd5b505afa1580156100f6573d6000803e3d6000fd5b505050506040513d602081101561010c57600080fd5b505190506001600160a01b0381166101555760405162461bcd60e51b81526004018080602001828103825260238152602001806101db6023913960400191505060405180910390fd5b600080826001600160a01b03166000366040518083838082843760405192019450600093509091505080830381855af49150503d80600081146101b4576040519150601f19603f3d011682016040523d82523d6000602084013e6101b9565b606091505b509092509050600182151514156101d257805160208201f35b805160208201fdfe5461726765742061646472657373206d75737420626520696e697469616c697a65642ea264697066735822122022cf2e6b66b75ae0d7a780704aa9d326dd541b72493bb1a405188ed67fed0b5964736f6c63430007060033",
"deployedBytecode": "0x608060405234801561001057600080fd5b5030600090815260016020818152604080842054848352818520915163bf40fac160e01b815260048101938452825460026101009682161596909602600019011694909404602485018190526001600160a01b039091169363bf40fac19391829160440190849080156100c45780601f10610099576101008083540402835291602001916100c4565b820191906000526020600020905b8154815290600101906020018083116100a757829003601f168201915b50509250505060206040518083038186803b1580156100e257600080fd5b505afa1580156100f6573d6000803e3d6000fd5b505050506040513d602081101561010c57600080fd5b505190506001600160a01b0381166101555760405162461bcd60e51b81526004018080602001828103825260238152602001806101db6023913960400191505060405180910390fd5b600080826001600160a01b03166000366040518083838082843760405192019450600093509091505080830381855af49150503d80600081146101b4576040519150601f19603f3d011682016040523d82523d6000602084013e6101b9565b606091505b509092509050600182151514156101d257805160208201f35b805160208201fdfe5461726765742061646472657373206d75737420626520696e697469616c697a65642ea264697066735822122022cf2e6b66b75ae0d7a780704aa9d326dd541b72493bb1a405188ed67fed0b5964736f6c63430007060033",
"devdoc": {
"kind": "dev",
"methods": {
"constructor": {
"params": {
"_implementationName": "implementationName of the contract to proxy to.",
"_libAddressManager": "Address of the Lib_AddressManager."
}
}
},
"title": "Lib_ResolvedDelegateProxy",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 11832,
"contract": "contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol:Lib_ResolvedDelegateProxy",
"label": "implementationName",
"offset": 0,
"slot": "0",
"type": "t_mapping(t_address,t_string_storage)"
},
{
"astId": 11836,
"contract": "contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol:Lib_ResolvedDelegateProxy",
"label": "addressManager",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_address,t_contract(Lib_AddressManager)11700)"
}
],
"types": {
"t_address": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
},
"t_contract(Lib_AddressManager)11700": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
},
"t_mapping(t_address,t_contract(Lib_AddressManager)11700)": {
"encoding": "mapping",
"key": "t_address",
"label": "mapping(address => contract Lib_AddressManager)",
"numberOfBytes": "32",
"value": "t_contract(Lib_AddressManager)11700"
},
"t_mapping(t_address,t_string_storage)": {
"encoding": "mapping",
"key": "t_address",
"label": "mapping(address => string)",
"numberOfBytes": "32",
"value": "t_string_storage"
},
"t_string_storage": {
"encoding": "bytes",
"label": "string",
"numberOfBytes": "32"
}
}
}
}
\ No newline at end of file
{
"address": "0x3Ff73EBc1d916a1A976521160ad92dFDF6a06d1f",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_libAddressManager",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "address",
"name": "_who",
"type": "address"
}
],
"name": "claim",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "deposit",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_preStateRoot",
"type": "bytes32"
},
{
"internalType": "address",
"name": "_publisher",
"type": "address"
},
{
"internalType": "uint256",
"name": "_timestamp",
"type": "uint256"
}
],
"name": "finalize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "finalizeWithdrawal",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_preStateRoot",
"type": "bytes32"
},
{
"internalType": "address",
"name": "_who",
"type": "address"
}
],
"name": "getGasSpent",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_who",
"type": "address"
}
],
"name": "isCollateralized",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_preStateRoot",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_txHash",
"type": "bytes32"
},
{
"internalType": "address",
"name": "_who",
"type": "address"
},
{
"internalType": "uint256",
"name": "_gasSpent",
"type": "uint256"
}
],
"name": "recordGasSpent",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "resolve",
"outputs": [
{
"internalType": "address",
"name": "_contract",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "startWithdrawal",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"transactionHash": "0xef2081df685c50aab54d3c8925d756ac3d5a8e3e8205ace17b9b9887a4181567",
"receipt": {
"to": null,
"from": "0x558ba9b8d78713fbf768c1f8a584485B4003f43F",
"contractAddress": "0x0C4BFBfB44090E1c1AB4a648366456ccFCF9bfA1",
"transactionIndex": 4,
"gasUsed": "291376",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0xc98e11cb9072c6fda982fe6445382fa34298a9a83d3bdfedc88fded88680fe97",
"transactionHash": "0xef2081df685c50aab54d3c8925d756ac3d5a8e3e8205ace17b9b9887a4181567",
"logs": [],
"blockNumber": 4573388,
"cumulativeGasUsed": "864063",
"status": 1,
"byzantium": true
},
"args": [
"0x72e6F5244828C10737cbC9659378B207246D26B2"
],
"solcInputHash": "cebcb515c1a9c570d96e0b8f6fd237e2",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_who\",\"type\":\"address\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_preStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_publisher\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"finalize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"finalizeWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_preStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_who\",\"type\":\"address\"}],\"name\":\"getGasSpent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_who\",\"type\":\"address\"}],\"name\":\"isCollateralized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_preStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_txHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_who\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasSpent\",\"type\":\"uint256\"}],\"name\":\"recordGasSpent\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"title\":\"mockOVM_BondManager\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/mockOVM/verification/mockOVM_BondManager.sol\":\"mockOVM_BondManager\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/iOVM/verification/iOVM_BondManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\ninterface ERC20 {\\n function transfer(address, uint256) external returns (bool);\\n function transferFrom(address, address, uint256) external returns (bool);\\n}\\n\\n/// All the errors which may be encountered on the bond manager\\nlibrary Errors {\\n string constant ERC20_ERR = \\\"BondManager: Could not post bond\\\";\\n string constant ALREADY_FINALIZED = \\\"BondManager: Fraud proof for this pre-state root has already been finalized\\\";\\n string constant SLASHED = \\\"BondManager: Cannot finalize withdrawal, you probably got slashed\\\";\\n string constant WRONG_STATE = \\\"BondManager: Wrong bond state for proposer\\\";\\n string constant CANNOT_CLAIM = \\\"BondManager: Cannot claim yet. Dispute must be finalized first\\\";\\n\\n string constant WITHDRAWAL_PENDING = \\\"BondManager: Withdrawal already pending\\\";\\n string constant TOO_EARLY = \\\"BondManager: Too early to finalize your withdrawal\\\";\\n\\n string constant ONLY_TRANSITIONER = \\\"BondManager: Only the transitioner for this pre-state root may call this function\\\";\\n string constant ONLY_FRAUD_VERIFIER = \\\"BondManager: Only the fraud verifier may call this function\\\";\\n string constant ONLY_STATE_COMMITMENT_CHAIN = \\\"BondManager: Only the state commitment chain may call this function\\\";\\n string constant WAIT_FOR_DISPUTES = \\\"BondManager: Wait for other potential disputes\\\";\\n}\\n\\n/**\\n * @title iOVM_BondManager\\n */\\ninterface iOVM_BondManager {\\n\\n /*******************\\n * Data Structures *\\n *******************/\\n\\n /// The lifecycle of a proposer's bond\\n enum State {\\n // Before depositing or after getting slashed, a user is uncollateralized\\n NOT_COLLATERALIZED,\\n // After depositing, a user is collateralized\\n COLLATERALIZED,\\n // After a user has initiated a withdrawal\\n WITHDRAWING\\n }\\n\\n /// A bond posted by a proposer\\n struct Bond {\\n // The user's state\\n State state;\\n // The timestamp at which a proposer issued their withdrawal request\\n uint32 withdrawalTimestamp;\\n // The time when the first disputed was initiated for this bond\\n uint256 firstDisputeAt;\\n // The earliest observed state root for this bond which has had fraud\\n bytes32 earliestDisputedStateRoot;\\n // The state root's timestamp\\n uint256 earliestTimestamp;\\n }\\n\\n // Per pre-state root, store the number of state provisions that were made\\n // and how many of these calls were made by each user. Payouts will then be\\n // claimed by users proportionally for that dispute.\\n struct Rewards {\\n // Flag to check if rewards for a fraud proof are claimable\\n bool canClaim;\\n // Total number of `recordGasSpent` calls made\\n uint256 total;\\n // The gas spent by each user to provide witness data. The sum of all\\n // values inside this map MUST be equal to the value of `total`\\n mapping(address => uint256) gasSpent;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function recordGasSpent(\\n bytes32 _preStateRoot,\\n bytes32 _txHash,\\n address _who,\\n uint256 _gasSpent\\n ) external;\\n\\n function finalize(\\n bytes32 _preStateRoot,\\n address _publisher,\\n uint256 _timestamp\\n ) external;\\n\\n function deposit() external;\\n\\n function startWithdrawal() external;\\n\\n function finalizeWithdrawal() external;\\n\\n function claim(\\n address _who\\n ) external;\\n\\n function isCollateralized(\\n address _who\\n ) external view returns (bool);\\n\\n function getGasSpent(\\n bytes32 _preStateRoot,\\n address _who\\n ) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x3c2a8a399487857158649db1896749d86e39cba545a8aeb2e2bb0f3bdfa7a5b1\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0xdf802e1cc6474df913626991e9fca3835c620a519f397afe04bf9c260e723257\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_AddressResolver\\n */\\ncontract Lib_AddressResolver {\\n\\n /*******************************************\\n * Contract Variables: Contract References *\\n *******************************************/\\n\\n Lib_AddressManager internal libAddressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n */\\n constructor(\\n address _libAddressManager\\n ) public {\\n libAddressManager = Lib_AddressManager(_libAddressManager);\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function resolve(\\n string memory _name\\n )\\n public\\n view\\n returns (\\n address _contract\\n )\\n {\\n return libAddressManager.getAddress(_name);\\n }\\n}\\n\",\"keccak256\":\"0xf3b9d78b309ddeec259ce3e0e1cfdef3ca40938e9a81971b28ce2b8ea327f533\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() internal {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xe0409fbd236d16ca6be439d9d97dd36d0d9a0697ee0062d49588b9d29c248e47\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/mockOVM/verification/mockOVM_BondManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.7.0;\\n\\n/* Interface Imports */\\nimport { iOVM_BondManager } from \\\"../../iOVM/verification/iOVM_BondManager.sol\\\";\\n\\n/* Contract Imports */\\nimport { Lib_AddressResolver } from \\\"../../libraries/resolver/Lib_AddressResolver.sol\\\";\\n\\n/**\\n * @title mockOVM_BondManager\\n */\\ncontract mockOVM_BondManager is iOVM_BondManager, Lib_AddressResolver {\\n constructor(\\n address _libAddressManager\\n )\\n Lib_AddressResolver(_libAddressManager)\\n {}\\n\\n function recordGasSpent(\\n bytes32 _preStateRoot,\\n bytes32 _txHash,\\n address _who,\\n uint256 _gasSpent\\n )\\n override\\n public\\n {}\\n\\n function finalize(\\n bytes32 _preStateRoot,\\n address _publisher,\\n uint256 _timestamp\\n )\\n override\\n public\\n {}\\n\\n function deposit()\\n override\\n public\\n {}\\n\\n function startWithdrawal()\\n override\\n public\\n {}\\n\\n function finalizeWithdrawal()\\n override\\n public\\n {}\\n\\n function claim(\\n address _who\\n )\\n override\\n public\\n {}\\n\\n function isCollateralized(\\n address _who\\n )\\n override\\n public\\n view\\n returns (\\n bool\\n )\\n {\\n // Only authenticate sequencer to submit state root batches.\\n return _who == resolve(\\\"OVM_Sequencer\\\");\\n }\\n\\n function getGasSpent(\\n bytes32 _preStateRoot,\\n address _who\\n )\\n override\\n public\\n view\\n returns (\\n uint256\\n )\\n {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0x03c283c91205609fbc19856d9c7fb15da972c3499e00ed049453654723bfaa4c\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b506040516104463803806104468339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b03199092169190911790556103e1806100656000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063abfbbe1311610066578063abfbbe13146101f4578063bc2f8dd814610226578063c5b6aa2f14610226578063d0e30db014610226578063dc6453dc1461022e57610093565b806302ad4d2a146100985780631e16e92f146100d25780631e83409a1461010c578063461a447814610132575b600080fd5b6100be600480360360208110156100ae57600080fd5b50356001600160a01b031661026c565b604080519115158252519081900360200190f35b61010a600480360360808110156100e857600080fd5b508035906020810135906001600160a01b0360408201351690606001356102b7565b005b61010a6004803603602081101561012257600080fd5b50356001600160a01b03166102bd565b6101d86004803603602081101561014857600080fd5b81019060208101813564010000000081111561016357600080fd5b82018360208201111561017557600080fd5b8035906020019184600183028401116401000000008311171561019757600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506102c0945050505050565b604080516001600160a01b039092168252519081900360200190f35b61010a6004803603606081101561020a57600080fd5b508035906001600160a01b03602082013516906040013561039c565b61010a6103a1565b61025a6004803603604081101561024457600080fd5b50803590602001356001600160a01b03166103a3565b60408051918252519081900360200190f35b600061029c6040518060400160405280600d81526020016c27ab26afa9b2b8bab2b731b2b960991b8152506102c0565b6001600160a01b0316826001600160a01b0316149050919050565b50505050565b50565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b83811015610320578181015183820152602001610308565b50505050905090810190601f16801561034d5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561036a57600080fd5b505afa15801561037e573d6000803e3d6000fd5b505050506040513d602081101561039457600080fd5b505192915050565b505050565b565b60009291505056fea26469706673582212203f0728d2ffd5e87f3b2f160e5704cc5c07ae231349c1c6286f6360e26317c39b64736f6c63430007060033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063abfbbe1311610066578063abfbbe13146101f4578063bc2f8dd814610226578063c5b6aa2f14610226578063d0e30db014610226578063dc6453dc1461022e57610093565b806302ad4d2a146100985780631e16e92f146100d25780631e83409a1461010c578063461a447814610132575b600080fd5b6100be600480360360208110156100ae57600080fd5b50356001600160a01b031661026c565b604080519115158252519081900360200190f35b61010a600480360360808110156100e857600080fd5b508035906020810135906001600160a01b0360408201351690606001356102b7565b005b61010a6004803603602081101561012257600080fd5b50356001600160a01b03166102bd565b6101d86004803603602081101561014857600080fd5b81019060208101813564010000000081111561016357600080fd5b82018360208201111561017557600080fd5b8035906020019184600183028401116401000000008311171561019757600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506102c0945050505050565b604080516001600160a01b039092168252519081900360200190f35b61010a6004803603606081101561020a57600080fd5b508035906001600160a01b03602082013516906040013561039c565b61010a6103a1565b61025a6004803603604081101561024457600080fd5b50803590602001356001600160a01b03166103a3565b60408051918252519081900360200190f35b600061029c6040518060400160405280600d81526020016c27ab26afa9b2b8bab2b731b2b960991b8152506102c0565b6001600160a01b0316826001600160a01b0316149050919050565b50505050565b50565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b83811015610320578181015183820152602001610308565b50505050905090810190601f16801561034d5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561036a57600080fd5b505afa15801561037e573d6000803e3d6000fd5b505050506040513d602081101561039457600080fd5b505192915050565b505050565b565b60009291505056fea26469706673582212203f0728d2ffd5e87f3b2f160e5704cc5c07ae231349c1c6286f6360e26317c39b64736f6c63430007060033",
"devdoc": {
"kind": "dev",
"methods": {},
"title": "mockOVM_BondManager",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 11707,
"contract": "contracts/optimistic-ethereum/mockOVM/verification/mockOVM_BondManager.sol:mockOVM_BondManager",
"label": "libAddressManager",
"offset": 0,
"slot": "0",
"type": "t_contract(Lib_AddressManager)11700"
}
],
"types": {
"t_contract(Lib_AddressManager)11700": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
}
}
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"address": "0xFaf27b24ba54C6910C12CFF5C9453C0e8D634e05",
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "_name",
"type": "string"
},
{
"indexed": false,
"internalType": "address",
"name": "_newAddress",
"type": "address"
}
],
"name": "AddressSet",
"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"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "getAddress",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
},
{
"internalType": "address",
"name": "_address",
"type": "address"
}
],
"name": "setAddress",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"transactionHash": "0x340254123e5f4a301056d2cd8741ef82cc1a2a80bb2632426861160b105d4844",
"receipt": {
"to": null,
"from": "0x18394B52d3Cb931dfA76F63251919D051953413d",
"contractAddress": "0xFaf27b24ba54C6910C12CFF5C9453C0e8D634e05",
"transactionIndex": 0,
"gasUsed": "403788",
"logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000040000000000000000000000400000000000000000000000000001000000000000000000000000004000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000040000000000000000000000000000000",
"blockHash": "0xdeee8a389bcb39a00c65846ba80ce91b69456e25cf1cc854d8c69554d090dcc9",
"transactionHash": "0x340254123e5f4a301056d2cd8741ef82cc1a2a80bb2632426861160b105d4844",
"logs": [
{
"transactionIndex": 0,
"blockNumber": 24199460,
"transactionHash": "0x340254123e5f4a301056d2cd8741ef82cc1a2a80bb2632426861160b105d4844",
"address": "0xFaf27b24ba54C6910C12CFF5C9453C0e8D634e05",
"topics": [
"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x00000000000000000000000018394b52d3cb931dfa76f63251919d051953413d"
],
"data": "0x",
"logIndex": 0,
"blockHash": "0xdeee8a389bcb39a00c65846ba80ce91b69456e25cf1cc854d8c69554d090dcc9"
}
],
"blockNumber": 24199460,
"cumulativeGasUsed": "403788",
"status": 1,
"byzantium": true
},
"args": [],
"solcInputHash": "03aed03b958b1d37f90bd88d0f56dd85",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_newAddress\",\"type\":\"address\"}],\"name\":\"AddressSet\",\"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\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"getAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"setAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"title\":\"Lib_AddressManager\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":\"Lib_AddressManager\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0x3a490595cc21ff170e4027843093670ff845d5972481fbfb956b722ea564bb06\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xd9dfd9264e5b5fedd53a5b10fdf179c3f367614b0fe69179bce4e45119f5b739\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b03191633178082556040516001600160a01b039190911691907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36105eb806100696000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c8063715018a61461005c5780638da5cb5b146100665780639b2ea4bd1461008a578063bf40fac11461013b578063f2fde38b146101e1575b600080fd5b610064610207565b005b61006e6102b0565b604080516001600160a01b039092168252519081900360200190f35b610064600480360360408110156100a057600080fd5b8101906020810181356401000000008111156100bb57600080fd5b8201836020820111156100cd57600080fd5b803590602001918460018302840111640100000000831117156100ef57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b031691506102bf9050565b61006e6004803603602081101561015157600080fd5b81019060208101813564010000000081111561016c57600080fd5b82018360208201111561017e57600080fd5b803590602001918460018302840111640100000000831117156101a057600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061040c945050505050565b610064600480360360208110156101f757600080fd5b50356001600160a01b031661043b565b6000546001600160a01b03163314610266576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031681565b6000546001600160a01b0316331461031e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b7f188466739ff00cc68bfb2367d23ae4b855264264fe1624caa8884399af23454c82826040518080602001836001600160a01b03168152602001828103825284818151815260200191508051906020019080838360005b8381101561038d578181015183820152602001610375565b50505050905090810190601f1680156103ba5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a180600160006103d68561053a565b815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055505050565b60006001600061041b8461053a565b81526020810191909152604001600020546001600160a01b031692915050565b6000546001600160a01b0316331461049a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166104df5760405162461bcd60e51b815260040180806020018281038252602d8152602001806105b2602d913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000816040516020018082805190602001908083835b6020831061056f5780518252601f199092019160209182019101610550565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120905091905056fe4f776e61626c653a206e6577206f776e65722063616e6e6f7420626520746865207a65726f2061646472657373a164736f6c6343000706000a",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c8063715018a61461005c5780638da5cb5b146100665780639b2ea4bd1461008a578063bf40fac11461013b578063f2fde38b146101e1575b600080fd5b610064610207565b005b61006e6102b0565b604080516001600160a01b039092168252519081900360200190f35b610064600480360360408110156100a057600080fd5b8101906020810181356401000000008111156100bb57600080fd5b8201836020820111156100cd57600080fd5b803590602001918460018302840111640100000000831117156100ef57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b031691506102bf9050565b61006e6004803603602081101561015157600080fd5b81019060208101813564010000000081111561016c57600080fd5b82018360208201111561017e57600080fd5b803590602001918460018302840111640100000000831117156101a057600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061040c945050505050565b610064600480360360208110156101f757600080fd5b50356001600160a01b031661043b565b6000546001600160a01b03163314610266576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031681565b6000546001600160a01b0316331461031e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b7f188466739ff00cc68bfb2367d23ae4b855264264fe1624caa8884399af23454c82826040518080602001836001600160a01b03168152602001828103825284818151815260200191508051906020019080838360005b8381101561038d578181015183820152602001610375565b50505050905090810190601f1680156103ba5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a180600160006103d68561053a565b815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055505050565b60006001600061041b8461053a565b81526020810191909152604001600020546001600160a01b031692915050565b6000546001600160a01b0316331461049a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166104df5760405162461bcd60e51b815260040180806020018281038252602d8152602001806105b2602d913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000816040516020018082805190602001908083835b6020831061056f5780518252601f199092019160209182019101610550565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120905091905056fe4f776e61626c653a206e6577206f776e65722063616e6e6f7420626520746865207a65726f2061646472657373a164736f6c6343000706000a",
"devdoc": {
"kind": "dev",
"methods": {},
"title": "Lib_AddressManager",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 12558,
"contract": "contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol:Lib_AddressManager",
"label": "owner",
"offset": 0,
"slot": "0",
"type": "t_address"
},
{
"astId": 12466,
"contract": "contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol:Lib_AddressManager",
"label": "addresses",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_bytes32,t_address)"
}
],
"types": {
"t_address": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
},
"t_bytes32": {
"encoding": "inplace",
"label": "bytes32",
"numberOfBytes": "32"
},
"t_mapping(t_bytes32,t_address)": {
"encoding": "mapping",
"key": "t_bytes32",
"label": "mapping(bytes32 => address)",
"numberOfBytes": "32",
"value": "t_address"
}
}
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"address": "0x18bA855471f10B74851C0e133db597075Dff128d",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_libAddressManager",
"type": "address"
},
{
"internalType": "string",
"name": "_owner",
"type": "string"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "deleteElementsAfterInclusive",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "deleteElementsAfterInclusive",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "get",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getGlobalMetadata",
"outputs": [
{
"internalType": "bytes27",
"name": "",
"type": "bytes27"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "length",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "libAddressManager",
"outputs": [
{
"internalType": "contract Lib_AddressManager",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_object",
"type": "bytes32"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "push",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_object",
"type": "bytes32"
}
],
"name": "push",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "resolve",
"outputs": [
{
"internalType": "address",
"name": "_contract",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "setGlobalMetadata",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "setNextOverwritableIndex",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"transactionHash": "0x9aa3cdc8392330d8788d6f3e5ab1f9d90548e3ae331878388a2fae27ad840cfe",
"receipt": {
"to": null,
"from": "0x18394B52d3Cb931dfA76F63251919D051953413d",
"contractAddress": "0x18bA855471f10B74851C0e133db597075Dff128d",
"transactionIndex": 0,
"gasUsed": "959533",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x5988dbd770a2d9178bcf597a93c14b9e91ec6c2150bd3d5e6ae0b713a5b4a92f",
"transactionHash": "0x9aa3cdc8392330d8788d6f3e5ab1f9d90548e3ae331878388a2fae27ad840cfe",
"logs": [],
"blockNumber": 24199471,
"cumulativeGasUsed": "959533",
"status": 1,
"byzantium": true
},
"args": [
"0xFaf27b24ba54C6910C12CFF5C9453C0e8D634e05",
"OVM_CanonicalTransactionChain"
],
"solcInputHash": "03aed03b958b1d37f90bd88d0f56dd85",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_owner\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"deleteElementsAfterInclusive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"deleteElementsAfterInclusive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"get\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGlobalMetadata\",\"outputs\":[{\"internalType\":\"bytes27\",\"name\":\"\",\"type\":\"bytes27\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"length\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"libAddressManager\",\"outputs\":[{\"internalType\":\"contract Lib_AddressManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_object\",\"type\":\"bytes32\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"push\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_object\",\"type\":\"bytes32\"}],\"name\":\"push\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"setGlobalMetadata\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"setNextOverwritableIndex\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"The Chain Storage Container provides its owner contract with read, write and delete functionality. This provides gas efficiency gains by enabling it to overwrite storage slots which can no longer be used in a fraud proof due to the fraud window having passed, and the associated chain state or transactions being finalized. Three distinct Chain Storage Containers will be deployed on Layer 1: 1. Stores transaction batches for the Canonical Transaction Chain 2. Stores queued transactions for the Canonical Transaction Chain 3. Stores chain state batches for the State Commitment Chain Compiler used: solc Runtime target: EVM\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_libAddressManager\":\"Address of the Address Manager.\",\"_owner\":\"Name of the contract that owns this container (will be resolved later).\"}},\"deleteElementsAfterInclusive(uint256)\":{\"params\":{\"_index\":\"Object index to delete from.\"}},\"deleteElementsAfterInclusive(uint256,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_index\":\"Object index to delete from.\"}},\"get(uint256)\":{\"params\":{\"_index\":\"Index of the particular object to access.\"},\"returns\":{\"_0\":\"32 byte object value.\"}},\"getGlobalMetadata()\":{\"returns\":{\"_0\":\"Container global metadata field.\"}},\"length()\":{\"returns\":{\"_0\":\"Number of objects in the container.\"}},\"push(bytes32)\":{\"params\":{\"_object\":\"A 32 byte value to insert into the container.\"}},\"push(bytes32,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_object\":\"A 32 byte value to insert into the container.\"}},\"setGlobalMetadata(bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata to set.\"}}},\"title\":\"OVM_ChainStorageContainer\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deleteElementsAfterInclusive(uint256)\":{\"notice\":\"Removes all objects after and including a given index.\"},\"deleteElementsAfterInclusive(uint256,bytes27)\":{\"notice\":\"Removes all objects after and including a given index. Also allows setting the global metadata field.\"},\"get(uint256)\":{\"notice\":\"Retrieves an object from the container.\"},\"getGlobalMetadata()\":{\"notice\":\"Retrieves the container's global metadata field.\"},\"length()\":{\"notice\":\"Retrieves the number of objects stored in the container.\"},\"push(bytes32)\":{\"notice\":\"Pushes an object into the container.\"},\"push(bytes32,bytes27)\":{\"notice\":\"Pushes an object into the container. Function allows setting the global metadata since we'll need to touch the \\\"length\\\" storage slot anyway, which also contains the global metadata (it's an optimization).\"},\"setGlobalMetadata(bytes27)\":{\"notice\":\"Sets the container's global metadata field. We're using `bytes27` here because we use five bytes to maintain the length of the underlying data structure, meaning we have an extra 27 bytes to store arbitrary data.\"},\"setNextOverwritableIndex(uint256)\":{\"notice\":\"Marks an index as overwritable, meaing the underlying buffer can start to write values over any objects before and including the given index.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol\":\"OVM_ChainStorageContainer\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_RingBuffer } from \\\"../../libraries/utils/Lib_RingBuffer.sol\\\";\\nimport { Lib_AddressResolver } from \\\"../../libraries/resolver/Lib_AddressResolver.sol\\\";\\n\\n/* Interface Imports */\\nimport { iOVM_ChainStorageContainer } from \\\"../../iOVM/chain/iOVM_ChainStorageContainer.sol\\\";\\n\\n/**\\n * @title OVM_ChainStorageContainer\\n * @dev The Chain Storage Container provides its owner contract with read, write and delete functionality.\\n * This provides gas efficiency gains by enabling it to overwrite storage slots which can no longer be used\\n * in a fraud proof due to the fraud window having passed, and the associated chain state or\\n * transactions being finalized.\\n * Three distinct Chain Storage Containers will be deployed on Layer 1:\\n * 1. Stores transaction batches for the Canonical Transaction Chain\\n * 2. Stores queued transactions for the Canonical Transaction Chain\\n * 3. Stores chain state batches for the State Commitment Chain\\n *\\n * Compiler used: solc\\n * Runtime target: EVM\\n */\\ncontract OVM_ChainStorageContainer is iOVM_ChainStorageContainer, Lib_AddressResolver {\\n\\n /*************\\n * Libraries *\\n *************/\\n\\n using Lib_RingBuffer for Lib_RingBuffer.RingBuffer;\\n\\n\\n /*************\\n * Variables *\\n *************/\\n\\n string public owner;\\n Lib_RingBuffer.RingBuffer internal buffer;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Address Manager.\\n * @param _owner Name of the contract that owns this container (will be resolved later).\\n */\\n constructor(\\n address _libAddressManager,\\n string memory _owner\\n )\\n Lib_AddressResolver(_libAddressManager)\\n {\\n owner = _owner;\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n msg.sender == resolve(owner),\\n \\\"OVM_ChainStorageContainer: Function can only be called by the owner.\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function setGlobalMetadata(\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n return buffer.setExtraData(_globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function getGlobalMetadata()\\n override\\n public\\n view\\n returns (\\n bytes27\\n )\\n {\\n return buffer.getExtraData();\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function length()\\n override\\n public\\n view\\n returns (\\n uint256\\n )\\n {\\n return uint256(buffer.getLength());\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push(\\n bytes32 _object\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push(_object);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push(\\n bytes32 _object,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push(_object, _globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function get(\\n uint256 _index\\n )\\n override\\n public\\n view\\n returns (\\n bytes32\\n )\\n {\\n return buffer.get(uint40(_index));\\n }\\n \\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.deleteElementsAfterInclusive(\\n uint40(_index)\\n );\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.deleteElementsAfterInclusive(\\n uint40(_index),\\n _globalMetadata\\n );\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function setNextOverwritableIndex(\\n uint256 _index\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.nextOverwritableIndex = _index;\\n }\\n}\\n\",\"keccak256\":\"0x52e3ef7166fe134d32997917067e3d74128173b12fb6231eec34132102ddbb50\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/iOVM/chain/iOVM_ChainStorageContainer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title iOVM_ChainStorageContainer\\n */\\ninterface iOVM_ChainStorageContainer {\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Sets the container's global metadata field. We're using `bytes27` here because we use five\\n * bytes to maintain the length of the underlying data structure, meaning we have an extra\\n * 27 bytes to store arbitrary data.\\n * @param _globalMetadata New global metadata to set.\\n */\\n function setGlobalMetadata(\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Retrieves the container's global metadata field.\\n * @return Container global metadata field.\\n */\\n function getGlobalMetadata()\\n external\\n view\\n returns (\\n bytes27\\n );\\n\\n /**\\n * Retrieves the number of objects stored in the container.\\n * @return Number of objects in the container.\\n */\\n function length()\\n external\\n view\\n returns (\\n uint256\\n );\\n\\n /**\\n * Pushes an object into the container.\\n * @param _object A 32 byte value to insert into the container.\\n */\\n function push(\\n bytes32 _object\\n )\\n external;\\n\\n /**\\n * Pushes an object into the container. Function allows setting the global metadata since\\n * we'll need to touch the \\\"length\\\" storage slot anyway, which also contains the global\\n * metadata (it's an optimization).\\n * @param _object A 32 byte value to insert into the container.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function push(\\n bytes32 _object,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Retrieves an object from the container.\\n * @param _index Index of the particular object to access.\\n * @return 32 byte object value.\\n */\\n function get(\\n uint256 _index\\n )\\n external\\n view\\n returns (\\n bytes32\\n );\\n\\n /**\\n * Removes all objects after and including a given index.\\n * @param _index Object index to delete from.\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index\\n )\\n external;\\n\\n /**\\n * Removes all objects after and including a given index. Also allows setting the global\\n * metadata field.\\n * @param _index Object index to delete from.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Marks an index as overwritable, meaing the underlying buffer can start to write values over\\n * any objects before and including the given index.\\n */\\n function setNextOverwritableIndex(\\n uint256 _index\\n )\\n external;\\n}\\n\",\"keccak256\":\"0x2d7973a0ad84c23ec62624d3f1e3aeb198cc72686ff1e6cfa17155556b320c94\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0x3a490595cc21ff170e4027843093670ff845d5972481fbfb956b722ea564bb06\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_AddressResolver\\n */\\nabstract contract Lib_AddressResolver {\\n\\n /*******************************************\\n * Contract Variables: Contract References *\\n *******************************************/\\n\\n Lib_AddressManager public libAddressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n */\\n constructor(\\n address _libAddressManager\\n ) {\\n libAddressManager = Lib_AddressManager(_libAddressManager);\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function resolve(\\n string memory _name\\n )\\n public\\n view\\n returns (\\n address _contract\\n )\\n {\\n return libAddressManager.getAddress(_name);\\n }\\n}\\n\",\"keccak256\":\"0xaa3ed342f6deb156c660fd83afa579a3b80db17eb465e8949cf5c1b114780143\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xd9dfd9264e5b5fedd53a5b10fdf179c3f367614b0fe69179bce4e45119f5b739\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/utils/Lib_RingBuffer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\nlibrary Lib_RingBuffer {\\n using Lib_RingBuffer for RingBuffer;\\n\\n /***********\\n * Structs *\\n ***********/\\n\\n struct Buffer {\\n uint256 length;\\n mapping (uint256 => bytes32) buf;\\n }\\n\\n struct RingBuffer {\\n bytes32 contextA;\\n bytes32 contextB;\\n Buffer bufferA;\\n Buffer bufferB;\\n uint256 nextOverwritableIndex;\\n }\\n\\n struct RingBufferContext {\\n // contextA\\n uint40 globalIndex;\\n bytes27 extraData;\\n\\n // contextB\\n uint64 currBufferIndex;\\n uint40 prevResetIndex;\\n uint40 currResetIndex;\\n }\\n\\n\\n /*************\\n * Constants *\\n *************/\\n\\n uint256 constant MIN_CAPACITY = 16;\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * Pushes a single element to the buffer.\\n * @param _self Buffer to access.\\n * @param _value Value to push to the buffer.\\n * @param _extraData Optional global extra data.\\n */\\n function push(\\n RingBuffer storage _self,\\n bytes32 _value,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n\\n // Set a minimum capacity.\\n if (currBuffer.length == 0) {\\n currBuffer.length = MIN_CAPACITY;\\n }\\n\\n // Check if we need to expand the buffer.\\n if (ctx.globalIndex - ctx.currResetIndex >= currBuffer.length) {\\n if (ctx.currResetIndex < _self.nextOverwritableIndex) {\\n // We're going to overwrite the inactive buffer.\\n // Bump the buffer index, reset the delete offset, and set our reset indices.\\n ctx.currBufferIndex++;\\n ctx.prevResetIndex = ctx.currResetIndex;\\n ctx.currResetIndex = ctx.globalIndex;\\n\\n // Swap over to the next buffer.\\n currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n } else {\\n // We're not overwriting yet, double the length of the current buffer.\\n currBuffer.length *= 2;\\n }\\n }\\n\\n // Index to write to is the difference of the global and reset indices.\\n uint256 writeHead = ctx.globalIndex - ctx.currResetIndex;\\n currBuffer.buf[writeHead] = _value;\\n\\n // Bump the global index and insert our extra data, then save the context.\\n ctx.globalIndex++;\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Pushes a single element to the buffer.\\n * @param _self Buffer to access.\\n * @param _value Value to push to the buffer.\\n */\\n function push(\\n RingBuffer storage _self,\\n bytes32 _value\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n \\n _self.push(\\n _value,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Retrieves an element from the buffer.\\n * @param _self Buffer to access.\\n * @param _index Element index to retrieve.\\n * @return Value of the element at the given index.\\n */\\n function get(\\n RingBuffer storage _self,\\n uint256 _index\\n )\\n internal\\n view\\n returns (\\n bytes32 \\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n require(\\n _index < ctx.globalIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n Buffer storage prevBuffer = _self.getBuffer(ctx.currBufferIndex + 1);\\n\\n if (_index >= ctx.currResetIndex) {\\n // We're trying to load an element from the current buffer.\\n // Relative index is just the difference from the reset index.\\n uint256 relativeIndex = _index - ctx.currResetIndex;\\n\\n // Shouldn't happen but why not check.\\n require(\\n relativeIndex < currBuffer.length,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n return currBuffer.buf[relativeIndex];\\n } else {\\n // We're trying to load an element from the previous buffer.\\n // Relative index is the difference from the reset index in the other direction.\\n uint256 relativeIndex = ctx.currResetIndex - _index;\\n\\n // Condition only fails in the case that we deleted and flipped buffers.\\n require(\\n ctx.currResetIndex > ctx.prevResetIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n // Make sure we're not trying to read beyond the array.\\n require(\\n relativeIndex <= prevBuffer.length,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n return prevBuffer.buf[prevBuffer.length - relativeIndex];\\n }\\n }\\n\\n /**\\n * Deletes all elements after (and including) a given index.\\n * @param _self Buffer to access.\\n * @param _index Index of the element to delete from (inclusive).\\n * @param _extraData Optional global extra data.\\n */\\n function deleteElementsAfterInclusive(\\n RingBuffer storage _self,\\n uint40 _index,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n require(\\n _index < ctx.globalIndex && _index >= ctx.prevResetIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n if (_index < ctx.currResetIndex) {\\n // We're switching back to the previous buffer.\\n // Reduce the buffer index, set the current reset index back to match the previous one.\\n // We use the equality of these two values to prevent reading beyond this buffer.\\n ctx.currBufferIndex--;\\n ctx.currResetIndex = ctx.prevResetIndex;\\n }\\n\\n // Set our global index and extra data, save the context.\\n ctx.globalIndex = _index;\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Deletes all elements after (and including) a given index.\\n * @param _self Buffer to access.\\n * @param _index Index of the element to delete from (inclusive).\\n */\\n function deleteElementsAfterInclusive(\\n RingBuffer storage _self,\\n uint40 _index\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n _self.deleteElementsAfterInclusive(\\n _index,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Retrieves the current global index.\\n * @param _self Buffer to access.\\n * @return Current global index.\\n */\\n function getLength(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n uint40\\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n return ctx.globalIndex;\\n }\\n\\n /**\\n * Changes current global extra data.\\n * @param _self Buffer to access.\\n * @param _extraData New global extra data.\\n */\\n function setExtraData(\\n RingBuffer storage _self,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Retrieves the current global extra data.\\n * @param _self Buffer to access.\\n * @return Current global extra data.\\n */\\n function getExtraData(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n bytes27\\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n return ctx.extraData;\\n }\\n\\n /**\\n * Sets the current ring buffer context.\\n * @param _self Buffer to access.\\n * @param _ctx Current ring buffer context.\\n */\\n function setContext(\\n RingBuffer storage _self,\\n RingBufferContext memory _ctx\\n )\\n internal\\n {\\n bytes32 contextA;\\n bytes32 contextB;\\n\\n uint40 globalIndex = _ctx.globalIndex;\\n bytes27 extraData = _ctx.extraData;\\n assembly {\\n contextA := globalIndex\\n contextA := or(contextA, extraData)\\n }\\n\\n uint64 currBufferIndex = _ctx.currBufferIndex;\\n uint40 prevResetIndex = _ctx.prevResetIndex;\\n uint40 currResetIndex = _ctx.currResetIndex;\\n assembly {\\n contextB := currBufferIndex\\n contextB := or(contextB, shl(64, prevResetIndex))\\n contextB := or(contextB, shl(104, currResetIndex))\\n }\\n\\n if (_self.contextA != contextA) {\\n _self.contextA = contextA;\\n }\\n\\n if (_self.contextB != contextB) {\\n _self.contextB = contextB;\\n }\\n }\\n\\n /**\\n * Retrieves the current ring buffer context.\\n * @param _self Buffer to access.\\n * @return Current ring buffer context.\\n */\\n function getContext(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n RingBufferContext memory\\n )\\n {\\n bytes32 contextA = _self.contextA;\\n bytes32 contextB = _self.contextB;\\n\\n uint40 globalIndex;\\n bytes27 extraData;\\n assembly {\\n globalIndex := and(contextA, 0x000000000000000000000000000000000000000000000000000000FFFFFFFFFF)\\n extraData := and(contextA, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000)\\n }\\n\\n uint64 currBufferIndex;\\n uint40 prevResetIndex;\\n uint40 currResetIndex;\\n assembly {\\n currBufferIndex := and(contextB, 0x000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFF)\\n prevResetIndex := shr(64, and(contextB, 0x00000000000000000000000000000000000000FFFFFFFFFF0000000000000000))\\n currResetIndex := shr(104, and(contextB, 0x0000000000000000000000000000FFFFFFFFFF00000000000000000000000000))\\n }\\n\\n return RingBufferContext({\\n globalIndex: globalIndex,\\n extraData: extraData,\\n currBufferIndex: currBufferIndex,\\n prevResetIndex: prevResetIndex,\\n currResetIndex: currResetIndex\\n });\\n }\\n\\n /**\\n * Retrieves the a buffer from the ring buffer by index.\\n * @param _self Buffer to access.\\n * @param _which Index of the sub buffer to access.\\n * @return Sub buffer for the index.\\n */\\n function getBuffer(\\n RingBuffer storage _self,\\n uint256 _which\\n )\\n internal\\n view\\n returns (\\n Buffer storage\\n )\\n {\\n return _which % 2 == 0 ? _self.bufferA : _self.bufferB;\\n }\\n}\\n\",\"keccak256\":\"0xb38cb98da2d09f922d5cfe772bdbd36ede2b2267ade93128e949c9da21b89940\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x60806040523480156200001157600080fd5b506040516200116438038062001164833981810160405260408110156200003757600080fd5b8151602083018051604051929492938301929190846401000000008211156200005f57600080fd5b9083019060208201858111156200007557600080fd5b82516401000000008111828201881017156200009057600080fd5b82525081516020918201929091019080838360005b83811015620000bf578181015183820152602001620000a5565b50505050905090810190601f168015620000ed5780820380516001836020036101000a031916815260200191505b506040525050600080546001600160a01b0319166001600160a01b038516179055508051620001249060019060208401906200012d565b505050620001d9565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001655760008555620001b0565b82601f106200018057805160ff1916838001178555620001b0565b82800160010185558215620001b0579182015b82811115620001b057825182559160200191906001019062000193565b50620001be929150620001c2565b5090565b5b80821115620001be5760008155600101620001c3565b610f7b80620001e96000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80634651d91e116100715780634651d91e1461021a5780638da5cb5b146102375780639507d39a146102b4578063b298e36b146102d1578063ccf8f969146102ee578063fa9e936c14610311576100b4565b8063167fd681146100b95780631f7b6d32146100e65780632015276c1461010057806329061de21461012b578063299ca47814610150578063461a447814610174575b600080fd5b6100e4600480360360408110156100cf57600080fd5b508035906020013564ffffffffff191661032e565b005b6100ee610423565b60408051918252519081900360200190f35b6100e46004803603604081101561011657600080fd5b508035906020013564ffffffffff191661043b565b6100e46004803603602081101561014157600080fd5b503564ffffffffff19166104f7565b6101586105b5565b604080516001600160a01b039092168252519081900360200190f35b6101586004803603602081101561018a57600080fd5b8101906020810181356401000000008111156101a557600080fd5b8201836020820111156101b757600080fd5b803590602001918460018302840111640100000000831117156101d957600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506105c4945050505050565b6100e46004803603602081101561023057600080fd5b50356106a0565b61023f61075b565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610279578181015183820152602001610261565b50505050905090810190601f1680156102a65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100ee600480360360208110156102ca57600080fd5b50356107e8565b6100e4600480360360208110156102e757600080fd5b5035610802565b6102f66108bd565b6040805164ffffffffff199092168252519081900360200190f35b6100e46004803603602081101561032757600080fd5b50356108ce565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526103c493909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b820191906000526020600020905b81548152906001019060200180831161039d57829003601f168201915b50505050506105c4565b6001600160a01b0316336001600160a01b0316146104135760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b61041f60028383610983565b5050565b600061042f6002610a75565b64ffffffffff16905090565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261049c93909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146104eb5760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b61041f60028383610a89565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261055893909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146105a75760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610b90565b50565b6000546001600160a01b031681565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b8381101561062457818101518382015260200161060c565b50505050905090810190601f1680156106515780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561066e57600080fd5b505afa158015610682573d6000803e3d6000fd5b505050506040513d602081101561069857600080fd5b505192915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261070193909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146107505760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610bba565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156107e05780601f106107b5576101008083540402835291602001916107e0565b820191906000526020600020905b8154815290600101906020018083116107c357829003601f168201915b505050505081565b60006107fc600264ffffffffff8416610be0565b92915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261086393909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146108b25760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610de9565b60006108c96002610e0f565b905090565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261092f93909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b03161461097e5760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b600855565b600061098e84610e26565b9050806000015164ffffffffff168364ffffffffff161080156109c35750806060015164ffffffffff168364ffffffffff1610155b610a0b576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b806080015164ffffffffff168364ffffffffff161015610a4d576040810180516000190167ffffffffffffffff169052606081015164ffffffffff1660808201525b64ffffffffff8316815264ffffffffff1982166020820152610a6f8482610e86565b50505050565b600080610a8183610e26565b519392505050565b6000610a9484610e26565b90506000610ab9826040015167ffffffffffffffff1686610edc90919063ffffffff16565b8054909150610ac757601081555b8054608083015183510364ffffffffff1610610b3e578460060154826080015164ffffffffff161015610b365760408201805160010167ffffffffffffffff169081905260808301805164ffffffffff90811660608601528451169052610b2f908690610edc565b9050610b3e565b805460020281555b608082015182510364ffffffffff9081166000818152600184810160209081526040909220889055855101909216845264ffffffffff19851691840191909152610b888684610e86565b505050505050565b6000610b9b83610e26565b64ffffffffff19831660208201529050610bb58382610e86565b505050565b6000610bc583610e26565b9050610bb5828260200151856109839092919063ffffffff16565b600080610bec84610e26565b805190915064ffffffffff168310610c42576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610c65826040015167ffffffffffffffff1686610edc90919063ffffffff16565b90506000610c8d836040015160010167ffffffffffffffff1687610edc90919063ffffffff16565b9050826080015164ffffffffff168510610d1a576080830151825464ffffffffff9091168603908110610cfe576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000908152600190920160205250604090205491506107fc9050565b6080830151606084015164ffffffffff9182168781039290911610610d7d576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154811115610dca576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b81540360009081526001909101602052604090205492506107fc915050565b6000610df483610e26565b9050610bb582826020015185610a899092919063ffffffff16565b600080610e1b83610e26565b602001519392505050565b610e2e610efc565b5080546001909101546040805160a08101825264ffffffffff808516825264ffffffffff19909416602082015267ffffffffffffffff8316818301529082901c8316606082015260689190911c909116608082015290565b80516020820151604080840151606085015160808601518754858717969483901b8417606883901b1795939291908714610ebe578689555b85896001015414610ed157600189018690555b505050505050505050565b60006002820615610ef05782600401610ef5565b826002015b9392505050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe4f564d5f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206f776e65722ea164736f6c6343000706000a",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c80634651d91e116100715780634651d91e1461021a5780638da5cb5b146102375780639507d39a146102b4578063b298e36b146102d1578063ccf8f969146102ee578063fa9e936c14610311576100b4565b8063167fd681146100b95780631f7b6d32146100e65780632015276c1461010057806329061de21461012b578063299ca47814610150578063461a447814610174575b600080fd5b6100e4600480360360408110156100cf57600080fd5b508035906020013564ffffffffff191661032e565b005b6100ee610423565b60408051918252519081900360200190f35b6100e46004803603604081101561011657600080fd5b508035906020013564ffffffffff191661043b565b6100e46004803603602081101561014157600080fd5b503564ffffffffff19166104f7565b6101586105b5565b604080516001600160a01b039092168252519081900360200190f35b6101586004803603602081101561018a57600080fd5b8101906020810181356401000000008111156101a557600080fd5b8201836020820111156101b757600080fd5b803590602001918460018302840111640100000000831117156101d957600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506105c4945050505050565b6100e46004803603602081101561023057600080fd5b50356106a0565b61023f61075b565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610279578181015183820152602001610261565b50505050905090810190601f1680156102a65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100ee600480360360208110156102ca57600080fd5b50356107e8565b6100e4600480360360208110156102e757600080fd5b5035610802565b6102f66108bd565b6040805164ffffffffff199092168252519081900360200190f35b6100e46004803603602081101561032757600080fd5b50356108ce565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526103c493909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b820191906000526020600020905b81548152906001019060200180831161039d57829003601f168201915b50505050506105c4565b6001600160a01b0316336001600160a01b0316146104135760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b61041f60028383610983565b5050565b600061042f6002610a75565b64ffffffffff16905090565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261049c93909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146104eb5760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b61041f60028383610a89565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261055893909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146105a75760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610b90565b50565b6000546001600160a01b031681565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b8381101561062457818101518382015260200161060c565b50505050905090810190601f1680156106515780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561066e57600080fd5b505afa158015610682573d6000803e3d6000fd5b505050506040513d602081101561069857600080fd5b505192915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261070193909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146107505760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610bba565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156107e05780601f106107b5576101008083540402835291602001916107e0565b820191906000526020600020905b8154815290600101906020018083116107c357829003601f168201915b505050505081565b60006107fc600264ffffffffff8416610be0565b92915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261086393909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146108b25760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610de9565b60006108c96002610e0f565b905090565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261092f93909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b03161461097e5760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b600855565b600061098e84610e26565b9050806000015164ffffffffff168364ffffffffff161080156109c35750806060015164ffffffffff168364ffffffffff1610155b610a0b576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b806080015164ffffffffff168364ffffffffff161015610a4d576040810180516000190167ffffffffffffffff169052606081015164ffffffffff1660808201525b64ffffffffff8316815264ffffffffff1982166020820152610a6f8482610e86565b50505050565b600080610a8183610e26565b519392505050565b6000610a9484610e26565b90506000610ab9826040015167ffffffffffffffff1686610edc90919063ffffffff16565b8054909150610ac757601081555b8054608083015183510364ffffffffff1610610b3e578460060154826080015164ffffffffff161015610b365760408201805160010167ffffffffffffffff169081905260808301805164ffffffffff90811660608601528451169052610b2f908690610edc565b9050610b3e565b805460020281555b608082015182510364ffffffffff9081166000818152600184810160209081526040909220889055855101909216845264ffffffffff19851691840191909152610b888684610e86565b505050505050565b6000610b9b83610e26565b64ffffffffff19831660208201529050610bb58382610e86565b505050565b6000610bc583610e26565b9050610bb5828260200151856109839092919063ffffffff16565b600080610bec84610e26565b805190915064ffffffffff168310610c42576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610c65826040015167ffffffffffffffff1686610edc90919063ffffffff16565b90506000610c8d836040015160010167ffffffffffffffff1687610edc90919063ffffffff16565b9050826080015164ffffffffff168510610d1a576080830151825464ffffffffff9091168603908110610cfe576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000908152600190920160205250604090205491506107fc9050565b6080830151606084015164ffffffffff9182168781039290911610610d7d576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154811115610dca576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b81540360009081526001909101602052604090205492506107fc915050565b6000610df483610e26565b9050610bb582826020015185610a899092919063ffffffff16565b600080610e1b83610e26565b602001519392505050565b610e2e610efc565b5080546001909101546040805160a08101825264ffffffffff808516825264ffffffffff19909416602082015267ffffffffffffffff8316818301529082901c8316606082015260689190911c909116608082015290565b80516020820151604080840151606085015160808601518754858717969483901b8417606883901b1795939291908714610ebe578689555b85896001015414610ed157600189018690555b505050505050505050565b60006002820615610ef05782600401610ef5565b826002015b9392505050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe4f564d5f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206f776e65722ea164736f6c6343000706000a",
"devdoc": {
"details": "The Chain Storage Container provides its owner contract with read, write and delete functionality. This provides gas efficiency gains by enabling it to overwrite storage slots which can no longer be used in a fraud proof due to the fraud window having passed, and the associated chain state or transactions being finalized. Three distinct Chain Storage Containers will be deployed on Layer 1: 1. Stores transaction batches for the Canonical Transaction Chain 2. Stores queued transactions for the Canonical Transaction Chain 3. Stores chain state batches for the State Commitment Chain Compiler used: solc Runtime target: EVM",
"kind": "dev",
"methods": {
"constructor": {
"params": {
"_libAddressManager": "Address of the Address Manager.",
"_owner": "Name of the contract that owns this container (will be resolved later)."
}
},
"deleteElementsAfterInclusive(uint256)": {
"params": {
"_index": "Object index to delete from."
}
},
"deleteElementsAfterInclusive(uint256,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_index": "Object index to delete from."
}
},
"get(uint256)": {
"params": {
"_index": "Index of the particular object to access."
},
"returns": {
"_0": "32 byte object value."
}
},
"getGlobalMetadata()": {
"returns": {
"_0": "Container global metadata field."
}
},
"length()": {
"returns": {
"_0": "Number of objects in the container."
}
},
"push(bytes32)": {
"params": {
"_object": "A 32 byte value to insert into the container."
}
},
"push(bytes32,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_object": "A 32 byte value to insert into the container."
}
},
"setGlobalMetadata(bytes27)": {
"params": {
"_globalMetadata": "New global metadata to set."
}
}
},
"title": "OVM_ChainStorageContainer",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {
"deleteElementsAfterInclusive(uint256)": {
"notice": "Removes all objects after and including a given index."
},
"deleteElementsAfterInclusive(uint256,bytes27)": {
"notice": "Removes all objects after and including a given index. Also allows setting the global metadata field."
},
"get(uint256)": {
"notice": "Retrieves an object from the container."
},
"getGlobalMetadata()": {
"notice": "Retrieves the container's global metadata field."
},
"length()": {
"notice": "Retrieves the number of objects stored in the container."
},
"push(bytes32)": {
"notice": "Pushes an object into the container."
},
"push(bytes32,bytes27)": {
"notice": "Pushes an object into the container. Function allows setting the global metadata since we'll need to touch the \"length\" storage slot anyway, which also contains the global metadata (it's an optimization)."
},
"setGlobalMetadata(bytes27)": {
"notice": "Sets the container's global metadata field. We're using `bytes27` here because we use five bytes to maintain the length of the underlying data structure, meaning we have an extra 27 bytes to store arbitrary data."
},
"setNextOverwritableIndex(uint256)": {
"notice": "Marks an index as overwritable, meaing the underlying buffer can start to write values over any objects before and including the given index."
}
},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 12526,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "libAddressManager",
"offset": 0,
"slot": "0",
"type": "t_contract(Lib_AddressManager)12519"
},
{
"astId": 3772,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "owner",
"offset": 0,
"slot": "1",
"type": "t_string_storage"
},
{
"astId": 3774,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "buffer",
"offset": 0,
"slot": "2",
"type": "t_struct(RingBuffer)17796_storage"
}
],
"types": {
"t_bytes32": {
"encoding": "inplace",
"label": "bytes32",
"numberOfBytes": "32"
},
"t_contract(Lib_AddressManager)12519": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
},
"t_mapping(t_uint256,t_bytes32)": {
"encoding": "mapping",
"key": "t_uint256",
"label": "mapping(uint256 => bytes32)",
"numberOfBytes": "32",
"value": "t_bytes32"
},
"t_string_storage": {
"encoding": "bytes",
"label": "string",
"numberOfBytes": "32"
},
"t_struct(Buffer)17785_storage": {
"encoding": "inplace",
"label": "struct Lib_RingBuffer.Buffer",
"members": [
{
"astId": 17780,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "length",
"offset": 0,
"slot": "0",
"type": "t_uint256"
},
{
"astId": 17784,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "buf",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_uint256,t_bytes32)"
}
],
"numberOfBytes": "64"
},
"t_struct(RingBuffer)17796_storage": {
"encoding": "inplace",
"label": "struct Lib_RingBuffer.RingBuffer",
"members": [
{
"astId": 17787,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "contextA",
"offset": 0,
"slot": "0",
"type": "t_bytes32"
},
{
"astId": 17789,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "contextB",
"offset": 0,
"slot": "1",
"type": "t_bytes32"
},
{
"astId": 17791,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "bufferA",
"offset": 0,
"slot": "2",
"type": "t_struct(Buffer)17785_storage"
},
{
"astId": 17793,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "bufferB",
"offset": 0,
"slot": "4",
"type": "t_struct(Buffer)17785_storage"
},
{
"astId": 17795,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "nextOverwritableIndex",
"offset": 0,
"slot": "6",
"type": "t_uint256"
}
],
"numberOfBytes": "224"
},
"t_uint256": {
"encoding": "inplace",
"label": "uint256",
"numberOfBytes": "32"
}
}
}
}
\ No newline at end of file
{
"address": "0xf388A98F640baB14e5Cd343B1c27817811aDd682",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_libAddressManager",
"type": "address"
},
{
"internalType": "string",
"name": "_owner",
"type": "string"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "deleteElementsAfterInclusive",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "deleteElementsAfterInclusive",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "get",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getGlobalMetadata",
"outputs": [
{
"internalType": "bytes27",
"name": "",
"type": "bytes27"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "length",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "libAddressManager",
"outputs": [
{
"internalType": "contract Lib_AddressManager",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_object",
"type": "bytes32"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "push",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_object",
"type": "bytes32"
}
],
"name": "push",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "resolve",
"outputs": [
{
"internalType": "address",
"name": "_contract",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "setGlobalMetadata",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "setNextOverwritableIndex",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"transactionHash": "0xf54a9e99acf81a7c75073a5b6e4d65ea87e157b68b1f3fc01e05fc083fddd379",
"receipt": {
"to": null,
"from": "0x18394B52d3Cb931dfA76F63251919D051953413d",
"contractAddress": "0xf388A98F640baB14e5Cd343B1c27817811aDd682",
"transactionIndex": 1,
"gasUsed": "959533",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x0f33ed7a35b50766178118eb5fe12b171aa97744a139a44073d9cb42cc88d5de",
"transactionHash": "0xf54a9e99acf81a7c75073a5b6e4d65ea87e157b68b1f3fc01e05fc083fddd379",
"logs": [],
"blockNumber": 24199475,
"cumulativeGasUsed": "3525383",
"status": 1,
"byzantium": true
},
"args": [
"0xFaf27b24ba54C6910C12CFF5C9453C0e8D634e05",
"OVM_CanonicalTransactionChain"
],
"solcInputHash": "03aed03b958b1d37f90bd88d0f56dd85",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_owner\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"deleteElementsAfterInclusive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"deleteElementsAfterInclusive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"get\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGlobalMetadata\",\"outputs\":[{\"internalType\":\"bytes27\",\"name\":\"\",\"type\":\"bytes27\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"length\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"libAddressManager\",\"outputs\":[{\"internalType\":\"contract Lib_AddressManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_object\",\"type\":\"bytes32\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"push\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_object\",\"type\":\"bytes32\"}],\"name\":\"push\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"setGlobalMetadata\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"setNextOverwritableIndex\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"The Chain Storage Container provides its owner contract with read, write and delete functionality. This provides gas efficiency gains by enabling it to overwrite storage slots which can no longer be used in a fraud proof due to the fraud window having passed, and the associated chain state or transactions being finalized. Three distinct Chain Storage Containers will be deployed on Layer 1: 1. Stores transaction batches for the Canonical Transaction Chain 2. Stores queued transactions for the Canonical Transaction Chain 3. Stores chain state batches for the State Commitment Chain Compiler used: solc Runtime target: EVM\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_libAddressManager\":\"Address of the Address Manager.\",\"_owner\":\"Name of the contract that owns this container (will be resolved later).\"}},\"deleteElementsAfterInclusive(uint256)\":{\"params\":{\"_index\":\"Object index to delete from.\"}},\"deleteElementsAfterInclusive(uint256,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_index\":\"Object index to delete from.\"}},\"get(uint256)\":{\"params\":{\"_index\":\"Index of the particular object to access.\"},\"returns\":{\"_0\":\"32 byte object value.\"}},\"getGlobalMetadata()\":{\"returns\":{\"_0\":\"Container global metadata field.\"}},\"length()\":{\"returns\":{\"_0\":\"Number of objects in the container.\"}},\"push(bytes32)\":{\"params\":{\"_object\":\"A 32 byte value to insert into the container.\"}},\"push(bytes32,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_object\":\"A 32 byte value to insert into the container.\"}},\"setGlobalMetadata(bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata to set.\"}}},\"title\":\"OVM_ChainStorageContainer\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deleteElementsAfterInclusive(uint256)\":{\"notice\":\"Removes all objects after and including a given index.\"},\"deleteElementsAfterInclusive(uint256,bytes27)\":{\"notice\":\"Removes all objects after and including a given index. Also allows setting the global metadata field.\"},\"get(uint256)\":{\"notice\":\"Retrieves an object from the container.\"},\"getGlobalMetadata()\":{\"notice\":\"Retrieves the container's global metadata field.\"},\"length()\":{\"notice\":\"Retrieves the number of objects stored in the container.\"},\"push(bytes32)\":{\"notice\":\"Pushes an object into the container.\"},\"push(bytes32,bytes27)\":{\"notice\":\"Pushes an object into the container. Function allows setting the global metadata since we'll need to touch the \\\"length\\\" storage slot anyway, which also contains the global metadata (it's an optimization).\"},\"setGlobalMetadata(bytes27)\":{\"notice\":\"Sets the container's global metadata field. We're using `bytes27` here because we use five bytes to maintain the length of the underlying data structure, meaning we have an extra 27 bytes to store arbitrary data.\"},\"setNextOverwritableIndex(uint256)\":{\"notice\":\"Marks an index as overwritable, meaing the underlying buffer can start to write values over any objects before and including the given index.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol\":\"OVM_ChainStorageContainer\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_RingBuffer } from \\\"../../libraries/utils/Lib_RingBuffer.sol\\\";\\nimport { Lib_AddressResolver } from \\\"../../libraries/resolver/Lib_AddressResolver.sol\\\";\\n\\n/* Interface Imports */\\nimport { iOVM_ChainStorageContainer } from \\\"../../iOVM/chain/iOVM_ChainStorageContainer.sol\\\";\\n\\n/**\\n * @title OVM_ChainStorageContainer\\n * @dev The Chain Storage Container provides its owner contract with read, write and delete functionality.\\n * This provides gas efficiency gains by enabling it to overwrite storage slots which can no longer be used\\n * in a fraud proof due to the fraud window having passed, and the associated chain state or\\n * transactions being finalized.\\n * Three distinct Chain Storage Containers will be deployed on Layer 1:\\n * 1. Stores transaction batches for the Canonical Transaction Chain\\n * 2. Stores queued transactions for the Canonical Transaction Chain\\n * 3. Stores chain state batches for the State Commitment Chain\\n *\\n * Compiler used: solc\\n * Runtime target: EVM\\n */\\ncontract OVM_ChainStorageContainer is iOVM_ChainStorageContainer, Lib_AddressResolver {\\n\\n /*************\\n * Libraries *\\n *************/\\n\\n using Lib_RingBuffer for Lib_RingBuffer.RingBuffer;\\n\\n\\n /*************\\n * Variables *\\n *************/\\n\\n string public owner;\\n Lib_RingBuffer.RingBuffer internal buffer;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Address Manager.\\n * @param _owner Name of the contract that owns this container (will be resolved later).\\n */\\n constructor(\\n address _libAddressManager,\\n string memory _owner\\n )\\n Lib_AddressResolver(_libAddressManager)\\n {\\n owner = _owner;\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n msg.sender == resolve(owner),\\n \\\"OVM_ChainStorageContainer: Function can only be called by the owner.\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function setGlobalMetadata(\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n return buffer.setExtraData(_globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function getGlobalMetadata()\\n override\\n public\\n view\\n returns (\\n bytes27\\n )\\n {\\n return buffer.getExtraData();\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function length()\\n override\\n public\\n view\\n returns (\\n uint256\\n )\\n {\\n return uint256(buffer.getLength());\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push(\\n bytes32 _object\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push(_object);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push(\\n bytes32 _object,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push(_object, _globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function get(\\n uint256 _index\\n )\\n override\\n public\\n view\\n returns (\\n bytes32\\n )\\n {\\n return buffer.get(uint40(_index));\\n }\\n \\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.deleteElementsAfterInclusive(\\n uint40(_index)\\n );\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.deleteElementsAfterInclusive(\\n uint40(_index),\\n _globalMetadata\\n );\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function setNextOverwritableIndex(\\n uint256 _index\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.nextOverwritableIndex = _index;\\n }\\n}\\n\",\"keccak256\":\"0x52e3ef7166fe134d32997917067e3d74128173b12fb6231eec34132102ddbb50\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/iOVM/chain/iOVM_ChainStorageContainer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title iOVM_ChainStorageContainer\\n */\\ninterface iOVM_ChainStorageContainer {\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Sets the container's global metadata field. We're using `bytes27` here because we use five\\n * bytes to maintain the length of the underlying data structure, meaning we have an extra\\n * 27 bytes to store arbitrary data.\\n * @param _globalMetadata New global metadata to set.\\n */\\n function setGlobalMetadata(\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Retrieves the container's global metadata field.\\n * @return Container global metadata field.\\n */\\n function getGlobalMetadata()\\n external\\n view\\n returns (\\n bytes27\\n );\\n\\n /**\\n * Retrieves the number of objects stored in the container.\\n * @return Number of objects in the container.\\n */\\n function length()\\n external\\n view\\n returns (\\n uint256\\n );\\n\\n /**\\n * Pushes an object into the container.\\n * @param _object A 32 byte value to insert into the container.\\n */\\n function push(\\n bytes32 _object\\n )\\n external;\\n\\n /**\\n * Pushes an object into the container. Function allows setting the global metadata since\\n * we'll need to touch the \\\"length\\\" storage slot anyway, which also contains the global\\n * metadata (it's an optimization).\\n * @param _object A 32 byte value to insert into the container.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function push(\\n bytes32 _object,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Retrieves an object from the container.\\n * @param _index Index of the particular object to access.\\n * @return 32 byte object value.\\n */\\n function get(\\n uint256 _index\\n )\\n external\\n view\\n returns (\\n bytes32\\n );\\n\\n /**\\n * Removes all objects after and including a given index.\\n * @param _index Object index to delete from.\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index\\n )\\n external;\\n\\n /**\\n * Removes all objects after and including a given index. Also allows setting the global\\n * metadata field.\\n * @param _index Object index to delete from.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Marks an index as overwritable, meaing the underlying buffer can start to write values over\\n * any objects before and including the given index.\\n */\\n function setNextOverwritableIndex(\\n uint256 _index\\n )\\n external;\\n}\\n\",\"keccak256\":\"0x2d7973a0ad84c23ec62624d3f1e3aeb198cc72686ff1e6cfa17155556b320c94\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0x3a490595cc21ff170e4027843093670ff845d5972481fbfb956b722ea564bb06\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_AddressResolver\\n */\\nabstract contract Lib_AddressResolver {\\n\\n /*******************************************\\n * Contract Variables: Contract References *\\n *******************************************/\\n\\n Lib_AddressManager public libAddressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n */\\n constructor(\\n address _libAddressManager\\n ) {\\n libAddressManager = Lib_AddressManager(_libAddressManager);\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function resolve(\\n string memory _name\\n )\\n public\\n view\\n returns (\\n address _contract\\n )\\n {\\n return libAddressManager.getAddress(_name);\\n }\\n}\\n\",\"keccak256\":\"0xaa3ed342f6deb156c660fd83afa579a3b80db17eb465e8949cf5c1b114780143\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xd9dfd9264e5b5fedd53a5b10fdf179c3f367614b0fe69179bce4e45119f5b739\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/utils/Lib_RingBuffer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\nlibrary Lib_RingBuffer {\\n using Lib_RingBuffer for RingBuffer;\\n\\n /***********\\n * Structs *\\n ***********/\\n\\n struct Buffer {\\n uint256 length;\\n mapping (uint256 => bytes32) buf;\\n }\\n\\n struct RingBuffer {\\n bytes32 contextA;\\n bytes32 contextB;\\n Buffer bufferA;\\n Buffer bufferB;\\n uint256 nextOverwritableIndex;\\n }\\n\\n struct RingBufferContext {\\n // contextA\\n uint40 globalIndex;\\n bytes27 extraData;\\n\\n // contextB\\n uint64 currBufferIndex;\\n uint40 prevResetIndex;\\n uint40 currResetIndex;\\n }\\n\\n\\n /*************\\n * Constants *\\n *************/\\n\\n uint256 constant MIN_CAPACITY = 16;\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * Pushes a single element to the buffer.\\n * @param _self Buffer to access.\\n * @param _value Value to push to the buffer.\\n * @param _extraData Optional global extra data.\\n */\\n function push(\\n RingBuffer storage _self,\\n bytes32 _value,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n\\n // Set a minimum capacity.\\n if (currBuffer.length == 0) {\\n currBuffer.length = MIN_CAPACITY;\\n }\\n\\n // Check if we need to expand the buffer.\\n if (ctx.globalIndex - ctx.currResetIndex >= currBuffer.length) {\\n if (ctx.currResetIndex < _self.nextOverwritableIndex) {\\n // We're going to overwrite the inactive buffer.\\n // Bump the buffer index, reset the delete offset, and set our reset indices.\\n ctx.currBufferIndex++;\\n ctx.prevResetIndex = ctx.currResetIndex;\\n ctx.currResetIndex = ctx.globalIndex;\\n\\n // Swap over to the next buffer.\\n currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n } else {\\n // We're not overwriting yet, double the length of the current buffer.\\n currBuffer.length *= 2;\\n }\\n }\\n\\n // Index to write to is the difference of the global and reset indices.\\n uint256 writeHead = ctx.globalIndex - ctx.currResetIndex;\\n currBuffer.buf[writeHead] = _value;\\n\\n // Bump the global index and insert our extra data, then save the context.\\n ctx.globalIndex++;\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Pushes a single element to the buffer.\\n * @param _self Buffer to access.\\n * @param _value Value to push to the buffer.\\n */\\n function push(\\n RingBuffer storage _self,\\n bytes32 _value\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n \\n _self.push(\\n _value,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Retrieves an element from the buffer.\\n * @param _self Buffer to access.\\n * @param _index Element index to retrieve.\\n * @return Value of the element at the given index.\\n */\\n function get(\\n RingBuffer storage _self,\\n uint256 _index\\n )\\n internal\\n view\\n returns (\\n bytes32 \\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n require(\\n _index < ctx.globalIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n Buffer storage prevBuffer = _self.getBuffer(ctx.currBufferIndex + 1);\\n\\n if (_index >= ctx.currResetIndex) {\\n // We're trying to load an element from the current buffer.\\n // Relative index is just the difference from the reset index.\\n uint256 relativeIndex = _index - ctx.currResetIndex;\\n\\n // Shouldn't happen but why not check.\\n require(\\n relativeIndex < currBuffer.length,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n return currBuffer.buf[relativeIndex];\\n } else {\\n // We're trying to load an element from the previous buffer.\\n // Relative index is the difference from the reset index in the other direction.\\n uint256 relativeIndex = ctx.currResetIndex - _index;\\n\\n // Condition only fails in the case that we deleted and flipped buffers.\\n require(\\n ctx.currResetIndex > ctx.prevResetIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n // Make sure we're not trying to read beyond the array.\\n require(\\n relativeIndex <= prevBuffer.length,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n return prevBuffer.buf[prevBuffer.length - relativeIndex];\\n }\\n }\\n\\n /**\\n * Deletes all elements after (and including) a given index.\\n * @param _self Buffer to access.\\n * @param _index Index of the element to delete from (inclusive).\\n * @param _extraData Optional global extra data.\\n */\\n function deleteElementsAfterInclusive(\\n RingBuffer storage _self,\\n uint40 _index,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n require(\\n _index < ctx.globalIndex && _index >= ctx.prevResetIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n if (_index < ctx.currResetIndex) {\\n // We're switching back to the previous buffer.\\n // Reduce the buffer index, set the current reset index back to match the previous one.\\n // We use the equality of these two values to prevent reading beyond this buffer.\\n ctx.currBufferIndex--;\\n ctx.currResetIndex = ctx.prevResetIndex;\\n }\\n\\n // Set our global index and extra data, save the context.\\n ctx.globalIndex = _index;\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Deletes all elements after (and including) a given index.\\n * @param _self Buffer to access.\\n * @param _index Index of the element to delete from (inclusive).\\n */\\n function deleteElementsAfterInclusive(\\n RingBuffer storage _self,\\n uint40 _index\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n _self.deleteElementsAfterInclusive(\\n _index,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Retrieves the current global index.\\n * @param _self Buffer to access.\\n * @return Current global index.\\n */\\n function getLength(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n uint40\\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n return ctx.globalIndex;\\n }\\n\\n /**\\n * Changes current global extra data.\\n * @param _self Buffer to access.\\n * @param _extraData New global extra data.\\n */\\n function setExtraData(\\n RingBuffer storage _self,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Retrieves the current global extra data.\\n * @param _self Buffer to access.\\n * @return Current global extra data.\\n */\\n function getExtraData(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n bytes27\\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n return ctx.extraData;\\n }\\n\\n /**\\n * Sets the current ring buffer context.\\n * @param _self Buffer to access.\\n * @param _ctx Current ring buffer context.\\n */\\n function setContext(\\n RingBuffer storage _self,\\n RingBufferContext memory _ctx\\n )\\n internal\\n {\\n bytes32 contextA;\\n bytes32 contextB;\\n\\n uint40 globalIndex = _ctx.globalIndex;\\n bytes27 extraData = _ctx.extraData;\\n assembly {\\n contextA := globalIndex\\n contextA := or(contextA, extraData)\\n }\\n\\n uint64 currBufferIndex = _ctx.currBufferIndex;\\n uint40 prevResetIndex = _ctx.prevResetIndex;\\n uint40 currResetIndex = _ctx.currResetIndex;\\n assembly {\\n contextB := currBufferIndex\\n contextB := or(contextB, shl(64, prevResetIndex))\\n contextB := or(contextB, shl(104, currResetIndex))\\n }\\n\\n if (_self.contextA != contextA) {\\n _self.contextA = contextA;\\n }\\n\\n if (_self.contextB != contextB) {\\n _self.contextB = contextB;\\n }\\n }\\n\\n /**\\n * Retrieves the current ring buffer context.\\n * @param _self Buffer to access.\\n * @return Current ring buffer context.\\n */\\n function getContext(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n RingBufferContext memory\\n )\\n {\\n bytes32 contextA = _self.contextA;\\n bytes32 contextB = _self.contextB;\\n\\n uint40 globalIndex;\\n bytes27 extraData;\\n assembly {\\n globalIndex := and(contextA, 0x000000000000000000000000000000000000000000000000000000FFFFFFFFFF)\\n extraData := and(contextA, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000)\\n }\\n\\n uint64 currBufferIndex;\\n uint40 prevResetIndex;\\n uint40 currResetIndex;\\n assembly {\\n currBufferIndex := and(contextB, 0x000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFF)\\n prevResetIndex := shr(64, and(contextB, 0x00000000000000000000000000000000000000FFFFFFFFFF0000000000000000))\\n currResetIndex := shr(104, and(contextB, 0x0000000000000000000000000000FFFFFFFFFF00000000000000000000000000))\\n }\\n\\n return RingBufferContext({\\n globalIndex: globalIndex,\\n extraData: extraData,\\n currBufferIndex: currBufferIndex,\\n prevResetIndex: prevResetIndex,\\n currResetIndex: currResetIndex\\n });\\n }\\n\\n /**\\n * Retrieves the a buffer from the ring buffer by index.\\n * @param _self Buffer to access.\\n * @param _which Index of the sub buffer to access.\\n * @return Sub buffer for the index.\\n */\\n function getBuffer(\\n RingBuffer storage _self,\\n uint256 _which\\n )\\n internal\\n view\\n returns (\\n Buffer storage\\n )\\n {\\n return _which % 2 == 0 ? _self.bufferA : _self.bufferB;\\n }\\n}\\n\",\"keccak256\":\"0xb38cb98da2d09f922d5cfe772bdbd36ede2b2267ade93128e949c9da21b89940\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x60806040523480156200001157600080fd5b506040516200116438038062001164833981810160405260408110156200003757600080fd5b8151602083018051604051929492938301929190846401000000008211156200005f57600080fd5b9083019060208201858111156200007557600080fd5b82516401000000008111828201881017156200009057600080fd5b82525081516020918201929091019080838360005b83811015620000bf578181015183820152602001620000a5565b50505050905090810190601f168015620000ed5780820380516001836020036101000a031916815260200191505b506040525050600080546001600160a01b0319166001600160a01b038516179055508051620001249060019060208401906200012d565b505050620001d9565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001655760008555620001b0565b82601f106200018057805160ff1916838001178555620001b0565b82800160010185558215620001b0579182015b82811115620001b057825182559160200191906001019062000193565b50620001be929150620001c2565b5090565b5b80821115620001be5760008155600101620001c3565b610f7b80620001e96000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80634651d91e116100715780634651d91e1461021a5780638da5cb5b146102375780639507d39a146102b4578063b298e36b146102d1578063ccf8f969146102ee578063fa9e936c14610311576100b4565b8063167fd681146100b95780631f7b6d32146100e65780632015276c1461010057806329061de21461012b578063299ca47814610150578063461a447814610174575b600080fd5b6100e4600480360360408110156100cf57600080fd5b508035906020013564ffffffffff191661032e565b005b6100ee610423565b60408051918252519081900360200190f35b6100e46004803603604081101561011657600080fd5b508035906020013564ffffffffff191661043b565b6100e46004803603602081101561014157600080fd5b503564ffffffffff19166104f7565b6101586105b5565b604080516001600160a01b039092168252519081900360200190f35b6101586004803603602081101561018a57600080fd5b8101906020810181356401000000008111156101a557600080fd5b8201836020820111156101b757600080fd5b803590602001918460018302840111640100000000831117156101d957600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506105c4945050505050565b6100e46004803603602081101561023057600080fd5b50356106a0565b61023f61075b565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610279578181015183820152602001610261565b50505050905090810190601f1680156102a65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100ee600480360360208110156102ca57600080fd5b50356107e8565b6100e4600480360360208110156102e757600080fd5b5035610802565b6102f66108bd565b6040805164ffffffffff199092168252519081900360200190f35b6100e46004803603602081101561032757600080fd5b50356108ce565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526103c493909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b820191906000526020600020905b81548152906001019060200180831161039d57829003601f168201915b50505050506105c4565b6001600160a01b0316336001600160a01b0316146104135760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b61041f60028383610983565b5050565b600061042f6002610a75565b64ffffffffff16905090565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261049c93909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146104eb5760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b61041f60028383610a89565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261055893909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146105a75760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610b90565b50565b6000546001600160a01b031681565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b8381101561062457818101518382015260200161060c565b50505050905090810190601f1680156106515780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561066e57600080fd5b505afa158015610682573d6000803e3d6000fd5b505050506040513d602081101561069857600080fd5b505192915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261070193909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146107505760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610bba565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156107e05780601f106107b5576101008083540402835291602001916107e0565b820191906000526020600020905b8154815290600101906020018083116107c357829003601f168201915b505050505081565b60006107fc600264ffffffffff8416610be0565b92915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261086393909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146108b25760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610de9565b60006108c96002610e0f565b905090565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261092f93909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b03161461097e5760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b600855565b600061098e84610e26565b9050806000015164ffffffffff168364ffffffffff161080156109c35750806060015164ffffffffff168364ffffffffff1610155b610a0b576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b806080015164ffffffffff168364ffffffffff161015610a4d576040810180516000190167ffffffffffffffff169052606081015164ffffffffff1660808201525b64ffffffffff8316815264ffffffffff1982166020820152610a6f8482610e86565b50505050565b600080610a8183610e26565b519392505050565b6000610a9484610e26565b90506000610ab9826040015167ffffffffffffffff1686610edc90919063ffffffff16565b8054909150610ac757601081555b8054608083015183510364ffffffffff1610610b3e578460060154826080015164ffffffffff161015610b365760408201805160010167ffffffffffffffff169081905260808301805164ffffffffff90811660608601528451169052610b2f908690610edc565b9050610b3e565b805460020281555b608082015182510364ffffffffff9081166000818152600184810160209081526040909220889055855101909216845264ffffffffff19851691840191909152610b888684610e86565b505050505050565b6000610b9b83610e26565b64ffffffffff19831660208201529050610bb58382610e86565b505050565b6000610bc583610e26565b9050610bb5828260200151856109839092919063ffffffff16565b600080610bec84610e26565b805190915064ffffffffff168310610c42576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610c65826040015167ffffffffffffffff1686610edc90919063ffffffff16565b90506000610c8d836040015160010167ffffffffffffffff1687610edc90919063ffffffff16565b9050826080015164ffffffffff168510610d1a576080830151825464ffffffffff9091168603908110610cfe576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000908152600190920160205250604090205491506107fc9050565b6080830151606084015164ffffffffff9182168781039290911610610d7d576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154811115610dca576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b81540360009081526001909101602052604090205492506107fc915050565b6000610df483610e26565b9050610bb582826020015185610a899092919063ffffffff16565b600080610e1b83610e26565b602001519392505050565b610e2e610efc565b5080546001909101546040805160a08101825264ffffffffff808516825264ffffffffff19909416602082015267ffffffffffffffff8316818301529082901c8316606082015260689190911c909116608082015290565b80516020820151604080840151606085015160808601518754858717969483901b8417606883901b1795939291908714610ebe578689555b85896001015414610ed157600189018690555b505050505050505050565b60006002820615610ef05782600401610ef5565b826002015b9392505050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe4f564d5f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206f776e65722ea164736f6c6343000706000a",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c80634651d91e116100715780634651d91e1461021a5780638da5cb5b146102375780639507d39a146102b4578063b298e36b146102d1578063ccf8f969146102ee578063fa9e936c14610311576100b4565b8063167fd681146100b95780631f7b6d32146100e65780632015276c1461010057806329061de21461012b578063299ca47814610150578063461a447814610174575b600080fd5b6100e4600480360360408110156100cf57600080fd5b508035906020013564ffffffffff191661032e565b005b6100ee610423565b60408051918252519081900360200190f35b6100e46004803603604081101561011657600080fd5b508035906020013564ffffffffff191661043b565b6100e46004803603602081101561014157600080fd5b503564ffffffffff19166104f7565b6101586105b5565b604080516001600160a01b039092168252519081900360200190f35b6101586004803603602081101561018a57600080fd5b8101906020810181356401000000008111156101a557600080fd5b8201836020820111156101b757600080fd5b803590602001918460018302840111640100000000831117156101d957600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506105c4945050505050565b6100e46004803603602081101561023057600080fd5b50356106a0565b61023f61075b565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610279578181015183820152602001610261565b50505050905090810190601f1680156102a65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100ee600480360360208110156102ca57600080fd5b50356107e8565b6100e4600480360360208110156102e757600080fd5b5035610802565b6102f66108bd565b6040805164ffffffffff199092168252519081900360200190f35b6100e46004803603602081101561032757600080fd5b50356108ce565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526103c493909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b820191906000526020600020905b81548152906001019060200180831161039d57829003601f168201915b50505050506105c4565b6001600160a01b0316336001600160a01b0316146104135760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b61041f60028383610983565b5050565b600061042f6002610a75565b64ffffffffff16905090565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261049c93909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146104eb5760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b61041f60028383610a89565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261055893909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146105a75760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610b90565b50565b6000546001600160a01b031681565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b8381101561062457818101518382015260200161060c565b50505050905090810190601f1680156106515780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561066e57600080fd5b505afa158015610682573d6000803e3d6000fd5b505050506040513d602081101561069857600080fd5b505192915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261070193909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146107505760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610bba565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156107e05780601f106107b5576101008083540402835291602001916107e0565b820191906000526020600020905b8154815290600101906020018083116107c357829003601f168201915b505050505081565b60006107fc600264ffffffffff8416610be0565b92915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261086393909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146108b25760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610de9565b60006108c96002610e0f565b905090565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261092f93909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b03161461097e5760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b600855565b600061098e84610e26565b9050806000015164ffffffffff168364ffffffffff161080156109c35750806060015164ffffffffff168364ffffffffff1610155b610a0b576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b806080015164ffffffffff168364ffffffffff161015610a4d576040810180516000190167ffffffffffffffff169052606081015164ffffffffff1660808201525b64ffffffffff8316815264ffffffffff1982166020820152610a6f8482610e86565b50505050565b600080610a8183610e26565b519392505050565b6000610a9484610e26565b90506000610ab9826040015167ffffffffffffffff1686610edc90919063ffffffff16565b8054909150610ac757601081555b8054608083015183510364ffffffffff1610610b3e578460060154826080015164ffffffffff161015610b365760408201805160010167ffffffffffffffff169081905260808301805164ffffffffff90811660608601528451169052610b2f908690610edc565b9050610b3e565b805460020281555b608082015182510364ffffffffff9081166000818152600184810160209081526040909220889055855101909216845264ffffffffff19851691840191909152610b888684610e86565b505050505050565b6000610b9b83610e26565b64ffffffffff19831660208201529050610bb58382610e86565b505050565b6000610bc583610e26565b9050610bb5828260200151856109839092919063ffffffff16565b600080610bec84610e26565b805190915064ffffffffff168310610c42576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610c65826040015167ffffffffffffffff1686610edc90919063ffffffff16565b90506000610c8d836040015160010167ffffffffffffffff1687610edc90919063ffffffff16565b9050826080015164ffffffffff168510610d1a576080830151825464ffffffffff9091168603908110610cfe576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000908152600190920160205250604090205491506107fc9050565b6080830151606084015164ffffffffff9182168781039290911610610d7d576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154811115610dca576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b81540360009081526001909101602052604090205492506107fc915050565b6000610df483610e26565b9050610bb582826020015185610a899092919063ffffffff16565b600080610e1b83610e26565b602001519392505050565b610e2e610efc565b5080546001909101546040805160a08101825264ffffffffff808516825264ffffffffff19909416602082015267ffffffffffffffff8316818301529082901c8316606082015260689190911c909116608082015290565b80516020820151604080840151606085015160808601518754858717969483901b8417606883901b1795939291908714610ebe578689555b85896001015414610ed157600189018690555b505050505050505050565b60006002820615610ef05782600401610ef5565b826002015b9392505050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe4f564d5f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206f776e65722ea164736f6c6343000706000a",
"devdoc": {
"details": "The Chain Storage Container provides its owner contract with read, write and delete functionality. This provides gas efficiency gains by enabling it to overwrite storage slots which can no longer be used in a fraud proof due to the fraud window having passed, and the associated chain state or transactions being finalized. Three distinct Chain Storage Containers will be deployed on Layer 1: 1. Stores transaction batches for the Canonical Transaction Chain 2. Stores queued transactions for the Canonical Transaction Chain 3. Stores chain state batches for the State Commitment Chain Compiler used: solc Runtime target: EVM",
"kind": "dev",
"methods": {
"constructor": {
"params": {
"_libAddressManager": "Address of the Address Manager.",
"_owner": "Name of the contract that owns this container (will be resolved later)."
}
},
"deleteElementsAfterInclusive(uint256)": {
"params": {
"_index": "Object index to delete from."
}
},
"deleteElementsAfterInclusive(uint256,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_index": "Object index to delete from."
}
},
"get(uint256)": {
"params": {
"_index": "Index of the particular object to access."
},
"returns": {
"_0": "32 byte object value."
}
},
"getGlobalMetadata()": {
"returns": {
"_0": "Container global metadata field."
}
},
"length()": {
"returns": {
"_0": "Number of objects in the container."
}
},
"push(bytes32)": {
"params": {
"_object": "A 32 byte value to insert into the container."
}
},
"push(bytes32,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_object": "A 32 byte value to insert into the container."
}
},
"setGlobalMetadata(bytes27)": {
"params": {
"_globalMetadata": "New global metadata to set."
}
}
},
"title": "OVM_ChainStorageContainer",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {
"deleteElementsAfterInclusive(uint256)": {
"notice": "Removes all objects after and including a given index."
},
"deleteElementsAfterInclusive(uint256,bytes27)": {
"notice": "Removes all objects after and including a given index. Also allows setting the global metadata field."
},
"get(uint256)": {
"notice": "Retrieves an object from the container."
},
"getGlobalMetadata()": {
"notice": "Retrieves the container's global metadata field."
},
"length()": {
"notice": "Retrieves the number of objects stored in the container."
},
"push(bytes32)": {
"notice": "Pushes an object into the container."
},
"push(bytes32,bytes27)": {
"notice": "Pushes an object into the container. Function allows setting the global metadata since we'll need to touch the \"length\" storage slot anyway, which also contains the global metadata (it's an optimization)."
},
"setGlobalMetadata(bytes27)": {
"notice": "Sets the container's global metadata field. We're using `bytes27` here because we use five bytes to maintain the length of the underlying data structure, meaning we have an extra 27 bytes to store arbitrary data."
},
"setNextOverwritableIndex(uint256)": {
"notice": "Marks an index as overwritable, meaing the underlying buffer can start to write values over any objects before and including the given index."
}
},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 12526,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "libAddressManager",
"offset": 0,
"slot": "0",
"type": "t_contract(Lib_AddressManager)12519"
},
{
"astId": 3772,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "owner",
"offset": 0,
"slot": "1",
"type": "t_string_storage"
},
{
"astId": 3774,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "buffer",
"offset": 0,
"slot": "2",
"type": "t_struct(RingBuffer)17796_storage"
}
],
"types": {
"t_bytes32": {
"encoding": "inplace",
"label": "bytes32",
"numberOfBytes": "32"
},
"t_contract(Lib_AddressManager)12519": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
},
"t_mapping(t_uint256,t_bytes32)": {
"encoding": "mapping",
"key": "t_uint256",
"label": "mapping(uint256 => bytes32)",
"numberOfBytes": "32",
"value": "t_bytes32"
},
"t_string_storage": {
"encoding": "bytes",
"label": "string",
"numberOfBytes": "32"
},
"t_struct(Buffer)17785_storage": {
"encoding": "inplace",
"label": "struct Lib_RingBuffer.Buffer",
"members": [
{
"astId": 17780,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "length",
"offset": 0,
"slot": "0",
"type": "t_uint256"
},
{
"astId": 17784,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "buf",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_uint256,t_bytes32)"
}
],
"numberOfBytes": "64"
},
"t_struct(RingBuffer)17796_storage": {
"encoding": "inplace",
"label": "struct Lib_RingBuffer.RingBuffer",
"members": [
{
"astId": 17787,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "contextA",
"offset": 0,
"slot": "0",
"type": "t_bytes32"
},
{
"astId": 17789,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "contextB",
"offset": 0,
"slot": "1",
"type": "t_bytes32"
},
{
"astId": 17791,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "bufferA",
"offset": 0,
"slot": "2",
"type": "t_struct(Buffer)17785_storage"
},
{
"astId": 17793,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "bufferB",
"offset": 0,
"slot": "4",
"type": "t_struct(Buffer)17785_storage"
},
{
"astId": 17795,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "nextOverwritableIndex",
"offset": 0,
"slot": "6",
"type": "t_uint256"
}
],
"numberOfBytes": "224"
},
"t_uint256": {
"encoding": "inplace",
"label": "uint256",
"numberOfBytes": "32"
}
}
}
}
\ No newline at end of file
{
"address": "0xDC1f37ec1eeBF9fe5087c24f889E15AB228FDD22",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_libAddressManager",
"type": "address"
},
{
"internalType": "string",
"name": "_owner",
"type": "string"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "deleteElementsAfterInclusive",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "deleteElementsAfterInclusive",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "get",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getGlobalMetadata",
"outputs": [
{
"internalType": "bytes27",
"name": "",
"type": "bytes27"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "length",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "libAddressManager",
"outputs": [
{
"internalType": "contract Lib_AddressManager",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_object",
"type": "bytes32"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "push",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_object",
"type": "bytes32"
}
],
"name": "push",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "resolve",
"outputs": [
{
"internalType": "address",
"name": "_contract",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "setGlobalMetadata",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "setNextOverwritableIndex",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"transactionHash": "0x6d7a62089c7d99506e0225f18c8e70ebe40d4404264d118ad5f6fd3032a310be",
"receipt": {
"to": null,
"from": "0x18394B52d3Cb931dfA76F63251919D051953413d",
"contractAddress": "0xDC1f37ec1eeBF9fe5087c24f889E15AB228FDD22",
"transactionIndex": 1,
"gasUsed": "959473",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x3c641cd07d53e9a3ee8ae57156276953c8eef1df8e7fc6a68910e98896ce926e",
"transactionHash": "0x6d7a62089c7d99506e0225f18c8e70ebe40d4404264d118ad5f6fd3032a310be",
"logs": [],
"blockNumber": 24199479,
"cumulativeGasUsed": "1026353",
"status": 1,
"byzantium": true
},
"args": [
"0xFaf27b24ba54C6910C12CFF5C9453C0e8D634e05",
"OVM_StateCommitmentChain"
],
"solcInputHash": "03aed03b958b1d37f90bd88d0f56dd85",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_owner\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"deleteElementsAfterInclusive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"deleteElementsAfterInclusive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"get\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGlobalMetadata\",\"outputs\":[{\"internalType\":\"bytes27\",\"name\":\"\",\"type\":\"bytes27\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"length\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"libAddressManager\",\"outputs\":[{\"internalType\":\"contract Lib_AddressManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_object\",\"type\":\"bytes32\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"push\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_object\",\"type\":\"bytes32\"}],\"name\":\"push\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"setGlobalMetadata\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"setNextOverwritableIndex\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"The Chain Storage Container provides its owner contract with read, write and delete functionality. This provides gas efficiency gains by enabling it to overwrite storage slots which can no longer be used in a fraud proof due to the fraud window having passed, and the associated chain state or transactions being finalized. Three distinct Chain Storage Containers will be deployed on Layer 1: 1. Stores transaction batches for the Canonical Transaction Chain 2. Stores queued transactions for the Canonical Transaction Chain 3. Stores chain state batches for the State Commitment Chain Compiler used: solc Runtime target: EVM\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_libAddressManager\":\"Address of the Address Manager.\",\"_owner\":\"Name of the contract that owns this container (will be resolved later).\"}},\"deleteElementsAfterInclusive(uint256)\":{\"params\":{\"_index\":\"Object index to delete from.\"}},\"deleteElementsAfterInclusive(uint256,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_index\":\"Object index to delete from.\"}},\"get(uint256)\":{\"params\":{\"_index\":\"Index of the particular object to access.\"},\"returns\":{\"_0\":\"32 byte object value.\"}},\"getGlobalMetadata()\":{\"returns\":{\"_0\":\"Container global metadata field.\"}},\"length()\":{\"returns\":{\"_0\":\"Number of objects in the container.\"}},\"push(bytes32)\":{\"params\":{\"_object\":\"A 32 byte value to insert into the container.\"}},\"push(bytes32,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_object\":\"A 32 byte value to insert into the container.\"}},\"setGlobalMetadata(bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata to set.\"}}},\"title\":\"OVM_ChainStorageContainer\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deleteElementsAfterInclusive(uint256)\":{\"notice\":\"Removes all objects after and including a given index.\"},\"deleteElementsAfterInclusive(uint256,bytes27)\":{\"notice\":\"Removes all objects after and including a given index. Also allows setting the global metadata field.\"},\"get(uint256)\":{\"notice\":\"Retrieves an object from the container.\"},\"getGlobalMetadata()\":{\"notice\":\"Retrieves the container's global metadata field.\"},\"length()\":{\"notice\":\"Retrieves the number of objects stored in the container.\"},\"push(bytes32)\":{\"notice\":\"Pushes an object into the container.\"},\"push(bytes32,bytes27)\":{\"notice\":\"Pushes an object into the container. Function allows setting the global metadata since we'll need to touch the \\\"length\\\" storage slot anyway, which also contains the global metadata (it's an optimization).\"},\"setGlobalMetadata(bytes27)\":{\"notice\":\"Sets the container's global metadata field. We're using `bytes27` here because we use five bytes to maintain the length of the underlying data structure, meaning we have an extra 27 bytes to store arbitrary data.\"},\"setNextOverwritableIndex(uint256)\":{\"notice\":\"Marks an index as overwritable, meaing the underlying buffer can start to write values over any objects before and including the given index.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol\":\"OVM_ChainStorageContainer\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_RingBuffer } from \\\"../../libraries/utils/Lib_RingBuffer.sol\\\";\\nimport { Lib_AddressResolver } from \\\"../../libraries/resolver/Lib_AddressResolver.sol\\\";\\n\\n/* Interface Imports */\\nimport { iOVM_ChainStorageContainer } from \\\"../../iOVM/chain/iOVM_ChainStorageContainer.sol\\\";\\n\\n/**\\n * @title OVM_ChainStorageContainer\\n * @dev The Chain Storage Container provides its owner contract with read, write and delete functionality.\\n * This provides gas efficiency gains by enabling it to overwrite storage slots which can no longer be used\\n * in a fraud proof due to the fraud window having passed, and the associated chain state or\\n * transactions being finalized.\\n * Three distinct Chain Storage Containers will be deployed on Layer 1:\\n * 1. Stores transaction batches for the Canonical Transaction Chain\\n * 2. Stores queued transactions for the Canonical Transaction Chain\\n * 3. Stores chain state batches for the State Commitment Chain\\n *\\n * Compiler used: solc\\n * Runtime target: EVM\\n */\\ncontract OVM_ChainStorageContainer is iOVM_ChainStorageContainer, Lib_AddressResolver {\\n\\n /*************\\n * Libraries *\\n *************/\\n\\n using Lib_RingBuffer for Lib_RingBuffer.RingBuffer;\\n\\n\\n /*************\\n * Variables *\\n *************/\\n\\n string public owner;\\n Lib_RingBuffer.RingBuffer internal buffer;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Address Manager.\\n * @param _owner Name of the contract that owns this container (will be resolved later).\\n */\\n constructor(\\n address _libAddressManager,\\n string memory _owner\\n )\\n Lib_AddressResolver(_libAddressManager)\\n {\\n owner = _owner;\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n msg.sender == resolve(owner),\\n \\\"OVM_ChainStorageContainer: Function can only be called by the owner.\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function setGlobalMetadata(\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n return buffer.setExtraData(_globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function getGlobalMetadata()\\n override\\n public\\n view\\n returns (\\n bytes27\\n )\\n {\\n return buffer.getExtraData();\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function length()\\n override\\n public\\n view\\n returns (\\n uint256\\n )\\n {\\n return uint256(buffer.getLength());\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push(\\n bytes32 _object\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push(_object);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push(\\n bytes32 _object,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push(_object, _globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function get(\\n uint256 _index\\n )\\n override\\n public\\n view\\n returns (\\n bytes32\\n )\\n {\\n return buffer.get(uint40(_index));\\n }\\n \\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.deleteElementsAfterInclusive(\\n uint40(_index)\\n );\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.deleteElementsAfterInclusive(\\n uint40(_index),\\n _globalMetadata\\n );\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function setNextOverwritableIndex(\\n uint256 _index\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.nextOverwritableIndex = _index;\\n }\\n}\\n\",\"keccak256\":\"0x52e3ef7166fe134d32997917067e3d74128173b12fb6231eec34132102ddbb50\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/iOVM/chain/iOVM_ChainStorageContainer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title iOVM_ChainStorageContainer\\n */\\ninterface iOVM_ChainStorageContainer {\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Sets the container's global metadata field. We're using `bytes27` here because we use five\\n * bytes to maintain the length of the underlying data structure, meaning we have an extra\\n * 27 bytes to store arbitrary data.\\n * @param _globalMetadata New global metadata to set.\\n */\\n function setGlobalMetadata(\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Retrieves the container's global metadata field.\\n * @return Container global metadata field.\\n */\\n function getGlobalMetadata()\\n external\\n view\\n returns (\\n bytes27\\n );\\n\\n /**\\n * Retrieves the number of objects stored in the container.\\n * @return Number of objects in the container.\\n */\\n function length()\\n external\\n view\\n returns (\\n uint256\\n );\\n\\n /**\\n * Pushes an object into the container.\\n * @param _object A 32 byte value to insert into the container.\\n */\\n function push(\\n bytes32 _object\\n )\\n external;\\n\\n /**\\n * Pushes an object into the container. Function allows setting the global metadata since\\n * we'll need to touch the \\\"length\\\" storage slot anyway, which also contains the global\\n * metadata (it's an optimization).\\n * @param _object A 32 byte value to insert into the container.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function push(\\n bytes32 _object,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Retrieves an object from the container.\\n * @param _index Index of the particular object to access.\\n * @return 32 byte object value.\\n */\\n function get(\\n uint256 _index\\n )\\n external\\n view\\n returns (\\n bytes32\\n );\\n\\n /**\\n * Removes all objects after and including a given index.\\n * @param _index Object index to delete from.\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index\\n )\\n external;\\n\\n /**\\n * Removes all objects after and including a given index. Also allows setting the global\\n * metadata field.\\n * @param _index Object index to delete from.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Marks an index as overwritable, meaing the underlying buffer can start to write values over\\n * any objects before and including the given index.\\n */\\n function setNextOverwritableIndex(\\n uint256 _index\\n )\\n external;\\n}\\n\",\"keccak256\":\"0x2d7973a0ad84c23ec62624d3f1e3aeb198cc72686ff1e6cfa17155556b320c94\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0x3a490595cc21ff170e4027843093670ff845d5972481fbfb956b722ea564bb06\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_AddressResolver\\n */\\nabstract contract Lib_AddressResolver {\\n\\n /*******************************************\\n * Contract Variables: Contract References *\\n *******************************************/\\n\\n Lib_AddressManager public libAddressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n */\\n constructor(\\n address _libAddressManager\\n ) {\\n libAddressManager = Lib_AddressManager(_libAddressManager);\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function resolve(\\n string memory _name\\n )\\n public\\n view\\n returns (\\n address _contract\\n )\\n {\\n return libAddressManager.getAddress(_name);\\n }\\n}\\n\",\"keccak256\":\"0xaa3ed342f6deb156c660fd83afa579a3b80db17eb465e8949cf5c1b114780143\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xd9dfd9264e5b5fedd53a5b10fdf179c3f367614b0fe69179bce4e45119f5b739\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/utils/Lib_RingBuffer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\nlibrary Lib_RingBuffer {\\n using Lib_RingBuffer for RingBuffer;\\n\\n /***********\\n * Structs *\\n ***********/\\n\\n struct Buffer {\\n uint256 length;\\n mapping (uint256 => bytes32) buf;\\n }\\n\\n struct RingBuffer {\\n bytes32 contextA;\\n bytes32 contextB;\\n Buffer bufferA;\\n Buffer bufferB;\\n uint256 nextOverwritableIndex;\\n }\\n\\n struct RingBufferContext {\\n // contextA\\n uint40 globalIndex;\\n bytes27 extraData;\\n\\n // contextB\\n uint64 currBufferIndex;\\n uint40 prevResetIndex;\\n uint40 currResetIndex;\\n }\\n\\n\\n /*************\\n * Constants *\\n *************/\\n\\n uint256 constant MIN_CAPACITY = 16;\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * Pushes a single element to the buffer.\\n * @param _self Buffer to access.\\n * @param _value Value to push to the buffer.\\n * @param _extraData Optional global extra data.\\n */\\n function push(\\n RingBuffer storage _self,\\n bytes32 _value,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n\\n // Set a minimum capacity.\\n if (currBuffer.length == 0) {\\n currBuffer.length = MIN_CAPACITY;\\n }\\n\\n // Check if we need to expand the buffer.\\n if (ctx.globalIndex - ctx.currResetIndex >= currBuffer.length) {\\n if (ctx.currResetIndex < _self.nextOverwritableIndex) {\\n // We're going to overwrite the inactive buffer.\\n // Bump the buffer index, reset the delete offset, and set our reset indices.\\n ctx.currBufferIndex++;\\n ctx.prevResetIndex = ctx.currResetIndex;\\n ctx.currResetIndex = ctx.globalIndex;\\n\\n // Swap over to the next buffer.\\n currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n } else {\\n // We're not overwriting yet, double the length of the current buffer.\\n currBuffer.length *= 2;\\n }\\n }\\n\\n // Index to write to is the difference of the global and reset indices.\\n uint256 writeHead = ctx.globalIndex - ctx.currResetIndex;\\n currBuffer.buf[writeHead] = _value;\\n\\n // Bump the global index and insert our extra data, then save the context.\\n ctx.globalIndex++;\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Pushes a single element to the buffer.\\n * @param _self Buffer to access.\\n * @param _value Value to push to the buffer.\\n */\\n function push(\\n RingBuffer storage _self,\\n bytes32 _value\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n \\n _self.push(\\n _value,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Retrieves an element from the buffer.\\n * @param _self Buffer to access.\\n * @param _index Element index to retrieve.\\n * @return Value of the element at the given index.\\n */\\n function get(\\n RingBuffer storage _self,\\n uint256 _index\\n )\\n internal\\n view\\n returns (\\n bytes32 \\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n require(\\n _index < ctx.globalIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n Buffer storage prevBuffer = _self.getBuffer(ctx.currBufferIndex + 1);\\n\\n if (_index >= ctx.currResetIndex) {\\n // We're trying to load an element from the current buffer.\\n // Relative index is just the difference from the reset index.\\n uint256 relativeIndex = _index - ctx.currResetIndex;\\n\\n // Shouldn't happen but why not check.\\n require(\\n relativeIndex < currBuffer.length,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n return currBuffer.buf[relativeIndex];\\n } else {\\n // We're trying to load an element from the previous buffer.\\n // Relative index is the difference from the reset index in the other direction.\\n uint256 relativeIndex = ctx.currResetIndex - _index;\\n\\n // Condition only fails in the case that we deleted and flipped buffers.\\n require(\\n ctx.currResetIndex > ctx.prevResetIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n // Make sure we're not trying to read beyond the array.\\n require(\\n relativeIndex <= prevBuffer.length,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n return prevBuffer.buf[prevBuffer.length - relativeIndex];\\n }\\n }\\n\\n /**\\n * Deletes all elements after (and including) a given index.\\n * @param _self Buffer to access.\\n * @param _index Index of the element to delete from (inclusive).\\n * @param _extraData Optional global extra data.\\n */\\n function deleteElementsAfterInclusive(\\n RingBuffer storage _self,\\n uint40 _index,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n require(\\n _index < ctx.globalIndex && _index >= ctx.prevResetIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n if (_index < ctx.currResetIndex) {\\n // We're switching back to the previous buffer.\\n // Reduce the buffer index, set the current reset index back to match the previous one.\\n // We use the equality of these two values to prevent reading beyond this buffer.\\n ctx.currBufferIndex--;\\n ctx.currResetIndex = ctx.prevResetIndex;\\n }\\n\\n // Set our global index and extra data, save the context.\\n ctx.globalIndex = _index;\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Deletes all elements after (and including) a given index.\\n * @param _self Buffer to access.\\n * @param _index Index of the element to delete from (inclusive).\\n */\\n function deleteElementsAfterInclusive(\\n RingBuffer storage _self,\\n uint40 _index\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n _self.deleteElementsAfterInclusive(\\n _index,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Retrieves the current global index.\\n * @param _self Buffer to access.\\n * @return Current global index.\\n */\\n function getLength(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n uint40\\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n return ctx.globalIndex;\\n }\\n\\n /**\\n * Changes current global extra data.\\n * @param _self Buffer to access.\\n * @param _extraData New global extra data.\\n */\\n function setExtraData(\\n RingBuffer storage _self,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Retrieves the current global extra data.\\n * @param _self Buffer to access.\\n * @return Current global extra data.\\n */\\n function getExtraData(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n bytes27\\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n return ctx.extraData;\\n }\\n\\n /**\\n * Sets the current ring buffer context.\\n * @param _self Buffer to access.\\n * @param _ctx Current ring buffer context.\\n */\\n function setContext(\\n RingBuffer storage _self,\\n RingBufferContext memory _ctx\\n )\\n internal\\n {\\n bytes32 contextA;\\n bytes32 contextB;\\n\\n uint40 globalIndex = _ctx.globalIndex;\\n bytes27 extraData = _ctx.extraData;\\n assembly {\\n contextA := globalIndex\\n contextA := or(contextA, extraData)\\n }\\n\\n uint64 currBufferIndex = _ctx.currBufferIndex;\\n uint40 prevResetIndex = _ctx.prevResetIndex;\\n uint40 currResetIndex = _ctx.currResetIndex;\\n assembly {\\n contextB := currBufferIndex\\n contextB := or(contextB, shl(64, prevResetIndex))\\n contextB := or(contextB, shl(104, currResetIndex))\\n }\\n\\n if (_self.contextA != contextA) {\\n _self.contextA = contextA;\\n }\\n\\n if (_self.contextB != contextB) {\\n _self.contextB = contextB;\\n }\\n }\\n\\n /**\\n * Retrieves the current ring buffer context.\\n * @param _self Buffer to access.\\n * @return Current ring buffer context.\\n */\\n function getContext(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n RingBufferContext memory\\n )\\n {\\n bytes32 contextA = _self.contextA;\\n bytes32 contextB = _self.contextB;\\n\\n uint40 globalIndex;\\n bytes27 extraData;\\n assembly {\\n globalIndex := and(contextA, 0x000000000000000000000000000000000000000000000000000000FFFFFFFFFF)\\n extraData := and(contextA, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000)\\n }\\n\\n uint64 currBufferIndex;\\n uint40 prevResetIndex;\\n uint40 currResetIndex;\\n assembly {\\n currBufferIndex := and(contextB, 0x000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFF)\\n prevResetIndex := shr(64, and(contextB, 0x00000000000000000000000000000000000000FFFFFFFFFF0000000000000000))\\n currResetIndex := shr(104, and(contextB, 0x0000000000000000000000000000FFFFFFFFFF00000000000000000000000000))\\n }\\n\\n return RingBufferContext({\\n globalIndex: globalIndex,\\n extraData: extraData,\\n currBufferIndex: currBufferIndex,\\n prevResetIndex: prevResetIndex,\\n currResetIndex: currResetIndex\\n });\\n }\\n\\n /**\\n * Retrieves the a buffer from the ring buffer by index.\\n * @param _self Buffer to access.\\n * @param _which Index of the sub buffer to access.\\n * @return Sub buffer for the index.\\n */\\n function getBuffer(\\n RingBuffer storage _self,\\n uint256 _which\\n )\\n internal\\n view\\n returns (\\n Buffer storage\\n )\\n {\\n return _which % 2 == 0 ? _self.bufferA : _self.bufferB;\\n }\\n}\\n\",\"keccak256\":\"0xb38cb98da2d09f922d5cfe772bdbd36ede2b2267ade93128e949c9da21b89940\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x60806040523480156200001157600080fd5b506040516200116438038062001164833981810160405260408110156200003757600080fd5b8151602083018051604051929492938301929190846401000000008211156200005f57600080fd5b9083019060208201858111156200007557600080fd5b82516401000000008111828201881017156200009057600080fd5b82525081516020918201929091019080838360005b83811015620000bf578181015183820152602001620000a5565b50505050905090810190601f168015620000ed5780820380516001836020036101000a031916815260200191505b506040525050600080546001600160a01b0319166001600160a01b038516179055508051620001249060019060208401906200012d565b505050620001d9565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001655760008555620001b0565b82601f106200018057805160ff1916838001178555620001b0565b82800160010185558215620001b0579182015b82811115620001b057825182559160200191906001019062000193565b50620001be929150620001c2565b5090565b5b80821115620001be5760008155600101620001c3565b610f7b80620001e96000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80634651d91e116100715780634651d91e1461021a5780638da5cb5b146102375780639507d39a146102b4578063b298e36b146102d1578063ccf8f969146102ee578063fa9e936c14610311576100b4565b8063167fd681146100b95780631f7b6d32146100e65780632015276c1461010057806329061de21461012b578063299ca47814610150578063461a447814610174575b600080fd5b6100e4600480360360408110156100cf57600080fd5b508035906020013564ffffffffff191661032e565b005b6100ee610423565b60408051918252519081900360200190f35b6100e46004803603604081101561011657600080fd5b508035906020013564ffffffffff191661043b565b6100e46004803603602081101561014157600080fd5b503564ffffffffff19166104f7565b6101586105b5565b604080516001600160a01b039092168252519081900360200190f35b6101586004803603602081101561018a57600080fd5b8101906020810181356401000000008111156101a557600080fd5b8201836020820111156101b757600080fd5b803590602001918460018302840111640100000000831117156101d957600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506105c4945050505050565b6100e46004803603602081101561023057600080fd5b50356106a0565b61023f61075b565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610279578181015183820152602001610261565b50505050905090810190601f1680156102a65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100ee600480360360208110156102ca57600080fd5b50356107e8565b6100e4600480360360208110156102e757600080fd5b5035610802565b6102f66108bd565b6040805164ffffffffff199092168252519081900360200190f35b6100e46004803603602081101561032757600080fd5b50356108ce565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526103c493909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b820191906000526020600020905b81548152906001019060200180831161039d57829003601f168201915b50505050506105c4565b6001600160a01b0316336001600160a01b0316146104135760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b61041f60028383610983565b5050565b600061042f6002610a75565b64ffffffffff16905090565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261049c93909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146104eb5760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b61041f60028383610a89565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261055893909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146105a75760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610b90565b50565b6000546001600160a01b031681565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b8381101561062457818101518382015260200161060c565b50505050905090810190601f1680156106515780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561066e57600080fd5b505afa158015610682573d6000803e3d6000fd5b505050506040513d602081101561069857600080fd5b505192915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261070193909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146107505760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610bba565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156107e05780601f106107b5576101008083540402835291602001916107e0565b820191906000526020600020905b8154815290600101906020018083116107c357829003601f168201915b505050505081565b60006107fc600264ffffffffff8416610be0565b92915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261086393909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146108b25760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610de9565b60006108c96002610e0f565b905090565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261092f93909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b03161461097e5760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b600855565b600061098e84610e26565b9050806000015164ffffffffff168364ffffffffff161080156109c35750806060015164ffffffffff168364ffffffffff1610155b610a0b576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b806080015164ffffffffff168364ffffffffff161015610a4d576040810180516000190167ffffffffffffffff169052606081015164ffffffffff1660808201525b64ffffffffff8316815264ffffffffff1982166020820152610a6f8482610e86565b50505050565b600080610a8183610e26565b519392505050565b6000610a9484610e26565b90506000610ab9826040015167ffffffffffffffff1686610edc90919063ffffffff16565b8054909150610ac757601081555b8054608083015183510364ffffffffff1610610b3e578460060154826080015164ffffffffff161015610b365760408201805160010167ffffffffffffffff169081905260808301805164ffffffffff90811660608601528451169052610b2f908690610edc565b9050610b3e565b805460020281555b608082015182510364ffffffffff9081166000818152600184810160209081526040909220889055855101909216845264ffffffffff19851691840191909152610b888684610e86565b505050505050565b6000610b9b83610e26565b64ffffffffff19831660208201529050610bb58382610e86565b505050565b6000610bc583610e26565b9050610bb5828260200151856109839092919063ffffffff16565b600080610bec84610e26565b805190915064ffffffffff168310610c42576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610c65826040015167ffffffffffffffff1686610edc90919063ffffffff16565b90506000610c8d836040015160010167ffffffffffffffff1687610edc90919063ffffffff16565b9050826080015164ffffffffff168510610d1a576080830151825464ffffffffff9091168603908110610cfe576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000908152600190920160205250604090205491506107fc9050565b6080830151606084015164ffffffffff9182168781039290911610610d7d576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154811115610dca576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b81540360009081526001909101602052604090205492506107fc915050565b6000610df483610e26565b9050610bb582826020015185610a899092919063ffffffff16565b600080610e1b83610e26565b602001519392505050565b610e2e610efc565b5080546001909101546040805160a08101825264ffffffffff808516825264ffffffffff19909416602082015267ffffffffffffffff8316818301529082901c8316606082015260689190911c909116608082015290565b80516020820151604080840151606085015160808601518754858717969483901b8417606883901b1795939291908714610ebe578689555b85896001015414610ed157600189018690555b505050505050505050565b60006002820615610ef05782600401610ef5565b826002015b9392505050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe4f564d5f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206f776e65722ea164736f6c6343000706000a",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c80634651d91e116100715780634651d91e1461021a5780638da5cb5b146102375780639507d39a146102b4578063b298e36b146102d1578063ccf8f969146102ee578063fa9e936c14610311576100b4565b8063167fd681146100b95780631f7b6d32146100e65780632015276c1461010057806329061de21461012b578063299ca47814610150578063461a447814610174575b600080fd5b6100e4600480360360408110156100cf57600080fd5b508035906020013564ffffffffff191661032e565b005b6100ee610423565b60408051918252519081900360200190f35b6100e46004803603604081101561011657600080fd5b508035906020013564ffffffffff191661043b565b6100e46004803603602081101561014157600080fd5b503564ffffffffff19166104f7565b6101586105b5565b604080516001600160a01b039092168252519081900360200190f35b6101586004803603602081101561018a57600080fd5b8101906020810181356401000000008111156101a557600080fd5b8201836020820111156101b757600080fd5b803590602001918460018302840111640100000000831117156101d957600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506105c4945050505050565b6100e46004803603602081101561023057600080fd5b50356106a0565b61023f61075b565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610279578181015183820152602001610261565b50505050905090810190601f1680156102a65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100ee600480360360208110156102ca57600080fd5b50356107e8565b6100e4600480360360208110156102e757600080fd5b5035610802565b6102f66108bd565b6040805164ffffffffff199092168252519081900360200190f35b6100e46004803603602081101561032757600080fd5b50356108ce565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526103c493909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b820191906000526020600020905b81548152906001019060200180831161039d57829003601f168201915b50505050506105c4565b6001600160a01b0316336001600160a01b0316146104135760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b61041f60028383610983565b5050565b600061042f6002610a75565b64ffffffffff16905090565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261049c93909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146104eb5760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b61041f60028383610a89565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261055893909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146105a75760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610b90565b50565b6000546001600160a01b031681565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b8381101561062457818101518382015260200161060c565b50505050905090810190601f1680156106515780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561066e57600080fd5b505afa158015610682573d6000803e3d6000fd5b505050506040513d602081101561069857600080fd5b505192915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261070193909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146107505760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610bba565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156107e05780601f106107b5576101008083540402835291602001916107e0565b820191906000526020600020905b8154815290600101906020018083116107c357829003601f168201915b505050505081565b60006107fc600264ffffffffff8416610be0565b92915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261086393909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146108b25760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610de9565b60006108c96002610e0f565b905090565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261092f93909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b03161461097e5760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b600855565b600061098e84610e26565b9050806000015164ffffffffff168364ffffffffff161080156109c35750806060015164ffffffffff168364ffffffffff1610155b610a0b576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b806080015164ffffffffff168364ffffffffff161015610a4d576040810180516000190167ffffffffffffffff169052606081015164ffffffffff1660808201525b64ffffffffff8316815264ffffffffff1982166020820152610a6f8482610e86565b50505050565b600080610a8183610e26565b519392505050565b6000610a9484610e26565b90506000610ab9826040015167ffffffffffffffff1686610edc90919063ffffffff16565b8054909150610ac757601081555b8054608083015183510364ffffffffff1610610b3e578460060154826080015164ffffffffff161015610b365760408201805160010167ffffffffffffffff169081905260808301805164ffffffffff90811660608601528451169052610b2f908690610edc565b9050610b3e565b805460020281555b608082015182510364ffffffffff9081166000818152600184810160209081526040909220889055855101909216845264ffffffffff19851691840191909152610b888684610e86565b505050505050565b6000610b9b83610e26565b64ffffffffff19831660208201529050610bb58382610e86565b505050565b6000610bc583610e26565b9050610bb5828260200151856109839092919063ffffffff16565b600080610bec84610e26565b805190915064ffffffffff168310610c42576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610c65826040015167ffffffffffffffff1686610edc90919063ffffffff16565b90506000610c8d836040015160010167ffffffffffffffff1687610edc90919063ffffffff16565b9050826080015164ffffffffff168510610d1a576080830151825464ffffffffff9091168603908110610cfe576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000908152600190920160205250604090205491506107fc9050565b6080830151606084015164ffffffffff9182168781039290911610610d7d576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154811115610dca576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b81540360009081526001909101602052604090205492506107fc915050565b6000610df483610e26565b9050610bb582826020015185610a899092919063ffffffff16565b600080610e1b83610e26565b602001519392505050565b610e2e610efc565b5080546001909101546040805160a08101825264ffffffffff808516825264ffffffffff19909416602082015267ffffffffffffffff8316818301529082901c8316606082015260689190911c909116608082015290565b80516020820151604080840151606085015160808601518754858717969483901b8417606883901b1795939291908714610ebe578689555b85896001015414610ed157600189018690555b505050505050505050565b60006002820615610ef05782600401610ef5565b826002015b9392505050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe4f564d5f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206f776e65722ea164736f6c6343000706000a",
"devdoc": {
"details": "The Chain Storage Container provides its owner contract with read, write and delete functionality. This provides gas efficiency gains by enabling it to overwrite storage slots which can no longer be used in a fraud proof due to the fraud window having passed, and the associated chain state or transactions being finalized. Three distinct Chain Storage Containers will be deployed on Layer 1: 1. Stores transaction batches for the Canonical Transaction Chain 2. Stores queued transactions for the Canonical Transaction Chain 3. Stores chain state batches for the State Commitment Chain Compiler used: solc Runtime target: EVM",
"kind": "dev",
"methods": {
"constructor": {
"params": {
"_libAddressManager": "Address of the Address Manager.",
"_owner": "Name of the contract that owns this container (will be resolved later)."
}
},
"deleteElementsAfterInclusive(uint256)": {
"params": {
"_index": "Object index to delete from."
}
},
"deleteElementsAfterInclusive(uint256,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_index": "Object index to delete from."
}
},
"get(uint256)": {
"params": {
"_index": "Index of the particular object to access."
},
"returns": {
"_0": "32 byte object value."
}
},
"getGlobalMetadata()": {
"returns": {
"_0": "Container global metadata field."
}
},
"length()": {
"returns": {
"_0": "Number of objects in the container."
}
},
"push(bytes32)": {
"params": {
"_object": "A 32 byte value to insert into the container."
}
},
"push(bytes32,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_object": "A 32 byte value to insert into the container."
}
},
"setGlobalMetadata(bytes27)": {
"params": {
"_globalMetadata": "New global metadata to set."
}
}
},
"title": "OVM_ChainStorageContainer",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {
"deleteElementsAfterInclusive(uint256)": {
"notice": "Removes all objects after and including a given index."
},
"deleteElementsAfterInclusive(uint256,bytes27)": {
"notice": "Removes all objects after and including a given index. Also allows setting the global metadata field."
},
"get(uint256)": {
"notice": "Retrieves an object from the container."
},
"getGlobalMetadata()": {
"notice": "Retrieves the container's global metadata field."
},
"length()": {
"notice": "Retrieves the number of objects stored in the container."
},
"push(bytes32)": {
"notice": "Pushes an object into the container."
},
"push(bytes32,bytes27)": {
"notice": "Pushes an object into the container. Function allows setting the global metadata since we'll need to touch the \"length\" storage slot anyway, which also contains the global metadata (it's an optimization)."
},
"setGlobalMetadata(bytes27)": {
"notice": "Sets the container's global metadata field. We're using `bytes27` here because we use five bytes to maintain the length of the underlying data structure, meaning we have an extra 27 bytes to store arbitrary data."
},
"setNextOverwritableIndex(uint256)": {
"notice": "Marks an index as overwritable, meaing the underlying buffer can start to write values over any objects before and including the given index."
}
},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 12526,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "libAddressManager",
"offset": 0,
"slot": "0",
"type": "t_contract(Lib_AddressManager)12519"
},
{
"astId": 3772,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "owner",
"offset": 0,
"slot": "1",
"type": "t_string_storage"
},
{
"astId": 3774,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "buffer",
"offset": 0,
"slot": "2",
"type": "t_struct(RingBuffer)17796_storage"
}
],
"types": {
"t_bytes32": {
"encoding": "inplace",
"label": "bytes32",
"numberOfBytes": "32"
},
"t_contract(Lib_AddressManager)12519": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
},
"t_mapping(t_uint256,t_bytes32)": {
"encoding": "mapping",
"key": "t_uint256",
"label": "mapping(uint256 => bytes32)",
"numberOfBytes": "32",
"value": "t_bytes32"
},
"t_string_storage": {
"encoding": "bytes",
"label": "string",
"numberOfBytes": "32"
},
"t_struct(Buffer)17785_storage": {
"encoding": "inplace",
"label": "struct Lib_RingBuffer.Buffer",
"members": [
{
"astId": 17780,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "length",
"offset": 0,
"slot": "0",
"type": "t_uint256"
},
{
"astId": 17784,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "buf",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_uint256,t_bytes32)"
}
],
"numberOfBytes": "64"
},
"t_struct(RingBuffer)17796_storage": {
"encoding": "inplace",
"label": "struct Lib_RingBuffer.RingBuffer",
"members": [
{
"astId": 17787,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "contextA",
"offset": 0,
"slot": "0",
"type": "t_bytes32"
},
{
"astId": 17789,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "contextB",
"offset": 0,
"slot": "1",
"type": "t_bytes32"
},
{
"astId": 17791,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "bufferA",
"offset": 0,
"slot": "2",
"type": "t_struct(Buffer)17785_storage"
},
{
"astId": 17793,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "bufferB",
"offset": 0,
"slot": "4",
"type": "t_struct(Buffer)17785_storage"
},
{
"astId": 17795,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "nextOverwritableIndex",
"offset": 0,
"slot": "6",
"type": "t_uint256"
}
],
"numberOfBytes": "224"
},
"t_uint256": {
"encoding": "inplace",
"label": "uint256",
"numberOfBytes": "32"
}
}
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"address": "0x0E8917aF9eB7812c7819EF4e80D2217679d11324",
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "_from",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "_to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "_amount",
"type": "uint256"
}
],
"name": "DepositInitiated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "_to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "_amount",
"type": "uint256"
}
],
"name": "WithdrawalFinalized",
"type": "event"
},
{
"inputs": [],
"name": "deposit",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_to",
"type": "address"
}
],
"name": "depositTo",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_to",
"type": "address"
},
{
"internalType": "uint256",
"name": "_amount",
"type": "uint256"
}
],
"name": "finalizeWithdrawal",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "getFinalizeDepositL2Gas",
"outputs": [
{
"internalType": "uint32",
"name": "",
"type": "uint32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_libAddressManager",
"type": "address"
},
{
"internalType": "address",
"name": "_ovmEth",
"type": "address"
}
],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "libAddressManager",
"outputs": [
{
"internalType": "contract Lib_AddressManager",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "messenger",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "ovmEth",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "resolve",
"outputs": [
{
"internalType": "address",
"name": "_contract",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"stateMutability": "payable",
"type": "receive"
}
],
"transactionHash": "0xb87d7da559c1abfbf55ae1d57e9bcccd86a6ee98c61b43a5ae0d6416fe3388ae",
"receipt": {
"to": null,
"from": "0x18394B52d3Cb931dfA76F63251919D051953413d",
"contractAddress": "0x0E8917aF9eB7812c7819EF4e80D2217679d11324",
"transactionIndex": 3,
"gasUsed": "599914",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0xadb2eeb73396f7ba8103108bd8590b03772148fed1f42b8c0455fb01cc2c6a6c",
"transactionHash": "0xb87d7da559c1abfbf55ae1d57e9bcccd86a6ee98c61b43a5ae0d6416fe3388ae",
"logs": [],
"blockNumber": 24199529,
"cumulativeGasUsed": "760986",
"status": 1,
"byzantium": true
},
"args": [],
"solcInputHash": "03aed03b958b1d37f90bd88d0f56dd85",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"DepositInitiated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"WithdrawalFinalized\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"depositTo\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"finalizeWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFinalizeDepositL2Gas\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_ovmEth\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"libAddressManager\",\"outputs\":[{\"internalType\":\"contract Lib_AddressManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messenger\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ovmEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"The L1 ETH Gateway is a contract which stores deposited ETH that is in use on L2. Compiler used: solc Runtime target: EVM\",\"kind\":\"dev\",\"methods\":{\"deposit()\":{\"details\":\"deposit an amount of the ETH to the caller's balance on L2\"},\"depositTo(address)\":{\"details\":\"deposit an amount of ETH to a recipients's balance on L2\",\"params\":{\"_to\":\"L2 address to credit the withdrawal to\"}},\"finalizeWithdrawal(address,uint256)\":{\"details\":\"Complete a withdrawal from L2 to L1, and credit funds to the recipient's balance of the L1 ETH token. Since only the xDomainMessenger can call this function, it will never be called before the withdrawal is finalized. \",\"params\":{\"_amount\":\"Amount of the ETH to withdraw\",\"_to\":\"L1 address to credit the withdrawal to\"}},\"initialize(address,address)\":{\"params\":{\"_libAddressManager\":\"Address manager for this OE deployment\",\"_ovmEth\":\"L2 OVM_ETH implementation of iOVM_DepositedToken\"}}},\"title\":\"OVM_L1ETHGateway\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/OVM/bridge/tokens/OVM_L1ETHGateway.sol\":\"OVM_L1ETHGateway\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/OVM/bridge/tokens/OVM_L1ETHGateway.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// @unsupported: ovm\\npragma solidity >0.5.0 <0.8.0;\\npragma experimental ABIEncoderV2;\\n\\n/* Interface Imports */\\nimport { iOVM_L1ETHGateway } from \\\"../../../iOVM/bridge/tokens/iOVM_L1ETHGateway.sol\\\";\\nimport { iOVM_L2DepositedToken } from \\\"../../../iOVM/bridge/tokens/iOVM_L2DepositedToken.sol\\\";\\n\\n/* Library Imports */\\nimport { OVM_CrossDomainEnabled } from \\\"../../../libraries/bridge/OVM_CrossDomainEnabled.sol\\\";\\nimport { Lib_AddressResolver } from \\\"../../../libraries/resolver/Lib_AddressResolver.sol\\\";\\nimport { Lib_AddressManager } from \\\"../../../libraries/resolver/Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title OVM_L1ETHGateway\\n * @dev The L1 ETH Gateway is a contract which stores deposited ETH that is in use on L2.\\n *\\n * Compiler used: solc\\n * Runtime target: EVM\\n */\\ncontract OVM_L1ETHGateway is iOVM_L1ETHGateway, OVM_CrossDomainEnabled, Lib_AddressResolver {\\n\\n /********************\\n * Public Constants *\\n ********************/\\n\\n uint32 public constant override getFinalizeDepositL2Gas = 1200000;\\n\\n /********************************\\n * External Contract References *\\n ********************************/\\n\\n address public ovmEth;\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n // This contract lives behind a proxy, so the constructor parameters will go unused.\\n constructor()\\n OVM_CrossDomainEnabled(address(0))\\n Lib_AddressResolver(address(0))\\n public\\n {}\\n\\n /******************\\n * Initialization *\\n ******************/\\n\\n /**\\n * @param _libAddressManager Address manager for this OE deployment\\n * @param _ovmEth L2 OVM_ETH implementation of iOVM_DepositedToken\\n */\\n function initialize(\\n address _libAddressManager,\\n address _ovmEth\\n )\\n public\\n {\\n require(libAddressManager == Lib_AddressManager(0), \\\"Contract has already been initialized.\\\");\\n libAddressManager = Lib_AddressManager(_libAddressManager);\\n ovmEth = _ovmEth;\\n messenger = resolve(\\\"Proxy__OVM_L1CrossDomainMessenger\\\");\\n }\\n\\n /**************\\n * Depositing *\\n **************/\\n\\n receive()\\n external\\n payable\\n {\\n _initiateDeposit(msg.sender, msg.sender);\\n }\\n\\n /**\\n * @dev deposit an amount of the ETH to the caller's balance on L2\\n */\\n function deposit() \\n external\\n override\\n payable\\n {\\n _initiateDeposit(msg.sender, msg.sender);\\n }\\n\\n /**\\n * @dev deposit an amount of ETH to a recipients's balance on L2\\n * @param _to L2 address to credit the withdrawal to\\n */\\n function depositTo(\\n address _to\\n )\\n external\\n override\\n payable\\n {\\n _initiateDeposit(msg.sender, _to);\\n }\\n\\n /**\\n * @dev Performs the logic for deposits by storing the ETH and informing the L2 ETH Gateway of the deposit.\\n *\\n * @param _from Account to pull the deposit from on L1\\n * @param _to Account to give the deposit to on L2\\n */\\n function _initiateDeposit(\\n address _from,\\n address _to\\n )\\n internal\\n {\\n // Construct calldata for l2ETHGateway.finalizeDeposit(_to, _amount)\\n bytes memory data =\\n abi.encodeWithSelector(\\n iOVM_L2DepositedToken.finalizeDeposit.selector,\\n _to,\\n msg.value\\n );\\n\\n // Send calldata into L2\\n sendCrossDomainMessage(\\n ovmEth,\\n data,\\n getFinalizeDepositL2Gas\\n );\\n\\n emit DepositInitiated(_from, _to, msg.value);\\n }\\n\\n /*************************\\n * Cross-chain Functions *\\n *************************/\\n\\n /**\\n * @dev Complete a withdrawal from L2 to L1, and credit funds to the recipient's balance of the\\n * L1 ETH token.\\n * Since only the xDomainMessenger can call this function, it will never be called before the withdrawal is finalized. \\n *\\n * @param _to L1 address to credit the withdrawal to\\n * @param _amount Amount of the ETH to withdraw\\n */\\n function finalizeWithdrawal(\\n address _to,\\n uint256 _amount\\n )\\n external\\n override\\n onlyFromCrossDomainAccount(ovmEth)\\n {\\n _safeTransferETH(_to, _amount);\\n\\n emit WithdrawalFinalized(_to, _amount);\\n }\\n\\n /**********************************\\n * Internal Functions: Accounting *\\n **********************************/\\n\\n /**\\n * @dev Internal accounting function for moving around L1 ETH.\\n *\\n * @param _to L1 address to transfer ETH to\\n * @param _value Amount of ETH to send to\\n */\\n function _safeTransferETH(\\n address _to,\\n uint256 _value\\n )\\n internal\\n {\\n (bool success, ) = _to.call{value: _value}(new bytes(0));\\n require(success, 'TransferHelper::safeTransferETH: ETH transfer failed');\\n }\\n}\\n\",\"keccak256\":\"0x2fff613bf362d01f05d8653247fe46b07dd7bb21c460a30e471d45b7ebd0e627\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/iOVM/bridge/messaging/iAbs_BaseCrossDomainMessenger.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\npragma experimental ABIEncoderV2;\\n\\n/**\\n * @title iAbs_BaseCrossDomainMessenger\\n */\\ninterface iAbs_BaseCrossDomainMessenger {\\n\\n /**********\\n * Events *\\n **********/\\n event SentMessage(bytes message);\\n event RelayedMessage(bytes32 msgHash);\\n\\n /**********************\\n * Contract Variables *\\n **********************/\\n function xDomainMessageSender() external view returns (address);\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Sends a cross domain message to the target messenger.\\n * @param _target Target contract address.\\n * @param _message Message to send to the target.\\n * @param _gasLimit Gas limit for the provided message.\\n */\\n function sendMessage(\\n address _target,\\n bytes calldata _message,\\n uint32 _gasLimit\\n ) external;\\n}\\n\",\"keccak256\":\"0xc2bd6b373daae2ede34281f4be5938d02b9d1cfb056b40d65ff70b7f16ce3c86\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/iOVM/bridge/tokens/iOVM_L1ETHGateway.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0;\\npragma experimental ABIEncoderV2;\\n\\n/**\\n * @title iOVM_L1ETHGateway\\n */\\ninterface iOVM_L1ETHGateway {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event DepositInitiated(\\n address indexed _from,\\n address _to,\\n uint256 _amount\\n );\\n\\n event WithdrawalFinalized(\\n address indexed _to,\\n uint256 _amount\\n );\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function deposit()\\n external\\n payable;\\n\\n function depositTo(\\n address _to\\n )\\n external\\n payable;\\n\\n /*************************\\n * Cross-chain Functions *\\n *************************/\\n\\n function finalizeWithdrawal(\\n address _to,\\n uint _amount\\n )\\n external;\\n\\n function getFinalizeDepositL2Gas()\\n external\\n view\\n returns(\\n uint32\\n );\\n}\\n\",\"keccak256\":\"0x7e6805c5cacfd159410c7cd57a3d586e0fc5810bc46600bbd840a252e243e5ba\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/iOVM/bridge/tokens/iOVM_L2DepositedToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0;\\npragma experimental ABIEncoderV2;\\n\\n/**\\n * @title iOVM_L2DepositedToken\\n */\\ninterface iOVM_L2DepositedToken {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event WithdrawalInitiated(\\n address indexed _from,\\n address _to,\\n uint256 _amount\\n );\\n\\n event DepositFinalized(\\n address indexed _to,\\n uint256 _amount\\n ); \\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function withdraw(\\n uint _amount\\n )\\n external;\\n\\n function withdrawTo(\\n address _to,\\n uint _amount\\n )\\n external;\\n\\n\\n /*************************\\n * Cross-chain Functions *\\n *************************/\\n\\n function finalizeDeposit(\\n address _to,\\n uint _amount\\n )\\n external;\\n}\\n\",\"keccak256\":\"0xaa874355e98c444a58712179acaf5ca344296dfa8229577a38a1d14160ce46f8\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/bridge/OVM_CrossDomainEnabled.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n/* Interface Imports */\\nimport { iAbs_BaseCrossDomainMessenger } from \\\"../../iOVM/bridge/messaging/iAbs_BaseCrossDomainMessenger.sol\\\";\\n\\n/**\\n * @title OVM_CrossDomainEnabled\\n * @dev Helper contract for contracts performing cross-domain communications\\n *\\n * Compiler used: defined by inheriting contract\\n * Runtime target: defined by inheriting contract\\n */\\ncontract OVM_CrossDomainEnabled {\\n // Messenger contract used to send and recieve messages from the other domain.\\n address public messenger;\\n\\n /***************\\n * Constructor *\\n ***************/ \\n constructor(\\n address _messenger\\n ) {\\n messenger = _messenger;\\n }\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n /**\\n * @notice Enforces that the modified function is only callable by a specific cross-domain account.\\n * @param _sourceDomainAccount The only account on the originating domain which is authenticated to call this function.\\n */\\n modifier onlyFromCrossDomainAccount(\\n address _sourceDomainAccount\\n ) {\\n require(\\n msg.sender == address(getCrossDomainMessenger()),\\n \\\"OVM_XCHAIN: messenger contract unauthenticated\\\"\\n );\\n\\n require(\\n getCrossDomainMessenger().xDomainMessageSender() == _sourceDomainAccount,\\n \\\"OVM_XCHAIN: wrong sender of cross-domain message\\\"\\n );\\n\\n _;\\n }\\n \\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * @notice Gets the messenger, usually from storage. This function is exposed in case a child contract needs to override.\\n * @return The address of the cross-domain messenger contract which should be used. \\n */\\n function getCrossDomainMessenger()\\n internal\\n virtual\\n returns(\\n iAbs_BaseCrossDomainMessenger\\n )\\n {\\n return iAbs_BaseCrossDomainMessenger(messenger);\\n }\\n\\n /**\\n * @notice Sends a message to an account on another domain\\n * @param _crossDomainTarget The intended recipient on the destination domain\\n * @param _data The data to send to the target (usually calldata to a function with `onlyFromCrossDomainAccount()`)\\n * @param _gasLimit The gasLimit for the receipt of the message on the target domain.\\n */\\n function sendCrossDomainMessage(\\n address _crossDomainTarget,\\n bytes memory _data,\\n uint32 _gasLimit\\n ) internal {\\n getCrossDomainMessenger().sendMessage(_crossDomainTarget, _data, _gasLimit);\\n }\\n}\\n\",\"keccak256\":\"0x1b1c5adbb359f3f46ca9e43b366a80563c031560e9f1f24ab4742b2d79403ce7\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0x3a490595cc21ff170e4027843093670ff845d5972481fbfb956b722ea564bb06\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_AddressResolver\\n */\\nabstract contract Lib_AddressResolver {\\n\\n /*******************************************\\n * Contract Variables: Contract References *\\n *******************************************/\\n\\n Lib_AddressManager public libAddressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n */\\n constructor(\\n address _libAddressManager\\n ) {\\n libAddressManager = Lib_AddressManager(_libAddressManager);\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function resolve(\\n string memory _name\\n )\\n public\\n view\\n returns (\\n address _contract\\n )\\n {\\n return libAddressManager.getAddress(_name);\\n }\\n}\\n\",\"keccak256\":\"0xaa3ed342f6deb156c660fd83afa579a3b80db17eb465e8949cf5c1b114780143\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xd9dfd9264e5b5fedd53a5b10fdf179c3f367614b0fe69179bce4e45119f5b739\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b03199081169091556001805490911690556109d28061003c6000396000f3fe60806040526004361061008a5760003560e01c8063485cc95511610059578063485cc95514610122578063490b5b7814610142578063b760faf914610157578063d0e30db01461016a578063f4f7b41a146101725761009b565b80631273a090146100a0578063299ca478146100cb5780633cb747bf146100ed578063461a4478146101025761009b565b3661009b576100993333610192565b005b600080fd5b3480156100ac57600080fd5b506100b5610246565b6040516100c29190610935565b60405180910390f35b3480156100d757600080fd5b506100e061024d565b6040516100c29190610865565b3480156100f957600080fd5b506100e061025c565b34801561010e57600080fd5b506100e061011d366004610797565b61026b565b34801561012e57600080fd5b5061009961013d36600461073c565b610347565b34801561014e57600080fd5b506100e06103ef565b61009961016536600461071b565b6103fe565b61009961040b565b34801561017e57600080fd5b5061009961018d36600461076e565b610417565b6000638d6e9a5b60e01b82346040516024016101af929190610879565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526002549091506101fe906001600160a01b03168262124f80610578565b826001600160a01b03167ff531653a5819e21265de50358610d55dbe6594c61605b209dfa4280d277938c18334604051610239929190610879565b60405180910390a2505050565b62124f8081565b6001546001600160a01b031681565b6000546001600160a01b031681565b60015460405163bf40fac160e01b81526020600482018181528451602484015284516000946001600160a01b03169363bf40fac1938793928392604401918501908083838b5b838110156102c95781810151838201526020016102b1565b50505050905090810190601f1680156102f65780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561031357600080fd5b505afa158015610327573d6000803e3d6000fd5b505050506040513d602081101561033d57600080fd5b505190505b919050565b6001546001600160a01b0316156103795760405162461bcd60e51b8152600401610370906108e6565b60405180910390fd5b600180546001600160a01b038085166001600160a01b0319928316179092556002805492841692909116919091179055604080516060810190915260218082526103cb91906109a5602083013961026b565b600080546001600160a01b0319166001600160a01b03929092169190911790555050565b6002546001600160a01b031681565b6104083382610192565b50565b6104153333610192565b565b6002546001600160a01b031661042b610663565b6001600160a01b0316336001600160a01b03161461047a5760405162461bcd60e51b815260040180806020018281038252602e815260200180610947602e913960400191505060405180910390fd5b806001600160a01b031661048c610663565b6001600160a01b0316636e296e456040518163ffffffff1660e01b815260040160206040518083038186803b1580156104c457600080fd5b505afa1580156104d8573d6000803e3d6000fd5b505050506040513d60208110156104ee57600080fd5b50516001600160a01b0316146105355760405162461bcd60e51b81526004018080602001828103825260308152602001806109756030913960400191505060405180910390fd5b61053f8383610672565b826001600160a01b03167f9e5c4f9f4e46b8629d3dda85f43a69194f50254404a72dc62b9e932d9c94eda883604051610239919061092c565b610580610663565b6001600160a01b0316633dbb202b8484846040518463ffffffff1660e01b815260040180846001600160a01b03168152602001806020018363ffffffff168152602001828103825284818151815260200191508051906020019080838360005b838110156105f85781810151838201526020016105e0565b50505050905090810190601f1680156106255780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561064657600080fd5b505af115801561065a573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031690565b604080516000808252602082019092526001600160a01b03841690839060405161069c919061082c565b60006040518083038185875af1925050503d80600081146106d9576040519150601f19603f3d011682016040523d82523d6000602084013e6106de565b606091505b50509050806106ff5760405162461bcd60e51b815260040161037090610892565b505050565b80356001600160a01b038116811461034257600080fd5b60006020828403121561072c578081fd5b61073582610704565b9392505050565b6000806040838503121561074e578081fd5b61075783610704565b915061076560208401610704565b90509250929050565b60008060408385031215610780578182fd5b61078983610704565b946020939093013593505050565b600060208083850312156107a9578182fd5b823567ffffffffffffffff808211156107c0578384fd5b818501915085601f8301126107d3578384fd5b8135818111156107df57fe5b604051601f8201601f19168101850183811182821017156107fc57fe5b6040528181528382018501881015610812578586fd5b818585018683013790810190930193909352509392505050565b60008251815b8181101561084c5760208186018101518583015201610832565b8181111561085a5782828501525b509190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b60208082526034908201527f5472616e7366657248656c7065723a3a736166655472616e736665724554483a60408201527308115512081d1c985b9cd9995c8819985a5b195960621b606082015260800190565b60208082526026908201527f436f6e74726163742068617320616c7265616479206265656e20696e697469616040820152653634bd32b21760d11b606082015260800190565b90815260200190565b63ffffffff9190911681526020019056fe4f564d5f58434841494e3a206d657373656e67657220636f6e747261637420756e61757468656e746963617465644f564d5f58434841494e3a2077726f6e672073656e646572206f662063726f73732d646f6d61696e206d65737361676550726f78795f5f4f564d5f4c3143726f7373446f6d61696e4d657373656e676572a164736f6c6343000706000a",
"deployedBytecode": "0x60806040526004361061008a5760003560e01c8063485cc95511610059578063485cc95514610122578063490b5b7814610142578063b760faf914610157578063d0e30db01461016a578063f4f7b41a146101725761009b565b80631273a090146100a0578063299ca478146100cb5780633cb747bf146100ed578063461a4478146101025761009b565b3661009b576100993333610192565b005b600080fd5b3480156100ac57600080fd5b506100b5610246565b6040516100c29190610935565b60405180910390f35b3480156100d757600080fd5b506100e061024d565b6040516100c29190610865565b3480156100f957600080fd5b506100e061025c565b34801561010e57600080fd5b506100e061011d366004610797565b61026b565b34801561012e57600080fd5b5061009961013d36600461073c565b610347565b34801561014e57600080fd5b506100e06103ef565b61009961016536600461071b565b6103fe565b61009961040b565b34801561017e57600080fd5b5061009961018d36600461076e565b610417565b6000638d6e9a5b60e01b82346040516024016101af929190610879565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526002549091506101fe906001600160a01b03168262124f80610578565b826001600160a01b03167ff531653a5819e21265de50358610d55dbe6594c61605b209dfa4280d277938c18334604051610239929190610879565b60405180910390a2505050565b62124f8081565b6001546001600160a01b031681565b6000546001600160a01b031681565b60015460405163bf40fac160e01b81526020600482018181528451602484015284516000946001600160a01b03169363bf40fac1938793928392604401918501908083838b5b838110156102c95781810151838201526020016102b1565b50505050905090810190601f1680156102f65780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561031357600080fd5b505afa158015610327573d6000803e3d6000fd5b505050506040513d602081101561033d57600080fd5b505190505b919050565b6001546001600160a01b0316156103795760405162461bcd60e51b8152600401610370906108e6565b60405180910390fd5b600180546001600160a01b038085166001600160a01b0319928316179092556002805492841692909116919091179055604080516060810190915260218082526103cb91906109a5602083013961026b565b600080546001600160a01b0319166001600160a01b03929092169190911790555050565b6002546001600160a01b031681565b6104083382610192565b50565b6104153333610192565b565b6002546001600160a01b031661042b610663565b6001600160a01b0316336001600160a01b03161461047a5760405162461bcd60e51b815260040180806020018281038252602e815260200180610947602e913960400191505060405180910390fd5b806001600160a01b031661048c610663565b6001600160a01b0316636e296e456040518163ffffffff1660e01b815260040160206040518083038186803b1580156104c457600080fd5b505afa1580156104d8573d6000803e3d6000fd5b505050506040513d60208110156104ee57600080fd5b50516001600160a01b0316146105355760405162461bcd60e51b81526004018080602001828103825260308152602001806109756030913960400191505060405180910390fd5b61053f8383610672565b826001600160a01b03167f9e5c4f9f4e46b8629d3dda85f43a69194f50254404a72dc62b9e932d9c94eda883604051610239919061092c565b610580610663565b6001600160a01b0316633dbb202b8484846040518463ffffffff1660e01b815260040180846001600160a01b03168152602001806020018363ffffffff168152602001828103825284818151815260200191508051906020019080838360005b838110156105f85781810151838201526020016105e0565b50505050905090810190601f1680156106255780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561064657600080fd5b505af115801561065a573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031690565b604080516000808252602082019092526001600160a01b03841690839060405161069c919061082c565b60006040518083038185875af1925050503d80600081146106d9576040519150601f19603f3d011682016040523d82523d6000602084013e6106de565b606091505b50509050806106ff5760405162461bcd60e51b815260040161037090610892565b505050565b80356001600160a01b038116811461034257600080fd5b60006020828403121561072c578081fd5b61073582610704565b9392505050565b6000806040838503121561074e578081fd5b61075783610704565b915061076560208401610704565b90509250929050565b60008060408385031215610780578182fd5b61078983610704565b946020939093013593505050565b600060208083850312156107a9578182fd5b823567ffffffffffffffff808211156107c0578384fd5b818501915085601f8301126107d3578384fd5b8135818111156107df57fe5b604051601f8201601f19168101850183811182821017156107fc57fe5b6040528181528382018501881015610812578586fd5b818585018683013790810190930193909352509392505050565b60008251815b8181101561084c5760208186018101518583015201610832565b8181111561085a5782828501525b509190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b60208082526034908201527f5472616e7366657248656c7065723a3a736166655472616e736665724554483a60408201527308115512081d1c985b9cd9995c8819985a5b195960621b606082015260800190565b60208082526026908201527f436f6e74726163742068617320616c7265616479206265656e20696e697469616040820152653634bd32b21760d11b606082015260800190565b90815260200190565b63ffffffff9190911681526020019056fe4f564d5f58434841494e3a206d657373656e67657220636f6e747261637420756e61757468656e746963617465644f564d5f58434841494e3a2077726f6e672073656e646572206f662063726f73732d646f6d61696e206d65737361676550726f78795f5f4f564d5f4c3143726f7373446f6d61696e4d657373656e676572a164736f6c6343000706000a",
"devdoc": {
"details": "The L1 ETH Gateway is a contract which stores deposited ETH that is in use on L2. Compiler used: solc Runtime target: EVM",
"kind": "dev",
"methods": {
"deposit()": {
"details": "deposit an amount of the ETH to the caller's balance on L2"
},
"depositTo(address)": {
"details": "deposit an amount of ETH to a recipients's balance on L2",
"params": {
"_to": "L2 address to credit the withdrawal to"
}
},
"finalizeWithdrawal(address,uint256)": {
"details": "Complete a withdrawal from L2 to L1, and credit funds to the recipient's balance of the L1 ETH token. Since only the xDomainMessenger can call this function, it will never be called before the withdrawal is finalized. ",
"params": {
"_amount": "Amount of the ETH to withdraw",
"_to": "L1 address to credit the withdrawal to"
}
},
"initialize(address,address)": {
"params": {
"_libAddressManager": "Address manager for this OE deployment",
"_ovmEth": "L2 OVM_ETH implementation of iOVM_DepositedToken"
}
}
},
"title": "OVM_L1ETHGateway",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 11742,
"contract": "contracts/optimistic-ethereum/OVM/bridge/tokens/OVM_L1ETHGateway.sol:OVM_L1ETHGateway",
"label": "messenger",
"offset": 0,
"slot": "0",
"type": "t_address"
},
{
"astId": 12526,
"contract": "contracts/optimistic-ethereum/OVM/bridge/tokens/OVM_L1ETHGateway.sol:OVM_L1ETHGateway",
"label": "libAddressManager",
"offset": 0,
"slot": "1",
"type": "t_contract(Lib_AddressManager)12519"
},
{
"astId": 1967,
"contract": "contracts/optimistic-ethereum/OVM/bridge/tokens/OVM_L1ETHGateway.sol:OVM_L1ETHGateway",
"label": "ovmEth",
"offset": 0,
"slot": "2",
"type": "t_address"
}
],
"types": {
"t_address": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
},
"t_contract(Lib_AddressManager)12519": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
}
}
}
}
\ No newline at end of file
{
"address": "0xf56d4FAeD6F52c4ce14e44885084dAFc5c440138",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_libAddressManager",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"components": [
{
"internalType": "address",
"name": "target",
"type": "address"
},
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "bytes",
"name": "message",
"type": "bytes"
},
{
"internalType": "uint256",
"name": "messageNonce",
"type": "uint256"
},
{
"components": [
{
"internalType": "bytes32",
"name": "stateRoot",
"type": "bytes32"
},
{
"components": [
{
"internalType": "uint256",
"name": "batchIndex",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "batchRoot",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "batchSize",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "prevTotalElements",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "extraData",
"type": "bytes"
}
],
"internalType": "struct Lib_OVMCodec.ChainBatchHeader",
"name": "stateRootBatchHeader",
"type": "tuple"
},
{
"components": [
{
"internalType": "uint256",
"name": "index",
"type": "uint256"
},
{
"internalType": "bytes32[]",
"name": "siblings",
"type": "bytes32[]"
}
],
"internalType": "struct Lib_OVMCodec.ChainInclusionProof",
"name": "stateRootProof",
"type": "tuple"
},
{
"internalType": "bytes",
"name": "stateTrieWitness",
"type": "bytes"
},
{
"internalType": "bytes",
"name": "storageTrieWitness",
"type": "bytes"
}
],
"internalType": "struct iOVM_L1CrossDomainMessenger.L2MessageInclusionProof",
"name": "proof",
"type": "tuple"
}
],
"internalType": "struct iOVM_L1MultiMessageRelayer.L2ToL1Message[]",
"name": "_messages",
"type": "tuple[]"
}
],
"name": "batchRelayMessages",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "libAddressManager",
"outputs": [
{
"internalType": "contract Lib_AddressManager",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "resolve",
"outputs": [
{
"internalType": "address",
"name": "_contract",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
],
"transactionHash": "0x0e4af02ac2041ee5a1e4c30275da9a1daa76b9c7e1b07f3a82cf2073ba75fe5c",
"receipt": {
"to": null,
"from": "0x18394B52d3Cb931dfA76F63251919D051953413d",
"contractAddress": "0xf56d4FAeD6F52c4ce14e44885084dAFc5c440138",
"transactionIndex": 4,
"gasUsed": "596327",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0xc8cb94bc6a30dc6c6f9e0594d0f98f09383fd0be3e28cd670e7cee855adb6024",
"transactionHash": "0x0e4af02ac2041ee5a1e4c30275da9a1daa76b9c7e1b07f3a82cf2073ba75fe5c",
"logs": [],
"blockNumber": 24199525,
"cumulativeGasUsed": "942270",
"status": 1,
"byzantium": true
},
"args": [
"0xFaf27b24ba54C6910C12CFF5C9453C0e8D634e05"
],
"solcInputHash": "03aed03b958b1d37f90bd88d0f56dd85",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"messageNonce\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"batchRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"batchSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"prevTotalElements\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Lib_OVMCodec.ChainBatchHeader\",\"name\":\"stateRootBatchHeader\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[]\",\"name\":\"siblings\",\"type\":\"bytes32[]\"}],\"internalType\":\"struct Lib_OVMCodec.ChainInclusionProof\",\"name\":\"stateRootProof\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"stateTrieWitness\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"storageTrieWitness\",\"type\":\"bytes\"}],\"internalType\":\"struct iOVM_L1CrossDomainMessenger.L2MessageInclusionProof\",\"name\":\"proof\",\"type\":\"tuple\"}],\"internalType\":\"struct iOVM_L1MultiMessageRelayer.L2ToL1Message[]\",\"name\":\"_messages\",\"type\":\"tuple[]\"}],\"name\":\"batchRelayMessages\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"libAddressManager\",\"outputs\":[{\"internalType\":\"contract Lib_AddressManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"The L1 Multi-Message Relayer contract is a gas efficiency optimization which enables the relayer to submit multiple messages in a single transaction to be relayed by the L1 Cross Domain Message Sender. Compiler used: solc Runtime target: EVM\",\"kind\":\"dev\",\"methods\":{\"batchRelayMessages((address,address,bytes,uint256,(bytes32,(uint256,bytes32,uint256,uint256,bytes),(uint256,bytes32[]),bytes,bytes))[])\":{\"params\":{\"_messages\":\"An array of L2 to L1 messages\"}}},\"title\":\"OVM_L1MultiMessageRelayer\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"batchRelayMessages((address,address,bytes,uint256,(bytes32,(uint256,bytes32,uint256,uint256,bytes),(uint256,bytes32[]),bytes,bytes))[])\":{\"notice\":\"Forwards multiple cross domain messages to the L1 Cross Domain Messenger for relaying\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/OVM/bridge/messaging/OVM_L1MultiMessageRelayer.sol\":\"OVM_L1MultiMessageRelayer\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/OVM/bridge/messaging/OVM_L1MultiMessageRelayer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// @unsupported: ovm\\npragma solidity >0.5.0 <0.8.0;\\npragma experimental ABIEncoderV2;\\n/* Interface Imports */\\nimport { iOVM_L1CrossDomainMessenger } from \\\"../../../iOVM/bridge/messaging/iOVM_L1CrossDomainMessenger.sol\\\";\\nimport { iOVM_L1MultiMessageRelayer } from \\\"../../../iOVM/bridge/messaging/iOVM_L1MultiMessageRelayer.sol\\\";\\n\\n/* Contract Imports */\\nimport { Lib_AddressResolver } from \\\"../../../libraries/resolver/Lib_AddressResolver.sol\\\";\\n\\n\\n/**\\n * @title OVM_L1MultiMessageRelayer\\n * @dev The L1 Multi-Message Relayer contract is a gas efficiency optimization which enables the \\n * relayer to submit multiple messages in a single transaction to be relayed by the L1 Cross Domain\\n * Message Sender.\\n *\\n * Compiler used: solc\\n * Runtime target: EVM\\n */\\ncontract OVM_L1MultiMessageRelayer is iOVM_L1MultiMessageRelayer, Lib_AddressResolver {\\n\\n /***************\\n * Constructor *\\n ***************/\\n constructor(\\n address _libAddressManager\\n ) \\n Lib_AddressResolver(_libAddressManager)\\n {}\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyBatchRelayer() {\\n require(\\n msg.sender == resolve(\\\"OVM_L2BatchMessageRelayer\\\"),\\n \\\"OVM_L1MultiMessageRelayer: Function can only be called by the OVM_L2BatchMessageRelayer\\\"\\n );\\n _;\\n }\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * @notice Forwards multiple cross domain messages to the L1 Cross Domain Messenger for relaying\\n * @param _messages An array of L2 to L1 messages\\n */\\n function batchRelayMessages(L2ToL1Message[] calldata _messages) \\n override\\n external\\n onlyBatchRelayer \\n {\\n iOVM_L1CrossDomainMessenger messenger = iOVM_L1CrossDomainMessenger(resolve(\\\"Proxy__OVM_L1CrossDomainMessenger\\\"));\\n for (uint256 i = 0; i < _messages.length; i++) {\\n L2ToL1Message memory message = _messages[i];\\n messenger.relayMessage(\\n message.target,\\n message.sender,\\n message.message,\\n message.messageNonce,\\n message.proof\\n );\\n }\\n }\\n}\\n\",\"keccak256\":\"0xbccd671aae35ef04fa45b3019f0a9d8d3e1d7b60a6261d979579f93f9c508725\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/iOVM/bridge/messaging/iAbs_BaseCrossDomainMessenger.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\npragma experimental ABIEncoderV2;\\n\\n/**\\n * @title iAbs_BaseCrossDomainMessenger\\n */\\ninterface iAbs_BaseCrossDomainMessenger {\\n\\n /**********\\n * Events *\\n **********/\\n event SentMessage(bytes message);\\n event RelayedMessage(bytes32 msgHash);\\n\\n /**********************\\n * Contract Variables *\\n **********************/\\n function xDomainMessageSender() external view returns (address);\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Sends a cross domain message to the target messenger.\\n * @param _target Target contract address.\\n * @param _message Message to send to the target.\\n * @param _gasLimit Gas limit for the provided message.\\n */\\n function sendMessage(\\n address _target,\\n bytes calldata _message,\\n uint32 _gasLimit\\n ) external;\\n}\\n\",\"keccak256\":\"0xc2bd6b373daae2ede34281f4be5938d02b9d1cfb056b40d65ff70b7f16ce3c86\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/iOVM/bridge/messaging/iOVM_L1CrossDomainMessenger.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\npragma experimental ABIEncoderV2;\\n\\n/* Library Imports */\\nimport { Lib_OVMCodec } from \\\"../../../libraries/codec/Lib_OVMCodec.sol\\\";\\n\\n/* Interface Imports */\\nimport { iAbs_BaseCrossDomainMessenger } from \\\"./iAbs_BaseCrossDomainMessenger.sol\\\";\\n\\n/**\\n * @title iOVM_L1CrossDomainMessenger\\n */\\ninterface iOVM_L1CrossDomainMessenger is iAbs_BaseCrossDomainMessenger {\\n\\n /*******************\\n * Data Structures *\\n *******************/\\n\\n struct L2MessageInclusionProof {\\n bytes32 stateRoot;\\n Lib_OVMCodec.ChainBatchHeader stateRootBatchHeader;\\n Lib_OVMCodec.ChainInclusionProof stateRootProof;\\n bytes stateTrieWitness;\\n bytes storageTrieWitness;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Relays a cross domain message to a contract.\\n * @param _target Target contract address.\\n * @param _sender Message sender address.\\n * @param _message Message to send to the target.\\n * @param _messageNonce Nonce for the provided message.\\n * @param _proof Inclusion proof for the given message.\\n */\\n function relayMessage(\\n address _target,\\n address _sender,\\n bytes memory _message,\\n uint256 _messageNonce,\\n L2MessageInclusionProof memory _proof\\n ) external;\\n\\n /**\\n * Replays a cross domain message to the target messenger.\\n * @param _target Target contract address.\\n * @param _sender Original sender address.\\n * @param _message Message to send to the target.\\n * @param _messageNonce Nonce for the provided message.\\n * @param _gasLimit Gas limit for the provided message.\\n */\\n function replayMessage(\\n address _target,\\n address _sender,\\n bytes memory _message,\\n uint256 _messageNonce,\\n uint32 _gasLimit\\n ) external;\\n}\\n\",\"keccak256\":\"0xdcd239d0b215e400674d78e8db4ac12ba18efc34fa78e24c2ff867f61062dba2\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/iOVM/bridge/messaging/iOVM_L1MultiMessageRelayer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\npragma experimental ABIEncoderV2;\\n\\n/* Interface Imports */\\nimport { iOVM_L1CrossDomainMessenger } from \\\"../../../iOVM/bridge/messaging/iOVM_L1CrossDomainMessenger.sol\\\";\\ninterface iOVM_L1MultiMessageRelayer {\\n\\n struct L2ToL1Message {\\n address target;\\n address sender;\\n bytes message;\\n uint256 messageNonce;\\n iOVM_L1CrossDomainMessenger.L2MessageInclusionProof proof;\\n }\\n\\n function batchRelayMessages(L2ToL1Message[] calldata _messages) external; \\n}\\n\",\"keccak256\":\"0xed86c23182a66b1a6c90c3f484b5d7264069e1a3849eb2fdd3608f9686282687\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/codec/Lib_OVMCodec.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\npragma experimental ABIEncoderV2;\\n\\n/* Library Imports */\\nimport { Lib_RLPReader } from \\\"../rlp/Lib_RLPReader.sol\\\";\\nimport { Lib_RLPWriter } from \\\"../rlp/Lib_RLPWriter.sol\\\";\\nimport { Lib_BytesUtils } from \\\"../utils/Lib_BytesUtils.sol\\\";\\nimport { Lib_Bytes32Utils } from \\\"../utils/Lib_Bytes32Utils.sol\\\";\\nimport { Lib_SafeExecutionManagerWrapper } from \\\"../../libraries/wrappers/Lib_SafeExecutionManagerWrapper.sol\\\";\\n\\n/**\\n * @title Lib_OVMCodec\\n */\\nlibrary Lib_OVMCodec {\\n\\n /*********\\n * Enums *\\n *********/\\n\\n enum EOASignatureType {\\n EIP155_TRANSACTION,\\n ETH_SIGNED_MESSAGE\\n }\\n\\n enum QueueOrigin {\\n SEQUENCER_QUEUE,\\n L1TOL2_QUEUE\\n }\\n\\n\\n /***********\\n * Structs *\\n ***********/\\n\\n struct Account {\\n uint256 nonce;\\n uint256 balance;\\n bytes32 storageRoot;\\n bytes32 codeHash;\\n address ethAddress;\\n bool isFresh;\\n }\\n\\n struct EVMAccount {\\n uint256 nonce;\\n uint256 balance;\\n bytes32 storageRoot;\\n bytes32 codeHash;\\n }\\n\\n struct ChainBatchHeader {\\n uint256 batchIndex;\\n bytes32 batchRoot;\\n uint256 batchSize;\\n uint256 prevTotalElements;\\n bytes extraData;\\n }\\n\\n struct ChainInclusionProof {\\n uint256 index;\\n bytes32[] siblings;\\n }\\n\\n struct Transaction {\\n uint256 timestamp;\\n uint256 blockNumber;\\n QueueOrigin l1QueueOrigin;\\n address l1TxOrigin;\\n address entrypoint;\\n uint256 gasLimit;\\n bytes data;\\n }\\n\\n struct TransactionChainElement {\\n bool isSequenced;\\n uint256 queueIndex; // QUEUED TX ONLY\\n uint256 timestamp; // SEQUENCER TX ONLY\\n uint256 blockNumber; // SEQUENCER TX ONLY\\n bytes txData; // SEQUENCER TX ONLY\\n }\\n\\n struct QueueElement {\\n bytes32 transactionHash;\\n uint40 timestamp;\\n uint40 blockNumber;\\n }\\n\\n struct EIP155Transaction {\\n uint256 nonce;\\n uint256 gasPrice;\\n uint256 gasLimit;\\n address to;\\n uint256 value;\\n bytes data;\\n uint256 chainId;\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * Decodes an EOA transaction (i.e., native Ethereum RLP encoding).\\n * @param _transaction Encoded EOA transaction.\\n * @return Transaction decoded into a struct.\\n */\\n function decodeEIP155Transaction(\\n bytes memory _transaction,\\n bool _isEthSignedMessage\\n )\\n internal\\n pure\\n returns (\\n EIP155Transaction memory\\n )\\n {\\n if (_isEthSignedMessage) {\\n (\\n uint256 _nonce,\\n uint256 _gasLimit,\\n uint256 _gasPrice,\\n uint256 _chainId,\\n address _to,\\n bytes memory _data\\n ) = abi.decode(\\n _transaction,\\n (uint256, uint256, uint256, uint256, address ,bytes)\\n );\\n return EIP155Transaction({\\n nonce: _nonce,\\n gasPrice: _gasPrice,\\n gasLimit: _gasLimit,\\n to: _to,\\n value: 0,\\n data: _data,\\n chainId: _chainId\\n });\\n } else {\\n Lib_RLPReader.RLPItem[] memory decoded = Lib_RLPReader.readList(_transaction);\\n\\n return EIP155Transaction({\\n nonce: Lib_RLPReader.readUint256(decoded[0]),\\n gasPrice: Lib_RLPReader.readUint256(decoded[1]),\\n gasLimit: Lib_RLPReader.readUint256(decoded[2]),\\n to: Lib_RLPReader.readAddress(decoded[3]),\\n value: Lib_RLPReader.readUint256(decoded[4]),\\n data: Lib_RLPReader.readBytes(decoded[5]),\\n chainId: Lib_RLPReader.readUint256(decoded[6])\\n });\\n }\\n }\\n\\n /**\\n * Decompresses a compressed EIP155 transaction.\\n * @param _transaction Compressed EIP155 transaction bytes.\\n * @return Transaction parsed into a struct.\\n */\\n function decompressEIP155Transaction(\\n bytes memory _transaction\\n )\\n internal\\n returns (\\n EIP155Transaction memory\\n )\\n {\\n return EIP155Transaction({\\n gasLimit: Lib_BytesUtils.toUint24(_transaction, 0),\\n gasPrice: uint256(Lib_BytesUtils.toUint24(_transaction, 3)) * 1000000,\\n nonce: Lib_BytesUtils.toUint24(_transaction, 6),\\n to: Lib_BytesUtils.toAddress(_transaction, 9),\\n data: Lib_BytesUtils.slice(_transaction, 29),\\n chainId: Lib_SafeExecutionManagerWrapper.safeCHAINID(),\\n value: 0\\n });\\n }\\n\\n /**\\n * Encodes an EOA transaction back into the original transaction.\\n * @param _transaction EIP155transaction to encode.\\n * @param _isEthSignedMessage Whether or not this was an eth signed message.\\n * @return Encoded transaction.\\n */\\n function encodeEIP155Transaction(\\n EIP155Transaction memory _transaction,\\n bool _isEthSignedMessage\\n )\\n internal\\n pure\\n returns (\\n bytes memory\\n )\\n {\\n if (_isEthSignedMessage) {\\n return abi.encode(\\n _transaction.nonce,\\n _transaction.gasLimit,\\n _transaction.gasPrice,\\n _transaction.chainId,\\n _transaction.to,\\n _transaction.data\\n );\\n } else {\\n bytes[] memory raw = new bytes[](9);\\n\\n raw[0] = Lib_RLPWriter.writeUint(_transaction.nonce);\\n raw[1] = Lib_RLPWriter.writeUint(_transaction.gasPrice);\\n raw[2] = Lib_RLPWriter.writeUint(_transaction.gasLimit);\\n if (_transaction.to == address(0)) {\\n raw[3] = Lib_RLPWriter.writeBytes('');\\n } else {\\n raw[3] = Lib_RLPWriter.writeAddress(_transaction.to);\\n }\\n raw[4] = Lib_RLPWriter.writeUint(0);\\n raw[5] = Lib_RLPWriter.writeBytes(_transaction.data);\\n raw[6] = Lib_RLPWriter.writeUint(_transaction.chainId);\\n raw[7] = Lib_RLPWriter.writeBytes(bytes(''));\\n raw[8] = Lib_RLPWriter.writeBytes(bytes(''));\\n\\n return Lib_RLPWriter.writeList(raw);\\n }\\n }\\n\\n /**\\n * Encodes a standard OVM transaction.\\n * @param _transaction OVM transaction to encode.\\n * @return Encoded transaction bytes.\\n */\\n function encodeTransaction(\\n Transaction memory _transaction\\n )\\n internal\\n pure\\n returns (\\n bytes memory\\n )\\n {\\n return abi.encodePacked(\\n _transaction.timestamp,\\n _transaction.blockNumber,\\n _transaction.l1QueueOrigin,\\n _transaction.l1TxOrigin,\\n _transaction.entrypoint,\\n _transaction.gasLimit,\\n _transaction.data\\n );\\n }\\n\\n /**\\n * Hashes a standard OVM transaction.\\n * @param _transaction OVM transaction to encode.\\n * @return Hashed transaction\\n */\\n function hashTransaction(\\n Transaction memory _transaction\\n )\\n internal\\n pure\\n returns (\\n bytes32\\n )\\n {\\n return keccak256(encodeTransaction(_transaction));\\n }\\n\\n /**\\n * Converts an OVM account to an EVM account.\\n * @param _in OVM account to convert.\\n * @return Converted EVM account.\\n */\\n function toEVMAccount(\\n Account memory _in\\n )\\n internal\\n pure\\n returns (\\n EVMAccount memory\\n )\\n {\\n return EVMAccount({\\n nonce: _in.nonce,\\n balance: _in.balance,\\n storageRoot: _in.storageRoot,\\n codeHash: _in.codeHash\\n });\\n }\\n\\n /**\\n * @notice RLP-encodes an account state struct.\\n * @param _account Account state struct.\\n * @return RLP-encoded account state.\\n */\\n function encodeEVMAccount(\\n EVMAccount memory _account\\n )\\n internal\\n pure\\n returns (\\n bytes memory\\n )\\n {\\n bytes[] memory raw = new bytes[](4);\\n\\n // Unfortunately we can't create this array outright because\\n // Lib_RLPWriter.writeList will reject fixed-size arrays. Assigning\\n // index-by-index circumvents this issue.\\n raw[0] = Lib_RLPWriter.writeBytes(\\n Lib_Bytes32Utils.removeLeadingZeros(\\n bytes32(_account.nonce)\\n )\\n );\\n raw[1] = Lib_RLPWriter.writeBytes(\\n Lib_Bytes32Utils.removeLeadingZeros(\\n bytes32(_account.balance)\\n )\\n );\\n raw[2] = Lib_RLPWriter.writeBytes(abi.encodePacked(_account.storageRoot));\\n raw[3] = Lib_RLPWriter.writeBytes(abi.encodePacked(_account.codeHash));\\n\\n return Lib_RLPWriter.writeList(raw);\\n }\\n\\n /**\\n * @notice Decodes an RLP-encoded account state into a useful struct.\\n * @param _encoded RLP-encoded account state.\\n * @return Account state struct.\\n */\\n function decodeEVMAccount(\\n bytes memory _encoded\\n )\\n internal\\n pure\\n returns (\\n EVMAccount memory\\n )\\n {\\n Lib_RLPReader.RLPItem[] memory accountState = Lib_RLPReader.readList(_encoded);\\n\\n return EVMAccount({\\n nonce: Lib_RLPReader.readUint256(accountState[0]),\\n balance: Lib_RLPReader.readUint256(accountState[1]),\\n storageRoot: Lib_RLPReader.readBytes32(accountState[2]),\\n codeHash: Lib_RLPReader.readBytes32(accountState[3])\\n });\\n }\\n\\n /**\\n * Calculates a hash for a given batch header.\\n * @param _batchHeader Header to hash.\\n * @return Hash of the header.\\n */\\n function hashBatchHeader(\\n Lib_OVMCodec.ChainBatchHeader memory _batchHeader\\n )\\n internal\\n pure\\n returns (\\n bytes32\\n )\\n {\\n return keccak256(\\n abi.encode(\\n _batchHeader.batchRoot,\\n _batchHeader.batchSize,\\n _batchHeader.prevTotalElements,\\n _batchHeader.extraData\\n )\\n );\\n }\\n}\\n\",\"keccak256\":\"0xe7e518ba7bba3fa28c532f8902576c1bb4dfc1ec4b62bed6da50623248ba17c3\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0x3a490595cc21ff170e4027843093670ff845d5972481fbfb956b722ea564bb06\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_AddressResolver\\n */\\nabstract contract Lib_AddressResolver {\\n\\n /*******************************************\\n * Contract Variables: Contract References *\\n *******************************************/\\n\\n Lib_AddressManager public libAddressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n */\\n constructor(\\n address _libAddressManager\\n ) {\\n libAddressManager = Lib_AddressManager(_libAddressManager);\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function resolve(\\n string memory _name\\n )\\n public\\n view\\n returns (\\n address _contract\\n )\\n {\\n return libAddressManager.getAddress(_name);\\n }\\n}\\n\",\"keccak256\":\"0xaa3ed342f6deb156c660fd83afa579a3b80db17eb465e8949cf5c1b114780143\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xd9dfd9264e5b5fedd53a5b10fdf179c3f367614b0fe69179bce4e45119f5b739\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/rlp/Lib_RLPReader.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Lib_RLPReader\\n * @dev Adapted from \\\"RLPReader\\\" by Hamdi Allam (hamdi.allam97@gmail.com).\\n */\\nlibrary Lib_RLPReader {\\n\\n /*************\\n * Constants *\\n *************/\\n\\n uint256 constant internal MAX_LIST_LENGTH = 32;\\n\\n\\n /*********\\n * Enums *\\n *********/\\n\\n enum RLPItemType {\\n DATA_ITEM,\\n LIST_ITEM\\n }\\n\\n \\n /***********\\n * Structs *\\n ***********/\\n\\n struct RLPItem {\\n uint256 length;\\n uint256 ptr;\\n }\\n \\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n \\n /**\\n * Converts bytes to a reference to memory position and length.\\n * @param _in Input bytes to convert.\\n * @return Output memory reference.\\n */\\n function toRLPItem(\\n bytes memory _in\\n )\\n internal\\n pure\\n returns (\\n RLPItem memory\\n )\\n {\\n uint256 ptr;\\n assembly {\\n ptr := add(_in, 32)\\n }\\n\\n return RLPItem({\\n length: _in.length,\\n ptr: ptr\\n });\\n }\\n\\n /**\\n * Reads an RLP list value into a list of RLP items.\\n * @param _in RLP list value.\\n * @return Decoded RLP list items.\\n */\\n function readList(\\n RLPItem memory _in\\n )\\n internal\\n pure\\n returns (\\n RLPItem[] memory\\n )\\n {\\n (\\n uint256 listOffset,\\n ,\\n RLPItemType itemType\\n ) = _decodeLength(_in);\\n\\n require(\\n itemType == RLPItemType.LIST_ITEM,\\n \\\"Invalid RLP list value.\\\"\\n );\\n\\n // Solidity in-memory arrays can't be increased in size, but *can* be decreased in size by\\n // writing to the length. Since we can't know the number of RLP items without looping over\\n // the entire input, we'd have to loop twice to accurately size this array. It's easier to\\n // simply set a reasonable maximum list length and decrease the size before we finish.\\n RLPItem[] memory out = new RLPItem[](MAX_LIST_LENGTH);\\n\\n uint256 itemCount = 0;\\n uint256 offset = listOffset;\\n while (offset < _in.length) {\\n require(\\n itemCount < MAX_LIST_LENGTH,\\n \\\"Provided RLP list exceeds max list length.\\\"\\n );\\n\\n (\\n uint256 itemOffset,\\n uint256 itemLength,\\n ) = _decodeLength(RLPItem({\\n length: _in.length - offset,\\n ptr: _in.ptr + offset\\n }));\\n\\n out[itemCount] = RLPItem({\\n length: itemLength + itemOffset,\\n ptr: _in.ptr + offset\\n });\\n\\n itemCount += 1;\\n offset += itemOffset + itemLength;\\n }\\n\\n // Decrease the array size to match the actual item count.\\n assembly {\\n mstore(out, itemCount)\\n }\\n\\n return out;\\n }\\n\\n /**\\n * Reads an RLP list value into a list of RLP items.\\n * @param _in RLP list value.\\n * @return Decoded RLP list items.\\n */\\n function readList(\\n bytes memory _in\\n )\\n internal\\n pure\\n returns (\\n RLPItem[] memory\\n )\\n {\\n return readList(\\n toRLPItem(_in)\\n );\\n }\\n\\n /**\\n * Reads an RLP bytes value into bytes.\\n * @param _in RLP bytes value.\\n * @return Decoded bytes.\\n */\\n function readBytes(\\n RLPItem memory _in\\n )\\n internal\\n pure\\n returns (\\n bytes memory\\n )\\n {\\n (\\n uint256 itemOffset,\\n uint256 itemLength,\\n RLPItemType itemType\\n ) = _decodeLength(_in);\\n\\n require(\\n itemType == RLPItemType.DATA_ITEM,\\n \\\"Invalid RLP bytes value.\\\"\\n );\\n\\n return _copy(_in.ptr, itemOffset, itemLength);\\n }\\n\\n /**\\n * Reads an RLP bytes value into bytes.\\n * @param _in RLP bytes value.\\n * @return Decoded bytes.\\n */\\n function readBytes(\\n bytes memory _in\\n )\\n internal\\n pure\\n returns (\\n bytes memory\\n )\\n {\\n return readBytes(\\n toRLPItem(_in)\\n );\\n }\\n\\n /**\\n * Reads an RLP string value into a string.\\n * @param _in RLP string value.\\n * @return Decoded string.\\n */\\n function readString(\\n RLPItem memory _in\\n )\\n internal\\n pure\\n returns (\\n string memory\\n )\\n {\\n return string(readBytes(_in));\\n }\\n\\n /**\\n * Reads an RLP string value into a string.\\n * @param _in RLP string value.\\n * @return Decoded string.\\n */\\n function readString(\\n bytes memory _in\\n )\\n internal\\n pure\\n returns (\\n string memory\\n )\\n {\\n return readString(\\n toRLPItem(_in)\\n );\\n }\\n\\n /**\\n * Reads an RLP bytes32 value into a bytes32.\\n * @param _in RLP bytes32 value.\\n * @return Decoded bytes32.\\n */\\n function readBytes32(\\n RLPItem memory _in\\n )\\n internal\\n pure\\n returns (\\n bytes32\\n )\\n {\\n require(\\n _in.length <= 33,\\n \\\"Invalid RLP bytes32 value.\\\"\\n );\\n\\n (\\n uint256 itemOffset,\\n uint256 itemLength,\\n RLPItemType itemType\\n ) = _decodeLength(_in);\\n\\n require(\\n itemType == RLPItemType.DATA_ITEM,\\n \\\"Invalid RLP bytes32 value.\\\"\\n );\\n\\n uint256 ptr = _in.ptr + itemOffset;\\n bytes32 out;\\n assembly {\\n out := mload(ptr)\\n\\n // Shift the bytes over to match the item size.\\n if lt(itemLength, 32) {\\n out := div(out, exp(256, sub(32, itemLength)))\\n }\\n }\\n\\n return out;\\n }\\n\\n /**\\n * Reads an RLP bytes32 value into a bytes32.\\n * @param _in RLP bytes32 value.\\n * @return Decoded bytes32.\\n */\\n function readBytes32(\\n bytes memory _in\\n )\\n internal\\n pure\\n returns (\\n bytes32\\n )\\n {\\n return readBytes32(\\n toRLPItem(_in)\\n );\\n }\\n\\n /**\\n * Reads an RLP uint256 value into a uint256.\\n * @param _in RLP uint256 value.\\n * @return Decoded uint256.\\n */\\n function readUint256(\\n RLPItem memory _in\\n )\\n internal\\n pure\\n returns (\\n uint256\\n )\\n {\\n return uint256(readBytes32(_in));\\n }\\n\\n /**\\n * Reads an RLP uint256 value into a uint256.\\n * @param _in RLP uint256 value.\\n * @return Decoded uint256.\\n */\\n function readUint256(\\n bytes memory _in\\n )\\n internal\\n pure\\n returns (\\n uint256\\n )\\n {\\n return readUint256(\\n toRLPItem(_in)\\n );\\n }\\n\\n /**\\n * Reads an RLP bool value into a bool.\\n * @param _in RLP bool value.\\n * @return Decoded bool.\\n */\\n function readBool(\\n RLPItem memory _in\\n )\\n internal\\n pure\\n returns (\\n bool\\n )\\n {\\n require(\\n _in.length == 1,\\n \\\"Invalid RLP boolean value.\\\"\\n );\\n\\n uint256 ptr = _in.ptr;\\n uint256 out;\\n assembly {\\n out := byte(0, mload(ptr))\\n }\\n\\n require(\\n out == 0 || out == 1,\\n \\\"Lib_RLPReader: Invalid RLP boolean value, must be 0 or 1\\\"\\n );\\n\\n return out != 0;\\n }\\n\\n /**\\n * Reads an RLP bool value into a bool.\\n * @param _in RLP bool value.\\n * @return Decoded bool.\\n */\\n function readBool(\\n bytes memory _in\\n )\\n internal\\n pure\\n returns (\\n bool\\n )\\n {\\n return readBool(\\n toRLPItem(_in)\\n );\\n }\\n\\n /**\\n * Reads an RLP address value into a address.\\n * @param _in RLP address value.\\n * @return Decoded address.\\n */\\n function readAddress(\\n RLPItem memory _in\\n )\\n internal\\n pure\\n returns (\\n address\\n )\\n {\\n if (_in.length == 1) {\\n return address(0);\\n }\\n\\n require(\\n _in.length == 21,\\n \\\"Invalid RLP address value.\\\"\\n );\\n\\n return address(readUint256(_in));\\n }\\n\\n /**\\n * Reads an RLP address value into a address.\\n * @param _in RLP address value.\\n * @return Decoded address.\\n */\\n function readAddress(\\n bytes memory _in\\n )\\n internal\\n pure\\n returns (\\n address\\n )\\n {\\n return readAddress(\\n toRLPItem(_in)\\n );\\n }\\n\\n /**\\n * Reads the raw bytes of an RLP item.\\n * @param _in RLP item to read.\\n * @return Raw RLP bytes.\\n */\\n function readRawBytes(\\n RLPItem memory _in\\n )\\n internal\\n pure\\n returns (\\n bytes memory\\n )\\n {\\n return _copy(_in);\\n }\\n\\n\\n /*********************\\n * Private Functions *\\n *********************/\\n\\n /**\\n * Decodes the length of an RLP item.\\n * @param _in RLP item to decode.\\n * @return Offset of the encoded data.\\n * @return Length of the encoded data.\\n * @return RLP item type (LIST_ITEM or DATA_ITEM).\\n */\\n function _decodeLength(\\n RLPItem memory _in\\n )\\n private\\n pure\\n returns (\\n uint256,\\n uint256,\\n RLPItemType\\n )\\n {\\n require(\\n _in.length > 0,\\n \\\"RLP item cannot be null.\\\"\\n );\\n\\n uint256 ptr = _in.ptr;\\n uint256 prefix;\\n assembly {\\n prefix := byte(0, mload(ptr))\\n }\\n\\n if (prefix <= 0x7f) {\\n // Single byte.\\n\\n return (0, 1, RLPItemType.DATA_ITEM);\\n } else if (prefix <= 0xb7) {\\n // Short string.\\n\\n uint256 strLen = prefix - 0x80;\\n \\n require(\\n _in.length > strLen,\\n \\\"Invalid RLP short string.\\\"\\n );\\n\\n return (1, strLen, RLPItemType.DATA_ITEM);\\n } else if (prefix <= 0xbf) {\\n // Long string.\\n uint256 lenOfStrLen = prefix - 0xb7;\\n\\n require(\\n _in.length > lenOfStrLen,\\n \\\"Invalid RLP long string length.\\\"\\n );\\n\\n uint256 strLen;\\n assembly {\\n // Pick out the string length.\\n strLen := div(\\n mload(add(ptr, 1)),\\n exp(256, sub(32, lenOfStrLen))\\n )\\n }\\n\\n require(\\n _in.length > lenOfStrLen + strLen,\\n \\\"Invalid RLP long string.\\\"\\n );\\n\\n return (1 + lenOfStrLen, strLen, RLPItemType.DATA_ITEM);\\n } else if (prefix <= 0xf7) {\\n // Short list.\\n uint256 listLen = prefix - 0xc0;\\n\\n require(\\n _in.length > listLen,\\n \\\"Invalid RLP short list.\\\"\\n );\\n\\n return (1, listLen, RLPItemType.LIST_ITEM);\\n } else {\\n // Long list.\\n uint256 lenOfListLen = prefix - 0xf7;\\n\\n require(\\n _in.length > lenOfListLen,\\n \\\"Invalid RLP long list length.\\\"\\n );\\n\\n uint256 listLen;\\n assembly {\\n // Pick out the list length.\\n listLen := div(\\n mload(add(ptr, 1)),\\n exp(256, sub(32, lenOfListLen))\\n )\\n }\\n\\n require(\\n _in.length > lenOfListLen + listLen,\\n \\\"Invalid RLP long list.\\\"\\n );\\n\\n return (1 + lenOfListLen, listLen, RLPItemType.LIST_ITEM);\\n }\\n }\\n\\n /**\\n * Copies the bytes from a memory location.\\n * @param _src Pointer to the location to read from.\\n * @param _offset Offset to start reading from.\\n * @param _length Number of bytes to read.\\n * @return Copied bytes.\\n */\\n function _copy(\\n uint256 _src,\\n uint256 _offset,\\n uint256 _length\\n )\\n private\\n pure\\n returns (\\n bytes memory\\n )\\n {\\n bytes memory out = new bytes(_length);\\n if (out.length == 0) {\\n return out;\\n }\\n\\n uint256 src = _src + _offset;\\n uint256 dest;\\n assembly {\\n dest := add(out, 32)\\n }\\n\\n // Copy over as many complete words as we can.\\n for (uint256 i = 0; i < _length / 32; i++) {\\n assembly {\\n mstore(dest, mload(src))\\n }\\n\\n src += 32;\\n dest += 32;\\n }\\n\\n // Pick out the remaining bytes.\\n uint256 mask = 256 ** (32 - (_length % 32)) - 1;\\n assembly {\\n mstore(\\n dest,\\n or(\\n and(mload(src), not(mask)),\\n and(mload(dest), mask)\\n )\\n )\\n }\\n\\n return out;\\n }\\n\\n /**\\n * Copies an RLP item into bytes.\\n * @param _in RLP item to copy.\\n * @return Copied bytes.\\n */\\n function _copy(\\n RLPItem memory _in\\n )\\n private\\n pure\\n returns (\\n bytes memory\\n )\\n {\\n return _copy(_in.ptr, 0, _in.length);\\n }\\n}\\n\",\"keccak256\":\"0xbdb8fae0ca2483b4cc07607a5070fc25e33c54b4e4462b99e7c0b13aac48a09b\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/rlp/Lib_RLPWriter.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\npragma experimental ABIEncoderV2;\\n\\n/* Library Imports */\\nimport { Lib_BytesUtils } from \\\"../utils/Lib_BytesUtils.sol\\\";\\n\\n/**\\n * @title Lib_RLPWriter\\n * @author Bakaoh (with modifications)\\n */\\nlibrary Lib_RLPWriter {\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * RLP encodes a byte string.\\n * @param _in The byte string to encode.\\n * @return _out The RLP encoded string in bytes.\\n */\\n function writeBytes(\\n bytes memory _in\\n )\\n internal\\n pure\\n returns (\\n bytes memory _out\\n )\\n {\\n bytes memory encoded;\\n\\n if (_in.length == 1 && uint8(_in[0]) < 128) {\\n encoded = _in;\\n } else {\\n encoded = abi.encodePacked(_writeLength(_in.length, 128), _in);\\n }\\n\\n return encoded;\\n }\\n\\n /**\\n * RLP encodes a list of RLP encoded byte byte strings.\\n * @param _in The list of RLP encoded byte strings.\\n * @return _out The RLP encoded list of items in bytes.\\n */\\n function writeList(\\n bytes[] memory _in\\n )\\n internal\\n pure\\n returns (\\n bytes memory _out\\n )\\n {\\n bytes memory list = _flatten(_in);\\n return abi.encodePacked(_writeLength(list.length, 192), list);\\n }\\n\\n /**\\n * RLP encodes a string.\\n * @param _in The string to encode.\\n * @return _out The RLP encoded string in bytes.\\n */\\n function writeString(\\n string memory _in\\n )\\n internal\\n pure\\n returns (\\n bytes memory _out\\n )\\n {\\n return writeBytes(bytes(_in));\\n }\\n\\n /**\\n * RLP encodes an address.\\n * @param _in The address to encode.\\n * @return _out The RLP encoded address in bytes.\\n */\\n function writeAddress(\\n address _in\\n )\\n internal\\n pure\\n returns (\\n bytes memory _out\\n )\\n {\\n return writeBytes(abi.encodePacked(_in));\\n }\\n\\n /**\\n * RLP encodes a uint.\\n * @param _in The uint256 to encode.\\n * @return _out The RLP encoded uint256 in bytes.\\n */\\n function writeUint(\\n uint256 _in\\n )\\n internal\\n pure\\n returns (\\n bytes memory _out\\n )\\n {\\n return writeBytes(_toBinary(_in));\\n }\\n\\n /**\\n * RLP encodes a bool.\\n * @param _in The bool to encode.\\n * @return _out The RLP encoded bool in bytes.\\n */\\n function writeBool(\\n bool _in\\n )\\n internal\\n pure\\n returns (\\n bytes memory _out\\n )\\n {\\n bytes memory encoded = new bytes(1);\\n encoded[0] = (_in ? bytes1(0x01) : bytes1(0x80));\\n return encoded;\\n }\\n\\n\\n /*********************\\n * Private Functions *\\n *********************/\\n\\n /**\\n * Encode the first byte, followed by the `len` in binary form if `length` is more than 55.\\n * @param _len The length of the string or the payload.\\n * @param _offset 128 if item is string, 192 if item is list.\\n * @return _encoded RLP encoded bytes.\\n */\\n function _writeLength(\\n uint256 _len,\\n uint256 _offset\\n )\\n private\\n pure\\n returns (\\n bytes memory _encoded\\n )\\n {\\n bytes memory encoded;\\n\\n if (_len < 56) {\\n encoded = new bytes(1);\\n encoded[0] = byte(uint8(_len) + uint8(_offset));\\n } else {\\n uint256 lenLen;\\n uint256 i = 1;\\n while (_len / i != 0) {\\n lenLen++;\\n i *= 256;\\n }\\n\\n encoded = new bytes(lenLen + 1);\\n encoded[0] = byte(uint8(lenLen) + uint8(_offset) + 55);\\n for(i = 1; i <= lenLen; i++) {\\n encoded[i] = byte(uint8((_len / (256**(lenLen-i))) % 256));\\n }\\n }\\n\\n return encoded;\\n }\\n\\n /**\\n * Encode integer in big endian binary form with no leading zeroes.\\n * @notice TODO: This should be optimized with assembly to save gas costs.\\n * @param _x The integer to encode.\\n * @return _binary RLP encoded bytes.\\n */\\n function _toBinary(\\n uint256 _x\\n )\\n private\\n pure\\n returns (\\n bytes memory _binary\\n )\\n {\\n bytes memory b = abi.encodePacked(_x);\\n\\n uint256 i = 0;\\n for (; i < 32; i++) {\\n if (b[i] != 0) {\\n break;\\n }\\n }\\n\\n bytes memory res = new bytes(32 - i);\\n for (uint256 j = 0; j < res.length; j++) {\\n res[j] = b[i++];\\n }\\n\\n return res;\\n }\\n\\n /**\\n * Copies a piece of memory to another location.\\n * @notice From: https://github.com/Arachnid/solidity-stringutils/blob/master/src/strings.sol.\\n * @param _dest Destination location.\\n * @param _src Source location.\\n * @param _len Length of memory to copy.\\n */\\n function _memcpy(\\n uint256 _dest,\\n uint256 _src,\\n uint256 _len\\n )\\n private\\n pure\\n {\\n uint256 dest = _dest;\\n uint256 src = _src;\\n uint256 len = _len;\\n\\n for(; len >= 32; len -= 32) {\\n assembly {\\n mstore(dest, mload(src))\\n }\\n dest += 32;\\n src += 32;\\n }\\n\\n uint256 mask = 256 ** (32 - len) - 1;\\n assembly {\\n let srcpart := and(mload(src), not(mask))\\n let destpart := and(mload(dest), mask)\\n mstore(dest, or(destpart, srcpart))\\n }\\n }\\n\\n /**\\n * Flattens a list of byte strings into one byte string.\\n * @notice From: https://github.com/sammayo/solidity-rlp-encoder/blob/master/RLPEncode.sol.\\n * @param _list List of byte strings to flatten.\\n * @return _flattened The flattened byte string.\\n */\\n function _flatten(\\n bytes[] memory _list\\n )\\n private\\n pure\\n returns (\\n bytes memory _flattened\\n )\\n {\\n if (_list.length == 0) {\\n return new bytes(0);\\n }\\n\\n uint256 len;\\n uint256 i = 0;\\n for (; i < _list.length; i++) {\\n len += _list[i].length;\\n }\\n\\n bytes memory flattened = new bytes(len);\\n uint256 flattenedPtr;\\n assembly { flattenedPtr := add(flattened, 0x20) }\\n\\n for(i = 0; i < _list.length; i++) {\\n bytes memory item = _list[i];\\n\\n uint256 listPtr;\\n assembly { listPtr := add(item, 0x20)}\\n\\n _memcpy(flattenedPtr, listPtr, item.length);\\n flattenedPtr += _list[i].length;\\n }\\n\\n return flattened;\\n }\\n}\",\"keccak256\":\"0xbcb24619c1758cb0d9f3fe5c79495950045a9087046a02b9ce01df46ae09ae5b\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/utils/Lib_Bytes32Utils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Lib_Byte32Utils\\n */\\nlibrary Lib_Bytes32Utils {\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * Converts a bytes32 value to a boolean. Anything non-zero will be converted to \\\"true.\\\"\\n * @param _in Input bytes32 value.\\n * @return Bytes32 as a boolean.\\n */\\n function toBool(\\n bytes32 _in\\n )\\n internal\\n pure\\n returns (\\n bool\\n )\\n {\\n return _in != 0;\\n }\\n\\n /**\\n * Converts a boolean to a bytes32 value.\\n * @param _in Input boolean value.\\n * @return Boolean as a bytes32.\\n */\\n function fromBool(\\n bool _in\\n )\\n internal\\n pure\\n returns (\\n bytes32\\n )\\n {\\n return bytes32(uint256(_in ? 1 : 0));\\n }\\n\\n /**\\n * Converts a bytes32 value to an address. Takes the *last* 20 bytes.\\n * @param _in Input bytes32 value.\\n * @return Bytes32 as an address.\\n */\\n function toAddress(\\n bytes32 _in\\n )\\n internal\\n pure\\n returns (\\n address\\n )\\n {\\n return address(uint160(uint256(_in)));\\n }\\n\\n /**\\n * Converts an address to a bytes32.\\n * @param _in Input address value.\\n * @return Address as a bytes32.\\n */\\n function fromAddress(\\n address _in\\n )\\n internal\\n pure\\n returns (\\n bytes32\\n )\\n {\\n return bytes32(uint256(_in));\\n }\\n\\n /**\\n * Removes the leading zeros from a bytes32 value and returns a new (smaller) bytes value.\\n * @param _in Input bytes32 value.\\n * @return Bytes32 without any leading zeros.\\n */\\n function removeLeadingZeros(\\n bytes32 _in\\n )\\n internal\\n pure\\n returns (\\n bytes memory\\n )\\n {\\n bytes memory out;\\n\\n assembly {\\n // Figure out how many leading zero bytes to remove.\\n let shift := 0\\n for { let i := 0 } and(lt(i, 32), eq(byte(i, _in), 0)) { i := add(i, 1) } {\\n shift := add(shift, 1)\\n }\\n\\n // Reserve some space for our output and fix the free memory pointer.\\n out := mload(0x40)\\n mstore(0x40, add(out, 0x40))\\n\\n // Shift the value and store it into the output bytes.\\n mstore(add(out, 0x20), shl(mul(shift, 8), _in))\\n\\n // Store the new size (with leading zero bytes removed) in the output byte size.\\n mstore(out, sub(32, shift))\\n }\\n\\n return out;\\n }\\n}\\n\",\"keccak256\":\"0xfa2def593e3fc56a31852c3744aefdaa93cec74e721bfcfeb1e5d166c7c60b64\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/utils/Lib_BytesUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Lib_BytesUtils\\n */\\nlibrary Lib_BytesUtils {\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function slice(\\n bytes memory _bytes,\\n uint256 _start,\\n uint256 _length\\n )\\n internal\\n pure\\n returns (bytes memory)\\n {\\n require(_length + 31 >= _length, \\\"slice_overflow\\\");\\n require(_start + _length >= _start, \\\"slice_overflow\\\");\\n require(_bytes.length >= _start + _length, \\\"slice_outOfBounds\\\");\\n\\n bytes memory tempBytes;\\n\\n assembly {\\n switch iszero(_length)\\n case 0 {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // The first word of the slice result is potentially a partial\\n // word read from the original array. To read it, we calculate\\n // the length of that partial word and start copying that many\\n // bytes into the array. The first word we copy will start with\\n // data we don't care about, but the last `lengthmod` bytes will\\n // land at the beginning of the contents of the new array. When\\n // we're done copying, we overwrite the full first word with\\n // the actual length of the slice.\\n let lengthmod := and(_length, 31)\\n\\n // The multiplication in the next line is necessary\\n // because when slicing multiples of 32 bytes (lengthmod == 0)\\n // the following copy loop was copying the origin's length\\n // and then ending prematurely not copying everything it should.\\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\\n let end := add(mc, _length)\\n\\n for {\\n // The multiplication in the next line has the same exact purpose\\n // as the one above.\\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n mstore(tempBytes, _length)\\n\\n //update free-memory pointer\\n //allocating the array padded to 32 bytes like the compiler does now\\n mstore(0x40, and(add(mc, 31), not(31)))\\n }\\n //if we want a zero-length slice let's just return a zero-length array\\n default {\\n tempBytes := mload(0x40)\\n\\n //zero out the 32 bytes slice we are about to return\\n //we need to do it because Solidity does not garbage collect\\n mstore(tempBytes, 0)\\n\\n mstore(0x40, add(tempBytes, 0x20))\\n }\\n }\\n\\n return tempBytes;\\n }\\n\\n function slice(\\n bytes memory _bytes,\\n uint256 _start\\n )\\n internal\\n pure\\n returns (bytes memory)\\n {\\n if (_bytes.length - _start == 0) {\\n return bytes('');\\n }\\n\\n return slice(_bytes, _start, _bytes.length - _start);\\n }\\n\\n function toBytes32PadLeft(\\n bytes memory _bytes\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n bytes32 ret;\\n uint256 len = _bytes.length <= 32 ? _bytes.length : 32;\\n assembly {\\n ret := shr(mul(sub(32, len), 8), mload(add(_bytes, 32)))\\n }\\n return ret;\\n }\\n\\n function toBytes32(\\n bytes memory _bytes\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n if (_bytes.length < 32) {\\n bytes32 ret;\\n assembly {\\n ret := mload(add(_bytes, 32))\\n }\\n return ret;\\n }\\n\\n return abi.decode(_bytes,(bytes32)); // will truncate if input length > 32 bytes\\n }\\n\\n function toUint256(\\n bytes memory _bytes\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n return uint256(toBytes32(_bytes));\\n }\\n\\n function toUint24(bytes memory _bytes, uint256 _start) internal pure returns (uint24) {\\n require(_start + 3 >= _start, \\\"toUint24_overflow\\\");\\n require(_bytes.length >= _start + 3 , \\\"toUint24_outOfBounds\\\");\\n uint24 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x3), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint8(bytes memory _bytes, uint256 _start) internal pure returns (uint8) {\\n require(_start + 1 >= _start, \\\"toUint8_overflow\\\");\\n require(_bytes.length >= _start + 1 , \\\"toUint8_outOfBounds\\\");\\n uint8 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x1), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toAddress(bytes memory _bytes, uint256 _start) internal pure returns (address) {\\n require(_start + 20 >= _start, \\\"toAddress_overflow\\\");\\n require(_bytes.length >= _start + 20, \\\"toAddress_outOfBounds\\\");\\n address tempAddress;\\n\\n assembly {\\n tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)\\n }\\n\\n return tempAddress;\\n }\\n\\n function toNibbles(\\n bytes memory _bytes\\n )\\n internal\\n pure\\n returns (bytes memory)\\n {\\n bytes memory nibbles = new bytes(_bytes.length * 2);\\n\\n for (uint256 i = 0; i < _bytes.length; i++) {\\n nibbles[i * 2] = _bytes[i] >> 4;\\n nibbles[i * 2 + 1] = bytes1(uint8(_bytes[i]) % 16);\\n }\\n\\n return nibbles;\\n }\\n\\n function fromNibbles(\\n bytes memory _bytes\\n )\\n internal\\n pure\\n returns (bytes memory)\\n {\\n bytes memory ret = new bytes(_bytes.length / 2);\\n\\n for (uint256 i = 0; i < ret.length; i++) {\\n ret[i] = (_bytes[i * 2] << 4) | (_bytes[i * 2 + 1]);\\n }\\n\\n return ret;\\n }\\n\\n function equal(\\n bytes memory _bytes,\\n bytes memory _other\\n )\\n internal\\n pure\\n returns (bool)\\n {\\n return keccak256(_bytes) == keccak256(_other);\\n }\\n}\\n\",\"keccak256\":\"0x0adf22e1b22ba09911e859f64cb3b484e992be4f9fd3b09088e6225bf8d06ce0\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/utils/Lib_ErrorUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\npragma experimental ABIEncoderV2;\\n\\n/**\\n * @title Lib_ErrorUtils\\n */\\nlibrary Lib_ErrorUtils {\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * Encodes an error string into raw solidity-style revert data.\\n * (i.e. ascii bytes, prefixed with bytes4(keccak(\\\"Error(string))\\\"))\\n * Ref: https://docs.soliditylang.org/en/v0.8.2/control-structures.html?highlight=Error(string)#panic-via-assert-and-error-via-require\\n * @param _reason Reason for the reversion.\\n * @return Standard solidity revert data for the given reason.\\n */\\n function encodeRevertString(\\n string memory _reason\\n )\\n internal\\n pure\\n returns (\\n bytes memory\\n )\\n {\\n return abi.encodeWithSignature(\\n \\\"Error(string)\\\",\\n _reason\\n );\\n }\\n}\\n\",\"keccak256\":\"0xfc64ec4a81fb50865b502a0004ed154e8598e1a313db77303fc95e41f536e6b7\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/wrappers/Lib_SafeExecutionManagerWrapper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_ErrorUtils } from \\\"../utils/Lib_ErrorUtils.sol\\\";\\n\\n/**\\n * @title Lib_SafeExecutionManagerWrapper\\n * @dev The Safe Execution Manager Wrapper provides functions which facilitate writing OVM safe \\n * code using the standard solidity compiler, by routing all its operations through the Execution \\n * Manager.\\n * \\n * Compiler used: solc\\n * Runtime target: OVM\\n */\\nlibrary Lib_SafeExecutionManagerWrapper {\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * Performs a safe ovmCALL.\\n * @param _gasLimit Gas limit for the call.\\n * @param _target Address to call.\\n * @param _calldata Data to send to the call.\\n * @return _success Whether or not the call reverted.\\n * @return _returndata Data returned by the call.\\n */\\n function safeCALL(\\n uint256 _gasLimit,\\n address _target,\\n bytes memory _calldata\\n )\\n internal\\n returns (\\n bool _success,\\n bytes memory _returndata\\n )\\n {\\n bytes memory returndata = _safeExecutionManagerInteraction(\\n abi.encodeWithSignature(\\n \\\"ovmCALL(uint256,address,bytes)\\\",\\n _gasLimit,\\n _target,\\n _calldata\\n )\\n );\\n\\n return abi.decode(returndata, (bool, bytes));\\n }\\n\\n /**\\n * Performs a safe ovmDELEGATECALL.\\n * @param _gasLimit Gas limit for the call.\\n * @param _target Address to call.\\n * @param _calldata Data to send to the call.\\n * @return _success Whether or not the call reverted.\\n * @return _returndata Data returned by the call.\\n */\\n function safeDELEGATECALL(\\n uint256 _gasLimit,\\n address _target,\\n bytes memory _calldata\\n )\\n internal\\n returns (\\n bool _success,\\n bytes memory _returndata\\n )\\n {\\n bytes memory returndata = _safeExecutionManagerInteraction(\\n abi.encodeWithSignature(\\n \\\"ovmDELEGATECALL(uint256,address,bytes)\\\",\\n _gasLimit,\\n _target,\\n _calldata\\n )\\n );\\n\\n return abi.decode(returndata, (bool, bytes));\\n }\\n\\n /**\\n * Performs a safe ovmCREATE call.\\n * @param _gasLimit Gas limit for the creation.\\n * @param _bytecode Code for the new contract.\\n * @return _contract Address of the created contract.\\n */\\n function safeCREATE(\\n uint256 _gasLimit,\\n bytes memory _bytecode\\n )\\n internal\\n returns (\\n address,\\n bytes memory\\n )\\n {\\n bytes memory returndata = _safeExecutionManagerInteraction(\\n _gasLimit,\\n abi.encodeWithSignature(\\n \\\"ovmCREATE(bytes)\\\",\\n _bytecode\\n )\\n );\\n\\n return abi.decode(returndata, (address, bytes));\\n }\\n\\n /**\\n * Performs a safe ovmEXTCODESIZE call.\\n * @param _contract Address of the contract to query the size of.\\n * @return _EXTCODESIZE Size of the requested contract in bytes.\\n */\\n function safeEXTCODESIZE(\\n address _contract\\n )\\n internal\\n returns (\\n uint256 _EXTCODESIZE\\n )\\n {\\n bytes memory returndata = _safeExecutionManagerInteraction(\\n abi.encodeWithSignature(\\n \\\"ovmEXTCODESIZE(address)\\\",\\n _contract\\n )\\n );\\n\\n return abi.decode(returndata, (uint256));\\n }\\n\\n /**\\n * Performs a safe ovmCHAINID call.\\n * @return _CHAINID Result of calling ovmCHAINID.\\n */\\n function safeCHAINID()\\n internal\\n returns (\\n uint256 _CHAINID\\n )\\n {\\n bytes memory returndata = _safeExecutionManagerInteraction(\\n abi.encodeWithSignature(\\n \\\"ovmCHAINID()\\\"\\n )\\n );\\n\\n return abi.decode(returndata, (uint256));\\n }\\n\\n /**\\n * Performs a safe ovmCALLER call.\\n * @return _CALLER Result of calling ovmCALLER.\\n */\\n function safeCALLER()\\n internal\\n returns (\\n address _CALLER\\n )\\n {\\n bytes memory returndata = _safeExecutionManagerInteraction(\\n abi.encodeWithSignature(\\n \\\"ovmCALLER()\\\"\\n )\\n );\\n\\n return abi.decode(returndata, (address));\\n }\\n\\n /**\\n * Performs a safe ovmADDRESS call.\\n * @return _ADDRESS Result of calling ovmADDRESS.\\n */\\n function safeADDRESS()\\n internal\\n returns (\\n address _ADDRESS\\n )\\n {\\n bytes memory returndata = _safeExecutionManagerInteraction(\\n abi.encodeWithSignature(\\n \\\"ovmADDRESS()\\\"\\n )\\n );\\n\\n return abi.decode(returndata, (address));\\n }\\n\\n /**\\n * Performs a safe ovmGETNONCE call.\\n * @return _nonce Result of calling ovmGETNONCE.\\n */\\n function safeGETNONCE()\\n internal\\n returns (\\n uint256 _nonce\\n )\\n {\\n bytes memory returndata = _safeExecutionManagerInteraction(\\n abi.encodeWithSignature(\\n \\\"ovmGETNONCE()\\\"\\n )\\n );\\n\\n return abi.decode(returndata, (uint256));\\n }\\n\\n /**\\n * Performs a safe ovmINCREMENTNONCE call.\\n */\\n function safeINCREMENTNONCE()\\n internal\\n {\\n _safeExecutionManagerInteraction(\\n abi.encodeWithSignature(\\n \\\"ovmINCREMENTNONCE()\\\"\\n )\\n );\\n }\\n\\n /**\\n * Performs a safe ovmCREATEEOA call.\\n * @param _messageHash Message hash which was signed by EOA\\n * @param _v v value of signature (0 or 1)\\n * @param _r r value of signature\\n * @param _s s value of signature\\n */\\n function safeCREATEEOA(\\n bytes32 _messageHash,\\n uint8 _v,\\n bytes32 _r,\\n bytes32 _s\\n )\\n internal\\n {\\n _safeExecutionManagerInteraction(\\n abi.encodeWithSignature(\\n \\\"ovmCREATEEOA(bytes32,uint8,bytes32,bytes32)\\\",\\n _messageHash,\\n _v,\\n _r,\\n _s\\n )\\n );\\n }\\n\\n /**\\n * Performs a safe REVERT.\\n * @param _reason String revert reason to pass along with the REVERT.\\n */\\n function safeREVERT(\\n string memory _reason\\n )\\n internal\\n {\\n _safeExecutionManagerInteraction(\\n abi.encodeWithSignature(\\n \\\"ovmREVERT(bytes)\\\",\\n Lib_ErrorUtils.encodeRevertString(\\n _reason\\n )\\n )\\n );\\n }\\n\\n /**\\n * Performs a safe \\\"require\\\".\\n * @param _condition Boolean condition that must be true or will revert.\\n * @param _reason String revert reason to pass along with the REVERT.\\n */\\n function safeREQUIRE(\\n bool _condition,\\n string memory _reason\\n )\\n internal\\n {\\n if (!_condition) {\\n safeREVERT(\\n _reason\\n );\\n }\\n }\\n\\n /**\\n * Performs a safe ovmSLOAD call.\\n */\\n function safeSLOAD(\\n bytes32 _key\\n )\\n internal\\n returns (\\n bytes32\\n )\\n {\\n bytes memory returndata = _safeExecutionManagerInteraction(\\n abi.encodeWithSignature(\\n \\\"ovmSLOAD(bytes32)\\\",\\n _key\\n )\\n );\\n\\n return abi.decode(returndata, (bytes32));\\n }\\n\\n /**\\n * Performs a safe ovmSSTORE call.\\n */\\n function safeSSTORE(\\n bytes32 _key,\\n bytes32 _value\\n )\\n internal\\n {\\n _safeExecutionManagerInteraction(\\n abi.encodeWithSignature(\\n \\\"ovmSSTORE(bytes32,bytes32)\\\",\\n _key,\\n _value\\n )\\n );\\n }\\n\\n /*********************\\n * Private Functions *\\n *********************/\\n\\n /**\\n * Performs an ovm interaction and the necessary safety checks.\\n * @param _gasLimit Gas limit for the interaction.\\n * @param _calldata Data to send to the OVM_ExecutionManager (encoded with sighash).\\n * @return _returndata Data sent back by the OVM_ExecutionManager.\\n */\\n function _safeExecutionManagerInteraction(\\n uint256 _gasLimit,\\n bytes memory _calldata\\n )\\n private\\n returns (\\n bytes memory _returndata\\n )\\n {\\n address ovmExecutionManager = msg.sender;\\n (\\n bool success,\\n bytes memory returndata\\n ) = ovmExecutionManager.call{gas: _gasLimit}(_calldata);\\n\\n if (success == false) {\\n assembly {\\n revert(add(returndata, 0x20), mload(returndata))\\n }\\n } else if (returndata.length == 1) {\\n assembly {\\n return(0, 1)\\n }\\n } else {\\n return returndata;\\n }\\n }\\n\\n function _safeExecutionManagerInteraction(\\n bytes memory _calldata\\n )\\n private\\n returns (\\n bytes memory _returndata\\n )\\n {\\n return _safeExecutionManagerInteraction(\\n gasleft(),\\n _calldata\\n );\\n }\\n}\\n\",\"keccak256\":\"0x41e146e7912af794a17cd43c5a276674be956bfa8f3ca5b451bcb82d81e6f492\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b506040516109f93803806109f983398101604081905261002f91610054565b600080546001600160a01b0319166001600160a01b0392909216919091179055610082565b600060208284031215610065578081fd5b81516001600160a01b038116811461007b578182fd5b9392505050565b610968806100916000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806316e9cd9b14610046578063299ca4781461005b578063461a447814610079575b600080fd5b61005961005436600461057d565b61008c565b005b6100636101ea565b60405161007091906106db565b60405180910390f35b6100636100873660046105ec565b6101f9565b6100ca6040518060400160405280601981526020017f4f564d5f4c3242617463684d65737361676552656c61796572000000000000008152506101f9565b6001600160a01b0316336001600160a01b0316146101035760405162461bcd60e51b81526004016100fa906107d7565b60405180910390fd5b600061012660405180606001604052806021815260200161093b602191396101f9565b905060005b828110156101e457600084848381811061014157fe5b9050602002810190610153919061085a565b61015c9061089d565b8051602082015160408084015160608501516080860151925163d7fd19dd60e01b81529596506001600160a01b0389169563d7fd19dd956101a5959094909392916004016106ef565b600060405180830381600087803b1580156101bf57600080fd5b505af11580156101d3573d6000803e3d6000fd5b50506001909301925061012b915050565b50505050565b6000546001600160a01b031681565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b83811015610259578181015183820152602001610241565b50505050905090810190601f1680156102865780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b1580156102a357600080fd5b505afa1580156102b7573d6000803e3d6000fd5b505050506040513d60208110156102cd57600080fd5b505190505b919050565b600067ffffffffffffffff8311156102eb57fe5b6102fe601f8401601f1916602001610879565b905082815283838301111561031257600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b03811681146102d257600080fd5b600082601f830112610350578081fd5b61035f838335602085016102d7565b9392505050565b600060a08284031215610377578081fd5b60405160a0810167ffffffffffffffff828210818311171561039557fe5b816040528293508435835260208501356020840152604085013560408401526060850135606084015260808501359150808211156103d257600080fd5b506103df85828601610340565b6080830152505092915050565b6000604082840312156103fd578081fd5b6040516040810167ffffffffffffffff828210818311171561041b57fe5b816040528293508435835260209150818501358181111561043b57600080fd5b8501601f8101871361044c57600080fd5b80358281111561045857fe5b8381029250610468848401610879565b8181528481019083860185850187018b101561048357600080fd5b600095505b838610156104a6578035835260019590950194918601918601610488565b5080868801525050505050505092915050565b600060a082840312156104ca578081fd5b6104d460a0610879565b905081358152602082013567ffffffffffffffff808211156104f557600080fd5b61050185838601610366565b6020840152604084013591508082111561051a57600080fd5b610526858386016103ec565b6040840152606084013591508082111561053f57600080fd5b61054b85838601610340565b6060840152608084013591508082111561056457600080fd5b5061057184828501610340565b60808301525092915050565b6000806020838503121561058f578182fd5b823567ffffffffffffffff808211156105a6578384fd5b818501915085601f8301126105b9578384fd5b8135818111156105c7578485fd5b86602080830285010111156105da578485fd5b60209290920196919550909350505050565b6000602082840312156105fd578081fd5b813567ffffffffffffffff811115610613578182fd5b8201601f81018413610623578182fd5b610632848235602084016102d7565b949350505050565b60008151808452815b8181101561065f57602081850181015186830182015201610643565b818111156106705782602083870101525b50601f01601f19169290920160200192915050565b6000604083018251845260208084015160408287015282815180855260608801915083830194508592505b808310156106d057845182529383019360019290920191908301906106b0565b509695505050505050565b6001600160a01b0391909116815260200190565b6001600160a01b0386811682528516602082015260a06040820181905260009061071b9083018661063a565b846060840152828103608084015283518152602084015160a06020830152805160a0830152602081015160c0830152604081015160e083015260608101516101008301526080810151905060a061012083015261077c61014083018261063a565b9050604085015182820360408401526107958282610685565b915050606085015182820360608401526107af828261063a565b915050608085015182820360808401526107c9828261063a565b9a9950505050505050505050565b60208082526057908201527f4f564d5f4c314d756c74694d65737361676552656c617965723a2046756e637460408201527f696f6e2063616e206f6e6c792062652063616c6c656420627920746865204f5660608201527f4d5f4c3242617463684d65737361676552656c61796572000000000000000000608082015260a00190565b60008235609e1983360301811261086f578182fd5b9190910192915050565b60405181810167ffffffffffffffff8111828210171561089557fe5b604052919050565b600060a082360312156108ae578081fd5b60405160a0810167ffffffffffffffff82821081831117156108cc57fe5b816040526108d985610329565b83526108e760208601610329565b602084015260408501359150808211156108ff578384fd5b61090b36838701610340565b604084015260608501356060840152608085013591508082111561092d578384fd5b50610571368286016104b956fe50726f78795f5f4f564d5f4c3143726f7373446f6d61696e4d657373656e676572a164736f6c6343000706000a",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c806316e9cd9b14610046578063299ca4781461005b578063461a447814610079575b600080fd5b61005961005436600461057d565b61008c565b005b6100636101ea565b60405161007091906106db565b60405180910390f35b6100636100873660046105ec565b6101f9565b6100ca6040518060400160405280601981526020017f4f564d5f4c3242617463684d65737361676552656c61796572000000000000008152506101f9565b6001600160a01b0316336001600160a01b0316146101035760405162461bcd60e51b81526004016100fa906107d7565b60405180910390fd5b600061012660405180606001604052806021815260200161093b602191396101f9565b905060005b828110156101e457600084848381811061014157fe5b9050602002810190610153919061085a565b61015c9061089d565b8051602082015160408084015160608501516080860151925163d7fd19dd60e01b81529596506001600160a01b0389169563d7fd19dd956101a5959094909392916004016106ef565b600060405180830381600087803b1580156101bf57600080fd5b505af11580156101d3573d6000803e3d6000fd5b50506001909301925061012b915050565b50505050565b6000546001600160a01b031681565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b83811015610259578181015183820152602001610241565b50505050905090810190601f1680156102865780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b1580156102a357600080fd5b505afa1580156102b7573d6000803e3d6000fd5b505050506040513d60208110156102cd57600080fd5b505190505b919050565b600067ffffffffffffffff8311156102eb57fe5b6102fe601f8401601f1916602001610879565b905082815283838301111561031257600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b03811681146102d257600080fd5b600082601f830112610350578081fd5b61035f838335602085016102d7565b9392505050565b600060a08284031215610377578081fd5b60405160a0810167ffffffffffffffff828210818311171561039557fe5b816040528293508435835260208501356020840152604085013560408401526060850135606084015260808501359150808211156103d257600080fd5b506103df85828601610340565b6080830152505092915050565b6000604082840312156103fd578081fd5b6040516040810167ffffffffffffffff828210818311171561041b57fe5b816040528293508435835260209150818501358181111561043b57600080fd5b8501601f8101871361044c57600080fd5b80358281111561045857fe5b8381029250610468848401610879565b8181528481019083860185850187018b101561048357600080fd5b600095505b838610156104a6578035835260019590950194918601918601610488565b5080868801525050505050505092915050565b600060a082840312156104ca578081fd5b6104d460a0610879565b905081358152602082013567ffffffffffffffff808211156104f557600080fd5b61050185838601610366565b6020840152604084013591508082111561051a57600080fd5b610526858386016103ec565b6040840152606084013591508082111561053f57600080fd5b61054b85838601610340565b6060840152608084013591508082111561056457600080fd5b5061057184828501610340565b60808301525092915050565b6000806020838503121561058f578182fd5b823567ffffffffffffffff808211156105a6578384fd5b818501915085601f8301126105b9578384fd5b8135818111156105c7578485fd5b86602080830285010111156105da578485fd5b60209290920196919550909350505050565b6000602082840312156105fd578081fd5b813567ffffffffffffffff811115610613578182fd5b8201601f81018413610623578182fd5b610632848235602084016102d7565b949350505050565b60008151808452815b8181101561065f57602081850181015186830182015201610643565b818111156106705782602083870101525b50601f01601f19169290920160200192915050565b6000604083018251845260208084015160408287015282815180855260608801915083830194508592505b808310156106d057845182529383019360019290920191908301906106b0565b509695505050505050565b6001600160a01b0391909116815260200190565b6001600160a01b0386811682528516602082015260a06040820181905260009061071b9083018661063a565b846060840152828103608084015283518152602084015160a06020830152805160a0830152602081015160c0830152604081015160e083015260608101516101008301526080810151905060a061012083015261077c61014083018261063a565b9050604085015182820360408401526107958282610685565b915050606085015182820360608401526107af828261063a565b915050608085015182820360808401526107c9828261063a565b9a9950505050505050505050565b60208082526057908201527f4f564d5f4c314d756c74694d65737361676552656c617965723a2046756e637460408201527f696f6e2063616e206f6e6c792062652063616c6c656420627920746865204f5660608201527f4d5f4c3242617463684d65737361676552656c61796572000000000000000000608082015260a00190565b60008235609e1983360301811261086f578182fd5b9190910192915050565b60405181810167ffffffffffffffff8111828210171561089557fe5b604052919050565b600060a082360312156108ae578081fd5b60405160a0810167ffffffffffffffff82821081831117156108cc57fe5b816040526108d985610329565b83526108e760208601610329565b602084015260408501359150808211156108ff578384fd5b61090b36838701610340565b604084015260608501356060840152608085013591508082111561092d578384fd5b50610571368286016104b956fe50726f78795f5f4f564d5f4c3143726f7373446f6d61696e4d657373656e676572a164736f6c6343000706000a",
"devdoc": {
"details": "The L1 Multi-Message Relayer contract is a gas efficiency optimization which enables the relayer to submit multiple messages in a single transaction to be relayed by the L1 Cross Domain Message Sender. Compiler used: solc Runtime target: EVM",
"kind": "dev",
"methods": {
"batchRelayMessages((address,address,bytes,uint256,(bytes32,(uint256,bytes32,uint256,uint256,bytes),(uint256,bytes32[]),bytes,bytes))[])": {
"params": {
"_messages": "An array of L2 to L1 messages"
}
}
},
"title": "OVM_L1MultiMessageRelayer",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {
"batchRelayMessages((address,address,bytes,uint256,(bytes32,(uint256,bytes32,uint256,uint256,bytes),(uint256,bytes32[]),bytes,bytes))[])": {
"notice": "Forwards multiple cross domain messages to the L1 Cross Domain Messenger for relaying"
}
},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 12526,
"contract": "contracts/optimistic-ethereum/OVM/bridge/messaging/OVM_L1MultiMessageRelayer.sol:OVM_L1MultiMessageRelayer",
"label": "libAddressManager",
"offset": 0,
"slot": "0",
"type": "t_contract(Lib_AddressManager)12519"
}
],
"types": {
"t_contract(Lib_AddressManager)12519": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
}
}
}
}
\ No newline at end of file
{
"address": "0xeb91D9059761aFa197deD7b1FB4228F7ea921d3e",
"abi": [
{
"inputs": [
{
"internalType": "bytes",
"name": "_bytecode",
"type": "bytes"
}
],
"name": "isBytecodeSafe",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "pure",
"type": "function"
}
],
"transactionHash": "0x5fd7e2024d76674df64d9004bfc79403b8708ecdd98726e97a1a53f946001850",
"receipt": {
"to": null,
"from": "0x18394B52d3Cb931dfA76F63251919D051953413d",
"contractAddress": "0xeb91D9059761aFa197deD7b1FB4228F7ea921d3e",
"transactionIndex": 1,
"gasUsed": "234686",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x156001de46bcd44ae0563a00d750d6ba81fc6c7e7da4c1af4926c8ea92218319",
"transactionHash": "0x5fd7e2024d76674df64d9004bfc79403b8708ecdd98726e97a1a53f946001850",
"logs": [],
"blockNumber": 24199521,
"cumulativeGasUsed": "301566",
"status": 1,
"byzantium": true
},
"args": [],
"solcInputHash": "03aed03b958b1d37f90bd88d0f56dd85",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_bytecode\",\"type\":\"bytes\"}],\"name\":\"isBytecodeSafe\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"The Safety Checker verifies that contracts deployed on L2 do not contain any \\\"unsafe\\\" operations. An operation is considered unsafe if it would access state variables which are specific to the environment (ie. L1 or L2) in which it is executed, as this could be used to \\\"escape the sandbox\\\" of the OVM, resulting in non-deterministic fraud proofs. That is, an attacker would be able to \\\"prove fraud\\\" on an honestly applied transaction. Note that a \\\"safe\\\" contract requires opcodes to appear in a particular pattern; omission of \\\"unsafe\\\" opcodes is necessary, but not sufficient. Compiler used: solc Runtime target: EVM\",\"kind\":\"dev\",\"methods\":{\"isBytecodeSafe(bytes)\":{\"params\":{\"_bytecode\":\"The bytecode to safety check.\"},\"returns\":{\"_0\":\"`true` if the bytecode is safe, `false` otherwise.\"}}},\"title\":\"OVM_SafetyChecker\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"isBytecodeSafe(bytes)\":{\"notice\":\"Returns whether or not all of the provided bytecode is safe.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/OVM/execution/OVM_SafetyChecker.sol\":\"OVM_SafetyChecker\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/OVM/execution/OVM_SafetyChecker.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Interface Imports */\\nimport { iOVM_SafetyChecker } from \\\"../../iOVM/execution/iOVM_SafetyChecker.sol\\\";\\n\\n/**\\n * @title OVM_SafetyChecker\\n * @dev The Safety Checker verifies that contracts deployed on L2 do not contain any\\n * \\\"unsafe\\\" operations. An operation is considered unsafe if it would access state variables which\\n * are specific to the environment (ie. L1 or L2) in which it is executed, as this could be used\\n * to \\\"escape the sandbox\\\" of the OVM, resulting in non-deterministic fraud proofs. \\n * That is, an attacker would be able to \\\"prove fraud\\\" on an honestly applied transaction.\\n * Note that a \\\"safe\\\" contract requires opcodes to appear in a particular pattern;\\n * omission of \\\"unsafe\\\" opcodes is necessary, but not sufficient.\\n *\\n * Compiler used: solc\\n * Runtime target: EVM\\n */\\ncontract OVM_SafetyChecker is iOVM_SafetyChecker {\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Returns whether or not all of the provided bytecode is safe.\\n * @param _bytecode The bytecode to safety check.\\n * @return `true` if the bytecode is safe, `false` otherwise.\\n */\\n function isBytecodeSafe(\\n bytes memory _bytecode\\n )\\n override\\n external\\n pure\\n returns (\\n bool\\n )\\n {\\n // autogenerated by gen_safety_checker_constants.py\\n // number of bytes to skip for each opcode\\n uint256[8] memory opcodeSkippableBytes = [\\n uint256(0x0001010101010101010101010000000001010101010101010101010101010000),\\n uint256(0x0100000000000000000000000000000000000000010101010101000000010100),\\n uint256(0x0000000000000000000000000000000001010101000000010101010100000000),\\n uint256(0x0203040500000000000000000000000000000000000000000000000000000000),\\n uint256(0x0101010101010101010101010101010101010101010101010101010101010101),\\n uint256(0x0101010101000000000000000000000000000000000000000000000000000000),\\n uint256(0x0000000000000000000000000000000000000000000000000000000000000000),\\n uint256(0x0000000000000000000000000000000000000000000000000000000000000000)\\n ];\\n // Mask to gate opcode specific cases\\n uint256 opcodeGateMask = ~uint256(0xffffffffffffffffffffffe000000000fffffffff070ffff9c0ffffec000f001);\\n // Halting opcodes\\n uint256 opcodeHaltingMask = ~uint256(0x4008000000000000000000000000000000000000004000000000000000000001);\\n // PUSH opcodes\\n uint256 opcodePushMask = ~uint256(0xffffffff000000000000000000000000);\\n\\n uint256 codeLength;\\n uint256 _pc;\\n assembly {\\n _pc := add(_bytecode, 0x20)\\n }\\n codeLength = _pc + _bytecode.length;\\n do {\\n // current opcode: 0x00...0xff\\n uint256 opNum;\\n\\n // inline assembly removes the extra add + bounds check\\n assembly {\\n let word := mload(_pc) //load the next 32 bytes at pc into word\\n\\n // Look up number of bytes to skip from opcodeSkippableBytes and then update indexInWord\\n // E.g. the 02030405 in opcodeSkippableBytes is the number of bytes to skip for PUSH1->4\\n // We repeat this 6 times, thus we can only skip bytes for up to PUSH4 ((1+4) * 6 = 30 < 32).\\n // If we see an opcode that is listed as 0 skippable bytes e.g. PUSH5,\\n // then we will get stuck on that indexInWord and then opNum will be set to the PUSH5 opcode.\\n let indexInWord := byte(0, mload(add(opcodeSkippableBytes, byte(0, word))))\\n indexInWord := add(indexInWord, byte(0, mload(add(opcodeSkippableBytes, byte(indexInWord, word)))))\\n indexInWord := add(indexInWord, byte(0, mload(add(opcodeSkippableBytes, byte(indexInWord, word)))))\\n indexInWord := add(indexInWord, byte(0, mload(add(opcodeSkippableBytes, byte(indexInWord, word)))))\\n indexInWord := add(indexInWord, byte(0, mload(add(opcodeSkippableBytes, byte(indexInWord, word)))))\\n indexInWord := add(indexInWord, byte(0, mload(add(opcodeSkippableBytes, byte(indexInWord, word)))))\\n _pc := add(_pc, indexInWord)\\n\\n opNum := byte(indexInWord, word)\\n }\\n\\n // + push opcodes\\n // + stop opcodes [STOP(0x00),JUMP(0x56),RETURN(0xf3),INVALID(0xfe)]\\n // + caller opcode CALLER(0x33)\\n // + blacklisted opcodes\\n uint256 opBit = 1 << opNum;\\n if (opBit & opcodeGateMask == 0) {\\n if (opBit & opcodePushMask == 0) {\\n // all pushes are valid opcodes\\n // subsequent bytes are not opcodes. Skip them.\\n _pc += (opNum - 0x5e); // PUSH1 is 0x60, so opNum-0x5f = PUSHed bytes and we +1 to\\n // skip the _pc++; line below in order to save gas ((-0x5f + 1) = -0x5e)\\n continue;\\n } else if (opBit & opcodeHaltingMask == 0) {\\n // STOP or JUMP or RETURN or INVALID (Note: REVERT is blacklisted, so not included here)\\n // We are now inside unreachable code until we hit a JUMPDEST!\\n do {\\n _pc++;\\n assembly {\\n opNum := byte(0, mload(_pc))\\n }\\n // encountered a JUMPDEST\\n if (opNum == 0x5b) break;\\n // skip PUSHed bytes\\n if ((1 << opNum) & opcodePushMask == 0) _pc += (opNum - 0x5f); // opNum-0x5f = PUSHed bytes (PUSH1 is 0x60)\\n } while (_pc < codeLength);\\n // opNum is 0x5b, so we don't continue here since the pc++ is fine\\n } else if (opNum == 0x33) { // Caller opcode\\n uint256 firstOps; // next 32 bytes of bytecode\\n uint256 secondOps; // following 32 bytes of bytecode\\n\\n assembly {\\n firstOps := mload(_pc)\\n // 37 bytes total, 5 left over --> 32 - 5 bytes = 27 bytes = 216 bits\\n secondOps := shr(216, mload(add(_pc, 0x20)))\\n }\\n\\n // Call identity precompile\\n // CALLER POP PUSH1 0x00 PUSH1 0x04 GAS CALL\\n // 32 - 8 bytes = 24 bytes = 192\\n if ((firstOps >> 192) == 0x3350600060045af1) {\\n _pc += 8;\\n // Call EM and abort execution if instructed\\n // CALLER PUSH1 0x00 SWAP1 GAS CALL PC PUSH1 0x0E ADD JUMPI RETURNDATASIZE PUSH1 0x00 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x00 REVERT JUMPDEST RETURNDATASIZE PUSH1 0x01 EQ ISZERO PC PUSH1 0x0a ADD JUMPI PUSH1 0x01 PUSH1 0x00 RETURN JUMPDEST \\n } else if (firstOps == 0x336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760 && secondOps == 0x016000f35b) {\\n _pc += 37;\\n } else {\\n return false;\\n }\\n continue;\\n } else {\\n // encountered a non-whitelisted opcode!\\n return false;\\n }\\n }\\n _pc++;\\n } while (_pc < codeLength);\\n return true;\\n }\\n}\\n\",\"keccak256\":\"0xb1578ea95da5f6e7d5f5428ccc5efe629b3b9ef88fed7625fa7b78cdb9539508\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/iOVM/execution/iOVM_SafetyChecker.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title iOVM_SafetyChecker\\n */\\ninterface iOVM_SafetyChecker {\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function isBytecodeSafe(bytes calldata _bytecode) external pure returns (bool);\\n}\\n\",\"keccak256\":\"0xde6639676d4ec4f77297652d5ede2429bc93e74e11fefd9e9de4bc92dd784878\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b5061034a806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063a44eb59a14610030575b600080fd5b6100d66004803603602081101561004657600080fd5b81019060208101813564010000000081111561006157600080fd5b82018360208201111561007357600080fd5b8035906020019184600183028401116401000000008311171561009557600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506100ea945050505050565b604080519115158252519081900360200190f35b60408051610100810182527e0101010101010101010101000000000101010101010101010101010101000081526b010101010101000000010100600160f81b016020808301919091526f0101010100000001010101010000000092820192909252630203040560e01b60608201527f0101010101010101010101010101010101010101010101010101010101010101608082015264010101010160d81b60a0820152600060c0820181905260e0820181905283519092741fffffffff000000000f8f000063f000013fff0ffe916a40000000000000000000026117ff60f31b039163ffffffff60601b1991870181019087015b8051600081811a880151811a82811a890151821a0182811a890151821a0182811a890151821a0182811a890151821a0182811a89015190911a01918201911a6001811b86811661032057808516610239575001605d1901610326565b80861661027e575b8280600101935050825160001a915081605b141561025e57610279565b6001821b851661027157918101605e1901915b838310610241575b610320565b816033141561030f578251602084015160d81c673350600060045af160c083901c14156102b057600885019450610306565b817f336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a0157601480156102e357508064016000f35b145b156102f357602585019450610306565b60009a5050505050505050505050610338565b50505050610326565b600098505050505050505050610338565b50506001015b8181106101dd57600196505050505050505b91905056fea164736f6c6343000706000a",
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063a44eb59a14610030575b600080fd5b6100d66004803603602081101561004657600080fd5b81019060208101813564010000000081111561006157600080fd5b82018360208201111561007357600080fd5b8035906020019184600183028401116401000000008311171561009557600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506100ea945050505050565b604080519115158252519081900360200190f35b60408051610100810182527e0101010101010101010101000000000101010101010101010101010101000081526b010101010101000000010100600160f81b016020808301919091526f0101010100000001010101010000000092820192909252630203040560e01b60608201527f0101010101010101010101010101010101010101010101010101010101010101608082015264010101010160d81b60a0820152600060c0820181905260e0820181905283519092741fffffffff000000000f8f000063f000013fff0ffe916a40000000000000000000026117ff60f31b039163ffffffff60601b1991870181019087015b8051600081811a880151811a82811a890151821a0182811a890151821a0182811a890151821a0182811a890151821a0182811a89015190911a01918201911a6001811b86811661032057808516610239575001605d1901610326565b80861661027e575b8280600101935050825160001a915081605b141561025e57610279565b6001821b851661027157918101605e1901915b838310610241575b610320565b816033141561030f578251602084015160d81c673350600060045af160c083901c14156102b057600885019450610306565b817f336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a0157601480156102e357508064016000f35b145b156102f357602585019450610306565b60009a5050505050505050505050610338565b50505050610326565b600098505050505050505050610338565b50506001015b8181106101dd57600196505050505050505b91905056fea164736f6c6343000706000a",
"devdoc": {
"details": "The Safety Checker verifies that contracts deployed on L2 do not contain any \"unsafe\" operations. An operation is considered unsafe if it would access state variables which are specific to the environment (ie. L1 or L2) in which it is executed, as this could be used to \"escape the sandbox\" of the OVM, resulting in non-deterministic fraud proofs. That is, an attacker would be able to \"prove fraud\" on an honestly applied transaction. Note that a \"safe\" contract requires opcodes to appear in a particular pattern; omission of \"unsafe\" opcodes is necessary, but not sufficient. Compiler used: solc Runtime target: EVM",
"kind": "dev",
"methods": {
"isBytecodeSafe(bytes)": {
"params": {
"_bytecode": "The bytecode to safety check."
},
"returns": {
"_0": "`true` if the bytecode is safe, `false` otherwise."
}
}
},
"title": "OVM_SafetyChecker",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {
"isBytecodeSafe(bytes)": {
"notice": "Returns whether or not all of the provided bytecode is safe."
}
},
"version": 1
},
"storageLayout": {
"storage": [],
"types": null
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"address": "0x48062eD9b6488EC41c4CfbF2f568D7773819d8C9",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_libAddressManager",
"type": "address"
},
{
"internalType": "string",
"name": "_implementationName",
"type": "string"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"stateMutability": "payable",
"type": "fallback"
}
],
"transactionHash": "0x84a219d4344a0ac4965fc5c4d1552f733611d4e54870586319f4406ca1e46564",
"receipt": {
"to": null,
"from": "0x18394B52d3Cb931dfA76F63251919D051953413d",
"contractAddress": "0x48062eD9b6488EC41c4CfbF2f568D7773819d8C9",
"transactionIndex": 1,
"gasUsed": "213556",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x79b0c0265808192ed8489d258fea40635f62e5f8136578694294d6a4b0ee7f44",
"transactionHash": "0x84a219d4344a0ac4965fc5c4d1552f733611d4e54870586319f4406ca1e46564",
"logs": [],
"blockNumber": 24199499,
"cumulativeGasUsed": "280400",
"status": 1,
"byzantium": true
},
"args": [
"0xFaf27b24ba54C6910C12CFF5C9453C0e8D634e05",
"OVM_L1CrossDomainMessenger"
],
"solcInputHash": "03aed03b958b1d37f90bd88d0f56dd85",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_implementationName\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_implementationName\":\"implementationName of the contract to proxy to.\",\"_libAddressManager\":\"Address of the Lib_AddressManager.\"}}},\"title\":\"Lib_ResolvedDelegateProxy\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol\":\"Lib_ResolvedDelegateProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0x3a490595cc21ff170e4027843093670ff845d5972481fbfb956b722ea564bb06\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xd9dfd9264e5b5fedd53a5b10fdf179c3f367614b0fe69179bce4e45119f5b739\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_ResolvedDelegateProxy\\n */\\ncontract Lib_ResolvedDelegateProxy {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n\\n // Using mappings to store fields to avoid overwriting storage slots in the\\n // implementation contract. For example, instead of storing these fields at\\n // storage slot `0` & `1`, they are stored at `keccak256(key + slot)`.\\n // See: https://solidity.readthedocs.io/en/v0.7.0/internals/layout_in_storage.html\\n // NOTE: Do not use this code in your own contract system. \\n // There is a known flaw in this contract, and we will remove it from the repository\\n // in the near future. Due to the very limited way that we are using it, this flaw is\\n // not an issue in our system. \\n mapping(address=>string) private implementationName;\\n mapping(address=>Lib_AddressManager) private addressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n * @param _implementationName implementationName of the contract to proxy to.\\n */\\n constructor(\\n address _libAddressManager,\\n string memory _implementationName\\n )\\n {\\n addressManager[address(this)] = Lib_AddressManager(_libAddressManager);\\n implementationName[address(this)] = _implementationName;\\n }\\n\\n\\n /*********************\\n * Fallback Function *\\n *********************/\\n\\n fallback()\\n external\\n payable\\n {\\n address target = addressManager[address(this)].getAddress((implementationName[address(this)]));\\n require(\\n target != address(0),\\n \\\"Target address must be initialized.\\\"\\n );\\n\\n (bool success, bytes memory returndata) = target.delegatecall(msg.data);\\n\\n if (success == true) {\\n assembly {\\n return(add(returndata, 0x20), mload(returndata))\\n }\\n } else {\\n assembly {\\n revert(add(returndata, 0x20), mload(returndata))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa08435359a6365e850d6abf5b0a552f1f19d694d10e59849614f49705184fa54\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b506040516103df3803806103df8339818101604052604081101561003357600080fd5b81516020830180516040519294929383019291908464010000000082111561005a57600080fd5b90830190602082018581111561006f57600080fd5b825164010000000081118282018810171561008957600080fd5b82525081516020918201929091019080838360005b838110156100b657818101518382015260200161009e565b50505050905090810190601f1680156100e35780820380516001836020036101000a031916815260200191505b5060409081523060009081526001602090815282822080546001600160a01b0319166001600160a01b038a16179055818152919020855161012c95509093509085019150610134565b5050506101d5565b828054600181600116156101000203166002900490600052602060002090601f01602090048101928261016a57600085556101b0565b82601f1061018357805160ff19168380011785556101b0565b828001600101855582156101b0579182015b828111156101b0578251825591602001919060010190610195565b506101bc9291506101c0565b5090565b5b808211156101bc57600081556001016101c1565b6101fb806101e46000396000f3fe60806040818152306000908152600160208181528383205483825293832063bf40fac160e01b909552608490815284546002610100938216159390930260001901169190910460a481905291936001600160a01b039093169263bf40fac192909190819060c490849080156100b55780601f1061008a576101008083540402835291602001916100b5565b820191906000526020600020905b81548152906001019060200180831161009857829003601f168201915b50509250505060206040518083038186803b1580156100d357600080fd5b505afa1580156100e7573d6000803e3d6000fd5b505050506040513d60208110156100fd57600080fd5b505190506001600160a01b0381166101465760405162461bcd60e51b81526004018080602001828103825260238152602001806101cc6023913960400191505060405180910390fd5b600080826001600160a01b03166000366040518083838082843760405192019450600093509091505080830381855af49150503d80600081146101a5576040519150601f19603f3d011682016040523d82523d6000602084013e6101aa565b606091505b509092509050600182151514156101c357805160208201f35b805160208201fdfe5461726765742061646472657373206d75737420626520696e697469616c697a65642ea164736f6c6343000706000a",
"deployedBytecode": "0x60806040818152306000908152600160208181528383205483825293832063bf40fac160e01b909552608490815284546002610100938216159390930260001901169190910460a481905291936001600160a01b039093169263bf40fac192909190819060c490849080156100b55780601f1061008a576101008083540402835291602001916100b5565b820191906000526020600020905b81548152906001019060200180831161009857829003601f168201915b50509250505060206040518083038186803b1580156100d357600080fd5b505afa1580156100e7573d6000803e3d6000fd5b505050506040513d60208110156100fd57600080fd5b505190506001600160a01b0381166101465760405162461bcd60e51b81526004018080602001828103825260238152602001806101cc6023913960400191505060405180910390fd5b600080826001600160a01b03166000366040518083838082843760405192019450600093509091505080830381855af49150503d80600081146101a5576040519150601f19603f3d011682016040523d82523d6000602084013e6101aa565b606091505b509092509050600182151514156101c357805160208201f35b805160208201fdfe5461726765742061646472657373206d75737420626520696e697469616c697a65642ea164736f6c6343000706000a",
"devdoc": {
"kind": "dev",
"methods": {
"constructor": {
"params": {
"_implementationName": "implementationName of the contract to proxy to.",
"_libAddressManager": "Address of the Lib_AddressManager."
}
}
},
"title": "Lib_ResolvedDelegateProxy",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 12651,
"contract": "contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol:Lib_ResolvedDelegateProxy",
"label": "implementationName",
"offset": 0,
"slot": "0",
"type": "t_mapping(t_address,t_string_storage)"
},
{
"astId": 12655,
"contract": "contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol:Lib_ResolvedDelegateProxy",
"label": "addressManager",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_address,t_contract(Lib_AddressManager)12519)"
}
],
"types": {
"t_address": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
},
"t_contract(Lib_AddressManager)12519": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
},
"t_mapping(t_address,t_contract(Lib_AddressManager)12519)": {
"encoding": "mapping",
"key": "t_address",
"label": "mapping(address => contract Lib_AddressManager)",
"numberOfBytes": "32",
"value": "t_contract(Lib_AddressManager)12519"
},
"t_mapping(t_address,t_string_storage)": {
"encoding": "mapping",
"key": "t_address",
"label": "mapping(address => string)",
"numberOfBytes": "32",
"value": "t_string_storage"
},
"t_string_storage": {
"encoding": "bytes",
"label": "string",
"numberOfBytes": "32"
}
}
}
}
\ No newline at end of file
{
"address": "0xf3902e50dA095bD2e954AB320E8eafDA6152dFDa",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_libAddressManager",
"type": "address"
},
{
"internalType": "string",
"name": "_implementationName",
"type": "string"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"stateMutability": "payable",
"type": "fallback"
}
],
"transactionHash": "0x6fe4b36e6065e2c9b0a0a903574e07561941816dd2e17d5c9f7b4bb706e2074a",
"receipt": {
"to": null,
"from": "0x18394B52d3Cb931dfA76F63251919D051953413d",
"contractAddress": "0xf3902e50dA095bD2e954AB320E8eafDA6152dFDa",
"transactionIndex": 8,
"gasUsed": "213436",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0xfd814e73b8091e7e4b609f9dc82a9ad3fd9e92a886fcb4caf11c9374f2e5bed8",
"transactionHash": "0x6fe4b36e6065e2c9b0a0a903574e07561941816dd2e17d5c9f7b4bb706e2074a",
"logs": [],
"blockNumber": 24199533,
"cumulativeGasUsed": "1483231",
"status": 1,
"byzantium": true
},
"args": [
"0xFaf27b24ba54C6910C12CFF5C9453C0e8D634e05",
"OVM_L1ETHGateway"
],
"solcInputHash": "03aed03b958b1d37f90bd88d0f56dd85",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_implementationName\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_implementationName\":\"implementationName of the contract to proxy to.\",\"_libAddressManager\":\"Address of the Lib_AddressManager.\"}}},\"title\":\"Lib_ResolvedDelegateProxy\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol\":\"Lib_ResolvedDelegateProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0x3a490595cc21ff170e4027843093670ff845d5972481fbfb956b722ea564bb06\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xd9dfd9264e5b5fedd53a5b10fdf179c3f367614b0fe69179bce4e45119f5b739\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_ResolvedDelegateProxy\\n */\\ncontract Lib_ResolvedDelegateProxy {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n\\n // Using mappings to store fields to avoid overwriting storage slots in the\\n // implementation contract. For example, instead of storing these fields at\\n // storage slot `0` & `1`, they are stored at `keccak256(key + slot)`.\\n // See: https://solidity.readthedocs.io/en/v0.7.0/internals/layout_in_storage.html\\n // NOTE: Do not use this code in your own contract system. \\n // There is a known flaw in this contract, and we will remove it from the repository\\n // in the near future. Due to the very limited way that we are using it, this flaw is\\n // not an issue in our system. \\n mapping(address=>string) private implementationName;\\n mapping(address=>Lib_AddressManager) private addressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n * @param _implementationName implementationName of the contract to proxy to.\\n */\\n constructor(\\n address _libAddressManager,\\n string memory _implementationName\\n )\\n {\\n addressManager[address(this)] = Lib_AddressManager(_libAddressManager);\\n implementationName[address(this)] = _implementationName;\\n }\\n\\n\\n /*********************\\n * Fallback Function *\\n *********************/\\n\\n fallback()\\n external\\n payable\\n {\\n address target = addressManager[address(this)].getAddress((implementationName[address(this)]));\\n require(\\n target != address(0),\\n \\\"Target address must be initialized.\\\"\\n );\\n\\n (bool success, bytes memory returndata) = target.delegatecall(msg.data);\\n\\n if (success == true) {\\n assembly {\\n return(add(returndata, 0x20), mload(returndata))\\n }\\n } else {\\n assembly {\\n revert(add(returndata, 0x20), mload(returndata))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa08435359a6365e850d6abf5b0a552f1f19d694d10e59849614f49705184fa54\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b506040516103df3803806103df8339818101604052604081101561003357600080fd5b81516020830180516040519294929383019291908464010000000082111561005a57600080fd5b90830190602082018581111561006f57600080fd5b825164010000000081118282018810171561008957600080fd5b82525081516020918201929091019080838360005b838110156100b657818101518382015260200161009e565b50505050905090810190601f1680156100e35780820380516001836020036101000a031916815260200191505b5060409081523060009081526001602090815282822080546001600160a01b0319166001600160a01b038a16179055818152919020855161012c95509093509085019150610134565b5050506101d5565b828054600181600116156101000203166002900490600052602060002090601f01602090048101928261016a57600085556101b0565b82601f1061018357805160ff19168380011785556101b0565b828001600101855582156101b0579182015b828111156101b0578251825591602001919060010190610195565b506101bc9291506101c0565b5090565b5b808211156101bc57600081556001016101c1565b6101fb806101e46000396000f3fe60806040818152306000908152600160208181528383205483825293832063bf40fac160e01b909552608490815284546002610100938216159390930260001901169190910460a481905291936001600160a01b039093169263bf40fac192909190819060c490849080156100b55780601f1061008a576101008083540402835291602001916100b5565b820191906000526020600020905b81548152906001019060200180831161009857829003601f168201915b50509250505060206040518083038186803b1580156100d357600080fd5b505afa1580156100e7573d6000803e3d6000fd5b505050506040513d60208110156100fd57600080fd5b505190506001600160a01b0381166101465760405162461bcd60e51b81526004018080602001828103825260238152602001806101cc6023913960400191505060405180910390fd5b600080826001600160a01b03166000366040518083838082843760405192019450600093509091505080830381855af49150503d80600081146101a5576040519150601f19603f3d011682016040523d82523d6000602084013e6101aa565b606091505b509092509050600182151514156101c357805160208201f35b805160208201fdfe5461726765742061646472657373206d75737420626520696e697469616c697a65642ea164736f6c6343000706000a",
"deployedBytecode": "0x60806040818152306000908152600160208181528383205483825293832063bf40fac160e01b909552608490815284546002610100938216159390930260001901169190910460a481905291936001600160a01b039093169263bf40fac192909190819060c490849080156100b55780601f1061008a576101008083540402835291602001916100b5565b820191906000526020600020905b81548152906001019060200180831161009857829003601f168201915b50509250505060206040518083038186803b1580156100d357600080fd5b505afa1580156100e7573d6000803e3d6000fd5b505050506040513d60208110156100fd57600080fd5b505190506001600160a01b0381166101465760405162461bcd60e51b81526004018080602001828103825260238152602001806101cc6023913960400191505060405180910390fd5b600080826001600160a01b03166000366040518083838082843760405192019450600093509091505080830381855af49150503d80600081146101a5576040519150601f19603f3d011682016040523d82523d6000602084013e6101aa565b606091505b509092509050600182151514156101c357805160208201f35b805160208201fdfe5461726765742061646472657373206d75737420626520696e697469616c697a65642ea164736f6c6343000706000a",
"devdoc": {
"kind": "dev",
"methods": {
"constructor": {
"params": {
"_implementationName": "implementationName of the contract to proxy to.",
"_libAddressManager": "Address of the Lib_AddressManager."
}
}
},
"title": "Lib_ResolvedDelegateProxy",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 12651,
"contract": "contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol:Lib_ResolvedDelegateProxy",
"label": "implementationName",
"offset": 0,
"slot": "0",
"type": "t_mapping(t_address,t_string_storage)"
},
{
"astId": 12655,
"contract": "contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol:Lib_ResolvedDelegateProxy",
"label": "addressManager",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_address,t_contract(Lib_AddressManager)12519)"
}
],
"types": {
"t_address": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
},
"t_contract(Lib_AddressManager)12519": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
},
"t_mapping(t_address,t_contract(Lib_AddressManager)12519)": {
"encoding": "mapping",
"key": "t_address",
"label": "mapping(address => contract Lib_AddressManager)",
"numberOfBytes": "32",
"value": "t_contract(Lib_AddressManager)12519"
},
"t_mapping(t_address,t_string_storage)": {
"encoding": "mapping",
"key": "t_address",
"label": "mapping(address => string)",
"numberOfBytes": "32",
"value": "t_string_storage"
},
"t_string_storage": {
"encoding": "bytes",
"label": "string",
"numberOfBytes": "32"
}
}
}
}
\ No newline at end of file
{
"address": "0x77e244ec49014cFb9c4572453568eCC3AbB70A2d",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_libAddressManager",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "address",
"name": "_who",
"type": "address"
}
],
"name": "claim",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "deposit",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_preStateRoot",
"type": "bytes32"
},
{
"internalType": "address",
"name": "_publisher",
"type": "address"
},
{
"internalType": "uint256",
"name": "_timestamp",
"type": "uint256"
}
],
"name": "finalize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "finalizeWithdrawal",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
},
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "getGasSpent",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_who",
"type": "address"
}
],
"name": "isCollateralized",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "libAddressManager",
"outputs": [
{
"internalType": "contract Lib_AddressManager",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_preStateRoot",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_txHash",
"type": "bytes32"
},
{
"internalType": "address",
"name": "_who",
"type": "address"
},
{
"internalType": "uint256",
"name": "_gasSpent",
"type": "uint256"
}
],
"name": "recordGasSpent",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "resolve",
"outputs": [
{
"internalType": "address",
"name": "_contract",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "startWithdrawal",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"transactionHash": "0xfa0ce06133a8e92441053bbf890354b29e2b0002c362bd186e7ddc118a0c415c",
"receipt": {
"to": null,
"from": "0x18394B52d3Cb931dfA76F63251919D051953413d",
"contractAddress": "0x77e244ec49014cFb9c4572453568eCC3AbB70A2d",
"transactionIndex": 3,
"gasUsed": "288329",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x6a09b96f7d2bc7769a5bf25d764699b553141f750c447e5a7b15926839d4e95a",
"transactionHash": "0xfa0ce06133a8e92441053bbf890354b29e2b0002c362bd186e7ddc118a0c415c",
"logs": [],
"blockNumber": 24199491,
"cumulativeGasUsed": "784369",
"status": 1,
"byzantium": true
},
"args": [
"0xFaf27b24ba54C6910C12CFF5C9453C0e8D634e05"
],
"solcInputHash": "03aed03b958b1d37f90bd88d0f56dd85",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_who\",\"type\":\"address\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_preStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_publisher\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"finalize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"finalizeWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"getGasSpent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_who\",\"type\":\"address\"}],\"name\":\"isCollateralized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"libAddressManager\",\"outputs\":[{\"internalType\":\"contract Lib_AddressManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_preStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_txHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_who\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasSpent\",\"type\":\"uint256\"}],\"name\":\"recordGasSpent\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"title\":\"mockOVM_BondManager\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/mockOVM/verification/mockOVM_BondManager.sol\":\"mockOVM_BondManager\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/iOVM/verification/iOVM_BondManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\ninterface ERC20 {\\n function transfer(address, uint256) external returns (bool);\\n function transferFrom(address, address, uint256) external returns (bool);\\n}\\n\\n/// All the errors which may be encountered on the bond manager\\nlibrary Errors {\\n string constant ERC20_ERR = \\\"BondManager: Could not post bond\\\";\\n string constant ALREADY_FINALIZED = \\\"BondManager: Fraud proof for this pre-state root has already been finalized\\\";\\n string constant SLASHED = \\\"BondManager: Cannot finalize withdrawal, you probably got slashed\\\";\\n string constant WRONG_STATE = \\\"BondManager: Wrong bond state for proposer\\\";\\n string constant CANNOT_CLAIM = \\\"BondManager: Cannot claim yet. Dispute must be finalized first\\\";\\n\\n string constant WITHDRAWAL_PENDING = \\\"BondManager: Withdrawal already pending\\\";\\n string constant TOO_EARLY = \\\"BondManager: Too early to finalize your withdrawal\\\";\\n\\n string constant ONLY_TRANSITIONER = \\\"BondManager: Only the transitioner for this pre-state root may call this function\\\";\\n string constant ONLY_FRAUD_VERIFIER = \\\"BondManager: Only the fraud verifier may call this function\\\";\\n string constant ONLY_STATE_COMMITMENT_CHAIN = \\\"BondManager: Only the state commitment chain may call this function\\\";\\n string constant WAIT_FOR_DISPUTES = \\\"BondManager: Wait for other potential disputes\\\";\\n}\\n\\n/**\\n * @title iOVM_BondManager\\n */\\ninterface iOVM_BondManager {\\n\\n /*******************\\n * Data Structures *\\n *******************/\\n\\n /// The lifecycle of a proposer's bond\\n enum State {\\n // Before depositing or after getting slashed, a user is uncollateralized\\n NOT_COLLATERALIZED,\\n // After depositing, a user is collateralized\\n COLLATERALIZED,\\n // After a user has initiated a withdrawal\\n WITHDRAWING\\n }\\n\\n /// A bond posted by a proposer\\n struct Bond {\\n // The user's state\\n State state;\\n // The timestamp at which a proposer issued their withdrawal request\\n uint32 withdrawalTimestamp;\\n // The time when the first disputed was initiated for this bond\\n uint256 firstDisputeAt;\\n // The earliest observed state root for this bond which has had fraud\\n bytes32 earliestDisputedStateRoot;\\n // The state root's timestamp\\n uint256 earliestTimestamp;\\n }\\n\\n // Per pre-state root, store the number of state provisions that were made\\n // and how many of these calls were made by each user. Payouts will then be\\n // claimed by users proportionally for that dispute.\\n struct Rewards {\\n // Flag to check if rewards for a fraud proof are claimable\\n bool canClaim;\\n // Total number of `recordGasSpent` calls made\\n uint256 total;\\n // The gas spent by each user to provide witness data. The sum of all\\n // values inside this map MUST be equal to the value of `total`\\n mapping(address => uint256) gasSpent;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function recordGasSpent(\\n bytes32 _preStateRoot,\\n bytes32 _txHash,\\n address _who,\\n uint256 _gasSpent\\n ) external;\\n\\n function finalize(\\n bytes32 _preStateRoot,\\n address _publisher,\\n uint256 _timestamp\\n ) external;\\n\\n function deposit() external;\\n\\n function startWithdrawal() external;\\n\\n function finalizeWithdrawal() external;\\n\\n function claim(\\n address _who\\n ) external;\\n\\n function isCollateralized(\\n address _who\\n ) external view returns (bool);\\n\\n function getGasSpent(\\n bytes32 _preStateRoot,\\n address _who\\n ) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x3c2a8a399487857158649db1896749d86e39cba545a8aeb2e2bb0f3bdfa7a5b1\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0x3a490595cc21ff170e4027843093670ff845d5972481fbfb956b722ea564bb06\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_AddressResolver\\n */\\nabstract contract Lib_AddressResolver {\\n\\n /*******************************************\\n * Contract Variables: Contract References *\\n *******************************************/\\n\\n Lib_AddressManager public libAddressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n */\\n constructor(\\n address _libAddressManager\\n ) {\\n libAddressManager = Lib_AddressManager(_libAddressManager);\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function resolve(\\n string memory _name\\n )\\n public\\n view\\n returns (\\n address _contract\\n )\\n {\\n return libAddressManager.getAddress(_name);\\n }\\n}\\n\",\"keccak256\":\"0xaa3ed342f6deb156c660fd83afa579a3b80db17eb465e8949cf5c1b114780143\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xd9dfd9264e5b5fedd53a5b10fdf179c3f367614b0fe69179bce4e45119f5b739\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/mockOVM/verification/mockOVM_BondManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Interface Imports */\\nimport { iOVM_BondManager } from \\\"../../iOVM/verification/iOVM_BondManager.sol\\\";\\n\\n/* Contract Imports */\\nimport { Lib_AddressResolver } from \\\"../../libraries/resolver/Lib_AddressResolver.sol\\\";\\n\\n/**\\n * @title mockOVM_BondManager\\n */\\ncontract mockOVM_BondManager is iOVM_BondManager, Lib_AddressResolver {\\n constructor(\\n address _libAddressManager\\n )\\n Lib_AddressResolver(_libAddressManager)\\n {}\\n\\n function recordGasSpent(\\n bytes32 _preStateRoot,\\n bytes32 _txHash,\\n address _who,\\n uint256 _gasSpent\\n )\\n override\\n public\\n {}\\n\\n function finalize(\\n bytes32 _preStateRoot,\\n address _publisher,\\n uint256 _timestamp\\n )\\n override\\n public\\n {}\\n\\n function deposit()\\n override\\n public\\n {}\\n\\n function startWithdrawal()\\n override\\n public\\n {}\\n\\n function finalizeWithdrawal()\\n override\\n public\\n {}\\n\\n function claim(\\n address _who\\n )\\n override\\n public\\n {}\\n\\n function isCollateralized(\\n address _who\\n )\\n override\\n public\\n view\\n returns (\\n bool\\n )\\n {\\n // Only authenticate sequencer to submit state root batches.\\n return _who == resolve(\\\"OVM_Proposer\\\");\\n }\\n\\n function getGasSpent(\\n bytes32, // _preStateRoot,\\n address // _who\\n )\\n override\\n public\\n pure \\n returns (\\n uint256\\n )\\n {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0x7742f2892255ca236320217d067f846bbd8f17d1561fae97f492de390598c667\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b5060405161043e38038061043e8339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b03199092169190911790556103d9806100656000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063abfbbe1311610066578063abfbbe1314610207578063bc2f8dd814610239578063c5b6aa2f14610239578063d0e30db014610239578063dc6453dc146102415761009e565b806302ad4d2a146100a35780631e16e92f146100dd5780631e83409a14610117578063299ca4781461013d578063461a447814610161575b600080fd5b6100c9600480360360208110156100b957600080fd5b50356001600160a01b031661027f565b604080519115158252519081900360200190f35b610115600480360360808110156100f357600080fd5b508035906020810135906001600160a01b0360408201351690606001356102c9565b005b6101156004803603602081101561012d57600080fd5b50356001600160a01b03166102cf565b6101456102d2565b604080516001600160a01b039092168252519081900360200190f35b6101456004803603602081101561017757600080fd5b81019060208101813564010000000081111561019257600080fd5b8201836020820111156101a457600080fd5b803590602001918460018302840111640100000000831117156101c657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506102e1945050505050565b6101156004803603606081101561021d57600080fd5b508035906001600160a01b0360208201351690604001356103bd565b6101156103c2565b61026d6004803603604081101561025757600080fd5b50803590602001356001600160a01b03166103c4565b60408051918252519081900360200190f35b60006102ae6040518060400160405280600c81526020016b27ab26afa83937b837b9b2b960a11b8152506102e1565b6001600160a01b0316826001600160a01b0316149050919050565b50505050565b50565b6000546001600160a01b031681565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b83811015610341578181015183820152602001610329565b50505050905090810190601f16801561036e5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561038b57600080fd5b505afa15801561039f573d6000803e3d6000fd5b505050506040513d60208110156103b557600080fd5b505192915050565b505050565b565b60009291505056fea164736f6c6343000706000a",
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063abfbbe1311610066578063abfbbe1314610207578063bc2f8dd814610239578063c5b6aa2f14610239578063d0e30db014610239578063dc6453dc146102415761009e565b806302ad4d2a146100a35780631e16e92f146100dd5780631e83409a14610117578063299ca4781461013d578063461a447814610161575b600080fd5b6100c9600480360360208110156100b957600080fd5b50356001600160a01b031661027f565b604080519115158252519081900360200190f35b610115600480360360808110156100f357600080fd5b508035906020810135906001600160a01b0360408201351690606001356102c9565b005b6101156004803603602081101561012d57600080fd5b50356001600160a01b03166102cf565b6101456102d2565b604080516001600160a01b039092168252519081900360200190f35b6101456004803603602081101561017757600080fd5b81019060208101813564010000000081111561019257600080fd5b8201836020820111156101a457600080fd5b803590602001918460018302840111640100000000831117156101c657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506102e1945050505050565b6101156004803603606081101561021d57600080fd5b508035906001600160a01b0360208201351690604001356103bd565b6101156103c2565b61026d6004803603604081101561025757600080fd5b50803590602001356001600160a01b03166103c4565b60408051918252519081900360200190f35b60006102ae6040518060400160405280600c81526020016b27ab26afa83937b837b9b2b960a11b8152506102e1565b6001600160a01b0316826001600160a01b0316149050919050565b50505050565b50565b6000546001600160a01b031681565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b83811015610341578181015183820152602001610329565b50505050905090810190601f16801561036e5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561038b57600080fd5b505afa15801561039f573d6000803e3d6000fd5b505050506040513d60208110156103b557600080fd5b505192915050565b505050565b565b60009291505056fea164736f6c6343000706000a",
"devdoc": {
"kind": "dev",
"methods": {},
"title": "mockOVM_BondManager",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 12526,
"contract": "contracts/optimistic-ethereum/mockOVM/verification/mockOVM_BondManager.sol:mockOVM_BondManager",
"label": "libAddressManager",
"offset": 0,
"slot": "0",
"type": "t_contract(Lib_AddressManager)12519"
}
],
"types": {
"t_contract(Lib_AddressManager)12519": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
}
}
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"address": "0x1De8CFD4C1A486200286073aE91DE6e8099519f1",
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "_name",
"type": "string"
},
{
"indexed": false,
"internalType": "address",
"name": "_newAddress",
"type": "address"
}
],
"name": "AddressSet",
"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"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "getAddress",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
},
{
"internalType": "address",
"name": "_address",
"type": "address"
}
],
"name": "setAddress",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"transactionHash": "0x39342ffdce6e6c76b8fa6534d0e5f24ba0917ed09ab713ad0eef7eee73dd08ed",
"receipt": {
"to": null,
"from": "0x558ba9b8d78713fbf768c1f8a584485B4003f43F",
"contractAddress": "0xE630cdf302880783364334455C8352fE0aB5b748",
"transactionIndex": 3,
"gasUsed": "413938",
"logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000022000000000000000000000000000000000040000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400040000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000001000000000000000000000000000000000000000000",
"blockHash": "0xf1c7969322d44cb9561c6af6b8499e1ee90e81c5e8e6409417454bf3d8bc598f",
"transactionHash": "0x39342ffdce6e6c76b8fa6534d0e5f24ba0917ed09ab713ad0eef7eee73dd08ed",
"logs": [
{
"transactionIndex": 3,
"blockNumber": 4573376,
"transactionHash": "0x39342ffdce6e6c76b8fa6534d0e5f24ba0917ed09ab713ad0eef7eee73dd08ed",
"address": "0xE630cdf302880783364334455C8352fE0aB5b748",
"topics": [
"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x000000000000000000000000558ba9b8d78713fbf768c1f8a584485b4003f43f"
],
"data": "0x",
"logIndex": 9,
"blockHash": "0xf1c7969322d44cb9561c6af6b8499e1ee90e81c5e8e6409417454bf3d8bc598f"
}
],
"blockNumber": 4573376,
"cumulativeGasUsed": "3107647",
"status": 1,
"byzantium": true
},
"args": [],
"solcInputHash": "cebcb515c1a9c570d96e0b8f6fd237e2",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_newAddress\",\"type\":\"address\"}],\"name\":\"AddressSet\",\"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\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"getAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"setAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"title\":\"Lib_AddressManager\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":\"Lib_AddressManager\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0xdf802e1cc6474df913626991e9fca3835c620a519f397afe04bf9c260e723257\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() internal {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xe0409fbd236d16ca6be439d9d97dd36d0d9a0697ee0062d49588b9d29c248e47\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b03191633178082556040516001600160a01b039190911691907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3610614806100696000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c8063715018a61461005c5780638da5cb5b146100665780639b2ea4bd1461008a578063bf40fac11461013b578063f2fde38b146101e1575b600080fd5b610064610207565b005b61006e6102b0565b604080516001600160a01b039092168252519081900360200190f35b610064600480360360408110156100a057600080fd5b8101906020810181356401000000008111156100bb57600080fd5b8201836020820111156100cd57600080fd5b803590602001918460018302840111640100000000831117156100ef57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b031691506102bf9050565b61006e6004803603602081101561015157600080fd5b81019060208101813564010000000081111561016c57600080fd5b82018360208201111561017e57600080fd5b803590602001918460018302840111640100000000831117156101a057600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061040c945050505050565b610064600480360360208110156101f757600080fd5b50356001600160a01b031661043b565b6000546001600160a01b03163314610266576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031681565b6000546001600160a01b0316331461031e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b7f188466739ff00cc68bfb2367d23ae4b855264264fe1624caa8884399af23454c82826040518080602001836001600160a01b03168152602001828103825284818151815260200191508051906020019080838360005b8381101561038d578181015183820152602001610375565b50505050905090810190601f1680156103ba5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a180600160006103d68561053a565b815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055505050565b60006001600061041b8461053a565b81526020810191909152604001600020546001600160a01b031692915050565b6000546001600160a01b0316331461049a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166104df5760405162461bcd60e51b815260040180806020018281038252602d8152602001806105b2602d913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000816040516020018082805190602001908083835b6020831061056f5780518252601f199092019160209182019101610550565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120905091905056fe4f776e61626c653a206e6577206f776e65722063616e6e6f7420626520746865207a65726f2061646472657373a2646970667358221220304b86da0b56c0241601472f57374abec2a11900a97043845283952624e4512364736f6c63430007060033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c8063715018a61461005c5780638da5cb5b146100665780639b2ea4bd1461008a578063bf40fac11461013b578063f2fde38b146101e1575b600080fd5b610064610207565b005b61006e6102b0565b604080516001600160a01b039092168252519081900360200190f35b610064600480360360408110156100a057600080fd5b8101906020810181356401000000008111156100bb57600080fd5b8201836020820111156100cd57600080fd5b803590602001918460018302840111640100000000831117156100ef57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b031691506102bf9050565b61006e6004803603602081101561015157600080fd5b81019060208101813564010000000081111561016c57600080fd5b82018360208201111561017e57600080fd5b803590602001918460018302840111640100000000831117156101a057600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061040c945050505050565b610064600480360360208110156101f757600080fd5b50356001600160a01b031661043b565b6000546001600160a01b03163314610266576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031681565b6000546001600160a01b0316331461031e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b7f188466739ff00cc68bfb2367d23ae4b855264264fe1624caa8884399af23454c82826040518080602001836001600160a01b03168152602001828103825284818151815260200191508051906020019080838360005b8381101561038d578181015183820152602001610375565b50505050905090810190601f1680156103ba5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a180600160006103d68561053a565b815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055505050565b60006001600061041b8461053a565b81526020810191909152604001600020546001600160a01b031692915050565b6000546001600160a01b0316331461049a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166104df5760405162461bcd60e51b815260040180806020018281038252602d8152602001806105b2602d913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000816040516020018082805190602001908083835b6020831061056f5780518252601f199092019160209182019101610550565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120905091905056fe4f776e61626c653a206e6577206f776e65722063616e6e6f7420626520746865207a65726f2061646472657373a2646970667358221220304b86da0b56c0241601472f57374abec2a11900a97043845283952624e4512364736f6c63430007060033",
"devdoc": {
"kind": "dev",
"methods": {},
"title": "Lib_AddressManager",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 11739,
"contract": "contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol:Lib_AddressManager",
"label": "owner",
"offset": 0,
"slot": "0",
"type": "t_address"
},
{
"astId": 11647,
"contract": "contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol:Lib_AddressManager",
"label": "addresses",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_bytes32,t_address)"
}
],
"types": {
"t_address": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
},
"t_bytes32": {
"encoding": "inplace",
"label": "bytes32",
"numberOfBytes": "32"
},
"t_mapping(t_bytes32,t_address)": {
"encoding": "mapping",
"key": "t_bytes32",
"label": "mapping(bytes32 => address)",
"numberOfBytes": "32",
"value": "t_address"
}
}
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"address": "0x7Cb043e523F6B5D492E0d2221e45062d3878599c",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_libAddressManager",
"type": "address"
},
{
"internalType": "string",
"name": "_owner",
"type": "string"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "deleteElementsAfterInclusive",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "deleteElementsAfterInclusive",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "get",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getGlobalMetadata",
"outputs": [
{
"internalType": "bytes27",
"name": "",
"type": "bytes27"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "length",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_object",
"type": "bytes32"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "push",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_object",
"type": "bytes32"
}
],
"name": "push",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_objectA",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_objectB",
"type": "bytes32"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "push2",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_objectA",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_objectB",
"type": "bytes32"
}
],
"name": "push2",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "resolve",
"outputs": [
{
"internalType": "address",
"name": "_contract",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "setGlobalMetadata",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "setNextOverwritableIndex",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"transactionHash": "0x86b9f5af9ce79ad3dca2a59ed521e75d88ed6d816f85e49b15232731cf1b16eb",
"receipt": {
"to": null,
"from": "0x558ba9b8d78713fbf768c1f8a584485B4003f43F",
"contractAddress": "0x4C4a482b6bE75FDce6E94Be10423363108f34fDf",
"transactionIndex": 1,
"gasUsed": "1103714",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x7dc617150a7075769c500e7ebe66c4357400e4d7a81a26495e265d4949b2fdd6",
"transactionHash": "0x86b9f5af9ce79ad3dca2a59ed521e75d88ed6d816f85e49b15232731cf1b16eb",
"logs": [],
"blockNumber": 4573377,
"cumulativeGasUsed": "1155953",
"status": 1,
"byzantium": true
},
"args": [
"0x1De8CFD4C1A486200286073aE91DE6e8099519f1",
"OVM_CanonicalTransactionChain"
],
"solcInputHash": "cebcb515c1a9c570d96e0b8f6fd237e2",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_owner\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"deleteElementsAfterInclusive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"deleteElementsAfterInclusive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"get\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGlobalMetadata\",\"outputs\":[{\"internalType\":\"bytes27\",\"name\":\"\",\"type\":\"bytes27\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"length\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_object\",\"type\":\"bytes32\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"push\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_object\",\"type\":\"bytes32\"}],\"name\":\"push\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_objectA\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_objectB\",\"type\":\"bytes32\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"push2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_objectA\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_objectB\",\"type\":\"bytes32\"}],\"name\":\"push2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"setGlobalMetadata\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"setNextOverwritableIndex\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_libAddressManager\":\"Address of the Address Manager.\",\"_owner\":\"Name of the contract that owns this container (will be resolved later).\"}},\"deleteElementsAfterInclusive(uint256)\":{\"params\":{\"_index\":\"Object index to delete from.\"}},\"deleteElementsAfterInclusive(uint256,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_index\":\"Object index to delete from.\"}},\"get(uint256)\":{\"params\":{\"_index\":\"Index of the particular object to access.\"},\"returns\":{\"_0\":\"32 byte object value.\"}},\"getGlobalMetadata()\":{\"returns\":{\"_0\":\"Container global metadata field.\"}},\"length()\":{\"returns\":{\"_0\":\"Number of objects in the container.\"}},\"push(bytes32)\":{\"params\":{\"_object\":\"A 32 byte value to insert into the container.\"}},\"push(bytes32,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_object\":\"A 32 byte value to insert into the container.\"}},\"push2(bytes32,bytes32)\":{\"params\":{\"_objectA\":\"First 32 byte value to insert into the container.\",\"_objectB\":\"Second 32 byte value to insert into the container.\"}},\"push2(bytes32,bytes32,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_objectA\":\"First 32 byte value to insert into the container.\",\"_objectB\":\"Second 32 byte value to insert into the container.\"}},\"setGlobalMetadata(bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata to set.\"}}},\"title\":\"OVM_ChainStorageContainer\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deleteElementsAfterInclusive(uint256)\":{\"notice\":\"Removes all objects after and including a given index.\"},\"deleteElementsAfterInclusive(uint256,bytes27)\":{\"notice\":\"Removes all objects after and including a given index. Also allows setting the global metadata field.\"},\"get(uint256)\":{\"notice\":\"Retrieves an object from the container.\"},\"getGlobalMetadata()\":{\"notice\":\"Retrieves the container's global metadata field.\"},\"length()\":{\"notice\":\"Retrieves the number of objects stored in the container.\"},\"push(bytes32)\":{\"notice\":\"Pushes an object into the container.\"},\"push(bytes32,bytes27)\":{\"notice\":\"Pushes an object into the container. Function allows setting the global metadata since we'll need to touch the \\\"length\\\" storage slot anyway, which also contains the global metadata (it's an optimization).\"},\"push2(bytes32,bytes32)\":{\"notice\":\"Pushes two objects into the container at the same time. A useful optimization.\"},\"push2(bytes32,bytes32,bytes27)\":{\"notice\":\"Pushes two objects into the container at the same time. Also allows setting the global metadata field.\"},\"setGlobalMetadata(bytes27)\":{\"notice\":\"Sets the container's global metadata field. We're using `bytes27` here because we use five bytes to maintain the length of the underlying data structure, meaning we have an extra 27 bytes to store arbitrary data.\"},\"setNextOverwritableIndex(uint256)\":{\"notice\":\"Marks an index as overwritable, meaing the underlying buffer can start to write values over any objects before and including the given index.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol\":\"OVM_ChainStorageContainer\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol\":{\"content\":\"pragma solidity ^0.7.0;\\n\\n/* Library Imports */\\nimport { Lib_RingBuffer } from \\\"../../libraries/utils/Lib_RingBuffer.sol\\\";\\nimport { Lib_AddressResolver } from \\\"../../libraries/resolver/Lib_AddressResolver.sol\\\";\\n\\n/* Interface Imports */\\nimport { iOVM_ChainStorageContainer } from \\\"../../iOVM/chain/iOVM_ChainStorageContainer.sol\\\";\\n\\n/**\\n * @title OVM_ChainStorageContainer\\n */\\ncontract OVM_ChainStorageContainer is iOVM_ChainStorageContainer, Lib_AddressResolver {\\n\\n /*************\\n * Libraries *\\n *************/\\n\\n using Lib_RingBuffer for Lib_RingBuffer.RingBuffer;\\n\\n\\n /*************\\n * Variables *\\n *************/\\n\\n string public owner;\\n Lib_RingBuffer.RingBuffer internal buffer;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n \\n /**\\n * @param _libAddressManager Address of the Address Manager.\\n * @param _owner Name of the contract that owns this container (will be resolved later).\\n */\\n constructor(\\n address _libAddressManager,\\n string memory _owner\\n )\\n Lib_AddressResolver(_libAddressManager)\\n {\\n owner = _owner;\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n \\n modifier onlyOwner() {\\n require(\\n msg.sender == resolve(owner),\\n \\\"OVM_ChainStorageContainer: Function can only be called by the owner.\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function setGlobalMetadata(\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n return buffer.setExtraData(_globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function getGlobalMetadata()\\n override\\n public\\n view\\n returns (\\n bytes27\\n )\\n {\\n return buffer.getExtraData();\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function length()\\n override\\n public\\n view\\n returns (\\n uint256\\n )\\n {\\n return uint256(buffer.getLength());\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push(\\n bytes32 _object\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push(_object);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push(\\n bytes32 _object,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push(_object, _globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push2(_objectA, _objectB);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push2(_objectA, _objectB, _globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function get(\\n uint256 _index\\n )\\n override\\n public\\n view\\n returns (\\n bytes32\\n )\\n {\\n return buffer.get(uint40(_index));\\n }\\n \\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.deleteElementsAfterInclusive(\\n uint40(_index)\\n );\\n }\\n \\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.deleteElementsAfterInclusive(\\n uint40(_index),\\n _globalMetadata\\n );\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function setNextOverwritableIndex(\\n uint256 _index\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.nextOverwritableIndex = _index;\\n }\\n}\\n\",\"keccak256\":\"0xc722e9528988810bd754002dfe3923bc9ac9252c1d981c4803fd5053603bfb11\"},\"contracts/optimistic-ethereum/iOVM/chain/iOVM_ChainStorageContainer.sol\":{\"content\":\"pragma solidity ^0.7.0;\\n\\n/**\\n * @title iOVM_ChainStorageContainer\\n */\\ninterface iOVM_ChainStorageContainer {\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Sets the container's global metadata field. We're using `bytes27` here because we use five\\n * bytes to maintain the length of the underlying data structure, meaning we have an extra\\n * 27 bytes to store arbitrary data.\\n * @param _globalMetadata New global metadata to set.\\n */\\n function setGlobalMetadata(\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Retrieves the container's global metadata field.\\n * @return Container global metadata field.\\n */\\n function getGlobalMetadata()\\n external\\n view\\n returns (\\n bytes27\\n );\\n\\n /**\\n * Retrieves the number of objects stored in the container.\\n * @return Number of objects in the container.\\n */\\n function length()\\n external\\n view\\n returns (\\n uint256\\n );\\n\\n /**\\n * Pushes an object into the container.\\n * @param _object A 32 byte value to insert into the container.\\n */\\n function push(\\n bytes32 _object\\n )\\n external;\\n\\n /**\\n * Pushes an object into the container. Function allows setting the global metadata since\\n * we'll need to touch the \\\"length\\\" storage slot anyway, which also contains the global\\n * metadata (it's an optimization).\\n * @param _object A 32 byte value to insert into the container.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function push(\\n bytes32 _object,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Pushes two objects into the container at the same time. A useful optimization.\\n * @param _objectA First 32 byte value to insert into the container.\\n * @param _objectB Second 32 byte value to insert into the container.\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB\\n )\\n external;\\n\\n /**\\n * Pushes two objects into the container at the same time. Also allows setting the global\\n * metadata field.\\n * @param _objectA First 32 byte value to insert into the container.\\n * @param _objectB Second 32 byte value to insert into the container.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Retrieves an object from the container.\\n * @param _index Index of the particular object to access.\\n * @return 32 byte object value.\\n */\\n function get(\\n uint256 _index\\n )\\n external\\n view\\n returns (\\n bytes32\\n );\\n\\n /**\\n * Removes all objects after and including a given index.\\n * @param _index Object index to delete from.\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index\\n )\\n external;\\n\\n /**\\n * Removes all objects after and including a given index. Also allows setting the global\\n * metadata field.\\n * @param _index Object index to delete from.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Marks an index as overwritable, meaing the underlying buffer can start to write values over\\n * any objects before and including the given index.\\n */\\n function setNextOverwritableIndex(\\n uint256 _index\\n )\\n external;\\n}\\n\",\"keccak256\":\"0xcfca7da85b35d94c27581c2460b0d48fd0cc51fa72670cc7a2f7f760fb21a2f0\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0xdf802e1cc6474df913626991e9fca3835c620a519f397afe04bf9c260e723257\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_AddressResolver\\n */\\ncontract Lib_AddressResolver {\\n\\n /*******************************************\\n * Contract Variables: Contract References *\\n *******************************************/\\n\\n Lib_AddressManager internal libAddressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n */\\n constructor(\\n address _libAddressManager\\n ) public {\\n libAddressManager = Lib_AddressManager(_libAddressManager);\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function resolve(\\n string memory _name\\n )\\n public\\n view\\n returns (\\n address _contract\\n )\\n {\\n return libAddressManager.getAddress(_name);\\n }\\n}\\n\",\"keccak256\":\"0xf3b9d78b309ddeec259ce3e0e1cfdef3ca40938e9a81971b28ce2b8ea327f533\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() internal {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xe0409fbd236d16ca6be439d9d97dd36d0d9a0697ee0062d49588b9d29c248e47\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/utils/Lib_RingBuffer.sol\":{\"content\":\"pragma solidity ^0.7.0;\\n\\nlibrary Lib_RingBuffer {\\n using Lib_RingBuffer for RingBuffer;\\n\\n /***********\\n * Structs *\\n ***********/\\n\\n struct Buffer {\\n uint256 length;\\n mapping (uint256 => bytes32) buf;\\n }\\n\\n struct RingBuffer {\\n bytes32 contextA;\\n bytes32 contextB;\\n Buffer bufferA;\\n Buffer bufferB;\\n uint256 nextOverwritableIndex;\\n }\\n\\n struct RingBufferContext {\\n // contextA\\n uint40 globalIndex;\\n bytes27 extraData;\\n\\n // contextB\\n uint64 currBufferIndex;\\n uint40 prevResetIndex;\\n uint40 currResetIndex;\\n }\\n\\n\\n /*************\\n * Constants *\\n *************/\\n\\n uint256 constant MIN_CAPACITY = 16;\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * Pushes a single element to the buffer.\\n * @param _self Buffer to access.\\n * @param _value Value to push to the buffer.\\n * @param _extraData Optional global extra data.\\n */\\n function push(\\n RingBuffer storage _self,\\n bytes32 _value,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n\\n // Set a minimum capacity.\\n if (currBuffer.length == 0) {\\n currBuffer.length = MIN_CAPACITY;\\n }\\n\\n // Check if we need to expand the buffer.\\n if (ctx.globalIndex - ctx.currResetIndex >= currBuffer.length) {\\n if (ctx.currResetIndex < _self.nextOverwritableIndex) {\\n // We're going to overwrite the inactive buffer.\\n // Bump the buffer index, reset the delete offset, and set our reset indices.\\n ctx.currBufferIndex++;\\n ctx.prevResetIndex = ctx.currResetIndex;\\n ctx.currResetIndex = ctx.globalIndex;\\n\\n // Swap over to the next buffer.\\n currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n } else {\\n // We're not overwriting yet, double the length of the current buffer.\\n currBuffer.length *= 2;\\n }\\n }\\n\\n // Index to write to is the difference of the global and reset indices.\\n uint256 writeHead = ctx.globalIndex - ctx.currResetIndex;\\n currBuffer.buf[writeHead] = _value;\\n\\n // Bump the global index and insert our extra data, then save the context.\\n ctx.globalIndex++;\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Pushes a single element to the buffer.\\n * @param _self Buffer to access.\\n * @param _value Value to push to the buffer.\\n */\\n function push(\\n RingBuffer storage _self,\\n bytes32 _value\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n \\n _self.push(\\n _value,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Pushes a two elements to the buffer.\\n * @param _self Buffer to access.\\n * @param _valueA First value to push to the buffer.\\n * @param _valueA Second value to push to the buffer.\\n * @param _extraData Optional global extra data.\\n */\\n function push2(\\n RingBuffer storage _self,\\n bytes32 _valueA,\\n bytes32 _valueB,\\n bytes27 _extraData\\n )\\n internal\\n {\\n _self.push(_valueA, _extraData);\\n _self.push(_valueB, _extraData);\\n }\\n\\n /**\\n * Pushes a two elements to the buffer.\\n * @param _self Buffer to access.\\n * @param _valueA First value to push to the buffer.\\n * @param _valueA Second value to push to the buffer.\\n */\\n function push2(\\n RingBuffer storage _self,\\n bytes32 _valueA,\\n bytes32 _valueB\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n _self.push2(\\n _valueA,\\n _valueB,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Retrieves an element from the buffer.\\n * @param _self Buffer to access.\\n * @param _index Element index to retrieve.\\n * @return Value of the element at the given index.\\n */\\n function get(\\n RingBuffer storage _self,\\n uint256 _index\\n )\\n internal\\n view\\n returns (\\n bytes32 \\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n require(\\n _index < ctx.globalIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n Buffer storage prevBuffer = _self.getBuffer(ctx.currBufferIndex + 1);\\n\\n if (_index >= ctx.currResetIndex) {\\n // We're trying to load an element from the current buffer.\\n // Relative index is just the difference from the reset index.\\n uint256 relativeIndex = _index - ctx.currResetIndex;\\n\\n // Shouldn't happen but why not check.\\n require(\\n relativeIndex < currBuffer.length,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n return currBuffer.buf[relativeIndex];\\n } else {\\n // We're trying to load an element from the previous buffer.\\n // Relative index is the difference from the reset index in the other direction.\\n uint256 relativeIndex = ctx.currResetIndex - _index;\\n\\n // Condition only fails in the case that we deleted and flipped buffers.\\n require(\\n ctx.currResetIndex > ctx.prevResetIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n // Make sure we're not trying to read beyond the array.\\n require(\\n relativeIndex <= prevBuffer.length,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n return prevBuffer.buf[prevBuffer.length - relativeIndex];\\n }\\n }\\n\\n /**\\n * Deletes all elements after (and including) a given index.\\n * @param _self Buffer to access.\\n * @param _index Index of the element to delete from (inclusive).\\n * @param _extraData Optional global extra data.\\n */\\n function deleteElementsAfterInclusive(\\n RingBuffer storage _self,\\n uint40 _index,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n require(\\n _index < ctx.globalIndex && _index >= ctx.prevResetIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n Buffer storage prevBuffer = _self.getBuffer(ctx.currBufferIndex + 1);\\n\\n if (_index < ctx.currResetIndex) {\\n // We're switching back to the previous buffer.\\n // Reduce the buffer index, set the current reset index back to match the previous one.\\n // We use the equality of these two values to prevent reading beyond this buffer.\\n ctx.currBufferIndex--;\\n ctx.currResetIndex = ctx.prevResetIndex;\\n }\\n\\n // Set our global index and extra data, save the context.\\n ctx.globalIndex = _index;\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Deletes all elements after (and including) a given index.\\n * @param _self Buffer to access.\\n * @param _index Index of the element to delete from (inclusive).\\n */\\n function deleteElementsAfterInclusive(\\n RingBuffer storage _self,\\n uint40 _index\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n _self.deleteElementsAfterInclusive(\\n _index,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Retrieves the current global index.\\n * @param _self Buffer to access.\\n * @return Current global index.\\n */\\n function getLength(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n uint40\\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n return ctx.globalIndex;\\n }\\n\\n /**\\n * Changes current global extra data.\\n * @param _self Buffer to access.\\n * @param _extraData New global extra data.\\n */\\n function setExtraData(\\n RingBuffer storage _self,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Retrieves the current global extra data.\\n * @param _self Buffer to access.\\n * @return Current global extra data.\\n */\\n function getExtraData(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n bytes27\\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n return ctx.extraData;\\n }\\n\\n /**\\n * Sets the current ring buffer context.\\n * @param _self Buffer to access.\\n * @param _ctx Current ring buffer context.\\n */\\n function setContext(\\n RingBuffer storage _self,\\n RingBufferContext memory _ctx\\n )\\n internal\\n returns (\\n bytes32\\n )\\n {\\n bytes32 contextA;\\n bytes32 contextB;\\n\\n uint40 globalIndex = _ctx.globalIndex;\\n bytes27 extraData = _ctx.extraData;\\n assembly {\\n contextA := globalIndex\\n contextA := or(contextA, extraData)\\n }\\n\\n uint64 currBufferIndex = _ctx.currBufferIndex;\\n uint40 prevResetIndex = _ctx.prevResetIndex;\\n uint40 currResetIndex = _ctx.currResetIndex;\\n assembly {\\n contextB := currBufferIndex\\n contextB := or(contextB, shl(64, prevResetIndex))\\n contextB := or(contextB, shl(104, currResetIndex))\\n }\\n\\n if (_self.contextA != contextA) {\\n _self.contextA = contextA;\\n }\\n\\n if (_self.contextB != contextB) {\\n _self.contextB = contextB;\\n }\\n }\\n\\n /**\\n * Retrieves the current ring buffer context.\\n * @param _self Buffer to access.\\n * @return Current ring buffer context.\\n */\\n function getContext(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n RingBufferContext memory\\n )\\n {\\n bytes32 contextA = _self.contextA;\\n bytes32 contextB = _self.contextB;\\n\\n uint40 globalIndex;\\n bytes27 extraData;\\n assembly {\\n globalIndex := and(contextA, 0x000000000000000000000000000000000000000000000000000000FFFFFFFFFF)\\n extraData := and(contextA, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000)\\n }\\n\\n uint64 currBufferIndex;\\n uint40 prevResetIndex;\\n uint40 currResetIndex;\\n assembly {\\n currBufferIndex := and(contextB, 0x000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFF)\\n prevResetIndex := shr(64, and(contextB, 0x00000000000000000000000000000000000000FFFFFFFFFF0000000000000000))\\n currResetIndex := shr(104, and(contextB, 0x0000000000000000000000000000FFFFFFFFFF00000000000000000000000000))\\n }\\n\\n return RingBufferContext({\\n globalIndex: globalIndex,\\n extraData: extraData,\\n currBufferIndex: currBufferIndex,\\n prevResetIndex: prevResetIndex,\\n currResetIndex: currResetIndex\\n });\\n }\\n\\n /**\\n * Retrieves the a buffer from the ring buffer by index.\\n * @param _self Buffer to access.\\n * @param _which Index of the sub buffer to access.\\n * @return Sub buffer for the index.\\n */\\n function getBuffer(\\n RingBuffer storage _self,\\n uint256 _which\\n )\\n internal\\n view\\n returns (\\n Buffer storage\\n )\\n {\\n return _which % 2 == 0 ? _self.bufferA : _self.bufferB;\\n }\\n}\\n\",\"keccak256\":\"0x0c4bb53aba64441b2ec26e7a13de8f04f104bb654e550ccc30db500cac33d2a3\"}},\"version\":1}",
"bytecode": "0x60806040523480156200001157600080fd5b50604051620013f3380380620013f3833981810160405260408110156200003757600080fd5b8151602083018051604051929492938301929190846401000000008211156200005f57600080fd5b9083019060208201858111156200007557600080fd5b82516401000000008111828201881017156200009057600080fd5b82525081516020918201929091019080838360005b83811015620000bf578181015183820152602001620000a5565b50505050905090810190601f168015620000ed5780820380516001836020036101000a031916815260200191505b506040525050600080546001600160a01b0319166001600160a01b038516179055508051620001249060019060208401906200012d565b505050620001d9565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001655760008555620001b0565b82601f106200018057805160ff1916838001178555620001b0565b82800160010185558215620001b0579182015b82811115620001b057825182559160200191906001019062000193565b50620001be929150620001c2565b5090565b5b80821115620001be5760008155600101620001c3565b61120a80620001e96000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80634651d91e1161008c578063b298e36b11610066578063b298e36b14610315578063ccf8f96914610332578063d41c021814610355578063fa9e936c14610378576100cf565b80634651d91e1461025e5780638da5cb5b1461027b5780639507d39a146102f8576100cf565b806314f22255146100d4578063167fd681146101075780631f7b6d32146101325780632015276c1461014c57806329061de214610177578063461a44781461019c575b600080fd5b610105600480360360608110156100ea57600080fd5b508035906020810135906040013564ffffffffff1916610395565b005b6101056004803603604081101561011d57600080fd5b508035906020013564ffffffffff191661048c565b61013a61054c565b60408051918252519081900360200190f35b6101056004803603604081101561016257600080fd5b508035906020013564ffffffffff1916610564565b6101056004803603602081101561018d57600080fd5b503564ffffffffff1916610620565b610242600480360360208110156101b257600080fd5b8101906020810181356401000000008111156101cd57600080fd5b8201836020820111156101df57600080fd5b8035906020019184600183028401116401000000008311171561020157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506106de945050505050565b604080516001600160a01b039092168252519081900360200190f35b6101056004803603602081101561027457600080fd5b50356107ba565b610283610875565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102bd5781810151838201526020016102a5565b50505050905090810190601f1680156102ea5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61013a6004803603602081101561030e57600080fd5b5035610902565b6101056004803603602081101561032b57600080fd5b503561091c565b61033a6109d7565b6040805164ffffffffff199092168252519081900360200190f35b6101056004803603604081101561036b57600080fd5b50803590602001356109e8565b6101056004803603602081101561038e57600080fd5b5035610aa4565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261042b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b820191906000526020600020905b81548152906001019060200180831161040457829003601f168201915b50505050506106de565b6001600160a01b0316336001600160a01b03161461047a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6104876002848484610b59565b505050565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526104ed93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461053c5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610b75565b5050565b60006105586002610cb7565b64ffffffffff16905090565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526105c593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106145760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610ccb565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261068193909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106d05760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610dca565b50565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b8381101561073e578181015183820152602001610726565b50505050905090810190601f16801561076b5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561078857600080fd5b505afa15801561079c573d6000803e3d6000fd5b505050506040513d60208110156107b257600080fd5b505192915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261081b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461086a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610def565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108fa5780601f106108cf576101008083540402835291602001916108fa565b820191906000526020600020905b8154815290600101906020018083116108dd57829003601f168201915b505050505081565b6000610916600264ffffffffff8416610e15565b92915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261097d93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146109cc5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db60028261101e565b60006109e36002611044565b905090565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610a4993909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610a985760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6105486002838361105b565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610b0593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610b545760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b600855565b610b64848483610ccb565b610b6f848383610ccb565b50505050565b6000610b8084611083565b9050806000015164ffffffffff168364ffffffffff16108015610bb55750806060015164ffffffffff168364ffffffffff1610155b610bfd576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610c20826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610c48836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168564ffffffffff161015610c8c576040830180516000190167ffffffffffffffff169052606083015164ffffffffff1660808401525b64ffffffffff8516835264ffffffffff1984166020840152610cae8684611103565b50505050505050565b600080610cc383611083565b519392505050565b6000610cd684611083565b90506000610cfb826040015167ffffffffffffffff16866110e390919063ffffffff16565b8054909150610d0957601081555b8054608083015183510364ffffffffff1610610d80578460060154826080015164ffffffffff161015610d785760408201805160010167ffffffffffffffff169081905260808301805164ffffffffff90811660608601528451169052610d719086906110e3565b9050610d80565b805460020281555b608082015182510364ffffffffff9081166000818152600184810160209081526040909220889055855101909216845264ffffffffff19851691840191909152610cae8684611103565b6000610dd583611083565b64ffffffffff19831660208201529050610b6f8382611103565b6000610dfa83611083565b905061048782826020015185610b759092919063ffffffff16565b600080610e2184611083565b805190915064ffffffffff168310610e77576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610e9a826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610ec2836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168510610f4f576080830151825464ffffffffff9091168603908110610f33576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000908152600190920160205250604090205491506109169050565b6080830151606084015164ffffffffff9182168781039290911610610fb2576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154811115610fff576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154036000908152600190910160205260409020549250610916915050565b600061102983611083565b905061048782826020015185610ccb9092919063ffffffff16565b60008061105083611083565b602001519392505050565b600061106684611083565b9050610b6f8383836020015187610b59909392919063ffffffff16565b61108b611162565b5080546001909101546040805160a08101825264ffffffffff808516825264ffffffffff19909416602082015267ffffffffffffffff8316818301529082901c8316606082015260689190911c909116608082015290565b600060028206156110f757826004016110fc565b826002015b9392505050565b80516020820151604080840151606085015160808601518754600096868117969584901b8517606884901b17959094909390929091871461114257868a555b858a60010154146111555760018a018690555b5050505050505092915050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe4f564d5f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206f776e65722ea264697066735822122037f5f91f3a7302668798afaeee2c0c2d9aad06dfcc80e263efc2cd8f4842eebe64736f6c63430007060033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c80634651d91e1161008c578063b298e36b11610066578063b298e36b14610315578063ccf8f96914610332578063d41c021814610355578063fa9e936c14610378576100cf565b80634651d91e1461025e5780638da5cb5b1461027b5780639507d39a146102f8576100cf565b806314f22255146100d4578063167fd681146101075780631f7b6d32146101325780632015276c1461014c57806329061de214610177578063461a44781461019c575b600080fd5b610105600480360360608110156100ea57600080fd5b508035906020810135906040013564ffffffffff1916610395565b005b6101056004803603604081101561011d57600080fd5b508035906020013564ffffffffff191661048c565b61013a61054c565b60408051918252519081900360200190f35b6101056004803603604081101561016257600080fd5b508035906020013564ffffffffff1916610564565b6101056004803603602081101561018d57600080fd5b503564ffffffffff1916610620565b610242600480360360208110156101b257600080fd5b8101906020810181356401000000008111156101cd57600080fd5b8201836020820111156101df57600080fd5b8035906020019184600183028401116401000000008311171561020157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506106de945050505050565b604080516001600160a01b039092168252519081900360200190f35b6101056004803603602081101561027457600080fd5b50356107ba565b610283610875565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102bd5781810151838201526020016102a5565b50505050905090810190601f1680156102ea5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61013a6004803603602081101561030e57600080fd5b5035610902565b6101056004803603602081101561032b57600080fd5b503561091c565b61033a6109d7565b6040805164ffffffffff199092168252519081900360200190f35b6101056004803603604081101561036b57600080fd5b50803590602001356109e8565b6101056004803603602081101561038e57600080fd5b5035610aa4565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261042b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b820191906000526020600020905b81548152906001019060200180831161040457829003601f168201915b50505050506106de565b6001600160a01b0316336001600160a01b03161461047a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6104876002848484610b59565b505050565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526104ed93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461053c5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610b75565b5050565b60006105586002610cb7565b64ffffffffff16905090565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526105c593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106145760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610ccb565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261068193909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106d05760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610dca565b50565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b8381101561073e578181015183820152602001610726565b50505050905090810190601f16801561076b5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561078857600080fd5b505afa15801561079c573d6000803e3d6000fd5b505050506040513d60208110156107b257600080fd5b505192915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261081b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461086a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610def565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108fa5780601f106108cf576101008083540402835291602001916108fa565b820191906000526020600020905b8154815290600101906020018083116108dd57829003601f168201915b505050505081565b6000610916600264ffffffffff8416610e15565b92915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261097d93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146109cc5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db60028261101e565b60006109e36002611044565b905090565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610a4993909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610a985760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6105486002838361105b565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610b0593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610b545760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b600855565b610b64848483610ccb565b610b6f848383610ccb565b50505050565b6000610b8084611083565b9050806000015164ffffffffff168364ffffffffff16108015610bb55750806060015164ffffffffff168364ffffffffff1610155b610bfd576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610c20826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610c48836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168564ffffffffff161015610c8c576040830180516000190167ffffffffffffffff169052606083015164ffffffffff1660808401525b64ffffffffff8516835264ffffffffff1984166020840152610cae8684611103565b50505050505050565b600080610cc383611083565b519392505050565b6000610cd684611083565b90506000610cfb826040015167ffffffffffffffff16866110e390919063ffffffff16565b8054909150610d0957601081555b8054608083015183510364ffffffffff1610610d80578460060154826080015164ffffffffff161015610d785760408201805160010167ffffffffffffffff169081905260808301805164ffffffffff90811660608601528451169052610d719086906110e3565b9050610d80565b805460020281555b608082015182510364ffffffffff9081166000818152600184810160209081526040909220889055855101909216845264ffffffffff19851691840191909152610cae8684611103565b6000610dd583611083565b64ffffffffff19831660208201529050610b6f8382611103565b6000610dfa83611083565b905061048782826020015185610b759092919063ffffffff16565b600080610e2184611083565b805190915064ffffffffff168310610e77576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610e9a826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610ec2836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168510610f4f576080830151825464ffffffffff9091168603908110610f33576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000908152600190920160205250604090205491506109169050565b6080830151606084015164ffffffffff9182168781039290911610610fb2576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154811115610fff576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154036000908152600190910160205260409020549250610916915050565b600061102983611083565b905061048782826020015185610ccb9092919063ffffffff16565b60008061105083611083565b602001519392505050565b600061106684611083565b9050610b6f8383836020015187610b59909392919063ffffffff16565b61108b611162565b5080546001909101546040805160a08101825264ffffffffff808516825264ffffffffff19909416602082015267ffffffffffffffff8316818301529082901c8316606082015260689190911c909116608082015290565b600060028206156110f757826004016110fc565b826002015b9392505050565b80516020820151604080840151606085015160808601518754600096868117969584901b8517606884901b17959094909390929091871461114257868a555b858a60010154146111555760018a018690555b5050505050505092915050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe4f564d5f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206f776e65722ea264697066735822122037f5f91f3a7302668798afaeee2c0c2d9aad06dfcc80e263efc2cd8f4842eebe64736f6c63430007060033",
"devdoc": {
"kind": "dev",
"methods": {
"constructor": {
"params": {
"_libAddressManager": "Address of the Address Manager.",
"_owner": "Name of the contract that owns this container (will be resolved later)."
}
},
"deleteElementsAfterInclusive(uint256)": {
"params": {
"_index": "Object index to delete from."
}
},
"deleteElementsAfterInclusive(uint256,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_index": "Object index to delete from."
}
},
"get(uint256)": {
"params": {
"_index": "Index of the particular object to access."
},
"returns": {
"_0": "32 byte object value."
}
},
"getGlobalMetadata()": {
"returns": {
"_0": "Container global metadata field."
}
},
"length()": {
"returns": {
"_0": "Number of objects in the container."
}
},
"push(bytes32)": {
"params": {
"_object": "A 32 byte value to insert into the container."
}
},
"push(bytes32,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_object": "A 32 byte value to insert into the container."
}
},
"push2(bytes32,bytes32)": {
"params": {
"_objectA": "First 32 byte value to insert into the container.",
"_objectB": "Second 32 byte value to insert into the container."
}
},
"push2(bytes32,bytes32,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_objectA": "First 32 byte value to insert into the container.",
"_objectB": "Second 32 byte value to insert into the container."
}
},
"setGlobalMetadata(bytes27)": {
"params": {
"_globalMetadata": "New global metadata to set."
}
}
},
"title": "OVM_ChainStorageContainer",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {
"deleteElementsAfterInclusive(uint256)": {
"notice": "Removes all objects after and including a given index."
},
"deleteElementsAfterInclusive(uint256,bytes27)": {
"notice": "Removes all objects after and including a given index. Also allows setting the global metadata field."
},
"get(uint256)": {
"notice": "Retrieves an object from the container."
},
"getGlobalMetadata()": {
"notice": "Retrieves the container's global metadata field."
},
"length()": {
"notice": "Retrieves the number of objects stored in the container."
},
"push(bytes32)": {
"notice": "Pushes an object into the container."
},
"push(bytes32,bytes27)": {
"notice": "Pushes an object into the container. Function allows setting the global metadata since we'll need to touch the \"length\" storage slot anyway, which also contains the global metadata (it's an optimization)."
},
"push2(bytes32,bytes32)": {
"notice": "Pushes two objects into the container at the same time. A useful optimization."
},
"push2(bytes32,bytes32,bytes27)": {
"notice": "Pushes two objects into the container at the same time. Also allows setting the global metadata field."
},
"setGlobalMetadata(bytes27)": {
"notice": "Sets the container's global metadata field. We're using `bytes27` here because we use five bytes to maintain the length of the underlying data structure, meaning we have an extra 27 bytes to store arbitrary data."
},
"setNextOverwritableIndex(uint256)": {
"notice": "Marks an index as overwritable, meaing the underlying buffer can start to write values over any objects before and including the given index."
}
},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 11707,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "libAddressManager",
"offset": 0,
"slot": "0",
"type": "t_contract(Lib_AddressManager)11700"
},
{
"astId": 2888,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "owner",
"offset": 0,
"slot": "1",
"type": "t_string_storage"
},
{
"astId": 2890,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "buffer",
"offset": 0,
"slot": "2",
"type": "t_struct(RingBuffer)16365_storage"
}
],
"types": {
"t_bytes32": {
"encoding": "inplace",
"label": "bytes32",
"numberOfBytes": "32"
},
"t_contract(Lib_AddressManager)11700": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
},
"t_mapping(t_uint256,t_bytes32)": {
"encoding": "mapping",
"key": "t_uint256",
"label": "mapping(uint256 => bytes32)",
"numberOfBytes": "32",
"value": "t_bytes32"
},
"t_string_storage": {
"encoding": "bytes",
"label": "string",
"numberOfBytes": "32"
},
"t_struct(Buffer)16354_storage": {
"encoding": "inplace",
"label": "struct Lib_RingBuffer.Buffer",
"members": [
{
"astId": 16349,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "length",
"offset": 0,
"slot": "0",
"type": "t_uint256"
},
{
"astId": 16353,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "buf",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_uint256,t_bytes32)"
}
],
"numberOfBytes": "64"
},
"t_struct(RingBuffer)16365_storage": {
"encoding": "inplace",
"label": "struct Lib_RingBuffer.RingBuffer",
"members": [
{
"astId": 16356,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "contextA",
"offset": 0,
"slot": "0",
"type": "t_bytes32"
},
{
"astId": 16358,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "contextB",
"offset": 0,
"slot": "1",
"type": "t_bytes32"
},
{
"astId": 16360,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "bufferA",
"offset": 0,
"slot": "2",
"type": "t_struct(Buffer)16354_storage"
},
{
"astId": 16362,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "bufferB",
"offset": 0,
"slot": "4",
"type": "t_struct(Buffer)16354_storage"
},
{
"astId": 16364,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "nextOverwritableIndex",
"offset": 0,
"slot": "6",
"type": "t_uint256"
}
],
"numberOfBytes": "224"
},
"t_uint256": {
"encoding": "inplace",
"label": "uint256",
"numberOfBytes": "32"
}
}
}
}
\ No newline at end of file
{
"address": "0x62De49fe8215DFF88b9C1a2ea573E1471fF61f83",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_libAddressManager",
"type": "address"
},
{
"internalType": "string",
"name": "_owner",
"type": "string"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "deleteElementsAfterInclusive",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "deleteElementsAfterInclusive",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "get",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getGlobalMetadata",
"outputs": [
{
"internalType": "bytes27",
"name": "",
"type": "bytes27"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "length",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_object",
"type": "bytes32"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "push",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_object",
"type": "bytes32"
}
],
"name": "push",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_objectA",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_objectB",
"type": "bytes32"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "push2",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_objectA",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_objectB",
"type": "bytes32"
}
],
"name": "push2",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "resolve",
"outputs": [
{
"internalType": "address",
"name": "_contract",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "setGlobalMetadata",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "setNextOverwritableIndex",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"transactionHash": "0x99b89c2345373c5b66554e90da495293799b15988d76cbddc60ff7ab8e9cb996",
"receipt": {
"to": null,
"from": "0x558ba9b8d78713fbf768c1f8a584485B4003f43F",
"contractAddress": "0xC9DE904214A3496b23E54d7876e4A5CfD4584F49",
"transactionIndex": 0,
"gasUsed": "1103714",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0xc4de8bb6a3be0356605a754b0f0913dc2d1ce2a52dd31480cf90815785cd7e9e",
"transactionHash": "0x99b89c2345373c5b66554e90da495293799b15988d76cbddc60ff7ab8e9cb996",
"logs": [],
"blockNumber": 4573379,
"cumulativeGasUsed": "1103714",
"status": 1,
"byzantium": true
},
"args": [
"0x1De8CFD4C1A486200286073aE91DE6e8099519f1",
"OVM_CanonicalTransactionChain"
],
"solcInputHash": "cebcb515c1a9c570d96e0b8f6fd237e2",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_owner\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"deleteElementsAfterInclusive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"deleteElementsAfterInclusive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"get\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGlobalMetadata\",\"outputs\":[{\"internalType\":\"bytes27\",\"name\":\"\",\"type\":\"bytes27\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"length\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_object\",\"type\":\"bytes32\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"push\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_object\",\"type\":\"bytes32\"}],\"name\":\"push\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_objectA\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_objectB\",\"type\":\"bytes32\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"push2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_objectA\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_objectB\",\"type\":\"bytes32\"}],\"name\":\"push2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"setGlobalMetadata\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"setNextOverwritableIndex\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_libAddressManager\":\"Address of the Address Manager.\",\"_owner\":\"Name of the contract that owns this container (will be resolved later).\"}},\"deleteElementsAfterInclusive(uint256)\":{\"params\":{\"_index\":\"Object index to delete from.\"}},\"deleteElementsAfterInclusive(uint256,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_index\":\"Object index to delete from.\"}},\"get(uint256)\":{\"params\":{\"_index\":\"Index of the particular object to access.\"},\"returns\":{\"_0\":\"32 byte object value.\"}},\"getGlobalMetadata()\":{\"returns\":{\"_0\":\"Container global metadata field.\"}},\"length()\":{\"returns\":{\"_0\":\"Number of objects in the container.\"}},\"push(bytes32)\":{\"params\":{\"_object\":\"A 32 byte value to insert into the container.\"}},\"push(bytes32,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_object\":\"A 32 byte value to insert into the container.\"}},\"push2(bytes32,bytes32)\":{\"params\":{\"_objectA\":\"First 32 byte value to insert into the container.\",\"_objectB\":\"Second 32 byte value to insert into the container.\"}},\"push2(bytes32,bytes32,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_objectA\":\"First 32 byte value to insert into the container.\",\"_objectB\":\"Second 32 byte value to insert into the container.\"}},\"setGlobalMetadata(bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata to set.\"}}},\"title\":\"OVM_ChainStorageContainer\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deleteElementsAfterInclusive(uint256)\":{\"notice\":\"Removes all objects after and including a given index.\"},\"deleteElementsAfterInclusive(uint256,bytes27)\":{\"notice\":\"Removes all objects after and including a given index. Also allows setting the global metadata field.\"},\"get(uint256)\":{\"notice\":\"Retrieves an object from the container.\"},\"getGlobalMetadata()\":{\"notice\":\"Retrieves the container's global metadata field.\"},\"length()\":{\"notice\":\"Retrieves the number of objects stored in the container.\"},\"push(bytes32)\":{\"notice\":\"Pushes an object into the container.\"},\"push(bytes32,bytes27)\":{\"notice\":\"Pushes an object into the container. Function allows setting the global metadata since we'll need to touch the \\\"length\\\" storage slot anyway, which also contains the global metadata (it's an optimization).\"},\"push2(bytes32,bytes32)\":{\"notice\":\"Pushes two objects into the container at the same time. A useful optimization.\"},\"push2(bytes32,bytes32,bytes27)\":{\"notice\":\"Pushes two objects into the container at the same time. Also allows setting the global metadata field.\"},\"setGlobalMetadata(bytes27)\":{\"notice\":\"Sets the container's global metadata field. We're using `bytes27` here because we use five bytes to maintain the length of the underlying data structure, meaning we have an extra 27 bytes to store arbitrary data.\"},\"setNextOverwritableIndex(uint256)\":{\"notice\":\"Marks an index as overwritable, meaing the underlying buffer can start to write values over any objects before and including the given index.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol\":\"OVM_ChainStorageContainer\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol\":{\"content\":\"pragma solidity ^0.7.0;\\n\\n/* Library Imports */\\nimport { Lib_RingBuffer } from \\\"../../libraries/utils/Lib_RingBuffer.sol\\\";\\nimport { Lib_AddressResolver } from \\\"../../libraries/resolver/Lib_AddressResolver.sol\\\";\\n\\n/* Interface Imports */\\nimport { iOVM_ChainStorageContainer } from \\\"../../iOVM/chain/iOVM_ChainStorageContainer.sol\\\";\\n\\n/**\\n * @title OVM_ChainStorageContainer\\n */\\ncontract OVM_ChainStorageContainer is iOVM_ChainStorageContainer, Lib_AddressResolver {\\n\\n /*************\\n * Libraries *\\n *************/\\n\\n using Lib_RingBuffer for Lib_RingBuffer.RingBuffer;\\n\\n\\n /*************\\n * Variables *\\n *************/\\n\\n string public owner;\\n Lib_RingBuffer.RingBuffer internal buffer;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n \\n /**\\n * @param _libAddressManager Address of the Address Manager.\\n * @param _owner Name of the contract that owns this container (will be resolved later).\\n */\\n constructor(\\n address _libAddressManager,\\n string memory _owner\\n )\\n Lib_AddressResolver(_libAddressManager)\\n {\\n owner = _owner;\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n \\n modifier onlyOwner() {\\n require(\\n msg.sender == resolve(owner),\\n \\\"OVM_ChainStorageContainer: Function can only be called by the owner.\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function setGlobalMetadata(\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n return buffer.setExtraData(_globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function getGlobalMetadata()\\n override\\n public\\n view\\n returns (\\n bytes27\\n )\\n {\\n return buffer.getExtraData();\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function length()\\n override\\n public\\n view\\n returns (\\n uint256\\n )\\n {\\n return uint256(buffer.getLength());\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push(\\n bytes32 _object\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push(_object);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push(\\n bytes32 _object,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push(_object, _globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push2(_objectA, _objectB);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push2(_objectA, _objectB, _globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function get(\\n uint256 _index\\n )\\n override\\n public\\n view\\n returns (\\n bytes32\\n )\\n {\\n return buffer.get(uint40(_index));\\n }\\n \\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.deleteElementsAfterInclusive(\\n uint40(_index)\\n );\\n }\\n \\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.deleteElementsAfterInclusive(\\n uint40(_index),\\n _globalMetadata\\n );\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function setNextOverwritableIndex(\\n uint256 _index\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.nextOverwritableIndex = _index;\\n }\\n}\\n\",\"keccak256\":\"0xc722e9528988810bd754002dfe3923bc9ac9252c1d981c4803fd5053603bfb11\"},\"contracts/optimistic-ethereum/iOVM/chain/iOVM_ChainStorageContainer.sol\":{\"content\":\"pragma solidity ^0.7.0;\\n\\n/**\\n * @title iOVM_ChainStorageContainer\\n */\\ninterface iOVM_ChainStorageContainer {\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Sets the container's global metadata field. We're using `bytes27` here because we use five\\n * bytes to maintain the length of the underlying data structure, meaning we have an extra\\n * 27 bytes to store arbitrary data.\\n * @param _globalMetadata New global metadata to set.\\n */\\n function setGlobalMetadata(\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Retrieves the container's global metadata field.\\n * @return Container global metadata field.\\n */\\n function getGlobalMetadata()\\n external\\n view\\n returns (\\n bytes27\\n );\\n\\n /**\\n * Retrieves the number of objects stored in the container.\\n * @return Number of objects in the container.\\n */\\n function length()\\n external\\n view\\n returns (\\n uint256\\n );\\n\\n /**\\n * Pushes an object into the container.\\n * @param _object A 32 byte value to insert into the container.\\n */\\n function push(\\n bytes32 _object\\n )\\n external;\\n\\n /**\\n * Pushes an object into the container. Function allows setting the global metadata since\\n * we'll need to touch the \\\"length\\\" storage slot anyway, which also contains the global\\n * metadata (it's an optimization).\\n * @param _object A 32 byte value to insert into the container.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function push(\\n bytes32 _object,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Pushes two objects into the container at the same time. A useful optimization.\\n * @param _objectA First 32 byte value to insert into the container.\\n * @param _objectB Second 32 byte value to insert into the container.\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB\\n )\\n external;\\n\\n /**\\n * Pushes two objects into the container at the same time. Also allows setting the global\\n * metadata field.\\n * @param _objectA First 32 byte value to insert into the container.\\n * @param _objectB Second 32 byte value to insert into the container.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Retrieves an object from the container.\\n * @param _index Index of the particular object to access.\\n * @return 32 byte object value.\\n */\\n function get(\\n uint256 _index\\n )\\n external\\n view\\n returns (\\n bytes32\\n );\\n\\n /**\\n * Removes all objects after and including a given index.\\n * @param _index Object index to delete from.\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index\\n )\\n external;\\n\\n /**\\n * Removes all objects after and including a given index. Also allows setting the global\\n * metadata field.\\n * @param _index Object index to delete from.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Marks an index as overwritable, meaing the underlying buffer can start to write values over\\n * any objects before and including the given index.\\n */\\n function setNextOverwritableIndex(\\n uint256 _index\\n )\\n external;\\n}\\n\",\"keccak256\":\"0xcfca7da85b35d94c27581c2460b0d48fd0cc51fa72670cc7a2f7f760fb21a2f0\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0xdf802e1cc6474df913626991e9fca3835c620a519f397afe04bf9c260e723257\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_AddressResolver\\n */\\ncontract Lib_AddressResolver {\\n\\n /*******************************************\\n * Contract Variables: Contract References *\\n *******************************************/\\n\\n Lib_AddressManager internal libAddressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n */\\n constructor(\\n address _libAddressManager\\n ) public {\\n libAddressManager = Lib_AddressManager(_libAddressManager);\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function resolve(\\n string memory _name\\n )\\n public\\n view\\n returns (\\n address _contract\\n )\\n {\\n return libAddressManager.getAddress(_name);\\n }\\n}\\n\",\"keccak256\":\"0xf3b9d78b309ddeec259ce3e0e1cfdef3ca40938e9a81971b28ce2b8ea327f533\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() internal {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xe0409fbd236d16ca6be439d9d97dd36d0d9a0697ee0062d49588b9d29c248e47\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/utils/Lib_RingBuffer.sol\":{\"content\":\"pragma solidity ^0.7.0;\\n\\nlibrary Lib_RingBuffer {\\n using Lib_RingBuffer for RingBuffer;\\n\\n /***********\\n * Structs *\\n ***********/\\n\\n struct Buffer {\\n uint256 length;\\n mapping (uint256 => bytes32) buf;\\n }\\n\\n struct RingBuffer {\\n bytes32 contextA;\\n bytes32 contextB;\\n Buffer bufferA;\\n Buffer bufferB;\\n uint256 nextOverwritableIndex;\\n }\\n\\n struct RingBufferContext {\\n // contextA\\n uint40 globalIndex;\\n bytes27 extraData;\\n\\n // contextB\\n uint64 currBufferIndex;\\n uint40 prevResetIndex;\\n uint40 currResetIndex;\\n }\\n\\n\\n /*************\\n * Constants *\\n *************/\\n\\n uint256 constant MIN_CAPACITY = 16;\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * Pushes a single element to the buffer.\\n * @param _self Buffer to access.\\n * @param _value Value to push to the buffer.\\n * @param _extraData Optional global extra data.\\n */\\n function push(\\n RingBuffer storage _self,\\n bytes32 _value,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n\\n // Set a minimum capacity.\\n if (currBuffer.length == 0) {\\n currBuffer.length = MIN_CAPACITY;\\n }\\n\\n // Check if we need to expand the buffer.\\n if (ctx.globalIndex - ctx.currResetIndex >= currBuffer.length) {\\n if (ctx.currResetIndex < _self.nextOverwritableIndex) {\\n // We're going to overwrite the inactive buffer.\\n // Bump the buffer index, reset the delete offset, and set our reset indices.\\n ctx.currBufferIndex++;\\n ctx.prevResetIndex = ctx.currResetIndex;\\n ctx.currResetIndex = ctx.globalIndex;\\n\\n // Swap over to the next buffer.\\n currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n } else {\\n // We're not overwriting yet, double the length of the current buffer.\\n currBuffer.length *= 2;\\n }\\n }\\n\\n // Index to write to is the difference of the global and reset indices.\\n uint256 writeHead = ctx.globalIndex - ctx.currResetIndex;\\n currBuffer.buf[writeHead] = _value;\\n\\n // Bump the global index and insert our extra data, then save the context.\\n ctx.globalIndex++;\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Pushes a single element to the buffer.\\n * @param _self Buffer to access.\\n * @param _value Value to push to the buffer.\\n */\\n function push(\\n RingBuffer storage _self,\\n bytes32 _value\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n \\n _self.push(\\n _value,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Pushes a two elements to the buffer.\\n * @param _self Buffer to access.\\n * @param _valueA First value to push to the buffer.\\n * @param _valueA Second value to push to the buffer.\\n * @param _extraData Optional global extra data.\\n */\\n function push2(\\n RingBuffer storage _self,\\n bytes32 _valueA,\\n bytes32 _valueB,\\n bytes27 _extraData\\n )\\n internal\\n {\\n _self.push(_valueA, _extraData);\\n _self.push(_valueB, _extraData);\\n }\\n\\n /**\\n * Pushes a two elements to the buffer.\\n * @param _self Buffer to access.\\n * @param _valueA First value to push to the buffer.\\n * @param _valueA Second value to push to the buffer.\\n */\\n function push2(\\n RingBuffer storage _self,\\n bytes32 _valueA,\\n bytes32 _valueB\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n _self.push2(\\n _valueA,\\n _valueB,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Retrieves an element from the buffer.\\n * @param _self Buffer to access.\\n * @param _index Element index to retrieve.\\n * @return Value of the element at the given index.\\n */\\n function get(\\n RingBuffer storage _self,\\n uint256 _index\\n )\\n internal\\n view\\n returns (\\n bytes32 \\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n require(\\n _index < ctx.globalIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n Buffer storage prevBuffer = _self.getBuffer(ctx.currBufferIndex + 1);\\n\\n if (_index >= ctx.currResetIndex) {\\n // We're trying to load an element from the current buffer.\\n // Relative index is just the difference from the reset index.\\n uint256 relativeIndex = _index - ctx.currResetIndex;\\n\\n // Shouldn't happen but why not check.\\n require(\\n relativeIndex < currBuffer.length,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n return currBuffer.buf[relativeIndex];\\n } else {\\n // We're trying to load an element from the previous buffer.\\n // Relative index is the difference from the reset index in the other direction.\\n uint256 relativeIndex = ctx.currResetIndex - _index;\\n\\n // Condition only fails in the case that we deleted and flipped buffers.\\n require(\\n ctx.currResetIndex > ctx.prevResetIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n // Make sure we're not trying to read beyond the array.\\n require(\\n relativeIndex <= prevBuffer.length,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n return prevBuffer.buf[prevBuffer.length - relativeIndex];\\n }\\n }\\n\\n /**\\n * Deletes all elements after (and including) a given index.\\n * @param _self Buffer to access.\\n * @param _index Index of the element to delete from (inclusive).\\n * @param _extraData Optional global extra data.\\n */\\n function deleteElementsAfterInclusive(\\n RingBuffer storage _self,\\n uint40 _index,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n require(\\n _index < ctx.globalIndex && _index >= ctx.prevResetIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n Buffer storage prevBuffer = _self.getBuffer(ctx.currBufferIndex + 1);\\n\\n if (_index < ctx.currResetIndex) {\\n // We're switching back to the previous buffer.\\n // Reduce the buffer index, set the current reset index back to match the previous one.\\n // We use the equality of these two values to prevent reading beyond this buffer.\\n ctx.currBufferIndex--;\\n ctx.currResetIndex = ctx.prevResetIndex;\\n }\\n\\n // Set our global index and extra data, save the context.\\n ctx.globalIndex = _index;\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Deletes all elements after (and including) a given index.\\n * @param _self Buffer to access.\\n * @param _index Index of the element to delete from (inclusive).\\n */\\n function deleteElementsAfterInclusive(\\n RingBuffer storage _self,\\n uint40 _index\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n _self.deleteElementsAfterInclusive(\\n _index,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Retrieves the current global index.\\n * @param _self Buffer to access.\\n * @return Current global index.\\n */\\n function getLength(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n uint40\\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n return ctx.globalIndex;\\n }\\n\\n /**\\n * Changes current global extra data.\\n * @param _self Buffer to access.\\n * @param _extraData New global extra data.\\n */\\n function setExtraData(\\n RingBuffer storage _self,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Retrieves the current global extra data.\\n * @param _self Buffer to access.\\n * @return Current global extra data.\\n */\\n function getExtraData(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n bytes27\\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n return ctx.extraData;\\n }\\n\\n /**\\n * Sets the current ring buffer context.\\n * @param _self Buffer to access.\\n * @param _ctx Current ring buffer context.\\n */\\n function setContext(\\n RingBuffer storage _self,\\n RingBufferContext memory _ctx\\n )\\n internal\\n returns (\\n bytes32\\n )\\n {\\n bytes32 contextA;\\n bytes32 contextB;\\n\\n uint40 globalIndex = _ctx.globalIndex;\\n bytes27 extraData = _ctx.extraData;\\n assembly {\\n contextA := globalIndex\\n contextA := or(contextA, extraData)\\n }\\n\\n uint64 currBufferIndex = _ctx.currBufferIndex;\\n uint40 prevResetIndex = _ctx.prevResetIndex;\\n uint40 currResetIndex = _ctx.currResetIndex;\\n assembly {\\n contextB := currBufferIndex\\n contextB := or(contextB, shl(64, prevResetIndex))\\n contextB := or(contextB, shl(104, currResetIndex))\\n }\\n\\n if (_self.contextA != contextA) {\\n _self.contextA = contextA;\\n }\\n\\n if (_self.contextB != contextB) {\\n _self.contextB = contextB;\\n }\\n }\\n\\n /**\\n * Retrieves the current ring buffer context.\\n * @param _self Buffer to access.\\n * @return Current ring buffer context.\\n */\\n function getContext(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n RingBufferContext memory\\n )\\n {\\n bytes32 contextA = _self.contextA;\\n bytes32 contextB = _self.contextB;\\n\\n uint40 globalIndex;\\n bytes27 extraData;\\n assembly {\\n globalIndex := and(contextA, 0x000000000000000000000000000000000000000000000000000000FFFFFFFFFF)\\n extraData := and(contextA, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000)\\n }\\n\\n uint64 currBufferIndex;\\n uint40 prevResetIndex;\\n uint40 currResetIndex;\\n assembly {\\n currBufferIndex := and(contextB, 0x000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFF)\\n prevResetIndex := shr(64, and(contextB, 0x00000000000000000000000000000000000000FFFFFFFFFF0000000000000000))\\n currResetIndex := shr(104, and(contextB, 0x0000000000000000000000000000FFFFFFFFFF00000000000000000000000000))\\n }\\n\\n return RingBufferContext({\\n globalIndex: globalIndex,\\n extraData: extraData,\\n currBufferIndex: currBufferIndex,\\n prevResetIndex: prevResetIndex,\\n currResetIndex: currResetIndex\\n });\\n }\\n\\n /**\\n * Retrieves the a buffer from the ring buffer by index.\\n * @param _self Buffer to access.\\n * @param _which Index of the sub buffer to access.\\n * @return Sub buffer for the index.\\n */\\n function getBuffer(\\n RingBuffer storage _self,\\n uint256 _which\\n )\\n internal\\n view\\n returns (\\n Buffer storage\\n )\\n {\\n return _which % 2 == 0 ? _self.bufferA : _self.bufferB;\\n }\\n}\\n\",\"keccak256\":\"0x0c4bb53aba64441b2ec26e7a13de8f04f104bb654e550ccc30db500cac33d2a3\"}},\"version\":1}",
"bytecode": "0x60806040523480156200001157600080fd5b50604051620013f3380380620013f3833981810160405260408110156200003757600080fd5b8151602083018051604051929492938301929190846401000000008211156200005f57600080fd5b9083019060208201858111156200007557600080fd5b82516401000000008111828201881017156200009057600080fd5b82525081516020918201929091019080838360005b83811015620000bf578181015183820152602001620000a5565b50505050905090810190601f168015620000ed5780820380516001836020036101000a031916815260200191505b506040525050600080546001600160a01b0319166001600160a01b038516179055508051620001249060019060208401906200012d565b505050620001d9565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001655760008555620001b0565b82601f106200018057805160ff1916838001178555620001b0565b82800160010185558215620001b0579182015b82811115620001b057825182559160200191906001019062000193565b50620001be929150620001c2565b5090565b5b80821115620001be5760008155600101620001c3565b61120a80620001e96000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80634651d91e1161008c578063b298e36b11610066578063b298e36b14610315578063ccf8f96914610332578063d41c021814610355578063fa9e936c14610378576100cf565b80634651d91e1461025e5780638da5cb5b1461027b5780639507d39a146102f8576100cf565b806314f22255146100d4578063167fd681146101075780631f7b6d32146101325780632015276c1461014c57806329061de214610177578063461a44781461019c575b600080fd5b610105600480360360608110156100ea57600080fd5b508035906020810135906040013564ffffffffff1916610395565b005b6101056004803603604081101561011d57600080fd5b508035906020013564ffffffffff191661048c565b61013a61054c565b60408051918252519081900360200190f35b6101056004803603604081101561016257600080fd5b508035906020013564ffffffffff1916610564565b6101056004803603602081101561018d57600080fd5b503564ffffffffff1916610620565b610242600480360360208110156101b257600080fd5b8101906020810181356401000000008111156101cd57600080fd5b8201836020820111156101df57600080fd5b8035906020019184600183028401116401000000008311171561020157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506106de945050505050565b604080516001600160a01b039092168252519081900360200190f35b6101056004803603602081101561027457600080fd5b50356107ba565b610283610875565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102bd5781810151838201526020016102a5565b50505050905090810190601f1680156102ea5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61013a6004803603602081101561030e57600080fd5b5035610902565b6101056004803603602081101561032b57600080fd5b503561091c565b61033a6109d7565b6040805164ffffffffff199092168252519081900360200190f35b6101056004803603604081101561036b57600080fd5b50803590602001356109e8565b6101056004803603602081101561038e57600080fd5b5035610aa4565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261042b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b820191906000526020600020905b81548152906001019060200180831161040457829003601f168201915b50505050506106de565b6001600160a01b0316336001600160a01b03161461047a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6104876002848484610b59565b505050565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526104ed93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461053c5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610b75565b5050565b60006105586002610cb7565b64ffffffffff16905090565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526105c593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106145760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610ccb565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261068193909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106d05760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610dca565b50565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b8381101561073e578181015183820152602001610726565b50505050905090810190601f16801561076b5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561078857600080fd5b505afa15801561079c573d6000803e3d6000fd5b505050506040513d60208110156107b257600080fd5b505192915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261081b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461086a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610def565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108fa5780601f106108cf576101008083540402835291602001916108fa565b820191906000526020600020905b8154815290600101906020018083116108dd57829003601f168201915b505050505081565b6000610916600264ffffffffff8416610e15565b92915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261097d93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146109cc5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db60028261101e565b60006109e36002611044565b905090565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610a4993909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610a985760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6105486002838361105b565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610b0593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610b545760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b600855565b610b64848483610ccb565b610b6f848383610ccb565b50505050565b6000610b8084611083565b9050806000015164ffffffffff168364ffffffffff16108015610bb55750806060015164ffffffffff168364ffffffffff1610155b610bfd576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610c20826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610c48836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168564ffffffffff161015610c8c576040830180516000190167ffffffffffffffff169052606083015164ffffffffff1660808401525b64ffffffffff8516835264ffffffffff1984166020840152610cae8684611103565b50505050505050565b600080610cc383611083565b519392505050565b6000610cd684611083565b90506000610cfb826040015167ffffffffffffffff16866110e390919063ffffffff16565b8054909150610d0957601081555b8054608083015183510364ffffffffff1610610d80578460060154826080015164ffffffffff161015610d785760408201805160010167ffffffffffffffff169081905260808301805164ffffffffff90811660608601528451169052610d719086906110e3565b9050610d80565b805460020281555b608082015182510364ffffffffff9081166000818152600184810160209081526040909220889055855101909216845264ffffffffff19851691840191909152610cae8684611103565b6000610dd583611083565b64ffffffffff19831660208201529050610b6f8382611103565b6000610dfa83611083565b905061048782826020015185610b759092919063ffffffff16565b600080610e2184611083565b805190915064ffffffffff168310610e77576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610e9a826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610ec2836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168510610f4f576080830151825464ffffffffff9091168603908110610f33576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000908152600190920160205250604090205491506109169050565b6080830151606084015164ffffffffff9182168781039290911610610fb2576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154811115610fff576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154036000908152600190910160205260409020549250610916915050565b600061102983611083565b905061048782826020015185610ccb9092919063ffffffff16565b60008061105083611083565b602001519392505050565b600061106684611083565b9050610b6f8383836020015187610b59909392919063ffffffff16565b61108b611162565b5080546001909101546040805160a08101825264ffffffffff808516825264ffffffffff19909416602082015267ffffffffffffffff8316818301529082901c8316606082015260689190911c909116608082015290565b600060028206156110f757826004016110fc565b826002015b9392505050565b80516020820151604080840151606085015160808601518754600096868117969584901b8517606884901b17959094909390929091871461114257868a555b858a60010154146111555760018a018690555b5050505050505092915050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe4f564d5f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206f776e65722ea264697066735822122037f5f91f3a7302668798afaeee2c0c2d9aad06dfcc80e263efc2cd8f4842eebe64736f6c63430007060033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c80634651d91e1161008c578063b298e36b11610066578063b298e36b14610315578063ccf8f96914610332578063d41c021814610355578063fa9e936c14610378576100cf565b80634651d91e1461025e5780638da5cb5b1461027b5780639507d39a146102f8576100cf565b806314f22255146100d4578063167fd681146101075780631f7b6d32146101325780632015276c1461014c57806329061de214610177578063461a44781461019c575b600080fd5b610105600480360360608110156100ea57600080fd5b508035906020810135906040013564ffffffffff1916610395565b005b6101056004803603604081101561011d57600080fd5b508035906020013564ffffffffff191661048c565b61013a61054c565b60408051918252519081900360200190f35b6101056004803603604081101561016257600080fd5b508035906020013564ffffffffff1916610564565b6101056004803603602081101561018d57600080fd5b503564ffffffffff1916610620565b610242600480360360208110156101b257600080fd5b8101906020810181356401000000008111156101cd57600080fd5b8201836020820111156101df57600080fd5b8035906020019184600183028401116401000000008311171561020157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506106de945050505050565b604080516001600160a01b039092168252519081900360200190f35b6101056004803603602081101561027457600080fd5b50356107ba565b610283610875565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102bd5781810151838201526020016102a5565b50505050905090810190601f1680156102ea5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61013a6004803603602081101561030e57600080fd5b5035610902565b6101056004803603602081101561032b57600080fd5b503561091c565b61033a6109d7565b6040805164ffffffffff199092168252519081900360200190f35b6101056004803603604081101561036b57600080fd5b50803590602001356109e8565b6101056004803603602081101561038e57600080fd5b5035610aa4565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261042b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b820191906000526020600020905b81548152906001019060200180831161040457829003601f168201915b50505050506106de565b6001600160a01b0316336001600160a01b03161461047a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6104876002848484610b59565b505050565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526104ed93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461053c5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610b75565b5050565b60006105586002610cb7565b64ffffffffff16905090565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526105c593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106145760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610ccb565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261068193909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106d05760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610dca565b50565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b8381101561073e578181015183820152602001610726565b50505050905090810190601f16801561076b5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561078857600080fd5b505afa15801561079c573d6000803e3d6000fd5b505050506040513d60208110156107b257600080fd5b505192915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261081b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461086a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610def565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108fa5780601f106108cf576101008083540402835291602001916108fa565b820191906000526020600020905b8154815290600101906020018083116108dd57829003601f168201915b505050505081565b6000610916600264ffffffffff8416610e15565b92915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261097d93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146109cc5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db60028261101e565b60006109e36002611044565b905090565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610a4993909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610a985760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6105486002838361105b565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610b0593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610b545760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b600855565b610b64848483610ccb565b610b6f848383610ccb565b50505050565b6000610b8084611083565b9050806000015164ffffffffff168364ffffffffff16108015610bb55750806060015164ffffffffff168364ffffffffff1610155b610bfd576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610c20826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610c48836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168564ffffffffff161015610c8c576040830180516000190167ffffffffffffffff169052606083015164ffffffffff1660808401525b64ffffffffff8516835264ffffffffff1984166020840152610cae8684611103565b50505050505050565b600080610cc383611083565b519392505050565b6000610cd684611083565b90506000610cfb826040015167ffffffffffffffff16866110e390919063ffffffff16565b8054909150610d0957601081555b8054608083015183510364ffffffffff1610610d80578460060154826080015164ffffffffff161015610d785760408201805160010167ffffffffffffffff169081905260808301805164ffffffffff90811660608601528451169052610d719086906110e3565b9050610d80565b805460020281555b608082015182510364ffffffffff9081166000818152600184810160209081526040909220889055855101909216845264ffffffffff19851691840191909152610cae8684611103565b6000610dd583611083565b64ffffffffff19831660208201529050610b6f8382611103565b6000610dfa83611083565b905061048782826020015185610b759092919063ffffffff16565b600080610e2184611083565b805190915064ffffffffff168310610e77576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610e9a826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610ec2836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168510610f4f576080830151825464ffffffffff9091168603908110610f33576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000908152600190920160205250604090205491506109169050565b6080830151606084015164ffffffffff9182168781039290911610610fb2576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154811115610fff576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154036000908152600190910160205260409020549250610916915050565b600061102983611083565b905061048782826020015185610ccb9092919063ffffffff16565b60008061105083611083565b602001519392505050565b600061106684611083565b9050610b6f8383836020015187610b59909392919063ffffffff16565b61108b611162565b5080546001909101546040805160a08101825264ffffffffff808516825264ffffffffff19909416602082015267ffffffffffffffff8316818301529082901c8316606082015260689190911c909116608082015290565b600060028206156110f757826004016110fc565b826002015b9392505050565b80516020820151604080840151606085015160808601518754600096868117969584901b8517606884901b17959094909390929091871461114257868a555b858a60010154146111555760018a018690555b5050505050505092915050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe4f564d5f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206f776e65722ea264697066735822122037f5f91f3a7302668798afaeee2c0c2d9aad06dfcc80e263efc2cd8f4842eebe64736f6c63430007060033",
"devdoc": {
"kind": "dev",
"methods": {
"constructor": {
"params": {
"_libAddressManager": "Address of the Address Manager.",
"_owner": "Name of the contract that owns this container (will be resolved later)."
}
},
"deleteElementsAfterInclusive(uint256)": {
"params": {
"_index": "Object index to delete from."
}
},
"deleteElementsAfterInclusive(uint256,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_index": "Object index to delete from."
}
},
"get(uint256)": {
"params": {
"_index": "Index of the particular object to access."
},
"returns": {
"_0": "32 byte object value."
}
},
"getGlobalMetadata()": {
"returns": {
"_0": "Container global metadata field."
}
},
"length()": {
"returns": {
"_0": "Number of objects in the container."
}
},
"push(bytes32)": {
"params": {
"_object": "A 32 byte value to insert into the container."
}
},
"push(bytes32,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_object": "A 32 byte value to insert into the container."
}
},
"push2(bytes32,bytes32)": {
"params": {
"_objectA": "First 32 byte value to insert into the container.",
"_objectB": "Second 32 byte value to insert into the container."
}
},
"push2(bytes32,bytes32,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_objectA": "First 32 byte value to insert into the container.",
"_objectB": "Second 32 byte value to insert into the container."
}
},
"setGlobalMetadata(bytes27)": {
"params": {
"_globalMetadata": "New global metadata to set."
}
}
},
"title": "OVM_ChainStorageContainer",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {
"deleteElementsAfterInclusive(uint256)": {
"notice": "Removes all objects after and including a given index."
},
"deleteElementsAfterInclusive(uint256,bytes27)": {
"notice": "Removes all objects after and including a given index. Also allows setting the global metadata field."
},
"get(uint256)": {
"notice": "Retrieves an object from the container."
},
"getGlobalMetadata()": {
"notice": "Retrieves the container's global metadata field."
},
"length()": {
"notice": "Retrieves the number of objects stored in the container."
},
"push(bytes32)": {
"notice": "Pushes an object into the container."
},
"push(bytes32,bytes27)": {
"notice": "Pushes an object into the container. Function allows setting the global metadata since we'll need to touch the \"length\" storage slot anyway, which also contains the global metadata (it's an optimization)."
},
"push2(bytes32,bytes32)": {
"notice": "Pushes two objects into the container at the same time. A useful optimization."
},
"push2(bytes32,bytes32,bytes27)": {
"notice": "Pushes two objects into the container at the same time. Also allows setting the global metadata field."
},
"setGlobalMetadata(bytes27)": {
"notice": "Sets the container's global metadata field. We're using `bytes27` here because we use five bytes to maintain the length of the underlying data structure, meaning we have an extra 27 bytes to store arbitrary data."
},
"setNextOverwritableIndex(uint256)": {
"notice": "Marks an index as overwritable, meaing the underlying buffer can start to write values over any objects before and including the given index."
}
},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 11707,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "libAddressManager",
"offset": 0,
"slot": "0",
"type": "t_contract(Lib_AddressManager)11700"
},
{
"astId": 2888,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "owner",
"offset": 0,
"slot": "1",
"type": "t_string_storage"
},
{
"astId": 2890,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "buffer",
"offset": 0,
"slot": "2",
"type": "t_struct(RingBuffer)16365_storage"
}
],
"types": {
"t_bytes32": {
"encoding": "inplace",
"label": "bytes32",
"numberOfBytes": "32"
},
"t_contract(Lib_AddressManager)11700": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
},
"t_mapping(t_uint256,t_bytes32)": {
"encoding": "mapping",
"key": "t_uint256",
"label": "mapping(uint256 => bytes32)",
"numberOfBytes": "32",
"value": "t_bytes32"
},
"t_string_storage": {
"encoding": "bytes",
"label": "string",
"numberOfBytes": "32"
},
"t_struct(Buffer)16354_storage": {
"encoding": "inplace",
"label": "struct Lib_RingBuffer.Buffer",
"members": [
{
"astId": 16349,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "length",
"offset": 0,
"slot": "0",
"type": "t_uint256"
},
{
"astId": 16353,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "buf",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_uint256,t_bytes32)"
}
],
"numberOfBytes": "64"
},
"t_struct(RingBuffer)16365_storage": {
"encoding": "inplace",
"label": "struct Lib_RingBuffer.RingBuffer",
"members": [
{
"astId": 16356,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "contextA",
"offset": 0,
"slot": "0",
"type": "t_bytes32"
},
{
"astId": 16358,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "contextB",
"offset": 0,
"slot": "1",
"type": "t_bytes32"
},
{
"astId": 16360,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "bufferA",
"offset": 0,
"slot": "2",
"type": "t_struct(Buffer)16354_storage"
},
{
"astId": 16362,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "bufferB",
"offset": 0,
"slot": "4",
"type": "t_struct(Buffer)16354_storage"
},
{
"astId": 16364,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "nextOverwritableIndex",
"offset": 0,
"slot": "6",
"type": "t_uint256"
}
],
"numberOfBytes": "224"
},
"t_uint256": {
"encoding": "inplace",
"label": "uint256",
"numberOfBytes": "32"
}
}
}
}
\ No newline at end of file
{
"address": "0x7C3e67e5E885556cEF01866CB7bdB5A254D35698",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_libAddressManager",
"type": "address"
},
{
"internalType": "string",
"name": "_owner",
"type": "string"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "deleteElementsAfterInclusive",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "deleteElementsAfterInclusive",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "get",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getGlobalMetadata",
"outputs": [
{
"internalType": "bytes27",
"name": "",
"type": "bytes27"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "length",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_object",
"type": "bytes32"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "push",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_object",
"type": "bytes32"
}
],
"name": "push",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_objectA",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_objectB",
"type": "bytes32"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "push2",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_objectA",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_objectB",
"type": "bytes32"
}
],
"name": "push2",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "resolve",
"outputs": [
{
"internalType": "address",
"name": "_contract",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "setGlobalMetadata",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "setNextOverwritableIndex",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"transactionHash": "0x5168f58ec0e907689b4729909da455ae3f39f09f6808faafde219c910e6ef404",
"receipt": {
"to": null,
"from": "0x558ba9b8d78713fbf768c1f8a584485B4003f43F",
"contractAddress": "0x02A1e0C8d29Bf76989F18D56cd502Eba0AC0D212",
"transactionIndex": 1,
"gasUsed": "1103654",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x0a7b99f8dfb069836b98855e10f4febe0718604be13cfe614132e592cf0a134e",
"transactionHash": "0x5168f58ec0e907689b4729909da455ae3f39f09f6808faafde219c910e6ef404",
"logs": [],
"blockNumber": 4573381,
"cumulativeGasUsed": "1128075",
"status": 1,
"byzantium": true
},
"args": [
"0x1De8CFD4C1A486200286073aE91DE6e8099519f1",
"OVM_StateCommitmentChain"
],
"solcInputHash": "cebcb515c1a9c570d96e0b8f6fd237e2",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_owner\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"deleteElementsAfterInclusive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"deleteElementsAfterInclusive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"get\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGlobalMetadata\",\"outputs\":[{\"internalType\":\"bytes27\",\"name\":\"\",\"type\":\"bytes27\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"length\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_object\",\"type\":\"bytes32\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"push\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_object\",\"type\":\"bytes32\"}],\"name\":\"push\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_objectA\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_objectB\",\"type\":\"bytes32\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"push2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_objectA\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_objectB\",\"type\":\"bytes32\"}],\"name\":\"push2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"setGlobalMetadata\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"setNextOverwritableIndex\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_libAddressManager\":\"Address of the Address Manager.\",\"_owner\":\"Name of the contract that owns this container (will be resolved later).\"}},\"deleteElementsAfterInclusive(uint256)\":{\"params\":{\"_index\":\"Object index to delete from.\"}},\"deleteElementsAfterInclusive(uint256,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_index\":\"Object index to delete from.\"}},\"get(uint256)\":{\"params\":{\"_index\":\"Index of the particular object to access.\"},\"returns\":{\"_0\":\"32 byte object value.\"}},\"getGlobalMetadata()\":{\"returns\":{\"_0\":\"Container global metadata field.\"}},\"length()\":{\"returns\":{\"_0\":\"Number of objects in the container.\"}},\"push(bytes32)\":{\"params\":{\"_object\":\"A 32 byte value to insert into the container.\"}},\"push(bytes32,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_object\":\"A 32 byte value to insert into the container.\"}},\"push2(bytes32,bytes32)\":{\"params\":{\"_objectA\":\"First 32 byte value to insert into the container.\",\"_objectB\":\"Second 32 byte value to insert into the container.\"}},\"push2(bytes32,bytes32,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_objectA\":\"First 32 byte value to insert into the container.\",\"_objectB\":\"Second 32 byte value to insert into the container.\"}},\"setGlobalMetadata(bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata to set.\"}}},\"title\":\"OVM_ChainStorageContainer\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deleteElementsAfterInclusive(uint256)\":{\"notice\":\"Removes all objects after and including a given index.\"},\"deleteElementsAfterInclusive(uint256,bytes27)\":{\"notice\":\"Removes all objects after and including a given index. Also allows setting the global metadata field.\"},\"get(uint256)\":{\"notice\":\"Retrieves an object from the container.\"},\"getGlobalMetadata()\":{\"notice\":\"Retrieves the container's global metadata field.\"},\"length()\":{\"notice\":\"Retrieves the number of objects stored in the container.\"},\"push(bytes32)\":{\"notice\":\"Pushes an object into the container.\"},\"push(bytes32,bytes27)\":{\"notice\":\"Pushes an object into the container. Function allows setting the global metadata since we'll need to touch the \\\"length\\\" storage slot anyway, which also contains the global metadata (it's an optimization).\"},\"push2(bytes32,bytes32)\":{\"notice\":\"Pushes two objects into the container at the same time. A useful optimization.\"},\"push2(bytes32,bytes32,bytes27)\":{\"notice\":\"Pushes two objects into the container at the same time. Also allows setting the global metadata field.\"},\"setGlobalMetadata(bytes27)\":{\"notice\":\"Sets the container's global metadata field. We're using `bytes27` here because we use five bytes to maintain the length of the underlying data structure, meaning we have an extra 27 bytes to store arbitrary data.\"},\"setNextOverwritableIndex(uint256)\":{\"notice\":\"Marks an index as overwritable, meaing the underlying buffer can start to write values over any objects before and including the given index.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol\":\"OVM_ChainStorageContainer\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol\":{\"content\":\"pragma solidity ^0.7.0;\\n\\n/* Library Imports */\\nimport { Lib_RingBuffer } from \\\"../../libraries/utils/Lib_RingBuffer.sol\\\";\\nimport { Lib_AddressResolver } from \\\"../../libraries/resolver/Lib_AddressResolver.sol\\\";\\n\\n/* Interface Imports */\\nimport { iOVM_ChainStorageContainer } from \\\"../../iOVM/chain/iOVM_ChainStorageContainer.sol\\\";\\n\\n/**\\n * @title OVM_ChainStorageContainer\\n */\\ncontract OVM_ChainStorageContainer is iOVM_ChainStorageContainer, Lib_AddressResolver {\\n\\n /*************\\n * Libraries *\\n *************/\\n\\n using Lib_RingBuffer for Lib_RingBuffer.RingBuffer;\\n\\n\\n /*************\\n * Variables *\\n *************/\\n\\n string public owner;\\n Lib_RingBuffer.RingBuffer internal buffer;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n \\n /**\\n * @param _libAddressManager Address of the Address Manager.\\n * @param _owner Name of the contract that owns this container (will be resolved later).\\n */\\n constructor(\\n address _libAddressManager,\\n string memory _owner\\n )\\n Lib_AddressResolver(_libAddressManager)\\n {\\n owner = _owner;\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n \\n modifier onlyOwner() {\\n require(\\n msg.sender == resolve(owner),\\n \\\"OVM_ChainStorageContainer: Function can only be called by the owner.\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function setGlobalMetadata(\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n return buffer.setExtraData(_globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function getGlobalMetadata()\\n override\\n public\\n view\\n returns (\\n bytes27\\n )\\n {\\n return buffer.getExtraData();\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function length()\\n override\\n public\\n view\\n returns (\\n uint256\\n )\\n {\\n return uint256(buffer.getLength());\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push(\\n bytes32 _object\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push(_object);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push(\\n bytes32 _object,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push(_object, _globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push2(_objectA, _objectB);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push2(_objectA, _objectB, _globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function get(\\n uint256 _index\\n )\\n override\\n public\\n view\\n returns (\\n bytes32\\n )\\n {\\n return buffer.get(uint40(_index));\\n }\\n \\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.deleteElementsAfterInclusive(\\n uint40(_index)\\n );\\n }\\n \\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.deleteElementsAfterInclusive(\\n uint40(_index),\\n _globalMetadata\\n );\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function setNextOverwritableIndex(\\n uint256 _index\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.nextOverwritableIndex = _index;\\n }\\n}\\n\",\"keccak256\":\"0xc722e9528988810bd754002dfe3923bc9ac9252c1d981c4803fd5053603bfb11\"},\"contracts/optimistic-ethereum/iOVM/chain/iOVM_ChainStorageContainer.sol\":{\"content\":\"pragma solidity ^0.7.0;\\n\\n/**\\n * @title iOVM_ChainStorageContainer\\n */\\ninterface iOVM_ChainStorageContainer {\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Sets the container's global metadata field. We're using `bytes27` here because we use five\\n * bytes to maintain the length of the underlying data structure, meaning we have an extra\\n * 27 bytes to store arbitrary data.\\n * @param _globalMetadata New global metadata to set.\\n */\\n function setGlobalMetadata(\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Retrieves the container's global metadata field.\\n * @return Container global metadata field.\\n */\\n function getGlobalMetadata()\\n external\\n view\\n returns (\\n bytes27\\n );\\n\\n /**\\n * Retrieves the number of objects stored in the container.\\n * @return Number of objects in the container.\\n */\\n function length()\\n external\\n view\\n returns (\\n uint256\\n );\\n\\n /**\\n * Pushes an object into the container.\\n * @param _object A 32 byte value to insert into the container.\\n */\\n function push(\\n bytes32 _object\\n )\\n external;\\n\\n /**\\n * Pushes an object into the container. Function allows setting the global metadata since\\n * we'll need to touch the \\\"length\\\" storage slot anyway, which also contains the global\\n * metadata (it's an optimization).\\n * @param _object A 32 byte value to insert into the container.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function push(\\n bytes32 _object,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Pushes two objects into the container at the same time. A useful optimization.\\n * @param _objectA First 32 byte value to insert into the container.\\n * @param _objectB Second 32 byte value to insert into the container.\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB\\n )\\n external;\\n\\n /**\\n * Pushes two objects into the container at the same time. Also allows setting the global\\n * metadata field.\\n * @param _objectA First 32 byte value to insert into the container.\\n * @param _objectB Second 32 byte value to insert into the container.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function push2(\\n bytes32 _objectA,\\n bytes32 _objectB,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Retrieves an object from the container.\\n * @param _index Index of the particular object to access.\\n * @return 32 byte object value.\\n */\\n function get(\\n uint256 _index\\n )\\n external\\n view\\n returns (\\n bytes32\\n );\\n\\n /**\\n * Removes all objects after and including a given index.\\n * @param _index Object index to delete from.\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index\\n )\\n external;\\n\\n /**\\n * Removes all objects after and including a given index. Also allows setting the global\\n * metadata field.\\n * @param _index Object index to delete from.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Marks an index as overwritable, meaing the underlying buffer can start to write values over\\n * any objects before and including the given index.\\n */\\n function setNextOverwritableIndex(\\n uint256 _index\\n )\\n external;\\n}\\n\",\"keccak256\":\"0xcfca7da85b35d94c27581c2460b0d48fd0cc51fa72670cc7a2f7f760fb21a2f0\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0xdf802e1cc6474df913626991e9fca3835c620a519f397afe04bf9c260e723257\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_AddressResolver\\n */\\ncontract Lib_AddressResolver {\\n\\n /*******************************************\\n * Contract Variables: Contract References *\\n *******************************************/\\n\\n Lib_AddressManager internal libAddressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n */\\n constructor(\\n address _libAddressManager\\n ) public {\\n libAddressManager = Lib_AddressManager(_libAddressManager);\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function resolve(\\n string memory _name\\n )\\n public\\n view\\n returns (\\n address _contract\\n )\\n {\\n return libAddressManager.getAddress(_name);\\n }\\n}\\n\",\"keccak256\":\"0xf3b9d78b309ddeec259ce3e0e1cfdef3ca40938e9a81971b28ce2b8ea327f533\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() internal {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xe0409fbd236d16ca6be439d9d97dd36d0d9a0697ee0062d49588b9d29c248e47\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/utils/Lib_RingBuffer.sol\":{\"content\":\"pragma solidity ^0.7.0;\\n\\nlibrary Lib_RingBuffer {\\n using Lib_RingBuffer for RingBuffer;\\n\\n /***********\\n * Structs *\\n ***********/\\n\\n struct Buffer {\\n uint256 length;\\n mapping (uint256 => bytes32) buf;\\n }\\n\\n struct RingBuffer {\\n bytes32 contextA;\\n bytes32 contextB;\\n Buffer bufferA;\\n Buffer bufferB;\\n uint256 nextOverwritableIndex;\\n }\\n\\n struct RingBufferContext {\\n // contextA\\n uint40 globalIndex;\\n bytes27 extraData;\\n\\n // contextB\\n uint64 currBufferIndex;\\n uint40 prevResetIndex;\\n uint40 currResetIndex;\\n }\\n\\n\\n /*************\\n * Constants *\\n *************/\\n\\n uint256 constant MIN_CAPACITY = 16;\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * Pushes a single element to the buffer.\\n * @param _self Buffer to access.\\n * @param _value Value to push to the buffer.\\n * @param _extraData Optional global extra data.\\n */\\n function push(\\n RingBuffer storage _self,\\n bytes32 _value,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n\\n // Set a minimum capacity.\\n if (currBuffer.length == 0) {\\n currBuffer.length = MIN_CAPACITY;\\n }\\n\\n // Check if we need to expand the buffer.\\n if (ctx.globalIndex - ctx.currResetIndex >= currBuffer.length) {\\n if (ctx.currResetIndex < _self.nextOverwritableIndex) {\\n // We're going to overwrite the inactive buffer.\\n // Bump the buffer index, reset the delete offset, and set our reset indices.\\n ctx.currBufferIndex++;\\n ctx.prevResetIndex = ctx.currResetIndex;\\n ctx.currResetIndex = ctx.globalIndex;\\n\\n // Swap over to the next buffer.\\n currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n } else {\\n // We're not overwriting yet, double the length of the current buffer.\\n currBuffer.length *= 2;\\n }\\n }\\n\\n // Index to write to is the difference of the global and reset indices.\\n uint256 writeHead = ctx.globalIndex - ctx.currResetIndex;\\n currBuffer.buf[writeHead] = _value;\\n\\n // Bump the global index and insert our extra data, then save the context.\\n ctx.globalIndex++;\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Pushes a single element to the buffer.\\n * @param _self Buffer to access.\\n * @param _value Value to push to the buffer.\\n */\\n function push(\\n RingBuffer storage _self,\\n bytes32 _value\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n \\n _self.push(\\n _value,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Pushes a two elements to the buffer.\\n * @param _self Buffer to access.\\n * @param _valueA First value to push to the buffer.\\n * @param _valueA Second value to push to the buffer.\\n * @param _extraData Optional global extra data.\\n */\\n function push2(\\n RingBuffer storage _self,\\n bytes32 _valueA,\\n bytes32 _valueB,\\n bytes27 _extraData\\n )\\n internal\\n {\\n _self.push(_valueA, _extraData);\\n _self.push(_valueB, _extraData);\\n }\\n\\n /**\\n * Pushes a two elements to the buffer.\\n * @param _self Buffer to access.\\n * @param _valueA First value to push to the buffer.\\n * @param _valueA Second value to push to the buffer.\\n */\\n function push2(\\n RingBuffer storage _self,\\n bytes32 _valueA,\\n bytes32 _valueB\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n _self.push2(\\n _valueA,\\n _valueB,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Retrieves an element from the buffer.\\n * @param _self Buffer to access.\\n * @param _index Element index to retrieve.\\n * @return Value of the element at the given index.\\n */\\n function get(\\n RingBuffer storage _self,\\n uint256 _index\\n )\\n internal\\n view\\n returns (\\n bytes32 \\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n require(\\n _index < ctx.globalIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n Buffer storage prevBuffer = _self.getBuffer(ctx.currBufferIndex + 1);\\n\\n if (_index >= ctx.currResetIndex) {\\n // We're trying to load an element from the current buffer.\\n // Relative index is just the difference from the reset index.\\n uint256 relativeIndex = _index - ctx.currResetIndex;\\n\\n // Shouldn't happen but why not check.\\n require(\\n relativeIndex < currBuffer.length,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n return currBuffer.buf[relativeIndex];\\n } else {\\n // We're trying to load an element from the previous buffer.\\n // Relative index is the difference from the reset index in the other direction.\\n uint256 relativeIndex = ctx.currResetIndex - _index;\\n\\n // Condition only fails in the case that we deleted and flipped buffers.\\n require(\\n ctx.currResetIndex > ctx.prevResetIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n // Make sure we're not trying to read beyond the array.\\n require(\\n relativeIndex <= prevBuffer.length,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n return prevBuffer.buf[prevBuffer.length - relativeIndex];\\n }\\n }\\n\\n /**\\n * Deletes all elements after (and including) a given index.\\n * @param _self Buffer to access.\\n * @param _index Index of the element to delete from (inclusive).\\n * @param _extraData Optional global extra data.\\n */\\n function deleteElementsAfterInclusive(\\n RingBuffer storage _self,\\n uint40 _index,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n require(\\n _index < ctx.globalIndex && _index >= ctx.prevResetIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n Buffer storage prevBuffer = _self.getBuffer(ctx.currBufferIndex + 1);\\n\\n if (_index < ctx.currResetIndex) {\\n // We're switching back to the previous buffer.\\n // Reduce the buffer index, set the current reset index back to match the previous one.\\n // We use the equality of these two values to prevent reading beyond this buffer.\\n ctx.currBufferIndex--;\\n ctx.currResetIndex = ctx.prevResetIndex;\\n }\\n\\n // Set our global index and extra data, save the context.\\n ctx.globalIndex = _index;\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Deletes all elements after (and including) a given index.\\n * @param _self Buffer to access.\\n * @param _index Index of the element to delete from (inclusive).\\n */\\n function deleteElementsAfterInclusive(\\n RingBuffer storage _self,\\n uint40 _index\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n _self.deleteElementsAfterInclusive(\\n _index,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Retrieves the current global index.\\n * @param _self Buffer to access.\\n * @return Current global index.\\n */\\n function getLength(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n uint40\\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n return ctx.globalIndex;\\n }\\n\\n /**\\n * Changes current global extra data.\\n * @param _self Buffer to access.\\n * @param _extraData New global extra data.\\n */\\n function setExtraData(\\n RingBuffer storage _self,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Retrieves the current global extra data.\\n * @param _self Buffer to access.\\n * @return Current global extra data.\\n */\\n function getExtraData(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n bytes27\\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n return ctx.extraData;\\n }\\n\\n /**\\n * Sets the current ring buffer context.\\n * @param _self Buffer to access.\\n * @param _ctx Current ring buffer context.\\n */\\n function setContext(\\n RingBuffer storage _self,\\n RingBufferContext memory _ctx\\n )\\n internal\\n returns (\\n bytes32\\n )\\n {\\n bytes32 contextA;\\n bytes32 contextB;\\n\\n uint40 globalIndex = _ctx.globalIndex;\\n bytes27 extraData = _ctx.extraData;\\n assembly {\\n contextA := globalIndex\\n contextA := or(contextA, extraData)\\n }\\n\\n uint64 currBufferIndex = _ctx.currBufferIndex;\\n uint40 prevResetIndex = _ctx.prevResetIndex;\\n uint40 currResetIndex = _ctx.currResetIndex;\\n assembly {\\n contextB := currBufferIndex\\n contextB := or(contextB, shl(64, prevResetIndex))\\n contextB := or(contextB, shl(104, currResetIndex))\\n }\\n\\n if (_self.contextA != contextA) {\\n _self.contextA = contextA;\\n }\\n\\n if (_self.contextB != contextB) {\\n _self.contextB = contextB;\\n }\\n }\\n\\n /**\\n * Retrieves the current ring buffer context.\\n * @param _self Buffer to access.\\n * @return Current ring buffer context.\\n */\\n function getContext(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n RingBufferContext memory\\n )\\n {\\n bytes32 contextA = _self.contextA;\\n bytes32 contextB = _self.contextB;\\n\\n uint40 globalIndex;\\n bytes27 extraData;\\n assembly {\\n globalIndex := and(contextA, 0x000000000000000000000000000000000000000000000000000000FFFFFFFFFF)\\n extraData := and(contextA, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000)\\n }\\n\\n uint64 currBufferIndex;\\n uint40 prevResetIndex;\\n uint40 currResetIndex;\\n assembly {\\n currBufferIndex := and(contextB, 0x000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFF)\\n prevResetIndex := shr(64, and(contextB, 0x00000000000000000000000000000000000000FFFFFFFFFF0000000000000000))\\n currResetIndex := shr(104, and(contextB, 0x0000000000000000000000000000FFFFFFFFFF00000000000000000000000000))\\n }\\n\\n return RingBufferContext({\\n globalIndex: globalIndex,\\n extraData: extraData,\\n currBufferIndex: currBufferIndex,\\n prevResetIndex: prevResetIndex,\\n currResetIndex: currResetIndex\\n });\\n }\\n\\n /**\\n * Retrieves the a buffer from the ring buffer by index.\\n * @param _self Buffer to access.\\n * @param _which Index of the sub buffer to access.\\n * @return Sub buffer for the index.\\n */\\n function getBuffer(\\n RingBuffer storage _self,\\n uint256 _which\\n )\\n internal\\n view\\n returns (\\n Buffer storage\\n )\\n {\\n return _which % 2 == 0 ? _self.bufferA : _self.bufferB;\\n }\\n}\\n\",\"keccak256\":\"0x0c4bb53aba64441b2ec26e7a13de8f04f104bb654e550ccc30db500cac33d2a3\"}},\"version\":1}",
"bytecode": "0x60806040523480156200001157600080fd5b50604051620013f3380380620013f3833981810160405260408110156200003757600080fd5b8151602083018051604051929492938301929190846401000000008211156200005f57600080fd5b9083019060208201858111156200007557600080fd5b82516401000000008111828201881017156200009057600080fd5b82525081516020918201929091019080838360005b83811015620000bf578181015183820152602001620000a5565b50505050905090810190601f168015620000ed5780820380516001836020036101000a031916815260200191505b506040525050600080546001600160a01b0319166001600160a01b038516179055508051620001249060019060208401906200012d565b505050620001d9565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001655760008555620001b0565b82601f106200018057805160ff1916838001178555620001b0565b82800160010185558215620001b0579182015b82811115620001b057825182559160200191906001019062000193565b50620001be929150620001c2565b5090565b5b80821115620001be5760008155600101620001c3565b61120a80620001e96000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80634651d91e1161008c578063b298e36b11610066578063b298e36b14610315578063ccf8f96914610332578063d41c021814610355578063fa9e936c14610378576100cf565b80634651d91e1461025e5780638da5cb5b1461027b5780639507d39a146102f8576100cf565b806314f22255146100d4578063167fd681146101075780631f7b6d32146101325780632015276c1461014c57806329061de214610177578063461a44781461019c575b600080fd5b610105600480360360608110156100ea57600080fd5b508035906020810135906040013564ffffffffff1916610395565b005b6101056004803603604081101561011d57600080fd5b508035906020013564ffffffffff191661048c565b61013a61054c565b60408051918252519081900360200190f35b6101056004803603604081101561016257600080fd5b508035906020013564ffffffffff1916610564565b6101056004803603602081101561018d57600080fd5b503564ffffffffff1916610620565b610242600480360360208110156101b257600080fd5b8101906020810181356401000000008111156101cd57600080fd5b8201836020820111156101df57600080fd5b8035906020019184600183028401116401000000008311171561020157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506106de945050505050565b604080516001600160a01b039092168252519081900360200190f35b6101056004803603602081101561027457600080fd5b50356107ba565b610283610875565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102bd5781810151838201526020016102a5565b50505050905090810190601f1680156102ea5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61013a6004803603602081101561030e57600080fd5b5035610902565b6101056004803603602081101561032b57600080fd5b503561091c565b61033a6109d7565b6040805164ffffffffff199092168252519081900360200190f35b6101056004803603604081101561036b57600080fd5b50803590602001356109e8565b6101056004803603602081101561038e57600080fd5b5035610aa4565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261042b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b820191906000526020600020905b81548152906001019060200180831161040457829003601f168201915b50505050506106de565b6001600160a01b0316336001600160a01b03161461047a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6104876002848484610b59565b505050565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526104ed93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461053c5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610b75565b5050565b60006105586002610cb7565b64ffffffffff16905090565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526105c593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106145760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610ccb565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261068193909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106d05760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610dca565b50565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b8381101561073e578181015183820152602001610726565b50505050905090810190601f16801561076b5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561078857600080fd5b505afa15801561079c573d6000803e3d6000fd5b505050506040513d60208110156107b257600080fd5b505192915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261081b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461086a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610def565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108fa5780601f106108cf576101008083540402835291602001916108fa565b820191906000526020600020905b8154815290600101906020018083116108dd57829003601f168201915b505050505081565b6000610916600264ffffffffff8416610e15565b92915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261097d93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146109cc5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db60028261101e565b60006109e36002611044565b905090565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610a4993909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610a985760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6105486002838361105b565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610b0593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610b545760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b600855565b610b64848483610ccb565b610b6f848383610ccb565b50505050565b6000610b8084611083565b9050806000015164ffffffffff168364ffffffffff16108015610bb55750806060015164ffffffffff168364ffffffffff1610155b610bfd576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610c20826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610c48836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168564ffffffffff161015610c8c576040830180516000190167ffffffffffffffff169052606083015164ffffffffff1660808401525b64ffffffffff8516835264ffffffffff1984166020840152610cae8684611103565b50505050505050565b600080610cc383611083565b519392505050565b6000610cd684611083565b90506000610cfb826040015167ffffffffffffffff16866110e390919063ffffffff16565b8054909150610d0957601081555b8054608083015183510364ffffffffff1610610d80578460060154826080015164ffffffffff161015610d785760408201805160010167ffffffffffffffff169081905260808301805164ffffffffff90811660608601528451169052610d719086906110e3565b9050610d80565b805460020281555b608082015182510364ffffffffff9081166000818152600184810160209081526040909220889055855101909216845264ffffffffff19851691840191909152610cae8684611103565b6000610dd583611083565b64ffffffffff19831660208201529050610b6f8382611103565b6000610dfa83611083565b905061048782826020015185610b759092919063ffffffff16565b600080610e2184611083565b805190915064ffffffffff168310610e77576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610e9a826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610ec2836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168510610f4f576080830151825464ffffffffff9091168603908110610f33576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000908152600190920160205250604090205491506109169050565b6080830151606084015164ffffffffff9182168781039290911610610fb2576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154811115610fff576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154036000908152600190910160205260409020549250610916915050565b600061102983611083565b905061048782826020015185610ccb9092919063ffffffff16565b60008061105083611083565b602001519392505050565b600061106684611083565b9050610b6f8383836020015187610b59909392919063ffffffff16565b61108b611162565b5080546001909101546040805160a08101825264ffffffffff808516825264ffffffffff19909416602082015267ffffffffffffffff8316818301529082901c8316606082015260689190911c909116608082015290565b600060028206156110f757826004016110fc565b826002015b9392505050565b80516020820151604080840151606085015160808601518754600096868117969584901b8517606884901b17959094909390929091871461114257868a555b858a60010154146111555760018a018690555b5050505050505092915050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe4f564d5f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206f776e65722ea264697066735822122037f5f91f3a7302668798afaeee2c0c2d9aad06dfcc80e263efc2cd8f4842eebe64736f6c63430007060033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c80634651d91e1161008c578063b298e36b11610066578063b298e36b14610315578063ccf8f96914610332578063d41c021814610355578063fa9e936c14610378576100cf565b80634651d91e1461025e5780638da5cb5b1461027b5780639507d39a146102f8576100cf565b806314f22255146100d4578063167fd681146101075780631f7b6d32146101325780632015276c1461014c57806329061de214610177578063461a44781461019c575b600080fd5b610105600480360360608110156100ea57600080fd5b508035906020810135906040013564ffffffffff1916610395565b005b6101056004803603604081101561011d57600080fd5b508035906020013564ffffffffff191661048c565b61013a61054c565b60408051918252519081900360200190f35b6101056004803603604081101561016257600080fd5b508035906020013564ffffffffff1916610564565b6101056004803603602081101561018d57600080fd5b503564ffffffffff1916610620565b610242600480360360208110156101b257600080fd5b8101906020810181356401000000008111156101cd57600080fd5b8201836020820111156101df57600080fd5b8035906020019184600183028401116401000000008311171561020157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506106de945050505050565b604080516001600160a01b039092168252519081900360200190f35b6101056004803603602081101561027457600080fd5b50356107ba565b610283610875565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102bd5781810151838201526020016102a5565b50505050905090810190601f1680156102ea5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61013a6004803603602081101561030e57600080fd5b5035610902565b6101056004803603602081101561032b57600080fd5b503561091c565b61033a6109d7565b6040805164ffffffffff199092168252519081900360200190f35b6101056004803603604081101561036b57600080fd5b50803590602001356109e8565b6101056004803603602081101561038e57600080fd5b5035610aa4565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261042b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b820191906000526020600020905b81548152906001019060200180831161040457829003601f168201915b50505050506106de565b6001600160a01b0316336001600160a01b03161461047a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6104876002848484610b59565b505050565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526104ed93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461053c5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610b75565b5050565b60006105586002610cb7565b64ffffffffff16905090565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526105c593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106145760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b61054860028383610ccb565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261068193909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146106d05760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610dca565b50565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b8381101561073e578181015183820152602001610726565b50505050905090810190601f16801561076b5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561078857600080fd5b505afa15801561079c573d6000803e3d6000fd5b505050506040513d60208110156107b257600080fd5b505192915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261081b93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b03161461086a5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db600282610def565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108fa5780601f106108cf576101008083540402835291602001916108fa565b820191906000526020600020905b8154815290600101906020018083116108dd57829003601f168201915b505050505081565b6000610916600264ffffffffff8416610e15565b92915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261097d93909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b0316146109cc5760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6106db60028261101e565b60006109e36002611044565b905090565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610a4993909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610a985760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b6105486002838361105b565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152610b0593909290918301828280156104215780601f106103f657610100808354040283529160200191610421565b6001600160a01b0316336001600160a01b031614610b545760405162461bcd60e51b81526004018080602001828103825260448152602001806111916044913960600191505060405180910390fd5b600855565b610b64848483610ccb565b610b6f848383610ccb565b50505050565b6000610b8084611083565b9050806000015164ffffffffff168364ffffffffff16108015610bb55750806060015164ffffffffff168364ffffffffff1610155b610bfd576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610c20826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610c48836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168564ffffffffff161015610c8c576040830180516000190167ffffffffffffffff169052606083015164ffffffffff1660808401525b64ffffffffff8516835264ffffffffff1984166020840152610cae8684611103565b50505050505050565b600080610cc383611083565b519392505050565b6000610cd684611083565b90506000610cfb826040015167ffffffffffffffff16866110e390919063ffffffff16565b8054909150610d0957601081555b8054608083015183510364ffffffffff1610610d80578460060154826080015164ffffffffff161015610d785760408201805160010167ffffffffffffffff169081905260808301805164ffffffffff90811660608601528451169052610d719086906110e3565b9050610d80565b805460020281555b608082015182510364ffffffffff9081166000818152600184810160209081526040909220889055855101909216845264ffffffffff19851691840191909152610cae8684611103565b6000610dd583611083565b64ffffffffff19831660208201529050610b6f8382611103565b6000610dfa83611083565b905061048782826020015185610b759092919063ffffffff16565b600080610e2184611083565b805190915064ffffffffff168310610e77576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610e9a826040015167ffffffffffffffff16866110e390919063ffffffff16565b90506000610ec2836040015160010167ffffffffffffffff16876110e390919063ffffffff16565b9050826080015164ffffffffff168510610f4f576080830151825464ffffffffff9091168603908110610f33576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000908152600190920160205250604090205491506109169050565b6080830151606084015164ffffffffff9182168781039290911610610fb2576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154811115610fff576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154036000908152600190910160205260409020549250610916915050565b600061102983611083565b905061048782826020015185610ccb9092919063ffffffff16565b60008061105083611083565b602001519392505050565b600061106684611083565b9050610b6f8383836020015187610b59909392919063ffffffff16565b61108b611162565b5080546001909101546040805160a08101825264ffffffffff808516825264ffffffffff19909416602082015267ffffffffffffffff8316818301529082901c8316606082015260689190911c909116608082015290565b600060028206156110f757826004016110fc565b826002015b9392505050565b80516020820151604080840151606085015160808601518754600096868117969584901b8517606884901b17959094909390929091871461114257868a555b858a60010154146111555760018a018690555b5050505050505092915050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe4f564d5f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206f776e65722ea264697066735822122037f5f91f3a7302668798afaeee2c0c2d9aad06dfcc80e263efc2cd8f4842eebe64736f6c63430007060033",
"devdoc": {
"kind": "dev",
"methods": {
"constructor": {
"params": {
"_libAddressManager": "Address of the Address Manager.",
"_owner": "Name of the contract that owns this container (will be resolved later)."
}
},
"deleteElementsAfterInclusive(uint256)": {
"params": {
"_index": "Object index to delete from."
}
},
"deleteElementsAfterInclusive(uint256,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_index": "Object index to delete from."
}
},
"get(uint256)": {
"params": {
"_index": "Index of the particular object to access."
},
"returns": {
"_0": "32 byte object value."
}
},
"getGlobalMetadata()": {
"returns": {
"_0": "Container global metadata field."
}
},
"length()": {
"returns": {
"_0": "Number of objects in the container."
}
},
"push(bytes32)": {
"params": {
"_object": "A 32 byte value to insert into the container."
}
},
"push(bytes32,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_object": "A 32 byte value to insert into the container."
}
},
"push2(bytes32,bytes32)": {
"params": {
"_objectA": "First 32 byte value to insert into the container.",
"_objectB": "Second 32 byte value to insert into the container."
}
},
"push2(bytes32,bytes32,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_objectA": "First 32 byte value to insert into the container.",
"_objectB": "Second 32 byte value to insert into the container."
}
},
"setGlobalMetadata(bytes27)": {
"params": {
"_globalMetadata": "New global metadata to set."
}
}
},
"title": "OVM_ChainStorageContainer",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {
"deleteElementsAfterInclusive(uint256)": {
"notice": "Removes all objects after and including a given index."
},
"deleteElementsAfterInclusive(uint256,bytes27)": {
"notice": "Removes all objects after and including a given index. Also allows setting the global metadata field."
},
"get(uint256)": {
"notice": "Retrieves an object from the container."
},
"getGlobalMetadata()": {
"notice": "Retrieves the container's global metadata field."
},
"length()": {
"notice": "Retrieves the number of objects stored in the container."
},
"push(bytes32)": {
"notice": "Pushes an object into the container."
},
"push(bytes32,bytes27)": {
"notice": "Pushes an object into the container. Function allows setting the global metadata since we'll need to touch the \"length\" storage slot anyway, which also contains the global metadata (it's an optimization)."
},
"push2(bytes32,bytes32)": {
"notice": "Pushes two objects into the container at the same time. A useful optimization."
},
"push2(bytes32,bytes32,bytes27)": {
"notice": "Pushes two objects into the container at the same time. Also allows setting the global metadata field."
},
"setGlobalMetadata(bytes27)": {
"notice": "Sets the container's global metadata field. We're using `bytes27` here because we use five bytes to maintain the length of the underlying data structure, meaning we have an extra 27 bytes to store arbitrary data."
},
"setNextOverwritableIndex(uint256)": {
"notice": "Marks an index as overwritable, meaing the underlying buffer can start to write values over any objects before and including the given index."
}
},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 11707,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "libAddressManager",
"offset": 0,
"slot": "0",
"type": "t_contract(Lib_AddressManager)11700"
},
{
"astId": 2888,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "owner",
"offset": 0,
"slot": "1",
"type": "t_string_storage"
},
{
"astId": 2890,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "buffer",
"offset": 0,
"slot": "2",
"type": "t_struct(RingBuffer)16365_storage"
}
],
"types": {
"t_bytes32": {
"encoding": "inplace",
"label": "bytes32",
"numberOfBytes": "32"
},
"t_contract(Lib_AddressManager)11700": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
},
"t_mapping(t_uint256,t_bytes32)": {
"encoding": "mapping",
"key": "t_uint256",
"label": "mapping(uint256 => bytes32)",
"numberOfBytes": "32",
"value": "t_bytes32"
},
"t_string_storage": {
"encoding": "bytes",
"label": "string",
"numberOfBytes": "32"
},
"t_struct(Buffer)16354_storage": {
"encoding": "inplace",
"label": "struct Lib_RingBuffer.Buffer",
"members": [
{
"astId": 16349,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "length",
"offset": 0,
"slot": "0",
"type": "t_uint256"
},
{
"astId": 16353,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "buf",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_uint256,t_bytes32)"
}
],
"numberOfBytes": "64"
},
"t_struct(RingBuffer)16365_storage": {
"encoding": "inplace",
"label": "struct Lib_RingBuffer.RingBuffer",
"members": [
{
"astId": 16356,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "contextA",
"offset": 0,
"slot": "0",
"type": "t_bytes32"
},
{
"astId": 16358,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "contextB",
"offset": 0,
"slot": "1",
"type": "t_bytes32"
},
{
"astId": 16360,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "bufferA",
"offset": 0,
"slot": "2",
"type": "t_struct(Buffer)16354_storage"
},
{
"astId": 16362,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "bufferB",
"offset": 0,
"slot": "4",
"type": "t_struct(Buffer)16354_storage"
},
{
"astId": 16364,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "nextOverwritableIndex",
"offset": 0,
"slot": "6",
"type": "t_uint256"
}
],
"numberOfBytes": "224"
},
"t_uint256": {
"encoding": "inplace",
"label": "uint256",
"numberOfBytes": "32"
}
}
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"address": "0xfBE93ba0a2Df92A8e8D40cE00acCF9248a6Fc812",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_libAddressManager",
"type": "address"
},
{
"internalType": "string",
"name": "_implementationName",
"type": "string"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"stateMutability": "nonpayable",
"type": "fallback"
}
],
"transactionHash": "0xf56350f6788ffb9ebfa35403412369a4fac3147ab5a612956ea8146fe14308ed",
"receipt": {
"to": null,
"from": "0x558ba9b8d78713fbf768c1f8a584485B4003f43F",
"contractAddress": "0x40C6cA6dDdd27E9B4d50da1E393B82b71B1C5D45",
"transactionIndex": 15,
"gasUsed": "228252",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x255fee49c39936345b0004796d61db7b0953cc70f0a9081d86d3447b23b491a2",
"transactionHash": "0xf56350f6788ffb9ebfa35403412369a4fac3147ab5a612956ea8146fe14308ed",
"logs": [],
"blockNumber": 4573449,
"cumulativeGasUsed": "1727110",
"status": 1,
"byzantium": true
},
"args": [
"0x1De8CFD4C1A486200286073aE91DE6e8099519f1",
"OVM_L1CrossDomainMessenger"
],
"solcInputHash": "cebcb515c1a9c570d96e0b8f6fd237e2",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_implementationName\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"nonpayable\",\"type\":\"fallback\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_implementationName\":\"implementationName of the contract to proxy to.\",\"_libAddressManager\":\"Address of the Lib_AddressManager.\"}}},\"title\":\"Lib_ResolvedDelegateProxy\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol\":\"Lib_ResolvedDelegateProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0xdf802e1cc6474df913626991e9fca3835c620a519f397afe04bf9c260e723257\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() internal {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xe0409fbd236d16ca6be439d9d97dd36d0d9a0697ee0062d49588b9d29c248e47\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.7.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_ResolvedDelegateProxy\\n */\\ncontract Lib_ResolvedDelegateProxy {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n // Using mappings to store fields to avoid overwriting storage slots in the\\n // implementation contract. For example, instead of storing these fields at\\n // storage slot `0` & `1`, they are stored at `hash(${FIELD_NAME} + address(this))`\\n // See: https://solidity.readthedocs.io/en/v0.7.0/internals/layout_in_storage.html\\n mapping(address=>string) private implementationName;\\n mapping(address=>Lib_AddressManager) private addressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n * @param _implementationName implementationName of the contract to proxy to.\\n */\\n constructor(\\n address _libAddressManager,\\n string memory _implementationName\\n )\\n {\\n addressManager[address(this)] = Lib_AddressManager(_libAddressManager);\\n implementationName[address(this)] = _implementationName;\\n }\\n\\n\\n /*********************\\n * Fallback Function *\\n *********************/\\n\\n fallback()\\n external\\n {\\n address target = addressManager[address(this)].getAddress((implementationName[address(this)]));\\n require(\\n target != address(0),\\n \\\"Target address must be initialized.\\\"\\n );\\n\\n (bool success, bytes memory returndata) = target.delegatecall(msg.data);\\n\\n if (success == true) {\\n assembly {\\n return(add(returndata, 0x20), mload(returndata))\\n }\\n } else {\\n assembly {\\n revert(add(returndata, 0x20), mload(returndata))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x7b94d77f1ceef7bf89687de3a9c574d994d531e4b98007b106fbac54bab7e8ea\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b506040516104173803806104178339818101604052604081101561003357600080fd5b81516020830180516040519294929383019291908464010000000082111561005a57600080fd5b90830190602082018581111561006f57600080fd5b825164010000000081118282018810171561008957600080fd5b82525081516020918201929091019080838360005b838110156100b657818101518382015260200161009e565b50505050905090810190601f1680156100e35780820380516001836020036101000a031916815260200191505b5060409081523060009081526001602090815282822080546001600160a01b0319166001600160a01b038a16179055818152919020855161012c95509093509085019150610134565b5050506101d5565b828054600181600116156101000203166002900490600052602060002090601f01602090048101928261016a57600085556101b0565b82601f1061018357805160ff19168380011785556101b0565b828001600101855582156101b0579182015b828111156101b0578251825591602001919060010190610195565b506101bc9291506101c0565b5090565b5b808211156101bc57600081556001016101c1565b610233806101e46000396000f3fe608060405234801561001057600080fd5b5030600090815260016020818152604080842054848352818520915163bf40fac160e01b815260048101938452825460026101009682161596909602600019011694909404602485018190526001600160a01b039091169363bf40fac19391829160440190849080156100c45780601f10610099576101008083540402835291602001916100c4565b820191906000526020600020905b8154815290600101906020018083116100a757829003601f168201915b50509250505060206040518083038186803b1580156100e257600080fd5b505afa1580156100f6573d6000803e3d6000fd5b505050506040513d602081101561010c57600080fd5b505190506001600160a01b0381166101555760405162461bcd60e51b81526004018080602001828103825260238152602001806101db6023913960400191505060405180910390fd5b600080826001600160a01b03166000366040518083838082843760405192019450600093509091505080830381855af49150503d80600081146101b4576040519150601f19603f3d011682016040523d82523d6000602084013e6101b9565b606091505b509092509050600182151514156101d257805160208201f35b805160208201fdfe5461726765742061646472657373206d75737420626520696e697469616c697a65642ea264697066735822122022cf2e6b66b75ae0d7a780704aa9d326dd541b72493bb1a405188ed67fed0b5964736f6c63430007060033",
"deployedBytecode": "0x608060405234801561001057600080fd5b5030600090815260016020818152604080842054848352818520915163bf40fac160e01b815260048101938452825460026101009682161596909602600019011694909404602485018190526001600160a01b039091169363bf40fac19391829160440190849080156100c45780601f10610099576101008083540402835291602001916100c4565b820191906000526020600020905b8154815290600101906020018083116100a757829003601f168201915b50509250505060206040518083038186803b1580156100e257600080fd5b505afa1580156100f6573d6000803e3d6000fd5b505050506040513d602081101561010c57600080fd5b505190506001600160a01b0381166101555760405162461bcd60e51b81526004018080602001828103825260238152602001806101db6023913960400191505060405180910390fd5b600080826001600160a01b03166000366040518083838082843760405192019450600093509091505080830381855af49150503d80600081146101b4576040519150601f19603f3d011682016040523d82523d6000602084013e6101b9565b606091505b509092509050600182151514156101d257805160208201f35b805160208201fdfe5461726765742061646472657373206d75737420626520696e697469616c697a65642ea264697066735822122022cf2e6b66b75ae0d7a780704aa9d326dd541b72493bb1a405188ed67fed0b5964736f6c63430007060033",
"devdoc": {
"kind": "dev",
"methods": {
"constructor": {
"params": {
"_implementationName": "implementationName of the contract to proxy to.",
"_libAddressManager": "Address of the Lib_AddressManager."
}
}
},
"title": "Lib_ResolvedDelegateProxy",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 11832,
"contract": "contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol:Lib_ResolvedDelegateProxy",
"label": "implementationName",
"offset": 0,
"slot": "0",
"type": "t_mapping(t_address,t_string_storage)"
},
{
"astId": 11836,
"contract": "contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol:Lib_ResolvedDelegateProxy",
"label": "addressManager",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_address,t_contract(Lib_AddressManager)11700)"
}
],
"types": {
"t_address": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
},
"t_contract(Lib_AddressManager)11700": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
},
"t_mapping(t_address,t_contract(Lib_AddressManager)11700)": {
"encoding": "mapping",
"key": "t_address",
"label": "mapping(address => contract Lib_AddressManager)",
"numberOfBytes": "32",
"value": "t_contract(Lib_AddressManager)11700"
},
"t_mapping(t_address,t_string_storage)": {
"encoding": "mapping",
"key": "t_address",
"label": "mapping(address => string)",
"numberOfBytes": "32",
"value": "t_string_storage"
},
"t_string_storage": {
"encoding": "bytes",
"label": "string",
"numberOfBytes": "32"
}
}
}
}
\ No newline at end of file
{
"address": "0x64cfd73BE445F6Aa4ee9F4f7B1d068008a9DAc06",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_libAddressManager",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "address",
"name": "_who",
"type": "address"
}
],
"name": "claim",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "deposit",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_preStateRoot",
"type": "bytes32"
},
{
"internalType": "address",
"name": "_publisher",
"type": "address"
},
{
"internalType": "uint256",
"name": "_timestamp",
"type": "uint256"
}
],
"name": "finalize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "finalizeWithdrawal",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_preStateRoot",
"type": "bytes32"
},
{
"internalType": "address",
"name": "_who",
"type": "address"
}
],
"name": "getGasSpent",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_who",
"type": "address"
}
],
"name": "isCollateralized",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_preStateRoot",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_txHash",
"type": "bytes32"
},
{
"internalType": "address",
"name": "_who",
"type": "address"
},
{
"internalType": "uint256",
"name": "_gasSpent",
"type": "uint256"
}
],
"name": "recordGasSpent",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "resolve",
"outputs": [
{
"internalType": "address",
"name": "_contract",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "startWithdrawal",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"transactionHash": "0xef2081df685c50aab54d3c8925d756ac3d5a8e3e8205ace17b9b9887a4181567",
"receipt": {
"to": null,
"from": "0x558ba9b8d78713fbf768c1f8a584485B4003f43F",
"contractAddress": "0x0C4BFBfB44090E1c1AB4a648366456ccFCF9bfA1",
"transactionIndex": 4,
"gasUsed": "291376",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0xc98e11cb9072c6fda982fe6445382fa34298a9a83d3bdfedc88fded88680fe97",
"transactionHash": "0xef2081df685c50aab54d3c8925d756ac3d5a8e3e8205ace17b9b9887a4181567",
"logs": [],
"blockNumber": 4573388,
"cumulativeGasUsed": "864063",
"status": 1,
"byzantium": true
},
"args": [
"0x1De8CFD4C1A486200286073aE91DE6e8099519f1"
],
"solcInputHash": "cebcb515c1a9c570d96e0b8f6fd237e2",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_who\",\"type\":\"address\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_preStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_publisher\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"finalize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"finalizeWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_preStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_who\",\"type\":\"address\"}],\"name\":\"getGasSpent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_who\",\"type\":\"address\"}],\"name\":\"isCollateralized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_preStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_txHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_who\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasSpent\",\"type\":\"uint256\"}],\"name\":\"recordGasSpent\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"title\":\"mockOVM_BondManager\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/mockOVM/verification/mockOVM_BondManager.sol\":\"mockOVM_BondManager\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/iOVM/verification/iOVM_BondManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\ninterface ERC20 {\\n function transfer(address, uint256) external returns (bool);\\n function transferFrom(address, address, uint256) external returns (bool);\\n}\\n\\n/// All the errors which may be encountered on the bond manager\\nlibrary Errors {\\n string constant ERC20_ERR = \\\"BondManager: Could not post bond\\\";\\n string constant ALREADY_FINALIZED = \\\"BondManager: Fraud proof for this pre-state root has already been finalized\\\";\\n string constant SLASHED = \\\"BondManager: Cannot finalize withdrawal, you probably got slashed\\\";\\n string constant WRONG_STATE = \\\"BondManager: Wrong bond state for proposer\\\";\\n string constant CANNOT_CLAIM = \\\"BondManager: Cannot claim yet. Dispute must be finalized first\\\";\\n\\n string constant WITHDRAWAL_PENDING = \\\"BondManager: Withdrawal already pending\\\";\\n string constant TOO_EARLY = \\\"BondManager: Too early to finalize your withdrawal\\\";\\n\\n string constant ONLY_TRANSITIONER = \\\"BondManager: Only the transitioner for this pre-state root may call this function\\\";\\n string constant ONLY_FRAUD_VERIFIER = \\\"BondManager: Only the fraud verifier may call this function\\\";\\n string constant ONLY_STATE_COMMITMENT_CHAIN = \\\"BondManager: Only the state commitment chain may call this function\\\";\\n string constant WAIT_FOR_DISPUTES = \\\"BondManager: Wait for other potential disputes\\\";\\n}\\n\\n/**\\n * @title iOVM_BondManager\\n */\\ninterface iOVM_BondManager {\\n\\n /*******************\\n * Data Structures *\\n *******************/\\n\\n /// The lifecycle of a proposer's bond\\n enum State {\\n // Before depositing or after getting slashed, a user is uncollateralized\\n NOT_COLLATERALIZED,\\n // After depositing, a user is collateralized\\n COLLATERALIZED,\\n // After a user has initiated a withdrawal\\n WITHDRAWING\\n }\\n\\n /// A bond posted by a proposer\\n struct Bond {\\n // The user's state\\n State state;\\n // The timestamp at which a proposer issued their withdrawal request\\n uint32 withdrawalTimestamp;\\n // The time when the first disputed was initiated for this bond\\n uint256 firstDisputeAt;\\n // The earliest observed state root for this bond which has had fraud\\n bytes32 earliestDisputedStateRoot;\\n // The state root's timestamp\\n uint256 earliestTimestamp;\\n }\\n\\n // Per pre-state root, store the number of state provisions that were made\\n // and how many of these calls were made by each user. Payouts will then be\\n // claimed by users proportionally for that dispute.\\n struct Rewards {\\n // Flag to check if rewards for a fraud proof are claimable\\n bool canClaim;\\n // Total number of `recordGasSpent` calls made\\n uint256 total;\\n // The gas spent by each user to provide witness data. The sum of all\\n // values inside this map MUST be equal to the value of `total`\\n mapping(address => uint256) gasSpent;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function recordGasSpent(\\n bytes32 _preStateRoot,\\n bytes32 _txHash,\\n address _who,\\n uint256 _gasSpent\\n ) external;\\n\\n function finalize(\\n bytes32 _preStateRoot,\\n address _publisher,\\n uint256 _timestamp\\n ) external;\\n\\n function deposit() external;\\n\\n function startWithdrawal() external;\\n\\n function finalizeWithdrawal() external;\\n\\n function claim(\\n address _who\\n ) external;\\n\\n function isCollateralized(\\n address _who\\n ) external view returns (bool);\\n\\n function getGasSpent(\\n bytes32 _preStateRoot,\\n address _who\\n ) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x3c2a8a399487857158649db1896749d86e39cba545a8aeb2e2bb0f3bdfa7a5b1\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0xdf802e1cc6474df913626991e9fca3835c620a519f397afe04bf9c260e723257\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_AddressResolver\\n */\\ncontract Lib_AddressResolver {\\n\\n /*******************************************\\n * Contract Variables: Contract References *\\n *******************************************/\\n\\n Lib_AddressManager internal libAddressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n */\\n constructor(\\n address _libAddressManager\\n ) public {\\n libAddressManager = Lib_AddressManager(_libAddressManager);\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function resolve(\\n string memory _name\\n )\\n public\\n view\\n returns (\\n address _contract\\n )\\n {\\n return libAddressManager.getAddress(_name);\\n }\\n}\\n\",\"keccak256\":\"0xf3b9d78b309ddeec259ce3e0e1cfdef3ca40938e9a81971b28ce2b8ea327f533\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// +build ovm\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() internal {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xe0409fbd236d16ca6be439d9d97dd36d0d9a0697ee0062d49588b9d29c248e47\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/mockOVM/verification/mockOVM_BondManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.7.0;\\n\\n/* Interface Imports */\\nimport { iOVM_BondManager } from \\\"../../iOVM/verification/iOVM_BondManager.sol\\\";\\n\\n/* Contract Imports */\\nimport { Lib_AddressResolver } from \\\"../../libraries/resolver/Lib_AddressResolver.sol\\\";\\n\\n/**\\n * @title mockOVM_BondManager\\n */\\ncontract mockOVM_BondManager is iOVM_BondManager, Lib_AddressResolver {\\n constructor(\\n address _libAddressManager\\n )\\n Lib_AddressResolver(_libAddressManager)\\n {}\\n\\n function recordGasSpent(\\n bytes32 _preStateRoot,\\n bytes32 _txHash,\\n address _who,\\n uint256 _gasSpent\\n )\\n override\\n public\\n {}\\n\\n function finalize(\\n bytes32 _preStateRoot,\\n address _publisher,\\n uint256 _timestamp\\n )\\n override\\n public\\n {}\\n\\n function deposit()\\n override\\n public\\n {}\\n\\n function startWithdrawal()\\n override\\n public\\n {}\\n\\n function finalizeWithdrawal()\\n override\\n public\\n {}\\n\\n function claim(\\n address _who\\n )\\n override\\n public\\n {}\\n\\n function isCollateralized(\\n address _who\\n )\\n override\\n public\\n view\\n returns (\\n bool\\n )\\n {\\n // Only authenticate sequencer to submit state root batches.\\n return _who == resolve(\\\"OVM_Sequencer\\\");\\n }\\n\\n function getGasSpent(\\n bytes32 _preStateRoot,\\n address _who\\n )\\n override\\n public\\n view\\n returns (\\n uint256\\n )\\n {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0x03c283c91205609fbc19856d9c7fb15da972c3499e00ed049453654723bfaa4c\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b506040516104463803806104468339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b03199092169190911790556103e1806100656000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063abfbbe1311610066578063abfbbe13146101f4578063bc2f8dd814610226578063c5b6aa2f14610226578063d0e30db014610226578063dc6453dc1461022e57610093565b806302ad4d2a146100985780631e16e92f146100d25780631e83409a1461010c578063461a447814610132575b600080fd5b6100be600480360360208110156100ae57600080fd5b50356001600160a01b031661026c565b604080519115158252519081900360200190f35b61010a600480360360808110156100e857600080fd5b508035906020810135906001600160a01b0360408201351690606001356102b7565b005b61010a6004803603602081101561012257600080fd5b50356001600160a01b03166102bd565b6101d86004803603602081101561014857600080fd5b81019060208101813564010000000081111561016357600080fd5b82018360208201111561017557600080fd5b8035906020019184600183028401116401000000008311171561019757600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506102c0945050505050565b604080516001600160a01b039092168252519081900360200190f35b61010a6004803603606081101561020a57600080fd5b508035906001600160a01b03602082013516906040013561039c565b61010a6103a1565b61025a6004803603604081101561024457600080fd5b50803590602001356001600160a01b03166103a3565b60408051918252519081900360200190f35b600061029c6040518060400160405280600d81526020016c27ab26afa9b2b8bab2b731b2b960991b8152506102c0565b6001600160a01b0316826001600160a01b0316149050919050565b50505050565b50565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b83811015610320578181015183820152602001610308565b50505050905090810190601f16801561034d5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561036a57600080fd5b505afa15801561037e573d6000803e3d6000fd5b505050506040513d602081101561039457600080fd5b505192915050565b505050565b565b60009291505056fea26469706673582212203f0728d2ffd5e87f3b2f160e5704cc5c07ae231349c1c6286f6360e26317c39b64736f6c63430007060033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063abfbbe1311610066578063abfbbe13146101f4578063bc2f8dd814610226578063c5b6aa2f14610226578063d0e30db014610226578063dc6453dc1461022e57610093565b806302ad4d2a146100985780631e16e92f146100d25780631e83409a1461010c578063461a447814610132575b600080fd5b6100be600480360360208110156100ae57600080fd5b50356001600160a01b031661026c565b604080519115158252519081900360200190f35b61010a600480360360808110156100e857600080fd5b508035906020810135906001600160a01b0360408201351690606001356102b7565b005b61010a6004803603602081101561012257600080fd5b50356001600160a01b03166102bd565b6101d86004803603602081101561014857600080fd5b81019060208101813564010000000081111561016357600080fd5b82018360208201111561017557600080fd5b8035906020019184600183028401116401000000008311171561019757600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506102c0945050505050565b604080516001600160a01b039092168252519081900360200190f35b61010a6004803603606081101561020a57600080fd5b508035906001600160a01b03602082013516906040013561039c565b61010a6103a1565b61025a6004803603604081101561024457600080fd5b50803590602001356001600160a01b03166103a3565b60408051918252519081900360200190f35b600061029c6040518060400160405280600d81526020016c27ab26afa9b2b8bab2b731b2b960991b8152506102c0565b6001600160a01b0316826001600160a01b0316149050919050565b50505050565b50565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b83811015610320578181015183820152602001610308565b50505050905090810190601f16801561034d5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561036a57600080fd5b505afa15801561037e573d6000803e3d6000fd5b505050506040513d602081101561039457600080fd5b505192915050565b505050565b565b60009291505056fea26469706673582212203f0728d2ffd5e87f3b2f160e5704cc5c07ae231349c1c6286f6360e26317c39b64736f6c63430007060033",
"devdoc": {
"kind": "dev",
"methods": {},
"title": "mockOVM_BondManager",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 11707,
"contract": "contracts/optimistic-ethereum/mockOVM/verification/mockOVM_BondManager.sol:mockOVM_BondManager",
"label": "libAddressManager",
"offset": 0,
"slot": "0",
"type": "t_contract(Lib_AddressManager)11700"
}
],
"types": {
"t_contract(Lib_AddressManager)11700": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
}
}
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"address": "0xd3EeD86464Ff13B4BFD81a3bB1e753b7ceBA3A39",
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "_name",
"type": "string"
},
{
"indexed": false,
"internalType": "address",
"name": "_newAddress",
"type": "address"
}
],
"name": "AddressSet",
"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"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "getAddress",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
},
{
"internalType": "address",
"name": "_address",
"type": "address"
}
],
"name": "setAddress",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"transactionHash": "0x3f0530a8f329bf40345ebeb476efaf823ec5c89f3d1cc41f494e6d218b2ef08f",
"receipt": {
"to": null,
"from": "0x77C4c8f491e5ff22a2C0E18b005c3BA0Fe36c1Bc",
"contractAddress": "0xd3EeD86464Ff13B4BFD81a3bB1e753b7ceBA3A39",
"transactionIndex": 197,
"gasUsed": "403788",
"logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000080000000000000000000000000000000000000000000008000000000001000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000010000400000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x9d66eda604e8274e6adb8b371ab52f1874b2402c2d6fb7d91ce0ace69b8f801c",
"transactionHash": "0x3f0530a8f329bf40345ebeb476efaf823ec5c89f3d1cc41f494e6d218b2ef08f",
"logs": [
{
"transactionIndex": 197,
"blockNumber": 12207737,
"transactionHash": "0x3f0530a8f329bf40345ebeb476efaf823ec5c89f3d1cc41f494e6d218b2ef08f",
"address": "0xd3EeD86464Ff13B4BFD81a3bB1e753b7ceBA3A39",
"topics": [
"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x00000000000000000000000077c4c8f491e5ff22a2c0e18b005c3ba0fe36c1bc"
],
"data": "0x",
"logIndex": 104,
"blockHash": "0x9d66eda604e8274e6adb8b371ab52f1874b2402c2d6fb7d91ce0ace69b8f801c"
}
],
"blockNumber": 12207737,
"cumulativeGasUsed": "9721212",
"status": 1,
"byzantium": true
},
"args": [],
"solcInputHash": "43ee6bb8ef92595aa6d0e22a6c464dff",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_newAddress\",\"type\":\"address\"}],\"name\":\"AddressSet\",\"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\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"getAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"setAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"title\":\"Lib_AddressManager\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":\"Lib_AddressManager\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0x3a490595cc21ff170e4027843093670ff845d5972481fbfb956b722ea564bb06\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xd9dfd9264e5b5fedd53a5b10fdf179c3f367614b0fe69179bce4e45119f5b739\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b03191633178082556040516001600160a01b039190911691907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36105eb806100696000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c8063715018a61461005c5780638da5cb5b146100665780639b2ea4bd1461008a578063bf40fac11461013b578063f2fde38b146101e1575b600080fd5b610064610207565b005b61006e6102b0565b604080516001600160a01b039092168252519081900360200190f35b610064600480360360408110156100a057600080fd5b8101906020810181356401000000008111156100bb57600080fd5b8201836020820111156100cd57600080fd5b803590602001918460018302840111640100000000831117156100ef57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b031691506102bf9050565b61006e6004803603602081101561015157600080fd5b81019060208101813564010000000081111561016c57600080fd5b82018360208201111561017e57600080fd5b803590602001918460018302840111640100000000831117156101a057600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061040c945050505050565b610064600480360360208110156101f757600080fd5b50356001600160a01b031661043b565b6000546001600160a01b03163314610266576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031681565b6000546001600160a01b0316331461031e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b7f188466739ff00cc68bfb2367d23ae4b855264264fe1624caa8884399af23454c82826040518080602001836001600160a01b03168152602001828103825284818151815260200191508051906020019080838360005b8381101561038d578181015183820152602001610375565b50505050905090810190601f1680156103ba5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a180600160006103d68561053a565b815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055505050565b60006001600061041b8461053a565b81526020810191909152604001600020546001600160a01b031692915050565b6000546001600160a01b0316331461049a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166104df5760405162461bcd60e51b815260040180806020018281038252602d8152602001806105b2602d913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000816040516020018082805190602001908083835b6020831061056f5780518252601f199092019160209182019101610550565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120905091905056fe4f776e61626c653a206e6577206f776e65722063616e6e6f7420626520746865207a65726f2061646472657373a164736f6c6343000706000a",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c8063715018a61461005c5780638da5cb5b146100665780639b2ea4bd1461008a578063bf40fac11461013b578063f2fde38b146101e1575b600080fd5b610064610207565b005b61006e6102b0565b604080516001600160a01b039092168252519081900360200190f35b610064600480360360408110156100a057600080fd5b8101906020810181356401000000008111156100bb57600080fd5b8201836020820111156100cd57600080fd5b803590602001918460018302840111640100000000831117156100ef57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b031691506102bf9050565b61006e6004803603602081101561015157600080fd5b81019060208101813564010000000081111561016c57600080fd5b82018360208201111561017e57600080fd5b803590602001918460018302840111640100000000831117156101a057600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061040c945050505050565b610064600480360360208110156101f757600080fd5b50356001600160a01b031661043b565b6000546001600160a01b03163314610266576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031681565b6000546001600160a01b0316331461031e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b7f188466739ff00cc68bfb2367d23ae4b855264264fe1624caa8884399af23454c82826040518080602001836001600160a01b03168152602001828103825284818151815260200191508051906020019080838360005b8381101561038d578181015183820152602001610375565b50505050905090810190601f1680156103ba5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a180600160006103d68561053a565b815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055505050565b60006001600061041b8461053a565b81526020810191909152604001600020546001600160a01b031692915050565b6000546001600160a01b0316331461049a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166104df5760405162461bcd60e51b815260040180806020018281038252602d8152602001806105b2602d913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000816040516020018082805190602001908083835b6020831061056f5780518252601f199092019160209182019101610550565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120905091905056fe4f776e61626c653a206e6577206f776e65722063616e6e6f7420626520746865207a65726f2061646472657373a164736f6c6343000706000a",
"devdoc": {
"kind": "dev",
"methods": {},
"title": "Lib_AddressManager",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 12586,
"contract": "contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol:Lib_AddressManager",
"label": "owner",
"offset": 0,
"slot": "0",
"type": "t_address"
},
{
"astId": 12494,
"contract": "contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol:Lib_AddressManager",
"label": "addresses",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_bytes32,t_address)"
}
],
"types": {
"t_address": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
},
"t_bytes32": {
"encoding": "inplace",
"label": "bytes32",
"numberOfBytes": "32"
},
"t_mapping(t_bytes32,t_address)": {
"encoding": "mapping",
"key": "t_bytes32",
"label": "mapping(bytes32 => address)",
"numberOfBytes": "32",
"value": "t_address"
}
}
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"address": "0x65E921eE201E4a0881FF84ea462baB744bB2fbf0",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_libAddressManager",
"type": "address"
},
{
"internalType": "string",
"name": "_owner",
"type": "string"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "deleteElementsAfterInclusive",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "deleteElementsAfterInclusive",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "get",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getGlobalMetadata",
"outputs": [
{
"internalType": "bytes27",
"name": "",
"type": "bytes27"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "length",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "libAddressManager",
"outputs": [
{
"internalType": "contract Lib_AddressManager",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_object",
"type": "bytes32"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "push",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_object",
"type": "bytes32"
}
],
"name": "push",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "resolve",
"outputs": [
{
"internalType": "address",
"name": "_contract",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "setGlobalMetadata",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "setNextOverwritableIndex",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"transactionHash": "0x3abb7147109cf28b011821fdb82e0c25556ea9049f9b4466d49e4ca3ba66f3db",
"receipt": {
"to": null,
"from": "0x77C4c8f491e5ff22a2C0E18b005c3BA0Fe36c1Bc",
"contractAddress": "0x65E921eE201E4a0881FF84ea462baB744bB2fbf0",
"transactionIndex": 43,
"gasUsed": "959533",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0xb2874206a5352bb8c8e7cbbe1a18a72aff412ab482441452e2b1ceac3b8c5ec3",
"transactionHash": "0x3abb7147109cf28b011821fdb82e0c25556ea9049f9b4466d49e4ca3ba66f3db",
"logs": [],
"blockNumber": 12207766,
"cumulativeGasUsed": "3990129",
"status": 1,
"byzantium": true
},
"args": [
"0xd3EeD86464Ff13B4BFD81a3bB1e753b7ceBA3A39",
"OVM_CanonicalTransactionChain"
],
"solcInputHash": "43ee6bb8ef92595aa6d0e22a6c464dff",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_owner\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"deleteElementsAfterInclusive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"deleteElementsAfterInclusive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"get\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGlobalMetadata\",\"outputs\":[{\"internalType\":\"bytes27\",\"name\":\"\",\"type\":\"bytes27\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"length\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"libAddressManager\",\"outputs\":[{\"internalType\":\"contract Lib_AddressManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_object\",\"type\":\"bytes32\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"push\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_object\",\"type\":\"bytes32\"}],\"name\":\"push\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"setGlobalMetadata\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"setNextOverwritableIndex\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"The Chain Storage Container provides its owner contract with read, write and delete functionality. This provides gas efficiency gains by enabling it to overwrite storage slots which can no longer be used in a fraud proof due to the fraud window having passed, and the associated chain state or transactions being finalized. Three distinct Chain Storage Containers will be deployed on Layer 1: 1. Stores transaction batches for the Canonical Transaction Chain 2. Stores queued transactions for the Canonical Transaction Chain 3. Stores chain state batches for the State Commitment Chain Compiler used: solc Runtime target: EVM\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_libAddressManager\":\"Address of the Address Manager.\",\"_owner\":\"Name of the contract that owns this container (will be resolved later).\"}},\"deleteElementsAfterInclusive(uint256)\":{\"params\":{\"_index\":\"Object index to delete from.\"}},\"deleteElementsAfterInclusive(uint256,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_index\":\"Object index to delete from.\"}},\"get(uint256)\":{\"params\":{\"_index\":\"Index of the particular object to access.\"},\"returns\":{\"_0\":\"32 byte object value.\"}},\"getGlobalMetadata()\":{\"returns\":{\"_0\":\"Container global metadata field.\"}},\"length()\":{\"returns\":{\"_0\":\"Number of objects in the container.\"}},\"push(bytes32)\":{\"params\":{\"_object\":\"A 32 byte value to insert into the container.\"}},\"push(bytes32,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_object\":\"A 32 byte value to insert into the container.\"}},\"setGlobalMetadata(bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata to set.\"}}},\"title\":\"OVM_ChainStorageContainer\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deleteElementsAfterInclusive(uint256)\":{\"notice\":\"Removes all objects after and including a given index.\"},\"deleteElementsAfterInclusive(uint256,bytes27)\":{\"notice\":\"Removes all objects after and including a given index. Also allows setting the global metadata field.\"},\"get(uint256)\":{\"notice\":\"Retrieves an object from the container.\"},\"getGlobalMetadata()\":{\"notice\":\"Retrieves the container's global metadata field.\"},\"length()\":{\"notice\":\"Retrieves the number of objects stored in the container.\"},\"push(bytes32)\":{\"notice\":\"Pushes an object into the container.\"},\"push(bytes32,bytes27)\":{\"notice\":\"Pushes an object into the container. Function allows setting the global metadata since we'll need to touch the \\\"length\\\" storage slot anyway, which also contains the global metadata (it's an optimization).\"},\"setGlobalMetadata(bytes27)\":{\"notice\":\"Sets the container's global metadata field. We're using `bytes27` here because we use five bytes to maintain the length of the underlying data structure, meaning we have an extra 27 bytes to store arbitrary data.\"},\"setNextOverwritableIndex(uint256)\":{\"notice\":\"Marks an index as overwritable, meaing the underlying buffer can start to write values over any objects before and including the given index.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol\":\"OVM_ChainStorageContainer\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_RingBuffer } from \\\"../../libraries/utils/Lib_RingBuffer.sol\\\";\\nimport { Lib_AddressResolver } from \\\"../../libraries/resolver/Lib_AddressResolver.sol\\\";\\n\\n/* Interface Imports */\\nimport { iOVM_ChainStorageContainer } from \\\"../../iOVM/chain/iOVM_ChainStorageContainer.sol\\\";\\n\\n/**\\n * @title OVM_ChainStorageContainer\\n * @dev The Chain Storage Container provides its owner contract with read, write and delete functionality.\\n * This provides gas efficiency gains by enabling it to overwrite storage slots which can no longer be used\\n * in a fraud proof due to the fraud window having passed, and the associated chain state or\\n * transactions being finalized.\\n * Three distinct Chain Storage Containers will be deployed on Layer 1:\\n * 1. Stores transaction batches for the Canonical Transaction Chain\\n * 2. Stores queued transactions for the Canonical Transaction Chain\\n * 3. Stores chain state batches for the State Commitment Chain\\n *\\n * Compiler used: solc\\n * Runtime target: EVM\\n */\\ncontract OVM_ChainStorageContainer is iOVM_ChainStorageContainer, Lib_AddressResolver {\\n\\n /*************\\n * Libraries *\\n *************/\\n\\n using Lib_RingBuffer for Lib_RingBuffer.RingBuffer;\\n\\n\\n /*************\\n * Variables *\\n *************/\\n\\n string public owner;\\n Lib_RingBuffer.RingBuffer internal buffer;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Address Manager.\\n * @param _owner Name of the contract that owns this container (will be resolved later).\\n */\\n constructor(\\n address _libAddressManager,\\n string memory _owner\\n )\\n Lib_AddressResolver(_libAddressManager)\\n {\\n owner = _owner;\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n msg.sender == resolve(owner),\\n \\\"OVM_ChainStorageContainer: Function can only be called by the owner.\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function setGlobalMetadata(\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n return buffer.setExtraData(_globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function getGlobalMetadata()\\n override\\n public\\n view\\n returns (\\n bytes27\\n )\\n {\\n return buffer.getExtraData();\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function length()\\n override\\n public\\n view\\n returns (\\n uint256\\n )\\n {\\n return uint256(buffer.getLength());\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push(\\n bytes32 _object\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push(_object);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push(\\n bytes32 _object,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push(_object, _globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function get(\\n uint256 _index\\n )\\n override\\n public\\n view\\n returns (\\n bytes32\\n )\\n {\\n return buffer.get(uint40(_index));\\n }\\n \\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.deleteElementsAfterInclusive(\\n uint40(_index)\\n );\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.deleteElementsAfterInclusive(\\n uint40(_index),\\n _globalMetadata\\n );\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function setNextOverwritableIndex(\\n uint256 _index\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.nextOverwritableIndex = _index;\\n }\\n}\\n\",\"keccak256\":\"0x52e3ef7166fe134d32997917067e3d74128173b12fb6231eec34132102ddbb50\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/iOVM/chain/iOVM_ChainStorageContainer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title iOVM_ChainStorageContainer\\n */\\ninterface iOVM_ChainStorageContainer {\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Sets the container's global metadata field. We're using `bytes27` here because we use five\\n * bytes to maintain the length of the underlying data structure, meaning we have an extra\\n * 27 bytes to store arbitrary data.\\n * @param _globalMetadata New global metadata to set.\\n */\\n function setGlobalMetadata(\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Retrieves the container's global metadata field.\\n * @return Container global metadata field.\\n */\\n function getGlobalMetadata()\\n external\\n view\\n returns (\\n bytes27\\n );\\n\\n /**\\n * Retrieves the number of objects stored in the container.\\n * @return Number of objects in the container.\\n */\\n function length()\\n external\\n view\\n returns (\\n uint256\\n );\\n\\n /**\\n * Pushes an object into the container.\\n * @param _object A 32 byte value to insert into the container.\\n */\\n function push(\\n bytes32 _object\\n )\\n external;\\n\\n /**\\n * Pushes an object into the container. Function allows setting the global metadata since\\n * we'll need to touch the \\\"length\\\" storage slot anyway, which also contains the global\\n * metadata (it's an optimization).\\n * @param _object A 32 byte value to insert into the container.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function push(\\n bytes32 _object,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Retrieves an object from the container.\\n * @param _index Index of the particular object to access.\\n * @return 32 byte object value.\\n */\\n function get(\\n uint256 _index\\n )\\n external\\n view\\n returns (\\n bytes32\\n );\\n\\n /**\\n * Removes all objects after and including a given index.\\n * @param _index Object index to delete from.\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index\\n )\\n external;\\n\\n /**\\n * Removes all objects after and including a given index. Also allows setting the global\\n * metadata field.\\n * @param _index Object index to delete from.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Marks an index as overwritable, meaing the underlying buffer can start to write values over\\n * any objects before and including the given index.\\n */\\n function setNextOverwritableIndex(\\n uint256 _index\\n )\\n external;\\n}\\n\",\"keccak256\":\"0x2d7973a0ad84c23ec62624d3f1e3aeb198cc72686ff1e6cfa17155556b320c94\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0x3a490595cc21ff170e4027843093670ff845d5972481fbfb956b722ea564bb06\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_AddressResolver\\n */\\nabstract contract Lib_AddressResolver {\\n\\n /*******************************************\\n * Contract Variables: Contract References *\\n *******************************************/\\n\\n Lib_AddressManager public libAddressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n */\\n constructor(\\n address _libAddressManager\\n ) {\\n libAddressManager = Lib_AddressManager(_libAddressManager);\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function resolve(\\n string memory _name\\n )\\n public\\n view\\n returns (\\n address _contract\\n )\\n {\\n return libAddressManager.getAddress(_name);\\n }\\n}\\n\",\"keccak256\":\"0xaa3ed342f6deb156c660fd83afa579a3b80db17eb465e8949cf5c1b114780143\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xd9dfd9264e5b5fedd53a5b10fdf179c3f367614b0fe69179bce4e45119f5b739\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/utils/Lib_RingBuffer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\nlibrary Lib_RingBuffer {\\n using Lib_RingBuffer for RingBuffer;\\n\\n /***********\\n * Structs *\\n ***********/\\n\\n struct Buffer {\\n uint256 length;\\n mapping (uint256 => bytes32) buf;\\n }\\n\\n struct RingBuffer {\\n bytes32 contextA;\\n bytes32 contextB;\\n Buffer bufferA;\\n Buffer bufferB;\\n uint256 nextOverwritableIndex;\\n }\\n\\n struct RingBufferContext {\\n // contextA\\n uint40 globalIndex;\\n bytes27 extraData;\\n\\n // contextB\\n uint64 currBufferIndex;\\n uint40 prevResetIndex;\\n uint40 currResetIndex;\\n }\\n\\n\\n /*************\\n * Constants *\\n *************/\\n\\n uint256 constant MIN_CAPACITY = 16;\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * Pushes a single element to the buffer.\\n * @param _self Buffer to access.\\n * @param _value Value to push to the buffer.\\n * @param _extraData Optional global extra data.\\n */\\n function push(\\n RingBuffer storage _self,\\n bytes32 _value,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n\\n // Set a minimum capacity.\\n if (currBuffer.length == 0) {\\n currBuffer.length = MIN_CAPACITY;\\n }\\n\\n // Check if we need to expand the buffer.\\n if (ctx.globalIndex - ctx.currResetIndex >= currBuffer.length) {\\n if (ctx.currResetIndex < _self.nextOverwritableIndex) {\\n // We're going to overwrite the inactive buffer.\\n // Bump the buffer index, reset the delete offset, and set our reset indices.\\n ctx.currBufferIndex++;\\n ctx.prevResetIndex = ctx.currResetIndex;\\n ctx.currResetIndex = ctx.globalIndex;\\n\\n // Swap over to the next buffer.\\n currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n } else {\\n // We're not overwriting yet, double the length of the current buffer.\\n currBuffer.length *= 2;\\n }\\n }\\n\\n // Index to write to is the difference of the global and reset indices.\\n uint256 writeHead = ctx.globalIndex - ctx.currResetIndex;\\n currBuffer.buf[writeHead] = _value;\\n\\n // Bump the global index and insert our extra data, then save the context.\\n ctx.globalIndex++;\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Pushes a single element to the buffer.\\n * @param _self Buffer to access.\\n * @param _value Value to push to the buffer.\\n */\\n function push(\\n RingBuffer storage _self,\\n bytes32 _value\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n \\n _self.push(\\n _value,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Retrieves an element from the buffer.\\n * @param _self Buffer to access.\\n * @param _index Element index to retrieve.\\n * @return Value of the element at the given index.\\n */\\n function get(\\n RingBuffer storage _self,\\n uint256 _index\\n )\\n internal\\n view\\n returns (\\n bytes32 \\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n require(\\n _index < ctx.globalIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n Buffer storage prevBuffer = _self.getBuffer(ctx.currBufferIndex + 1);\\n\\n if (_index >= ctx.currResetIndex) {\\n // We're trying to load an element from the current buffer.\\n // Relative index is just the difference from the reset index.\\n uint256 relativeIndex = _index - ctx.currResetIndex;\\n\\n // Shouldn't happen but why not check.\\n require(\\n relativeIndex < currBuffer.length,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n return currBuffer.buf[relativeIndex];\\n } else {\\n // We're trying to load an element from the previous buffer.\\n // Relative index is the difference from the reset index in the other direction.\\n uint256 relativeIndex = ctx.currResetIndex - _index;\\n\\n // Condition only fails in the case that we deleted and flipped buffers.\\n require(\\n ctx.currResetIndex > ctx.prevResetIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n // Make sure we're not trying to read beyond the array.\\n require(\\n relativeIndex <= prevBuffer.length,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n return prevBuffer.buf[prevBuffer.length - relativeIndex];\\n }\\n }\\n\\n /**\\n * Deletes all elements after (and including) a given index.\\n * @param _self Buffer to access.\\n * @param _index Index of the element to delete from (inclusive).\\n * @param _extraData Optional global extra data.\\n */\\n function deleteElementsAfterInclusive(\\n RingBuffer storage _self,\\n uint40 _index,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n require(\\n _index < ctx.globalIndex && _index >= ctx.prevResetIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n if (_index < ctx.currResetIndex) {\\n // We're switching back to the previous buffer.\\n // Reduce the buffer index, set the current reset index back to match the previous one.\\n // We use the equality of these two values to prevent reading beyond this buffer.\\n ctx.currBufferIndex--;\\n ctx.currResetIndex = ctx.prevResetIndex;\\n }\\n\\n // Set our global index and extra data, save the context.\\n ctx.globalIndex = _index;\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Deletes all elements after (and including) a given index.\\n * @param _self Buffer to access.\\n * @param _index Index of the element to delete from (inclusive).\\n */\\n function deleteElementsAfterInclusive(\\n RingBuffer storage _self,\\n uint40 _index\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n _self.deleteElementsAfterInclusive(\\n _index,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Retrieves the current global index.\\n * @param _self Buffer to access.\\n * @return Current global index.\\n */\\n function getLength(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n uint40\\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n return ctx.globalIndex;\\n }\\n\\n /**\\n * Changes current global extra data.\\n * @param _self Buffer to access.\\n * @param _extraData New global extra data.\\n */\\n function setExtraData(\\n RingBuffer storage _self,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Retrieves the current global extra data.\\n * @param _self Buffer to access.\\n * @return Current global extra data.\\n */\\n function getExtraData(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n bytes27\\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n return ctx.extraData;\\n }\\n\\n /**\\n * Sets the current ring buffer context.\\n * @param _self Buffer to access.\\n * @param _ctx Current ring buffer context.\\n */\\n function setContext(\\n RingBuffer storage _self,\\n RingBufferContext memory _ctx\\n )\\n internal\\n {\\n bytes32 contextA;\\n bytes32 contextB;\\n\\n uint40 globalIndex = _ctx.globalIndex;\\n bytes27 extraData = _ctx.extraData;\\n assembly {\\n contextA := globalIndex\\n contextA := or(contextA, extraData)\\n }\\n\\n uint64 currBufferIndex = _ctx.currBufferIndex;\\n uint40 prevResetIndex = _ctx.prevResetIndex;\\n uint40 currResetIndex = _ctx.currResetIndex;\\n assembly {\\n contextB := currBufferIndex\\n contextB := or(contextB, shl(64, prevResetIndex))\\n contextB := or(contextB, shl(104, currResetIndex))\\n }\\n\\n if (_self.contextA != contextA) {\\n _self.contextA = contextA;\\n }\\n\\n if (_self.contextB != contextB) {\\n _self.contextB = contextB;\\n }\\n }\\n\\n /**\\n * Retrieves the current ring buffer context.\\n * @param _self Buffer to access.\\n * @return Current ring buffer context.\\n */\\n function getContext(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n RingBufferContext memory\\n )\\n {\\n bytes32 contextA = _self.contextA;\\n bytes32 contextB = _self.contextB;\\n\\n uint40 globalIndex;\\n bytes27 extraData;\\n assembly {\\n globalIndex := and(contextA, 0x000000000000000000000000000000000000000000000000000000FFFFFFFFFF)\\n extraData := and(contextA, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000)\\n }\\n\\n uint64 currBufferIndex;\\n uint40 prevResetIndex;\\n uint40 currResetIndex;\\n assembly {\\n currBufferIndex := and(contextB, 0x000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFF)\\n prevResetIndex := shr(64, and(contextB, 0x00000000000000000000000000000000000000FFFFFFFFFF0000000000000000))\\n currResetIndex := shr(104, and(contextB, 0x0000000000000000000000000000FFFFFFFFFF00000000000000000000000000))\\n }\\n\\n return RingBufferContext({\\n globalIndex: globalIndex,\\n extraData: extraData,\\n currBufferIndex: currBufferIndex,\\n prevResetIndex: prevResetIndex,\\n currResetIndex: currResetIndex\\n });\\n }\\n\\n /**\\n * Retrieves the a buffer from the ring buffer by index.\\n * @param _self Buffer to access.\\n * @param _which Index of the sub buffer to access.\\n * @return Sub buffer for the index.\\n */\\n function getBuffer(\\n RingBuffer storage _self,\\n uint256 _which\\n )\\n internal\\n view\\n returns (\\n Buffer storage\\n )\\n {\\n return _which % 2 == 0 ? _self.bufferA : _self.bufferB;\\n }\\n}\\n\",\"keccak256\":\"0xb38cb98da2d09f922d5cfe772bdbd36ede2b2267ade93128e949c9da21b89940\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x60806040523480156200001157600080fd5b506040516200116438038062001164833981810160405260408110156200003757600080fd5b8151602083018051604051929492938301929190846401000000008211156200005f57600080fd5b9083019060208201858111156200007557600080fd5b82516401000000008111828201881017156200009057600080fd5b82525081516020918201929091019080838360005b83811015620000bf578181015183820152602001620000a5565b50505050905090810190601f168015620000ed5780820380516001836020036101000a031916815260200191505b506040525050600080546001600160a01b0319166001600160a01b038516179055508051620001249060019060208401906200012d565b505050620001d9565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001655760008555620001b0565b82601f106200018057805160ff1916838001178555620001b0565b82800160010185558215620001b0579182015b82811115620001b057825182559160200191906001019062000193565b50620001be929150620001c2565b5090565b5b80821115620001be5760008155600101620001c3565b610f7b80620001e96000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80634651d91e116100715780634651d91e1461021a5780638da5cb5b146102375780639507d39a146102b4578063b298e36b146102d1578063ccf8f969146102ee578063fa9e936c14610311576100b4565b8063167fd681146100b95780631f7b6d32146100e65780632015276c1461010057806329061de21461012b578063299ca47814610150578063461a447814610174575b600080fd5b6100e4600480360360408110156100cf57600080fd5b508035906020013564ffffffffff191661032e565b005b6100ee610423565b60408051918252519081900360200190f35b6100e46004803603604081101561011657600080fd5b508035906020013564ffffffffff191661043b565b6100e46004803603602081101561014157600080fd5b503564ffffffffff19166104f7565b6101586105b5565b604080516001600160a01b039092168252519081900360200190f35b6101586004803603602081101561018a57600080fd5b8101906020810181356401000000008111156101a557600080fd5b8201836020820111156101b757600080fd5b803590602001918460018302840111640100000000831117156101d957600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506105c4945050505050565b6100e46004803603602081101561023057600080fd5b50356106a0565b61023f61075b565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610279578181015183820152602001610261565b50505050905090810190601f1680156102a65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100ee600480360360208110156102ca57600080fd5b50356107e8565b6100e4600480360360208110156102e757600080fd5b5035610802565b6102f66108bd565b6040805164ffffffffff199092168252519081900360200190f35b6100e46004803603602081101561032757600080fd5b50356108ce565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526103c493909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b820191906000526020600020905b81548152906001019060200180831161039d57829003601f168201915b50505050506105c4565b6001600160a01b0316336001600160a01b0316146104135760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b61041f60028383610983565b5050565b600061042f6002610a75565b64ffffffffff16905090565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261049c93909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146104eb5760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b61041f60028383610a89565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261055893909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146105a75760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610b90565b50565b6000546001600160a01b031681565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b8381101561062457818101518382015260200161060c565b50505050905090810190601f1680156106515780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561066e57600080fd5b505afa158015610682573d6000803e3d6000fd5b505050506040513d602081101561069857600080fd5b505192915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261070193909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146107505760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610bba565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156107e05780601f106107b5576101008083540402835291602001916107e0565b820191906000526020600020905b8154815290600101906020018083116107c357829003601f168201915b505050505081565b60006107fc600264ffffffffff8416610be0565b92915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261086393909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146108b25760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610de9565b60006108c96002610e0f565b905090565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261092f93909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b03161461097e5760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b600855565b600061098e84610e26565b9050806000015164ffffffffff168364ffffffffff161080156109c35750806060015164ffffffffff168364ffffffffff1610155b610a0b576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b806080015164ffffffffff168364ffffffffff161015610a4d576040810180516000190167ffffffffffffffff169052606081015164ffffffffff1660808201525b64ffffffffff8316815264ffffffffff1982166020820152610a6f8482610e86565b50505050565b600080610a8183610e26565b519392505050565b6000610a9484610e26565b90506000610ab9826040015167ffffffffffffffff1686610edc90919063ffffffff16565b8054909150610ac757601081555b8054608083015183510364ffffffffff1610610b3e578460060154826080015164ffffffffff161015610b365760408201805160010167ffffffffffffffff169081905260808301805164ffffffffff90811660608601528451169052610b2f908690610edc565b9050610b3e565b805460020281555b608082015182510364ffffffffff9081166000818152600184810160209081526040909220889055855101909216845264ffffffffff19851691840191909152610b888684610e86565b505050505050565b6000610b9b83610e26565b64ffffffffff19831660208201529050610bb58382610e86565b505050565b6000610bc583610e26565b9050610bb5828260200151856109839092919063ffffffff16565b600080610bec84610e26565b805190915064ffffffffff168310610c42576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610c65826040015167ffffffffffffffff1686610edc90919063ffffffff16565b90506000610c8d836040015160010167ffffffffffffffff1687610edc90919063ffffffff16565b9050826080015164ffffffffff168510610d1a576080830151825464ffffffffff9091168603908110610cfe576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000908152600190920160205250604090205491506107fc9050565b6080830151606084015164ffffffffff9182168781039290911610610d7d576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154811115610dca576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b81540360009081526001909101602052604090205492506107fc915050565b6000610df483610e26565b9050610bb582826020015185610a899092919063ffffffff16565b600080610e1b83610e26565b602001519392505050565b610e2e610efc565b5080546001909101546040805160a08101825264ffffffffff808516825264ffffffffff19909416602082015267ffffffffffffffff8316818301529082901c8316606082015260689190911c909116608082015290565b80516020820151604080840151606085015160808601518754858717969483901b8417606883901b1795939291908714610ebe578689555b85896001015414610ed157600189018690555b505050505050505050565b60006002820615610ef05782600401610ef5565b826002015b9392505050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe4f564d5f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206f776e65722ea164736f6c6343000706000a",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c80634651d91e116100715780634651d91e1461021a5780638da5cb5b146102375780639507d39a146102b4578063b298e36b146102d1578063ccf8f969146102ee578063fa9e936c14610311576100b4565b8063167fd681146100b95780631f7b6d32146100e65780632015276c1461010057806329061de21461012b578063299ca47814610150578063461a447814610174575b600080fd5b6100e4600480360360408110156100cf57600080fd5b508035906020013564ffffffffff191661032e565b005b6100ee610423565b60408051918252519081900360200190f35b6100e46004803603604081101561011657600080fd5b508035906020013564ffffffffff191661043b565b6100e46004803603602081101561014157600080fd5b503564ffffffffff19166104f7565b6101586105b5565b604080516001600160a01b039092168252519081900360200190f35b6101586004803603602081101561018a57600080fd5b8101906020810181356401000000008111156101a557600080fd5b8201836020820111156101b757600080fd5b803590602001918460018302840111640100000000831117156101d957600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506105c4945050505050565b6100e46004803603602081101561023057600080fd5b50356106a0565b61023f61075b565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610279578181015183820152602001610261565b50505050905090810190601f1680156102a65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100ee600480360360208110156102ca57600080fd5b50356107e8565b6100e4600480360360208110156102e757600080fd5b5035610802565b6102f66108bd565b6040805164ffffffffff199092168252519081900360200190f35b6100e46004803603602081101561032757600080fd5b50356108ce565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526103c493909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b820191906000526020600020905b81548152906001019060200180831161039d57829003601f168201915b50505050506105c4565b6001600160a01b0316336001600160a01b0316146104135760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b61041f60028383610983565b5050565b600061042f6002610a75565b64ffffffffff16905090565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261049c93909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146104eb5760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b61041f60028383610a89565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261055893909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146105a75760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610b90565b50565b6000546001600160a01b031681565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b8381101561062457818101518382015260200161060c565b50505050905090810190601f1680156106515780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561066e57600080fd5b505afa158015610682573d6000803e3d6000fd5b505050506040513d602081101561069857600080fd5b505192915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261070193909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146107505760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610bba565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156107e05780601f106107b5576101008083540402835291602001916107e0565b820191906000526020600020905b8154815290600101906020018083116107c357829003601f168201915b505050505081565b60006107fc600264ffffffffff8416610be0565b92915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261086393909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146108b25760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610de9565b60006108c96002610e0f565b905090565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261092f93909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b03161461097e5760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b600855565b600061098e84610e26565b9050806000015164ffffffffff168364ffffffffff161080156109c35750806060015164ffffffffff168364ffffffffff1610155b610a0b576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b806080015164ffffffffff168364ffffffffff161015610a4d576040810180516000190167ffffffffffffffff169052606081015164ffffffffff1660808201525b64ffffffffff8316815264ffffffffff1982166020820152610a6f8482610e86565b50505050565b600080610a8183610e26565b519392505050565b6000610a9484610e26565b90506000610ab9826040015167ffffffffffffffff1686610edc90919063ffffffff16565b8054909150610ac757601081555b8054608083015183510364ffffffffff1610610b3e578460060154826080015164ffffffffff161015610b365760408201805160010167ffffffffffffffff169081905260808301805164ffffffffff90811660608601528451169052610b2f908690610edc565b9050610b3e565b805460020281555b608082015182510364ffffffffff9081166000818152600184810160209081526040909220889055855101909216845264ffffffffff19851691840191909152610b888684610e86565b505050505050565b6000610b9b83610e26565b64ffffffffff19831660208201529050610bb58382610e86565b505050565b6000610bc583610e26565b9050610bb5828260200151856109839092919063ffffffff16565b600080610bec84610e26565b805190915064ffffffffff168310610c42576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610c65826040015167ffffffffffffffff1686610edc90919063ffffffff16565b90506000610c8d836040015160010167ffffffffffffffff1687610edc90919063ffffffff16565b9050826080015164ffffffffff168510610d1a576080830151825464ffffffffff9091168603908110610cfe576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000908152600190920160205250604090205491506107fc9050565b6080830151606084015164ffffffffff9182168781039290911610610d7d576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154811115610dca576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b81540360009081526001909101602052604090205492506107fc915050565b6000610df483610e26565b9050610bb582826020015185610a899092919063ffffffff16565b600080610e1b83610e26565b602001519392505050565b610e2e610efc565b5080546001909101546040805160a08101825264ffffffffff808516825264ffffffffff19909416602082015267ffffffffffffffff8316818301529082901c8316606082015260689190911c909116608082015290565b80516020820151604080840151606085015160808601518754858717969483901b8417606883901b1795939291908714610ebe578689555b85896001015414610ed157600189018690555b505050505050505050565b60006002820615610ef05782600401610ef5565b826002015b9392505050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe4f564d5f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206f776e65722ea164736f6c6343000706000a",
"devdoc": {
"details": "The Chain Storage Container provides its owner contract with read, write and delete functionality. This provides gas efficiency gains by enabling it to overwrite storage slots which can no longer be used in a fraud proof due to the fraud window having passed, and the associated chain state or transactions being finalized. Three distinct Chain Storage Containers will be deployed on Layer 1: 1. Stores transaction batches for the Canonical Transaction Chain 2. Stores queued transactions for the Canonical Transaction Chain 3. Stores chain state batches for the State Commitment Chain Compiler used: solc Runtime target: EVM",
"kind": "dev",
"methods": {
"constructor": {
"params": {
"_libAddressManager": "Address of the Address Manager.",
"_owner": "Name of the contract that owns this container (will be resolved later)."
}
},
"deleteElementsAfterInclusive(uint256)": {
"params": {
"_index": "Object index to delete from."
}
},
"deleteElementsAfterInclusive(uint256,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_index": "Object index to delete from."
}
},
"get(uint256)": {
"params": {
"_index": "Index of the particular object to access."
},
"returns": {
"_0": "32 byte object value."
}
},
"getGlobalMetadata()": {
"returns": {
"_0": "Container global metadata field."
}
},
"length()": {
"returns": {
"_0": "Number of objects in the container."
}
},
"push(bytes32)": {
"params": {
"_object": "A 32 byte value to insert into the container."
}
},
"push(bytes32,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_object": "A 32 byte value to insert into the container."
}
},
"setGlobalMetadata(bytes27)": {
"params": {
"_globalMetadata": "New global metadata to set."
}
}
},
"title": "OVM_ChainStorageContainer",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {
"deleteElementsAfterInclusive(uint256)": {
"notice": "Removes all objects after and including a given index."
},
"deleteElementsAfterInclusive(uint256,bytes27)": {
"notice": "Removes all objects after and including a given index. Also allows setting the global metadata field."
},
"get(uint256)": {
"notice": "Retrieves an object from the container."
},
"getGlobalMetadata()": {
"notice": "Retrieves the container's global metadata field."
},
"length()": {
"notice": "Retrieves the number of objects stored in the container."
},
"push(bytes32)": {
"notice": "Pushes an object into the container."
},
"push(bytes32,bytes27)": {
"notice": "Pushes an object into the container. Function allows setting the global metadata since we'll need to touch the \"length\" storage slot anyway, which also contains the global metadata (it's an optimization)."
},
"setGlobalMetadata(bytes27)": {
"notice": "Sets the container's global metadata field. We're using `bytes27` here because we use five bytes to maintain the length of the underlying data structure, meaning we have an extra 27 bytes to store arbitrary data."
},
"setNextOverwritableIndex(uint256)": {
"notice": "Marks an index as overwritable, meaing the underlying buffer can start to write values over any objects before and including the given index."
}
},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 12554,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "libAddressManager",
"offset": 0,
"slot": "0",
"type": "t_contract(Lib_AddressManager)12547"
},
{
"astId": 3772,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "owner",
"offset": 0,
"slot": "1",
"type": "t_string_storage"
},
{
"astId": 3774,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "buffer",
"offset": 0,
"slot": "2",
"type": "t_struct(RingBuffer)17824_storage"
}
],
"types": {
"t_bytes32": {
"encoding": "inplace",
"label": "bytes32",
"numberOfBytes": "32"
},
"t_contract(Lib_AddressManager)12547": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
},
"t_mapping(t_uint256,t_bytes32)": {
"encoding": "mapping",
"key": "t_uint256",
"label": "mapping(uint256 => bytes32)",
"numberOfBytes": "32",
"value": "t_bytes32"
},
"t_string_storage": {
"encoding": "bytes",
"label": "string",
"numberOfBytes": "32"
},
"t_struct(Buffer)17813_storage": {
"encoding": "inplace",
"label": "struct Lib_RingBuffer.Buffer",
"members": [
{
"astId": 17808,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "length",
"offset": 0,
"slot": "0",
"type": "t_uint256"
},
{
"astId": 17812,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "buf",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_uint256,t_bytes32)"
}
],
"numberOfBytes": "64"
},
"t_struct(RingBuffer)17824_storage": {
"encoding": "inplace",
"label": "struct Lib_RingBuffer.RingBuffer",
"members": [
{
"astId": 17815,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "contextA",
"offset": 0,
"slot": "0",
"type": "t_bytes32"
},
{
"astId": 17817,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "contextB",
"offset": 0,
"slot": "1",
"type": "t_bytes32"
},
{
"astId": 17819,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "bufferA",
"offset": 0,
"slot": "2",
"type": "t_struct(Buffer)17813_storage"
},
{
"astId": 17821,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "bufferB",
"offset": 0,
"slot": "4",
"type": "t_struct(Buffer)17813_storage"
},
{
"astId": 17823,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "nextOverwritableIndex",
"offset": 0,
"slot": "6",
"type": "t_uint256"
}
],
"numberOfBytes": "224"
},
"t_uint256": {
"encoding": "inplace",
"label": "uint256",
"numberOfBytes": "32"
}
}
}
}
\ No newline at end of file
{
"address": "0x03004C447722d207B0355529A6d0dA0696BF6ec6",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_libAddressManager",
"type": "address"
},
{
"internalType": "string",
"name": "_owner",
"type": "string"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "deleteElementsAfterInclusive",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "deleteElementsAfterInclusive",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "get",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getGlobalMetadata",
"outputs": [
{
"internalType": "bytes27",
"name": "",
"type": "bytes27"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "length",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "libAddressManager",
"outputs": [
{
"internalType": "contract Lib_AddressManager",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_object",
"type": "bytes32"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "push",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_object",
"type": "bytes32"
}
],
"name": "push",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "resolve",
"outputs": [
{
"internalType": "address",
"name": "_contract",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "setGlobalMetadata",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "setNextOverwritableIndex",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"transactionHash": "0xb3711e8e4e8d0131c78545b6417697a593ed3f4ddd6eec2590e5692322351902",
"receipt": {
"to": null,
"from": "0x77C4c8f491e5ff22a2C0E18b005c3BA0Fe36c1Bc",
"contractAddress": "0x03004C447722d207B0355529A6d0dA0696BF6ec6",
"transactionIndex": 88,
"gasUsed": "959533",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x7ead824289ee296640d2fd91a21193044fd97a230ab9e842acc70919c8492ea1",
"transactionHash": "0xb3711e8e4e8d0131c78545b6417697a593ed3f4ddd6eec2590e5692322351902",
"logs": [],
"blockNumber": 12207773,
"cumulativeGasUsed": "7828535",
"status": 1,
"byzantium": true
},
"args": [
"0xd3EeD86464Ff13B4BFD81a3bB1e753b7ceBA3A39",
"OVM_CanonicalTransactionChain"
],
"solcInputHash": "43ee6bb8ef92595aa6d0e22a6c464dff",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_owner\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"deleteElementsAfterInclusive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"deleteElementsAfterInclusive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"get\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGlobalMetadata\",\"outputs\":[{\"internalType\":\"bytes27\",\"name\":\"\",\"type\":\"bytes27\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"length\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"libAddressManager\",\"outputs\":[{\"internalType\":\"contract Lib_AddressManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_object\",\"type\":\"bytes32\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"push\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_object\",\"type\":\"bytes32\"}],\"name\":\"push\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"setGlobalMetadata\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"setNextOverwritableIndex\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"The Chain Storage Container provides its owner contract with read, write and delete functionality. This provides gas efficiency gains by enabling it to overwrite storage slots which can no longer be used in a fraud proof due to the fraud window having passed, and the associated chain state or transactions being finalized. Three distinct Chain Storage Containers will be deployed on Layer 1: 1. Stores transaction batches for the Canonical Transaction Chain 2. Stores queued transactions for the Canonical Transaction Chain 3. Stores chain state batches for the State Commitment Chain Compiler used: solc Runtime target: EVM\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_libAddressManager\":\"Address of the Address Manager.\",\"_owner\":\"Name of the contract that owns this container (will be resolved later).\"}},\"deleteElementsAfterInclusive(uint256)\":{\"params\":{\"_index\":\"Object index to delete from.\"}},\"deleteElementsAfterInclusive(uint256,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_index\":\"Object index to delete from.\"}},\"get(uint256)\":{\"params\":{\"_index\":\"Index of the particular object to access.\"},\"returns\":{\"_0\":\"32 byte object value.\"}},\"getGlobalMetadata()\":{\"returns\":{\"_0\":\"Container global metadata field.\"}},\"length()\":{\"returns\":{\"_0\":\"Number of objects in the container.\"}},\"push(bytes32)\":{\"params\":{\"_object\":\"A 32 byte value to insert into the container.\"}},\"push(bytes32,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_object\":\"A 32 byte value to insert into the container.\"}},\"setGlobalMetadata(bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata to set.\"}}},\"title\":\"OVM_ChainStorageContainer\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deleteElementsAfterInclusive(uint256)\":{\"notice\":\"Removes all objects after and including a given index.\"},\"deleteElementsAfterInclusive(uint256,bytes27)\":{\"notice\":\"Removes all objects after and including a given index. Also allows setting the global metadata field.\"},\"get(uint256)\":{\"notice\":\"Retrieves an object from the container.\"},\"getGlobalMetadata()\":{\"notice\":\"Retrieves the container's global metadata field.\"},\"length()\":{\"notice\":\"Retrieves the number of objects stored in the container.\"},\"push(bytes32)\":{\"notice\":\"Pushes an object into the container.\"},\"push(bytes32,bytes27)\":{\"notice\":\"Pushes an object into the container. Function allows setting the global metadata since we'll need to touch the \\\"length\\\" storage slot anyway, which also contains the global metadata (it's an optimization).\"},\"setGlobalMetadata(bytes27)\":{\"notice\":\"Sets the container's global metadata field. We're using `bytes27` here because we use five bytes to maintain the length of the underlying data structure, meaning we have an extra 27 bytes to store arbitrary data.\"},\"setNextOverwritableIndex(uint256)\":{\"notice\":\"Marks an index as overwritable, meaing the underlying buffer can start to write values over any objects before and including the given index.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol\":\"OVM_ChainStorageContainer\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_RingBuffer } from \\\"../../libraries/utils/Lib_RingBuffer.sol\\\";\\nimport { Lib_AddressResolver } from \\\"../../libraries/resolver/Lib_AddressResolver.sol\\\";\\n\\n/* Interface Imports */\\nimport { iOVM_ChainStorageContainer } from \\\"../../iOVM/chain/iOVM_ChainStorageContainer.sol\\\";\\n\\n/**\\n * @title OVM_ChainStorageContainer\\n * @dev The Chain Storage Container provides its owner contract with read, write and delete functionality.\\n * This provides gas efficiency gains by enabling it to overwrite storage slots which can no longer be used\\n * in a fraud proof due to the fraud window having passed, and the associated chain state or\\n * transactions being finalized.\\n * Three distinct Chain Storage Containers will be deployed on Layer 1:\\n * 1. Stores transaction batches for the Canonical Transaction Chain\\n * 2. Stores queued transactions for the Canonical Transaction Chain\\n * 3. Stores chain state batches for the State Commitment Chain\\n *\\n * Compiler used: solc\\n * Runtime target: EVM\\n */\\ncontract OVM_ChainStorageContainer is iOVM_ChainStorageContainer, Lib_AddressResolver {\\n\\n /*************\\n * Libraries *\\n *************/\\n\\n using Lib_RingBuffer for Lib_RingBuffer.RingBuffer;\\n\\n\\n /*************\\n * Variables *\\n *************/\\n\\n string public owner;\\n Lib_RingBuffer.RingBuffer internal buffer;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Address Manager.\\n * @param _owner Name of the contract that owns this container (will be resolved later).\\n */\\n constructor(\\n address _libAddressManager,\\n string memory _owner\\n )\\n Lib_AddressResolver(_libAddressManager)\\n {\\n owner = _owner;\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n msg.sender == resolve(owner),\\n \\\"OVM_ChainStorageContainer: Function can only be called by the owner.\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function setGlobalMetadata(\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n return buffer.setExtraData(_globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function getGlobalMetadata()\\n override\\n public\\n view\\n returns (\\n bytes27\\n )\\n {\\n return buffer.getExtraData();\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function length()\\n override\\n public\\n view\\n returns (\\n uint256\\n )\\n {\\n return uint256(buffer.getLength());\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push(\\n bytes32 _object\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push(_object);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push(\\n bytes32 _object,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push(_object, _globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function get(\\n uint256 _index\\n )\\n override\\n public\\n view\\n returns (\\n bytes32\\n )\\n {\\n return buffer.get(uint40(_index));\\n }\\n \\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.deleteElementsAfterInclusive(\\n uint40(_index)\\n );\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.deleteElementsAfterInclusive(\\n uint40(_index),\\n _globalMetadata\\n );\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function setNextOverwritableIndex(\\n uint256 _index\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.nextOverwritableIndex = _index;\\n }\\n}\\n\",\"keccak256\":\"0x52e3ef7166fe134d32997917067e3d74128173b12fb6231eec34132102ddbb50\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/iOVM/chain/iOVM_ChainStorageContainer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title iOVM_ChainStorageContainer\\n */\\ninterface iOVM_ChainStorageContainer {\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Sets the container's global metadata field. We're using `bytes27` here because we use five\\n * bytes to maintain the length of the underlying data structure, meaning we have an extra\\n * 27 bytes to store arbitrary data.\\n * @param _globalMetadata New global metadata to set.\\n */\\n function setGlobalMetadata(\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Retrieves the container's global metadata field.\\n * @return Container global metadata field.\\n */\\n function getGlobalMetadata()\\n external\\n view\\n returns (\\n bytes27\\n );\\n\\n /**\\n * Retrieves the number of objects stored in the container.\\n * @return Number of objects in the container.\\n */\\n function length()\\n external\\n view\\n returns (\\n uint256\\n );\\n\\n /**\\n * Pushes an object into the container.\\n * @param _object A 32 byte value to insert into the container.\\n */\\n function push(\\n bytes32 _object\\n )\\n external;\\n\\n /**\\n * Pushes an object into the container. Function allows setting the global metadata since\\n * we'll need to touch the \\\"length\\\" storage slot anyway, which also contains the global\\n * metadata (it's an optimization).\\n * @param _object A 32 byte value to insert into the container.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function push(\\n bytes32 _object,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Retrieves an object from the container.\\n * @param _index Index of the particular object to access.\\n * @return 32 byte object value.\\n */\\n function get(\\n uint256 _index\\n )\\n external\\n view\\n returns (\\n bytes32\\n );\\n\\n /**\\n * Removes all objects after and including a given index.\\n * @param _index Object index to delete from.\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index\\n )\\n external;\\n\\n /**\\n * Removes all objects after and including a given index. Also allows setting the global\\n * metadata field.\\n * @param _index Object index to delete from.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Marks an index as overwritable, meaing the underlying buffer can start to write values over\\n * any objects before and including the given index.\\n */\\n function setNextOverwritableIndex(\\n uint256 _index\\n )\\n external;\\n}\\n\",\"keccak256\":\"0x2d7973a0ad84c23ec62624d3f1e3aeb198cc72686ff1e6cfa17155556b320c94\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0x3a490595cc21ff170e4027843093670ff845d5972481fbfb956b722ea564bb06\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_AddressResolver\\n */\\nabstract contract Lib_AddressResolver {\\n\\n /*******************************************\\n * Contract Variables: Contract References *\\n *******************************************/\\n\\n Lib_AddressManager public libAddressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n */\\n constructor(\\n address _libAddressManager\\n ) {\\n libAddressManager = Lib_AddressManager(_libAddressManager);\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function resolve(\\n string memory _name\\n )\\n public\\n view\\n returns (\\n address _contract\\n )\\n {\\n return libAddressManager.getAddress(_name);\\n }\\n}\\n\",\"keccak256\":\"0xaa3ed342f6deb156c660fd83afa579a3b80db17eb465e8949cf5c1b114780143\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xd9dfd9264e5b5fedd53a5b10fdf179c3f367614b0fe69179bce4e45119f5b739\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/utils/Lib_RingBuffer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\nlibrary Lib_RingBuffer {\\n using Lib_RingBuffer for RingBuffer;\\n\\n /***********\\n * Structs *\\n ***********/\\n\\n struct Buffer {\\n uint256 length;\\n mapping (uint256 => bytes32) buf;\\n }\\n\\n struct RingBuffer {\\n bytes32 contextA;\\n bytes32 contextB;\\n Buffer bufferA;\\n Buffer bufferB;\\n uint256 nextOverwritableIndex;\\n }\\n\\n struct RingBufferContext {\\n // contextA\\n uint40 globalIndex;\\n bytes27 extraData;\\n\\n // contextB\\n uint64 currBufferIndex;\\n uint40 prevResetIndex;\\n uint40 currResetIndex;\\n }\\n\\n\\n /*************\\n * Constants *\\n *************/\\n\\n uint256 constant MIN_CAPACITY = 16;\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * Pushes a single element to the buffer.\\n * @param _self Buffer to access.\\n * @param _value Value to push to the buffer.\\n * @param _extraData Optional global extra data.\\n */\\n function push(\\n RingBuffer storage _self,\\n bytes32 _value,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n\\n // Set a minimum capacity.\\n if (currBuffer.length == 0) {\\n currBuffer.length = MIN_CAPACITY;\\n }\\n\\n // Check if we need to expand the buffer.\\n if (ctx.globalIndex - ctx.currResetIndex >= currBuffer.length) {\\n if (ctx.currResetIndex < _self.nextOverwritableIndex) {\\n // We're going to overwrite the inactive buffer.\\n // Bump the buffer index, reset the delete offset, and set our reset indices.\\n ctx.currBufferIndex++;\\n ctx.prevResetIndex = ctx.currResetIndex;\\n ctx.currResetIndex = ctx.globalIndex;\\n\\n // Swap over to the next buffer.\\n currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n } else {\\n // We're not overwriting yet, double the length of the current buffer.\\n currBuffer.length *= 2;\\n }\\n }\\n\\n // Index to write to is the difference of the global and reset indices.\\n uint256 writeHead = ctx.globalIndex - ctx.currResetIndex;\\n currBuffer.buf[writeHead] = _value;\\n\\n // Bump the global index and insert our extra data, then save the context.\\n ctx.globalIndex++;\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Pushes a single element to the buffer.\\n * @param _self Buffer to access.\\n * @param _value Value to push to the buffer.\\n */\\n function push(\\n RingBuffer storage _self,\\n bytes32 _value\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n \\n _self.push(\\n _value,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Retrieves an element from the buffer.\\n * @param _self Buffer to access.\\n * @param _index Element index to retrieve.\\n * @return Value of the element at the given index.\\n */\\n function get(\\n RingBuffer storage _self,\\n uint256 _index\\n )\\n internal\\n view\\n returns (\\n bytes32 \\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n require(\\n _index < ctx.globalIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n Buffer storage prevBuffer = _self.getBuffer(ctx.currBufferIndex + 1);\\n\\n if (_index >= ctx.currResetIndex) {\\n // We're trying to load an element from the current buffer.\\n // Relative index is just the difference from the reset index.\\n uint256 relativeIndex = _index - ctx.currResetIndex;\\n\\n // Shouldn't happen but why not check.\\n require(\\n relativeIndex < currBuffer.length,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n return currBuffer.buf[relativeIndex];\\n } else {\\n // We're trying to load an element from the previous buffer.\\n // Relative index is the difference from the reset index in the other direction.\\n uint256 relativeIndex = ctx.currResetIndex - _index;\\n\\n // Condition only fails in the case that we deleted and flipped buffers.\\n require(\\n ctx.currResetIndex > ctx.prevResetIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n // Make sure we're not trying to read beyond the array.\\n require(\\n relativeIndex <= prevBuffer.length,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n return prevBuffer.buf[prevBuffer.length - relativeIndex];\\n }\\n }\\n\\n /**\\n * Deletes all elements after (and including) a given index.\\n * @param _self Buffer to access.\\n * @param _index Index of the element to delete from (inclusive).\\n * @param _extraData Optional global extra data.\\n */\\n function deleteElementsAfterInclusive(\\n RingBuffer storage _self,\\n uint40 _index,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n require(\\n _index < ctx.globalIndex && _index >= ctx.prevResetIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n if (_index < ctx.currResetIndex) {\\n // We're switching back to the previous buffer.\\n // Reduce the buffer index, set the current reset index back to match the previous one.\\n // We use the equality of these two values to prevent reading beyond this buffer.\\n ctx.currBufferIndex--;\\n ctx.currResetIndex = ctx.prevResetIndex;\\n }\\n\\n // Set our global index and extra data, save the context.\\n ctx.globalIndex = _index;\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Deletes all elements after (and including) a given index.\\n * @param _self Buffer to access.\\n * @param _index Index of the element to delete from (inclusive).\\n */\\n function deleteElementsAfterInclusive(\\n RingBuffer storage _self,\\n uint40 _index\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n _self.deleteElementsAfterInclusive(\\n _index,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Retrieves the current global index.\\n * @param _self Buffer to access.\\n * @return Current global index.\\n */\\n function getLength(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n uint40\\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n return ctx.globalIndex;\\n }\\n\\n /**\\n * Changes current global extra data.\\n * @param _self Buffer to access.\\n * @param _extraData New global extra data.\\n */\\n function setExtraData(\\n RingBuffer storage _self,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Retrieves the current global extra data.\\n * @param _self Buffer to access.\\n * @return Current global extra data.\\n */\\n function getExtraData(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n bytes27\\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n return ctx.extraData;\\n }\\n\\n /**\\n * Sets the current ring buffer context.\\n * @param _self Buffer to access.\\n * @param _ctx Current ring buffer context.\\n */\\n function setContext(\\n RingBuffer storage _self,\\n RingBufferContext memory _ctx\\n )\\n internal\\n {\\n bytes32 contextA;\\n bytes32 contextB;\\n\\n uint40 globalIndex = _ctx.globalIndex;\\n bytes27 extraData = _ctx.extraData;\\n assembly {\\n contextA := globalIndex\\n contextA := or(contextA, extraData)\\n }\\n\\n uint64 currBufferIndex = _ctx.currBufferIndex;\\n uint40 prevResetIndex = _ctx.prevResetIndex;\\n uint40 currResetIndex = _ctx.currResetIndex;\\n assembly {\\n contextB := currBufferIndex\\n contextB := or(contextB, shl(64, prevResetIndex))\\n contextB := or(contextB, shl(104, currResetIndex))\\n }\\n\\n if (_self.contextA != contextA) {\\n _self.contextA = contextA;\\n }\\n\\n if (_self.contextB != contextB) {\\n _self.contextB = contextB;\\n }\\n }\\n\\n /**\\n * Retrieves the current ring buffer context.\\n * @param _self Buffer to access.\\n * @return Current ring buffer context.\\n */\\n function getContext(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n RingBufferContext memory\\n )\\n {\\n bytes32 contextA = _self.contextA;\\n bytes32 contextB = _self.contextB;\\n\\n uint40 globalIndex;\\n bytes27 extraData;\\n assembly {\\n globalIndex := and(contextA, 0x000000000000000000000000000000000000000000000000000000FFFFFFFFFF)\\n extraData := and(contextA, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000)\\n }\\n\\n uint64 currBufferIndex;\\n uint40 prevResetIndex;\\n uint40 currResetIndex;\\n assembly {\\n currBufferIndex := and(contextB, 0x000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFF)\\n prevResetIndex := shr(64, and(contextB, 0x00000000000000000000000000000000000000FFFFFFFFFF0000000000000000))\\n currResetIndex := shr(104, and(contextB, 0x0000000000000000000000000000FFFFFFFFFF00000000000000000000000000))\\n }\\n\\n return RingBufferContext({\\n globalIndex: globalIndex,\\n extraData: extraData,\\n currBufferIndex: currBufferIndex,\\n prevResetIndex: prevResetIndex,\\n currResetIndex: currResetIndex\\n });\\n }\\n\\n /**\\n * Retrieves the a buffer from the ring buffer by index.\\n * @param _self Buffer to access.\\n * @param _which Index of the sub buffer to access.\\n * @return Sub buffer for the index.\\n */\\n function getBuffer(\\n RingBuffer storage _self,\\n uint256 _which\\n )\\n internal\\n view\\n returns (\\n Buffer storage\\n )\\n {\\n return _which % 2 == 0 ? _self.bufferA : _self.bufferB;\\n }\\n}\\n\",\"keccak256\":\"0xb38cb98da2d09f922d5cfe772bdbd36ede2b2267ade93128e949c9da21b89940\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x60806040523480156200001157600080fd5b506040516200116438038062001164833981810160405260408110156200003757600080fd5b8151602083018051604051929492938301929190846401000000008211156200005f57600080fd5b9083019060208201858111156200007557600080fd5b82516401000000008111828201881017156200009057600080fd5b82525081516020918201929091019080838360005b83811015620000bf578181015183820152602001620000a5565b50505050905090810190601f168015620000ed5780820380516001836020036101000a031916815260200191505b506040525050600080546001600160a01b0319166001600160a01b038516179055508051620001249060019060208401906200012d565b505050620001d9565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001655760008555620001b0565b82601f106200018057805160ff1916838001178555620001b0565b82800160010185558215620001b0579182015b82811115620001b057825182559160200191906001019062000193565b50620001be929150620001c2565b5090565b5b80821115620001be5760008155600101620001c3565b610f7b80620001e96000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80634651d91e116100715780634651d91e1461021a5780638da5cb5b146102375780639507d39a146102b4578063b298e36b146102d1578063ccf8f969146102ee578063fa9e936c14610311576100b4565b8063167fd681146100b95780631f7b6d32146100e65780632015276c1461010057806329061de21461012b578063299ca47814610150578063461a447814610174575b600080fd5b6100e4600480360360408110156100cf57600080fd5b508035906020013564ffffffffff191661032e565b005b6100ee610423565b60408051918252519081900360200190f35b6100e46004803603604081101561011657600080fd5b508035906020013564ffffffffff191661043b565b6100e46004803603602081101561014157600080fd5b503564ffffffffff19166104f7565b6101586105b5565b604080516001600160a01b039092168252519081900360200190f35b6101586004803603602081101561018a57600080fd5b8101906020810181356401000000008111156101a557600080fd5b8201836020820111156101b757600080fd5b803590602001918460018302840111640100000000831117156101d957600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506105c4945050505050565b6100e46004803603602081101561023057600080fd5b50356106a0565b61023f61075b565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610279578181015183820152602001610261565b50505050905090810190601f1680156102a65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100ee600480360360208110156102ca57600080fd5b50356107e8565b6100e4600480360360208110156102e757600080fd5b5035610802565b6102f66108bd565b6040805164ffffffffff199092168252519081900360200190f35b6100e46004803603602081101561032757600080fd5b50356108ce565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526103c493909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b820191906000526020600020905b81548152906001019060200180831161039d57829003601f168201915b50505050506105c4565b6001600160a01b0316336001600160a01b0316146104135760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b61041f60028383610983565b5050565b600061042f6002610a75565b64ffffffffff16905090565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261049c93909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146104eb5760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b61041f60028383610a89565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261055893909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146105a75760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610b90565b50565b6000546001600160a01b031681565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b8381101561062457818101518382015260200161060c565b50505050905090810190601f1680156106515780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561066e57600080fd5b505afa158015610682573d6000803e3d6000fd5b505050506040513d602081101561069857600080fd5b505192915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261070193909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146107505760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610bba565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156107e05780601f106107b5576101008083540402835291602001916107e0565b820191906000526020600020905b8154815290600101906020018083116107c357829003601f168201915b505050505081565b60006107fc600264ffffffffff8416610be0565b92915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261086393909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146108b25760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610de9565b60006108c96002610e0f565b905090565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261092f93909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b03161461097e5760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b600855565b600061098e84610e26565b9050806000015164ffffffffff168364ffffffffff161080156109c35750806060015164ffffffffff168364ffffffffff1610155b610a0b576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b806080015164ffffffffff168364ffffffffff161015610a4d576040810180516000190167ffffffffffffffff169052606081015164ffffffffff1660808201525b64ffffffffff8316815264ffffffffff1982166020820152610a6f8482610e86565b50505050565b600080610a8183610e26565b519392505050565b6000610a9484610e26565b90506000610ab9826040015167ffffffffffffffff1686610edc90919063ffffffff16565b8054909150610ac757601081555b8054608083015183510364ffffffffff1610610b3e578460060154826080015164ffffffffff161015610b365760408201805160010167ffffffffffffffff169081905260808301805164ffffffffff90811660608601528451169052610b2f908690610edc565b9050610b3e565b805460020281555b608082015182510364ffffffffff9081166000818152600184810160209081526040909220889055855101909216845264ffffffffff19851691840191909152610b888684610e86565b505050505050565b6000610b9b83610e26565b64ffffffffff19831660208201529050610bb58382610e86565b505050565b6000610bc583610e26565b9050610bb5828260200151856109839092919063ffffffff16565b600080610bec84610e26565b805190915064ffffffffff168310610c42576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610c65826040015167ffffffffffffffff1686610edc90919063ffffffff16565b90506000610c8d836040015160010167ffffffffffffffff1687610edc90919063ffffffff16565b9050826080015164ffffffffff168510610d1a576080830151825464ffffffffff9091168603908110610cfe576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000908152600190920160205250604090205491506107fc9050565b6080830151606084015164ffffffffff9182168781039290911610610d7d576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154811115610dca576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b81540360009081526001909101602052604090205492506107fc915050565b6000610df483610e26565b9050610bb582826020015185610a899092919063ffffffff16565b600080610e1b83610e26565b602001519392505050565b610e2e610efc565b5080546001909101546040805160a08101825264ffffffffff808516825264ffffffffff19909416602082015267ffffffffffffffff8316818301529082901c8316606082015260689190911c909116608082015290565b80516020820151604080840151606085015160808601518754858717969483901b8417606883901b1795939291908714610ebe578689555b85896001015414610ed157600189018690555b505050505050505050565b60006002820615610ef05782600401610ef5565b826002015b9392505050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe4f564d5f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206f776e65722ea164736f6c6343000706000a",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c80634651d91e116100715780634651d91e1461021a5780638da5cb5b146102375780639507d39a146102b4578063b298e36b146102d1578063ccf8f969146102ee578063fa9e936c14610311576100b4565b8063167fd681146100b95780631f7b6d32146100e65780632015276c1461010057806329061de21461012b578063299ca47814610150578063461a447814610174575b600080fd5b6100e4600480360360408110156100cf57600080fd5b508035906020013564ffffffffff191661032e565b005b6100ee610423565b60408051918252519081900360200190f35b6100e46004803603604081101561011657600080fd5b508035906020013564ffffffffff191661043b565b6100e46004803603602081101561014157600080fd5b503564ffffffffff19166104f7565b6101586105b5565b604080516001600160a01b039092168252519081900360200190f35b6101586004803603602081101561018a57600080fd5b8101906020810181356401000000008111156101a557600080fd5b8201836020820111156101b757600080fd5b803590602001918460018302840111640100000000831117156101d957600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506105c4945050505050565b6100e46004803603602081101561023057600080fd5b50356106a0565b61023f61075b565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610279578181015183820152602001610261565b50505050905090810190601f1680156102a65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100ee600480360360208110156102ca57600080fd5b50356107e8565b6100e4600480360360208110156102e757600080fd5b5035610802565b6102f66108bd565b6040805164ffffffffff199092168252519081900360200190f35b6100e46004803603602081101561032757600080fd5b50356108ce565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526103c493909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b820191906000526020600020905b81548152906001019060200180831161039d57829003601f168201915b50505050506105c4565b6001600160a01b0316336001600160a01b0316146104135760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b61041f60028383610983565b5050565b600061042f6002610a75565b64ffffffffff16905090565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261049c93909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146104eb5760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b61041f60028383610a89565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261055893909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146105a75760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610b90565b50565b6000546001600160a01b031681565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b8381101561062457818101518382015260200161060c565b50505050905090810190601f1680156106515780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561066e57600080fd5b505afa158015610682573d6000803e3d6000fd5b505050506040513d602081101561069857600080fd5b505192915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261070193909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146107505760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610bba565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156107e05780601f106107b5576101008083540402835291602001916107e0565b820191906000526020600020905b8154815290600101906020018083116107c357829003601f168201915b505050505081565b60006107fc600264ffffffffff8416610be0565b92915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261086393909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146108b25760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610de9565b60006108c96002610e0f565b905090565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261092f93909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b03161461097e5760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b600855565b600061098e84610e26565b9050806000015164ffffffffff168364ffffffffff161080156109c35750806060015164ffffffffff168364ffffffffff1610155b610a0b576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b806080015164ffffffffff168364ffffffffff161015610a4d576040810180516000190167ffffffffffffffff169052606081015164ffffffffff1660808201525b64ffffffffff8316815264ffffffffff1982166020820152610a6f8482610e86565b50505050565b600080610a8183610e26565b519392505050565b6000610a9484610e26565b90506000610ab9826040015167ffffffffffffffff1686610edc90919063ffffffff16565b8054909150610ac757601081555b8054608083015183510364ffffffffff1610610b3e578460060154826080015164ffffffffff161015610b365760408201805160010167ffffffffffffffff169081905260808301805164ffffffffff90811660608601528451169052610b2f908690610edc565b9050610b3e565b805460020281555b608082015182510364ffffffffff9081166000818152600184810160209081526040909220889055855101909216845264ffffffffff19851691840191909152610b888684610e86565b505050505050565b6000610b9b83610e26565b64ffffffffff19831660208201529050610bb58382610e86565b505050565b6000610bc583610e26565b9050610bb5828260200151856109839092919063ffffffff16565b600080610bec84610e26565b805190915064ffffffffff168310610c42576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610c65826040015167ffffffffffffffff1686610edc90919063ffffffff16565b90506000610c8d836040015160010167ffffffffffffffff1687610edc90919063ffffffff16565b9050826080015164ffffffffff168510610d1a576080830151825464ffffffffff9091168603908110610cfe576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000908152600190920160205250604090205491506107fc9050565b6080830151606084015164ffffffffff9182168781039290911610610d7d576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154811115610dca576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b81540360009081526001909101602052604090205492506107fc915050565b6000610df483610e26565b9050610bb582826020015185610a899092919063ffffffff16565b600080610e1b83610e26565b602001519392505050565b610e2e610efc565b5080546001909101546040805160a08101825264ffffffffff808516825264ffffffffff19909416602082015267ffffffffffffffff8316818301529082901c8316606082015260689190911c909116608082015290565b80516020820151604080840151606085015160808601518754858717969483901b8417606883901b1795939291908714610ebe578689555b85896001015414610ed157600189018690555b505050505050505050565b60006002820615610ef05782600401610ef5565b826002015b9392505050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe4f564d5f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206f776e65722ea164736f6c6343000706000a",
"devdoc": {
"details": "The Chain Storage Container provides its owner contract with read, write and delete functionality. This provides gas efficiency gains by enabling it to overwrite storage slots which can no longer be used in a fraud proof due to the fraud window having passed, and the associated chain state or transactions being finalized. Three distinct Chain Storage Containers will be deployed on Layer 1: 1. Stores transaction batches for the Canonical Transaction Chain 2. Stores queued transactions for the Canonical Transaction Chain 3. Stores chain state batches for the State Commitment Chain Compiler used: solc Runtime target: EVM",
"kind": "dev",
"methods": {
"constructor": {
"params": {
"_libAddressManager": "Address of the Address Manager.",
"_owner": "Name of the contract that owns this container (will be resolved later)."
}
},
"deleteElementsAfterInclusive(uint256)": {
"params": {
"_index": "Object index to delete from."
}
},
"deleteElementsAfterInclusive(uint256,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_index": "Object index to delete from."
}
},
"get(uint256)": {
"params": {
"_index": "Index of the particular object to access."
},
"returns": {
"_0": "32 byte object value."
}
},
"getGlobalMetadata()": {
"returns": {
"_0": "Container global metadata field."
}
},
"length()": {
"returns": {
"_0": "Number of objects in the container."
}
},
"push(bytes32)": {
"params": {
"_object": "A 32 byte value to insert into the container."
}
},
"push(bytes32,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_object": "A 32 byte value to insert into the container."
}
},
"setGlobalMetadata(bytes27)": {
"params": {
"_globalMetadata": "New global metadata to set."
}
}
},
"title": "OVM_ChainStorageContainer",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {
"deleteElementsAfterInclusive(uint256)": {
"notice": "Removes all objects after and including a given index."
},
"deleteElementsAfterInclusive(uint256,bytes27)": {
"notice": "Removes all objects after and including a given index. Also allows setting the global metadata field."
},
"get(uint256)": {
"notice": "Retrieves an object from the container."
},
"getGlobalMetadata()": {
"notice": "Retrieves the container's global metadata field."
},
"length()": {
"notice": "Retrieves the number of objects stored in the container."
},
"push(bytes32)": {
"notice": "Pushes an object into the container."
},
"push(bytes32,bytes27)": {
"notice": "Pushes an object into the container. Function allows setting the global metadata since we'll need to touch the \"length\" storage slot anyway, which also contains the global metadata (it's an optimization)."
},
"setGlobalMetadata(bytes27)": {
"notice": "Sets the container's global metadata field. We're using `bytes27` here because we use five bytes to maintain the length of the underlying data structure, meaning we have an extra 27 bytes to store arbitrary data."
},
"setNextOverwritableIndex(uint256)": {
"notice": "Marks an index as overwritable, meaing the underlying buffer can start to write values over any objects before and including the given index."
}
},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 12554,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "libAddressManager",
"offset": 0,
"slot": "0",
"type": "t_contract(Lib_AddressManager)12547"
},
{
"astId": 3772,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "owner",
"offset": 0,
"slot": "1",
"type": "t_string_storage"
},
{
"astId": 3774,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "buffer",
"offset": 0,
"slot": "2",
"type": "t_struct(RingBuffer)17824_storage"
}
],
"types": {
"t_bytes32": {
"encoding": "inplace",
"label": "bytes32",
"numberOfBytes": "32"
},
"t_contract(Lib_AddressManager)12547": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
},
"t_mapping(t_uint256,t_bytes32)": {
"encoding": "mapping",
"key": "t_uint256",
"label": "mapping(uint256 => bytes32)",
"numberOfBytes": "32",
"value": "t_bytes32"
},
"t_string_storage": {
"encoding": "bytes",
"label": "string",
"numberOfBytes": "32"
},
"t_struct(Buffer)17813_storage": {
"encoding": "inplace",
"label": "struct Lib_RingBuffer.Buffer",
"members": [
{
"astId": 17808,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "length",
"offset": 0,
"slot": "0",
"type": "t_uint256"
},
{
"astId": 17812,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "buf",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_uint256,t_bytes32)"
}
],
"numberOfBytes": "64"
},
"t_struct(RingBuffer)17824_storage": {
"encoding": "inplace",
"label": "struct Lib_RingBuffer.RingBuffer",
"members": [
{
"astId": 17815,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "contextA",
"offset": 0,
"slot": "0",
"type": "t_bytes32"
},
{
"astId": 17817,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "contextB",
"offset": 0,
"slot": "1",
"type": "t_bytes32"
},
{
"astId": 17819,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "bufferA",
"offset": 0,
"slot": "2",
"type": "t_struct(Buffer)17813_storage"
},
{
"astId": 17821,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "bufferB",
"offset": 0,
"slot": "4",
"type": "t_struct(Buffer)17813_storage"
},
{
"astId": 17823,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "nextOverwritableIndex",
"offset": 0,
"slot": "6",
"type": "t_uint256"
}
],
"numberOfBytes": "224"
},
"t_uint256": {
"encoding": "inplace",
"label": "uint256",
"numberOfBytes": "32"
}
}
}
}
\ No newline at end of file
{
"address": "0x6B7Fce2C4FD1934a2d251F8b0930ac82DdDAD804",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_libAddressManager",
"type": "address"
},
{
"internalType": "string",
"name": "_owner",
"type": "string"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "deleteElementsAfterInclusive",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "deleteElementsAfterInclusive",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "get",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getGlobalMetadata",
"outputs": [
{
"internalType": "bytes27",
"name": "",
"type": "bytes27"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "length",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "libAddressManager",
"outputs": [
{
"internalType": "contract Lib_AddressManager",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_object",
"type": "bytes32"
},
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "push",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_object",
"type": "bytes32"
}
],
"name": "push",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "resolve",
"outputs": [
{
"internalType": "address",
"name": "_contract",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes27",
"name": "_globalMetadata",
"type": "bytes27"
}
],
"name": "setGlobalMetadata",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "setNextOverwritableIndex",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"transactionHash": "0x3e0af59033fa6e02868e35c9c5ac3ea241b7bdfc8e85950824c2109984f2a0c7",
"receipt": {
"to": null,
"from": "0x77C4c8f491e5ff22a2C0E18b005c3BA0Fe36c1Bc",
"contractAddress": "0x6B7Fce2C4FD1934a2d251F8b0930ac82DdDAD804",
"transactionIndex": 128,
"gasUsed": "959473",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0xe1b0eec91862477a8db4dc5139ea97dbdb1c3519f7cd4040010c9e63c71dda8b",
"transactionHash": "0x3e0af59033fa6e02868e35c9c5ac3ea241b7bdfc8e85950824c2109984f2a0c7",
"logs": [],
"blockNumber": 12207780,
"cumulativeGasUsed": "9688823",
"status": 1,
"byzantium": true
},
"args": [
"0xd3EeD86464Ff13B4BFD81a3bB1e753b7ceBA3A39",
"OVM_StateCommitmentChain"
],
"solcInputHash": "43ee6bb8ef92595aa6d0e22a6c464dff",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_owner\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"deleteElementsAfterInclusive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"deleteElementsAfterInclusive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"get\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGlobalMetadata\",\"outputs\":[{\"internalType\":\"bytes27\",\"name\":\"\",\"type\":\"bytes27\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"length\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"libAddressManager\",\"outputs\":[{\"internalType\":\"contract Lib_AddressManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_object\",\"type\":\"bytes32\"},{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"push\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_object\",\"type\":\"bytes32\"}],\"name\":\"push\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes27\",\"name\":\"_globalMetadata\",\"type\":\"bytes27\"}],\"name\":\"setGlobalMetadata\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"setNextOverwritableIndex\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"The Chain Storage Container provides its owner contract with read, write and delete functionality. This provides gas efficiency gains by enabling it to overwrite storage slots which can no longer be used in a fraud proof due to the fraud window having passed, and the associated chain state or transactions being finalized. Three distinct Chain Storage Containers will be deployed on Layer 1: 1. Stores transaction batches for the Canonical Transaction Chain 2. Stores queued transactions for the Canonical Transaction Chain 3. Stores chain state batches for the State Commitment Chain Compiler used: solc Runtime target: EVM\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_libAddressManager\":\"Address of the Address Manager.\",\"_owner\":\"Name of the contract that owns this container (will be resolved later).\"}},\"deleteElementsAfterInclusive(uint256)\":{\"params\":{\"_index\":\"Object index to delete from.\"}},\"deleteElementsAfterInclusive(uint256,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_index\":\"Object index to delete from.\"}},\"get(uint256)\":{\"params\":{\"_index\":\"Index of the particular object to access.\"},\"returns\":{\"_0\":\"32 byte object value.\"}},\"getGlobalMetadata()\":{\"returns\":{\"_0\":\"Container global metadata field.\"}},\"length()\":{\"returns\":{\"_0\":\"Number of objects in the container.\"}},\"push(bytes32)\":{\"params\":{\"_object\":\"A 32 byte value to insert into the container.\"}},\"push(bytes32,bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata for the container.\",\"_object\":\"A 32 byte value to insert into the container.\"}},\"setGlobalMetadata(bytes27)\":{\"params\":{\"_globalMetadata\":\"New global metadata to set.\"}}},\"title\":\"OVM_ChainStorageContainer\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deleteElementsAfterInclusive(uint256)\":{\"notice\":\"Removes all objects after and including a given index.\"},\"deleteElementsAfterInclusive(uint256,bytes27)\":{\"notice\":\"Removes all objects after and including a given index. Also allows setting the global metadata field.\"},\"get(uint256)\":{\"notice\":\"Retrieves an object from the container.\"},\"getGlobalMetadata()\":{\"notice\":\"Retrieves the container's global metadata field.\"},\"length()\":{\"notice\":\"Retrieves the number of objects stored in the container.\"},\"push(bytes32)\":{\"notice\":\"Pushes an object into the container.\"},\"push(bytes32,bytes27)\":{\"notice\":\"Pushes an object into the container. Function allows setting the global metadata since we'll need to touch the \\\"length\\\" storage slot anyway, which also contains the global metadata (it's an optimization).\"},\"setGlobalMetadata(bytes27)\":{\"notice\":\"Sets the container's global metadata field. We're using `bytes27` here because we use five bytes to maintain the length of the underlying data structure, meaning we have an extra 27 bytes to store arbitrary data.\"},\"setNextOverwritableIndex(uint256)\":{\"notice\":\"Marks an index as overwritable, meaing the underlying buffer can start to write values over any objects before and including the given index.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol\":\"OVM_ChainStorageContainer\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_RingBuffer } from \\\"../../libraries/utils/Lib_RingBuffer.sol\\\";\\nimport { Lib_AddressResolver } from \\\"../../libraries/resolver/Lib_AddressResolver.sol\\\";\\n\\n/* Interface Imports */\\nimport { iOVM_ChainStorageContainer } from \\\"../../iOVM/chain/iOVM_ChainStorageContainer.sol\\\";\\n\\n/**\\n * @title OVM_ChainStorageContainer\\n * @dev The Chain Storage Container provides its owner contract with read, write and delete functionality.\\n * This provides gas efficiency gains by enabling it to overwrite storage slots which can no longer be used\\n * in a fraud proof due to the fraud window having passed, and the associated chain state or\\n * transactions being finalized.\\n * Three distinct Chain Storage Containers will be deployed on Layer 1:\\n * 1. Stores transaction batches for the Canonical Transaction Chain\\n * 2. Stores queued transactions for the Canonical Transaction Chain\\n * 3. Stores chain state batches for the State Commitment Chain\\n *\\n * Compiler used: solc\\n * Runtime target: EVM\\n */\\ncontract OVM_ChainStorageContainer is iOVM_ChainStorageContainer, Lib_AddressResolver {\\n\\n /*************\\n * Libraries *\\n *************/\\n\\n using Lib_RingBuffer for Lib_RingBuffer.RingBuffer;\\n\\n\\n /*************\\n * Variables *\\n *************/\\n\\n string public owner;\\n Lib_RingBuffer.RingBuffer internal buffer;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Address Manager.\\n * @param _owner Name of the contract that owns this container (will be resolved later).\\n */\\n constructor(\\n address _libAddressManager,\\n string memory _owner\\n )\\n Lib_AddressResolver(_libAddressManager)\\n {\\n owner = _owner;\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n msg.sender == resolve(owner),\\n \\\"OVM_ChainStorageContainer: Function can only be called by the owner.\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function setGlobalMetadata(\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n return buffer.setExtraData(_globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function getGlobalMetadata()\\n override\\n public\\n view\\n returns (\\n bytes27\\n )\\n {\\n return buffer.getExtraData();\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function length()\\n override\\n public\\n view\\n returns (\\n uint256\\n )\\n {\\n return uint256(buffer.getLength());\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push(\\n bytes32 _object\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push(_object);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function push(\\n bytes32 _object,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.push(_object, _globalMetadata);\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function get(\\n uint256 _index\\n )\\n override\\n public\\n view\\n returns (\\n bytes32\\n )\\n {\\n return buffer.get(uint40(_index));\\n }\\n \\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.deleteElementsAfterInclusive(\\n uint40(_index)\\n );\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index,\\n bytes27 _globalMetadata\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.deleteElementsAfterInclusive(\\n uint40(_index),\\n _globalMetadata\\n );\\n }\\n\\n /**\\n * @inheritdoc iOVM_ChainStorageContainer\\n */\\n function setNextOverwritableIndex(\\n uint256 _index\\n )\\n override\\n public\\n onlyOwner\\n {\\n buffer.nextOverwritableIndex = _index;\\n }\\n}\\n\",\"keccak256\":\"0x52e3ef7166fe134d32997917067e3d74128173b12fb6231eec34132102ddbb50\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/iOVM/chain/iOVM_ChainStorageContainer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title iOVM_ChainStorageContainer\\n */\\ninterface iOVM_ChainStorageContainer {\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Sets the container's global metadata field. We're using `bytes27` here because we use five\\n * bytes to maintain the length of the underlying data structure, meaning we have an extra\\n * 27 bytes to store arbitrary data.\\n * @param _globalMetadata New global metadata to set.\\n */\\n function setGlobalMetadata(\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Retrieves the container's global metadata field.\\n * @return Container global metadata field.\\n */\\n function getGlobalMetadata()\\n external\\n view\\n returns (\\n bytes27\\n );\\n\\n /**\\n * Retrieves the number of objects stored in the container.\\n * @return Number of objects in the container.\\n */\\n function length()\\n external\\n view\\n returns (\\n uint256\\n );\\n\\n /**\\n * Pushes an object into the container.\\n * @param _object A 32 byte value to insert into the container.\\n */\\n function push(\\n bytes32 _object\\n )\\n external;\\n\\n /**\\n * Pushes an object into the container. Function allows setting the global metadata since\\n * we'll need to touch the \\\"length\\\" storage slot anyway, which also contains the global\\n * metadata (it's an optimization).\\n * @param _object A 32 byte value to insert into the container.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function push(\\n bytes32 _object,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Retrieves an object from the container.\\n * @param _index Index of the particular object to access.\\n * @return 32 byte object value.\\n */\\n function get(\\n uint256 _index\\n )\\n external\\n view\\n returns (\\n bytes32\\n );\\n\\n /**\\n * Removes all objects after and including a given index.\\n * @param _index Object index to delete from.\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index\\n )\\n external;\\n\\n /**\\n * Removes all objects after and including a given index. Also allows setting the global\\n * metadata field.\\n * @param _index Object index to delete from.\\n * @param _globalMetadata New global metadata for the container.\\n */\\n function deleteElementsAfterInclusive(\\n uint256 _index,\\n bytes27 _globalMetadata\\n )\\n external;\\n\\n /**\\n * Marks an index as overwritable, meaing the underlying buffer can start to write values over\\n * any objects before and including the given index.\\n */\\n function setNextOverwritableIndex(\\n uint256 _index\\n )\\n external;\\n}\\n\",\"keccak256\":\"0x2d7973a0ad84c23ec62624d3f1e3aeb198cc72686ff1e6cfa17155556b320c94\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0x3a490595cc21ff170e4027843093670ff845d5972481fbfb956b722ea564bb06\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_AddressResolver\\n */\\nabstract contract Lib_AddressResolver {\\n\\n /*******************************************\\n * Contract Variables: Contract References *\\n *******************************************/\\n\\n Lib_AddressManager public libAddressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n */\\n constructor(\\n address _libAddressManager\\n ) {\\n libAddressManager = Lib_AddressManager(_libAddressManager);\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function resolve(\\n string memory _name\\n )\\n public\\n view\\n returns (\\n address _contract\\n )\\n {\\n return libAddressManager.getAddress(_name);\\n }\\n}\\n\",\"keccak256\":\"0xaa3ed342f6deb156c660fd83afa579a3b80db17eb465e8949cf5c1b114780143\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xd9dfd9264e5b5fedd53a5b10fdf179c3f367614b0fe69179bce4e45119f5b739\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/utils/Lib_RingBuffer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\nlibrary Lib_RingBuffer {\\n using Lib_RingBuffer for RingBuffer;\\n\\n /***********\\n * Structs *\\n ***********/\\n\\n struct Buffer {\\n uint256 length;\\n mapping (uint256 => bytes32) buf;\\n }\\n\\n struct RingBuffer {\\n bytes32 contextA;\\n bytes32 contextB;\\n Buffer bufferA;\\n Buffer bufferB;\\n uint256 nextOverwritableIndex;\\n }\\n\\n struct RingBufferContext {\\n // contextA\\n uint40 globalIndex;\\n bytes27 extraData;\\n\\n // contextB\\n uint64 currBufferIndex;\\n uint40 prevResetIndex;\\n uint40 currResetIndex;\\n }\\n\\n\\n /*************\\n * Constants *\\n *************/\\n\\n uint256 constant MIN_CAPACITY = 16;\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * Pushes a single element to the buffer.\\n * @param _self Buffer to access.\\n * @param _value Value to push to the buffer.\\n * @param _extraData Optional global extra data.\\n */\\n function push(\\n RingBuffer storage _self,\\n bytes32 _value,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n\\n // Set a minimum capacity.\\n if (currBuffer.length == 0) {\\n currBuffer.length = MIN_CAPACITY;\\n }\\n\\n // Check if we need to expand the buffer.\\n if (ctx.globalIndex - ctx.currResetIndex >= currBuffer.length) {\\n if (ctx.currResetIndex < _self.nextOverwritableIndex) {\\n // We're going to overwrite the inactive buffer.\\n // Bump the buffer index, reset the delete offset, and set our reset indices.\\n ctx.currBufferIndex++;\\n ctx.prevResetIndex = ctx.currResetIndex;\\n ctx.currResetIndex = ctx.globalIndex;\\n\\n // Swap over to the next buffer.\\n currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n } else {\\n // We're not overwriting yet, double the length of the current buffer.\\n currBuffer.length *= 2;\\n }\\n }\\n\\n // Index to write to is the difference of the global and reset indices.\\n uint256 writeHead = ctx.globalIndex - ctx.currResetIndex;\\n currBuffer.buf[writeHead] = _value;\\n\\n // Bump the global index and insert our extra data, then save the context.\\n ctx.globalIndex++;\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Pushes a single element to the buffer.\\n * @param _self Buffer to access.\\n * @param _value Value to push to the buffer.\\n */\\n function push(\\n RingBuffer storage _self,\\n bytes32 _value\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n \\n _self.push(\\n _value,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Retrieves an element from the buffer.\\n * @param _self Buffer to access.\\n * @param _index Element index to retrieve.\\n * @return Value of the element at the given index.\\n */\\n function get(\\n RingBuffer storage _self,\\n uint256 _index\\n )\\n internal\\n view\\n returns (\\n bytes32 \\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n require(\\n _index < ctx.globalIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n Buffer storage currBuffer = _self.getBuffer(ctx.currBufferIndex);\\n Buffer storage prevBuffer = _self.getBuffer(ctx.currBufferIndex + 1);\\n\\n if (_index >= ctx.currResetIndex) {\\n // We're trying to load an element from the current buffer.\\n // Relative index is just the difference from the reset index.\\n uint256 relativeIndex = _index - ctx.currResetIndex;\\n\\n // Shouldn't happen but why not check.\\n require(\\n relativeIndex < currBuffer.length,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n return currBuffer.buf[relativeIndex];\\n } else {\\n // We're trying to load an element from the previous buffer.\\n // Relative index is the difference from the reset index in the other direction.\\n uint256 relativeIndex = ctx.currResetIndex - _index;\\n\\n // Condition only fails in the case that we deleted and flipped buffers.\\n require(\\n ctx.currResetIndex > ctx.prevResetIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n // Make sure we're not trying to read beyond the array.\\n require(\\n relativeIndex <= prevBuffer.length,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n return prevBuffer.buf[prevBuffer.length - relativeIndex];\\n }\\n }\\n\\n /**\\n * Deletes all elements after (and including) a given index.\\n * @param _self Buffer to access.\\n * @param _index Index of the element to delete from (inclusive).\\n * @param _extraData Optional global extra data.\\n */\\n function deleteElementsAfterInclusive(\\n RingBuffer storage _self,\\n uint40 _index,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n\\n require(\\n _index < ctx.globalIndex && _index >= ctx.prevResetIndex,\\n \\\"Index out of bounds.\\\"\\n );\\n\\n if (_index < ctx.currResetIndex) {\\n // We're switching back to the previous buffer.\\n // Reduce the buffer index, set the current reset index back to match the previous one.\\n // We use the equality of these two values to prevent reading beyond this buffer.\\n ctx.currBufferIndex--;\\n ctx.currResetIndex = ctx.prevResetIndex;\\n }\\n\\n // Set our global index and extra data, save the context.\\n ctx.globalIndex = _index;\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Deletes all elements after (and including) a given index.\\n * @param _self Buffer to access.\\n * @param _index Index of the element to delete from (inclusive).\\n */\\n function deleteElementsAfterInclusive(\\n RingBuffer storage _self,\\n uint40 _index\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n _self.deleteElementsAfterInclusive(\\n _index,\\n ctx.extraData\\n );\\n }\\n\\n /**\\n * Retrieves the current global index.\\n * @param _self Buffer to access.\\n * @return Current global index.\\n */\\n function getLength(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n uint40\\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n return ctx.globalIndex;\\n }\\n\\n /**\\n * Changes current global extra data.\\n * @param _self Buffer to access.\\n * @param _extraData New global extra data.\\n */\\n function setExtraData(\\n RingBuffer storage _self,\\n bytes27 _extraData\\n )\\n internal\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n ctx.extraData = _extraData;\\n _self.setContext(ctx);\\n }\\n\\n /**\\n * Retrieves the current global extra data.\\n * @param _self Buffer to access.\\n * @return Current global extra data.\\n */\\n function getExtraData(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n bytes27\\n )\\n {\\n RingBufferContext memory ctx = _self.getContext();\\n return ctx.extraData;\\n }\\n\\n /**\\n * Sets the current ring buffer context.\\n * @param _self Buffer to access.\\n * @param _ctx Current ring buffer context.\\n */\\n function setContext(\\n RingBuffer storage _self,\\n RingBufferContext memory _ctx\\n )\\n internal\\n {\\n bytes32 contextA;\\n bytes32 contextB;\\n\\n uint40 globalIndex = _ctx.globalIndex;\\n bytes27 extraData = _ctx.extraData;\\n assembly {\\n contextA := globalIndex\\n contextA := or(contextA, extraData)\\n }\\n\\n uint64 currBufferIndex = _ctx.currBufferIndex;\\n uint40 prevResetIndex = _ctx.prevResetIndex;\\n uint40 currResetIndex = _ctx.currResetIndex;\\n assembly {\\n contextB := currBufferIndex\\n contextB := or(contextB, shl(64, prevResetIndex))\\n contextB := or(contextB, shl(104, currResetIndex))\\n }\\n\\n if (_self.contextA != contextA) {\\n _self.contextA = contextA;\\n }\\n\\n if (_self.contextB != contextB) {\\n _self.contextB = contextB;\\n }\\n }\\n\\n /**\\n * Retrieves the current ring buffer context.\\n * @param _self Buffer to access.\\n * @return Current ring buffer context.\\n */\\n function getContext(\\n RingBuffer storage _self\\n )\\n internal\\n view\\n returns (\\n RingBufferContext memory\\n )\\n {\\n bytes32 contextA = _self.contextA;\\n bytes32 contextB = _self.contextB;\\n\\n uint40 globalIndex;\\n bytes27 extraData;\\n assembly {\\n globalIndex := and(contextA, 0x000000000000000000000000000000000000000000000000000000FFFFFFFFFF)\\n extraData := and(contextA, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000)\\n }\\n\\n uint64 currBufferIndex;\\n uint40 prevResetIndex;\\n uint40 currResetIndex;\\n assembly {\\n currBufferIndex := and(contextB, 0x000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFF)\\n prevResetIndex := shr(64, and(contextB, 0x00000000000000000000000000000000000000FFFFFFFFFF0000000000000000))\\n currResetIndex := shr(104, and(contextB, 0x0000000000000000000000000000FFFFFFFFFF00000000000000000000000000))\\n }\\n\\n return RingBufferContext({\\n globalIndex: globalIndex,\\n extraData: extraData,\\n currBufferIndex: currBufferIndex,\\n prevResetIndex: prevResetIndex,\\n currResetIndex: currResetIndex\\n });\\n }\\n\\n /**\\n * Retrieves the a buffer from the ring buffer by index.\\n * @param _self Buffer to access.\\n * @param _which Index of the sub buffer to access.\\n * @return Sub buffer for the index.\\n */\\n function getBuffer(\\n RingBuffer storage _self,\\n uint256 _which\\n )\\n internal\\n view\\n returns (\\n Buffer storage\\n )\\n {\\n return _which % 2 == 0 ? _self.bufferA : _self.bufferB;\\n }\\n}\\n\",\"keccak256\":\"0xb38cb98da2d09f922d5cfe772bdbd36ede2b2267ade93128e949c9da21b89940\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x60806040523480156200001157600080fd5b506040516200116438038062001164833981810160405260408110156200003757600080fd5b8151602083018051604051929492938301929190846401000000008211156200005f57600080fd5b9083019060208201858111156200007557600080fd5b82516401000000008111828201881017156200009057600080fd5b82525081516020918201929091019080838360005b83811015620000bf578181015183820152602001620000a5565b50505050905090810190601f168015620000ed5780820380516001836020036101000a031916815260200191505b506040525050600080546001600160a01b0319166001600160a01b038516179055508051620001249060019060208401906200012d565b505050620001d9565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001655760008555620001b0565b82601f106200018057805160ff1916838001178555620001b0565b82800160010185558215620001b0579182015b82811115620001b057825182559160200191906001019062000193565b50620001be929150620001c2565b5090565b5b80821115620001be5760008155600101620001c3565b610f7b80620001e96000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80634651d91e116100715780634651d91e1461021a5780638da5cb5b146102375780639507d39a146102b4578063b298e36b146102d1578063ccf8f969146102ee578063fa9e936c14610311576100b4565b8063167fd681146100b95780631f7b6d32146100e65780632015276c1461010057806329061de21461012b578063299ca47814610150578063461a447814610174575b600080fd5b6100e4600480360360408110156100cf57600080fd5b508035906020013564ffffffffff191661032e565b005b6100ee610423565b60408051918252519081900360200190f35b6100e46004803603604081101561011657600080fd5b508035906020013564ffffffffff191661043b565b6100e46004803603602081101561014157600080fd5b503564ffffffffff19166104f7565b6101586105b5565b604080516001600160a01b039092168252519081900360200190f35b6101586004803603602081101561018a57600080fd5b8101906020810181356401000000008111156101a557600080fd5b8201836020820111156101b757600080fd5b803590602001918460018302840111640100000000831117156101d957600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506105c4945050505050565b6100e46004803603602081101561023057600080fd5b50356106a0565b61023f61075b565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610279578181015183820152602001610261565b50505050905090810190601f1680156102a65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100ee600480360360208110156102ca57600080fd5b50356107e8565b6100e4600480360360208110156102e757600080fd5b5035610802565b6102f66108bd565b6040805164ffffffffff199092168252519081900360200190f35b6100e46004803603602081101561032757600080fd5b50356108ce565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526103c493909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b820191906000526020600020905b81548152906001019060200180831161039d57829003601f168201915b50505050506105c4565b6001600160a01b0316336001600160a01b0316146104135760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b61041f60028383610983565b5050565b600061042f6002610a75565b64ffffffffff16905090565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261049c93909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146104eb5760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b61041f60028383610a89565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261055893909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146105a75760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610b90565b50565b6000546001600160a01b031681565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b8381101561062457818101518382015260200161060c565b50505050905090810190601f1680156106515780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561066e57600080fd5b505afa158015610682573d6000803e3d6000fd5b505050506040513d602081101561069857600080fd5b505192915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261070193909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146107505760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610bba565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156107e05780601f106107b5576101008083540402835291602001916107e0565b820191906000526020600020905b8154815290600101906020018083116107c357829003601f168201915b505050505081565b60006107fc600264ffffffffff8416610be0565b92915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261086393909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146108b25760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610de9565b60006108c96002610e0f565b905090565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261092f93909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b03161461097e5760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b600855565b600061098e84610e26565b9050806000015164ffffffffff168364ffffffffff161080156109c35750806060015164ffffffffff168364ffffffffff1610155b610a0b576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b806080015164ffffffffff168364ffffffffff161015610a4d576040810180516000190167ffffffffffffffff169052606081015164ffffffffff1660808201525b64ffffffffff8316815264ffffffffff1982166020820152610a6f8482610e86565b50505050565b600080610a8183610e26565b519392505050565b6000610a9484610e26565b90506000610ab9826040015167ffffffffffffffff1686610edc90919063ffffffff16565b8054909150610ac757601081555b8054608083015183510364ffffffffff1610610b3e578460060154826080015164ffffffffff161015610b365760408201805160010167ffffffffffffffff169081905260808301805164ffffffffff90811660608601528451169052610b2f908690610edc565b9050610b3e565b805460020281555b608082015182510364ffffffffff9081166000818152600184810160209081526040909220889055855101909216845264ffffffffff19851691840191909152610b888684610e86565b505050505050565b6000610b9b83610e26565b64ffffffffff19831660208201529050610bb58382610e86565b505050565b6000610bc583610e26565b9050610bb5828260200151856109839092919063ffffffff16565b600080610bec84610e26565b805190915064ffffffffff168310610c42576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610c65826040015167ffffffffffffffff1686610edc90919063ffffffff16565b90506000610c8d836040015160010167ffffffffffffffff1687610edc90919063ffffffff16565b9050826080015164ffffffffff168510610d1a576080830151825464ffffffffff9091168603908110610cfe576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000908152600190920160205250604090205491506107fc9050565b6080830151606084015164ffffffffff9182168781039290911610610d7d576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154811115610dca576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b81540360009081526001909101602052604090205492506107fc915050565b6000610df483610e26565b9050610bb582826020015185610a899092919063ffffffff16565b600080610e1b83610e26565b602001519392505050565b610e2e610efc565b5080546001909101546040805160a08101825264ffffffffff808516825264ffffffffff19909416602082015267ffffffffffffffff8316818301529082901c8316606082015260689190911c909116608082015290565b80516020820151604080840151606085015160808601518754858717969483901b8417606883901b1795939291908714610ebe578689555b85896001015414610ed157600189018690555b505050505050505050565b60006002820615610ef05782600401610ef5565b826002015b9392505050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe4f564d5f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206f776e65722ea164736f6c6343000706000a",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c80634651d91e116100715780634651d91e1461021a5780638da5cb5b146102375780639507d39a146102b4578063b298e36b146102d1578063ccf8f969146102ee578063fa9e936c14610311576100b4565b8063167fd681146100b95780631f7b6d32146100e65780632015276c1461010057806329061de21461012b578063299ca47814610150578063461a447814610174575b600080fd5b6100e4600480360360408110156100cf57600080fd5b508035906020013564ffffffffff191661032e565b005b6100ee610423565b60408051918252519081900360200190f35b6100e46004803603604081101561011657600080fd5b508035906020013564ffffffffff191661043b565b6100e46004803603602081101561014157600080fd5b503564ffffffffff19166104f7565b6101586105b5565b604080516001600160a01b039092168252519081900360200190f35b6101586004803603602081101561018a57600080fd5b8101906020810181356401000000008111156101a557600080fd5b8201836020820111156101b757600080fd5b803590602001918460018302840111640100000000831117156101d957600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506105c4945050505050565b6100e46004803603602081101561023057600080fd5b50356106a0565b61023f61075b565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610279578181015183820152602001610261565b50505050905090810190601f1680156102a65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100ee600480360360208110156102ca57600080fd5b50356107e8565b6100e4600480360360208110156102e757600080fd5b5035610802565b6102f66108bd565b6040805164ffffffffff199092168252519081900360200190f35b6100e46004803603602081101561032757600080fd5b50356108ce565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526103c493909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b820191906000526020600020905b81548152906001019060200180831161039d57829003601f168201915b50505050506105c4565b6001600160a01b0316336001600160a01b0316146104135760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b61041f60028383610983565b5050565b600061042f6002610a75565b64ffffffffff16905090565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261049c93909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146104eb5760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b61041f60028383610a89565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261055893909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146105a75760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610b90565b50565b6000546001600160a01b031681565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b8381101561062457818101518382015260200161060c565b50505050905090810190601f1680156106515780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561066e57600080fd5b505afa158015610682573d6000803e3d6000fd5b505050506040513d602081101561069857600080fd5b505192915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261070193909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146107505760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610bba565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156107e05780601f106107b5576101008083540402835291602001916107e0565b820191906000526020600020905b8154815290600101906020018083116107c357829003601f168201915b505050505081565b60006107fc600264ffffffffff8416610be0565b92915050565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261086393909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b0316146108b25760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b6105b2600282610de9565b60006108c96002610e0f565b905090565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815261092f93909290918301828280156103ba5780601f1061038f576101008083540402835291602001916103ba565b6001600160a01b0316336001600160a01b03161461097e5760405162461bcd60e51b8152600401808060200182810382526044815260200180610f2b6044913960600191505060405180910390fd5b600855565b600061098e84610e26565b9050806000015164ffffffffff168364ffffffffff161080156109c35750806060015164ffffffffff168364ffffffffff1610155b610a0b576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b806080015164ffffffffff168364ffffffffff161015610a4d576040810180516000190167ffffffffffffffff169052606081015164ffffffffff1660808201525b64ffffffffff8316815264ffffffffff1982166020820152610a6f8482610e86565b50505050565b600080610a8183610e26565b519392505050565b6000610a9484610e26565b90506000610ab9826040015167ffffffffffffffff1686610edc90919063ffffffff16565b8054909150610ac757601081555b8054608083015183510364ffffffffff1610610b3e578460060154826080015164ffffffffff161015610b365760408201805160010167ffffffffffffffff169081905260808301805164ffffffffff90811660608601528451169052610b2f908690610edc565b9050610b3e565b805460020281555b608082015182510364ffffffffff9081166000818152600184810160209081526040909220889055855101909216845264ffffffffff19851691840191909152610b888684610e86565b505050505050565b6000610b9b83610e26565b64ffffffffff19831660208201529050610bb58382610e86565b505050565b6000610bc583610e26565b9050610bb5828260200151856109839092919063ffffffff16565b600080610bec84610e26565b805190915064ffffffffff168310610c42576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000610c65826040015167ffffffffffffffff1686610edc90919063ffffffff16565b90506000610c8d836040015160010167ffffffffffffffff1687610edc90919063ffffffff16565b9050826080015164ffffffffff168510610d1a576080830151825464ffffffffff9091168603908110610cfe576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b6000908152600190920160205250604090205491506107fc9050565b6080830151606084015164ffffffffff9182168781039290911610610d7d576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b8154811115610dca576040805162461bcd60e51b815260206004820152601460248201527324b73232bc1037baba1037b3103137bab732399760611b604482015290519081900360640190fd5b81540360009081526001909101602052604090205492506107fc915050565b6000610df483610e26565b9050610bb582826020015185610a899092919063ffffffff16565b600080610e1b83610e26565b602001519392505050565b610e2e610efc565b5080546001909101546040805160a08101825264ffffffffff808516825264ffffffffff19909416602082015267ffffffffffffffff8316818301529082901c8316606082015260689190911c909116608082015290565b80516020820151604080840151606085015160808601518754858717969483901b8417606883901b1795939291908714610ebe578689555b85896001015414610ed157600189018690555b505050505050505050565b60006002820615610ef05782600401610ef5565b826002015b9392505050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe4f564d5f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206f776e65722ea164736f6c6343000706000a",
"devdoc": {
"details": "The Chain Storage Container provides its owner contract with read, write and delete functionality. This provides gas efficiency gains by enabling it to overwrite storage slots which can no longer be used in a fraud proof due to the fraud window having passed, and the associated chain state or transactions being finalized. Three distinct Chain Storage Containers will be deployed on Layer 1: 1. Stores transaction batches for the Canonical Transaction Chain 2. Stores queued transactions for the Canonical Transaction Chain 3. Stores chain state batches for the State Commitment Chain Compiler used: solc Runtime target: EVM",
"kind": "dev",
"methods": {
"constructor": {
"params": {
"_libAddressManager": "Address of the Address Manager.",
"_owner": "Name of the contract that owns this container (will be resolved later)."
}
},
"deleteElementsAfterInclusive(uint256)": {
"params": {
"_index": "Object index to delete from."
}
},
"deleteElementsAfterInclusive(uint256,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_index": "Object index to delete from."
}
},
"get(uint256)": {
"params": {
"_index": "Index of the particular object to access."
},
"returns": {
"_0": "32 byte object value."
}
},
"getGlobalMetadata()": {
"returns": {
"_0": "Container global metadata field."
}
},
"length()": {
"returns": {
"_0": "Number of objects in the container."
}
},
"push(bytes32)": {
"params": {
"_object": "A 32 byte value to insert into the container."
}
},
"push(bytes32,bytes27)": {
"params": {
"_globalMetadata": "New global metadata for the container.",
"_object": "A 32 byte value to insert into the container."
}
},
"setGlobalMetadata(bytes27)": {
"params": {
"_globalMetadata": "New global metadata to set."
}
}
},
"title": "OVM_ChainStorageContainer",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {
"deleteElementsAfterInclusive(uint256)": {
"notice": "Removes all objects after and including a given index."
},
"deleteElementsAfterInclusive(uint256,bytes27)": {
"notice": "Removes all objects after and including a given index. Also allows setting the global metadata field."
},
"get(uint256)": {
"notice": "Retrieves an object from the container."
},
"getGlobalMetadata()": {
"notice": "Retrieves the container's global metadata field."
},
"length()": {
"notice": "Retrieves the number of objects stored in the container."
},
"push(bytes32)": {
"notice": "Pushes an object into the container."
},
"push(bytes32,bytes27)": {
"notice": "Pushes an object into the container. Function allows setting the global metadata since we'll need to touch the \"length\" storage slot anyway, which also contains the global metadata (it's an optimization)."
},
"setGlobalMetadata(bytes27)": {
"notice": "Sets the container's global metadata field. We're using `bytes27` here because we use five bytes to maintain the length of the underlying data structure, meaning we have an extra 27 bytes to store arbitrary data."
},
"setNextOverwritableIndex(uint256)": {
"notice": "Marks an index as overwritable, meaing the underlying buffer can start to write values over any objects before and including the given index."
}
},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 12554,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "libAddressManager",
"offset": 0,
"slot": "0",
"type": "t_contract(Lib_AddressManager)12547"
},
{
"astId": 3772,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "owner",
"offset": 0,
"slot": "1",
"type": "t_string_storage"
},
{
"astId": 3774,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "buffer",
"offset": 0,
"slot": "2",
"type": "t_struct(RingBuffer)17824_storage"
}
],
"types": {
"t_bytes32": {
"encoding": "inplace",
"label": "bytes32",
"numberOfBytes": "32"
},
"t_contract(Lib_AddressManager)12547": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
},
"t_mapping(t_uint256,t_bytes32)": {
"encoding": "mapping",
"key": "t_uint256",
"label": "mapping(uint256 => bytes32)",
"numberOfBytes": "32",
"value": "t_bytes32"
},
"t_string_storage": {
"encoding": "bytes",
"label": "string",
"numberOfBytes": "32"
},
"t_struct(Buffer)17813_storage": {
"encoding": "inplace",
"label": "struct Lib_RingBuffer.Buffer",
"members": [
{
"astId": 17808,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "length",
"offset": 0,
"slot": "0",
"type": "t_uint256"
},
{
"astId": 17812,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "buf",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_uint256,t_bytes32)"
}
],
"numberOfBytes": "64"
},
"t_struct(RingBuffer)17824_storage": {
"encoding": "inplace",
"label": "struct Lib_RingBuffer.RingBuffer",
"members": [
{
"astId": 17815,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "contextA",
"offset": 0,
"slot": "0",
"type": "t_bytes32"
},
{
"astId": 17817,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "contextB",
"offset": 0,
"slot": "1",
"type": "t_bytes32"
},
{
"astId": 17819,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "bufferA",
"offset": 0,
"slot": "2",
"type": "t_struct(Buffer)17813_storage"
},
{
"astId": 17821,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "bufferB",
"offset": 0,
"slot": "4",
"type": "t_struct(Buffer)17813_storage"
},
{
"astId": 17823,
"contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
"label": "nextOverwritableIndex",
"offset": 0,
"slot": "6",
"type": "t_uint256"
}
],
"numberOfBytes": "224"
},
"t_uint256": {
"encoding": "inplace",
"label": "uint256",
"numberOfBytes": "32"
}
}
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"address": "0x384bC62a4bb9aE617c8dD0eC351d7780444EFDc0",
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "_from",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "_to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "_amount",
"type": "uint256"
}
],
"name": "DepositInitiated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "_to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "_amount",
"type": "uint256"
}
],
"name": "WithdrawalFinalized",
"type": "event"
},
{
"inputs": [],
"name": "deposit",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_to",
"type": "address"
}
],
"name": "depositTo",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_to",
"type": "address"
},
{
"internalType": "uint256",
"name": "_amount",
"type": "uint256"
}
],
"name": "finalizeWithdrawal",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "getFinalizeDepositL2Gas",
"outputs": [
{
"internalType": "uint32",
"name": "",
"type": "uint32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_libAddressManager",
"type": "address"
},
{
"internalType": "address",
"name": "_ovmEth",
"type": "address"
}
],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "libAddressManager",
"outputs": [
{
"internalType": "contract Lib_AddressManager",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "messenger",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "ovmEth",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "resolve",
"outputs": [
{
"internalType": "address",
"name": "_contract",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"stateMutability": "payable",
"type": "receive"
}
],
"transactionHash": "0xa573fb68f6e9c62b7b5df7796822c181efdcfc05efd3d9d34a119121b54765d0",
"receipt": {
"to": null,
"from": "0x77C4c8f491e5ff22a2C0E18b005c3BA0Fe36c1Bc",
"contractAddress": "0x384bC62a4bb9aE617c8dD0eC351d7780444EFDc0",
"transactionIndex": 186,
"gasUsed": "599914",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0xea2f409173c3b697f9badb641ba910536bf708d8f9cafa603890671e2e08d493",
"transactionHash": "0xa573fb68f6e9c62b7b5df7796822c181efdcfc05efd3d9d34a119121b54765d0",
"logs": [],
"blockNumber": 12208108,
"cumulativeGasUsed": "12426887",
"status": 1,
"byzantium": true
},
"args": [],
"solcInputHash": "43ee6bb8ef92595aa6d0e22a6c464dff",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"DepositInitiated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"WithdrawalFinalized\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"depositTo\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"finalizeWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFinalizeDepositL2Gas\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_ovmEth\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"libAddressManager\",\"outputs\":[{\"internalType\":\"contract Lib_AddressManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messenger\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ovmEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"The L1 ETH Gateway is a contract which stores deposited ETH that is in use on L2. Compiler used: solc Runtime target: EVM\",\"kind\":\"dev\",\"methods\":{\"deposit()\":{\"details\":\"deposit an amount of the ETH to the caller's balance on L2\"},\"depositTo(address)\":{\"details\":\"deposit an amount of ETH to a recipients's balance on L2\",\"params\":{\"_to\":\"L2 address to credit the withdrawal to\"}},\"finalizeWithdrawal(address,uint256)\":{\"details\":\"Complete a withdrawal from L2 to L1, and credit funds to the recipient's balance of the L1 ETH token. Since only the xDomainMessenger can call this function, it will never be called before the withdrawal is finalized. \",\"params\":{\"_amount\":\"Amount of the ETH to withdraw\",\"_to\":\"L1 address to credit the withdrawal to\"}},\"initialize(address,address)\":{\"params\":{\"_libAddressManager\":\"Address manager for this OE deployment\",\"_ovmEth\":\"L2 OVM_ETH implementation of iOVM_DepositedToken\"}}},\"title\":\"OVM_L1ETHGateway\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/OVM/bridge/tokens/OVM_L1ETHGateway.sol\":\"OVM_L1ETHGateway\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/OVM/bridge/tokens/OVM_L1ETHGateway.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// @unsupported: ovm\\npragma solidity >0.5.0 <0.8.0;\\npragma experimental ABIEncoderV2;\\n\\n/* Interface Imports */\\nimport { iOVM_L1ETHGateway } from \\\"../../../iOVM/bridge/tokens/iOVM_L1ETHGateway.sol\\\";\\nimport { iOVM_L2DepositedToken } from \\\"../../../iOVM/bridge/tokens/iOVM_L2DepositedToken.sol\\\";\\n\\n/* Library Imports */\\nimport { OVM_CrossDomainEnabled } from \\\"../../../libraries/bridge/OVM_CrossDomainEnabled.sol\\\";\\nimport { Lib_AddressResolver } from \\\"../../../libraries/resolver/Lib_AddressResolver.sol\\\";\\nimport { Lib_AddressManager } from \\\"../../../libraries/resolver/Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title OVM_L1ETHGateway\\n * @dev The L1 ETH Gateway is a contract which stores deposited ETH that is in use on L2.\\n *\\n * Compiler used: solc\\n * Runtime target: EVM\\n */\\ncontract OVM_L1ETHGateway is iOVM_L1ETHGateway, OVM_CrossDomainEnabled, Lib_AddressResolver {\\n\\n /********************\\n * Public Constants *\\n ********************/\\n\\n uint32 public constant override getFinalizeDepositL2Gas = 1200000;\\n\\n /********************************\\n * External Contract References *\\n ********************************/\\n\\n address public ovmEth;\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n // This contract lives behind a proxy, so the constructor parameters will go unused.\\n constructor()\\n OVM_CrossDomainEnabled(address(0))\\n Lib_AddressResolver(address(0))\\n public\\n {}\\n\\n /******************\\n * Initialization *\\n ******************/\\n\\n /**\\n * @param _libAddressManager Address manager for this OE deployment\\n * @param _ovmEth L2 OVM_ETH implementation of iOVM_DepositedToken\\n */\\n function initialize(\\n address _libAddressManager,\\n address _ovmEth\\n )\\n public\\n {\\n require(libAddressManager == Lib_AddressManager(0), \\\"Contract has already been initialized.\\\");\\n libAddressManager = Lib_AddressManager(_libAddressManager);\\n ovmEth = _ovmEth;\\n messenger = resolve(\\\"Proxy__OVM_L1CrossDomainMessenger\\\");\\n }\\n\\n /**************\\n * Depositing *\\n **************/\\n\\n receive()\\n external\\n payable\\n {\\n _initiateDeposit(msg.sender, msg.sender);\\n }\\n\\n /**\\n * @dev deposit an amount of the ETH to the caller's balance on L2\\n */\\n function deposit() \\n external\\n override\\n payable\\n {\\n _initiateDeposit(msg.sender, msg.sender);\\n }\\n\\n /**\\n * @dev deposit an amount of ETH to a recipients's balance on L2\\n * @param _to L2 address to credit the withdrawal to\\n */\\n function depositTo(\\n address _to\\n )\\n external\\n override\\n payable\\n {\\n _initiateDeposit(msg.sender, _to);\\n }\\n\\n /**\\n * @dev Performs the logic for deposits by storing the ETH and informing the L2 ETH Gateway of the deposit.\\n *\\n * @param _from Account to pull the deposit from on L1\\n * @param _to Account to give the deposit to on L2\\n */\\n function _initiateDeposit(\\n address _from,\\n address _to\\n )\\n internal\\n {\\n // Construct calldata for l2ETHGateway.finalizeDeposit(_to, _amount)\\n bytes memory data =\\n abi.encodeWithSelector(\\n iOVM_L2DepositedToken.finalizeDeposit.selector,\\n _to,\\n msg.value\\n );\\n\\n // Send calldata into L2\\n sendCrossDomainMessage(\\n ovmEth,\\n data,\\n getFinalizeDepositL2Gas\\n );\\n\\n emit DepositInitiated(_from, _to, msg.value);\\n }\\n\\n /*************************\\n * Cross-chain Functions *\\n *************************/\\n\\n /**\\n * @dev Complete a withdrawal from L2 to L1, and credit funds to the recipient's balance of the\\n * L1 ETH token.\\n * Since only the xDomainMessenger can call this function, it will never be called before the withdrawal is finalized. \\n *\\n * @param _to L1 address to credit the withdrawal to\\n * @param _amount Amount of the ETH to withdraw\\n */\\n function finalizeWithdrawal(\\n address _to,\\n uint256 _amount\\n )\\n external\\n override\\n onlyFromCrossDomainAccount(ovmEth)\\n {\\n _safeTransferETH(_to, _amount);\\n\\n emit WithdrawalFinalized(_to, _amount);\\n }\\n\\n /**********************************\\n * Internal Functions: Accounting *\\n **********************************/\\n\\n /**\\n * @dev Internal accounting function for moving around L1 ETH.\\n *\\n * @param _to L1 address to transfer ETH to\\n * @param _value Amount of ETH to send to\\n */\\n function _safeTransferETH(\\n address _to,\\n uint256 _value\\n )\\n internal\\n {\\n (bool success, ) = _to.call{value: _value}(new bytes(0));\\n require(success, 'TransferHelper::safeTransferETH: ETH transfer failed');\\n }\\n}\\n\",\"keccak256\":\"0x2fff613bf362d01f05d8653247fe46b07dd7bb21c460a30e471d45b7ebd0e627\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/iOVM/bridge/messaging/iAbs_BaseCrossDomainMessenger.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\npragma experimental ABIEncoderV2;\\n\\n/**\\n * @title iAbs_BaseCrossDomainMessenger\\n */\\ninterface iAbs_BaseCrossDomainMessenger {\\n\\n /**********\\n * Events *\\n **********/\\n event SentMessage(bytes message);\\n event RelayedMessage(bytes32 msgHash);\\n\\n /**********************\\n * Contract Variables *\\n **********************/\\n function xDomainMessageSender() external view returns (address);\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Sends a cross domain message to the target messenger.\\n * @param _target Target contract address.\\n * @param _message Message to send to the target.\\n * @param _gasLimit Gas limit for the provided message.\\n */\\n function sendMessage(\\n address _target,\\n bytes calldata _message,\\n uint32 _gasLimit\\n ) external;\\n}\\n\",\"keccak256\":\"0xc2bd6b373daae2ede34281f4be5938d02b9d1cfb056b40d65ff70b7f16ce3c86\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/iOVM/bridge/tokens/iOVM_L1ETHGateway.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0;\\npragma experimental ABIEncoderV2;\\n\\n/**\\n * @title iOVM_L1ETHGateway\\n */\\ninterface iOVM_L1ETHGateway {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event DepositInitiated(\\n address indexed _from,\\n address _to,\\n uint256 _amount\\n );\\n\\n event WithdrawalFinalized(\\n address indexed _to,\\n uint256 _amount\\n );\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function deposit()\\n external\\n payable;\\n\\n function depositTo(\\n address _to\\n )\\n external\\n payable;\\n\\n /*************************\\n * Cross-chain Functions *\\n *************************/\\n\\n function finalizeWithdrawal(\\n address _to,\\n uint _amount\\n )\\n external;\\n\\n function getFinalizeDepositL2Gas()\\n external\\n view\\n returns(\\n uint32\\n );\\n}\\n\",\"keccak256\":\"0x7e6805c5cacfd159410c7cd57a3d586e0fc5810bc46600bbd840a252e243e5ba\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/iOVM/bridge/tokens/iOVM_L2DepositedToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0;\\npragma experimental ABIEncoderV2;\\n\\n/**\\n * @title iOVM_L2DepositedToken\\n */\\ninterface iOVM_L2DepositedToken {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event WithdrawalInitiated(\\n address indexed _from,\\n address _to,\\n uint256 _amount\\n );\\n\\n event DepositFinalized(\\n address indexed _to,\\n uint256 _amount\\n ); \\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function withdraw(\\n uint _amount\\n )\\n external;\\n\\n function withdrawTo(\\n address _to,\\n uint _amount\\n )\\n external;\\n\\n\\n /*************************\\n * Cross-chain Functions *\\n *************************/\\n\\n function finalizeDeposit(\\n address _to,\\n uint _amount\\n )\\n external;\\n}\\n\",\"keccak256\":\"0xaa874355e98c444a58712179acaf5ca344296dfa8229577a38a1d14160ce46f8\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/bridge/OVM_CrossDomainEnabled.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n/* Interface Imports */\\nimport { iAbs_BaseCrossDomainMessenger } from \\\"../../iOVM/bridge/messaging/iAbs_BaseCrossDomainMessenger.sol\\\";\\n\\n/**\\n * @title OVM_CrossDomainEnabled\\n * @dev Helper contract for contracts performing cross-domain communications\\n *\\n * Compiler used: defined by inheriting contract\\n * Runtime target: defined by inheriting contract\\n */\\ncontract OVM_CrossDomainEnabled {\\n // Messenger contract used to send and recieve messages from the other domain.\\n address public messenger;\\n\\n /***************\\n * Constructor *\\n ***************/ \\n constructor(\\n address _messenger\\n ) {\\n messenger = _messenger;\\n }\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n /**\\n * @notice Enforces that the modified function is only callable by a specific cross-domain account.\\n * @param _sourceDomainAccount The only account on the originating domain which is authenticated to call this function.\\n */\\n modifier onlyFromCrossDomainAccount(\\n address _sourceDomainAccount\\n ) {\\n require(\\n msg.sender == address(getCrossDomainMessenger()),\\n \\\"OVM_XCHAIN: messenger contract unauthenticated\\\"\\n );\\n\\n require(\\n getCrossDomainMessenger().xDomainMessageSender() == _sourceDomainAccount,\\n \\\"OVM_XCHAIN: wrong sender of cross-domain message\\\"\\n );\\n\\n _;\\n }\\n \\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * @notice Gets the messenger, usually from storage. This function is exposed in case a child contract needs to override.\\n * @return The address of the cross-domain messenger contract which should be used. \\n */\\n function getCrossDomainMessenger()\\n internal\\n virtual\\n returns(\\n iAbs_BaseCrossDomainMessenger\\n )\\n {\\n return iAbs_BaseCrossDomainMessenger(messenger);\\n }\\n\\n /**\\n * @notice Sends a message to an account on another domain\\n * @param _crossDomainTarget The intended recipient on the destination domain\\n * @param _data The data to send to the target (usually calldata to a function with `onlyFromCrossDomainAccount()`)\\n * @param _gasLimit The gasLimit for the receipt of the message on the target domain.\\n */\\n function sendCrossDomainMessage(\\n address _crossDomainTarget,\\n bytes memory _data,\\n uint32 _gasLimit\\n ) internal {\\n getCrossDomainMessenger().sendMessage(_crossDomainTarget, _data, _gasLimit);\\n }\\n}\\n\",\"keccak256\":\"0x1b1c5adbb359f3f46ca9e43b366a80563c031560e9f1f24ab4742b2d79403ce7\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0x3a490595cc21ff170e4027843093670ff845d5972481fbfb956b722ea564bb06\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_AddressResolver\\n */\\nabstract contract Lib_AddressResolver {\\n\\n /*******************************************\\n * Contract Variables: Contract References *\\n *******************************************/\\n\\n Lib_AddressManager public libAddressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n */\\n constructor(\\n address _libAddressManager\\n ) {\\n libAddressManager = Lib_AddressManager(_libAddressManager);\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function resolve(\\n string memory _name\\n )\\n public\\n view\\n returns (\\n address _contract\\n )\\n {\\n return libAddressManager.getAddress(_name);\\n }\\n}\\n\",\"keccak256\":\"0xaa3ed342f6deb156c660fd83afa579a3b80db17eb465e8949cf5c1b114780143\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xd9dfd9264e5b5fedd53a5b10fdf179c3f367614b0fe69179bce4e45119f5b739\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b03199081169091556001805490911690556109d28061003c6000396000f3fe60806040526004361061008a5760003560e01c8063485cc95511610059578063485cc95514610122578063490b5b7814610142578063b760faf914610157578063d0e30db01461016a578063f4f7b41a146101725761009b565b80631273a090146100a0578063299ca478146100cb5780633cb747bf146100ed578063461a4478146101025761009b565b3661009b576100993333610192565b005b600080fd5b3480156100ac57600080fd5b506100b5610246565b6040516100c29190610935565b60405180910390f35b3480156100d757600080fd5b506100e061024d565b6040516100c29190610865565b3480156100f957600080fd5b506100e061025c565b34801561010e57600080fd5b506100e061011d366004610797565b61026b565b34801561012e57600080fd5b5061009961013d36600461073c565b610347565b34801561014e57600080fd5b506100e06103ef565b61009961016536600461071b565b6103fe565b61009961040b565b34801561017e57600080fd5b5061009961018d36600461076e565b610417565b6000638d6e9a5b60e01b82346040516024016101af929190610879565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526002549091506101fe906001600160a01b03168262124f80610578565b826001600160a01b03167ff531653a5819e21265de50358610d55dbe6594c61605b209dfa4280d277938c18334604051610239929190610879565b60405180910390a2505050565b62124f8081565b6001546001600160a01b031681565b6000546001600160a01b031681565b60015460405163bf40fac160e01b81526020600482018181528451602484015284516000946001600160a01b03169363bf40fac1938793928392604401918501908083838b5b838110156102c95781810151838201526020016102b1565b50505050905090810190601f1680156102f65780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561031357600080fd5b505afa158015610327573d6000803e3d6000fd5b505050506040513d602081101561033d57600080fd5b505190505b919050565b6001546001600160a01b0316156103795760405162461bcd60e51b8152600401610370906108e6565b60405180910390fd5b600180546001600160a01b038085166001600160a01b0319928316179092556002805492841692909116919091179055604080516060810190915260218082526103cb91906109a5602083013961026b565b600080546001600160a01b0319166001600160a01b03929092169190911790555050565b6002546001600160a01b031681565b6104083382610192565b50565b6104153333610192565b565b6002546001600160a01b031661042b610663565b6001600160a01b0316336001600160a01b03161461047a5760405162461bcd60e51b815260040180806020018281038252602e815260200180610947602e913960400191505060405180910390fd5b806001600160a01b031661048c610663565b6001600160a01b0316636e296e456040518163ffffffff1660e01b815260040160206040518083038186803b1580156104c457600080fd5b505afa1580156104d8573d6000803e3d6000fd5b505050506040513d60208110156104ee57600080fd5b50516001600160a01b0316146105355760405162461bcd60e51b81526004018080602001828103825260308152602001806109756030913960400191505060405180910390fd5b61053f8383610672565b826001600160a01b03167f9e5c4f9f4e46b8629d3dda85f43a69194f50254404a72dc62b9e932d9c94eda883604051610239919061092c565b610580610663565b6001600160a01b0316633dbb202b8484846040518463ffffffff1660e01b815260040180846001600160a01b03168152602001806020018363ffffffff168152602001828103825284818151815260200191508051906020019080838360005b838110156105f85781810151838201526020016105e0565b50505050905090810190601f1680156106255780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561064657600080fd5b505af115801561065a573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031690565b604080516000808252602082019092526001600160a01b03841690839060405161069c919061082c565b60006040518083038185875af1925050503d80600081146106d9576040519150601f19603f3d011682016040523d82523d6000602084013e6106de565b606091505b50509050806106ff5760405162461bcd60e51b815260040161037090610892565b505050565b80356001600160a01b038116811461034257600080fd5b60006020828403121561072c578081fd5b61073582610704565b9392505050565b6000806040838503121561074e578081fd5b61075783610704565b915061076560208401610704565b90509250929050565b60008060408385031215610780578182fd5b61078983610704565b946020939093013593505050565b600060208083850312156107a9578182fd5b823567ffffffffffffffff808211156107c0578384fd5b818501915085601f8301126107d3578384fd5b8135818111156107df57fe5b604051601f8201601f19168101850183811182821017156107fc57fe5b6040528181528382018501881015610812578586fd5b818585018683013790810190930193909352509392505050565b60008251815b8181101561084c5760208186018101518583015201610832565b8181111561085a5782828501525b509190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b60208082526034908201527f5472616e7366657248656c7065723a3a736166655472616e736665724554483a60408201527308115512081d1c985b9cd9995c8819985a5b195960621b606082015260800190565b60208082526026908201527f436f6e74726163742068617320616c7265616479206265656e20696e697469616040820152653634bd32b21760d11b606082015260800190565b90815260200190565b63ffffffff9190911681526020019056fe4f564d5f58434841494e3a206d657373656e67657220636f6e747261637420756e61757468656e746963617465644f564d5f58434841494e3a2077726f6e672073656e646572206f662063726f73732d646f6d61696e206d65737361676550726f78795f5f4f564d5f4c3143726f7373446f6d61696e4d657373656e676572a164736f6c6343000706000a",
"deployedBytecode": "0x60806040526004361061008a5760003560e01c8063485cc95511610059578063485cc95514610122578063490b5b7814610142578063b760faf914610157578063d0e30db01461016a578063f4f7b41a146101725761009b565b80631273a090146100a0578063299ca478146100cb5780633cb747bf146100ed578063461a4478146101025761009b565b3661009b576100993333610192565b005b600080fd5b3480156100ac57600080fd5b506100b5610246565b6040516100c29190610935565b60405180910390f35b3480156100d757600080fd5b506100e061024d565b6040516100c29190610865565b3480156100f957600080fd5b506100e061025c565b34801561010e57600080fd5b506100e061011d366004610797565b61026b565b34801561012e57600080fd5b5061009961013d36600461073c565b610347565b34801561014e57600080fd5b506100e06103ef565b61009961016536600461071b565b6103fe565b61009961040b565b34801561017e57600080fd5b5061009961018d36600461076e565b610417565b6000638d6e9a5b60e01b82346040516024016101af929190610879565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526002549091506101fe906001600160a01b03168262124f80610578565b826001600160a01b03167ff531653a5819e21265de50358610d55dbe6594c61605b209dfa4280d277938c18334604051610239929190610879565b60405180910390a2505050565b62124f8081565b6001546001600160a01b031681565b6000546001600160a01b031681565b60015460405163bf40fac160e01b81526020600482018181528451602484015284516000946001600160a01b03169363bf40fac1938793928392604401918501908083838b5b838110156102c95781810151838201526020016102b1565b50505050905090810190601f1680156102f65780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561031357600080fd5b505afa158015610327573d6000803e3d6000fd5b505050506040513d602081101561033d57600080fd5b505190505b919050565b6001546001600160a01b0316156103795760405162461bcd60e51b8152600401610370906108e6565b60405180910390fd5b600180546001600160a01b038085166001600160a01b0319928316179092556002805492841692909116919091179055604080516060810190915260218082526103cb91906109a5602083013961026b565b600080546001600160a01b0319166001600160a01b03929092169190911790555050565b6002546001600160a01b031681565b6104083382610192565b50565b6104153333610192565b565b6002546001600160a01b031661042b610663565b6001600160a01b0316336001600160a01b03161461047a5760405162461bcd60e51b815260040180806020018281038252602e815260200180610947602e913960400191505060405180910390fd5b806001600160a01b031661048c610663565b6001600160a01b0316636e296e456040518163ffffffff1660e01b815260040160206040518083038186803b1580156104c457600080fd5b505afa1580156104d8573d6000803e3d6000fd5b505050506040513d60208110156104ee57600080fd5b50516001600160a01b0316146105355760405162461bcd60e51b81526004018080602001828103825260308152602001806109756030913960400191505060405180910390fd5b61053f8383610672565b826001600160a01b03167f9e5c4f9f4e46b8629d3dda85f43a69194f50254404a72dc62b9e932d9c94eda883604051610239919061092c565b610580610663565b6001600160a01b0316633dbb202b8484846040518463ffffffff1660e01b815260040180846001600160a01b03168152602001806020018363ffffffff168152602001828103825284818151815260200191508051906020019080838360005b838110156105f85781810151838201526020016105e0565b50505050905090810190601f1680156106255780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561064657600080fd5b505af115801561065a573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031690565b604080516000808252602082019092526001600160a01b03841690839060405161069c919061082c565b60006040518083038185875af1925050503d80600081146106d9576040519150601f19603f3d011682016040523d82523d6000602084013e6106de565b606091505b50509050806106ff5760405162461bcd60e51b815260040161037090610892565b505050565b80356001600160a01b038116811461034257600080fd5b60006020828403121561072c578081fd5b61073582610704565b9392505050565b6000806040838503121561074e578081fd5b61075783610704565b915061076560208401610704565b90509250929050565b60008060408385031215610780578182fd5b61078983610704565b946020939093013593505050565b600060208083850312156107a9578182fd5b823567ffffffffffffffff808211156107c0578384fd5b818501915085601f8301126107d3578384fd5b8135818111156107df57fe5b604051601f8201601f19168101850183811182821017156107fc57fe5b6040528181528382018501881015610812578586fd5b818585018683013790810190930193909352509392505050565b60008251815b8181101561084c5760208186018101518583015201610832565b8181111561085a5782828501525b509190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b60208082526034908201527f5472616e7366657248656c7065723a3a736166655472616e736665724554483a60408201527308115512081d1c985b9cd9995c8819985a5b195960621b606082015260800190565b60208082526026908201527f436f6e74726163742068617320616c7265616479206265656e20696e697469616040820152653634bd32b21760d11b606082015260800190565b90815260200190565b63ffffffff9190911681526020019056fe4f564d5f58434841494e3a206d657373656e67657220636f6e747261637420756e61757468656e746963617465644f564d5f58434841494e3a2077726f6e672073656e646572206f662063726f73732d646f6d61696e206d65737361676550726f78795f5f4f564d5f4c3143726f7373446f6d61696e4d657373656e676572a164736f6c6343000706000a",
"devdoc": {
"details": "The L1 ETH Gateway is a contract which stores deposited ETH that is in use on L2. Compiler used: solc Runtime target: EVM",
"kind": "dev",
"methods": {
"deposit()": {
"details": "deposit an amount of the ETH to the caller's balance on L2"
},
"depositTo(address)": {
"details": "deposit an amount of ETH to a recipients's balance on L2",
"params": {
"_to": "L2 address to credit the withdrawal to"
}
},
"finalizeWithdrawal(address,uint256)": {
"details": "Complete a withdrawal from L2 to L1, and credit funds to the recipient's balance of the L1 ETH token. Since only the xDomainMessenger can call this function, it will never be called before the withdrawal is finalized. ",
"params": {
"_amount": "Amount of the ETH to withdraw",
"_to": "L1 address to credit the withdrawal to"
}
},
"initialize(address,address)": {
"params": {
"_libAddressManager": "Address manager for this OE deployment",
"_ovmEth": "L2 OVM_ETH implementation of iOVM_DepositedToken"
}
}
},
"title": "OVM_L1ETHGateway",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 11770,
"contract": "contracts/optimistic-ethereum/OVM/bridge/tokens/OVM_L1ETHGateway.sol:OVM_L1ETHGateway",
"label": "messenger",
"offset": 0,
"slot": "0",
"type": "t_address"
},
{
"astId": 12554,
"contract": "contracts/optimistic-ethereum/OVM/bridge/tokens/OVM_L1ETHGateway.sol:OVM_L1ETHGateway",
"label": "libAddressManager",
"offset": 0,
"slot": "1",
"type": "t_contract(Lib_AddressManager)12547"
},
{
"astId": 1967,
"contract": "contracts/optimistic-ethereum/OVM/bridge/tokens/OVM_L1ETHGateway.sol:OVM_L1ETHGateway",
"label": "ovmEth",
"offset": 0,
"slot": "2",
"type": "t_address"
}
],
"types": {
"t_address": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
},
"t_contract(Lib_AddressManager)12547": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
}
}
}
}
\ No newline at end of file
{
"address": "0x22adc8A1152B090721E253Ee88CC12a15bcF9222",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_libAddressManager",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"components": [
{
"internalType": "address",
"name": "target",
"type": "address"
},
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "bytes",
"name": "message",
"type": "bytes"
},
{
"internalType": "uint256",
"name": "messageNonce",
"type": "uint256"
},
{
"components": [
{
"internalType": "bytes32",
"name": "stateRoot",
"type": "bytes32"
},
{
"components": [
{
"internalType": "uint256",
"name": "batchIndex",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "batchRoot",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "batchSize",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "prevTotalElements",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "extraData",
"type": "bytes"
}
],
"internalType": "struct Lib_OVMCodec.ChainBatchHeader",
"name": "stateRootBatchHeader",
"type": "tuple"
},
{
"components": [
{
"internalType": "uint256",
"name": "index",
"type": "uint256"
},
{
"internalType": "bytes32[]",
"name": "siblings",
"type": "bytes32[]"
}
],
"internalType": "struct Lib_OVMCodec.ChainInclusionProof",
"name": "stateRootProof",
"type": "tuple"
},
{
"internalType": "bytes",
"name": "stateTrieWitness",
"type": "bytes"
},
{
"internalType": "bytes",
"name": "storageTrieWitness",
"type": "bytes"
}
],
"internalType": "struct iOVM_L1CrossDomainMessenger.L2MessageInclusionProof",
"name": "proof",
"type": "tuple"
}
],
"internalType": "struct iOVM_L1MultiMessageRelayer.L2ToL1Message[]",
"name": "_messages",
"type": "tuple[]"
}
],
"name": "batchRelayMessages",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "libAddressManager",
"outputs": [
{
"internalType": "contract Lib_AddressManager",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "resolve",
"outputs": [
{
"internalType": "address",
"name": "_contract",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
],
"transactionHash": "0xc890fd35bfd9c84cc1fc134599abe26f1379a23b7fff1a0ab524085e83b4040b",
"receipt": {
"to": null,
"from": "0x77C4c8f491e5ff22a2C0E18b005c3BA0Fe36c1Bc",
"contractAddress": "0x22adc8A1152B090721E253Ee88CC12a15bcF9222",
"transactionIndex": 65,
"gasUsed": "596327",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0xb04d4d170239f9a4eb4a98a875070b561c35a73c4d619bbe87c695bc25485109",
"transactionHash": "0xc890fd35bfd9c84cc1fc134599abe26f1379a23b7fff1a0ab524085e83b4040b",
"logs": [],
"blockNumber": 12208100,
"cumulativeGasUsed": "4777268",
"status": 1,
"byzantium": true
},
"args": [
"0xd3EeD86464Ff13B4BFD81a3bB1e753b7ceBA3A39"
],
"solcInputHash": "43ee6bb8ef92595aa6d0e22a6c464dff",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"messageNonce\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"batchRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"batchSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"prevTotalElements\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Lib_OVMCodec.ChainBatchHeader\",\"name\":\"stateRootBatchHeader\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[]\",\"name\":\"siblings\",\"type\":\"bytes32[]\"}],\"internalType\":\"struct Lib_OVMCodec.ChainInclusionProof\",\"name\":\"stateRootProof\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"stateTrieWitness\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"storageTrieWitness\",\"type\":\"bytes\"}],\"internalType\":\"struct iOVM_L1CrossDomainMessenger.L2MessageInclusionProof\",\"name\":\"proof\",\"type\":\"tuple\"}],\"internalType\":\"struct iOVM_L1MultiMessageRelayer.L2ToL1Message[]\",\"name\":\"_messages\",\"type\":\"tuple[]\"}],\"name\":\"batchRelayMessages\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"libAddressManager\",\"outputs\":[{\"internalType\":\"contract Lib_AddressManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"The L1 Multi-Message Relayer contract is a gas efficiency optimization which enables the relayer to submit multiple messages in a single transaction to be relayed by the L1 Cross Domain Message Sender. Compiler used: solc Runtime target: EVM\",\"kind\":\"dev\",\"methods\":{\"batchRelayMessages((address,address,bytes,uint256,(bytes32,(uint256,bytes32,uint256,uint256,bytes),(uint256,bytes32[]),bytes,bytes))[])\":{\"params\":{\"_messages\":\"An array of L2 to L1 messages\"}}},\"title\":\"OVM_L1MultiMessageRelayer\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"batchRelayMessages((address,address,bytes,uint256,(bytes32,(uint256,bytes32,uint256,uint256,bytes),(uint256,bytes32[]),bytes,bytes))[])\":{\"notice\":\"Forwards multiple cross domain messages to the L1 Cross Domain Messenger for relaying\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/OVM/bridge/messaging/OVM_L1MultiMessageRelayer.sol\":\"OVM_L1MultiMessageRelayer\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/OVM/bridge/messaging/OVM_L1MultiMessageRelayer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// @unsupported: ovm\\npragma solidity >0.5.0 <0.8.0;\\npragma experimental ABIEncoderV2;\\n/* Interface Imports */\\nimport { iOVM_L1CrossDomainMessenger } from \\\"../../../iOVM/bridge/messaging/iOVM_L1CrossDomainMessenger.sol\\\";\\nimport { iOVM_L1MultiMessageRelayer } from \\\"../../../iOVM/bridge/messaging/iOVM_L1MultiMessageRelayer.sol\\\";\\n\\n/* Contract Imports */\\nimport { Lib_AddressResolver } from \\\"../../../libraries/resolver/Lib_AddressResolver.sol\\\";\\n\\n\\n/**\\n * @title OVM_L1MultiMessageRelayer\\n * @dev The L1 Multi-Message Relayer contract is a gas efficiency optimization which enables the \\n * relayer to submit multiple messages in a single transaction to be relayed by the L1 Cross Domain\\n * Message Sender.\\n *\\n * Compiler used: solc\\n * Runtime target: EVM\\n */\\ncontract OVM_L1MultiMessageRelayer is iOVM_L1MultiMessageRelayer, Lib_AddressResolver {\\n\\n /***************\\n * Constructor *\\n ***************/\\n constructor(\\n address _libAddressManager\\n ) \\n Lib_AddressResolver(_libAddressManager)\\n {}\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyBatchRelayer() {\\n require(\\n msg.sender == resolve(\\\"OVM_L2BatchMessageRelayer\\\"),\\n \\\"OVM_L1MultiMessageRelayer: Function can only be called by the OVM_L2BatchMessageRelayer\\\"\\n );\\n _;\\n }\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * @notice Forwards multiple cross domain messages to the L1 Cross Domain Messenger for relaying\\n * @param _messages An array of L2 to L1 messages\\n */\\n function batchRelayMessages(L2ToL1Message[] calldata _messages) \\n override\\n external\\n onlyBatchRelayer \\n {\\n iOVM_L1CrossDomainMessenger messenger = iOVM_L1CrossDomainMessenger(resolve(\\\"Proxy__OVM_L1CrossDomainMessenger\\\"));\\n for (uint256 i = 0; i < _messages.length; i++) {\\n L2ToL1Message memory message = _messages[i];\\n messenger.relayMessage(\\n message.target,\\n message.sender,\\n message.message,\\n message.messageNonce,\\n message.proof\\n );\\n }\\n }\\n}\\n\",\"keccak256\":\"0xbccd671aae35ef04fa45b3019f0a9d8d3e1d7b60a6261d979579f93f9c508725\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/iOVM/bridge/messaging/iAbs_BaseCrossDomainMessenger.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\npragma experimental ABIEncoderV2;\\n\\n/**\\n * @title iAbs_BaseCrossDomainMessenger\\n */\\ninterface iAbs_BaseCrossDomainMessenger {\\n\\n /**********\\n * Events *\\n **********/\\n event SentMessage(bytes message);\\n event RelayedMessage(bytes32 msgHash);\\n\\n /**********************\\n * Contract Variables *\\n **********************/\\n function xDomainMessageSender() external view returns (address);\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Sends a cross domain message to the target messenger.\\n * @param _target Target contract address.\\n * @param _message Message to send to the target.\\n * @param _gasLimit Gas limit for the provided message.\\n */\\n function sendMessage(\\n address _target,\\n bytes calldata _message,\\n uint32 _gasLimit\\n ) external;\\n}\\n\",\"keccak256\":\"0xc2bd6b373daae2ede34281f4be5938d02b9d1cfb056b40d65ff70b7f16ce3c86\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/iOVM/bridge/messaging/iOVM_L1CrossDomainMessenger.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\npragma experimental ABIEncoderV2;\\n\\n/* Library Imports */\\nimport { Lib_OVMCodec } from \\\"../../../libraries/codec/Lib_OVMCodec.sol\\\";\\n\\n/* Interface Imports */\\nimport { iAbs_BaseCrossDomainMessenger } from \\\"./iAbs_BaseCrossDomainMessenger.sol\\\";\\n\\n/**\\n * @title iOVM_L1CrossDomainMessenger\\n */\\ninterface iOVM_L1CrossDomainMessenger is iAbs_BaseCrossDomainMessenger {\\n\\n /*******************\\n * Data Structures *\\n *******************/\\n\\n struct L2MessageInclusionProof {\\n bytes32 stateRoot;\\n Lib_OVMCodec.ChainBatchHeader stateRootBatchHeader;\\n Lib_OVMCodec.ChainInclusionProof stateRootProof;\\n bytes stateTrieWitness;\\n bytes storageTrieWitness;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Relays a cross domain message to a contract.\\n * @param _target Target contract address.\\n * @param _sender Message sender address.\\n * @param _message Message to send to the target.\\n * @param _messageNonce Nonce for the provided message.\\n * @param _proof Inclusion proof for the given message.\\n */\\n function relayMessage(\\n address _target,\\n address _sender,\\n bytes memory _message,\\n uint256 _messageNonce,\\n L2MessageInclusionProof memory _proof\\n ) external;\\n\\n /**\\n * Replays a cross domain message to the target messenger.\\n * @param _target Target contract address.\\n * @param _sender Original sender address.\\n * @param _message Message to send to the target.\\n * @param _messageNonce Nonce for the provided message.\\n * @param _gasLimit Gas limit for the provided message.\\n */\\n function replayMessage(\\n address _target,\\n address _sender,\\n bytes memory _message,\\n uint256 _messageNonce,\\n uint32 _gasLimit\\n ) external;\\n}\\n\",\"keccak256\":\"0xdcd239d0b215e400674d78e8db4ac12ba18efc34fa78e24c2ff867f61062dba2\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/iOVM/bridge/messaging/iOVM_L1MultiMessageRelayer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\npragma experimental ABIEncoderV2;\\n\\n/* Interface Imports */\\nimport { iOVM_L1CrossDomainMessenger } from \\\"../../../iOVM/bridge/messaging/iOVM_L1CrossDomainMessenger.sol\\\";\\ninterface iOVM_L1MultiMessageRelayer {\\n\\n struct L2ToL1Message {\\n address target;\\n address sender;\\n bytes message;\\n uint256 messageNonce;\\n iOVM_L1CrossDomainMessenger.L2MessageInclusionProof proof;\\n }\\n\\n function batchRelayMessages(L2ToL1Message[] calldata _messages) external; \\n}\\n\",\"keccak256\":\"0xed86c23182a66b1a6c90c3f484b5d7264069e1a3849eb2fdd3608f9686282687\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/codec/Lib_OVMCodec.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\npragma experimental ABIEncoderV2;\\n\\n/* Library Imports */\\nimport { Lib_RLPReader } from \\\"../rlp/Lib_RLPReader.sol\\\";\\nimport { Lib_RLPWriter } from \\\"../rlp/Lib_RLPWriter.sol\\\";\\nimport { Lib_BytesUtils } from \\\"../utils/Lib_BytesUtils.sol\\\";\\nimport { Lib_Bytes32Utils } from \\\"../utils/Lib_Bytes32Utils.sol\\\";\\nimport { Lib_SafeExecutionManagerWrapper } from \\\"../../libraries/wrappers/Lib_SafeExecutionManagerWrapper.sol\\\";\\n\\n/**\\n * @title Lib_OVMCodec\\n */\\nlibrary Lib_OVMCodec {\\n\\n /*********\\n * Enums *\\n *********/\\n\\n enum EOASignatureType {\\n EIP155_TRANSACTION,\\n ETH_SIGNED_MESSAGE\\n }\\n\\n enum QueueOrigin {\\n SEQUENCER_QUEUE,\\n L1TOL2_QUEUE\\n }\\n\\n\\n /***********\\n * Structs *\\n ***********/\\n\\n struct Account {\\n uint256 nonce;\\n uint256 balance;\\n bytes32 storageRoot;\\n bytes32 codeHash;\\n address ethAddress;\\n bool isFresh;\\n }\\n\\n struct EVMAccount {\\n uint256 nonce;\\n uint256 balance;\\n bytes32 storageRoot;\\n bytes32 codeHash;\\n }\\n\\n struct ChainBatchHeader {\\n uint256 batchIndex;\\n bytes32 batchRoot;\\n uint256 batchSize;\\n uint256 prevTotalElements;\\n bytes extraData;\\n }\\n\\n struct ChainInclusionProof {\\n uint256 index;\\n bytes32[] siblings;\\n }\\n\\n struct Transaction {\\n uint256 timestamp;\\n uint256 blockNumber;\\n QueueOrigin l1QueueOrigin;\\n address l1TxOrigin;\\n address entrypoint;\\n uint256 gasLimit;\\n bytes data;\\n }\\n\\n struct TransactionChainElement {\\n bool isSequenced;\\n uint256 queueIndex; // QUEUED TX ONLY\\n uint256 timestamp; // SEQUENCER TX ONLY\\n uint256 blockNumber; // SEQUENCER TX ONLY\\n bytes txData; // SEQUENCER TX ONLY\\n }\\n\\n struct QueueElement {\\n bytes32 transactionHash;\\n uint40 timestamp;\\n uint40 blockNumber;\\n }\\n\\n struct EIP155Transaction {\\n uint256 nonce;\\n uint256 gasPrice;\\n uint256 gasLimit;\\n address to;\\n uint256 value;\\n bytes data;\\n uint256 chainId;\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * Decodes an EOA transaction (i.e., native Ethereum RLP encoding).\\n * @param _transaction Encoded EOA transaction.\\n * @return Transaction decoded into a struct.\\n */\\n function decodeEIP155Transaction(\\n bytes memory _transaction,\\n bool _isEthSignedMessage\\n )\\n internal\\n pure\\n returns (\\n EIP155Transaction memory\\n )\\n {\\n if (_isEthSignedMessage) {\\n (\\n uint256 _nonce,\\n uint256 _gasLimit,\\n uint256 _gasPrice,\\n uint256 _chainId,\\n address _to,\\n bytes memory _data\\n ) = abi.decode(\\n _transaction,\\n (uint256, uint256, uint256, uint256, address ,bytes)\\n );\\n return EIP155Transaction({\\n nonce: _nonce,\\n gasPrice: _gasPrice,\\n gasLimit: _gasLimit,\\n to: _to,\\n value: 0,\\n data: _data,\\n chainId: _chainId\\n });\\n } else {\\n Lib_RLPReader.RLPItem[] memory decoded = Lib_RLPReader.readList(_transaction);\\n\\n return EIP155Transaction({\\n nonce: Lib_RLPReader.readUint256(decoded[0]),\\n gasPrice: Lib_RLPReader.readUint256(decoded[1]),\\n gasLimit: Lib_RLPReader.readUint256(decoded[2]),\\n to: Lib_RLPReader.readAddress(decoded[3]),\\n value: Lib_RLPReader.readUint256(decoded[4]),\\n data: Lib_RLPReader.readBytes(decoded[5]),\\n chainId: Lib_RLPReader.readUint256(decoded[6])\\n });\\n }\\n }\\n\\n /**\\n * Decompresses a compressed EIP155 transaction.\\n * @param _transaction Compressed EIP155 transaction bytes.\\n * @return Transaction parsed into a struct.\\n */\\n function decompressEIP155Transaction(\\n bytes memory _transaction\\n )\\n internal\\n returns (\\n EIP155Transaction memory\\n )\\n {\\n return EIP155Transaction({\\n gasLimit: Lib_BytesUtils.toUint24(_transaction, 0),\\n gasPrice: uint256(Lib_BytesUtils.toUint24(_transaction, 3)) * 1000000,\\n nonce: Lib_BytesUtils.toUint24(_transaction, 6),\\n to: Lib_BytesUtils.toAddress(_transaction, 9),\\n data: Lib_BytesUtils.slice(_transaction, 29),\\n chainId: Lib_SafeExecutionManagerWrapper.safeCHAINID(),\\n value: 0\\n });\\n }\\n\\n /**\\n * Encodes an EOA transaction back into the original transaction.\\n * @param _transaction EIP155transaction to encode.\\n * @param _isEthSignedMessage Whether or not this was an eth signed message.\\n * @return Encoded transaction.\\n */\\n function encodeEIP155Transaction(\\n EIP155Transaction memory _transaction,\\n bool _isEthSignedMessage\\n )\\n internal\\n pure\\n returns (\\n bytes memory\\n )\\n {\\n if (_isEthSignedMessage) {\\n return abi.encode(\\n _transaction.nonce,\\n _transaction.gasLimit,\\n _transaction.gasPrice,\\n _transaction.chainId,\\n _transaction.to,\\n _transaction.data\\n );\\n } else {\\n bytes[] memory raw = new bytes[](9);\\n\\n raw[0] = Lib_RLPWriter.writeUint(_transaction.nonce);\\n raw[1] = Lib_RLPWriter.writeUint(_transaction.gasPrice);\\n raw[2] = Lib_RLPWriter.writeUint(_transaction.gasLimit);\\n if (_transaction.to == address(0)) {\\n raw[3] = Lib_RLPWriter.writeBytes('');\\n } else {\\n raw[3] = Lib_RLPWriter.writeAddress(_transaction.to);\\n }\\n raw[4] = Lib_RLPWriter.writeUint(0);\\n raw[5] = Lib_RLPWriter.writeBytes(_transaction.data);\\n raw[6] = Lib_RLPWriter.writeUint(_transaction.chainId);\\n raw[7] = Lib_RLPWriter.writeBytes(bytes(''));\\n raw[8] = Lib_RLPWriter.writeBytes(bytes(''));\\n\\n return Lib_RLPWriter.writeList(raw);\\n }\\n }\\n\\n /**\\n * Encodes a standard OVM transaction.\\n * @param _transaction OVM transaction to encode.\\n * @return Encoded transaction bytes.\\n */\\n function encodeTransaction(\\n Transaction memory _transaction\\n )\\n internal\\n pure\\n returns (\\n bytes memory\\n )\\n {\\n return abi.encodePacked(\\n _transaction.timestamp,\\n _transaction.blockNumber,\\n _transaction.l1QueueOrigin,\\n _transaction.l1TxOrigin,\\n _transaction.entrypoint,\\n _transaction.gasLimit,\\n _transaction.data\\n );\\n }\\n\\n /**\\n * Hashes a standard OVM transaction.\\n * @param _transaction OVM transaction to encode.\\n * @return Hashed transaction\\n */\\n function hashTransaction(\\n Transaction memory _transaction\\n )\\n internal\\n pure\\n returns (\\n bytes32\\n )\\n {\\n return keccak256(encodeTransaction(_transaction));\\n }\\n\\n /**\\n * Converts an OVM account to an EVM account.\\n * @param _in OVM account to convert.\\n * @return Converted EVM account.\\n */\\n function toEVMAccount(\\n Account memory _in\\n )\\n internal\\n pure\\n returns (\\n EVMAccount memory\\n )\\n {\\n return EVMAccount({\\n nonce: _in.nonce,\\n balance: _in.balance,\\n storageRoot: _in.storageRoot,\\n codeHash: _in.codeHash\\n });\\n }\\n\\n /**\\n * @notice RLP-encodes an account state struct.\\n * @param _account Account state struct.\\n * @return RLP-encoded account state.\\n */\\n function encodeEVMAccount(\\n EVMAccount memory _account\\n )\\n internal\\n pure\\n returns (\\n bytes memory\\n )\\n {\\n bytes[] memory raw = new bytes[](4);\\n\\n // Unfortunately we can't create this array outright because\\n // Lib_RLPWriter.writeList will reject fixed-size arrays. Assigning\\n // index-by-index circumvents this issue.\\n raw[0] = Lib_RLPWriter.writeBytes(\\n Lib_Bytes32Utils.removeLeadingZeros(\\n bytes32(_account.nonce)\\n )\\n );\\n raw[1] = Lib_RLPWriter.writeBytes(\\n Lib_Bytes32Utils.removeLeadingZeros(\\n bytes32(_account.balance)\\n )\\n );\\n raw[2] = Lib_RLPWriter.writeBytes(abi.encodePacked(_account.storageRoot));\\n raw[3] = Lib_RLPWriter.writeBytes(abi.encodePacked(_account.codeHash));\\n\\n return Lib_RLPWriter.writeList(raw);\\n }\\n\\n /**\\n * @notice Decodes an RLP-encoded account state into a useful struct.\\n * @param _encoded RLP-encoded account state.\\n * @return Account state struct.\\n */\\n function decodeEVMAccount(\\n bytes memory _encoded\\n )\\n internal\\n pure\\n returns (\\n EVMAccount memory\\n )\\n {\\n Lib_RLPReader.RLPItem[] memory accountState = Lib_RLPReader.readList(_encoded);\\n\\n return EVMAccount({\\n nonce: Lib_RLPReader.readUint256(accountState[0]),\\n balance: Lib_RLPReader.readUint256(accountState[1]),\\n storageRoot: Lib_RLPReader.readBytes32(accountState[2]),\\n codeHash: Lib_RLPReader.readBytes32(accountState[3])\\n });\\n }\\n\\n /**\\n * Calculates a hash for a given batch header.\\n * @param _batchHeader Header to hash.\\n * @return Hash of the header.\\n */\\n function hashBatchHeader(\\n Lib_OVMCodec.ChainBatchHeader memory _batchHeader\\n )\\n internal\\n pure\\n returns (\\n bytes32\\n )\\n {\\n return keccak256(\\n abi.encode(\\n _batchHeader.batchRoot,\\n _batchHeader.batchSize,\\n _batchHeader.prevTotalElements,\\n _batchHeader.extraData\\n )\\n );\\n }\\n}\\n\",\"keccak256\":\"0xe7e518ba7bba3fa28c532f8902576c1bb4dfc1ec4b62bed6da50623248ba17c3\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0x3a490595cc21ff170e4027843093670ff845d5972481fbfb956b722ea564bb06\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_AddressResolver\\n */\\nabstract contract Lib_AddressResolver {\\n\\n /*******************************************\\n * Contract Variables: Contract References *\\n *******************************************/\\n\\n Lib_AddressManager public libAddressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n */\\n constructor(\\n address _libAddressManager\\n ) {\\n libAddressManager = Lib_AddressManager(_libAddressManager);\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function resolve(\\n string memory _name\\n )\\n public\\n view\\n returns (\\n address _contract\\n )\\n {\\n return libAddressManager.getAddress(_name);\\n }\\n}\\n\",\"keccak256\":\"0xaa3ed342f6deb156c660fd83afa579a3b80db17eb465e8949cf5c1b114780143\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xd9dfd9264e5b5fedd53a5b10fdf179c3f367614b0fe69179bce4e45119f5b739\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/rlp/Lib_RLPReader.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Lib_RLPReader\\n * @dev Adapted from \\\"RLPReader\\\" by Hamdi Allam (hamdi.allam97@gmail.com).\\n */\\nlibrary Lib_RLPReader {\\n\\n /*************\\n * Constants *\\n *************/\\n\\n uint256 constant internal MAX_LIST_LENGTH = 32;\\n\\n\\n /*********\\n * Enums *\\n *********/\\n\\n enum RLPItemType {\\n DATA_ITEM,\\n LIST_ITEM\\n }\\n\\n \\n /***********\\n * Structs *\\n ***********/\\n\\n struct RLPItem {\\n uint256 length;\\n uint256 ptr;\\n }\\n \\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n \\n /**\\n * Converts bytes to a reference to memory position and length.\\n * @param _in Input bytes to convert.\\n * @return Output memory reference.\\n */\\n function toRLPItem(\\n bytes memory _in\\n )\\n internal\\n pure\\n returns (\\n RLPItem memory\\n )\\n {\\n uint256 ptr;\\n assembly {\\n ptr := add(_in, 32)\\n }\\n\\n return RLPItem({\\n length: _in.length,\\n ptr: ptr\\n });\\n }\\n\\n /**\\n * Reads an RLP list value into a list of RLP items.\\n * @param _in RLP list value.\\n * @return Decoded RLP list items.\\n */\\n function readList(\\n RLPItem memory _in\\n )\\n internal\\n pure\\n returns (\\n RLPItem[] memory\\n )\\n {\\n (\\n uint256 listOffset,\\n ,\\n RLPItemType itemType\\n ) = _decodeLength(_in);\\n\\n require(\\n itemType == RLPItemType.LIST_ITEM,\\n \\\"Invalid RLP list value.\\\"\\n );\\n\\n // Solidity in-memory arrays can't be increased in size, but *can* be decreased in size by\\n // writing to the length. Since we can't know the number of RLP items without looping over\\n // the entire input, we'd have to loop twice to accurately size this array. It's easier to\\n // simply set a reasonable maximum list length and decrease the size before we finish.\\n RLPItem[] memory out = new RLPItem[](MAX_LIST_LENGTH);\\n\\n uint256 itemCount = 0;\\n uint256 offset = listOffset;\\n while (offset < _in.length) {\\n require(\\n itemCount < MAX_LIST_LENGTH,\\n \\\"Provided RLP list exceeds max list length.\\\"\\n );\\n\\n (\\n uint256 itemOffset,\\n uint256 itemLength,\\n ) = _decodeLength(RLPItem({\\n length: _in.length - offset,\\n ptr: _in.ptr + offset\\n }));\\n\\n out[itemCount] = RLPItem({\\n length: itemLength + itemOffset,\\n ptr: _in.ptr + offset\\n });\\n\\n itemCount += 1;\\n offset += itemOffset + itemLength;\\n }\\n\\n // Decrease the array size to match the actual item count.\\n assembly {\\n mstore(out, itemCount)\\n }\\n\\n return out;\\n }\\n\\n /**\\n * Reads an RLP list value into a list of RLP items.\\n * @param _in RLP list value.\\n * @return Decoded RLP list items.\\n */\\n function readList(\\n bytes memory _in\\n )\\n internal\\n pure\\n returns (\\n RLPItem[] memory\\n )\\n {\\n return readList(\\n toRLPItem(_in)\\n );\\n }\\n\\n /**\\n * Reads an RLP bytes value into bytes.\\n * @param _in RLP bytes value.\\n * @return Decoded bytes.\\n */\\n function readBytes(\\n RLPItem memory _in\\n )\\n internal\\n pure\\n returns (\\n bytes memory\\n )\\n {\\n (\\n uint256 itemOffset,\\n uint256 itemLength,\\n RLPItemType itemType\\n ) = _decodeLength(_in);\\n\\n require(\\n itemType == RLPItemType.DATA_ITEM,\\n \\\"Invalid RLP bytes value.\\\"\\n );\\n\\n return _copy(_in.ptr, itemOffset, itemLength);\\n }\\n\\n /**\\n * Reads an RLP bytes value into bytes.\\n * @param _in RLP bytes value.\\n * @return Decoded bytes.\\n */\\n function readBytes(\\n bytes memory _in\\n )\\n internal\\n pure\\n returns (\\n bytes memory\\n )\\n {\\n return readBytes(\\n toRLPItem(_in)\\n );\\n }\\n\\n /**\\n * Reads an RLP string value into a string.\\n * @param _in RLP string value.\\n * @return Decoded string.\\n */\\n function readString(\\n RLPItem memory _in\\n )\\n internal\\n pure\\n returns (\\n string memory\\n )\\n {\\n return string(readBytes(_in));\\n }\\n\\n /**\\n * Reads an RLP string value into a string.\\n * @param _in RLP string value.\\n * @return Decoded string.\\n */\\n function readString(\\n bytes memory _in\\n )\\n internal\\n pure\\n returns (\\n string memory\\n )\\n {\\n return readString(\\n toRLPItem(_in)\\n );\\n }\\n\\n /**\\n * Reads an RLP bytes32 value into a bytes32.\\n * @param _in RLP bytes32 value.\\n * @return Decoded bytes32.\\n */\\n function readBytes32(\\n RLPItem memory _in\\n )\\n internal\\n pure\\n returns (\\n bytes32\\n )\\n {\\n require(\\n _in.length <= 33,\\n \\\"Invalid RLP bytes32 value.\\\"\\n );\\n\\n (\\n uint256 itemOffset,\\n uint256 itemLength,\\n RLPItemType itemType\\n ) = _decodeLength(_in);\\n\\n require(\\n itemType == RLPItemType.DATA_ITEM,\\n \\\"Invalid RLP bytes32 value.\\\"\\n );\\n\\n uint256 ptr = _in.ptr + itemOffset;\\n bytes32 out;\\n assembly {\\n out := mload(ptr)\\n\\n // Shift the bytes over to match the item size.\\n if lt(itemLength, 32) {\\n out := div(out, exp(256, sub(32, itemLength)))\\n }\\n }\\n\\n return out;\\n }\\n\\n /**\\n * Reads an RLP bytes32 value into a bytes32.\\n * @param _in RLP bytes32 value.\\n * @return Decoded bytes32.\\n */\\n function readBytes32(\\n bytes memory _in\\n )\\n internal\\n pure\\n returns (\\n bytes32\\n )\\n {\\n return readBytes32(\\n toRLPItem(_in)\\n );\\n }\\n\\n /**\\n * Reads an RLP uint256 value into a uint256.\\n * @param _in RLP uint256 value.\\n * @return Decoded uint256.\\n */\\n function readUint256(\\n RLPItem memory _in\\n )\\n internal\\n pure\\n returns (\\n uint256\\n )\\n {\\n return uint256(readBytes32(_in));\\n }\\n\\n /**\\n * Reads an RLP uint256 value into a uint256.\\n * @param _in RLP uint256 value.\\n * @return Decoded uint256.\\n */\\n function readUint256(\\n bytes memory _in\\n )\\n internal\\n pure\\n returns (\\n uint256\\n )\\n {\\n return readUint256(\\n toRLPItem(_in)\\n );\\n }\\n\\n /**\\n * Reads an RLP bool value into a bool.\\n * @param _in RLP bool value.\\n * @return Decoded bool.\\n */\\n function readBool(\\n RLPItem memory _in\\n )\\n internal\\n pure\\n returns (\\n bool\\n )\\n {\\n require(\\n _in.length == 1,\\n \\\"Invalid RLP boolean value.\\\"\\n );\\n\\n uint256 ptr = _in.ptr;\\n uint256 out;\\n assembly {\\n out := byte(0, mload(ptr))\\n }\\n\\n require(\\n out == 0 || out == 1,\\n \\\"Lib_RLPReader: Invalid RLP boolean value, must be 0 or 1\\\"\\n );\\n\\n return out != 0;\\n }\\n\\n /**\\n * Reads an RLP bool value into a bool.\\n * @param _in RLP bool value.\\n * @return Decoded bool.\\n */\\n function readBool(\\n bytes memory _in\\n )\\n internal\\n pure\\n returns (\\n bool\\n )\\n {\\n return readBool(\\n toRLPItem(_in)\\n );\\n }\\n\\n /**\\n * Reads an RLP address value into a address.\\n * @param _in RLP address value.\\n * @return Decoded address.\\n */\\n function readAddress(\\n RLPItem memory _in\\n )\\n internal\\n pure\\n returns (\\n address\\n )\\n {\\n if (_in.length == 1) {\\n return address(0);\\n }\\n\\n require(\\n _in.length == 21,\\n \\\"Invalid RLP address value.\\\"\\n );\\n\\n return address(readUint256(_in));\\n }\\n\\n /**\\n * Reads an RLP address value into a address.\\n * @param _in RLP address value.\\n * @return Decoded address.\\n */\\n function readAddress(\\n bytes memory _in\\n )\\n internal\\n pure\\n returns (\\n address\\n )\\n {\\n return readAddress(\\n toRLPItem(_in)\\n );\\n }\\n\\n /**\\n * Reads the raw bytes of an RLP item.\\n * @param _in RLP item to read.\\n * @return Raw RLP bytes.\\n */\\n function readRawBytes(\\n RLPItem memory _in\\n )\\n internal\\n pure\\n returns (\\n bytes memory\\n )\\n {\\n return _copy(_in);\\n }\\n\\n\\n /*********************\\n * Private Functions *\\n *********************/\\n\\n /**\\n * Decodes the length of an RLP item.\\n * @param _in RLP item to decode.\\n * @return Offset of the encoded data.\\n * @return Length of the encoded data.\\n * @return RLP item type (LIST_ITEM or DATA_ITEM).\\n */\\n function _decodeLength(\\n RLPItem memory _in\\n )\\n private\\n pure\\n returns (\\n uint256,\\n uint256,\\n RLPItemType\\n )\\n {\\n require(\\n _in.length > 0,\\n \\\"RLP item cannot be null.\\\"\\n );\\n\\n uint256 ptr = _in.ptr;\\n uint256 prefix;\\n assembly {\\n prefix := byte(0, mload(ptr))\\n }\\n\\n if (prefix <= 0x7f) {\\n // Single byte.\\n\\n return (0, 1, RLPItemType.DATA_ITEM);\\n } else if (prefix <= 0xb7) {\\n // Short string.\\n\\n uint256 strLen = prefix - 0x80;\\n \\n require(\\n _in.length > strLen,\\n \\\"Invalid RLP short string.\\\"\\n );\\n\\n return (1, strLen, RLPItemType.DATA_ITEM);\\n } else if (prefix <= 0xbf) {\\n // Long string.\\n uint256 lenOfStrLen = prefix - 0xb7;\\n\\n require(\\n _in.length > lenOfStrLen,\\n \\\"Invalid RLP long string length.\\\"\\n );\\n\\n uint256 strLen;\\n assembly {\\n // Pick out the string length.\\n strLen := div(\\n mload(add(ptr, 1)),\\n exp(256, sub(32, lenOfStrLen))\\n )\\n }\\n\\n require(\\n _in.length > lenOfStrLen + strLen,\\n \\\"Invalid RLP long string.\\\"\\n );\\n\\n return (1 + lenOfStrLen, strLen, RLPItemType.DATA_ITEM);\\n } else if (prefix <= 0xf7) {\\n // Short list.\\n uint256 listLen = prefix - 0xc0;\\n\\n require(\\n _in.length > listLen,\\n \\\"Invalid RLP short list.\\\"\\n );\\n\\n return (1, listLen, RLPItemType.LIST_ITEM);\\n } else {\\n // Long list.\\n uint256 lenOfListLen = prefix - 0xf7;\\n\\n require(\\n _in.length > lenOfListLen,\\n \\\"Invalid RLP long list length.\\\"\\n );\\n\\n uint256 listLen;\\n assembly {\\n // Pick out the list length.\\n listLen := div(\\n mload(add(ptr, 1)),\\n exp(256, sub(32, lenOfListLen))\\n )\\n }\\n\\n require(\\n _in.length > lenOfListLen + listLen,\\n \\\"Invalid RLP long list.\\\"\\n );\\n\\n return (1 + lenOfListLen, listLen, RLPItemType.LIST_ITEM);\\n }\\n }\\n\\n /**\\n * Copies the bytes from a memory location.\\n * @param _src Pointer to the location to read from.\\n * @param _offset Offset to start reading from.\\n * @param _length Number of bytes to read.\\n * @return Copied bytes.\\n */\\n function _copy(\\n uint256 _src,\\n uint256 _offset,\\n uint256 _length\\n )\\n private\\n pure\\n returns (\\n bytes memory\\n )\\n {\\n bytes memory out = new bytes(_length);\\n if (out.length == 0) {\\n return out;\\n }\\n\\n uint256 src = _src + _offset;\\n uint256 dest;\\n assembly {\\n dest := add(out, 32)\\n }\\n\\n // Copy over as many complete words as we can.\\n for (uint256 i = 0; i < _length / 32; i++) {\\n assembly {\\n mstore(dest, mload(src))\\n }\\n\\n src += 32;\\n dest += 32;\\n }\\n\\n // Pick out the remaining bytes.\\n uint256 mask = 256 ** (32 - (_length % 32)) - 1;\\n assembly {\\n mstore(\\n dest,\\n or(\\n and(mload(src), not(mask)),\\n and(mload(dest), mask)\\n )\\n )\\n }\\n\\n return out;\\n }\\n\\n /**\\n * Copies an RLP item into bytes.\\n * @param _in RLP item to copy.\\n * @return Copied bytes.\\n */\\n function _copy(\\n RLPItem memory _in\\n )\\n private\\n pure\\n returns (\\n bytes memory\\n )\\n {\\n return _copy(_in.ptr, 0, _in.length);\\n }\\n}\\n\",\"keccak256\":\"0xbdb8fae0ca2483b4cc07607a5070fc25e33c54b4e4462b99e7c0b13aac48a09b\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/rlp/Lib_RLPWriter.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\npragma experimental ABIEncoderV2;\\n\\n/* Library Imports */\\nimport { Lib_BytesUtils } from \\\"../utils/Lib_BytesUtils.sol\\\";\\n\\n/**\\n * @title Lib_RLPWriter\\n * @author Bakaoh (with modifications)\\n */\\nlibrary Lib_RLPWriter {\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * RLP encodes a byte string.\\n * @param _in The byte string to encode.\\n * @return _out The RLP encoded string in bytes.\\n */\\n function writeBytes(\\n bytes memory _in\\n )\\n internal\\n pure\\n returns (\\n bytes memory _out\\n )\\n {\\n bytes memory encoded;\\n\\n if (_in.length == 1 && uint8(_in[0]) < 128) {\\n encoded = _in;\\n } else {\\n encoded = abi.encodePacked(_writeLength(_in.length, 128), _in);\\n }\\n\\n return encoded;\\n }\\n\\n /**\\n * RLP encodes a list of RLP encoded byte byte strings.\\n * @param _in The list of RLP encoded byte strings.\\n * @return _out The RLP encoded list of items in bytes.\\n */\\n function writeList(\\n bytes[] memory _in\\n )\\n internal\\n pure\\n returns (\\n bytes memory _out\\n )\\n {\\n bytes memory list = _flatten(_in);\\n return abi.encodePacked(_writeLength(list.length, 192), list);\\n }\\n\\n /**\\n * RLP encodes a string.\\n * @param _in The string to encode.\\n * @return _out The RLP encoded string in bytes.\\n */\\n function writeString(\\n string memory _in\\n )\\n internal\\n pure\\n returns (\\n bytes memory _out\\n )\\n {\\n return writeBytes(bytes(_in));\\n }\\n\\n /**\\n * RLP encodes an address.\\n * @param _in The address to encode.\\n * @return _out The RLP encoded address in bytes.\\n */\\n function writeAddress(\\n address _in\\n )\\n internal\\n pure\\n returns (\\n bytes memory _out\\n )\\n {\\n return writeBytes(abi.encodePacked(_in));\\n }\\n\\n /**\\n * RLP encodes a uint.\\n * @param _in The uint256 to encode.\\n * @return _out The RLP encoded uint256 in bytes.\\n */\\n function writeUint(\\n uint256 _in\\n )\\n internal\\n pure\\n returns (\\n bytes memory _out\\n )\\n {\\n return writeBytes(_toBinary(_in));\\n }\\n\\n /**\\n * RLP encodes a bool.\\n * @param _in The bool to encode.\\n * @return _out The RLP encoded bool in bytes.\\n */\\n function writeBool(\\n bool _in\\n )\\n internal\\n pure\\n returns (\\n bytes memory _out\\n )\\n {\\n bytes memory encoded = new bytes(1);\\n encoded[0] = (_in ? bytes1(0x01) : bytes1(0x80));\\n return encoded;\\n }\\n\\n\\n /*********************\\n * Private Functions *\\n *********************/\\n\\n /**\\n * Encode the first byte, followed by the `len` in binary form if `length` is more than 55.\\n * @param _len The length of the string or the payload.\\n * @param _offset 128 if item is string, 192 if item is list.\\n * @return _encoded RLP encoded bytes.\\n */\\n function _writeLength(\\n uint256 _len,\\n uint256 _offset\\n )\\n private\\n pure\\n returns (\\n bytes memory _encoded\\n )\\n {\\n bytes memory encoded;\\n\\n if (_len < 56) {\\n encoded = new bytes(1);\\n encoded[0] = byte(uint8(_len) + uint8(_offset));\\n } else {\\n uint256 lenLen;\\n uint256 i = 1;\\n while (_len / i != 0) {\\n lenLen++;\\n i *= 256;\\n }\\n\\n encoded = new bytes(lenLen + 1);\\n encoded[0] = byte(uint8(lenLen) + uint8(_offset) + 55);\\n for(i = 1; i <= lenLen; i++) {\\n encoded[i] = byte(uint8((_len / (256**(lenLen-i))) % 256));\\n }\\n }\\n\\n return encoded;\\n }\\n\\n /**\\n * Encode integer in big endian binary form with no leading zeroes.\\n * @notice TODO: This should be optimized with assembly to save gas costs.\\n * @param _x The integer to encode.\\n * @return _binary RLP encoded bytes.\\n */\\n function _toBinary(\\n uint256 _x\\n )\\n private\\n pure\\n returns (\\n bytes memory _binary\\n )\\n {\\n bytes memory b = abi.encodePacked(_x);\\n\\n uint256 i = 0;\\n for (; i < 32; i++) {\\n if (b[i] != 0) {\\n break;\\n }\\n }\\n\\n bytes memory res = new bytes(32 - i);\\n for (uint256 j = 0; j < res.length; j++) {\\n res[j] = b[i++];\\n }\\n\\n return res;\\n }\\n\\n /**\\n * Copies a piece of memory to another location.\\n * @notice From: https://github.com/Arachnid/solidity-stringutils/blob/master/src/strings.sol.\\n * @param _dest Destination location.\\n * @param _src Source location.\\n * @param _len Length of memory to copy.\\n */\\n function _memcpy(\\n uint256 _dest,\\n uint256 _src,\\n uint256 _len\\n )\\n private\\n pure\\n {\\n uint256 dest = _dest;\\n uint256 src = _src;\\n uint256 len = _len;\\n\\n for(; len >= 32; len -= 32) {\\n assembly {\\n mstore(dest, mload(src))\\n }\\n dest += 32;\\n src += 32;\\n }\\n\\n uint256 mask = 256 ** (32 - len) - 1;\\n assembly {\\n let srcpart := and(mload(src), not(mask))\\n let destpart := and(mload(dest), mask)\\n mstore(dest, or(destpart, srcpart))\\n }\\n }\\n\\n /**\\n * Flattens a list of byte strings into one byte string.\\n * @notice From: https://github.com/sammayo/solidity-rlp-encoder/blob/master/RLPEncode.sol.\\n * @param _list List of byte strings to flatten.\\n * @return _flattened The flattened byte string.\\n */\\n function _flatten(\\n bytes[] memory _list\\n )\\n private\\n pure\\n returns (\\n bytes memory _flattened\\n )\\n {\\n if (_list.length == 0) {\\n return new bytes(0);\\n }\\n\\n uint256 len;\\n uint256 i = 0;\\n for (; i < _list.length; i++) {\\n len += _list[i].length;\\n }\\n\\n bytes memory flattened = new bytes(len);\\n uint256 flattenedPtr;\\n assembly { flattenedPtr := add(flattened, 0x20) }\\n\\n for(i = 0; i < _list.length; i++) {\\n bytes memory item = _list[i];\\n\\n uint256 listPtr;\\n assembly { listPtr := add(item, 0x20)}\\n\\n _memcpy(flattenedPtr, listPtr, item.length);\\n flattenedPtr += _list[i].length;\\n }\\n\\n return flattened;\\n }\\n}\",\"keccak256\":\"0xbcb24619c1758cb0d9f3fe5c79495950045a9087046a02b9ce01df46ae09ae5b\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/utils/Lib_Bytes32Utils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Lib_Byte32Utils\\n */\\nlibrary Lib_Bytes32Utils {\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * Converts a bytes32 value to a boolean. Anything non-zero will be converted to \\\"true.\\\"\\n * @param _in Input bytes32 value.\\n * @return Bytes32 as a boolean.\\n */\\n function toBool(\\n bytes32 _in\\n )\\n internal\\n pure\\n returns (\\n bool\\n )\\n {\\n return _in != 0;\\n }\\n\\n /**\\n * Converts a boolean to a bytes32 value.\\n * @param _in Input boolean value.\\n * @return Boolean as a bytes32.\\n */\\n function fromBool(\\n bool _in\\n )\\n internal\\n pure\\n returns (\\n bytes32\\n )\\n {\\n return bytes32(uint256(_in ? 1 : 0));\\n }\\n\\n /**\\n * Converts a bytes32 value to an address. Takes the *last* 20 bytes.\\n * @param _in Input bytes32 value.\\n * @return Bytes32 as an address.\\n */\\n function toAddress(\\n bytes32 _in\\n )\\n internal\\n pure\\n returns (\\n address\\n )\\n {\\n return address(uint160(uint256(_in)));\\n }\\n\\n /**\\n * Converts an address to a bytes32.\\n * @param _in Input address value.\\n * @return Address as a bytes32.\\n */\\n function fromAddress(\\n address _in\\n )\\n internal\\n pure\\n returns (\\n bytes32\\n )\\n {\\n return bytes32(uint256(_in));\\n }\\n\\n /**\\n * Removes the leading zeros from a bytes32 value and returns a new (smaller) bytes value.\\n * @param _in Input bytes32 value.\\n * @return Bytes32 without any leading zeros.\\n */\\n function removeLeadingZeros(\\n bytes32 _in\\n )\\n internal\\n pure\\n returns (\\n bytes memory\\n )\\n {\\n bytes memory out;\\n\\n assembly {\\n // Figure out how many leading zero bytes to remove.\\n let shift := 0\\n for { let i := 0 } and(lt(i, 32), eq(byte(i, _in), 0)) { i := add(i, 1) } {\\n shift := add(shift, 1)\\n }\\n\\n // Reserve some space for our output and fix the free memory pointer.\\n out := mload(0x40)\\n mstore(0x40, add(out, 0x40))\\n\\n // Shift the value and store it into the output bytes.\\n mstore(add(out, 0x20), shl(mul(shift, 8), _in))\\n\\n // Store the new size (with leading zero bytes removed) in the output byte size.\\n mstore(out, sub(32, shift))\\n }\\n\\n return out;\\n }\\n}\\n\",\"keccak256\":\"0xfa2def593e3fc56a31852c3744aefdaa93cec74e721bfcfeb1e5d166c7c60b64\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/utils/Lib_BytesUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Lib_BytesUtils\\n */\\nlibrary Lib_BytesUtils {\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function slice(\\n bytes memory _bytes,\\n uint256 _start,\\n uint256 _length\\n )\\n internal\\n pure\\n returns (bytes memory)\\n {\\n require(_length + 31 >= _length, \\\"slice_overflow\\\");\\n require(_start + _length >= _start, \\\"slice_overflow\\\");\\n require(_bytes.length >= _start + _length, \\\"slice_outOfBounds\\\");\\n\\n bytes memory tempBytes;\\n\\n assembly {\\n switch iszero(_length)\\n case 0 {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // The first word of the slice result is potentially a partial\\n // word read from the original array. To read it, we calculate\\n // the length of that partial word and start copying that many\\n // bytes into the array. The first word we copy will start with\\n // data we don't care about, but the last `lengthmod` bytes will\\n // land at the beginning of the contents of the new array. When\\n // we're done copying, we overwrite the full first word with\\n // the actual length of the slice.\\n let lengthmod := and(_length, 31)\\n\\n // The multiplication in the next line is necessary\\n // because when slicing multiples of 32 bytes (lengthmod == 0)\\n // the following copy loop was copying the origin's length\\n // and then ending prematurely not copying everything it should.\\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\\n let end := add(mc, _length)\\n\\n for {\\n // The multiplication in the next line has the same exact purpose\\n // as the one above.\\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n mstore(tempBytes, _length)\\n\\n //update free-memory pointer\\n //allocating the array padded to 32 bytes like the compiler does now\\n mstore(0x40, and(add(mc, 31), not(31)))\\n }\\n //if we want a zero-length slice let's just return a zero-length array\\n default {\\n tempBytes := mload(0x40)\\n\\n //zero out the 32 bytes slice we are about to return\\n //we need to do it because Solidity does not garbage collect\\n mstore(tempBytes, 0)\\n\\n mstore(0x40, add(tempBytes, 0x20))\\n }\\n }\\n\\n return tempBytes;\\n }\\n\\n function slice(\\n bytes memory _bytes,\\n uint256 _start\\n )\\n internal\\n pure\\n returns (bytes memory)\\n {\\n if (_bytes.length - _start == 0) {\\n return bytes('');\\n }\\n\\n return slice(_bytes, _start, _bytes.length - _start);\\n }\\n\\n function toBytes32PadLeft(\\n bytes memory _bytes\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n bytes32 ret;\\n uint256 len = _bytes.length <= 32 ? _bytes.length : 32;\\n assembly {\\n ret := shr(mul(sub(32, len), 8), mload(add(_bytes, 32)))\\n }\\n return ret;\\n }\\n\\n function toBytes32(\\n bytes memory _bytes\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n if (_bytes.length < 32) {\\n bytes32 ret;\\n assembly {\\n ret := mload(add(_bytes, 32))\\n }\\n return ret;\\n }\\n\\n return abi.decode(_bytes,(bytes32)); // will truncate if input length > 32 bytes\\n }\\n\\n function toUint256(\\n bytes memory _bytes\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n return uint256(toBytes32(_bytes));\\n }\\n\\n function toUint24(bytes memory _bytes, uint256 _start) internal pure returns (uint24) {\\n require(_start + 3 >= _start, \\\"toUint24_overflow\\\");\\n require(_bytes.length >= _start + 3 , \\\"toUint24_outOfBounds\\\");\\n uint24 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x3), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint8(bytes memory _bytes, uint256 _start) internal pure returns (uint8) {\\n require(_start + 1 >= _start, \\\"toUint8_overflow\\\");\\n require(_bytes.length >= _start + 1 , \\\"toUint8_outOfBounds\\\");\\n uint8 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x1), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toAddress(bytes memory _bytes, uint256 _start) internal pure returns (address) {\\n require(_start + 20 >= _start, \\\"toAddress_overflow\\\");\\n require(_bytes.length >= _start + 20, \\\"toAddress_outOfBounds\\\");\\n address tempAddress;\\n\\n assembly {\\n tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)\\n }\\n\\n return tempAddress;\\n }\\n\\n function toNibbles(\\n bytes memory _bytes\\n )\\n internal\\n pure\\n returns (bytes memory)\\n {\\n bytes memory nibbles = new bytes(_bytes.length * 2);\\n\\n for (uint256 i = 0; i < _bytes.length; i++) {\\n nibbles[i * 2] = _bytes[i] >> 4;\\n nibbles[i * 2 + 1] = bytes1(uint8(_bytes[i]) % 16);\\n }\\n\\n return nibbles;\\n }\\n\\n function fromNibbles(\\n bytes memory _bytes\\n )\\n internal\\n pure\\n returns (bytes memory)\\n {\\n bytes memory ret = new bytes(_bytes.length / 2);\\n\\n for (uint256 i = 0; i < ret.length; i++) {\\n ret[i] = (_bytes[i * 2] << 4) | (_bytes[i * 2 + 1]);\\n }\\n\\n return ret;\\n }\\n\\n function equal(\\n bytes memory _bytes,\\n bytes memory _other\\n )\\n internal\\n pure\\n returns (bool)\\n {\\n return keccak256(_bytes) == keccak256(_other);\\n }\\n}\\n\",\"keccak256\":\"0x0adf22e1b22ba09911e859f64cb3b484e992be4f9fd3b09088e6225bf8d06ce0\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/utils/Lib_ErrorUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\npragma experimental ABIEncoderV2;\\n\\n/**\\n * @title Lib_ErrorUtils\\n */\\nlibrary Lib_ErrorUtils {\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * Encodes an error string into raw solidity-style revert data.\\n * (i.e. ascii bytes, prefixed with bytes4(keccak(\\\"Error(string))\\\"))\\n * Ref: https://docs.soliditylang.org/en/v0.8.2/control-structures.html?highlight=Error(string)#panic-via-assert-and-error-via-require\\n * @param _reason Reason for the reversion.\\n * @return Standard solidity revert data for the given reason.\\n */\\n function encodeRevertString(\\n string memory _reason\\n )\\n internal\\n pure\\n returns (\\n bytes memory\\n )\\n {\\n return abi.encodeWithSignature(\\n \\\"Error(string)\\\",\\n _reason\\n );\\n }\\n}\\n\",\"keccak256\":\"0xfc64ec4a81fb50865b502a0004ed154e8598e1a313db77303fc95e41f536e6b7\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/wrappers/Lib_SafeExecutionManagerWrapper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_ErrorUtils } from \\\"../utils/Lib_ErrorUtils.sol\\\";\\n\\n/**\\n * @title Lib_SafeExecutionManagerWrapper\\n * @dev The Safe Execution Manager Wrapper provides functions which facilitate writing OVM safe \\n * code using the standard solidity compiler, by routing all its operations through the Execution \\n * Manager.\\n * \\n * Compiler used: solc\\n * Runtime target: OVM\\n */\\nlibrary Lib_SafeExecutionManagerWrapper {\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * Performs a safe ovmCALL.\\n * @param _gasLimit Gas limit for the call.\\n * @param _target Address to call.\\n * @param _calldata Data to send to the call.\\n * @return _success Whether or not the call reverted.\\n * @return _returndata Data returned by the call.\\n */\\n function safeCALL(\\n uint256 _gasLimit,\\n address _target,\\n bytes memory _calldata\\n )\\n internal\\n returns (\\n bool _success,\\n bytes memory _returndata\\n )\\n {\\n bytes memory returndata = _safeExecutionManagerInteraction(\\n abi.encodeWithSignature(\\n \\\"ovmCALL(uint256,address,bytes)\\\",\\n _gasLimit,\\n _target,\\n _calldata\\n )\\n );\\n\\n return abi.decode(returndata, (bool, bytes));\\n }\\n\\n /**\\n * Performs a safe ovmDELEGATECALL.\\n * @param _gasLimit Gas limit for the call.\\n * @param _target Address to call.\\n * @param _calldata Data to send to the call.\\n * @return _success Whether or not the call reverted.\\n * @return _returndata Data returned by the call.\\n */\\n function safeDELEGATECALL(\\n uint256 _gasLimit,\\n address _target,\\n bytes memory _calldata\\n )\\n internal\\n returns (\\n bool _success,\\n bytes memory _returndata\\n )\\n {\\n bytes memory returndata = _safeExecutionManagerInteraction(\\n abi.encodeWithSignature(\\n \\\"ovmDELEGATECALL(uint256,address,bytes)\\\",\\n _gasLimit,\\n _target,\\n _calldata\\n )\\n );\\n\\n return abi.decode(returndata, (bool, bytes));\\n }\\n\\n /**\\n * Performs a safe ovmCREATE call.\\n * @param _gasLimit Gas limit for the creation.\\n * @param _bytecode Code for the new contract.\\n * @return _contract Address of the created contract.\\n */\\n function safeCREATE(\\n uint256 _gasLimit,\\n bytes memory _bytecode\\n )\\n internal\\n returns (\\n address,\\n bytes memory\\n )\\n {\\n bytes memory returndata = _safeExecutionManagerInteraction(\\n _gasLimit,\\n abi.encodeWithSignature(\\n \\\"ovmCREATE(bytes)\\\",\\n _bytecode\\n )\\n );\\n\\n return abi.decode(returndata, (address, bytes));\\n }\\n\\n /**\\n * Performs a safe ovmEXTCODESIZE call.\\n * @param _contract Address of the contract to query the size of.\\n * @return _EXTCODESIZE Size of the requested contract in bytes.\\n */\\n function safeEXTCODESIZE(\\n address _contract\\n )\\n internal\\n returns (\\n uint256 _EXTCODESIZE\\n )\\n {\\n bytes memory returndata = _safeExecutionManagerInteraction(\\n abi.encodeWithSignature(\\n \\\"ovmEXTCODESIZE(address)\\\",\\n _contract\\n )\\n );\\n\\n return abi.decode(returndata, (uint256));\\n }\\n\\n /**\\n * Performs a safe ovmCHAINID call.\\n * @return _CHAINID Result of calling ovmCHAINID.\\n */\\n function safeCHAINID()\\n internal\\n returns (\\n uint256 _CHAINID\\n )\\n {\\n bytes memory returndata = _safeExecutionManagerInteraction(\\n abi.encodeWithSignature(\\n \\\"ovmCHAINID()\\\"\\n )\\n );\\n\\n return abi.decode(returndata, (uint256));\\n }\\n\\n /**\\n * Performs a safe ovmCALLER call.\\n * @return _CALLER Result of calling ovmCALLER.\\n */\\n function safeCALLER()\\n internal\\n returns (\\n address _CALLER\\n )\\n {\\n bytes memory returndata = _safeExecutionManagerInteraction(\\n abi.encodeWithSignature(\\n \\\"ovmCALLER()\\\"\\n )\\n );\\n\\n return abi.decode(returndata, (address));\\n }\\n\\n /**\\n * Performs a safe ovmADDRESS call.\\n * @return _ADDRESS Result of calling ovmADDRESS.\\n */\\n function safeADDRESS()\\n internal\\n returns (\\n address _ADDRESS\\n )\\n {\\n bytes memory returndata = _safeExecutionManagerInteraction(\\n abi.encodeWithSignature(\\n \\\"ovmADDRESS()\\\"\\n )\\n );\\n\\n return abi.decode(returndata, (address));\\n }\\n\\n /**\\n * Performs a safe ovmGETNONCE call.\\n * @return _nonce Result of calling ovmGETNONCE.\\n */\\n function safeGETNONCE()\\n internal\\n returns (\\n uint256 _nonce\\n )\\n {\\n bytes memory returndata = _safeExecutionManagerInteraction(\\n abi.encodeWithSignature(\\n \\\"ovmGETNONCE()\\\"\\n )\\n );\\n\\n return abi.decode(returndata, (uint256));\\n }\\n\\n /**\\n * Performs a safe ovmINCREMENTNONCE call.\\n */\\n function safeINCREMENTNONCE()\\n internal\\n {\\n _safeExecutionManagerInteraction(\\n abi.encodeWithSignature(\\n \\\"ovmINCREMENTNONCE()\\\"\\n )\\n );\\n }\\n\\n /**\\n * Performs a safe ovmCREATEEOA call.\\n * @param _messageHash Message hash which was signed by EOA\\n * @param _v v value of signature (0 or 1)\\n * @param _r r value of signature\\n * @param _s s value of signature\\n */\\n function safeCREATEEOA(\\n bytes32 _messageHash,\\n uint8 _v,\\n bytes32 _r,\\n bytes32 _s\\n )\\n internal\\n {\\n _safeExecutionManagerInteraction(\\n abi.encodeWithSignature(\\n \\\"ovmCREATEEOA(bytes32,uint8,bytes32,bytes32)\\\",\\n _messageHash,\\n _v,\\n _r,\\n _s\\n )\\n );\\n }\\n\\n /**\\n * Performs a safe REVERT.\\n * @param _reason String revert reason to pass along with the REVERT.\\n */\\n function safeREVERT(\\n string memory _reason\\n )\\n internal\\n {\\n _safeExecutionManagerInteraction(\\n abi.encodeWithSignature(\\n \\\"ovmREVERT(bytes)\\\",\\n Lib_ErrorUtils.encodeRevertString(\\n _reason\\n )\\n )\\n );\\n }\\n\\n /**\\n * Performs a safe \\\"require\\\".\\n * @param _condition Boolean condition that must be true or will revert.\\n * @param _reason String revert reason to pass along with the REVERT.\\n */\\n function safeREQUIRE(\\n bool _condition,\\n string memory _reason\\n )\\n internal\\n {\\n if (!_condition) {\\n safeREVERT(\\n _reason\\n );\\n }\\n }\\n\\n /**\\n * Performs a safe ovmSLOAD call.\\n */\\n function safeSLOAD(\\n bytes32 _key\\n )\\n internal\\n returns (\\n bytes32\\n )\\n {\\n bytes memory returndata = _safeExecutionManagerInteraction(\\n abi.encodeWithSignature(\\n \\\"ovmSLOAD(bytes32)\\\",\\n _key\\n )\\n );\\n\\n return abi.decode(returndata, (bytes32));\\n }\\n\\n /**\\n * Performs a safe ovmSSTORE call.\\n */\\n function safeSSTORE(\\n bytes32 _key,\\n bytes32 _value\\n )\\n internal\\n {\\n _safeExecutionManagerInteraction(\\n abi.encodeWithSignature(\\n \\\"ovmSSTORE(bytes32,bytes32)\\\",\\n _key,\\n _value\\n )\\n );\\n }\\n\\n /*********************\\n * Private Functions *\\n *********************/\\n\\n /**\\n * Performs an ovm interaction and the necessary safety checks.\\n * @param _gasLimit Gas limit for the interaction.\\n * @param _calldata Data to send to the OVM_ExecutionManager (encoded with sighash).\\n * @return _returndata Data sent back by the OVM_ExecutionManager.\\n */\\n function _safeExecutionManagerInteraction(\\n uint256 _gasLimit,\\n bytes memory _calldata\\n )\\n private\\n returns (\\n bytes memory _returndata\\n )\\n {\\n address ovmExecutionManager = msg.sender;\\n (\\n bool success,\\n bytes memory returndata\\n ) = ovmExecutionManager.call{gas: _gasLimit}(_calldata);\\n\\n if (success == false) {\\n assembly {\\n revert(add(returndata, 0x20), mload(returndata))\\n }\\n } else if (returndata.length == 1) {\\n assembly {\\n return(0, 1)\\n }\\n } else {\\n return returndata;\\n }\\n }\\n\\n function _safeExecutionManagerInteraction(\\n bytes memory _calldata\\n )\\n private\\n returns (\\n bytes memory _returndata\\n )\\n {\\n return _safeExecutionManagerInteraction(\\n gasleft(),\\n _calldata\\n );\\n }\\n}\\n\",\"keccak256\":\"0x41e146e7912af794a17cd43c5a276674be956bfa8f3ca5b451bcb82d81e6f492\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b506040516109f93803806109f983398101604081905261002f91610054565b600080546001600160a01b0319166001600160a01b0392909216919091179055610082565b600060208284031215610065578081fd5b81516001600160a01b038116811461007b578182fd5b9392505050565b610968806100916000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806316e9cd9b14610046578063299ca4781461005b578063461a447814610079575b600080fd5b61005961005436600461057d565b61008c565b005b6100636101ea565b60405161007091906106db565b60405180910390f35b6100636100873660046105ec565b6101f9565b6100ca6040518060400160405280601981526020017f4f564d5f4c3242617463684d65737361676552656c61796572000000000000008152506101f9565b6001600160a01b0316336001600160a01b0316146101035760405162461bcd60e51b81526004016100fa906107d7565b60405180910390fd5b600061012660405180606001604052806021815260200161093b602191396101f9565b905060005b828110156101e457600084848381811061014157fe5b9050602002810190610153919061085a565b61015c9061089d565b8051602082015160408084015160608501516080860151925163d7fd19dd60e01b81529596506001600160a01b0389169563d7fd19dd956101a5959094909392916004016106ef565b600060405180830381600087803b1580156101bf57600080fd5b505af11580156101d3573d6000803e3d6000fd5b50506001909301925061012b915050565b50505050565b6000546001600160a01b031681565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b83811015610259578181015183820152602001610241565b50505050905090810190601f1680156102865780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b1580156102a357600080fd5b505afa1580156102b7573d6000803e3d6000fd5b505050506040513d60208110156102cd57600080fd5b505190505b919050565b600067ffffffffffffffff8311156102eb57fe5b6102fe601f8401601f1916602001610879565b905082815283838301111561031257600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b03811681146102d257600080fd5b600082601f830112610350578081fd5b61035f838335602085016102d7565b9392505050565b600060a08284031215610377578081fd5b60405160a0810167ffffffffffffffff828210818311171561039557fe5b816040528293508435835260208501356020840152604085013560408401526060850135606084015260808501359150808211156103d257600080fd5b506103df85828601610340565b6080830152505092915050565b6000604082840312156103fd578081fd5b6040516040810167ffffffffffffffff828210818311171561041b57fe5b816040528293508435835260209150818501358181111561043b57600080fd5b8501601f8101871361044c57600080fd5b80358281111561045857fe5b8381029250610468848401610879565b8181528481019083860185850187018b101561048357600080fd5b600095505b838610156104a6578035835260019590950194918601918601610488565b5080868801525050505050505092915050565b600060a082840312156104ca578081fd5b6104d460a0610879565b905081358152602082013567ffffffffffffffff808211156104f557600080fd5b61050185838601610366565b6020840152604084013591508082111561051a57600080fd5b610526858386016103ec565b6040840152606084013591508082111561053f57600080fd5b61054b85838601610340565b6060840152608084013591508082111561056457600080fd5b5061057184828501610340565b60808301525092915050565b6000806020838503121561058f578182fd5b823567ffffffffffffffff808211156105a6578384fd5b818501915085601f8301126105b9578384fd5b8135818111156105c7578485fd5b86602080830285010111156105da578485fd5b60209290920196919550909350505050565b6000602082840312156105fd578081fd5b813567ffffffffffffffff811115610613578182fd5b8201601f81018413610623578182fd5b610632848235602084016102d7565b949350505050565b60008151808452815b8181101561065f57602081850181015186830182015201610643565b818111156106705782602083870101525b50601f01601f19169290920160200192915050565b6000604083018251845260208084015160408287015282815180855260608801915083830194508592505b808310156106d057845182529383019360019290920191908301906106b0565b509695505050505050565b6001600160a01b0391909116815260200190565b6001600160a01b0386811682528516602082015260a06040820181905260009061071b9083018661063a565b846060840152828103608084015283518152602084015160a06020830152805160a0830152602081015160c0830152604081015160e083015260608101516101008301526080810151905060a061012083015261077c61014083018261063a565b9050604085015182820360408401526107958282610685565b915050606085015182820360608401526107af828261063a565b915050608085015182820360808401526107c9828261063a565b9a9950505050505050505050565b60208082526057908201527f4f564d5f4c314d756c74694d65737361676552656c617965723a2046756e637460408201527f696f6e2063616e206f6e6c792062652063616c6c656420627920746865204f5660608201527f4d5f4c3242617463684d65737361676552656c61796572000000000000000000608082015260a00190565b60008235609e1983360301811261086f578182fd5b9190910192915050565b60405181810167ffffffffffffffff8111828210171561089557fe5b604052919050565b600060a082360312156108ae578081fd5b60405160a0810167ffffffffffffffff82821081831117156108cc57fe5b816040526108d985610329565b83526108e760208601610329565b602084015260408501359150808211156108ff578384fd5b61090b36838701610340565b604084015260608501356060840152608085013591508082111561092d578384fd5b50610571368286016104b956fe50726f78795f5f4f564d5f4c3143726f7373446f6d61696e4d657373656e676572a164736f6c6343000706000a",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c806316e9cd9b14610046578063299ca4781461005b578063461a447814610079575b600080fd5b61005961005436600461057d565b61008c565b005b6100636101ea565b60405161007091906106db565b60405180910390f35b6100636100873660046105ec565b6101f9565b6100ca6040518060400160405280601981526020017f4f564d5f4c3242617463684d65737361676552656c61796572000000000000008152506101f9565b6001600160a01b0316336001600160a01b0316146101035760405162461bcd60e51b81526004016100fa906107d7565b60405180910390fd5b600061012660405180606001604052806021815260200161093b602191396101f9565b905060005b828110156101e457600084848381811061014157fe5b9050602002810190610153919061085a565b61015c9061089d565b8051602082015160408084015160608501516080860151925163d7fd19dd60e01b81529596506001600160a01b0389169563d7fd19dd956101a5959094909392916004016106ef565b600060405180830381600087803b1580156101bf57600080fd5b505af11580156101d3573d6000803e3d6000fd5b50506001909301925061012b915050565b50505050565b6000546001600160a01b031681565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b83811015610259578181015183820152602001610241565b50505050905090810190601f1680156102865780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b1580156102a357600080fd5b505afa1580156102b7573d6000803e3d6000fd5b505050506040513d60208110156102cd57600080fd5b505190505b919050565b600067ffffffffffffffff8311156102eb57fe5b6102fe601f8401601f1916602001610879565b905082815283838301111561031257600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b03811681146102d257600080fd5b600082601f830112610350578081fd5b61035f838335602085016102d7565b9392505050565b600060a08284031215610377578081fd5b60405160a0810167ffffffffffffffff828210818311171561039557fe5b816040528293508435835260208501356020840152604085013560408401526060850135606084015260808501359150808211156103d257600080fd5b506103df85828601610340565b6080830152505092915050565b6000604082840312156103fd578081fd5b6040516040810167ffffffffffffffff828210818311171561041b57fe5b816040528293508435835260209150818501358181111561043b57600080fd5b8501601f8101871361044c57600080fd5b80358281111561045857fe5b8381029250610468848401610879565b8181528481019083860185850187018b101561048357600080fd5b600095505b838610156104a6578035835260019590950194918601918601610488565b5080868801525050505050505092915050565b600060a082840312156104ca578081fd5b6104d460a0610879565b905081358152602082013567ffffffffffffffff808211156104f557600080fd5b61050185838601610366565b6020840152604084013591508082111561051a57600080fd5b610526858386016103ec565b6040840152606084013591508082111561053f57600080fd5b61054b85838601610340565b6060840152608084013591508082111561056457600080fd5b5061057184828501610340565b60808301525092915050565b6000806020838503121561058f578182fd5b823567ffffffffffffffff808211156105a6578384fd5b818501915085601f8301126105b9578384fd5b8135818111156105c7578485fd5b86602080830285010111156105da578485fd5b60209290920196919550909350505050565b6000602082840312156105fd578081fd5b813567ffffffffffffffff811115610613578182fd5b8201601f81018413610623578182fd5b610632848235602084016102d7565b949350505050565b60008151808452815b8181101561065f57602081850181015186830182015201610643565b818111156106705782602083870101525b50601f01601f19169290920160200192915050565b6000604083018251845260208084015160408287015282815180855260608801915083830194508592505b808310156106d057845182529383019360019290920191908301906106b0565b509695505050505050565b6001600160a01b0391909116815260200190565b6001600160a01b0386811682528516602082015260a06040820181905260009061071b9083018661063a565b846060840152828103608084015283518152602084015160a06020830152805160a0830152602081015160c0830152604081015160e083015260608101516101008301526080810151905060a061012083015261077c61014083018261063a565b9050604085015182820360408401526107958282610685565b915050606085015182820360608401526107af828261063a565b915050608085015182820360808401526107c9828261063a565b9a9950505050505050505050565b60208082526057908201527f4f564d5f4c314d756c74694d65737361676552656c617965723a2046756e637460408201527f696f6e2063616e206f6e6c792062652063616c6c656420627920746865204f5660608201527f4d5f4c3242617463684d65737361676552656c61796572000000000000000000608082015260a00190565b60008235609e1983360301811261086f578182fd5b9190910192915050565b60405181810167ffffffffffffffff8111828210171561089557fe5b604052919050565b600060a082360312156108ae578081fd5b60405160a0810167ffffffffffffffff82821081831117156108cc57fe5b816040526108d985610329565b83526108e760208601610329565b602084015260408501359150808211156108ff578384fd5b61090b36838701610340565b604084015260608501356060840152608085013591508082111561092d578384fd5b50610571368286016104b956fe50726f78795f5f4f564d5f4c3143726f7373446f6d61696e4d657373656e676572a164736f6c6343000706000a",
"devdoc": {
"details": "The L1 Multi-Message Relayer contract is a gas efficiency optimization which enables the relayer to submit multiple messages in a single transaction to be relayed by the L1 Cross Domain Message Sender. Compiler used: solc Runtime target: EVM",
"kind": "dev",
"methods": {
"batchRelayMessages((address,address,bytes,uint256,(bytes32,(uint256,bytes32,uint256,uint256,bytes),(uint256,bytes32[]),bytes,bytes))[])": {
"params": {
"_messages": "An array of L2 to L1 messages"
}
}
},
"title": "OVM_L1MultiMessageRelayer",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {
"batchRelayMessages((address,address,bytes,uint256,(bytes32,(uint256,bytes32,uint256,uint256,bytes),(uint256,bytes32[]),bytes,bytes))[])": {
"notice": "Forwards multiple cross domain messages to the L1 Cross Domain Messenger for relaying"
}
},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 12554,
"contract": "contracts/optimistic-ethereum/OVM/bridge/messaging/OVM_L1MultiMessageRelayer.sol:OVM_L1MultiMessageRelayer",
"label": "libAddressManager",
"offset": 0,
"slot": "0",
"type": "t_contract(Lib_AddressManager)12547"
}
],
"types": {
"t_contract(Lib_AddressManager)12547": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
}
}
}
}
\ No newline at end of file
{
"address": "0x4667c625b36Df62e393a9483BCfB2F00cA0708D1",
"abi": [
{
"inputs": [
{
"internalType": "bytes",
"name": "_bytecode",
"type": "bytes"
}
],
"name": "isBytecodeSafe",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "pure",
"type": "function"
}
],
"transactionHash": "0xe5484c392dda889be19833aeb6383296e35e1bad24c67507d2f4a61ce349ef88",
"receipt": {
"to": null,
"from": "0x77C4c8f491e5ff22a2C0E18b005c3BA0Fe36c1Bc",
"contractAddress": "0x4667c625b36Df62e393a9483BCfB2F00cA0708D1",
"transactionIndex": 33,
"gasUsed": "234686",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x2bce69cd7d405ef5c24996ea8a0f677db85952d8b3ea79a8ec010bc0ec048657",
"transactionHash": "0xe5484c392dda889be19833aeb6383296e35e1bad24c67507d2f4a61ce349ef88",
"logs": [],
"blockNumber": 12208095,
"cumulativeGasUsed": "2623646",
"status": 1,
"byzantium": true
},
"args": [],
"solcInputHash": "43ee6bb8ef92595aa6d0e22a6c464dff",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_bytecode\",\"type\":\"bytes\"}],\"name\":\"isBytecodeSafe\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"The Safety Checker verifies that contracts deployed on L2 do not contain any \\\"unsafe\\\" operations. An operation is considered unsafe if it would access state variables which are specific to the environment (ie. L1 or L2) in which it is executed, as this could be used to \\\"escape the sandbox\\\" of the OVM, resulting in non-deterministic fraud proofs. That is, an attacker would be able to \\\"prove fraud\\\" on an honestly applied transaction. Note that a \\\"safe\\\" contract requires opcodes to appear in a particular pattern; omission of \\\"unsafe\\\" opcodes is necessary, but not sufficient. Compiler used: solc Runtime target: EVM\",\"kind\":\"dev\",\"methods\":{\"isBytecodeSafe(bytes)\":{\"params\":{\"_bytecode\":\"The bytecode to safety check.\"},\"returns\":{\"_0\":\"`true` if the bytecode is safe, `false` otherwise.\"}}},\"title\":\"OVM_SafetyChecker\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"isBytecodeSafe(bytes)\":{\"notice\":\"Returns whether or not all of the provided bytecode is safe.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/OVM/execution/OVM_SafetyChecker.sol\":\"OVM_SafetyChecker\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/OVM/execution/OVM_SafetyChecker.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Interface Imports */\\nimport { iOVM_SafetyChecker } from \\\"../../iOVM/execution/iOVM_SafetyChecker.sol\\\";\\n\\n/**\\n * @title OVM_SafetyChecker\\n * @dev The Safety Checker verifies that contracts deployed on L2 do not contain any\\n * \\\"unsafe\\\" operations. An operation is considered unsafe if it would access state variables which\\n * are specific to the environment (ie. L1 or L2) in which it is executed, as this could be used\\n * to \\\"escape the sandbox\\\" of the OVM, resulting in non-deterministic fraud proofs. \\n * That is, an attacker would be able to \\\"prove fraud\\\" on an honestly applied transaction.\\n * Note that a \\\"safe\\\" contract requires opcodes to appear in a particular pattern;\\n * omission of \\\"unsafe\\\" opcodes is necessary, but not sufficient.\\n *\\n * Compiler used: solc\\n * Runtime target: EVM\\n */\\ncontract OVM_SafetyChecker is iOVM_SafetyChecker {\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Returns whether or not all of the provided bytecode is safe.\\n * @param _bytecode The bytecode to safety check.\\n * @return `true` if the bytecode is safe, `false` otherwise.\\n */\\n function isBytecodeSafe(\\n bytes memory _bytecode\\n )\\n override\\n external\\n pure\\n returns (\\n bool\\n )\\n {\\n // autogenerated by gen_safety_checker_constants.py\\n // number of bytes to skip for each opcode\\n uint256[8] memory opcodeSkippableBytes = [\\n uint256(0x0001010101010101010101010000000001010101010101010101010101010000),\\n uint256(0x0100000000000000000000000000000000000000010101010101000000010100),\\n uint256(0x0000000000000000000000000000000001010101000000010101010100000000),\\n uint256(0x0203040500000000000000000000000000000000000000000000000000000000),\\n uint256(0x0101010101010101010101010101010101010101010101010101010101010101),\\n uint256(0x0101010101000000000000000000000000000000000000000000000000000000),\\n uint256(0x0000000000000000000000000000000000000000000000000000000000000000),\\n uint256(0x0000000000000000000000000000000000000000000000000000000000000000)\\n ];\\n // Mask to gate opcode specific cases\\n uint256 opcodeGateMask = ~uint256(0xffffffffffffffffffffffe000000000fffffffff070ffff9c0ffffec000f001);\\n // Halting opcodes\\n uint256 opcodeHaltingMask = ~uint256(0x4008000000000000000000000000000000000000004000000000000000000001);\\n // PUSH opcodes\\n uint256 opcodePushMask = ~uint256(0xffffffff000000000000000000000000);\\n\\n uint256 codeLength;\\n uint256 _pc;\\n assembly {\\n _pc := add(_bytecode, 0x20)\\n }\\n codeLength = _pc + _bytecode.length;\\n do {\\n // current opcode: 0x00...0xff\\n uint256 opNum;\\n\\n // inline assembly removes the extra add + bounds check\\n assembly {\\n let word := mload(_pc) //load the next 32 bytes at pc into word\\n\\n // Look up number of bytes to skip from opcodeSkippableBytes and then update indexInWord\\n // E.g. the 02030405 in opcodeSkippableBytes is the number of bytes to skip for PUSH1->4\\n // We repeat this 6 times, thus we can only skip bytes for up to PUSH4 ((1+4) * 6 = 30 < 32).\\n // If we see an opcode that is listed as 0 skippable bytes e.g. PUSH5,\\n // then we will get stuck on that indexInWord and then opNum will be set to the PUSH5 opcode.\\n let indexInWord := byte(0, mload(add(opcodeSkippableBytes, byte(0, word))))\\n indexInWord := add(indexInWord, byte(0, mload(add(opcodeSkippableBytes, byte(indexInWord, word)))))\\n indexInWord := add(indexInWord, byte(0, mload(add(opcodeSkippableBytes, byte(indexInWord, word)))))\\n indexInWord := add(indexInWord, byte(0, mload(add(opcodeSkippableBytes, byte(indexInWord, word)))))\\n indexInWord := add(indexInWord, byte(0, mload(add(opcodeSkippableBytes, byte(indexInWord, word)))))\\n indexInWord := add(indexInWord, byte(0, mload(add(opcodeSkippableBytes, byte(indexInWord, word)))))\\n _pc := add(_pc, indexInWord)\\n\\n opNum := byte(indexInWord, word)\\n }\\n\\n // + push opcodes\\n // + stop opcodes [STOP(0x00),JUMP(0x56),RETURN(0xf3),INVALID(0xfe)]\\n // + caller opcode CALLER(0x33)\\n // + blacklisted opcodes\\n uint256 opBit = 1 << opNum;\\n if (opBit & opcodeGateMask == 0) {\\n if (opBit & opcodePushMask == 0) {\\n // all pushes are valid opcodes\\n // subsequent bytes are not opcodes. Skip them.\\n _pc += (opNum - 0x5e); // PUSH1 is 0x60, so opNum-0x5f = PUSHed bytes and we +1 to\\n // skip the _pc++; line below in order to save gas ((-0x5f + 1) = -0x5e)\\n continue;\\n } else if (opBit & opcodeHaltingMask == 0) {\\n // STOP or JUMP or RETURN or INVALID (Note: REVERT is blacklisted, so not included here)\\n // We are now inside unreachable code until we hit a JUMPDEST!\\n do {\\n _pc++;\\n assembly {\\n opNum := byte(0, mload(_pc))\\n }\\n // encountered a JUMPDEST\\n if (opNum == 0x5b) break;\\n // skip PUSHed bytes\\n if ((1 << opNum) & opcodePushMask == 0) _pc += (opNum - 0x5f); // opNum-0x5f = PUSHed bytes (PUSH1 is 0x60)\\n } while (_pc < codeLength);\\n // opNum is 0x5b, so we don't continue here since the pc++ is fine\\n } else if (opNum == 0x33) { // Caller opcode\\n uint256 firstOps; // next 32 bytes of bytecode\\n uint256 secondOps; // following 32 bytes of bytecode\\n\\n assembly {\\n firstOps := mload(_pc)\\n // 37 bytes total, 5 left over --> 32 - 5 bytes = 27 bytes = 216 bits\\n secondOps := shr(216, mload(add(_pc, 0x20)))\\n }\\n\\n // Call identity precompile\\n // CALLER POP PUSH1 0x00 PUSH1 0x04 GAS CALL\\n // 32 - 8 bytes = 24 bytes = 192\\n if ((firstOps >> 192) == 0x3350600060045af1) {\\n _pc += 8;\\n // Call EM and abort execution if instructed\\n // CALLER PUSH1 0x00 SWAP1 GAS CALL PC PUSH1 0x0E ADD JUMPI RETURNDATASIZE PUSH1 0x00 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x00 REVERT JUMPDEST RETURNDATASIZE PUSH1 0x01 EQ ISZERO PC PUSH1 0x0a ADD JUMPI PUSH1 0x01 PUSH1 0x00 RETURN JUMPDEST \\n } else if (firstOps == 0x336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760 && secondOps == 0x016000f35b) {\\n _pc += 37;\\n } else {\\n return false;\\n }\\n continue;\\n } else {\\n // encountered a non-whitelisted opcode!\\n return false;\\n }\\n }\\n _pc++;\\n } while (_pc < codeLength);\\n return true;\\n }\\n}\\n\",\"keccak256\":\"0xb1578ea95da5f6e7d5f5428ccc5efe629b3b9ef88fed7625fa7b78cdb9539508\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/iOVM/execution/iOVM_SafetyChecker.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title iOVM_SafetyChecker\\n */\\ninterface iOVM_SafetyChecker {\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function isBytecodeSafe(bytes calldata _bytecode) external pure returns (bool);\\n}\\n\",\"keccak256\":\"0xde6639676d4ec4f77297652d5ede2429bc93e74e11fefd9e9de4bc92dd784878\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b5061034a806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063a44eb59a14610030575b600080fd5b6100d66004803603602081101561004657600080fd5b81019060208101813564010000000081111561006157600080fd5b82018360208201111561007357600080fd5b8035906020019184600183028401116401000000008311171561009557600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506100ea945050505050565b604080519115158252519081900360200190f35b60408051610100810182527e0101010101010101010101000000000101010101010101010101010101000081526b010101010101000000010100600160f81b016020808301919091526f0101010100000001010101010000000092820192909252630203040560e01b60608201527f0101010101010101010101010101010101010101010101010101010101010101608082015264010101010160d81b60a0820152600060c0820181905260e0820181905283519092741fffffffff000000000f8f000063f000013fff0ffe916a40000000000000000000026117ff60f31b039163ffffffff60601b1991870181019087015b8051600081811a880151811a82811a890151821a0182811a890151821a0182811a890151821a0182811a890151821a0182811a89015190911a01918201911a6001811b86811661032057808516610239575001605d1901610326565b80861661027e575b8280600101935050825160001a915081605b141561025e57610279565b6001821b851661027157918101605e1901915b838310610241575b610320565b816033141561030f578251602084015160d81c673350600060045af160c083901c14156102b057600885019450610306565b817f336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a0157601480156102e357508064016000f35b145b156102f357602585019450610306565b60009a5050505050505050505050610338565b50505050610326565b600098505050505050505050610338565b50506001015b8181106101dd57600196505050505050505b91905056fea164736f6c6343000706000a",
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063a44eb59a14610030575b600080fd5b6100d66004803603602081101561004657600080fd5b81019060208101813564010000000081111561006157600080fd5b82018360208201111561007357600080fd5b8035906020019184600183028401116401000000008311171561009557600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506100ea945050505050565b604080519115158252519081900360200190f35b60408051610100810182527e0101010101010101010101000000000101010101010101010101010101000081526b010101010101000000010100600160f81b016020808301919091526f0101010100000001010101010000000092820192909252630203040560e01b60608201527f0101010101010101010101010101010101010101010101010101010101010101608082015264010101010160d81b60a0820152600060c0820181905260e0820181905283519092741fffffffff000000000f8f000063f000013fff0ffe916a40000000000000000000026117ff60f31b039163ffffffff60601b1991870181019087015b8051600081811a880151811a82811a890151821a0182811a890151821a0182811a890151821a0182811a890151821a0182811a89015190911a01918201911a6001811b86811661032057808516610239575001605d1901610326565b80861661027e575b8280600101935050825160001a915081605b141561025e57610279565b6001821b851661027157918101605e1901915b838310610241575b610320565b816033141561030f578251602084015160d81c673350600060045af160c083901c14156102b057600885019450610306565b817f336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a0157601480156102e357508064016000f35b145b156102f357602585019450610306565b60009a5050505050505050505050610338565b50505050610326565b600098505050505050505050610338565b50506001015b8181106101dd57600196505050505050505b91905056fea164736f6c6343000706000a",
"devdoc": {
"details": "The Safety Checker verifies that contracts deployed on L2 do not contain any \"unsafe\" operations. An operation is considered unsafe if it would access state variables which are specific to the environment (ie. L1 or L2) in which it is executed, as this could be used to \"escape the sandbox\" of the OVM, resulting in non-deterministic fraud proofs. That is, an attacker would be able to \"prove fraud\" on an honestly applied transaction. Note that a \"safe\" contract requires opcodes to appear in a particular pattern; omission of \"unsafe\" opcodes is necessary, but not sufficient. Compiler used: solc Runtime target: EVM",
"kind": "dev",
"methods": {
"isBytecodeSafe(bytes)": {
"params": {
"_bytecode": "The bytecode to safety check."
},
"returns": {
"_0": "`true` if the bytecode is safe, `false` otherwise."
}
}
},
"title": "OVM_SafetyChecker",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {
"isBytecodeSafe(bytes)": {
"notice": "Returns whether or not all of the provided bytecode is safe."
}
},
"version": 1
},
"storageLayout": {
"storage": [],
"types": null
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"address": "0xD1EC7d40CCd01EB7A305b94cBa8AB6D17f6a9eFE",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_libAddressManager",
"type": "address"
},
{
"internalType": "string",
"name": "_implementationName",
"type": "string"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"stateMutability": "payable",
"type": "fallback"
}
],
"transactionHash": "0x640ba4de000f47e64d38bef4caa3a16ef9332340aa01accd0aed27d5b4f04ea5",
"receipt": {
"to": null,
"from": "0x77C4c8f491e5ff22a2C0E18b005c3BA0Fe36c1Bc",
"contractAddress": "0xD1EC7d40CCd01EB7A305b94cBa8AB6D17f6a9eFE",
"transactionIndex": 96,
"gasUsed": "213556",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0xd33ffebe1a0e1651e29fb1331efc57b4546093d98c9b6e5bf2b1b6c5efc6094d",
"transactionHash": "0x640ba4de000f47e64d38bef4caa3a16ef9332340aa01accd0aed27d5b4f04ea5",
"logs": [],
"blockNumber": 12207818,
"cumulativeGasUsed": "6886723",
"status": 1,
"byzantium": true
},
"args": [
"0xd3EeD86464Ff13B4BFD81a3bB1e753b7ceBA3A39",
"OVM_L1CrossDomainMessenger"
],
"solcInputHash": "43ee6bb8ef92595aa6d0e22a6c464dff",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_implementationName\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_implementationName\":\"implementationName of the contract to proxy to.\",\"_libAddressManager\":\"Address of the Lib_AddressManager.\"}}},\"title\":\"Lib_ResolvedDelegateProxy\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol\":\"Lib_ResolvedDelegateProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0x3a490595cc21ff170e4027843093670ff845d5972481fbfb956b722ea564bb06\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xd9dfd9264e5b5fedd53a5b10fdf179c3f367614b0fe69179bce4e45119f5b739\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_ResolvedDelegateProxy\\n */\\ncontract Lib_ResolvedDelegateProxy {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n // Using mappings to store fields to avoid overwriting storage slots in the\\n // implementation contract. For example, instead of storing these fields at\\n // storage slot `0` & `1`, they are stored at `keccak256(key + slot)`.\\n // See: https://solidity.readthedocs.io/en/v0.7.0/internals/layout_in_storage.html\\n // NOTE: Do not use this code in your own contract system. \\n // There is a known flaw in this contract, and we will remove it from the repository\\n // in the near future. Due to the very limited way that we are using it, this flaw is\\n // not an issue in our system. \\n mapping (address => string) private implementationName;\\n mapping (address => Lib_AddressManager) private addressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n * @param _implementationName implementationName of the contract to proxy to.\\n */\\n constructor(\\n address _libAddressManager,\\n string memory _implementationName\\n )\\n {\\n addressManager[address(this)] = Lib_AddressManager(_libAddressManager);\\n implementationName[address(this)] = _implementationName;\\n }\\n\\n\\n /*********************\\n * Fallback Function *\\n *********************/\\n\\n fallback()\\n external\\n payable\\n {\\n address target = addressManager[address(this)].getAddress(\\n (implementationName[address(this)])\\n );\\n\\n require(\\n target != address(0),\\n \\\"Target address must be initialized.\\\"\\n );\\n\\n (bool success, bytes memory returndata) = target.delegatecall(msg.data);\\n\\n if (success == true) {\\n assembly {\\n return(add(returndata, 0x20), mload(returndata))\\n }\\n } else {\\n assembly {\\n revert(add(returndata, 0x20), mload(returndata))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x48ec601665fb10424fc0afbf0b288e123be72eaf5faecb5c440609d176b645a7\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b506040516103df3803806103df8339818101604052604081101561003357600080fd5b81516020830180516040519294929383019291908464010000000082111561005a57600080fd5b90830190602082018581111561006f57600080fd5b825164010000000081118282018810171561008957600080fd5b82525081516020918201929091019080838360005b838110156100b657818101518382015260200161009e565b50505050905090810190601f1680156100e35780820380516001836020036101000a031916815260200191505b5060409081523060009081526001602090815282822080546001600160a01b0319166001600160a01b038a16179055818152919020855161012c95509093509085019150610134565b5050506101d5565b828054600181600116156101000203166002900490600052602060002090601f01602090048101928261016a57600085556101b0565b82601f1061018357805160ff19168380011785556101b0565b828001600101855582156101b0579182015b828111156101b0578251825591602001919060010190610195565b506101bc9291506101c0565b5090565b5b808211156101bc57600081556001016101c1565b6101fb806101e46000396000f3fe60806040818152306000908152600160208181528383205483825293832063bf40fac160e01b909552608490815284546002610100938216159390930260001901169190910460a481905291936001600160a01b039093169263bf40fac192909190819060c490849080156100b55780601f1061008a576101008083540402835291602001916100b5565b820191906000526020600020905b81548152906001019060200180831161009857829003601f168201915b50509250505060206040518083038186803b1580156100d357600080fd5b505afa1580156100e7573d6000803e3d6000fd5b505050506040513d60208110156100fd57600080fd5b505190506001600160a01b0381166101465760405162461bcd60e51b81526004018080602001828103825260238152602001806101cc6023913960400191505060405180910390fd5b600080826001600160a01b03166000366040518083838082843760405192019450600093509091505080830381855af49150503d80600081146101a5576040519150601f19603f3d011682016040523d82523d6000602084013e6101aa565b606091505b509092509050600182151514156101c357805160208201f35b805160208201fdfe5461726765742061646472657373206d75737420626520696e697469616c697a65642ea164736f6c6343000706000a",
"deployedBytecode": "0x60806040818152306000908152600160208181528383205483825293832063bf40fac160e01b909552608490815284546002610100938216159390930260001901169190910460a481905291936001600160a01b039093169263bf40fac192909190819060c490849080156100b55780601f1061008a576101008083540402835291602001916100b5565b820191906000526020600020905b81548152906001019060200180831161009857829003601f168201915b50509250505060206040518083038186803b1580156100d357600080fd5b505afa1580156100e7573d6000803e3d6000fd5b505050506040513d60208110156100fd57600080fd5b505190506001600160a01b0381166101465760405162461bcd60e51b81526004018080602001828103825260238152602001806101cc6023913960400191505060405180910390fd5b600080826001600160a01b03166000366040518083838082843760405192019450600093509091505080830381855af49150503d80600081146101a5576040519150601f19603f3d011682016040523d82523d6000602084013e6101aa565b606091505b509092509050600182151514156101c357805160208201f35b805160208201fdfe5461726765742061646472657373206d75737420626520696e697469616c697a65642ea164736f6c6343000706000a",
"devdoc": {
"kind": "dev",
"methods": {
"constructor": {
"params": {
"_implementationName": "implementationName of the contract to proxy to.",
"_libAddressManager": "Address of the Lib_AddressManager."
}
}
},
"title": "Lib_ResolvedDelegateProxy",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 12679,
"contract": "contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol:Lib_ResolvedDelegateProxy",
"label": "implementationName",
"offset": 0,
"slot": "0",
"type": "t_mapping(t_address,t_string_storage)"
},
{
"astId": 12683,
"contract": "contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol:Lib_ResolvedDelegateProxy",
"label": "addressManager",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_address,t_contract(Lib_AddressManager)12547)"
}
],
"types": {
"t_address": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
},
"t_contract(Lib_AddressManager)12547": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
},
"t_mapping(t_address,t_contract(Lib_AddressManager)12547)": {
"encoding": "mapping",
"key": "t_address",
"label": "mapping(address => contract Lib_AddressManager)",
"numberOfBytes": "32",
"value": "t_contract(Lib_AddressManager)12547"
},
"t_mapping(t_address,t_string_storage)": {
"encoding": "mapping",
"key": "t_address",
"label": "mapping(address => string)",
"numberOfBytes": "32",
"value": "t_string_storage"
},
"t_string_storage": {
"encoding": "bytes",
"label": "string",
"numberOfBytes": "32"
}
}
}
}
\ No newline at end of file
{
"address": "0xF20C38fCdDF0C790319Fd7431d17ea0c2bC9959c",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_libAddressManager",
"type": "address"
},
{
"internalType": "string",
"name": "_implementationName",
"type": "string"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"stateMutability": "payable",
"type": "fallback"
}
],
"transactionHash": "0x4cecb2f632310c09a8281c8545e25e587f22de10b4522abf0bd61d50eeb8170e",
"receipt": {
"to": null,
"from": "0x77C4c8f491e5ff22a2C0E18b005c3BA0Fe36c1Bc",
"contractAddress": "0xF20C38fCdDF0C790319Fd7431d17ea0c2bC9959c",
"transactionIndex": 110,
"gasUsed": "213436",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x1e060e1668626f1ef230f6c183e739d1b98f5c439243eda9ef970e287493dcdd",
"transactionHash": "0x4cecb2f632310c09a8281c8545e25e587f22de10b4522abf0bd61d50eeb8170e",
"logs": [],
"blockNumber": 12208129,
"cumulativeGasUsed": "7794906",
"status": 1,
"byzantium": true
},
"args": [
"0xd3EeD86464Ff13B4BFD81a3bB1e753b7ceBA3A39",
"OVM_L1ETHGateway"
],
"solcInputHash": "43ee6bb8ef92595aa6d0e22a6c464dff",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_implementationName\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_implementationName\":\"implementationName of the contract to proxy to.\",\"_libAddressManager\":\"Address of the Lib_AddressManager.\"}}},\"title\":\"Lib_ResolvedDelegateProxy\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol\":\"Lib_ResolvedDelegateProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0x3a490595cc21ff170e4027843093670ff845d5972481fbfb956b722ea564bb06\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xd9dfd9264e5b5fedd53a5b10fdf179c3f367614b0fe69179bce4e45119f5b739\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_ResolvedDelegateProxy\\n */\\ncontract Lib_ResolvedDelegateProxy {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n // Using mappings to store fields to avoid overwriting storage slots in the\\n // implementation contract. For example, instead of storing these fields at\\n // storage slot `0` & `1`, they are stored at `keccak256(key + slot)`.\\n // See: https://solidity.readthedocs.io/en/v0.7.0/internals/layout_in_storage.html\\n // NOTE: Do not use this code in your own contract system. \\n // There is a known flaw in this contract, and we will remove it from the repository\\n // in the near future. Due to the very limited way that we are using it, this flaw is\\n // not an issue in our system. \\n mapping (address => string) private implementationName;\\n mapping (address => Lib_AddressManager) private addressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n * @param _implementationName implementationName of the contract to proxy to.\\n */\\n constructor(\\n address _libAddressManager,\\n string memory _implementationName\\n )\\n {\\n addressManager[address(this)] = Lib_AddressManager(_libAddressManager);\\n implementationName[address(this)] = _implementationName;\\n }\\n\\n\\n /*********************\\n * Fallback Function *\\n *********************/\\n\\n fallback()\\n external\\n payable\\n {\\n address target = addressManager[address(this)].getAddress(\\n (implementationName[address(this)])\\n );\\n\\n require(\\n target != address(0),\\n \\\"Target address must be initialized.\\\"\\n );\\n\\n (bool success, bytes memory returndata) = target.delegatecall(msg.data);\\n\\n if (success == true) {\\n assembly {\\n return(add(returndata, 0x20), mload(returndata))\\n }\\n } else {\\n assembly {\\n revert(add(returndata, 0x20), mload(returndata))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x48ec601665fb10424fc0afbf0b288e123be72eaf5faecb5c440609d176b645a7\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b506040516103df3803806103df8339818101604052604081101561003357600080fd5b81516020830180516040519294929383019291908464010000000082111561005a57600080fd5b90830190602082018581111561006f57600080fd5b825164010000000081118282018810171561008957600080fd5b82525081516020918201929091019080838360005b838110156100b657818101518382015260200161009e565b50505050905090810190601f1680156100e35780820380516001836020036101000a031916815260200191505b5060409081523060009081526001602090815282822080546001600160a01b0319166001600160a01b038a16179055818152919020855161012c95509093509085019150610134565b5050506101d5565b828054600181600116156101000203166002900490600052602060002090601f01602090048101928261016a57600085556101b0565b82601f1061018357805160ff19168380011785556101b0565b828001600101855582156101b0579182015b828111156101b0578251825591602001919060010190610195565b506101bc9291506101c0565b5090565b5b808211156101bc57600081556001016101c1565b6101fb806101e46000396000f3fe60806040818152306000908152600160208181528383205483825293832063bf40fac160e01b909552608490815284546002610100938216159390930260001901169190910460a481905291936001600160a01b039093169263bf40fac192909190819060c490849080156100b55780601f1061008a576101008083540402835291602001916100b5565b820191906000526020600020905b81548152906001019060200180831161009857829003601f168201915b50509250505060206040518083038186803b1580156100d357600080fd5b505afa1580156100e7573d6000803e3d6000fd5b505050506040513d60208110156100fd57600080fd5b505190506001600160a01b0381166101465760405162461bcd60e51b81526004018080602001828103825260238152602001806101cc6023913960400191505060405180910390fd5b600080826001600160a01b03166000366040518083838082843760405192019450600093509091505080830381855af49150503d80600081146101a5576040519150601f19603f3d011682016040523d82523d6000602084013e6101aa565b606091505b509092509050600182151514156101c357805160208201f35b805160208201fdfe5461726765742061646472657373206d75737420626520696e697469616c697a65642ea164736f6c6343000706000a",
"deployedBytecode": "0x60806040818152306000908152600160208181528383205483825293832063bf40fac160e01b909552608490815284546002610100938216159390930260001901169190910460a481905291936001600160a01b039093169263bf40fac192909190819060c490849080156100b55780601f1061008a576101008083540402835291602001916100b5565b820191906000526020600020905b81548152906001019060200180831161009857829003601f168201915b50509250505060206040518083038186803b1580156100d357600080fd5b505afa1580156100e7573d6000803e3d6000fd5b505050506040513d60208110156100fd57600080fd5b505190506001600160a01b0381166101465760405162461bcd60e51b81526004018080602001828103825260238152602001806101cc6023913960400191505060405180910390fd5b600080826001600160a01b03166000366040518083838082843760405192019450600093509091505080830381855af49150503d80600081146101a5576040519150601f19603f3d011682016040523d82523d6000602084013e6101aa565b606091505b509092509050600182151514156101c357805160208201f35b805160208201fdfe5461726765742061646472657373206d75737420626520696e697469616c697a65642ea164736f6c6343000706000a",
"devdoc": {
"kind": "dev",
"methods": {
"constructor": {
"params": {
"_implementationName": "implementationName of the contract to proxy to.",
"_libAddressManager": "Address of the Lib_AddressManager."
}
}
},
"title": "Lib_ResolvedDelegateProxy",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 12679,
"contract": "contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol:Lib_ResolvedDelegateProxy",
"label": "implementationName",
"offset": 0,
"slot": "0",
"type": "t_mapping(t_address,t_string_storage)"
},
{
"astId": 12683,
"contract": "contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol:Lib_ResolvedDelegateProxy",
"label": "addressManager",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_address,t_contract(Lib_AddressManager)12547)"
}
],
"types": {
"t_address": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
},
"t_contract(Lib_AddressManager)12547": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
},
"t_mapping(t_address,t_contract(Lib_AddressManager)12547)": {
"encoding": "mapping",
"key": "t_address",
"label": "mapping(address => contract Lib_AddressManager)",
"numberOfBytes": "32",
"value": "t_contract(Lib_AddressManager)12547"
},
"t_mapping(t_address,t_string_storage)": {
"encoding": "mapping",
"key": "t_address",
"label": "mapping(address => string)",
"numberOfBytes": "32",
"value": "t_string_storage"
},
"t_string_storage": {
"encoding": "bytes",
"label": "string",
"numberOfBytes": "32"
}
}
}
}
\ No newline at end of file
{
"address": "0x99EDa8472E93Aa28E5470eEDEc6e32081E14DaFC",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_libAddressManager",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "address",
"name": "_who",
"type": "address"
}
],
"name": "claim",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "deposit",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_preStateRoot",
"type": "bytes32"
},
{
"internalType": "address",
"name": "_publisher",
"type": "address"
},
{
"internalType": "uint256",
"name": "_timestamp",
"type": "uint256"
}
],
"name": "finalize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "finalizeWithdrawal",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
},
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "getGasSpent",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_who",
"type": "address"
}
],
"name": "isCollateralized",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "libAddressManager",
"outputs": [
{
"internalType": "contract Lib_AddressManager",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_preStateRoot",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_txHash",
"type": "bytes32"
},
{
"internalType": "address",
"name": "_who",
"type": "address"
},
{
"internalType": "uint256",
"name": "_gasSpent",
"type": "uint256"
}
],
"name": "recordGasSpent",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "resolve",
"outputs": [
{
"internalType": "address",
"name": "_contract",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "startWithdrawal",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"transactionHash": "0x86a064087eb71581e0d3e1d758da8b6fa13af268ae2e7fffdc3ed74a871c6fc7",
"receipt": {
"to": null,
"from": "0x77C4c8f491e5ff22a2C0E18b005c3BA0Fe36c1Bc",
"contractAddress": "0x99EDa8472E93Aa28E5470eEDEc6e32081E14DaFC",
"transactionIndex": 60,
"gasUsed": "288329",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0xd93126d10c2b3dee217a0c998f20119fe1e6dada9e96980460fc0079385c64e5",
"transactionHash": "0x86a064087eb71581e0d3e1d758da8b6fa13af268ae2e7fffdc3ed74a871c6fc7",
"logs": [],
"blockNumber": 12207803,
"cumulativeGasUsed": "10831678",
"status": 1,
"byzantium": true
},
"args": [
"0xd3EeD86464Ff13B4BFD81a3bB1e753b7ceBA3A39"
],
"solcInputHash": "43ee6bb8ef92595aa6d0e22a6c464dff",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_who\",\"type\":\"address\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_preStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_publisher\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"finalize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"finalizeWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"getGasSpent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_who\",\"type\":\"address\"}],\"name\":\"isCollateralized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"libAddressManager\",\"outputs\":[{\"internalType\":\"contract Lib_AddressManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_preStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_txHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_who\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasSpent\",\"type\":\"uint256\"}],\"name\":\"recordGasSpent\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"title\":\"mockOVM_BondManager\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/mockOVM/verification/mockOVM_BondManager.sol\":\"mockOVM_BondManager\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/iOVM/verification/iOVM_BondManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\ninterface ERC20 {\\n function transfer(address, uint256) external returns (bool);\\n function transferFrom(address, address, uint256) external returns (bool);\\n}\\n\\n/// All the errors which may be encountered on the bond manager\\nlibrary Errors {\\n string constant ERC20_ERR = \\\"BondManager: Could not post bond\\\";\\n string constant ALREADY_FINALIZED = \\\"BondManager: Fraud proof for this pre-state root has already been finalized\\\";\\n string constant SLASHED = \\\"BondManager: Cannot finalize withdrawal, you probably got slashed\\\";\\n string constant WRONG_STATE = \\\"BondManager: Wrong bond state for proposer\\\";\\n string constant CANNOT_CLAIM = \\\"BondManager: Cannot claim yet. Dispute must be finalized first\\\";\\n\\n string constant WITHDRAWAL_PENDING = \\\"BondManager: Withdrawal already pending\\\";\\n string constant TOO_EARLY = \\\"BondManager: Too early to finalize your withdrawal\\\";\\n\\n string constant ONLY_TRANSITIONER = \\\"BondManager: Only the transitioner for this pre-state root may call this function\\\";\\n string constant ONLY_FRAUD_VERIFIER = \\\"BondManager: Only the fraud verifier may call this function\\\";\\n string constant ONLY_STATE_COMMITMENT_CHAIN = \\\"BondManager: Only the state commitment chain may call this function\\\";\\n string constant WAIT_FOR_DISPUTES = \\\"BondManager: Wait for other potential disputes\\\";\\n}\\n\\n/**\\n * @title iOVM_BondManager\\n */\\ninterface iOVM_BondManager {\\n\\n /*******************\\n * Data Structures *\\n *******************/\\n\\n /// The lifecycle of a proposer's bond\\n enum State {\\n // Before depositing or after getting slashed, a user is uncollateralized\\n NOT_COLLATERALIZED,\\n // After depositing, a user is collateralized\\n COLLATERALIZED,\\n // After a user has initiated a withdrawal\\n WITHDRAWING\\n }\\n\\n /// A bond posted by a proposer\\n struct Bond {\\n // The user's state\\n State state;\\n // The timestamp at which a proposer issued their withdrawal request\\n uint32 withdrawalTimestamp;\\n // The time when the first disputed was initiated for this bond\\n uint256 firstDisputeAt;\\n // The earliest observed state root for this bond which has had fraud\\n bytes32 earliestDisputedStateRoot;\\n // The state root's timestamp\\n uint256 earliestTimestamp;\\n }\\n\\n // Per pre-state root, store the number of state provisions that were made\\n // and how many of these calls were made by each user. Payouts will then be\\n // claimed by users proportionally for that dispute.\\n struct Rewards {\\n // Flag to check if rewards for a fraud proof are claimable\\n bool canClaim;\\n // Total number of `recordGasSpent` calls made\\n uint256 total;\\n // The gas spent by each user to provide witness data. The sum of all\\n // values inside this map MUST be equal to the value of `total`\\n mapping(address => uint256) gasSpent;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function recordGasSpent(\\n bytes32 _preStateRoot,\\n bytes32 _txHash,\\n address _who,\\n uint256 _gasSpent\\n ) external;\\n\\n function finalize(\\n bytes32 _preStateRoot,\\n address _publisher,\\n uint256 _timestamp\\n ) external;\\n\\n function deposit() external;\\n\\n function startWithdrawal() external;\\n\\n function finalizeWithdrawal() external;\\n\\n function claim(\\n address _who\\n ) external;\\n\\n function isCollateralized(\\n address _who\\n ) external view returns (bool);\\n\\n function getGasSpent(\\n bytes32 _preStateRoot,\\n address _who\\n ) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x3c2a8a399487857158649db1896749d86e39cba545a8aeb2e2bb0f3bdfa7a5b1\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0x3a490595cc21ff170e4027843093670ff845d5972481fbfb956b722ea564bb06\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_AddressResolver\\n */\\nabstract contract Lib_AddressResolver {\\n\\n /*******************************************\\n * Contract Variables: Contract References *\\n *******************************************/\\n\\n Lib_AddressManager public libAddressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n */\\n constructor(\\n address _libAddressManager\\n ) {\\n libAddressManager = Lib_AddressManager(_libAddressManager);\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function resolve(\\n string memory _name\\n )\\n public\\n view\\n returns (\\n address _contract\\n )\\n {\\n return libAddressManager.getAddress(_name);\\n }\\n}\\n\",\"keccak256\":\"0xaa3ed342f6deb156c660fd83afa579a3b80db17eb465e8949cf5c1b114780143\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xd9dfd9264e5b5fedd53a5b10fdf179c3f367614b0fe69179bce4e45119f5b739\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/mockOVM/verification/mockOVM_BondManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Interface Imports */\\nimport { iOVM_BondManager } from \\\"../../iOVM/verification/iOVM_BondManager.sol\\\";\\n\\n/* Contract Imports */\\nimport { Lib_AddressResolver } from \\\"../../libraries/resolver/Lib_AddressResolver.sol\\\";\\n\\n/**\\n * @title mockOVM_BondManager\\n */\\ncontract mockOVM_BondManager is iOVM_BondManager, Lib_AddressResolver {\\n constructor(\\n address _libAddressManager\\n )\\n Lib_AddressResolver(_libAddressManager)\\n {}\\n\\n function recordGasSpent(\\n bytes32 _preStateRoot,\\n bytes32 _txHash,\\n address _who,\\n uint256 _gasSpent\\n )\\n override\\n public\\n {}\\n\\n function finalize(\\n bytes32 _preStateRoot,\\n address _publisher,\\n uint256 _timestamp\\n )\\n override\\n public\\n {}\\n\\n function deposit()\\n override\\n public\\n {}\\n\\n function startWithdrawal()\\n override\\n public\\n {}\\n\\n function finalizeWithdrawal()\\n override\\n public\\n {}\\n\\n function claim(\\n address _who\\n )\\n override\\n public\\n {}\\n\\n function isCollateralized(\\n address _who\\n )\\n override\\n public\\n view\\n returns (\\n bool\\n )\\n {\\n // Only authenticate sequencer to submit state root batches.\\n return _who == resolve(\\\"OVM_Proposer\\\");\\n }\\n\\n function getGasSpent(\\n bytes32, // _preStateRoot,\\n address // _who\\n )\\n override\\n public\\n pure \\n returns (\\n uint256\\n )\\n {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0x7742f2892255ca236320217d067f846bbd8f17d1561fae97f492de390598c667\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b5060405161043e38038061043e8339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b03199092169190911790556103d9806100656000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063abfbbe1311610066578063abfbbe1314610207578063bc2f8dd814610239578063c5b6aa2f14610239578063d0e30db014610239578063dc6453dc146102415761009e565b806302ad4d2a146100a35780631e16e92f146100dd5780631e83409a14610117578063299ca4781461013d578063461a447814610161575b600080fd5b6100c9600480360360208110156100b957600080fd5b50356001600160a01b031661027f565b604080519115158252519081900360200190f35b610115600480360360808110156100f357600080fd5b508035906020810135906001600160a01b0360408201351690606001356102c9565b005b6101156004803603602081101561012d57600080fd5b50356001600160a01b03166102cf565b6101456102d2565b604080516001600160a01b039092168252519081900360200190f35b6101456004803603602081101561017757600080fd5b81019060208101813564010000000081111561019257600080fd5b8201836020820111156101a457600080fd5b803590602001918460018302840111640100000000831117156101c657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506102e1945050505050565b6101156004803603606081101561021d57600080fd5b508035906001600160a01b0360208201351690604001356103bd565b6101156103c2565b61026d6004803603604081101561025757600080fd5b50803590602001356001600160a01b03166103c4565b60408051918252519081900360200190f35b60006102ae6040518060400160405280600c81526020016b27ab26afa83937b837b9b2b960a11b8152506102e1565b6001600160a01b0316826001600160a01b0316149050919050565b50505050565b50565b6000546001600160a01b031681565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b83811015610341578181015183820152602001610329565b50505050905090810190601f16801561036e5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561038b57600080fd5b505afa15801561039f573d6000803e3d6000fd5b505050506040513d60208110156103b557600080fd5b505192915050565b505050565b565b60009291505056fea164736f6c6343000706000a",
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063abfbbe1311610066578063abfbbe1314610207578063bc2f8dd814610239578063c5b6aa2f14610239578063d0e30db014610239578063dc6453dc146102415761009e565b806302ad4d2a146100a35780631e16e92f146100dd5780631e83409a14610117578063299ca4781461013d578063461a447814610161575b600080fd5b6100c9600480360360208110156100b957600080fd5b50356001600160a01b031661027f565b604080519115158252519081900360200190f35b610115600480360360808110156100f357600080fd5b508035906020810135906001600160a01b0360408201351690606001356102c9565b005b6101156004803603602081101561012d57600080fd5b50356001600160a01b03166102cf565b6101456102d2565b604080516001600160a01b039092168252519081900360200190f35b6101456004803603602081101561017757600080fd5b81019060208101813564010000000081111561019257600080fd5b8201836020820111156101a457600080fd5b803590602001918460018302840111640100000000831117156101c657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506102e1945050505050565b6101156004803603606081101561021d57600080fd5b508035906001600160a01b0360208201351690604001356103bd565b6101156103c2565b61026d6004803603604081101561025757600080fd5b50803590602001356001600160a01b03166103c4565b60408051918252519081900360200190f35b60006102ae6040518060400160405280600c81526020016b27ab26afa83937b837b9b2b960a11b8152506102e1565b6001600160a01b0316826001600160a01b0316149050919050565b50505050565b50565b6000546001600160a01b031681565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b83811015610341578181015183820152602001610329565b50505050905090810190601f16801561036e5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561038b57600080fd5b505afa15801561039f573d6000803e3d6000fd5b505050506040513d60208110156103b557600080fd5b505192915050565b505050565b565b60009291505056fea164736f6c6343000706000a",
"devdoc": {
"kind": "dev",
"methods": {},
"title": "mockOVM_BondManager",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 12554,
"contract": "contracts/optimistic-ethereum/mockOVM/verification/mockOVM_BondManager.sol:mockOVM_BondManager",
"label": "libAddressManager",
"offset": 0,
"slot": "0",
"type": "t_contract(Lib_AddressManager)12547"
}
],
"types": {
"t_contract(Lib_AddressManager)12547": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
}
}
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -69,7 +69,8 @@
"solidity-coverage": "^0.7.16",
"ts-generator": "0.0.8",
"ts-node": "^9.1.1",
"typechain": "2.0.0"
"typechain": "2.0.0",
"yargs": "^16.2.0"
},
"peerDependencies": {
"ethers": "^5.0.0"
......
const ethers = require('ethers')
const yargs = require('yargs/yargs')
const { hideBin } = require('yargs/helpers')
const argv = yargs(hideBin(process.argv)).argv
;(async () => {
console.log(`Listing known addresses for: ${argv.network}`)
const provider = new ethers.providers.JsonRpcProvider(argv.rpcUrl)
// Get a reference to the address manager and throw if unable to do so.
let Lib_AddressManager
try {
const def__Lib_AddressManager = require(`../deployments/${argv.network}/Lib_AddressManager.json`)
Lib_AddressManager = new ethers.Contract(
def__Lib_AddressManager.address,
def__Lib_AddressManager.abi,
provider
)
} catch (err) {
throw new Error(`unable to get a reference to Lib_AddressManager`)
}
const events = await Lib_AddressManager.queryFilter(
Lib_AddressManager.filters.AddressSet()
)
const addresses = {}
for (const event of events) {
addresses[event.args._name] = event.args._newAddress
}
const table = []
for (const name of Object.keys(addresses)) {
if (addresses[name] !== ethers.constants.AddressZero) {
table.push({
name: name,
address: addresses[name]
})
}
}
console.table(table)
})()
// Helper script for checking if the local / remote bytecode/addresses matches for a deployment
const ethers = require('ethers')
const dirtree = require('directory-tree')
const yargs = require('yargs/yargs')
const { hideBin } = require('yargs/helpers')
const argv = yargs(hideBin(process.argv)).argv
const nicknames = {
'mockOVM_BondManager': 'OVM_BondManager'
}
;(async () => {
console.log(`Checking deployment for network: ${argv.network}`)
const provider = new ethers.providers.JsonRpcProvider(argv.rpcUrl)
// Get a reference to the address manager and throw if unable to do so.
let Lib_AddressManager
try {
const def__Lib_AddressManager = require(`../deployments/${argv.network}/Lib_AddressManager.json`)
Lib_AddressManager = new ethers.Contract(
def__Lib_AddressManager.address,
def__Lib_AddressManager.abi,
provider
)
} catch (err) {
throw new Error(`unable to get a reference to Lib_AddressManager`)
}
const contracts = dirtree(`./deployments/${argv.network}`).children.filter((child) => {
return child.extension === '.json'
}).map((child) => {
return child.name.replace('.json', '')
})
for (const contract of contracts) {
const deployment = require(`../deployments/${argv.network}/${contract}.json`)
if (contract !== 'Lib_AddressManager') {
const address = await Lib_AddressManager.getAddress(nicknames[contract] || contract)
if (address !== deployment.address) {
console.log(`✖ ${contract} (ADDRESS MISMATCH DETECTED)`)
continue
}
}
// First do some basic checks on the local bytecode and remote bytecode.
const local = deployment.deployedBytecode
const remote = await provider.getCode(deployment.address)
if (ethers.utils.keccak256(local) !== ethers.utils.keccak256(remote)) {
console.log(`✖ ${contract} (CODE MISMATCH DETECTED)`)
continue
}
console.log(`✓ ${contract}`)
}
})()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment