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§
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
Sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for all calls of this pallet.
Sourcetype Currency: Mutate<Self::AccountId> + Balanced<Self::AccountId>
type Currency: Mutate<Self::AccountId> + Balanced<Self::AccountId>
Currency used to pay for Coretime.
Sourcetype AdminOrigin: EnsureOrigin<Self::RuntimeOrigin>
type AdminOrigin: EnsureOrigin<Self::RuntimeOrigin>
The origin test needed for administrating this pallet.
Sourcetype OnRevenue: OnUnbalanced<Credit<Self::AccountId, Self::Currency>>
type OnRevenue: OnUnbalanced<Credit<Self::AccountId, Self::Currency>>
What to do with any revenues collected from the sale of Coretime.
Sourcetype Coretime: CoretimeInterface
type Coretime: CoretimeInterface
Relay chain’s Coretime API used to interact with and instruct the low-level scheduling system.
Sourcetype PriceAdapter: AdaptPrice<BalanceOf<Self>>
type PriceAdapter: AdaptPrice<BalanceOf<Self>>
The algorithm to determine the next price on the basis of market performance.
Sourcetype ConvertBalance: Convert<BalanceOf<Self>, RelayBalanceOf<Self>> + ConvertBack<BalanceOf<Self>, RelayBalanceOf<Self>>
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.
Sourcetype SovereignAccountOf: MaybeConvert<TaskId, Self::AccountId>
type SovereignAccountOf: MaybeConvert<TaskId, Self::AccountId>
Type used for getting the associated account of a task. This account is controlled by the task itself.
Sourcetype TimeslicePeriod: Get<RelayBlockNumberOf<Self>>
type TimeslicePeriod: Get<RelayBlockNumberOf<Self>>
Number of Relay-chain blocks per timeslice.
Sourcetype MaxLeasedCores: Get<u32>
type MaxLeasedCores: Get<u32>
Maximum number of legacy leases.
Sourcetype MaxReservedCores: Get<u32>
type MaxReservedCores: Get<u32>
Maximum number of system cores.
Sourcetype MaxAutoRenewals: Get<u32>
type MaxAutoRenewals: Get<u32>
Given that we are performing all auto-renewals in a single block, it has to be limited.
Sourcetype MinimumCreditPurchase: Get<BalanceOf<Self>>
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.