Enum Status
has incorrect default value
SantasList::Status
enum has NICE, EXTRA_NICE, NAUGHTY, NOT_CHECKED_TWICE as possible values. The issue is, only Santa can give you one of the NICE or EXTRA_NICE status. As this enum is used as the value both mappings s_theListCheckedOnce
and s_theListCheckedTwice
, all addresses will have default value NICE
.
Additionally, NOT_CHECKED_TWICE
status has no use.
HIGH. Breaks main protocol functionality.
Manual Review
Consider updating the enum declaration as follows:
This will give `NAUGHTY as the default status, and then have the other 2 status to be set by Santa.
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.