Eggstravaganza

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

Event is missing `indexed` fields

Summary

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.

Vulnerability Details

There are 5 instances of this issue:

File: src/EggHuntGame.sol
28: event GameStarted(uint256 startTime, uint256 endTime);
29: event EggFound(address indexed player, uint256 tokenId, uint256 totalEggsFound);
30: event GameEnded(uint256 endTime);
File: src/EggVault.sol
16: event EggDeposited(address indexed depositor, uint256 tokenId);
17: event EggWithdrawn(address indexed withdrawer, uint256 tokenId);

Tools Used

Manual review

Updates

Lead Judging Commences

m3dython Lead Judge 8 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Event Emission

Standard practice for clarifying important contract behaviors

Support

FAQs

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

Give us feedback!