pub trait Config<I: 'static = ()>: Config {
    type RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>;
    type AddOrigin: EnsureOrigin<Self::RuntimeOrigin>;
    type RemoveOrigin: EnsureOrigin<Self::RuntimeOrigin>;
    type SwapOrigin: EnsureOrigin<Self::RuntimeOrigin>;
    type ResetOrigin: EnsureOrigin<Self::RuntimeOrigin>;
    type PrimeOrigin: EnsureOrigin<Self::RuntimeOrigin>;
    type MembershipInitialized: InitializeMembers<Self::AccountId>;
    type MembershipChanged: ChangeMembers<Self::AccountId>;
    type MaxMembers: Get<u32>;
    type WeightInfo: WeightInfo;
}
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 RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>

The overarching event type.

source

type AddOrigin: EnsureOrigin<Self::RuntimeOrigin>

Required origin for adding a member (though can always be Root).

source

type RemoveOrigin: EnsureOrigin<Self::RuntimeOrigin>

Required origin for removing a member (though can always be Root).

source

type SwapOrigin: EnsureOrigin<Self::RuntimeOrigin>

Required origin for adding and removing a member in a single action.

source

type ResetOrigin: EnsureOrigin<Self::RuntimeOrigin>

Required origin for resetting membership.

source

type PrimeOrigin: EnsureOrigin<Self::RuntimeOrigin>

Required origin for setting or resetting the prime member.

source

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.

source

type MembershipChanged: ChangeMembers<Self::AccountId>

The receiver of the signal for when the membership has changed.

source

type MaxMembers: Get<u32>

The maximum number of members that this membership can have.

This is used for benchmarking. Re-run the benchmarks if this changes.

This is enforced in the code; the membership size can not exceed this limit.

source

type WeightInfo: WeightInfo

Weight information for extrinsics in this pallet.

Implementors§