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§

source

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

source

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

source

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

source

type CurrencyId: Parameter + Member + Copy + MaybeSerializeDeserialize + Ord + TypeInfo + MaxEncodedLen + Default + AtLeast32BitUnsigned + FullCodec

The currency ID type

source

type WeightInfo: WeightInfo

Weight information for extrinsics in this module.

source

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.

source

type CurrencyHooks: MutationHooks<Self::AccountId, Self::CurrencyId, Self::Balance>

Hooks are actions that are executed on certain events. For example: OnDust, OnNewTokenAccount

source

type MaxLocks: Get<u32>

source

type MaxReserves: Get<u32>

The maximum number of named reserves that can exist on an account.

source

type ReserveIdentifier: Parameter + Member + MaxEncodedLen + Ord + Copy

The id type for named reserves.

source

type DustRemovalWhitelist: Contains<Self::AccountId>

Implementors§