This is something I’ve been wanting to do for a while: to reduce the potential for human error, to more more succinctly express the differences and similarities between the different roles, and because I have a taste for bad ideas
In the WhitelistedCrowdsale topic I noticed a couple things that may differ from role to role, requiring parametrization. These are:
Which accounts are able to assign the role? By default, these are accounts with the same role (e.g. accounts with the
Minterrole can create other minters), but in some cases it will be a different role that can do it (like in the case of
Which accounts are able to remove the role? So far we’ve kept the function
internal, leaving it up to our users to implement a
publicone and call it if they need to, but in some cases (again,
Whitelistee) a ‘manager’ account may have the ability to remove others by default.
Is the role assigned at creation time to the deployer account? For some roles (especially those managed by a different role, like
Whitelistee) this may not be true.
Can the role be renounced? We may have roles that shouldn’t allow this (e.g. some sort of blacklist)
Additionally, we could include some sort of description (e.g. ‘accounts with this role can mint new tokens’) to also improve the documentation (also autogenerated).