pub trait ConfigRewards: Config {
Show 19 associated items type RuntimeEvent: From<Event<Self>> + IsType<Self::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<<<Self::Block as HeaderProvider>::HeaderT as Header>::Number>; type InflationDistributionPeriod: Get<<<Self::Block as HeaderProvider>::HeaderT as Header>::Number>; type AvailableBootstrapSpenditure: Get<<Self::Currency as Currency<Self::AccountId>>::Balance>; type AttesterBootstrapRewards: Get<Percent>; type CollatorBootstrapRewards: Get<Percent>; type ExecutorBootstrapRewards: Get<Percent>; type StartingRepatriationPercentage: Get<Percent>; type Clock: Clock<Self>; type AccountManager: AccountManager<Self::AccountId, <Self::Currency as Currency<Self::AccountId>>::Balance, Self::Hash, <<Self::Block as HeaderProvider>::HeaderT as Header>::Number, u32>; type Attesters: AttestersReadApi<Self::AccountId, <Self::Currency as Currency<Self::AccountId>>::Balance, <<Self::Block as HeaderProvider>::HeaderT as Header>::Number>;
}
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::RuntimeEvent>

type Currency: Currency<Self::AccountId>

type FindAuthor: FindAuthor<Self::AccountId>

Find the author of a block.

type TreasuryAccounts: TreasuryAccountProvider<Self::AccountId>

type TotalInflation: Get<Perbill>

The total inflation per year, expressed as a Perbill.

Default: 4.4% (44_000_000 / 1_000_000_000)

type AttesterInflation: Get<Perbill>

The attester’s portion of the total inflation, expressed as a Perbill.

Default: 1.1% (11 / 100)

type ExecutorInflation: Get<Perbill>

The executor’s portion of the total inflation, expressed as a Perbill.

Default: 0.8% (8 / 100)

type CollatorInflation: Get<Perbill>

The collator’s portion of the total inflation, expressed as a Perbill.

Default: 0.5% (5 / 100)

type TreasuryInflation: Get<Perbill>

The treasury’s portion of the total inflation, expressed as a Perbill.

Default: 2% (20 / 100)

type OneYear: Get<<<Self::Block as HeaderProvider>::HeaderT as Header>::Number>

The number of blocks in one year.

Default: 2_628_000 (assuming 12s block time)

type InflationDistributionPeriod: Get<<<Self::Block as HeaderProvider>::HeaderT as Header>::Number>

The number of blocks between inflation distribution.

Default: 100_800 (assuming one distribution per two weeks)

type AvailableBootstrapSpenditure: Get<<Self::Currency as Currency<Self::AccountId>>::Balance>

type AttesterBootstrapRewards: Get<Percent>

type CollatorBootstrapRewards: Get<Percent>

type ExecutorBootstrapRewards: Get<Percent>

type StartingRepatriationPercentage: Get<Percent>

type Clock: Clock<Self>

type AccountManager: AccountManager<Self::AccountId, <Self::Currency as Currency<Self::AccountId>>::Balance, Self::Hash, <<Self::Block as HeaderProvider>::HeaderT as Header>::Number, u32>

type Attesters: AttestersReadApi<Self::AccountId, <Self::Currency as Currency<Self::AccountId>>::Balance, <<Self::Block as HeaderProvider>::HeaderT as Header>::Number>

Implementors§