Trait pallet_provide_randomness::pallet::Config
source · pub trait Config: Config<Hash = H256> {
type Currency: Currency<Self::AccountId>;
type GetCurrentEpochIndex: Get<u64>;
type MaxRequests: Get<u32>;
type RequestPrice: Get<BalanceOf<Self>>;
type OnFilledRandomness: OnFilledRandomness;
type OnUnbalanced: OnUnbalanced<NegativeImbalanceOf<Self>>;
type ParentBlockRandomness: Randomness<Option<H256>, BlockNumberFor<Self>>;
type RandomnessFromOneEpochAgo: Randomness<H256, BlockNumberFor<Self>>;
type RuntimeEvent: From<Event> + IsType<<Self as Config>::RuntimeEvent>;
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. Configuration trait.
Required Associated Types§
type Currency: Currency<Self::AccountId>
sourcetype GetCurrentEpochIndex: Get<u64>
type GetCurrentEpochIndex: Get<u64>
Get the current epoch index
sourcetype MaxRequests: Get<u32>
type MaxRequests: Get<u32>
Maximum number of not yet filled requests
sourcetype RequestPrice: Get<BalanceOf<Self>>
type RequestPrice: Get<BalanceOf<Self>>
The price of a request
sourcetype OnFilledRandomness: OnFilledRandomness
type OnFilledRandomness: OnFilledRandomness
On filled randomness
sourcetype OnUnbalanced: OnUnbalanced<NegativeImbalanceOf<Self>>
type OnUnbalanced: OnUnbalanced<NegativeImbalanceOf<Self>>
Handler for the unbalanced reduction when the requestor pays fees.
sourcetype ParentBlockRandomness: Randomness<Option<H256>, BlockNumberFor<Self>>
type ParentBlockRandomness: Randomness<Option<H256>, BlockNumberFor<Self>>
A safe source of randomness from the parent block
sourcetype RandomnessFromOneEpochAgo: Randomness<H256, BlockNumberFor<Self>>
type RandomnessFromOneEpochAgo: Randomness<H256, BlockNumberFor<Self>>
A safe source of randomness from one epoch ago
sourcetype RuntimeEvent: From<Event> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event> + IsType<<Self as Config>::RuntimeEvent>
The overarching event type.
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Type representing the weight of this pallet
Object Safety§
This trait is not object safe.