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

L-02. Unnecessary modifier for addToTheGang

Summary

The method Laundrette::addToTheGang has useless modifier onlyRole("gangmember") because it already has isGodFather

Vulnerability Details

Since the modifier isGodFather modifier checks if the user is GodFather it's useless to check if the user is onlyRole("gangmember").

Impact

Unnecessary code.

Tools Used

Manual Review

Recommendations

Remove the onlyRole("gangmember") for Laundrette::addToTheGang.

- function addToTheGang(address account) external onlyRole("gangmember") isGodFather {
+ function addToTheGang(address account) external isGodFather {
kernel.grantRole(Role.wrap("gangmember"), account);
}
Updates

Lead Judging Commences

n0kto Lead Judge about 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.