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§
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
sourcetype CurrencyId: Parameter + Member + Copy + MaybeSerializeDeserialize + Ord + TypeInfo + MaxEncodedLen
type CurrencyId: Parameter + Member + Copy + MaybeSerializeDeserialize + Ord + TypeInfo + MaxEncodedLen
The currency ID type
sourcetype MultiCurrency: MultiCurrency<<Self as Config>::AccountId, CurrencyId = Self::CurrencyId, Balance = u128>
type MultiCurrency: MultiCurrency<<Self as Config>::AccountId, CurrencyId = Self::CurrencyId, Balance = u128>
The trait control all currencies
sourcetype PoolId: Parameter + Codec + Copy + Ord + AtLeast32BitUnsigned + Zero + One + Default + MaxEncodedLen
type PoolId: Parameter + Codec + Copy + Ord + AtLeast32BitUnsigned + Zero + One + Default + MaxEncodedLen
The pool ID type
sourcetype EnsurePoolAsset: ValidateCurrency<Self::CurrencyId>
type EnsurePoolAsset: ValidateCurrency<Self::CurrencyId>
Verify that the currencies can be used in a pool.
sourcetype LpGenerate: StablePoolLpCurrencyIdGenerate<Self::CurrencyId, Self::PoolId>
type LpGenerate: StablePoolLpCurrencyIdGenerate<Self::CurrencyId, Self::PoolId>
Generate the CurrencyId for the pool.
sourcetype TimeProvider: UnixTime
type TimeProvider: UnixTime
The trait get timestamp of chain.
type PoolCurrencyLimit: Get<u32>
type PoolCurrencySymbolLimit: Get<u32>
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics in this pallet.