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

Low Risk Findings

[L-01] Missing Events

Summary

The functions SantaList::collectPresent and SantaList::buyPresent should emit their own events to differentiate what operations are executed in the contract.

Recommendations

  • SantaList::collectPresent should emit a NicePresentCollected or a ExtraNicePresentCollected depending of the status of the user.

  • SantaList::buyPresent should emit a PresentBought event.

[L-02] Mismatch Name for Enum Member

Summary

According to the docs - users can have a NICE, EXTRA_NICE, NAUGHTY or UNKNOWN status but instead of the latter, the Status enum contains a NOT_CHECKED_TWICE member.

Recommendations

Rename NOT_CHECKED_TWICE member to UNKNOWN to match the documentation.

[L-03] No Status validation for presentReceiver

Summary

From the docs:

EXTRA_NICE users can collect their NFT and they are given SantaTokens. The SantaToken is an ERC20 that can be used to buy the NFT for their NAUGHTY or UNKNOWN friends.

But there's no check in SantasList::buyPresent to verify the status of the receiver.

Recommendation

Check presentReceiver status.

function buyPresent(address presentReceiver) external {
+ if(s_theListCheckedOnce[presentReceiver] != Status.NAUGHTY && s_theListCheckedOnce[presentReceiver] != Status.NOT_CHECKED_TWICE) return
i_santaToken.burn(presentReceiver);
_mintAndIncrement();
}
Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
pacelli Submitter
over 1 year ago
equious Auditor
over 1 year ago
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.