pub trait Config: Config {
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
type Currency: Currency<Self::AccountId>;
type AvgBlockspaceUsageNumBlocks: Get<u32>;
type TransactionByteFee: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>;
type MaxRewardPoints: Get<u32>;
type ProposerTaxOnVotes: Get<(u32, u32)>;
type RewardsEnabled: RewardsEnabled;
type FindBlockRewardAddress: FindBlockRewardAddress<Self::AccountId>;
type FindVotingRewardAddresses: FindVotingRewardAddresses<Self::AccountId>;
type WeightInfo: WeightInfo;
type OnReward: OnReward<Self::AccountId, <<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::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§
sourcetype RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
pallet-rewards
events
type Currency: Currency<Self::AccountId>
sourcetype AvgBlockspaceUsageNumBlocks: Get<u32>
type AvgBlockspaceUsageNumBlocks: Get<u32>
Number of blocks over which to compute average blockspace usage
sourcetype TransactionByteFee: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
type TransactionByteFee: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
Cost of one byte of blockspace
sourcetype MaxRewardPoints: Get<u32>
type MaxRewardPoints: Get<u32>
Max number of reward points
sourcetype ProposerTaxOnVotes: Get<(u32, u32)>
type ProposerTaxOnVotes: Get<(u32, u32)>
Tax of the proposer on vote rewards
sourcetype RewardsEnabled: RewardsEnabled
type RewardsEnabled: RewardsEnabled
Determine whether rewards are enabled or not
sourcetype FindBlockRewardAddress: FindBlockRewardAddress<Self::AccountId>
type FindBlockRewardAddress: FindBlockRewardAddress<Self::AccountId>
Reward address of block producer
sourcetype FindVotingRewardAddresses: FindVotingRewardAddresses<Self::AccountId>
type FindVotingRewardAddresses: FindVotingRewardAddresses<Self::AccountId>
Reward addresses of all receivers of voting rewards
type WeightInfo: WeightInfo
type OnReward: OnReward<Self::AccountId, <<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.