Trait pallet_rewards::pallet::Config
source · pub trait Config: Config {
Show 19 associated items
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
type Currency: Currency<Self::AccountId>;
type FindAuthor: FindAuthor<Self::AccountId>;
type TreasuryAccounts: TreasuryAccountProvider<Self::AccountId>;
type TotalInflation: Get<Perbill>;
type AttesterInflation: Get<Perbill>;
type ExecutorInflation: Get<Perbill>;
type CollatorInflation: Get<Perbill>;
type TreasuryInflation: Get<Perbill>;
type OneYear: Get<BlockNumberFor<Self>>;
type InflationDistributionPeriod: Get<BlockNumberFor<Self>>;
type AvailableBootstrapSpenditure: Get<BalanceOf<Self>>;
type AttesterBootstrapRewards: Get<Percent>;
type CollatorBootstrapRewards: Get<Percent>;
type ExecutorBootstrapRewards: Get<Percent>;
type StartingRepatriationPercentage: Get<Percent>;
type Clock: ClockTrait<Self>;
type AccountManager: AccountManager<Self::AccountId, BalanceOf<Self>, Self::Hash, BlockNumberFor<Self>, u32>;
type Attesters: AttestersReadApi<Self::AccountId, BalanceOf<Self>, BlockNumberFor<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.
Required Associated Types§
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
type Currency: Currency<Self::AccountId>
sourcetype FindAuthor: FindAuthor<Self::AccountId>
type FindAuthor: FindAuthor<Self::AccountId>
Find the author of a block.
type TreasuryAccounts: TreasuryAccountProvider<Self::AccountId>
sourcetype TotalInflation: Get<Perbill>
type TotalInflation: Get<Perbill>
The total inflation per year, expressed as a Perbill.
Default: 4.4% (44_000_000 / 1_000_000_000)
sourcetype AttesterInflation: Get<Perbill>
type AttesterInflation: Get<Perbill>
The attester’s portion of the total inflation, expressed as a Perbill.
Default: 1.1% (11 / 100)
sourcetype ExecutorInflation: Get<Perbill>
type ExecutorInflation: Get<Perbill>
The executor’s portion of the total inflation, expressed as a Perbill.
Default: 0.8% (8 / 100)
sourcetype CollatorInflation: Get<Perbill>
type CollatorInflation: Get<Perbill>
The collator’s portion of the total inflation, expressed as a Perbill.
Default: 0.5% (5 / 100)
sourcetype TreasuryInflation: Get<Perbill>
type TreasuryInflation: Get<Perbill>
The treasury’s portion of the total inflation, expressed as a Perbill.
Default: 2% (20 / 100)
sourcetype OneYear: Get<BlockNumberFor<Self>>
type OneYear: Get<BlockNumberFor<Self>>
The number of blocks in one year.
Default: 2_628_000 (assuming 12s block time)
sourcetype InflationDistributionPeriod: Get<BlockNumberFor<Self>>
type InflationDistributionPeriod: Get<BlockNumberFor<Self>>
The number of blocks between inflation distribution.
Default: 100_800 (assuming one distribution per two weeks)