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§

source

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

source

type PalletId: Get<PalletId>

source

type AssetRegistry: Inspect<CustomMetadata = CustomMetadata, AssetId = Self::CurrencyId>

The source of truth for the existence and potential local representation of assets.

source

type BalanceIn: Member + Parameter + FixedPointOperand + AtLeast32BitUnsigned + MaxEncodedLen + Into<BalanceOf<Self>> + From<BalanceOf<Self>>

Balance type for incoming values

source

type BalanceOut: Member + Parameter + FixedPointOperand + AtLeast32BitUnsigned + MaxEncodedLen + Into<BalanceOf<Self>> + From<BalanceOf<Self>>

Balance type for outgoing values

source

type BalanceRatio: Parameter + Member + FixedPointNumber + MaxEncodedLen

Type for price ratio for cost of incoming currency relative to outgoing

source

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

The token swap order identifying type

source

type CurrencyId: Parameter + Member + Copy + MaxEncodedLen + From<Self::LocalAssetId> + TryInto<Self::LocalAssetId>

The general asset type

source

type LocalAssetId: From<LocalAssetId>

The local asset type

source

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.

source

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.

source

type WeightInfo: WeightInfo

Object Safety§

This trait is not object safe.

Implementors§