14 releases (3 stable)

3.0.0 Feb 10, 2021
2.0.1 Jan 11, 2021
2.0.0 Sep 22, 2020
2.0.0-rc5 Jul 24, 2020
2.0.0-alpha.5 Mar 24, 2020

#1029 in Magic Beans

Download history 155/week @ 2021-08-07 231/week @ 2021-08-14 164/week @ 2021-08-21 182/week @ 2021-08-28 116/week @ 2021-09-04 374/week @ 2021-09-11 162/week @ 2021-09-18 191/week @ 2021-09-25 180/week @ 2021-10-02 198/week @ 2021-10-09 104/week @ 2021-10-16 134/week @ 2021-10-23 143/week @ 2021-10-30 137/week @ 2021-11-06 33/week @ 2021-11-13 87/week @ 2021-11-20

1,462 downloads per month

Apache-2.0

1.5MB
26K SLoC

Collective system: Members of a set of account IDs can make their collective feelings known through dispatched calls from one of two specialized origins.

The membership can be provided in one of two ways: either directly, using the Root-dispatchable function set_members, or indirectly, through implementing the ChangeMembers. The pallet assumes that the amount of members stays at or below MaxMembers for its weight calculations, but enforces this neither in set_members nor in change_members_sorted.

A "prime" member may be set to help determine the default vote behavior based on chain config. If PreimDefaultVote is used, the prime vote acts as the default vote in case of any abstentions after the voting period. If MoreThanMajorityThenPrimeDefaultVote is used, then abstentations will first follow the majority of the collective voting, and then the prime member.

Voting happens through motions comprising a proposal (i.e. a curried dispatchable) plus a number of approvals required for it to pass and be called. Motions are open for members to vote on for a minimum period given by MotionDuration. As soon as the needed number of approvals is given, the motion is closed and executed. If the number of approvals is not reached during the voting period, then close may be called by any account in order to force the end the motion explicitly. If a prime member is defined then their vote is used in place of any abstentions and the proposal is executed if there are enough approvals counting the new votes.

If there are not, or if no prime is set, then the motion is dropped without being executed.

License: Apache-2.0

Dependencies

~3.5–6MB
~118K SLoC

6N$`