Mystery Box

First Flight #25
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: low
Invalid

To save gas, the require statement with a text message can be rewritten using a custom error approach.

The require statement is gas consuming and can be repleaced by custom error approach or the if and revertconstruction.

Recommended Mitigation:

// @audit declearing error
error MysteryBox__OnlyOwnerCanSetPrice();
// @audit using error
require(msg.sender == owner, MysteryBox__OnlyOwnerCanSetPrice)
Updates

Appeal created

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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

Give us feedback!