pub trait Config: Config {
Show 13 associated items type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>; type ForeignBalance: Parameter + Member + AtLeast32BitUnsigned + Default + Copy + MaxEncodedLen + Into<Self::SwapBalance> + From<Self::SwapBalance> + Into<Self::PoolBalance>; type PoolBalance: Parameter + Member + AtLeast32BitUnsigned + Default + Copy + MaxEncodedLen + Into<Self::SwapBalance> + From<Self::SwapBalance> + Into<Self::ForeignBalance>; type TrancheBalance: Parameter + Member + AtLeast32BitUnsigned + Default + Copy + MaxEncodedLen; type SwapBalance: Parameter + Member + AtLeast32BitUnsigned + Default + Copy + MaxEncodedLen; type SwapRatio: Parameter + Member + Copy + MaxEncodedLen + One; type CurrencyId: Parameter + Member + Copy + MaxEncodedLen; type InvestmentId: TrancheCurrency<PoolIdOf<Self>, TrancheIdOf<Self>> + Parameter + Copy + MaxEncodedLen; type Investment: Investment<Self::AccountId, Amount = Self::PoolBalance, TrancheAmount = Self::TrancheBalance, CurrencyId = Self::CurrencyId, Error = DispatchError, InvestmentId = Self::InvestmentId>; type OrderId: Parameter + Member + Copy + Ord + MaxEncodedLen; type OrderBook: TokenSwaps<Self::AccountId, CurrencyId = Self::CurrencyId, BalanceIn = Self::SwapBalance, BalanceOut = Self::SwapBalance, Ratio = Self::SwapRatio, OrderId = Self::OrderId>; type Hooks: ForeignInvestmentHooks<Self::AccountId, Amount = Self::ForeignBalance, TrancheAmount = Self::TrancheBalance, CurrencyId = Self::CurrencyId, InvestmentId = Self::InvestmentId>; type PoolInspect: PoolInspect<Self::AccountId, Self::CurrencyId>;
}
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§

source

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

source

type ForeignBalance: Parameter + Member + AtLeast32BitUnsigned + Default + Copy + MaxEncodedLen + Into<Self::SwapBalance> + From<Self::SwapBalance> + Into<Self::PoolBalance>

Represents a foreign amount

source

type PoolBalance: Parameter + Member + AtLeast32BitUnsigned + Default + Copy + MaxEncodedLen + Into<Self::SwapBalance> + From<Self::SwapBalance> + Into<Self::ForeignBalance>

Represents a pool amount

source

type TrancheBalance: Parameter + Member + AtLeast32BitUnsigned + Default + Copy + MaxEncodedLen

Represents a tranche token amount

source

type SwapBalance: Parameter + Member + AtLeast32BitUnsigned + Default + Copy + MaxEncodedLen

Any balances used in TokenSwaps

source

type SwapRatio: Parameter + Member + Copy + MaxEncodedLen + One

Ratio used for swapping amounts

source

type CurrencyId: Parameter + Member + Copy + MaxEncodedLen

The currency type of transferrable tokens

source

type InvestmentId: TrancheCurrency<PoolIdOf<Self>, TrancheIdOf<Self>> + Parameter + Copy + MaxEncodedLen

The investment identifying type required for the investment type

source

type Investment: Investment<Self::AccountId, Amount = Self::PoolBalance, TrancheAmount = Self::TrancheBalance, CurrencyId = Self::CurrencyId, Error = DispatchError, InvestmentId = Self::InvestmentId>

The internal investment type which handles the actual investment on top of the wrapper implementation of this Pallet

source

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

An identification for a swap order

source

type OrderBook: TokenSwaps<Self::AccountId, CurrencyId = Self::CurrencyId, BalanceIn = Self::SwapBalance, BalanceOut = Self::SwapBalance, Ratio = Self::SwapRatio, OrderId = Self::OrderId>

The type which exposes token swap order functionality

source

type Hooks: ForeignInvestmentHooks<Self::AccountId, Amount = Self::ForeignBalance, TrancheAmount = Self::TrancheBalance, CurrencyId = Self::CurrencyId, InvestmentId = Self::InvestmentId>

The hook type which acts upon a finalized investment decrement.

source

type PoolInspect: PoolInspect<Self::AccountId, Self::CurrencyId>

The source of truth for pool currencies.

Object Safety§

This trait is not object safe.

Implementors§