Christmas Dinner

First Flight #31
Beginner FriendlyFoundrySolidity
100 EXP
View results
Submission Details
Severity: low
Invalid

Non-Constant State Variable Declaration

Description: The deadlineSet state variable is initialized at deployment but could be declared as a constant to save gas.

bool public deadlineSet = false;

Impact:

  • Unnecessary gas consumption

  • Suboptimal contract efficiency

  • Higher storage costs

Recommended Mitigation: For variables that never change post-deployment, use the constant keyword:

bool public constant INITIAL_DEADLINE_SET = false;

If the variable needs to be mutable, ensure this is documented and intentional.

Updates

Lead Judging Commences

0xtimefliez Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement
0xtimefliez Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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