Trait orml_tokens::module::Config
source · pub trait Config: Config {
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
type Balance: Parameter + Member + AtLeast32BitUnsigned + Default + Copy + MaybeSerializeDeserialize + MaxEncodedLen + TypeInfo + FixedPointOperand + Into<u128> + TryFrom<U256>;
type Amount: Signed + TryInto<Self::Balance> + TryFrom<Self::Balance> + Parameter + Member + SimpleArithmetic + Default + Copy + MaybeSerializeDeserialize + MaxEncodedLen + TypeInfo;
type CurrencyId: Parameter + Member + Copy + MaybeSerializeDeserialize + Ord + TypeInfo + MaxEncodedLen + Default + AtLeast32BitUnsigned + FullCodec;
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§
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
sourcetype Balance: Parameter + Member + AtLeast32BitUnsigned + Default + Copy + MaybeSerializeDeserialize + MaxEncodedLen + TypeInfo + FixedPointOperand + Into<u128> + TryFrom<U256>
type Balance: Parameter + Member + AtLeast32BitUnsigned + Default + Copy + MaybeSerializeDeserialize + MaxEncodedLen + TypeInfo + FixedPointOperand + Into<u128> + TryFrom<U256>
The balance type use Into<128> to supportd current impl of mangata-node pallets which rely on U256::from(value: u128) for arithemtics
sourcetype Amount: Signed + TryInto<Self::Balance> + TryFrom<Self::Balance> + Parameter + Member + SimpleArithmetic + Default + Copy + MaybeSerializeDeserialize + MaxEncodedLen + TypeInfo
type Amount: Signed + TryInto<Self::Balance> + TryFrom<Self::Balance> + Parameter + Member + SimpleArithmetic + Default + Copy + MaybeSerializeDeserialize + MaxEncodedLen + TypeInfo
The amount type, should be signed version of Balance
sourcetype CurrencyId: Parameter + Member + Copy + MaybeSerializeDeserialize + Ord + TypeInfo + MaxEncodedLen + Default + AtLeast32BitUnsigned + FullCodec
type CurrencyId: Parameter + Member + Copy + MaybeSerializeDeserialize + Ord + TypeInfo + MaxEncodedLen + Default + AtLeast32BitUnsigned + FullCodec
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.