pub trait Config: Config {
    type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
    type RuntimeFreezeReason: From<FreezeReason>;
    type WeightInfo: WeightInfo;
    type Currency: MutateFreeze<Self::AccountId, Id = Self::RuntimeFreezeReason> + Mutate<Self::AccountId> + InspectFreeze<Self::AccountId> + InspectFungible<Self::AccountId>;
    type TargetValidator: TargetValidator;
    type MinimumStakingAmount: Get<<<Self as Config>::Currency as InspectFungible<<Self as Config>::AccountId>>::Balance>;
    type MinimumTokenBalance: Get<<<Self as Config>::Currency as InspectFungible<<Self as Config>::AccountId>>::Balance>;
    type MaxUnlockingChunks: Get<u32>;
    type UnstakingThawPeriod: Get<u16>;
    type MaxEpochLength: Get<BlockNumberFor<Self>>;
    type EpochNumber: Parameter + Member + MaybeSerializeDeserialize + MaybeDisplay + AtLeast32BitUnsigned + Default + Copy + Hash + MaxEncodedLen + TypeInfo;
    type CapacityPerToken: Get<Perbill>;
}
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 RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>

The overarching event type.

source

type RuntimeFreezeReason: From<FreezeReason>

The overarching freeze reason.

source

type WeightInfo: WeightInfo

Weight information for extrinsics in this pallet.

source

type Currency: MutateFreeze<Self::AccountId, Id = Self::RuntimeFreezeReason> + Mutate<Self::AccountId> + InspectFreeze<Self::AccountId> + InspectFungible<Self::AccountId>

Functions that allow a fungible balance to be changed or frozen.

source

type TargetValidator: TargetValidator

Function that checks if an MSA is a valid target.

source

type MinimumStakingAmount: Get<<<Self as Config>::Currency as InspectFungible<<Self as Config>::AccountId>>::Balance>

The minimum required token amount to stake. It facilitates cleaning dust when unstaking.

source

type MinimumTokenBalance: Get<<<Self as Config>::Currency as InspectFungible<<Self as Config>::AccountId>>::Balance>

The minimum required token amount to remain in the account after staking.

source

type MaxUnlockingChunks: Get<u32>

The maximum number of unlocking chunks a StakingAccountLedger can have. It determines how many concurrent unstaked chunks may exist.

source

type UnstakingThawPeriod: Get<u16>

The number of Epochs before you can unlock tokens after unstaking.

source

type MaxEpochLength: Get<BlockNumberFor<Self>>

Maximum number of blocks an epoch can be

source

type EpochNumber: Parameter + Member + MaybeSerializeDeserialize + MaybeDisplay + AtLeast32BitUnsigned + Default + Copy + Hash + MaxEncodedLen + TypeInfo

A type that provides an Epoch number traits pulled from frame_system::Config::BlockNumber

source

type CapacityPerToken: Get<Perbill>

How much FRQCY one unit of Capacity costs

Object Safety§

This trait is not object safe.

Implementors§