Trait pallet_scored_pool::pallet::Config [−][src]
pub trait Config<I: 'static = ()>: Config { type Currency: Currency<Self::AccountId> + ReservableCurrency<Self::AccountId>; type Score: AtLeast32Bit + Clone + Copy + Default + FullCodec + MaybeSerializeDeserialize + Debug; type Event: From<Event<Self, I>> + IsType<<Self as Config>::Event>; type CandidateDeposit: Get<<<Self as Config<I>>::Currency as Currency<<Self as Config>::AccountId>>::Balance>; type Period: Get<Self::BlockNumber>; type MembershipInitialized: InitializeMembers<Self::AccountId>; type MembershipChanged: ChangeMembers<Self::AccountId>; type ScoreOrigin: EnsureOrigin<Self::Origin>; type KickOrigin: EnsureOrigin<Self::Origin>; }
Expand description
Configuration trait of this pallet.
Implement this type for a runtime in order to customize this pallet.
Associated Types
The currency used for deposits.
type Score: AtLeast32Bit + Clone + Copy + Default + FullCodec + MaybeSerializeDeserialize + Debug
type Score: AtLeast32Bit + Clone + Copy + Default + FullCodec + MaybeSerializeDeserialize + Debug
The score attributed to a member or candidate.
type CandidateDeposit: Get<<<Self as Config<I>>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
type Period: Get<Self::BlockNumber>
type Period: Get<Self::BlockNumber>
Every Period
blocks the Members
are filled with the highest scoring
members in the Pool
.
type MembershipInitialized: InitializeMembers<Self::AccountId>
type MembershipInitialized: InitializeMembers<Self::AccountId>
The receiver of the signal for when the membership has been initialized.
This happens pre-genesis and will usually be the same as MembershipChanged
.
If you need to do something different on initialization, then you can change
this accordingly.
type MembershipChanged: ChangeMembers<Self::AccountId>
type MembershipChanged: ChangeMembers<Self::AccountId>
The receiver of the signal for when the members have changed.
type ScoreOrigin: EnsureOrigin<Self::Origin>
type ScoreOrigin: EnsureOrigin<Self::Origin>
Allows a configurable origin type to set a score to a candidate in the pool.
type KickOrigin: EnsureOrigin<Self::Origin>
type KickOrigin: EnsureOrigin<Self::Origin>
Required origin for removing a member (though can always be Root).
Configurable origin which enables removing an entity. If the entity
is part of the Members
it is immediately replaced by the next
highest scoring candidate, if available.