diff --git a/test/shared/RoutingTestHelpers.sol b/test/shared/RoutingTestHelpers.sol index 1687cb34..1852804b 100644 --- a/test/shared/RoutingTestHelpers.sol +++ b/test/shared/RoutingTestHelpers.sol @@ -96,38 +96,6 @@ contract RoutingTestHelpers is Test { key2 = createPoolWithLiquidity(currency2, currency3, address(0)); } - // function deployMintAndApprove2Currencies() internal returns (Currency, Currency) { - // Currency _currencyA = deployMintAndApproveCurrency(); - // Currency _currencyB = deployMintAndApproveCurrency(); - - // (currency0, currency1) = - // SortTokens.sort(MockERC20(Currency.unwrap(_currencyA)), MockERC20(Currency.unwrap(_currencyB))); - // return (currency0, currency1); - // } - - // function deployMintAndApproveCurrency() internal returns (Currency currency) { - // MockERC20 token = deployTokens(1, 2 ** 255)[0]; - - // // address[9] memory toApprove = [ - // // address(swapRouter), - // // address(swapRouterNoChecks), - // // address(modifyLiquidityRouter), - // // address(modifyLiquidityNoChecks), - // // address(donateRouter), - // // address(takeRouter), - // // address(claimsRouter), - // // address(nestedActionRouter.executor()), - // // address(actionsRouter) - // // ]; - // address[2] memory toApprove = [address(modifyLiquidityRouter), address(nestedActionRouter.executor())]; - - // for (uint256 i = 0; i < toApprove.length; i++) { - // token.approve(toApprove[i], Constants.MAX_UINT256); - // } - - // return Currency.wrap(address(token)); - // } - function deployTokens(uint8 count, uint256 totalSupply) internal returns (MockERC20[] memory tokens) { tokens = new MockERC20[](count); for (uint8 i = 0; i < count; i++) { @@ -237,87 +205,6 @@ contract RoutingTestHelpers is Test { outputBalanceAfter = outputCurrency.balanceOfSelf(); } - // function initPool( - // Currency _currency0, - // Currency _currency1, - // IHooks hooks, - // uint24 fee, - // uint160 sqrtPriceX96, - // bytes memory initData - // ) internal returns (PoolKey memory _key, PoolId id) { - // _key = PoolKey(_currency0, _currency1, fee, fee.isDynamicFee() ? int24(60) : int24(fee / 100 * 2), hooks); - // id = _key.toId(); - // manager.initialize(_key, sqrtPriceX96, initData); - // } - - // function initPool( - // Currency _currency0, - // Currency _currency1, - // IHooks hooks, - // uint24 fee, - // int24 tickSpacing, - // uint160 sqrtPriceX96, - // bytes memory initData - // ) internal returns (PoolKey memory _key, PoolId id) { - // _key = PoolKey(_currency0, _currency1, fee, tickSpacing, hooks); - // id = _key.toId(); - // manager.initialize(_key, sqrtPriceX96, initData); - // } - - // function initPoolAndAddLiquidity( - // Currency _currency0, - // Currency _currency1, - // IHooks hooks, - // uint24 fee, - // uint160 sqrtPriceX96, - // bytes memory initData - // ) internal returns (PoolKey memory _key, PoolId id) { - // (_key, id) = initPool(_currency0, _currency1, hooks, fee, sqrtPriceX96, initData); - // modifyLiquidityRouter.modifyLiquidity{value: msg.value}(_key, LIQUIDITY_PARAMS, ZERO_BYTES); - // } - - // function initPoolAndAddLiquidityETH( - // Currency _currency0, - // Currency _currency1, - // IHooks hooks, - // uint24 fee, - // uint160 sqrtPriceX96, - // bytes memory initData, - // uint256 msgValue - // ) internal returns (PoolKey memory _key, PoolId id) { - // (_key, id) = initPool(_currency0, _currency1, hooks, fee, sqrtPriceX96, initData); - // modifyLiquidityRouter.modifyLiquidity{value: msgValue}(_key, LIQUIDITY_PARAMS, ZERO_BYTES); - // } - - // function initializeManagerRoutersAndPoolsWithLiq( - // IHooks hooks, - // address payable _routerAddr, - // address payable _managerAddr, - // address payable _pos_managerAddr - // ) internal { - // router = MockV4Router(_routerAddr); - // manager = IPoolManager(_managerAddr); - // swapRouter = PoolSwapTest(_managerAddr); - - // modifyLiquidityRouter = new PoolModifyLiquidityTest(manager); - // nestedActionRouter = new PoolNestedActionsTest(manager); - // // // deployFreshManagerAndRouters(); - // // // sets the global currencies and key - // deployMintAndApprove2Currencies(); - // // (key,) = initPoolAndAddLiquidity(currency0, currency1, hooks, 3000, SQRT_PRICE_1_1, ZERO_BYTES); - // // nestedActionRouter.executor().setKey(key); - // // (nativeKey,) = initPoolAndAddLiquidityETH( - // // CurrencyLibrary.ADDRESS_ZERO, currency1, hooks, 3000, SQRT_PRICE_1_1, ZERO_BYTES, 1 ether - // // ); - // // uninitializedKey = key; - // // uninitializedNativeKey = nativeKey; - // // uninitializedKey.fee = 100; - // // uninitializedNativeKey.fee = 100; - // } - - // to receive refunds of spare eth from test helpers - // receive() external payable {} - function _getExactInputParams(Currency[] memory _tokenPath, uint256 amountIn) internal pure