Type Alias frame_system::mocking::MockUncheckedExtrinsic

source ·
pub type MockUncheckedExtrinsic<T, Signature = (), Extra = ()> = UncheckedExtrinsic<<T as Config>::AccountId, <T as Config>::RuntimeCall, Signature, Extra>;
Expand description

An unchecked extrinsic type to be used in tests.

Aliased Type§

struct MockUncheckedExtrinsic<T, Signature = (), Extra = ()> {
    pub signature: Option<(<T as Config>::AccountId, Signature, Extra)>,
    pub function: <T as Config>::RuntimeCall,
}

Fields§

§signature: Option<(<T as Config>::AccountId, Signature, Extra)>

The signature, address, number of extrinsics have come before from the same signer and an era describing the longevity of this transaction, if this is a signed extrinsic.

None if it is unsigned or an inherent.

§function: <T as Config>::RuntimeCall

The function that should be called.

Implementations

source§

impl<Address, Call, Signature, Extra> UncheckedExtrinsic<Address, Call, Signature, Extra>
where Extra: SignedExtension,

source

pub fn new_signed( function: Call, signed: Address, signature: Signature, extra: Extra, ) -> UncheckedExtrinsic<Address, Call, Signature, Extra>

New instance of a signed extrinsic aka “transaction”.

source

pub fn new_unsigned( function: Call, ) -> UncheckedExtrinsic<Address, Call, Signature, Extra>

New instance of an unsigned extrinsic aka “inherent”.

Trait Implementations

source§

impl<LookupSource, AccountId, Call, Signature, Extra, Lookup> Checkable<Lookup> for UncheckedExtrinsic<LookupSource, Call, Signature, Extra>
where LookupSource: Member + MaybeDisplay, Call: Encode + Member, Signature: Member + Verify, <Signature as Verify>::Signer: IdentifyAccount<AccountId = AccountId>, Extra: SignedExtension<AccountId = AccountId>, AccountId: Member + MaybeDisplay, Lookup: Lookup<Source = LookupSource, Target = AccountId>,

§

type Checked = CheckedExtrinsic<AccountId, Call, Extra>

Returned if check succeeds.
source§

fn check( self, lookup: &Lookup, ) -> Result<<UncheckedExtrinsic<LookupSource, Call, Signature, Extra> as Checkable<Lookup>>::Checked, TransactionValidityError>

Check self, given an instance of Context.
source§

fn unchecked_into_checked_i_know_what_i_am_doing( self, lookup: &Lookup, ) -> Result<<UncheckedExtrinsic<LookupSource, Call, Signature, Extra> as Checkable<Lookup>>::Checked, TransactionValidityError>

Blindly check self. Read more
source§

impl<Address, Call, Signature, Extra> Clone for UncheckedExtrinsic<Address, Call, Signature, Extra>
where Address: Clone, Call: Clone, Signature: Clone, Extra: Clone + SignedExtension,

source§

fn clone(&self) -> UncheckedExtrinsic<Address, Call, Signature, Extra>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<Address, Call, Signature, Extra> Debug for UncheckedExtrinsic<Address, Call, Signature, Extra>
where Address: Debug, Call: Debug, Extra: SignedExtension,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<Address, Call, Signature, Extra> Decode for UncheckedExtrinsic<Address, Call, Signature, Extra>
where Address: Decode, Signature: Decode, Call: Decode, Extra: SignedExtension,

source§

fn decode<I>( input: &mut I, ) -> Result<UncheckedExtrinsic<Address, Call, Signature, Extra>, Error>
where I: Input,

Attempt to deserialise the value from input.
source§

fn decode_into<I>( input: &mut I, dst: &mut MaybeUninit<Self>, ) -> Result<DecodeFinished, Error>
where I: Input,

Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
source§

fn skip<I>(input: &mut I) -> Result<(), Error>
where I: Input,

Attempt to skip the encoded value from input. Read more
source§

fn encoded_fixed_size() -> Option<usize>

Returns the fixed encoded size of the type. Read more
source§

impl<'a, Address, Signature, Call, Extra> Deserialize<'a> for UncheckedExtrinsic<Address, Call, Signature, Extra>
where Address: Decode, Signature: Decode, Call: Decode, Extra: SignedExtension,

