{
  "address": "0xe9940ACe86b1B857D3a59Ab0C9b09039ba0ad9fa",
  "abi": [
    {
      "inputs": [],
      "stateMutability": "nonpayable",
      "type": "constructor"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "provider",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "address",
          "name": "wallet",
          "type": "address"
        }
      ],
      "name": "AddProivderWallet",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "provider",
          "type": "address"
        }
      ],
      "name": "AddProvider",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint8",
          "name": "version",
          "type": "uint8"
        }
      ],
      "name": "Initialized",
      "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"
        }
      ],
      "name": "RemoveProvider",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "provider",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "address",
          "name": "wallet",
          "type": "address"
        }
      ],
      "name": "RemoveProviderWallet",
      "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"
        }
      ],
      "name": "addProvider",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "wallet",
          "type": "address"
        }
      ],
      "name": "addWallet",
      "outputs": [],
      "stateMutability": "nonpayable",
      "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": "address",
          "name": "provider",
          "type": "address"
        }
      ],
      "name": "isProvider",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "provider",
          "type": "address"
        },
        {
          "internalType": "bytes32",
          "name": "hash",
          "type": "bytes32"
        },
        {
          "internalType": "bytes",
          "name": "signature",
          "type": "bytes"
        }
      ],
      "name": "isValidSignature",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "owner",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "provider",
          "type": "address"
        }
      ],
      "name": "providerWallet",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "provider",
          "type": "address"
        }
      ],
      "name": "providerWalletExists",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "provider",
          "type": "address"
        }
      ],
      "name": "removeProvider",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "wallet",
          "type": "address"
        }
      ],
      "name": "removeWallet",
      "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": "newOwner",
          "type": "address"
        }
      ],
      "name": "transferOwnership",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }
  ],
  "transactionHash": "0xaf9359a32ec195e810a246f7e0d67e949445c018f8e34cb5a8c48be2dcb29e1c",
  "receipt": {
    "to": null,
    "from": "0xe5bab2D79EB833FA25906Cd90540339C9aB8AE70",
    "contractAddress": "0xe9940ACe86b1B857D3a59Ab0C9b09039ba0ad9fa",
    "transactionIndex": 12,
    "gasUsed": "1351913",
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000020000000000000000000001000000000000000000000008000000000000000000000000000000000000000000000000000000000800000000000200000000100000000000000000000000000000000000000000000000010000000000080000000000000000000000000000000000000000000000000000000000080000000000000000000200000000000000000000000000400000000000000000000000000000000004000800000000000400001000000048000000000000000000000100000000000000000020000000000000000000000000000000100000000000000000000100000",
    "blockHash": "0xb00e36128f15e6094010326c9d6b3d6b05a3e5381c980566cece5d84c02b0be9",
    "transactionHash": "0xaf9359a32ec195e810a246f7e0d67e949445c018f8e34cb5a8c48be2dcb29e1c",
    "logs": [
      {
        "transactionIndex": 12,
        "blockNumber": 30063939,
        "transactionHash": "0xaf9359a32ec195e810a246f7e0d67e949445c018f8e34cb5a8c48be2dcb29e1c",
        "address": "0xe9940ACe86b1B857D3a59Ab0C9b09039ba0ad9fa",
        "topics": [
          "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"
        ],
        "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
        "logIndex": 29,
        "blockHash": "0xb00e36128f15e6094010326c9d6b3d6b05a3e5381c980566cece5d84c02b0be9"
      },
      {
        "transactionIndex": 12,
        "blockNumber": 30063939,
        "transactionHash": "0xaf9359a32ec195e810a246f7e0d67e949445c018f8e34cb5a8c48be2dcb29e1c",
        "address": "0x0000000000000000000000000000000000001010",
        "topics": [
          "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63",
          "0x0000000000000000000000000000000000000000000000000000000000001010",
          "0x000000000000000000000000e5bab2d79eb833fa25906cd90540339c9ab8ae70",
          "0x00000000000000000000000067b94473d81d0cd00849d563c94d0432ac988b49"
        ],
        "data": "0x000000000000000000000000000000000000000000000000010a27ae9833e4a80000000000000000000000000000000000000000000000006466c4d734cad000000000000000000000000000000000000000000000002c79c81562c9a6162721000000000000000000000000000000000000000000000000635c9d289c96eb58000000000000000000000000000000000000000000002c79c91f8a783e4a0bc9",
        "logIndex": 30,
        "blockHash": "0xb00e36128f15e6094010326c9d6b3d6b05a3e5381c980566cece5d84c02b0be9"
      }
    ],
    "blockNumber": 30063939,
    "cumulativeGasUsed": "2340686",
    "status": 1,
    "byzantium": true
  },
  "args": [],
  "numDeployments": 1,
  "solcInputHash": "f1d9f0874da35f3fb2217d83f7f7a52b",
  "metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"wallet\",\"type\":\"address\"}],\"name\":\"AddProivderWallet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"}],\"name\":\"AddProvider\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"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\"}],\"name\":\"RemoveProvider\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"wallet\",\"type\":\"address\"}],\"name\":\"RemoveProviderWallet\",\"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\"}],\"name\":\"addProvider\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"wallet\",\"type\":\"address\"}],\"name\":\"addWallet\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"address\",\"name\":\"provider\",\"type\":\"address\"}],\"name\":\"isProvider\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"isValidSignature\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"}],\"name\":\"providerWallet\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"}],\"name\":\"providerWalletExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"}],\"name\":\"removeProvider\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"wallet\",\"type\":\"address\"}],\"name\":\"removeWallet\",\"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\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Alexandas\",\"details\":\"provider registry contract\",\"kind\":\"dev\",\"methods\":{\"addProvider(address)\":{\"details\":\"add a provider\",\"params\":{\"provider\":\"address\"}},\"addWallet(address)\":{\"details\":\"add provider wallet\",\"params\":{\"wallet\":\"wallet address\"}},\"initialize(address,address)\":{\"details\":\"proxy initialize function\",\"params\":{\"owner\":\"contract owner\",\"router\":\"router contract address\"}},\"isProvider(address)\":{\"details\":\"return whether address is a provider\",\"params\":{\"provider\":\"address\"},\"returns\":{\"_0\":\"whether address is a provider\"}},\"isValidSignature(address,bytes32,bytes)\":{\"details\":\"return whether a valid signature\",\"params\":{\"hash\":\"message hash\",\"provider\":\"address\",\"signature\":\"provider signature for message hash\"},\"returns\":{\"_0\":\"whether signature is valid\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"providerWallet(address)\":{\"details\":\"return provider wallet\",\"params\":{\"provider\":\"address\"},\"returns\":{\"_0\":\"provider wallet\"}},\"providerWalletExists(address)\":{\"details\":\"return provider wallet exists\",\"params\":{\"provider\":\"address\"},\"returns\":{\"_0\":\"whether provider wallet exists\"}},\"removeProvider(address)\":{\"details\":\"remove a provider\",\"params\":{\"provider\":\"address\"}},\"removeWallet(address)\":{\"details\":\"remove provider wallet\",\"params\":{\"wallet\":\"wallet address\"}},\"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.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"stateVariables\":{\"providerWallets\":{\"details\":\"all provider wallets\"},\"providers\":{\"details\":\"all providers\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/govers/ProviderRegistry.sol\":\"ProviderRegistry\"},\"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/IERC1271Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC1271 standard signature validation method for\\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC1271Upgradeable {\\n    /**\\n     * @dev Should return whether the signature provided is valid for the provided data\\n     * @param hash      Hash of the data to be signed\\n     * @param signature Signature byte array associated with _data\\n     */\\n    function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\\n}\\n\",\"keccak256\":\"0x4473c09c087ee1a48c5547b23799c0474b2e08cde6fec5921c628171c4ebcdc0\",\"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/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n    bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\n\\n    /**\\n     * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n     */\\n    function toString(uint256 value) internal pure returns (string memory) {\\n        // Inspired by OraclizeAPI's implementation - MIT licence\\n        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n        if (value == 0) {\\n            return \\\"0\\\";\\n        }\\n        uint256 temp = value;\\n        uint256 digits;\\n        while (temp != 0) {\\n            digits++;\\n            temp /= 10;\\n        }\\n        bytes memory buffer = new bytes(digits);\\n        while (value != 0) {\\n            digits -= 1;\\n            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n            value /= 10;\\n        }\\n        return string(buffer);\\n    }\\n\\n    /**\\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n     */\\n    function toHexString(uint256 value) internal pure returns (string memory) {\\n        if (value == 0) {\\n            return \\\"0x00\\\";\\n        }\\n        uint256 temp = value;\\n        uint256 length = 0;\\n        while (temp != 0) {\\n            length++;\\n            temp >>= 8;\\n        }\\n        return toHexString(value, length);\\n    }\\n\\n    /**\\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n     */\\n    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n        bytes memory buffer = new bytes(2 * length + 2);\\n        buffer[0] = \\\"0\\\";\\n        buffer[1] = \\\"x\\\";\\n        for (uint256 i = 2 * length + 1; i > 1; --i) {\\n            buffer[i] = _HEX_SYMBOLS[value & 0xf];\\n            value >>= 4;\\n        }\\n        require(value == 0, \\\"Strings: hex length insufficient\\\");\\n        return string(buffer);\\n    }\\n}\\n\",\"keccak256\":\"0x398d3323c1932a5986bf36be7c57593e121e69d5db5b6574b4ee0d031443de37\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../StringsUpgradeable.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSAUpgradeable {\\n    enum RecoverError {\\n        NoError,\\n        InvalidSignature,\\n        InvalidSignatureLength,\\n        InvalidSignatureS,\\n        InvalidSignatureV\\n    }\\n\\n    function _throwError(RecoverError error) private pure {\\n        if (error == RecoverError.NoError) {\\n            return; // no error: do nothing\\n        } else if (error == RecoverError.InvalidSignature) {\\n            revert(\\\"ECDSA: invalid signature\\\");\\n        } else if (error == RecoverError.InvalidSignatureLength) {\\n            revert(\\\"ECDSA: invalid signature length\\\");\\n        } else if (error == RecoverError.InvalidSignatureS) {\\n            revert(\\\"ECDSA: invalid signature 's' value\\\");\\n        } else if (error == RecoverError.InvalidSignatureV) {\\n            revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the address that signed a hashed message (`hash`) with\\n     * `signature` or error string. This address can then be used for verification purposes.\\n     *\\n     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n     * this function rejects them by requiring the `s` value to be in the lower\\n     * half order, and the `v` value to be either 27 or 28.\\n     *\\n     * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n     * verification to be secure: it is possible to craft signatures that\\n     * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n     * this is by receiving a hash of the original message (which may otherwise\\n     * be too long), and then calling {toEthSignedMessageHash} on it.\\n     *\\n     * Documentation for signature generation:\\n     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n     *\\n     * _Available since v4.3._\\n     */\\n    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n        // Check the signature length\\n        // - case 65: r,s,v signature (standard)\\n        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._\\n        if (signature.length == 65) {\\n            bytes32 r;\\n            bytes32 s;\\n            uint8 v;\\n            // ecrecover takes the signature parameters, and the only way to get them\\n            // currently is to use assembly.\\n            assembly {\\n                r := mload(add(signature, 0x20))\\n                s := mload(add(signature, 0x40))\\n                v := byte(0, mload(add(signature, 0x60)))\\n            }\\n            return tryRecover(hash, v, r, s);\\n        } else if (signature.length == 64) {\\n            bytes32 r;\\n            bytes32 vs;\\n            // ecrecover takes the signature parameters, and the only way to get them\\n            // currently is to use assembly.\\n            assembly {\\n                r := mload(add(signature, 0x20))\\n                vs := mload(add(signature, 0x40))\\n            }\\n            return tryRecover(hash, r, vs);\\n        } else {\\n            return (address(0), RecoverError.InvalidSignatureLength);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the address that signed a hashed message (`hash`) with\\n     * `signature`. This address can then be used for verification purposes.\\n     *\\n     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n     * this function rejects them by requiring the `s` value to be in the lower\\n     * half order, and the `v` value to be either 27 or 28.\\n     *\\n     * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n     * verification to be secure: it is possible to craft signatures that\\n     * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n     * this is by receiving a hash of the original message (which may otherwise\\n     * be too long), and then calling {toEthSignedMessageHash} on it.\\n     */\\n    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n        (address recovered, RecoverError error) = tryRecover(hash, signature);\\n        _throwError(error);\\n        return recovered;\\n    }\\n\\n    /**\\n     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n     *\\n     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n     *\\n     * _Available since v4.3._\\n     */\\n    function tryRecover(\\n        bytes32 hash,\\n        bytes32 r,\\n        bytes32 vs\\n    ) internal pure returns (address, RecoverError) {\\n        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n        uint8 v = uint8((uint256(vs) >> 255) + 27);\\n        return tryRecover(hash, v, r, s);\\n    }\\n\\n    /**\\n     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n     *\\n     * _Available since v4.2._\\n     */\\n    function recover(\\n        bytes32 hash,\\n        bytes32 r,\\n        bytes32 vs\\n    ) internal pure returns (address) {\\n        (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n        _throwError(error);\\n        return recovered;\\n    }\\n\\n    /**\\n     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n     * `r` and `s` signature fields separately.\\n     *\\n     * _Available since v4.3._\\n     */\\n    function tryRecover(\\n        bytes32 hash,\\n        uint8 v,\\n        bytes32 r,\\n        bytes32 s\\n    ) internal pure returns (address, RecoverError) {\\n        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n        // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n        // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n        //\\n        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n        // these malleable signatures as well.\\n        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n            return (address(0), RecoverError.InvalidSignatureS);\\n        }\\n        if (v != 27 && v != 28) {\\n            return (address(0), RecoverError.InvalidSignatureV);\\n        }\\n\\n        // If the signature is valid (and not malleable), return the signer address\\n        address signer = ecrecover(hash, v, r, s);\\n        if (signer == address(0)) {\\n            return (address(0), RecoverError.InvalidSignature);\\n        }\\n\\n        return (signer, RecoverError.NoError);\\n    }\\n\\n    /**\\n     * @dev Overload of {ECDSA-recover} that receives the `v`,\\n     * `r` and `s` signature fields separately.\\n     */\\n    function recover(\\n        bytes32 hash,\\n        uint8 v,\\n        bytes32 r,\\n        bytes32 s\\n    ) internal pure returns (address) {\\n        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n        _throwError(error);\\n        return recovered;\\n    }\\n\\n    /**\\n     * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n     * produces hash corresponding to the one signed with the\\n     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n     * JSON-RPC method as part of EIP-191.\\n     *\\n     * See {recover}.\\n     */\\n    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n        // 32 is the length in bytes of hash,\\n        // enforced by the type signature above\\n        return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n    }\\n\\n    /**\\n     * @dev Returns an Ethereum Signed Message, created from `s`. This\\n     * produces hash corresponding to the one signed with the\\n     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n     * JSON-RPC method as part of EIP-191.\\n     *\\n     * See {recover}.\\n     */\\n    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n        return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", StringsUpgradeable.toString(s.length), s));\\n    }\\n\\n    /**\\n     * @dev Returns an Ethereum Signed Typed Data, created from a\\n     * `domainSeparator` and a `structHash`. This produces hash corresponding\\n     * to the one signed with the\\n     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n     * JSON-RPC method as part of EIP-712.\\n     *\\n     * See {recover}.\\n     */\\n    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n        return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n    }\\n}\\n\",\"keccak256\":\"0x6602a65e0277f31f45cad4c7a15b024fd182f2f0e01eaa1954103b0d57848a27\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/SignatureCheckerUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/SignatureChecker.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSAUpgradeable.sol\\\";\\nimport \\\"../AddressUpgradeable.sol\\\";\\nimport \\\"../../interfaces/IERC1271Upgradeable.sol\\\";\\n\\n/**\\n * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA\\n * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like\\n * Argent and Gnosis Safe.\\n *\\n * _Available since v4.1._\\n */\\nlibrary SignatureCheckerUpgradeable {\\n    /**\\n     * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the\\n     * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`.\\n     *\\n     * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\\n     * change through time. It could return true at block N and false at block N+1 (or the opposite).\\n     */\\n    function isValidSignatureNow(\\n        address signer,\\n        bytes32 hash,\\n        bytes memory signature\\n    ) internal view returns (bool) {\\n        (address recovered, ECDSAUpgradeable.RecoverError error) = ECDSAUpgradeable.tryRecover(hash, signature);\\n        if (error == ECDSAUpgradeable.RecoverError.NoError && recovered == signer) {\\n            return true;\\n        }\\n\\n        (bool success, bytes memory result) = signer.staticcall(\\n            abi.encodeWithSelector(IERC1271Upgradeable.isValidSignature.selector, hash, signature)\\n        );\\n        return (success && result.length == 32 && abi.decode(result, (bytes4)) == IERC1271Upgradeable.isValidSignature.selector);\\n    }\\n}\\n\",\"keccak256\":\"0xb19a57535ad6c6d773f61c1e8f8cc190fa35e12bfadf3743092537c7695fd96a\",\"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/ProviderRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSE\\n\\npragma solidity >=0.8.0;\\n\\nimport '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/utils/cryptography/SignatureCheckerUpgradeable.sol';\\nimport '../interfaces/IProviderRegistry.sol';\\nimport './RouterWrapper.sol';\\n\\n/// @author Alexandas\\n/// @dev provider registry contract\\ncontract ProviderRegistry is IProviderRegistry, RouterWrapper, OwnableUpgradeable {\\n\\t/// @dev all providers\\n\\tmapping(address => bool) internal providers;\\n\\n\\t/// @dev all provider wallets\\n\\tmapping(address => address) internal providerWallets;\\n\\n\\tconstructor() initializer {}\\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 add a provider\\n\\t/// @param provider address\\n\\tfunction addProvider(address provider) external onlyGovernance {\\n\\t\\t_addProvider(provider);\\n\\t}\\n\\n\\t/// @dev remove a provider\\n\\t/// @param provider address\\n\\tfunction removeProvider(address provider) external onlyGovernance {\\n\\t\\t_removeProvider(provider);\\n\\t}\\n\\n\\tfunction _addProvider(address provider) internal {\\n\\t\\trequire(!isProvider(provider), 'ProviderRegistry: provider existed');\\n\\t\\tproviders[provider] = true;\\n\\n\\t\\temit AddProvider(provider);\\n\\t}\\n\\n\\tfunction _removeProvider(address provider) internal {\\n\\t\\trequire(isProvider(provider), 'ProviderRegistry: nonexistent provider');\\n\\t\\tdelete providers[provider];\\n\\n\\t\\temit RemoveProvider(provider);\\n\\t}\\n\\n\\t/// @dev add provider wallet\\n\\t/// @param wallet wallet address\\n\\tfunction addWallet(address wallet) external onlyProvider {\\n\\t\\t_addWallet(msg.sender, wallet);\\n\\t}\\n\\n\\t/// @dev remove provider wallet\\n\\t/// @param wallet wallet address\\n\\tfunction removeWallet(address wallet) external onlyProvider {\\n\\t\\t_removeWallet(msg.sender, wallet);\\n\\t}\\n\\n\\tfunction _addWallet(address provider, address wallet) internal {\\n\\t\\trequire(!providerWalletExists(provider), 'ProviderRegistry: provider wallet exists');\\n\\t\\tproviderWallets[provider] = wallet;\\n\\n\\t\\temit AddProivderWallet(provider, wallet);\\n\\t}\\n\\n\\tfunction _removeWallet(address provider, address wallet) internal {\\n\\t\\trequire(providerWalletExists(provider), 'ProviderRegistry: nonexistent provider wallet');\\n\\t\\tdelete providerWallets[provider];\\n\\t\\temit RemoveProviderWallet(provider, wallet);\\n\\t}\\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) public view override returns (bool) {\\n\\t\\treturn providerWallets[provider] != address(0);\\n\\t}\\n\\n\\t/// @dev return provider wallet\\n\\t/// @param provider address\\n\\t/// @return provider wallet\\n\\tfunction providerWallet(address provider) public view override returns (address) {\\n\\t\\trequire(providerWalletExists(provider), 'ProviderRegistry: nonexistent provider wallet');\\n\\t\\treturn providerWallets[provider];\\n\\t}\\n\\n\\t/// @dev return whether address is a provider\\n\\t/// @param provider address\\n\\t/// @return whether address is a provider\\n\\tfunction isProvider(address provider) public view override returns (bool) {\\n\\t\\treturn providers[provider];\\n\\t}\\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 whether signature is valid\\n\\tfunction isValidSignature(\\n\\t\\taddress provider,\\n\\t\\tbytes32 hash,\\n\\t\\tbytes memory signature\\n\\t) public view returns (bool) {\\n\\t\\trequire(isProvider(provider), 'ProviderRegistry: nonexistent provider');\\n\\t\\treturn SignatureCheckerUpgradeable.isValidSignatureNow(provider, hash, signature);\\n\\t}\\n}\\n\",\"keccak256\":\"0x3e183c8391a03eb91091b6266fde7d93000bcc12c35ed27787f82fa4266db06b\",\"license\":\"UNLICENSE\"},\"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/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": "0x60806040523480156200001157600080fd5b5060006200002060016200008e565b9050801562000039576000805461ff0019166101001790555b801562000087576000805461ff00191690556040517f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906200007e9060019062000168565b60405180910390a15b50620001cb565b60008054610100900460ff1615620000f7578160ff166001148015620000c75750620000c5306200013b60201b620007bc1760201c565b155b620000ef5760405162461bcd60e51b8152600401620000e69062000178565b60405180910390fd5b506000919050565b60005460ff808416911610620001215760405162461bcd60e51b8152600401620000e69062000178565b506000805460ff191660ff92909216919091179055600190565b6001600160a01b03163b151590565b600060ff82165b92915050565b62000162816200014a565b82525050565b6020810162000151828462000157565b602080825281016200015181602e81527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160208201526d191e481a5b9a5d1a585b1a5e995960921b604082015260600190565b6116f180620001db6000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80638da5cb5b1161008c578063efeb5f1f11610066578063efeb5f1f146101c7578063f2fde38b146101da578063f887ea40146101ed578063f90cef781461021357600080fd5b80638da5cb5b1461016c578063a75fe8e114610186578063d82945191461019957600080fd5b8063238a4d1e146100d457806346e2577a146100fd578063485cc955146101125780636b074a0714610125578063715018a6146101515780638a355a5714610159575b600080fd5b6100e76100e2366004610fbb565b610226565b6040516100f49190611030565b60405180910390f35b61011061010b36600461103e565b61027c565b005b61011061012036600461107e565b61033a565b6100e761013336600461103e565b6001600160a01b031660009081526065602052604090205460ff1690565b6101106103c0565b61011061016736600461103e565b6103f6565b6033546001600160a01b03165b6040516100f491906110c4565b61011061019436600461103e565b6104b0565b6100e76101a736600461103e565b6001600160a01b0390811660009081526066602052604090205416151590565b6101106101d536600461103e565b6105dc565b6101106101e836600461103e565b610708565b600054610206906201000090046001600160a01b031681565b6040516100f49190611102565b61017961022136600461103e565b610764565b6001600160a01b03831660009081526065602052604081205460ff166102675760405162461bcd60e51b815260040161025e90611156565b60405180910390fd5b6102728484846107cb565b90505b9392505050565b60008060029054906101000a90046001600160a01b03166001600160a01b031663945391126040518163ffffffff1660e01b815260040160206040518083038186803b1580156102cb57600080fd5b505afa1580156102df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103039190611171565b9050336001600160a01b0382161461032d5760405162461bcd60e51b815260040161025e906111da565b61033682610917565b5050565b600061034660016109ae565b9050801561035e576000805461ff0019166101001790555b61036783610a3b565b61037082610a8d565b80156103bb576000805461ff00191690556040517f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906103b2906001906111fe565b60405180910390a15b505050565b6033546001600160a01b031633146103ea5760405162461bcd60e51b815260040161025e90611241565b6103f46000610a3b565b565b60008060029054906101000a90046001600160a01b03166001600160a01b031663945391126040518163ffffffff1660e01b815260040160206040518083038186803b15801561044557600080fd5b505afa158015610459573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047d9190611171565b9050336001600160a01b038216146104a75760405162461bcd60e51b815260040161025e906111da565b61033682610abd565b60008060029054906101000a90046001600160a01b03166001600160a01b031663a5a3f6c86040518163ffffffff1660e01b815260040160206040518083038186803b1580156104ff57600080fd5b505afa158015610513573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105379190611171565b604051636b074a0760e01b81529091506001600160a01b03821690636b074a07906105669033906004016110c4565b60206040518083038186803b15801561057e57600080fd5b505afa158015610592573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b69190611264565b6105d25760405162461bcd60e51b815260040161025e906112cb565b6103363383610b45565b60008060029054906101000a90046001600160a01b03166001600160a01b031663a5a3f6c86040518163ffffffff1660e01b815260040160206040518083038186803b15801561062b57600080fd5b505afa15801561063f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106639190611171565b604051636b074a0760e01b81529091506001600160a01b03821690636b074a07906106929033906004016110c4565b60206040518083038186803b1580156106aa57600080fd5b505afa1580156106be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106e29190611264565b6106fe5760405162461bcd60e51b815260040161025e906112cb565b6103363383610be0565b6033546001600160a01b031633146107325760405162461bcd60e51b815260040161025e90611241565b6001600160a01b0381166107585760405162461bcd60e51b815260040161025e9061131e565b61076181610a3b565b50565b6001600160a01b0380821660009081526066602052604081205490911661079d5760405162461bcd60e51b815260040161025e90611378565b506001600160a01b039081166000908152606660205260409020541690565b6001600160a01b03163b151590565b60008060006107da8585610c79565b909250905060008160048111156107f3576107f3611388565b1480156108115750856001600160a01b0316826001600160a01b0316145b1561082157600192505050610275565b600080876001600160a01b0316631626ba7e60e01b8888604051602401610849929190611406565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516108879190611448565b600060405180830381855afa9150503d80600081146108c2576040519150601f19603f3d011682016040523d82523d6000602084013e6108c7565b606091505b50915091508180156108da575080516020145b801561090b57508051630b135d3f60e11b906108ff908301602090810190840161146f565b6001600160e01b031916145b98975050505050505050565b6001600160a01b03811660009081526065602052604090205460ff16156109505760405162461bcd60e51b815260040161025e906114cf565b6001600160a01b03811660009081526065602052604090819020805460ff19166001179055517f635a554d7028e977037c71e4fefb0d02f19e160c13f01f813a18d362b4605c6d906109a39083906110c4565b60405180910390a150565b60008054610100900460ff16156109f5578160ff1660011480156109d15750303b155b6109ed5760405162461bcd60e51b815260040161025e9061152a565b506000919050565b60005460ff808416911610610a1c5760405162461bcd60e51b815260040161025e9061152a565b506000805460ff191660ff92909216919091179055600190565b919050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610ab45760405162461bcd60e51b815260040161025e90611582565b61076181610ce9565b6001600160a01b03811660009081526065602052604090205460ff16610af55760405162461bcd60e51b815260040161025e90611156565b6001600160a01b03811660009081526065602052604090819020805460ff19169055517f8ab468b9f8f57e82f33d9a1742c03768ff84410a4911e8647bfa641826876904906109a39083906110c4565b6001600160a01b0380831660009081526066602052604090205416610b7c5760405162461bcd60e51b815260040161025e90611378565b6001600160a01b0382166000908152606660205260409081902080546001600160a01b0319169055517f7a573913cf794a4333bbb2d808419316d0c2906f8d819634301a4125554067a990610bd49084908490611592565b60405180910390a15050565b6001600160a01b038083166000908152606660205260409020541615610c185760405162461bcd60e51b815260040161025e906115f2565b6001600160a01b038281166000908152606660205260409081902080546001600160a01b03191692841692909217909155517fc646d3d00ef6760114da08071b447acd4b21bf11a1f6d650d1d2f744da6bf8b990610bd49084908490611592565b600080825160411415610cb05760208301516040840151606085015160001a610ca487828585610d61565b94509450505050610ce2565b825160401415610cda5760208301516040840151610ccf868383610e41565b935093505050610ce2565b506000905060025b9250929050565b6001600160a01b038116610d0f5760405162461bcd60e51b815260040161025e90611636565b6000805462010000600160b01b031916620100006001600160a01b038416021790556040517f7aed1d3e8155a07ccf395e44ea3109a0e2d6c9b29bbbe9f142d9790596f4dc80906109a3908390611102565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610d985750600090506003610e38565b8460ff16601b14158015610db057508460ff16601c14155b15610dc15750600090506004610e38565b600060018787878760405160008152602001604052604051610de6949392919061164f565b6020604051602081039080840390855afa158015610e08573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610e3157600060019250925050610e38565b9150600090505b94509492505050565b6000806001600160ff1b03831681610e5e60ff86901c601b6116a3565b9050610e6c87828885610d61565b935093505050935093915050565b60006001600160a01b0382165b92915050565b610e9681610e7a565b811461076157600080fd5b8035610e8781610e8d565b80610e96565b8035610e8781610eac565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff82111715610ef957610ef9610ebd565b6040525050565b6000610f0b60405190565b9050610a368282610ed3565b600067ffffffffffffffff821115610f3157610f31610ebd565b601f19601f83011660200192915050565b82818337506000910152565b6000610f61610f5c84610f17565b610f00565b905082815260208101848484011115610f7c57610f7c600080fd5b610f87848285610f42565b509392505050565b600082601f830112610fa357610fa3600080fd5b8135610fb3848260208601610f4e565b949350505050565b600080600060608486031215610fd357610fd3600080fd5b6000610fdf8686610ea1565b9350506020610ff086828701610eb2565b925050604084013567ffffffffffffffff81111561101057611010600080fd5b61101c86828701610f8f565b9150509250925092565b8015155b82525050565b60208101610e878284611026565b60006020828403121561105357611053600080fd5b6000610fb38484610ea1565b6000610e8782610e7a565b610e968161105f565b8035610e878161106a565b6000806040838503121561109457611094600080fd5b60006110a08585610ea1565b92505060206110b185828601611073565b9150509250929050565b61102a81610e7a565b60208101610e8782846110bb565b60006001600160a01b038216610e87565b6000610e87826110d2565b6000610e87826110e3565b61102a816110ee565b60208101610e8782846110f9565b602681526000602082017f50726f766964657252656769737472793a206e6f6e6578697374656e7420707281526537bb34b232b960d11b602082015291505b5060400190565b60208082528101610e8781611110565b8051610e878161106a565b60006020828403121561118657611186600080fd5b6000610fb38484611166565b602b81526000602082017f526f75746572577261707065723a2063616c6c6572206973206e6f742074686581526a20676f7665726e616e636560a81b6020820152915061114f565b60208082528101610e8781611192565b600060ff8216610e87565b61102a816111ea565b60208101610e8782846111f5565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572910190815260005b5060200190565b60208082528101610e878161120c565b801515610e96565b8051610e8781611251565b60006020828403121561127957611279600080fd5b6000610fb38484611259565b602981526000602082017f526f75746572577261707065723a2063616c6c6572206973206e6f742074686581526810383937bb34b232b960b91b6020820152915061114f565b60208082528101610e8781611285565b602681526000602082017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b6020820152915061114f565b60208082528101610e87816112db565b602d81526000602082017f50726f766964657252656769737472793a206e6f6e6578697374656e7420707281526c1bdd9a59195c881dd85b1b195d609a1b6020820152915061114f565b60208082528101610e878161132e565b634e487b7160e01b600052602160045260246000fd5b8061102a565b60005b838110156113bf5781810151838201526020016113a7565b838111156113ce576000848401525b50505050565b60006113de825190565b8084526020840193506113f58185602086016113a4565b601f01601f19169290920192915050565b60408101611414828561139e565b818103602083015261027281846113d4565b6000611430825190565b61143e8185602086016113a4565b9290920192915050565b60006102758284611426565b6001600160e01b03198116610e96565b8051610e8781611454565b60006020828403121561148457611484600080fd5b6000610fb38484611464565b602281526000602082017f50726f766964657252656769737472793a2070726f7669646572206578697374815261195960f21b6020820152915061114f565b60208082528101610e8781611490565b602e81526000602082017f496e697469616c697a61626c653a20636f6e747261637420697320616c72656181526d191e481a5b9a5d1a585b1a5e995960921b6020820152915061114f565b60208082528101610e87816114df565b602b81526000602082017f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206981526a6e697469616c697a696e6760a81b6020820152915061114f565b60208082528101610e878161153a565b604081016115a082856110bb565b61027560208301846110bb565b602881526000602082017f50726f766964657252656769737472793a2070726f76696465722077616c6c65815267742065786973747360c01b6020820152915061114f565b60208082528101610e87816115ad565b601b81526000602082017f526f75746572577261707065723a207a65726f206164647265737300000000008152915061123a565b60208082528101610e8781611602565b60ff811661102a565b6080810161165d828761139e565b61166a6020830186611646565b611677604083018561139e565b611684606083018461139e565b95945050505050565b634e487b7160e01b600052601160045260246000fd5b600082198211156116b6576116b661168d565b50019056fea2646970667358221220af6d4e603de9cc264c81bb17a2e78a221243f675e6952362365cb6e2e846950764736f6c63430008090033",
  "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c80638da5cb5b1161008c578063efeb5f1f11610066578063efeb5f1f146101c7578063f2fde38b146101da578063f887ea40146101ed578063f90cef781461021357600080fd5b80638da5cb5b1461016c578063a75fe8e114610186578063d82945191461019957600080fd5b8063238a4d1e146100d457806346e2577a146100fd578063485cc955146101125780636b074a0714610125578063715018a6146101515780638a355a5714610159575b600080fd5b6100e76100e2366004610fbb565b610226565b6040516100f49190611030565b60405180910390f35b61011061010b36600461103e565b61027c565b005b61011061012036600461107e565b61033a565b6100e761013336600461103e565b6001600160a01b031660009081526065602052604090205460ff1690565b6101106103c0565b61011061016736600461103e565b6103f6565b6033546001600160a01b03165b6040516100f491906110c4565b61011061019436600461103e565b6104b0565b6100e76101a736600461103e565b6001600160a01b0390811660009081526066602052604090205416151590565b6101106101d536600461103e565b6105dc565b6101106101e836600461103e565b610708565b600054610206906201000090046001600160a01b031681565b6040516100f49190611102565b61017961022136600461103e565b610764565b6001600160a01b03831660009081526065602052604081205460ff166102675760405162461bcd60e51b815260040161025e90611156565b60405180910390fd5b6102728484846107cb565b90505b9392505050565b60008060029054906101000a90046001600160a01b03166001600160a01b031663945391126040518163ffffffff1660e01b815260040160206040518083038186803b1580156102cb57600080fd5b505afa1580156102df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103039190611171565b9050336001600160a01b0382161461032d5760405162461bcd60e51b815260040161025e906111da565b61033682610917565b5050565b600061034660016109ae565b9050801561035e576000805461ff0019166101001790555b61036783610a3b565b61037082610a8d565b80156103bb576000805461ff00191690556040517f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906103b2906001906111fe565b60405180910390a15b505050565b6033546001600160a01b031633146103ea5760405162461bcd60e51b815260040161025e90611241565b6103f46000610a3b565b565b60008060029054906101000a90046001600160a01b03166001600160a01b031663945391126040518163ffffffff1660e01b815260040160206040518083038186803b15801561044557600080fd5b505afa158015610459573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047d9190611171565b9050336001600160a01b038216146104a75760405162461bcd60e51b815260040161025e906111da565b61033682610abd565b60008060029054906101000a90046001600160a01b03166001600160a01b031663a5a3f6c86040518163ffffffff1660e01b815260040160206040518083038186803b1580156104ff57600080fd5b505afa158015610513573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105379190611171565b604051636b074a0760e01b81529091506001600160a01b03821690636b074a07906105669033906004016110c4565b60206040518083038186803b15801561057e57600080fd5b505afa158015610592573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b69190611264565b6105d25760405162461bcd60e51b815260040161025e906112cb565b6103363383610b45565b60008060029054906101000a90046001600160a01b03166001600160a01b031663a5a3f6c86040518163ffffffff1660e01b815260040160206040518083038186803b15801561062b57600080fd5b505afa15801561063f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106639190611171565b604051636b074a0760e01b81529091506001600160a01b03821690636b074a07906106929033906004016110c4565b60206040518083038186803b1580156106aa57600080fd5b505afa1580156106be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106e29190611264565b6106fe5760405162461bcd60e51b815260040161025e906112cb565b6103363383610be0565b6033546001600160a01b031633146107325760405162461bcd60e51b815260040161025e90611241565b6001600160a01b0381166107585760405162461bcd60e51b815260040161025e9061131e565b61076181610a3b565b50565b6001600160a01b0380821660009081526066602052604081205490911661079d5760405162461bcd60e51b815260040161025e90611378565b506001600160a01b039081166000908152606660205260409020541690565b6001600160a01b03163b151590565b60008060006107da8585610c79565b909250905060008160048111156107f3576107f3611388565b1480156108115750856001600160a01b0316826001600160a01b0316145b1561082157600192505050610275565b600080876001600160a01b0316631626ba7e60e01b8888604051602401610849929190611406565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516108879190611448565b600060405180830381855afa9150503d80600081146108c2576040519150601f19603f3d011682016040523d82523d6000602084013e6108c7565b606091505b50915091508180156108da575080516020145b801561090b57508051630b135d3f60e11b906108ff908301602090810190840161146f565b6001600160e01b031916145b98975050505050505050565b6001600160a01b03811660009081526065602052604090205460ff16156109505760405162461bcd60e51b815260040161025e906114cf565b6001600160a01b03811660009081526065602052604090819020805460ff19166001179055517f635a554d7028e977037c71e4fefb0d02f19e160c13f01f813a18d362b4605c6d906109a39083906110c4565b60405180910390a150565b60008054610100900460ff16156109f5578160ff1660011480156109d15750303b155b6109ed5760405162461bcd60e51b815260040161025e9061152a565b506000919050565b60005460ff808416911610610a1c5760405162461bcd60e51b815260040161025e9061152a565b506000805460ff191660ff92909216919091179055600190565b919050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610ab45760405162461bcd60e51b815260040161025e90611582565b61076181610ce9565b6001600160a01b03811660009081526065602052604090205460ff16610af55760405162461bcd60e51b815260040161025e90611156565b6001600160a01b03811660009081526065602052604090819020805460ff19169055517f8ab468b9f8f57e82f33d9a1742c03768ff84410a4911e8647bfa641826876904906109a39083906110c4565b6001600160a01b0380831660009081526066602052604090205416610b7c5760405162461bcd60e51b815260040161025e90611378565b6001600160a01b0382166000908152606660205260409081902080546001600160a01b0319169055517f7a573913cf794a4333bbb2d808419316d0c2906f8d819634301a4125554067a990610bd49084908490611592565b60405180910390a15050565b6001600160a01b038083166000908152606660205260409020541615610c185760405162461bcd60e51b815260040161025e906115f2565b6001600160a01b038281166000908152606660205260409081902080546001600160a01b03191692841692909217909155517fc646d3d00ef6760114da08071b447acd4b21bf11a1f6d650d1d2f744da6bf8b990610bd49084908490611592565b600080825160411415610cb05760208301516040840151606085015160001a610ca487828585610d61565b94509450505050610ce2565b825160401415610cda5760208301516040840151610ccf868383610e41565b935093505050610ce2565b506000905060025b9250929050565b6001600160a01b038116610d0f5760405162461bcd60e51b815260040161025e90611636565b6000805462010000600160b01b031916620100006001600160a01b038416021790556040517f7aed1d3e8155a07ccf395e44ea3109a0e2d6c9b29bbbe9f142d9790596f4dc80906109a3908390611102565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610d985750600090506003610e38565b8460ff16601b14158015610db057508460ff16601c14155b15610dc15750600090506004610e38565b600060018787878760405160008152602001604052604051610de6949392919061164f565b6020604051602081039080840390855afa158015610e08573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610e3157600060019250925050610e38565b9150600090505b94509492505050565b6000806001600160ff1b03831681610e5e60ff86901c601b6116a3565b9050610e6c87828885610d61565b935093505050935093915050565b60006001600160a01b0382165b92915050565b610e9681610e7a565b811461076157600080fd5b8035610e8781610e8d565b80610e96565b8035610e8781610eac565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff82111715610ef957610ef9610ebd565b6040525050565b6000610f0b60405190565b9050610a368282610ed3565b600067ffffffffffffffff821115610f3157610f31610ebd565b601f19601f83011660200192915050565b82818337506000910152565b6000610f61610f5c84610f17565b610f00565b905082815260208101848484011115610f7c57610f7c600080fd5b610f87848285610f42565b509392505050565b600082601f830112610fa357610fa3600080fd5b8135610fb3848260208601610f4e565b949350505050565b600080600060608486031215610fd357610fd3600080fd5b6000610fdf8686610ea1565b9350506020610ff086828701610eb2565b925050604084013567ffffffffffffffff81111561101057611010600080fd5b61101c86828701610f8f565b9150509250925092565b8015155b82525050565b60208101610e878284611026565b60006020828403121561105357611053600080fd5b6000610fb38484610ea1565b6000610e8782610e7a565b610e968161105f565b8035610e878161106a565b6000806040838503121561109457611094600080fd5b60006110a08585610ea1565b92505060206110b185828601611073565b9150509250929050565b61102a81610e7a565b60208101610e8782846110bb565b60006001600160a01b038216610e87565b6000610e87826110d2565b6000610e87826110e3565b61102a816110ee565b60208101610e8782846110f9565b602681526000602082017f50726f766964657252656769737472793a206e6f6e6578697374656e7420707281526537bb34b232b960d11b602082015291505b5060400190565b60208082528101610e8781611110565b8051610e878161106a565b60006020828403121561118657611186600080fd5b6000610fb38484611166565b602b81526000602082017f526f75746572577261707065723a2063616c6c6572206973206e6f742074686581526a20676f7665726e616e636560a81b6020820152915061114f565b60208082528101610e8781611192565b600060ff8216610e87565b61102a816111ea565b60208101610e8782846111f5565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572910190815260005b5060200190565b60208082528101610e878161120c565b801515610e96565b8051610e8781611251565b60006020828403121561127957611279600080fd5b6000610fb38484611259565b602981526000602082017f526f75746572577261707065723a2063616c6c6572206973206e6f742074686581526810383937bb34b232b960b91b6020820152915061114f565b60208082528101610e8781611285565b602681526000602082017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b6020820152915061114f565b60208082528101610e87816112db565b602d81526000602082017f50726f766964657252656769737472793a206e6f6e6578697374656e7420707281526c1bdd9a59195c881dd85b1b195d609a1b6020820152915061114f565b60208082528101610e878161132e565b634e487b7160e01b600052602160045260246000fd5b8061102a565b60005b838110156113bf5781810151838201526020016113a7565b838111156113ce576000848401525b50505050565b60006113de825190565b8084526020840193506113f58185602086016113a4565b601f01601f19169290920192915050565b60408101611414828561139e565b818103602083015261027281846113d4565b6000611430825190565b61143e8185602086016113a4565b9290920192915050565b60006102758284611426565b6001600160e01b03198116610e96565b8051610e8781611454565b60006020828403121561148457611484600080fd5b6000610fb38484611464565b602281526000602082017f50726f766964657252656769737472793a2070726f7669646572206578697374815261195960f21b6020820152915061114f565b60208082528101610e8781611490565b602e81526000602082017f496e697469616c697a61626c653a20636f6e747261637420697320616c72656181526d191e481a5b9a5d1a585b1a5e995960921b6020820152915061114f565b60208082528101610e87816114df565b602b81526000602082017f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206981526a6e697469616c697a696e6760a81b6020820152915061114f565b60208082528101610e878161153a565b604081016115a082856110bb565b61027560208301846110bb565b602881526000602082017f50726f766964657252656769737472793a2070726f76696465722077616c6c65815267742065786973747360c01b6020820152915061114f565b60208082528101610e87816115ad565b601b81526000602082017f526f75746572577261707065723a207a65726f206164647265737300000000008152915061123a565b60208082528101610e8781611602565b60ff811661102a565b6080810161165d828761139e565b61166a6020830186611646565b611677604083018561139e565b611684606083018461139e565b95945050505050565b634e487b7160e01b600052601160045260246000fd5b600082198211156116b6576116b661168d565b50019056fea2646970667358221220af6d4e603de9cc264c81bb17a2e78a221243f675e6952362365cb6e2e846950764736f6c63430008090033",
  "devdoc": {
    "author": "Alexandas",
    "details": "provider registry contract",
    "kind": "dev",
    "methods": {
      "addProvider(address)": {
        "details": "add a provider",
        "params": {
          "provider": "address"
        }
      },
      "addWallet(address)": {
        "details": "add provider wallet",
        "params": {
          "wallet": "wallet address"
        }
      },
      "initialize(address,address)": {
        "details": "proxy initialize function",
        "params": {
          "owner": "contract owner",
          "router": "router contract address"
        }
      },
      "isProvider(address)": {
        "details": "return whether address is a provider",
        "params": {
          "provider": "address"
        },
        "returns": {
          "_0": "whether address is a provider"
        }
      },
      "isValidSignature(address,bytes32,bytes)": {
        "details": "return whether a valid signature",
        "params": {
          "hash": "message hash",
          "provider": "address",
          "signature": "provider signature for message hash"
        },
        "returns": {
          "_0": "whether signature is valid"
        }
      },
      "owner()": {
        "details": "Returns the address of the current owner."
      },
      "providerWallet(address)": {
        "details": "return provider wallet",
        "params": {
          "provider": "address"
        },
        "returns": {
          "_0": "provider wallet"
        }
      },
      "providerWalletExists(address)": {
        "details": "return provider wallet exists",
        "params": {
          "provider": "address"
        },
        "returns": {
          "_0": "whether provider wallet exists"
        }
      },
      "removeProvider(address)": {
        "details": "remove a provider",
        "params": {
          "provider": "address"
        }
      },
      "removeWallet(address)": {
        "details": "remove provider wallet",
        "params": {
          "wallet": "wallet address"
        }
      },
      "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."
      },
      "transferOwnership(address)": {
        "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
      }
    },
    "stateVariables": {
      "providerWallets": {
        "details": "all provider wallets"
      },
      "providers": {
        "details": "all providers"
      }
    },
    "version": 1
  },
  "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
  },
  "storageLayout": {
    "storage": [
      {
        "astId": 147,
        "contract": "contracts/govers/ProviderRegistry.sol:ProviderRegistry",
        "label": "_initialized",
        "offset": 0,
        "slot": "0",
        "type": "t_uint8"
      },
      {
        "astId": 150,
        "contract": "contracts/govers/ProviderRegistry.sol:ProviderRegistry",
        "label": "_initializing",
        "offset": 1,
        "slot": "0",
        "type": "t_bool"
      },
      {
        "astId": 5834,
        "contract": "contracts/govers/ProviderRegistry.sol:ProviderRegistry",
        "label": "router",
        "offset": 2,
        "slot": "0",
        "type": "t_contract(IRouter)6848"
      },
      {
        "astId": 1038,
        "contract": "contracts/govers/ProviderRegistry.sol:ProviderRegistry",
        "label": "__gap",
        "offset": 0,
        "slot": "1",
        "type": "t_array(t_uint256)50_storage"
      },
      {
        "astId": 10,
        "contract": "contracts/govers/ProviderRegistry.sol:ProviderRegistry",
        "label": "_owner",
        "offset": 0,
        "slot": "51",
        "type": "t_address"
      },
      {
        "astId": 122,
        "contract": "contracts/govers/ProviderRegistry.sol:ProviderRegistry",
        "label": "__gap",
        "offset": 0,
        "slot": "52",
        "type": "t_array(t_uint256)49_storage"
      },
      {
        "astId": 5061,
        "contract": "contracts/govers/ProviderRegistry.sol:ProviderRegistry",
        "label": "providers",
        "offset": 0,
        "slot": "101",
        "type": "t_mapping(t_address,t_bool)"
      },
      {
        "astId": 5066,
        "contract": "contracts/govers/ProviderRegistry.sol:ProviderRegistry",
        "label": "providerWallets",
        "offset": 0,
        "slot": "102",
        "type": "t_mapping(t_address,t_address)"
      }
    ],
    "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_contract(IRouter)6848": {
        "encoding": "inplace",
        "label": "contract IRouter",
        "numberOfBytes": "20"
      },
      "t_mapping(t_address,t_address)": {
        "encoding": "mapping",
        "key": "t_address",
        "label": "mapping(address => address)",
        "numberOfBytes": "32",
        "value": "t_address"
      },
      "t_mapping(t_address,t_bool)": {
        "encoding": "mapping",
        "key": "t_address",
        "label": "mapping(address => bool)",
        "numberOfBytes": "32",
        "value": "t_bool"
      },
      "t_uint256": {
        "encoding": "inplace",
        "label": "uint256",
        "numberOfBytes": "32"
      },
      "t_uint8": {
        "encoding": "inplace",
        "label": "uint8",
        "numberOfBytes": "1"
      }
    }
  }
}