Snowman Merkle Airdrop

First Flight #42
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Impact: low
Likelihood: low
Invalid

[GAS] Variables can be made immutable to save gas fees

[GAS] Variables not changed after constructor calls can be made immutable to save gas fees

Description

  • The s_buyFee and i_weth are being set in the constructor function and then never changed after that.

  • These variables can be set to immutable to reduce gas fees

@> uint256 public s_buyFee;
uint256 private immutable i_farmingOver;
@> IERC20 i_weth;

Risk

Likelihood:

  • Always

Impact:

  • Slightly higher gas fees

Recommended Mitigation

- uint256 public s_buyFee;
+ uint256 public immutable s_buyFee;
uint256 private immutable i_farmingOver;
- IERC20 i_weth;
+ IERC20 immutable i_weth;
Updates

Lead Judging Commences

yeahchibyke Lead Judge 5 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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