Trick or Treat

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

Event is missing `indexed` fields

Index event fields make the field more quickly accessible to off-chain tools that parse events. However, note that each index field costs extra gas during emission, so it's not necessarily best to index the maximum allowed per event (three fields). Each event should use three indexed fields if there are three or more fields, and gas usage is not particularly of concern for the events in question. If there are fewer than three fields, all of the fields should be indexed.

  • Found in src/TrickOrTreat.sol Line: 25

    event TreatAdded(string name, uint256 cost, string metadataURI);
  • Found in src/TrickOrTreat.sol Line: 26

    event Swapped(address indexed user, string treatName, uint256 tokenId);
  • Found in src/TrickOrTreat.sol Line: 27

    event FeeWithdrawn(address owner, uint256 amount);
Updates

Appeal created

bube 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.