pub trait Config: Config {
Show 15 associated items type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>; type AssetRegistry: Inspect<AssetId = Self::CurrencyId, Balance = BalanceOf<Self>>; type CurrencyId: AssetId + Parameter + Default + Member + Copy + MaybeSerializeDeserialize + Ord; type OrderIdNonce: Parameter + Member + AtLeast32BitUnsigned + Default + Copy + EnsureAdd + MaybeSerializeDeserialize + MaxEncodedLen; type BalanceIn: Member + Parameter + FixedPointOperand + AtLeast32BitUnsigned + EnsureMul + EnsureDiv + MaxEncodedLen + Into<BalanceOf<Self>> + From<BalanceOf<Self>>; type BalanceOut: Member + Parameter + FixedPointOperand + AtLeast32BitUnsigned + EnsureMul + EnsureDiv + MaxEncodedLen + Into<BalanceOf<Self>> + From<BalanceOf<Self>>; type Currency: AssetInspect<Self::AccountId, AssetId = Self::CurrencyId> + InspectHold<Self::AccountId, Reason = ()> + MutateHold<Self::AccountId> + Mutate<Self::AccountId>; type Ratio: Parameter + Member + FixedPointNumber + EnsureMul + EnsureDiv + MaybeSerializeDeserialize + MaxEncodedLen; type MinFulfillmentAmountNative: Get<Self::BalanceOut>; type NativeDecimals: Get<u32>; type FulfilledOrderHook: StatusNotificationHook<Id = Self::OrderIdNonce, Status = SwapInfo<Self::BalanceIn, Self::BalanceOut, Self::CurrencyId, Self::Ratio>, Error = DispatchError>; type FeederId: Parameter + Member + Ord + MaxEncodedLen; type RatioProvider: ValueProvider<Self::FeederId, (Self::CurrencyId, Self::CurrencyId), Value = Self::Ratio>; type AdminOrigin: EnsureOrigin<Self::RuntimeOrigin>; type Weights: 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 AssetRegistry: Inspect<AssetId = Self::CurrencyId, Balance = BalanceOf<Self>>

Asset registry for foreign currencies we can take orders for.

source

type CurrencyId: AssetId + Parameter + Default + Member + Copy + MaybeSerializeDeserialize + Ord

CurrencyId that an order can be made for

source

type OrderIdNonce: Parameter + Member + AtLeast32BitUnsigned + Default + Copy + EnsureAdd + MaybeSerializeDeserialize + MaxEncodedLen

Type used for OrderId. OrderIdNonce ensures each OrderId is unique. OrderIdNonce incremented with each new order.

source

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

Balance type for incoming values

source

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

Balance type for outgoing values

source

type Currency: AssetInspect<Self::AccountId, AssetId = Self::CurrencyId> + InspectHold<Self::AccountId, Reason = ()> + MutateHold<Self::AccountId> + Mutate<Self::AccountId>

Type for currency orders can be made for

source

type Ratio: Parameter + Member + FixedPointNumber + EnsureMul + EnsureDiv + MaybeSerializeDeserialize + MaxEncodedLen

Type for conversion ratios. It will be factor applied to currency_out amount to obtain currency_in

source

type MinFulfillmentAmountNative: Get<Self::BalanceOut>

The default minimum fulfillment amount for orders.

NOTE: The amount is expected to be denominated in native currency. When applying to a swap order, it will be re-denominated into the target currency.

source

type NativeDecimals: Get<u32>

source

type FulfilledOrderHook: StatusNotificationHook<Id = Self::OrderIdNonce, Status = SwapInfo<Self::BalanceIn, Self::BalanceOut, Self::CurrencyId, Self::Ratio>, Error = DispatchError>

The hook which acts upon a (partially) fulfilled order

source

type FeederId: Parameter + Member + Ord + MaxEncodedLen

Type for a market conversion ratio feeder

source

type RatioProvider: ValueProvider<Self::FeederId, (Self::CurrencyId, Self::CurrencyId), Value = Self::Ratio>

A way to obtain conversion ratios for market pairs

source

type AdminOrigin: EnsureOrigin<Self::RuntimeOrigin>

The admin origin of this pallet

source

type Weights: WeightInfo

Type for pallet weights

Object Safety§

This trait is not object safe.

Implementors§