Trait dex_stable::pallet::Config

source ·
pub trait Config: Config {
    type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
    type CurrencyId: Parameter + Member + Copy + MaybeSerializeDeserialize + Ord + TypeInfo + MaxEncodedLen;
    type MultiCurrency: MultiCurrency<<Self as Config>::AccountId, CurrencyId = Self::CurrencyId, Balance = u128>;
    type PoolId: Parameter + Codec + Copy + Ord + AtLeast32BitUnsigned + Zero + One + Default + MaxEncodedLen;
    type EnsurePoolAsset: ValidateCurrency<Self::CurrencyId>;
    type LpGenerate: StablePoolLpCurrencyIdGenerate<Self::CurrencyId, Self::PoolId>;
    type TimeProvider: UnixTime;
    type PoolCurrencyLimit: Get<u32>;
    type PoolCurrencySymbolLimit: Get<u32>;
    type PalletId: Get<PalletId>;
    type WeightInfo: WeightInfo;
}
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 CurrencyId: Parameter + Member + Copy + MaybeSerializeDeserialize + Ord + TypeInfo + MaxEncodedLen

The currency ID type

source

type MultiCurrency: MultiCurrency<<Self as Config>::AccountId, CurrencyId = Self::CurrencyId, Balance = u128>

The trait control all currencies

source

type PoolId: Parameter + Codec + Copy + Ord + AtLeast32BitUnsigned + Zero + One + Default + MaxEncodedLen

The pool ID type

source

type EnsurePoolAsset: ValidateCurrency<Self::CurrencyId>

Verify that the currencies can be used in a pool.

source

type LpGenerate: StablePoolLpCurrencyIdGenerate<Self::CurrencyId, Self::PoolId>

Generate the CurrencyId for the pool.

source

type TimeProvider: UnixTime

The trait get timestamp of chain.

source

type PoolCurrencyLimit: Get<u32>

source

type PoolCurrencySymbolLimit: Get<u32>

source

type PalletId: Get<PalletId>

This pallet ID.

source

type WeightInfo: WeightInfo

Weight information for extrinsics in this pallet.

Implementors§