Trait gclient::ext::sp_runtime::traits::Applyable

pub trait Applyable:
    Sized
    + Send
    + Sync {
    type Call: Dispatchable;

    // Required methods
    fn validate<V>(
        &self,
        source: TransactionSource,
        info: &<Self::Call as Dispatchable>::Info,
        len: usize,
    ) -> Result<ValidTransaction, TransactionValidityError>
       where V: ValidateUnsigned<Call = Self::Call>;
    fn apply<V>(
        self,
        info: &<Self::Call as Dispatchable>::Info,
        len: usize,
    ) -> Result<Result<<Self::Call as Dispatchable>::PostInfo, DispatchErrorWithPostInfo<<Self::Call as Dispatchable>::PostInfo>>, TransactionValidityError>
       where V: ValidateUnsigned<Call = Self::Call>;
}
Expand description

An “executable” piece of information, used by the standard Substrate Executive in order to enact a piece of extrinsic information by marshalling and dispatching to a named function call.

Also provides information on to whom this information is attributable and an index that allows each piece of attributable information to be disambiguated.

Required Associated Types§

type Call: Dispatchable

Type by which we can dispatch. Restricts the UnsignedValidator type.

Required Methods§

fn validate<V>( &self, source: TransactionSource, info: &<Self::Call as Dispatchable>::Info, len: usize, ) -> Result<ValidTransaction, TransactionValidityError>
where V: ValidateUnsigned<Call = Self::Call>,

Checks to see if this is a valid transaction. It returns information on it if so.

fn apply<V>( self, info: &<Self::Call as Dispatchable>::Info, len: usize, ) -> Result<Result<<Self::Call as Dispatchable>::PostInfo, DispatchErrorWithPostInfo<<Self::Call as Dispatchable>::PostInfo>>, TransactionValidityError>
where V: ValidateUnsigned<Call = Self::Call>,

Executes all necessary logic needed prior to dispatch and deconstructs into function call, index and sender.

Object Safety§

This trait is not object safe.

Implementors§

§

impl<AccountId, Call, Extra, RuntimeOrigin> Applyable for CheckedExtrinsic<AccountId, Call, Extra>
where AccountId: Member + MaybeDisplay, Call: Member + Dispatchable<RuntimeOrigin = RuntimeOrigin>, Extra: SignedExtension<AccountId = AccountId, Call = Call>, RuntimeOrigin: From<Option<AccountId>>,

§

type Call = Call

§

impl<Origin, Call, Extra> Applyable for TestXt<Call, Extra>
where Call: 'static + Send + Sync + Clone + Eq + Codec + Debug + Dispatchable<RuntimeOrigin = Origin>, Extra: SignedExtension<AccountId = u64, Call = Call>, Origin: From<Option<u64>>,

§

type Call = Call