[][src]Crate 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.

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.

A "prime" member may be set allowing their vote to act as the default vote in case of any abstentions after the voting period.

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.

Structs

DefaultInstance

Default module instance

EnsureMember
EnsureMembers
EnsureProportionAtLeast
EnsureProportionMoreThan
GenesisConfig
Instance0

Module instance

Instance1

Module instance

Instance2

Module instance

Instance3

Module instance

Instance4

Module instance

Instance5

Module instance

Instance6

Module instance

Instance7

Module instance

Instance8

Module instance

Instance9

Module instance

Instance10

Module instance

Instance11

Module instance

Instance12

Module instance

Instance13

Module instance

Instance14

Module instance

Instance15

Module instance

Members

The current members of the collective. This is stored sorted (just by value).

Module
Prime

The member who provides the default vote for any other members that do not vote before the timeout. If None, then no member has that privilege.

ProposalCount

Proposals so far.

ProposalOf

Actual proposal for a given hash, if it's current.

Proposals

The hashes of the active proposals.

Votes

Info for keeping track of a motion being voted on.

Voting

Votes on a given proposal, if it is ongoing.

Enums

Call

Dispatchable calls.

Error
RawEvent

Events for this module.

RawOrigin

Origin for the collective module.

Traits

Instance

Tag a type as an instance of a module.

Trait

Functions

ensure_members

Ensure that the origin o represents at least n members. Returns Ok or an Err otherwise.

Type Definitions

Event

RawEvent specialized for the configuration Trait

MemberCount

A number of members.

Origin

Origin for the collective module.

ProposalIndex

Simple index type for proposal counting.