Trait pallet_ranked_collective::pallet::Config
source · pub trait Config<I: 'static = ()>: Config {
type WeightInfo: WeightInfo;
type RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>;
type PromoteOrigin: EnsureOrigin<Self::RuntimeOrigin, Success = Rank>;
type DemoteOrigin: EnsureOrigin<Self::RuntimeOrigin, Success = Rank>;
type Polls: Polling<TallyOf<Self, I>, Votes = Votes, Moment = Self::BlockNumber>;
type MinRankOfClass: Convert<<Self::Polls as Polling<TallyOf<Self, I>>>::Class, Rank>;
type VoteWeight: Convert<Rank, Votes>;
}
Expand description
Configuration trait of this pallet.
Implement this type for a runtime in order to customize this pallet.
Required Associated Types§
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics in this pallet.
sourcetype RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>
The runtime event type.
sourcetype PromoteOrigin: EnsureOrigin<Self::RuntimeOrigin, Success = Rank>
type PromoteOrigin: EnsureOrigin<Self::RuntimeOrigin, Success = Rank>
The origin required to add or promote a mmember. The success value indicates the maximum rank to which the promotion may be.
sourcetype DemoteOrigin: EnsureOrigin<Self::RuntimeOrigin, Success = Rank>
type DemoteOrigin: EnsureOrigin<Self::RuntimeOrigin, Success = Rank>
The origin required to demote or remove a member. The success value indicates the maximum rank from which the demotion/removal may be.
sourcetype Polls: Polling<TallyOf<Self, I>, Votes = Votes, Moment = Self::BlockNumber>
type Polls: Polling<TallyOf<Self, I>, Votes = Votes, Moment = Self::BlockNumber>
The polling system used for our voting.
sourcetype MinRankOfClass: Convert<<Self::Polls as Polling<TallyOf<Self, I>>>::Class, Rank>
type MinRankOfClass: Convert<<Self::Polls as Polling<TallyOf<Self, I>>>::Class, Rank>
Convert the tally class into the minimum rank required to vote on the poll. If
Polls::Class
is the same type as Rank
, then Identity
can be used here to mean
“a rank of at least the poll class”.
sourcetype VoteWeight: Convert<Rank, Votes>
type VoteWeight: Convert<Rank, Votes>
Convert a rank_delta into a number of votes the rank gets.
Rank_delta is defined as the number of ranks above the minimum required to take part in the poll.