referrerpolicy=no-referrer-when-downgrade

Config

Trait Config 

Source
pub trait Config: Config + Config<RuntimeEvent: From<Event<Self>>> {
    type WeightInfo: WeightInfo;
    type Currency: Mutate<Self::AccountId>;
    type AdminOrigin: EnsureOrigin<Self::RuntimeOrigin>;
    type RelayBlockNumberProvider: BlockNumberProvider;
    type PoolCapacityProvider: PoolCapacityProvider;
    type PricingProvider: PricingProvider<BalanceOf<Self>>;
    type OrderQueue: QueueOnDemandOrders<RelayBlockNumberOf<Self>>;
    type MaxBatchSize: Get<u32>;
    type TimeslicePeriod: Get<RelayBlockNumberOf<Self>>;
    type MaxUnclaimedTimeslices: Get<u32>;
    type PalletId: Get<PalletId>;
}
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 WeightInfo: WeightInfo

Weight information for all calls of this pallet.

Source

type Currency: Mutate<Self::AccountId>

Currency used to pay for on-demand Coretime.

Source

type AdminOrigin: EnsureOrigin<Self::RuntimeOrigin>

The origin for administrating this pallet.

Source

type RelayBlockNumberProvider: BlockNumberProvider

Provider of the current Relay-chain block number.

Source

type PoolCapacityProvider: PoolCapacityProvider

Provider of the on-demand pool capacity.

Source

type PricingProvider: PricingProvider<BalanceOf<Self>>

Provider of the order pricing algorithm.

Source

type OrderQueue: QueueOnDemandOrders<RelayBlockNumberOf<Self>>

Used to instruct the Relay chain to enqueue the orders placed here.

Source

type MaxBatchSize: Get<u32>

Maximum pending batch size. NOTE: Since we don’t do chunking, this number of pending orders needs to fit within a single XCM message. This way on_finalize will never send more than one message. Since this pallet is intended to be a temporary solution, and current (as of September 2026) usage of the on-demand feature is low to moderate, it is expected not to be necessary to extend this functionality to allow more orders in a single block.

Source

type TimeslicePeriod: Get<RelayBlockNumberOf<Self>>

The number of Relay-chain blocks in a timeslice.

Revenue is booked against the timeslice an order was placed in, so this must match the TimeslicePeriod of the pallet-broker instance claiming it.

Source

type MaxUnclaimedTimeslices: Get<u32>

The maximum number of timeslices whose unclaimed revenue is kept apart.

Normally only the revenue of the current timeslice and of the one which has just ended is unclaimed, but more builds up while the revenue cannot be paid out. Once this many timeslices have unclaimed revenue, the revenue of the oldest one is merged into the next oldest one, so it is never lost, but is attributed to a later timeslice. This may cause the revenue to be paid to a different set of contributors, which is why this number should be big enough to minimize the probability of that happening.

Source

type PalletId: Get<PalletId>

Identifier from which the internal Pot is generated.

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.

Implementors§