20,000 USDC
View results
Submission Details
Severity: gas
Valid

## [G-31] Unused named return variables without optimizer waste gas

Summary

[G-31] Unused named return variables without optimizer waste gas

Consider changing the variable to be an unnamed one, since the variable is never assigned, nor is it returned by name. If the optimizer is not turned on, leaving the code as it is will also waste gas for the stack variable

file: /src/interfaces/ISwapRouter.sol
16 function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut);

https://github.com/Cyfrin/2023-07-beedle/blob/main/src/interfaces/ISwapRouter.sol#L16

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.