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§

source

type WeightInfo: WeightInfo

Weight information for extrinsics in this pallet.

source

type RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>

The runtime event type.

source

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.

source

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.

source

type Polls: Polling<TallyOf<Self, I>, Votes = Votes, Moment = Self::BlockNumber>

The polling system used for our voting.

source

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”.

source

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.

Implementors§