Description:
Upon deployment, the godfather
lacks the gangmember
role, hindering their ability to use Laundrette::addToTheGang
to add new members to the gang.
Impact:
While the godfather
can eventually acquire the gangmember
role by first becoming the admin, granting themselves the role, and then reverting to the Laundrette
admin, this process is a hassle. Removing the gangmember
access control or assigning it to the godfather
during deployment would streamline operations.
Proof of Concept:
Include this test in Laundrette.t.sol
to demonstrate the issue:
Recommended Mitigation:
To resolve this, consider removing the onlyRole("gangmember")
access control since the isGodFather
check is sufficient. Alternatively, if both checks are deemed necessary, assign the gangmember
role to the godfather
during deployment.
Fix 1: Remove the onlyRole("gangmember")
requirement.
Fix 2: Assign the gangmember
role to the godfather
during deployment.
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.