Trait frame_support::dispatch::Dispatchable
source · [−]pub trait Dispatchable {
type Origin;
type Config;
type Info;
type PostInfo: Eq + PartialEq<Self::PostInfo> + Clone + Copy + Encode + Decode + Printable;
fn dispatch(
self,
origin: Self::Origin
) -> Result<Self::PostInfo, DispatchErrorWithPostInfo<Self::PostInfo>>;
}
Expand description
A lazy call (module function and argument values) that can be executed via its dispatch
method.
Associated Types
Every function call from your runtime has an origin, which specifies where the extrinsic was generated from. In the case of a signed extrinsic (transaction), the origin contains an identifier for the caller. The origin can be empty in the case of an inherent extrinsic.
An opaque set of information attached to the transaction. This could be constructed anywhere down the line in a runtime. The current Substrate runtime uses a struct with the same name to represent the dispatch class and weight.