feat: Add TokenTransfer class to BalancerV2
- This needed to be in BalancerV2 so that the executor can also take care of transfers from the user into the tycho router, to avoid having transfer actions mixed between the router and executors
This commit is contained in:
committed by
Diana Carvalho
parent
462be5463b
commit
3a73fef933
@@ -64,7 +64,15 @@ contract CurveExecutor is IExecutor, TokenTransfer {
|
||||
TransferType transferType
|
||||
) = _decodeData(data);
|
||||
|
||||
_transfer(tokenIn, msg.sender, pool, amountIn, transferType);
|
||||
_transfer(
|
||||
tokenIn,
|
||||
msg.sender,
|
||||
// Receiver can never be the pool, since the pool expects funds in the router contract
|
||||
// Thus, this call will only ever be used to transfer funds from the user into the router.
|
||||
address(this),
|
||||
amountIn,
|
||||
transferType
|
||||
);
|
||||
|
||||
if (tokenApprovalNeeded && tokenIn != nativeToken) {
|
||||
// slither-disable-next-line unused-return
|
||||
|
||||
Reference in New Issue
Block a user