Crate pallet_elections[−][src]
WARNING: NOT ACTIVELY MAINTAINED
This pallet is currently not maintained and should not be used in production until further notice.
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.
Re-exports
pub use $crate::traits::GetPalletVersion as _; |
Structs
ApprovalsOf | TWOX-NOTE: SAFE as |
CandidateCount | Current number of active candidates |
Candidates | The present candidate list. |
DesiredSeats | Number of accounts that should constitute the collective. |
GenesisConfig | Genesis config for the module, allow to build genesis storage. |
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. |
RegisterInfoOf | The vote index and list slot that the candidate |
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 |
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
Config |
Type Definitions
Event | |
VoteIndex | Index used to count voting rounds. |