Trait dex_general::pallet::Config
source · pub trait Config: Config {
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
type MultiCurrency: MultiCurrency<<Self as Config>::AccountId, CurrencyId = Self::AssetId, Balance = AssetBalance>;
type PalletId: Get<PalletId>;
type AssetId: FullCodec + Eq + PartialEq + Ord + PartialOrd + Copy + MaybeSerializeDeserialize + Debug + TypeInfo + MaxEncodedLen;
type EnsurePairAsset: ValidateAsset<Self::AssetId>;
type LpGenerate: GenerateLpAssetId<Self::AssetId>;
type WeightInfo: WeightInfo;
type MaxBootstrapRewards: Get<u32>;
type MaxBootstrapLimits: Get<u32>;
}
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. Configure the pallet by specifying the parameters and types on which it depends.
Required Associated Types§
sourcetype RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
Because this pallet emits events, it depends on the runtime’s definition of an event.
sourcetype MultiCurrency: MultiCurrency<<Self as Config>::AccountId, CurrencyId = Self::AssetId, Balance = AssetBalance>
type MultiCurrency: MultiCurrency<<Self as Config>::AccountId, CurrencyId = Self::AssetId, Balance = AssetBalance>
The trait control all currencies
sourcetype AssetId: FullCodec + Eq + PartialEq + Ord + PartialOrd + Copy + MaybeSerializeDeserialize + Debug + TypeInfo + MaxEncodedLen
type AssetId: FullCodec + Eq + PartialEq + Ord + PartialOrd + Copy + MaybeSerializeDeserialize + Debug + TypeInfo + MaxEncodedLen
The asset type.
sourcetype EnsurePairAsset: ValidateAsset<Self::AssetId>
type EnsurePairAsset: ValidateAsset<Self::AssetId>
Verify the asset can be used in a pair.
sourcetype LpGenerate: GenerateLpAssetId<Self::AssetId>
type LpGenerate: GenerateLpAssetId<Self::AssetId>
Generate the AssetId for the pair.
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics in this pallet.
sourcetype MaxBootstrapRewards: Get<u32>
type MaxBootstrapRewards: Get<u32>
The maximum number of rewards that can be stored
sourcetype MaxBootstrapLimits: Get<u32>
type MaxBootstrapLimits: Get<u32>
The maximum number of limits that can be stored