Merge branch 'refs/heads/main' into feature/gas-optimization

# Conflicts:
#	foundry/src/Dispatcher.sol
#	foundry/test/executors/CurveExecutor.t.sol

Took 4 minutes

Took 12 seconds
This commit is contained in:
Diana Carvalho
2025-04-22 16:17:45 +01:00
9 changed files with 207 additions and 96 deletions

View File

@@ -48,7 +48,7 @@ contract BalancerV2Executor is IExecutor, TokenTransfer {
if (needsApproval) {
// slither-disable-next-line unused-return
tokenIn.approve(VAULT, type(uint256).max);
tokenIn.forceApprove(VAULT, type(uint256).max);
}
IVault.SingleSwap memory singleSwap = IVault.SingleSwap({

View File

@@ -81,7 +81,7 @@ contract CurveExecutor is IExecutor, TokenTransfer {
if (tokenApprovalNeeded && tokenIn != nativeToken) {
// slither-disable-next-line unused-return
IERC20(tokenIn).approve(address(pool), type(uint256).max);
IERC20(tokenIn).forceApprove(address(pool), type(uint256).max);
}
/// Inspired by Curve's router contract: https://github.com/curvefi/curve-router-ng/blob/9ab006ca848fc7f1995b6fbbecfecc1e0eb29e2a/contracts/Router.vy#L44