Trait pallet_salary::pallet::Config
source · 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§
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics in this pallet.
sourcetype RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>
The runtime event type.
sourcetype Paymaster: Pay<Beneficiary = <Self as Config>::AccountId, AssetKind = ()>
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.
sourcetype Members: RankedMembers<AccountId = <Self as Config>::AccountId>
type Members: RankedMembers<AccountId = <Self as Config>::AccountId>
The current membership of payees.
sourcetype Salary: GetSalary<<Self::Members as RankedMembers>::Rank, Self::AccountId, <Self::Paymaster as Pay>::Balance>
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.
sourcetype RegistrationPeriod: Get<BlockNumberFor<Self>>
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
.
sourcetype PayoutPeriod: Get<BlockNumberFor<Self>>
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
.