Trait pallet_universal_dividend::pallet::Config
source · pub trait Config: Config + Config {
type MomentIntoBalance: Convert<Self::Moment, BalanceOf<Self>>;
type Currency: Balanced<Self::AccountId> + Mutate<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 WeightInfo: WeightInfo;
type IdtyAttr: Idty<u32, 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§
sourcetype MomentIntoBalance: Convert<Self::Moment, BalanceOf<Self>>
type MomentIntoBalance: Convert<Self::Moment, BalanceOf<Self>>
Something that convert a Moment inot a Balance.
sourcetype Currency: Balanced<Self::AccountId> + Mutate<Self::AccountId>
type Currency: Balanced<Self::AccountId> + Mutate<Self::AccountId>
The currency type used in this pallet.
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>>
Provides the number of accounts allowed to create the universal dividend.
sourcetype MembersStorage: StoredMap<Self::AccountId, FirstEligibleUd>
type MembersStorage: StoredMap<Self::AccountId, FirstEligibleUd>
Storage for mapping AccountId to their first eligible UD creation time.
sourcetype RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
The overarching event type for this pallet.
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 in milliseconds.
sourcetype UdReevalPeriod: Get<Self::Moment>
type UdReevalPeriod: Get<Self::Moment>
Universal dividend reevaluation period in milliseconds.
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Type representing the weight of this pallet.