source§

fn deserialize<D>( de: D, ) -> Result<UncheckedExtrinsic<Address, Call, Signature, Extra>, <D as Deserializer<'a>>::Error>
where D: Deserializer<'a>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<Address, Call, Signature, Extra> Encode for UncheckedExtrinsic<Address, Call, Signature, Extra>
where Address: Encode, Signature: Encode, Call: Encode, Extra: SignedExtension,

source§

fn encode(&self) -> Vec<u8>

Convert self to an owned vector.
source§

fn size_hint(&self) -> usize

If possible give a hint of expected size of the encoding. Read more
source§

fn encode_to<T>(&self, dest: &mut T)
where T: Output + ?Sized,

Convert self to a slice and append it to the destination.
source§

fn using_encoded<R, F>(&self, f: F) -> R
where F: FnOnce(&[u8]) -> R,

Convert self to a slice and then invoke the given closure with it.
source§

fn encoded_size(&self) -> usize

Calculates the encoded size. Read more
source§

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

§

type Call = Call

The function call.
§

type SignaturePayload = (Address, Signature, Extra)

The payload we carry for signed extrinsics. Read more
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( function: Call, signed_data: Option<<UncheckedExtrinsic<Address, Call, Signature, Extra> as Extrinsic>::SignaturePayload>, ) -> Option<UncheckedExtrinsic<Address, Call, Signature, Extra>>

Create new instance of the extrinsic. Read more
source§

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

source§

fn call( &self, ) -> &<UncheckedExtrinsic<Address, Call, Signature, Extra> as Extrinsic>::Call

Get the call of the extrinsic.
source§

impl<Address, Call, Signature, Extra> ExtrinsicMetadata for UncheckedExtrinsic<Address, Call, Signature, Extra>
where Extra: SignedExtension,

source§

const VERSION: u8 = 4u8

The format version of the Extrinsic. Read more
§

type SignedExtensions = Extra

Signed extensions attached to this Extrinsic.
source§

impl<Address, Call, Signature, Extra> GetDispatchInfo for UncheckedExtrinsic<Address, Call, Signature, Extra>
where Call: GetDispatchInfo, Extra: SignedExtension,

Implementation for unchecked extrinsic.

source§

fn get_dispatch_info(&self) -> DispatchInfo

Return a DispatchInfo, containing relevant information of this dispatch. Read more
source§

impl<Address, Call, Signature, Extra> PartialEq for UncheckedExtrinsic<Address, Call, Signature, Extra>
where Address: PartialEq, Call: PartialEq, Signature: PartialEq, Extra: PartialEq + SignedExtension,

source§

fn eq( &self, other: &UncheckedExtrinsic<Address, Call, Signature, Extra>, ) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<Address, Signature, Call, Extra> Serialize for UncheckedExtrinsic<Address, Call, Signature, Extra>
where Address: Encode, Signature: Encode, Call: Encode, Extra: SignedExtension,

source§

fn serialize<S>( &self, seq: S, ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

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

Manual TypeInfo implementation because of custom encoding. The data is a valid encoded Vec<u8>, but requires some logic to extract the signature and payload.

See UncheckedExtrinsic::encode and UncheckedExtrinsic::decode.

§

type Identity = UncheckedExtrinsic<Address, Call, Signature, Extra>

The type identifying for which type info is provided. Read more
source§

fn type_info() -> Type

Returns the static type identifier for Self.
source§

impl<Address, Call, Signature, Extra> EncodeLike for UncheckedExtrinsic<Address, Call, Signature, Extra>
where Address: Encode, Signature: Encode, Call: Encode, Extra: SignedExtension,

source§

impl<Address, Call, Signature, Extra> Eq for UncheckedExtrinsic<Address, Call, Signature, Extra>
where Address: Eq, Call: Eq, Signature: Eq, Extra: Eq + SignedExtension,

source§

impl<Address, Call, Signature, Extra> StructuralPartialEq for UncheckedExtrinsic<Address, Call, Signature, Extra>
where Extra: SignedExtension,