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§

source

type MomentIntoBalance: Convert<Self::Moment, BalanceOf<Self>>

Something that convert a Moment inot a Balance.

source

type Currency: Balanced<Self::AccountId> + Mutate<Self::AccountId>

The currency type used in this pallet.

source

type MaxPastReeval: Get<u32>

Maximum number of past UD revaluations to keep in storage.

source

type MembersCount: Get<BalanceOf<Self>>

Provides the number of accounts allowed to create the universal dividend.

source

type MembersStorage: StoredMap<Self::AccountId, FirstEligibleUd>

Storage for mapping AccountId to their first eligible UD creation time.

source

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

The overarching event type for this pallet.

source

type SquareMoneyGrowthRate: Get<Perbill>

Square of the money growth rate per UD reevaluation period.

source

type UdCreationPeriod: Get<Self::Moment>

Universal dividend creation period in milliseconds.

source

type UdReevalPeriod: Get<Self::Moment>

Universal dividend reevaluation period in milliseconds.

source

type WeightInfo: WeightInfo

Type representing the weight of this pallet.

source

type IdtyAttr: Idty<u32, Self::AccountId>

Something that gives the IdtyIndex of an AccountId and reverse, used for benchmarks.

Object Safety§

This trait is not object safe.

Implementors§