Trait pallet_membership::pallet::Config
source · 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.
Implement this type for a runtime in order to customize this pallet.
Required Associated Types§
sourcetype RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>
The overarching event type.
sourcetype AddOrigin: EnsureOrigin<Self::RuntimeOrigin>
type AddOrigin: EnsureOrigin<Self::RuntimeOrigin>
Required origin for adding a member (though can always be Root).
sourcetype RemoveOrigin: EnsureOrigin<Self::RuntimeOrigin>
type RemoveOrigin: EnsureOrigin<Self::RuntimeOrigin>
Required origin for removing a member (though can always be Root).
sourcetype SwapOrigin: EnsureOrigin<Self::RuntimeOrigin>
type SwapOrigin: EnsureOrigin<Self::RuntimeOrigin>
Required origin for adding and removing a member in a single action.
sourcetype ResetOrigin: EnsureOrigin<Self::RuntimeOrigin>
type ResetOrigin: EnsureOrigin<Self::RuntimeOrigin>
Required origin for resetting membership.
sourcetype PrimeOrigin: EnsureOrigin<Self::RuntimeOrigin>
type PrimeOrigin: EnsureOrigin<Self::RuntimeOrigin>
Required origin for setting or resetting the prime member.
sourcetype MembershipInitialized: InitializeMembers<Self::AccountId>
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.
sourcetype MembershipChanged: ChangeMembers<Self::AccountId>
type MembershipChanged: ChangeMembers<Self::AccountId>
The receiver of the signal for when the membership has changed.
sourcetype MaxMembers: Get<u32>
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.
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics in this pallet.