{ "address": "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0", "abi": [ { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint16", "name": "chainId", "type": "uint16" }, { "indexed": false, "internalType": "bytes", "name": "srcAddress", "type": "bytes" }, { "indexed": false, "internalType": "uint256", "name": "nonce", "type": "uint256" }, { "indexed": false, "internalType": "address", "name": "token", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amountLD", "type": "uint256" }, { "indexed": false, "internalType": "address", "name": "to", "type": "address" }, { "indexed": false, "internalType": "bytes", "name": "payload", "type": "bytes" } ], "name": "CachedSwapSaved", "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": "uint16", "name": "chainId", "type": "uint16" }, { "indexed": false, "internalType": "bytes", "name": "srcAddress", "type": "bytes" }, { "indexed": false, "internalType": "uint256", "name": "nonce", "type": "uint256" }, { "indexed": false, "internalType": "address", "name": "token", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amountLD", "type": "uint256" }, { "indexed": false, "internalType": "bytes", "name": "payload", "type": "bytes" }, { "indexed": false, "internalType": "string", "name": "reason", "type": "string" } ], "name": "ReceiveFailed", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint8", "name": "bridgeFunctionType", "type": "uint8" }, { "indexed": false, "internalType": "uint16", "name": "chainId", "type": "uint16" }, { "indexed": false, "internalType": "bytes", "name": "srcAddress", "type": "bytes" }, { "indexed": false, "internalType": "uint256", "name": "nonce", "type": "uint256" } ], "name": "Revert", "type": "event" }, { "inputs": [], "name": "TYPE_REDEEM_LOCAL_CALLBACK_RETRY", "outputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "TYPE_REDEEM_LOCAL_RESPONSE", "outputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "TYPE_SWAP_REMOTE_RETRY", "outputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_poolId", "type": "uint256" }, { "internalType": "uint16", "name": "_dstChainId", "type": "uint16" }, { "internalType": "uint256", "name": "_dstPoolId", "type": "uint256" } ], "name": "activateChainPath", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_poolId", "type": "uint256" }, { "internalType": "uint256", "name": "_amountLD", "type": "uint256" }, { "internalType": "address", "name": "_to", "type": "address" } ], "name": "addLiquidity", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "bridge", "outputs": [ { "internalType": "contract Bridge", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint16", "name": "", "type": "uint16" }, { "internalType": "bytes", "name": "", "type": "bytes" }, { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "cachedSwapLookup", "outputs": [ { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "amountLD", "type": "uint256" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "bytes", "name": "payload", "type": "bytes" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_poolId", "type": "uint256" }, { "internalType": "bool", "name": "_fullMode", "type": "bool" } ], "name": "callDelta", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint16", "name": "_dstChainId", "type": "uint16" }, { "internalType": "bytes", "name": "_srcAddress", "type": "bytes" }, { "internalType": "uint256", "name": "_nonce", "type": "uint256" } ], "name": "clearCachedSwap", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_poolId", "type": "uint256" }, { "internalType": "uint16", "name": "_dstChainId", "type": "uint16" }, { "internalType": "uint256", "name": "_dstPoolId", "type": "uint256" }, { "internalType": "uint256", "name": "_weight", "type": "uint256" } ], "name": "createChainPath", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_poolId", "type": "uint256" }, { "internalType": "address", "name": "_token", "type": "address" }, { "internalType": "uint8", "name": "_sharedDecimals", "type": "uint8" }, { "internalType": "uint8", "name": "_localDecimals", "type": "uint8" }, { "internalType": "string", "name": "_name", "type": "string" }, { "internalType": "string", "name": "_symbol", "type": "string" } ], "name": "createPool", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint16", "name": "_dstChainId", "type": "uint16" }, { "internalType": "uint256", "name": "_dstPoolId", "type": "uint256" }, { "internalType": "uint256", "name": "_srcPoolId", "type": "uint256" }, { "components": [ { "internalType": "uint256", "name": "credits", "type": "uint256" }, { "internalType": "uint256", "name": "idealBalance", "type": "uint256" } ], "internalType": "struct Pool.CreditObj", "name": "_c", "type": "tuple" } ], "name": "creditChainPath", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "factory", "outputs": [ { "internalType": "contract Factory", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "mintFeeOwner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "protocolFeeOwner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint16", "name": "_dstChainId", "type": "uint16" }, { "internalType": "uint8", "name": "_functionType", "type": "uint8" }, { "internalType": "bytes", "name": "_toAddress", "type": "bytes" }, { "internalType": "bytes", "name": "_transferAndCallPayload", "type": "bytes" }, { "components": [ { "internalType": "uint256", "name": "dstGasForCall", "type": "uint256" }, { "internalType": "uint256", "name": "dstNativeAmount", "type": "uint256" }, { "internalType": "bytes", "name": "dstNativeAddr", "type": "bytes" } ], "internalType": "struct Router.lzTxObj", "name": "_lzTxParams", "type": "tuple" } ], "name": "quoteLayerZeroFee", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint16", "name": "_dstChainId", "type": "uint16" }, { "internalType": "uint256", "name": "_srcPoolId", "type": "uint256" }, { "internalType": "uint256", "name": "_dstPoolId", "type": "uint256" }, { "internalType": "address payable", "name": "_refundAddress", "type": "address" }, { "internalType": "uint256", "name": "_amountLP", "type": "uint256" }, { "internalType": "bytes", "name": "_to", "type": "bytes" }, { "components": [ { "internalType": "uint256", "name": "dstGasForCall", "type": "uint256" }, { "internalType": "uint256", "name": "dstNativeAmount", "type": "uint256" }, { "internalType": "bytes", "name": "dstNativeAddr", "type": "bytes" } ], "internalType": "struct Router.lzTxObj", "name": "_lzTxParams", "type": "tuple" } ], "name": "redeemLocal", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "uint16", "name": "_srcChainId", "type": "uint16" }, { "internalType": "bytes", "name": "_srcAddress", "type": "bytes" }, { "internalType": "uint256", "name": "_nonce", "type": "uint256" }, { "internalType": "uint256", "name": "_srcPoolId", "type": "uint256" }, { "internalType": "uint256", "name": "_dstPoolId", "type": "uint256" }, { "internalType": "address", "name": "_to", "type": "address" }, { "internalType": "uint256", "name": "_amountSD", "type": "uint256" }, { "internalType": "uint256", "name": "_mintAmountSD", "type": "uint256" } ], "name": "redeemLocalCallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint16", "name": "_srcChainId", "type": "uint16" }, { "internalType": "bytes", "name": "_srcAddress", "type": "bytes" }, { "internalType": "uint256", "name": "_nonce", "type": "uint256" }, { "internalType": "uint256", "name": "_srcPoolId", "type": "uint256" }, { "internalType": "uint256", "name": "_dstPoolId", "type": "uint256" }, { "internalType": "uint256", "name": "_amountSD", "type": "uint256" }, { "internalType": "bytes", "name": "_to", "type": "bytes" } ], "name": "redeemLocalCheckOnRemote", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint16", "name": "_dstChainId", "type": "uint16" }, { "internalType": "uint256", "name": "_srcPoolId", "type": "uint256" }, { "internalType": "uint256", "name": "_dstPoolId", "type": "uint256" }, { "internalType": "address payable", "name": "_refundAddress", "type": "address" }, { "internalType": "uint256", "name": "_amountLP", "type": "uint256" }, { "internalType": "uint256", "name": "_minAmountLD", "type": "uint256" }, { "internalType": "bytes", "name": "_to", "type": "bytes" }, { "components": [ { "internalType": "uint256", "name": "dstGasForCall", "type": "uint256" }, { "internalType": "uint256", "name": "dstNativeAmount", "type": "uint256" }, { "internalType": "bytes", "name": "dstNativeAddr", "type": "bytes" } ], "internalType": "struct Router.lzTxObj", "name": "_lzTxParams", "type": "tuple" } ], "name": "redeemRemote", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint16", "name": "_dstChainId", "type": "uint16" }, { "internalType": "bytes", "name": "_srcAddress", "type": "bytes" }, { "internalType": "uint256", "name": "_nonce", "type": "uint256" } ], "name": "retryRevert", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "uint16", "name": "_dstChainId", "type": "uint16" }, { "internalType": "bytes", "name": "_srcAddress", "type": "bytes" }, { "internalType": "uint256", "name": "_nonce", "type": "uint256" }, { "internalType": "address payable", "name": "_refundAddress", "type": "address" }, { "components": [ { "internalType": "uint256", "name": "dstGasForCall", "type": "uint256" }, { "internalType": "uint256", "name": "dstNativeAmount", "type": "uint256" }, { "internalType": "bytes", "name": "dstNativeAddr", "type": "bytes" } ], "internalType": "struct Router.lzTxObj", "name": "_lzTxParams", "type": "tuple" } ], "name": "revertRedeemLocal", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "uint16", "name": "", "type": "uint16" }, { "internalType": "bytes", "name": "", "type": "bytes" }, { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "revertLookup", "outputs": [ { "internalType": "bytes", "name": "", "type": "bytes" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint16", "name": "_dstChainId", "type": "uint16" }, { "internalType": "uint256", "name": "_srcPoolId", "type": "uint256" }, { "internalType": "uint256", "name": "_dstPoolId", "type": "uint256" }, { "internalType": "address payable", "name": "_refundAddress", "type": "address" } ], "name": "sendCredits", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "contract Bridge", "name": "_bridge", "type": "address" }, { "internalType": "contract Factory", "name": "_factory", "type": "address" } ], "name": "setBridgeAndFactory", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_poolId", "type": "uint256" }, { "internalType": "bool", "name": "_batched", "type": "bool" }, { "internalType": "uint256", "name": "_swapDeltaBP", "type": "uint256" }, { "internalType": "uint256", "name": "_lpDeltaBP", "type": "uint256" }, { "internalType": "bool", "name": "_defaultSwapMode", "type": "bool" }, { "internalType": "bool", "name": "_defaultLPMode", "type": "bool" } ], "name": "setDeltaParam", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_poolId", "type": "uint256" }, { "internalType": "address", "name": "_feeLibraryAddr", "type": "address" } ], "name": "setFeeLibrary", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_poolId", "type": "uint256" }, { "internalType": "uint256", "name": "_mintFeeBP", "type": "uint256" } ], "name": "setFees", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_owner", "type": "address" } ], "name": "setMintFeeOwner", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_owner", "type": "address" } ], "name": "setProtocolFeeOwner", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_poolId", "type": "uint256" }, { "internalType": "bool", "name": "_swapStop", "type": "bool" } ], "name": "setSwapStop", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_poolId", "type": "uint256" }, { "internalType": "uint16", "name": "_dstChainId", "type": "uint16" }, { "internalType": "uint256", "name": "_dstPoolId", "type": "uint256" }, { "internalType": "uint16", "name": "_weight", "type": "uint16" } ], "name": "setWeightForChainPath", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint16", "name": "_dstChainId", "type": "uint16" }, { "internalType": "uint256", "name": "_srcPoolId", "type": "uint256" }, { "internalType": "uint256", "name": "_dstPoolId", "type": "uint256" }, { "internalType": "address payable", "name": "_refundAddress", "type": "address" }, { "internalType": "uint256", "name": "_amountLD", "type": "uint256" }, { "internalType": "uint256", "name": "_minAmountLD", "type": "uint256" }, { "components": [ { "internalType": "uint256", "name": "dstGasForCall", "type": "uint256" }, { "internalType": "uint256", "name": "dstNativeAmount", "type": "uint256" }, { "internalType": "bytes", "name": "dstNativeAddr", "type": "bytes" } ], "internalType": "struct Router.lzTxObj", "name": "_lzTxParams", "type": "tuple" }, { "internalType": "bytes", "name": "_to", "type": "bytes" }, { "internalType": "bytes", "name": "_payload", "type": "bytes" } ], "name": "swap", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "uint16", "name": "_srcChainId", "type": "uint16" }, { "internalType": "bytes", "name": "_srcAddress", "type": "bytes" }, { "internalType": "uint256", "name": "_nonce", "type": "uint256" }, { "internalType": "uint256", "name": "_srcPoolId", "type": "uint256" }, { "internalType": "uint256", "name": "_dstPoolId", "type": "uint256" }, { "internalType": "uint256", "name": "_dstGasForCall", "type": "uint256" }, { "internalType": "address", "name": "_to", "type": "address" }, { "components": [ { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "uint256", "name": "eqFee", "type": "uint256" }, { "internalType": "uint256", "name": "eqReward", "type": "uint256" }, { "internalType": "uint256", "name": "lpFee", "type": "uint256" }, { "internalType": "uint256", "name": "protocolFee", "type": "uint256" }, { "internalType": "uint256", "name": "lkbRemove", "type": "uint256" } ], "internalType": "struct Pool.SwapObj", "name": "_s", "type": "tuple" }, { "internalType": "bytes", "name": "_payload", "type": "bytes" } ], "name": "swapRemote", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_poolId", "type": "uint256" }, { "internalType": "address", "name": "_to", "type": "address" } ], "name": "withdrawMintFee", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_poolId", "type": "uint256" }, { "internalType": "address", "name": "_to", "type": "address" } ], "name": "withdrawProtocolFee", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "transactionHash": "0x6db68c2df4a2a73ff4fc18df891e4c9631a832ccf8866f97d86e944420a87b70", "receipt": { "to": null, "from": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", "contractAddress": "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0", "transactionIndex": 0, "gasUsed": "4268712", "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000040200000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000100000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000002000000000000000000020000000000000000000000000000000000000000000000000400000000000000000", "blockHash": "0xab8edf8691faf6ee82bd6b3e836fb6fbfabc907a92831a73eec3fd05b1c8fec3", "transactionHash": "0x6db68c2df4a2a73ff4fc18df891e4c9631a832ccf8866f97d86e944420a87b70", "logs": [ { "transactionIndex": 0, "blockNumber": 3, "transactionHash": "0x6db68c2df4a2a73ff4fc18df891e4c9631a832ccf8866f97d86e944420a87b70", "address": "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" ], "data": "0x", "logIndex": 0, "blockHash": "0xab8edf8691faf6ee82bd6b3e836fb6fbfabc907a92831a73eec3fd05b1c8fec3" } ], "blockNumber": 3, "cumulativeGasUsed": "4268712", "status": 1, "byzantium": true }, "args": [], "numDeployments": 1, "solcInputHash": "93695e8f8ff858f44ba540ebbfec827c", "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountLD\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"CachedSwapSaved\",\"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\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountLD\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"reason\",\"type\":\"string\"}],\"name\":\"ReceiveFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"bridgeFunctionType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"Revert\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"TYPE_REDEEM_LOCAL_CALLBACK_RETRY\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TYPE_REDEEM_LOCAL_RESPONSE\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TYPE_SWAP_REMOTE_RETRY\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_poolId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_dstPoolId\",\"type\":\"uint256\"}],\"name\":\"activateChainPath\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_poolId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amountLD\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"addLiquidity\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract Bridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"cachedSwapLookup\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountLD\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_poolId\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_fullMode\",\"type\":\"bool\"}],\"name\":\"callDelta\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"clearCachedSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_poolId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_dstPoolId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_weight\",\"type\":\"uint256\"}],\"name\":\"createChainPath\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_poolId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"_sharedDecimals\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"_localDecimals\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"}],\"name\":\"createPool\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_dstPoolId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_srcPoolId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"credits\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"idealBalance\",\"type\":\"uint256\"}],\"internalType\":\"struct Pool.CreditObj\",\"name\":\"_c\",\"type\":\"tuple\"}],\"name\":\"creditChainPath\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"contract Factory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"mintFeeOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"protocolFeeOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"_functionType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"_toAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_transferAndCallPayload\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"dstGasForCall\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dstNativeAmount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"dstNativeAddr\",\"type\":\"bytes\"}],\"internalType\":\"struct Router.lzTxObj\",\"name\":\"_lzTxParams\",\"type\":\"tuple\"}],\"name\":\"quoteLayerZeroFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_srcPoolId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_dstPoolId\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_refundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amountLP\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_to\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"dstGasForCall\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dstNativeAmount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"dstNativeAddr\",\"type\":\"bytes\"}],\"internalType\":\"struct Router.lzTxObj\",\"name\":\"_lzTxParams\",\"type\":\"tuple\"}],\"name\":\"redeemLocal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_srcPoolId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_dstPoolId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amountSD\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_mintAmountSD\",\"type\":\"uint256\"}],\"name\":\"redeemLocalCallback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_srcPoolId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_dstPoolId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amountSD\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_to\",\"type\":\"bytes\"}],\"name\":\"redeemLocalCheckOnRemote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_srcPoolId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_dstPoolId\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_refundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amountLP\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minAmountLD\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_to\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"dstGasForCall\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dstNativeAmount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"dstNativeAddr\",\"type\":\"bytes\"}],\"internalType\":\"struct Router.lzTxObj\",\"name\":\"_lzTxParams\",\"type\":\"tuple\"}],\"name\":\"redeemRemote\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"retryRevert\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_refundAddress\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"dstGasForCall\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dstNativeAmount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"dstNativeAddr\",\"type\":\"bytes\"}],\"internalType\":\"struct Router.lzTxObj\",\"name\":\"_lzTxParams\",\"type\":\"tuple\"}],\"name\":\"revertRedeemLocal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"revertLookup\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_srcPoolId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_dstPoolId\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_refundAddress\",\"type\":\"address\"}],\"name\":\"sendCredits\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract Bridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract Factory\",\"name\":\"_factory\",\"type\":\"address\"}],\"name\":\"setBridgeAndFactory\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_poolId\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_batched\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_swapDeltaBP\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_lpDeltaBP\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_defaultSwapMode\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_defaultLPMode\",\"type\":\"bool\"}],\"name\":\"setDeltaParam\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_poolId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_feeLibraryAddr\",\"type\":\"address\"}],\"name\":\"setFeeLibrary\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_poolId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_mintFeeBP\",\"type\":\"uint256\"}],\"name\":\"setFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"setMintFeeOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"setProtocolFeeOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_poolId\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_swapStop\",\"type\":\"bool\"}],\"name\":\"setSwapStop\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_poolId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_dstPoolId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"_weight\",\"type\":\"uint16\"}],\"name\":\"setWeightForChainPath\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_srcPoolId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_dstPoolId\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_refundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amountLD\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minAmountLD\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"dstGasForCall\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dstNativeAmount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"dstNativeAddr\",\"type\":\"bytes\"}],\"internalType\":\"struct Router.lzTxObj\",\"name\":\"_lzTxParams\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"_to\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"swap\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_srcPoolId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_dstPoolId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_dstGasForCall\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"eqFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"eqReward\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lpFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lkbRemove\",\"type\":\"uint256\"}],\"internalType\":\"struct Pool.SwapObj\",\"name\":\"_s\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"swapRemote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_poolId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"withdrawMintFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_poolId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"withdrawProtocolFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Router.sol\":\"Router\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor () {\\n address msgSender = _msgSender();\\n _owner = msgSender;\\n emit OwnershipTransferred(address(0), msgSender);\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n emit OwnershipTransferred(_owner, address(0));\\n _owner = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n emit OwnershipTransferred(_owner, newOwner);\\n _owner = newOwner;\\n }\\n}\\n\",\"keccak256\":\"0x549c5343ad9f7e3f38aa4c4761854403502574bbc15b822db2ce892ff9b79da7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\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 uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction 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 if (b > a) return (false, 0);\\n return (true, a - b);\\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 // 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 * @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 if (b == 0) return (false, 0);\\n return (true, a / b);\\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 if (b == 0) return (false, 0);\\n return (true, a % b);\\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 uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n return c;\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\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 if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\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. 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(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\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 require(b > 0, \\\"SafeMath: modulo by zero\\\");\\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(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\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(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\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(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xe22a1fc7400ae196eba2ad1562d0386462b00a6363b742d55a2fd2021a58586f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` 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(address sender, address recipient, uint256 amount) external returns (bool);\\n\\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\",\"keccak256\":\"0xbd74f587ab9b9711801baf667db1426e4a03fd2d7f15af33e0e0d0394e7cef76\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\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 ReentrancyGuard {\\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 constructor () {\\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 make 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\",\"keccak256\":\"0x1153f6dd334c01566417b8c551122450542a2b75a2bbb379d59a8c320ed6da28\",\"license\":\"MIT\"},\"contracts/Bridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.7.6;\\npragma experimental ABIEncoderV2;\\n\\n// imports\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\nimport \\\"./Pool.sol\\\";\\nimport \\\"./Router.sol\\\";\\n// interfaces\\nimport \\\"./interfaces/ILayerZeroReceiver.sol\\\";\\nimport \\\"./interfaces/ILayerZeroEndpoint.sol\\\";\\nimport \\\"./interfaces/ILayerZeroUserApplicationConfig.sol\\\";\\n\\n// libraries\\nimport \\\"@openzeppelin/contracts/math/SafeMath.sol\\\";\\n\\ncontract Bridge is Ownable, ILayerZeroReceiver, ILayerZeroUserApplicationConfig {\\n using SafeMath for uint256;\\n\\n //---------------------------------------------------------------------------\\n // CONSTANTS\\n uint8 public constant TYPE_SWAP_REMOTE = 1;\\n uint8 public constant TYPE_ADD_LIQUIDITY = 2;\\n uint8 public constant TYPE_REDEEM_LOCAL_CALL_BACK = 3;\\n uint8 public constant TYPE_WITHDRAW_REMOTE = 4;\\n\\n //---------------------------------------------------------------------------\\n // VARIABLES\\n ILayerZeroEndpoint public layerZeroEndpoint;\\n mapping(uint16 => bytes) public bridgeLookup;\\n mapping(uint16 => mapping(uint8 => uint256)) public gasLookup;\\n Router public router;\\n bool public useLayerZeroToken;\\n\\n //---------------------------------------------------------------------------\\n // MODIFIERS\\n modifier onlyRouter() {\\n require(msg.sender == address(router), \\\"Stargate: caller must be Router.\\\");\\n _;\\n }\\n\\n constructor(address _layerZeroEndpoint) {\\n require(_layerZeroEndpoint != address(0x0), \\\"Stargate: _layerZeroEndpoint cannot be 0x0\\\");\\n layerZeroEndpoint = ILayerZeroEndpoint(_layerZeroEndpoint);\\n }\\n\\n //---------------------------------------------------------------------------\\n // EXTERNAL functions\\n\\n function setRouter(Router _router) external onlyOwner {\\n require(address(router) == address(0x0), \\\"router already initialized\\\"); // 1 time only\\n router = _router;\\n }\\n\\n function lzReceive(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload\\n ) external override {\\n require(msg.sender == address(layerZeroEndpoint), \\\"Stargate: only LayerZero endpoint can call lzReceive\\\");\\n require(\\n _srcAddress.length == bridgeLookup[_srcChainId].length && keccak256(_srcAddress) == keccak256(bridgeLookup[_srcChainId]),\\n \\\"Stargate: bridge does not match\\\"\\n );\\n\\n uint8 functionType;\\n assembly {\\n functionType := mload(add(_payload, 32))\\n }\\n\\n if (functionType == TYPE_SWAP_REMOTE) {\\n (\\n ,\\n uint256 srcPoolId,\\n uint256 dstPoolId,\\n uint256 dstGasForCall,\\n Pool.CreditObj memory c,\\n Pool.SwapObj memory s,\\n bytes memory to,\\n bytes memory payload\\n ) = abi.decode(_payload, (uint8, uint256, uint256, uint256, Pool.CreditObj, Pool.SwapObj, bytes, bytes));\\n address toAddress;\\n assembly {\\n toAddress := mload(add(to, 20))\\n }\\n router.creditChainPath(_srcChainId, srcPoolId, dstPoolId, c);\\n router.swapRemote(_srcChainId, _srcAddress, _nonce, srcPoolId, dstPoolId, dstGasForCall, toAddress, s, payload);\\n } else if (functionType == TYPE_ADD_LIQUIDITY) {\\n (, uint256 srcPoolId, uint256 dstPoolId, Pool.CreditObj memory c) = abi.decode(_payload, (uint8, uint256, uint256, Pool.CreditObj));\\n router.creditChainPath(_srcChainId, srcPoolId, dstPoolId, c);\\n } else if (functionType == TYPE_REDEEM_LOCAL_CALL_BACK) {\\n (, uint256 srcPoolId, uint256 dstPoolId, Pool.CreditObj memory c, uint256 amountSD, uint256 mintAmountSD, bytes memory to) = abi\\n .decode(_payload, (uint8, uint256, uint256, Pool.CreditObj, uint256, uint256, bytes));\\n address toAddress;\\n assembly {\\n toAddress := mload(add(to, 20))\\n }\\n router.creditChainPath(_srcChainId, srcPoolId, dstPoolId, c);\\n router.redeemLocalCallback(_srcChainId, _srcAddress, _nonce, srcPoolId, dstPoolId, toAddress, amountSD, mintAmountSD);\\n } else if (functionType == TYPE_WITHDRAW_REMOTE) {\\n (, uint256 srcPoolId, uint256 dstPoolId, Pool.CreditObj memory c, uint256 amountSD, bytes memory to) = abi.decode(\\n _payload,\\n (uint8, uint256, uint256, Pool.CreditObj, uint256, bytes)\\n );\\n router.creditChainPath(_srcChainId, srcPoolId, dstPoolId, c);\\n router.redeemLocalCheckOnRemote(_srcChainId, _srcAddress, _nonce, srcPoolId, dstPoolId, amountSD, to);\\n }\\n }\\n\\n //---------------------------------------------------------------------------\\n // LOCAL CHAIN FUNCTIONS\\n\\n function swap(\\n uint16 _chainId,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address payable _refundAddress,\\n Pool.CreditObj memory _c,\\n Pool.SwapObj memory _s,\\n Router.lzTxObj memory _lzTxParams,\\n bytes calldata _to,\\n bytes calldata _payload\\n ) external payable onlyRouter {\\n bytes memory payload = abi.encode(TYPE_SWAP_REMOTE, _srcPoolId, _dstPoolId, _lzTxParams.dstGasForCall, _c, _s, _to, _payload);\\n _call(_chainId, TYPE_SWAP_REMOTE, _refundAddress, _lzTxParams, payload);\\n }\\n\\n function redeemLocalCallback(\\n uint16 _chainId,\\n address payable _refundAddress,\\n Pool.CreditObj memory _c,\\n Router.lzTxObj memory _lzTxParams,\\n bytes memory _payload\\n ) external payable onlyRouter {\\n bytes memory payload;\\n\\n {\\n (, uint256 srcPoolId, uint256 dstPoolId, uint256 amountSD, uint256 mintAmountSD, bytes memory to) = abi.decode(\\n _payload,\\n (uint8, uint256, uint256, uint256, uint256, bytes)\\n );\\n\\n // swap dst and src because we are headed back\\n payload = abi.encode(TYPE_REDEEM_LOCAL_CALL_BACK, dstPoolId, srcPoolId, _c, amountSD, mintAmountSD, to);\\n }\\n\\n _call(_chainId, TYPE_REDEEM_LOCAL_CALL_BACK, _refundAddress, _lzTxParams, payload);\\n }\\n\\n function redeemLocal(\\n uint16 _chainId,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address payable _refundAddress,\\n Pool.CreditObj memory _c,\\n uint256 _amountSD,\\n bytes calldata _to,\\n Router.lzTxObj memory _lzTxParams\\n ) external payable onlyRouter {\\n bytes memory payload = abi.encode(TYPE_WITHDRAW_REMOTE, _srcPoolId, _dstPoolId, _c, _amountSD, _to);\\n _call(_chainId, TYPE_WITHDRAW_REMOTE, _refundAddress, _lzTxParams, payload);\\n }\\n\\n function sendCredits(\\n uint16 _chainId,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address payable _refundAddress,\\n Pool.CreditObj memory _c\\n ) external payable onlyRouter {\\n bytes memory payload = abi.encode(TYPE_ADD_LIQUIDITY, _srcPoolId, _dstPoolId, _c);\\n Router.lzTxObj memory lzTxObj = Router.lzTxObj(0, 0, \\\"0x\\\");\\n _call(_chainId, TYPE_ADD_LIQUIDITY, _refundAddress, lzTxObj, payload);\\n }\\n\\n function quoteLayerZeroFee(\\n uint16 _chainId,\\n uint8 _functionType,\\n bytes calldata _toAddress,\\n bytes calldata _transferAndCallPayload,\\n Router.lzTxObj memory _lzTxParams\\n ) external view returns (uint256) {\\n bytes memory payload = \\\"\\\";\\n if (_functionType == TYPE_SWAP_REMOTE) {\\n Pool.SwapObj memory s = Pool.SwapObj(1, 1, 1, 1, 1, 1);\\n payload = abi.encode(TYPE_SWAP_REMOTE, 0, 0, 0, s, _toAddress, _transferAndCallPayload);\\n } else if (_functionType == TYPE_ADD_LIQUIDITY) {\\n payload = abi.encode(TYPE_ADD_LIQUIDITY, 0, 0);\\n } else if (_functionType == TYPE_REDEEM_LOCAL_CALL_BACK) {\\n payload = abi.encode(TYPE_REDEEM_LOCAL_CALL_BACK, 0, 0, 0, 0, _toAddress);\\n } else if (_functionType == TYPE_WITHDRAW_REMOTE) {\\n payload = abi.encode(TYPE_WITHDRAW_REMOTE, 0, 0, 0, _toAddress);\\n }\\n\\n bytes memory lzTxParamBuilt = _txParamBuilder(_chainId, _functionType, _lzTxParams);\\n return layerZeroEndpoint.estimateNativeFees(_chainId, address(this), payload, useLayerZeroToken, lzTxParamBuilt);\\n }\\n\\n //---------------------------------------------------------------------------\\n // dao functions\\n\\n function setBridge(uint16 _chainId, bytes calldata _bridgeAddress) external onlyOwner {\\n require(bridgeLookup[_chainId].length == 0, \\\"Stargate: Bridge already set!\\\");\\n bridgeLookup[_chainId] = _bridgeAddress;\\n }\\n\\n function setGasAmount(\\n uint16 _chainId,\\n uint8 _functionType,\\n uint256 _gasAmount\\n ) external onlyOwner {\\n require(_functionType >= 1 && _functionType <= 4, \\\"Stargate: invalid _functionType\\\");\\n gasLookup[_chainId][_functionType] = _gasAmount;\\n }\\n\\n function approveTokenSpender(\\n address token,\\n address spender,\\n uint256 amount\\n ) external onlyOwner {\\n IERC20(token).approve(spender, amount);\\n }\\n\\n function setUseLayerZeroToken(bool enable) external onlyOwner {\\n useLayerZeroToken = enable;\\n }\\n\\n function setOracle(uint16 _chainId, address payable _oracle) external override onlyOwner {\\n layerZeroEndpoint.setOracle(_chainId, _oracle);\\n }\\n\\n function setRelayer(uint16 _chainId, address payable _relayer) external override onlyOwner {\\n layerZeroEndpoint.setRelayer(_chainId, _relayer);\\n }\\n\\n function setBlockConfirmations(uint16 _chainId, uint256 _blockConfirmations) external override onlyOwner {\\n layerZeroEndpoint.setBlockConfirmations(_chainId, _blockConfirmations);\\n }\\n\\n function setLibraryVersion(uint16 _chainId, uint16 _libraryVersion) external override onlyOwner {\\n layerZeroEndpoint.setLibraryVersion(_chainId, _libraryVersion);\\n }\\n\\n function getOracle(\\n uint16 _chainId,\\n address /*unused*/\\n ) external view override returns (address oracle) {\\n // instead of using the address \\\"unused\\\" , actually want the oracle *this* contract has configured.\\n return layerZeroEndpoint.getOracle(_chainId, address(this));\\n }\\n\\n function getRelayer(\\n uint16 _chainId,\\n address /*unused*/\\n ) external view override returns (address relayer) {\\n // instead of using the address \\\"unused\\\" , actually want the relayer *this* contract has configured.\\n return layerZeroEndpoint.getRelayer(_chainId, address(this));\\n }\\n\\n function getBlockConfirmations(\\n uint16 _chainId,\\n address /*unused*/\\n ) external view override returns (uint256 blockConfirmations) {\\n // instead of using the address \\\"unused\\\" , actually want the block configurations *this* contract has configured.\\n return layerZeroEndpoint.getBlockConfirmations(_chainId, address(this));\\n }\\n\\n function getLibraryVersion(\\n uint16 _chainId,\\n address /*unused*/\\n ) external view override returns (uint16 libraryVersion) {\\n // instead of using the address \\\"unused\\\" , actually want the libraryVersion *this* contract has configured.\\n return layerZeroEndpoint.getLibraryVersion(_chainId, address(this));\\n }\\n\\n function setVersion(uint16 _layerZeroVersion) external override onlyOwner {\\n layerZeroEndpoint.setVersion(_layerZeroVersion);\\n }\\n\\n function getVersion() external override returns (uint16) {\\n return layerZeroEndpoint.getVersion();\\n }\\n\\n //---------------------------------------------------------------------------\\n // INTERNAL functions\\n\\n function txParamBuilderType1(uint256 _gasAmount) internal pure returns (bytes memory) {\\n uint16 txType = 1;\\n return abi.encodePacked(txType, _gasAmount);\\n }\\n\\n function txParamBuilderType2(\\n uint256 _gasAmount,\\n uint256 _dstNativeAmount,\\n bytes memory _dstNativeAddr\\n ) internal pure returns (bytes memory) {\\n uint16 txType = 2;\\n return abi.encodePacked(txType, _gasAmount, _dstNativeAmount, _dstNativeAddr);\\n }\\n\\n function _txParamBuilder(\\n uint16 _chainId,\\n uint8 _type,\\n Router.lzTxObj memory _lzTxParams\\n ) internal view returns (bytes memory) {\\n bytes memory lzTxParam;\\n address dstNativeAddr;\\n {\\n bytes memory dstNativeAddrBytes = _lzTxParams.dstNativeAddr;\\n assembly {\\n dstNativeAddr := mload(add(dstNativeAddrBytes, 20))\\n }\\n }\\n\\n uint256 totalGas = gasLookup[_chainId][_type].add(_lzTxParams.dstGasForCall);\\n if (_lzTxParams.dstNativeAmount > 0 && dstNativeAddr != address(0x0)) {\\n lzTxParam = txParamBuilderType2(totalGas, _lzTxParams.dstNativeAmount, _lzTxParams.dstNativeAddr);\\n } else {\\n lzTxParam = txParamBuilderType1(totalGas);\\n }\\n\\n return lzTxParam;\\n }\\n\\n function _call(\\n uint16 _chainId,\\n uint8 _type,\\n address payable _refundAddress,\\n Router.lzTxObj memory _lzTxParams,\\n bytes memory _payload\\n ) internal {\\n bytes memory lzTxParamBuilt = _txParamBuilder(_chainId, _type, _lzTxParams);\\n layerZeroEndpoint.send{value: msg.value}(_chainId, bridgeLookup[_chainId], _payload, _refundAddress, address(this), lzTxParamBuilt);\\n }\\n\\n function renounceOwnership() public override onlyOwner {}\\n}\\n\",\"keccak256\":\"0xe66ad62440207708b3940556537d16482a216d993594e149460f8b43f7f7299b\",\"license\":\"BUSL-1.1\"},\"contracts/Factory.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.7.6;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"@openzeppelin/contracts/math/SafeMath.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"./Pool.sol\\\";\\n\\ncontract Factory is Ownable {\\n using SafeMath for uint256;\\n\\n //---------------------------------------------------------------------------\\n // VARIABLES\\n mapping(uint256 => Pool) public getPool; // poolId -> PoolInfo\\n address[] public allPools;\\n address public router;\\n address public defaultFeeLibrary; // address for retrieving fee params for swaps\\n\\n //---------------------------------------------------------------------------\\n // MODIFIERS\\n modifier onlyRouter() {\\n require(msg.sender == router, \\\"Stargate: caller must be Router.\\\");\\n _;\\n }\\n\\n constructor() {}\\n\\n function setRouter(address _router) external onlyOwner {\\n require(router == address(0x0), \\\"router already intialized\\\"); // 1 time only\\n router = _router;\\n }\\n\\n function setDefaultFeeLibrary(address _defaultFeeLibrary) external onlyOwner {\\n defaultFeeLibrary = _defaultFeeLibrary;\\n }\\n\\n function allPoolsLength() external view returns (uint256) {\\n return allPools.length;\\n }\\n\\n function createPool(\\n uint256 _poolId,\\n address _token,\\n uint8 _sharedDecimals,\\n uint8 _localDecimals,\\n string memory _name,\\n string memory _symbol\\n ) public onlyRouter returns (address poolAddress) {\\n require(address(getPool[_poolId]) == address(0x0), \\\"Stargate: Pool already created\\\");\\n\\n Pool pool = new Pool(_poolId, router, _token, _sharedDecimals, _localDecimals, defaultFeeLibrary, _name, _symbol);\\n getPool[_poolId] = pool;\\n poolAddress = address(pool);\\n allPools.push(poolAddress);\\n }\\n\\n function renounceOwnership() public override onlyOwner {}\\n}\\n\",\"keccak256\":\"0x682f24b8f4581e67c86d50db3ed4fd298f60c2fed9877ff616e98ec7468da2ac\",\"license\":\"BUSL-1.1\"},\"contracts/LPTokenERC20.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.7.6;\\n\\n// libraries\\nimport \\\"@openzeppelin/contracts/math/SafeMath.sol\\\";\\n\\ncontract LPTokenERC20 {\\n using SafeMath for uint256;\\n\\n //---------------------------------------------------------------------------\\n // CONSTANTS\\n string public name;\\n string public symbol;\\n bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;\\n // set in constructor\\n bytes32 public DOMAIN_SEPARATOR;\\n\\n //---------------------------------------------------------------------------\\n // VARIABLES\\n uint256 public decimals;\\n uint256 public totalSupply;\\n mapping(address => uint256) public balanceOf;\\n mapping(address => mapping(address => uint256)) public allowance;\\n mapping(address => uint256) public nonces;\\n\\n //---------------------------------------------------------------------------\\n // EVENTS\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n constructor(string memory _name, string memory _symbol) {\\n name = _name;\\n symbol = _symbol;\\n uint256 chainId;\\n assembly {\\n chainId := chainid()\\n }\\n DOMAIN_SEPARATOR = keccak256(\\n abi.encode(\\n keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"),\\n keccak256(bytes(name)),\\n keccak256(bytes(\\\"1\\\")),\\n chainId,\\n address(this)\\n )\\n );\\n }\\n\\n function _mint(address to, uint256 value) internal {\\n totalSupply = totalSupply.add(value);\\n balanceOf[to] = balanceOf[to].add(value);\\n emit Transfer(address(0), to, value);\\n }\\n\\n function _burn(address from, uint256 value) internal {\\n balanceOf[from] = balanceOf[from].sub(value);\\n totalSupply = totalSupply.sub(value);\\n emit Transfer(from, address(0), value);\\n }\\n\\n function _approve(\\n address owner,\\n address spender,\\n uint256 value\\n ) private {\\n allowance[owner][spender] = value;\\n emit Approval(owner, spender, value);\\n }\\n\\n function _transfer(\\n address from,\\n address to,\\n uint256 value\\n ) private {\\n balanceOf[from] = balanceOf[from].sub(value);\\n balanceOf[to] = balanceOf[to].add(value);\\n emit Transfer(from, to, value);\\n }\\n\\n function approve(address spender, uint256 value) external returns (bool) {\\n _approve(msg.sender, spender, value);\\n return true;\\n }\\n\\n function transfer(address to, uint256 value) external returns (bool) {\\n _transfer(msg.sender, to, value);\\n return true;\\n }\\n\\n function transferFrom(\\n address from,\\n address to,\\n uint256 value\\n ) external returns (bool) {\\n if (allowance[from][msg.sender] != uint256(-1)) {\\n allowance[from][msg.sender] = allowance[from][msg.sender].sub(value);\\n }\\n _transfer(from, to, value);\\n return true;\\n }\\n\\n //\\n //\\n //\\n //\\n // function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n // _approve(msg.sender, spender, allowance[msg.sender][spender].add(addedValue));\\n // return true;\\n // }\\n //\\n //\\n //\\n //\\n // function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n // _approve(msg.sender, spender, allowance[msg.sender][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\n // return true;\\n // }\\n\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external {\\n require(deadline >= block.timestamp, \\\"Bridge: EXPIRED\\\");\\n bytes32 digest = keccak256(\\n abi.encodePacked(\\n \\\"\\\\x19\\\\x01\\\",\\n DOMAIN_SEPARATOR,\\n keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline))\\n )\\n );\\n address recoveredAddress = ecrecover(digest, v, r, s);\\n require(recoveredAddress != address(0) && recoveredAddress == owner, \\\"Bridge: INVALID_SIGNATURE\\\");\\n _approve(owner, spender, value);\\n }\\n}\\n\",\"keccak256\":\"0x9a08995ccddfce7f0ba1a08aba80141d3754b0a609a908112dc309739e1f3c1b\",\"license\":\"BUSL-1.1\"},\"contracts/Pool.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.7.6;\\npragma abicoder v2;\\n\\n// imports\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\\\";\\nimport \\\"./LPTokenERC20.sol\\\";\\nimport \\\"./interfaces/IStargateFeeLibrary.sol\\\";\\n\\n// libraries\\nimport \\\"@openzeppelin/contracts/math/SafeMath.sol\\\";\\n\\n/// Pool contracts on other chains and managed by the Stargate protocol.\\ncontract Pool is LPTokenERC20, ReentrancyGuard {\\n using SafeMath for uint256;\\n\\n //---------------------------------------------------------------------------\\n // CONSTANTS\\n bytes4 private constant SELECTOR = bytes4(keccak256(bytes(\\\"transfer(address,uint256)\\\")));\\n\\n //---------------------------------------------------------------------------\\n // STRUCTS\\n struct ChainPath {\\n uint16 dstChainId;\\n uint256 dstPoolId;\\n uint256 weight;\\n uint256 balance;\\n uint256 lkb;\\n uint256 credits;\\n uint256 idealBalance;\\n bool ready; // indicate if the counter chainPath has been created.\\n }\\n\\n struct SwapObj {\\n uint256 amount;\\n uint256 eqFee;\\n uint256 eqReward;\\n uint256 lpFee;\\n uint256 protocolFee;\\n uint256 lkbRemove;\\n }\\n\\n struct CreditObj {\\n uint256 credits;\\n uint256 idealBalance;\\n }\\n\\n //---------------------------------------------------------------------------\\n // VARIABLES\\n\\n // chainPath\\n ChainPath[] public chainPaths; // list of connected chains with shared pools\\n mapping(uint16 => mapping(uint256 => uint256)) public chainPathIndexLookup; // lookup for chainPath by chainId => poolId =>index\\n\\n // metadata\\n uint256 public poolId; // shared id between chains to represent same pool\\n uint256 public sharedDecimals; // the shared decimals (lowest common decimals between chains)\\n uint256 public localDecimals; // the decimals for the token\\n uint256 public convertRate; // the decimals for the token\\n bool public stopSwap; // flag to stop swapping in extreme cases\\n address public token; // the token for the pool\\n address public router; // the token for the pool\\n\\n // Fee and Liquidity\\n uint256 public totalLiquidity; // the total amount of tokens added on this side of the chain (fees + deposits - withdrawals)\\n uint256 public totalWeight; // total weight for pool percentages\\n uint256 public mintFeeBP; // fee basis points for the mint/deposit\\n uint256 public protocolFeeBalance; // fee balance created from dao fee\\n uint256 public mintFeeBalance; // fee balance created from mint fee\\n uint256 public eqFeePool; // pool rewards in Shared Decimal format. indicate the total budget for reverse swap incentive\\n address public feeLibrary; // address for retrieving fee params for swaps\\n\\n // Delta related\\n uint256 public deltaCredit; // credits accumulated from txn\\n bool public batched; // flag to indicate if we want batch processing.\\n bool public defaultSwapMode; // flag for the default mode for swap\\n bool public defaultLPMode; // flag for the default mode for lp\\n uint256 public swapDeltaBP; // basis points of poolCredits to activate Delta in swap\\n uint256 public lpDeltaBP; // basis points of poolCredits to activate Delta in liquidity events\\n\\n //---------------------------------------------------------------------------\\n // EVENTS\\n event Mint(address to, uint256 amountLP, uint256 amountSD, uint256 mintFeeAmountSD);\\n event Burn(address from, uint256 amountLP, uint256 amountSD);\\n event RedeemLocalCallback(address _to, uint256 _amountSD, uint256 _amountToMintSD);\\n event Swap(\\n uint16 chainId,\\n uint256 dstPoolId,\\n address from,\\n uint256 amountSD,\\n uint256 eqReward,\\n uint256 eqFee,\\n uint256 protocolFee,\\n uint256 lpFee\\n );\\n event SendCredits(uint16 dstChainId, uint256 dstPoolId, uint256 credits, uint256 idealBalance);\\n event RedeemRemote(uint16 chainId, uint256 dstPoolId, address from, uint256 amountLP, uint256 amountSD);\\n event RedeemLocal(address from, uint256 amountLP, uint256 amountSD, uint16 chainId, uint256 dstPoolId, address to);\\n event InstantRedeemLocal(address from, uint256 amountLP, uint256 amountSD, uint16 chainId, uint256 dstPoolId, address to);\\n event CreditChainPath(uint16 chainId, uint256 srcPoolId, uint256 amountSD, uint256 idealBalance);\\n event SwapRemote(address to, uint256 amountSD, uint256 protocolFee, uint256 dstFee);\\n event WithdrawRemote(uint16 srcChainId, uint256 srcPoolId, uint256 swapAmount, uint256 mintAmount);\\n event ChainPathUpdate(uint16 dstChainId, uint256 dstPoolId, uint256 weight);\\n event FeesUpdated(uint256 mintFeeBP);\\n event FeeLibraryUpdated(address feeLibraryAddr);\\n event StopSwapUpdated(bool swapStop);\\n event WithdrawProtocolFeeBalance(address to, uint256 amountSD);\\n event WithdrawMintFeeBalance(address to, uint256 amountSD);\\n event DeltaParamUpdated(bool batched, uint256 swapDeltaBP, uint256 lpDeltaBP, bool defaultSwapMode, bool defaultLPMode);\\n\\n //---------------------------------------------------------------------------\\n // MODIFIERS\\n modifier onlyRouter() {\\n require(msg.sender == router, \\\"Stargate: only the router can call this method\\\");\\n _;\\n }\\n\\n constructor(\\n uint256 _poolId,\\n address _router,\\n address _token,\\n uint256 _sharedDecimals,\\n uint256 _localDecimals,\\n address _feeLibrary,\\n string memory _name,\\n string memory _symbol\\n ) LPTokenERC20(_name, _symbol) {\\n require(_token != address(0x0), \\\"Stargate: _token cannot be 0x0\\\");\\n require(_router != address(0x0), \\\"Stargate: _router cannot be 0x0\\\");\\n poolId = _poolId;\\n router = _router;\\n token = _token;\\n sharedDecimals = _sharedDecimals;\\n decimals = uint8(_sharedDecimals);\\n localDecimals = _localDecimals;\\n convertRate = 10**(uint256(localDecimals).sub(sharedDecimals));\\n totalWeight = 0;\\n feeLibrary = _feeLibrary;\\n\\n //delta algo related\\n batched = false;\\n defaultSwapMode = true;\\n defaultLPMode = true;\\n }\\n\\n //---------------\\n // EXTERNAL\\n\\n //---------------------------------------------------------------------------\\n // LOCAL CHAIN FUNCTIONS\\n // Local Remote\\n // ------- ---------\\n\\n function mint(address _to, uint256 _amountLD) external nonReentrant onlyRouter returns (uint256) {\\n return _mintLocal(_to, _amountLD, true, true);\\n }\\n\\n // Local Remote\\n // ------- ---------\\n // swap -> swapRemote\\n //\\n\\n function swap(\\n uint16 _dstChainId,\\n uint256 _dstPoolId,\\n address _from,\\n uint256 _amountLD,\\n uint256 _minAmountLD,\\n bool newLiquidity\\n ) external nonReentrant onlyRouter returns (SwapObj memory) {\\n require(!stopSwap, \\\"Stargate: swap func stopped\\\");\\n ChainPath storage cp = getAndCheckCP(_dstChainId, _dstPoolId);\\n require(cp.ready == true, \\\"Stargate: counter chainPath is not ready\\\");\\n\\n uint256 amountSD = amountLDtoSD(_amountLD);\\n uint256 minAmountSD = amountLDtoSD(_minAmountLD);\\n\\n // request fee params from library\\n SwapObj memory s = IStargateFeeLibrary(feeLibrary).getFees(poolId, _dstPoolId, _dstChainId, _from, amountSD);\\n\\n // equilibrium fee and reward. note eqFee/eqReward are separated from swap liquidity\\n eqFeePool = eqFeePool.sub(s.eqReward);\\n // users will also get the eqReward\\n require(s.amount.add(s.eqReward) >= minAmountSD, \\\"Stargate: slippage too high\\\");\\n\\n // s.lkbRemove = amountSD.add(s.eqReward).sub(s.lpFee);\\n s.lkbRemove = amountSD.sub(s.lpFee);\\n // check for transfer solvency\\n require(cp.balance >= s.lkbRemove, \\\"Stargate: dst balance too low\\\");\\n cp.balance = cp.balance.sub(s.lkbRemove);\\n\\n // distribute credits on condition.\\n if (newLiquidity) {\\n deltaCredit = deltaCredit.add(amountSD);\\n }\\n if (!batched || deltaCredit >= totalLiquidity.mul(swapDeltaBP).div(10000)) {\\n _delta(defaultSwapMode);\\n }\\n\\n emit Swap(_dstChainId, _dstPoolId, _from, s.amount, s.eqReward, s.eqFee, s.protocolFee, s.lpFee);\\n return s;\\n }\\n\\n // Local Remote\\n // ------- ---------\\n // sendCredits -> creditChainPath\\n\\n function sendCredits(uint16 _dstChainId, uint256 _dstPoolId) external nonReentrant onlyRouter returns (CreditObj memory c) {\\n ChainPath storage cp = getAndCheckCP(_dstChainId, _dstPoolId);\\n require(cp.ready == true, \\\"Stargate: counter chainPath is not ready\\\");\\n cp.lkb = cp.lkb.add(cp.credits);\\n c.idealBalance = totalLiquidity.mul(cp.weight).div(totalWeight);\\n c.credits = cp.credits;\\n cp.credits = 0;\\n emit SendCredits(_dstChainId, _dstPoolId, c.credits, c.idealBalance);\\n }\\n\\n // Local Remote\\n // ------- ---------\\n // redeemRemote -> swapRemote\\n\\n function redeemRemote(\\n uint16 _dstChainId,\\n uint256 _dstPoolId,\\n address _from,\\n uint256 _amountLP\\n ) external nonReentrant onlyRouter returns (uint256 amountLD) {\\n require(_from != address(0x0), \\\"Stargate: _from cannot be 0x0\\\");\\n uint256 amountSD = _burnLocal(_from, _amountLP);\\n //run Delta\\n if (!batched || deltaCredit > totalLiquidity.mul(lpDeltaBP).div(10000)) {\\n _delta(defaultLPMode);\\n }\\n amountLD = amountSDtoLD(amountSD);\\n emit RedeemRemote(_dstChainId, _dstPoolId, _from, _amountLP, amountSD);\\n }\\n\\n // Local Remote\\n // ------- ---------\\n // redeemLocal -> redeemLocalCheckOnRemote\\n // redeemLocalCallback <-\\n\\n function redeemLocal(\\n address _from,\\n uint256 _amountLP,\\n uint16 _dstChainId,\\n uint256 _dstPoolId,\\n address _to\\n ) external nonReentrant onlyRouter returns (uint256 amountSD) {\\n require(_from != address(0x0), \\\"Stargate: _from cannot be 0x0\\\");\\n // safeguard.\\n require(chainPaths[chainPathIndexLookup[_dstChainId][_dstPoolId]].ready == true, \\\"Stargate: counter chainPath is not ready\\\");\\n amountSD = _burnLocal(_from, _amountLP);\\n\\n // run Delta\\n if (!batched || deltaCredit > totalLiquidity.mul(lpDeltaBP).div(10000)) {\\n _delta(false);\\n }\\n\\n // if the amountSD <= unallocated credit, a direct withdrawal would suffice\\n if (amountSD <= deltaCredit) {\\n deltaCredit = deltaCredit.sub(amountSD);\\n uint256 amountLD = amountSDtoLD(amountSD);\\n _safeTransfer(token, _to, amountLD);\\n emit InstantRedeemLocal(_from, _amountLP, amountSD, _dstChainId, _dstPoolId, _to);\\n // no need to get acknowledgement from remote\\n amountSD = 0;\\n } else {\\n emit RedeemLocal(_from, _amountLP, amountSD, _dstChainId, _dstPoolId, _to);\\n }\\n }\\n\\n //---------------------------------------------------------------------------\\n // REMOTE CHAIN FUNCTIONS\\n\\n // Local Remote\\n // ------- ---------\\n // sendCredits -> creditChainPath\\n\\n function creditChainPath(\\n uint16 _dstChainId,\\n uint256 _dstPoolId,\\n CreditObj memory _c\\n ) external nonReentrant onlyRouter {\\n ChainPath storage cp = chainPaths[chainPathIndexLookup[_dstChainId][_dstPoolId]];\\n cp.balance = cp.balance.add(_c.credits);\\n if (cp.idealBalance != _c.idealBalance) {\\n cp.idealBalance = _c.idealBalance;\\n }\\n emit CreditChainPath(_dstChainId, _dstPoolId, _c.credits, _c.idealBalance);\\n }\\n\\n // Local Remote\\n // ------- ---------\\n // swap -> swapRemote\\n\\n function swapRemote(\\n uint16 _srcChainId,\\n uint256 _srcPoolId,\\n address _to,\\n SwapObj memory _s\\n ) external nonReentrant onlyRouter returns (uint256 amountLD) {\\n // booking lpFee\\n totalLiquidity = totalLiquidity.add(_s.lpFee);\\n // booking eqFee\\n eqFeePool = eqFeePool.add(_s.eqFee);\\n // booking stargateFee\\n protocolFeeBalance = protocolFeeBalance.add(_s.protocolFee);\\n\\n // update LKB\\n uint256 chainPathIndex = chainPathIndexLookup[_srcChainId][_srcPoolId];\\n chainPaths[chainPathIndex].lkb = chainPaths[chainPathIndex].lkb.sub(_s.lkbRemove);\\n\\n // user receives the amount + the srcReward\\n amountLD = amountSDtoLD(_s.amount.add(_s.eqReward));\\n _safeTransfer(token, _to, amountLD);\\n emit SwapRemote(_to, _s.amount.add(_s.eqReward), _s.protocolFee, _s.eqFee);\\n }\\n\\n // Local Remote\\n // ------- ---------\\n // redeemLocal -> redeemLocalCheckOnRemote\\n // redeemLocalCallback <-\\n\\n function redeemLocalCallback(\\n uint16 _srcChainId,\\n uint256 _srcPoolId,\\n address _to,\\n uint256 _amountSD,\\n uint256 _amountToMintSD\\n ) external nonReentrant onlyRouter {\\n if (_amountToMintSD > 0) {\\n _mintLocal(_to, amountSDtoLD(_amountToMintSD), false, false);\\n }\\n\\n ChainPath storage cp = getAndCheckCP(_srcChainId, _srcPoolId);\\n cp.lkb = cp.lkb.sub(_amountSD);\\n\\n uint256 amountLD = amountSDtoLD(_amountSD);\\n _safeTransfer(token, _to, amountLD);\\n emit RedeemLocalCallback(_to, _amountSD, _amountToMintSD);\\n }\\n\\n // Local Remote\\n // ------- ---------\\n // redeemLocal(amount) -> withdrawRemote\\n // redeemLocalCallback <-\\n\\n function redeemLocalCheckOnRemote(\\n uint16 _srcChainId,\\n uint256 _srcPoolId,\\n uint256 _amountSD\\n ) external nonReentrant onlyRouter returns (uint256 swapAmount, uint256 mintAmount) {\\n ChainPath storage cp = getAndCheckCP(_srcChainId, _srcPoolId);\\n if (_amountSD > cp.balance) {\\n mintAmount = _amountSD - cp.balance;\\n swapAmount = cp.balance;\\n cp.balance = 0;\\n } else {\\n cp.balance = cp.balance.sub(_amountSD);\\n swapAmount = _amountSD;\\n mintAmount = 0;\\n }\\n emit WithdrawRemote(_srcChainId, _srcPoolId, swapAmount, mintAmount);\\n }\\n\\n //---------------------------------------------------------------------------\\n // DAO Calls\\n\\n function createChainPath(\\n uint16 _dstChainId,\\n uint256 _dstPoolId,\\n uint256 _weight\\n ) external onlyRouter {\\n for (uint256 i = 0; i < chainPaths.length; ++i) {\\n ChainPath memory cp = chainPaths[i];\\n bool exists = cp.dstChainId == _dstChainId && cp.dstPoolId == _dstPoolId;\\n require(!exists, \\\"Stargate: cant createChainPath of existing dstChainId and _dstPoolId\\\");\\n }\\n totalWeight = totalWeight.add(_weight);\\n chainPathIndexLookup[_dstChainId][_dstPoolId] = chainPaths.length;\\n chainPaths.push(ChainPath(_dstChainId, _dstPoolId, _weight, 0, 0, 0, 0, false));\\n emit ChainPathUpdate(_dstChainId, _dstPoolId, _weight);\\n }\\n\\n function setWeightForChainPath(\\n uint16 _dstChainId,\\n uint256 _dstPoolId,\\n uint16 _weight\\n ) external onlyRouter {\\n ChainPath storage cp = getAndCheckCP(_dstChainId, _dstPoolId);\\n totalWeight = totalWeight.sub(cp.weight).add(_weight);\\n cp.weight = _weight;\\n emit ChainPathUpdate(_dstChainId, _dstPoolId, _weight);\\n }\\n\\n function setFee(uint256 _mintFeeBP) external onlyRouter {\\n require(_mintFeeBP <= 10000, \\\"Bridge: cum fees > 100%\\\");\\n mintFeeBP = _mintFeeBP;\\n emit FeesUpdated(mintFeeBP);\\n }\\n\\n function setFeeLibrary(address _feeLibraryAddr) external onlyRouter {\\n feeLibrary = _feeLibraryAddr;\\n emit FeeLibraryUpdated(_feeLibraryAddr);\\n }\\n\\n function setSwapStop(bool _swapStop) external onlyRouter {\\n stopSwap = _swapStop;\\n emit StopSwapUpdated(_swapStop);\\n }\\n\\n function setDeltaParam(\\n bool _batched,\\n uint256 _swapDeltaBP,\\n uint256 _lpDeltaBP,\\n bool _defaultSwapMode,\\n bool _defaultLPMode\\n ) external onlyRouter {\\n require(_swapDeltaBP <= 10000 && _lpDeltaBP <= 10000, \\\"Stargate: wrong Delta param\\\");\\n batched = _batched;\\n swapDeltaBP = _swapDeltaBP;\\n lpDeltaBP = _lpDeltaBP;\\n defaultSwapMode = _defaultSwapMode;\\n defaultLPMode = _defaultLPMode;\\n emit DeltaParamUpdated(_batched, _swapDeltaBP, _lpDeltaBP, _defaultSwapMode, _defaultLPMode);\\n }\\n\\n function callDelta(bool _fullMode) external onlyRouter {\\n _delta(_fullMode);\\n }\\n\\n function activateChainPath(uint16 _dstChainId, uint256 _dstPoolId) external onlyRouter {\\n ChainPath storage cp = getAndCheckCP(_dstChainId, _dstPoolId);\\n require(cp.ready == false, \\\"Stargate: chainPath is already active\\\");\\n // this func will only be called once\\n cp.ready = true;\\n }\\n\\n function withdrawProtocolFeeBalance(address _to) external onlyRouter {\\n if (protocolFeeBalance > 0) {\\n uint256 amountOfLD = amountSDtoLD(protocolFeeBalance);\\n protocolFeeBalance = 0;\\n _safeTransfer(token, _to, amountOfLD);\\n emit WithdrawProtocolFeeBalance(_to, amountOfLD);\\n }\\n }\\n\\n function withdrawMintFeeBalance(address _to) external onlyRouter {\\n if (mintFeeBalance > 0) {\\n uint256 amountOfLD = amountSDtoLD(mintFeeBalance);\\n mintFeeBalance = 0;\\n _safeTransfer(token, _to, amountOfLD);\\n emit WithdrawMintFeeBalance(_to, amountOfLD);\\n }\\n }\\n\\n //---------------------------------------------------------------------------\\n // INTERNAL\\n // Conversion Helpers\\n //---------------------------------------------------------------------------\\n\\n function amountSDtoLD(uint256 _amount) internal view returns (uint256) {\\n return _amount.mul(convertRate);\\n }\\n\\n function amountLDtoSD(uint256 _amount) internal view returns (uint256) {\\n return _amount.div(convertRate);\\n }\\n\\n function getAndCheckCP(uint16 _dstChainId, uint256 _dstPoolId) internal view returns (ChainPath storage) {\\n require(chainPaths.length > 0, \\\"Stargate: no chainpaths exist\\\");\\n ChainPath storage cp = chainPaths[chainPathIndexLookup[_dstChainId][_dstPoolId]];\\n require(cp.dstChainId == _dstChainId && cp.dstPoolId == _dstPoolId, \\\"Stargate: local chainPath does not exist\\\");\\n return cp;\\n }\\n\\n function _burnLocal(address _from, uint256 _amountLP) internal returns (uint256) {\\n uint256 amountOfLPTokens = balanceOf[_from];\\n require(amountOfLPTokens >= _amountLP, \\\"Stargate: not enough LP tokens to burn\\\");\\n\\n uint256 amountSD = _amountLP.mul(totalLiquidity).div(totalSupply);\\n //subtract totalLiquidity accordingly\\n totalLiquidity = totalLiquidity.sub(amountSD);\\n\\n _burn(_from, _amountLP);\\n emit Burn(_from, _amountLP, amountSD);\\n return amountSD;\\n }\\n\\n function _delta(bool fullMode) internal {\\n if (deltaCredit > 0 && totalWeight > 0) {\\n uint256 cpLength = chainPaths.length;\\n uint256[] memory deficit = new uint256[](cpLength);\\n uint256 totalDeficit = 0;\\n\\n // algorithm steps 6-9: calculate the total and the amounts required to get to balance state\\n for (uint256 i = 0; i < cpLength; ++i) {\\n ChainPath storage cp = chainPaths[i];\\n // (liquidity * (weight/totalWeight)) - (lkb+credits)\\n uint256 balLiq = totalLiquidity.mul(cp.weight).div(totalWeight);\\n uint256 currLiq = cp.lkb.add(cp.credits);\\n if (balLiq > currLiq) {\\n // save gas since we know balLiq > currLiq and we know deficit[i] > 0\\n deficit[i] = balLiq - currLiq;\\n totalDeficit = totalDeficit.add(deficit[i]);\\n }\\n }\\n\\n // indicates how much delta credit is distributed\\n uint256 spent;\\n\\n // handle credits with 2 tranches. the [ < totalDeficit] [excessCredit]\\n // run full Delta, allocate all credits\\n if (totalDeficit == 0) {\\n // only fullMode delta will allocate excess credits\\n if (fullMode && deltaCredit > 0) {\\n // credit ChainPath by weights\\n for (uint256 i = 0; i < cpLength; ++i) {\\n ChainPath storage cp = chainPaths[i];\\n // credits = credits + toBalanceChange + remaining allocation based on weight\\n uint256 amtToCredit = deltaCredit.mul(cp.weight).div(totalWeight);\\n spent = spent.add(amtToCredit);\\n cp.credits = cp.credits.add(amtToCredit);\\n }\\n } // else do nth\\n } else if (totalDeficit <= deltaCredit) {\\n if (fullMode) {\\n // algorithm step 13: calculate amount to disperse to bring to balance state or as close as possible\\n uint256 excessCredit = deltaCredit - totalDeficit;\\n // algorithm steps 14-16: calculate credits\\n for (uint256 i = 0; i < cpLength; ++i) {\\n if (deficit[i] > 0) {\\n ChainPath storage cp = chainPaths[i];\\n // credits = credits + deficit + remaining allocation based on weight\\n uint256 amtToCredit = deficit[i].add(excessCredit.mul(cp.weight).div(totalWeight));\\n spent = spent.add(amtToCredit);\\n cp.credits = cp.credits.add(amtToCredit);\\n }\\n }\\n } else {\\n // totalDeficit <= deltaCredit but not running fullMode\\n // credit chainPaths as is if any deficit, not using all deltaCredit\\n for (uint256 i = 0; i < cpLength; ++i) {\\n if (deficit[i] > 0) {\\n ChainPath storage cp = chainPaths[i];\\n uint256 amtToCredit = deficit[i];\\n spent = spent.add(amtToCredit);\\n cp.credits = cp.credits.add(amtToCredit);\\n }\\n }\\n }\\n } else {\\n // totalDeficit > deltaCredit, fullMode or not, normalize the deficit by deltaCredit\\n for (uint256 i = 0; i < cpLength; ++i) {\\n if (deficit[i] > 0) {\\n ChainPath storage cp = chainPaths[i];\\n uint256 proportionalDeficit = deficit[i].mul(deltaCredit).div(totalDeficit);\\n spent = spent.add(proportionalDeficit);\\n cp.credits = cp.credits.add(proportionalDeficit);\\n }\\n }\\n }\\n\\n // deduct the amount of credit sent\\n deltaCredit = deltaCredit.sub(spent);\\n }\\n }\\n\\n function _mintLocal(\\n address _to,\\n uint256 _amountLD,\\n bool _feesEnabled,\\n bool _creditDelta\\n ) internal returns (uint256 amountSD) {\\n require(totalWeight > 0, \\\"Stargate: No ChainPaths exist\\\");\\n amountSD = amountLDtoSD(_amountLD);\\n\\n uint256 mintFeeSD = 0;\\n if (_feesEnabled) {\\n mintFeeSD = amountSD.mul(mintFeeBP).div(10000);\\n amountSD = amountSD.sub(mintFeeSD);\\n mintFeeBalance = mintFeeBalance.add(mintFeeSD);\\n }\\n\\n if (_creditDelta) {\\n deltaCredit = deltaCredit.add(amountSD);\\n }\\n\\n uint256 amountLPTokens = amountSD;\\n if (totalSupply != 0) {\\n amountLPTokens = amountSD.mul(totalSupply).div(totalLiquidity);\\n }\\n totalLiquidity = totalLiquidity.add(amountSD);\\n\\n _mint(_to, amountLPTokens);\\n emit Mint(_to, amountLPTokens, amountSD, mintFeeSD);\\n\\n // add to credits and call delta. short circuit to save gas\\n if (!batched || deltaCredit > totalLiquidity.mul(lpDeltaBP).div(10000)) {\\n _delta(defaultLPMode);\\n }\\n }\\n\\n function _safeTransfer(\\n address _token,\\n address _to,\\n uint256 _value\\n ) private {\\n (bool success, bytes memory data) = _token.call(abi.encodeWithSelector(SELECTOR, _to, _value));\\n require(success && (data.length == 0 || abi.decode(data, (bool))), \\\"Stargate: TRANSFER_FAILED\\\");\\n }\\n}\\n\",\"keccak256\":\"0x2ac96db1979c660fa66dd6edbd4a66ddb926f806a034795bb286ef6935640377\",\"license\":\"BUSL-1.1\"},\"contracts/Router.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.7.6;\\npragma abicoder v2;\\n\\n// imports\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\\\";\\nimport \\\"./Factory.sol\\\";\\nimport \\\"./Pool.sol\\\";\\nimport \\\"./Bridge.sol\\\";\\n\\n// interfaces\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./interfaces/IStargateRouter.sol\\\";\\nimport \\\"./interfaces/IStargateReceiver.sol\\\";\\n\\n// libraries\\nimport \\\"@openzeppelin/contracts/math/SafeMath.sol\\\";\\n\\ncontract Router is IStargateRouter, Ownable, ReentrancyGuard {\\n using SafeMath for uint256;\\n\\n //---------------------------------------------------------------------------\\n // CONSTANTS\\n uint8 public constant TYPE_REDEEM_LOCAL_RESPONSE = 1;\\n uint8 public constant TYPE_REDEEM_LOCAL_CALLBACK_RETRY = 2;\\n uint8 public constant TYPE_SWAP_REMOTE_RETRY = 3;\\n\\n //---------------------------------------------------------------------------\\n // STRUCTS\\n struct CachedSwap {\\n address token;\\n uint256 amountLD;\\n address to;\\n bytes payload;\\n }\\n struct lzTxObj {\\n uint256 dstGasForCall;\\n uint256 dstNativeAmount;\\n bytes dstNativeAddr;\\n }\\n\\n //---------------------------------------------------------------------------\\n // VARIABLES\\n Factory public factory; // used for creating pools\\n address public protocolFeeOwner; // can call methods to pull Stargate fees collected in pools\\n address public mintFeeOwner; // can call methods to pull mint fees collected in pools\\n Bridge public bridge;\\n mapping(uint16 => mapping(bytes => mapping(uint256 => bytes))) public revertLookup; //[chainId][srcAddress][nonce]\\n mapping(uint16 => mapping(bytes => mapping(uint256 => CachedSwap))) public cachedSwapLookup; //[chainId][srcAddress][nonce]\\n\\n //---------------------------------------------------------------------------\\n // EVENTS\\n event Revert(uint8 bridgeFunctionType, uint16 chainId, bytes srcAddress, uint256 nonce);\\n event ReceiveFailed(uint16 chainId, bytes srcAddress, uint256 nonce, address token, uint256 amountLD, bytes payload, string reason);\\n event CachedSwapSaved(uint16 chainId, bytes srcAddress, uint256 nonce, address token, uint256 amountLD, address to, bytes payload);\\n\\n //---------------------------------------------------------------------------\\n // MODIFIERS\\n modifier onlyBridge() {\\n require(msg.sender == address(bridge), \\\"Bridge: caller must be Bridge.\\\");\\n _;\\n }\\n\\n constructor() {}\\n\\n function setBridgeAndFactory(Bridge _bridge, Factory _factory) external onlyOwner {\\n require(address(bridge) == address(0x0), \\\"bridge already initialized\\\"); // 1 time only\\n require(address(factory) == address(0x0), \\\"factory already initialized\\\"); // 1 time only\\n\\n bridge = _bridge;\\n factory = _factory;\\n }\\n\\n //---------------------------------------------------------------------------\\n // VIEWS\\n\\n function _getPool(uint256 _poolId) internal view returns (Pool pool) {\\n pool = factory.getPool(_poolId);\\n require(address(pool) != address(0x0), \\\"Stargate: Pool does not exist\\\");\\n }\\n\\n //---------------------------------------------------------------------------\\n // INTERNAL\\n\\n function _safeTransferFrom(\\n address token,\\n address from,\\n address to,\\n uint256 value\\n ) private {\\n // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));\\n (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));\\n require(success && (data.length == 0 || abi.decode(data, (bool))), \\\"Stargate: TRANSFER_FROM_FAILED\\\");\\n }\\n\\n //---------------------------------------------------------------------------\\n // LOCAL CHAIN FUNCTIONS\\n\\n function addLiquidity(\\n uint256 _poolId,\\n uint256 _amountLD,\\n address _to\\n ) external override {\\n Pool pool = _getPool(_poolId);\\n _safeTransferFrom(pool.token(), msg.sender, address(pool), _amountLD);\\n pool.mint(_to, _amountLD);\\n }\\n\\n function swap(\\n uint16 _dstChainId,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address payable _refundAddress,\\n uint256 _amountLD,\\n uint256 _minAmountLD,\\n lzTxObj memory _lzTxParams,\\n bytes calldata _to,\\n bytes calldata _payload\\n ) external payable override {\\n Pool.SwapObj memory s;\\n Pool.CreditObj memory c;\\n {\\n Pool pool = _getPool(_srcPoolId);\\n _safeTransferFrom(pool.token(), msg.sender, address(pool), _amountLD);\\n s = pool.swap(_dstChainId, _dstPoolId, msg.sender, _amountLD, _minAmountLD, true);\\n c = pool.sendCredits(_dstChainId, _dstPoolId);\\n }\\n bridge.swap{value: msg.value}(_dstChainId, _srcPoolId, _dstPoolId, _refundAddress, c, s, _lzTxParams, _to, _payload);\\n }\\n\\n function redeemRemote(\\n uint16 _dstChainId,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address payable _refundAddress,\\n uint256 _amountLP,\\n uint256 _minAmountLD,\\n bytes calldata _to,\\n lzTxObj memory _lzTxParams\\n ) external payable override {\\n Pool.SwapObj memory s;\\n Pool.CreditObj memory c;\\n\\n {\\n Pool pool = _getPool(_srcPoolId);\\n uint256 amountLD = pool.redeemRemote(_dstChainId, _dstPoolId, msg.sender, _amountLP);\\n // perform a swap with no liquidity\\n s = pool.swap(_dstChainId, _dstPoolId, msg.sender, amountLD, _minAmountLD, false);\\n c = pool.sendCredits(_dstChainId, _dstPoolId);\\n }\\n // equal to a swap, with no payload (\\\"0x\\\") no dstGasForCall 0\\n bridge.swap{value: msg.value}(_dstChainId, _srcPoolId, _dstPoolId, _refundAddress, c, s, _lzTxParams, _to, \\\"\\\");\\n }\\n\\n function redeemLocal(\\n uint16 _dstChainId,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address payable _refundAddress,\\n uint256 _amountLP,\\n bytes calldata _to,\\n lzTxObj memory _lzTxParams\\n ) external payable override {\\n Pool pool = _getPool(_srcPoolId);\\n\\n address toAddress;\\n {\\n bytes memory to_mem = _to;\\n assembly {\\n toAddress := mload(add(to_mem, 20))\\n }\\n }\\n\\n uint256 amountSD = pool.redeemLocal(msg.sender, _amountLP, _dstChainId, _dstPoolId, toAddress);\\n Pool.CreditObj memory c = pool.sendCredits(_dstChainId, _dstPoolId);\\n if (amountSD == 0) {\\n // full instant withdrawal at local, just send credit\\n bridge.sendCredits{value: msg.value}(_dstChainId, _srcPoolId, _dstPoolId, _refundAddress, c);\\n } else {\\n bridge.redeemLocal{value: msg.value}(_dstChainId, _srcPoolId, _dstPoolId, _refundAddress, c, amountSD, _to, _lzTxParams);\\n }\\n }\\n\\n function sendCredits(\\n uint16 _dstChainId,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address payable _refundAddress\\n ) external payable override {\\n require(_refundAddress != address(0x0), \\\"Stargate: _refundAddress cannot be 0x0\\\");\\n Pool pool = _getPool(_srcPoolId);\\n Pool.CreditObj memory c = pool.sendCredits(_dstChainId, _dstPoolId);\\n bridge.sendCredits{value: msg.value}(_dstChainId, _srcPoolId, _dstPoolId, _refundAddress, c);\\n }\\n\\n function quoteLayerZeroFee(\\n uint16 _dstChainId,\\n uint8 _functionType,\\n bytes calldata _toAddress,\\n bytes calldata _transferAndCallPayload,\\n Router.lzTxObj memory _lzTxParams\\n ) external view override returns (uint256) {\\n return bridge.quoteLayerZeroFee(_dstChainId, _functionType, _toAddress, _transferAndCallPayload, _lzTxParams);\\n }\\n\\n function revertRedeemLocal(\\n uint16 _dstChainId,\\n bytes calldata _srcAddress,\\n uint256 _nonce,\\n address payable _refundAddress,\\n lzTxObj memory _lzTxParams\\n ) external payable {\\n bytes memory payload = revertLookup[_dstChainId][_srcAddress][_nonce];\\n require(payload.length > 0, \\\"Stargate: no retry revert\\\");\\n {\\n uint8 functionType;\\n assembly {\\n functionType := mload(add(payload, 32))\\n }\\n require(functionType == TYPE_REDEEM_LOCAL_RESPONSE, \\\"Stargate: invalid function type\\\");\\n }\\n\\n // empty it\\n revertLookup[_dstChainId][_srcAddress][_nonce] = \\\"\\\";\\n\\n uint256 srcPoolId;\\n uint256 dstPoolId;\\n assembly {\\n srcPoolId := mload(add(payload, 64))\\n dstPoolId := mload(add(payload, 96))\\n }\\n\\n Pool.CreditObj memory c;\\n {\\n Pool pool = _getPool(dstPoolId);\\n c = pool.sendCredits(_dstChainId, srcPoolId);\\n }\\n\\n bridge.redeemLocalCallback{value: msg.value}(_dstChainId, _refundAddress, c, _lzTxParams, payload);\\n }\\n\\n function retryRevert(\\n uint16 _dstChainId,\\n bytes calldata _srcAddress,\\n uint256 _nonce\\n ) external payable {\\n bytes memory payload = revertLookup[_dstChainId][_srcAddress][_nonce];\\n require(payload.length > 0, \\\"Stargate: no retry revert\\\");\\n\\n // empty it\\n revertLookup[_dstChainId][_srcAddress][_nonce] = \\\"\\\";\\n\\n uint8 functionType;\\n assembly {\\n functionType := mload(add(payload, 32))\\n }\\n\\n if (functionType == TYPE_REDEEM_LOCAL_CALLBACK_RETRY) {\\n (, uint256 srcPoolId, uint256 dstPoolId, address to, uint256 amountSD, uint256 mintAmountSD) = abi.decode(\\n payload,\\n (uint8, uint256, uint256, address, uint256, uint256)\\n );\\n _redeemLocalCallback(_dstChainId, _srcAddress, _nonce, srcPoolId, dstPoolId, to, amountSD, mintAmountSD);\\n }\\n // for retrying the swapRemote. if it fails again, retry\\n else if (functionType == TYPE_SWAP_REMOTE_RETRY) {\\n (, uint256 srcPoolId, uint256 dstPoolId, uint256 dstGasForCall, address to, Pool.SwapObj memory s, bytes memory p) = abi.decode(\\n payload,\\n (uint8, uint256, uint256, uint256, address, Pool.SwapObj, bytes)\\n );\\n _swapRemote(_dstChainId, _srcAddress, _nonce, srcPoolId, dstPoolId, dstGasForCall, to, s, p);\\n }\\n }\\n\\n function clearCachedSwap(\\n uint16 _dstChainId,\\n bytes calldata _srcAddress,\\n uint256 _nonce\\n ) external {\\n CachedSwap memory cs = cachedSwapLookup[_dstChainId][_srcAddress][_nonce];\\n require(cs.to != address(0x0), \\\"Stargate: cache already cleared\\\");\\n IStargateReceiver(cs.to).sgReceive(_dstChainId, _srcAddress, _nonce, cs.token, cs.amountLD, cs.payload);\\n\\n // clear the data\\n cachedSwapLookup[_dstChainId][_srcAddress][_nonce] = CachedSwap(address(0x0), 0, address(0x0), \\\"\\\");\\n }\\n\\n function creditChainPath(\\n uint16 _dstChainId,\\n uint256 _dstPoolId,\\n uint256 _srcPoolId,\\n Pool.CreditObj memory _c\\n ) external onlyBridge {\\n Pool pool = _getPool(_srcPoolId);\\n pool.creditChainPath(_dstChainId, _dstPoolId, _c);\\n }\\n\\n //---------------------------------------------------------------------------\\n // REMOTE CHAIN FUNCTIONS\\n\\n function redeemLocalCheckOnRemote(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint256 _nonce,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n uint256 _amountSD,\\n bytes calldata _to\\n ) external onlyBridge {\\n Pool pool = _getPool(_dstPoolId);\\n try pool.redeemLocalCheckOnRemote(_srcChainId, _srcPoolId, _amountSD) returns (uint256 swapAmountSD, uint256 mintAmountSD) {\\n revertLookup[_srcChainId][_srcAddress][_nonce] = abi.encode(\\n TYPE_REDEEM_LOCAL_RESPONSE,\\n _srcPoolId,\\n _dstPoolId,\\n swapAmountSD,\\n mintAmountSD,\\n _to\\n );\\n emit Revert(TYPE_REDEEM_LOCAL_RESPONSE, _srcChainId, _srcAddress, _nonce);\\n } catch {\\n // if the func fail, return [swapAmount: 0, mintAMount: _amountSD]\\n revertLookup[_srcChainId][_srcAddress][_nonce] = abi.encode(TYPE_REDEEM_LOCAL_RESPONSE, _srcPoolId, _dstPoolId, 0, _amountSD, _to);\\n emit Revert(TYPE_REDEEM_LOCAL_RESPONSE, _srcChainId, _srcAddress, _nonce);\\n }\\n }\\n\\n function redeemLocalCallback(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint256 _nonce,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address _to,\\n uint256 _amountSD,\\n uint256 _mintAmountSD\\n ) external onlyBridge {\\n _redeemLocalCallback(_srcChainId, _srcAddress, _nonce, _srcPoolId, _dstPoolId, _to, _amountSD, _mintAmountSD);\\n }\\n\\n function _redeemLocalCallback(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint256 _nonce,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address _to,\\n uint256 _amountSD,\\n uint256 _mintAmountSD\\n ) internal {\\n Pool pool = _getPool(_dstPoolId);\\n try pool.redeemLocalCallback(_srcChainId, _srcPoolId, _to, _amountSD, _mintAmountSD) {} catch {\\n revertLookup[_srcChainId][_srcAddress][_nonce] = abi.encode(\\n TYPE_REDEEM_LOCAL_CALLBACK_RETRY,\\n _srcPoolId,\\n _dstPoolId,\\n _to,\\n _amountSD,\\n _mintAmountSD\\n );\\n emit Revert(TYPE_REDEEM_LOCAL_CALLBACK_RETRY, _srcChainId, _srcAddress, _nonce);\\n }\\n }\\n\\n function swapRemote(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint256 _nonce,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n uint256 _dstGasForCall,\\n address _to,\\n Pool.SwapObj memory _s,\\n bytes memory _payload\\n ) external onlyBridge {\\n _swapRemote(_srcChainId, _srcAddress, _nonce, _srcPoolId, _dstPoolId, _dstGasForCall, _to, _s, _payload);\\n }\\n\\n function _swapRemote(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint256 _nonce,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n uint256 _dstGasForCall,\\n address _to,\\n Pool.SwapObj memory _s,\\n bytes memory _payload\\n ) internal {\\n Pool pool = _getPool(_dstPoolId);\\n try pool.swapRemote(_srcChainId, _srcPoolId, _to, _s) returns (uint256 amountLD) {\\n if (_payload.length > 0) {\\n try\\n IStargateReceiver(_to).sgReceive{gas: _dstGasForCall}(_srcChainId, _srcAddress, _nonce, pool.token(), amountLD, _payload)\\n {} catch Error(string memory reason) {\\n // string memory reason is useful to put in the event to see why it failed\\n emit ReceiveFailed(_srcChainId, _srcAddress, _nonce, pool.token(), amountLD, _payload, reason);\\n } catch (\\n bytes memory /*returnData*/ // The call likely ran out of gas\\n ) {\\n cachedSwapLookup[_srcChainId][_srcAddress][_nonce] = CachedSwap(pool.token(), amountLD, _to, _payload);\\n emit CachedSwapSaved(_srcChainId, _srcAddress, _nonce, pool.token(), amountLD, _to, _payload);\\n }\\n }\\n } catch {\\n revertLookup[_srcChainId][_srcAddress][_nonce] = abi.encode(\\n TYPE_SWAP_REMOTE_RETRY,\\n _srcPoolId,\\n _dstPoolId,\\n _dstGasForCall,\\n _to,\\n _s,\\n _payload\\n );\\n emit Revert(TYPE_SWAP_REMOTE_RETRY, _srcChainId, _srcAddress, _nonce);\\n }\\n }\\n\\n //---------------------------------------------------------------------------\\n // DAO Calls\\n\\n function createPool(\\n uint256 _poolId,\\n address _token,\\n uint8 _sharedDecimals,\\n uint8 _localDecimals,\\n string memory _name,\\n string memory _symbol\\n ) external onlyOwner returns (address) {\\n require(_token != address(0x0), \\\"Stargate: _token cannot be 0x0\\\");\\n return factory.createPool(_poolId, _token, _sharedDecimals, _localDecimals, _name, _symbol);\\n }\\n\\n function createChainPath(\\n uint256 _poolId,\\n uint16 _dstChainId,\\n uint256 _dstPoolId,\\n uint256 _weight\\n ) external onlyOwner {\\n Pool pool = _getPool(_poolId);\\n pool.createChainPath(_dstChainId, _dstPoolId, _weight);\\n }\\n\\n function activateChainPath(\\n uint256 _poolId,\\n uint16 _dstChainId,\\n uint256 _dstPoolId\\n ) external onlyOwner {\\n Pool pool = _getPool(_poolId);\\n pool.activateChainPath(_dstChainId, _dstPoolId);\\n }\\n\\n function setWeightForChainPath(\\n uint256 _poolId,\\n uint16 _dstChainId,\\n uint256 _dstPoolId,\\n uint16 _weight\\n ) external onlyOwner {\\n Pool pool = _getPool(_poolId);\\n pool.setWeightForChainPath(_dstChainId, _dstPoolId, _weight);\\n }\\n\\n function setProtocolFeeOwner(address _owner) external onlyOwner {\\n require(_owner != address(0x0), \\\"Stargate: _owner cannot be 0x0\\\");\\n protocolFeeOwner = _owner;\\n }\\n\\n function setMintFeeOwner(address _owner) external onlyOwner {\\n require(_owner != address(0x0), \\\"Stargate: _owner cannot be 0x0\\\");\\n mintFeeOwner = _owner;\\n }\\n\\n function setFees(uint256 _poolId, uint256 _mintFeeBP) external onlyOwner {\\n Pool pool = _getPool(_poolId);\\n pool.setFee(_mintFeeBP);\\n }\\n\\n function setFeeLibrary(uint256 _poolId, address _feeLibraryAddr) external onlyOwner {\\n Pool pool = _getPool(_poolId);\\n pool.setFeeLibrary(_feeLibraryAddr);\\n }\\n\\n function setSwapStop(uint256 _poolId, bool _swapStop) external onlyOwner {\\n Pool pool = _getPool(_poolId);\\n pool.setSwapStop(_swapStop);\\n }\\n\\n function setDeltaParam(\\n uint256 _poolId,\\n bool _batched,\\n uint256 _swapDeltaBP,\\n uint256 _lpDeltaBP,\\n bool _defaultSwapMode,\\n bool _defaultLPMode\\n ) external onlyOwner {\\n Pool pool = _getPool(_poolId);\\n pool.setDeltaParam(_batched, _swapDeltaBP, _lpDeltaBP, _defaultSwapMode, _defaultLPMode);\\n }\\n\\n function callDelta(uint256 _poolId, bool _fullMode) external {\\n Pool pool = _getPool(_poolId);\\n pool.callDelta(_fullMode);\\n }\\n\\n //---------------------------------------------------------------------------\\n\\n function withdrawMintFee(uint256 _poolId, address _to) external {\\n require(mintFeeOwner == msg.sender, \\\"Stargate: only mintFeeOwner\\\");\\n Pool pool = _getPool(_poolId);\\n pool.withdrawMintFeeBalance(_to);\\n }\\n\\n //---------------------------------------------------------------------------\\n\\n function withdrawProtocolFee(uint256 _poolId, address _to) external {\\n require(protocolFeeOwner == msg.sender, \\\"Stargate: only protocolFeeOwner\\\");\\n Pool pool = _getPool(_poolId);\\n pool.withdrawProtocolFeeBalance(_to);\\n }\\n}\\n\",\"keccak256\":\"0x70ee339d2baed1ff98a587868b55cd514cd8b4e63228856b40876b4611e0593c\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ILayerZeroEndpoint.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.7.6;\\n\\nimport \\\"./ILayerZeroUserApplicationConfig.sol\\\";\\n\\ninterface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig {\\n function send(\\n uint16 _chainId,\\n bytes calldata _destination,\\n bytes calldata _payload,\\n address payable refundAddress,\\n address _zroPaymentAddress,\\n bytes calldata txParameters\\n ) external payable;\\n\\n function estimateNativeFees(\\n uint16 chainId,\\n address userApplication,\\n bytes calldata payload,\\n bool payInZRO,\\n bytes calldata txParameters\\n ) external view returns (uint256 totalFee);\\n\\n function getEndpointId() external view returns (uint16);\\n}\\n\",\"keccak256\":\"0xddf0a3786cad752f5a457d2159b3dd8b2df4624bed51162b17347416e86631fc\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ILayerZeroReceiver.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.7.6;\\n\\ninterface ILayerZeroReceiver {\\n function lzReceive(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n uint64 nonce,\\n bytes calldata _payload\\n ) external;\\n}\\n\",\"keccak256\":\"0xbac3dd762e9b9374583d25f533b428667296823d6f773a31474f2fb81fc051ea\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ILayerZeroUserApplicationConfig.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.7.6;\\n\\ninterface ILayerZeroUserApplicationConfig {\\n /* setters */\\n\\n function setOracle(uint16 _chainId, address payable _oracle) external;\\n\\n function setRelayer(uint16 _chainId, address payable _relayer) external;\\n\\n function setBlockConfirmations(uint16 _chainId, uint256 _blockConfirmations) external;\\n\\n function setLibraryVersion(uint16 _chainId, uint16 _libraryVersion) external;\\n\\n function setVersion(uint16 version) external;\\n\\n function getVersion() external returns (uint16);\\n\\n /* getters */\\n\\n function getOracle(uint16 _chainId, address userApplicationAddress) external view returns (address oracle);\\n\\n function getRelayer(uint16 _chainId, address userApplicationAddress) external view returns (address relayer);\\n\\n function getBlockConfirmations(uint16 _chainId, address userApplicationAddress) external view returns (uint256 blockConfirmations);\\n\\n function getLibraryVersion(uint16 _chainId, address userApplicationAddress) external view returns (uint16 libraryVersion);\\n}\\n\",\"keccak256\":\"0xe17dc97ad7c287fe4fe39ab4990f7f5d984b60b227f643745d62c849fc57e21f\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IStargateFeeLibrary.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.7.6;\\npragma abicoder v2;\\nimport \\\"../Pool.sol\\\";\\n\\ninterface IStargateFeeLibrary {\\n function getFees(\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n uint256 _dstChainId,\\n address _from,\\n uint256 _amountSD\\n ) external returns (Pool.SwapObj memory s);\\n}\\n\",\"keccak256\":\"0xe7f93133694f5047221966997010e2b09e567219d175f5c031cd32ed3d36cb8b\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IStargateReceiver.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.7.6;\\n\\ninterface IStargateReceiver {\\n function sgReceive(\\n uint16 _chainId,\\n bytes memory _srcAddress,\\n uint256 _nonce,\\n address _token,\\n uint256 amountLD,\\n bytes memory payload\\n ) external;\\n}\\n\",\"keccak256\":\"0x426e44d3907557a4cc3938894f5c42620d553603900c855ccd7cd417b3a75e79\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IStargateRouter.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.7.6;\\npragma abicoder v2;\\n\\nimport \\\"../Router.sol\\\";\\n\\ninterface IStargateRouter {\\n function addLiquidity(\\n uint256 _poolId,\\n uint256 _amountLD,\\n address _to\\n ) external;\\n\\n function swap(\\n uint16 _dstChainId,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address payable _refundAddress,\\n uint256 _amountLD,\\n uint256 _minAmountLD,\\n Router.lzTxObj memory _lzTxParams,\\n bytes calldata _to,\\n bytes calldata _payload\\n ) external payable;\\n\\n function redeemRemote(\\n uint16 _dstChainId,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address payable _refundAddress,\\n uint256 _amountLP,\\n uint256 _minAmountLD,\\n bytes calldata _to,\\n Router.lzTxObj memory _lzTxParams\\n ) external payable;\\n\\n function redeemLocal(\\n uint16 _dstChainId,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address payable _refundAddress,\\n uint256 _amountLP,\\n bytes calldata _to,\\n Router.lzTxObj memory _lzTxParams\\n ) external payable;\\n\\n function sendCredits(\\n uint16 _dstChainId,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address payable _refundAddress\\n ) external payable;\\n\\n function quoteLayerZeroFee(\\n uint16 _dstChainId,\\n uint8 _functionType,\\n bytes calldata _toAddress,\\n bytes calldata _transferAndCallPayload,\\n Router.lzTxObj memory _lzTxParams\\n ) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x62fdddaabba0265ed5c9d5672fc7524b6c97502135b94d8d883a92d72b1d8fe0\",\"license\":\"BUSL-1.1\"}},\"version\":1}", "bytecode": "0x60806040523480156200001157600080fd5b5060006200001e62000072565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001805562000076565b3390565b614b6680620000866000396000f3fe6080604052600436106102305760003560e01c80637f7212981161012e578063af640d82116100ab578063cefbdde21161006f578063cefbdde214610611578063da133a0614610631578063e78cea921461065e578063f2fde38b14610673578063fba6e2801461069357610230565b8063af640d8214610587578063c45a01551461059c578063c6a27624146105b1578063c7d968e3146105d1578063c8adf12d146105f157610230565b806398e391a1116100f257806398e391a11461050c5780639ba3aa741461052c5780639fbf10fc1461053f578063a18fa80414610552578063a96fbed41461057257610230565b80637f7212981461049157806384d0dba3146104b157806387b21efc146104c45780638da5cb5b146104e45780638f2e1d18146104f957610230565b806334aba410116101bc5780635500585c116101805780635500585c146103fc57806360a3b95c1461041c578063715018a61461042f5780637af935a1146104445780637b84d2871461047157610230565b806334aba41014610367578063403a9f7a14610387578063424c9119146103a757806343a30630146103c757806351a82035146103e757610230565b806316fb60f51161020357806316fb60f5146102cf57806320ddb8f5146102ef57806323fd4647146103045780632905dd11146103345780632f9255551461034757610230565b80630403bce5146102355780630a512369146102575780630b78f9c01461028d57806314c76351146102ad575b600080fd5b34801561024157600080fd5b50610255610250366004613628565b6106b3565b005b34801561026357600080fd5b506102776102723660046139ac565b6108df565b60405161028491906147ea565b60405180910390f35b34801561029957600080fd5b506102556102a8366004613c6a565b610978565b3480156102b957600080fd5b506102c2610a4b565b6040516102849190614840565b3480156102db57600080fd5b506102556102ea366004613c30565b610a50565b3480156102fb57600080fd5b506102c2610b1e565b34801561031057600080fd5b5061032461031f366004613425565b610b23565b6040516102849493929190613f92565b610255610342366004613392565b610c02565b34801561035357600080fd5b50610255610362366004613507565b610e8d565b34801561037357600080fd5b50610255610382366004613246565b610ec8565b34801561039357600080fd5b506102556103a236600461333b565b610f72565b3480156103b357600080fd5b506102556103c23660046132a1565b6111df565b3480156103d357600080fd5b506102556103e2366004613b51565b6112c1565b3480156103f357600080fd5b506102c26113a0565b34801561040857600080fd5b50610255610417366004613a76565b6113a5565b61025561042a36600461333b565b611409565b34801561043b57600080fd5b5061025561166a565b34801561045057600080fd5b5061046461045f366004613a9a565b611716565b6040516102849190613f0d565b34801561047d57600080fd5b5061025561048c366004613beb565b611839565b34801561049d57600080fd5b506102556104ac366004613479565b6118d9565b6102556104bf3660046137b1565b611913565b3480156104d057600080fd5b506102556104df366004613cae565b611b57565b3480156104f057600080fd5b50610464611c67565b61025561050736600461370c565b611c77565b34801561051857600080fd5b50610255610527366004613b2d565b611efb565b61025561053a3660046136c5565b611f97565b61025561054d366004613850565b61209f565b34801561055e57600080fd5b5061025561056d366004613930565b6122dc565b34801561057e57600080fd5b50610464612344565b34801561059357600080fd5b50610464612353565b3480156105a857600080fd5b50610464612362565b3480156105bd57600080fd5b506102556105cc366004613a76565b612371565b3480156105dd57600080fd5b506102556105ec366004613bb7565b61240d565b3480156105fd57600080fd5b5061025561060c366004613a76565b6124d9565b34801561061d57600080fd5b5061025561062c366004613246565b61253d565b34801561063d57600080fd5b5061065161064c366004613425565b6125e7565b6040516102849190613ff9565b34801561066a57600080fd5b506104646126a4565b34801561067f57600080fd5b5061025561068e366004613246565b6126b3565b34801561069f57600080fd5b506102556106ae366004613b2d565b6127b5565b6005546001600160a01b031633146106e65760405162461bcd60e51b81526004016106dd90614043565b60405180910390fd5b60006106f1856127ef565b604051637544f15560e11b81529091506001600160a01b0382169063ea89e2aa90610724908c908a9089906004016145b7565b6040805180830381600087803b15801561073d57600080fd5b505af192505050801561076d575060408051601f3d908101601f1916820190925261076a91810190613c8b565b60015b6108245760018686600087878760405160200161079097969594939291906148bb565b60408051601f1981840301815282825261ffff8c16600090815260066020529190912090916107c0908b90613ef1565b9081526020016040518091039020600089815260200190815260200160002090805190602001906107f2929190612fbe565b50600080516020614af183398151915260018a8a8a604051610817949392919061484e565b60405180910390a16108d4565b60018888848489896040516020016108429796959493929190614942565b60408051601f1981840301815282825261ffff8e1660009081526006602052919091209091610872908d90613ef1565b908152602001604051809103902060008b815260200190815260200160002090805190602001906108a4929190612fbe565b50600080516020614af183398151915260018c8c8c6040516108c9949392919061484e565b60405180910390a150505b505050505050505050565b600554604051630a51236960e01b81526000916001600160a01b031690630a5123699061091c908b908b908b908b908b908b908b9060040161479c565b60206040518083038186803b15801561093457600080fd5b505afa158015610948573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096c9190613a5e565b98975050505050505050565b61098061289d565b6001600160a01b0316610991611c67565b6001600160a01b0316146109da576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b60006109e5836127ef565b6040516369fe0e2d60e01b81529091506001600160a01b038216906369fe0e2d90610a149085906004016147ea565b600060405180830381600087803b158015610a2e57600080fd5b505af1158015610a42573d6000803e3d6000fd5b50505050505050565b600281565b610a5861289d565b6001600160a01b0316610a69611c67565b6001600160a01b031614610ab2576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b6000610abd856127ef565b6040516320d6bc7560e01b81529091506001600160a01b038216906320d6bc7590610af0908790879087906004016145b7565b600060405180830381600087803b158015610b0a57600080fd5b505af11580156108d4573d6000803e3d6000fd5b600181565b600760209081526000938452604080852084518086018401805192815290840195840195909520945292815290835291819020805460018083015460028085015460038601805488516101009682161596909602600019011692909204601f81018990048902850189019097528684526001600160a01b03948516979296941694939091830182828015610bf85780601f10610bcd57610100808354040283529160200191610bf8565b820191906000526020600020905b815481529060010190602001808311610bdb57829003601f168201915b5050505050905084565b61ffff86166000908152600660205260408082209051610c259088908890613ee1565b90815260408051602092819003830181206000888152908452829020805460026001821615610100026000190190911604601f81018590048502830185019093528282529092909190830182828015610cbf5780601f10610c9457610100808354040283529160200191610cbf565b820191906000526020600020905b815481529060010190602001808311610ca257829003601f168201915b505050505090506000815111610ce75760405162461bcd60e51b81526004016106dd906140b1565b602081015160ff8116600114610d0f5760405162461bcd60e51b81526004016106dd90614232565b506040805160208082018352600080835261ffff8b16815260069091528290209151909190610d419089908990613ee1565b908152602001604051809103902060008681526020019081526020016000209080519060200190610d73929190612fbe565b5060408101516060820151610d8661304a565b6000610d91836127ef565b604051630474ec6160e11b81529091506001600160a01b038216906308e9d8c290610dc2908e908890600401614499565b6040805180830381600087803b158015610ddb57600080fd5b505af1158015610def573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e1391906132d9565b6005546040516396aae4af60e01b81529193506001600160a01b031691506396aae4af903490610e4f908e908b9087908c908c906004016142e6565b6000604051808303818588803b158015610e6857600080fd5b505af1158015610e7c573d6000803e3d6000fd5b505050505050505050505050505050565b6005546001600160a01b03163314610eb75760405162461bcd60e51b81526004016106dd90614043565b6108d48989898989898989896128a1565b610ed061289d565b6001600160a01b0316610ee1611c67565b6001600160a01b031614610f2a576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b6001600160a01b038116610f505760405162461bcd60e51b81526004016106dd906141c4565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b61ffff84166000908152600760205260408082209051610f959086908690613ee1565b9081526040805160209281900383018120600086815290845282902060808201835280546001600160a01b039081168352600180830154868501526002808401549092168486015260038301805486516101009382161593909302600019011692909204601f8101879004870282018701909552848152929491936060860193928301828280156110675780601f1061103c57610100808354040283529160200191611067565b820191906000526020600020905b81548152906001019060200180831161104a57829003601f168201915b5050509190925250505060408101519091506001600160a01b031661109e5760405162461bcd60e51b81526004016106dd906141fb565b604080820151825160208401516060850151935163ab8236f360e01b81526001600160a01b039093169363ab8236f3936110e5938b938b938b938b93929190600401614331565b600060405180830381600087803b1580156110ff57600080fd5b505af1158015611113573d6000803e3d6000fd5b5050604080516080810182526000808252602080830182905282840182905283518082018552828152606084015261ffff8b1682526007905282902091519093509091506111649087908790613ee1565b90815260408051602092819003830190206000868152908352819020835181546001600160a01b03199081166001600160a01b03928316178355858501516001840155928501516002830180549094169116179091556060830151805191926111d592600385019290910190612fbe565b5050505050505050565b6111e761289d565b6001600160a01b03166111f8611c67565b6001600160a01b031614611241576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b6005546001600160a01b03161561126a5760405162461bcd60e51b81526004016106dd90614156565b6002546001600160a01b0316156112935760405162461bcd60e51b81526004016106dd9061418d565b600580546001600160a01b039384166001600160a01b03199182161790915560028054929093169116179055565b6112c961289d565b6001600160a01b03166112da611c67565b6001600160a01b031614611323576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b600061132e876127ef565b60405163e065608b60e01b81529091506001600160a01b0382169063e065608b906113659089908990899089908990600401613fd0565b600060405180830381600087803b15801561137f57600080fd5b505af1158015611393573d6000803e3d6000fd5b5050505050505050505050565b600381565b6004546001600160a01b031633146113cf5760405162461bcd60e51b81526004016106dd9061407a565b60006113da836127ef565b60405163011dbbf960e61b81529091506001600160a01b0382169063476efe4090610a14908590600401613f0d565b61ffff8416600090815260066020526040808220905161142c9086908690613ee1565b90815260408051602092819003830181206000868152908452829020805460026001821615610100026000190190911604601f810185900485028301850190935282825290929091908301828280156114c65780601f1061149b576101008083540402835291602001916114c6565b820191906000526020600020905b8154815290600101906020018083116114a957829003601f168201915b5050505050905060008151116114ee5760405162461bcd60e51b81526004016106dd906140b1565b6040805160208082018352600080835261ffff891681526006909152829020915190919061151f9087908790613ee1565b908152602001604051809103902060008481526020019081526020016000209080519060200190611551929190612fbe565b50602081015160ff8116600214156115dc5760008060008060008680602001905181019061157f9190613ce6565b95509550955095509550506115d28b8b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508d92508a9150899050888888612dc2565b5050505050611662565b60ff81166003141561166257600080600080600080878060200190518101906116059190613d45565b9650965096509650965096505061165b8c8c8c8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508e92508b91508a9050898989896128a1565b5050505050505b505050505050565b61167261289d565b6001600160a01b0316611683611c67565b6001600160a01b0316146116cc576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600061172061289d565b6001600160a01b0316611731611c67565b6001600160a01b03161461177a576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b6001600160a01b0386166117a05760405162461bcd60e51b81526004016106dd9061400c565b600254604051637af935a160e01b81526001600160a01b0390911690637af935a1906117da908a908a908a908a908a908a906004016147f3565b602060405180830381600087803b1580156117f457600080fd5b505af1158015611808573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061182c9190613269565b90505b9695505050505050565b61184161289d565b6001600160a01b0316611852611c67565b6001600160a01b03161461189b576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b60006118a6856127ef565b60405163a985565f60e01b81529091506001600160a01b0382169063a985565f90610af090879087908790600401614599565b6005546001600160a01b031633146119035760405162461bcd60e51b81526004016106dd90614043565b6111d58888888888888888612dc2565b61191b613064565b61192361304a565b600061192e8b6127ef565b90506000816001600160a01b0316637298a5dc8e8d338d6040518563ffffffff1660e01b815260040161196494939291906144ad565b602060405180830381600087803b15801561197e57600080fd5b505af1158015611992573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119b69190613a5e565b9050816001600160a01b0316631b7319b68e8d33858d60006040518763ffffffff1660e01b81526004016119ef969594939291906144d7565b60c060405180830381600087803b158015611a0957600080fd5b505af1158015611a1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a419190613320565b9350816001600160a01b03166308e9d8c28e8d6040518363ffffffff1660e01b8152600401611a71929190614499565b6040805180830381600087803b158015611a8a57600080fd5b505af1158015611a9e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ac291906132d9565b92505050600560009054906101000a90046001600160a01b03166001600160a01b03166351156e73348d8d8d8d87898b8e8e6040518b63ffffffff1660e01b8152600401611b189998979695949392919061469c565b6000604051808303818588803b158015611b3157600080fd5b505af1158015611b45573d6000803e3d6000fd5b50505050505050505050505050505050565b6000611b62846127ef565b9050611be0816001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015611ba057600080fd5b505afa158015611bb4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bd89190613269565b338386612ed6565b6040516340c10f1960e01b81526001600160a01b038216906340c10f1990611c0e9085908790600401613f79565b602060405180830381600087803b158015611c2857600080fd5b505af1158015611c3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c609190613a5e565b5050505050565b6000546001600160a01b03165b90565b6000611c82886127ef565b905060008085858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050905060148101519150506000826001600160a01b0316631d43108b33898e8d876040518663ffffffff1660e01b8152600401611d0c959493929190613f21565b602060405180830381600087803b158015611d2657600080fd5b505af1158015611d3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d5e9190613a5e565b90506000836001600160a01b03166308e9d8c28d8c6040518363ffffffff1660e01b8152600401611d90929190614499565b6040805180830381600087803b158015611da957600080fd5b505af1158015611dbd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611de191906132d9565b905081611e6957600560009054906101000a90046001600160a01b03166001600160a01b031663be9d40ac348e8e8e8e876040518763ffffffff1660e01b8152600401611e329594939291906145d3565b6000604051808303818588803b158015611e4b57600080fd5b505af1158015611e5f573d6000803e3d6000fd5b505050505061165b565b600560009054906101000a90046001600160a01b03166001600160a01b0316633cef94b9348e8e8e8e87898f8f8f6040518b63ffffffff1660e01b8152600401611ebb99989796959493929190614728565b6000604051808303818588803b158015611ed457600080fd5b505af1158015611ee8573d6000803e3d6000fd5b5050505050505050505050505050505050565b611f0361289d565b6001600160a01b0316611f14611c67565b6001600160a01b031614611f5d576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b6000611f68836127ef565b60405163ac2cc36b60e01b81529091506001600160a01b0382169063ac2cc36b90610a14908590600401613fc5565b6001600160a01b038116611fbd5760405162461bcd60e51b81526004016106dd906142a0565b6000611fc8846127ef565b90506000816001600160a01b03166308e9d8c287866040518363ffffffff1660e01b8152600401611ffa929190614499565b6040805180830381600087803b15801561201357600080fd5b505af1158015612027573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061204b91906132d9565b600554604051632fa7502b60e21b81529192506001600160a01b03169063be9d40ac903490612086908a908a908a908a9089906004016145d3565b6000604051808303818588803b15801561137f57600080fd5b6120a7613064565b6120af61304a565b60006120ba8d6127ef565b9050612138816001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156120f857600080fd5b505afa15801561210c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121309190613269565b33838d612ed6565b806001600160a01b0316631b7319b68f8e338e8e60016040518763ffffffff1660e01b815260040161216f969594939291906144d7565b60c060405180830381600087803b15801561218957600080fd5b505af115801561219d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121c19190613320565b9250806001600160a01b03166308e9d8c28f8e6040518363ffffffff1660e01b81526004016121f1929190614499565b6040805180830381600087803b15801561220a57600080fd5b505af115801561221e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061224291906132d9565b915050600560009054906101000a90046001600160a01b03166001600160a01b03166351156e73348f8f8f8f87898f8f8f8f8f6040518d63ffffffff1660e01b815260040161229b9b9a99989796959493929190614608565b6000604051808303818588803b1580156122b457600080fd5b505af11580156122c8573d6000803e3d6000fd5b505050505050505050505050505050505050565b6005546001600160a01b031633146123065760405162461bcd60e51b81526004016106dd90614043565b6000612311836127ef565b60405163b6addec760e01b81529091506001600160a01b0382169063b6addec790610af09088908890879060040161457a565b6003546001600160a01b031681565b6004546001600160a01b031681565b6002546001600160a01b031681565b61237961289d565b6001600160a01b031661238a611c67565b6001600160a01b0316146123d3576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b60006123de836127ef565b6040516312d72b2f60e21b81529091506001600160a01b03821690634b5cacbc90610a14908590600401613f0d565b61241561289d565b6001600160a01b0316612426611c67565b6001600160a01b03161461246f576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b600061247a846127ef565b6040516345ec368560e11b81529091506001600160a01b03821690638bd86d0a906124ab9086908690600401614499565b600060405180830381600087803b1580156124c557600080fd5b505af11580156111d5573d6000803e3d6000fd5b6003546001600160a01b031633146125035760405162461bcd60e51b81526004016106dd9061411f565b600061250e836127ef565b604051632f8c40a560e21b81529091506001600160a01b0382169063be31029490610a14908590600401613f0d565b61254561289d565b6001600160a01b0316612556611c67565b6001600160a01b03161461259f576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b6001600160a01b0381166125c55760405162461bcd60e51b81526004016106dd906141c4565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6006602090815260009384526040808520845180860184018051928152908401958401959095209452928152908352918190208054825160026001831615610100026000190190921691909104601f81018590048502820185019093528281529290919083018282801561269c5780601f106126715761010080835404028352916020019161269c565b820191906000526020600020905b81548152906001019060200180831161267f57829003601f168201915b505050505081565b6005546001600160a01b031681565b6126bb61289d565b6001600160a01b03166126cc611c67565b6001600160a01b031614612715576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b6001600160a01b03811661275a5760405162461bcd60e51b8152600401808060200182810382526026815260200180614acb6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60006127c0836127ef565b604051637fb6526560e01b81529091506001600160a01b03821690637fb6526590610a14908590600401613fc5565b60025460405163068bcd8d60e01b81526000916001600160a01b03169063068bcd8d906128209085906004016147ea565b60206040518083038186803b15801561283857600080fd5b505afa15801561284c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128709190613269565b90506001600160a01b0381166128985760405162461bcd60e51b81526004016106dd90614269565b919050565b3390565b60006128ac866127ef565b60405163902b8ab760e01b81529091506001600160a01b0382169063902b8ab7906128e1908d908b9089908990600401614510565b602060405180830381600087803b1580156128fb57600080fd5b505af192505050801561292b575060408051601f3d908101601f1916820190925261292891810190613a5e565b60015b6129e157600387878787878760405160200161294d97969594939291906148f3565b60408051601f1981840301815282825261ffff8d166000908152600660205291909120909161297d908c90613ef1565b908152602001604051809103902060008a815260200190815260200160002090805190602001906129af929190612fbe565b50600080516020614af183398151915260038b8b8b6040516129d4949392919061484e565b60405180910390a1612db6565b82511561139357846001600160a01b031663ab8236f3878d8d8d876001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015612a3457600080fd5b505afa158015612a48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a6c9190613269565b878a6040518863ffffffff1660e01b8152600401612a8f969594939291906143e0565b600060405180830381600088803b158015612aa957600080fd5b5087f193505050508015612abb575060015b61139357612ac76149f1565b80612ad25750612b8b565b7f57bbe9975ae2ee06978860cfd29476cb8cb7e61bd8dcb55148eff883bac1d8fa8c8c8c866001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b2f57600080fd5b505afa158015612b43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b679190613269565b868987604051612b7d9796959493929190614439565b60405180910390a150612db1565b3d808015612bb5576040519150601f19603f3d011682016040523d82523d6000602084013e612bba565b606091505b506040518060800160405280846001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015612bff57600080fd5b505afa158015612c13573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c379190613269565b6001600160a01b03168152602001838152602001876001600160a01b0316815260200185815250600760008e61ffff1661ffff1681526020019081526020016000208c604051612c879190613ef1565b908152604080516020928190038301902060008e8152908352819020835181546001600160a01b03199081166001600160a01b0392831617835585850151600184015592850151600283018054909416911617909155606083015180519192612cf892600385019290910190612fbe565b509050507fb384cc81887146668e3e7490de85252fe62d53a265bd499e1009326f611a605f8c8c8c866001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015612d5957600080fd5b505afa158015612d6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d919190613269565b868b8a604051612da7979695949392919061438c565b60405180910390a1505b611393565b50505050505050505050565b6000612dcd856127ef565b604051632cc36bab60e21b81529091506001600160a01b0382169063b30daeac90612e04908c908a90899089908990600401614548565b600060405180830381600087803b158015612e1e57600080fd5b505af1925050508015612e2f575060015b6108d45760028686868686604051602001612e4f96959493929190614885565b60408051601f1981840301815282825261ffff8c1660009081526006602052919091209091612e7f908b90613ef1565b908152602001604051809103902060008981526020019081526020016000209080519060200190612eb1929190612fbe565b50600080516020614af183398151915260028a8a8a604051610817949392919061484e565b600080856001600160a01b03166323b872dd868686604051602401612efd93929190613f55565b6040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051612f369190613ef1565b6000604051808303816000865af19150503d8060008114612f73576040519150601f19603f3d011682016040523d82523d6000602084013e612f78565b606091505b5091509150818015612fa2575080511580612fa2575080806020019051810190612fa29190613285565b6116625760405162461bcd60e51b81526004016106dd906140e8565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282612ff4576000855561303a565b82601f1061300d57805160ff191683800117855561303a565b8280016001018555821561303a579182015b8281111561303a57825182559160200191906001019061301f565b5061304692915061309a565b5090565b604051806040016040528060008152602001600081525090565b6040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b5b80821115613046576000815560010161309b565b803561289881614a95565b60008083601f8401126130cb578182fd5b5081356001600160401b038111156130e1578182fd5b6020830191508360208285010111156130f957600080fd5b9250929050565b600082601f830112613110578081fd5b813561312361311e8261499a565b614977565b818152846020838601011115613137578283fd5b816020850160208301379081016020019190915292915050565b600060c08284031215613162578081fd5b60405160c081018181106001600160401b038211171561317e57fe5b8060405250809150825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a08201525092915050565b6000606082840312156131d4578081fd5b604051606081016001600160401b0382821081831117156131f157fe5b816040528293508435835260208501356020840152604085013591508082111561321a57600080fd5b5061322785828601613100565b6040830152505092915050565b803561ffff8116811461289857600080fd5b600060208284031215613257578081fd5b813561326281614a95565b9392505050565b60006020828403121561327a578081fd5b815161326281614a95565b600060208284031215613296578081fd5b815161326281614aad565b600080604083850312156132b3578081fd5b82356132be81614a95565b915060208301356132ce81614a95565b809150509250929050565b6000604082840312156132ea578081fd5b604051604081018181106001600160401b038211171561330657fe5b604052825181526020928301519281019290925250919050565b600060c08284031215613331578081fd5b6132628383613151565b60008060008060608587031215613350578182fd5b61335985613234565b935060208501356001600160401b03811115613373578283fd5b61337f878288016130ba565b9598909750949560400135949350505050565b60008060008060008060a087890312156133aa578384fd5b6133b387613234565b955060208701356001600160401b03808211156133ce578586fd5b6133da8a838b016130ba565b909750955060408901359450606089013591506133f682614a95565b9092506080880135908082111561340b578283fd5b5061341889828a016131c3565b9150509295509295509295565b600080600060608486031215613439578081fd5b61344284613234565b925060208401356001600160401b0381111561345c578182fd5b61346886828701613100565b925050604084013590509250925092565b600080600080600080600080610100898b031215613495578586fd5b61349e89613234565b975060208901356001600160401b038111156134b8578687fd5b6134c48b828c01613100565b97505060408901359550606089013594506080890135935060a08901356134ea81614a95565b979a969950949793969295929450505060c08201359160e0013590565b6000806000806000806000806000898b036101c0811215613526578384fd5b61352f8b613234565b995060208b01356001600160401b038082111561354a578586fd5b6135568e838f01613100565b9a5060408d0135995060608d0135985060808d0135975060a08d0135965060c08d0135915061358482614a95565b81955060c060df1984011215613598578384fd5b604051925060c08301915082821081831117156135b157fe5b8160405260e08d013583526101008d013560208401526101208d013560408401526101408d013560608401526101608d013560808401526101808d013560a08401528294506101a08d013592508083111561360a578384fd5b50506136188c828d01613100565b9150509295985092959850929598565b60008060008060008060008060e0898b031215613643578182fd5b61364c89613234565b975060208901356001600160401b0380821115613667578384fd5b6136738c838d01613100565b985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b01359150808211156136a4578384fd5b506136b18b828c016130ba565b999c989b5096995094979396929594505050565b600080600080608085870312156136da578182fd5b6136e385613234565b93506020850135925060408501359150606085013561370181614a95565b939692955090935050565b60008060008060008060008060e0898b031215613727578182fd5b61373089613234565b97506020890135965060408901359550606089013561374e81614a95565b94506080890135935060a08901356001600160401b0380821115613770578384fd5b61377c8c838d016130ba565b909550935060c08b0135915080821115613794578283fd5b506137a18b828c016131c3565b9150509295985092959890939650565b60008060008060008060008060006101008a8c0312156137cf578283fd5b6137d88a613234565b985060208a0135975060408a0135965060608a01356137f681614a95565b955060808a0135945060a08a0135935060c08a01356001600160401b038082111561381f578485fd5b61382b8d838e016130ba565b909550935060e08c0135915080821115613843578283fd5b506136188c828d016131c3565b60008060008060008060008060008060006101208c8e031215613871578485fd5b61387a8c613234565b9a5060208c0135995060408c0135985061389660608d016130af565b975060808c0135965060a08c013595506001600160401b038060c08e013511156138be578586fd5b6138ce8e60c08f01358f016131c3565b95508060e08e013511156138e0578283fd5b6138f08e60e08f01358f016130ba565b90955093506101008d0135811015613906578283fd5b506139188d6101008e01358e016130ba565b81935080925050509295989b509295989b9093969950565b60008060008084860360a0811215613946578283fd5b61394f86613234565b9450602086013593506040808701359350605f198201121561396f578182fd5b50604051604081018181106001600160401b038211171561398c57fe5b604052606086013581526080909501356020860152509194909350909190565b600080600080600080600060a0888a0312156139c6578081fd5b6139cf88613234565b965060208801356139df81614abb565b955060408801356001600160401b03808211156139fa578283fd5b613a068b838c016130ba565b909750955060608a0135915080821115613a1e578283fd5b613a2a8b838c016130ba565b909550935060808a0135915080821115613a42578283fd5b50613a4f8a828b016131c3565b91505092959891949750929550565b600060208284031215613a6f578081fd5b5051919050565b60008060408385031215613a88578182fd5b8235915060208301356132ce81614a95565b60008060008060008060c08789031215613ab2578384fd5b863595506020870135613ac481614a95565b94506040870135613ad481614abb565b93506060870135613ae481614abb565b925060808701356001600160401b0380821115613aff578384fd5b613b0b8a838b01613100565b935060a0890135915080821115613b20578283fd5b5061341889828a01613100565b60008060408385031215613b3f578182fd5b8235915060208301356132ce81614aad565b60008060008060008060c08789031215613b69578384fd5b863595506020870135613b7b81614aad565b945060408701359350606087013592506080870135613b9981614aad565b915060a0870135613ba981614aad565b809150509295509295509295565b600080600060608486031215613bcb578081fd5b83359250613bdb60208501613234565b9150604084013590509250925092565b60008060008060808587031215613c00578182fd5b84359350613c1060208601613234565b925060408501359150613c2560608601613234565b905092959194509250565b60008060008060808587031215613c45578182fd5b84359350613c5560208601613234565b93969395505050506040820135916060013590565b60008060408385031215613c7c578182fd5b50508035926020909101359150565b60008060408385031215613c9d578182fd5b505080516020909101519092909150565b600080600060608486031215613cc2578081fd5b83359250602084013591506040840135613cdb81614a95565b809150509250925092565b60008060008060008060c08789031215613cfe578384fd5b8651613d0981614abb565b8096505060208701519450604087015193506060870151613d2981614a95565b809350506080870151915060a087015190509295509295509295565b6000806000806000806000610180888a031215613d60578081fd5b8751613d6b81614abb565b809750506020880151955060408801519450606088015193506080880151613d9281614a95565b9250613da18960a08a01613151565b91506101608801516001600160401b03811115613dbc578182fd5b8801601f81018a13613dcc578182fd5b8051613dda61311e8261499a565b8181528b6020838501011115613dee578384fd5b613dff8260208301602086016149bb565b80935050505092959891949750929550565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b60008151808452613e538160208601602086016149bb565b601f01601f19169290920160200192915050565b80518252602090810151910152565b805182526020810151602083015260408101516040830152606081015160608301526080810151608083015260a081015160a08301525050565b60008151835260208201516020840152604082015160606040850152613ed96060850182613e3b565b949350505050565b6000828483379101908152919050565b60008251613f038184602087016149bb565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b039586168152602081019490945261ffff9290921660408401526060830152909116608082015260a00190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b038581168252602082018590528316604082015260806060820181905260009061182f90830184613e3b565b901515815260200190565b941515855260208501939093526040840191909152151560608301521515608082015260a00190565b6000602082526132626020830184613e3b565b6020808252601e908201527f53746172676174653a205f746f6b656e2063616e6e6f74206265203078300000604082015260600190565b6020808252601e908201527f4272696467653a2063616c6c6572206d757374206265204272696467652e0000604082015260600190565b6020808252601b908201527f53746172676174653a206f6e6c79206d696e744665654f776e65720000000000604082015260600190565b60208082526019908201527f53746172676174653a206e6f2072657472792072657665727400000000000000604082015260600190565b6020808252601e908201527f53746172676174653a205452414e534645525f46524f4d5f4641494c45440000604082015260600190565b6020808252601f908201527f53746172676174653a206f6e6c792070726f746f636f6c4665654f776e657200604082015260600190565b6020808252601a908201527f62726964676520616c726561647920696e697469616c697a6564000000000000604082015260600190565b6020808252601b908201527f666163746f727920616c726561647920696e697469616c697a65640000000000604082015260600190565b6020808252601e908201527f53746172676174653a205f6f776e65722063616e6e6f74206265203078300000604082015260600190565b6020808252601f908201527f53746172676174653a20636163686520616c726561647920636c656172656400604082015260600190565b6020808252601f908201527f53746172676174653a20696e76616c69642066756e6374696f6e207479706500604082015260600190565b6020808252601d908201527f53746172676174653a20506f6f6c20646f6573206e6f74206578697374000000604082015260600190565b60208082526026908201527f53746172676174653a205f726566756e64416464726573732063616e6e6f742060408201526506265203078360d41b606082015260800190565b61ffff861681526001600160a01b0385166020820152600061430b6040830186613e67565b60c0608083015261431f60c0830185613eb0565b82810360a084015261096c8185613e3b565b600061ffff8916825260c0602083015261434f60c08301888a613e11565b604083018790526001600160a01b03861660608401526080830185905282810360a084015261437e8185613e3b565b9a9950505050505050505050565b600061ffff8916825260e060208301526143a960e0830189613e3b565b604083018890526001600160a01b03878116606085015260808401879052851660a084015282810360c084015261437e8185613e3b565b600061ffff8816825260c060208301526143fd60c0830188613e3b565b604083018790526001600160a01b03861660608401526080830185905282810360a084015261442c8185613e3b565b9998505050505050505050565b600061ffff8916825260e0602083015261445660e0830189613e3b565b604083018890526001600160a01b03871660608401526080830186905282810360a08401526144858186613e3b565b905082810360c084015261437e8185613e3b565b61ffff929092168252602082015260400190565b61ffff94909416845260208401929092526001600160a01b03166040830152606082015260800190565b61ffff96909616865260208601949094526001600160a01b0392909216604085015260608401526080830152151560a082015260c00190565b61ffff85168152602081018490526001600160a01b0383166040820152610120810161453f6060830184613e76565b95945050505050565b61ffff95909516855260208501939093526001600160a01b039190911660408401526060830152608082015260a00190565b61ffff841681526020810183905260808101613ed96040830184613e67565b61ffff93841681526020810192909252909116604082015260600190565b61ffff9390931683526020830191909152604082015260600190565b61ffff8616815260208101859052604081018490526001600160a01b038316606082015260c0810161182f6080830184613e67565b61ffff8c168152602081018b9052604081018a90526001600160a01b038916606082015260006101e061463e608084018b613e67565b61464b60c084018a613e76565b8061018084015261465e81840189613eb0565b90508281036101a0840152614674818789613e11565b90508281036101c084015261468a818587613e11565b9e9d5050505050505050505050505050565b61ffff8a16815260208101899052604081018890526001600160a01b038716606082015260006101e06146d26080840189613e67565b6146df60c0840188613e76565b806101808401526146f281840187613eb0565b90508281036101a0840152614708818587613e11565b8381036101c0909401939093525081526020019998505050505050505050565b61ffff8a16815260208101899052604081018890526001600160a01b0387166060820152600061012061475e6080840189613e67565b8660c08401528060e08401526147778184018688613e11565b905082810361010084015261478c8185613eb0565b9c9b505050505050505050505050565b600061ffff8916825260ff8816602083015260a060408301526147c360a083018789613e11565b82810360608401526147d6818688613e11565b9050828103608084015261437e8185613eb0565b90815260200190565b8681526001600160a01b038616602082015260ff85811660408301528416606082015260c06080820181905260009061482e90830185613e3b565b82810360a084015261442c8185613e3b565b60ff91909116815260200190565b600060ff8616825261ffff85166020830152608060408301526148746080830185613e3b565b905082606083015295945050505050565b60ff969096168652602086019490945260408501929092526001600160a01b03166060840152608083015260a082015260c00190565b600060ff8916825287602083015286604083015260ff8616606083015284608083015260c060a083015261442c60c083018486613e11565b60ff881681526020810187905260408101869052606081018590526001600160a01b0384166080820152600061018061492f60a0840186613e76565b8061016084015261437e81840185613e3b565b600060ff8916825287602083015286604083015285606083015284608083015260c060a083015261442c60c083018486613e11565b6040518181016001600160401b038111828210171561499257fe5b604052919050565b60006001600160401b038211156149ad57fe5b50601f01601f191660200190565b60005b838110156149d65781810151838201526020016149be565b838111156149e5576000848401525b50505050565b60e01c90565b600060443d1015614a0157611c74565b600481823e6308c379a0614a1582516149eb565b14614a1f57611c74565b6040513d600319016004823e80513d6001600160401b038160248401118184111715614a4e5750505050611c74565b82840192508251915080821115614a685750505050611c74565b503d83016020828401011115614a8057505050611c74565b601f01601f1916810160200160405291505090565b6001600160a01b0381168114614aaa57600080fd5b50565b8015158114614aaa57600080fd5b60ff81168114614aaa57600080fdfe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a5d2ba6de30cc2f2e91c5a29ba66b148c27826954217e2f67cb8983541da21cf4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a26469706673582212204a3b63bb845ebaa02c7a65b9c5e33f1cc762b5a660a2185f9670968550a5337d64736f6c63430007060033", "deployedBytecode": "0x6080604052600436106102305760003560e01c80637f7212981161012e578063af640d82116100ab578063cefbdde21161006f578063cefbdde214610611578063da133a0614610631578063e78cea921461065e578063f2fde38b14610673578063fba6e2801461069357610230565b8063af640d8214610587578063c45a01551461059c578063c6a27624146105b1578063c7d968e3146105d1578063c8adf12d146105f157610230565b806398e391a1116100f257806398e391a11461050c5780639ba3aa741461052c5780639fbf10fc1461053f578063a18fa80414610552578063a96fbed41461057257610230565b80637f7212981461049157806384d0dba3146104b157806387b21efc146104c45780638da5cb5b146104e45780638f2e1d18146104f957610230565b806334aba410116101bc5780635500585c116101805780635500585c146103fc57806360a3b95c1461041c578063715018a61461042f5780637af935a1146104445780637b84d2871461047157610230565b806334aba41014610367578063403a9f7a14610387578063424c9119146103a757806343a30630146103c757806351a82035146103e757610230565b806316fb60f51161020357806316fb60f5146102cf57806320ddb8f5146102ef57806323fd4647146103045780632905dd11146103345780632f9255551461034757610230565b80630403bce5146102355780630a512369146102575780630b78f9c01461028d57806314c76351146102ad575b600080fd5b34801561024157600080fd5b50610255610250366004613628565b6106b3565b005b34801561026357600080fd5b506102776102723660046139ac565b6108df565b60405161028491906147ea565b60405180910390f35b34801561029957600080fd5b506102556102a8366004613c6a565b610978565b3480156102b957600080fd5b506102c2610a4b565b6040516102849190614840565b3480156102db57600080fd5b506102556102ea366004613c30565b610a50565b3480156102fb57600080fd5b506102c2610b1e565b34801561031057600080fd5b5061032461031f366004613425565b610b23565b6040516102849493929190613f92565b610255610342366004613392565b610c02565b34801561035357600080fd5b50610255610362366004613507565b610e8d565b34801561037357600080fd5b50610255610382366004613246565b610ec8565b34801561039357600080fd5b506102556103a236600461333b565b610f72565b3480156103b357600080fd5b506102556103c23660046132a1565b6111df565b3480156103d357600080fd5b506102556103e2366004613b51565b6112c1565b3480156103f357600080fd5b506102c26113a0565b34801561040857600080fd5b50610255610417366004613a76565b6113a5565b61025561042a36600461333b565b611409565b34801561043b57600080fd5b5061025561166a565b34801561045057600080fd5b5061046461045f366004613a9a565b611716565b6040516102849190613f0d565b34801561047d57600080fd5b5061025561048c366004613beb565b611839565b34801561049d57600080fd5b506102556104ac366004613479565b6118d9565b6102556104bf3660046137b1565b611913565b3480156104d057600080fd5b506102556104df366004613cae565b611b57565b3480156104f057600080fd5b50610464611c67565b61025561050736600461370c565b611c77565b34801561051857600080fd5b50610255610527366004613b2d565b611efb565b61025561053a3660046136c5565b611f97565b61025561054d366004613850565b61209f565b34801561055e57600080fd5b5061025561056d366004613930565b6122dc565b34801561057e57600080fd5b50610464612344565b34801561059357600080fd5b50610464612353565b3480156105a857600080fd5b50610464612362565b3480156105bd57600080fd5b506102556105cc366004613a76565b612371565b3480156105dd57600080fd5b506102556105ec366004613bb7565b61240d565b3480156105fd57600080fd5b5061025561060c366004613a76565b6124d9565b34801561061d57600080fd5b5061025561062c366004613246565b61253d565b34801561063d57600080fd5b5061065161064c366004613425565b6125e7565b6040516102849190613ff9565b34801561066a57600080fd5b506104646126a4565b34801561067f57600080fd5b5061025561068e366004613246565b6126b3565b34801561069f57600080fd5b506102556106ae366004613b2d565b6127b5565b6005546001600160a01b031633146106e65760405162461bcd60e51b81526004016106dd90614043565b60405180910390fd5b60006106f1856127ef565b604051637544f15560e11b81529091506001600160a01b0382169063ea89e2aa90610724908c908a9089906004016145b7565b6040805180830381600087803b15801561073d57600080fd5b505af192505050801561076d575060408051601f3d908101601f1916820190925261076a91810190613c8b565b60015b6108245760018686600087878760405160200161079097969594939291906148bb565b60408051601f1981840301815282825261ffff8c16600090815260066020529190912090916107c0908b90613ef1565b9081526020016040518091039020600089815260200190815260200160002090805190602001906107f2929190612fbe565b50600080516020614af183398151915260018a8a8a604051610817949392919061484e565b60405180910390a16108d4565b60018888848489896040516020016108429796959493929190614942565b60408051601f1981840301815282825261ffff8e1660009081526006602052919091209091610872908d90613ef1565b908152602001604051809103902060008b815260200190815260200160002090805190602001906108a4929190612fbe565b50600080516020614af183398151915260018c8c8c6040516108c9949392919061484e565b60405180910390a150505b505050505050505050565b600554604051630a51236960e01b81526000916001600160a01b031690630a5123699061091c908b908b908b908b908b908b908b9060040161479c565b60206040518083038186803b15801561093457600080fd5b505afa158015610948573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096c9190613a5e565b98975050505050505050565b61098061289d565b6001600160a01b0316610991611c67565b6001600160a01b0316146109da576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b60006109e5836127ef565b6040516369fe0e2d60e01b81529091506001600160a01b038216906369fe0e2d90610a149085906004016147ea565b600060405180830381600087803b158015610a2e57600080fd5b505af1158015610a42573d6000803e3d6000fd5b50505050505050565b600281565b610a5861289d565b6001600160a01b0316610a69611c67565b6001600160a01b031614610ab2576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b6000610abd856127ef565b6040516320d6bc7560e01b81529091506001600160a01b038216906320d6bc7590610af0908790879087906004016145b7565b600060405180830381600087803b158015610b0a57600080fd5b505af11580156108d4573d6000803e3d6000fd5b600181565b600760209081526000938452604080852084518086018401805192815290840195840195909520945292815290835291819020805460018083015460028085015460038601805488516101009682161596909602600019011692909204601f81018990048902850189019097528684526001600160a01b03948516979296941694939091830182828015610bf85780601f10610bcd57610100808354040283529160200191610bf8565b820191906000526020600020905b815481529060010190602001808311610bdb57829003601f168201915b5050505050905084565b61ffff86166000908152600660205260408082209051610c259088908890613ee1565b90815260408051602092819003830181206000888152908452829020805460026001821615610100026000190190911604601f81018590048502830185019093528282529092909190830182828015610cbf5780601f10610c9457610100808354040283529160200191610cbf565b820191906000526020600020905b815481529060010190602001808311610ca257829003601f168201915b505050505090506000815111610ce75760405162461bcd60e51b81526004016106dd906140b1565b602081015160ff8116600114610d0f5760405162461bcd60e51b81526004016106dd90614232565b506040805160208082018352600080835261ffff8b16815260069091528290209151909190610d419089908990613ee1565b908152602001604051809103902060008681526020019081526020016000209080519060200190610d73929190612fbe565b5060408101516060820151610d8661304a565b6000610d91836127ef565b604051630474ec6160e11b81529091506001600160a01b038216906308e9d8c290610dc2908e908890600401614499565b6040805180830381600087803b158015610ddb57600080fd5b505af1158015610def573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e1391906132d9565b6005546040516396aae4af60e01b81529193506001600160a01b031691506396aae4af903490610e4f908e908b9087908c908c906004016142e6565b6000604051808303818588803b158015610e6857600080fd5b505af1158015610e7c573d6000803e3d6000fd5b505050505050505050505050505050565b6005546001600160a01b03163314610eb75760405162461bcd60e51b81526004016106dd90614043565b6108d48989898989898989896128a1565b610ed061289d565b6001600160a01b0316610ee1611c67565b6001600160a01b031614610f2a576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b6001600160a01b038116610f505760405162461bcd60e51b81526004016106dd906141c4565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b61ffff84166000908152600760205260408082209051610f959086908690613ee1565b9081526040805160209281900383018120600086815290845282902060808201835280546001600160a01b039081168352600180830154868501526002808401549092168486015260038301805486516101009382161593909302600019011692909204601f8101879004870282018701909552848152929491936060860193928301828280156110675780601f1061103c57610100808354040283529160200191611067565b820191906000526020600020905b81548152906001019060200180831161104a57829003601f168201915b5050509190925250505060408101519091506001600160a01b031661109e5760405162461bcd60e51b81526004016106dd906141fb565b604080820151825160208401516060850151935163ab8236f360e01b81526001600160a01b039093169363ab8236f3936110e5938b938b938b938b93929190600401614331565b600060405180830381600087803b1580156110ff57600080fd5b505af1158015611113573d6000803e3d6000fd5b5050604080516080810182526000808252602080830182905282840182905283518082018552828152606084015261ffff8b1682526007905282902091519093509091506111649087908790613ee1565b90815260408051602092819003830190206000868152908352819020835181546001600160a01b03199081166001600160a01b03928316178355858501516001840155928501516002830180549094169116179091556060830151805191926111d592600385019290910190612fbe565b5050505050505050565b6111e761289d565b6001600160a01b03166111f8611c67565b6001600160a01b031614611241576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b6005546001600160a01b03161561126a5760405162461bcd60e51b81526004016106dd90614156565b6002546001600160a01b0316156112935760405162461bcd60e51b81526004016106dd9061418d565b600580546001600160a01b039384166001600160a01b03199182161790915560028054929093169116179055565b6112c961289d565b6001600160a01b03166112da611c67565b6001600160a01b031614611323576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b600061132e876127ef565b60405163e065608b60e01b81529091506001600160a01b0382169063e065608b906113659089908990899089908990600401613fd0565b600060405180830381600087803b15801561137f57600080fd5b505af1158015611393573d6000803e3d6000fd5b5050505050505050505050565b600381565b6004546001600160a01b031633146113cf5760405162461bcd60e51b81526004016106dd9061407a565b60006113da836127ef565b60405163011dbbf960e61b81529091506001600160a01b0382169063476efe4090610a14908590600401613f0d565b61ffff8416600090815260066020526040808220905161142c9086908690613ee1565b90815260408051602092819003830181206000868152908452829020805460026001821615610100026000190190911604601f810185900485028301850190935282825290929091908301828280156114c65780601f1061149b576101008083540402835291602001916114c6565b820191906000526020600020905b8154815290600101906020018083116114a957829003601f168201915b5050505050905060008151116114ee5760405162461bcd60e51b81526004016106dd906140b1565b6040805160208082018352600080835261ffff891681526006909152829020915190919061151f9087908790613ee1565b908152602001604051809103902060008481526020019081526020016000209080519060200190611551929190612fbe565b50602081015160ff8116600214156115dc5760008060008060008680602001905181019061157f9190613ce6565b95509550955095509550506115d28b8b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508d92508a9150899050888888612dc2565b5050505050611662565b60ff81166003141561166257600080600080600080878060200190518101906116059190613d45565b9650965096509650965096505061165b8c8c8c8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508e92508b91508a9050898989896128a1565b5050505050505b505050505050565b61167261289d565b6001600160a01b0316611683611c67565b6001600160a01b0316146116cc576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600061172061289d565b6001600160a01b0316611731611c67565b6001600160a01b03161461177a576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b6001600160a01b0386166117a05760405162461bcd60e51b81526004016106dd9061400c565b600254604051637af935a160e01b81526001600160a01b0390911690637af935a1906117da908a908a908a908a908a908a906004016147f3565b602060405180830381600087803b1580156117f457600080fd5b505af1158015611808573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061182c9190613269565b90505b9695505050505050565b61184161289d565b6001600160a01b0316611852611c67565b6001600160a01b03161461189b576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b60006118a6856127ef565b60405163a985565f60e01b81529091506001600160a01b0382169063a985565f90610af090879087908790600401614599565b6005546001600160a01b031633146119035760405162461bcd60e51b81526004016106dd90614043565b6111d58888888888888888612dc2565b61191b613064565b61192361304a565b600061192e8b6127ef565b90506000816001600160a01b0316637298a5dc8e8d338d6040518563ffffffff1660e01b815260040161196494939291906144ad565b602060405180830381600087803b15801561197e57600080fd5b505af1158015611992573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119b69190613a5e565b9050816001600160a01b0316631b7319b68e8d33858d60006040518763ffffffff1660e01b81526004016119ef969594939291906144d7565b60c060405180830381600087803b158015611a0957600080fd5b505af1158015611a1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a419190613320565b9350816001600160a01b03166308e9d8c28e8d6040518363ffffffff1660e01b8152600401611a71929190614499565b6040805180830381600087803b158015611a8a57600080fd5b505af1158015611a9e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ac291906132d9565b92505050600560009054906101000a90046001600160a01b03166001600160a01b03166351156e73348d8d8d8d87898b8e8e6040518b63ffffffff1660e01b8152600401611b189998979695949392919061469c565b6000604051808303818588803b158015611b3157600080fd5b505af1158015611b45573d6000803e3d6000fd5b50505050505050505050505050505050565b6000611b62846127ef565b9050611be0816001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015611ba057600080fd5b505afa158015611bb4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bd89190613269565b338386612ed6565b6040516340c10f1960e01b81526001600160a01b038216906340c10f1990611c0e9085908790600401613f79565b602060405180830381600087803b158015611c2857600080fd5b505af1158015611c3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c609190613a5e565b5050505050565b6000546001600160a01b03165b90565b6000611c82886127ef565b905060008085858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050905060148101519150506000826001600160a01b0316631d43108b33898e8d876040518663ffffffff1660e01b8152600401611d0c959493929190613f21565b602060405180830381600087803b158015611d2657600080fd5b505af1158015611d3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d5e9190613a5e565b90506000836001600160a01b03166308e9d8c28d8c6040518363ffffffff1660e01b8152600401611d90929190614499565b6040805180830381600087803b158015611da957600080fd5b505af1158015611dbd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611de191906132d9565b905081611e6957600560009054906101000a90046001600160a01b03166001600160a01b031663be9d40ac348e8e8e8e876040518763ffffffff1660e01b8152600401611e329594939291906145d3565b6000604051808303818588803b158015611e4b57600080fd5b505af1158015611e5f573d6000803e3d6000fd5b505050505061165b565b600560009054906101000a90046001600160a01b03166001600160a01b0316633cef94b9348e8e8e8e87898f8f8f6040518b63ffffffff1660e01b8152600401611ebb99989796959493929190614728565b6000604051808303818588803b158015611ed457600080fd5b505af1158015611ee8573d6000803e3d6000fd5b5050505050505050505050505050505050565b611f0361289d565b6001600160a01b0316611f14611c67565b6001600160a01b031614611f5d576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b6000611f68836127ef565b60405163ac2cc36b60e01b81529091506001600160a01b0382169063ac2cc36b90610a14908590600401613fc5565b6001600160a01b038116611fbd5760405162461bcd60e51b81526004016106dd906142a0565b6000611fc8846127ef565b90506000816001600160a01b03166308e9d8c287866040518363ffffffff1660e01b8152600401611ffa929190614499565b6040805180830381600087803b15801561201357600080fd5b505af1158015612027573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061204b91906132d9565b600554604051632fa7502b60e21b81529192506001600160a01b03169063be9d40ac903490612086908a908a908a908a9089906004016145d3565b6000604051808303818588803b15801561137f57600080fd5b6120a7613064565b6120af61304a565b60006120ba8d6127ef565b9050612138816001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156120f857600080fd5b505afa15801561210c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121309190613269565b33838d612ed6565b806001600160a01b0316631b7319b68f8e338e8e60016040518763ffffffff1660e01b815260040161216f969594939291906144d7565b60c060405180830381600087803b15801561218957600080fd5b505af115801561219d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121c19190613320565b9250806001600160a01b03166308e9d8c28f8e6040518363ffffffff1660e01b81526004016121f1929190614499565b6040805180830381600087803b15801561220a57600080fd5b505af115801561221e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061224291906132d9565b915050600560009054906101000a90046001600160a01b03166001600160a01b03166351156e73348f8f8f8f87898f8f8f8f8f6040518d63ffffffff1660e01b815260040161229b9b9a99989796959493929190614608565b6000604051808303818588803b1580156122b457600080fd5b505af11580156122c8573d6000803e3d6000fd5b505050505050505050505050505050505050565b6005546001600160a01b031633146123065760405162461bcd60e51b81526004016106dd90614043565b6000612311836127ef565b60405163b6addec760e01b81529091506001600160a01b0382169063b6addec790610af09088908890879060040161457a565b6003546001600160a01b031681565b6004546001600160a01b031681565b6002546001600160a01b031681565b61237961289d565b6001600160a01b031661238a611c67565b6001600160a01b0316146123d3576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b60006123de836127ef565b6040516312d72b2f60e21b81529091506001600160a01b03821690634b5cacbc90610a14908590600401613f0d565b61241561289d565b6001600160a01b0316612426611c67565b6001600160a01b03161461246f576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b600061247a846127ef565b6040516345ec368560e11b81529091506001600160a01b03821690638bd86d0a906124ab9086908690600401614499565b600060405180830381600087803b1580156124c557600080fd5b505af11580156111d5573d6000803e3d6000fd5b6003546001600160a01b031633146125035760405162461bcd60e51b81526004016106dd9061411f565b600061250e836127ef565b604051632f8c40a560e21b81529091506001600160a01b0382169063be31029490610a14908590600401613f0d565b61254561289d565b6001600160a01b0316612556611c67565b6001600160a01b03161461259f576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b6001600160a01b0381166125c55760405162461bcd60e51b81526004016106dd906141c4565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6006602090815260009384526040808520845180860184018051928152908401958401959095209452928152908352918190208054825160026001831615610100026000190190921691909104601f81018590048502820185019093528281529290919083018282801561269c5780601f106126715761010080835404028352916020019161269c565b820191906000526020600020905b81548152906001019060200180831161267f57829003601f168201915b505050505081565b6005546001600160a01b031681565b6126bb61289d565b6001600160a01b03166126cc611c67565b6001600160a01b031614612715576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b6001600160a01b03811661275a5760405162461bcd60e51b8152600401808060200182810382526026815260200180614acb6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60006127c0836127ef565b604051637fb6526560e01b81529091506001600160a01b03821690637fb6526590610a14908590600401613fc5565b60025460405163068bcd8d60e01b81526000916001600160a01b03169063068bcd8d906128209085906004016147ea565b60206040518083038186803b15801561283857600080fd5b505afa15801561284c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128709190613269565b90506001600160a01b0381166128985760405162461bcd60e51b81526004016106dd90614269565b919050565b3390565b60006128ac866127ef565b60405163902b8ab760e01b81529091506001600160a01b0382169063902b8ab7906128e1908d908b9089908990600401614510565b602060405180830381600087803b1580156128fb57600080fd5b505af192505050801561292b575060408051601f3d908101601f1916820190925261292891810190613a5e565b60015b6129e157600387878787878760405160200161294d97969594939291906148f3565b60408051601f1981840301815282825261ffff8d166000908152600660205291909120909161297d908c90613ef1565b908152602001604051809103902060008a815260200190815260200160002090805190602001906129af929190612fbe565b50600080516020614af183398151915260038b8b8b6040516129d4949392919061484e565b60405180910390a1612db6565b82511561139357846001600160a01b031663ab8236f3878d8d8d876001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015612a3457600080fd5b505afa158015612a48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a6c9190613269565b878a6040518863ffffffff1660e01b8152600401612a8f969594939291906143e0565b600060405180830381600088803b158015612aa957600080fd5b5087f193505050508015612abb575060015b61139357612ac76149f1565b80612ad25750612b8b565b7f57bbe9975ae2ee06978860cfd29476cb8cb7e61bd8dcb55148eff883bac1d8fa8c8c8c866001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b2f57600080fd5b505afa158015612b43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b679190613269565b868987604051612b7d9796959493929190614439565b60405180910390a150612db1565b3d808015612bb5576040519150601f19603f3d011682016040523d82523d6000602084013e612bba565b606091505b506040518060800160405280846001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015612bff57600080fd5b505afa158015612c13573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c379190613269565b6001600160a01b03168152602001838152602001876001600160a01b0316815260200185815250600760008e61ffff1661ffff1681526020019081526020016000208c604051612c879190613ef1565b908152604080516020928190038301902060008e8152908352819020835181546001600160a01b03199081166001600160a01b0392831617835585850151600184015592850151600283018054909416911617909155606083015180519192612cf892600385019290910190612fbe565b509050507fb384cc81887146668e3e7490de85252fe62d53a265bd499e1009326f611a605f8c8c8c866001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015612d5957600080fd5b505afa158015612d6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d919190613269565b868b8a604051612da7979695949392919061438c565b60405180910390a1505b611393565b50505050505050505050565b6000612dcd856127ef565b604051632cc36bab60e21b81529091506001600160a01b0382169063b30daeac90612e04908c908a90899089908990600401614548565b600060405180830381600087803b158015612e1e57600080fd5b505af1925050508015612e2f575060015b6108d45760028686868686604051602001612e4f96959493929190614885565b60408051601f1981840301815282825261ffff8c1660009081526006602052919091209091612e7f908b90613ef1565b908152602001604051809103902060008981526020019081526020016000209080519060200190612eb1929190612fbe565b50600080516020614af183398151915260028a8a8a604051610817949392919061484e565b600080856001600160a01b03166323b872dd868686604051602401612efd93929190613f55565b6040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051612f369190613ef1565b6000604051808303816000865af19150503d8060008114612f73576040519150601f19603f3d011682016040523d82523d6000602084013e612f78565b606091505b5091509150818015612fa2575080511580612fa2575080806020019051810190612fa29190613285565b6116625760405162461bcd60e51b81526004016106dd906140e8565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282612ff4576000855561303a565b82601f1061300d57805160ff191683800117855561303a565b8280016001018555821561303a579182015b8281111561303a57825182559160200191906001019061301f565b5061304692915061309a565b5090565b604051806040016040528060008152602001600081525090565b6040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b5b80821115613046576000815560010161309b565b803561289881614a95565b60008083601f8401126130cb578182fd5b5081356001600160401b038111156130e1578182fd5b6020830191508360208285010111156130f957600080fd5b9250929050565b600082601f830112613110578081fd5b813561312361311e8261499a565b614977565b818152846020838601011115613137578283fd5b816020850160208301379081016020019190915292915050565b600060c08284031215613162578081fd5b60405160c081018181106001600160401b038211171561317e57fe5b8060405250809150825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a08201525092915050565b6000606082840312156131d4578081fd5b604051606081016001600160401b0382821081831117156131f157fe5b816040528293508435835260208501356020840152604085013591508082111561321a57600080fd5b5061322785828601613100565b6040830152505092915050565b803561ffff8116811461289857600080fd5b600060208284031215613257578081fd5b813561326281614a95565b9392505050565b60006020828403121561327a578081fd5b815161326281614a95565b600060208284031215613296578081fd5b815161326281614aad565b600080604083850312156132b3578081fd5b82356132be81614a95565b915060208301356132ce81614a95565b809150509250929050565b6000604082840312156132ea578081fd5b604051604081018181106001600160401b038211171561330657fe5b604052825181526020928301519281019290925250919050565b600060c08284031215613331578081fd5b6132628383613151565b60008060008060608587031215613350578182fd5b61335985613234565b935060208501356001600160401b03811115613373578283fd5b61337f878288016130ba565b9598909750949560400135949350505050565b60008060008060008060a087890312156133aa578384fd5b6133b387613234565b955060208701356001600160401b03808211156133ce578586fd5b6133da8a838b016130ba565b909750955060408901359450606089013591506133f682614a95565b9092506080880135908082111561340b578283fd5b5061341889828a016131c3565b9150509295509295509295565b600080600060608486031215613439578081fd5b61344284613234565b925060208401356001600160401b0381111561345c578182fd5b61346886828701613100565b925050604084013590509250925092565b600080600080600080600080610100898b031215613495578586fd5b61349e89613234565b975060208901356001600160401b038111156134b8578687fd5b6134c48b828c01613100565b97505060408901359550606089013594506080890135935060a08901356134ea81614a95565b979a969950949793969295929450505060c08201359160e0013590565b6000806000806000806000806000898b036101c0811215613526578384fd5b61352f8b613234565b995060208b01356001600160401b038082111561354a578586fd5b6135568e838f01613100565b9a5060408d0135995060608d0135985060808d0135975060a08d0135965060c08d0135915061358482614a95565b81955060c060df1984011215613598578384fd5b604051925060c08301915082821081831117156135b157fe5b8160405260e08d013583526101008d013560208401526101208d013560408401526101408d013560608401526101608d013560808401526101808d013560a08401528294506101a08d013592508083111561360a578384fd5b50506136188c828d01613100565b9150509295985092959850929598565b60008060008060008060008060e0898b031215613643578182fd5b61364c89613234565b975060208901356001600160401b0380821115613667578384fd5b6136738c838d01613100565b985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b01359150808211156136a4578384fd5b506136b18b828c016130ba565b999c989b5096995094979396929594505050565b600080600080608085870312156136da578182fd5b6136e385613234565b93506020850135925060408501359150606085013561370181614a95565b939692955090935050565b60008060008060008060008060e0898b031215613727578182fd5b61373089613234565b97506020890135965060408901359550606089013561374e81614a95565b94506080890135935060a08901356001600160401b0380821115613770578384fd5b61377c8c838d016130ba565b909550935060c08b0135915080821115613794578283fd5b506137a18b828c016131c3565b9150509295985092959890939650565b60008060008060008060008060006101008a8c0312156137cf578283fd5b6137d88a613234565b985060208a0135975060408a0135965060608a01356137f681614a95565b955060808a0135945060a08a0135935060c08a01356001600160401b038082111561381f578485fd5b61382b8d838e016130ba565b909550935060e08c0135915080821115613843578283fd5b506136188c828d016131c3565b60008060008060008060008060008060006101208c8e031215613871578485fd5b61387a8c613234565b9a5060208c0135995060408c0135985061389660608d016130af565b975060808c0135965060a08c013595506001600160401b038060c08e013511156138be578586fd5b6138ce8e60c08f01358f016131c3565b95508060e08e013511156138e0578283fd5b6138f08e60e08f01358f016130ba565b90955093506101008d0135811015613906578283fd5b506139188d6101008e01358e016130ba565b81935080925050509295989b509295989b9093969950565b60008060008084860360a0811215613946578283fd5b61394f86613234565b9450602086013593506040808701359350605f198201121561396f578182fd5b50604051604081018181106001600160401b038211171561398c57fe5b604052606086013581526080909501356020860152509194909350909190565b600080600080600080600060a0888a0312156139c6578081fd5b6139cf88613234565b965060208801356139df81614abb565b955060408801356001600160401b03808211156139fa578283fd5b613a068b838c016130ba565b909750955060608a0135915080821115613a1e578283fd5b613a2a8b838c016130ba565b909550935060808a0135915080821115613a42578283fd5b50613a4f8a828b016131c3565b91505092959891949750929550565b600060208284031215613a6f578081fd5b5051919050565b60008060408385031215613a88578182fd5b8235915060208301356132ce81614a95565b60008060008060008060c08789031215613ab2578384fd5b863595506020870135613ac481614a95565b94506040870135613ad481614abb565b93506060870135613ae481614abb565b925060808701356001600160401b0380821115613aff578384fd5b613b0b8a838b01613100565b935060a0890135915080821115613b20578283fd5b5061341889828a01613100565b60008060408385031215613b3f578182fd5b8235915060208301356132ce81614aad565b60008060008060008060c08789031215613b69578384fd5b863595506020870135613b7b81614aad565b945060408701359350606087013592506080870135613b9981614aad565b915060a0870135613ba981614aad565b809150509295509295509295565b600080600060608486031215613bcb578081fd5b83359250613bdb60208501613234565b9150604084013590509250925092565b60008060008060808587031215613c00578182fd5b84359350613c1060208601613234565b925060408501359150613c2560608601613234565b905092959194509250565b60008060008060808587031215613c45578182fd5b84359350613c5560208601613234565b93969395505050506040820135916060013590565b60008060408385031215613c7c578182fd5b50508035926020909101359150565b60008060408385031215613c9d578182fd5b505080516020909101519092909150565b600080600060608486031215613cc2578081fd5b83359250602084013591506040840135613cdb81614a95565b809150509250925092565b60008060008060008060c08789031215613cfe578384fd5b8651613d0981614abb565b8096505060208701519450604087015193506060870151613d2981614a95565b809350506080870151915060a087015190509295509295509295565b6000806000806000806000610180888a031215613d60578081fd5b8751613d6b81614abb565b809750506020880151955060408801519450606088015193506080880151613d9281614a95565b9250613da18960a08a01613151565b91506101608801516001600160401b03811115613dbc578182fd5b8801601f81018a13613dcc578182fd5b8051613dda61311e8261499a565b8181528b6020838501011115613dee578384fd5b613dff8260208301602086016149bb565b80935050505092959891949750929550565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b60008151808452613e538160208601602086016149bb565b601f01601f19169290920160200192915050565b80518252602090810151910152565b805182526020810151602083015260408101516040830152606081015160608301526080810151608083015260a081015160a08301525050565b60008151835260208201516020840152604082015160606040850152613ed96060850182613e3b565b949350505050565b6000828483379101908152919050565b60008251613f038184602087016149bb565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b039586168152602081019490945261ffff9290921660408401526060830152909116608082015260a00190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b038581168252602082018590528316604082015260806060820181905260009061182f90830184613e3b565b901515815260200190565b941515855260208501939093526040840191909152151560608301521515608082015260a00190565b6000602082526132626020830184613e3b565b6020808252601e908201527f53746172676174653a205f746f6b656e2063616e6e6f74206265203078300000604082015260600190565b6020808252601e908201527f4272696467653a2063616c6c6572206d757374206265204272696467652e0000604082015260600190565b6020808252601b908201527f53746172676174653a206f6e6c79206d696e744665654f776e65720000000000604082015260600190565b60208082526019908201527f53746172676174653a206e6f2072657472792072657665727400000000000000604082015260600190565b6020808252601e908201527f53746172676174653a205452414e534645525f46524f4d5f4641494c45440000604082015260600190565b6020808252601f908201527f53746172676174653a206f6e6c792070726f746f636f6c4665654f776e657200604082015260600190565b6020808252601a908201527f62726964676520616c726561647920696e697469616c697a6564000000000000604082015260600190565b6020808252601b908201527f666163746f727920616c726561647920696e697469616c697a65640000000000604082015260600190565b6020808252601e908201527f53746172676174653a205f6f776e65722063616e6e6f74206265203078300000604082015260600190565b6020808252601f908201527f53746172676174653a20636163686520616c726561647920636c656172656400604082015260600190565b6020808252601f908201527f53746172676174653a20696e76616c69642066756e6374696f6e207479706500604082015260600190565b6020808252601d908201527f53746172676174653a20506f6f6c20646f6573206e6f74206578697374000000604082015260600190565b60208082526026908201527f53746172676174653a205f726566756e64416464726573732063616e6e6f742060408201526506265203078360d41b606082015260800190565b61ffff861681526001600160a01b0385166020820152600061430b6040830186613e67565b60c0608083015261431f60c0830185613eb0565b82810360a084015261096c8185613e3b565b600061ffff8916825260c0602083015261434f60c08301888a613e11565b604083018790526001600160a01b03861660608401526080830185905282810360a084015261437e8185613e3b565b9a9950505050505050505050565b600061ffff8916825260e060208301526143a960e0830189613e3b565b604083018890526001600160a01b03878116606085015260808401879052851660a084015282810360c084015261437e8185613e3b565b600061ffff8816825260c060208301526143fd60c0830188613e3b565b604083018790526001600160a01b03861660608401526080830185905282810360a084015261442c8185613e3b565b9998505050505050505050565b600061ffff8916825260e0602083015261445660e0830189613e3b565b604083018890526001600160a01b03871660608401526080830186905282810360a08401526144858186613e3b565b905082810360c084015261437e8185613e3b565b61ffff929092168252602082015260400190565b61ffff94909416845260208401929092526001600160a01b03166040830152606082015260800190565b61ffff96909616865260208601949094526001600160a01b0392909216604085015260608401526080830152151560a082015260c00190565b61ffff85168152602081018490526001600160a01b0383166040820152610120810161453f6060830184613e76565b95945050505050565b61ffff95909516855260208501939093526001600160a01b039190911660408401526060830152608082015260a00190565b61ffff841681526020810183905260808101613ed96040830184613e67565b61ffff93841681526020810192909252909116604082015260600190565b61ffff9390931683526020830191909152604082015260600190565b61ffff8616815260208101859052604081018490526001600160a01b038316606082015260c0810161182f6080830184613e67565b61ffff8c168152602081018b9052604081018a90526001600160a01b038916606082015260006101e061463e608084018b613e67565b61464b60c084018a613e76565b8061018084015261465e81840189613eb0565b90508281036101a0840152614674818789613e11565b90508281036101c084015261468a818587613e11565b9e9d5050505050505050505050505050565b61ffff8a16815260208101899052604081018890526001600160a01b038716606082015260006101e06146d26080840189613e67565b6146df60c0840188613e76565b806101808401526146f281840187613eb0565b90508281036101a0840152614708818587613e11565b8381036101c0909401939093525081526020019998505050505050505050565b61ffff8a16815260208101899052604081018890526001600160a01b0387166060820152600061012061475e6080840189613e67565b8660c08401528060e08401526147778184018688613e11565b905082810361010084015261478c8185613eb0565b9c9b505050505050505050505050565b600061ffff8916825260ff8816602083015260a060408301526147c360a083018789613e11565b82810360608401526147d6818688613e11565b9050828103608084015261437e8185613eb0565b90815260200190565b8681526001600160a01b038616602082015260ff85811660408301528416606082015260c06080820181905260009061482e90830185613e3b565b82810360a084015261442c8185613e3b565b60ff91909116815260200190565b600060ff8616825261ffff85166020830152608060408301526148746080830185613e3b565b905082606083015295945050505050565b60ff969096168652602086019490945260408501929092526001600160a01b03166060840152608083015260a082015260c00190565b600060ff8916825287602083015286604083015260ff8616606083015284608083015260c060a083015261442c60c083018486613e11565b60ff881681526020810187905260408101869052606081018590526001600160a01b0384166080820152600061018061492f60a0840186613e76565b8061016084015261437e81840185613e3b565b600060ff8916825287602083015286604083015285606083015284608083015260c060a083015261442c60c083018486613e11565b6040518181016001600160401b038111828210171561499257fe5b604052919050565b60006001600160401b038211156149ad57fe5b50601f01601f191660200190565b60005b838110156149d65781810151838201526020016149be565b838111156149e5576000848401525b50505050565b60e01c90565b600060443d1015614a0157611c74565b600481823e6308c379a0614a1582516149eb565b14614a1f57611c74565b6040513d600319016004823e80513d6001600160401b038160248401118184111715614a4e5750505050611c74565b82840192508251915080821115614a685750505050611c74565b503d83016020828401011115614a8057505050611c74565b601f01601f1916810160200160405291505090565b6001600160a01b0381168114614aaa57600080fd5b50565b8015158114614aaa57600080fd5b60ff81168114614aaa57600080fdfe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a5d2ba6de30cc2f2e91c5a29ba66b148c27826954217e2f67cb8983541da21cf4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a26469706673582212204a3b63bb845ebaa02c7a65b9c5e33f1cc762b5a660a2185f9670968550a5337d64736f6c63430007060033", "devdoc": { "kind": "dev", "methods": { "owner()": { "details": "Returns the address of the current owner." }, "renounceOwnership()": { "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." }, "transferOwnership(address)": { "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." } }, "version": 1 }, "userdoc": { "kind": "user", "methods": {}, "version": 1 }, "storageLayout": { "storage": [ { "astId": 7, "contract": "contracts/Router.sol:Router", "label": "_owner", "offset": 0, "slot": "0", "type": "t_address" }, { "astId": 2080, "contract": "contracts/Router.sol:Router", "label": "_status", "offset": 0, "slot": "1", "type": "t_uint256" }, { "astId": 7312, "contract": "contracts/Router.sol:Router", "label": "factory", "offset": 0, "slot": "2", "type": "t_contract(Factory)3392" }, { "astId": 7314, "contract": "contracts/Router.sol:Router", "label": "protocolFeeOwner", "offset": 0, "slot": "3", "type": "t_address" }, { "astId": 7316, "contract": "contracts/Router.sol:Router", "label": "mintFeeOwner", "offset": 0, "slot": "4", "type": "t_address" }, { "astId": 7318, "contract": "contracts/Router.sol:Router", "label": "bridge", "offset": 0, "slot": "5", "type": "t_contract(Bridge)3235" }, { "astId": 7326, "contract": "contracts/Router.sol:Router", "label": "revertLookup", "offset": 0, "slot": "6", "type": "t_mapping(t_uint16,t_mapping(t_bytes_memory_ptr,t_mapping(t_uint256,t_bytes_storage)))" }, { "astId": 7334, "contract": "contracts/Router.sol:Router", "label": "cachedSwapLookup", "offset": 0, "slot": "7", "type": "t_mapping(t_uint16,t_mapping(t_bytes_memory_ptr,t_mapping(t_uint256,t_struct(CachedSwap)7303_storage)))" } ], "types": { "t_address": { "encoding": "inplace", "label": "address", "numberOfBytes": "20" }, "t_bytes_memory_ptr": { "encoding": "bytes", "label": "bytes", "numberOfBytes": "32" }, "t_bytes_storage": { "encoding": "bytes", "label": "bytes", "numberOfBytes": "32" }, "t_contract(Bridge)3235": { "encoding": "inplace", "label": "contract Bridge", "numberOfBytes": "20" }, "t_contract(Factory)3392": { "encoding": "inplace", "label": "contract Factory", "numberOfBytes": "20" }, "t_mapping(t_bytes_memory_ptr,t_mapping(t_uint256,t_bytes_storage))": { "encoding": "mapping", "key": "t_bytes_memory_ptr", "label": "mapping(bytes => mapping(uint256 => bytes))", "numberOfBytes": "32", "value": "t_mapping(t_uint256,t_bytes_storage)" }, "t_mapping(t_bytes_memory_ptr,t_mapping(t_uint256,t_struct(CachedSwap)7303_storage))": { "encoding": "mapping", "key": "t_bytes_memory_ptr", "label": "mapping(bytes => mapping(uint256 => struct Router.CachedSwap))", "numberOfBytes": "32", "value": "t_mapping(t_uint256,t_struct(CachedSwap)7303_storage)" }, "t_mapping(t_uint16,t_mapping(t_bytes_memory_ptr,t_mapping(t_uint256,t_bytes_storage)))": { "encoding": "mapping", "key": "t_uint16", "label": "mapping(uint16 => mapping(bytes => mapping(uint256 => bytes)))", "numberOfBytes": "32", "value": "t_mapping(t_bytes_memory_ptr,t_mapping(t_uint256,t_bytes_storage))" }, "t_mapping(t_uint16,t_mapping(t_bytes_memory_ptr,t_mapping(t_uint256,t_struct(CachedSwap)7303_storage)))": { "encoding": "mapping", "key": "t_uint16", "label": "mapping(uint16 => mapping(bytes => mapping(uint256 => struct Router.CachedSwap)))", "numberOfBytes": "32", "value": "t_mapping(t_bytes_memory_ptr,t_mapping(t_uint256,t_struct(CachedSwap)7303_storage))" }, "t_mapping(t_uint256,t_bytes_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => bytes)", "numberOfBytes": "32", "value": "t_bytes_storage" }, "t_mapping(t_uint256,t_struct(CachedSwap)7303_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct Router.CachedSwap)", "numberOfBytes": "32", "value": "t_struct(CachedSwap)7303_storage" }, "t_struct(CachedSwap)7303_storage": { "encoding": "inplace", "label": "struct Router.CachedSwap", "members": [ { "astId": 7296, "contract": "contracts/Router.sol:Router", "label": "token", "offset": 0, "slot": "0", "type": "t_address" }, { "astId": 7298, "contract": "contracts/Router.sol:Router", "label": "amountLD", "offset": 0, "slot": "1", "type": "t_uint256" }, { "astId": 7300, "contract": "contracts/Router.sol:Router", "label": "to", "offset": 0, "slot": "2", "type": "t_address" }, { "astId": 7302, "contract": "contracts/Router.sol:Router", "label": "payload", "offset": 0, "slot": "3", "type": "t_bytes_storage" } ], "numberOfBytes": "128" }, "t_uint16": { "encoding": "inplace", "label": "uint16", "numberOfBytes": "2" }, "t_uint256": { "encoding": "inplace", "label": "uint256", "numberOfBytes": "32" } } } }