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§
Sourcetype Currency: Inspect<Self::AccountId> + Mutate<Self::AccountId> + Unbalanced<Self::AccountId> + Balanced<Self::AccountId>
type Currency: Inspect<Self::AccountId> + Mutate<Self::AccountId> + Unbalanced<Self::AccountId> + Balanced<Self::AccountId>
The currency type (new fungible traits).
Sourcetype IssuanceCurve: IssuanceCurve<BalanceOf<Self>>
type IssuanceCurve: IssuanceCurve<BalanceOf<Self>>
Issuance curve: computes how much to mint given total issuance and elapsed time.
Sourcetype BudgetRecipients: BudgetRecipientList<Self::AccountId>
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);Sourcetype Time: Time
type Time: Time
Time provider (typically pallet_timestamp).
Moment must represent milliseconds.
Sourcetype IssuanceCadence: Get<u64>
type IssuanceCadence: Get<u64>
Minimum elapsed time (ms) between issuance drips.
0= drip every block60_000= drip every minute (Recommended)
Should be small relative to era length.
Sourcetype MaxElapsedPerDrip: Get<u64>
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.
Sourcetype BudgetOrigin: EnsureOrigin<Self::RuntimeOrigin>
type BudgetOrigin: EnsureOrigin<Self::RuntimeOrigin>
Origin that can update budget allocation percentages.
Sourcetype WeightInfo: WeightInfo
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.