Santa's List

AI First Flight #3
Beginner FriendlyFoundry
EXP
View results
Submission Details
Impact: low
Likelihood: low
Invalid

No Events Emitted in `collectPresent` or `buyPresent`

[L-3] No Events Emitted in collectPresent or buyPresent

Description

  • checkList and checkTwice both emit events, but collectPresent and buyPresent are completely silent. Off-chain indexers, front-ends, and analytics have no way to track present collection or purchases without scanning all ERC721 Transfer events manually.

Recommended Mitigation

+ event PresentCollected(address indexed person, uint256 indexed tokenId);
+ event PresentBought(address indexed buyer, address indexed receiver, uint256 indexed tokenId);
function collectPresent() external {
// ...
_mintAndIncrement();
+ emit PresentCollected(msg.sender, s_tokenCounter - 1);
}
function buyPresent(address presentReceiver) external {
// ...
+ emit PresentBought(msg.sender, presentReceiver, s_tokenCounter - 1);
}
Updates

Lead Judging Commences

ai-first-flight-judge Lead Judge about 2 hours ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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

Give us feedback!