Eggstravaganza

First Flight #37
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: low
Invalid

Used literal value instead of constant in `EggHuntGame::setEggFindThreshold`

Description: It's better to use a constant state variable for the maximum eggFindThershold value in the EggHuntGame contract for better readability and cleaner code.

Recommended Mitigation:

+ uint256 public constant MAX_THRESHOLD_VALUE = 100;
...
function setEggFindThreshold(uint256 newThreshold) external onlyOwner {
- require(newThreshold <= 100, "Threshold must be <= 100");
+ require(newThreshold <= MAX_THRESHOLD_VALUE, "Threshold must be <= 100");
eggFindThreshold = newThreshold;
}
Updates

Lead Judging Commences

m3dython Lead Judge 4 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.