#prime #member #vote #set #voting #account-id #collective

no-std pallet-collective

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

54 releases (major breaking)

38.0.0 Sep 26, 2024
37.0.0 Jul 18, 2024
36.0.0 Jul 12, 2024
35.0.0 Jun 24, 2024
2.0.0-alpha.5 Mar 24, 2020

#1 in #collective

Download history 662/week @ 2024-07-02 1085/week @ 2024-07-09 1317/week @ 2024-07-16 1046/week @ 2024-07-23 1214/week @ 2024-07-30 993/week @ 2024-08-06 1364/week @ 2024-08-13 1675/week @ 2024-08-20 1055/week @ 2024-08-27 563/week @ 2024-09-03 1284/week @ 2024-09-10 1172/week @ 2024-09-17 1892/week @ 2024-09-24 1683/week @ 2024-10-01 1364/week @ 2024-10-08 1471/week @ 2024-10-15

6,714 downloads per month
Used in 18 crates (8 directly)

Apache-2.0

2.5MB
46K 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 PrimeDefaultVote is used, the prime vote acts as the default vote in case of any abstentions after the voting period. If MoreThanMajorityThenPrimeDefaultVote is used, then abstentions will first follow the majority of the collective voting, and then the prime member.

Voting happens through motions comprising a proposal (i.e. a 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 required 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 instead 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 member is set, then the motion is dropped without being executed.

License: Apache-2.0

Release

Polkadot SDK stable2409

Dependencies

~17–32MB
~521K SLoC