Expand description
Dispatch system. Contains a macro for defining runtime modules and generating values representing lazy module function calls.
Structs§
- Dispatch
Info - A bundle of static information collected from the
#[pallet::weight]
attributes. - PerDispatch
Class - A struct holding value for each
DispatchClass
. - Post
Dispatch Info - Weight information that is only available post dispatch. NOTE: This can only be used to reduce the weight or fee, not increase it.
Enums§
- Dispatch
Class - 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.
- Check
IfFeeless - Means to checks if the dispatchable is feeless.
- Classify
Dispatch - Means of classifying a dispatchable function.
- GetDispatch
Info - A
Dispatchable
function (aka transaction) that can carry some static information along with it, using the#[pallet::weight]
attribute. - OneOr
Many - 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.
- Weigh
Data - Means of weighing some particular kind of data (
T
). - With
Post Dispatch Info - Allows easy conversion from
DispatchError
toDispatchErrorWithPostInfo
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§
- Callable
Call For - Dispatch
Error With Post Info - The error type contained in a
DispatchResultWithPostInfo
. - Dispatch
Result - Un-augmented version of
DispatchResultWithPostInfo
that can be returned from dispatchable functions and is automatically converted to the augmented type. Should be used whenever thePostDispatchInfo
does not need to be overwritten. As this should be the common case it is the implicit return type when none is specified. - Dispatch
Result With Post Info - The return type of a
Dispatchable
in frame. When returned explicitly from a dispatchable function it allows overriding the defaultPostDispatchInfo
returned from a dispatch.