pub type TxExtension = StorageWeightReclaim<Runtime, (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckTxVersion<Runtime>, CheckGenesis<Runtime>, CheckEra<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>)>;
Expand description
The TransactionExtension to the basic transaction logic.
Aliased Type§
struct TxExtension(pub (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckTxVersion<Runtime>, CheckGenesis<Runtime>, CheckMortality<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>), _);
Fields§
§0: (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckTxVersion<Runtime>, CheckGenesis<Runtime>, CheckMortality<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>)
Implementations
Source§impl<T, S> StorageWeightReclaim<T, S>
impl<T, S> StorageWeightReclaim<T, S>
Sourcepub fn new(s: S) -> StorageWeightReclaim<T, S>
pub fn new(s: S) -> StorageWeightReclaim<T, S>
Create a new StorageWeightReclaim
instance.
Trait Implementations
Source§impl<T, S> Clone for StorageWeightReclaim<T, S>where
S: Clone,
impl<T, S> Clone for StorageWeightReclaim<T, S>where
S: Clone,
Source§fn clone(&self) -> StorageWeightReclaim<T, S>
fn clone(&self) -> StorageWeightReclaim<T, S>
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<T, S> Debug for StorageWeightReclaim<T, S>where
S: Debug,
impl<T, S> Debug for StorageWeightReclaim<T, S>where
S: Debug,
Source§impl<T, S> Decode for StorageWeightReclaim<T, S>where
S: Decode,
PhantomData<T>: Decode,
impl<T, S> Decode for StorageWeightReclaim<T, S>where
S: Decode,
PhantomData<T>: Decode,
Source§fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<StorageWeightReclaim<T, S>, Error>where
__CodecInputEdqy: Input,
fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<StorageWeightReclaim<T, S>, Error>where
__CodecInputEdqy: Input,
Attempt to deserialise the value from input.
§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
§fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
Attempt to skip the encoded value from input. Read more
§fn encoded_fixed_size() -> Option<usize>
fn encoded_fixed_size() -> Option<usize>
Returns the fixed encoded size of the type. Read more
Source§impl<T, S> Default for StorageWeightReclaim<T, S>where
S: Default,
impl<T, S> Default for StorageWeightReclaim<T, S>where
S: Default,
Source§fn default() -> StorageWeightReclaim<T, S>
fn default() -> StorageWeightReclaim<T, S>
Returns the “default value” for a type. Read more
Source§impl<T, S> Encode for StorageWeightReclaim<T, S>where
S: Encode,
PhantomData<T>: Encode,
impl<T, S> Encode for StorageWeightReclaim<T, S>where
S: Encode,
PhantomData<T>: Encode,
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<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
Convert self to a slice and append it to the destination.
§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.
§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
Source§impl<T, S> From<S> for StorageWeightReclaim<T, S>
impl<T, S> From<S> for StorageWeightReclaim<T, S>
Source§fn from(s: S) -> StorageWeightReclaim<T, S>
fn from(s: S) -> StorageWeightReclaim<T, S>
Converts to this type from the input type.
Source§impl<T, S> PartialEq for StorageWeightReclaim<T, S>where
S: PartialEq,
impl<T, S> PartialEq for StorageWeightReclaim<T, S>where
S: PartialEq,
Source§fn eq(&self, __other: &StorageWeightReclaim<T, S>) -> bool
fn eq(&self, __other: &StorageWeightReclaim<T, S>) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.Source§impl<T, S> TransactionExtension<<T as Config>::RuntimeCall> for StorageWeightReclaim<T, S>where
T: Config + Send + Sync,
S: TransactionExtension<<T as Config>::RuntimeCall>,
<T as Config>::RuntimeCall: Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo>,
impl<T, S> TransactionExtension<<T as Config>::RuntimeCall> for StorageWeightReclaim<T, S>where
T: Config + Send + Sync,
S: TransactionExtension<<T as Config>::RuntimeCall>,
<T as Config>::RuntimeCall: Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo>,
Source§const IDENTIFIER: &'static str = "StorageWeightReclaim<Use `metadata()`!>"
const IDENTIFIER: &'static str = "StorageWeightReclaim<Use `metadata()`!>"
Unique identifier of this signed extension. Read more
Source§type Implicit = <S as TransactionExtension<<T as Config>::RuntimeCall>>::Implicit
type Implicit = <S as TransactionExtension<<T as Config>::RuntimeCall>>::Implicit
Any additional data which was known at the time of transaction construction and can be
useful in authenticating the transaction. This is determined dynamically in part from the
on-chain environment using the
implicit
function and not directly contained in the
transaction itself and therefore is considered “implicit”.Source§type Val = (Option<u64>, <S as TransactionExtension<<T as Config>::RuntimeCall>>::Val)
type Val = (Option<u64>, <S as TransactionExtension<<T as Config>::RuntimeCall>>::Val)
The type that encodes information that can be passed from
validate
to prepare
.Source§type Pre = (Option<u64>, <S as TransactionExtension<<T as Config>::RuntimeCall>>::Pre)
type Pre = (Option<u64>, <S as TransactionExtension<<T as Config>::RuntimeCall>>::Pre)
The type that encodes information that can be passed from
prepare
to post_dispatch
.Source§fn implicit(
&self,
) -> Result<<StorageWeightReclaim<T, S> as TransactionExtension<<T as Config>::RuntimeCall>>::Implicit, TransactionValidityError>
fn implicit( &self, ) -> Result<<StorageWeightReclaim<T, S> as TransactionExtension<<T as Config>::RuntimeCall>>::Implicit, TransactionValidityError>
Determine any additional data which was known at the time of transaction construction and
can be useful in authenticating the transaction. The expected usage of this is to include in
any data which is signed and verified as part of transaction validation. Also perform any
pre-signature-verification checks and return an error if needed.
Source§fn metadata() -> Vec<TransactionExtensionMetadata>
fn metadata() -> Vec<TransactionExtensionMetadata>
Returns the metadata for this extension. Read more
Source§fn weight(&self, call: &<T as Config>::RuntimeCall) -> Weight
fn weight(&self, call: &<T as Config>::RuntimeCall) -> Weight
The weight consumed by executing this extension instance fully during transaction dispatch.
Source§fn validate(
&self,
origin: <T as Config>::RuntimeOrigin,
call: &<T as Config>::RuntimeCall,
info: &<<T as Config>::RuntimeCall as Dispatchable>::Info,
len: usize,
self_implicit: <StorageWeightReclaim<T, S> as TransactionExtension<<T as Config>::RuntimeCall>>::Implicit,
inherited_implication: &impl Implication,
source: TransactionSource,
) -> Result<(ValidTransaction, <StorageWeightReclaim<T, S> as TransactionExtension<<T as Config>::RuntimeCall>>::Val, <T as Config>::RuntimeOrigin), TransactionValidityError>
fn validate( &self, origin: <T as Config>::RuntimeOrigin, call: &<T as Config>::RuntimeCall, info: &<<T as Config>::RuntimeCall as Dispatchable>::Info, len: usize, self_implicit: <StorageWeightReclaim<T, S> as TransactionExtension<<T as Config>::RuntimeCall>>::Implicit, inherited_implication: &impl Implication, source: TransactionSource, ) -> Result<(ValidTransaction, <StorageWeightReclaim<T, S> as TransactionExtension<<T as Config>::RuntimeCall>>::Val, <T as Config>::RuntimeOrigin), TransactionValidityError>
Validate a transaction for the transaction queue. Read more
Source§fn prepare(
self,
val: <StorageWeightReclaim<T, S> as TransactionExtension<<T as Config>::RuntimeCall>>::Val,
origin: &<T as Config>::RuntimeOrigin,
call: &<T as Config>::RuntimeCall,
info: &<<T as Config>::RuntimeCall as Dispatchable>::Info,
len: usize,
) -> Result<<StorageWeightReclaim<T, S> as TransactionExtension<<T as Config>::RuntimeCall>>::Pre, TransactionValidityError>
fn prepare( self, val: <StorageWeightReclaim<T, S> as TransactionExtension<<T as Config>::RuntimeCall>>::Val, origin: &<T as Config>::RuntimeOrigin, call: &<T as Config>::RuntimeCall, info: &<<T as Config>::RuntimeCall as Dispatchable>::Info, len: usize, ) -> Result<<StorageWeightReclaim<T, S> as TransactionExtension<<T as Config>::RuntimeCall>>::Pre, TransactionValidityError>
Do any pre-flight stuff for a transaction after validation. Read more
Source§fn post_dispatch_details(
pre: <StorageWeightReclaim<T, S> as TransactionExtension<<T as Config>::RuntimeCall>>::Pre,
info: &<<T as Config>::RuntimeCall as Dispatchable>::Info,
post_info: &<<T as Config>::RuntimeCall as Dispatchable>::PostInfo,
len: usize,
result: &Result<(), DispatchError>,
) -> Result<Weight, TransactionValidityError>
fn post_dispatch_details( pre: <StorageWeightReclaim<T, S> as TransactionExtension<<T as Config>::RuntimeCall>>::Pre, info: &<<T as Config>::RuntimeCall as Dispatchable>::Info, post_info: &<<T as Config>::RuntimeCall as Dispatchable>::PostInfo, len: usize, result: &Result<(), DispatchError>, ) -> Result<Weight, TransactionValidityError>
Do any post-flight stuff for an extrinsic. Read more
Source§fn bare_validate(
call: &<T as Config>::RuntimeCall,
info: &<<T as Config>::RuntimeCall as Dispatchable>::Info,
len: usize,
) -> Result<ValidTransaction, TransactionValidityError>
fn bare_validate( call: &<T as Config>::RuntimeCall, info: &<<T as Config>::RuntimeCall as Dispatchable>::Info, len: usize, ) -> Result<ValidTransaction, TransactionValidityError>
Validation logic for bare extrinsics. Read more
Source§fn bare_validate_and_prepare(
call: &<T as Config>::RuntimeCall,
info: &<<T as Config>::RuntimeCall as Dispatchable>::Info,
len: usize,
) -> Result<(), TransactionValidityError>
fn bare_validate_and_prepare( call: &<T as Config>::RuntimeCall, info: &<<T as Config>::RuntimeCall as Dispatchable>::Info, len: usize, ) -> Result<(), TransactionValidityError>
All pre-flight logic run before dispatching bare extrinsics. Read more
Source§fn bare_post_dispatch(
info: &<<T as Config>::RuntimeCall as Dispatchable>::Info,
post_info: &mut <<T as Config>::RuntimeCall as Dispatchable>::PostInfo,
len: usize,
result: &Result<(), DispatchError>,
) -> Result<(), TransactionValidityError>
fn bare_post_dispatch( info: &<<T as Config>::RuntimeCall as Dispatchable>::Info, post_info: &mut <<T as Config>::RuntimeCall as Dispatchable>::PostInfo, len: usize, result: &Result<(), DispatchError>, ) -> Result<(), TransactionValidityError>
Post dispatch logic run after dispatching bare extrinsics. Read more
Source§fn post_dispatch(
pre: Self::Pre,
info: &<Call as Dispatchable>::Info,
post_info: &mut <Call as Dispatchable>::PostInfo,
len: usize,
result: &Result<(), DispatchError>,
) -> Result<(), TransactionValidityError>
fn post_dispatch( pre: Self::Pre, info: &<Call as Dispatchable>::Info, post_info: &mut <Call as Dispatchable>::PostInfo, len: usize, result: &Result<(), DispatchError>, ) -> Result<(), TransactionValidityError>
A wrapper for
post_dispatch_details
that
refunds the unspent weight consumed by this extension into the post dispatch information. Read more