Trait pallet_elections_phragmen::pallet::Config [−][src]
pub trait Config: Config {}Show associated items
type Event: From<Event<Self>> + IsType<<Self as Config>::Event>; type PalletId: Get<LockIdentifier>; type Currency: LockableCurrency<Self::AccountId, Moment = Self::BlockNumber> + ReservableCurrency<Self::AccountId>; type ChangeMembers: ChangeMembers<Self::AccountId>; type InitializeMembers: InitializeMembers<Self::AccountId>; type CurrencyToVote: CurrencyToVote<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>; type CandidacyBond: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>; type VotingBondBase: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>; type VotingBondFactor: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>; type LoserCandidate: OnUnbalanced<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::NegativeImbalance>; type KickedMember: OnUnbalanced<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::NegativeImbalance>; type DesiredMembers: Get<u32>; type DesiredRunnersUp: Get<u32>; type TermDuration: Get<Self::BlockNumber>; type WeightInfo: WeightInfo;
Expand description
Configuration trait of this pallet.
Implement this type for a runtime in order to customize this pallet.
Associated Types
type PalletId: Get<LockIdentifier>
type PalletId: Get<LockIdentifier>
Identifier for the elections-phragmen pallet’s lock
type Currency: LockableCurrency<Self::AccountId, Moment = Self::BlockNumber> + ReservableCurrency<Self::AccountId>
type Currency: LockableCurrency<Self::AccountId, Moment = Self::BlockNumber> + ReservableCurrency<Self::AccountId>
The currency that people are electing with.
type ChangeMembers: ChangeMembers<Self::AccountId>
type ChangeMembers: ChangeMembers<Self::AccountId>
What to do when the members change.
type InitializeMembers: InitializeMembers<Self::AccountId>
type InitializeMembers: InitializeMembers<Self::AccountId>
What to do with genesis members
type CurrencyToVote: CurrencyToVote<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
type CurrencyToVote: CurrencyToVote<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
Convert a balance into a number used for election calculation.
This must fit into a u64
but is allowed to be sensibly lossy.
How much should be locked up in order to submit one’s candidacy.
Base deposit associated with voting.
This should be sensibly high to economically ensure the pallet cannot be attacked by creating a gigantic number of votes.
The amount of bond that need to be locked for each vote (32 bytes).
type LoserCandidate: OnUnbalanced<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::NegativeImbalance>
type LoserCandidate: OnUnbalanced<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::NegativeImbalance>
Handler for the unbalanced reduction when a candidate has lost (and is not a runner-up)
type KickedMember: OnUnbalanced<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::NegativeImbalance>
type KickedMember: OnUnbalanced<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::NegativeImbalance>
Handler for the unbalanced reduction when a member has been kicked.
type DesiredMembers: Get<u32>
type DesiredMembers: Get<u32>
Number of members to elect.
type DesiredRunnersUp: Get<u32>
type DesiredRunnersUp: Get<u32>
Number of runners_up to keep.
type TermDuration: Get<Self::BlockNumber>
type TermDuration: Get<Self::BlockNumber>
How long each seat is kept. This defines the next block number at which an election round will happen. If set to zero, no elections are ever triggered and the module will be in passive mode.
type WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics in this pallet.