{
  "address": "0x88EC574e2ef0EcF9043373139099f7E535F94dBC",
  "abi": [
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_libAddressManager",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "_l1messenger",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "_fraudProofWindow",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "_sequencerPublishWindow",
          "type": "uint256"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "constructor"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "uint256",
          "name": "_startBlockNumber",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "_length",
          "type": "uint256"
        },
        {
          "indexed": true,
          "internalType": "uint256",
          "name": "_batchTime",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "address[]",
          "name": "_tssMembers",
          "type": "address[]"
        }
      ],
      "name": "DistributeTssReward",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "uint256",
          "name": "_startBlockNumber",
          "type": "uint256"
        }
      ],
      "name": "RollBackL2Chain",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "uint256",
          "name": "_batchIndex",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "bytes32",
          "name": "_batchRoot",
          "type": "bytes32"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "_batchSize",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "_prevTotalElements",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "bytes",
          "name": "_signature",
          "type": "bytes"
        },
        {
          "indexed": false,
          "internalType": "bytes",
          "name": "_extraData",
          "type": "bytes"
        }
      ],
      "name": "StateBatchAppended",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "uint256",
          "name": "_batchIndex",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "bytes32",
          "name": "_batchRoot",
          "type": "bytes32"
        }
      ],
      "name": "StateBatchDeleted",
      "type": "event"
    },
    {
      "inputs": [],
      "name": "FRAUD_PROOF_WINDOW",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "SEQUENCER_PUBLISH_WINDOW",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bytes32[]",
          "name": "_batch",
          "type": "bytes32[]"
        },
        {
          "internalType": "uint256",
          "name": "_shouldStartAtElement",
          "type": "uint256"
        },
        {
          "internalType": "bytes",
          "name": "_signature",
          "type": "bytes"
        }
      ],
      "name": "appendStateBatch",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "batches",
      "outputs": [
        {
          "internalType": "contract IChainStorageContainer",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "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": "signature",
              "type": "bytes"
            },
            {
              "internalType": "bytes",
              "name": "extraData",
              "type": "bytes"
            }
          ],
          "internalType": "struct Lib_BVMCodec.ChainBatchHeader",
          "name": "_batchHeader",
          "type": "tuple"
        }
      ],
      "name": "deleteStateBatch",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "getLastSequencerTimestamp",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "_lastSequencerTimestamp",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "getTotalBatches",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "_totalBatches",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "getTotalElements",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "_totalElements",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "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": "signature",
              "type": "bytes"
            },
            {
              "internalType": "bytes",
              "name": "extraData",
              "type": "bytes"
            }
          ],
          "internalType": "struct Lib_BVMCodec.ChainBatchHeader",
          "name": "_batchHeader",
          "type": "tuple"
        }
      ],
      "name": "insideFraudProofWindow",
      "outputs": [
        {
          "internalType": "bool",
          "name": "_inside",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "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": [
        {
          "internalType": "string",
          "name": "_name",
          "type": "string"
        }
      ],
      "name": "resolve",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "_shouldRollBack",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "_shouldStartAtElement",
          "type": "uint256"
        },
        {
          "internalType": "bytes",
          "name": "_signature",
          "type": "bytes"
        }
      ],
      "name": "rollBackL2Chain",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bytes32",
          "name": "_element",
          "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": "signature",
              "type": "bytes"
            },
            {
              "internalType": "bytes",
              "name": "extraData",
              "type": "bytes"
            }
          ],
          "internalType": "struct Lib_BVMCodec.ChainBatchHeader",
          "name": "_batchHeader",
          "type": "tuple"
        },
        {
          "components": [
            {
              "internalType": "uint256",
              "name": "index",
              "type": "uint256"
            },
            {
              "internalType": "bytes32[]",
              "name": "siblings",
              "type": "bytes32[]"
            }
          ],
          "internalType": "struct Lib_BVMCodec.ChainInclusionProof",
          "name": "_proof",
          "type": "tuple"
        }
      ],
      "name": "verifyStateCommitment",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    }
  ],
  "transactionHash": "0x144f13d8c5b78de1d9235c4e2988542e6f379d64805783cc7d26afc92191cd47",
  "receipt": {
    "to": null,
    "from": "0x9ADebE4EB5307f05848C8226Cc86d3d2af2e892f",
    "contractAddress": "0xa60cc3D6F7865C490FA52a184EFc7705d42a1D3e",
    "transactionIndex": 109,
    "gasUsed": "2474458",
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "blockHash": "0xe4c5fb2694705d76d9d619b0c6d7d78227ec9f21720da7bcf094fc743e3c0f5d",
    "transactionHash": "0x144f13d8c5b78de1d9235c4e2988542e6f379d64805783cc7d26afc92191cd47",
    "logs": [],
    "blockNumber": 8185250,
    "cumulativeGasUsed": "21775118",
    "status": 1,
    "byzantium": true
  },
  "args": [
    "0xe0F937a54074f0F8710f14112C6274a8DAEF97b5",
    "0x93afF64C6756b771498A5b159ecEc6f9448A1c20",
    0,
    12592000
  ],
  "numDeployments": 1,
  "solcInputHash": "63b4f6f6f352226027f19b7b750e3c10",
  "metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l1messenger\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_fraudProofWindow\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerPublishWindow\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_startBlockNumber\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_length\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_batchTime\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"_tssMembers\",\"type\":\"address[]\"}],\"name\":\"DistributeTssReward\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_startBlockNumber\",\"type\":\"uint256\"}],\"name\":\"RollBackL2Chain\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_batchIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_batchRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_batchSize\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_prevTotalElements\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_signature\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"StateBatchAppended\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_batchIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_batchRoot\",\"type\":\"bytes32\"}],\"name\":\"StateBatchDeleted\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"FRAUD_PROOF_WINDOW\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SEQUENCER_PUBLISH_WINDOW\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_batch\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"_shouldStartAtElement\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_signature\",\"type\":\"bytes\"}],\"name\":\"appendStateBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"batches\",\"outputs\":[{\"internalType\":\"contract IChainStorageContainer\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"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\":\"signature\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Lib_BVMCodec.ChainBatchHeader\",\"name\":\"_batchHeader\",\"type\":\"tuple\"}],\"name\":\"deleteStateBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLastSequencerTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_lastSequencerTimestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalBatches\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_totalBatches\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalElements\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_totalElements\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"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\":\"signature\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Lib_BVMCodec.ChainBatchHeader\",\"name\":\"_batchHeader\",\"type\":\"tuple\"}],\"name\":\"insideFraudProofWindow\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_inside\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"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\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_shouldRollBack\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_shouldStartAtElement\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_signature\",\"type\":\"bytes\"}],\"name\":\"rollBackL2Chain\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_element\",\"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\":\"signature\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Lib_BVMCodec.ChainBatchHeader\",\"name\":\"_batchHeader\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[]\",\"name\":\"siblings\",\"type\":\"bytes32[]\"}],\"internalType\":\"struct Lib_BVMCodec.ChainInclusionProof\",\"name\":\"_proof\",\"type\":\"tuple\"}],\"name\":\"verifyStateCommitment\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"The State Commitment Chain (SCC) contract contains a list of proposed state roots which Proposers assert to be a result of each transaction in the Canonical Transaction Chain (CTC). Elements here have a 1:1 correspondence with transactions in the CTC, and should be the unique state root calculated off-chain by applying the canonical transactions one by one.\",\"kind\":\"dev\",\"methods\":{\"appendStateBatch(bytes32[],uint256,bytes)\":{\"params\":{\"_batch\":\"Batch of state roots.\",\"_shouldStartAtElement\":\"Index of the element at which this batch should start.\"}},\"batches()\":{\"returns\":{\"_0\":\"Reference to the batch storage container.\"}},\"constructor\":{\"params\":{\"_libAddressManager\":\"Address of the Address Manager.\"}},\"deleteStateBatch((uint256,bytes32,uint256,uint256,bytes,bytes))\":{\"params\":{\"_batchHeader\":\"Header of the batch to start deleting from.\"}},\"getLastSequencerTimestamp()\":{\"returns\":{\"_lastSequencerTimestamp\":\"Last sequencer batch timestamp.\"}},\"getTotalBatches()\":{\"returns\":{\"_totalBatches\":\"Total submitted batches.\"}},\"getTotalElements()\":{\"returns\":{\"_totalElements\":\"Total submitted elements.\"}},\"insideFraudProofWindow((uint256,bytes32,uint256,uint256,bytes,bytes))\":{\"params\":{\"_batchHeader\":\"Header of the batch to check.\"},\"returns\":{\"_inside\":\"Whether or not the batch is inside the fraud proof window.\"}},\"resolve(string)\":{\"params\":{\"_name\":\"Name to resolve an address for.\"},\"returns\":{\"_0\":\"Address associated with the given name.\"}},\"rollBackL2Chain(uint256,uint256,bytes)\":{\"params\":{\"_shouldRollBack\":\"roll back to should start .\",\"_shouldStartAtElement\":\"Index of the element at which this batch should start\",\"_signature\":\"signature of rollback message\"}},\"verifyStateCommitment(bytes32,(uint256,bytes32,uint256,uint256,bytes,bytes),(uint256,bytes32[]))\":{\"params\":{\"_batchHeader\":\"Header of the batch in which the element was included.\",\"_element\":\"Hash of the element to verify a proof for.\",\"_proof\":\"Merkle inclusion proof for the element.\"}}},\"title\":\"StateCommitmentChain\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"appendStateBatch(bytes32[],uint256,bytes)\":{\"notice\":\"Appends a batch of state roots to the chain.\"},\"batches()\":{\"notice\":\"Accesses the batch storage container.\"},\"deleteStateBatch((uint256,bytes32,uint256,uint256,bytes,bytes))\":{\"notice\":\"Deletes all state roots after (and including) a given batch.\"},\"getLastSequencerTimestamp()\":{\"notice\":\"Retrieves the timestamp of the last batch submitted by the sequencer.\"},\"getTotalBatches()\":{\"notice\":\"Retrieves the total number of batches submitted.\"},\"getTotalElements()\":{\"notice\":\"Retrieves the total number of elements submitted.\"},\"insideFraudProofWindow((uint256,bytes32,uint256,uint256,bytes,bytes))\":{\"notice\":\"Checks whether a given batch is still inside its fraud proof window.\"},\"resolve(string)\":{\"notice\":\"Resolves the address associated with a given name.\"},\"rollBackL2Chain(uint256,uint256,bytes)\":{\"notice\":\"Emit event to notify sequencers to roll back.\"},\"verifyStateCommitment(bytes32,(uint256,bytes32,uint256,uint256,bytes,bytes),(uint256,bytes32[]))\":{\"notice\":\"Verifies a batch inclusion proof.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/L1/rollup/StateCommitmentChain.sol\":\"StateCommitmentChain\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\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() {\\n        _setOwner(_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        _setOwner(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        _setOwner(newOwner);\\n    }\\n\\n    function _setOwner(address newOwner) private {\\n        address oldOwner = _owner;\\n        _owner = newOwner;\\n        emit OwnershipTransferred(oldOwner, newOwner);\\n    }\\n}\\n\",\"keccak256\":\"0x6bb804a310218875e89d12c053e94a13a4607cdf7cc2052f3e52bd32a0dc50a1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^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 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) {\\n        return msg.sender;\\n    }\\n\\n    function _msgData() internal view virtual returns (bytes calldata) {\\n        return msg.data;\\n    }\\n}\\n\",\"keccak256\":\"0x90565a39ae45c80f0468dc96c7b20d0afc3055f344c8203a0c9258239f350b9f\",\"license\":\"MIT\"},\"contracts/L1/rollup/ICanonicalTransactionChain.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.9.0;\\n\\n/* Library Imports */\\nimport { Lib_BVMCodec } from \\\"../../libraries/codec/Lib_BVMCodec.sol\\\";\\n\\n/* Interface Imports */\\nimport { IChainStorageContainer } from \\\"./IChainStorageContainer.sol\\\";\\n\\n/**\\n * @title ICanonicalTransactionChain\\n */\\ninterface ICanonicalTransactionChain {\\n    /**********\\n     * Events *\\n     **********/\\n\\n    event L2GasParamsUpdated(\\n        uint256 l2GasDiscountDivisor,\\n        uint256 enqueueGasCost,\\n        uint256 enqueueL2GasPrepaid\\n    );\\n\\n    event TransactionEnqueued(\\n        address indexed _l1TxOrigin,\\n        address indexed _target,\\n        uint256 _gasLimit,\\n        bytes _data,\\n        uint256 indexed _queueIndex,\\n        uint256 _timestamp\\n    );\\n\\n    event QueueBatchAppended(\\n        uint256 _startingQueueIndex,\\n        uint256 _numQueueElements,\\n        uint256 _totalElements\\n    );\\n\\n    event SequencerBatchAppended(\\n        uint256 _startingQueueIndex,\\n        uint256 _numQueueElements,\\n        uint256 _totalElements\\n    );\\n\\n    event TransactionBatchAppended(\\n        uint256 indexed _batchIndex,\\n        bytes32 _batchRoot,\\n        uint256 _batchSize,\\n        uint256 _prevTotalElements,\\n        bytes _signature,\\n        bytes _extraData\\n    );\\n\\n    /***********\\n     * Structs *\\n     ***********/\\n\\n    struct BatchContext {\\n        uint256 numSequencedTransactions;\\n        uint256 numSubsequentQueueTransactions;\\n        uint256 timestamp;\\n        uint256 blockNumber;\\n    }\\n\\n    /*******************************\\n     * Authorized Setter Functions *\\n     *******************************/\\n\\n    /**\\n     * Allows the Burn Admin to update the parameters which determine the amount of gas to burn.\\n     * The value of enqueueL2GasPrepaid is immediately updated as well.\\n     */\\n    function setGasParams(uint256 _l2GasDiscountDivisor, uint256 _enqueueGasCost) external;\\n\\n    /********************\\n     * Public Functions *\\n     ********************/\\n\\n    /**\\n     * Accesses the batch storage container.\\n     * @return Reference to the batch storage container.\\n     */\\n    function batches() external view returns (IChainStorageContainer);\\n\\n    /**\\n     * Retrieves the total number of elements submitted.\\n     * @return _totalElements Total submitted elements.\\n     */\\n    function getTotalElements() external view returns (uint256 _totalElements);\\n\\n    /**\\n     * Retrieves the total number of batches submitted.\\n     * @return _totalBatches Total submitted batches.\\n     */\\n    function getTotalBatches() external view returns (uint256 _totalBatches);\\n\\n    /**\\n     * Returns the index of the next element to be enqueued.\\n     * @return Index for the next queue element.\\n     */\\n    function getNextQueueIndex() external view returns (uint40);\\n\\n    /**\\n     * Gets the queue element at a particular index.\\n     * @param _index Index of the queue element to access.\\n     * @return _element Queue element at the given index.\\n     */\\n    function getQueueElement(uint256 _index)\\n        external\\n        view\\n        returns (Lib_BVMCodec.QueueElement memory _element);\\n\\n    /**\\n     * Returns the timestamp of the last transaction.\\n     * @return Timestamp for the last transaction.\\n     */\\n    function getLastTimestamp() external view returns (uint40);\\n\\n    /**\\n     * Returns the blocknumber of the last transaction.\\n     * @return Blocknumber for the last transaction.\\n     */\\n    function getLastBlockNumber() external view returns (uint40);\\n\\n    /**\\n     * Get the number of queue elements which have not yet been included.\\n     * @return Number of pending queue elements.\\n     */\\n    function getNumPendingQueueElements() external view returns (uint40);\\n\\n    /**\\n     * Retrieves the length of the queue, including\\n     * both pending and canonical transactions.\\n     * @return Length of the queue.\\n     */\\n    function getQueueLength() external view returns (uint40);\\n\\n    /**\\n     * Adds a transaction to the queue.\\n     * @param _target Target contract to send the transaction to.\\n     * @param _gasLimit Gas limit for the given transaction.\\n     * @param _data Transaction data.\\n     */\\n    function enqueue(\\n        address _target,\\n        uint256 _gasLimit,\\n        bytes memory _data\\n    ) external;\\n\\n    /**\\n     * Allows the sequencer to append a batch of transactions.\\n     * @dev This function uses a custom encoding scheme for efficiency reasons.\\n     * .param _shouldStartAtElement Specific batch we expect to start appending to.\\n     * .param _totalElementsToAppend Total number of batch elements we expect to append.\\n     * .param _contexts Array of batch contexts.\\n     * .param _transactionDataFields Array of raw transaction data.\\n     */\\n    function appendSequencerBatch(\\n        // uint40 _shouldStartAtElement,\\n        // uint24 _totalElementsToAppend,\\n        // BatchContext[] _contexts,\\n        // bytes[] _transactionDataFields\\n    ) external;\\n}\\n\",\"keccak256\":\"0x9cb34342a2a6fd725dd45965d93c576c147bcc004e502cf5ae01952c0a2a28f7\",\"license\":\"MIT\"},\"contracts/L1/rollup/IChainStorageContainer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.9.0;\\n\\n/**\\n * @title IChainStorageContainer\\n */\\ninterface IChainStorageContainer {\\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(bytes27 _globalMetadata) external;\\n\\n    /**\\n     * Retrieves the container's global metadata field.\\n     * @return Container global metadata field.\\n     */\\n    function getGlobalMetadata() external view returns (bytes27);\\n\\n    /**\\n     * Retrieves the number of objects stored in the container.\\n     * @return Number of objects in the container.\\n     */\\n    function length() external view returns (uint256);\\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(bytes32 _object) 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(bytes32 _object, bytes27 _globalMetadata) 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(uint256 _index) external view returns (bytes32);\\n\\n    /**\\n     * Removes all objects after and including a given index.\\n     * @param _index Object index to delete from.\\n     */\\n    function deleteElementsAfterInclusive(uint256 _index) 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(uint256 _index, bytes27 _globalMetadata) external;\\n}\\n\",\"keccak256\":\"0xe55ad72572ec47dc09a02228d0c5a438571c76a41d16d92b35add057811977ce\",\"license\":\"MIT\"},\"contracts/L1/rollup/IStateCommitmentChain.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.9.0;\\n\\n/* Library Imports */\\nimport { Lib_BVMCodec } from \\\"../../libraries/codec/Lib_BVMCodec.sol\\\";\\n\\n/**\\n * @title IStateCommitmentChain\\n */\\ninterface IStateCommitmentChain {\\n    /**********\\n     * Events *\\n     **********/\\n\\n    event StateBatchAppended(\\n        uint256 indexed _batchIndex,\\n        bytes32 _batchRoot,\\n        uint256 _batchSize,\\n        uint256 _prevTotalElements,\\n        bytes _signature,\\n        bytes _extraData\\n    );\\n\\n    event StateBatchDeleted(uint256 indexed _batchIndex, bytes32 _batchRoot);\\n\\n    event DistributeTssReward(\\n        uint256 indexed _startBlockNumber,\\n        uint256 _length,\\n        uint256 indexed _batchTime,\\n        address[] _tssMembers\\n    );\\n\\n    event RollBackL2Chain(uint256 indexed _startBlockNumber);\\n\\n    /********************\\n     * Public Functions *\\n     ********************/\\n\\n    /**\\n     * Retrieves the total number of elements submitted.\\n     * @return _totalElements Total submitted elements.\\n     */\\n    function getTotalElements() external view returns (uint256 _totalElements);\\n\\n    /**\\n     * Retrieves the total number of batches submitted.\\n     * @return _totalBatches Total submitted batches.\\n     */\\n    function getTotalBatches() external view returns (uint256 _totalBatches);\\n\\n    /**\\n     * Retrieves the timestamp of the last batch submitted by the sequencer.\\n     * @return _lastSequencerTimestamp Last sequencer batch timestamp.\\n     */\\n    function getLastSequencerTimestamp() external view returns (uint256 _lastSequencerTimestamp);\\n\\n    /**\\n     * Appends a batch of state roots to the chain.\\n     * @param _batch Batch of state roots.\\n     * @param _shouldStartAtElement Index of the element at which this batch should start.\\n     */\\n    function appendStateBatch(bytes32[] calldata _batch, uint256 _shouldStartAtElement, bytes memory _signature) external;\\n\\n    /**\\n     * Deletes all state roots after (and including) a given batch.\\n     * @param _batchHeader Header of the batch to start deleting from.\\n     */\\n    function deleteStateBatch(Lib_BVMCodec.ChainBatchHeader memory _batchHeader) external;\\n\\n    /**\\n     * Verifies a batch inclusion proof.\\n     * @param _element Hash of the element to verify a proof for.\\n     * @param _batchHeader Header of the batch in which the element was included.\\n     * @param _proof Merkle inclusion proof for the element.\\n     */\\n    function verifyStateCommitment(\\n        bytes32 _element,\\n        Lib_BVMCodec.ChainBatchHeader memory _batchHeader,\\n        Lib_BVMCodec.ChainInclusionProof memory _proof\\n    ) external view returns (bool _verified);\\n\\n    /**\\n     * Checks whether a given batch is still inside its fraud proof window.\\n     * @param _batchHeader Header of the batch to check.\\n     * @return _inside Whether or not the batch is inside the fraud proof window.\\n     */\\n    function insideFraudProofWindow(Lib_BVMCodec.ChainBatchHeader memory _batchHeader)\\n    external\\n    view\\n    returns (bool _inside);\\n\\n    /**\\n     * Emit event to notify sequencers to roll back.\\n     * @param _shouldRollBack roll back to should start .\\n     * @param _shouldStartAtElement Index of the element at which this batch should start\\n     * @param _signature signature of rollback message\\n     */\\n    function rollBackL2Chain(uint256 _shouldRollBack,uint256 _shouldStartAtElement, bytes memory _signature) external;\\n\\n}\\n\",\"keccak256\":\"0x1beda3ab92ff167c6426d5f63a2f710678a67894f8021356217f1fa56438ee76\",\"license\":\"MIT\"},\"contracts/L1/rollup/StateCommitmentChain.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.9;\\n\\n/* Library Imports */\\nimport {Lib_BVMCodec} from \\\"../../libraries/codec/Lib_BVMCodec.sol\\\";\\nimport {Lib_AddressResolver} from \\\"../../libraries/resolver/Lib_AddressResolver.sol\\\";\\nimport {Lib_MerkleTree} from \\\"../../libraries/utils/Lib_MerkleTree.sol\\\";\\nimport {CrossDomainEnabled} from \\\"../../libraries/bridge/CrossDomainEnabled.sol\\\";\\n\\n/* Interface Imports */\\nimport {IStateCommitmentChain} from \\\"./IStateCommitmentChain.sol\\\";\\nimport {ICanonicalTransactionChain} from \\\"./ICanonicalTransactionChain.sol\\\";\\nimport {IBondManager} from \\\"../verification/IBondManager.sol\\\";\\nimport {IChainStorageContainer} from \\\"./IChainStorageContainer.sol\\\";\\nimport {ITssGroupManager} from \\\"../tss/ITssGroupManager.sol\\\";\\nimport {ITssRewardContract} from \\\"../../L2/predeploys/iTssRewardContract.sol\\\";\\n\\n/**\\n * @title StateCommitmentChain\\n * @dev The State Commitment Chain (SCC) contract contains a list of proposed state roots which\\n * Proposers assert to be a result of each transaction in the Canonical Transaction Chain (CTC).\\n * Elements here have a 1:1 correspondence with transactions in the CTC, and should be the unique\\n * state root calculated off-chain by applying the canonical transactions one by one.\\n *\\n */\\ncontract StateCommitmentChain is IStateCommitmentChain, Lib_AddressResolver, CrossDomainEnabled {\\n    /*************\\n     * Constants *\\n     *************/\\n\\n    uint256 public FRAUD_PROOF_WINDOW;\\n    uint256 public SEQUENCER_PUBLISH_WINDOW;\\n\\n    /***************\\n     * Constructor *\\n     ***************/\\n\\n    /**\\n     * @param _libAddressManager Address of the Address Manager.\\n     */\\n    constructor(\\n        address _libAddressManager,\\n        address _l1messenger,\\n        uint256 _fraudProofWindow,\\n        uint256 _sequencerPublishWindow\\n    ) Lib_AddressResolver(_libAddressManager) CrossDomainEnabled(address(0)) {\\n        messenger = _l1messenger;\\n        FRAUD_PROOF_WINDOW = _fraudProofWindow;\\n        SEQUENCER_PUBLISH_WINDOW = _sequencerPublishWindow;\\n    }\\n\\n    /********************\\n     * Public Functions *\\n     ********************/\\n\\n    /**\\n     * Accesses the batch storage container.\\n     * @return Reference to the batch storage container.\\n     */\\n    function batches() public view returns (IChainStorageContainer) {\\n        return IChainStorageContainer(resolve(\\\"ChainStorageContainer-SCC-batches\\\"));\\n    }\\n\\n    /**\\n     * @inheritdoc IStateCommitmentChain\\n     */\\n    function getTotalElements() public view returns (uint256 _totalElements) {\\n        (uint40 totalElements,) = _getBatchExtraData();\\n        return uint256(totalElements);\\n    }\\n\\n    /**\\n     * @inheritdoc IStateCommitmentChain\\n     */\\n    function getTotalBatches() public view returns (uint256 _totalBatches) {\\n        return batches().length();\\n    }\\n\\n    /**\\n     * @inheritdoc IStateCommitmentChain\\n     */\\n    // slither-disable-next-line external-function\\n    function getLastSequencerTimestamp() public view returns (uint256 _lastSequencerTimestamp) {\\n        (, uint40 lastSequencerTimestamp) = _getBatchExtraData();\\n        return uint256(lastSequencerTimestamp);\\n    }\\n\\n    /**\\n     * @inheritdoc IStateCommitmentChain\\n     */\\n    // slither-disable-next-line external-function\\n    function appendStateBatch(bytes32[] memory _batch, uint256 _shouldStartAtElement, bytes memory _signature) public {\\n        // Fail fast in to make sure our batch roots aren't accidentally made fraudulent by the\\n        // publication of batches by some other user.\\n        require(\\n            _shouldStartAtElement == getTotalElements(),\\n            \\\"Actual batch start index does not match expected start index.\\\"\\n        );\\n\\n        // Proposers must have previously staked at the BondManager\\n        require(\\n            IBondManager(resolve(\\\"BondManager\\\")).isCollateralized(msg.sender),\\n            \\\"Proposer does not have enough collateral posted\\\"\\n        );\\n\\n        require(_batch.length > 0, \\\"Cannot submit an empty state batch.\\\");\\n\\n        require(\\n            getTotalElements() + _batch.length <=\\n            ICanonicalTransactionChain(resolve(\\\"CanonicalTransactionChain\\\")).getTotalElements(),\\n            \\\"Number of state roots cannot exceed the number of canonical transactions.\\\"\\n        );\\n\\n        // Call tss group register contract to verify the signature\\n        _checkClusterSignature(_batch, _shouldStartAtElement, _signature);\\n\\n        // Pass the block's timestamp and the publisher of the data\\n        // to be used in the fraud proofs\\n        _appendBatch(_batch, _signature, abi.encode(block.timestamp, msg.sender));\\n\\n        // Update distributed state batch, and emit message\\n        _distributeTssReward(_batch, _shouldStartAtElement);\\n    }\\n\\n    /**\\n     * @inheritdoc IStateCommitmentChain\\n     */\\n    // slither-disable-next-line external-function\\n    function deleteStateBatch(Lib_BVMCodec.ChainBatchHeader memory _batchHeader) public {\\n        require(\\n            msg.sender == resolve(\\\"BVM_FraudVerifier\\\"),\\n            \\\"State batches can only be deleted by the BVM_FraudVerifier.\\\"\\n        );\\n\\n        require(_isValidBatchHeader(_batchHeader), \\\"Invalid batch header.\\\");\\n\\n        require(\\n            insideFraudProofWindow(_batchHeader),\\n            \\\"State batches can only be deleted within the fraud proof window.\\\"\\n        );\\n\\n        _deleteBatch(_batchHeader);\\n    }\\n\\n    /**\\n     * @inheritdoc IStateCommitmentChain\\n     */\\n    // slither-disable-next-line external-function\\n    function verifyStateCommitment(\\n        bytes32 _element,\\n        Lib_BVMCodec.ChainBatchHeader memory _batchHeader,\\n        Lib_BVMCodec.ChainInclusionProof memory _proof\\n    ) public view returns (bool) {\\n        require(_isValidBatchHeader(_batchHeader), \\\"Invalid batch header.\\\");\\n\\n        require(\\n            Lib_MerkleTree.verify(\\n                _batchHeader.batchRoot,\\n                _element,\\n                _proof.index,\\n                _proof.siblings,\\n                _batchHeader.batchSize\\n            ),\\n            \\\"Invalid inclusion proof.\\\"\\n        );\\n\\n        return true;\\n    }\\n\\n    /**\\n     * @inheritdoc IStateCommitmentChain\\n     */\\n    function insideFraudProofWindow(Lib_BVMCodec.ChainBatchHeader memory _batchHeader)\\n    public\\n    view\\n    returns (bool _inside)\\n    {\\n        (uint256 timestamp,) = abi.decode(_batchHeader.extraData, (uint256, address));\\n\\n        require(timestamp != 0, \\\"Batch header timestamp cannot be zero\\\");\\n        return (timestamp + FRAUD_PROOF_WINDOW) > block.timestamp;\\n    }\\n\\n    /**\\n    * @inheritdoc IStateCommitmentChain\\n     */\\n    // slither-disable-next-line external-function\\n    function rollBackL2Chain(uint256 _shouldRollBack, uint256 _shouldStartAtElement, bytes memory _signature) public {\\n        // Fail fast in to make sure our batch roots aren't accidentally made fraudulent by the\\n        // publication of batches by some other user.\\n        require(\\n            _shouldStartAtElement == getTotalElements(),\\n            \\\"Actual batch start index does not match expected start index.\\\"\\n        );\\n\\n        // Proposers must have previously staked at the BondManager\\n        require(\\n            IBondManager(resolve(\\\"BondManager\\\")).isCollateralized(msg.sender),\\n            \\\"Proposer does not have enough collateral posted\\\"\\n        );\\n\\n        _checkRollBackSignature(_shouldRollBack,_signature);\\n\\n    }\\n\\n    /**********************\\n     * Internal Functions *\\n     **********************/\\n\\n    /**\\n     * Parses the batch context from the extra data.\\n     * @return Total number of elements submitted.\\n     * @return Timestamp of the last batch submitted by the sequencer.\\n     */\\n    function _getBatchExtraData() internal view returns (uint40, uint40) {\\n        bytes27 extraData = batches().getGlobalMetadata();\\n\\n        // solhint-disable max-line-length\\n        uint40 totalElements;\\n        uint40 lastSequencerTimestamp;\\n        assembly {\\n            extraData := shr(40, extraData)\\n            totalElements := and(\\n            extraData,\\n            0x000000000000000000000000000000000000000000000000000000FFFFFFFFFF\\n            )\\n            lastSequencerTimestamp := shr(\\n            40,\\n            and(extraData, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000)\\n            )\\n        }\\n        // solhint-enable max-line-length\\n\\n        return (totalElements, lastSequencerTimestamp);\\n    }\\n\\n    /**\\n     * Encodes the batch context for the extra data.\\n     * @param _totalElements Total number of elements submitted.\\n     * @param _lastSequencerTimestamp Timestamp of the last batch submitted by the sequencer.\\n     * @return Encoded batch context.\\n     */\\n    function _makeBatchExtraData(uint40 _totalElements, uint40 _lastSequencerTimestamp)\\n    internal\\n    pure\\n    returns (bytes27)\\n    {\\n        bytes27 extraData;\\n        assembly {\\n            extraData := _totalElements\\n            extraData := or(extraData, shl(40, _lastSequencerTimestamp))\\n            extraData := shl(40, extraData)\\n        }\\n\\n        return extraData;\\n    }\\n\\n    /**\\n     * Appends a batch to the chain.\\n     * @param _batch Elements within the batch.\\n     * @param _shouldStartAtElement Relative rollup block height.\\n     * @param _signature Signature of batch roots and rollup start height.\\n     */\\n    function _checkClusterSignature(bytes32[] memory _batch, uint256 _shouldStartAtElement, bytes memory _signature)\\n    internal\\n    {\\n        // abi hash encode to bytes\\n        require(\\n            ITssGroupManager(resolve(\\\"Proxy__TSS_GroupManager\\\")).verifySign(\\n                keccak256(abi.encode(_batch, _shouldStartAtElement)), _signature),\\n            \\\"verify signature failed\\\"\\n        );\\n    }\\n\\n    /**\\n     * Appends a batch to the chain.\\n     * @param _batch Elements within the batch.\\n     * @param _extraData Any extra data to append to the batch.\\n     */\\n    function _appendBatch(bytes32[] memory _batch, bytes memory _signature, bytes memory _extraData) internal {\\n        address sequencer = resolve(\\\"BVM_Proposer\\\");\\n        (uint40 totalElements, uint40 lastSequencerTimestamp) = _getBatchExtraData();\\n\\n        if (msg.sender == sequencer) {\\n            lastSequencerTimestamp = uint40(block.timestamp);\\n        } else {\\n            // We keep track of the last batch submitted by the sequencer so there's a window in\\n            // which only the sequencer can publish state roots. A window like this just reduces\\n            // the chance of \\\"system breaking\\\" state roots being published while we're still in\\n            // testing mode. This window should be removed or significantly reduced in the future.\\n            require(\\n                lastSequencerTimestamp + SEQUENCER_PUBLISH_WINDOW < block.timestamp,\\n                \\\"Cannot publish state roots within the sequencer publication window.\\\"\\n            );\\n        }\\n\\n        // For efficiency reasons getMerkleRoot modifies the `_batch` argument in place\\n        // while calculating the root hash therefore any arguments passed to it must not\\n        // be used again afterwards\\n        Lib_BVMCodec.ChainBatchHeader memory batchHeader = Lib_BVMCodec.ChainBatchHeader({\\n        batchIndex : getTotalBatches(),\\n        batchRoot : Lib_MerkleTree.getMerkleRoot(_batch),\\n        batchSize : _batch.length,\\n        prevTotalElements : totalElements,\\n        signature : _signature,\\n        extraData : _extraData\\n        });\\n\\n        emit StateBatchAppended(\\n            batchHeader.batchIndex,\\n            batchHeader.batchRoot,\\n            batchHeader.batchSize,\\n            batchHeader.prevTotalElements,\\n            batchHeader.signature,\\n            batchHeader.extraData\\n        );\\n\\n        batches().push(\\n            Lib_BVMCodec.hashBatchHeader(batchHeader),\\n            _makeBatchExtraData(\\n                uint40(batchHeader.prevTotalElements + batchHeader.batchSize),\\n                lastSequencerTimestamp\\n            )\\n        );\\n    }\\n\\n    /**\\n     * Removes a batch and all subsequent batches from the chain.\\n     * @param _batchHeader Header of the batch to remove.\\n     */\\n    function _deleteBatch(Lib_BVMCodec.ChainBatchHeader memory _batchHeader) internal {\\n        require(_batchHeader.batchIndex < batches().length(), \\\"Invalid batch index.\\\");\\n\\n        require(_isValidBatchHeader(_batchHeader), \\\"Invalid batch header.\\\");\\n\\n        // slither-disable-next-line reentrancy-events\\n        batches().deleteElementsAfterInclusive(\\n            _batchHeader.batchIndex,\\n            _makeBatchExtraData(uint40(_batchHeader.prevTotalElements), 0)\\n        );\\n\\n        // slither-disable-next-line reentrancy-events\\n        emit StateBatchDeleted(_batchHeader.batchIndex, _batchHeader.batchRoot);\\n    }\\n\\n    /**\\n     * Distribute Reward to tss node.\\n     * @param _batch rollup batch.\\n     * @param  _shouldStartAtElement.\\n     */\\n    function _distributeTssReward(bytes32[] memory _batch, uint256 _shouldStartAtElement) internal {\\n        // get address of tss group member\\n        address[] memory tssMembers = ITssGroupManager(resolve(\\\"Proxy__TSS_GroupManager\\\")).getTssGroupUnJailMembers();\\n        require(tssMembers.length > 0, \\\"get tss members in error\\\");\\n\\n        // construct calldata for claimReward call\\n        bytes memory message = abi.encodeWithSelector(\\n            ITssRewardContract.claimReward.selector,\\n            _shouldStartAtElement,\\n            _batch.length,\\n            block.timestamp,\\n            tssMembers\\n        );\\n\\n        // send call data into L2, hardcode address\\n        sendCrossDomainMessage(\\n            address(0x4200000000000000000000000000000000000020),\\n            2000000,\\n            message\\n        );\\n\\n        // emit message\\n        emit DistributeTssReward(\\n            _shouldStartAtElement,\\n            _batch.length,\\n            block.timestamp,\\n            tssMembers\\n        );\\n    }\\n\\n    /**\\n     * Checks that a batch header matches the stored hash for the given index.\\n     * @param _batchHeader Batch header to validate.\\n     * @return Whether or not the header matches the stored one.\\n     */\\n    function _isValidBatchHeader(Lib_BVMCodec.ChainBatchHeader memory _batchHeader)\\n    internal\\n    view\\n    returns (bool)\\n    {\\n        return Lib_BVMCodec.hashBatchHeader(_batchHeader) == batches().get(_batchHeader.batchIndex);\\n    }\\n\\n\\n    /**\\n     * roll back l2 chain to should start block number.\\n     * @param _shouldRollBack roll back number.\\n     * @param _signature Signature of roll back number.\\n     */\\n    function _checkRollBackSignature(uint256 _shouldRollBack, bytes memory _signature)\\n    internal\\n    {\\n        // abi hash encode to bytes\\n        require(\\n            ITssGroupManager(resolve(\\\"Proxy__TSS_GroupManager\\\")).verifySign(\\n                keccak256(abi.encode(_shouldRollBack)), _signature),\\n            \\\"verify signature failed\\\"\\n        );\\n\\n\\n        bytes memory message = abi.encodeWithSignature(\\n            \\\"rollBackMessage(uint256)\\\",\\n            _shouldRollBack\\n        );\\n\\n        // send call data into L2, hardcode address\\n        sendCrossDomainMessage(\\n            address(0xDeADdeaDdEaDdeADdEaDDeADDEaddEaDDEad2222),\\n            2000000,\\n            message\\n        );\\n\\n        //emit roll back l2chain from block number\\n        emit RollBackL2Chain(_shouldRollBack);\\n    }\\n}\\n\",\"keccak256\":\"0x7ad8d06d3f4a72015bdf334a247cd14836a157ba9c189d5f9e93916e6f47ba62\",\"license\":\"MIT\"},\"contracts/L1/tss/ITssGroupManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.9.0;\\n\\ninterface ITssGroupManager {\\n    enum MemberStatus {\\n        unJail,\\n        jail\\n    }\\n\\n    struct TssMember {\\n        bytes         publicKey;\\n        address       nodeAddress;\\n        MemberStatus  status;\\n    }\\n\\n    function setTssGroupMember(uint256 _threshold, bytes[] memory _batchPublicKey) external;\\n    function setGroupPublicKey(bytes memory _publicKey, bytes memory _groupPublicKey) external;\\n    function getTssGroupInfo() external returns (uint256, uint256, bytes memory, bytes[] memory);\\n    function getTssInactiveGroupInfo() external returns (uint256, uint256, bytes[] memory);\\n    function memberJail(bytes memory _publicKey) external;\\n    function memberUnJail(bytes memory _publicKey) external;\\n    function removeMember(bytes memory _publicKey) external;\\n    function getTssGroupUnJailMembers() external returns (address[] memory);\\n    function getTssGroupMembers() external returns (bytes[] memory);\\n    function getTssMember(bytes memory _publicKey) external returns (TssMember memory);\\n    function memberExistActive(bytes memory _publicKey) external returns (bool);\\n    function memberExistInActive(bytes memory _publicKey) external returns (bool);\\n    function inActiveIsEmpty() external returns (bool);\\n    function verifySign(bytes32 _message, bytes memory _sig) external returns (bool);\\n    function publicKeyToAddress (bytes memory publicKey) external returns (address);\\n}\\n\",\"keccak256\":\"0x6bbaf76169b849c95d73940ab1a90742b1dbc611387971625d9d1914589f1c00\",\"license\":\"MIT\"},\"contracts/L1/verification/IBondManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.9;\\n\\n/**\\n * @title IBondManager\\n */\\ninterface IBondManager {\\n    /********************\\n     * Public Functions *\\n     ********************/\\n\\n    function isCollateralized(address _who) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x4ae2dc7bf175626d2930299e73d50a7ba936171d07810497ef71fa38a4e246a7\",\"license\":\"MIT\"},\"contracts/L2/predeploys/iTssRewardContract.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.9;\\n\\n/**\\n * @title ITssRewardContract\\n */\\n\\ninterface ITssRewardContract {\\n    /**********\\n     * Events *\\n     **********/\\n\\n    event DistributeTssReward(\\n        uint256 lastBatchTime,\\n        uint256 batchTime,\\n        uint256 amount,\\n        address[] tssMembers\\n    );\\n\\n    event DistributeTssRewardByBlock(\\n        uint256   blockStartHeight,\\n        uint32     length,\\n        uint256    amount,\\n        address[] tssMembers\\n    );\\n\\n    /********************\\n     * Public Functions *\\n     ********************/\\n\\n    /**\\n     * @dev Query total undistributed balance.\\n     * @return Amount of undistributed rewards.\\n     */\\n    function queryReward() external view returns (uint256);\\n\\n    /**\\n     * @dev Auto distribute reward to tss members.\\n     * @param _blockStartHeight L2 rollup batch block start height.\\n     * @param _length Rollup batch length.\\n     * @param _tssMembers Tss member address array.\\n     */\\n    function claimReward(uint256 _blockStartHeight, uint32 _length, uint256 _batchTime, address[] calldata _tssMembers) external;\\n\\n    /**\\n     * @dev Update deposit block gas into contract.\\n     * @param _blockID Update gas reward L2 block ID.\\n     * @return Update success.\\n     */\\n    function updateReward(uint256 _blockID, uint256 _amount) external returns (bool);\\n    /**\\n     * @dev withdraw dust.\\n     */\\n    function withdrawDust() external;\\n\\n    /**\\n     * @dev clear contract(canonical).\\n     */\\n    function withdraw() external;\\n}\\n\",\"keccak256\":\"0x131eeb90d0504427082b58172bd2c6287bff091ba5bd91cf053493aea17462bc\",\"license\":\"MIT\"},\"contracts/libraries/bridge/CrossDomainEnabled.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.9.0;\\n\\n/* Interface Imports */\\nimport { ICrossDomainMessenger } from \\\"./ICrossDomainMessenger.sol\\\";\\n\\n/**\\n * @title CrossDomainEnabled\\n * @dev Helper contract for contracts performing cross-domain communications\\n *\\n * Compiler used: defined by inheriting contract\\n */\\ncontract CrossDomainEnabled {\\n    /*************\\n     * Variables *\\n     *************/\\n\\n    // Messenger contract used to send and recieve messages from the other domain.\\n    address public messenger;\\n\\n    /***************\\n     * Constructor *\\n     ***************/\\n\\n    /**\\n     * @param _messenger Address of the CrossDomainMessenger on the current layer.\\n     */\\n    constructor(address _messenger) {\\n        messenger = _messenger;\\n    }\\n\\n    /**********************\\n     * Function Modifiers *\\n     **********************/\\n\\n    /**\\n     * 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\\n     *  authenticated to call this function.\\n     */\\n    modifier onlyFromCrossDomainAccount(address _sourceDomainAccount) {\\n        require(\\n            msg.sender == address(getCrossDomainMessenger()),\\n            \\\"BVM_XCHAIN: messenger contract unauthenticated\\\"\\n        );\\n\\n        require(\\n            getCrossDomainMessenger().xDomainMessageSender() == _sourceDomainAccount,\\n            \\\"BVM_XCHAIN: wrong sender of cross-domain message\\\"\\n        );\\n\\n        _;\\n    }\\n\\n    /**********************\\n     * Internal Functions *\\n     **********************/\\n\\n    /**\\n     * Gets the messenger, usually from storage. This function is exposed in case a child contract\\n     * needs to override.\\n     * @return The address of the cross-domain messenger contract which should be used.\\n     */\\n    function getCrossDomainMessenger() internal virtual returns (ICrossDomainMessenger) {\\n        return ICrossDomainMessenger(messenger);\\n    }\\n\\n    /**q\\n     * Sends a message to an account on another domain\\n     * @param _crossDomainTarget The intended recipient on the destination domain\\n     * @param _message The data to send to the target (usually calldata to a function with\\n     *  `onlyFromCrossDomainAccount()`)\\n     * @param _gasLimit The gasLimit for the receipt of the message on the target domain.\\n     */\\n    function sendCrossDomainMessage(\\n        address _crossDomainTarget,\\n        uint32 _gasLimit,\\n        bytes memory _message\\n    ) internal {\\n        // slither-disable-next-line reentrancy-events, reentrancy-benign\\n        getCrossDomainMessenger().sendMessage(_crossDomainTarget, _message, _gasLimit);\\n    }\\n}\\n\",\"keccak256\":\"0xa7f0c49f2d81e43aa48b72020aa594770ee244353d4dc96d367ec6bf120fb467\",\"license\":\"MIT\"},\"contracts/libraries/bridge/ICrossDomainMessenger.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.9.0;\\n\\n/**\\n * @title ICrossDomainMessenger\\n */\\ninterface ICrossDomainMessenger {\\n    /**********\\n     * Events *\\n     **********/\\n\\n    event SentMessage(\\n        address indexed target,\\n        address sender,\\n        bytes message,\\n        uint256 messageNonce,\\n        uint256 gasLimit\\n    );\\n    event RelayedMessage(bytes32 indexed msgHash);\\n    event FailedRelayedMessage(bytes32 indexed msgHash);\\n\\n    /*************\\n     * Variables *\\n     *************/\\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\":\"0x8f29ae23021345a20ccac7b5edb3fc38268aef943b65adc8a32e74b80bf1833a\",\"license\":\"MIT\"},\"contracts/libraries/codec/Lib_BVMCodec.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.9;\\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\\\";\\n\\n/**\\n * @title Lib_BVMCodec\\n */\\nlibrary Lib_BVMCodec {\\n    /*********\\n     * Enums *\\n     *********/\\n\\n    enum QueueOrigin {\\n        SEQUENCER_QUEUE,\\n        L1TOL2_QUEUE\\n    }\\n\\n    /***********\\n     * Structs *\\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 signature;\\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    /**********************\\n     * Internal Functions *\\n     **********************/\\n\\n    /**\\n     * Encodes a standard BVM transaction.\\n     * @param _transaction BVM transaction to encode.\\n     * @return Encoded transaction bytes.\\n     */\\n    function encodeTransaction(Transaction memory _transaction)\\n        internal\\n        pure\\n        returns (bytes memory)\\n    {\\n        return\\n            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 BVM transaction.\\n     * @param _transaction BVM transaction to encode.\\n     * @return Hashed transaction\\n     */\\n    function hashTransaction(Transaction memory _transaction) internal pure returns (bytes32) {\\n        return keccak256(encodeTransaction(_transaction));\\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(bytes memory _encoded) internal pure returns (EVMAccount memory) {\\n        Lib_RLPReader.RLPItem[] memory accountState = Lib_RLPReader.readList(_encoded);\\n\\n        return\\n            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(Lib_BVMCodec.ChainBatchHeader memory _batchHeader)\\n        internal\\n        pure\\n        returns (bytes32)\\n    {\\n        return\\n            keccak256(\\n                abi.encode(\\n                    _batchHeader.batchRoot,\\n                    _batchHeader.batchSize,\\n                    _batchHeader.prevTotalElements,\\n                    _batchHeader.signature,\\n                    _batchHeader.extraData\\n                )\\n            );\\n    }\\n}\\n\",\"keccak256\":\"0xc74431c3b4f435e5581dc786892a5cb1674b717a03eaa4a79a4987ee19700f99\",\"license\":\"MIT\"},\"contracts/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.9;\\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     * Events *\\n     **********/\\n\\n    event AddressSet(string indexed _name, address _newAddress, address _oldAddress);\\n\\n    /*************\\n     * Variables *\\n     *************/\\n\\n    mapping(bytes32 => address) private addresses;\\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(string memory _name, address _address) external onlyOwner {\\n        bytes32 nameHash = _getNameHash(_name);\\n        address oldAddress = addresses[nameHash];\\n        addresses[nameHash] = _address;\\n\\n        emit AddressSet(_name, _address, oldAddress);\\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(string memory _name) external view returns (address) {\\n        return addresses[_getNameHash(_name)];\\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(string memory _name) internal pure returns (bytes32) {\\n        return keccak256(abi.encodePacked(_name));\\n    }\\n}\\n\",\"keccak256\":\"0xcde9b29429d512c549f7c1b8a033f161fa71c18cda08b241748663854196ae14\",\"license\":\"MIT\"},\"contracts/libraries/resolver/Lib_AddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.9;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_AddressResolver\\n */\\nabstract contract Lib_AddressResolver {\\n    /*************\\n     * Variables *\\n     *************/\\n\\n    Lib_AddressManager public libAddressManager;\\n\\n    /***************\\n     * Constructor *\\n     ***************/\\n\\n    /**\\n     * @param _libAddressManager Address of the Lib_AddressManager.\\n     */\\n    constructor(address _libAddressManager) {\\n        libAddressManager = Lib_AddressManager(_libAddressManager);\\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(string memory _name) public view returns (address) {\\n        return libAddressManager.getAddress(_name);\\n    }\\n}\\n\",\"keccak256\":\"0x515c4db671a28e2fe180201f6d11c0208c05f582ca3489fb6b8e81c27659bc62\",\"license\":\"MIT\"},\"contracts/libraries/rlp/Lib_RLPReader.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.9;\\n\\n/**\\n * @title Lib_RLPReader\\n * @dev Adapted from \\\"RLPReader\\\" by Hamdi Allam (hamdi.allam97@gmail.com).\\n */\\nlibrary Lib_RLPReader {\\n    /*************\\n     * Constants *\\n     *************/\\n\\n    uint256 internal constant MAX_LIST_LENGTH = 32;\\n\\n    /*********\\n     * Enums *\\n     *********/\\n\\n    enum RLPItemType {\\n        DATA_ITEM,\\n        LIST_ITEM\\n    }\\n\\n    /***********\\n     * Structs *\\n     ***********/\\n\\n    struct RLPItem {\\n        uint256 length;\\n        uint256 ptr;\\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(bytes memory _in) internal pure returns (RLPItem memory) {\\n        uint256 ptr;\\n        assembly {\\n            ptr := add(_in, 32)\\n        }\\n\\n        return RLPItem({ length: _in.length, ptr: ptr });\\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(RLPItem memory _in) internal pure returns (RLPItem[] memory) {\\n        (uint256 listOffset, , RLPItemType itemType) = _decodeLength(_in);\\n\\n        require(itemType == RLPItemType.LIST_ITEM, \\\"Invalid RLP list value.\\\");\\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(itemCount < MAX_LIST_LENGTH, \\\"Provided RLP list exceeds max list length.\\\");\\n\\n            (uint256 itemOffset, uint256 itemLength, ) = _decodeLength(\\n                RLPItem({ length: _in.length - offset, ptr: _in.ptr + offset })\\n            );\\n\\n            out[itemCount] = RLPItem({ length: itemLength + itemOffset, ptr: _in.ptr + offset });\\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(bytes memory _in) internal pure returns (RLPItem[] memory) {\\n        return readList(toRLPItem(_in));\\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(RLPItem memory _in) internal pure returns (bytes memory) {\\n        (uint256 itemOffset, uint256 itemLength, RLPItemType itemType) = _decodeLength(_in);\\n\\n        require(itemType == RLPItemType.DATA_ITEM, \\\"Invalid RLP bytes value.\\\");\\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(bytes memory _in) internal pure returns (bytes memory) {\\n        return readBytes(toRLPItem(_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(RLPItem memory _in) internal pure returns (string memory) {\\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(bytes memory _in) internal pure returns (string memory) {\\n        return readString(toRLPItem(_in));\\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(RLPItem memory _in) internal pure returns (bytes32) {\\n        require(_in.length <= 33, \\\"Invalid RLP bytes32 value.\\\");\\n\\n        (uint256 itemOffset, uint256 itemLength, RLPItemType itemType) = _decodeLength(_in);\\n\\n        require(itemType == RLPItemType.DATA_ITEM, \\\"Invalid RLP bytes32 value.\\\");\\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(bytes memory _in) internal pure returns (bytes32) {\\n        return readBytes32(toRLPItem(_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(RLPItem memory _in) internal pure returns (uint256) {\\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(bytes memory _in) internal pure returns (uint256) {\\n        return readUint256(toRLPItem(_in));\\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(RLPItem memory _in) internal pure returns (bool) {\\n        require(_in.length == 1, \\\"Invalid RLP boolean value.\\\");\\n\\n        uint256 ptr = _in.ptr;\\n        uint256 out;\\n        assembly {\\n            out := byte(0, mload(ptr))\\n        }\\n\\n        require(out == 0 || out == 1, \\\"Lib_RLPReader: Invalid RLP boolean value, must be 0 or 1\\\");\\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(bytes memory _in) internal pure returns (bool) {\\n        return readBool(toRLPItem(_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(RLPItem memory _in) internal pure returns (address) {\\n        if (_in.length == 1) {\\n            return address(0);\\n        }\\n\\n        require(_in.length == 21, \\\"Invalid RLP address value.\\\");\\n\\n        return address(uint160(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(bytes memory _in) internal pure returns (address) {\\n        return readAddress(toRLPItem(_in));\\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(RLPItem memory _in) internal pure returns (bytes memory) {\\n        return _copy(_in);\\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(RLPItem memory _in)\\n        private\\n        pure\\n        returns (\\n            uint256,\\n            uint256,\\n            RLPItemType\\n        )\\n    {\\n        require(_in.length > 0, \\\"RLP item cannot be null.\\\");\\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            // slither-disable-next-line variable-scope\\n            uint256 strLen = prefix - 0x80;\\n\\n            require(_in.length > strLen, \\\"Invalid RLP short string.\\\");\\n\\n            return (1, strLen, RLPItemType.DATA_ITEM);\\n        } else if (prefix <= 0xbf) {\\n            // Long string.\\n            uint256 lenOfStrLen = prefix - 0xb7;\\n\\n            require(_in.length > lenOfStrLen, \\\"Invalid RLP long string length.\\\");\\n\\n            uint256 strLen;\\n            assembly {\\n                // Pick out the string length.\\n                strLen := div(mload(add(ptr, 1)), exp(256, sub(32, lenOfStrLen)))\\n            }\\n\\n            require(_in.length > lenOfStrLen + strLen, \\\"Invalid RLP long string.\\\");\\n\\n            return (1 + lenOfStrLen, strLen, RLPItemType.DATA_ITEM);\\n        } else if (prefix <= 0xf7) {\\n            // Short list.\\n            // slither-disable-next-line variable-scope\\n            uint256 listLen = prefix - 0xc0;\\n\\n            require(_in.length > listLen, \\\"Invalid RLP short list.\\\");\\n\\n            return (1, listLen, RLPItemType.LIST_ITEM);\\n        } else {\\n            // Long list.\\n            uint256 lenOfListLen = prefix - 0xf7;\\n\\n            require(_in.length > lenOfListLen, \\\"Invalid RLP long list length.\\\");\\n\\n            uint256 listLen;\\n            assembly {\\n                // Pick out the list length.\\n                listLen := div(mload(add(ptr, 1)), exp(256, sub(32, lenOfListLen)))\\n            }\\n\\n            require(_in.length > lenOfListLen + listLen, \\\"Invalid RLP long list.\\\");\\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    ) private pure returns (bytes memory) {\\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;\\n        unchecked {\\n            mask = 256**(32 - (_length % 32)) - 1;\\n        }\\n\\n        assembly {\\n            mstore(dest, or(and(mload(src), not(mask)), and(mload(dest), mask)))\\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(RLPItem memory _in) private pure returns (bytes memory) {\\n        return _copy(_in.ptr, 0, _in.length);\\n    }\\n}\\n\",\"keccak256\":\"0xd794d1b32c6e31d40e2526b5e519de1b4e8d14d6933889f9b916e69c5d1848c6\",\"license\":\"MIT\"},\"contracts/libraries/rlp/Lib_RLPWriter.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.9;\\n\\n/**\\n * @title Lib_RLPWriter\\n * @author Bakaoh (with modifications)\\n */\\nlibrary Lib_RLPWriter {\\n    /**********************\\n     * Internal Functions *\\n     **********************/\\n\\n    /**\\n     * RLP encodes a byte string.\\n     * @param _in The byte string to encode.\\n     * @return The RLP encoded string in bytes.\\n     */\\n    function writeBytes(bytes memory _in) internal pure returns (bytes memory) {\\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 The RLP encoded list of items in bytes.\\n     */\\n    function writeList(bytes[] memory _in) internal pure returns (bytes memory) {\\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 The RLP encoded string in bytes.\\n     */\\n    function writeString(string memory _in) internal pure returns (bytes memory) {\\n        return writeBytes(bytes(_in));\\n    }\\n\\n    /**\\n     * RLP encodes an address.\\n     * @param _in The address to encode.\\n     * @return The RLP encoded address in bytes.\\n     */\\n    function writeAddress(address _in) internal pure returns (bytes memory) {\\n        return writeBytes(abi.encodePacked(_in));\\n    }\\n\\n    /**\\n     * RLP encodes a uint.\\n     * @param _in The uint256 to encode.\\n     * @return The RLP encoded uint256 in bytes.\\n     */\\n    function writeUint(uint256 _in) internal pure returns (bytes memory) {\\n        return writeBytes(_toBinary(_in));\\n    }\\n\\n    /**\\n     * RLP encodes a bool.\\n     * @param _in The bool to encode.\\n     * @return The RLP encoded bool in bytes.\\n     */\\n    function writeBool(bool _in) internal pure returns (bytes memory) {\\n        bytes memory encoded = new bytes(1);\\n        encoded[0] = (_in ? bytes1(0x01) : bytes1(0x80));\\n        return encoded;\\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 RLP encoded bytes.\\n     */\\n    function _writeLength(uint256 _len, uint256 _offset) private pure returns (bytes memory) {\\n        bytes memory encoded;\\n\\n        if (_len < 56) {\\n            encoded = new bytes(1);\\n            encoded[0] = bytes1(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] = bytes1(uint8(lenLen) + uint8(_offset) + 55);\\n            for (i = 1; i <= lenLen; i++) {\\n                encoded[i] = bytes1(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 RLP encoded bytes.\\n     */\\n    function _toBinary(uint256 _x) private pure returns (bytes memory) {\\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    ) private pure {\\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;\\n        unchecked {\\n            mask = 256**(32 - len) - 1;\\n        }\\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 The flattened byte string.\\n     */\\n    function _flatten(bytes[] memory _list) private pure returns (bytes memory) {\\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 {\\n            flattenedPtr := add(flattened, 0x20)\\n        }\\n\\n        for (i = 0; i < _list.length; i++) {\\n            bytes memory item = _list[i];\\n\\n            uint256 listPtr;\\n            assembly {\\n                listPtr := add(item, 0x20)\\n            }\\n\\n            _memcpy(flattenedPtr, listPtr, item.length);\\n            flattenedPtr += _list[i].length;\\n        }\\n\\n        return flattened;\\n    }\\n}\\n\",\"keccak256\":\"0x215b90672ce126effc3f2df61ca0cdf52d2b1cc9be602877e637829b0bf229fd\",\"license\":\"MIT\"},\"contracts/libraries/utils/Lib_Bytes32Utils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.9;\\n\\n/**\\n * @title Lib_Byte32Utils\\n */\\nlibrary Lib_Bytes32Utils {\\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(bytes32 _in) internal pure returns (bool) {\\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(bool _in) internal pure returns (bytes32) {\\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(bytes32 _in) internal pure returns (address) {\\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(address _in) internal pure returns (bytes32) {\\n        return bytes32(uint256(uint160(_in)));\\n    }\\n}\\n\",\"keccak256\":\"0xf2d1a526f2529e51fc2fffccf093c1691e291cbbb6de8a3da7d7f80024a9a234\",\"license\":\"MIT\"},\"contracts/libraries/utils/Lib_BytesUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.9;\\n\\n/**\\n * @title Lib_BytesUtils\\n */\\nlibrary Lib_BytesUtils {\\n    /**********************\\n     * Internal Functions *\\n     **********************/\\n\\n    function slice(\\n        bytes memory _bytes,\\n        uint256 _start,\\n        uint256 _length\\n    ) internal pure returns (bytes memory) {\\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(bytes memory _bytes, uint256 _start) internal pure returns (bytes memory) {\\n        if (_start >= _bytes.length) {\\n            return bytes(\\\"\\\");\\n        }\\n\\n        return slice(_bytes, _start, _bytes.length - _start);\\n    }\\n\\n    function toBytes32(bytes memory _bytes) internal pure returns (bytes32) {\\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(bytes memory _bytes) internal pure returns (uint256) {\\n        return uint256(toBytes32(_bytes));\\n    }\\n\\n    function toNibbles(bytes memory _bytes) internal pure returns (bytes memory) {\\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(bytes memory _bytes) internal pure returns (bytes memory) {\\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(bytes memory _bytes, bytes memory _other) internal pure returns (bool) {\\n        return keccak256(_bytes) == keccak256(_other);\\n    }\\n}\\n\",\"keccak256\":\"0xc39ee13f97e4ccfbc72a5aac571deb3c1aff882fca2dd18be794d43ac5de0a30\",\"license\":\"MIT\"},\"contracts/libraries/utils/Lib_MerkleTree.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.9;\\n\\n/**\\n * @title Lib_MerkleTree\\n * @author River Keefer\\n */\\nlibrary Lib_MerkleTree {\\n    /**********************\\n     * Internal Functions *\\n     **********************/\\n\\n    /**\\n     * Calculates a merkle root for a list of 32-byte leaf hashes.  WARNING: If the number\\n     * of leaves passed in is not a power of two, it pads out the tree with zero hashes.\\n     * If you do not know the original length of elements for the tree you are verifying, then\\n     * this may allow empty leaves past _elements.length to pass a verification check down the line.\\n     * Note that the _elements argument is modified, therefore it must not be used again afterwards\\n     * @param _elements Array of hashes from which to generate a merkle root.\\n     * @return Merkle root of the leaves, with zero hashes for non-powers-of-two (see above).\\n     */\\n    function getMerkleRoot(bytes32[] memory _elements) internal pure returns (bytes32) {\\n        require(_elements.length > 0, \\\"Lib_MerkleTree: Must provide at least one leaf hash.\\\");\\n\\n        if (_elements.length == 1) {\\n            return _elements[0];\\n        }\\n\\n        uint256[16] memory defaults = [\\n            0x290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563,\\n            0x633dc4d7da7256660a892f8f1604a44b5432649cc8ec5cb3ced4c4e6ac94dd1d,\\n            0x890740a8eb06ce9be422cb8da5cdafc2b58c0a5e24036c578de2a433c828ff7d,\\n            0x3b8ec09e026fdc305365dfc94e189a81b38c7597b3d941c279f042e8206e0bd8,\\n            0xecd50eee38e386bd62be9bedb990706951b65fe053bd9d8a521af753d139e2da,\\n            0xdefff6d330bb5403f63b14f33b578274160de3a50df4efecf0e0db73bcdd3da5,\\n            0x617bdd11f7c0a11f49db22f629387a12da7596f9d1704d7465177c63d88ec7d7,\\n            0x292c23a9aa1d8bea7e2435e555a4a60e379a5a35f3f452bae60121073fb6eead,\\n            0xe1cea92ed99acdcb045a6726b2f87107e8a61620a232cf4d7d5b5766b3952e10,\\n            0x7ad66c0a68c72cb89e4fb4303841966e4062a76ab97451e3b9fb526a5ceb7f82,\\n            0xe026cc5a4aed3c22a58cbd3d2ac754c9352c5436f638042dca99034e83636516,\\n            0x3d04cffd8b46a874edf5cfae63077de85f849a660426697b06a829c70dd1409c,\\n            0xad676aa337a485e4728a0b240d92b3ef7b3c372d06d189322bfd5f61f1e7203e,\\n            0xa2fca4a49658f9fab7aa63289c91b7c7b6c832a6d0e69334ff5b0a3483d09dab,\\n            0x4ebfd9cd7bca2505f7bef59cc1c12ecc708fff26ae4af19abe852afe9e20c862,\\n            0x2def10d13dd169f550f578bda343d9717a138562e0093b380a1120789d53cf10\\n        ];\\n\\n        // Reserve memory space for our hashes.\\n        bytes memory buf = new bytes(64);\\n\\n        // We'll need to keep track of left and right siblings.\\n        bytes32 leftSibling;\\n        bytes32 rightSibling;\\n\\n        // Number of non-empty nodes at the current depth.\\n        uint256 rowSize = _elements.length;\\n\\n        // Current depth, counting from 0 at the leaves\\n        uint256 depth = 0;\\n\\n        // Common sub-expressions\\n        uint256 halfRowSize; // rowSize / 2\\n        bool rowSizeIsOdd; // rowSize % 2 == 1\\n\\n        while (rowSize > 1) {\\n            halfRowSize = rowSize / 2;\\n            rowSizeIsOdd = rowSize % 2 == 1;\\n\\n            for (uint256 i = 0; i < halfRowSize; i++) {\\n                leftSibling = _elements[(2 * i)];\\n                rightSibling = _elements[(2 * i) + 1];\\n                assembly {\\n                    mstore(add(buf, 32), leftSibling)\\n                    mstore(add(buf, 64), rightSibling)\\n                }\\n\\n                _elements[i] = keccak256(buf);\\n            }\\n\\n            if (rowSizeIsOdd) {\\n                leftSibling = _elements[rowSize - 1];\\n                rightSibling = bytes32(defaults[depth]);\\n                assembly {\\n                    mstore(add(buf, 32), leftSibling)\\n                    mstore(add(buf, 64), rightSibling)\\n                }\\n\\n                _elements[halfRowSize] = keccak256(buf);\\n            }\\n\\n            rowSize = halfRowSize + (rowSizeIsOdd ? 1 : 0);\\n            depth++;\\n        }\\n\\n        return _elements[0];\\n    }\\n\\n    /**\\n     * Verifies a merkle branch for the given leaf hash.  Assumes the original length\\n     * of leaves generated is a known, correct input, and does not return true for indices\\n     * extending past that index (even if _siblings would be otherwise valid.)\\n     * @param _root The Merkle root to verify against.\\n     * @param _leaf The leaf hash to verify inclusion of.\\n     * @param _index The index in the tree of this leaf.\\n     * @param _siblings Array of sibline nodes in the inclusion proof, starting from depth 0\\n     * (bottom of the tree).\\n     * @param _totalLeaves The total number of leaves originally passed into.\\n     * @return Whether or not the merkle branch and leaf passes verification.\\n     */\\n    function verify(\\n        bytes32 _root,\\n        bytes32 _leaf,\\n        uint256 _index,\\n        bytes32[] memory _siblings,\\n        uint256 _totalLeaves\\n    ) internal pure returns (bool) {\\n        require(_totalLeaves > 0, \\\"Lib_MerkleTree: Total leaves must be greater than zero.\\\");\\n\\n        require(_index < _totalLeaves, \\\"Lib_MerkleTree: Index out of bounds.\\\");\\n\\n        require(\\n            _siblings.length == _ceilLog2(_totalLeaves),\\n            \\\"Lib_MerkleTree: Total siblings does not correctly correspond to total leaves.\\\"\\n        );\\n\\n        bytes32 computedRoot = _leaf;\\n\\n        for (uint256 i = 0; i < _siblings.length; i++) {\\n            if ((_index & 1) == 1) {\\n                computedRoot = keccak256(abi.encodePacked(_siblings[i], computedRoot));\\n            } else {\\n                computedRoot = keccak256(abi.encodePacked(computedRoot, _siblings[i]));\\n            }\\n\\n            _index >>= 1;\\n        }\\n\\n        return _root == computedRoot;\\n    }\\n\\n    /*********************\\n     * Private Functions *\\n     *********************/\\n\\n    /**\\n     * Calculates the integer ceiling of the log base 2 of an input.\\n     * @param _in Unsigned input to calculate the log.\\n     * @return ceil(log_base_2(_in))\\n     */\\n    function _ceilLog2(uint256 _in) private pure returns (uint256) {\\n        require(_in > 0, \\\"Lib_MerkleTree: Cannot compute ceil(log_2) of 0.\\\");\\n\\n        if (_in == 1) {\\n            return 0;\\n        }\\n\\n        // Find the highest set bit (will be floor(log_2)).\\n        // Borrowed with <3 from https://github.com/ethereum/solidity-examples\\n        uint256 val = _in;\\n        uint256 highest = 0;\\n        for (uint256 i = 128; i >= 1; i >>= 1) {\\n            if (val & (((uint256(1) << i) - 1) << i) != 0) {\\n                highest += i;\\n                val >>= i;\\n            }\\n        }\\n\\n        // Increment by one if this is not a perfect logarithm.\\n        if ((uint256(1) << highest) != _in) {\\n            highest += 1;\\n        }\\n\\n        return highest;\\n    }\\n}\\n\",\"keccak256\":\"0x84351e7b8be5007b77a67c1e3f34f46ed0c1ddc67e4e76797fd06f01ca9325aa\",\"license\":\"MIT\"}},\"version\":1}",
  "bytecode": "0x60806040523480156200001157600080fd5b5060405162002b8e38038062002b8e833981016040819052620000349162000090565b600080546001600160a01b039586166001600160a01b0319918216179091556001805494909516931692909217909255600291909155600355620000d8565b80516001600160a01b03811681146200008b57600080fd5b919050565b60008060008060808587031215620000a757600080fd5b620000b28562000073565b9350620000c26020860162000073565b6040860151606090960151949790965092505050565b612aa680620000e86000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80637ad168a01161008c578063b768bb1711610066578063b768bb17146101f1578063c17b291b14610204578063cfdf677e1461020d578063e561dddc1461021557600080fd5b80637ad168a0146101bd57806381eb62ef146101c557806389a1d980146101ce57600080fd5b80633cb747bf116100c85780633cb747bf14610161578063461a4478146101815780635b4d90e2146101945780637aa63a86146101a757600080fd5b80630bf3b5f2146100ef5780632169f79f14610104578063299ca47814610117575b600080fd5b6101026100fd366004612271565b61021d565b005b610102610112366004612350565b6103fc565b6000546101379073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6001546101379073ffffffffffffffffffffffffffffffffffffffff1681565b61013761018f3660046123b3565b610807565b6101026101a236600461249b565b6108b4565b6101af610a70565b604051908152602001610158565b6101af610a89565b6101af60035481565b6101e16101dc36600461249b565b610aa2565b6040519015158152602001610158565b6101e16101ff3660046124d0565b610b4a565b6101af60025481565b610137610c14565b6101af610c3c565b610225610a70565b821461029e5760405162461bcd60e51b815260206004820152603d60248201527f41637475616c20626174636820737461727420696e64657820646f6573206e6f60448201527f74206d6174636820657870656374656420737461727420696e6465782e00000060648201526084015b60405180910390fd5b6102dc6040518060400160405280600b81526020017f426f6e644d616e61676572000000000000000000000000000000000000000000815250610807565b6040517f02ad4d2a00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff91909116906302ad4d2a9060240160206040518083038186803b15801561034357600080fd5b505afa158015610357573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061037b919061258d565b6103ed5760405162461bcd60e51b815260206004820152602f60248201527f50726f706f73657220646f6573206e6f74206861766520656e6f75676820636f60448201527f6c6c61746572616c20706f7374656400000000000000000000000000000000006064820152608401610295565b6103f78382610cc3565b505050565b610404610a70565b82146104785760405162461bcd60e51b815260206004820152603d60248201527f41637475616c20626174636820737461727420696e64657820646f6573206e6f60448201527f74206d6174636820657870656374656420737461727420696e6465782e0000006064820152608401610295565b6104b66040518060400160405280600b81526020017f426f6e644d616e61676572000000000000000000000000000000000000000000815250610807565b6040517f02ad4d2a00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff91909116906302ad4d2a9060240160206040518083038186803b15801561051d57600080fd5b505afa158015610531573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610555919061258d565b6105c75760405162461bcd60e51b815260206004820152602f60248201527f50726f706f73657220646f6573206e6f74206861766520656e6f75676820636f60448201527f6c6c61746572616c20706f7374656400000000000000000000000000000000006064820152608401610295565b600083511161063e5760405162461bcd60e51b815260206004820152602360248201527f43616e6e6f74207375626d697420616e20656d7074792073746174652062617460448201527f63682e00000000000000000000000000000000000000000000000000000000006064820152608401610295565b61067c6040518060400160405280601981526020017f43616e6f6e6963616c5472616e73616374696f6e436861696e00000000000000815250610807565b73ffffffffffffffffffffffffffffffffffffffff16637aa63a866040518163ffffffff1660e01b815260040160206040518083038186803b1580156106c157600080fd5b505afa1580156106d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f991906125af565b8351610703610a70565b61070d91906125f7565b11156107a75760405162461bcd60e51b815260206004820152604960248201527f4e756d626572206f6620737461746520726f6f74732063616e6e6f742065786360448201527f65656420746865206e756d626572206f662063616e6f6e6963616c207472616e60648201527f73616374696f6e732e0000000000000000000000000000000000000000000000608482015260a401610295565b6107b2838383610ec2565b6107fd838242336040516020016107e992919091825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b604051602081830303815290604052611000565b6103f783836112b0565b600080546040517fbf40fac100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063bf40fac19061085e90859060040161265c565b60206040518083038186803b15801561087657600080fd5b505afa15801561088a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ae9190612691565b92915050565b6108f26040518060400160405280601181526020017f42564d5f46726175645665726966696572000000000000000000000000000000815250610807565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109925760405162461bcd60e51b815260206004820152603b60248201527f537461746520626174636865732063616e206f6e6c792062652064656c65746560448201527f64206279207468652042564d5f467261756456657269666965722e00000000006064820152608401610295565b61099b816114c7565b6109e75760405162461bcd60e51b815260206004820152601560248201527f496e76616c6964206261746368206865616465722e00000000000000000000006044820152606401610295565b6109f081610aa2565b610a64576040805162461bcd60e51b81526020600482015260248101919091527f537461746520626174636865732063616e206f6e6c792062652064656c65746560448201527f642077697468696e207468652066726175642070726f6f662077696e646f772e6064820152608401610295565b610a6d81611589565b50565b600080610a7b6117ba565b5064ffffffffff1692915050565b600080610a946117ba565b64ffffffffff169392505050565b6000808260a00151806020019051810190610abd91906126ae565b50905080610b335760405162461bcd60e51b815260206004820152602560248201527f4261746368206865616465722074696d657374616d702063616e6e6f7420626560448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610295565b4260025482610b4291906125f7565b119392505050565b6000610b55836114c7565b610ba15760405162461bcd60e51b815260206004820152601560248201527f496e76616c6964206261746368206865616465722e00000000000000000000006044820152606401610295565b610bbe83602001518584600001518560200151876040015161185e565b610c0a5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420696e636c7573696f6e2070726f6f662e00000000000000006044820152606401610295565b5060019392505050565b6000610c37604051806060016040528060218152602001612a5060219139610807565b905090565b6000610c46610c14565b73ffffffffffffffffffffffffffffffffffffffff16631f7b6d326040518163ffffffff1660e01b815260040160206040518083038186803b158015610c8b57600080fd5b505afa158015610c9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c3791906125af565b610d016040518060400160405280601781526020017f50726f78795f5f5453535f47726f75704d616e61676572000000000000000000815250610807565b73ffffffffffffffffffffffffffffffffffffffff16633231a7f083604051602001610d2f91815260200190565b60405160208183030381529060405280519060200120836040518363ffffffff1660e01b8152600401610d639291906126de565b602060405180830381600087803b158015610d7d57600080fd5b505af1158015610d91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610db5919061258d565b610e015760405162461bcd60e51b815260206004820152601760248201527f766572696679207369676e6174757265206661696c65640000000000000000006044820152606401610295565b600082604051602401610e1691815260200190565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167ff523f40d000000000000000000000000000000000000000000000000000000001790529050610e9273deaddeaddeaddeaddeaddeaddeaddeaddead2222621e848083611acc565b60405183907f8ef5d07412def056f6bfc680f359c8a0370cfacb2becaf67d01e2e372e08964a90600090a2505050565b610f006040518060400160405280601781526020017f50726f78795f5f5453535f47726f75704d616e61676572000000000000000000815250610807565b73ffffffffffffffffffffffffffffffffffffffff16633231a7f08484604051602001610f2e9291906126f7565b60405160208183030381529060405280519060200120836040518363ffffffff1660e01b8152600401610f629291906126de565b602060405180830381600087803b158015610f7c57600080fd5b505af1158015610f90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb4919061258d565b6103f75760405162461bcd60e51b815260206004820152601760248201527f766572696679207369676e6174757265206661696c65640000000000000000006044820152606401610295565b60006110406040518060400160405280600c81526020017f42564d5f50726f706f7365720000000000000000000000000000000000000000815250610807565b905060008061104d6117ba565b90925090503373ffffffffffffffffffffffffffffffffffffffff84161415611077575042611126565b426003548264ffffffffff1661108d91906125f7565b106111265760405162461bcd60e51b815260206004820152604360248201527f43616e6e6f74207075626c69736820737461746520726f6f747320776974686960448201527f6e207468652073657175656e636572207075626c69636174696f6e2077696e6460648201527f6f772e0000000000000000000000000000000000000000000000000000000000608482015260a401610295565b60006040518060c0016040528061113b610c3c565b815260200161114989611b5d565b8152602001885181526020018464ffffffffff16815260200187815260200186815250905080600001517f9cf3ad24eae3fd6d461e2f566b35b95b6d671871d9fcb45f8ac8030e4a8d21b382602001518360400151846060015185608001518660a001516040516111be95949392919061273f565b60405180910390a26111ce610c14565b73ffffffffffffffffffffffffffffffffffffffff16632015276c6111f283612041565b6112178460400151856060015161120991906125f7565b602887811b91909117901b90565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815260048101929092527fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000166024820152604401600060405180830381600087803b15801561128f57600080fd5b505af11580156112a3573d6000803e3d6000fd5b5050505050505050505050565b60006112f06040518060400160405280601781526020017f50726f78795f5f5453535f47726f75704d616e61676572000000000000000000815250610807565b73ffffffffffffffffffffffffffffffffffffffff16632cd00d536040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561133757600080fd5b505af115801561134b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526113739190810190612782565b905060008151116113c65760405162461bcd60e51b815260206004820152601860248201527f67657420747373206d656d6265727320696e206572726f7200000000000000006044820152606401610295565b82516040516000917f0fae75d900000000000000000000000000000000000000000000000000000000916114029186914290879060240161286d565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091529050611485734200000000000000000000000000000000000020621e848083611acc565b42837ff533ef50019763ee9d95ad46e28350b533c11edd472ae7be93e8fae83c1b6d998651856040516114b992919061289c565b60405180910390a350505050565b60006114d1610c14565b82516040517f9507d39a00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9290921691639507d39a916115299160040190815260200190565b60206040518083038186803b15801561154157600080fd5b505afa158015611555573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061157991906125af565b61158283612041565b1492915050565b611591610c14565b73ffffffffffffffffffffffffffffffffffffffff16631f7b6d326040518163ffffffff1660e01b815260040160206040518083038186803b1580156115d657600080fd5b505afa1580156115ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061160e91906125af565b81511061165d5760405162461bcd60e51b815260206004820152601460248201527f496e76616c696420626174636820696e6465782e0000000000000000000000006044820152606401610295565b611666816114c7565b6116b25760405162461bcd60e51b815260206004820152601560248201527f496e76616c6964206261746368206865616465722e00000000000000000000006044820152606401610295565b6116ba610c14565b8151606083015173ffffffffffffffffffffffffffffffffffffffff929092169163167fd681919060281b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815260048101929092527fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000166024820152604401600060405180830381600087803b15801561175d57600080fd5b505af1158015611771573d6000803e3d6000fd5b5050505080600001517f8747b69ce8fdb31c3b9b0a67bd8049ad8c1a69ea417b69b12174068abd9cbd6482602001516040516117af91815260200190565b60405180910390a250565b60008060006117c7610c14565b73ffffffffffffffffffffffffffffffffffffffff1663ccf8f9696040518163ffffffff1660e01b815260040160206040518083038186803b15801561180c57600080fd5b505afa158015611820573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061184491906128b5565b64ffffffffff602882901c169460509190911c9350915050565b60008082116118d55760405162461bcd60e51b815260206004820152603760248201527f4c69625f4d65726b6c65547265653a20546f74616c206c6561766573206d757360448201527f742062652067726561746572207468616e207a65726f2e0000000000000000006064820152608401610295565b8184106119495760405162461bcd60e51b8152602060048201526024808201527f4c69625f4d65726b6c65547265653a20496e646578206f7574206f6620626f7560448201527f6e64732e000000000000000000000000000000000000000000000000000000006064820152608401610295565b6119528261208a565b8351146119ed5760405162461bcd60e51b815260206004820152604d60248201527f4c69625f4d65726b6c65547265653a20546f74616c207369626c696e6773206460448201527f6f6573206e6f7420636f72726563746c7920636f72726573706f6e6420746f2060648201527f746f74616c206c65617665732e00000000000000000000000000000000000000608482015260a401610295565b8460005b8451811015611abf578560011660011415611a5857848181518110611a1857611a186128f7565b602002602001015182604051602001611a3b929190918252602082015260400190565b604051602081830303815290604052805190602001209150611aa6565b81858281518110611a6b57611a6b6128f7565b6020026020010151604051602001611a8d929190918252602082015260400190565b6040516020818303038152906040528051906020012091505b60019590951c9480611ab781612926565b9150506119f1565b5090951495945050505050565b6001546040517f3dbb202b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690633dbb202b90611b269086908590879060040161295f565b600060405180830381600087803b158015611b4057600080fd5b505af1158015611b54573d6000803e3d6000fd5b50505050505050565b600080825111611bd55760405162461bcd60e51b815260206004820152603460248201527f4c69625f4d65726b6c65547265653a204d7573742070726f766964652061742060448201527f6c65617374206f6e65206c65616620686173682e0000000000000000000000006064820152608401610295565b815160011415611c015781600081518110611bf257611bf26128f7565b60200260200101519050919050565b60408051610200810182527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56381527f633dc4d7da7256660a892f8f1604a44b5432649cc8ec5cb3ced4c4e6ac94dd1d60208201527f890740a8eb06ce9be422cb8da5cdafc2b58c0a5e24036c578de2a433c828ff7d818301527f3b8ec09e026fdc305365dfc94e189a81b38c7597b3d941c279f042e8206e0bd86060808301919091527fecd50eee38e386bd62be9bedb990706951b65fe053bd9d8a521af753d139e2da60808301527fdefff6d330bb5403f63b14f33b578274160de3a50df4efecf0e0db73bcdd3da560a08301527f617bdd11f7c0a11f49db22f629387a12da7596f9d1704d7465177c63d88ec7d760c08301527f292c23a9aa1d8bea7e2435e555a4a60e379a5a35f3f452bae60121073fb6eead60e08301527fe1cea92ed99acdcb045a6726b2f87107e8a61620a232cf4d7d5b5766b3952e106101008301527f7ad66c0a68c72cb89e4fb4303841966e4062a76ab97451e3b9fb526a5ceb7f826101208301527fe026cc5a4aed3c22a58cbd3d2ac754c9352c5436f638042dca99034e836365166101408301527f3d04cffd8b46a874edf5cfae63077de85f849a660426697b06a829c70dd1409c6101608301527fad676aa337a485e4728a0b240d92b3ef7b3c372d06d189322bfd5f61f1e7203e6101808301527fa2fca4a49658f9fab7aa63289c91b7c7b6c832a6d0e69334ff5b0a3483d09dab6101a08301527f4ebfd9cd7bca2505f7bef59cc1c12ecc708fff26ae4af19abe852afe9e20c8626101c08301527f2def10d13dd169f550f578bda343d9717a138562e0093b380a1120789d53cf106101e083015282518381529081018352909160009190602082018180368337505085519192506000918291508180805b600184111561201757611eb26002856129d3565b9150611ebf6002856129e7565b600114905060005b82811015611f6b578a611edb8260026129fb565b81518110611eeb57611eeb6128f7565b602002602001015196508a816002611f0391906129fb565b611f0e9060016125f7565b81518110611f1e57611f1e6128f7565b6020026020010151955086602089015285604089015287805190602001208b8281518110611f4e57611f4e6128f7565b602090810291909101015280611f6381612926565b915050611ec7565b508015611fe75789611f7e600186612a38565b81518110611f8e57611f8e6128f7565b60200260200101519550878360108110611faa57611faa6128f7565b602002015160001b945085602088015284604088015286805190602001208a8381518110611fda57611fda6128f7565b6020026020010181815250505b80611ff3576000611ff6565b60015b6120039060ff16836125f7565b93508261200f81612926565b935050611e9e565b8960008151811061202a5761202a6128f7565b602002602001015198505050505050505050919050565b6020808201516040808401516060850151608086015160a0870151935160009661206d9695910161273f565b604051602081830303815290604052805190602001209050919050565b60008082116121015760405162461bcd60e51b815260206004820152603060248201527f4c69625f4d65726b6c65547265653a2043616e6e6f7420636f6d70757465206360448201527f65696c286c6f675f3229206f6620302e000000000000000000000000000000006064820152608401610295565b816001141561211257506000919050565b81600060805b60018110612150578061212e600180831b612a38565b901b8316156121485761214181836125f7565b92811c9291505b60011c612118565b506001811b8414612169576121666001826125f7565b90505b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160c0810167ffffffffffffffff811182821017156121c2576121c2612170565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156121f1576121f1612170565b604052919050565b600067ffffffffffffffff83111561221357612213612170565b6122266020601f19601f860116016121c8565b905082815283838301111561223a57600080fd5b828260208301376000602084830101529392505050565b600082601f83011261226257600080fd5b612169838335602085016121f9565b60008060006060848603121561228657600080fd5b8335925060208401359150604084013567ffffffffffffffff8111156122ab57600080fd5b6122b786828701612251565b9150509250925092565b600067ffffffffffffffff8211156122db576122db612170565b5060051b60200190565b600082601f8301126122f657600080fd5b8135602061230b612306836122c1565b6121c8565b82815260059290921b8401810191818101908684111561232a57600080fd5b8286015b84811015612345578035835291830191830161232e565b509695505050505050565b60008060006060848603121561236557600080fd5b833567ffffffffffffffff8082111561237d57600080fd5b612389878388016122e5565b94506020860135935060408601359150808211156123a657600080fd5b506122b786828701612251565b6000602082840312156123c557600080fd5b813567ffffffffffffffff8111156123dc57600080fd5b8201601f810184136123ed57600080fd5b6123fc848235602084016121f9565b949350505050565b600060c0828403121561241657600080fd5b61241e61219f565b905081358152602082013560208201526040820135604082015260608201356060820152608082013567ffffffffffffffff8082111561245d57600080fd5b61246985838601612251565b608084015260a084013591508082111561248257600080fd5b5061248f84828501612251565b60a08301525092915050565b6000602082840312156124ad57600080fd5b813567ffffffffffffffff8111156124c457600080fd5b6123fc84828501612404565b6000806000606084860312156124e557600080fd5b83359250602084013567ffffffffffffffff8082111561250457600080fd5b61251087838801612404565b9350604086013591508082111561252657600080fd5b908501906040828803121561253a57600080fd5b60405160408101818110838211171561255557612555612170565b6040528235815260208301358281111561256e57600080fd5b61257a898286016122e5565b6020830152508093505050509250925092565b60006020828403121561259f57600080fd5b8151801515811461216957600080fd5b6000602082840312156125c157600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561260a5761260a6125c8565b500190565b6000815180845260005b8181101561263557602081850181015186830182015201612619565b81811115612647576000602083870101525b50601f01601f19169290920160200192915050565b602081526000612169602083018461260f565b73ffffffffffffffffffffffffffffffffffffffff81168114610a6d57600080fd5b6000602082840312156126a357600080fd5b81516121698161266f565b600080604083850312156126c157600080fd5b8251915060208301516126d38161266f565b809150509250929050565b8281526040602082015260006123fc604083018461260f565b604080825283519082018190526000906020906060840190828701845b8281101561273057815184529284019290840190600101612714565b50505092019290925292915050565b85815284602082015283604082015260a06060820152600061276460a083018561260f565b8281036080840152612776818561260f565b98975050505050505050565b6000602080838503121561279557600080fd5b825167ffffffffffffffff8111156127ac57600080fd5b8301601f810185136127bd57600080fd5b80516127cb612306826122c1565b81815260059190911b820183019083810190878311156127ea57600080fd5b928401925b828410156128115783516128028161266f565b825292840192908401906127ef565b979650505050505050565b600081518084526020808501945080840160005b8381101561286257815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101612830565b509495945050505050565b848152836020820152826040820152608060608201526000612892608083018461281c565b9695505050505050565b8281526040602082015260006123fc604083018461281c565b6000602082840312156128c757600080fd5b81517fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000008116811461216957600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612958576129586125c8565b5060010190565b73ffffffffffffffffffffffffffffffffffffffff8416815260606020820152600061298e606083018561260f565b905063ffffffff83166040830152949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826129e2576129e26129a4565b500490565b6000826129f6576129f66129a4565b500690565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612a3357612a336125c8565b500290565b600082821015612a4a57612a4a6125c8565b50039056fe436861696e53746f72616765436f6e7461696e65722d5343432d62617463686573a2646970667358221220e865968202dc6bd5d0f683522c168d34c8d0795574fb9dc485e02ac66ae7a17e64736f6c63430008090033",
  "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c80637ad168a01161008c578063b768bb1711610066578063b768bb17146101f1578063c17b291b14610204578063cfdf677e1461020d578063e561dddc1461021557600080fd5b80637ad168a0146101bd57806381eb62ef146101c557806389a1d980146101ce57600080fd5b80633cb747bf116100c85780633cb747bf14610161578063461a4478146101815780635b4d90e2146101945780637aa63a86146101a757600080fd5b80630bf3b5f2146100ef5780632169f79f14610104578063299ca47814610117575b600080fd5b6101026100fd366004612271565b61021d565b005b610102610112366004612350565b6103fc565b6000546101379073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6001546101379073ffffffffffffffffffffffffffffffffffffffff1681565b61013761018f3660046123b3565b610807565b6101026101a236600461249b565b6108b4565b6101af610a70565b604051908152602001610158565b6101af610a89565b6101af60035481565b6101e16101dc36600461249b565b610aa2565b6040519015158152602001610158565b6101e16101ff3660046124d0565b610b4a565b6101af60025481565b610137610c14565b6101af610c3c565b610225610a70565b821461029e5760405162461bcd60e51b815260206004820152603d60248201527f41637475616c20626174636820737461727420696e64657820646f6573206e6f60448201527f74206d6174636820657870656374656420737461727420696e6465782e00000060648201526084015b60405180910390fd5b6102dc6040518060400160405280600b81526020017f426f6e644d616e61676572000000000000000000000000000000000000000000815250610807565b6040517f02ad4d2a00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff91909116906302ad4d2a9060240160206040518083038186803b15801561034357600080fd5b505afa158015610357573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061037b919061258d565b6103ed5760405162461bcd60e51b815260206004820152602f60248201527f50726f706f73657220646f6573206e6f74206861766520656e6f75676820636f60448201527f6c6c61746572616c20706f7374656400000000000000000000000000000000006064820152608401610295565b6103f78382610cc3565b505050565b610404610a70565b82146104785760405162461bcd60e51b815260206004820152603d60248201527f41637475616c20626174636820737461727420696e64657820646f6573206e6f60448201527f74206d6174636820657870656374656420737461727420696e6465782e0000006064820152608401610295565b6104b66040518060400160405280600b81526020017f426f6e644d616e61676572000000000000000000000000000000000000000000815250610807565b6040517f02ad4d2a00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff91909116906302ad4d2a9060240160206040518083038186803b15801561051d57600080fd5b505afa158015610531573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610555919061258d565b6105c75760405162461bcd60e51b815260206004820152602f60248201527f50726f706f73657220646f6573206e6f74206861766520656e6f75676820636f60448201527f6c6c61746572616c20706f7374656400000000000000000000000000000000006064820152608401610295565b600083511161063e5760405162461bcd60e51b815260206004820152602360248201527f43616e6e6f74207375626d697420616e20656d7074792073746174652062617460448201527f63682e00000000000000000000000000000000000000000000000000000000006064820152608401610295565b61067c6040518060400160405280601981526020017f43616e6f6e6963616c5472616e73616374696f6e436861696e00000000000000815250610807565b73ffffffffffffffffffffffffffffffffffffffff16637aa63a866040518163ffffffff1660e01b815260040160206040518083038186803b1580156106c157600080fd5b505afa1580156106d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f991906125af565b8351610703610a70565b61070d91906125f7565b11156107a75760405162461bcd60e51b815260206004820152604960248201527f4e756d626572206f6620737461746520726f6f74732063616e6e6f742065786360448201527f65656420746865206e756d626572206f662063616e6f6e6963616c207472616e60648201527f73616374696f6e732e0000000000000000000000000000000000000000000000608482015260a401610295565b6107b2838383610ec2565b6107fd838242336040516020016107e992919091825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b604051602081830303815290604052611000565b6103f783836112b0565b600080546040517fbf40fac100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063bf40fac19061085e90859060040161265c565b60206040518083038186803b15801561087657600080fd5b505afa15801561088a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ae9190612691565b92915050565b6108f26040518060400160405280601181526020017f42564d5f46726175645665726966696572000000000000000000000000000000815250610807565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109925760405162461bcd60e51b815260206004820152603b60248201527f537461746520626174636865732063616e206f6e6c792062652064656c65746560448201527f64206279207468652042564d5f467261756456657269666965722e00000000006064820152608401610295565b61099b816114c7565b6109e75760405162461bcd60e51b815260206004820152601560248201527f496e76616c6964206261746368206865616465722e00000000000000000000006044820152606401610295565b6109f081610aa2565b610a64576040805162461bcd60e51b81526020600482015260248101919091527f537461746520626174636865732063616e206f6e6c792062652064656c65746560448201527f642077697468696e207468652066726175642070726f6f662077696e646f772e6064820152608401610295565b610a6d81611589565b50565b600080610a7b6117ba565b5064ffffffffff1692915050565b600080610a946117ba565b64ffffffffff169392505050565b6000808260a00151806020019051810190610abd91906126ae565b50905080610b335760405162461bcd60e51b815260206004820152602560248201527f4261746368206865616465722074696d657374616d702063616e6e6f7420626560448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610295565b4260025482610b4291906125f7565b119392505050565b6000610b55836114c7565b610ba15760405162461bcd60e51b815260206004820152601560248201527f496e76616c6964206261746368206865616465722e00000000000000000000006044820152606401610295565b610bbe83602001518584600001518560200151876040015161185e565b610c0a5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420696e636c7573696f6e2070726f6f662e00000000000000006044820152606401610295565b5060019392505050565b6000610c37604051806060016040528060218152602001612a5060219139610807565b905090565b6000610c46610c14565b73ffffffffffffffffffffffffffffffffffffffff16631f7b6d326040518163ffffffff1660e01b815260040160206040518083038186803b158015610c8b57600080fd5b505afa158015610c9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c3791906125af565b610d016040518060400160405280601781526020017f50726f78795f5f5453535f47726f75704d616e61676572000000000000000000815250610807565b73ffffffffffffffffffffffffffffffffffffffff16633231a7f083604051602001610d2f91815260200190565b60405160208183030381529060405280519060200120836040518363ffffffff1660e01b8152600401610d639291906126de565b602060405180830381600087803b158015610d7d57600080fd5b505af1158015610d91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610db5919061258d565b610e015760405162461bcd60e51b815260206004820152601760248201527f766572696679207369676e6174757265206661696c65640000000000000000006044820152606401610295565b600082604051602401610e1691815260200190565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167ff523f40d000000000000000000000000000000000000000000000000000000001790529050610e9273deaddeaddeaddeaddeaddeaddeaddeaddead2222621e848083611acc565b60405183907f8ef5d07412def056f6bfc680f359c8a0370cfacb2becaf67d01e2e372e08964a90600090a2505050565b610f006040518060400160405280601781526020017f50726f78795f5f5453535f47726f75704d616e61676572000000000000000000815250610807565b73ffffffffffffffffffffffffffffffffffffffff16633231a7f08484604051602001610f2e9291906126f7565b60405160208183030381529060405280519060200120836040518363ffffffff1660e01b8152600401610f629291906126de565b602060405180830381600087803b158015610f7c57600080fd5b505af1158015610f90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb4919061258d565b6103f75760405162461bcd60e51b815260206004820152601760248201527f766572696679207369676e6174757265206661696c65640000000000000000006044820152606401610295565b60006110406040518060400160405280600c81526020017f42564d5f50726f706f7365720000000000000000000000000000000000000000815250610807565b905060008061104d6117ba565b90925090503373ffffffffffffffffffffffffffffffffffffffff84161415611077575042611126565b426003548264ffffffffff1661108d91906125f7565b106111265760405162461bcd60e51b815260206004820152604360248201527f43616e6e6f74207075626c69736820737461746520726f6f747320776974686960448201527f6e207468652073657175656e636572207075626c69636174696f6e2077696e6460648201527f6f772e0000000000000000000000000000000000000000000000000000000000608482015260a401610295565b60006040518060c0016040528061113b610c3c565b815260200161114989611b5d565b8152602001885181526020018464ffffffffff16815260200187815260200186815250905080600001517f9cf3ad24eae3fd6d461e2f566b35b95b6d671871d9fcb45f8ac8030e4a8d21b382602001518360400151846060015185608001518660a001516040516111be95949392919061273f565b60405180910390a26111ce610c14565b73ffffffffffffffffffffffffffffffffffffffff16632015276c6111f283612041565b6112178460400151856060015161120991906125f7565b602887811b91909117901b90565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815260048101929092527fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000166024820152604401600060405180830381600087803b15801561128f57600080fd5b505af11580156112a3573d6000803e3d6000fd5b5050505050505050505050565b60006112f06040518060400160405280601781526020017f50726f78795f5f5453535f47726f75704d616e61676572000000000000000000815250610807565b73ffffffffffffffffffffffffffffffffffffffff16632cd00d536040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561133757600080fd5b505af115801561134b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526113739190810190612782565b905060008151116113c65760405162461bcd60e51b815260206004820152601860248201527f67657420747373206d656d6265727320696e206572726f7200000000000000006044820152606401610295565b82516040516000917f0fae75d900000000000000000000000000000000000000000000000000000000916114029186914290879060240161286d565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091529050611485734200000000000000000000000000000000000020621e848083611acc565b42837ff533ef50019763ee9d95ad46e28350b533c11edd472ae7be93e8fae83c1b6d998651856040516114b992919061289c565b60405180910390a350505050565b60006114d1610c14565b82516040517f9507d39a00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9290921691639507d39a916115299160040190815260200190565b60206040518083038186803b15801561154157600080fd5b505afa158015611555573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061157991906125af565b61158283612041565b1492915050565b611591610c14565b73ffffffffffffffffffffffffffffffffffffffff16631f7b6d326040518163ffffffff1660e01b815260040160206040518083038186803b1580156115d657600080fd5b505afa1580156115ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061160e91906125af565b81511061165d5760405162461bcd60e51b815260206004820152601460248201527f496e76616c696420626174636820696e6465782e0000000000000000000000006044820152606401610295565b611666816114c7565b6116b25760405162461bcd60e51b815260206004820152601560248201527f496e76616c6964206261746368206865616465722e00000000000000000000006044820152606401610295565b6116ba610c14565b8151606083015173ffffffffffffffffffffffffffffffffffffffff929092169163167fd681919060281b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815260048101929092527fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000166024820152604401600060405180830381600087803b15801561175d57600080fd5b505af1158015611771573d6000803e3d6000fd5b5050505080600001517f8747b69ce8fdb31c3b9b0a67bd8049ad8c1a69ea417b69b12174068abd9cbd6482602001516040516117af91815260200190565b60405180910390a250565b60008060006117c7610c14565b73ffffffffffffffffffffffffffffffffffffffff1663ccf8f9696040518163ffffffff1660e01b815260040160206040518083038186803b15801561180c57600080fd5b505afa158015611820573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061184491906128b5565b64ffffffffff602882901c169460509190911c9350915050565b60008082116118d55760405162461bcd60e51b815260206004820152603760248201527f4c69625f4d65726b6c65547265653a20546f74616c206c6561766573206d757360448201527f742062652067726561746572207468616e207a65726f2e0000000000000000006064820152608401610295565b8184106119495760405162461bcd60e51b8152602060048201526024808201527f4c69625f4d65726b6c65547265653a20496e646578206f7574206f6620626f7560448201527f6e64732e000000000000000000000000000000000000000000000000000000006064820152608401610295565b6119528261208a565b8351146119ed5760405162461bcd60e51b815260206004820152604d60248201527f4c69625f4d65726b6c65547265653a20546f74616c207369626c696e6773206460448201527f6f6573206e6f7420636f72726563746c7920636f72726573706f6e6420746f2060648201527f746f74616c206c65617665732e00000000000000000000000000000000000000608482015260a401610295565b8460005b8451811015611abf578560011660011415611a5857848181518110611a1857611a186128f7565b602002602001015182604051602001611a3b929190918252602082015260400190565b604051602081830303815290604052805190602001209150611aa6565b81858281518110611a6b57611a6b6128f7565b6020026020010151604051602001611a8d929190918252602082015260400190565b6040516020818303038152906040528051906020012091505b60019590951c9480611ab781612926565b9150506119f1565b5090951495945050505050565b6001546040517f3dbb202b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690633dbb202b90611b269086908590879060040161295f565b600060405180830381600087803b158015611b4057600080fd5b505af1158015611b54573d6000803e3d6000fd5b50505050505050565b600080825111611bd55760405162461bcd60e51b815260206004820152603460248201527f4c69625f4d65726b6c65547265653a204d7573742070726f766964652061742060448201527f6c65617374206f6e65206c65616620686173682e0000000000000000000000006064820152608401610295565b815160011415611c015781600081518110611bf257611bf26128f7565b60200260200101519050919050565b60408051610200810182527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56381527f633dc4d7da7256660a892f8f1604a44b5432649cc8ec5cb3ced4c4e6ac94dd1d60208201527f890740a8eb06ce9be422cb8da5cdafc2b58c0a5e24036c578de2a433c828ff7d818301527f3b8ec09e026fdc305365dfc94e189a81b38c7597b3d941c279f042e8206e0bd86060808301919091527fecd50eee38e386bd62be9bedb990706951b65fe053bd9d8a521af753d139e2da60808301527fdefff6d330bb5403f63b14f33b578274160de3a50df4efecf0e0db73bcdd3da560a08301527f617bdd11f7c0a11f49db22f629387a12da7596f9d1704d7465177c63d88ec7d760c08301527f292c23a9aa1d8bea7e2435e555a4a60e379a5a35f3f452bae60121073fb6eead60e08301527fe1cea92ed99acdcb045a6726b2f87107e8a61620a232cf4d7d5b5766b3952e106101008301527f7ad66c0a68c72cb89e4fb4303841966e4062a76ab97451e3b9fb526a5ceb7f826101208301527fe026cc5a4aed3c22a58cbd3d2ac754c9352c5436f638042dca99034e836365166101408301527f3d04cffd8b46a874edf5cfae63077de85f849a660426697b06a829c70dd1409c6101608301527fad676aa337a485e4728a0b240d92b3ef7b3c372d06d189322bfd5f61f1e7203e6101808301527fa2fca4a49658f9fab7aa63289c91b7c7b6c832a6d0e69334ff5b0a3483d09dab6101a08301527f4ebfd9cd7bca2505f7bef59cc1c12ecc708fff26ae4af19abe852afe9e20c8626101c08301527f2def10d13dd169f550f578bda343d9717a138562e0093b380a1120789d53cf106101e083015282518381529081018352909160009190602082018180368337505085519192506000918291508180805b600184111561201757611eb26002856129d3565b9150611ebf6002856129e7565b600114905060005b82811015611f6b578a611edb8260026129fb565b81518110611eeb57611eeb6128f7565b602002602001015196508a816002611f0391906129fb565b611f0e9060016125f7565b81518110611f1e57611f1e6128f7565b6020026020010151955086602089015285604089015287805190602001208b8281518110611f4e57611f4e6128f7565b602090810291909101015280611f6381612926565b915050611ec7565b508015611fe75789611f7e600186612a38565b81518110611f8e57611f8e6128f7565b60200260200101519550878360108110611faa57611faa6128f7565b602002015160001b945085602088015284604088015286805190602001208a8381518110611fda57611fda6128f7565b6020026020010181815250505b80611ff3576000611ff6565b60015b6120039060ff16836125f7565b93508261200f81612926565b935050611e9e565b8960008151811061202a5761202a6128f7565b602002602001015198505050505050505050919050565b6020808201516040808401516060850151608086015160a0870151935160009661206d9695910161273f565b604051602081830303815290604052805190602001209050919050565b60008082116121015760405162461bcd60e51b815260206004820152603060248201527f4c69625f4d65726b6c65547265653a2043616e6e6f7420636f6d70757465206360448201527f65696c286c6f675f3229206f6620302e000000000000000000000000000000006064820152608401610295565b816001141561211257506000919050565b81600060805b60018110612150578061212e600180831b612a38565b901b8316156121485761214181836125f7565b92811c9291505b60011c612118565b506001811b8414612169576121666001826125f7565b90505b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160c0810167ffffffffffffffff811182821017156121c2576121c2612170565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156121f1576121f1612170565b604052919050565b600067ffffffffffffffff83111561221357612213612170565b6122266020601f19601f860116016121c8565b905082815283838301111561223a57600080fd5b828260208301376000602084830101529392505050565b600082601f83011261226257600080fd5b612169838335602085016121f9565b60008060006060848603121561228657600080fd5b8335925060208401359150604084013567ffffffffffffffff8111156122ab57600080fd5b6122b786828701612251565b9150509250925092565b600067ffffffffffffffff8211156122db576122db612170565b5060051b60200190565b600082601f8301126122f657600080fd5b8135602061230b612306836122c1565b6121c8565b82815260059290921b8401810191818101908684111561232a57600080fd5b8286015b84811015612345578035835291830191830161232e565b509695505050505050565b60008060006060848603121561236557600080fd5b833567ffffffffffffffff8082111561237d57600080fd5b612389878388016122e5565b94506020860135935060408601359150808211156123a657600080fd5b506122b786828701612251565b6000602082840312156123c557600080fd5b813567ffffffffffffffff8111156123dc57600080fd5b8201601f810184136123ed57600080fd5b6123fc848235602084016121f9565b949350505050565b600060c0828403121561241657600080fd5b61241e61219f565b905081358152602082013560208201526040820135604082015260608201356060820152608082013567ffffffffffffffff8082111561245d57600080fd5b61246985838601612251565b608084015260a084013591508082111561248257600080fd5b5061248f84828501612251565b60a08301525092915050565b6000602082840312156124ad57600080fd5b813567ffffffffffffffff8111156124c457600080fd5b6123fc84828501612404565b6000806000606084860312156124e557600080fd5b83359250602084013567ffffffffffffffff8082111561250457600080fd5b61251087838801612404565b9350604086013591508082111561252657600080fd5b908501906040828803121561253a57600080fd5b60405160408101818110838211171561255557612555612170565b6040528235815260208301358281111561256e57600080fd5b61257a898286016122e5565b6020830152508093505050509250925092565b60006020828403121561259f57600080fd5b8151801515811461216957600080fd5b6000602082840312156125c157600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561260a5761260a6125c8565b500190565b6000815180845260005b8181101561263557602081850181015186830182015201612619565b81811115612647576000602083870101525b50601f01601f19169290920160200192915050565b602081526000612169602083018461260f565b73ffffffffffffffffffffffffffffffffffffffff81168114610a6d57600080fd5b6000602082840312156126a357600080fd5b81516121698161266f565b600080604083850312156126c157600080fd5b8251915060208301516126d38161266f565b809150509250929050565b8281526040602082015260006123fc604083018461260f565b604080825283519082018190526000906020906060840190828701845b8281101561273057815184529284019290840190600101612714565b50505092019290925292915050565b85815284602082015283604082015260a06060820152600061276460a083018561260f565b8281036080840152612776818561260f565b98975050505050505050565b6000602080838503121561279557600080fd5b825167ffffffffffffffff8111156127ac57600080fd5b8301601f810185136127bd57600080fd5b80516127cb612306826122c1565b81815260059190911b820183019083810190878311156127ea57600080fd5b928401925b828410156128115783516128028161266f565b825292840192908401906127ef565b979650505050505050565b600081518084526020808501945080840160005b8381101561286257815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101612830565b509495945050505050565b848152836020820152826040820152608060608201526000612892608083018461281c565b9695505050505050565b8281526040602082015260006123fc604083018461281c565b6000602082840312156128c757600080fd5b81517fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000008116811461216957600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612958576129586125c8565b5060010190565b73ffffffffffffffffffffffffffffffffffffffff8416815260606020820152600061298e606083018561260f565b905063ffffffff83166040830152949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826129e2576129e26129a4565b500490565b6000826129f6576129f66129a4565b500690565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612a3357612a336125c8565b500290565b600082821015612a4a57612a4a6125c8565b50039056fe436861696e53746f72616765436f6e7461696e65722d5343432d62617463686573a2646970667358221220e865968202dc6bd5d0f683522c168d34c8d0795574fb9dc485e02ac66ae7a17e64736f6c63430008090033",
  "devdoc": {
    "details": "The State Commitment Chain (SCC) contract contains a list of proposed state roots which Proposers assert to be a result of each transaction in the Canonical Transaction Chain (CTC). Elements here have a 1:1 correspondence with transactions in the CTC, and should be the unique state root calculated off-chain by applying the canonical transactions one by one.",
    "kind": "dev",
    "methods": {
      "appendStateBatch(bytes32[],uint256,bytes)": {
        "params": {
          "_batch": "Batch of state roots.",
          "_shouldStartAtElement": "Index of the element at which this batch should start."
        }
      },
      "batches()": {
        "returns": {
          "_0": "Reference to the batch storage container."
        }
      },
      "constructor": {
        "params": {
          "_libAddressManager": "Address of the Address Manager."
        }
      },
      "deleteStateBatch((uint256,bytes32,uint256,uint256,bytes,bytes))": {
        "params": {
          "_batchHeader": "Header of the batch to start deleting from."
        }
      },
      "getLastSequencerTimestamp()": {
        "returns": {
          "_lastSequencerTimestamp": "Last sequencer batch timestamp."
        }
      },
      "getTotalBatches()": {
        "returns": {
          "_totalBatches": "Total submitted batches."
        }
      },
      "getTotalElements()": {
        "returns": {
          "_totalElements": "Total submitted elements."
        }
      },
      "insideFraudProofWindow((uint256,bytes32,uint256,uint256,bytes,bytes))": {
        "params": {
          "_batchHeader": "Header of the batch to check."
        },
        "returns": {
          "_inside": "Whether or not the batch is inside the fraud proof window."
        }
      },
      "resolve(string)": {
        "params": {
          "_name": "Name to resolve an address for."
        },
        "returns": {
          "_0": "Address associated with the given name."
        }
      },
      "rollBackL2Chain(uint256,uint256,bytes)": {
        "params": {
          "_shouldRollBack": "roll back to should start .",
          "_shouldStartAtElement": "Index of the element at which this batch should start",
          "_signature": "signature of rollback message"
        }
      },
      "verifyStateCommitment(bytes32,(uint256,bytes32,uint256,uint256,bytes,bytes),(uint256,bytes32[]))": {
        "params": {
          "_batchHeader": "Header of the batch in which the element was included.",
          "_element": "Hash of the element to verify a proof for.",
          "_proof": "Merkle inclusion proof for the element."
        }
      }
    },
    "title": "StateCommitmentChain",
    "version": 1
  },
  "userdoc": {
    "kind": "user",
    "methods": {
      "appendStateBatch(bytes32[],uint256,bytes)": {
        "notice": "Appends a batch of state roots to the chain."
      },
      "batches()": {
        "notice": "Accesses the batch storage container."
      },
      "deleteStateBatch((uint256,bytes32,uint256,uint256,bytes,bytes))": {
        "notice": "Deletes all state roots after (and including) a given batch."
      },
      "getLastSequencerTimestamp()": {
        "notice": "Retrieves the timestamp of the last batch submitted by the sequencer."
      },
      "getTotalBatches()": {
        "notice": "Retrieves the total number of batches submitted."
      },
      "getTotalElements()": {
        "notice": "Retrieves the total number of elements submitted."
      },
      "insideFraudProofWindow((uint256,bytes32,uint256,uint256,bytes,bytes))": {
        "notice": "Checks whether a given batch is still inside its fraud proof window."
      },
      "resolve(string)": {
        "notice": "Resolves the address associated with a given name."
      },
      "rollBackL2Chain(uint256,uint256,bytes)": {
        "notice": "Emit event to notify sequencers to roll back."
      },
      "verifyStateCommitment(bytes32,(uint256,bytes32,uint256,uint256,bytes,bytes),(uint256,bytes32[]))": {
        "notice": "Verifies a batch inclusion proof."
      }
    },
    "version": 1
  },
  "storageLayout": {
    "storage": [
      {
        "astId": 17983,
        "contract": "contracts/L1/rollup/StateCommitmentChain.sol:StateCommitmentChain",
        "label": "libAddressManager",
        "offset": 0,
        "slot": "0",
        "type": "t_contract(Lib_AddressManager)17975"
      },
      {
        "astId": 13122,
        "contract": "contracts/L1/rollup/StateCommitmentChain.sol:StateCommitmentChain",
        "label": "messenger",
        "offset": 0,
        "slot": "1",
        "type": "t_address"
      },
      {
        "astId": 7021,
        "contract": "contracts/L1/rollup/StateCommitmentChain.sol:StateCommitmentChain",
        "label": "FRAUD_PROOF_WINDOW",
        "offset": 0,
        "slot": "2",
        "type": "t_uint256"
      },
      {
        "astId": 7023,
        "contract": "contracts/L1/rollup/StateCommitmentChain.sol:StateCommitmentChain",
        "label": "SEQUENCER_PUBLISH_WINDOW",
        "offset": 0,
        "slot": "3",
        "type": "t_uint256"
      }
    ],
    "types": {
      "t_address": {
        "encoding": "inplace",
        "label": "address",
        "numberOfBytes": "20"
      },
      "t_contract(Lib_AddressManager)17975": {
        "encoding": "inplace",
        "label": "contract Lib_AddressManager",
        "numberOfBytes": "20"
      },
      "t_uint256": {
        "encoding": "inplace",
        "label": "uint256",
        "numberOfBytes": "32"
      }
    }
  }
}