Trait pallet_liquidity_pools::pallet::Config
source · pub trait Config: Config<AccountId = AccountId32> {
Show 19 associated items
type WeightInfo: WeightInfo;
type Balance: Parameter + Member + AtLeast32BitUnsigned + Default + Copy + MaybeSerializeDeserialize + MaxEncodedLen + Into<u128> + From<u128>;
type PoolId: Member + Parameter + Default + Copy + HasCompact + MaxEncodedLen + Debug + Into<u64> + From<u64>;
type TrancheId: Member + Parameter + Default + Copy + MaxEncodedLen + TypeInfo + From<[u8; 16]> + Into<[u8; 16]>;
type BalanceRatio: Parameter + Member + MaybeSerializeDeserialize + FixedPointNumber<Inner = u128> + TypeInfo;
type PoolInspect: PoolInspect<Self::AccountId, Self::CurrencyId, PoolId = Self::PoolId, TrancheId = Self::TrancheId>;
type TrancheTokenPrice: TrancheTokenPrice<Self::AccountId, Self::CurrencyId, BalanceRatio = Self::BalanceRatio, PoolId = Self::PoolId, TrancheId = Self::TrancheId, Moment = Seconds>;
type Permission: Permissions<Self::AccountId, Scope = PermissionScope<Self::PoolId, Self::CurrencyId>, Role = Role<Self::TrancheId>, Error = DispatchError>;
type Time: TimeAsSecs;
type Tokens: Mutate<Self::AccountId> + Inspect<Self::AccountId, AssetId = Self::CurrencyId, Balance = Self::Balance>;
type ForeignInvestment: ForeignInvestment<Self::AccountId, Amount = Self::Balance, TrancheAmount = Self::Balance, CurrencyId = Self::CurrencyId, InvestmentId = (Self::PoolId, Self::TrancheId)>;
type AssetRegistry: Inspect<AssetId = Self::CurrencyId, Balance = <Self as Config>::Balance, CustomMetadata = CustomMetadata>;
type CurrencyId: Parameter + Member + Copy + MaybeSerializeDeserialize + Ord + TypeInfo + MaxEncodedLen + TryInto<GeneralCurrencyIndexOf<Self>, Error = DispatchError> + TryFrom<GeneralCurrencyIndexOf<Self>, Error = DispatchError> + CurrencyInspect<CurrencyId = Self::CurrencyId> + From<(Self::PoolId, Self::TrancheId)>;
type OutboundMessageHandler: OutboundMessageHandler<Sender = Self::AccountId, Message = Message, Destination = Domain> + GetByKey<Domain, Option<[u8; 20]>>;
type GeneralCurrencyPrefix: Get<[u8; 12]>;
type TreasuryAccount: Get<Self::AccountId>;
type PreTransferFilter: PreConditions<(Self::AccountId, DomainAddress, Self::CurrencyId), Result = DispatchResult>;
type MarketRatio: TokenSwaps<Self::AccountId, CurrencyId = Self::CurrencyId, Ratio = Self::BalanceRatio>;
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
}
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§
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics in this pallet.
sourcetype Balance: Parameter + Member + AtLeast32BitUnsigned + Default + Copy + MaybeSerializeDeserialize + MaxEncodedLen + Into<u128> + From<u128>
type Balance: Parameter + Member + AtLeast32BitUnsigned + Default + Copy + MaybeSerializeDeserialize + MaxEncodedLen + Into<u128> + From<u128>
The source of truth for the balance of accounts in native currency.
type PoolId: Member + Parameter + Default + Copy + HasCompact + MaxEncodedLen + Debug + Into<u64> + From<u64>
type TrancheId: Member + Parameter + Default + Copy + MaxEncodedLen + TypeInfo + From<[u8; 16]> + Into<[u8; 16]>
sourcetype BalanceRatio: Parameter + Member + MaybeSerializeDeserialize + FixedPointNumber<Inner = u128> + TypeInfo
type BalanceRatio: Parameter + Member + MaybeSerializeDeserialize + FixedPointNumber<Inner = u128> + TypeInfo
The fixed point number representation for higher precision.
sourcetype PoolInspect: PoolInspect<Self::AccountId, Self::CurrencyId, PoolId = Self::PoolId, TrancheId = Self::TrancheId>
type PoolInspect: PoolInspect<Self::AccountId, Self::CurrencyId, PoolId = Self::PoolId, TrancheId = Self::TrancheId>
The source of truth for pool inspection operations such as its existence, the corresponding tranche token or the investment currency.
type TrancheTokenPrice: TrancheTokenPrice<Self::AccountId, Self::CurrencyId, BalanceRatio = Self::BalanceRatio, PoolId = Self::PoolId, TrancheId = Self::TrancheId, Moment = Seconds>
sourcetype Permission: Permissions<Self::AccountId, Scope = PermissionScope<Self::PoolId, Self::CurrencyId>, Role = Role<Self::TrancheId>, Error = DispatchError>
type Permission: Permissions<Self::AccountId, Scope = PermissionScope<Self::PoolId, Self::CurrencyId>, Role = Role<Self::TrancheId>, Error = DispatchError>
The source of truth for investment permissions.
sourcetype Time: TimeAsSecs
type Time: TimeAsSecs
The UNIX timestamp provider type required for checking the validity of investments.
sourcetype Tokens: Mutate<Self::AccountId> + Inspect<Self::AccountId, AssetId = Self::CurrencyId, Balance = Self::Balance>
type Tokens: Mutate<Self::AccountId> + Inspect<Self::AccountId, AssetId = Self::CurrencyId, Balance = Self::Balance>
The type for handling transfers, burning and minting of multi-assets.
sourcetype ForeignInvestment: ForeignInvestment<Self::AccountId, Amount = Self::Balance, TrancheAmount = Self::Balance, CurrencyId = Self::CurrencyId, InvestmentId = (Self::PoolId, Self::TrancheId)>
type ForeignInvestment: ForeignInvestment<Self::AccountId, Amount = Self::Balance, TrancheAmount = Self::Balance, CurrencyId = Self::CurrencyId, InvestmentId = (Self::PoolId, Self::TrancheId)>
Enables investing and redeeming into investment classes with foreign currencies.
sourcetype AssetRegistry: Inspect<AssetId = Self::CurrencyId, Balance = <Self as Config>::Balance, CustomMetadata = CustomMetadata>
type AssetRegistry: Inspect<AssetId = Self::CurrencyId, Balance = <Self as Config>::Balance, CustomMetadata = CustomMetadata>
The source of truth for the transferability of assets via the LiquidityPools feature.
sourcetype CurrencyId: Parameter + Member + Copy + MaybeSerializeDeserialize + Ord + TypeInfo + MaxEncodedLen + TryInto<GeneralCurrencyIndexOf<Self>, Error = DispatchError> + TryFrom<GeneralCurrencyIndexOf<Self>, Error = DispatchError> + CurrencyInspect<CurrencyId = Self::CurrencyId> + From<(Self::PoolId, Self::TrancheId)>
type CurrencyId: Parameter + Member + Copy + MaybeSerializeDeserialize + Ord + TypeInfo + MaxEncodedLen + TryInto<GeneralCurrencyIndexOf<Self>, Error = DispatchError> + TryFrom<GeneralCurrencyIndexOf<Self>, Error = DispatchError> + CurrencyInspect<CurrencyId = Self::CurrencyId> + From<(Self::PoolId, Self::TrancheId)>
The currency type of transferable tokens.
sourcetype OutboundMessageHandler: OutboundMessageHandler<Sender = Self::AccountId, Message = Message, Destination = Domain> + GetByKey<Domain, Option<[u8; 20]>>
type OutboundMessageHandler: OutboundMessageHandler<Sender = Self::AccountId, Message = Message, Destination = Domain> + GetByKey<Domain, Option<[u8; 20]>>
The type for processing outgoing messages and retrieving the domain hook address.
sourcetype GeneralCurrencyPrefix: Get<[u8; 12]>
type GeneralCurrencyPrefix: Get<[u8; 12]>
The prefix for currencies added via the LiquidityPools feature.
sourcetype TreasuryAccount: Get<Self::AccountId>
type TreasuryAccount: Get<Self::AccountId>
The type for paying the transaction fees for the dispatch of
Fulfilled*
and ScheduleUpgrade
messages.
NOTE: We need to make sure to collect the appropriate amount beforehand as part of receiving the corresponding investment message.
type PreTransferFilter: PreConditions<(Self::AccountId, DomainAddress, Self::CurrencyId), Result = DispatchResult>
sourcetype MarketRatio: TokenSwaps<Self::AccountId, CurrencyId = Self::CurrencyId, Ratio = Self::BalanceRatio>
type MarketRatio: TokenSwaps<Self::AccountId, CurrencyId = Self::CurrencyId, Ratio = Self::BalanceRatio>
Type used to retrive market ratio information about currencies