In checkTwice function, an unsafe check is used to detect user's status in first check.
If s_theListCheckedOnce does not have a key of certain address, s_theListCheckedOnce[person] by default equals 0. In enum Status, NICE is also equal to 0. Thus, all addresses not in s_theListCheckedOnce has a status of NICE by default.
checkTwice function can assign s_theListCheckedTwice[address] to NICE for those addresses not a key in s_theListCheckedOnce
Foundry
change the first element in enum Status to be "UNKOWN" instead of "NICE"
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.