After the time has passed any address who was not listed as the NAUGHTY user can claim nice tokens. This is possible because santa cannot checklist every possible address on the blockchain as NAUGHTY user and because by default all address is a NICE user. Because of how enum works,
if a user is not assigned any status then their status will be the first valur of the enum which is NICE.
A user can create multiple accounts and mint as many NICE tokens as he likes.
manual, foundry
paste this code in the SantasListTest.t.sol and run forge test --mt testAnyoneCanCollectPresent
.
change the enum to :
so that the default status will be NOT_CHECKED_TWICE instead of NICE.
Now we can run the test again and confirm that the transaction reverts.
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.