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

Separate Groups from Multisigs #80

Closed
ethanfrey opened this issue Sep 10, 2020 · 0 comments · Fixed by #150
Closed

Separate Groups from Multisigs #80

ethanfrey opened this issue Sep 10, 2020 · 0 comments · Fixed by #150
Assignees
Labels
multisig Related to a multisig epic
Milestone

Comments

@ethanfrey
Copy link
Member

ethanfrey commented Sep 10, 2020

Builds on #8 and #79

Aim:

Often we will want to use one group of actors in two different multisigs. Some actions may need 50% (to send tokens), others may need 67% (to add new members). Rather than try to keep the groups of two different multisigs in sync, we can create a group contract that just maintains a set of voters and has one contract that can update it.

The multisig contracts can then query this group contract when they want to check if the person is eligible to vote and how many votes they have.


Details:

Create a new contract called cw3-flex-multisig. This works like cw3-fixed-multisig, except it does not store group membership inside. Instead it gets an address of a cw4-group contract (actually any cw4 compatible contract) on init. Upon starting a proposal, query the total weight from the group to properly initialize the proposal. And upon each vote, check membership via the cw4 contract. You can use cw4/helpers.rs to provide these calls.

You can no longer use the test cases as written in cw3-fixed-multisig as they require a mock querier to call into other contracts. Please use #137 as a reference how to write such tests and do feel free to simplify the API. In the end, you should be able to port over most of the cw3-fixed-multisig logic, so let's see how we can make multi-tests simple enough to set up - maybe best to just copy it and then start trimming it out.

Note: We assume the group is static - or at least does not change during an open proposal. That adds a lot of complexity and we will address that in a later issue

@ethanfrey ethanfrey added this to the MultiSig milestone Sep 10, 2020
@ethanfrey ethanfrey mentioned this issue Oct 16, 2020
3 tasks
@ethanfrey ethanfrey modified the milestones: MultiSig, v0.4.0 Nov 4, 2020
@ethanfrey ethanfrey self-assigned this Nov 7, 2020
@ethanfrey ethanfrey added the multisig Related to a multisig epic label Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
multisig Related to a multisig epic
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant