Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Valid

problem with mapping variables

Summary

Because the default value for enum in mapping is 0, all the addresses will be NICE without Santa checks

Recommendations

change Status enum like this:

enum Status {
NOT_CHECKED,
NICE,
EXTRA_NICE,
NAUGHTY
}
Updates

Lead Judging Commences

inallhonesty Lead Judge
over 1 year ago
inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

default status is 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'.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.