Trait pallet_certification::pallet::Config
source · pub trait Config: Config {
type CertPeriod: Get<BlockNumberFor<Self>>;
type IdtyIndex: Parameter + Member + AtLeast32BitUnsigned + Codec + Default + Copy + MaybeSerializeDeserialize + Debug + MaxEncodedLen;
type IdtyAttr: Idty<Self::IdtyIndex, Self::AccountId>;
type CheckCertAllowed: CheckCertAllowed<Self::IdtyIndex>;
type MaxByIssuer: Get<u32>;
type MinReceivedCertToBeAbleToIssueCert: Get<u32>;
type OnNewcert: OnNewcert<Self::IdtyIndex>;
type OnRemovedCert: OnRemovedCert<Self::IdtyIndex>;
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
type WeightInfo: WeightInfo;
type ValidityPeriod: Get<BlockNumberFor<Self>>;
}
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 CertPeriod: Get<BlockNumberFor<Self>>
type CertPeriod: Get<BlockNumberFor<Self>>
The minimum duration (in blocks) between two certifications issued by the same issuer.
sourcetype IdtyIndex: Parameter + Member + AtLeast32BitUnsigned + Codec + Default + Copy + MaybeSerializeDeserialize + Debug + MaxEncodedLen
type IdtyIndex: Parameter + Member + AtLeast32BitUnsigned + Codec + Default + Copy + MaybeSerializeDeserialize + Debug + MaxEncodedLen
A short identity index type.
sourcetype IdtyAttr: Idty<Self::IdtyIndex, Self::AccountId>
type IdtyAttr: Idty<Self::IdtyIndex, Self::AccountId>
A type that provides methods to get the IdtyIndex of an AccountId and vice versa.
sourcetype CheckCertAllowed: CheckCertAllowed<Self::IdtyIndex>
type CheckCertAllowed: CheckCertAllowed<Self::IdtyIndex>
A type that provides a method to check if issuing a certification is allowed.
sourcetype MaxByIssuer: Get<u32>
type MaxByIssuer: Get<u32>
The maximum number of active certifications that can be issued by a single issuer.
sourcetype MinReceivedCertToBeAbleToIssueCert: Get<u32>
type MinReceivedCertToBeAbleToIssueCert: Get<u32>
The minimum number of certifications received that an identity must have to be allowed to issue a certification.
sourcetype OnNewcert: OnNewcert<Self::IdtyIndex>
type OnNewcert: OnNewcert<Self::IdtyIndex>
A handler that is called when a new certification event (NewCert
) occurs.
sourcetype OnRemovedCert: OnRemovedCert<Self::IdtyIndex>
type OnRemovedCert: OnRemovedCert<Self::IdtyIndex>
A handler that is called when a certification is removed (RemovedCert
).
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 ValidityPeriod: Get<BlockNumberFor<Self>>
type ValidityPeriod: Get<BlockNumberFor<Self>>
The duration (in blocks) for which a certification remains valid.