Enums default to their first element. Therefore, the default status of any address in both s_theListCheckedOnce
and s_theListCheckedTwice
is NICE
. This allows any user who has not been checked by Santa via checkList
and checkTwice
to call collectPresent
and pass it's status checks, claiming a free NFT.
Add this test to the existing test suite.
Users who have not been checked by Santa can collect a NFT present after Christmas, even though they should not be able to.
Manual Review
Set the first type to be status NOT_CHECKED_TWICE
. You could also default all users to NAUGHTY
. Either will successfully revert during the NICE
status check.
In Solidity the first element of an enum is the default value. In Santa's List, the means each person is mapped by default to 'NICE'.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.