Trait pallet_membership::pallet::Config
source · pub trait Config: Config {
type CheckMembershipOpAllowed: CheckMembershipOpAllowed<Self::IdtyId>;
type IdtyId: Copy + MaybeSerializeDeserialize + Parameter + Ord;
type IdtyAttr: Idty<Self::IdtyId, 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>
Check if the identity can perform membership operations.
sourcetype IdtyId: Copy + MaybeSerializeDeserialize + Parameter + Ord
type IdtyId: Copy + MaybeSerializeDeserialize + Parameter + Ord
Something that identifies an identity.
sourcetype IdtyAttr: Idty<Self::IdtyId, Self::AccountId>
type IdtyAttr: Idty<Self::IdtyId, Self::AccountId>
Something that gives the IdtyId of an AccountId and reverse.
sourcetype MembershipPeriod: Get<BlockNumberFor<Self>>
type MembershipPeriod: Get<BlockNumberFor<Self>>
Maximum lifespan 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, i.e., asking for distance evaluation.
sourcetype OnNewMembership: OnNewMembership<Self::IdtyId>
type OnNewMembership: OnNewMembership<Self::IdtyId>
Handler called when a new membership is created or renewed.
sourcetype OnRemoveMembership: OnRemoveMembership<Self::IdtyId>
type OnRemoveMembership: OnRemoveMembership<Self::IdtyId>
Handler called when a membership is revoked or removed.
sourcetype RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
The overarching event type.
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Type representing the weight of this pallet.
sourcetype BenchmarkSetupHandler: SetupBenchmark<Self::IdtyId, Self::AccountId>
type BenchmarkSetupHandler: SetupBenchmark<Self::IdtyId, Self::AccountId>
Benchmark setup handler for runtime benchmarks (feature-dependent).