{
  "address": "0x6D2dE2ACD07aD7E107578863b046926f87d0D703",
  "abi": [
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint8",
          "name": "version",
          "type": "uint8"
        }
      ],
      "name": "Initialized",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "provider",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "bytes32",
          "name": "account",
          "type": "bytes32"
        },
        {
          "indexed": false,
          "internalType": "string",
          "name": "content",
          "type": "string"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "size",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "count",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "expiration",
          "type": "uint256"
        }
      ],
      "name": "Insert",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "previousOwner",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "newOwner",
          "type": "address"
        }
      ],
      "name": "OwnershipTransferred",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "provider",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "bytes32",
          "name": "account",
          "type": "bytes32"
        },
        {
          "indexed": false,
          "internalType": "string",
          "name": "content",
          "type": "string"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "size",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "count",
          "type": "uint256"
        }
      ],
      "name": "Remove",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "contract IRouter",
          "name": "router",
          "type": "address"
        }
      ],
      "name": "RouterUpdated",
      "type": "event"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "provider",
          "type": "address"
        },
        {
          "internalType": "bytes32",
          "name": "account",
          "type": "bytes32"
        },
        {
          "internalType": "string",
          "name": "content",
          "type": "string"
        }
      ],
      "name": "exists",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "owner",
          "type": "address"
        },
        {
          "internalType": "contract IRouter",
          "name": "router",
          "type": "address"
        }
      ],
      "name": "initialize",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bytes32",
          "name": "account",
          "type": "bytes32"
        },
        {
          "internalType": "string",
          "name": "content",
          "type": "string"
        },
        {
          "internalType": "uint256",
          "name": "size",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "count",
          "type": "uint256"
        }
      ],
      "name": "insert",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bytes32[]",
          "name": "accounts",
          "type": "bytes32[]"
        },
        {
          "internalType": "string[]",
          "name": "contents",
          "type": "string[]"
        },
        {
          "internalType": "uint256[]",
          "name": "sizes",
          "type": "uint256[]"
        },
        {
          "internalType": "uint256[]",
          "name": "counts",
          "type": "uint256[]"
        }
      ],
      "name": "insertMult",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        },
        {
          "internalType": "bytes32",
          "name": "",
          "type": "bytes32"
        },
        {
          "internalType": "string",
          "name": "",
          "type": "string"
        }
      ],
      "name": "metas",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "size",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "count",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "owner",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bytes32",
          "name": "account",
          "type": "bytes32"
        },
        {
          "internalType": "string",
          "name": "content",
          "type": "string"
        }
      ],
      "name": "remove",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bytes32[]",
          "name": "accounts",
          "type": "bytes32[]"
        },
        {
          "internalType": "string[]",
          "name": "contents",
          "type": "string[]"
        }
      ],
      "name": "removeMult",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "renounceOwnership",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "router",
      "outputs": [
        {
          "internalType": "contract IRouter",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "provider",
          "type": "address"
        },
        {
          "internalType": "bytes32",
          "name": "account",
          "type": "bytes32"
        },
        {
          "internalType": "string",
          "name": "content",
          "type": "string"
        }
      ],
      "name": "size",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "newOwner",
          "type": "address"
        }
      ],
      "name": "transferOwnership",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }
  ],
  "transactionHash": "0x09f1f0d52227aa013da633701014043cd5146f592d3d945db46e175941e601f4",
  "receipt": {
    "to": null,
    "from": "0xe5bab2D79EB833FA25906Cd90540339C9aB8AE70",
    "contractAddress": "0x6D2dE2ACD07aD7E107578863b046926f87d0D703",
    "transactionIndex": 4,
    "gasUsed": "1675824",
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000020000000000000000000001000000000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080080000000000000000000000000400000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000200004000000000000000000001000000000000000000000000000000100000000000000000000000000000000000000000000000000100000000000000000000100000",
    "blockHash": "0x1aa6e1b340835960b26b8f267fcbd20cf103bcb7dd981469aa7aac8075e32151",
    "transactionHash": "0x09f1f0d52227aa013da633701014043cd5146f592d3d945db46e175941e601f4",
    "logs": [
      {
        "transactionIndex": 4,
        "blockNumber": 30097211,
        "transactionHash": "0x09f1f0d52227aa013da633701014043cd5146f592d3d945db46e175941e601f4",
        "address": "0x0000000000000000000000000000000000001010",
        "topics": [
          "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63",
          "0x0000000000000000000000000000000000000000000000000000000000001010",
          "0x000000000000000000000000e5bab2d79eb833fa25906cd90540339c9ab8ae70",
          "0x0000000000000000000000002a998cc0bb43dc510e523fe33c8f1c04bf607a1e"
        ],
        "data": "0x00000000000000000000000000000000000000000000000004a6b90f46fc30100000000000000000000000000000000000000000000000004e55527be1b560000000000000000000000000000000000000000000000024d8dca8de2e399267da00000000000000000000000000000000000000000000000049ae996c9ab92ff00000000000000000000000000000000000000000000024d8e14f973d808e97ea",
        "logIndex": 17,
        "blockHash": "0x1aa6e1b340835960b26b8f267fcbd20cf103bcb7dd981469aa7aac8075e32151"
      }
    ],
    "blockNumber": 30097211,
    "cumulativeGasUsed": "2030393",
    "status": 1,
    "byzantium": true
  },
  "args": [],
  "numDeployments": 1,
  "solcInputHash": "0c8e7ccecb4fe6e567d57bbef920b756",
  "metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"account\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"content\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"}],\"name\":\"Insert\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"account\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"content\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"name\":\"Remove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract IRouter\",\"name\":\"router\",\"type\":\"address\"}],\"name\":\"RouterUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"account\",\"type\":\"bytes32\"},{\"internalType\":\"string\",\"name\":\"content\",\"type\":\"string\"}],\"name\":\"exists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"contract IRouter\",\"name\":\"router\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"account\",\"type\":\"bytes32\"},{\"internalType\":\"string\",\"name\":\"content\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"name\":\"insert\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"accounts\",\"type\":\"bytes32[]\"},{\"internalType\":\"string[]\",\"name\":\"contents\",\"type\":\"string[]\"},{\"internalType\":\"uint256[]\",\"name\":\"sizes\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"counts\",\"type\":\"uint256[]\"}],\"name\":\"insertMult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"metas\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"account\",\"type\":\"bytes32\"},{\"internalType\":\"string\",\"name\":\"content\",\"type\":\"string\"}],\"name\":\"remove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"accounts\",\"type\":\"bytes32[]\"},{\"internalType\":\"string[]\",\"name\":\"contents\",\"type\":\"string[]\"}],\"name\":\"removeMult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"router\",\"outputs\":[{\"internalType\":\"contract IRouter\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"account\",\"type\":\"bytes32\"},{\"internalType\":\"string\",\"name\":\"content\",\"type\":\"string\"}],\"name\":\"size\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Alexandas\",\"details\":\"IPFS content tracer\",\"events\":{\"Insert(address,bytes32,string,uint256,uint256,uint256)\":{\"details\":\"emit when ipfs content inserted\",\"params\":{\"account\":\"user account\",\"content\":\"ipfs content\",\"count\":\"ipfs content count\",\"expiration\":\"ipfs content expiration\",\"provider\":\"provider address\",\"size\":\"ipfs content size\"}},\"Remove(address,bytes32,string,uint256,uint256)\":{\"details\":\"emit when ipfs content removed\",\"params\":{\"account\":\"user account\",\"content\":\"ipfs content\",\"count\":\"ipfs content count\",\"provider\":\"provider address\",\"size\":\"ipfs content size\"}}},\"kind\":\"dev\",\"methods\":{\"exists(address,bytes32,string)\":{\"details\":\"return whether ipfs content exists in provider\",\"params\":{\"account\":\"user account\",\"content\":\"ipfs content\",\"provider\":\"provider address\"},\"returns\":{\"_0\":\"ipfs ipfs content exists\"}},\"initialize(address,address)\":{\"details\":\"proxy initialize function\",\"params\":{\"owner\":\"contract owner\",\"router\":\"router contract address\"}},\"insert(bytes32,string,uint256,uint256)\":{\"details\":\"insert ipfs content\",\"params\":{\"account\":\"user account\",\"content\":\"ipfs content\",\"count\":\"array of ipfs content count\",\"size\":\"ipfs account size\"}},\"insertMult(bytes32[],string[],uint256[],uint256[])\":{\"details\":\"insert multiple ipfs content for accounts\",\"params\":{\"accounts\":\"array of user account\",\"contents\":\"array of ipfs contents\",\"counts\":\"array of ipfs content count\",\"sizes\":\"array of ipfs content size\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"remove(bytes32,string)\":{\"details\":\"remove ipfs content\",\"params\":{\"account\":\"user account\",\"content\":\"ipfs content\"}},\"removeMult(bytes32[],string[])\":{\"details\":\"remove ipfs content\",\"params\":{\"accounts\":\"array of user account\",\"contents\":\"array of ipfs contents\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"size(address,bytes32,string)\":{\"details\":\"return ipfs content size\",\"params\":{\"account\":\"user account\",\"content\":\"ipfs content\",\"provider\":\"provider address\"},\"returns\":{\"_0\":\"ipfs ipfs content size\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"stateVariables\":{\"metas\":{\"details\":\"ipfs content content meta\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/ipfs/ContentTracer.sol\":\"ContentTracer\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"details\":{\"constantOptimizer\":true,\"cse\":true,\"deduplicate\":true,\"inliner\":true,\"jumpdestRemover\":true,\"orderLiterals\":true,\"peephole\":true,\"yul\":false},\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable {\\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    function __Ownable_init() internal onlyInitializing {\\n        __Ownable_init_unchained();\\n    }\\n\\n    function __Ownable_init_unchained() internal onlyInitializing {\\n        _transferOwnership(_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        _transferOwnership(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        _transferOwnership(newOwner);\\n    }\\n\\n    /**\\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n     * Internal function without access restriction.\\n     */\\n    function _transferOwnership(address newOwner) internal virtual {\\n        address oldOwner = _owner;\\n        _owner = newOwner;\\n        emit OwnershipTransferred(oldOwner, newOwner);\\n    }\\n\\n    /**\\n     * @dev This empty reserved space is put in place to allow future versions to add new\\n     * variables without shifting down storage in the inheritance chain.\\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n     */\\n    uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x652fee292f698d8dba81bf287cb71f1682f6483b67ebe601a5f7387dcfc30b34\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/interfaces/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../token/ERC20/IERC20Upgradeable.sol\\\";\\n\",\"keccak256\":\"0xe73087c5001a37cf7186b3709377c7ceb01a0d38fb908723d1464cea66b4958c\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n *     function initialize() initializer public {\\n *         __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n *     }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n *     function initializeV2() reinitializer(2) public {\\n *         __ERC20Permit_init(\\\"MyToken\\\");\\n *     }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n *     _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n    /**\\n     * @dev Indicates that the contract has been initialized.\\n     * @custom:oz-retyped-from bool\\n     */\\n    uint8 private _initialized;\\n\\n    /**\\n     * @dev Indicates that the contract is in the process of being initialized.\\n     */\\n    bool private _initializing;\\n\\n    /**\\n     * @dev Triggered when the contract has been initialized or reinitialized.\\n     */\\n    event Initialized(uint8 version);\\n\\n    /**\\n     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n     * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\n     */\\n    modifier initializer() {\\n        bool isTopLevelCall = _setInitializedVersion(1);\\n        if (isTopLevelCall) {\\n            _initializing = true;\\n        }\\n        _;\\n        if (isTopLevelCall) {\\n            _initializing = false;\\n            emit Initialized(1);\\n        }\\n    }\\n\\n    /**\\n     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n     * used to initialize parent contracts.\\n     *\\n     * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n     * initialization step. This is essential to configure modules that are added through upgrades and that require\\n     * initialization.\\n     *\\n     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n     * a contract, executing them in the right order is up to the developer or operator.\\n     */\\n    modifier reinitializer(uint8 version) {\\n        bool isTopLevelCall = _setInitializedVersion(version);\\n        if (isTopLevelCall) {\\n            _initializing = true;\\n        }\\n        _;\\n        if (isTopLevelCall) {\\n            _initializing = false;\\n            emit Initialized(version);\\n        }\\n    }\\n\\n    /**\\n     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n     * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n     */\\n    modifier onlyInitializing() {\\n        require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n        _;\\n    }\\n\\n    /**\\n     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n     * through proxies.\\n     */\\n    function _disableInitializers() internal virtual {\\n        _setInitializedVersion(type(uint8).max);\\n    }\\n\\n    function _setInitializedVersion(uint8 version) private returns (bool) {\\n        // If the contract is initializing we ignore whether _initialized is set in order to support multiple\\n        // inheritance patterns, but we only do this in the context of a constructor, and for the lowest level\\n        // of initializers, because in other contexts the contract may have been reentered.\\n        if (_initializing) {\\n            require(\\n                version == 1 && !AddressUpgradeable.isContract(address(this)),\\n                \\\"Initializable: contract is already initialized\\\"\\n            );\\n            return false;\\n        } else {\\n            require(_initialized < version, \\\"Initializable: contract is already initialized\\\");\\n            _initialized = version;\\n            return true;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x7454006cccb737612b00104d2f606d728e2818b778e7e55542f063c614ce46ba\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `to`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address to, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `from` to `to` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address from,\\n        address to,\\n        uint256 amount\\n    ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x4e733d3164f73f461eaf9d8087a7ad1ea180bdc8ba0d3d61b0e1ae16d8e63dff\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n    /**\\n     * @dev Returns true if `account` is a contract.\\n     *\\n     * [IMPORTANT]\\n     * ====\\n     * It is unsafe to assume that an address for which this function returns\\n     * false is an externally-owned account (EOA) and not a contract.\\n     *\\n     * Among others, `isContract` will return false for the following\\n     * types of addresses:\\n     *\\n     *  - an externally-owned account\\n     *  - a contract in construction\\n     *  - an address where a contract will be created\\n     *  - an address where a contract lived, but was destroyed\\n     * ====\\n     *\\n     * [IMPORTANT]\\n     * ====\\n     * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n     *\\n     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n     * constructor.\\n     * ====\\n     */\\n    function isContract(address account) internal view returns (bool) {\\n        // This method relies on extcodesize/address.code.length, which returns 0\\n        // for contracts in construction, since the code is only stored at the end\\n        // of the constructor execution.\\n\\n        return account.code.length > 0;\\n    }\\n\\n    /**\\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n     * `recipient`, forwarding all available gas and reverting on errors.\\n     *\\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n     * imposed by `transfer`, making them unable to receive funds via\\n     * `transfer`. {sendValue} removes this limitation.\\n     *\\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n     *\\n     * IMPORTANT: because control is transferred to `recipient`, care must be\\n     * taken to not create reentrancy vulnerabilities. Consider using\\n     * {ReentrancyGuard} or the\\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n     */\\n    function sendValue(address payable recipient, uint256 amount) internal {\\n        require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n        (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n        require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n    }\\n\\n    /**\\n     * @dev Performs a Solidity function call using a low level `call`. A\\n     * plain `call` is an unsafe replacement for a function call: use this\\n     * function instead.\\n     *\\n     * If `target` reverts with a revert reason, it is bubbled up by this\\n     * function (like regular Solidity function calls).\\n     *\\n     * Returns the raw returned data. To convert to the expected return value,\\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n     *\\n     * Requirements:\\n     *\\n     * - `target` must be a contract.\\n     * - calling `target` with `data` must not revert.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n        return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n     * `errorMessage` as a fallback revert reason when `target` reverts.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCall(\\n        address target,\\n        bytes memory data,\\n        string memory errorMessage\\n    ) internal returns (bytes memory) {\\n        return functionCallWithValue(target, data, 0, errorMessage);\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n     * but also transferring `value` wei to `target`.\\n     *\\n     * Requirements:\\n     *\\n     * - the calling contract must have an ETH balance of at least `value`.\\n     * - the called Solidity function must be `payable`.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCallWithValue(\\n        address target,\\n        bytes memory data,\\n        uint256 value\\n    ) internal returns (bytes memory) {\\n        return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCallWithValue(\\n        address target,\\n        bytes memory data,\\n        uint256 value,\\n        string memory errorMessage\\n    ) internal returns (bytes memory) {\\n        require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n        require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\\n        return verifyCallResult(success, returndata, errorMessage);\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n     * but performing a static call.\\n     *\\n     * _Available since v3.3._\\n     */\\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n        return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n     * but performing a static call.\\n     *\\n     * _Available since v3.3._\\n     */\\n    function functionStaticCall(\\n        address target,\\n        bytes memory data,\\n        string memory errorMessage\\n    ) internal view returns (bytes memory) {\\n        require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n        (bool success, bytes memory returndata) = target.staticcall(data);\\n        return verifyCallResult(success, returndata, errorMessage);\\n    }\\n\\n    /**\\n     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n     * revert reason using the provided one.\\n     *\\n     * _Available since v4.3._\\n     */\\n    function verifyCallResult(\\n        bool success,\\n        bytes memory returndata,\\n        string memory errorMessage\\n    ) internal pure returns (bytes memory) {\\n        if (success) {\\n            return returndata;\\n        } else {\\n            // Look for revert reason and bubble it up if present\\n            if (returndata.length > 0) {\\n                // The easiest way to bubble the revert reason is using memory via assembly\\n\\n                assembly {\\n                    let returndata_size := mload(returndata)\\n                    revert(add(32, returndata), returndata_size)\\n                }\\n            } else {\\n                revert(errorMessage);\\n            }\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x55cf2bd9fc76704ddcdc19834cd288b7de00fc0f298a40ea16a954ae8991db2d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\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 ContextUpgradeable is Initializable {\\n    function __Context_init() internal onlyInitializing {\\n    }\\n\\n    function __Context_init_unchained() internal onlyInitializing {\\n    }\\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    /**\\n     * @dev This empty reserved space is put in place to allow future versions to add new\\n     * variables without shifting down storage in the inheritance chain.\\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n     */\\n    uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMathUpgradeable {\\n    /**\\n     * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n     *\\n     * _Available since v3.4._\\n     */\\n    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n        unchecked {\\n            uint256 c = a + b;\\n            if (c < a) return (false, 0);\\n            return (true, c);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n     *\\n     * _Available since v3.4._\\n     */\\n    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n        unchecked {\\n            if (b > a) return (false, 0);\\n            return (true, a - b);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n     *\\n     * _Available since v3.4._\\n     */\\n    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n        unchecked {\\n            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n            // benefit is lost if 'b' is also tested.\\n            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n            if (a == 0) return (true, 0);\\n            uint256 c = a * b;\\n            if (c / a != b) return (false, 0);\\n            return (true, c);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n     *\\n     * _Available since v3.4._\\n     */\\n    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n        unchecked {\\n            if (b == 0) return (false, 0);\\n            return (true, a / b);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n     *\\n     * _Available since v3.4._\\n     */\\n    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n        unchecked {\\n            if (b == 0) return (false, 0);\\n            return (true, a % b);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the addition of two unsigned integers, reverting on\\n     * overflow.\\n     *\\n     * Counterpart to Solidity's `+` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Addition cannot overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a + b;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a - b;\\n    }\\n\\n    /**\\n     * @dev Returns the multiplication of two unsigned integers, reverting on\\n     * overflow.\\n     *\\n     * Counterpart to Solidity's `*` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Multiplication cannot overflow.\\n     */\\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a * b;\\n    }\\n\\n    /**\\n     * @dev Returns the integer division of two unsigned integers, reverting on\\n     * division by zero. The result is rounded towards zero.\\n     *\\n     * Counterpart to Solidity's `/` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - The divisor cannot be zero.\\n     */\\n    function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a / b;\\n    }\\n\\n    /**\\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n     * reverting when dividing by zero.\\n     *\\n     * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\\n     * invalid opcode to revert (consuming all remaining gas).\\n     *\\n     * Requirements:\\n     *\\n     * - The divisor cannot be zero.\\n     */\\n    function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a % b;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n     * overflow (when the result is negative).\\n     *\\n     * CAUTION: This function is deprecated because it requires allocating memory for the error\\n     * message unnecessarily. For custom revert reasons use {trySub}.\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(\\n        uint256 a,\\n        uint256 b,\\n        string memory errorMessage\\n    ) internal pure returns (uint256) {\\n        unchecked {\\n            require(b <= a, errorMessage);\\n            return a - b;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n     * division by zero. The result is rounded towards zero.\\n     *\\n     * Counterpart to Solidity's `/` operator. Note: this function uses a\\n     * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n     * uses an invalid opcode to revert (consuming all remaining gas).\\n     *\\n     * Requirements:\\n     *\\n     * - The divisor cannot be zero.\\n     */\\n    function div(\\n        uint256 a,\\n        uint256 b,\\n        string memory errorMessage\\n    ) internal pure returns (uint256) {\\n        unchecked {\\n            require(b > 0, errorMessage);\\n            return a / b;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n     * reverting with custom message when dividing by zero.\\n     *\\n     * CAUTION: This function is deprecated because it requires allocating memory for the error\\n     * message unnecessarily. For custom revert reasons use {tryMod}.\\n     *\\n     * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\\n     * invalid opcode to revert (consuming all remaining gas).\\n     *\\n     * Requirements:\\n     *\\n     * - The divisor cannot be zero.\\n     */\\n    function mod(\\n        uint256 a,\\n        uint256 b,\\n        string memory errorMessage\\n    ) internal pure returns (uint256) {\\n        unchecked {\\n            require(b > 0, errorMessage);\\n            return a % b;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xcaa8b7861115ea691c77ddbeac140a444e0edcd1d9812a43942c0f6b42b36a49\",\"license\":\"MIT\"},\"contracts/govers/RouterWrapper.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSE\\n\\npragma solidity >=0.8.0;\\nimport '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol';\\nimport '../interfaces/IRouter.sol';\\n\\n/// @author Alexandas\\n/// @dev Router wrapper contract\\nabstract contract RouterWrapper is Initializable {\\n\\t/// @dev router contract address\\n\\tIRouter public router;\\n\\n\\t/// @dev emit when provider registry contract updated\\n\\t/// @param router contract address\\n\\tevent RouterUpdated(IRouter router);\\n\\n\\tmodifier onlyGovernance() {\\n\\t\\tIGovernance governance = router.Governance();\\n\\t\\trequire(msg.sender == address(governance), 'RouterWrapper: caller is not the governance');\\n\\t\\t_;\\n\\t}\\n\\n\\tmodifier onlyProviderController() {\\n\\t\\tIProviderController controller = router.ProviderController();\\n\\t\\trequire(msg.sender == address(controller), 'RouterWrapper: caller is not the provider controller');\\n\\t\\t_;\\n\\t}\\n\\n\\tmodifier onlyProvider() {\\n\\t\\tIProviderRegistry providerRegistry = router.ProviderRegistry();\\n\\t\\trequire(providerRegistry.isProvider(msg.sender), 'RouterWrapper: caller is not the provider');\\n\\t\\t_;\\n\\t}\\n\\n\\tmodifier onlyMessageReceiver() {\\n\\t\\taddress messageReceiver = router.MessageReceiver();\\n\\t\\trequire(msg.sender == messageReceiver, 'RouterWrapper: caller is not message receiver');\\n\\t\\t_;\\n\\t}\\n\\n\\tmodifier onlyDstChainPayment() {\\n\\t\\tIDstChainPayment dstChainPayment = router.DstChainPayment();\\n\\t\\trequire(msg.sender == address(dstChainPayment), 'RouterWrapper: caller is not dst chain payment');\\n\\t\\t_;\\n\\t}\\n\\n\\tmodifier onlyFundPool() {\\n\\t\\tIFundPool pool = router.FundPool();\\n\\t\\trequire(msg.sender == address(pool), 'RouterWrapper: caller is not fund pool');\\n\\t\\t_;\\n\\t}\\n\\n\\t/// @dev initialize provider registry contract\\n\\t/// @param _router contract address\\n\\tfunction __Init_Router(IRouter _router) internal onlyInitializing {\\n\\t\\t_setRouter(_router);\\n\\t}\\n\\n\\tfunction _setRouter(IRouter _router) internal {\\n\\t\\trequire(address(_router) != address(0), 'RouterWrapper: zero address');\\n\\t\\trouter = _router;\\n\\t\\temit RouterUpdated(_router);\\n\\t}\\n}\\n\",\"keccak256\":\"0x0867787020dc7ff95048c08570a69761ebdb8608517829cd122ef9677da8c45f\",\"license\":\"UNLICENSE\"},\"contracts/interfaces/IBilling.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSE\\n\\npragma solidity >=0.8.0;\\n\\nimport '@openzeppelin/contracts-upgradeable/interfaces/IERC20Upgradeable.sol';\\nimport '../libraries/ResourceData.sol';\\nimport '../resources/interfaces/IResourcePriceAdaptor.sol';\\n\\n/// @author Alexandas\\n/// @dev Billing interface\\ninterface IBilling {\\n\\tstruct BillEntry {\\n\\t\\tResourceData.ResourceType resourceType;\\n\\t\\tuint256 amount;\\n\\t}\\n\\n\\tstruct Bill {\\n\\t\\tuint256 indexBlock;\\n\\t\\tBillEntry[] entries;\\n\\t}\\n\\n\\t/// @dev emit when billing types hash updated\\n\\t/// @param hash billing types Hash\\n\\tevent BillingTypesHashUpdated(bytes32 hash);\\n\\n\\t/// @dev emit when bills finalized\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @param bills bills data\\n\\t/// @param amount fee\\n\\t/// @param nonce nonce\\n\\tevent Billing(address provider, bytes32 account, bytes bills, uint256 amount, uint64 nonce);\\n\\n\\t/// @dev get billing types hash\\n\\t/// @return billing types hash\\n\\tfunction billingTypesHash() external view returns (bytes32);\\n\\n\\t/// @dev spend bills\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @param bills billing data\\n\\t/// @param timeout tx timeout\\n\\t/// @param nonce billing nonce\\n\\t/// @param signature billing signature\\n\\t/// @return fee billing fee\\n\\tfunction spend(\\n\\t\\taddress provider,\\n\\t\\tbytes32 account,\\n\\t\\tbytes memory bills,\\n\\t\\tuint256 timeout,\\n\\t\\tuint64 nonce,\\n\\t\\tbytes memory signature\\n\\t) external returns (uint256 fee);\\n\\n\\t/// @dev return balance of provider\\n\\t/// @param provider provider address\\n\\t/// @return balance of provider\\n\\tfunction balanceOf(address provider) external view returns (uint256);\\n\\n\\t/// @dev provider nonces for account\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @param nonce nonce\\n\\t/// @return whether nonce exists\\n\\tfunction nonceExists(\\n\\t\\taddress provider,\\n\\t\\tbytes32 account,\\n\\t\\tuint64 nonce\\n\\t) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x28413ecc2f7477ad5f216bc9e6d543fc567af662ee6a278abad15505ddf19597\",\"license\":\"UNLICENSE\"},\"contracts/interfaces/IDstChainPayment.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSE\\n\\npragma solidity >=0.8.0;\\n\\nimport '@openzeppelin/contracts-upgradeable/interfaces/IERC20Upgradeable.sol';\\nimport '../libraries/ResourceData.sol';\\n\\n/// @author Alexandas\\n/// @dev DstChainPayment interface\\ninterface IDstChainPayment {\\n\\tstruct PaymentPayload {\\n\\t\\taddress provider;\\n\\t\\tuint64 nonce;\\n\\t\\tbytes32 account;\\n\\t\\tResourceData.ValuePayload[] payloads;\\n\\t}\\n\\n\\t/// @dev emit when a user paid\\n\\t/// @param token token address\\n\\t/// @param payload payment payload\\n\\tevent Paid(IERC20Upgradeable token, PaymentPayload payload);\\n\\n\\t/// @dev pay from source chain only called by message receiver\\n\\t/// @param _token token address\\n\\t/// @param dstAmount token amount\\n\\t/// @param message payment payload message bytes\\n\\tfunction payFromSourceChain(\\n\\t\\tIERC20Upgradeable _token,\\n\\t\\tuint256 dstAmount,\\n\\t\\tbytes calldata message\\n\\t) external;\\n\\n\\t/// @dev pay on dst chain\\n\\t/// @param payload payment payload\\n\\t/// @return value payment value\\n\\tfunction pay(PaymentPayload memory payload) external returns (uint256 value);\\n\\n\\t/// @dev decode source chain message\\n\\t/// @param message message bytes\\n\\t/// @return provider provider address\\n\\t/// @return nonce nonce\\n\\t/// @return account user account\\n\\t/// @return payloads payment payloads\\n\\tfunction decodeSourceChainMessage(bytes memory message)\\n\\t\\texternal\\n\\t\\tview\\n\\t\\treturns (\\n\\t\\t\\taddress provider,\\n\\t\\t\\tuint64 nonce,\\n\\t\\t\\tbytes32 account,\\n\\t\\t\\tResourceData.ValuePayload[] memory payloads\\n\\t\\t);\\n\\n\\t/// @dev calculate fee for ipfs storage and expiration\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @param amount ipfs storage amount\\n\\t/// @param expiration ipfs expiration(in seconds)\\n\\t/// @return storageFee ipfs storage fee\\n\\t/// @return expirationFee ipfs expiration fee\\n\\tfunction ipfsAlloctionsFee(\\n\\t\\taddress provider,\\n\\t\\tbytes32 account,\\n\\t\\tuint256 amount,\\n\\t\\tuint256 expiration\\n\\t) external view returns (uint256 storageFee, uint256 expirationFee);\\n\\n\\t/// @dev calculate ipfs storage and expiration with storage fee and expiration fee\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @param storageFee storage fee\\n\\t/// @param expirationFee expiration fee\\n\\t/// @return amount ipfs storage amount\\n\\t/// @return expiration ipfs expiration(in seconds)\\n\\tfunction ipfsAllocations(\\n\\t\\taddress provider,\\n\\t\\tbytes32 account,\\n\\t\\tuint256 storageFee,\\n\\t\\tuint256 expirationFee\\n\\t) external view returns (uint256 amount, uint256 expiration);\\n\\n\\t/// @dev return balance of provider\\n\\t/// @param provider provider address\\n\\t/// @return balance of provider\\n\\tfunction balanceOf(address provider) external view returns (uint256);\\n\\n\\t/// @dev return resource price\\n\\t/// @param provider provider address\\n\\t/// @param resourceType resource type\\n\\t/// @return resource price\\n\\tfunction priceOf(address provider, ResourceData.ResourceType resourceType) external view returns (uint256);\\n\\n\\t/// @dev return value of amount resource\\n\\t/// @param provider provider address\\n\\t/// @param resourceType resource type\\n\\t/// @param amount resource amount\\n\\t/// @return token value\\n\\tfunction getValueOf(\\n\\t\\taddress provider,\\n\\t\\tResourceData.ResourceType resourceType,\\n\\t\\tuint256 amount\\n\\t) external view returns (uint256);\\n\\n\\t/// @dev return resource amount with value\\n\\t/// @param provider provider address\\n\\t/// @param resourceType resource type\\n\\t/// @param value token value\\n\\t/// @return resource amount\\n\\tfunction getAmountOf(\\n\\t\\taddress provider,\\n\\t\\tResourceData.ResourceType resourceType,\\n\\t\\tuint256 value\\n\\t) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb291ce3c1e53e0904a98a9a6578b90caa7b5907db3f1f633a388476fe1dd9b5d\",\"license\":\"UNLICENSE\"},\"contracts/interfaces/IFundPool.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSE\\n\\npragma solidity >=0.8.0;\\n\\n/// @author Alexandas\\n/// @dev FundPool interface\\ninterface IFundPool {\\n\\n\\t/// @dev emit when bill spent\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @param amount token amount\\n\\tevent Spent(address provider, bytes32 account, uint256 amount);\\n\\n\\t/// @dev emit when account recharged\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @param amount token amount\\n\\tevent Recharged(address provider, bytes32 account, uint256 amount);\\n\\n\\t/// @dev emit when user withdrawn\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @param to token receiver\\n\\t/// @param amount token amount\\n\\tevent Withdrawn(address provider, bytes32 account, address to, uint256 amount);\\n\\n\\t/// @dev recharge for account\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @param amount token amount\\n\\tfunction recharge(\\n\\t\\taddress provider,\\n\\t\\tbytes32 account,\\n\\t\\tuint256 amount\\n\\t) external;\\n\\n\\t/// @dev spend bills for account\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @param bills billing data\\n\\t/// @param timeout tx timeout\\n\\t/// @param nonce billing nonce\\n\\t/// @param signature provider signature\\n\\t/// @return fee bills fee\\n\\tfunction spend(\\n\\t\\taddress provider,\\n\\t\\tbytes32 account,\\n\\t\\tbytes memory bills,\\n\\t\\tuint256 timeout,\\n\\t\\tuint64 nonce,\\n\\t\\tbytes memory signature\\n\\t) external returns (uint256 fee);\\n\\n\\t/// @dev withdraw token for account\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @param bills billing data\\n\\t/// @param timeout tx timeout\\n\\t/// @param nonce billing nonce\\n\\t/// @param signature billing signature\\n\\t/// @param to token receiver\\n\\t/// @param amount token amount\\n\\t/// @param signature provider signature\\n\\t/// @return fee bill fee\\n\\tfunction withdraw(\\n\\t\\taddress provider,\\n\\t\\tbytes32 account,\\n\\t\\tbytes memory bills,\\n\\t\\tuint256 timeout,\\n\\t\\tuint64 nonce,\\n\\t\\tbytes memory signature,\\n\\t\\taddress to,\\n\\t\\tuint256 amount\\n\\t) external returns (uint256 fee);\\n\\n\\t/// @dev return wallet of the account\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @return wallet of the account\\n\\tfunction walletOf(address provider, bytes32 account) external view returns (address);\\n\\n\\t/// @dev return balance of account\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @return balance of account account\\n\\tfunction balanceOf(address provider, bytes32 account) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x6612ea3955dc515aa88c904f58f044ebb82753881c4b0cfb128b60f5e949b666\",\"license\":\"UNLICENSE\"},\"contracts/interfaces/IGovernance.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSE\\n\\npragma solidity >=0.8.0;\\n\\nimport './IProviderRegistry.sol';\\nimport '../libraries/ResourceData.sol';\\n\\n/// @author Alexandas\\n/// @dev Governance interface\\ninterface IGovernance {\\n\\t/// @dev emit when governance drip resource to provider\\n\\t/// @param provider provider address\\n\\tevent GovernanceDrip(address provider);\\n\\n\\t/// @dev add a provider\\n\\t/// @param provider address\\n\\tfunction addProvider(address provider) external;\\n\\n\\t/// @dev remove a provider\\n\\t/// @param provider address\\n\\tfunction removeProvider(address provider) external;\\n\\n\\t/// @dev drip resource to provider\\n\\t/// @param provider provider address\\n\\t/// @param payloads resource payloads\\n\\tfunction drip(address provider, ResourceData.AmountPayload[] memory payloads) external;\\n}\\n\",\"keccak256\":\"0xfa284b7879ce25372f1f6c74ee8c7df6d41dedae6f3298b788086473c0d4c215\",\"license\":\"UNLICENSE\"},\"contracts/interfaces/IProviderController.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSE\\n\\npragma solidity >=0.8.0;\\n\\nimport '../libraries/ResourceData.sol';\\n\\n/// @author Alexandas\\n/// @dev provider controller interface\\ninterface IProviderController {\\n\\t/// @dev emit when account registered in provider\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\tevent AccountRegistered(address provider, bytes32 account);\\n\\n\\t/// @dev emit when provider drip resource to account\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\tevent ProviderDripped(address provider, bytes32 account);\\n\\n\\t/// @dev emit when wallet types hash updated\\n\\t/// @param hash wallet types hash\\n\\tevent WalletTypesHashUpdated(bytes32 hash);\\n\\n\\t/// @dev emit when wallet transferred\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @param from original wallet address\\n\\t/// @param to new wallet address\\n\\tevent WalletTransferred(address provider, bytes32 account, address from, address to);\\n\\n\\t/// @dev keccak256(\\\"Wallet(address provider,bytes32 account,address wallet)\\\")\\n\\tfunction walletTypesHash() external view returns (bytes32);\\n\\n\\t/// @dev register account\\n\\t/// @param account user account\\n\\tfunction registerAccount(bytes32 account) external;\\n\\n\\t/// @dev register multiple account\\n\\t/// @param accounts user accounts\\n\\tfunction registerMult(bytes32[] memory accounts) external;\\n\\n\\t/// @dev Explain to a developer any extra details\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @return whether account exists\\n\\tfunction accountExists(address provider, bytes32 account) external view returns (bool);\\n\\n\\t/// @dev provider drip resource to multiple accounts\\n\\t/// @param accounts user accounts\\n\\t/// @param payloads resource amount payloads\\n\\tfunction dripMult(\\n\\t\\tbytes32[] memory accounts,\\n\\t\\tResourceData.AmountPayload[][] memory payloads\\n\\t) external;\\n\\n\\t/// @dev provider drip resource to user account\\n\\t/// @param account user account\\n\\t/// @param payloads resource amount payloads\\n\\tfunction drip(\\n\\t\\tbytes32 account,\\n\\t\\tResourceData.AmountPayload[] memory payloads\\n\\t) external;\\n\\n\\t/// @dev provider register and drip resource for multiple accounts\\n\\t/// @param accounts user accounts\\n\\t/// @param payloads resource amount payloads\\n\\tfunction registerAndDripMult(\\n\\t\\tbytes32[] memory accounts,\\n\\t\\tResourceData.AmountPayload[][] memory payloads\\n\\t) external;\\n\\n\\t/// @dev initialize wallet for the given account\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @param wallet account wallet\\n\\t/// @param signature provider signature\\n\\tfunction initWallet(\\n\\t\\taddress provider,\\n\\t\\tbytes32 account,\\n\\t\\taddress wallet,\\n\\t\\tbytes memory signature\\n\\t) external;\\n\\n\\t/// @dev transfer wallet for the account\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @param newWallet account wallet\\n\\tfunction transferWallet(\\n\\t\\taddress provider,\\n\\t\\tbytes32 account,\\n\\t\\taddress newWallet\\n\\t) external;\\n\\n\\t/// @dev return wallet for the account\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @return wallet for the account\\n\\tfunction walletOf(address provider, bytes32 account) external view returns (address);\\n\\n\\t/// @dev return whether wallet exists\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @return whether wallet exists\\n\\tfunction walletExists(address provider, bytes32 account) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x659cb15e3bf5e88e20b9d09ca05f6d748eac4d51c9251a6d1043fe2fca217dcb\",\"license\":\"UNLICENSE\"},\"contracts/interfaces/IProviderRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSE\\n\\npragma solidity >=0.8.0;\\n\\n/// @author Alexandas\\n/// @dev provider registry interface\\ninterface IProviderRegistry {\\n\\t/// @dev emit when provider is added\\n\\t/// @param provider provider address\\n\\tevent AddProvider(address provider);\\n\\n\\t/// @dev emit when provider removed\\n\\t/// @param provider provider address\\n\\tevent RemoveProvider(address provider);\\n\\n\\tevent AddProivderWallet(address provider, address wallet);\\n\\n\\tevent RemoveProviderWallet(address provider, address wallet);\\n\\n\\t/// @dev add a provider\\n\\t/// @param provider address\\n\\tfunction addProvider(address provider) external;\\n\\n\\t/// @dev remove a provider\\n\\t/// @param provider address\\n\\tfunction removeProvider(address provider) external;\\n\\n\\t/// @dev return whether address is a provider\\n\\t/// @param provider address\\n\\tfunction isProvider(address provider) external view returns (bool);\\n\\n\\t/// @dev return provider wallet\\n\\t/// @param provider address\\n\\t/// @return provider wallet\\n\\tfunction providerWallet(address provider) external view returns (address);\\n\\n\\t/// @dev return provider wallet exists\\n\\t/// @param provider address\\n\\t/// @return whether provider wallet exists\\n\\tfunction providerWalletExists(address provider) external view returns (bool);\\n\\n\\t/// @dev return whether a valid signature\\n\\t/// @param provider address\\n\\t/// @param hash message hash\\n\\t/// @param signature provider signature for message hash\\n\\t/// @return is valid signature\\n\\tfunction isValidSignature(\\n\\t\\taddress provider,\\n\\t\\tbytes32 hash,\\n\\t\\tbytes memory signature\\n\\t) external returns (bool);\\n}\\n\",\"keccak256\":\"0xa51e867c83ef543d6aa67facb3df5952b83ed6aea7fc9c2129a4105377d29bf2\",\"license\":\"UNLICENSE\"},\"contracts/interfaces/IRouter.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSE\\n\\npragma solidity >=0.8.0;\\n\\nimport '@openzeppelin/contracts-upgradeable/interfaces/IERC20Upgradeable.sol';\\n\\nimport '../interfaces/IGovernance.sol';\\nimport '../interfaces/IProviderRegistry.sol';\\nimport '../interfaces/IProviderController.sol';\\nimport '../interfaces/IDstChainPayment.sol';\\nimport '../interfaces/IBilling.sol';\\nimport '../interfaces/IFundPool.sol';\\nimport '../resources/interfaces/INormalResourceController.sol';\\nimport '../resources/interfaces/IIPFSStorageController.sol';\\nimport '../resources/interfaces/IResourcePriceAdaptor.sol';\\n\\n/// @author Alexandas\\n/// @dev Router interface\\ninterface IRouter {\\n\\t/// @dev emit when governance contract address updated\\n\\t/// @param governance governance contract address\\n\\tevent GovernanceUpdated(IGovernance governance);\\n\\n\\t/// @dev emit when message receiver updated\\n\\t/// @param messageReceiver message receiver contract address\\n\\tevent MessageReceiverUpdated(address messageReceiver);\\n\\n\\t/// @dev emit when provider registry contract updated\\n\\t/// @param _providerRegistry provider registry contract\\n\\tevent ProviderRegistryUpdated(IProviderRegistry _providerRegistry);\\n\\n\\t/// @dev emit when dst ProviderController contract address updated\\n\\t/// @param providerController ProviderController contract address\\n\\tevent ProviderControllerUpdated(IProviderController providerController);\\n\\n\\t/// @dev emit when token updated\\n\\t/// @param token token address\\n\\tevent TokenUpdated(IERC20Upgradeable token);\\n\\n\\t/// @dev emit when building time controller updated\\n\\t/// @param buildingTimeController building time controller contract\\n\\tevent BuildingTimeControllerUpdated(INormalResourceController buildingTimeController);\\n\\n\\t/// @dev emit when bandwidth controller updated\\n\\t/// @param bandwidthController bandwidth controller contract\\n\\tevent BandwidthControllerUpdated(INormalResourceController bandwidthController);\\n\\n\\t/// @dev emit when AR storage controller updated\\n\\t/// @param arStorageController AR storage controller contract\\n\\tevent ARStorageControllerUpdated(INormalResourceController arStorageController);\\n\\n\\t/// @dev emit when ipfs storage controller updated\\n\\t/// @param ipfsStorageController IPFS storage controller contract\\n\\tevent IPFSStorageControllerUpdated(IIPFSStorageController ipfsStorageController);\\n\\n\\t/// @dev emit when resource price adaptor updated\\n\\t/// @param resourcePriceAdaptor resource price adaptor contract\\n\\tevent ResourcePriceAdaptorUpdated(IResourcePriceAdaptor resourcePriceAdaptor);\\n\\n\\t/// @dev emit when dst chain payment contract address updated\\n\\t/// @param dstChainPayment dst chain payment contract address\\n\\tevent DstChainPaymentUpdated(IDstChainPayment dstChainPayment);\\n\\n\\t/// @dev emit when billing contract updated\\n\\t/// @param billing billing contract\\n\\tevent BillingUpdated(IBilling billing);\\n\\n\\t/// @dev emit when fund pool contract updated\\n\\t/// @param fundPool fund pool contract\\n\\tevent FundPoolUpdated(IFundPool fundPool);\\n\\n\\t/// @dev message receiver contract address\\n\\tfunction MessageReceiver() external view returns (address);\\n\\n\\t/// @dev Governance contract address\\n\\tfunction Governance() external view returns (IGovernance);\\n\\n\\t/// @dev providers contract address\\n\\tfunction ProviderRegistry() external view returns (IProviderRegistry);\\n\\n\\t/// @dev provider controller contract address\\n\\tfunction ProviderController() external view returns (IProviderController);\\n\\n\\t/// @dev token address\\n\\tfunction Token() external view returns (IERC20Upgradeable);\\n\\n\\t/// @dev return building time controller\\n\\tfunction BuildingTimeController() external view returns (INormalResourceController);\\n\\n\\t/// @dev return bandwidth controller\\n\\tfunction BandwidthController() external view returns (INormalResourceController);\\n\\n\\t/// @dev return AR storage controller\\n\\tfunction ARStorageController() external view returns (INormalResourceController);\\n\\n\\t/// @dev return ipfs storage controller\\n\\tfunction IPFSStorageController() external view returns (IIPFSStorageController);\\n\\n\\t/// @dev return resource price adaptor contract address\\n\\tfunction ResourcePriceAdaptor() external view returns (IResourcePriceAdaptor);\\n\\n\\t/// @dev dst chain payment contract address\\n\\tfunction DstChainPayment() external view returns (IDstChainPayment);\\n\\n\\t/// @dev billing contract address\\n\\tfunction Billing() external view returns (IBilling);\\n\\n\\t/// @dev fund pool contract address\\n\\tfunction FundPool() external view returns (IFundPool);\\n}\\n\",\"keccak256\":\"0x32c01e0f705a5c96ad7550e7cb0e885c5479fa9353445c256eab4e8c0e14e8cf\",\"license\":\"UNLICENSE\"},\"contracts/ipfs/ContentTracer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n\\npragma solidity >=0.8.0;\\n\\nimport '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol';\\nimport '../govers/RouterWrapper.sol';\\n\\n/// @author Alexandas\\n/// @dev IPFS content tracer\\ncontract ContentTracer is RouterWrapper, OwnableUpgradeable {\\n\\tusing SafeMathUpgradeable for uint256;\\n\\n\\tstruct ContentMeta {\\n\\t\\tuint256 size;\\n\\t\\tuint256 count;\\n\\t}\\n\\n\\t/// @dev ipfs content content meta\\n\\tmapping(address => mapping(bytes32 => mapping(string => ContentMeta))) public metas;\\n\\n\\t/// @dev emit when ipfs content inserted\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @param content ipfs content\\n\\t/// @param size ipfs content size\\n\\t/// @param count ipfs content count\\n\\t/// @param expiration ipfs content expiration\\n\\tevent Insert(address provider, bytes32 account, string content, uint256 size, uint256 count, uint256 expiration);\\n\\n\\t/// @dev emit when ipfs content removed\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @param content ipfs content\\n\\t/// @param size ipfs content size\\n\\t/// @param count ipfs content count\\n\\tevent Remove(address provider, bytes32 account, string content, uint256 size, uint256 count);\\n\\n\\tmodifier nonSize(uint256 size) {\\n\\t\\trequire(size > 0, 'ContentTracer: zero size.');\\n\\t\\t_;\\n\\t}\\n\\n\\t/// @dev proxy initialize function\\n\\t/// @param owner contract owner\\n\\t/// @param router router contract address\\n\\tfunction initialize(address owner, IRouter router) external initializer {\\n\\t\\t_transferOwnership(owner);\\n\\t\\t__Init_Router(router);\\n\\t}\\n\\n\\t/// @dev insert multiple ipfs content for accounts\\n\\t/// @param accounts array of user account\\n\\t/// @param contents array of ipfs contents\\n\\t/// @param sizes array of ipfs content size\\n\\t/// @param counts array of ipfs content count\\n\\tfunction insertMult(\\n\\t\\tbytes32[] memory accounts,\\n\\t\\tstring[] memory contents,\\n\\t\\tuint256[] memory sizes,\\n\\t\\tuint256[] memory counts\\n\\t) external onlyProvider {\\n\\t\\trequire(accounts.length == contents.length, 'ContentTracer: Invalid parameter length.');\\n\\t\\trequire(accounts.length == sizes.length, 'ContentTracer: Invalid parameter length.');\\n\\t\\trequire(accounts.length == counts.length, 'ContentTracer: Invalid parameter length.');\\n\\n\\t\\tfor (uint256 i = 0; i < accounts.length; i++) {\\n\\t\\t\\t_insert(msg.sender, accounts[i], contents[i], sizes[i], counts[i]);\\n\\t\\t}\\n\\t}\\n\\n\\t/// @dev insert ipfs content\\n\\t/// @param account user account\\n\\t/// @param content ipfs content\\n\\t/// @param size ipfs account size\\n\\t/// @param count array of ipfs content count\\n\\tfunction insert(\\n\\t\\tbytes32 account,\\n\\t\\tstring memory content,\\n\\t\\tuint256 size,\\n\\t\\tuint256 count\\n\\t) public nonSize(size) onlyProvider {\\n\\t\\t_insert(msg.sender, account, content, size, count);\\n\\t}\\n\\n\\tfunction _insert(\\n\\t\\taddress provider,\\n\\t\\tbytes32 account,\\n\\t\\tstring memory content,\\n\\t\\tuint256 size,\\n\\t\\tuint256 count\\n\\t) internal nonSize(size) {\\n\\t\\tIIPFSStorageController controller = router.IPFSStorageController();\\n\\t\\trequire(!exists(provider, account, content), 'ContentTracer: content exists');\\n\\t\\trequire(!controller.isExpired(provider, account), 'ContentTracer: account expired');\\n\\t\\tmetas[provider][account][content] = ContentMeta(size, count);\\n\\n\\t\\temit Insert(provider, account, content, size, count, controller.expiredAt(provider, account));\\n\\t}\\n\\n\\t/// @dev remove ipfs content\\n\\t/// @param accounts array of user account\\n\\t/// @param contents array of ipfs contents\\n\\tfunction removeMult(bytes32[] memory accounts, string[] memory contents) external onlyProvider {\\n\\t\\trequire(accounts.length == contents.length, 'ContentTracer: Invalid parameter length');\\n\\t\\tfor (uint256 i = 0; i < accounts.length; i++) {\\n\\t\\t\\t_remove(msg.sender, accounts[i], contents[i]);\\n\\t\\t}\\n\\t}\\n\\n\\t/// @dev remove ipfs content\\n\\t/// @param account user account\\n\\t/// @param content ipfs content\\n\\tfunction remove(bytes32 account, string memory content) public onlyProvider {\\n\\t\\t_remove(msg.sender, account, content);\\n\\t}\\n\\n\\tfunction _remove(\\n\\t\\taddress provider,\\n\\t\\tbytes32 account,\\n\\t\\tstring memory content\\n\\t) internal {\\n\\t\\trequire(exists(provider, account, content), 'ContentTracer: nonexistent content');\\n\\t\\tContentMeta memory meta = metas[provider][account][content];\\n\\t\\tdelete metas[provider][account][content];\\n\\n\\t\\temit Remove(provider, account, content, meta.size, meta.count);\\n\\t}\\n\\n\\t/// @dev return whether ipfs content exists in provider\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @param content ipfs content\\n\\t/// @return ipfs ipfs content exists\\n\\tfunction exists(\\n\\t\\taddress provider,\\n\\t\\tbytes32 account,\\n\\t\\tstring memory content\\n\\t) public view returns (bool) {\\n\\t\\treturn metas[provider][account][content].size != 0;\\n\\t}\\n\\n\\t/// @dev return ipfs content size\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @param content ipfs content\\n\\t/// @return ipfs ipfs content size\\n\\tfunction size(\\n\\t\\taddress provider,\\n\\t\\tbytes32 account,\\n\\t\\tstring memory content\\n\\t) public view returns (uint256) {\\n\\t\\trequire(router.ProviderRegistry().isProvider(provider), 'ContentTracer: nonexistent provider');\\n\\t\\trequire(exists(provider, account, content), 'ContentTracer: nonexistent content');\\n\\t\\treturn metas[provider][account][content].size;\\n\\t}\\n}\\n\",\"keccak256\":\"0x0c5157a75c6d6e70a64131409dff634b1d7b16c93a1b74a6e5866ac972b5c099\",\"license\":\"GPL-3.0-only\"},\"contracts/libraries/ResourceData.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSE\\n\\npragma solidity >=0.8.0;\\nimport '@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/interfaces/IERC20Upgradeable.sol';\\n\\n/// @author Alexandas\\n/// @dev resource data library\\nlibrary ResourceData {\\n\\tusing SafeMathUpgradeable for uint256;\\n\\n\\tenum ResourceType {\\n\\t\\tNull,\\n\\t\\tBuildingTime,\\n\\t\\tBandwidth,\\n\\t\\tARStorage,\\n\\t\\tIPFSStorage\\n\\t}\\n\\n\\tstruct ValuePayload {\\n\\t\\tResourceData.ResourceType resourceType;\\n\\t\\tuint256[] values;\\n\\t}\\n\\n\\tstruct AmountPayload {\\n\\t\\tResourceData.ResourceType resourceType;\\n\\t\\tuint256[] amounts;\\n\\t}\\n\\n\\tstruct ValuePayloads {\\n\\t\\tResourceData.ValuePayload[] payloads;\\n\\t}\\n\\n\\tfunction convertSourceChainPayloads(ValuePayloads memory valuePayloads, uint256 dstAmount)\\n\\t\\tinternal\\n\\t\\tpure\\n\\t\\treturns (ResourceData.ValuePayload[] memory newPayloads)\\n\\t{\\n\\t\\tResourceData.ValuePayload[] memory payloads = valuePayloads.payloads;\\n\\t\\trequire(payloads.length > 0, 'ResourceData: invalid payload length');\\n\\t\\tuint256 total = totalValue(payloads);\\n\\t\\trequire(total > 0, 'ResourceData: zero total value');\\n\\t\\tfor (uint256 i = 0; i < payloads.length; i++) {\\n\\t\\t\\trequire(payloads[i].values.length > 0, 'ResourceData: invalid value length');\\n\\t\\t\\tfor (uint256 j = 0; j < payloads[i].values.length; j++) {\\n\\t\\t\\t\\tpayloads[i].values[j] = payloads[i].values[j].mul(dstAmount).div(total);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\treturn payloads;\\n\\t}\\n\\n\\t/// @dev payment payload total value\\n\\t/// @param payloads payment payloads\\n\\t/// @return value total value\\n\\tfunction totalValue(ResourceData.ValuePayload[] memory payloads) internal pure returns (uint256 value) {\\n\\t\\trequire(payloads.length > 0, 'ResourceData: invalid payloads length');\\n\\t\\tfor (uint256 i = 0; i < payloads.length; i++) {\\n\\t\\t\\tfor (uint256 j = 0; j < payloads[i].values.length; j++) {\\n\\t\\t\\t\\tvalue = value.add(payloads[i].values[j]);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t/// @dev match token amount to resource decimals\\n\\t/// @param token token contract address\\n\\t/// @param value token amount with resource decimals\\n\\t/// @return resource value\\n\\tfunction matchTokenToResource(IERC20Upgradeable token, uint256 value) internal view returns (uint256) {\\n\\t\\tuint256 _tokenDecimals = tokenDecimals(token);\\n\\t\\tuint256 _resourceDecimals = decimals();\\n\\t\\tif (_tokenDecimals <= _resourceDecimals) {\\n\\t\\t\\treturn value.mul(10**(_resourceDecimals.sub(_tokenDecimals)));\\n\\t\\t}\\n\\t\\treturn value.div(10**(_tokenDecimals.sub(_resourceDecimals)));\\n\\t}\\n\\n\\t/// @dev match value to token decimals\\n\\t/// @param token token contract address\\n\\t/// @param value resource value\\n\\t/// @return token value\\n\\tfunction matchResourceToToken(IERC20Upgradeable token, uint256 value) internal view returns (uint256) {\\n\\t\\tuint256 _tokenDecimals = tokenDecimals(token);\\n\\t\\tuint256 _resourceDecimals = decimals();\\n\\t\\tif (_tokenDecimals <= _resourceDecimals) {\\n\\t\\t\\treturn value.div(10**(_resourceDecimals.sub(_tokenDecimals)));\\n\\t\\t}\\n\\t\\treturn value.mul(10**(_tokenDecimals.sub(_resourceDecimals)));\\n\\t}\\n\\n\\t/// @dev return resource decimals\\n\\t/// @return resource decimals\\n\\tfunction decimals() internal pure returns (uint256) {\\n\\t\\treturn 18;\\n\\t}\\n\\n\\t/// @dev return token decimals\\n\\t/// @return token decimals\\n\\tfunction tokenDecimals(IERC20Upgradeable token) internal view returns (uint256) {\\n\\t\\t// keccak256(bytes4('decimals()'))\\n\\t\\t(bool success, bytes memory data) = address(token).staticcall(hex'313ce567');\\n\\t\\trequire(success, 'ResourceData: invalid token');\\n\\t\\treturn abi.decode(data, (uint256));\\n\\t}\\n}\\n\",\"keccak256\":\"0x0a952dc446468e24ad4fed971632b1c8408818ed86649ff01e662aa93decb050\",\"license\":\"UNLICENSE\"},\"contracts/resources/interfaces/IIPFSStorageController.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSE\\n\\npragma solidity >=0.8.0;\\nimport '@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol';\\n\\n/// @author Alexandas\\n/// @dev IPFS storage controller interface\\ninterface IIPFSStorageController {\\n\\tstruct Storage {\\n\\t\\tuint256 startTime;\\n\\t\\tuint256 expiration;\\n\\t\\tuint256 amount;\\n\\t}\\n\\n\\t/// @dev emit when ipfs storage allocated for the provider\\n\\t/// @param provider provider address\\n\\t/// @param amount ipfs storage amount\\n\\t/// @param expiration ipfs storage expiration\\n\\tevent ProviderAllocated(address provider, uint256 amount, uint256 expiration);\\n\\n\\t/// @dev emit when ipfs storage allocated for the account\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @param amount ipfs storage amount\\n\\t/// @param expiration ipfs storage expiration\\n\\tevent AccountAllocated(address provider, bytes32 account, uint256 amount, uint256 expiration);\\n\\n\\t/// @dev emit when provider recovered ipfs storage\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @param amount ipfs storage amount\\n\\tevent ProviderRecovered(address provider, bytes32 account, uint256 amount);\\n\\n\\t/// @dev allocate user's normal resource balance\\n\\t/// @param provider provider address\\n\\t/// @param amount resource amount\\n\\t/// @param expiration ipfs expiration\\n\\tfunction allocateProvider(address provider, uint256 amount, uint256 expiration) external;\\n\\n\\t/// @dev provider drip resource to account directly\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @param amount ipfs storage amount\\n\\t/// @param expiration ipfs expiration\\n\\tfunction drip(address provider, bytes32 account, uint256 amount, uint256 expiration) external;\\n\\n\\t/// @dev allocate user's resource balance\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @param amount ipfs storage amount\\n\\t/// @param expiration ipfs expiration\\n\\tfunction paymentAllocate(address provider, bytes32 account, uint256 amount, uint256 expiration) external;\\n\\n\\t/// @dev recover provider storage\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\tfunction recoverStorage(address provider, bytes32 account) external;\\n\\n\\t/// @dev return whether ipfs storage is expired for the provider\\n\\t/// @param provider provider address\\n\\t/// @return whether ipfs storage is expired for the provider\\n\\tfunction isProviderExpired(address provider) external view returns (bool);\\n\\n\\t/// @dev return ipfs storage start time for the provider\\n\\t/// @param provider provider address\\n\\t/// @return start time for the provider\\n\\tfunction providerStartTime(address provider) external view returns (uint256);\\n\\n\\t/// @dev return total expiration time for the provider\\n\\t/// @param provider provider address\\n\\t/// @return total expiration time for the provider\\n\\tfunction providerExpiration(address provider) external view returns (uint256);\\n\\n\\t/// @dev return available expiration time for the provider\\n\\t/// @param provider provider address\\n\\t/// @return available expiration time for the provider\\n\\tfunction providerAvailableExpiration(address provider) external view returns (uint256);\\n\\n\\t/// @dev return when the provider will expire\\n\\t/// @param provider provider address\\n\\t/// @return when the provider will expire\\n\\tfunction providerExpiredAt(address provider) external view returns (uint256);\\n\\n\\t/// @dev return ipfs storage amount for the provider\\n\\t/// @param provider provider address\\n\\t/// @return ipfs storage amount for the provider\\n\\tfunction providerBalanceOf(address provider) external view returns (uint256);\\n\\n\\t/// @dev return whether ipfs storage is expired for the account\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @return whether ipfs storage is expired for the account\\n\\tfunction isExpired(address provider, bytes32 account) external view returns (bool);\\n\\n\\t/// @dev return available expiration time for the account\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @return available expiration time for the account\\n\\tfunction availableExpiration(address provider, bytes32 account) external view returns (uint256);\\n\\n\\t/// @dev return when the account will expire\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @return when the account will expire\\n\\tfunction expiredAt(address provider, bytes32 account) external view returns (uint256);\\n\\n\\t/// @dev return ipfs storage start time for the account\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @return start time for the account\\n\\tfunction startTime(address provider, bytes32 account) external view returns (uint256);\\n\\n\\t/// @dev return total expiration time for the account\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @return total expiration time for the account\\n\\tfunction expiration(address provider, bytes32 account) external view returns (uint256);\\n\\n\\t/// @dev return ipfs storage amount for the account\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @return ipfs storage amount for the account\\n\\tfunction balanceOf(address provider, bytes32 account) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x737cd8d689d7a0ef9211d92c8d052bda00bc16ddb06ce326ee473c3ffc09a654\",\"license\":\"UNLICENSE\"},\"contracts/resources/interfaces/INormalResourceController.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSE\\n\\npragma solidity >=0.8.0;\\n\\n/// @author Alexandas\\n/// @dev normal resource controller interface\\ninterface INormalResourceController {\\n\\n\\t/// @dev emit when resource allocated for the provider\\n\\t/// @param provider provider address\\n\\t/// @param amount ipfs storage amount\\n\\tevent ProviderAllocated(address provider, uint256 amount);\\n\\n\\t/// @dev emit when resource allocated for the account\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @param amount ipfs storage amount\\n\\tevent AccountAllocated(address provider, bytes32 account, uint256 amount);\\n\\n\\t/// @dev allocate resource for the provider\\n\\t/// @param provider provider address\\n\\t/// @param amount resource amount\\n\\tfunction allocateProvider(address provider, uint256 amount) external;\\n\\n\\t/// @dev allocate user's resource balance\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @param amount resource amount\\n\\tfunction paymentAllocate(address provider, bytes32 account, uint256 amount) external;\\n\\n\\t/// @dev provider drip resource to account directly\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @param amount resource amount\\n\\tfunction drip(address provider, bytes32 account, uint256 amount) external;\\n\\n\\t/// @dev resource balance\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @return balance of the account\\n\\tfunction balanceOf(address provider, bytes32 account) external view returns (uint256);\\n\\n\\t/// @dev resource balance\\n\\t/// @param provider provider address\\n\\t/// @return balance of the account\\n\\tfunction providerBalanceOf(address provider) external view returns (uint256);\\n\\n}\\n\",\"keccak256\":\"0x7bf2ade38bde962e0b1430090225c343458a2fa9d002d413468e442a64fe76e7\",\"license\":\"UNLICENSE\"},\"contracts/resources/interfaces/IResourcePriceAdaptor.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSE\\n\\npragma solidity >=0.8.0;\\n\\nimport '../../libraries/ResourceData.sol';\\n\\n/// @author Alexandas\\n/// @dev resource adpator interface\\ninterface IResourcePriceAdaptor {\\n\\tstruct PriceAdaptor {\\n\\t\\tResourceData.ResourceType resourceType;\\n\\t\\tuint256 price;\\n\\t}\\n\\n\\t/// @dev emit when index block updated\\n\\t/// @param provider provider address\\n\\t/// @param priceIndexBlock price index block\\n\\tevent PriceIndexBlockUpdated(address provider, uint256 priceIndexBlock);\\n\\n\\t/// @dev emit when price updated\\n\\t/// @param provider provider address\\n\\t/// @param adaptors price adaptors\\n\\tevent PriceAdaptorsUpdated(address provider, PriceAdaptor[] adaptors);\\n\\n\\t/// @dev get price for resource at a specific block\\n\\t/// @param provider provider address\\n\\t/// @param resourceType resource type\\n\\t/// @param priceIndexBlock block number\\n\\t/// @return price for resource at a specific block\\n\\tfunction priceAt(address provider, ResourceData.ResourceType resourceType, uint256 priceIndexBlock) external view returns (uint256);\\n\\n\\t/// @dev get value for `amount` resource at a specific block\\n\\t/// @param provider provider address\\n\\t/// @param resourceType resource type\\n\\t/// @param amount resource amount\\n\\t/// @param priceIndexBlock block number\\n\\t/// @return token value in resource decimals(18)\\n\\tfunction getValueAt(\\n\\t\\taddress provider,\\n\\t\\tResourceData.ResourceType resourceType,\\n\\t\\tuint256 amount,\\n\\t\\tuint256 priceIndexBlock\\n\\t) external view returns (uint256);\\n\\n\\t/// @dev get amount resource with value at a specific block\\n\\t/// @param provider provider address\\n\\t/// @param resourceType resource type\\n\\t/// @param value token value\\n\\t/// @param priceIndexBlock block numer\\n\\t/// @return resource amount\\n\\tfunction getAmountAt(\\n\\t\\taddress provider,\\n\\t\\tResourceData.ResourceType resourceType,\\n\\t\\tuint256 value,\\n\\t\\tuint256 priceIndexBlock\\n\\t) external view returns (uint256);\\n\\n\\t/// @dev return resource price\\n\\t/// @param provider provider address\\n\\t/// @param resourceType resource type\\n\\t/// @return resource price\\n\\tfunction priceOf(address provider, ResourceData.ResourceType resourceType) external view returns (uint256);\\n\\n\\t/// @dev return value of amount resource\\n\\t/// @param provider provider address\\n\\t/// @param resourceType resource type\\n\\t/// @param amount resource amount\\n\\t/// @return token value in resource decimals(18)\\n\\tfunction getValueOf(address provider, ResourceData.ResourceType resourceType, uint256 amount) external view returns (uint256);\\n\\n\\t/// @dev return resource amount with value\\n\\t/// @param provider provider address\\n\\t/// @param resourceType resource type\\n\\t/// @param value token value in resource decimals(18)\\n\\t/// @return resource amount\\n\\tfunction getAmountOf(address provider, ResourceData.ResourceType resourceType, uint256 value) external view returns (uint256);\\n\\n}\\n\",\"keccak256\":\"0x777f11784c9b845ea144fa0eb3b33596e123e1f70f2952e9d7c24ce576fcf10d\",\"license\":\"UNLICENSE\"}},\"version\":1}",
  "bytecode": "0x608060405234801561001057600080fd5b50611d5c806100206000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c8063db17012511610071578063db17012514610186578063dbfd473714610199578063de47238c146101ac578063e65da1e7146101bf578063f2fde38b146101df578063f887ea40146101f257600080fd5b8063485cc955146100b9578063715018a6146100ce57806389512e17146100d65780638da5cb5b1461013a578063b7ab288314610153578063b840f92114610173575b600080fd5b6100cc6100c73660046110de565b610218565b005b6100cc61029e565b6101236100e4366004611228565b60656020908152600093845260408085208252928452919092208251808401830180519281529083019390920192909220919052805460019091015482565b60405161013192919061129a565b60405180910390f35b6033546001600160a01b031660405161013191906112be565b610166610161366004611228565b6102dd565b60405161013191906112d4565b6100cc61018136600461148a565b61032a565b6100cc610194366004611555565b610546565b6100cc6101a73660046115a2565b610673565b6100cc6101ba366004611614565b6107c3565b6101d26101cd366004611228565b610967565b604051610131919061167a565b6100cc6101ed366004611688565b610af7565b60005461020b906201000090046001600160a01b031681565b60405161013191906116d9565b60006102246001610b53565b9050801561023c576000805461ff0019166101001790555b61024583610be0565b61024e82610c32565b8015610299576000805461ff00191690556040517f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890610290906001906116fb565b60405180910390a15b505050565b6033546001600160a01b031633146102d15760405162461bcd60e51b81526004016102c89061173e565b60405180910390fd5b6102db6000610be0565b565b6001600160a01b0383166000908152606560209081526040808320858452909152808220905161030e90849061179c565b90815260405190819003602001902054151590505b9392505050565b60008060029054906101000a90046001600160a01b03166001600160a01b031663a5a3f6c86040518163ffffffff1660e01b815260040160206040518083038186803b15801561037957600080fd5b505afa15801561038d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103b191906117b3565b604051636b074a0760e01b81529091506001600160a01b03821690636b074a07906103e09033906004016112be565b60206040518083038186803b1580156103f857600080fd5b505afa15801561040c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043091906117e7565b61044c5760405162461bcd60e51b81526004016102c890611851565b835185511461046d5760405162461bcd60e51b81526004016102c8906118a6565b825185511461048e5760405162461bcd60e51b81526004016102c8906118a6565b81518551146104af5760405162461bcd60e51b81526004016102c8906118a6565b60005b855181101561053e5761052c338783815181106104d1576104d16118b6565b60200260200101518784815181106104eb576104eb6118b6565b6020026020010151878581518110610505576105056118b6565b602002602001015187868151811061051f5761051f6118b6565b6020026020010151610c62565b80610536816118e2565b9150506104b2565b505050505050565b60008060029054906101000a90046001600160a01b03166001600160a01b031663a5a3f6c86040518163ffffffff1660e01b815260040160206040518083038186803b15801561059557600080fd5b505afa1580156105a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105cd91906117b3565b604051636b074a0760e01b81529091506001600160a01b03821690636b074a07906105fc9033906004016112be565b60206040518083038186803b15801561061457600080fd5b505afa158015610628573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064c91906117e7565b6106685760405162461bcd60e51b81526004016102c890611851565b610299338484610efc565b81600081116106945760405162461bcd60e51b81526004016102c890611931565b60008060029054906101000a90046001600160a01b03166001600160a01b031663a5a3f6c86040518163ffffffff1660e01b815260040160206040518083038186803b1580156106e357600080fd5b505afa1580156106f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071b91906117b3565b604051636b074a0760e01b81529091506001600160a01b03821690636b074a079061074a9033906004016112be565b60206040518083038186803b15801561076257600080fd5b505afa158015610776573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079a91906117e7565b6107b65760405162461bcd60e51b81526004016102c890611851565b61053e3387878787610c62565b60008060029054906101000a90046001600160a01b03166001600160a01b031663a5a3f6c86040518163ffffffff1660e01b815260040160206040518083038186803b15801561081257600080fd5b505afa158015610826573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084a91906117b3565b604051636b074a0760e01b81529091506001600160a01b03821690636b074a07906108799033906004016112be565b60206040518083038186803b15801561089157600080fd5b505afa1580156108a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c991906117e7565b6108e55760405162461bcd60e51b81526004016102c890611851565b81518351146109065760405162461bcd60e51b81526004016102c890611985565b60005b83518110156109615761094f33858381518110610928576109286118b6565b6020026020010151858481518110610942576109426118b6565b6020026020010151610efc565b80610959816118e2565b915050610909565b50505050565b60008060029054906101000a90046001600160a01b03166001600160a01b031663a5a3f6c86040518163ffffffff1660e01b815260040160206040518083038186803b1580156109b657600080fd5b505afa1580156109ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ee91906117b3565b6001600160a01b0316636b074a07856040518263ffffffff1660e01b8152600401610a1991906112be565b60206040518083038186803b158015610a3157600080fd5b505afa158015610a45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6991906117e7565b610a855760405162461bcd60e51b81526004016102c8906119d5565b610a908484846102dd565b610aac5760405162461bcd60e51b81526004016102c890611a24565b6001600160a01b0384166000908152606560209081526040808320868452909152908190209051610ade90849061179c565b9081526040519081900360200190205490509392505050565b6033546001600160a01b03163314610b215760405162461bcd60e51b81526004016102c89061173e565b6001600160a01b038116610b475760405162461bcd60e51b81526004016102c890611a77565b610b5081610be0565b50565b60008054610100900460ff1615610b9a578160ff166001148015610b765750303b155b610b925760405162461bcd60e51b81526004016102c890611ad2565b506000919050565b60005460ff808416911610610bc15760405162461bcd60e51b81526004016102c890611ad2565b506000805460ff191660ff92909216919091179055600190565b919050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610c595760405162461bcd60e51b81526004016102c890611b2a565b610b508161100a565b8160008111610c835760405162461bcd60e51b81526004016102c890611931565b60008060029054906101000a90046001600160a01b03166001600160a01b031663740e80616040518163ffffffff1660e01b815260040160206040518083038186803b158015610cd257600080fd5b505afa158015610ce6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d0a91906117b3565b9050610d178787876102dd565b15610d345760405162461bcd60e51b81526004016102c890611b6e565b60405162f304db60e01b81526001600160a01b0382169062f304db90610d60908a908a90600401611b7e565b60206040518083038186803b158015610d7857600080fd5b505afa158015610d8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610db091906117e7565b15610dcd5760405162461bcd60e51b81526004016102c890611bc0565b60408051808201825285815260208082018690526001600160a01b038a166000908152606582528381208a82529091528290209151909190610e1090889061179c565b908152602001604051809103902060008201518160000155602082015181600101559050507fd8be615b569e10ab81c7e1ad876540845a9ad057e7bf224af878656a43ccbae78787878787866001600160a01b03166328b214a48e8e6040518363ffffffff1660e01b8152600401610e89929190611b7e565b60206040518083038186803b158015610ea157600080fd5b505afa158015610eb5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ed99190611bdb565b604051610eeb96959493929190611c2e565b60405180910390a150505050505050565b610f078383836102dd565b610f235760405162461bcd60e51b81526004016102c890611a24565b6001600160a01b03831660009081526065602090815260408083208584529091528082209051610f5490849061179c565b90815260408051918290036020908101832083830183528054845260010154838201526001600160a01b038716600090815260658252828120878252909152819020905191925090610fa790849061179c565b908152604051908190036020908101822060008082556001909101558251908301517fededfe806a15f843a0e88eb73d17bdae19981e0402af0c2946a3d9834e66877b92610ffc928892889288929190611c8f565b60405180910390a150505050565b6001600160a01b0381166110305760405162461bcd60e51b81526004016102c890611d16565b6000805462010000600160b01b031916620100006001600160a01b038416021790556040517f7aed1d3e8155a07ccf395e44ea3109a0e2d6c9b29bbbe9f142d9790596f4dc80906110829083906116d9565b60405180910390a150565b60006001600160a01b0382165b92915050565b6110a98161108d565b8114610b5057600080fd5b803561109a816110a0565b600061109a8261108d565b6110a9816110bf565b803561109a816110ca565b600080604083850312156110f4576110f4600080fd5b600061110085856110b4565b9250506020611111858286016110d3565b9150509250929050565b806110a9565b803561109a8161111b565b634e487b7160e01b600052604160045260246000fd5b601f19601f83011681018181106001600160401b03821117156111675761116761112c565b6040525050565b600061117960405190565b9050610bdb8282611142565b60006001600160401b0382111561119e5761119e61112c565b601f19601f83011660200192915050565b82818337506000910152565b60006111ce6111c984611185565b61116e565b9050828152602081018484840111156111e9576111e9600080fd5b6111f48482856111af565b509392505050565b600082601f83011261121057611210600080fd5b81356112208482602086016111bb565b949350505050565b60008060006060848603121561124057611240600080fd5b600061124c86866110b4565b935050602061125d86828701611121565b92505060408401356001600160401b0381111561127c5761127c600080fd5b611288868287016111fc565b9150509250925092565b805b82525050565b604081016112a88285611292565b6103236020830184611292565b6112948161108d565b6020810161109a82846112b5565b801515611294565b6020810161109a82846112cc565b60006001600160401b038211156112fb576112fb61112c565b5060209081020190565b60006113136111c9846112e2565b8381529050602080820190840283018581111561133257611332600080fd5b835b8181101561135657806113478882611121565b84525060209283019201611334565b5050509392505050565b600082601f83011261137457611374600080fd5b8135611220848260208601611305565b60006113926111c9846112e2565b838152905060208082019084028301858111156113b1576113b1600080fd5b835b818110156113565780356001600160401b038111156113d4576113d4600080fd5b8086016113e189826111fc565b85525050602092830192016113b3565b600082601f83011261140557611405600080fd5b8135611220848260208601611384565b60006114236111c9846112e2565b8381529050602080820190840283018581111561144257611442600080fd5b835b8181101561135657806114578882611121565b84525060209283019201611444565b600082601f83011261147a5761147a600080fd5b8135611220848260208601611415565b600080600080608085870312156114a3576114a3600080fd5b84356001600160401b038111156114bc576114bc600080fd5b6114c887828801611360565b94505060208501356001600160401b038111156114e7576114e7600080fd5b6114f3878288016113f1565b93505060408501356001600160401b0381111561151257611512600080fd5b61151e87828801611466565b92505060608501356001600160401b0381111561153d5761153d600080fd5b61154987828801611466565b91505092959194509250565b6000806040838503121561156b5761156b600080fd5b60006115778585611121565b92505060208301356001600160401b0381111561159657611596600080fd5b611111858286016111fc565b600080600080608085870312156115bb576115bb600080fd5b60006115c78787611121565b94505060208501356001600160401b038111156115e6576115e6600080fd5b6115f2878288016111fc565b935050604061160387828801611121565b925050606061154987828801611121565b6000806040838503121561162a5761162a600080fd5b82356001600160401b0381111561164357611643600080fd5b61164f85828601611360565b92505060208301356001600160401b0381111561166e5761166e600080fd5b611111858286016113f1565b6020810161109a8284611292565b60006020828403121561169d5761169d600080fd5b600061122084846110b4565b60006001600160a01b03821661109a565b600061109a826116a9565b600061109a826116ba565b611294816116c5565b6020810161109a82846116d0565b600060ff821661109a565b611294816116e7565b6020810161109a82846116f2565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572910190815260005b5060200190565b6020808252810161109a81611709565b60005b83811015611769578181015183820152602001611751565b838111156109615750506000910152565b6000611784825190565b61179281856020860161174e565b9290920192915050565b6000610323828461177a565b805161109a816110ca565b6000602082840312156117c8576117c8600080fd5b600061122084846117a8565b8015156110a9565b805161109a816117d4565b6000602082840312156117fc576117fc600080fd5b600061122084846117dc565b602981526000602082017f526f75746572577261707065723a2063616c6c6572206973206e6f742074686581526810383937bb34b232b960b91b602082015291505b5060400190565b6020808252810161109a81611808565b602881526000602082017f436f6e74656e745472616365723a20496e76616c696420706172616d65746572815267103632b733ba341760c11b6020820152915061184a565b6020808252810161109a81611861565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156118f6576118f66118cc565b5060010190565b601981526000602082017f436f6e74656e745472616365723a207a65726f2073697a652e0000000000000081529150611737565b6020808252810161109a816118fd565b602781526000602082017f436f6e74656e745472616365723a20496e76616c696420706172616d65746572815266040d8cadccee8d60cb1b6020820152915061184a565b6020808252810161109a81611941565b602381526000602082017f436f6e74656e745472616365723a206e6f6e6578697374656e742070726f76698152623232b960e91b6020820152915061184a565b6020808252810161109a81611995565b602281526000602082017f436f6e74656e745472616365723a206e6f6e6578697374656e7420636f6e74658152611b9d60f21b6020820152915061184a565b6020808252810161109a816119e5565b602681526000602082017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b6020820152915061184a565b6020808252810161109a81611a34565b602e81526000602082017f496e697469616c697a61626c653a20636f6e747261637420697320616c72656181526d191e481a5b9a5d1a585b1a5e995960921b6020820152915061184a565b6020808252810161109a81611a87565b602b81526000602082017f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206981526a6e697469616c697a696e6760a81b6020820152915061184a565b6020808252810161109a81611ae2565b601d81526000602082017f436f6e74656e745472616365723a20636f6e74656e742065786973747300000081529150611737565b6020808252810161109a81611b3a565b604081016112a882856112b5565b601e81526000602082017f436f6e74656e745472616365723a206163636f756e742065787069726564000081529150611737565b6020808252810161109a81611b8c565b805161109a8161111b565b600060208284031215611bf057611bf0600080fd5b60006112208484611bd0565b6000611c06825190565b808452602084019350611c1d81856020860161174e565b601f01601f19169290920192915050565b60c08101611c3c82896112b5565b611c496020830188611292565b8181036040830152611c5b8187611bfc565b9050611c6a6060830186611292565b611c776080830185611292565b611c8460a0830184611292565b979650505050505050565b60a08101611c9d82886112b5565b611caa6020830187611292565b8181036040830152611cbc8186611bfc565b9050611ccb6060830185611292565b611cd86080830184611292565b9695505050505050565b601b81526000602082017f526f75746572577261707065723a207a65726f2061646472657373000000000081529150611737565b6020808252810161109a81611ce256fea26469706673582212200dd365c35e944d3ef9d427bacdb2c051bb21636b43dbd723ea7de48866b05af264736f6c63430008090033",
  "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c8063db17012511610071578063db17012514610186578063dbfd473714610199578063de47238c146101ac578063e65da1e7146101bf578063f2fde38b146101df578063f887ea40146101f257600080fd5b8063485cc955146100b9578063715018a6146100ce57806389512e17146100d65780638da5cb5b1461013a578063b7ab288314610153578063b840f92114610173575b600080fd5b6100cc6100c73660046110de565b610218565b005b6100cc61029e565b6101236100e4366004611228565b60656020908152600093845260408085208252928452919092208251808401830180519281529083019390920192909220919052805460019091015482565b60405161013192919061129a565b60405180910390f35b6033546001600160a01b031660405161013191906112be565b610166610161366004611228565b6102dd565b60405161013191906112d4565b6100cc61018136600461148a565b61032a565b6100cc610194366004611555565b610546565b6100cc6101a73660046115a2565b610673565b6100cc6101ba366004611614565b6107c3565b6101d26101cd366004611228565b610967565b604051610131919061167a565b6100cc6101ed366004611688565b610af7565b60005461020b906201000090046001600160a01b031681565b60405161013191906116d9565b60006102246001610b53565b9050801561023c576000805461ff0019166101001790555b61024583610be0565b61024e82610c32565b8015610299576000805461ff00191690556040517f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890610290906001906116fb565b60405180910390a15b505050565b6033546001600160a01b031633146102d15760405162461bcd60e51b81526004016102c89061173e565b60405180910390fd5b6102db6000610be0565b565b6001600160a01b0383166000908152606560209081526040808320858452909152808220905161030e90849061179c565b90815260405190819003602001902054151590505b9392505050565b60008060029054906101000a90046001600160a01b03166001600160a01b031663a5a3f6c86040518163ffffffff1660e01b815260040160206040518083038186803b15801561037957600080fd5b505afa15801561038d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103b191906117b3565b604051636b074a0760e01b81529091506001600160a01b03821690636b074a07906103e09033906004016112be565b60206040518083038186803b1580156103f857600080fd5b505afa15801561040c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043091906117e7565b61044c5760405162461bcd60e51b81526004016102c890611851565b835185511461046d5760405162461bcd60e51b81526004016102c8906118a6565b825185511461048e5760405162461bcd60e51b81526004016102c8906118a6565b81518551146104af5760405162461bcd60e51b81526004016102c8906118a6565b60005b855181101561053e5761052c338783815181106104d1576104d16118b6565b60200260200101518784815181106104eb576104eb6118b6565b6020026020010151878581518110610505576105056118b6565b602002602001015187868151811061051f5761051f6118b6565b6020026020010151610c62565b80610536816118e2565b9150506104b2565b505050505050565b60008060029054906101000a90046001600160a01b03166001600160a01b031663a5a3f6c86040518163ffffffff1660e01b815260040160206040518083038186803b15801561059557600080fd5b505afa1580156105a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105cd91906117b3565b604051636b074a0760e01b81529091506001600160a01b03821690636b074a07906105fc9033906004016112be565b60206040518083038186803b15801561061457600080fd5b505afa158015610628573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064c91906117e7565b6106685760405162461bcd60e51b81526004016102c890611851565b610299338484610efc565b81600081116106945760405162461bcd60e51b81526004016102c890611931565b60008060029054906101000a90046001600160a01b03166001600160a01b031663a5a3f6c86040518163ffffffff1660e01b815260040160206040518083038186803b1580156106e357600080fd5b505afa1580156106f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071b91906117b3565b604051636b074a0760e01b81529091506001600160a01b03821690636b074a079061074a9033906004016112be565b60206040518083038186803b15801561076257600080fd5b505afa158015610776573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079a91906117e7565b6107b65760405162461bcd60e51b81526004016102c890611851565b61053e3387878787610c62565b60008060029054906101000a90046001600160a01b03166001600160a01b031663a5a3f6c86040518163ffffffff1660e01b815260040160206040518083038186803b15801561081257600080fd5b505afa158015610826573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084a91906117b3565b604051636b074a0760e01b81529091506001600160a01b03821690636b074a07906108799033906004016112be565b60206040518083038186803b15801561089157600080fd5b505afa1580156108a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c991906117e7565b6108e55760405162461bcd60e51b81526004016102c890611851565b81518351146109065760405162461bcd60e51b81526004016102c890611985565b60005b83518110156109615761094f33858381518110610928576109286118b6565b6020026020010151858481518110610942576109426118b6565b6020026020010151610efc565b80610959816118e2565b915050610909565b50505050565b60008060029054906101000a90046001600160a01b03166001600160a01b031663a5a3f6c86040518163ffffffff1660e01b815260040160206040518083038186803b1580156109b657600080fd5b505afa1580156109ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ee91906117b3565b6001600160a01b0316636b074a07856040518263ffffffff1660e01b8152600401610a1991906112be565b60206040518083038186803b158015610a3157600080fd5b505afa158015610a45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6991906117e7565b610a855760405162461bcd60e51b81526004016102c8906119d5565b610a908484846102dd565b610aac5760405162461bcd60e51b81526004016102c890611a24565b6001600160a01b0384166000908152606560209081526040808320868452909152908190209051610ade90849061179c565b9081526040519081900360200190205490509392505050565b6033546001600160a01b03163314610b215760405162461bcd60e51b81526004016102c89061173e565b6001600160a01b038116610b475760405162461bcd60e51b81526004016102c890611a77565b610b5081610be0565b50565b60008054610100900460ff1615610b9a578160ff166001148015610b765750303b155b610b925760405162461bcd60e51b81526004016102c890611ad2565b506000919050565b60005460ff808416911610610bc15760405162461bcd60e51b81526004016102c890611ad2565b506000805460ff191660ff92909216919091179055600190565b919050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610c595760405162461bcd60e51b81526004016102c890611b2a565b610b508161100a565b8160008111610c835760405162461bcd60e51b81526004016102c890611931565b60008060029054906101000a90046001600160a01b03166001600160a01b031663740e80616040518163ffffffff1660e01b815260040160206040518083038186803b158015610cd257600080fd5b505afa158015610ce6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d0a91906117b3565b9050610d178787876102dd565b15610d345760405162461bcd60e51b81526004016102c890611b6e565b60405162f304db60e01b81526001600160a01b0382169062f304db90610d60908a908a90600401611b7e565b60206040518083038186803b158015610d7857600080fd5b505afa158015610d8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610db091906117e7565b15610dcd5760405162461bcd60e51b81526004016102c890611bc0565b60408051808201825285815260208082018690526001600160a01b038a166000908152606582528381208a82529091528290209151909190610e1090889061179c565b908152602001604051809103902060008201518160000155602082015181600101559050507fd8be615b569e10ab81c7e1ad876540845a9ad057e7bf224af878656a43ccbae78787878787866001600160a01b03166328b214a48e8e6040518363ffffffff1660e01b8152600401610e89929190611b7e565b60206040518083038186803b158015610ea157600080fd5b505afa158015610eb5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ed99190611bdb565b604051610eeb96959493929190611c2e565b60405180910390a150505050505050565b610f078383836102dd565b610f235760405162461bcd60e51b81526004016102c890611a24565b6001600160a01b03831660009081526065602090815260408083208584529091528082209051610f5490849061179c565b90815260408051918290036020908101832083830183528054845260010154838201526001600160a01b038716600090815260658252828120878252909152819020905191925090610fa790849061179c565b908152604051908190036020908101822060008082556001909101558251908301517fededfe806a15f843a0e88eb73d17bdae19981e0402af0c2946a3d9834e66877b92610ffc928892889288929190611c8f565b60405180910390a150505050565b6001600160a01b0381166110305760405162461bcd60e51b81526004016102c890611d16565b6000805462010000600160b01b031916620100006001600160a01b038416021790556040517f7aed1d3e8155a07ccf395e44ea3109a0e2d6c9b29bbbe9f142d9790596f4dc80906110829083906116d9565b60405180910390a150565b60006001600160a01b0382165b92915050565b6110a98161108d565b8114610b5057600080fd5b803561109a816110a0565b600061109a8261108d565b6110a9816110bf565b803561109a816110ca565b600080604083850312156110f4576110f4600080fd5b600061110085856110b4565b9250506020611111858286016110d3565b9150509250929050565b806110a9565b803561109a8161111b565b634e487b7160e01b600052604160045260246000fd5b601f19601f83011681018181106001600160401b03821117156111675761116761112c565b6040525050565b600061117960405190565b9050610bdb8282611142565b60006001600160401b0382111561119e5761119e61112c565b601f19601f83011660200192915050565b82818337506000910152565b60006111ce6111c984611185565b61116e565b9050828152602081018484840111156111e9576111e9600080fd5b6111f48482856111af565b509392505050565b600082601f83011261121057611210600080fd5b81356112208482602086016111bb565b949350505050565b60008060006060848603121561124057611240600080fd5b600061124c86866110b4565b935050602061125d86828701611121565b92505060408401356001600160401b0381111561127c5761127c600080fd5b611288868287016111fc565b9150509250925092565b805b82525050565b604081016112a88285611292565b6103236020830184611292565b6112948161108d565b6020810161109a82846112b5565b801515611294565b6020810161109a82846112cc565b60006001600160401b038211156112fb576112fb61112c565b5060209081020190565b60006113136111c9846112e2565b8381529050602080820190840283018581111561133257611332600080fd5b835b8181101561135657806113478882611121565b84525060209283019201611334565b5050509392505050565b600082601f83011261137457611374600080fd5b8135611220848260208601611305565b60006113926111c9846112e2565b838152905060208082019084028301858111156113b1576113b1600080fd5b835b818110156113565780356001600160401b038111156113d4576113d4600080fd5b8086016113e189826111fc565b85525050602092830192016113b3565b600082601f83011261140557611405600080fd5b8135611220848260208601611384565b60006114236111c9846112e2565b8381529050602080820190840283018581111561144257611442600080fd5b835b8181101561135657806114578882611121565b84525060209283019201611444565b600082601f83011261147a5761147a600080fd5b8135611220848260208601611415565b600080600080608085870312156114a3576114a3600080fd5b84356001600160401b038111156114bc576114bc600080fd5b6114c887828801611360565b94505060208501356001600160401b038111156114e7576114e7600080fd5b6114f3878288016113f1565b93505060408501356001600160401b0381111561151257611512600080fd5b61151e87828801611466565b92505060608501356001600160401b0381111561153d5761153d600080fd5b61154987828801611466565b91505092959194509250565b6000806040838503121561156b5761156b600080fd5b60006115778585611121565b92505060208301356001600160401b0381111561159657611596600080fd5b611111858286016111fc565b600080600080608085870312156115bb576115bb600080fd5b60006115c78787611121565b94505060208501356001600160401b038111156115e6576115e6600080fd5b6115f2878288016111fc565b935050604061160387828801611121565b925050606061154987828801611121565b6000806040838503121561162a5761162a600080fd5b82356001600160401b0381111561164357611643600080fd5b61164f85828601611360565b92505060208301356001600160401b0381111561166e5761166e600080fd5b611111858286016113f1565b6020810161109a8284611292565b60006020828403121561169d5761169d600080fd5b600061122084846110b4565b60006001600160a01b03821661109a565b600061109a826116a9565b600061109a826116ba565b611294816116c5565b6020810161109a82846116d0565b600060ff821661109a565b611294816116e7565b6020810161109a82846116f2565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572910190815260005b5060200190565b6020808252810161109a81611709565b60005b83811015611769578181015183820152602001611751565b838111156109615750506000910152565b6000611784825190565b61179281856020860161174e565b9290920192915050565b6000610323828461177a565b805161109a816110ca565b6000602082840312156117c8576117c8600080fd5b600061122084846117a8565b8015156110a9565b805161109a816117d4565b6000602082840312156117fc576117fc600080fd5b600061122084846117dc565b602981526000602082017f526f75746572577261707065723a2063616c6c6572206973206e6f742074686581526810383937bb34b232b960b91b602082015291505b5060400190565b6020808252810161109a81611808565b602881526000602082017f436f6e74656e745472616365723a20496e76616c696420706172616d65746572815267103632b733ba341760c11b6020820152915061184a565b6020808252810161109a81611861565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156118f6576118f66118cc565b5060010190565b601981526000602082017f436f6e74656e745472616365723a207a65726f2073697a652e0000000000000081529150611737565b6020808252810161109a816118fd565b602781526000602082017f436f6e74656e745472616365723a20496e76616c696420706172616d65746572815266040d8cadccee8d60cb1b6020820152915061184a565b6020808252810161109a81611941565b602381526000602082017f436f6e74656e745472616365723a206e6f6e6578697374656e742070726f76698152623232b960e91b6020820152915061184a565b6020808252810161109a81611995565b602281526000602082017f436f6e74656e745472616365723a206e6f6e6578697374656e7420636f6e74658152611b9d60f21b6020820152915061184a565b6020808252810161109a816119e5565b602681526000602082017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b6020820152915061184a565b6020808252810161109a81611a34565b602e81526000602082017f496e697469616c697a61626c653a20636f6e747261637420697320616c72656181526d191e481a5b9a5d1a585b1a5e995960921b6020820152915061184a565b6020808252810161109a81611a87565b602b81526000602082017f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206981526a6e697469616c697a696e6760a81b6020820152915061184a565b6020808252810161109a81611ae2565b601d81526000602082017f436f6e74656e745472616365723a20636f6e74656e742065786973747300000081529150611737565b6020808252810161109a81611b3a565b604081016112a882856112b5565b601e81526000602082017f436f6e74656e745472616365723a206163636f756e742065787069726564000081529150611737565b6020808252810161109a81611b8c565b805161109a8161111b565b600060208284031215611bf057611bf0600080fd5b60006112208484611bd0565b6000611c06825190565b808452602084019350611c1d81856020860161174e565b601f01601f19169290920192915050565b60c08101611c3c82896112b5565b611c496020830188611292565b8181036040830152611c5b8187611bfc565b9050611c6a6060830186611292565b611c776080830185611292565b611c8460a0830184611292565b979650505050505050565b60a08101611c9d82886112b5565b611caa6020830187611292565b8181036040830152611cbc8186611bfc565b9050611ccb6060830185611292565b611cd86080830184611292565b9695505050505050565b601b81526000602082017f526f75746572577261707065723a207a65726f2061646472657373000000000081529150611737565b6020808252810161109a81611ce256fea26469706673582212200dd365c35e944d3ef9d427bacdb2c051bb21636b43dbd723ea7de48866b05af264736f6c63430008090033",
  "devdoc": {
    "author": "Alexandas",
    "details": "IPFS content tracer",
    "events": {
      "Insert(address,bytes32,string,uint256,uint256,uint256)": {
        "details": "emit when ipfs content inserted",
        "params": {
          "account": "user account",
          "content": "ipfs content",
          "count": "ipfs content count",
          "expiration": "ipfs content expiration",
          "provider": "provider address",
          "size": "ipfs content size"
        }
      },
      "Remove(address,bytes32,string,uint256,uint256)": {
        "details": "emit when ipfs content removed",
        "params": {
          "account": "user account",
          "content": "ipfs content",
          "count": "ipfs content count",
          "provider": "provider address",
          "size": "ipfs content size"
        }
      }
    },
    "kind": "dev",
    "methods": {
      "exists(address,bytes32,string)": {
        "details": "return whether ipfs content exists in provider",
        "params": {
          "account": "user account",
          "content": "ipfs content",
          "provider": "provider address"
        },
        "returns": {
          "_0": "ipfs ipfs content exists"
        }
      },
      "initialize(address,address)": {
        "details": "proxy initialize function",
        "params": {
          "owner": "contract owner",
          "router": "router contract address"
        }
      },
      "insert(bytes32,string,uint256,uint256)": {
        "details": "insert ipfs content",
        "params": {
          "account": "user account",
          "content": "ipfs content",
          "count": "array of ipfs content count",
          "size": "ipfs account size"
        }
      },
      "insertMult(bytes32[],string[],uint256[],uint256[])": {
        "details": "insert multiple ipfs content for accounts",
        "params": {
          "accounts": "array of user account",
          "contents": "array of ipfs contents",
          "counts": "array of ipfs content count",
          "sizes": "array of ipfs content size"
        }
      },
      "owner()": {
        "details": "Returns the address of the current owner."
      },
      "remove(bytes32,string)": {
        "details": "remove ipfs content",
        "params": {
          "account": "user account",
          "content": "ipfs content"
        }
      },
      "removeMult(bytes32[],string[])": {
        "details": "remove ipfs content",
        "params": {
          "accounts": "array of user account",
          "contents": "array of ipfs contents"
        }
      },
      "renounceOwnership()": {
        "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."
      },
      "size(address,bytes32,string)": {
        "details": "return ipfs content size",
        "params": {
          "account": "user account",
          "content": "ipfs content",
          "provider": "provider address"
        },
        "returns": {
          "_0": "ipfs ipfs content size"
        }
      },
      "transferOwnership(address)": {
        "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
      }
    },
    "stateVariables": {
      "metas": {
        "details": "ipfs content content meta"
      }
    },
    "version": 1
  },
  "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
  },
  "storageLayout": {
    "storage": [
      {
        "astId": 147,
        "contract": "contracts/ipfs/ContentTracer.sol:ContentTracer",
        "label": "_initialized",
        "offset": 0,
        "slot": "0",
        "type": "t_uint8"
      },
      {
        "astId": 150,
        "contract": "contracts/ipfs/ContentTracer.sol:ContentTracer",
        "label": "_initializing",
        "offset": 1,
        "slot": "0",
        "type": "t_bool"
      },
      {
        "astId": 5834,
        "contract": "contracts/ipfs/ContentTracer.sol:ContentTracer",
        "label": "router",
        "offset": 2,
        "slot": "0",
        "type": "t_contract(IRouter)6848"
      },
      {
        "astId": 1038,
        "contract": "contracts/ipfs/ContentTracer.sol:ContentTracer",
        "label": "__gap",
        "offset": 0,
        "slot": "1",
        "type": "t_array(t_uint256)50_storage"
      },
      {
        "astId": 10,
        "contract": "contracts/ipfs/ContentTracer.sol:ContentTracer",
        "label": "_owner",
        "offset": 0,
        "slot": "51",
        "type": "t_address"
      },
      {
        "astId": 122,
        "contract": "contracts/ipfs/ContentTracer.sol:ContentTracer",
        "label": "__gap",
        "offset": 0,
        "slot": "52",
        "type": "t_array(t_uint256)49_storage"
      },
      {
        "astId": 6876,
        "contract": "contracts/ipfs/ContentTracer.sol:ContentTracer",
        "label": "metas",
        "offset": 0,
        "slot": "101",
        "type": "t_mapping(t_address,t_mapping(t_bytes32,t_mapping(t_string_memory_ptr,t_struct(ContentMeta)6866_storage)))"
      }
    ],
    "types": {
      "t_address": {
        "encoding": "inplace",
        "label": "address",
        "numberOfBytes": "20"
      },
      "t_array(t_uint256)49_storage": {
        "base": "t_uint256",
        "encoding": "inplace",
        "label": "uint256[49]",
        "numberOfBytes": "1568"
      },
      "t_array(t_uint256)50_storage": {
        "base": "t_uint256",
        "encoding": "inplace",
        "label": "uint256[50]",
        "numberOfBytes": "1600"
      },
      "t_bool": {
        "encoding": "inplace",
        "label": "bool",
        "numberOfBytes": "1"
      },
      "t_bytes32": {
        "encoding": "inplace",
        "label": "bytes32",
        "numberOfBytes": "32"
      },
      "t_contract(IRouter)6848": {
        "encoding": "inplace",
        "label": "contract IRouter",
        "numberOfBytes": "20"
      },
      "t_mapping(t_address,t_mapping(t_bytes32,t_mapping(t_string_memory_ptr,t_struct(ContentMeta)6866_storage)))": {
        "encoding": "mapping",
        "key": "t_address",
        "label": "mapping(address => mapping(bytes32 => mapping(string => struct ContentTracer.ContentMeta)))",
        "numberOfBytes": "32",
        "value": "t_mapping(t_bytes32,t_mapping(t_string_memory_ptr,t_struct(ContentMeta)6866_storage))"
      },
      "t_mapping(t_bytes32,t_mapping(t_string_memory_ptr,t_struct(ContentMeta)6866_storage))": {
        "encoding": "mapping",
        "key": "t_bytes32",
        "label": "mapping(bytes32 => mapping(string => struct ContentTracer.ContentMeta))",
        "numberOfBytes": "32",
        "value": "t_mapping(t_string_memory_ptr,t_struct(ContentMeta)6866_storage)"
      },
      "t_mapping(t_string_memory_ptr,t_struct(ContentMeta)6866_storage)": {
        "encoding": "mapping",
        "key": "t_string_memory_ptr",
        "label": "mapping(string => struct ContentTracer.ContentMeta)",
        "numberOfBytes": "32",
        "value": "t_struct(ContentMeta)6866_storage"
      },
      "t_string_memory_ptr": {
        "encoding": "bytes",
        "label": "string",
        "numberOfBytes": "32"
      },
      "t_struct(ContentMeta)6866_storage": {
        "encoding": "inplace",
        "label": "struct ContentTracer.ContentMeta",
        "members": [
          {
            "astId": 6863,
            "contract": "contracts/ipfs/ContentTracer.sol:ContentTracer",
            "label": "size",
            "offset": 0,
            "slot": "0",
            "type": "t_uint256"
          },
          {
            "astId": 6865,
            "contract": "contracts/ipfs/ContentTracer.sol:ContentTracer",
            "label": "count",
            "offset": 0,
            "slot": "1",
            "type": "t_uint256"
          }
        ],
        "numberOfBytes": "64"
      },
      "t_uint256": {
        "encoding": "inplace",
        "label": "uint256",
        "numberOfBytes": "32"
      },
      "t_uint8": {
        "encoding": "inplace",
        "label": "uint8",
        "numberOfBytes": "1"
      }
    }
  }
}