Beginner FriendlyDeFiFoundry
100 EXP
View results
Submission Details
Severity: low
Invalid

Hardcoded values everywhere

Summary

Some very important values that are used as permission role names and also core Module and Policy names are hardcoded whenever used as opposed to being constants and defined just the once.

Vulnerability Details

This increases the chance of typos in the codebase and logic errors as a result.

Impact

None, but had to manually check all the usages to make sure they were ok.

Tools Used

My eyes and a search function within my IDE.

Recommendations

Put all these values into CONSTANTS and use the constant instead. An exmaple of the hardcoded keycodes is below.

bytes5 public constant MONEY_MODULE = "MONEY";
...
dependencies[0] = toKeycode(MONEY_MODULE);
Updates

Lead Judging Commences

n0kto Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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