Trait pallet_universal_dividend::pallet::Config
source · pub trait Config: Config + Config {
type MomentIntoBalance: Convert<Self::Moment, BalanceOf<Self>>;
type Currency: Currency<Self::AccountId>;
type MaxPastReeval: Get<u32>;
type MembersCount: Get<BalanceOf<Self>>;
type MembersStorage: StoredMap<Self::AccountId, FirstEligibleUd>;
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
type SquareMoneyGrowthRate: Get<Perbill>;
type UdCreationPeriod: Get<Self::Moment>;
type UdReevalPeriod: Get<Self::Moment>;
type UnitsPerUd: Get<BalanceOf<Self>>;
type WeightInfo: WeightInfo;
type AccountIdOf: Convert<u32, Option<Self::AccountId>>;
}
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 MomentIntoBalance: Convert<Self::Moment, BalanceOf<Self>>
type Currency: Currency<Self::AccountId>
sourcetype MaxPastReeval: Get<u32>
type MaxPastReeval: Get<u32>
Maximum number of past UD revaluations to keep in storage.
sourcetype MembersCount: Get<BalanceOf<Self>>
type MembersCount: Get<BalanceOf<Self>>
Somethings that must provide the number of accounts allowed to create the universal dividend
sourcetype MembersStorage: StoredMap<Self::AccountId, FirstEligibleUd>
type MembersStorage: StoredMap<Self::AccountId, FirstEligibleUd>
Somethings that must provide the list of accounts ids allowed to create the universal dividend
sourcetype RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
Because this pallet emits events, it depends on the runtime’s definition of an event.
sourcetype SquareMoneyGrowthRate: Get<Perbill>
type SquareMoneyGrowthRate: Get<Perbill>
Square of the money growth rate per ud reevaluation period
sourcetype UdCreationPeriod: Get<Self::Moment>
type UdCreationPeriod: Get<Self::Moment>
Universal dividend creation period (ms)
sourcetype UdReevalPeriod: Get<Self::Moment>
type UdReevalPeriod: Get<Self::Moment>
Universal dividend reevaluation period (ms)
sourcetype UnitsPerUd: Get<BalanceOf<Self>>
type UnitsPerUd: Get<BalanceOf<Self>>
The number of units to divide the amounts expressed in number of UDs Example: If you wish to express the UD amounts with a maximum precision of the order of the milliUD, choose 1000
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Pallet weights info