pub trait Config: Config<Hash = H256> {
    type Currency: Balanced<Self::AccountId> + Mutate<Self::AccountId>;
    type GetCurrentEpochIndex: Get<u64>;
    type MaxRequests: Get<u32>;
    type RequestPrice: Get<BalanceOf<Self>>;
    type OnFilledRandomness: OnFilledRandomness;
    type OnUnbalanced: OnUnbalanced<Credit<Self::AccountId, Self::Currency>>;
    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: Balanced<Self::AccountId> + Mutate<Self::AccountId>

source

type GetCurrentEpochIndex: Get<u64>

Type providing 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

Handler called when randomness is filled.

source

type OnUnbalanced: OnUnbalanced<Credit<Self::AccountId, Self::Currency>>

Handler for 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§