pub type TestXt<Call, Extra> = UncheckedExtrinsic<u64, Call, (), Extra>;
Expand description
Extrinsic type with u64
accounts and mocked signatures, used in testing.
Aliased Type§
struct TestXt<Call, Extra> {
pub preamble: Preamble<u64, (), Extra>,
pub function: Call,
}
Fields§
§preamble: Preamble<u64, (), Extra>
Information regarding the type of extrinsic this is (inherent or transaction) as well as
associated extension (Extension
) data if it’s a transaction and a possible signature.
function: Call
The function that should be called.
Implementations
Source§impl<Address, Call, Signature, Extension> UncheckedExtrinsic<Address, Call, Signature, Extension>
impl<Address, Call, Signature, Extension> UncheckedExtrinsic<Address, Call, Signature, Extension>
Sourcepub fn new_unsigned(function: Call) -> Self
👎Deprecated: Use new_bare instead
pub fn new_unsigned(function: Call) -> Self
New instance of a bare (ne unsigned) extrinsic. This could be used for an inherent or an old-school “unsigned transaction” (which are new being deprecated in favour of general transactions).
Sourcepub fn is_inherent(&self) -> bool
pub fn is_inherent(&self) -> bool
Returns true
if this extrinsic instance is an inherent, `false`` otherwise.
Sourcepub fn is_signed(&self) -> bool
pub fn is_signed(&self) -> bool
Returns true
if this extrinsic instance is an old-school signed transaction, false
otherwise.
Sourcepub fn from_parts(
function: Call,
preamble: Preamble<Address, Signature, Extension>,
) -> Self
pub fn from_parts( function: Call, preamble: Preamble<Address, Signature, Extension>, ) -> Self
Create an UncheckedExtrinsic
from a Preamble
and the actual Call
.
Sourcepub fn new_bare_legacy(function: Call) -> Self
pub fn new_bare_legacy(function: Call) -> Self
New instance of a bare (ne unsigned) extrinsic on extrinsic format version 4.
Sourcepub fn new_signed(
function: Call,
signed: Address,
signature: Signature,
tx_ext: Extension,
) -> Self
pub fn new_signed( function: Call, signed: Address, signature: Signature, tx_ext: Extension, ) -> Self
New instance of an old-school signed transaction on extrinsic format version 4.
Sourcepub fn new_transaction(function: Call, tx_ext: Extension) -> Self
pub fn new_transaction(function: Call, tx_ext: Extension) -> Self
New instance of an new-school unsigned transaction.
Source§impl<Address, Call: Dispatchable, Signature, Extension: TransactionExtension<Call>> UncheckedExtrinsic<Address, Call, Signature, Extension>
impl<Address, Call: Dispatchable, Signature, Extension: TransactionExtension<Call>> UncheckedExtrinsic<Address, Call, Signature, Extension>
Sourcepub fn extension_weight(&self) -> Weight
pub fn extension_weight(&self) -> Weight
Returns the weight of the extension of this transaction, if present. If the transaction doesn’t use any extension, the weight returned is equal to zero.
Trait Implementations
Source§impl<LookupSource, AccountId, Call, Signature, Extension, Lookup> Checkable<Lookup> for UncheckedExtrinsic<LookupSource, Call, Signature, Extension>where
LookupSource: Member + MaybeDisplay,
Call: Encode + Member + Dispatchable,
Signature: Member + Verify,
<Signature as Verify>::Signer: IdentifyAccount<AccountId = AccountId>,
Extension: Encode + TransactionExtension<Call>,
AccountId: Member + MaybeDisplay,
Lookup: Lookup<Source = LookupSource, Target = AccountId>,
impl<LookupSource, AccountId, Call, Signature, Extension, Lookup> Checkable<Lookup> for UncheckedExtrinsic<LookupSource, Call, Signature, Extension>where
LookupSource: Member + MaybeDisplay,
Call: Encode + Member + Dispatchable,
Signature: Member + Verify,
<Signature as Verify>::Signer: IdentifyAccount<AccountId = AccountId>,
Extension: Encode + TransactionExtension<Call>,
AccountId: Member + MaybeDisplay,
Lookup: Lookup<Source = LookupSource, Target = AccountId>,
Source§type Checked = CheckedExtrinsic<AccountId, Call, Extension>
type Checked = CheckedExtrinsic<AccountId, Call, Extension>
check
succeeds.Source§fn check(
self,
lookup: &Lookup,
) -> Result<Self::Checked, TransactionValidityError>
fn check( self, lookup: &Lookup, ) -> Result<Self::Checked, TransactionValidityError>
Source§fn unchecked_into_checked_i_know_what_i_am_doing(
self,
lookup: &Lookup,
) -> Result<Self::Checked, TransactionValidityError>
fn unchecked_into_checked_i_know_what_i_am_doing( self, lookup: &Lookup, ) -> Result<Self::Checked, TransactionValidityError>
Source§impl<Address: Clone, Call: Clone, Signature: Clone, Extension: Clone> Clone for UncheckedExtrinsic<Address, Call, Signature, Extension>
impl<Address: Clone, Call: Clone, Signature: Clone, Extension: Clone> Clone for UncheckedExtrinsic<Address, Call, Signature, Extension>
Source§fn clone(&self) -> UncheckedExtrinsic<Address, Call, Signature, Extension>
fn clone(&self) -> UncheckedExtrinsic<Address, Call, Signature, Extension>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<Address: Debug, Call: Debug, Signature: Debug, Extension: Debug> Debug for UncheckedExtrinsic<Address, Call, Signature, Extension>
impl<Address: Debug, Call: Debug, Signature: Debug, Extension: Debug> Debug for UncheckedExtrinsic<Address, Call, Signature, Extension>
Source§impl<Address, Call, Signature, Extension> Decode for UncheckedExtrinsic<Address, Call, Signature, Extension>where
Address: Decode,
Signature: Decode,
Call: Decode,
Extension: Decode,
impl<Address, Call, Signature, Extension> Decode for UncheckedExtrinsic<Address, Call, Signature, Extension>where
Address: Decode,
Signature: Decode,
Call: Decode,
Extension: Decode,
Source§fn decode<I: Input>(input: &mut I) -> Result<Self, Error>
fn decode<I: Input>(input: &mut I) -> Result<Self, Error>
§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,
§fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
§fn encoded_fixed_size() -> Option<usize>
fn encoded_fixed_size() -> Option<usize>
Source§impl<'a, Address: Decode, Signature: Decode, Call: Decode, Extension: Decode> Deserialize<'a> for UncheckedExtrinsic<Address, Call, Signature, Extension>
impl<'a, Address: Decode, Signature: Decode, Call: Decode, Extension: Decode> Deserialize<'a> for UncheckedExtrinsic<Address, Call, Signature, Extension>
Source§fn deserialize<D>(de: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
fn deserialize<D>(de: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
Source§impl<Address, Call, Signature, Extension> Encode for UncheckedExtrinsic<Address, Call, Signature, Extension>where
Preamble<Address, Signature, Extension>: Encode,
Call: Encode,
Extension: Encode,
impl<Address, Call, Signature, Extension> Encode for UncheckedExtrinsic<Address, Call, Signature, Extension>where
Preamble<Address, Signature, Extension>: Encode,
Call: Encode,
Extension: Encode,
§fn encode_to<T>(&self, dest: &mut T)where
T: Output + ?Sized,
fn encode_to<T>(&self, dest: &mut T)where
T: Output + ?Sized,
§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Source§impl<Address: TypeInfo, Call: TypeInfo, Signature: TypeInfo, Extension: TypeInfo> ExtrinsicLike for UncheckedExtrinsic<Address, Call, Signature, Extension>
impl<Address: TypeInfo, Call: TypeInfo, Signature: TypeInfo, Extension: TypeInfo> ExtrinsicLike for UncheckedExtrinsic<Address, Call, Signature, Extension>
Source§impl<Address, Call: Dispatchable, Signature, Extension: TransactionExtension<Call>> ExtrinsicMetadata for UncheckedExtrinsic<Address, Call, Signature, Extension>
impl<Address, Call: Dispatchable, Signature, Extension: TransactionExtension<Call>> ExtrinsicMetadata for UncheckedExtrinsic<Address, Call, Signature, Extension>
Source§impl<Address: PartialEq, Call: PartialEq, Signature: PartialEq, Extension: PartialEq> PartialEq for UncheckedExtrinsic<Address, Call, Signature, Extension>
impl<Address: PartialEq, Call: PartialEq, Signature: PartialEq, Extension: PartialEq> PartialEq for UncheckedExtrinsic<Address, Call, Signature, Extension>
Source§fn eq(
&self,
other: &UncheckedExtrinsic<Address, Call, Signature, Extension>,
) -> bool
fn eq( &self, other: &UncheckedExtrinsic<Address, Call, Signature, Extension>, ) -> bool
self
and other
values to be equal, and is used by ==
.Source§impl<Address: Encode, Signature: Encode, Call: Encode, Extension: Encode> Serialize for UncheckedExtrinsic<Address, Call, Signature, Extension>
impl<Address: Encode, Signature: Encode, Call: Encode, Extension: Encode> Serialize for UncheckedExtrinsic<Address, Call, Signature, Extension>
Source§impl<Address, Call, Signature, Extension> TypeInfo for UncheckedExtrinsic<Address, Call, Signature, Extension>where
Address: StaticTypeInfo,
Call: StaticTypeInfo,
Signature: StaticTypeInfo,
Extension: StaticTypeInfo,
impl<Address, Call, Signature, Extension> TypeInfo for UncheckedExtrinsic<Address, Call, Signature, Extension>where
Address: StaticTypeInfo,
Call: StaticTypeInfo,
Signature: StaticTypeInfo,
Extension: 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
.