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§

source

type Currency: Currency<Self::AccountId>

source

type GetCurrentEpochIndex: Get<u64>

Get the current epoch index

source

type MaxRequests: Get<u32>

Maximum number of not yet filled requests

source

type RequestPrice: Get<BalanceOf<Self>>

The price of a request

source

type OnFilledRandomness: OnFilledRandomness

On filled randomness

source

type OnUnbalanced: OnUnbalanced<NegativeImbalanceOf<Self>>

Handler for the unbalanced reduction when the requestor pays fees.

source

type ParentBlockRandomness: Randomness<Option<H256>, BlockNumberFor<Self>>

A safe source of randomness from the parent block

source

type RandomnessFromOneEpochAgo: Randomness<H256, BlockNumberFor<Self>>

A safe source of randomness from one epoch ago

source

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

The overarching event type.

source

type WeightInfo: WeightInfo

Type representing the weight of this pallet

Object Safety§

This trait is not object safe.

Implementors§