feat: Add transferFromNeeded to non permit2 methods
This will block an attempt to transfer from the user when we expect the funds to already be in the router. chores: - add docs - in EncodingContext, rename transfer to transfer_type Took 58 minutes
This commit is contained in:
@@ -85,7 +85,15 @@ contract TychoRouterTestProtocolIntegration is TychoRouterTestSetup {
|
||||
vm.startPrank(ALICE);
|
||||
IERC20(USDE_ADDR).approve(tychoRouterAddr, amountIn);
|
||||
tychoRouter.singleSwap(
|
||||
amountIn, USDE_ADDR, WBTC_ADDR, 118280, false, false, ALICE, swap
|
||||
amountIn,
|
||||
USDE_ADDR,
|
||||
WBTC_ADDR,
|
||||
118280,
|
||||
false,
|
||||
false,
|
||||
ALICE,
|
||||
true,
|
||||
swap
|
||||
);
|
||||
|
||||
assertEq(IERC20(WBTC_ADDR).balanceOf(ALICE), 118281);
|
||||
|
||||
Reference in New Issue
Block a user