feat: Add transfer out for Uniswap V4

Add transfer in Executor and pass receiver address in encoding
This is done by using the TAKE action instead of TAKE_ALL

--- don't change below this line ---
ENG-4315 Took 1 hour 36 minutes

Took 2 minutes
This commit is contained in:
Diana Carvalho
2025-04-15 16:21:23 +01:00
parent 328a281a44
commit ec87969aa6
7 changed files with 43 additions and 27 deletions

View File

@@ -423,6 +423,7 @@ contract TychoRouterSplitSwapTest is TychoRouterTestSetup {
USDT_ADDR,
true,
TokenTransfer.TransferType.TRANSFER_PERMIT2_TO_ROUTER,
ALICE,
pools
);
@@ -471,7 +472,7 @@ contract TychoRouterSplitSwapTest is TychoRouterTestSetup {
});
bytes memory protocolData = UniswapV4Utils.encodeExactInput(
USDE_ADDR, WBTC_ADDR, true, TokenTransfer.TransferType.NONE, pools
USDE_ADDR, WBTC_ADDR, true, TokenTransfer.TransferType.NONE, ALICE, pools
);
bytes memory swap = encodeSplitSwap(
@@ -483,7 +484,7 @@ contract TychoRouterSplitSwapTest is TychoRouterTestSetup {
tychoRouter.exposedSplitSwap(amountIn, 2, pleEncode(swaps));
assertEq(IERC20(WBTC_ADDR).balanceOf(tychoRouterAddr), 102718);
assertEq(IERC20(WBTC_ADDR).balanceOf(ALICE), 102718);
}
function testSplitInputCyclicSwapInternalMethod() public {