Trait supply::pallet::Config

source ·
pub trait Config: Config {
    type SupplyPalletId: Get<PalletId>;
    type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
    type UnsignedFixedPoint: FixedPointNumber<Inner = <<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance> + TruncateFixedPointToInt + Encode + EncodeLike + Decode + MaybeSerializeDeserialize + TypeInfo + MaxEncodedLen;
    type Currency: ReservableCurrency<Self::AccountId>;
    type InflationPeriod: Get<BlockNumberFor<Self>>;
    type OnInflation: OnInflation<Self::AccountId, Currency = Self::Currency>;
    type WeightInfo: 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.

Configuration

The pallet’s configuration trait.

Required Associated Types§

source

type SupplyPalletId: Get<PalletId>

The supply module id, used for deriving its sovereign account ID.

source

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

The overarching event type.

source

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

Unsigned fixed point type.

source

type Currency: ReservableCurrency<Self::AccountId>

The native currency for emission.

source

type InflationPeriod: Get<BlockNumberFor<Self>>

The period between inflation updates.

source

type OnInflation: OnInflation<Self::AccountId, Currency = Self::Currency>

Handler for when the total supply has inflated.

source

type WeightInfo: WeightInfo

Weight information for extrinsics in this pallet.

Implementors§