UNPKG

elektrik-swap-router-contracts

Version:

Smart contracts for swapping on Elektrik V1

1,068 lines 123 kB
{ "_format": "hh-sol-artifact-1", "contractName": "SwapRouter02", "sourceName": "contracts/SwapRouter02.sol", "abi": [ { "inputs": [ { "internalType": "address", "name": "_factoryV2", "type": "address" }, { "internalType": "address", "name": "factoryV3", "type": "address" }, { "internalType": "address", "name": "_positionManager", "type": "address" }, { "internalType": "address", "name": "_WETH9", "type": "address" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [ { "internalType": "int256", "name": "amount0Delta", "type": "int256" }, { "internalType": "int256", "name": "amount1Delta", "type": "int256" }, { "internalType": "bytes", "name": "_data", "type": "bytes" } ], "name": "ElektrikV1SwapCallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "WETH9", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" } ], "name": "approveMax", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" } ], "name": "approveMaxMinusOne", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" } ], "name": "approveZeroThenMax", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" } ], "name": "approveZeroThenMaxMinusOne", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "bytes", "name": "data", "type": "bytes" } ], "name": "callPositionManager", "outputs": [ { "internalType": "bytes", "name": "result", "type": "bytes" } ], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "bytes[]", "name": "paths", "type": "bytes[]" }, { "internalType": "uint128[]", "name": "amounts", "type": "uint128[]" }, { "internalType": "uint24", "name": "maximumTickDivergence", "type": "uint24" }, { "internalType": "uint32", "name": "secondsAgo", "type": "uint32" } ], "name": "checkOracleSlippage", "outputs": [], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "bytes", "name": "path", "type": "bytes" }, { "internalType": "uint24", "name": "maximumTickDivergence", "type": "uint24" }, { "internalType": "uint32", "name": "secondsAgo", "type": "uint32" } ], "name": "checkOracleSlippage", "outputs": [], "stateMutability": "view", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "bytes", "name": "path", "type": "bytes" }, { "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "uint256", "name": "amountIn", "type": "uint256" }, { "internalType": "uint256", "name": "amountOutMinimum", "type": "uint256" } ], "internalType": "struct IV3SwapRouter.ExactInputParams", "name": "params", "type": "tuple" } ], "name": "exactInput", "outputs": [ { "internalType": "uint256", "name": "amountOut", "type": "uint256" } ], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "address", "name": "tokenIn", "type": "address" }, { "internalType": "address", "name": "tokenOut", "type": "address" }, { "internalType": "uint24", "name": "fee", "type": "uint24" }, { "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "uint256", "name": "amountIn", "type": "uint256" }, { "internalType": "uint256", "name": "amountOutMinimum", "type": "uint256" }, { "internalType": "uint160", "name": "sqrtPriceLimitX96", "type": "uint160" } ], "internalType": "struct IV3SwapRouter.ExactInputSingleParams", "name": "params", "type": "tuple" } ], "name": "exactInputSingle", "outputs": [ { "internalType": "uint256", "name": "amountOut", "type": "uint256" } ], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "bytes", "name": "path", "type": "bytes" }, { "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "uint256", "name": "amountOut", "type": "uint256" }, { "internalType": "uint256", "name": "amountInMaximum", "type": "uint256" } ], "internalType": "struct IV3SwapRouter.ExactOutputParams", "name": "params", "type": "tuple" } ], "name": "exactOutput", "outputs": [ { "internalType": "uint256", "name": "amountIn", "type": "uint256" } ], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "address", "name": "tokenIn", "type": "address" }, { "internalType": "address", "name": "tokenOut", "type": "address" }, { "internalType": "uint24", "name": "fee", "type": "uint24" }, { "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "uint256", "name": "amountOut", "type": "uint256" }, { "internalType": "uint256", "name": "amountInMaximum", "type": "uint256" }, { "internalType": "uint160", "name": "sqrtPriceLimitX96", "type": "uint160" } ], "internalType": "struct IV3SwapRouter.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": [], "name": "factoryV2", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "getApprovalType", "outputs": [ { "internalType": "enum IApproveAndCall.ApprovalType", "name": "", "type": "uint8" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "address", "name": "token0", "type": "address" }, { "internalType": "address", "name": "token1", "type": "address" }, { "internalType": "uint256", "name": "tokenId", "type": "uint256" }, { "internalType": "uint256", "name": "amount0Min", "type": "uint256" }, { "internalType": "uint256", "name": "amount1Min", "type": "uint256" } ], "internalType": "struct IApproveAndCall.IncreaseLiquidityParams", "name": "params", "type": "tuple" } ], "name": "increaseLiquidity", "outputs": [ { "internalType": "bytes", "name": "result", "type": "bytes" } ], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "address", "name": "token0", "type": "address" }, { "internalType": "address", "name": "token1", "type": "address" }, { "internalType": "uint24", "name": "fee", "type": "uint24" }, { "internalType": "int24", "name": "tickLower", "type": "int24" }, { "internalType": "int24", "name": "tickUpper", "type": "int24" }, { "internalType": "uint256", "name": "amount0Min", "type": "uint256" }, { "internalType": "uint256", "name": "amount1Min", "type": "uint256" }, { "internalType": "address", "name": "recipient", "type": "address" } ], "internalType": "struct IApproveAndCall.MintParams", "name": "params", "type": "tuple" } ], "name": "mint", "outputs": [ { "internalType": "bytes", "name": "result", "type": "bytes" } ], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "previousBlockhash", "type": "bytes32" }, { "internalType": "bytes[]", "name": "data", "type": "bytes[]" } ], "name": "multicall", "outputs": [ { "internalType": "bytes[]", "name": "", "type": "bytes[]" } ], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "deadline", "type": "uint256" }, { "internalType": "bytes[]", "name": "data", "type": "bytes[]" } ], "name": "multicall", "outputs": [ { "internalType": "bytes[]", "name": "", "type": "bytes[]" } ], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "bytes[]", "name": "data", "type": "bytes[]" } ], "name": "multicall", "outputs": [ { "internalType": "bytes[]", "name": "results", "type": "bytes[]" } ], "stateMutability": "payable", "type": "function" }, { "inputs": [], "name": "positionManager", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "pull", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [], "name": "refundETH", "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": "uint256", "name": "amountIn", "type": "uint256" }, { "internalType": "uint256", "name": "amountOutMin", "type": "uint256" }, { "internalType": "address[]", "name": "path", "type": "address[]" }, { "internalType": "address", "name": "to", "type": "address" } ], "name": "swapExactTokensForTokens", "outputs": [ { "internalType": "uint256", "name": "amountOut", "type": "uint256" } ], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amountOut", "type": "uint256" }, { "internalType": "uint256", "name": "amountInMax", "type": "uint256" }, { "internalType": "address[]", "name": "path", "type": "address[]" }, { "internalType": "address", "name": "to", "type": "address" } ], "name": "swapTokensForExactTokens", "outputs": [ { "internalType": "uint256", "name": "amountIn", "type": "uint256" } ], "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" } ], "name": "sweepToken", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "amountMinimum", "type": "uint256" }, { "internalType": "uint256", "name": "feeBips", "type": "uint256" }, { "internalType": "address", "name": "feeRecipient", "type": "address" } ], "name": "sweepTokenWithFee", "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": "unwrapWETH9", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amountMinimum", "type": "uint256" } ], "name": "unwrapWETH9", "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": "unwrapWETH9WithFee", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amountMinimum", "type": "uint256" }, { "internalType": "uint256", "name": "feeBips", "type": "uint256" }, { "internalType": "address", "name": "feeRecipient", "type": "address" } ], "name": "unwrapWETH9WithFee", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "wrapETH", "outputs": [], "stateMutability": "payable", "type": "function" }, { "stateMutability": "payable", "type": "receive" } ], "bytecode": "0x6101006040526000196000553480156200001857600080fd5b5060405162006135380380620061358339810160408190526200003b9162000087565b6001600160601b0319606094851b811660805291841b821660a05291831b811660c052911b1660e052620000e3565b80516001600160a01b03811681146200008257600080fd5b919050565b600080600080608085870312156200009d578384fd5b620000a8856200006a565b9350620000b8602086016200006a565b9250620000c8604086016200006a565b9150620000d8606086016200006a565b905092959194509250565b60805160601c60a05160601c60c05160601c60e05160601c615fb162000184600039806102c15280610c8c52806113f1528061151b52806115c252806117f3528061191d52806129bf5280612a1f5280612aa05250806109615280611f905280613cdb5250806117b35280611c5e5280611fe0528061332a525080610db25280610e865280611126528061178f528061304652806132095250615fb16000f3fe6080604052600436106102a45760003560e01c8063791b98bc1161016e578063d4ef38de116100cb578063efdeed8e1161007f578063f25801a711610064578063f25801a71461066e578063f2d5d56b1461068e578063f3995c67146106a15761034f565b8063efdeed8e1461063b578063f100b2051461065b5761034f565b8063df2ab5bb116100b0578063df2ab5bb14610602578063e0e189a014610615578063e90a182f146106285761034f565b8063d4ef38de146105c2578063dee00f35146105d55761034f565b8063b3a2af1311610122578063c2e3140a11610107578063c2e3140a14610587578063c45a01551461059a578063cab372ce146105af5761034f565b8063b3a2af1314610561578063b858183f146105745761034f565b8063a4a78f0c11610153578063a4a78f0c14610528578063ab3fdd501461053b578063ac9650d81461054e5761034f565b8063791b98bc146105005780639b2c0a37146105155761034f565b80634659a4941161021c5780635023b4df116101d05780635ae401dc116101b55780635ae401dc146104c5578063639d71a9146104d857806368e0d4e1146104eb5761034f565b80635023b4df1461049f578063571ac8b0146104b25761034f565b806349404b7c1161020157806349404b7c14610457578063496169971461046a5780634aa4a4fc1461047d5761034f565b80634659a49414610431578063472b43f3146104445761034f565b806312210e8a116102735780631f0464d1116102585780631f0464d1146103eb5780633068c5541461040b57806342712a671461041e5761034f565b806312210e8a146103d05780631c58db4f146103d85761034f565b806304e45aaf1461035457806309b813461461037d5780630e245fd11461039057806311ed56c9146103b05761034f565b3661034f573373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461034d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f742057455448390000000000000000000000000000000000000000000000604482015290519081900360640190fd5b005b600080fd5b610367610362366004615543565b6106b4565b6040516103749190615dfd565b60405180910390f35b61036761038b3660046155de565b61083c565b34801561039c57600080fd5b5061034d6103ab3660046153b8565b61091c565b6103c36103be366004615638565b610a6c565b6040516103749190615b7a565b61034d610c78565b61034d6103e63660046157bb565b610c8a565b6103fe6103f93660046152a7565b610d0e565b6040516103749190615afc565b61034d6104193660046150d8565b610d98565b61036761042c366004615885565b610dab565b61034d61043f366004615121565b610f85565b610367610452366004615885565b611039565b61034d6104653660046157eb565b6113ed565b61034d6104783660046157bb565b6115b3565b34801561048957600080fd5b506104926115c0565b6040516103749190615a3c565b6103676104ad366004615616565b6115e4565b61034d6104c0366004614feb565b6116cd565b6103fe6104d33660046152a7565b611700565b61034d6104e6366004614feb565b611779565b3480156104f757600080fd5b5061049261178d565b34801561050c57600080fd5b506104926117b1565b61034d61052336600461581a565b6117d5565b61034d610536366004615121565b6119eb565b61034d610549366004614feb565b611ac0565b6103fe61055c36600461517c565b611afe565b6103c361056f3660046152f1565b611c58565b61036761058236600461549d565b611d16565b61034d610595366004615121565b611ed9565b3480156105a657600080fd5b50610492611f8e565b61034d6105bd366004614feb565b611ad4565b61034d6105d0366004615858565b611fb2565b3480156105e157600080fd5b506105f56105f036600461500e565b611fbe565b6040516103749190615b8d565b61034d610610366004615039565b61216b565b61034d61062336600461507a565b612282565b61034d61063636600461500e565b6123e8565b34801561064757600080fd5b5061034d6106563660046151bc565b6123f7565b6103c3610669366004615627565b612449565b34801561067a57600080fd5b5061034d610689366004615324565b6124e9565b61034d61069c36600461500e565b61253a565b61034d6106af366004615121565b612546565b600080600083608001511415610771575081516040517f70a0823100000000000000000000000000000000000000000000000000000000815260019173ffffffffffffffffffffffffffffffffffffffff16906370a082319061071b903090600401615a3c565b60206040518083038186803b15801561073357600080fd5b505afa158015610747573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076b91906157d3565b60808401525b6107ed836080015184606001518560c001516040518060400160405280886000015189604001518a602001516040516020016107af939291906159aa565b6040516020818303038152906040528152602001866107ce57336107d0565b305b73ffffffffffffffffffffffffffffffffffffffff1690526125de565b91508260a00151821015610836576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082d90615c7d565b60405180910390fd5b50919050565b60006108b0604083018035906108559060208601614feb565b604080518082019091526000908061086d8880615e41565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050908252503360209091015261278f565b505060005460608201358111156108f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082d90615c0f565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600055919050565b600084138061092b5750600083135b61093457600080fd5b60006109428284018461564a565b905060008060006109568460000151612976565b9250925092506109887f00000000000000000000000000000000000000000000000000000000000000008484846129a7565b5060008060008a136109c9578473ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1610896109fa565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16108a5b915091508115610a1957610a1485876020015133846129bd565b610a60565b8551610a2490612b9b565b15610a49578551610a3490612ba3565b8652610a43813360008961278f565b50610a60565b80600081905550610a6084876020015133846129bd565b50505050505050505050565b604080516101608101909152606090610c70907f88316456000000000000000000000000000000000000000000000000000000009080610aaf6020870187614feb565b73ffffffffffffffffffffffffffffffffffffffff168152602001856020016020810190610add9190614feb565b73ffffffffffffffffffffffffffffffffffffffff168152602001610b0860608701604088016157a1565b62ffffff168152602001610b226080870160608801615379565b60020b8152602001610b3a60a0870160808801615379565b60020b8152602090810190610b5a90610b5590880188614feb565b612bd8565b8152602001610b75866020016020810190610b559190614feb565b815260a0860135602082015260c08601356040820152606001610b9f610100870160e08801614feb565b73ffffffffffffffffffffffffffffffffffffffff1681526020017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff815250604051602401610bee9190615cf8565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611c58565b90505b919050565b4715610c8857610c883347612c7d565b565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610cf257600080fd5b505af1158015610d06573d6000803e3d6000fd5b505050505050565b60608380600143034014610d8357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f426c6f636b686173680000000000000000000000000000000000000000000000604482015290519081900360640190fd5b610d8d8484611afe565b91505b509392505050565b610da58484338585612282565b50505050565b6000610e0b7f000000000000000000000000000000000000000000000000000000000000000087868680806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250612dcb92505050565b600081518110610e1757fe5b6020026020010151905084811115610e5b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082d90615c0f565b610ef484846000818110610e6b57fe5b9050602002016020810190610e809190614feb565b33610eee7f000000000000000000000000000000000000000000000000000000000000000088886000818110610eb257fe5b9050602002016020810190610ec79190614feb565b89896001818110610ed457fe5b9050602002016020810190610ee99190614feb565b612f04565b846129bd565b73ffffffffffffffffffffffffffffffffffffffff821660011415610f1b57339150610f3e565b73ffffffffffffffffffffffffffffffffffffffff821660021415610f3e573091505b610f7c848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250869250612fef915050565b95945050505050565b604080517f8fcbaf0c00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101879052606481018690526001608482015260ff851660a482015260c4810184905260e48101839052905173ffffffffffffffffffffffffffffffffffffffff881691638fcbaf0c9161010480830192600092919082900301818387803b15801561102557600080fd5b505af1158015610a60573d6000803e3d6000fd5b600080866110ef57506001848460008161104f57fe5b90506020020160208101906110649190614feb565b73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161109c9190615a3c565b60206040518083038186803b1580156110b457600080fd5b505afa1580156110c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ec91906157d3565b96505b61117a858560008181106110ff57fe5b90506020020160208101906111149190614feb565b8261111f5733611121565b305b6111747f00000000000000000000000000000000000000000000000000000000000000008989600081811061115257fe5b90506020020160208101906111679190614feb565b8a8a6001818110610ed457fe5b8a6129bd565b73ffffffffffffffffffffffffffffffffffffffff8316600114156111a1573392506111c4565b73ffffffffffffffffffffffffffffffffffffffff8316600214156111c4573092505b600085857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81018181106111f457fe5b90506020020160208101906112099190614feb565b73ffffffffffffffffffffffffffffffffffffffff166370a08231856040518263ffffffff1660e01b81526004016112419190615a3c565b60206040518083038186803b15801561125957600080fd5b505afa15801561126d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061129191906157d3565b90506112d1868680806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250889250612fef915050565b6113a68187877fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810181811061130357fe5b90506020020160208101906113189190614feb565b73ffffffffffffffffffffffffffffffffffffffff166370a08231876040518263ffffffff1660e01b81526004016113509190615a3c565b60206040518083038186803b15801561136857600080fd5b505afa15801561137c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113a091906157d3565b906132f4565b9250868310156113e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082d90615c7d565b505095945050505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561147657600080fd5b505afa15801561148a573d6000803e3d6000fd5b505050506040513d60208110156114a057600080fd5b505190508281101561151357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e73756666696369656e742057455448390000000000000000000000000000604482015290519081900360640190fd5b80156115ae577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561158c57600080fd5b505af11580156115a0573d6000803e3d6000fd5b505050506115ae8282612c7d565b505050565b6115bd81336113ed565b50565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061168d608083018035906115fd9060608601614feb565b61160d60e0860160c08701614feb565b604051806040016040528087602001602081019061162b9190614feb565b61163b60608a0160408b016157a1565b61164860208b018b614feb565b60405160200161165a939291906159aa565b60405160208183030381529060405281526020013373ffffffffffffffffffffffffffffffffffffffff1681525061278f565b90508160a001358111156108f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082d90615c0f565b6116f7817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff613304565b6115bd57600080fd5b6060838061170c613450565b1115610d8357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f5472616e73616374696f6e20746f6f206f6c6400000000000000000000000000604482015290519081900360640190fd5b611784816000613304565b6116cd57600080fd5b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000821180156117e6575060648211155b6117ef57600080fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561187857600080fd5b505afa15801561188c573d6000803e3d6000fd5b505050506040513d60208110156118a257600080fd5b505190508481101561191557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e73756666696369656e742057455448390000000000000000000000000000604482015290519081900360640190fd5b80156119e4577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561198e57600080fd5b505af11580156119a2573d6000803e3d6000fd5b5050505060006127106119be858461345490919063ffffffff16565b816119c557fe5b04905080156119d8576119d88382612c7d565b610d0685828403612c7d565b5050505050565b604080517fdd62ed3e00000000000000000000000000000000000000000000000000000000815233600482015230602482015290517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9173ffffffffffffffffffffffffffffffffffffffff89169163dd62ed3e91604480820192602092909190829003018186803b158015611a8057600080fd5b505afa158015611a94573d6000803e3d6000fd5b505050506040513d6020811015611aaa57600080fd5b50511015610d0657610d06868686868686610f85565b611acb816000613304565b611ad457600080fd5b6116f7817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe613304565b60608167ffffffffffffffff81118015611b1757600080fd5b50604051908082528060200260200182016040528015611b4b57816020015b6060815260200190600190039081611b365790505b50905060005b82811015611c515760008030868685818110611b6957fe5b9050602002810190611b7b9190615e41565b604051611b89929190615a10565b600060405180830381855af49150503d8060008114611bc4576040519150601f19603f3d011682016040523d82523d6000602084013e611bc9565b606091505b509150915081611c2f57604481511015611be257600080fd5b60048101905080806020019051810190611bfc9190615433565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082d9190615b7a565b80848481518110611c3c57fe5b60209081029190910101525050600101611b51565b5092915050565b606060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1683604051611ca19190615a20565b6000604051808303816000865af19150503d8060008114611cde576040519150601f19603f3d011682016040523d82523d6000602084013e611ce3565b606091505b50925090508061083657604482511015611cfc57600080fd5b60048201915081806020019051810190611bfc9190615433565b600080600083604001511415611de757600190506000611d398460000151612976565b50506040517f70a0823100000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff8216906370a0823190611d90903090600401615a3c565b60206040518083038186803b158015611da857600080fd5b505afa158015611dbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611de091906157d3565b6040850152505b600081611df45733611df6565b305b90505b6000611e088560000151612b9b565b9050611e61856040015182611e21578660200151611e23565b305b60006040518060400160405280611e3d8b60000151613478565b81526020018773ffffffffffffffffffffffffffffffffffffffff168152506125de565b60408601528015611e81578451309250611e7a90612ba3565b8552611e8e565b8460400151935050611e94565b50611df9565b8360600151831015611ed2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082d90615c7d565b5050919050565b604080517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523360048201523060248201529051869173ffffffffffffffffffffffffffffffffffffffff89169163dd62ed3e91604480820192602092909190829003018186803b158015611f4e57600080fd5b505afa158015611f62573d6000803e3d6000fd5b505050506040513d6020811015611f7857600080fd5b50511015610d0657610d06868686868686612546565b7f000000000000000000000000000000000000000000000000000000000000000081565b6115ae833384846117d5565b6000818373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e307f00000000000000000000000000000000000000000000000000000000000000006040518363ffffffff1660e01b815260040161201c929190615a5d565b60206040518083038186803b15801561203457600080fd5b505afa158015612048573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061206c91906157d3565b1061207957506000612165565b6120a3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff613304565b156120b057506001612165565b6120da837ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe613304565b156120e757506002612165565b6120f2836000613304565b6120fb57600080fd5b612125837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff613304565b1561213257506003612165565b61215c837ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe613304565b1561034f575060045b92915050565b60008373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156121d457600080fd5b505afa1580156121e8573d6000803e3d6000fd5b505050506040513d60208110156121fe57600080fd5b505190508281101561227157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e73756666696369656e7420746f6b656e0000000000000000000000000000604482015290519081900360640190fd5b8015610da557610da5848383613487565b600082118015612293575060648211155b61229c57600080fd5b60008573ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561230557600080fd5b505afa158015612319573d6000803e3d6000fd5b505050506040513d602081101561232f57600080fd5b50519050848110156123a257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e73756666696369656e7420746f6b656e0000000000000000000000000000604482015290519081900360640190fd5b8015610d065760006127106123b78386613454565b816123be57fe5b04905080156123d2576123d2878483613487565b6123df8786838503613487565b50505050505050565b6123f382823361216b565b5050565b60008061240586868561365c565b915091508362ffffff1681830312610d06576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082d90615c46565b6060610c7063219f5d1760e01b6040518060c0016040528085604001358152602001612481866000016020810190610b559190614feb565b815260200161249c866020016020810190610b559190614feb565b815260200185606001358152602001856080013581526020017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff815250604051602401610bee9190615cb4565b6000806124f6858461386f565b915091508362ffffff16818303126119e4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082d90615c46565b6123f382333084613af7565b604080517fd505accf000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018790526064810186905260ff8516608482015260a4810184905260c48101839052905173ffffffffffffffffffffffffffffffffffffffff88169163d505accf9160e480830192600092919082900301818387803b15801561102557600080fd5b600073ffffffffffffffffffffffffffffffffffffffff8416600114156126075733935061262a565b73ffffffffffffffffffffffffffffffffffffffff84166002141561262a573093505b600080600061263c8560000151612976565b9194509250905073ffffffffffffffffffffffffffffffffffffffff8083169084161060008061266d868686613cd4565b73ffffffffffffffffffffffffffffffffffffffff1663128acb088b856126938f613d12565b73ffffffffffffffffffffffffffffffffffffffff8e16156126b5578d6126db565b876126d45773fffd8963efd1fc6a506488495d951d5263988d256126db565b6401000276a45b8d6040516020016126ec9190615da6565b6040516020818303038152906040526040518663ffffffff1660e01b815260040161271b959493929190615a84565b6040805180830381600087803b15801561273457600080fd5b505af1158015612748573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061276c9190615395565b915091508261277b578161277d565b805b6000039b9a5050505050505050505050565b600073ffffffffffffffffffffffffffffffffffffffff8416600114156127b8573393506127db565b73ffffffffffffffffffffffffffffffffffffffff8416600214156127db573093505b60008060006127ed8560000151612976565b9194509250905073ffffffffffffffffffffffffffffffffffffffff8084169083161060008061281e858786613cd4565b73ffffffffffffffffffffffffffffffffffffffff1663128acb088b856128448f613d12565b60000373ffffffffffffffffffffffffffffffffffffffff8e1615612869578d61288f565b876128885773fffd8963efd1fc6a506488495d951d5263988d2561288f565b6401000276a45b8d6040516020016128a09190615da6565b6040516020818303038152906040526040518663ffffffff1660e01b81526004016128cf959493929190615a84565b6040805180830381600087803b1580156128e857600080fd5b505af11580156128fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129209190615395565b9150915060008361293557818360000361293b565b82826000035b909850905073ffffffffffffffffffffffffffffffffffffffff8a16612967578b811461296757600080fd5b50505050505050949350505050565b600080806129848482613d44565b9250612991846014613e44565b905061299e846017613d44565b91509193909250565b6000610f7c856129b8868686613f34565b613fb1565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148015612a185750804710155b15612b61577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015612a8557600080fd5b505af1158015612a99573d6000803e3d6000fd5b50505050507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612b2f57600080fd5b505af1158015612b43573d6000803e3d6000fd5b505050506040513d6020811015612b5957600080fd5b50610da59050565b73ffffffffffffffffffffffffffffffffffffffff8316301415612b8f57612b8a848383613487565b610da5565b610da584848484613af7565b516042111590565b8051606090610c709083906017907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe901613fe1565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190612c2d903090600401615a3c565b60206040518083038186803b158015612c4557600080fd5b505afa158015612c59573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c7091906157d3565b6040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff84169083906040518082805190602001908083835b60208310612cf457805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101612cb7565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612d56576040519150601f19603f3d011682016040523d82523d6000602084013e612d5b565b606091505b50509050806115ae57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600360248201527f5354450000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6060600282511015612ddc57600080fd5b815167ffffffffffffffff81118015612df457600080fd5b50604051908082528060200260200182016040528015612e1e578160200160208202803683370190505b5090508281600183510381518110612e3257fe5b602090810291909101015281517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff015b8015610d9057600080612e9f87866001860381518110612e7e57fe5b6020026020010151878681518110612e9257fe5b60200260200101516141c8565b91509150612ec1848481518110612eb257fe5b602002602001015183836142b0565b846001850381518110612ed057fe5b602090810291909101015250507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01612e62565b6000806000612f138585614386565b604080517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606094851b811660208084019190915293851b81166034830152825160288184030181526048830184528051908501207fff0000000000000000000000000000000000000000000000000000000000000060688401529a90941b9093166069840152607d8301989098527f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f609d808401919091528851808403909101815260bd909201909752805196019590952095945050505050565b60005b60018351038110156115ae5760008084838151811061300d57fe5b602002602001015185846001018151811061302457fe5b602002602001015191509150600061303c8383614386565b509050600061306c7f00000000000000000000000000000000000000000000000000000000000000008585612f04565b90506000806000808473ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b1580156130ba57600080fd5b505afa1580156130ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130f291906156da565b506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff1691506000808773ffffffffffffffffffffffffffffffffffffffff168a73ffffffffffffffffffffffffffffffffffffffff1614613154578284613157565b83835b91509150613198828b73fffffffffffffffffffffffff