[][src]Crate pallet_elections

Election module for stake-weighted membership selection of a collective.

The composition of a set of account IDs works according to one or more approval votes weighted by stake. There is a partial carry-over facility to give greater weight to those whose voting is serially unsuccessful.

Structs

ApprovalsOf
CandidateCount

Current number of active candidates

Candidates

The present candidate list.

DesiredSeats

Number of accounts that should constitute the collective.

GenesisConfig
Leaderboard

Get the leaderboard if we're in the presentation phase. The first element is the weight of each entry; It may be the direct summed approval stakes, or a weighted version of it. Sorted from low to high.

Members

The current membership. When there's a vote going on, this should still be used for executive matters. The block number (second element in the tuple) is the block that their position is active until (calculated by the sum of the block number when the member was elected and their term duration).

Module
NextFinalize

The accounts holding the seats that will become free on the next tally.

NextVoterSet

the next free set to store a voter in. This will keep growing.

PresentationDuration

How long to give each top candidate to present themselves after the vote ends.

Proxy

Who is able to vote for whom. Value is the fund-holding account, key is the vote-transaction-sending account.

RegisterInfoOf

The vote index and list slot that the candidate who was registered or None if they are not currently registered.

TermDuration

How long each position is active for.

VoteCount

The total number of vote rounds that have happened or are in progress.

VoterCount

Current number of Voters.

VoterInfo

The activity status of a voter.

VoterInfoOf

Basic information about a voter.

Voters

The present voter list (chunked and capped at VOTER_SET_SIZE).

Enums

Call

Dispatchable calls.

CellStatus

Used to demonstrate the status of a particular index in the global voter list.

Error

Error for the elections module.

RawEvent

Events for this module.

Constants

APPROVAL_SET_SIZE

NUmber of approvals grouped in one chunk.

VOTER_SET_SIZE

Number of voters grouped in one chunk.

Traits

Trait

Type Definitions

Event

RawEvent specialized for the configuration Trait

VoteIndex

Index used to count voting rounds.