pub trait Config<I: 'static = ()>: Config {
    type RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>;
    type PalletId: Get<PalletId>;
    type CurrencyId: AssetId + MaxEncodedLen + MaybeSerializeDeserialize + Default;
    type RewardCurrency: Get<Self::CurrencyId>;
    type GroupId: FullCodec + TypeInfo + MaxEncodedLen + Copy + PartialEq + Debug;
    type Currency: MutateHold<Self::AccountId, AssetId = Self::CurrencyId, Balance = <<Self as Config<I>>::RewardMechanism as RewardMechanism>::Balance, Reason = ()> + Mutate<Self::AccountId, AssetId = Self::CurrencyId, Balance = <<Self as Config<I>>::RewardMechanism as RewardMechanism>::Balance> + Inspect<Self::AccountId, AssetId = Self::CurrencyId, Balance = <<Self as Config<I>>::RewardMechanism as RewardMechanism>::Balance>;
    type RewardMechanism: RewardMechanism;
    type RewardIssuance: RewardIssuance<AccountId = Self::AccountId, CurrencyId = Self::CurrencyId, Balance = <<Self as Config<I>>::RewardMechanism as RewardMechanism>::Balance>;
}
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, I>> + IsType<<Self as Config>::RuntimeEvent>

source

type PalletId: Get<PalletId>

Identifier of this pallet used as an account where stores the reward that is not claimed. When you distribute reward, the amount distributed goes here.

source

type CurrencyId: AssetId + MaxEncodedLen + MaybeSerializeDeserialize + Default

Type used to identify currencies.

source

type RewardCurrency: Get<Self::CurrencyId>

Identifier for the currency used to give the reward.

source

type GroupId: FullCodec + TypeInfo + MaxEncodedLen + Copy + PartialEq + Debug

Type used to identify groups.

source

type Currency: MutateHold<Self::AccountId, AssetId = Self::CurrencyId, Balance = <<Self as Config<I>>::RewardMechanism as RewardMechanism>::Balance, Reason = ()> + Mutate<Self::AccountId, AssetId = Self::CurrencyId, Balance = <<Self as Config<I>>::RewardMechanism as RewardMechanism>::Balance> + Inspect<Self::AccountId, AssetId = Self::CurrencyId, Balance = <<Self as Config<I>>::RewardMechanism as RewardMechanism>::Balance>

Type used to handle currency transfers and reservations.

source

type RewardMechanism: RewardMechanism

Specify the internal reward mechanism used by this pallet. Check available mechanisms at mechanism module.

source

type RewardIssuance: RewardIssuance<AccountId = Self::AccountId, CurrencyId = Self::CurrencyId, Balance = <<Self as Config<I>>::RewardMechanism as RewardMechanism>::Balance>

Type used to identify the income stream for rewards.

Object Safety§

This trait is not object safe.

Implementors§