Open
Description
Unsafe ERC20 Operations should not be used
To Reproduce
Steps to reproduce the behavior:
- Clone repo:
https://github.com/smartcontractkit/ccip
- Run aderyn with this foundry profile ccip
Report states
Found in src/v0.8/ccip/offRamp/EVM2EVMOffRamp.sol Line: 638
abi.encodeWithSelector(IERC20.transfer.selector, receiver, localAmount),
But the call is actually handled in a similar (but not identical) way to safeERC20.
(success, returnData,) = CallWithExactGas._callWithExactGasSafeReturnData(
abi.encodeWithSelector(IERC20.transfer.selector, receiver, localAmount),
localToken,
s_dynamicConfig.maxTokenTransferGas,
Internal.GAS_FOR_CALL_EXACT_CHECK,
Internal.MAX_RET_BYTES
);
Not sure if this is a true false negative, but I could see a case being made to not trigger on cases like this