pub trait Config: Config + Config<RuntimeEvent: From<Event<Self>>> {
type Balance: Balance;
type Amount: Signed + TryInto<Self::Balance> + TryFrom<Self::Balance> + Parameter + Member + SimpleArithmetic + Default + Copy + MaybeSerializeDeserialize + MaxEncodedLen;
type CurrencyId: Parameter + Member + Copy + MaybeSerializeDeserialize + Ord + TypeInfo + MaxEncodedLen;
type WeightInfo: WeightInfo;
type ExistentialDeposits: GetByKey<Self::CurrencyId, Self::Balance>;
type CurrencyHooks: MutationHooks<Self::AccountId, Self::CurrencyId, Self::Balance>;
type MaxLocks: Get<u32>;
type MaxReserves: Get<u32>;
type ReserveIdentifier: Parameter + Member + MaxEncodedLen + Ord + Copy;
type DustRemovalWhitelist: Contains<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§
Sourcetype Amount: Signed + TryInto<Self::Balance> + TryFrom<Self::Balance> + Parameter + Member + SimpleArithmetic + Default + Copy + MaybeSerializeDeserialize + MaxEncodedLen
type Amount: Signed + TryInto<Self::Balance> + TryFrom<Self::Balance> + Parameter + Member + SimpleArithmetic + Default + Copy + MaybeSerializeDeserialize + MaxEncodedLen
The amount type, should be signed version of Balance
Sourcetype CurrencyId: Parameter + Member + Copy + MaybeSerializeDeserialize + Ord + TypeInfo + MaxEncodedLen
type CurrencyId: Parameter + Member + Copy + MaybeSerializeDeserialize + Ord + TypeInfo + MaxEncodedLen
The currency ID type
Sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics in this module.
Sourcetype ExistentialDeposits: GetByKey<Self::CurrencyId, Self::Balance>
type ExistentialDeposits: GetByKey<Self::CurrencyId, Self::Balance>
The minimum amount required to keep an account. It’s deprecated to config 0 as ED for any currency_id, zero ED will retain account even if its total is zero. Since accounts of orml_tokens are also used as providers of System::AccountInfo, zero ED may cause some problems.
Sourcetype CurrencyHooks: MutationHooks<Self::AccountId, Self::CurrencyId, Self::Balance>
type CurrencyHooks: MutationHooks<Self::AccountId, Self::CurrencyId, Self::Balance>
Hooks are actions that are executed on certain events. For example: OnDust, OnNewTokenAccount
type MaxLocks: Get<u32>
Sourcetype MaxReserves: Get<u32>
type MaxReserves: Get<u32>
The maximum number of named reserves that can exist on an account.
Sourcetype ReserveIdentifier: Parameter + Member + MaxEncodedLen + Ord + Copy
type ReserveIdentifier: Parameter + Member + MaxEncodedLen + Ord + Copy
The id type for named reserves.
type DustRemovalWhitelist: Contains<Self::AccountId>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.