Trait pallet_broker::pallet::Config
source · pub trait Config: Config {
Show 14 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>;
}
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.