referrerpolicy=no-referrer-when-downgrade
pallet_broker::pallet

Trait Config

Source
pub trait Config: Config {
Show 15 associated items type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>; type WeightInfo: WeightInfo; type Currency: Mutate<Self::AccountId> + Balanced<Self::AccountId>; type AdminOrigin: EnsureOrigin<Self::RuntimeOrigin>; type OnRevenue: OnUnbalanced<Credit<Self::AccountId, Self::Currency>>; type Coretime: CoretimeInterface; type PriceAdapter: AdaptPrice<BalanceOf<Self>>; type ConvertBalance: Convert<BalanceOf<Self>, RelayBalanceOf<Self>> + ConvertBack<BalanceOf<Self>, RelayBalanceOf<Self>>; type SovereignAccountOf: MaybeConvert<TaskId, Self::AccountId>; type PalletId: Get<PalletId>; type TimeslicePeriod: Get<RelayBlockNumberOf<Self>>; type MaxLeasedCores: Get<u32>; type MaxReservedCores: Get<u32>; type MaxAutoRenewals: Get<u32>; type MinimumCreditPurchase: Get<BalanceOf<Self>>;
}
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 RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>

Source

type WeightInfo: WeightInfo

Weight information for all calls of this pallet.

Source

type Currency: Mutate<Self::AccountId> + Balanced<Self::AccountId>

Currency used to pay for Coretime.

Source

type AdminOrigin: EnsureOrigin<Self::RuntimeOrigin>

The origin test needed for administrating this pallet.

Source

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

What to do with any revenues collected from the sale of Coretime.

Source

type Coretime: CoretimeInterface

Relay chain’s Coretime API used to interact with and instruct the low-level scheduling system.

Source

type PriceAdapter: AdaptPrice<BalanceOf<Self>>

The algorithm to determine the next price on the basis of market performance.

Source

type ConvertBalance: Convert<BalanceOf<Self>, RelayBalanceOf<Self>> + ConvertBack<BalanceOf<Self>, RelayBalanceOf<Self>>

Reversible conversion from local balance to Relay-chain balance. This will typically be the Identity, but provided just in case the chains use different representations.

Source

type SovereignAccountOf: MaybeConvert<TaskId, Self::AccountId>

Type used for getting the associated account of a task. This account is controlled by the task itself.

Source

type PalletId: Get<PalletId>

Identifier from which the internal Pot is generated.

Source

type TimeslicePeriod: Get<RelayBlockNumberOf<Self>>

Number of Relay-chain blocks per timeslice.

Source

type MaxLeasedCores: Get<u32>

Maximum number of legacy leases.

Source

type MaxReservedCores: Get<u32>

Maximum number of system cores.

Source

type MaxAutoRenewals: Get<u32>

Given that we are performing all auto-renewals in a single block, it has to be limited.

Source

type MinimumCreditPurchase: Get<BalanceOf<Self>>

The smallest amount of credits a user can purchase.

Needed to prevent spam attacks.

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§

impl Config for Runtime

impl Config for Runtime

impl Config for Runtime