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

Extend supply permissions #4652

Closed
4 tasks
fedekunze opened this issue Jul 1, 2019 · 2 comments
Closed
4 tasks

Extend supply permissions #4652

fedekunze opened this issue Jul 1, 2019 · 2 comments
Assignees
Milestone

Comments

@fedekunze
Copy link
Collaborator

Summary

The current permission logic on the supply is rigid. Extend it to allow users to define multiple custom permissions for a ModuleAccount

Problem Definition

As part of #4255, @alexanderbez suggested extending the current rigid permission logic to allow modules to register multiple permissions with their own functions:

I foresee the ability to register arbitrary permissionS with arbitrary function calls for each permission (e.g. burn coins)

Proposal

  • Change ModuleAccount Permission and extend it to have multiple Permissions as []string.
  • Register a map to the supply keeper with name as Key and PermissionsAddress as value.

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@alexanderbez
Copy link
Contributor

Yes, precisely. What I had in mind is the following:

The supply keeper takes a map[string][]string which maps module account names to a set of permissions. Each name is also mapped to an underlying address (I think this is already the case?).

Furthermore, the supply keeper right now has MintCoins and BurnCoins. We should think of ways we can make it easier to extend this functionality by registering new "methods" with their corresponding permission(s).

@fedekunze
Copy link
Collaborator Author

closed via #4679

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

No branches or pull requests

3 participants