Trait pallet_scheduler::pallet::Config
source · pub trait Config: Config {
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
type RuntimeOrigin: OriginTrait<PalletsOrigin = Self::PalletsOrigin> + From<Self::PalletsOrigin> + IsType<<Self as Config>::RuntimeOrigin>;
type PalletsOrigin: From<RawOrigin<Self::AccountId>> + CallerTrait<Self::AccountId> + MaxEncodedLen;
type RuntimeCall: Parameter + Dispatchable<RuntimeOrigin = <Self as Config>::RuntimeOrigin, PostInfo = PostDispatchInfo> + GetDispatchInfo + From<Call<Self>>;
type MaximumWeight: Get<Weight>;
type ScheduleOrigin: EnsureOrigin<<Self as Config>::RuntimeOrigin>;
type OriginPrivilegeCmp: PrivilegeCmp<Self::PalletsOrigin>;
type MaxScheduledPerBlock: Get<u32>;
type WeightInfo: WeightInfo;
type Preimages: QueryPreimage<H = Self::Hashing> + StorePreimage;
}
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.
system::Config
should always be included in our implied traits.
Required Associated Types§
sourcetype RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
The overarching event type.
sourcetype RuntimeOrigin: OriginTrait<PalletsOrigin = Self::PalletsOrigin> + From<Self::PalletsOrigin> + IsType<<Self as Config>::RuntimeOrigin>
type RuntimeOrigin: OriginTrait<PalletsOrigin = Self::PalletsOrigin> + From<Self::PalletsOrigin> + IsType<<Self as Config>::RuntimeOrigin>
The aggregated origin which the dispatch will take.
sourcetype PalletsOrigin: From<RawOrigin<Self::AccountId>> + CallerTrait<Self::AccountId> + MaxEncodedLen
type PalletsOrigin: From<RawOrigin<Self::AccountId>> + CallerTrait<Self::AccountId> + MaxEncodedLen
The caller origin, overarching type of all pallets origins.
sourcetype RuntimeCall: Parameter + Dispatchable<RuntimeOrigin = <Self as Config>::RuntimeOrigin, PostInfo = PostDispatchInfo> + GetDispatchInfo + From<Call<Self>>
type RuntimeCall: Parameter + Dispatchable<RuntimeOrigin = <Self as Config>::RuntimeOrigin, PostInfo = PostDispatchInfo> + GetDispatchInfo + From<Call<Self>>
The aggregated call type.
sourcetype MaximumWeight: Get<Weight>
type MaximumWeight: Get<Weight>
The maximum weight that may be scheduled per block for any dispatchables.
sourcetype ScheduleOrigin: EnsureOrigin<<Self as Config>::RuntimeOrigin>
type ScheduleOrigin: EnsureOrigin<<Self as Config>::RuntimeOrigin>
Required origin to schedule or cancel calls.
sourcetype OriginPrivilegeCmp: PrivilegeCmp<Self::PalletsOrigin>
type OriginPrivilegeCmp: PrivilegeCmp<Self::PalletsOrigin>
Compare the privileges of origins.
This will be used when canceling a task, to ensure that the origin that tries to cancel has greater or equal privileges as the origin that created the scheduled task.
For simplicity the EqualPrivilegeOnly
can
be used. This will only check if two given origins are equal.
sourcetype MaxScheduledPerBlock: Get<u32>
type MaxScheduledPerBlock: Get<u32>
The maximum number of scheduled calls in the queue for a single block.
NOTE:
- Dependent pallets’ benchmarks might require a higher limit for the setting. Set a
higher limit under
runtime-benchmarks
feature.
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics in this pallet.