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§

source

type WeightInfo: WeightInfo

Weight information for extrinsics in this pallet.

source

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.

source

type PoolId: Member + Parameter + Default + Copy + HasCompact + MaxEncodedLen + Debug + Into<u64> + From<u64>

source

type TrancheId: Member + Parameter + Default + Copy + MaxEncodedLen + TypeInfo + From<[u8; 16]> + Into<[u8; 16]>

source

type BalanceRatio: Parameter + Member + MaybeSerializeDeserialize + FixedPointNumber<Inner = u128> + TypeInfo

The fixed point number representation for higher precision.

source

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.

source

type TrancheTokenPrice: TrancheTokenPrice<Self::AccountId, Self::CurrencyId, BalanceRatio = Self::BalanceRatio, PoolId = Self::PoolId, TrancheId = Self::TrancheId, Moment = Seconds>

source

type Permission: Permissions<Self::AccountId, Scope = PermissionScope<Self::PoolId, Self::CurrencyId>, Role = Role<Self::TrancheId>, Error = DispatchError>

The source of truth for investment permissions.

source

type Time: TimeAsSecs

The UNIX timestamp provider type required for checking the validity of investments.

source

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.

source

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.

source

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.

source

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.

source

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.

source

type GeneralCurrencyPrefix: Get<[u8; 12]>

The prefix for currencies added via the LiquidityPools feature.

source

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.

source

type PreTransferFilter: PreConditions<(Self::AccountId, DomainAddress, Self::CurrencyId), Result = DispatchResult>

source

type MarketRatio: TokenSwaps<Self::AccountId, CurrencyId = Self::CurrencyId, Ratio = Self::BalanceRatio>

Type used to retrive market ratio information about currencies

source

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

Object Safety§

This trait is not object safe.

Implementors§