{
  "address": "0x28157e8a8E6d22A367c63Ad61dD56d9E6bDCE905",
  "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": "",
          "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": "0xbe02f28d8c1f2bbdb313fa33aeccf01d34bf65bdd69e77615c2f0562ba0a857f",
  "receipt": {
    "to": null,
    "from": "0xd033f09cB85621F98F7A84C64dB381ac16Eff818",
    "contractAddress": "0x28157e8a8E6d22A367c63Ad61dD56d9E6bDCE905",
    "transactionIndex": 189,
    "gasUsed": "971002",
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "blockHash": "0x62b05e0c36dd4480a01d855db04dbdf3521a9edeb48955250e88751fc67b4a4b",
    "transactionHash": "0xbe02f28d8c1f2bbdb313fa33aeccf01d34bf65bdd69e77615c2f0562ba0a857f",
    "logs": [],
    "blockNumber": 12410762,
    "cumulativeGasUsed": "11273913",
    "status": 1,
    "byzantium": true
  },
  "args": [
    "0x668E5b997b9aE88a56cd40409119d4Db9e6d752E",
    "OVM_CanonicalTransactionChain"
  ],
  "solcInputHash": "f2bdab652d5102f5f11e78dae866798d",
  "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\":\"\",\"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.\"}},\"resolve(string)\":{\"params\":{\"_name\":\"Name to resolve an address for.\"},\"returns\":{\"_0\":\"Address associated with the given name.\"}},\"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).\"},\"resolve(string)\":{\"notice\":\"Resolves the address associated with a given name.\"},\"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\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n    address private _owner;\\n\\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n    /**\\n     * @dev Initializes the contract setting the deployer as the initial owner.\\n     */\\n    constructor () internal {\\n        address msgSender = _msgSender();\\n        _owner = msgSender;\\n        emit OwnershipTransferred(address(0), msgSender);\\n    }\\n\\n    /**\\n     * @dev Returns the address of the current owner.\\n     */\\n    function owner() public view virtual returns (address) {\\n        return _owner;\\n    }\\n\\n    /**\\n     * @dev Throws if called by any account other than the owner.\\n     */\\n    modifier onlyOwner() {\\n        require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n        _;\\n    }\\n\\n    /**\\n     * @dev Leaves the contract without owner. It will not be possible to call\\n     * `onlyOwner` functions anymore. Can only be called by the current owner.\\n     *\\n     * NOTE: Renouncing ownership will leave the contract without an owner,\\n     * thereby removing any functionality that is only available to the owner.\\n     */\\n    function renounceOwnership() public virtual onlyOwner {\\n        emit OwnershipTransferred(_owner, address(0));\\n        _owner = address(0);\\n    }\\n\\n    /**\\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n     * Can only be called by the current owner.\\n     */\\n    function transferOwnership(address newOwner) public virtual onlyOwner {\\n        require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n        emit OwnershipTransferred(_owner, newOwner);\\n        _owner = newOwner;\\n    }\\n}\\n\",\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n    function _msgSender() internal view virtual returns (address payable) {\\n        return msg.sender;\\n    }\\n\\n    function _msgData() internal view virtual returns (bytes memory) {\\n        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n        return msg.data;\\n    }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"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\":\"0x93325c961516aa2a22bf1aacf4029353d5e3b693e04b485753170337b50224e6\",\"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/* External Imports */\\nimport { Ownable } from \\\"@openzeppelin/contracts/access/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    /*************\\n     * Variables *\\n     *************/\\n\\n    mapping (bytes32 => address) private addresses;\\n\\n\\n    /********************\\n     * Public Functions *\\n     ********************/\\n\\n    /**\\n     * Changes the address associated with a particular name.\\n     * @param _name String name to associate an address with.\\n     * @param _address Address to associate with the name.\\n     */\\n    function setAddress(\\n        string memory _name,\\n        address _address\\n    )\\n        external\\n        onlyOwner\\n    {\\n        addresses[_getNameHash(_name)] = _address;\\n\\n        emit AddressSet(\\n            _name,\\n            _address\\n        );\\n    }\\n\\n    /**\\n     * Retrieves the address associated with a given name.\\n     * @param _name Name to retrieve an address for.\\n     * @return Address associated with the given name.\\n     */\\n    function getAddress(\\n        string memory _name\\n    )\\n        external\\n        view\\n        returns (\\n            address\\n        )\\n    {\\n        return addresses[_getNameHash(_name)];\\n    }\\n\\n\\n    /**********************\\n     * Internal Functions *\\n     **********************/\\n\\n    /**\\n     * Computes the hash of a name.\\n     * @param _name Name to compute a hash for.\\n     * @return Hash of the given name.\\n     */\\n    function _getNameHash(\\n        string memory _name\\n    )\\n        internal\\n        pure\\n        returns (\\n            bytes32\\n        )\\n    {\\n        return keccak256(abi.encodePacked(_name));\\n    }\\n}\\n\",\"keccak256\":\"0xcc9fc5c64f1101a5c6c397594086b1608189a9edc5c9635e1ac38f70aeeeecbf\",\"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     * Variables *\\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    /**\\n     * Resolves the address associated with a given name.\\n     * @param _name Name to resolve an address for.\\n     * @return Address associated with the given name.\\n     */\\n    function resolve(\\n        string memory _name\\n    )\\n        public\\n        view\\n        returns (\\n            address\\n        )\\n    {\\n        return libAddressManager.getAddress(_name);\\n    }\\n}\\n\",\"keccak256\":\"0x65981feeabff6a81783ea97d44baf988a18a86c8cb374c46fdb71819cbacc7c0\",\"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\":\"0xe30fc56d4499f98582e1f800dfa3b343f171163a557266c31a56449d5fd3ffae\",\"license\":\"MIT\"}},\"version\":1}",
  "bytecode": "[encoded data, 8988 characters]",
  "deployedBytecode": "[encoded data, 8010 characters]",
  "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."
        }
      },
      "resolve(string)": {
        "params": {
          "_name": "Name to resolve an address for."
        },
        "returns": {
          "_0": "Address associated with the given name."
        }
      },
      "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)."
      },
      "resolve(string)": {
        "notice": "Resolves the address associated with a given name."
      },
      "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": 12856,
        "contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
        "label": "libAddressManager",
        "offset": 0,
        "slot": "0",
        "type": "t_contract(Lib_AddressManager)12849"
      },
      {
        "astId": 4510,
        "contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
        "label": "owner",
        "offset": 0,
        "slot": "1",
        "type": "t_string_storage"
      },
      {
        "astId": 4512,
        "contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
        "label": "buffer",
        "offset": 0,
        "slot": "2",
        "type": "t_struct(RingBuffer)18001_storage"
      }
    ],
    "types": {
      "t_bytes32": {
        "encoding": "inplace",
        "label": "bytes32",
        "numberOfBytes": "32"
      },
      "t_contract(Lib_AddressManager)12849": {
        "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)17990_storage": {
        "encoding": "inplace",
        "label": "struct Lib_RingBuffer.Buffer",
        "members": [
          {
            "astId": 17985,
            "contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
            "label": "length",
            "offset": 0,
            "slot": "0",
            "type": "t_uint256"
          },
          {
            "astId": 17989,
            "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)18001_storage": {
        "encoding": "inplace",
        "label": "struct Lib_RingBuffer.RingBuffer",
        "members": [
          {
            "astId": 17992,
            "contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
            "label": "contextA",
            "offset": 0,
            "slot": "0",
            "type": "t_bytes32"
          },
          {
            "astId": 17994,
            "contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
            "label": "contextB",
            "offset": 0,
            "slot": "1",
            "type": "t_bytes32"
          },
          {
            "astId": 17996,
            "contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
            "label": "bufferA",
            "offset": 0,
            "slot": "2",
            "type": "t_struct(Buffer)17990_storage"
          },
          {
            "astId": 17998,
            "contract": "contracts/optimistic-ethereum/OVM/chain/OVM_ChainStorageContainer.sol:OVM_ChainStorageContainer",
            "label": "bufferB",
            "offset": 0,
            "slot": "4",
            "type": "t_struct(Buffer)17990_storage"
          },
          {
            "astId": 18000,
            "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"
      }
    }
  }
}