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§

source

type CheckMembershipOpAllowed: CheckMembershipOpAllowed<Self::IdtyId>

Check if the identity can perform membership operations.

source

type IdtyId: Copy + MaybeSerializeDeserialize + Parameter + Ord

Something that identifies an identity.

source

type IdtyAttr: Idty<Self::IdtyId, Self::AccountId>

Something that gives the IdtyId of an AccountId and reverse.

source

type MembershipPeriod: Get<BlockNumberFor<Self>>

Maximum lifespan of a single membership (in number of blocks).

source

type MembershipRenewalPeriod: Get<BlockNumberFor<Self>>

Minimum delay to wait before renewing membership, i.e., asking for distance evaluation.

source

type OnNewMembership: OnNewMembership<Self::IdtyId>

Handler called when a new membership is created or renewed.

source

type OnRemoveMembership: OnRemoveMembership<Self::IdtyId>

Handler called when a membership is revoked or removed.

source

type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>

The overarching event type.

source

type WeightInfo: WeightInfo

Type representing the weight of this pallet.

source

type BenchmarkSetupHandler: SetupBenchmark<Self::IdtyId, Self::AccountId>

Benchmark setup handler for runtime benchmarks (feature-dependent).

Object Safety§

This trait is not object safe.

Implementors§