Trait pallet_membership::pallet::Config
source · pub trait Config: Config {
type CheckMembershipOpAllowed: CheckMembershipOpAllowed<Self::IdtyId>;
type IdtyId: Copy + MaybeSerializeDeserialize + Parameter + Ord;
type IdtyIdOf: Convert<Self::AccountId, Option<Self::IdtyId>>;
type AccountIdOf: Convert<Self::IdtyId, Option<Self::AccountId>>;
type MembershipPeriod: Get<BlockNumberFor<Self>>;
type MembershipRenewalPeriod: Get<BlockNumberFor<Self>>;
type OnNewMembership: OnNewMembership<Self::IdtyId>;
type OnRemoveMembership: OnRemoveMembership<Self::IdtyId>;
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
type WeightInfo: WeightInfo;
type BenchmarkSetupHandler: SetupBenchmark<Self::IdtyId, Self::AccountId>;
}
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§
sourcetype CheckMembershipOpAllowed: CheckMembershipOpAllowed<Self::IdtyId>
type CheckMembershipOpAllowed: CheckMembershipOpAllowed<Self::IdtyId>
Ask the runtime whether the identity can perform membership operations
sourcetype IdtyId: Copy + MaybeSerializeDeserialize + Parameter + Ord
type IdtyId: Copy + MaybeSerializeDeserialize + Parameter + Ord
Something that identifies an identity
sourcetype IdtyIdOf: Convert<Self::AccountId, Option<Self::IdtyId>>
type IdtyIdOf: Convert<Self::AccountId, Option<Self::IdtyId>>
Something that gives the IdtyId of an AccountId
sourcetype AccountIdOf: Convert<Self::IdtyId, Option<Self::AccountId>>
type AccountIdOf: Convert<Self::IdtyId, Option<Self::AccountId>>
Something that gives the AccountId of an IdtyId
sourcetype MembershipPeriod: Get<BlockNumberFor<Self>>
type MembershipPeriod: Get<BlockNumberFor<Self>>
Maximum life span of a single membership (in number of blocks)
sourcetype MembershipRenewalPeriod: Get<BlockNumberFor<Self>>
type MembershipRenewalPeriod: Get<BlockNumberFor<Self>>
Minimum delay to wait before renewing membership
sourcetype OnNewMembership: OnNewMembership<Self::IdtyId>
type OnNewMembership: OnNewMembership<Self::IdtyId>
On new and renew membership handler.
sourcetype OnRemoveMembership: OnRemoveMembership<Self::IdtyId>
type OnRemoveMembership: OnRemoveMembership<Self::IdtyId>
On revoked and removed membership handler.
sourcetype RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
Because this pallet emits events, it depends on the runtime’s definition of an event.