referrerpolicy=no-referrer-when-downgrade
rococo_parachain_runtime

Type Alias TxExtension

Source
pub type TxExtension = StorageWeightReclaim<Runtime, (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckTxVersion<Runtime>, CheckGenesis<Runtime>, CheckEra<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>)>;
Expand description

The extension 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>

Source

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,

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl<T, S> Debug for StorageWeightReclaim<T, S>
where S: Debug,

Source§

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

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

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,

Attempt to deserialise the value from 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,

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

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,

Source§

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,

Source§

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,

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

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

Convert self to an owned vector.
§

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.
§

fn encoded_size(&self) -> usize

Calculates the encoded size. Read more
Source§

impl<T, S> From<S> for StorageWeightReclaim<T, S>

Source§

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,

Source§

fn eq(&self, __other: &StorageWeightReclaim<T, S>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T, S> TransactionExtension<<T as Config>::RuntimeCall> for StorageWeightReclaim<T, S>

Source§

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

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)

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)

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>

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>

Returns the metadata for this extension. Read more
Source§

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>

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>

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>

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>

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>

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>

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>

A wrapper for post_dispatch_details that refunds the unspent weight consumed by this extension into the post dispatch information. Read more
Source§

impl<T, S> TypeInfo for StorageWeightReclaim<T, S>
where S: TypeInfo + 'static, PhantomData<T>: TypeInfo + 'static, T: 'static,

Source§

type Identity = StorageWeightReclaim<T, S>

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<T, S> DecodeWithMemTracking for StorageWeightReclaim<T, S>
where S: DecodeWithMemTracking, PhantomData<T>: DecodeWithMemTracking,

Source§

impl<T, S> EncodeLike for StorageWeightReclaim<T, S>
where S: Encode, PhantomData<T>: Encode,

Source§

impl<T, S> Eq for StorageWeightReclaim<T, S>
where S: Eq,