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 = BlockNumberFor<Self>>;
    type MinRankOfClass: Convert<ClassOf<Self, I>, Rank>;
    type VoteWeight: Convert<Rank, Votes>;
}
Expand description

Configuration trait of this pallet.

The main purpose of this trait is to act as an interface between this pallet and the runtime in which it is embedded in. A type, function, or constant in this trait is essentially left to be configured by the runtime that includes this pallet.

Consequently, a runtime that wants to include this pallet must implement this trait.

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 = BlockNumberFor<Self>>

The polling system used for our voting.

source

type MinRankOfClass: Convert<ClassOf<Self, I>, 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§