All users are marked as being NICE by default, regardless of whether or not they have been checked yet.
In Solidity, if the key in a mapping
has not yet been set, the zero (i.e. default) value for the type will be returned. In the case of the Status
enum, the zero value is the first value of the enum, which is NICE
.
Example:
Users that have not been checked at all will be able to collect a present.
Foundry
Add a NOT_CHECKED
value for the Status
enum as the first enum value
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.