Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce number of functions in the Authorizer #986

Closed
nventuro opened this issue Nov 3, 2021 · 0 comments · Fixed by #1109
Closed

Reduce number of functions in the Authorizer #986

nventuro opened this issue Nov 3, 2021 · 0 comments · Fixed by #1109

Comments

@nventuro
Copy link
Contributor

nventuro commented Nov 3, 2021

The current iteration simply inherits AccessControl, which has grantRole and revokeRole, and adds batched versions (grantRoles(roles[], user), grantRolesToMany(roles[], users[], same for revoking).

With #980, we can now also add and revoke roles globally. I argue that having so many functions is a) error-prone both during development and when using the contract, and b) not really necessary, since we can always have batching at the caller level. For example, the current admin account is a Gnosis Safe multisig, which natively supports this.

We'll already introduce changes to AccessControl in #985: I propose we also do away with grantRole(role, account) and grantRoleToMany(roles[], accounts[]), and just keep grantRoles(roles[], where[], account) and grantRolesGlobally(roles[], account) (same for revoke).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant