UNPKG

@cryptoalgebra/integral-periphery

Version:

Peripheral smart contracts of Algebra Integral protocol

841 lines 75.9 kB
{ "_format": "hh-sol-artifact-1", "contractName": "SwapRouter", "sourceName": "contracts/SwapRouter.sol", "abi": [ { "inputs": [ { "internalType": "address", "name": "_factory", "type": "address" }, { "internalType": "address", "name": "_WNativeToken", "type": "address" }, { "internalType": "address", "name": "_poolDeployer", "type": "address" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [], "name": "WNativeToken", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "int256", "name": "amount0Delta", "type": "int256" }, { "internalType": "int256", "name": "amount1Delta", "type": "int256" }, { "internalType": "bytes", "name": "_data", "type": "bytes" } ], "name": "algebraSwapCallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "bytes[]", "name": "pluginData", "type": "bytes[]" }, { "internalType": "bytes", "name": "path", "type": "bytes" }, { "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "uint256", "name": "deadline", "type": "uint256" }, { "internalType": "uint256", "name": "amountIn", "type": "uint256" }, { "internalType": "uint256", "name": "amountOutMinimum", "type": "uint256" } ], "internalType": "struct ISwapRouter.ExactInputParams", "name": "params", "type": "tuple" } ], "name": "exactInput", "outputs": [ { "internalType": "uint256", "name": "amountOut", "type": "uint256" } ], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "bytes", "name": "pluginData", "type": "bytes" }, { "internalType": "address", "name": "tokenIn", "type": "address" }, { "internalType": "address", "name": "tokenOut", "type": "address" }, { "internalType": "address", "name": "deployer", "type": "address" }, { "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "uint256", "name": "deadline", "type": "uint256" }, { "internalType": "uint256", "name": "amountIn", "type": "uint256" }, { "internalType": "uint256", "name": "amountOutMinimum", "type": "uint256" }, { "internalType": "uint160", "name": "limitSqrtPrice", "type": "uint160" } ], "internalType": "struct ISwapRouter.ExactInputSingleParams", "name": "params", "type": "tuple" } ], "name": "exactInputSingle", "outputs": [ { "internalType": "uint256", "name": "amountOut", "type": "uint256" } ], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "bytes", "name": "pluginData", "type": "bytes" }, { "internalType": "address", "name": "tokenIn", "type": "address" }, { "internalType": "address", "name": "tokenOut", "type": "address" }, { "internalType": "address", "name": "deployer", "type": "address" }, { "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "uint256", "name": "deadline", "type": "uint256" }, { "internalType": "uint256", "name": "amountIn", "type": "uint256" }, { "internalType": "uint256", "name": "amountOutMinimum", "type": "uint256" }, { "internalType": "uint160", "name": "limitSqrtPrice", "type": "uint160" } ], "internalType": "struct ISwapRouter.ExactInputSingleParams", "name": "params", "type": "tuple" } ], "name": "exactInputSingleSupportingFeeOnTransferTokens", "outputs": [ { "internalType": "uint256", "name": "amountOut", "type": "uint256" } ], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "bytes[]", "name": "pluginData", "type": "bytes[]" }, { "internalType": "bytes", "name": "path", "type": "bytes" }, { "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "uint256", "name": "deadline", "type": "uint256" }, { "internalType": "uint256", "name": "amountOut", "type": "uint256" }, { "internalType": "uint256", "name": "amountInMaximum", "type": "uint256" } ], "internalType": "struct ISwapRouter.ExactOutputParams", "name": "params", "type": "tuple" } ], "name": "exactOutput", "outputs": [ { "internalType": "uint256", "name": "amountIn", "type": "uint256" } ], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "bytes", "name": "pluginData", "type": "bytes" }, { "internalType": "address", "name": "tokenIn", "type": "address" }, { "internalType": "address", "name": "tokenOut", "type": "address" }, { "internalType": "address", "name": "deployer", "type": "address" }, { "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "uint256", "name": "deadline", "type": "uint256" }, { "internalType": "uint256", "name": "amountOut", "type": "uint256" }, { "internalType": "uint256", "name": "amountInMaximum", "type": "uint256" }, { "internalType": "uint160", "name": "limitSqrtPrice", "type": "uint160" } ], "internalType": "struct ISwapRouter.ExactOutputSingleParams", "name": "params", "type": "tuple" } ], "name": "exactOutputSingle", "outputs": [ { "internalType": "uint256", "name": "amountIn", "type": "uint256" } ], "stateMutability": "payable", "type": "function" }, { "inputs": [], "name": "factory", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "bytes[]", "name": "data", "type": "bytes[]" } ], "name": "multicall", "outputs": [ { "internalType": "bytes[]", "name": "results", "type": "bytes[]" } ], "stateMutability": "payable", "type": "function" }, { "inputs": [], "name": "poolDeployer", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "refundNativeToken", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "value", "type": "uint256" }, { "internalType": "uint256", "name": "deadline", "type": "uint256" }, { "internalType": "uint8", "name": "v", "type": "uint8" }, { "internalType": "bytes32", "name": "r", "type": "bytes32" }, { "internalType": "bytes32", "name": "s", "type": "bytes32" } ], "name": "selfPermit", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "nonce", "type": "uint256" }, { "internalType": "uint256", "name": "expiry", "type": "uint256" }, { "internalType": "uint8", "name": "v", "type": "uint8" }, { "internalType": "bytes32", "name": "r", "type": "bytes32" }, { "internalType": "bytes32", "name": "s", "type": "bytes32" } ], "name": "selfPermitAllowed", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "nonce", "type": "uint256" }, { "internalType": "uint256", "name": "expiry", "type": "uint256" }, { "internalType": "uint8", "name": "v", "type": "uint8" }, { "internalType": "bytes32", "name": "r", "type": "bytes32" }, { "internalType": "bytes32", "name": "s", "type": "bytes32" } ], "name": "selfPermitAllowedIfNecessary", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "value", "type": "uint256" }, { "internalType": "uint256", "name": "deadline", "type": "uint256" }, { "internalType": "uint8", "name": "v", "type": "uint8" }, { "internalType": "bytes32", "name": "r", "type": "bytes32" }, { "internalType": "bytes32", "name": "s", "type": "bytes32" } ], "name": "selfPermitIfNecessary", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "amountMinimum", "type": "uint256" }, { "internalType": "address", "name": "recipient", "type": "address" } ], "name": "sweepToken", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "amountMinimum", "type": "uint256" }, { "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "uint256", "name": "feeBips", "type": "uint256" }, { "internalType": "address", "name": "feeRecipient", "type": "address" } ], "name": "sweepTokenWithFee", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amountMinimum", "type": "uint256" }, { "internalType": "address", "name": "recipient", "type": "address" } ], "name": "unwrapWNativeToken", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amountMinimum", "type": "uint256" }, { "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "uint256", "name": "feeBips", "type": "uint256" }, { "internalType": "address", "name": "feeRecipient", "type": "address" } ], "name": "unwrapWNativeTokenWithFee", "outputs": [], "stateMutability": "payable", "type": "function" }, { "stateMutability": "payable", "type": "receive" }, { "inputs": [], "name": "alreadyInitialized", "type": "error" }, { "inputs": [], "name": "arithmeticError", "type": "error" }, { "inputs": [], "name": "bottomTickLowerThanMIN", "type": "error" }, { "inputs": [], "name": "dynamicFeeActive", "type": "error" }, { "inputs": [], "name": "dynamicFeeDisabled", "type": "error" }, { "inputs": [], "name": "flashInsufficientPaid0", "type": "error" }, { "inputs": [], "name": "flashInsufficientPaid1", "type": "error" }, { "inputs": [], "name": "incorrectPluginFee", "type": "error" }, { "inputs": [], "name": "insufficientInputAmount", "type": "error" }, { "inputs": [], "name": "invalidAmountRequired", "type": "error" }, { "inputs": [ { "internalType": "bytes4", "name": "expectedSelector", "type": "bytes4" } ], "name": "invalidHookResponse", "type": "error" }, { "inputs": [], "name": "invalidLimitSqrtPrice", "type": "error" }, { "inputs": [], "name": "invalidNewCommunityFee", "type": "error" }, { "inputs": [], "name": "invalidNewTickSpacing", "type": "error" }, { "inputs": [], "name": "liquidityAdd", "type": "error" }, { "inputs": [], "name": "liquidityOverflow", "type": "error" }, { "inputs": [], "name": "liquiditySub", "type": "error" }, { "inputs": [], "name": "locked", "type": "error" }, { "inputs": [], "name": "notAllowed", "type": "error" }, { "inputs": [], "name": "notInitialized", "type": "error" }, { "inputs": [], "name": "pluginIsNotConnected", "type": "error" }, { "inputs": [], "name": "priceOutOfRange", "type": "error" }, { "inputs": [], "name": "tickInvalidLinks", "type": "error" }, { "inputs": [], "name": "tickIsNotInitialized", "type": "error" }, { "inputs": [], "name": "tickIsNotSpaced", "type": "error" }, { "inputs": [], "name": "tickOutOfRange", "type": "error" }, { "inputs": [], "name": "topTickAboveMAX", "type": "error" }, { "inputs": [], "name": "topTickLowerOrEqBottomTick", "type": "error" }, { "inputs": [], "name": "transferFailed", "type": "error" }, { "inputs": [], "name": "zeroAmountRequired", "type": "error" }, { "inputs": [], "name": "zeroLiquidityActual", "type": "error" }, { "inputs": [], "name": "zeroLiquidityDesired", "type": "error" } ], "bytecode": "0x60e06040526000196000553480156200001757600080fd5b5060405162003856380380620038568339810160408190526200003a9162000074565b6001600160a01b03928316608052821660a0521660c052620000be565b80516001600160a01b03811681146200006f57600080fd5b919050565b6000806000606084860312156200008a57600080fd5b620000958462000057565b9250620000a56020850162000057565b9150620000b56040850162000057565b90509250925092565b60805160a05160c0516137226200013460003960008181610165015281816102fd01528181610c4101528181610d0601528181610f560152818161107701528181611e5d01528181611ebd0152611f850152600081816102760152818161084801526124000152600061037701526137226000f3fe6080604052600436106101485760003560e01c8063a4a78f0c116100c0578063df2ab5bb11610074578063e846012b11610059578063e846012b146103d2578063f3995c67146103e5578063f93d304c146103f857600080fd5b8063df2ab5bb146103ac578063e0e189a0146103bf57600080fd5b8063c2e3140a116100a5578063c2e3140a14610352578063c45a015514610365578063c60696ec1461039957600080fd5b8063a4a78f0c1461031f578063ac9650d81461033257600080fd5b80633119049a116101175780634659a494116100fc5780634659a494146102c557806369bc35b2146102d85780638af3ac85146102eb57600080fd5b80633119049a1461026457806341865270146102bd57600080fd5b806325225f2d146101f85780632aeb8e581461021e5780632c8958f6146102315780632e8aeca31461025157600080fd5b366101f3573373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146101f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e6f7420574e6174697665546f6b656e0000000000000000000000000000000060448201526064015b60405180910390fd5b005b600080fd5b61020b610206366004612b14565b61040b565b6040519081526020015b60405180910390f35b61020b61022c366004612b49565b6105f9565b34801561023d57600080fd5b506101f161024c366004612b8b565b6107a6565b61020b61025f366004612b14565b610995565b34801561027057600080fd5b506102987f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610215565b6101f1610b79565b6101f16102d3366004612c38565b610b8b565b6101f16102e6366004612c9a565b610c3a565b3480156102f757600080fd5b506102987f000000000000000000000000000000000000000000000000000000000000000081565b6101f161032d366004612c38565b610d86565b610345610340366004612cca565b610dcc565b6040516102159190612e23565b6101f1610360366004612c38565b610eed565b34801561037157600080fd5b506102987f000000000000000000000000000000000000000000000000000000000000000081565b6101f16103a7366004612e36565b610f0b565b6101f16103ba366004612e80565b61112f565b6101f16103cd366004612ec2565b6111bd565b61020b6103e036600461311e565b611323565b6101f16103f3366004612c38565b611481565b61020b610406366004612b14565b6114fe565b60008160a0013561041b816118dd565b61058360c084013561043360a08601608087016131e1565b610445610120870161010088016131e1565b60408051608081019091528061045b89806131fe565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050908252506020908101906104a89060408b01908b016131e1565b6104b860808b0160608c016131e1565b6104c860608c0160408d016131e1565b6040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606094851b8116602083015292841b83166034820152921b166048820152605c01604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181529082523360208301520160005b60405190808252806020026020018201604052801561057b57816020015b60608152602001906001900390816105665790505b50905261194a565b91508260e001358210156105f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f546f6f206c6974746c652072656365697665640000000000000000000000000060448201526064016101e8565b50919050565b60008160600135610609816118dd565b610708608084013561062160608601604087016131e1565b60408051608081019091526000908061063a898061326a565b600081811061064b5761064b6132d2565b905060200281019061065d91906131fe565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050908252506020908101906106a6908a018a6131fe565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050908252503360208201526040016107016106f38a8061326a565b6106fc91613301565b611ada565b9052611bd3565b5060005491508260a0013582111561077c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f546f6f206d75636820726571756573746564000000000000000000000000000060448201526064016101e8565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600055919050565b60008413806107b55750600083135b61081b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f5a65726f206c697175696469747920737761700000000000000000000000000060448201526064016101e8565b60006108298284018461330e565b9050600080600061083d8460200151611e02565b92509250925061086f7f0000000000000000000000000000000000000000000000000000000000000000838584611e3c565b5060008060008a136108b0578473ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1610896108e1565b8273ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16108a5b915091508115610900576108fb8587604001513384611e5b565b610989565b61090d8660200151612035565b1561096f5761091f866020015161206d565b60208701526060860151805160009061093a5761093a6132d2565b602002602001015186600001819052506109578660600151611ada565b60608701526109698133600089611bd3565b50610989565b806000819055508294506109898587604001513384611e5b565b50505050505050505050565b60008160a001356109a5816118dd565b610b0960c08401356109bd60a08601608087016131e1565b6109cf610120870161010088016131e1565b6040805160808101909152806109e589806131fe565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505090825250602001610a2f60608a0160408b016131e1565b610a3f60808b0160608c016131e1565b610a4f60408c0160208d016131e1565b6040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606094851b8116602083015292841b83166034820152921b166048820152605c01604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152908252336020830152016000604051908082528060200260200182016040528015610b0157816020015b6060815260200190600190039081610aec5790505b509052611bd3565b91508260e0013582111561077c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f546f6f206d75636820726571756573746564000000000000000000000000000060448201526064016101e8565b4715610b8957610b8933476120a2565b565b6040517f8fcbaf0c00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101869052606481018590526001608482015260ff841660a482015260c4810183905260e4810182905273ffffffffffffffffffffffffffffffffffffffff871690638fcbaf0c90610104015b600060405180830381600087803b158015610c2657600080fd5b505af1158015610989573d6000803e3d6000fd5b6000610c657f0000000000000000000000000000000000000000000000000000000000000000612186565b905082811015610cd1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f496e73756666696369656e7420574e6174697665546f6b656e0000000000000060448201526064016101e8565b8015610d81576040517f2e1a7d4d000000000000000000000000000000000000000000000000000000008152600481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690632e1a7d4d90602401600060405180830381600087803b158015610d5f57600080fd5b505af1158015610d73573d6000803e3d6000fd5b50505050610d8182826120a2565b505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610db087612218565b1015610dc457610dc4868686868686610b8b565b505050505050565b60608167ffffffffffffffff811115610de757610de7612f21565b604051908082528060200260200182016040528015610e1a57816020015b6060815260200190600190039081610e055790505b50905060005b82811015610ee65760008030868685818110610e3e57610e3e6132d2565b9050602002810190610e5091906131fe565b604051610e5e9291906133d6565b600060405180830381855af49150503d8060008114610e99576040519150601f19603f3d011682016040523d82523d6000602084013e610e9e565b606091505b509150915081610ebe576000815111610eb657600080fd5b805181602001fd5b80848481518110610ed157610ed16132d2565b60209081029190910101525050600101610e20565b5092915050565b84610ef787612218565b1015610dc457610dc4868686868686611481565b600082118015610f1c575060648211155b610f2557600080fd5b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015610fb2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd691906133e6565b905084811015611042576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f496e73756666696369656e7420574e6174697665546f6b656e0000000000000060448201526064016101e8565b8015611128576040517f2e1a7d4d000000000000000000000000000000000000000000000000000000008152600481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690632e1a7d4d90602401600060405180830381600087803b1580156110d057600080fd5b505af11580156110e4573d6000803e3d6000fd5b50505050600061271084836110f9919061342e565b6111039190613445565b905080156111155761111583826120a2565b610dc4856111238385613480565b6120a2565b5050505050565b600061113a84612186565b9050828110156111a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e73756666696369656e7420746f6b656e000000000000000000000000000060448201526064016101e8565b80156111b7576111b7848383612273565b50505050565b6000821180156111ce575060648211155b6111d757600080fd5b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8716906370a0823190602401602060405180830381865afa158015611244573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061126891906133e6565b9050848110156112d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e73756666696369656e7420746f6b656e000000000000000000000000000060448201526064016101e8565b8015610dc45760006127106112e9858461342e565b6112f39190613445565b9050801561130657611306878483612273565b61131a87866113158486613480565b612273565b50505050505050565b60008160600151611333816118dd565b3360005b60006113468660200151612035565b90506113c686608001518261135f578760400151611361565b305b600060405180608001604052808b600001518881518110611384576113846132d2565b6020026020010151815260200161139e8c602001516123dc565b815273ffffffffffffffffffffffffffffffffffffffff891660208201526040016000610548565b608087015280156113f8573092506113e1866020015161206d565b6020870152816113f081613493565b925050611405565b856080015194505061140b565b50611337565b8460a00151841015611479576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f546f6f206c6974746c652072656365697665640000000000000000000000000060448201526064016101e8565b505050919050565b6040517fd505accf000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018690526064810185905260ff8416608482015260a4810183905260c4810182905273ffffffffffffffffffffffffffffffffffffffff87169063d505accf9060e401610c0c565b60008160a0013561150e816118dd565b60408051608081019091526000908061152786806131fe565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509082525060209081019061157490604088019088016131e1565b61158460808801606089016131e1565b6115946060890160408a016131e1565b6040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606094851b8116602083015292841b83166034820152921b166048820152605c01604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815290825233602083015201600060405190808252806020026020018201604052801561164657816020015b60608152602001906001900390816116315790505b509052905060008061165e60a08701608088016131e1565b73ffffffffffffffffffffffffffffffffffffffff161461168e5761168960a08601608087016131e1565b611690565b305b905060006116a460608701604088016131e1565b73ffffffffffffffffffffffffffffffffffffffff166116ca60408801602089016131e1565b73ffffffffffffffffffffffffffffffffffffffff1610905060008061171e6116f960808a0160608b016131e1565b61170960408b0160208c016131e1565b61171960608c0160408d016131e1565b6123f9565b73ffffffffffffffffffffffffffffffffffffffff16639e4e02273386866117498d60c00135612437565b8d61010001602081019061175d91906131e1565b73ffffffffffffffffffffffffffffffffffffffff1615611791578d61010001602081019061178c91906131e1565b6117c5565b886117b55761178c600173fffd8963efd1fc6a506488495d951d5263988d266134cb565b6117c56401000276a360016134f8565b8b6040516020016117d69190613525565b6040516020818303038152906040526040518763ffffffff1660e01b8152600401611806969594939291906135bb565b60408051808303816000875af1158015611824573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118489190613616565b91509150826118575781611859565b805b6118629061363a565b96508760e001358710156118d2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f546f6f206c6974746c652072656365697665640000000000000000000000000060448201526064016101e8565b505050505050919050565b80421115611947576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f5472616e73616374696f6e20746f6f206f6c640000000000000000000000000060448201526064016101e8565b50565b600073ffffffffffffffffffffffffffffffffffffffff841661196b573093505b600080600061197d8560200151611e02565b9194509250905073ffffffffffffffffffffffffffffffffffffffff808216908416106000806119ae8587866123f9565b73ffffffffffffffffffffffffffffffffffffffff1663128acb088b856119d48f612437565b73ffffffffffffffffffffffffffffffffffffffff8e16156119f6578d611a2f565b87611a1f57611a1a600173fffd8963efd1fc6a506488495d951d5263988d266134cb565b611a2f565b611a2f6401000276a360016134f8565b8d604051602001611a409190613525565b6040516020818303038152906040526040518663ffffffff1660e01b8152600401611a6f959493929190613672565b60408051808303816000875af1158015611a8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab19190613616565b9150915082611ac05781611ac2565b805b611acb9061363a565b9b9a5050505050505050505050565b805160609015611ba257600060018351611af49190613480565b67ffffffffffffffff811115611b0c57611b0c612f21565b604051908082528060200260200182016040528015611b3f57816020015b6060815260200190600190039081611b2a5790505b50905060005b8151811015610ee65783611b5a8260016136c4565b81518110611b6a57611b6a6132d2565b6020026020010151828281518110611b8457611b846132d2565b60200260200101819052508080611b9a90613493565b915050611b45565b6040805160008082526020820190925290610ee6565b6060815260200190600190039081611bb85790505092915050565b600073ffffffffffffffffffffffffffffffffffffffff8416611bf4573093505b6000806000611c068560200151611e02565b9194509250905073ffffffffffffffffffffffffffffffffffffffff80841690821610600080611c378585886123f9565b73ffffffffffffffffffffffffffffffffffffffff1663128acb088b85611c5d8f612437565b611c669061363a565b73ffffffffffffffffffffffffffffffffffffffff8e1615611c88578d611cc1565b87611cb157611cac600173fffd8963efd1fc6a506488495d951d5263988d266134cb565b611cc1565b611cc16401000276a360016134f8565b8d604051602001611cd29190613525565b6040516020818303038152906040526040518663ffffffff1660e01b8152600401611d01959493929190613672565b60408051808303816000875af1158015611d1f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d439190613616565b91509150600083611d5d5781611d588461363a565b611d67565b82611d678361363a565b909850905073ffffffffffffffffffffffffffffffffffffffff8a16600003611df3578b8114611df3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4e6f742072656365697665642066756c6c20616d6f756e744f7574000000000060448201526064016101e8565b50505050505050949350505050565b60008080611e10848261244b565b9250611e1d84601461244b565b9150611e34611e2d6014806136c4565b859061244b565b929491935050565b6000611e5285611e4d8686866124d4565b612562565b95945050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148015611eb65750804710155b15611ffc577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015611f2357600080fd5b505af1158015611f37573d6000803e3d6000fd5b50506040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8681166004830152602482018690527f000000000000000000000000000000000000000000000000000000000000000016935063a9059cbb925060440190506020604051808303816000875af1158015611fd2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ff691906136d7565b506111b7565b3073ffffffffffffffffffffffffffffffffffffffff84160361202957612024848383612273565b6111b7565b6111b7848484846125ef565b60006120426014806136c4565b601461204e81806136c4565b61205891906136c4565b61206291906136c4565b825110159050919050565b606061209c61207d6014806136c4565b6120886014806136c4565b84516120949190613480565b849190612760565b92915050565b6040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff84169083906040516120d991906136f9565b60006040518083038185875af1925050503d8060008114612116576040519150601f19603f3d011682016040523d82523d6000602084013e61211b565b606091505b5050905080610d81576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600360248201527f535445000000000000000000000000000000000000000000000000000000000060448201526064016101e8565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8316906370a08231906024015b602060405180830381865afa1580156121f4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061209c91906133e6565b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815233600482015230602482015260009073ffffffffffffffffffffffffffffffffffffffff83169063dd62ed3e906044016121d7565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052915160009283929087169161230a91906136f9565b6000604051808303816000865af19150503d8060008114612347576040519150601f19603f3d011682016040523d82523d6000602084013e61234c565b606091505b509150915081801561237657508051158061237657508080602001905181019061237691906136d7565b611128576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f535400000000000000000000000000000000000000000000000000000000000060448201526064016101e8565b606061209c600060146123ef81806136c4565b61209491906136c4565b600061242f7f000000000000000000000000000000000000000000000000000000000000000061242a8686866124d4565b6128cc565b949350505050565b80600081121561244657600080fd5b919050565b600081601401835110156124bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f746f416464726573735f6f75744f66426f756e6473000000000000000000000060448201526064016101e8565b5001602001516c01000000000000000000000000900490565b60408051606081018252600080825260208201819052918101919091528173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161115612529579091905b506040805160608101825273ffffffffffffffffffffffffffffffffffffffff9485168152928416602084015292169181019190915290565b600061256e83836128cc565b90503373ffffffffffffffffffffffffffffffffffffffff82161461209c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f496e76616c69642063616c6c6572206f662063616c6c6261636b00000000000060448201526064016101e8565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052915160009283929088169161268e91906136f9565b6000604051808303816000865af19150503d80600081146126cb576040519150601f19603f3d011682016040523d82523d6000602084013e6126d0565b606091505b50915091508180156126fa5750805115806126fa5750808060200190518101906126fa91906136d7565b610dc4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600360248201527f535446000000000000000000000000000000000000000000000000000000000060448201526064016101e8565b60608182601f0110156127cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f7700000000000000000000000000000000000060448201526064016101e8565b8183018451101561283c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f736c6963655f6f75744f66426f756e647300000000000000000000000000000060448201526064016101e8565b60608215801561285b57604051915060008252602082016040526128c3565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561289457805183526020928301920161287c565b5050858452601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016604052505b50949350505050565b6000816040015173ffffffffffffffffffffffffffffffffffffffff16826020015173ffffffffffffffffffffffffffffffffffffffff161061296b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f496e76616c6964206f72646572206f6620746f6b656e7300000000000000000060448201526064016101e8565b8151839073ffffffffffffffffffffffffffffffffffffffff16156129e457825160208085015160408087015190516129d094930173ffffffffffffffffffffffffffffffffffffffff93841681529183166020830152909116604082015260600190565b604051602081830303815290604052612a2e565b6020808401516040808601519051612a1e930173ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b6040516020818303038152906040525b8051602091820120604051612ac493927f62441ebe4e4315cf3d49d5957f94d66b253dbabe7006f34ad7f70947e60bf15c91017fff00000000000000000000000000000000000000000000000000000000000000815260609390931b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660018401526015830191909152603582015260550190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101209392505050565b600061012082840312156105f357600080fd5b600060208284031215612b2657600080fd5b813567ffffffffffffffff811115612b3d57600080fd5b61242f84828501612b01565b600060208284031215612b5b57600080fd5b813567ffffffffffffffff811115612b7257600080fd5b820160c08185031215612b8457600080fd5b9392505050565b60008060008060608587031215612ba157600080fd5b8435935060208501359250604085013567ffffffffffffffff80821115612bc757600080fd5b818701915087601f830112612bdb57600080fd5b813581811115612bea57600080fd5b886020828501011115612bfc57600080fd5b95989497505060200194505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461194757600080fd5b803561244681612c0b565b60008060008060008060c08789031215612c5157600080fd5b8635612c5c81612c0b565b95506020870135945060408701359350606087013560ff81168114612c8057600080fd5b9598949750929560808101359460a0909101359350915050565b60008060408385031215612cad57600080fd5b823591506020830135612cbf81612c0b565b809150509250929050565b60008060208385031215612cdd57600080fd5b823567ffffffffffffffff80821115612cf557600080fd5b818501915085601f830112612d0957600080fd5b813581811115612d1857600080fd5b8660208260051b8501011115612d2d57600080fd5b60209290920196919550909350505050565b60005b83811015612d5a578181015183820152602001612d42565b50506000910152565b60008151808452612d7b816020860160208601612d3f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600082825180855260208086019550808260051b84010181860160005b84811015612e16577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0868403018952612e04838351612d63565b98840198925090830190600101612dca565b5090979650505050505050565b602081526000612b846020830184612dad565b60008060008060808587031215612e4c57600080fd5b843593506020850135612e5e81612c0b565b9250604085013591506060850135612e7581612c0b565b939692955090935050565b600080600060608486031215612e9557600080fd5b8335612ea081612c0b565b9250602084013591506040840135612eb781612c0b565b809150509250925092565b600080600080600060a08688031215612eda57600080fd5b8535612ee581612c0b565b9450602086013593506040860135612efc81612c0b565b9250606086013591506080860135612f1381612c0b565b809150509295509295909350565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160c0810167ffffffffffffffff81118282101715612f7357612f73612f21565b60405290565b6040516080810167ffffffffffffffff81118282101715612f7357612f73612f21565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715612fe357612fe3612f21565b604052919050565b600082601f830112612ffc57600080fd5b813567ffffffffffffffff81111561301657613016612f21565b61304760207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601612f9c565b81815284602083860101111561305c57600080fd5b816020850160208301376000918101602001919091529392505050565b600067ffffffffffffffff8084111561309457613094612f21565b8360051b60206130a5818301612f9c565b868152935090840190808401878311156130be57600080fd5b855b838110156130f2578035858111156130d85760008081fd5b6130e48a828a01612feb565b8352509082019082016130c0565b50505050509392505050565b600082601f83011261310f57600080fd5b612b8483833560208501613079565b60006020828403121561313057600080fd5b813567ffffffffffffffff8082111561314857600080fd5b9083019060c0828603121561315c57600080fd5b613164612f50565b82358281111561317357600080fd5b61317f878286016130fe565b82525060208301358281111561319457600080fd5b6131a087828601612feb565b6020830152506131b260408401612c2d565b6040820152606083013560608201526080830135608082015260a083013560a082015280935050505092915050565b6000602082840312156131f357600080fd5b8135612b8481612c0b565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261323357600080fd5b83018035915067ffffffffffffffff82111561324e57600080fd5b60200191503681900382131561326357600080fd5b9250929050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261329f57600080fd5b83018035915067ffffffffffffffff8211156132ba57600080fd5b6020019150600581901b360382131561326357600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000612b84368484613079565b60006020828403121561332057600080fd5b813567ffffffffffffffff8082111561333857600080fd5b908301906080828603121561334c57600080fd5b613354612f79565b82358281111561336357600080fd5b61336f87828601612feb565b82525060208301358281111561338457600080fd5b61339087828601612feb565b60208301525060408301356133a481612c0b565b60408201526060830135828111156133bb57600080fd5b6133c7878286016130fe565b60608301525095945050505050565b8183823760009101908152919050565b6000602082840312156133f857600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808202811582820484141761209c5761209c6133ff565b60008261347b577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b8181038181111561209c5761209c6133ff565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036134c4576134c46133ff565b5060010190565b73ffffffffffffffffffffffffffffffffffffffff828116828216039080821115610ee657610ee66133ff565b73ffffffffffffffffffffffffffffffffffffffff818116838216019080821115610ee657610ee66133ff565b60208152600082516080602084015261354160a0840182612d63565b905060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08085840301604086015261357d8383612d63565b925073ffffffffffffffffffffffffffffffffffffffff6040870151166060860152606086015191508085840301608086015250611e528282612dad565b600073ffffffffffffffffffffffffffffffffffffffff80891683528088166020840152861515604084015285606084015280851660808401525060c060a083015261360a60c0830184612d63565b98975050505050505050565b6000806040838503121561362957600080fd5b505080516020909101519092909150565b60007f8000000000000000000000000000000000000000000000000000000000000000820361366b5761366b6133ff565b5060000390565b600073ffffffffffffffffffffffffffffffffffffffff8088168352861515602084015285604084015280851660608401525060a060808301526136b960a0830184612d63565b979650505050505050565b8082018082111561209c5761209c6133ff565b6000602082840312156136e957600080fd5b81518015158114612b8457600080fd5b6000825161370b818460208701612d3f565b919091019291505056fea164736f6c6343000814000a", "deployedBytecode": "0x6080604052600436106101485760003560e01c8063a4a78f0c116100c0578063df2ab5bb11610074578063e846012b11610059578063e846012b146103d2578063f3995c67146103e5578063f93d304c146103f857600080fd5b8063df2ab5bb146103ac578063e0e189a0146103bf57600080fd5b8063c2e3140a116100a5578063c2e3140a14610352578063c45a015514610365578063c60696ec1461039957600080fd5b8063a4a78f0c1461031f578063ac9650d81461033257600080fd5b80633119049a116101175780634659a494116100fc5780634659a494146102c557806369bc35b2146102d85780638af3ac85146102eb57600080fd5b80633119049a1461026457806341865270146102bd57600080fd5b806325225f2d146101f85780632aeb8e581461021e5780632c8958f6146102315780632e8aeca31461025157600080fd5b366101f3573373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146101f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e6f7420574e6174697665546f6b656e0000000000000000000000000000000060448201526064015b60405180910390fd5b005b600080fd5b61020b610206366004612b14565b61040b565b6040519081526020015b60405180910390f35b61020b61022c366004612b49565b6105f9565b34801561023d57600080fd5b506101f161024c366004612b8b565b6107a6565b61020b61025f366004612b14565b610995565b34801561027057600080fd5b506102987f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610215565b6101f1610b79565b6101f16102d3366004612c38565b610b8b565b6101f16102e6366004612c9a565b610c3a565b3480156102f757600080fd5b506102987f000000000000000000000000000000000000000000000000000000000000000081565b6101f161032d366004612c38565b610d86565b610345610340366004612cca565b610dcc565b6040516102159190612e23565b6101f1610360366004612c38565b610eed565b34801561037157600080fd5b506102987f000000000000000000000000000000000000000000000000000000000000000081565b6101f16103a7366004612e36565b610f0b565b6101f16103ba366004612e80565b61112f565b6101f16103cd366004612ec2565b6111bd565b61020b6103e036600461311e565b611323565b6101f16103f3366004612c38565b611481565b61020b610406366004612b14565b6114fe565b60008160a0013561041b816118dd565b61058360c084013561043360a08601608087016131e1565b610445610120870161010088016131e1565b60408051608081019091528061045b89806131fe565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050908252506020908101906104a89060408b01908b016131e1565b6104b860808