pub trait Config<I: 'static = ()>: Config {
    type WeightInfo: WeightInfo;
    type RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>;
    type Paymaster: Pay<Beneficiary = <Self as Config>::AccountId, AssetKind = ()>;
    type Members: RankedMembers<AccountId = <Self as Config>::AccountId>;
    type Salary: GetSalary<<Self::Members as RankedMembers>::Rank, Self::AccountId, <Self::Paymaster as Pay>::Balance>;
    type RegistrationPeriod: Get<BlockNumberFor<Self>>;
    type PayoutPeriod: Get<BlockNumberFor<Self>>;
    type Budget: Get<BalanceOf<Self, I>>;
}
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 WeightInfo: WeightInfo

Weight information for extrinsics in this pallet.

source

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

The runtime event type.

source

type Paymaster: Pay<Beneficiary = <Self as Config>::AccountId, AssetKind = ()>

Means by which we can make payments to accounts. This also defines the currency and the balance which we use to denote that currency.

source

type Members: RankedMembers<AccountId = <Self as Config>::AccountId>

The current membership of payees.

source

type Salary: GetSalary<<Self::Members as RankedMembers>::Rank, Self::AccountId, <Self::Paymaster as Pay>::Balance>

The maximum payout to be made for a single period to an active member of the given rank.

The benchmarks require that this be non-zero for some rank at most 255.

source

type RegistrationPeriod: Get<BlockNumberFor<Self>>

The number of blocks within a cycle which accounts have to register their intent to claim.

The number of blocks between sequential payout cycles is the sum of this and PayoutPeriod.

source

type PayoutPeriod: Get<BlockNumberFor<Self>>

The number of blocks within a cycle which accounts have to claim the payout.

The number of blocks between sequential payout cycles is the sum of this and RegistrationPeriod.

source

type Budget: Get<BalanceOf<Self, I>>

The total budget per cycle.

This may change over the course of a cycle without any problem.

Implementors§