{
  "address": "0xda0c5DEfFB0d371d06a6DC205fD74d1fc47e1FAB",
  "abi": [
    {
      "inputs": [],
      "stateMutability": "nonpayable",
      "type": "constructor"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint8",
          "name": "version",
          "type": "uint8"
        }
      ],
      "name": "Initialized",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "contract IMessageSender",
          "name": "messageSender",
          "type": "address"
        }
      ],
      "name": "MessageSenderUpdated",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "to",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "NativeWithdrawal",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "previousOwner",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "newOwner",
          "type": "address"
        }
      ],
      "name": "OwnershipTransferred",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "provider",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "bytes32",
          "name": "account",
          "type": "bytes32"
        },
        {
          "components": [
            {
              "internalType": "enum ResourceData.ResourceType",
              "name": "resourceType",
              "type": "uint8"
            },
            {
              "internalType": "uint256[]",
              "name": "values",
              "type": "uint256[]"
            }
          ],
          "indexed": false,
          "internalType": "struct ResourceData.ValuePayload[]",
          "name": "payloads",
          "type": "tuple[]"
        }
      ],
      "name": "PaidV2",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "account",
          "type": "address"
        }
      ],
      "name": "Paused",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "account",
          "type": "address"
        }
      ],
      "name": "PauserAdded",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "account",
          "type": "address"
        }
      ],
      "name": "PauserRemoved",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "contract IERC20Upgradeable",
          "name": "token",
          "type": "address"
        }
      ],
      "name": "TokenUpdated",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "account",
          "type": "address"
        }
      ],
      "name": "Unpaused",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "contract IERC20Upgradeable",
          "name": "token",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "address",
          "name": "to",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "Withdrawal",
      "type": "event"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "account",
          "type": "address"
        }
      ],
      "name": "addPauser",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "provider",
          "type": "address"
        },
        {
          "internalType": "bytes32",
          "name": "account",
          "type": "bytes32"
        },
        {
          "components": [
            {
              "internalType": "enum ResourceData.ResourceType",
              "name": "resourceType",
              "type": "uint8"
            },
            {
              "internalType": "uint256[]",
              "name": "values",
              "type": "uint256[]"
            }
          ],
          "internalType": "struct ResourceData.ValuePayload[]",
          "name": "payloads",
          "type": "tuple[]"
        }
      ],
      "name": "calcFeeV2",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "provider",
          "type": "address"
        },
        {
          "internalType": "bytes32",
          "name": "account",
          "type": "bytes32"
        },
        {
          "components": [
            {
              "internalType": "enum ResourceData.ResourceType",
              "name": "resourceType",
              "type": "uint8"
            },
            {
              "internalType": "uint256[]",
              "name": "values",
              "type": "uint256[]"
            }
          ],
          "internalType": "struct ResourceData.ValuePayload[]",
          "name": "payloads",
          "type": "tuple[]"
        }
      ],
      "name": "encodeMessageV2",
      "outputs": [
        {
          "internalType": "bytes",
          "name": "",
          "type": "bytes"
        }
      ],
      "stateMutability": "pure",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        },
        {
          "internalType": "bytes32",
          "name": "",
          "type": "bytes32"
        }
      ],
      "name": "fees",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "owner",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "pauser",
          "type": "address"
        },
        {
          "internalType": "contract IMessageSender",
          "name": "messageSender",
          "type": "address"
        },
        {
          "internalType": "contract IERC20Upgradeable",
          "name": "token",
          "type": "address"
        }
      ],
      "name": "initialize",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "account",
          "type": "address"
        }
      ],
      "name": "isPauser",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "messageSender",
      "outputs": [
        {
          "internalType": "contract IMessageSender",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "owner",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "contract IERC20Upgradeable",
          "name": "token",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "to",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "ownerWithdrawERC20",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address payable",
          "name": "to",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "ownerWithdrawNative",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "pause",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "paused",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "name": "pausers",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "provider",
          "type": "address"
        },
        {
          "internalType": "bytes32",
          "name": "account",
          "type": "bytes32"
        },
        {
          "components": [
            {
              "internalType": "enum ResourceData.ResourceType",
              "name": "resourceType",
              "type": "uint8"
            },
            {
              "internalType": "uint256[]",
              "name": "values",
              "type": "uint256[]"
            }
          ],
          "internalType": "struct ResourceData.ValuePayload[]",
          "name": "payloads",
          "type": "tuple[]"
        }
      ],
      "name": "payV2",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "components": [
            {
              "internalType": "enum ResourceData.ResourceType",
              "name": "resourceType",
              "type": "uint8"
            },
            {
              "internalType": "uint256[]",
              "name": "values",
              "type": "uint256[]"
            }
          ],
          "internalType": "struct ResourceData.ValuePayload[]",
          "name": "payloads",
          "type": "tuple[]"
        }
      ],
      "name": "payloadsValue",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "name": "providerBalances",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "account",
          "type": "address"
        }
      ],
      "name": "removePauser",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "renounceOwnership",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "renouncePauser",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "contract IMessageSender",
          "name": "_messageSender",
          "type": "address"
        }
      ],
      "name": "setMessageSender",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "contract IERC20Upgradeable",
          "name": "_token",
          "type": "address"
        }
      ],
      "name": "setToken",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "token",
      "outputs": [
        {
          "internalType": "contract IERC20Upgradeable",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "newOwner",
          "type": "address"
        }
      ],
      "name": "transferOwnership",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "unpause",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }
  ],
  "transactionHash": "0x3979d5ce30b557a1cea3853afc6865068d0bc08af98c61f11ebb3b572fb0cf7c",
  "receipt": {
    "to": null,
    "from": "0xe5bab2D79EB833FA25906Cd90540339C9aB8AE70",
    "contractAddress": "0xda0c5DEfFB0d371d06a6DC205fD74d1fc47e1FAB",
    "transactionIndex": 13,
    "gasUsed": "1909691",
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000",
    "blockHash": "0x619b19eb29c7a637e4e0952e7213e5b9170fdcc9366b316c9ced80af967fc9df",
    "transactionHash": "0x3979d5ce30b557a1cea3853afc6865068d0bc08af98c61f11ebb3b572fb0cf7c",
    "logs": [
      {
        "transactionIndex": 13,
        "blockNumber": 20746972,
        "transactionHash": "0x3979d5ce30b557a1cea3853afc6865068d0bc08af98c61f11ebb3b572fb0cf7c",
        "address": "0xda0c5DEfFB0d371d06a6DC205fD74d1fc47e1FAB",
        "topics": [
          "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"
        ],
        "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
        "logIndex": 35,
        "blockHash": "0x619b19eb29c7a637e4e0952e7213e5b9170fdcc9366b316c9ced80af967fc9df"
      }
    ],
    "blockNumber": 20746972,
    "cumulativeGasUsed": "2879815",
    "status": 1,
    "byzantium": true
  },
  "args": [],
  "numDeployments": 2,
  "solcInputHash": "c3b0da766a55c25c4426257602570d14",
  "metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract IMessageSender\",\"name\":\"messageSender\",\"type\":\"address\"}],\"name\":\"MessageSenderUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"NativeWithdrawal\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"account\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"enum ResourceData.ResourceType\",\"name\":\"resourceType\",\"type\":\"uint8\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"}],\"indexed\":false,\"internalType\":\"struct ResourceData.ValuePayload[]\",\"name\":\"payloads\",\"type\":\"tuple[]\"}],\"name\":\"PaidV2\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"PauserAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"PauserRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract IERC20Upgradeable\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"TokenUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract IERC20Upgradeable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"addPauser\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"account\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"enum ResourceData.ResourceType\",\"name\":\"resourceType\",\"type\":\"uint8\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"}],\"internalType\":\"struct ResourceData.ValuePayload[]\",\"name\":\"payloads\",\"type\":\"tuple[]\"}],\"name\":\"calcFeeV2\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"account\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"enum ResourceData.ResourceType\",\"name\":\"resourceType\",\"type\":\"uint8\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"}],\"internalType\":\"struct ResourceData.ValuePayload[]\",\"name\":\"payloads\",\"type\":\"tuple[]\"}],\"name\":\"encodeMessageV2\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"fees\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"pauser\",\"type\":\"address\"},{\"internalType\":\"contract IMessageSender\",\"name\":\"messageSender\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Upgradeable\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"isPauser\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messageSender\",\"outputs\":[{\"internalType\":\"contract IMessageSender\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Upgradeable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"ownerWithdrawERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"ownerWithdrawNative\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"pausers\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"account\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"enum ResourceData.ResourceType\",\"name\":\"resourceType\",\"type\":\"uint8\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"}],\"internalType\":\"struct ResourceData.ValuePayload[]\",\"name\":\"payloads\",\"type\":\"tuple[]\"}],\"name\":\"payV2\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum ResourceData.ResourceType\",\"name\":\"resourceType\",\"type\":\"uint8\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"}],\"internalType\":\"struct ResourceData.ValuePayload[]\",\"name\":\"payloads\",\"type\":\"tuple[]\"}],\"name\":\"payloadsValue\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"providerBalances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"removePauser\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renouncePauser\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IMessageSender\",\"name\":\"_messageSender\",\"type\":\"address\"}],\"name\":\"setMessageSender\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Upgradeable\",\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"setToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contract IERC20Upgradeable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Alexandas\",\"details\":\"source chain payment contract\",\"events\":{\"MessageSenderUpdated(address)\":{\"details\":\"emit when message sender updated\",\"params\":{\"messageSender\":\"messageSender address\"}},\"PaidV2(address,bytes32,(uint8,uint256[])[])\":{\"details\":\"emit when user paid on src chain\",\"params\":{\"account\":\"sender\",\"payloads\":\"payment payloads\",\"provider\":\"provider address\"}},\"TokenUpdated(address)\":{\"details\":\"emit when token updated\",\"params\":{\"token\":\"token address\"}}},\"kind\":\"dev\",\"methods\":{\"addPauser(address)\":{\"details\":\"add a pauser for the contract\",\"params\":{\"account\":\"address\"}},\"calcFeeV2(address,bytes32,(uint8,uint256[])[])\":{\"details\":\"calculate message fee\",\"params\":{\"account\":\"user account\",\"payloads\":\"payment payloads\",\"provider\":\"provider address\"},\"returns\":{\"value\":\"message fee\"}},\"encodeMessageV2(address,bytes32,(uint8,uint256[])[])\":{\"details\":\"encode payment message\",\"params\":{\"account\":\"user account\",\"payloads\":\"payment payloads\",\"provider\":\"provider address\"},\"returns\":{\"_0\":\"message message bytes\"}},\"initialize(address,address,address,address)\":{\"details\":\"proxy initialize function\",\"params\":{\"messageSender\":\"messageSender address\",\"owner\":\"contract owner\",\"pauser\":\"contract pauser\",\"token\":\"token address\"}},\"isPauser(address)\":{\"details\":\"whether the account is the contract pauser\",\"params\":{\"account\":\"address\"},\"returns\":{\"_0\":\"whether account is a pauser\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"ownerWithdrawERC20(address,address,uint256)\":{\"details\":\"withdraw token\",\"params\":{\"to\":\"receiver address\",\"token\":\"token address\",\"value\":\"token value\"}},\"ownerWithdrawNative(address,uint256)\":{\"details\":\"withdraw ETH\",\"params\":{\"to\":\"receiver address\",\"value\":\"token value\"}},\"pause()\":{\"details\":\"pause the contract\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"payV2(address,bytes32,(uint8,uint256[])[])\":{\"details\":\"pay from source chain\",\"params\":{\"account\":\"sender\",\"payloads\":\"payment payloads\",\"provider\":\"provider address\"}},\"payloadsValue((uint8,uint256[])[])\":{\"details\":\"return payment total token value\",\"params\":{\"payloads\":\"payment payloads\"},\"returns\":{\"value\":\"payment total token value\"}},\"removePauser(address)\":{\"details\":\"remove a pauser for the contract\",\"params\":{\"account\":\"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.\"},\"renouncePauser()\":{\"details\":\"remove a pauser for the contract\"},\"setMessageSender(address)\":{\"details\":\"update message sender\",\"params\":{\"_messageSender\":\"message sender address\"}},\"setToken(address)\":{\"details\":\"update token\",\"params\":{\"_token\":\"token address\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"unpause()\":{\"details\":\"unpause the contract\"}},\"stateVariables\":{\"messageSender\":{\"details\":\"message sender on src chain\"},\"token\":{\"details\":\"return token contract address\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/payments/SrcChainPayment.sol\":\"SrcChainPayment\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"details\":{\"constantOptimizer\":true,\"cse\":true,\"deduplicate\":true,\"inliner\":true,\"jumpdestRemover\":true,\"orderLiterals\":true,\"peephole\":true,\"yul\":false},\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n    address private _owner;\\n\\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n    /**\\n     * @dev Initializes the contract setting the deployer as the initial owner.\\n     */\\n    function __Ownable_init() internal onlyInitializing {\\n        __Ownable_init_unchained();\\n    }\\n\\n    function __Ownable_init_unchained() internal onlyInitializing {\\n        _transferOwnership(_msgSender());\\n    }\\n\\n    /**\\n     * @dev Returns the address of the current owner.\\n     */\\n    function owner() public view virtual returns (address) {\\n        return _owner;\\n    }\\n\\n    /**\\n     * @dev Throws if called by any account other than the owner.\\n     */\\n    modifier onlyOwner() {\\n        require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n        _;\\n    }\\n\\n    /**\\n     * @dev Leaves the contract without owner. It will not be possible to call\\n     * `onlyOwner` functions anymore. Can only be called by the current owner.\\n     *\\n     * NOTE: Renouncing ownership will leave the contract without an owner,\\n     * thereby removing any functionality that is only available to the owner.\\n     */\\n    function renounceOwnership() public virtual onlyOwner {\\n        _transferOwnership(address(0));\\n    }\\n\\n    /**\\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n     * Can only be called by the current owner.\\n     */\\n    function transferOwnership(address newOwner) public virtual onlyOwner {\\n        require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n        _transferOwnership(newOwner);\\n    }\\n\\n    /**\\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n     * Internal function without access restriction.\\n     */\\n    function _transferOwnership(address newOwner) internal virtual {\\n        address oldOwner = _owner;\\n        _owner = newOwner;\\n        emit OwnershipTransferred(oldOwner, newOwner);\\n    }\\n\\n    /**\\n     * @dev This empty reserved space is put in place to allow future versions to add new\\n     * variables without shifting down storage in the inheritance chain.\\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n     */\\n    uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x652fee292f698d8dba81bf287cb71f1682f6483b67ebe601a5f7387dcfc30b34\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/interfaces/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../token/ERC20/IERC20Upgradeable.sol\\\";\\n\",\"keccak256\":\"0xe73087c5001a37cf7186b3709377c7ceb01a0d38fb908723d1464cea66b4958c\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n *     function initialize() initializer public {\\n *         __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n *     }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n *     function initializeV2() reinitializer(2) public {\\n *         __ERC20Permit_init(\\\"MyToken\\\");\\n *     }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n *     _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n    /**\\n     * @dev Indicates that the contract has been initialized.\\n     * @custom:oz-retyped-from bool\\n     */\\n    uint8 private _initialized;\\n\\n    /**\\n     * @dev Indicates that the contract is in the process of being initialized.\\n     */\\n    bool private _initializing;\\n\\n    /**\\n     * @dev Triggered when the contract has been initialized or reinitialized.\\n     */\\n    event Initialized(uint8 version);\\n\\n    /**\\n     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n     * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\n     */\\n    modifier initializer() {\\n        bool isTopLevelCall = _setInitializedVersion(1);\\n        if (isTopLevelCall) {\\n            _initializing = true;\\n        }\\n        _;\\n        if (isTopLevelCall) {\\n            _initializing = false;\\n            emit Initialized(1);\\n        }\\n    }\\n\\n    /**\\n     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n     * used to initialize parent contracts.\\n     *\\n     * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n     * initialization step. This is essential to configure modules that are added through upgrades and that require\\n     * initialization.\\n     *\\n     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n     * a contract, executing them in the right order is up to the developer or operator.\\n     */\\n    modifier reinitializer(uint8 version) {\\n        bool isTopLevelCall = _setInitializedVersion(version);\\n        if (isTopLevelCall) {\\n            _initializing = true;\\n        }\\n        _;\\n        if (isTopLevelCall) {\\n            _initializing = false;\\n            emit Initialized(version);\\n        }\\n    }\\n\\n    /**\\n     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n     * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n     */\\n    modifier onlyInitializing() {\\n        require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n        _;\\n    }\\n\\n    /**\\n     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n     * through proxies.\\n     */\\n    function _disableInitializers() internal virtual {\\n        _setInitializedVersion(type(uint8).max);\\n    }\\n\\n    function _setInitializedVersion(uint8 version) private returns (bool) {\\n        // If the contract is initializing we ignore whether _initialized is set in order to support multiple\\n        // inheritance patterns, but we only do this in the context of a constructor, and for the lowest level\\n        // of initializers, because in other contexts the contract may have been reentered.\\n        if (_initializing) {\\n            require(\\n                version == 1 && !AddressUpgradeable.isContract(address(this)),\\n                \\\"Initializable: contract is already initialized\\\"\\n            );\\n            return false;\\n        } else {\\n            require(_initialized < version, \\\"Initializable: contract is already initialized\\\");\\n            _initialized = version;\\n            return true;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x7454006cccb737612b00104d2f606d728e2818b778e7e55542f063c614ce46ba\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n    /**\\n     * @dev Emitted when the pause is triggered by `account`.\\n     */\\n    event Paused(address account);\\n\\n    /**\\n     * @dev Emitted when the pause is lifted by `account`.\\n     */\\n    event Unpaused(address account);\\n\\n    bool private _paused;\\n\\n    /**\\n     * @dev Initializes the contract in unpaused state.\\n     */\\n    function __Pausable_init() internal onlyInitializing {\\n        __Pausable_init_unchained();\\n    }\\n\\n    function __Pausable_init_unchained() internal onlyInitializing {\\n        _paused = false;\\n    }\\n\\n    /**\\n     * @dev Returns true if the contract is paused, and false otherwise.\\n     */\\n    function paused() public view virtual returns (bool) {\\n        return _paused;\\n    }\\n\\n    /**\\n     * @dev Modifier to make a function callable only when the contract is not paused.\\n     *\\n     * Requirements:\\n     *\\n     * - The contract must not be paused.\\n     */\\n    modifier whenNotPaused() {\\n        require(!paused(), \\\"Pausable: paused\\\");\\n        _;\\n    }\\n\\n    /**\\n     * @dev Modifier to make a function callable only when the contract is paused.\\n     *\\n     * Requirements:\\n     *\\n     * - The contract must be paused.\\n     */\\n    modifier whenPaused() {\\n        require(paused(), \\\"Pausable: not paused\\\");\\n        _;\\n    }\\n\\n    /**\\n     * @dev Triggers stopped state.\\n     *\\n     * Requirements:\\n     *\\n     * - The contract must not be paused.\\n     */\\n    function _pause() internal virtual whenNotPaused {\\n        _paused = true;\\n        emit Paused(_msgSender());\\n    }\\n\\n    /**\\n     * @dev Returns to normal state.\\n     *\\n     * Requirements:\\n     *\\n     * - The contract must be paused.\\n     */\\n    function _unpause() internal virtual whenPaused {\\n        _paused = false;\\n        emit Unpaused(_msgSender());\\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\":\"0x041af89e5e60b74e1203d5a34614c9de379726f52ecb8cf064cab78b9fdcdf9d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    function __ReentrancyGuard_init() internal onlyInitializing {\\n        __ReentrancyGuard_init_unchained();\\n    }\\n\\n    function __ReentrancyGuard_init_unchained() internal onlyInitializing {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and making it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        // On the first call to nonReentrant, _notEntered will be true\\n        require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n\\n        _;\\n\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\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\":\"0x8cc03c5ac17e8a7396e487cda41fc1f1dfdb91db7d528e6da84bee3b6dd7e167\",\"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/token/ERC20/utils/SafeERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20Upgradeable {\\n    using AddressUpgradeable for address;\\n\\n    function safeTransfer(\\n        IERC20Upgradeable token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20Upgradeable token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Deprecated. This function has issues similar to the ones found in\\n     * {IERC20-approve}, and its usage is discouraged.\\n     *\\n     * Whenever possible, use {safeIncreaseAllowance} and\\n     * {safeDecreaseAllowance} instead.\\n     */\\n    function safeApprove(\\n        IERC20Upgradeable token,\\n        address spender,\\n        uint256 value\\n    ) internal {\\n        // safeApprove should only be called when setting an initial allowance,\\n        // or when resetting it to zero. To increase and decrease it, use\\n        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n        require(\\n            (value == 0) || (token.allowance(address(this), spender) == 0),\\n            \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n        );\\n        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n    }\\n\\n    function safeIncreaseAllowance(\\n        IERC20Upgradeable token,\\n        address spender,\\n        uint256 value\\n    ) internal {\\n        uint256 newAllowance = token.allowance(address(this), spender) + value;\\n        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n    }\\n\\n    function safeDecreaseAllowance(\\n        IERC20Upgradeable token,\\n        address spender,\\n        uint256 value\\n    ) internal {\\n        unchecked {\\n            uint256 oldAllowance = token.allowance(address(this), spender);\\n            require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n            uint256 newAllowance = oldAllowance - value;\\n            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n        }\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     * @param token The token targeted by the call.\\n     * @param data The call data (encoded using abi.encode or one of its variants).\\n     */\\n    function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\\n        // the target address contains contract code and also asserts for success in the low-level call.\\n\\n        bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n        if (returndata.length > 0) {\\n            // Return data is optional\\n            require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x3e26a49d2fa5ef8338b8a9467c91e54f417cb07e849b1cc0f4ebc4d2a147938e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n    /**\\n     * @dev Returns true if `account` is a contract.\\n     *\\n     * [IMPORTANT]\\n     * ====\\n     * It is unsafe to assume that an address for which this function returns\\n     * false is an externally-owned account (EOA) and not a contract.\\n     *\\n     * Among others, `isContract` will return false for the following\\n     * types of addresses:\\n     *\\n     *  - an externally-owned account\\n     *  - a contract in construction\\n     *  - an address where a contract will be created\\n     *  - an address where a contract lived, but was destroyed\\n     * ====\\n     *\\n     * [IMPORTANT]\\n     * ====\\n     * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n     *\\n     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n     * constructor.\\n     * ====\\n     */\\n    function isContract(address account) internal view returns (bool) {\\n        // This method relies on extcodesize/address.code.length, which returns 0\\n        // for contracts in construction, since the code is only stored at the end\\n        // of the constructor execution.\\n\\n        return account.code.length > 0;\\n    }\\n\\n    /**\\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n     * `recipient`, forwarding all available gas and reverting on errors.\\n     *\\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n     * imposed by `transfer`, making them unable to receive funds via\\n     * `transfer`. {sendValue} removes this limitation.\\n     *\\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n     *\\n     * IMPORTANT: because control is transferred to `recipient`, care must be\\n     * taken to not create reentrancy vulnerabilities. Consider using\\n     * {ReentrancyGuard} or the\\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n     */\\n    function sendValue(address payable recipient, uint256 amount) internal {\\n        require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n        (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n        require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n    }\\n\\n    /**\\n     * @dev Performs a Solidity function call using a low level `call`. A\\n     * plain `call` is an unsafe replacement for a function call: use this\\n     * function instead.\\n     *\\n     * If `target` reverts with a revert reason, it is bubbled up by this\\n     * function (like regular Solidity function calls).\\n     *\\n     * Returns the raw returned data. To convert to the expected return value,\\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n     *\\n     * Requirements:\\n     *\\n     * - `target` must be a contract.\\n     * - calling `target` with `data` must not revert.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n        return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n     * `errorMessage` as a fallback revert reason when `target` reverts.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCall(\\n        address target,\\n        bytes memory data,\\n        string memory errorMessage\\n    ) internal returns (bytes memory) {\\n        return functionCallWithValue(target, data, 0, errorMessage);\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n     * but also transferring `value` wei to `target`.\\n     *\\n     * Requirements:\\n     *\\n     * - the calling contract must have an ETH balance of at least `value`.\\n     * - the called Solidity function must be `payable`.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCallWithValue(\\n        address target,\\n        bytes memory data,\\n        uint256 value\\n    ) internal returns (bytes memory) {\\n        return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCallWithValue(\\n        address target,\\n        bytes memory data,\\n        uint256 value,\\n        string memory errorMessage\\n    ) internal returns (bytes memory) {\\n        require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n        require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\\n        return verifyCallResult(success, returndata, errorMessage);\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n     * but performing a static call.\\n     *\\n     * _Available since v3.3._\\n     */\\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n        return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n     * but performing a static call.\\n     *\\n     * _Available since v3.3._\\n     */\\n    function functionStaticCall(\\n        address target,\\n        bytes memory data,\\n        string memory errorMessage\\n    ) internal view returns (bytes memory) {\\n        require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n        (bool success, bytes memory returndata) = target.staticcall(data);\\n        return verifyCallResult(success, returndata, errorMessage);\\n    }\\n\\n    /**\\n     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n     * revert reason using the provided one.\\n     *\\n     * _Available since v4.3._\\n     */\\n    function verifyCallResult(\\n        bool success,\\n        bytes memory returndata,\\n        string memory errorMessage\\n    ) internal pure returns (bytes memory) {\\n        if (success) {\\n            return returndata;\\n        } else {\\n            // Look for revert reason and bubble it up if present\\n            if (returndata.length > 0) {\\n                // The easiest way to bubble the revert reason is using memory via assembly\\n\\n                assembly {\\n                    let returndata_size := mload(returndata)\\n                    revert(add(32, returndata), returndata_size)\\n                }\\n            } else {\\n                revert(errorMessage);\\n            }\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x55cf2bd9fc76704ddcdc19834cd288b7de00fc0f298a40ea16a954ae8991db2d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n    function __Context_init() internal onlyInitializing {\\n    }\\n\\n    function __Context_init_unchained() internal onlyInitializing {\\n    }\\n    function _msgSender() internal view virtual returns (address) {\\n        return msg.sender;\\n    }\\n\\n    function _msgData() internal view virtual returns (bytes calldata) {\\n        return msg.data;\\n    }\\n\\n    /**\\n     * @dev This empty reserved space is put in place to allow future versions to add new\\n     * variables without shifting down storage in the inheritance chain.\\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n     */\\n    uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMathUpgradeable {\\n    /**\\n     * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n     *\\n     * _Available since v3.4._\\n     */\\n    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n        unchecked {\\n            uint256 c = a + b;\\n            if (c < a) return (false, 0);\\n            return (true, c);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n     *\\n     * _Available since v3.4._\\n     */\\n    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n        unchecked {\\n            if (b > a) return (false, 0);\\n            return (true, a - b);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n     *\\n     * _Available since v3.4._\\n     */\\n    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n        unchecked {\\n            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n            // benefit is lost if 'b' is also tested.\\n            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n            if (a == 0) return (true, 0);\\n            uint256 c = a * b;\\n            if (c / a != b) return (false, 0);\\n            return (true, c);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n     *\\n     * _Available since v3.4._\\n     */\\n    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n        unchecked {\\n            if (b == 0) return (false, 0);\\n            return (true, a / b);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n     *\\n     * _Available since v3.4._\\n     */\\n    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n        unchecked {\\n            if (b == 0) return (false, 0);\\n            return (true, a % b);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the addition of two unsigned integers, reverting on\\n     * overflow.\\n     *\\n     * Counterpart to Solidity's `+` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Addition cannot overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a + b;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a - b;\\n    }\\n\\n    /**\\n     * @dev Returns the multiplication of two unsigned integers, reverting on\\n     * overflow.\\n     *\\n     * Counterpart to Solidity's `*` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Multiplication cannot overflow.\\n     */\\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a * b;\\n    }\\n\\n    /**\\n     * @dev Returns the integer division of two unsigned integers, reverting on\\n     * division by zero. The result is rounded towards zero.\\n     *\\n     * Counterpart to Solidity's `/` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - The divisor cannot be zero.\\n     */\\n    function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a / b;\\n    }\\n\\n    /**\\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n     * reverting when dividing by zero.\\n     *\\n     * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\\n     * invalid opcode to revert (consuming all remaining gas).\\n     *\\n     * Requirements:\\n     *\\n     * - The divisor cannot be zero.\\n     */\\n    function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a % b;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n     * overflow (when the result is negative).\\n     *\\n     * CAUTION: This function is deprecated because it requires allocating memory for the error\\n     * message unnecessarily. For custom revert reasons use {trySub}.\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(\\n        uint256 a,\\n        uint256 b,\\n        string memory errorMessage\\n    ) internal pure returns (uint256) {\\n        unchecked {\\n            require(b <= a, errorMessage);\\n            return a - b;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n     * division by zero. The result is rounded towards zero.\\n     *\\n     * Counterpart to Solidity's `/` operator. Note: this function uses a\\n     * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n     * uses an invalid opcode to revert (consuming all remaining gas).\\n     *\\n     * Requirements:\\n     *\\n     * - The divisor cannot be zero.\\n     */\\n    function div(\\n        uint256 a,\\n        uint256 b,\\n        string memory errorMessage\\n    ) internal pure returns (uint256) {\\n        unchecked {\\n            require(b > 0, errorMessage);\\n            return a / b;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n     * reverting with custom message when dividing by zero.\\n     *\\n     * CAUTION: This function is deprecated because it requires allocating memory for the error\\n     * message unnecessarily. For custom revert reasons use {tryMod}.\\n     *\\n     * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\\n     * invalid opcode to revert (consuming all remaining gas).\\n     *\\n     * Requirements:\\n     *\\n     * - The divisor cannot be zero.\\n     */\\n    function mod(\\n        uint256 a,\\n        uint256 b,\\n        string memory errorMessage\\n    ) internal pure returns (uint256) {\\n        unchecked {\\n            require(b > 0, errorMessage);\\n            return a % b;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xcaa8b7861115ea691c77ddbeac140a444e0edcd1d9812a43942c0f6b42b36a49\",\"license\":\"MIT\"},\"contracts/access/OwnerWithdrawable.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSE\\n\\npragma solidity >=0.8.0;\\n\\nimport '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/interfaces/IERC20Upgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol';\\n\\n/// @author Alexandas\\n/// @dev Make the contract owner can withdraw token and eth\\nabstract contract OwnerWithdrawable is OwnableUpgradeable {\\n\\tusing SafeERC20Upgradeable for IERC20Upgradeable;\\n\\n\\t/// @dev emit when token is withdrawn\\n\\t/// @param token token address\\n\\t/// @param to receiver address\\n\\t/// @param value token value\\n\\tevent Withdrawal(IERC20Upgradeable token, address to, uint256 value);\\n\\n\\t/// @dev emit when ETH is withdrawn\\n\\t/// @param to receiver address\\n\\t/// @param value token value\\n\\tevent NativeWithdrawal(address to, uint256 value);\\n\\n\\t/// @dev withdraw token\\n\\t/// @param token token address\\n\\t/// @param to receiver address\\n\\t/// @param value token value\\n\\tfunction ownerWithdrawERC20(\\n\\t\\tIERC20Upgradeable token,\\n\\t\\taddress to,\\n\\t\\tuint256 value\\n\\t) external onlyOwner {\\n\\t\\ttoken.safeTransfer(to, value);\\n\\t\\temit Withdrawal(token, to, value);\\n\\t}\\n\\n\\t/// @dev withdraw ETH\\n\\t/// @param to receiver address\\n\\t/// @param value token value\\n\\tfunction ownerWithdrawNative(address payable to, uint256 value) external onlyOwner {\\n\\t\\tbool success = to.send(value);\\n\\t\\trequire(success, 'OwnerWithdrawable: withdraw native token failed');\\n\\t\\temit NativeWithdrawal(to, value);\\n\\t}\\n}\\n\",\"keccak256\":\"0x0f36a2a9ed2839c2530c4e27f9b1797f13e8a6a3d3c9bcaa4c87202f14757954\",\"license\":\"UNLICENSE\"},\"contracts/access/Pauser.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n\\npragma solidity >=0.8.0;\\n\\nimport '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol';\\n\\n/// @author Alexandas\\n/// @dev Pauser contract\\nabstract contract Pauser is OwnableUpgradeable, PausableUpgradeable {\\n\\t/// @dev all pausers\\n\\tmapping(address => bool) public pausers;\\n\\n\\t/// @dev emit when pauser is added\\n\\t/// @param account pauser address\\n\\tevent PauserAdded(address account);\\n\\n\\t/// @dev emit when pauser is removed\\n\\t/// @param account pauser address\\n\\tevent PauserRemoved(address account);\\n\\n\\tfunction __Init_Pauser(address account) internal onlyInitializing {\\n\\t\\t_addPauser(account);\\n\\t}\\n\\n\\tmodifier onlyPauser() {\\n\\t\\trequire(isPauser(msg.sender), 'Pauser: caller is not the pauser');\\n\\t\\t_;\\n\\t}\\n\\n\\t/// @dev pause the contract\\n\\tfunction pause() public onlyPauser {\\n\\t\\t_pause();\\n\\t}\\n\\n\\t/// @dev unpause the contract\\n\\tfunction unpause() public onlyPauser {\\n\\t\\t_unpause();\\n\\t}\\n\\n\\t/// @dev whether the account is the contract pauser\\n\\t/// @param account address\\n\\t/// @return whether account is a pauser\\n\\tfunction isPauser(address account) public view returns (bool) {\\n\\t\\treturn pausers[account];\\n\\t}\\n\\n\\t/// @dev add a pauser for the contract\\n\\t/// @param account address\\n\\tfunction addPauser(address account) public onlyOwner {\\n\\t\\t_addPauser(account);\\n\\t}\\n\\n\\t/// @dev remove a pauser for the contract\\n\\t/// @param account address\\n\\tfunction removePauser(address account) public onlyOwner {\\n\\t\\t_removePauser(account);\\n\\t}\\n\\n\\t/// @dev remove a pauser for the contract\\n\\tfunction renouncePauser() public {\\n\\t\\t_removePauser(msg.sender);\\n\\t}\\n\\n\\tfunction _addPauser(address account) private {\\n\\t\\trequire(!isPauser(account), 'Pauser: account is already pauser');\\n\\t\\tpausers[account] = true;\\n\\t\\temit PauserAdded(account);\\n\\t}\\n\\n\\tfunction _removePauser(address account) private {\\n\\t\\trequire(isPauser(account), 'Pauser: account is not pauser');\\n\\t\\tdelete pausers[account];\\n\\t\\temit PauserRemoved(account);\\n\\t}\\n}\\n\",\"keccak256\":\"0x609e378196c861ff988b70c73d1cd3ac44f7a2023b22afd521fe7a8a0fb5b0ba\",\"license\":\"GPL-3.0-only\"},\"contracts/interfaces/IMessageSender.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSE\\n\\npragma solidity >=0.8.0;\\n\\nimport 'sgn-v2-contracts/contracts/message/libraries/MsgDataTypes.sol';\\n\\ninterface IMessageSender {\\n\\t/// @dev emit when src chain payment address updated\\n\\t/// @param payment payment address\\n\\tevent SrcChainPaymentUpdated(address payment);\\n\\n\\t/// @dev emit when src chain messageBus address updated\\n\\t/// @param messageBus messageBus address\\n\\tevent MessageBusUpdated(address messageBus);\\n\\n\\t/// @dev emit when dst chain receiver address updated\\n\\t/// @param receiver receiver address\\n\\tevent ReceiverUpdated(address receiver);\\n\\n\\t/// @dev emit when dst chain updated\\n\\t/// @param dstChainId dst chainId\\n\\tevent DstChainIdUpdated(uint64 dstChainId);\\n\\n\\t/// @dev emit when transfer refund\\n\\t/// @param token token address\\n\\t/// @param amount token amount\\n\\t/// @param message sender's message\\n\\t/// @param executor executor address\\n\\tevent MessageWithTransferRefund(address token, uint256 amount, bytes message, address executor);\\n\\n\\t/// @dev emit message sent\\n\\t/// @param sender sender contract address\\n\\t/// @param receiver receiver contract address\\n\\t/// @param srcChainId srcChainId\\n\\t/// @param dstChainId dstChainId\\n\\t/// @param message sender's message\\n\\tevent MessageSent(address sender, address receiver, uint64 srcChainId, uint64 dstChainId, bytes message);\\n\\n\\t/// @dev dst chain receiver\\n\\tfunction receiver() external view returns (address);\\n\\n\\t/// @dev dst chain chainId\\n\\tfunction dstChainId() external view returns (uint64);\\n\\n\\t/// @dev calculate message fee\\n\\tfunction calcFee(bytes memory message) external view returns (uint256);\\n\\n\\t/// @dev message id for Message bus in sgn\\n\\tfunction messageId(\\n\\t\\tMsgDataTypes.RouteInfo calldata route,\\n\\t\\tuint64 dstChainId,\\n\\t\\tbytes calldata message\\n\\t) external view returns (bytes32);\\n\\n\\t/// @dev send message to dst chain\\n\\t/// @param message message for dst chain\\n\\tfunction sendMessage(bytes memory message) external payable;\\n\\n}\\n\",\"keccak256\":\"0xef6f21d9e8b909e60a379cada24f2ff1b0011caf4e4efff26feb82ce470738f6\",\"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/payments/SrcChainPayment.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSE\\n\\npragma solidity >=0.8.0;\\n\\nimport '@openzeppelin/contracts-upgradeable/interfaces/IERC20Upgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol';\\n\\nimport '../interfaces/IMessageSender.sol';\\nimport '../libraries/ResourceData.sol';\\nimport '../access/OwnerWithdrawable.sol';\\nimport '../access/Pauser.sol';\\n\\n/// @author Alexandas\\n/// @dev source chain payment contract\\ncontract SrcChainPayment is ReentrancyGuardUpgradeable, Pauser, OwnerWithdrawable {\\n\\tusing SafeMathUpgradeable for uint256;\\n\\tusing SafeERC20Upgradeable for IERC20Upgradeable;\\n\\n\\t/// @dev return token contract address\\n\\tIERC20Upgradeable public token;\\n\\n\\t/// @dev message sender on src chain\\n\\tIMessageSender public messageSender;\\n\\n\\tmapping(address => uint256) public providerBalances;\\n\\n\\tmapping(address => mapping(bytes32 => uint256)) public fees;\\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 message sender updated\\n\\t/// @param messageSender messageSender address\\n\\tevent MessageSenderUpdated(IMessageSender messageSender);\\n\\n\\t/// @dev emit when user paid on src chain\\n\\t/// @param provider provider address\\n\\t/// @param account sender\\n\\t/// @param payloads payment payloads\\n\\tevent PaidV2(address provider, bytes32 account, ResourceData.ValuePayload[] payloads);\\n\\n\\tconstructor() initializer {}\\n\\n\\t/// @dev proxy initialize function\\n\\t/// @param owner contract owner\\n\\t/// @param pauser contract pauser\\n\\t/// @param messageSender messageSender address\\n\\t/// @param token token address\\n\\tfunction initialize(\\n\\t\\taddress owner,\\n\\t\\taddress pauser,\\n\\t\\tIMessageSender messageSender,\\n\\t\\tIERC20Upgradeable token\\n\\t) external initializer {\\n\\t\\t_transferOwnership(owner);\\n\\t\\t__Init_Pauser(pauser);\\n\\t\\t__Init_Message_Sender(messageSender);\\n\\t\\t__Init_Token(token);\\n\\t}\\n\\n\\t/// @dev initialize message sender\\n\\t/// @param _messageSender messageSender address\\n\\tfunction __Init_Message_Sender(IMessageSender _messageSender) internal onlyInitializing {\\n\\t\\t_setMessageSender(_messageSender);\\n\\t}\\n\\n\\tfunction __Init_Token(IERC20Upgradeable _token) internal onlyInitializing {\\n\\t\\t_setToken(_token);\\n\\t}\\n\\n\\t/// @dev pay from source chain\\n\\t/// @param provider provider address\\n\\t/// @param account sender\\n\\t/// @param payloads payment payloads\\n\\tfunction payV2(\\n\\t\\taddress provider,\\n\\t\\tbytes32 account,\\n\\t\\tResourceData.ValuePayload[] memory payloads\\n\\t) external payable whenNotPaused nonReentrant {\\n\\t\\tuint256 value = payloadsValue(payloads);\\n\\t\\tproviderBalances[provider] = providerBalances[provider] + value;\\n\\t\\tfees[provider][account] = fees[provider][account] + value;\\n\\t\\ttoken.safeTransferFrom(msg.sender, address(this), value);\\n\\t\\tmessageSender.sendMessage{value: msg.value}(encodeMessageV2(provider, account, payloads));\\n\\t\\temit PaidV2(provider, account, payloads);\\n\\t}\\n\\n\\t/// @dev return payment total token value\\n\\t/// @param payloads payment payloads\\n\\t/// @return value payment total token value\\n\\tfunction payloadsValue(ResourceData.ValuePayload[] memory payloads) public returns (uint256 value) {\\n\\t\\tvalue = ResourceData.totalValue(payloads);\\n\\t\\tvalue = ResourceData.matchResourceToToken(token, value);\\n\\t}\\n\\n\\t/// @dev update message sender\\n\\t/// @param _messageSender message sender address\\n\\tfunction setMessageSender(IMessageSender _messageSender) external onlyOwner {\\n\\t\\t_setMessageSender(_messageSender);\\n\\t}\\n\\n\\tfunction _setMessageSender(IMessageSender _messageSender) internal {\\n\\t\\trequire(address(_messageSender) != address(0), 'SrcChainPayment: zero address');\\n\\t\\tmessageSender = _messageSender;\\n\\t\\temit MessageSenderUpdated(_messageSender);\\n\\t}\\n\\n\\t/// @dev update token\\n\\t/// @param _token token address\\n\\tfunction setToken(IERC20Upgradeable _token) external onlyOwner {\\n\\t\\t_setToken(_token);\\n\\t}\\n\\n\\tfunction _setToken(IERC20Upgradeable _token) internal {\\n\\t\\trequire(address(_token) != address(0), 'SrcChainPayment: zero address');\\n\\t\\ttoken = _token;\\n\\t\\temit TokenUpdated(token);\\n\\t}\\n\\n\\t/// @dev calculate message fee\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @param payloads payment payloads\\n\\t/// @return value message fee\\n\\tfunction calcFeeV2(\\n\\t\\taddress provider,\\n\\t\\tbytes32 account,\\n\\t\\tResourceData.ValuePayload[] memory payloads\\n\\t) public view returns (uint256 value) {\\n\\t\\treturn messageSender.calcFee(encodeMessageV2(provider, account, payloads));\\n\\t}\\n\\n\\t/// @dev encode payment message\\n\\t/// @param provider provider address\\n\\t/// @param account user account\\n\\t/// @param payloads payment payloads\\n\\t/// @return message message bytes\\n\\tfunction encodeMessageV2(\\n\\t\\taddress provider,\\n\\t\\tbytes32 account,\\n\\t\\tResourceData.ValuePayload[] memory payloads\\n\\t) public pure returns (bytes memory) {\\n\\t\\treturn abi.encode(provider, account, payloads);\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x06b768692a66abaa84bcafababaab99b5b3cab59beae37839efbff658d78e0cd\",\"license\":\"UNLICENSE\"},\"sgn-v2-contracts/contracts/message/libraries/MsgDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n\\npragma solidity 0.8.9;\\n\\nlibrary MsgDataTypes {\\n    // bridge operation type at the sender side (src chain)\\n    enum BridgeSendType {\\n        Null,\\n        Liquidity,\\n        PegDeposit,\\n        PegBurn,\\n        PegV2Deposit,\\n        PegV2Burn,\\n        PegV2BurnFrom\\n    }\\n\\n    // bridge operation type at the receiver side (dst chain)\\n    enum TransferType {\\n        Null,\\n        LqRelay, // relay through liquidity bridge\\n        LqWithdraw, // withdraw from liquidity bridge\\n        PegMint, // mint through pegged token bridge\\n        PegWithdraw, // withdraw from original token vault\\n        PegV2Mint, // mint through pegged token bridge v2\\n        PegV2Withdraw // withdraw from original token vault v2\\n    }\\n\\n    enum MsgType {\\n        MessageWithTransfer,\\n        MessageOnly\\n    }\\n\\n    enum TxStatus {\\n        Null,\\n        Success,\\n        Fail,\\n        Fallback,\\n        Pending // transient state within a transaction\\n    }\\n\\n    struct TransferInfo {\\n        TransferType t;\\n        address sender;\\n        address receiver;\\n        address token;\\n        uint256 amount;\\n        uint64 wdseq; // only needed for LqWithdraw (refund)\\n        uint64 srcChainId;\\n        bytes32 refId;\\n        bytes32 srcTxHash; // src chain msg tx hash\\n    }\\n\\n    struct RouteInfo {\\n        address sender;\\n        address receiver;\\n        uint64 srcChainId;\\n        bytes32 srcTxHash; // src chain msg tx hash\\n    }\\n\\n    struct MsgWithTransferExecutionParams {\\n        bytes message;\\n        TransferInfo transfer;\\n        bytes[] sigs;\\n        address[] signers;\\n        uint256[] powers;\\n    }\\n\\n    struct BridgeTransferParams {\\n        bytes request;\\n        bytes[] sigs;\\n        address[] signers;\\n        uint256[] powers;\\n    }\\n}\\n\",\"keccak256\":\"0x4ac9e6e5be92e3e58adbcab75ef765458d37fd4908d764477a0f32a96f9ecbba\",\"license\":\"GPL-3.0-only\"}},\"version\":1}",
  "bytecode": "0x60806040523480156200001157600080fd5b5060006200002060016200008e565b9050801562000039576000805461ff0019166101001790555b801562000087576000805461ff00191690556040517f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906200007e9060019062000168565b60405180910390a15b50620001cb565b60008054610100900460ff1615620000f7578160ff166001148015620000c75750620000c5306200013b60201b62000ab41760201c565b155b620000ef5760405162461bcd60e51b8152600401620000e69062000178565b60405180910390fd5b506000919050565b60005460ff808416911610620001215760405162461bcd60e51b8152600401620000e69062000178565b506000805460ff191660ff92909216919091179055600190565b6001600160a01b03163b151590565b600060ff82165b92915050565b62000162816200014a565b82525050565b6020810162000151828462000157565b602080825281016200015181602e81527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160208201526d191e481a5b9a5d1a585b1a5e995960921b604082015260600190565b6120fa80620001db6000396000f3fe60806040526004361061014b5760003560e01c8063715018a6116100b6578063bc67f8321161006f578063bc67f832146103bc578063d67bdd25146103dc578063f2fde38b14610409578063f8c8765e14610429578063fc0c546a14610449578063fd6e54f01461046957600080fd5b8063715018a6146102fc57806380f51c121461031157806382dc1ec4146103415780638456cb59146103615780638da5cb5b1461037657806393563a951461039c57600080fd5b80635c975abb116101085780635c975abb1461024457806363578efe1461025c578063699256f4146102945780636b2c0f55146102b45780636ef8d66d146102d45780636f63d9ec146102e957600080fd5b8063144fa6d7146101505780631d1b6cab146101725780631dee794a146101a857806328ac7f2c146101d55780633f4ba83a1461020257806346fbf68e14610217575b600080fd5b34801561015c57600080fd5b5061017061016b3660046112d6565b610489565b005b34801561017e57600080fd5b5061019261018d366004611519565b6104c8565b60405161019f919061155c565b60405180910390f35b3480156101b457600080fd5b506101c86101c336600461157e565b6104f2565b60405161019f9190611647565b3480156101e157600080fd5b506101926101f0366004611658565b60cc6020526000908152604090205481565b34801561020e57600080fd5b50610170610522565b34801561022357600080fd5b50610237610232366004611658565b610551565b60405161019f9190611681565b34801561025057600080fd5b5060975460ff16610237565b34801561026857600080fd5b5061019261027736600461168f565b60cd60209081526000928352604080842090915290825290205481565b3480156102a057600080fd5b506101706102af36600461168f565b61056f565b3480156102c057600080fd5b506101706102cf366004611658565b61061d565b3480156102e057600080fd5b50610170610650565b6101706102f736600461157e565b610659565b34801561030857600080fd5b506101706107f6565b34801561031d57600080fd5b5061023761032c366004611658565b60c96020526000908152604090205460ff1681565b34801561034d57600080fd5b5061017061035c366004611658565b61082a565b34801561036d57600080fd5b5061017061085d565b34801561038257600080fd5b506065546001600160a01b031660405161019f91906116d5565b3480156103a857600080fd5b506101706103b73660046116e3565b61088a565b3480156103c857600080fd5b506101706103d73660046112d6565b6108fb565b3480156103e857600080fd5b5060cb546103fc906001600160a01b031681565b60405161019f919061173d565b34801561041557600080fd5b50610170610424366004611658565b61092e565b34801561043557600080fd5b5061017061044436600461174b565b610987565b34801561045557600080fd5b5060ca546103fc906001600160a01b031681565b34801561047557600080fd5b5061019261048436600461157e565b610a21565b6065546001600160a01b031633146104bc5760405162461bcd60e51b81526004016104b3906117e4565b60405180910390fd5b6104c581610ac3565b50565b60006104d382610b40565b60ca549091506104ec906001600160a01b031682610c0d565b92915050565b606083838360405160200161050993929190611933565b60405160208183030381529060405290505b9392505050565b61052b33610551565b6105475760405162461bcd60e51b81526004016104b390611992565b61054f610c74565b565b6001600160a01b0316600090815260c9602052604090205460ff1690565b6065546001600160a01b031633146105995760405162461bcd60e51b81526004016104b3906117e4565b6040516000906001600160a01b0384169083156108fc0290849084818181858888f193505050509050806105df5760405162461bcd60e51b81526004016104b3906119f1565b7f2c876ecb97b3c6854f2488d373403f903eacb800e51c159a5c0c7a9c857e48278383604051610610929190611a01565b60405180910390a1505050565b6065546001600160a01b031633146106475760405162461bcd60e51b81526004016104b3906117e4565b6104c581610cda565b61054f33610cda565b60975460ff161561067c5760405162461bcd60e51b81526004016104b390611a43565b6002600154141561069f5760405162461bcd60e51b81526004016104b390611a87565b600260015560006106af826104c8565b6001600160a01b038516600090815260cc60205260409020549091506106d6908290611aad565b6001600160a01b038516600090815260cc602090815260408083209390935560cd81528282208683529052205461070e908290611aad565b6001600160a01b03808616600090815260cd6020908152604080832088845290915290209190915560ca546107469116333084610d4f565b60cb546001600160a01b03166382646a58346107638787876104f2565b6040518363ffffffff1660e01b815260040161077f9190611647565b6000604051808303818588803b15801561079857600080fd5b505af11580156107ac573d6000803e3d6000fd5b50505050507fa5e8ac6f0e257373f82e6696a38a9acc7b1d97e8435d3262f297f8ba36815e2c8484846040516107e493929190611933565b60405180910390a15050600180555050565b6065546001600160a01b031633146108205760405162461bcd60e51b81526004016104b3906117e4565b61054f6000610dad565b6065546001600160a01b031633146108545760405162461bcd60e51b81526004016104b3906117e4565b6104c581610dff565b61086633610551565b6108825760405162461bcd60e51b81526004016104b390611992565b61054f610e78565b6065546001600160a01b031633146108b45760405162461bcd60e51b81526004016104b3906117e4565b6108c86001600160a01b0384168383610ed0565b7f2717ead6b9200dd235aad468c9809ea400fe33ac69b5bfaa6d3e90fc922b639883838360405161061093929190611ac5565b6065546001600160a01b031633146109255760405162461bcd60e51b81526004016104b3906117e4565b6104c581610ef4565b6065546001600160a01b031633146109585760405162461bcd60e51b81526004016104b3906117e4565b6001600160a01b03811661097e5760405162461bcd60e51b81526004016104b390611b30565b6104c581610dad565b60006109936001610f65565b905080156109ab576000805461ff0019166101001790555b6109b485610dad565b6109bd84610ff2565b6109c683611019565b6109cf82611040565b8015610a1a576000805461ff00191690556040517f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890610a1190600190611b54565b60405180910390a15b5050505050565b60cb546000906001600160a01b0316635335dca2610a408686866104f2565b6040518263ffffffff1660e01b8152600401610a5c9190611647565b60206040518083038186803b158015610a7457600080fd5b505afa158015610a88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aac9190611b6d565b949350505050565b6001600160a01b03163b151590565b6001600160a01b038116610ae95760405162461bcd60e51b81526004016104b390611bc2565b60ca80546001600160a01b0319166001600160a01b0383169081179091556040517f5ba6b30cd4b2f9e9e67f4feb9b9df10d5da3b057598e6901b217b7d590345e3091610b359161173d565b60405180910390a150565b600080825111610b625760405162461bcd60e51b81526004016104b390611c14565b60005b8251811015610c075760005b838281518110610b8357610b83611c24565b60200260200101516020015151811015610bf457610be0848381518110610bac57610bac611c24565b6020026020010151602001518281518110610bc957610bc9611c24565b60200260200101518461106790919063ffffffff16565b925080610bec81611c3a565b915050610b71565b5080610bff81611c3a565b915050610b65565b50919050565b600080610c1984611073565b90506012808211610c4c57610c43610c318284611104565b610c3c90600a611d63565b8590611110565b925050506104ec565b610c6b610c598383611104565b610c6490600a611d63565b859061111c565b95945050505050565b60975460ff16610c965760405162461bcd60e51b81526004016104b390611d9d565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b604051610cd091906116d5565b60405180910390a1565b610ce381610551565b610cff5760405162461bcd60e51b81526004016104b390611de1565b6001600160a01b038116600090815260c9602052604090819020805460ff19169055517fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e90610b359083906116d5565b610da7846323b872dd60e01b858585604051602401610d7093929190611df1565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611128565b50505050565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b610e0881610551565b15610e255760405162461bcd60e51b81526004016104b390611e3d565b6001600160a01b038116600090815260c9602052604090819020805460ff19166001179055517f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890610b359083906116d5565b60975460ff1615610e9b5760405162461bcd60e51b81526004016104b390611a43565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610cc33390565b610eef8363a9059cbb60e01b8484604051602401610d70929190611e4d565b505050565b6001600160a01b038116610f1a5760405162461bcd60e51b81526004016104b390611bc2565b60cb80546001600160a01b0319166001600160a01b0383161790556040517fd3a626089875a97be3c9702fd526ab6e28bd30904def789b36b301f03afadcaf90610b3590839061173d565b60008054610100900460ff1615610fac578160ff166001148015610f885750303b155b610fa45760405162461bcd60e51b81526004016104b390611ea6565b506000919050565b60005460ff808416911610610fd35760405162461bcd60e51b81526004016104b390611ea6565b506000805460ff191660ff92909216919091179055600190565b919050565b600054610100900460ff166108545760405162461bcd60e51b81526004016104b390611efe565b600054610100900460ff166109255760405162461bcd60e51b81526004016104b390611efe565b600054610100900460ff166104bc5760405162461bcd60e51b81526004016104b390611efe565b600061051b8284611aad565b6000806000836001600160a01b031660405161108e90611f0e565b600060405180830381855afa9150503d80600081146110c9576040519150601f19603f3d011682016040523d82523d6000602084013e6110ce565b606091505b5091509150816110f05760405162461bcd60e51b81526004016104b390611f57565b80806020019051810190610aac9190611b6d565b600061051b8284611f67565b600061051b8284611f94565b600061051b8284611fa8565b600061117d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166111b79092919063ffffffff16565b805190915015610eef578080602001905181019061119b9190611fda565b610eef5760405162461bcd60e51b81526004016104b390612042565b6060610aac8484600085856001600160a01b0385163b6111e95760405162461bcd60e51b81526004016104b390612086565b600080866001600160a01b0316858760405161120591906120b8565b60006040518083038185875af1925050503d8060008114611242576040519150601f19603f3d011682016040523d82523d6000602084013e611247565b606091505b5091509150611257828286611262565b979650505050505050565b6060831561127157508161051b565b8251156112815782518084602001fd5b8160405162461bcd60e51b81526004016104b39190611647565b60006001600160a01b0382166104ec565b60006104ec8261129b565b6112c0816112ac565b81146104c557600080fd5b80356104ec816112b7565b6000602082840312156112eb576112eb600080fd5b6000610aac84846112cb565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff82111715611333576113336112f7565b6040525050565b600061134560405190565b9050610fed828261130d565b600067ffffffffffffffff82111561136b5761136b6112f7565b5060209081020190565b600581106104c557600080fd5b80356104ec81611375565b806112c0565b80356104ec8161138d565b60006113b16113ac84611351565b61133a565b838152905060208082019084028301858111156113d0576113d0600080fd5b835b818110156113f457806113e58882611393565b845250602092830192016113d2565b5050509392505050565b600082601f83011261141257611412600080fd5b8135610aac84826020860161139e565b60006040828403121561143757611437600080fd5b611441604061133a565b9050600061144f8484611382565b825250602082013567ffffffffffffffff81111561146f5761146f600080fd5b61147b848285016113fe565b60208301525092915050565b60006114956113ac84611351565b838152905060208082019084028301858111156114b4576114b4600080fd5b835b818110156113f457803567ffffffffffffffff8111156114d8576114d8600080fd5b8086016114e58982611422565b85525050602092830192016114b6565b600082601f83011261150957611509600080fd5b8135610aac848260208601611487565b60006020828403121561152e5761152e600080fd5b813567ffffffffffffffff81111561154857611548600080fd5b610aac848285016114f5565b805b82525050565b602081016104ec8284611554565b6112c08161129b565b80356104ec8161156a565b60008060006060848603121561159657611596600080fd5b60006115a28686611573565b93505060206115b386828701611393565b925050604084013567ffffffffffffffff8111156115d3576115d3600080fd5b6115df868287016114f5565b9150509250925092565b60005b838110156116045781810151838201526020016115ec565b83811115610da75750506000910152565b600061161f825190565b8084526020840193506116368185602086016115e9565b601f01601f19169290920192915050565b6020808252810161051b8184611615565b60006020828403121561166d5761166d600080fd5b6000610aac8484611573565b801515611556565b602081016104ec8284611679565b600080604083850312156116a5576116a5600080fd5b60006116b18585611573565b92505060206116c285828601611393565b9150509250929050565b6115568161129b565b602081016104ec82846116cc565b6000806000606084860312156116fb576116fb600080fd5b600061170786866112cb565b935050602061171886828701611573565b92505060406115df86828701611393565b60006104ec826112ac565b61155681611729565b602081016104ec8284611734565b6000806000806080858703121561176457611764600080fd5b60006117708787611573565b945050602061178187828801611573565b9350506040611792878288016112cb565b92505060606117a3878288016112cb565b91505092959194509250565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572910190815260005b5060200190565b602080825281016104ec816117af565b634e487b7160e01b600052602160045260246000fd5b600581106104c5576104c56117f4565b80610fed8161180a565b60006104ec8261181a565b61155681611824565b60006118448383611554565b505060200190565b6000611856825190565b80845260209384019383018060005b8381101561188a5781516118798882611838565b975060208301925050600101611865565b509495945050505050565b805160009060408401906118a9858261182f565b5060208301518482036020860152610c6b828261184c565b600061051b8383611895565b60006118d7825190565b808452602084019350836020820285016118f18560200190565b8060005b85811015611926578484038952815161190e85826118c1565b94506020830160209a909a01999250506001016118f5565b5091979650505050505050565b6060810161194182866116cc565b61194e6020830185611554565b8181036040830152610c6b81846118cd565b60208082527f5061757365723a2063616c6c6572206973206e6f742074686520706175736572910190815260006117dd565b602080825281016104ec81611960565b602f81526000602082017f4f776e6572576974686472617761626c653a207769746864726177206e61746981526e1d99481d1bdad95b8819985a5b1959608a1b602082015291505b5060400190565b602080825281016104ec816119a2565b60408101611a0f8285611734565b61051b6020830184611554565b601081526000602082016f14185d5cd8589b194e881c185d5cd95960821b815291506117dd565b602080825281016104ec81611a1c565b601f81526000602082017f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00815291506117dd565b602080825281016104ec81611a53565b634e487b7160e01b600052601160045260246000fd5b60008219821115611ac057611ac0611a97565b500190565b60608101611ad38286611734565b611ae060208301856116cc565b610aac6040830184611554565b602681526000602082017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b602082015291506119ea565b602080825281016104ec81611aed565b600060ff82166104ec565b61155681611b40565b602081016104ec8284611b4b565b80516104ec8161138d565b600060208284031215611b8257611b82600080fd5b6000610aac8484611b62565b601d81526000602082017f537263436861696e5061796d656e743a207a65726f2061646472657373000000815291506117dd565b602080825281016104ec81611b8e565b602581526000602082017f5265736f75726365446174613a20696e76616c6964207061796c6f616473206c8152640cadccee8d60db1b602082015291506119ea565b602080825281016104ec81611bd2565b634e487b7160e01b600052603260045260246000fd5b6000600019821415611c4e57611c4e611a97565b5060010190565b80825b6001851115611c9457808604811115611c7357611c73611a97565b6001851615611c8157908102905b8002611c8d8560011c90565b9450611c58565b94509492505050565b600082611cac5750600161051b565b81611cb95750600061051b565b8160018114611ccf5760028114611cd957611d06565b600191505061051b565b60ff841115611cea57611cea611a97565b8360020a915084821115611d0057611d00611a97565b5061051b565b5060208310610133831016604e8410600b8410161715611d39575081810a83811115611d3457611d34611a97565b61051b565b611d468484846001611c55565b92509050818404811115611d5c57611d5c611a97565b0292915050565b600061051b6000198484611c9d565b601481526000602082017314185d5cd8589b194e881b9bdd081c185d5cd95960621b815291506117dd565b602080825281016104ec81611d72565b601d81526000602082017f5061757365723a206163636f756e74206973206e6f7420706175736572000000815291506117dd565b602080825281016104ec81611dad565b60608101611ad382866116cc565b602181526000602082017f5061757365723a206163636f756e7420697320616c72656164792070617573658152603960f91b602082015291506119ea565b602080825281016104ec81611dff565b60408101611a0f82856116cc565b602e81526000602082017f496e697469616c697a61626c653a20636f6e747261637420697320616c72656181526d191e481a5b9a5d1a585b1a5e995960921b602082015291506119ea565b602080825281016104ec81611e5b565b602b81526000602082017f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206981526a6e697469616c697a696e6760a81b602082015291506119ea565b602080825281016104ec81611eb6565b63313ce56760e01b81526000600482016104ec565b601b81526000602082017f5265736f75726365446174613a20696e76616c696420746f6b656e0000000000815291506117dd565b602080825281016104ec81611f23565b600082821015611f7957611f79611a97565b500390565b634e487b7160e01b600052601260045260246000fd5b600082611fa357611fa3611f7e565b500490565b6000816000190483118215151615611fc257611fc2611a97565b500290565b8015156112c0565b80516104ec81611fc7565b600060208284031215611fef57611fef600080fd5b6000610aac8484611fcf565b602a81526000602082017f5361666545524332303a204552433230206f7065726174696f6e20646964206e8152691bdd081cdd58d8d9595960b21b602082015291506119ea565b602080825281016104ec81611ffb565b601d81526000602082017f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000815291506117dd565b602080825281016104ec81612052565b60006120a0825190565b6120ae8185602086016115e9565b9290920192915050565b600061051b828461209656fea2646970667358221220dd5fe4ff31bc583a1ebfa596ffebe205b9e74a204bce5e72ccfd76e73442c05564736f6c63430008090033",
  "deployedBytecode": "0x60806040526004361061014b5760003560e01c8063715018a6116100b6578063bc67f8321161006f578063bc67f832146103bc578063d67bdd25146103dc578063f2fde38b14610409578063f8c8765e14610429578063fc0c546a14610449578063fd6e54f01461046957600080fd5b8063715018a6146102fc57806380f51c121461031157806382dc1ec4146103415780638456cb59146103615780638da5cb5b1461037657806393563a951461039c57600080fd5b80635c975abb116101085780635c975abb1461024457806363578efe1461025c578063699256f4146102945780636b2c0f55146102b45780636ef8d66d146102d45780636f63d9ec146102e957600080fd5b8063144fa6d7146101505780631d1b6cab146101725780631dee794a146101a857806328ac7f2c146101d55780633f4ba83a1461020257806346fbf68e14610217575b600080fd5b34801561015c57600080fd5b5061017061016b3660046112d6565b610489565b005b34801561017e57600080fd5b5061019261018d366004611519565b6104c8565b60405161019f919061155c565b60405180910390f35b3480156101b457600080fd5b506101c86101c336600461157e565b6104f2565b60405161019f9190611647565b3480156101e157600080fd5b506101926101f0366004611658565b60cc6020526000908152604090205481565b34801561020e57600080fd5b50610170610522565b34801561022357600080fd5b50610237610232366004611658565b610551565b60405161019f9190611681565b34801561025057600080fd5b5060975460ff16610237565b34801561026857600080fd5b5061019261027736600461168f565b60cd60209081526000928352604080842090915290825290205481565b3480156102a057600080fd5b506101706102af36600461168f565b61056f565b3480156102c057600080fd5b506101706102cf366004611658565b61061d565b3480156102e057600080fd5b50610170610650565b6101706102f736600461157e565b610659565b34801561030857600080fd5b506101706107f6565b34801561031d57600080fd5b5061023761032c366004611658565b60c96020526000908152604090205460ff1681565b34801561034d57600080fd5b5061017061035c366004611658565b61082a565b34801561036d57600080fd5b5061017061085d565b34801561038257600080fd5b506065546001600160a01b031660405161019f91906116d5565b3480156103a857600080fd5b506101706103b73660046116e3565b61088a565b3480156103c857600080fd5b506101706103d73660046112d6565b6108fb565b3480156103e857600080fd5b5060cb546103fc906001600160a01b031681565b60405161019f919061173d565b34801561041557600080fd5b50610170610424366004611658565b61092e565b34801561043557600080fd5b5061017061044436600461174b565b610987565b34801561045557600080fd5b5060ca546103fc906001600160a01b031681565b34801561047557600080fd5b5061019261048436600461157e565b610a21565b6065546001600160a01b031633146104bc5760405162461bcd60e51b81526004016104b3906117e4565b60405180910390fd5b6104c581610ac3565b50565b60006104d382610b40565b60ca549091506104ec906001600160a01b031682610c0d565b92915050565b606083838360405160200161050993929190611933565b60405160208183030381529060405290505b9392505050565b61052b33610551565b6105475760405162461bcd60e51b81526004016104b390611992565b61054f610c74565b565b6001600160a01b0316600090815260c9602052604090205460ff1690565b6065546001600160a01b031633146105995760405162461bcd60e51b81526004016104b3906117e4565b6040516000906001600160a01b0384169083156108fc0290849084818181858888f193505050509050806105df5760405162461bcd60e51b81526004016104b3906119f1565b7f2c876ecb97b3c6854f2488d373403f903eacb800e51c159a5c0c7a9c857e48278383604051610610929190611a01565b60405180910390a1505050565b6065546001600160a01b031633146106475760405162461bcd60e51b81526004016104b3906117e4565b6104c581610cda565b61054f33610cda565b60975460ff161561067c5760405162461bcd60e51b81526004016104b390611a43565b6002600154141561069f5760405162461bcd60e51b81526004016104b390611a87565b600260015560006106af826104c8565b6001600160a01b038516600090815260cc60205260409020549091506106d6908290611aad565b6001600160a01b038516600090815260cc602090815260408083209390935560cd81528282208683529052205461070e908290611aad565b6001600160a01b03808616600090815260cd6020908152604080832088845290915290209190915560ca546107469116333084610d4f565b60cb546001600160a01b03166382646a58346107638787876104f2565b6040518363ffffffff1660e01b815260040161077f9190611647565b6000604051808303818588803b15801561079857600080fd5b505af11580156107ac573d6000803e3d6000fd5b50505050507fa5e8ac6f0e257373f82e6696a38a9acc7b1d97e8435d3262f297f8ba36815e2c8484846040516107e493929190611933565b60405180910390a15050600180555050565b6065546001600160a01b031633146108205760405162461bcd60e51b81526004016104b3906117e4565b61054f6000610dad565b6065546001600160a01b031633146108545760405162461bcd60e51b81526004016104b3906117e4565b6104c581610dff565b61086633610551565b6108825760405162461bcd60e51b81526004016104b390611992565b61054f610e78565b6065546001600160a01b031633146108b45760405162461bcd60e51b81526004016104b3906117e4565b6108c86001600160a01b0384168383610ed0565b7f2717ead6b9200dd235aad468c9809ea400fe33ac69b5bfaa6d3e90fc922b639883838360405161061093929190611ac5565b6065546001600160a01b031633146109255760405162461bcd60e51b81526004016104b3906117e4565b6104c581610ef4565b6065546001600160a01b031633146109585760405162461bcd60e51b81526004016104b3906117e4565b6001600160a01b03811661097e5760405162461bcd60e51b81526004016104b390611b30565b6104c581610dad565b60006109936001610f65565b905080156109ab576000805461ff0019166101001790555b6109b485610dad565b6109bd84610ff2565b6109c683611019565b6109cf82611040565b8015610a1a576000805461ff00191690556040517f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890610a1190600190611b54565b60405180910390a15b5050505050565b60cb546000906001600160a01b0316635335dca2610a408686866104f2565b6040518263ffffffff1660e01b8152600401610a5c9190611647565b60206040518083038186803b158015610a7457600080fd5b505afa158015610a88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aac9190611b6d565b949350505050565b6001600160a01b03163b151590565b6001600160a01b038116610ae95760405162461bcd60e51b81526004016104b390611bc2565b60ca80546001600160a01b0319166001600160a01b0383169081179091556040517f5ba6b30cd4b2f9e9e67f4feb9b9df10d5da3b057598e6901b217b7d590345e3091610b359161173d565b60405180910390a150565b600080825111610b625760405162461bcd60e51b81526004016104b390611c14565b60005b8251811015610c075760005b838281518110610b8357610b83611c24565b60200260200101516020015151811015610bf457610be0848381518110610bac57610bac611c24565b6020026020010151602001518281518110610bc957610bc9611c24565b60200260200101518461106790919063ffffffff16565b925080610bec81611c3a565b915050610b71565b5080610bff81611c3a565b915050610b65565b50919050565b600080610c1984611073565b90506012808211610c4c57610c43610c318284611104565b610c3c90600a611d63565b8590611110565b925050506104ec565b610c6b610c598383611104565b610c6490600a611d63565b859061111c565b95945050505050565b60975460ff16610c965760405162461bcd60e51b81526004016104b390611d9d565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b604051610cd091906116d5565b60405180910390a1565b610ce381610551565b610cff5760405162461bcd60e51b81526004016104b390611de1565b6001600160a01b038116600090815260c9602052604090819020805460ff19169055517fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e90610b359083906116d5565b610da7846323b872dd60e01b858585604051602401610d7093929190611df1565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611128565b50505050565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b610e0881610551565b15610e255760405162461bcd60e51b81526004016104b390611e3d565b6001600160a01b038116600090815260c9602052604090819020805460ff19166001179055517f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890610b359083906116d5565b60975460ff1615610e9b5760405162461bcd60e51b81526004016104b390611a43565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610cc33390565b610eef8363a9059cbb60e01b8484604051602401610d70929190611e4d565b505050565b6001600160a01b038116610f1a5760405162461bcd60e51b81526004016104b390611bc2565b60cb80546001600160a01b0319166001600160a01b0383161790556040517fd3a626089875a97be3c9702fd526ab6e28bd30904def789b36b301f03afadcaf90610b3590839061173d565b60008054610100900460ff1615610fac578160ff166001148015610f885750303b155b610fa45760405162461bcd60e51b81526004016104b390611ea6565b506000919050565b60005460ff808416911610610fd35760405162461bcd60e51b81526004016104b390611ea6565b506000805460ff191660ff92909216919091179055600190565b919050565b600054610100900460ff166108545760405162461bcd60e51b81526004016104b390611efe565b600054610100900460ff166109255760405162461bcd60e51b81526004016104b390611efe565b600054610100900460ff166104bc5760405162461bcd60e51b81526004016104b390611efe565b600061051b8284611aad565b6000806000836001600160a01b031660405161108e90611f0e565b600060405180830381855afa9150503d80600081146110c9576040519150601f19603f3d011682016040523d82523d6000602084013e6110ce565b606091505b5091509150816110f05760405162461bcd60e51b81526004016104b390611f57565b80806020019051810190610aac9190611b6d565b600061051b8284611f67565b600061051b8284611f94565b600061051b8284611fa8565b600061117d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166111b79092919063ffffffff16565b805190915015610eef578080602001905181019061119b9190611fda565b610eef5760405162461bcd60e51b81526004016104b390612042565b6060610aac8484600085856001600160a01b0385163b6111e95760405162461bcd60e51b81526004016104b390612086565b600080866001600160a01b0316858760405161120591906120b8565b60006040518083038185875af1925050503d8060008114611242576040519150601f19603f3d011682016040523d82523d6000602084013e611247565b606091505b5091509150611257828286611262565b979650505050505050565b6060831561127157508161051b565b8251156112815782518084602001fd5b8160405162461bcd60e51b81526004016104b39190611647565b60006001600160a01b0382166104ec565b60006104ec8261129b565b6112c0816112ac565b81146104c557600080fd5b80356104ec816112b7565b6000602082840312156112eb576112eb600080fd5b6000610aac84846112cb565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff82111715611333576113336112f7565b6040525050565b600061134560405190565b9050610fed828261130d565b600067ffffffffffffffff82111561136b5761136b6112f7565b5060209081020190565b600581106104c557600080fd5b80356104ec81611375565b806112c0565b80356104ec8161138d565b60006113b16113ac84611351565b61133a565b838152905060208082019084028301858111156113d0576113d0600080fd5b835b818110156113f457806113e58882611393565b845250602092830192016113d2565b5050509392505050565b600082601f83011261141257611412600080fd5b8135610aac84826020860161139e565b60006040828403121561143757611437600080fd5b611441604061133a565b9050600061144f8484611382565b825250602082013567ffffffffffffffff81111561146f5761146f600080fd5b61147b848285016113fe565b60208301525092915050565b60006114956113ac84611351565b838152905060208082019084028301858111156114b4576114b4600080fd5b835b818110156113f457803567ffffffffffffffff8111156114d8576114d8600080fd5b8086016114e58982611422565b85525050602092830192016114b6565b600082601f83011261150957611509600080fd5b8135610aac848260208601611487565b60006020828403121561152e5761152e600080fd5b813567ffffffffffffffff81111561154857611548600080fd5b610aac848285016114f5565b805b82525050565b602081016104ec8284611554565b6112c08161129b565b80356104ec8161156a565b60008060006060848603121561159657611596600080fd5b60006115a28686611573565b93505060206115b386828701611393565b925050604084013567ffffffffffffffff8111156115d3576115d3600080fd5b6115df868287016114f5565b9150509250925092565b60005b838110156116045781810151838201526020016115ec565b83811115610da75750506000910152565b600061161f825190565b8084526020840193506116368185602086016115e9565b601f01601f19169290920192915050565b6020808252810161051b8184611615565b60006020828403121561166d5761166d600080fd5b6000610aac8484611573565b801515611556565b602081016104ec8284611679565b600080604083850312156116a5576116a5600080fd5b60006116b18585611573565b92505060206116c285828601611393565b9150509250929050565b6115568161129b565b602081016104ec82846116cc565b6000806000606084860312156116fb576116fb600080fd5b600061170786866112cb565b935050602061171886828701611573565b92505060406115df86828701611393565b60006104ec826112ac565b61155681611729565b602081016104ec8284611734565b6000806000806080858703121561176457611764600080fd5b60006117708787611573565b945050602061178187828801611573565b9350506040611792878288016112cb565b92505060606117a3878288016112cb565b91505092959194509250565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572910190815260005b5060200190565b602080825281016104ec816117af565b634e487b7160e01b600052602160045260246000fd5b600581106104c5576104c56117f4565b80610fed8161180a565b60006104ec8261181a565b61155681611824565b60006118448383611554565b505060200190565b6000611856825190565b80845260209384019383018060005b8381101561188a5781516118798882611838565b975060208301925050600101611865565b509495945050505050565b805160009060408401906118a9858261182f565b5060208301518482036020860152610c6b828261184c565b600061051b8383611895565b60006118d7825190565b808452602084019350836020820285016118f18560200190565b8060005b85811015611926578484038952815161190e85826118c1565b94506020830160209a909a01999250506001016118f5565b5091979650505050505050565b6060810161194182866116cc565b61194e6020830185611554565b8181036040830152610c6b81846118cd565b60208082527f5061757365723a2063616c6c6572206973206e6f742074686520706175736572910190815260006117dd565b602080825281016104ec81611960565b602f81526000602082017f4f776e6572576974686472617761626c653a207769746864726177206e61746981526e1d99481d1bdad95b8819985a5b1959608a1b602082015291505b5060400190565b602080825281016104ec816119a2565b60408101611a0f8285611734565b61051b6020830184611554565b601081526000602082016f14185d5cd8589b194e881c185d5cd95960821b815291506117dd565b602080825281016104ec81611a1c565b601f81526000602082017f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00815291506117dd565b602080825281016104ec81611a53565b634e487b7160e01b600052601160045260246000fd5b60008219821115611ac057611ac0611a97565b500190565b60608101611ad38286611734565b611ae060208301856116cc565b610aac6040830184611554565b602681526000602082017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b602082015291506119ea565b602080825281016104ec81611aed565b600060ff82166104ec565b61155681611b40565b602081016104ec8284611b4b565b80516104ec8161138d565b600060208284031215611b8257611b82600080fd5b6000610aac8484611b62565b601d81526000602082017f537263436861696e5061796d656e743a207a65726f2061646472657373000000815291506117dd565b602080825281016104ec81611b8e565b602581526000602082017f5265736f75726365446174613a20696e76616c6964207061796c6f616473206c8152640cadccee8d60db1b602082015291506119ea565b602080825281016104ec81611bd2565b634e487b7160e01b600052603260045260246000fd5b6000600019821415611c4e57611c4e611a97565b5060010190565b80825b6001851115611c9457808604811115611c7357611c73611a97565b6001851615611c8157908102905b8002611c8d8560011c90565b9450611c58565b94509492505050565b600082611cac5750600161051b565b81611cb95750600061051b565b8160018114611ccf5760028114611cd957611d06565b600191505061051b565b60ff841115611cea57611cea611a97565b8360020a915084821115611d0057611d00611a97565b5061051b565b5060208310610133831016604e8410600b8410161715611d39575081810a83811115611d3457611d34611a97565b61051b565b611d468484846001611c55565b92509050818404811115611d5c57611d5c611a97565b0292915050565b600061051b6000198484611c9d565b601481526000602082017314185d5cd8589b194e881b9bdd081c185d5cd95960621b815291506117dd565b602080825281016104ec81611d72565b601d81526000602082017f5061757365723a206163636f756e74206973206e6f7420706175736572000000815291506117dd565b602080825281016104ec81611dad565b60608101611ad382866116cc565b602181526000602082017f5061757365723a206163636f756e7420697320616c72656164792070617573658152603960f91b602082015291506119ea565b602080825281016104ec81611dff565b60408101611a0f82856116cc565b602e81526000602082017f496e697469616c697a61626c653a20636f6e747261637420697320616c72656181526d191e481a5b9a5d1a585b1a5e995960921b602082015291506119ea565b602080825281016104ec81611e5b565b602b81526000602082017f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206981526a6e697469616c697a696e6760a81b602082015291506119ea565b602080825281016104ec81611eb6565b63313ce56760e01b81526000600482016104ec565b601b81526000602082017f5265736f75726365446174613a20696e76616c696420746f6b656e0000000000815291506117dd565b602080825281016104ec81611f23565b600082821015611f7957611f79611a97565b500390565b634e487b7160e01b600052601260045260246000fd5b600082611fa357611fa3611f7e565b500490565b6000816000190483118215151615611fc257611fc2611a97565b500290565b8015156112c0565b80516104ec81611fc7565b600060208284031215611fef57611fef600080fd5b6000610aac8484611fcf565b602a81526000602082017f5361666545524332303a204552433230206f7065726174696f6e20646964206e8152691bdd081cdd58d8d9595960b21b602082015291506119ea565b602080825281016104ec81611ffb565b601d81526000602082017f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000815291506117dd565b602080825281016104ec81612052565b60006120a0825190565b6120ae8185602086016115e9565b9290920192915050565b600061051b828461209656fea2646970667358221220dd5fe4ff31bc583a1ebfa596ffebe205b9e74a204bce5e72ccfd76e73442c05564736f6c63430008090033",
  "devdoc": {
    "author": "Alexandas",
    "details": "source chain payment contract",
    "events": {
      "MessageSenderUpdated(address)": {
        "details": "emit when message sender updated",
        "params": {
          "messageSender": "messageSender address"
        }
      },
      "PaidV2(address,bytes32,(uint8,uint256[])[])": {
        "details": "emit when user paid on src chain",
        "params": {
          "account": "sender",
          "payloads": "payment payloads",
          "provider": "provider address"
        }
      },
      "TokenUpdated(address)": {
        "details": "emit when token updated",
        "params": {
          "token": "token address"
        }
      }
    },
    "kind": "dev",
    "methods": {
      "addPauser(address)": {
        "details": "add a pauser for the contract",
        "params": {
          "account": "address"
        }
      },
      "calcFeeV2(address,bytes32,(uint8,uint256[])[])": {
        "details": "calculate message fee",
        "params": {
          "account": "user account",
          "payloads": "payment payloads",
          "provider": "provider address"
        },
        "returns": {
          "value": "message fee"
        }
      },
      "encodeMessageV2(address,bytes32,(uint8,uint256[])[])": {
        "details": "encode payment message",
        "params": {
          "account": "user account",
          "payloads": "payment payloads",
          "provider": "provider address"
        },
        "returns": {
          "_0": "message message bytes"
        }
      },
      "initialize(address,address,address,address)": {
        "details": "proxy initialize function",
        "params": {
          "messageSender": "messageSender address",
          "owner": "contract owner",
          "pauser": "contract pauser",
          "token": "token address"
        }
      },
      "isPauser(address)": {
        "details": "whether the account is the contract pauser",
        "params": {
          "account": "address"
        },
        "returns": {
          "_0": "whether account is a pauser"
        }
      },
      "owner()": {
        "details": "Returns the address of the current owner."
      },
      "ownerWithdrawERC20(address,address,uint256)": {
        "details": "withdraw token",
        "params": {
          "to": "receiver address",
          "token": "token address",
          "value": "token value"
        }
      },
      "ownerWithdrawNative(address,uint256)": {
        "details": "withdraw ETH",
        "params": {
          "to": "receiver address",
          "value": "token value"
        }
      },
      "pause()": {
        "details": "pause the contract"
      },
      "paused()": {
        "details": "Returns true if the contract is paused, and false otherwise."
      },
      "payV2(address,bytes32,(uint8,uint256[])[])": {
        "details": "pay from source chain",
        "params": {
          "account": "sender",
          "payloads": "payment payloads",
          "provider": "provider address"
        }
      },
      "payloadsValue((uint8,uint256[])[])": {
        "details": "return payment total token value",
        "params": {
          "payloads": "payment payloads"
        },
        "returns": {
          "value": "payment total token value"
        }
      },
      "removePauser(address)": {
        "details": "remove a pauser for the contract",
        "params": {
          "account": "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."
      },
      "renouncePauser()": {
        "details": "remove a pauser for the contract"
      },
      "setMessageSender(address)": {
        "details": "update message sender",
        "params": {
          "_messageSender": "message sender address"
        }
      },
      "setToken(address)": {
        "details": "update token",
        "params": {
          "_token": "token address"
        }
      },
      "transferOwnership(address)": {
        "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
      },
      "unpause()": {
        "details": "unpause the contract"
      }
    },
    "stateVariables": {
      "messageSender": {
        "details": "message sender on src chain"
      },
      "token": {
        "details": "return token contract address"
      }
    },
    "version": 1
  },
  "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
  },
  "storageLayout": {
    "storage": [
      {
        "astId": 147,
        "contract": "contracts/payments/SrcChainPayment.sol:SrcChainPayment",
        "label": "_initialized",
        "offset": 0,
        "slot": "0",
        "type": "t_uint8"
      },
      {
        "astId": 150,
        "contract": "contracts/payments/SrcChainPayment.sol:SrcChainPayment",
        "label": "_initializing",
        "offset": 1,
        "slot": "0",
        "type": "t_bool"
      },
      {
        "astId": 407,
        "contract": "contracts/payments/SrcChainPayment.sol:SrcChainPayment",
        "label": "_status",
        "offset": 0,
        "slot": "1",
        "type": "t_uint256"
      },
      {
        "astId": 451,
        "contract": "contracts/payments/SrcChainPayment.sol:SrcChainPayment",
        "label": "__gap",
        "offset": 0,
        "slot": "2",
        "type": "t_array(t_uint256)49_storage"
      },
      {
        "astId": 1038,
        "contract": "contracts/payments/SrcChainPayment.sol:SrcChainPayment",
        "label": "__gap",
        "offset": 0,
        "slot": "51",
        "type": "t_array(t_uint256)50_storage"
      },
      {
        "astId": 10,
        "contract": "contracts/payments/SrcChainPayment.sol:SrcChainPayment",
        "label": "_owner",
        "offset": 0,
        "slot": "101",
        "type": "t_address"
      },
      {
        "astId": 122,
        "contract": "contracts/payments/SrcChainPayment.sol:SrcChainPayment",
        "label": "__gap",
        "offset": 0,
        "slot": "102",
        "type": "t_array(t_uint256)49_storage"
      },
      {
        "astId": 303,
        "contract": "contracts/payments/SrcChainPayment.sol:SrcChainPayment",
        "label": "_paused",
        "offset": 0,
        "slot": "151",
        "type": "t_bool"
      },
      {
        "astId": 392,
        "contract": "contracts/payments/SrcChainPayment.sol:SrcChainPayment",
        "label": "__gap",
        "offset": 0,
        "slot": "152",
        "type": "t_array(t_uint256)49_storage"
      },
      {
        "astId": 3817,
        "contract": "contracts/payments/SrcChainPayment.sol:SrcChainPayment",
        "label": "pausers",
        "offset": 0,
        "slot": "201",
        "type": "t_mapping(t_address,t_bool)"
      },
      {
        "astId": 9172,
        "contract": "contracts/payments/SrcChainPayment.sol:SrcChainPayment",
        "label": "token",
        "offset": 0,
        "slot": "202",
        "type": "t_contract(IERC20Upgradeable)530"
      },
      {
        "astId": 9176,
        "contract": "contracts/payments/SrcChainPayment.sol:SrcChainPayment",
        "label": "messageSender",
        "offset": 0,
        "slot": "203",
        "type": "t_contract(IMessageSender)6569"
      },
      {
        "astId": 9180,
        "contract": "contracts/payments/SrcChainPayment.sol:SrcChainPayment",
        "label": "providerBalances",
        "offset": 0,
        "slot": "204",
        "type": "t_mapping(t_address,t_uint256)"
      },
      {
        "astId": 9186,
        "contract": "contracts/payments/SrcChainPayment.sol:SrcChainPayment",
        "label": "fees",
        "offset": 0,
        "slot": "205",
        "type": "t_mapping(t_address,t_mapping(t_bytes32,t_uint256))"
      }
    ],
    "types": {
      "t_address": {
        "encoding": "inplace",
        "label": "address",
        "numberOfBytes": "20"
      },
      "t_array(t_uint256)49_storage": {
        "base": "t_uint256",
        "encoding": "inplace",
        "label": "uint256[49]",
        "numberOfBytes": "1568"
      },
      "t_array(t_uint256)50_storage": {
        "base": "t_uint256",
        "encoding": "inplace",
        "label": "uint256[50]",
        "numberOfBytes": "1600"
      },
      "t_bool": {
        "encoding": "inplace",
        "label": "bool",
        "numberOfBytes": "1"
      },
      "t_bytes32": {
        "encoding": "inplace",
        "label": "bytes32",
        "numberOfBytes": "32"
      },
      "t_contract(IERC20Upgradeable)530": {
        "encoding": "inplace",
        "label": "contract IERC20Upgradeable",
        "numberOfBytes": "20"
      },
      "t_contract(IMessageSender)6569": {
        "encoding": "inplace",
        "label": "contract IMessageSender",
        "numberOfBytes": "20"
      },
      "t_mapping(t_address,t_bool)": {
        "encoding": "mapping",
        "key": "t_address",
        "label": "mapping(address => bool)",
        "numberOfBytes": "32",
        "value": "t_bool"
      },
      "t_mapping(t_address,t_mapping(t_bytes32,t_uint256))": {
        "encoding": "mapping",
        "key": "t_address",
        "label": "mapping(address => mapping(bytes32 => uint256))",
        "numberOfBytes": "32",
        "value": "t_mapping(t_bytes32,t_uint256)"
      },
      "t_mapping(t_address,t_uint256)": {
        "encoding": "mapping",
        "key": "t_address",
        "label": "mapping(address => uint256)",
        "numberOfBytes": "32",
        "value": "t_uint256"
      },
      "t_mapping(t_bytes32,t_uint256)": {
        "encoding": "mapping",
        "key": "t_bytes32",
        "label": "mapping(bytes32 => uint256)",
        "numberOfBytes": "32",
        "value": "t_uint256"
      },
      "t_uint256": {
        "encoding": "inplace",
        "label": "uint256",
        "numberOfBytes": "32"
      },
      "t_uint8": {
        "encoding": "inplace",
        "label": "uint8",
        "numberOfBytes": "1"
      }
    }
  }
}