Trait sp_runtime::traits::Extrinsic

source ·
pub trait Extrinsic: Sized {
    type Call: TypeInfo;
    type SignaturePayload: SignaturePayload;

    // Provided methods
    fn is_signed(&self) -> Option<bool> { ... }
    fn new(
        _call: Self::Call,
        _signed_data: Option<Self::SignaturePayload>,
    ) -> Option<Self> { ... }
}
Expand description

Something that acts like an Extrinsic.

Required Associated Types§

source

type Call: TypeInfo

The function call.

source

type SignaturePayload: SignaturePayload

The payload we carry for signed extrinsics.

Usually it will contain a Signature and may include some additional data that are specific to signed extrinsics.

Provided Methods§

source

fn is_signed(&self) -> Option<bool>

Is this Extrinsic signed? If no information are available about signed/unsigned, None should be returned.

source

fn new( _call: Self::Call, _signed_data: Option<Self::SignaturePayload>, ) -> Option<Self>

Create new instance of the extrinsic.

Extrinsics can be split into:

  1. Inherents (no signature; created by validators during block production)
  2. Unsigned Transactions (no signature; represent “system calls” or other special kinds of calls) 3. Signed Transactions (with signature; a regular transactions with known origin)

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Extrinsic for OpaqueExtrinsic

source§

impl<Address: TypeInfo, Call: TypeInfo, Signature: TypeInfo, Extra: SignedExtension + TypeInfo> Extrinsic for UncheckedExtrinsic<Address, Call, Signature, Extra>

source§

impl<Call: Codec + Sync + Send + TypeInfo, Extra: TypeInfo> Extrinsic for TestXt<Call, Extra>

§

type Call = Call

§

type SignaturePayload = (u64, Extra)

source§

impl<Xt> Extrinsic for ExtrinsicWrapper<Xt>