pub trait Config: Config {
    type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
    type Currency: ReservableCurrency<Self::AccountId>;
    type UpdateOrigin: EnsureOrigin<Self::RuntimeOrigin>;
    type PotId: Get<PalletId>;
    type MaxCandidates: Get<u32>;
    type MinEligibleCollators: Get<u32>;
    type MaxInvulnerables: Get<u32>;
    type KickThreshold: Get<BlockNumberFor<Self>>;
    type ValidatorId: Member + Parameter;
    type ValidatorIdOf: Convert<Self::AccountId, Option<Self::ValidatorId>>;
    type ValidatorRegistration: ValidatorRegistration<Self::ValidatorId>;
    type WeightInfo: WeightInfo;
}
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. Configure the pallet by specifying the parameters and types on which it depends.

Required Associated Types§

source

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

Overarching event type.

source

type Currency: ReservableCurrency<Self::AccountId>

The currency mechanism.

source

type UpdateOrigin: EnsureOrigin<Self::RuntimeOrigin>

Origin that can dictate updating parameters of this pallet.

source

type PotId: Get<PalletId>

Account Identifier from which the internal Pot is generated.

source

type MaxCandidates: Get<u32>

Maximum number of candidates that we should have.

This does not take into account the invulnerables.

source

type MinEligibleCollators: Get<u32>

Minimum number eligible collators. Should always be greater than zero. This includes Invulnerable collators. This ensures that there will always be one collator who can produce a block.

source

type MaxInvulnerables: Get<u32>

Maximum number of invulnerables.

source

type KickThreshold: Get<BlockNumberFor<Self>>

source

type ValidatorId: Member + Parameter

A stable ID for a validator.

source

type ValidatorIdOf: Convert<Self::AccountId, Option<Self::ValidatorId>>

A conversion from account ID to validator ID.

Its cost must be at most one storage read.

source

type ValidatorRegistration: ValidatorRegistration<Self::ValidatorId>

Validate a user is registered

source

type WeightInfo: WeightInfo

The weight information of this pallet.

Implementors§