Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: low
Invalid

Missing events for state changing functions

Summary

Missing events for state changes collectPresent and buyPresent. Events provide a human-readable summary of the key actions that occurred during the transaction, otherwise you would have to go into the transaction input to understand what happened.

+ event ExtraNiceClaim(address indexed person);
+ event NiceClaim(address indexed person);
+ event NFTBought(address indexed caller, address indexed receiver);
function collectPresent() external {
if (block.timestamp < CHRISTMAS_2023_BLOCK_TIME) revert SantasList__NotChristmasYet();
if (balanceOf(msg.sender) > 0) revert SantasList__AlreadyCollected();
if (s_theListCheckedOnce[msg.sender] == Status.NICE && s_theListCheckedTwice[msg.sender] == Status.NICE) {
_mintAndIncrement();
+ emit NiceClaim(msg.sender);
return;
} else if (s_theListCheckedOnce[msg.sender] == Status.EXTRA_NICE && s_theListCheckedTwice[msg.sender] == Status.EXTRA_NICE) {
_mintAndIncrement();
i_santaToken.mint(msg.sender);
+ emit ExtraNiceClaim(msg.sender);
return;
}
revert SantasList__NotNice();
}
function buyPresent(address presentReceiver) external {
i_santaToken.burn(presentReceiver);
_mintAndIncrement();
+ emit NFTBought(msg.sender, presentReceiver);
}
Updates

Lead Judging Commences

inallhonesty Lead Judge over 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.