Module dispatch

Source
Expand description

Dispatch system. Contains a macro for defining runtime modules and generating values representing lazy module function calls.

Structs§

DispatchInfo
A bundle of static information collected from the #[pallet::weight] attributes.
PerDispatchClass
A struct holding value for each DispatchClass.
PostDispatchInfo
Weight information that is only available post dispatch. NOTE: This can only be used to reduce the weight or fee, not increase it.

Enums§

DispatchClass
A generalized group of dispatch types.
Pays
Explicit enum to denote if a transaction pays fee or not.
RawOrigin
Origin for the System pallet.

Traits§

Callable
Serializable version of pallet dispatchable.
CheckIfFeeless
Means to checks if the dispatchable is feeless.
ClassifyDispatch
Means of classifying a dispatchable function.
GetDispatchInfo
A Dispatchable function (aka transaction) that can carry some static information along with it, using the #[pallet::weight] attribute.
OneOrMany
A trait that represents one or many values of given type.
Parameter
A type that can be used as a parameter in a dispatchable function.
PaysFee
Indicates if dispatch function should pay fees or not.
WeighData
Means of weighing some particular kind of data (T).
WithPostDispatchInfo
Allows easy conversion from DispatchError to DispatchErrorWithPostInfo for dispatchables that want to return a custom a posterior weight on error.

Functions§

extract_actual_pays_fee
Extract the actual pays_fee from a dispatch result if any or fall back to the default weight.
extract_actual_weight
Extract the actual weight from a dispatch result if any or fall back to the default weight.

Type Aliases§

CallableCallFor
DispatchErrorWithPostInfo
The error type contained in a DispatchResultWithPostInfo.
DispatchResult
Un-augmented version of DispatchResultWithPostInfo that can be returned from dispatchable functions and is automatically converted to the augmented type. Should be used whenever the PostDispatchInfo does not need to be overwritten. As this should be the common case it is the implicit return type when none is specified.
DispatchResultWithPostInfo
The return type of a Dispatchable in frame. When returned explicitly from a dispatchable function it allows overriding the default PostDispatchInfo returned from a dispatch.