referrerpolicy=no-referrer-when-downgrade

Config

Trait Config 

Source
pub trait Config: Config<RuntimeEvent: From<Event<Self>>> + Config<RuntimeEvent: From<Event<Self>>> {
    type Currency: Inspect<Self::AccountId> + Mutate<Self::AccountId> + Unbalanced<Self::AccountId> + Balanced<Self::AccountId>;
    type PalletId: Get<PalletId>;
    type IssuanceCurve: IssuanceCurve<BalanceOf<Self>>;
    type BudgetRecipients: BudgetRecipientList<Self::AccountId>;
    type Time: Time;
    type IssuanceCadence: Get<u64>;
    type MaxElapsedPerDrip: Get<u64>;
    type BudgetOrigin: EnsureOrigin<Self::RuntimeOrigin>;
    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.

Required Associated Types§

Source

type Currency: Inspect<Self::AccountId> + Mutate<Self::AccountId> + Unbalanced<Self::AccountId> + Balanced<Self::AccountId>

The currency type (new fungible traits).

Source

type PalletId: Get<PalletId>

The pallet ID used to derive the buffer account.

Source

type IssuanceCurve: IssuanceCurve<BalanceOf<Self>>

Issuance curve: computes how much to mint given total issuance and elapsed time.

Source

type BudgetRecipients: BudgetRecipientList<Self::AccountId>

Registered budget recipients. Each element provides a unique key and pot account.

Wired in the runtime as a tuple, e.g.:

type BudgetRecipients = (Dap, StakerRewardRecipient, ValidatorIncentiveRecipient);
Source

type Time: Time

Time provider (typically pallet_timestamp).

Moment must represent milliseconds.

Source

type IssuanceCadence: Get<u64>

Minimum elapsed time (ms) between issuance drips.

  • 0 = drip every block
  • 60_000 = drip every minute (Recommended)

Should be small relative to era length.

Source

type MaxElapsedPerDrip: Get<u64>

Safety ceiling: maximum elapsed time (ms) considered in a single drip.

If more time has passed than this, elapsed is clamped to this value. Prevents accidental over-minting from bugs, misconfiguration, or long periods without blocks.

Source

type BudgetOrigin: EnsureOrigin<Self::RuntimeOrigin>

Origin that can update budget allocation percentages.

Source

type WeightInfo: WeightInfo

Weight information for extrinsics in this pallet.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§