Trait currency::pallet::Config

source ·
pub trait Config: Config + Config<Balance = <Self as Config>::Balance, CurrencyId = PrimitivesCurrencyId> {
    type UnsignedFixedPoint: FixedPointNumber<Inner = <Self as Config>::Balance> + TruncateFixedPointToInt + Encode + EncodeLike + Decode + MaybeSerializeDeserialize + TypeInfo + From<<Self as Config>::Balance> + MaxEncodedLen;
    type SignedInner: Debug + CheckedDiv + TryFrom<<Self as Config>::Balance> + TryInto<<Self as Config>::Balance> + MaybeSerializeDeserialize;
    type SignedFixedPoint: FixedPointNumber<Inner = <Self as Config>::SignedInner> + TruncateFixedPointToInt + Encode + EncodeLike + Decode + MaybeSerializeDeserialize;
    type Balance: AtLeast32BitUnsigned + FixedPointOperand + Into<U256> + TryFrom<U256> + TryFrom<i64> + TryInto<i64> + MaybeSerializeDeserialize + FullCodec + Copy + Default + Debug + TypeInfo + MaxEncodedLen;
    type GetNativeCurrencyId: Get<CurrencyId<Self>>;
    type GetRelayChainCurrencyId: Get<CurrencyId<Self>>;
    type GetWrappedCurrencyId: Get<CurrencyId<Self>>;
    type CurrencyConversion: CurrencyConversion<Amount<Self>, CurrencyId<Self>>;
}
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.

Configuration

The pallet’s configuration trait.

Required Associated Types§

source

type UnsignedFixedPoint: FixedPointNumber<Inner = <Self as Config>::Balance> + TruncateFixedPointToInt + Encode + EncodeLike + Decode + MaybeSerializeDeserialize + TypeInfo + From<<Self as Config>::Balance> + MaxEncodedLen

source

type SignedInner: Debug + CheckedDiv + TryFrom<<Self as Config>::Balance> + TryInto<<Self as Config>::Balance> + MaybeSerializeDeserialize

source

type SignedFixedPoint: FixedPointNumber<Inner = <Self as Config>::SignedInner> + TruncateFixedPointToInt + Encode + EncodeLike + Decode + MaybeSerializeDeserialize

source

type Balance: AtLeast32BitUnsigned + FixedPointOperand + Into<U256> + TryFrom<U256> + TryFrom<i64> + TryInto<i64> + MaybeSerializeDeserialize + FullCodec + Copy + Default + Debug + TypeInfo + MaxEncodedLen

source

type GetNativeCurrencyId: Get<CurrencyId<Self>>

Native currency e.g. INTR/KINT

source

type GetRelayChainCurrencyId: Get<CurrencyId<Self>>

Relay chain currency e.g. DOT/KSM

source

type GetWrappedCurrencyId: Get<CurrencyId<Self>>

Wrapped currency e.g. IBTC/KBTC

source

type CurrencyConversion: CurrencyConversion<Amount<Self>, CurrencyId<Self>>

Implementors§