You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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 likecw3-fixed-multisig
, except it does not store group membership inside. Instead it gets an address of acw4-group
contract (actually anycw4
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 thecw4
contract. You can usecw4/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 thecw3-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
The text was updated successfully, but these errors were encountered: