Trait pallet_core_fellowship::pallet::Config

source ·
pub trait Config<I: 'static = ()>: Config {
    type WeightInfo: WeightInfo;
    type RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>;
    type Members: RankedMembers<AccountId = <Self as Config>::AccountId, Rank = u16>;
    type Balance: BalanceTrait;
    type ParamsOrigin: EnsureOrigin<Self::RuntimeOrigin>;
    type InductOrigin: EnsureOrigin<Self::RuntimeOrigin>;
    type ApproveOrigin: EnsureOrigin<Self::RuntimeOrigin, Success = RankOf<Self, I>>;
    type PromoteOrigin: EnsureOrigin<Self::RuntimeOrigin, Success = RankOf<Self, I>>;
    type FastPromoteOrigin: EnsureOrigin<Self::RuntimeOrigin, Success = RankOf<Self, I>>;
    type EvidenceSize: Get<u32>;
    type MaxRank: Get<u32>;
}
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 Members: RankedMembers<AccountId = <Self as Config>::AccountId, Rank = u16>

The current membership of the fellowship.

source

type Balance: BalanceTrait

The type in which salaries/budgets are measured.

source

type ParamsOrigin: EnsureOrigin<Self::RuntimeOrigin>

The origin which has permission update the parameters.

source

type InductOrigin: EnsureOrigin<Self::RuntimeOrigin>

The origin which has permission to move a candidate into being tracked in this pallet. Generally a very low-permission, such as a pre-existing member of rank 1 or above.

This allows the candidate to deposit evidence for their request to be promoted to a member.

source

type ApproveOrigin: EnsureOrigin<Self::RuntimeOrigin, Success = RankOf<Self, I>>

The origin which has permission to issue a proof that a member may retain their rank. The Success value is the maximum rank of members it is able to prove.

source

type PromoteOrigin: EnsureOrigin<Self::RuntimeOrigin, Success = RankOf<Self, I>>

The origin which has permission to promote a member. The Success value is the maximum rank to which it can promote.

source

type FastPromoteOrigin: EnsureOrigin<Self::RuntimeOrigin, Success = RankOf<Self, I>>

The origin that has permission to “fast” promote a member by ignoring promotion periods and skipping ranks. The Success value is the maximum rank to which it can promote.

source

type EvidenceSize: Get<u32>

The maximum size in bytes submitted evidence is allowed to be.

source

type MaxRank: Get<u32>

Represents the highest possible rank in this pallet.

Increasing this value is supported, but decreasing it may lead to a broken state.

Object Safety§

This trait is not object safe.

Implementors§