pub trait Config: Config {
    type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
    type AdminOrigin: EnsureOrigin<Self::RuntimeOrigin>;
    type Balance: Balance + MaxEncodedLen + FixedPointOperand;
    type CurrencyId: AssetId + MaxEncodedLen + Clone + Ord;
    type GroupId: Parameter + MaxEncodedLen + Ord + Copy;
    type Weight: Parameter + MaxEncodedLen + EnsureAdd + Unsigned + FixedPointOperand + Default;
    type Rewards: GroupRewards<Balance = Self::Balance, GroupId = Self::GroupId> + AccountRewards<Self::AccountId, Balance = Self::Balance, CurrencyId = Self::CurrencyId> + CurrencyGroupChange<GroupId = Self::GroupId, CurrencyId = Self::CurrencyId> + DistributedRewards<Balance = Self::Balance, GroupId = Self::GroupId>;
    type Timer: Time;
    type MaxGroups: Get<u32> + TypeInfo;
    type MaxChangesPerEpoch: Get<u32> + TypeInfo + Debug + Clone + PartialEq;
    type InitialEpochDuration: Get<MomentOf<Self>>;
    type WeightInfo: WeightInfo;
}
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 RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>

source

type AdminOrigin: EnsureOrigin<Self::RuntimeOrigin>

Required origin for admin purposes for configuring groups and currencies.

source

type Balance: Balance + MaxEncodedLen + FixedPointOperand

Type used to handle balances.

source

type CurrencyId: AssetId + MaxEncodedLen + Clone + Ord

Type used to identify currencies.

source

type GroupId: Parameter + MaxEncodedLen + Ord + Copy

Type used to identify groups.

source

type Weight: Parameter + MaxEncodedLen + EnsureAdd + Unsigned + FixedPointOperand + Default

Type used to handle group weights.

source

type Rewards: GroupRewards<Balance = Self::Balance, GroupId = Self::GroupId> + AccountRewards<Self::AccountId, Balance = Self::Balance, CurrencyId = Self::CurrencyId> + CurrencyGroupChange<GroupId = Self::GroupId, CurrencyId = Self::CurrencyId> + DistributedRewards<Balance = Self::Balance, GroupId = Self::GroupId>

The reward system used.

source

type Timer: Time

source

type MaxGroups: Get<u32> + TypeInfo

Max groups used by this pallet. If this limit is reached, the exceeded groups are either not computed and not stored.

source

type MaxChangesPerEpoch: Get<u32> + TypeInfo + Debug + Clone + PartialEq

Max number of changes of the same type enqueued to apply in the next epoch. Max calls to Pallet::set_group_weight() or to Pallet::set_currency_group() with the same id.

source

type InitialEpochDuration: Get<MomentOf<Self>>

Initial epoch duration. This value can be updated later using Pallet::set_epoch_duration()`.

source

type WeightInfo: WeightInfo

Information of runtime weights

Object Safety§

This trait is not object safe.

Implementors§