Trait pallet_capacity::pallet::Config
source · 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§
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 RuntimeFreezeReason: From<FreezeReason>
type RuntimeFreezeReason: From<FreezeReason>
The overarching freeze reason.
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics in this pallet.
sourcetype Currency: MutateFreeze<Self::AccountId, Id = Self::RuntimeFreezeReason> + Mutate<Self::AccountId> + InspectFreeze<Self::AccountId> + InspectFungible<Self::AccountId>
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.
sourcetype TargetValidator: TargetValidator
type TargetValidator: TargetValidator
Function that checks if an MSA is a valid target.
sourcetype MinimumStakingAmount: Get<<<Self as Config>::Currency as InspectFungible<<Self as Config>::AccountId>>::Balance>
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.
sourcetype MinimumTokenBalance: 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>
The minimum required token amount to remain in the account after staking.
sourcetype MaxUnlockingChunks: Get<u32>
type MaxUnlockingChunks: Get<u32>
The maximum number of unlocking chunks a StakingAccountLedger can have. It determines how many concurrent unstaked chunks may exist.
sourcetype UnstakingThawPeriod: Get<u16>
type UnstakingThawPeriod: Get<u16>
The number of Epochs before you can unlock tokens after unstaking.
sourcetype MaxEpochLength: Get<BlockNumberFor<Self>>
type MaxEpochLength: Get<BlockNumberFor<Self>>
Maximum number of blocks an epoch can be
sourcetype EpochNumber: Parameter + Member + MaybeSerializeDeserialize + MaybeDisplay + AtLeast32BitUnsigned + Default + Copy + Hash + MaxEncodedLen + TypeInfo
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
sourcetype CapacityPerToken: Get<Perbill>
type CapacityPerToken: Get<Perbill>
How much FRQCY one unit of Capacity costs