Skip to content
Snippets Groups Projects
Unverified Commit 7c6ab071 authored by Bastian Köcher's avatar Bastian Köcher Committed by GitHub
Browse files

Mention the signed extensions in the reference docs (#4887)


Co-authored-by: default avatargupnik <mail.guptanikhil@gmail.com>
parent 929a273a
No related merge requests found
Pipeline #482937 waiting for manual action with stages
in 1 hour, 29 minutes, and 24 seconds
......@@ -14612,6 +14612,8 @@ dependencies = [
"frame-system",
"kitchensink-runtime",
"minimal-template-runtime",
"pallet-asset-conversion-tx-payment",
"pallet-asset-tx-payment",
"pallet-assets",
"pallet-aura",
"pallet-authorship",
......@@ -14630,6 +14632,7 @@ dependencies = [
"pallet-proxy",
"pallet-referenda",
"pallet-scheduler",
"pallet-skip-feeless-payment",
"pallet-timestamp",
"pallet-transaction-payment",
"pallet-uniques",
......
......@@ -74,6 +74,9 @@ pallet-balances = { workspace = true, default-features = true }
pallet-assets = { workspace = true, default-features = true }
pallet-preimage = { workspace = true, default-features = true }
pallet-transaction-payment = { workspace = true, default-features = true }
pallet-asset-tx-payment = { workspace = true, default-features = true }
pallet-skip-feeless-payment = { workspace = true, default-features = true }
pallet-asset-conversion-tx-payment = { workspace = true, default-features = true }
pallet-utility = { workspace = true, default-features = true }
pallet-multisig = { workspace = true, default-features = true }
pallet-proxy = { workspace = true, default-features = true }
......
//! Signed extensions are, briefly, a means for different chains to extend the "basic" extrinsic
//! format with custom data that can be checked by the runtime.
//!
//! # Example
//! # FRAME provided signed extensions
//!
//! FRAME by default already provides the following signed extensions:
//!
//! - [`CheckGenesis`](frame_system::CheckGenesis): Ensures that a transaction was sent for the same
//! network. Determined based on genesis.
//!
//! - [`CheckMortality`](frame_system::CheckMortality): Extends a transaction with a configurable
//! mortality.
//!
//! - [`CheckNonZeroSender`](frame_system::CheckNonZeroSender): Ensures that the sender of a
//! transaction is not the *all zero account* (all bytes of the accountid are zero).
//!
//! - [`CheckNonce`](frame_system::CheckNonce): Extends a transaction with a nonce to prevent replay
//! of transactions and to provide ordering of transactions.
//!
//! - [`CheckSpecVersion`](frame_system::CheckSpecVersion): Ensures that a transaction was built for
//! the currently active runtime.
//!
//! - [`CheckTxVersion`](frame_system::CheckTxVersion): Ensures that the transaction signer used the
//! correct encoding of the call.
//!
//! - [`CheckWeight`](frame_system::CheckWeight): Ensures that the transaction fits into the block
//! before dispatching it.
//!
//! - [`ChargeTransactionPayment`](pallet_transaction_payment::ChargeTransactionPayment): Charges
//! transaction fees from the signer based on the weight of the call using the native token.
//!
//! - [`ChargeAssetTxPayment`](pallet_asset_tx_payment::ChargeAssetTxPayment): Charges transaction
//! fees from the signer based on the weight of the call using any supported asset (including the
//! native token).
//!
//! - [`ChargeAssetTxPayment`(using
//! conversion)](pallet_asset_conversion_tx_payment::ChargeAssetTxPayment): Charges transaction
//! fees from the signer based on the weight of the call using any supported asset (including the
//! native token). The asset is converted to the native token using a pool.
//!
//! - [`SkipCheckIfFeeless`](pallet_skip_feeless_payment::SkipCheckIfFeeless): Allows transactions
//! to be processed without paying any fee. This requires that the `call` that should be
//! dispatched is augmented with the [`feeless_if`](frame_support::pallet_macros::feeless_if)
//! attribute.
//!
//! - [`CheckMetadataHash`](frame_metadata_hash_extension::CheckMetadataHash): Extends transactions
//! to include the so-called metadata hash. This is required by chains to support the generic
//! Ledger application and other similar offline wallets.
//!
//! - [`StorageWeightReclaim`](cumulus_primitives_storage_weight_reclaim::StorageWeightReclaim): A
//! signed extension for parachains that reclaims unused storage weight after executing a
//! transaction.
//!
//! For more information about these extensions, follow the link to the type documentation.
//!
//! # Building a custom signed extension
//!
//! Defining a couple of very simple signed extensions looks like the following:
#![doc = docify::embed!("./src/reference_docs/signed_extensions.rs", signed_extensions_example)]
......
......@@ -28,6 +28,9 @@ use sp_runtime::{
/// Check for transaction mortality.
///
/// The extension adds [`Era`] to every signed extrinsic. It also contributes to the signed data, by
/// including the hash of the block at [`Era::birth`].
///
/// # Transaction Validity
///
/// The extension affects `longevity` of the transaction according to the [`Era`] definition.
......
......@@ -16,8 +16,8 @@
//! # Skip Feeless Payment Pallet
//!
//! This pallet allows runtimes that include it to skip payment of transaction fees for
//! dispatchables marked by [`#[pallet::feeless_if]`](`macro@
//! frame_support::pallet_prelude::feeless_if`).
//! dispatchables marked by
//! [`#[pallet::feeless_if]`](frame_support::pallet_prelude::feeless_if).
//!
//! ## Overview
//!
......@@ -30,8 +30,9 @@
//! ## Integration
//!
//! This pallet wraps an existing transaction payment pallet. This means you should both pallets
//! in your `construct_runtime` macro and include this pallet's
//! [`SignedExtension`] ([`SkipCheckIfFeeless`]) that would accept the existing one as an argument.
//! in your [`construct_runtime`](frame_support::construct_runtime) macro and
//! include this pallet's [`SignedExtension`] ([`SkipCheckIfFeeless`]) that would accept the
//! existing one as an argument.
#![cfg_attr(not(feature = "std"), no_std)]
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment