fix: Small misc improvements from audit

- In RestrictTransferFrom:
  - Compare tokenIn with tokenIn from storage
  - Correct docstrings
  - Recompute storage slots with new names
  - Rename transferFromNeeded to isTransferFromAllowed
  - Don't track amount spent but subtract from amount allowed
- In TychoRouter: Rename transferFromNeeded to isTransferFromAllowed

Took 32 minutes
This commit is contained in:
Diana Carvalho
2025-05-22 10:52:00 +01:00
parent 66ec935d49
commit 1f26fbce14
3 changed files with 39 additions and 35 deletions

View File

@@ -318,7 +318,7 @@ contract TychoRouterSingleSwapTest is TychoRouterTestSetup {
amountIn // attempted amount
)
);
uint256 amountOut = tychoRouter.singleSwap(
tychoRouter.singleSwap(
amountIn,
WETH_ADDR,
DAI_ADDR,