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,
impl<Address, Call, Signature, Extra> UncheckedExtrinsic<Address, Call, Signature, Extra>where
Extra: SignedExtension,
sourcepub fn new_signed(
function: Call,
signed: Address,
signature: Signature,
extra: Extra,
) -> UncheckedExtrinsic<Address, Call, Signature, Extra>
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”.
sourcepub fn new_unsigned(
function: Call,
) -> UncheckedExtrinsic<Address, Call, Signature, Extra>
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>,
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>
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>
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>
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>
impl<Address, Call, Signature, Extra> Clone for UncheckedExtrinsic<Address, Call, Signature, Extra>
source§fn clone(&self) -> UncheckedExtrinsic<Address, Call, Signature, Extra>
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)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<Address, Call, Signature, Extra> Debug for UncheckedExtrinsic<Address, Call, Signature, Extra>
impl<Address, Call, Signature, Extra> Debug for UncheckedExtrinsic<Address, Call, Signature, Extra>
source§impl<Address, Call, Signature, Extra> Decode for UncheckedExtrinsic<Address, Call, Signature, Extra>
impl<Address, Call, Signature, Extra> Decode for UncheckedExtrinsic<Address, Call, Signature, Extra>
source§fn decode<I>(
input: &mut I,
) -> Result<UncheckedExtrinsic<Address, Call, Signature, Extra>, Error>where
I: Input,
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,
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§impl<'a, Address, Signature, Call, Extra> Deserialize<'a> for UncheckedExtrinsic<Address, Call, Signature, Extra>
impl<'a, Address, Signature, Call, Extra> Deserialize<'a> for UncheckedExtrinsic<Address, Call, Signature, Extra>
source§fn deserialize<D>(
de: D,
) -> Result<UncheckedExtrinsic<Address, Call, Signature, Extra>, <D as Deserializer<'a>>::Error>where
D: Deserializer<'a>,
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>
impl<Address, Call, Signature, Extra> Encode for UncheckedExtrinsic<Address, Call, Signature, Extra>
source§fn size_hint(&self) -> usize
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)
fn encode_to<T>(&self, dest: &mut T)
Convert self to a slice and append it to the destination.
source§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
source§impl<Address, Call, Signature, Extra> Extrinsic for UncheckedExtrinsic<Address, Call, Signature, Extra>
impl<Address, Call, Signature, Extra> Extrinsic for UncheckedExtrinsic<Address, Call, Signature, Extra>
§type SignaturePayload = (Address, Signature, Extra)
type SignaturePayload = (Address, Signature, Extra)
The payload we carry for signed extrinsics. Read more
source§fn is_signed(&self) -> Option<bool>
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>>
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>
impl<Address, Call, Signature, Extra> ExtrinsicCall for UncheckedExtrinsic<Address, Call, Signature, Extra>
source§impl<Address, Call, Signature, Extra> ExtrinsicMetadata for UncheckedExtrinsic<Address, Call, Signature, Extra>where
Extra: SignedExtension,
impl<Address, Call, Signature, Extra> ExtrinsicMetadata for UncheckedExtrinsic<Address, Call, Signature, Extra>where
Extra: SignedExtension,
source§impl<Address, Call, Signature, Extra> GetDispatchInfo for UncheckedExtrinsic<Address, Call, Signature, Extra>where
Call: GetDispatchInfo,
Extra: SignedExtension,
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
fn get_dispatch_info(&self) -> DispatchInfo
Return a
DispatchInfo
, containing relevant information of this dispatch. Read moresource§impl<Address, Call, Signature, Extra> PartialEq for UncheckedExtrinsic<Address, Call, Signature, Extra>where
Address: PartialEq,
Call: PartialEq,
Signature: PartialEq,
Extra: PartialEq + SignedExtension,
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
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 ==
.source§impl<Address, Signature, Call, Extra> Serialize for UncheckedExtrinsic<Address, Call, Signature, Extra>
impl<Address, Signature, Call, Extra> Serialize for UncheckedExtrinsic<Address, Call, Signature, Extra>
source§fn serialize<S>(
&self,
seq: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
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,
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
.