Open code423n4 opened 3 years ago
Unfortunately OpenZeppelin didn't make hasRole
virtual so it can't be overridden, which is why I can't specify it directly in the interface and am forced to create such a useless checkPermissions
function.
However I can see the benefit of having this function so I'll add it in there but have to name it something else.
Handle
hickuphh3
Vulnerability details
Impact
It might be operationally easier (eg. reading permissions via etherscan, saves a few seconds having to search for the bytes32 constant and copy its value) to take in the role of type
string
instead ofbytes32
. It also has an added benefit of overloading thehasRole()
function, where overriding was desired.Recommended Mitigation Steps
Perhaps add it as an additional function to avoid having to change all
treasury.checkPermissions()
function calls (since the role input has to be modified too).