Expand description
CW4 is a spec for storing group membership, which can be combined with CW3 multisigs. The purpose is to store a set of members/voters that can be accessed to determine permissions in another section.
Since this is often deployed as a contract pair, we expect this
contract to often be queried with QueryRaw
and the internal
layout of some of the data structures becomes part of the public API.
Implementations may add more data structures, but at least
the ones laid out here should be under the specified keys and in the
same format.
In this case, a cw3 contract could read an external group contract with no significant cost besides reading local storage. However, updating that group contract (if allowed), would be an external message and will be charged as part of the overhead for each contract.
For more information on this specification, please check out the README.
Structs§
- Admin
Response - Cw4Contract
- Cw4Contract is a wrapper around Addr that provides a lot of helpers for working with cw4 contracts
- Hooks
Response - Member
- A group member has a weight associated with them. This may all be equal, or may have meaning in the app that makes use of the group (eg. voting power)
- Member
Changed Hook Msg - MemberChangedHookMsg should be de/serialized under
MemberChangedHook()
variant in a ExecuteMsg. This contains a list of all diffs on the given transaction. - Member
Diff - MemberDiff shows the old and new states for a given cw4 member They cannot both be None. old = None, new = Some -> Insert old = Some, new = Some -> Update old = Some, new = None -> Delete
- Member
List Response - Member
Response - Total
Weight Response
Enums§
Constants§
- MEMBERS_
CHANGELOG - MEMBERS_
CHECKPOINTS - MEMBERS_
KEY - TOTAL_
KEY - TOTAL_KEY is meant for raw queries
- TOTAL_
KEY_ CHANGELOG - TOTAL_
KEY_ CHECKPOINTS
Functions§
- member_
key - member_key is meant for raw queries for one member, given address