diff --git a/contracts/SwapHelperLib.sol b/contracts/SwapHelperLib.sol index b73f9acb..65daf550 100644 --- a/contracts/SwapHelperLib.sol +++ b/contracts/SwapHelperLib.sol @@ -4,7 +4,6 @@ pragma solidity 0.8.26; import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol"; import "./shared/interfaces/IZRC20.sol"; -import "./SystemContract.sol"; import "./shared/libraries/UniswapV2Library.sol"; library SwapHelperLib { @@ -112,41 +111,39 @@ library SwapHelperLib { } function swapExactTokensForTokens( - SystemContract systemContract, + address router, address zrc20, uint256 amount, address targetZRC20, uint256 minAmountOut ) internal returns (uint256) { + address factory = IUniswapV2Router01(router).factory(); + address wzeta = IUniswapV2Router01(router).WETH(); + address[] memory path; path = new address[](2); path[0] = zrc20; path[1] = targetZRC20; bool isSufficientLiquidity = _isSufficientLiquidity( - systemContract.uniswapv2FactoryAddress(), + factory, amount, minAmountOut, path ); - bool isZETA = targetZRC20 == systemContract.wZetaContractAddress() || - zrc20 == systemContract.wZetaContractAddress(); + bool isZETA = targetZRC20 == wzeta || zrc20 == wzeta; if (!isSufficientLiquidity && !isZETA) { path = new address[](3); path[0] = zrc20; - path[1] = systemContract.wZetaContractAddress(); + path[1] = wzeta; path[2] = targetZRC20; } - IZRC20(zrc20).approve( - address(systemContract.uniswapv2Router02Address()), - amount - ); - uint256[] memory amounts = IUniswapV2Router01( - systemContract.uniswapv2Router02Address() - ).swapExactTokensForTokens( + IZRC20(zrc20).approve(router, amount); + uint256[] memory amounts = IUniswapV2Router01(router) + .swapExactTokensForTokens( amount, minAmountOut, path, @@ -157,17 +154,16 @@ library SwapHelperLib { } function swapExactTokensForTokensDirectly( - SystemContract systemContract, + address router, address zrc20, uint256 amount, address targetZRC20, uint256 minAmountOut ) internal returns (uint256) { - bool existsPairPool = _existsPairPool( - systemContract.uniswapv2FactoryAddress(), - zrc20, - targetZRC20 - ); + address factory = IUniswapV2Router01(router).factory(); + address wzeta = IUniswapV2Router01(router).WETH(); + + bool existsPairPool = _existsPairPool(factory, zrc20, targetZRC20); address[] memory path; if (existsPairPool) { @@ -177,17 +173,13 @@ library SwapHelperLib { } else { path = new address[](3); path[0] = zrc20; - path[1] = systemContract.wZetaContractAddress(); + path[1] = wzeta; path[2] = targetZRC20; } - IZRC20(zrc20).approve( - address(systemContract.uniswapv2Router02Address()), - amount - ); - uint256[] memory amounts = IUniswapV2Router01( - systemContract.uniswapv2Router02Address() - ).swapExactTokensForTokens( + IZRC20(zrc20).approve(router, amount); + uint256[] memory amounts = IUniswapV2Router01(router) + .swapExactTokensForTokens( amount, minAmountOut, path, @@ -198,17 +190,16 @@ library SwapHelperLib { } function swapTokensForExactTokens( - SystemContract systemContract, + address router, address zrc20, uint256 amount, address targetZRC20, uint256 amountInMax ) internal returns (uint256) { - bool existsPairPool = _existsPairPool( - systemContract.uniswapv2FactoryAddress(), - zrc20, - targetZRC20 - ); + address factory = IUniswapV2Router01(router).factory(); + address wzeta = IUniswapV2Router01(router).WETH(); + + bool existsPairPool = _existsPairPool(factory, zrc20, targetZRC20); address[] memory path; if (existsPairPool) { @@ -218,17 +209,13 @@ library SwapHelperLib { } else { path = new address[](3); path[0] = zrc20; - path[1] = systemContract.wZetaContractAddress(); + path[1] = wzeta; path[2] = targetZRC20; } - IZRC20(zrc20).approve( - address(systemContract.uniswapv2Router02Address()), - amountInMax - ); - uint256[] memory amounts = IUniswapV2Router01( - systemContract.uniswapv2Router02Address() - ).swapTokensForExactTokens( + IZRC20(zrc20).approve(router, amountInMax); + uint256[] memory amounts = IUniswapV2Router01(router) + .swapTokensForExactTokens( amount, amountInMax, path, @@ -239,28 +226,31 @@ library SwapHelperLib { } function getMinOutAmount( - SystemContract systemContract, + address router, address zrc20, address target, uint256 amountIn ) public view returns (uint256 minOutAmount) { + address factory = IUniswapV2Router01(router).factory(); + address wzeta = IUniswapV2Router01(router).WETH(); + address[] memory path; path = new address[](2); path[0] = zrc20; path[1] = target; uint[] memory amounts1 = UniswapV2Library.getAmountsOut( - systemContract.uniswapv2FactoryAddress(), + factory, amountIn, path ); path = new address[](3); path[0] = zrc20; - path[1] = systemContract.wZetaContractAddress(); + path[1] = wzeta; path[2] = target; uint[] memory amounts2 = UniswapV2Library.getAmountsOut( - systemContract.uniswapv2FactoryAddress(), + factory, amountIn, path ); diff --git a/typechain-types/contracts/SwapHelperLib.ts b/typechain-types/contracts/SwapHelperLib.ts index 4cc07069..ee8d7944 100644 --- a/typechain-types/contracts/SwapHelperLib.ts +++ b/typechain-types/contracts/SwapHelperLib.ts @@ -23,7 +23,7 @@ import type { export interface SwapHelperLibInterface extends utils.Interface { functions: { - "getMinOutAmount(SystemContract,address,address,uint256)": FunctionFragment; + "getMinOutAmount(address,address,address,uint256)": FunctionFragment; "uniswapv2PairFor(address,address,address)": FunctionFragment; }; @@ -89,7 +89,7 @@ export interface SwapHelperLib extends BaseContract { functions: { getMinOutAmount( - systemContract: PromiseOrValue, + router: PromiseOrValue, zrc20: PromiseOrValue, target: PromiseOrValue, amountIn: PromiseOrValue, @@ -105,7 +105,7 @@ export interface SwapHelperLib extends BaseContract { }; getMinOutAmount( - systemContract: PromiseOrValue, + router: PromiseOrValue, zrc20: PromiseOrValue, target: PromiseOrValue, amountIn: PromiseOrValue, @@ -121,7 +121,7 @@ export interface SwapHelperLib extends BaseContract { callStatic: { getMinOutAmount( - systemContract: PromiseOrValue, + router: PromiseOrValue, zrc20: PromiseOrValue, target: PromiseOrValue, amountIn: PromiseOrValue, @@ -140,7 +140,7 @@ export interface SwapHelperLib extends BaseContract { estimateGas: { getMinOutAmount( - systemContract: PromiseOrValue, + router: PromiseOrValue, zrc20: PromiseOrValue, target: PromiseOrValue, amountIn: PromiseOrValue, @@ -157,7 +157,7 @@ export interface SwapHelperLib extends BaseContract { populateTransaction: { getMinOutAmount( - systemContract: PromiseOrValue, + router: PromiseOrValue, zrc20: PromiseOrValue, target: PromiseOrValue, amountIn: PromiseOrValue, diff --git a/typechain-types/factories/contracts/SwapHelperLib__factory.ts b/typechain-types/factories/contracts/SwapHelperLib__factory.ts index 106701df..297f2e3f 100644 --- a/typechain-types/factories/contracts/SwapHelperLib__factory.ts +++ b/typechain-types/factories/contracts/SwapHelperLib__factory.ts @@ -73,9 +73,9 @@ const _abi = [ { inputs: [ { - internalType: "contract SystemContract", - name: "systemContract", - type: "SystemContract", + internalType: "address", + name: "router", + type: "address", }, { internalType: "address", @@ -136,7 +136,7 @@ const _abi = [ ] as const; const _bytecode = - "0x611276610052600b82828239805160001a6073146045577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100405760003560e01c8063b864987914610045578063c63585cc14610075575b600080fd5b61005f600480360381019061005a9190610d0a565b6100a5565b60405161006c9190610d80565b60405180910390f35b61008f600480360381019061008a9190610d9b565b6104ec565b60405161009c9190610dfd565b60405180910390f35b60006060600267ffffffffffffffff8111156100c4576100c3610e18565b5b6040519080825280602002602001820160405280156100f25781602001602082028036833780820191505090505b509050848160008151811061010a57610109610e47565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050838160018151811061015957610158610e47565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600061020e8773ffffffffffffffffffffffffffffffffffffffff1663d936a0126040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101e3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102079190610e8b565b858461055e565b9050600367ffffffffffffffff81111561022b5761022a610e18565b5b6040519080825280602002602001820160405280156102595781602001602082028036833780820191505090505b509150858260008151811061027157610270610e47565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508673ffffffffffffffffffffffffffffffffffffffff1663569541b96040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031a9190610e8b565b8260018151811061032e5761032d610e47565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050848260028151811061037d5761037c610e47565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060006104328873ffffffffffffffffffffffffffffffffffffffff1663d936a0126040518163ffffffff1660e01b8152600401602060405180830381865afa158015610407573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061042b9190610e8b565b868561055e565b905080600182516104439190610ee7565b8151811061045457610453610e47565b5b6020026020010151826001845161046b9190610ee7565b8151811061047c5761047b610e47565b5b6020026020010151116104b65780600182516104989190610ee7565b815181106104a9576104a8610e47565b5b60200260200101516104df565b81600183516104c59190610ee7565b815181106104d6576104d5610e47565b5b60200260200101515b9350505050949350505050565b60008060006104fb85856106da565b91509150858282604051602001610513929190610f63565b6040516020818303038152906040528051906020012060405160200161053a92919061105d565b6040516020818303038152906040528051906020012060001c925050509392505050565b606060028251101561059c576040517f20db826700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815167ffffffffffffffff8111156105b7576105b6610e18565b5b6040519080825280602002602001820160405280156105e55781602001602082028036833780820191505090505b50905082816000815181106105fd576105fc610e47565b5b60200260200101818152505060005b6001835161061a9190610ee7565b8110156106d25760008061066f8786858151811061063b5761063a610e47565b5b602002602001015187600187610651919061109f565b8151811061066257610661610e47565b5b60200260200101516107f4565b9150915061069884848151811061068957610688610e47565b5b602002602001015183836108f7565b846001856106a6919061109f565b815181106106b7576106b6610e47565b5b6020026020010181815250505050808060010191505061060c565b509392505050565b6000808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610742576040517fcb1e7cfe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161061077c57828461077f565b83835b8092508193505050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036107ed576040517f78b507da00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250929050565b600080600061080385856109eb565b509050600080610814888888610b05565b73ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561085e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108829190611155565b506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff1691508273ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16146108e15780826108e4565b81815b8095508196505050505050935093915050565b6000808403610932576040517f098fb56100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008314806109415750600082145b15610978576040517fbb55fd2700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061098f6103e586610b8c90919063ffffffff16565b905060006109a68483610b8c90919063ffffffff16565b905060006109d1836109c36103e889610b8c90919063ffffffff16565b610bec90919063ffffffff16565b905080826109df91906111d7565b93505050509392505050565b6000808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610a53576040517fbd969eb000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1610610a8d578284610a90565b83835b8092508193505050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610afe576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250929050565b60008373ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401610b42929190611217565b602060405180830381865afa158015610b5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b839190610e8b565b90509392505050565b600080831480610bb05750818383850292508281610bad57610bac6111a8565b5b04145b610be6576040517f5797276a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b92915050565b6000818301905082811015610c2d576040517fa259879500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b92915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610c6382610c38565b9050919050565b6000610c7582610c58565b9050919050565b610c8581610c6a565b8114610c9057600080fd5b50565b600081359050610ca281610c7c565b92915050565b610cb181610c58565b8114610cbc57600080fd5b50565b600081359050610cce81610ca8565b92915050565b6000819050919050565b610ce781610cd4565b8114610cf257600080fd5b50565b600081359050610d0481610cde565b92915050565b60008060008060808587031215610d2457610d23610c33565b5b6000610d3287828801610c93565b9450506020610d4387828801610cbf565b9350506040610d5487828801610cbf565b9250506060610d6587828801610cf5565b91505092959194509250565b610d7a81610cd4565b82525050565b6000602082019050610d956000830184610d71565b92915050565b600080600060608486031215610db457610db3610c33565b5b6000610dc286828701610cbf565b9350506020610dd386828701610cbf565b9250506040610de486828701610cbf565b9150509250925092565b610df781610c58565b82525050565b6000602082019050610e126000830184610dee565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081519050610e8581610ca8565b92915050565b600060208284031215610ea157610ea0610c33565b5b6000610eaf84828501610e76565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610ef282610cd4565b9150610efd83610cd4565b9250828203905081811115610f1557610f14610eb8565b5b92915050565b60008160601b9050919050565b6000610f3382610f1b565b9050919050565b6000610f4582610f28565b9050919050565b610f5d610f5882610c58565b610f3a565b82525050565b6000610f6f8285610f4c565b601482019150610f7f8284610f4c565b6014820191508190509392505050565b600081905092915050565b7fff00000000000000000000000000000000000000000000000000000000000000600082015250565b6000610fd0600183610f8f565b9150610fdb82610f9a565b600182019050919050565b6000819050919050565b6000819050919050565b61100b61100682610fe6565b610ff0565b82525050565b7f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f600082015250565b6000611047602083610f8f565b915061105282611011565b602082019050919050565b600061106882610fc3565b91506110748285610f4c565b6014820191506110848284610ffa565b6020820191506110938261103a565b91508190509392505050565b60006110aa82610cd4565b91506110b583610cd4565b92508282019050808211156110cd576110cc610eb8565b5b92915050565b60006dffffffffffffffffffffffffffff82169050919050565b6110f6816110d3565b811461110157600080fd5b50565b600081519050611113816110ed565b92915050565b600063ffffffff82169050919050565b61113281611119565b811461113d57600080fd5b50565b60008151905061114f81611129565b92915050565b60008060006060848603121561116e5761116d610c33565b5b600061117c86828701611104565b935050602061118d86828701611104565b925050604061119e86828701611140565b9150509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006111e282610cd4565b91506111ed83610cd4565b9250826111fd576111fc6111a8565b5b828204905092915050565b61121181610c58565b82525050565b600060408201905061122c6000830185611208565b6112396020830184611208565b939250505056fea2646970667358221220320ecc134e51eeaeb4e6096fb9a3b2070fc1fb1177daec547c4ccfed10a56a9364736f6c634300081a0033"; + "0x6111d5610052600b82828239805160001a6073146045577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100405760003560e01c806354ce67ae14610045578063c63585cc14610075575b600080fd5b61005f600480360381019061005a9190610c69565b6100a5565b60405161006c9190610cdf565b60405180910390f35b61008f600480360381019061008a9190610cfa565b610489565b60405161009c9190610d5c565b60405180910390f35b6000808573ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101179190610d8c565b905060008673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610166573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061018a9190610d8c565b90506060600267ffffffffffffffff8111156101a9576101a8610db9565b5b6040519080825280602002602001820160405280156101d75781602001602082028036833780820191505090505b50905086816000815181106101ef576101ee610de8565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050858160018151811061023e5761023d610de8565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060006102858487846104fb565b9050600367ffffffffffffffff8111156102a2576102a1610db9565b5b6040519080825280602002602001820160405280156102d05781602001602082028036833780820191505090505b50915087826000815181106102e8576102e7610de8565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050828260018151811061033757610336610de8565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050868260028151811061038657610385610de8565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060006103cd8588856104fb565b905080600182516103de9190610e46565b815181106103ef576103ee610de8565b5b602002602001015182600184516104069190610e46565b8151811061041757610416610de8565b5b6020026020010151116104515780600182516104339190610e46565b8151811061044457610443610de8565b5b602002602001015161047a565b81600183516104609190610e46565b8151811061047157610470610de8565b5b60200260200101515b95505050505050949350505050565b60008060006104988585610677565b915091508582826040516020016104b0929190610ec2565b604051602081830303815290604052805190602001206040516020016104d7929190610fbc565b6040516020818303038152906040528051906020012060001c925050509392505050565b6060600282511015610539576040517f20db826700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815167ffffffffffffffff81111561055457610553610db9565b5b6040519080825280602002602001820160405280156105825781602001602082028036833780820191505090505b509050828160008151811061059a57610599610de8565b5b60200260200101818152505060005b600183516105b79190610e46565b81101561066f5760008061060c878685815181106105d8576105d7610de8565b5b6020026020010151876001876105ee9190610ffe565b815181106105ff576105fe610de8565b5b6020026020010151610791565b9150915061063584848151811061062657610625610de8565b5b60200260200101518383610894565b846001856106439190610ffe565b8151811061065457610653610de8565b5b602002602001018181525050505080806001019150506105a9565b509392505050565b6000808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036106df576040517fcb1e7cfe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161061071957828461071c565b83835b8092508193505050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361078a576040517f78b507da00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250929050565b60008060006107a08585610988565b5090506000806107b1888888610aa2565b73ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156107fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061081f91906110b4565b506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff1691508273ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff161461087e578082610881565b81815b8095508196505050505050935093915050565b60008084036108cf576040517f098fb56100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008314806108de5750600082145b15610915576040517fbb55fd2700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061092c6103e586610b2990919063ffffffff16565b905060006109438483610b2990919063ffffffff16565b9050600061096e836109606103e889610b2990919063ffffffff16565b610b8990919063ffffffff16565b9050808261097c9190611136565b93505050509392505050565b6000808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036109f0576040517fbd969eb000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1610610a2a578284610a2d565b83835b8092508193505050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610a9b576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250929050565b60008373ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401610adf929190611176565b602060405180830381865afa158015610afc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b209190610d8c565b90509392505050565b600080831480610b4d5750818383850292508281610b4a57610b49611107565b5b04145b610b83576040517f5797276a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b92915050565b6000818301905082811015610bca576040517fa259879500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b92915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610c0082610bd5565b9050919050565b610c1081610bf5565b8114610c1b57600080fd5b50565b600081359050610c2d81610c07565b92915050565b6000819050919050565b610c4681610c33565b8114610c5157600080fd5b50565b600081359050610c6381610c3d565b92915050565b60008060008060808587031215610c8357610c82610bd0565b5b6000610c9187828801610c1e565b9450506020610ca287828801610c1e565b9350506040610cb387828801610c1e565b9250506060610cc487828801610c54565b91505092959194509250565b610cd981610c33565b82525050565b6000602082019050610cf46000830184610cd0565b92915050565b600080600060608486031215610d1357610d12610bd0565b5b6000610d2186828701610c1e565b9350506020610d3286828701610c1e565b9250506040610d4386828701610c1e565b9150509250925092565b610d5681610bf5565b82525050565b6000602082019050610d716000830184610d4d565b92915050565b600081519050610d8681610c07565b92915050565b600060208284031215610da257610da1610bd0565b5b6000610db084828501610d77565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610e5182610c33565b9150610e5c83610c33565b9250828203905081811115610e7457610e73610e17565b5b92915050565b60008160601b9050919050565b6000610e9282610e7a565b9050919050565b6000610ea482610e87565b9050919050565b610ebc610eb782610bf5565b610e99565b82525050565b6000610ece8285610eab565b601482019150610ede8284610eab565b6014820191508190509392505050565b600081905092915050565b7fff00000000000000000000000000000000000000000000000000000000000000600082015250565b6000610f2f600183610eee565b9150610f3a82610ef9565b600182019050919050565b6000819050919050565b6000819050919050565b610f6a610f6582610f45565b610f4f565b82525050565b7f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f600082015250565b6000610fa6602083610eee565b9150610fb182610f70565b602082019050919050565b6000610fc782610f22565b9150610fd38285610eab565b601482019150610fe38284610f59565b602082019150610ff282610f99565b91508190509392505050565b600061100982610c33565b915061101483610c33565b925082820190508082111561102c5761102b610e17565b5b92915050565b60006dffffffffffffffffffffffffffff82169050919050565b61105581611032565b811461106057600080fd5b50565b6000815190506110728161104c565b92915050565b600063ffffffff82169050919050565b61109181611078565b811461109c57600080fd5b50565b6000815190506110ae81611088565b92915050565b6000806000606084860312156110cd576110cc610bd0565b5b60006110db86828701611063565b93505060206110ec86828701611063565b92505060406110fd8682870161109f565b9150509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061114182610c33565b915061114c83610c33565b92508261115c5761115b611107565b5b828204905092915050565b61117081610bf5565b82525050565b600060408201905061118b6000830185611167565b6111986020830184611167565b939250505056fea2646970667358221220dadd3e100ef04c85d5a02036fa4da1104bb792971aa4fa9f47b428d6687d283564736f6c634300081a0033"; type SwapHelperLibConstructorParams = | [signer?: Signer]