Trait pallet_token_mux::pallet::Config
source · pub trait Config: Config {
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
type PalletId: Get<PalletId>;
type AssetRegistry: Inspect<CustomMetadata = CustomMetadata, AssetId = Self::CurrencyId>;
type BalanceIn: Member + Parameter + FixedPointOperand + AtLeast32BitUnsigned + MaxEncodedLen + Into<BalanceOf<Self>> + From<BalanceOf<Self>>;
type BalanceOut: Member + Parameter + FixedPointOperand + AtLeast32BitUnsigned + MaxEncodedLen + Into<BalanceOf<Self>> + From<BalanceOf<Self>>;
type BalanceRatio: Parameter + Member + FixedPointNumber + MaxEncodedLen;
type OrderId: Parameter + Member + Copy + Ord + MaxEncodedLen;
type CurrencyId: Parameter + Member + Copy + MaxEncodedLen + From<Self::LocalAssetId> + TryInto<Self::LocalAssetId>;
type LocalAssetId: From<LocalAssetId>;
type Tokens: Inspect<Self::AccountId, AssetId = Self::CurrencyId> + Mutate<Self::AccountId, AssetId = Self::CurrencyId>;
type OrderBook: TokenSwaps<Self::AccountId, CurrencyId = Self::CurrencyId, BalanceIn = Self::BalanceIn, BalanceOut = Self::BalanceOut, OrderId = Self::OrderId, Ratio = Self::BalanceRatio>;
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>
type PalletId: Get<PalletId>
sourcetype AssetRegistry: Inspect<CustomMetadata = CustomMetadata, AssetId = Self::CurrencyId>
type AssetRegistry: Inspect<CustomMetadata = CustomMetadata, AssetId = Self::CurrencyId>
The source of truth for the existence and potential local representation of assets.
sourcetype BalanceIn: Member + Parameter + FixedPointOperand + AtLeast32BitUnsigned + MaxEncodedLen + Into<BalanceOf<Self>> + From<BalanceOf<Self>>
type BalanceIn: Member + Parameter + FixedPointOperand + AtLeast32BitUnsigned + MaxEncodedLen + Into<BalanceOf<Self>> + From<BalanceOf<Self>>
Balance type for incoming values
sourcetype BalanceOut: Member + Parameter + FixedPointOperand + AtLeast32BitUnsigned + MaxEncodedLen + Into<BalanceOf<Self>> + From<BalanceOf<Self>>
type BalanceOut: Member + Parameter + FixedPointOperand + AtLeast32BitUnsigned + MaxEncodedLen + Into<BalanceOf<Self>> + From<BalanceOf<Self>>
Balance type for outgoing values
sourcetype BalanceRatio: Parameter + Member + FixedPointNumber + MaxEncodedLen
type BalanceRatio: Parameter + Member + FixedPointNumber + MaxEncodedLen
Type for price ratio for cost of incoming currency relative to outgoing
sourcetype OrderId: Parameter + Member + Copy + Ord + MaxEncodedLen
type OrderId: Parameter + Member + Copy + Ord + MaxEncodedLen
The token swap order identifying type
sourcetype CurrencyId: Parameter + Member + Copy + MaxEncodedLen + From<Self::LocalAssetId> + TryInto<Self::LocalAssetId>
type CurrencyId: Parameter + Member + Copy + MaxEncodedLen + From<Self::LocalAssetId> + TryInto<Self::LocalAssetId>
The general asset type
sourcetype LocalAssetId: From<LocalAssetId>
type LocalAssetId: From<LocalAssetId>
The local asset type
sourcetype Tokens: Inspect<Self::AccountId, AssetId = Self::CurrencyId> + Mutate<Self::AccountId, AssetId = Self::CurrencyId>
type Tokens: Inspect<Self::AccountId, AssetId = Self::CurrencyId> + Mutate<Self::AccountId, AssetId = Self::CurrencyId>
The type for handling transfers, burning and minting of multi-assets.
sourcetype OrderBook: TokenSwaps<Self::AccountId, CurrencyId = Self::CurrencyId, BalanceIn = Self::BalanceIn, BalanceOut = Self::BalanceOut, OrderId = Self::OrderId, Ratio = Self::BalanceRatio>
type OrderBook: TokenSwaps<Self::AccountId, CurrencyId = Self::CurrencyId, BalanceIn = Self::BalanceIn, BalanceOut = Self::BalanceOut, OrderId = Self::OrderId, Ratio = Self::BalanceRatio>
The type for retrieving and fulfilling swap orders.