Prep to release v0.42.0 (#2003)

* Prep to release v0.42.0

* Remove test_context reference from example

* standalone_crate for doc tests because codegen is expensive

* fmt
This commit is contained in:
James Wilson
2025-05-12 10:32:38 +01:00
committed by GitHub
parent 23c62f3d5d
commit 7de8d36806
27 changed files with 162 additions and 61 deletions
+1 -1
View File
@@ -13,7 +13,7 @@
//! The most common way to generate the interface is to use the [`#[subxt]`](crate::subxt) macro.
//! Using this macro looks something like:
//!
//! ```rust,no_run
//! ```rust,no_run,standalone_crate
//! #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata_tiny.scale")]
//! pub mod polkadot {}
//! ```
+1 -1
View File
@@ -96,7 +96,7 @@
//! For statemint, the transaction extensions look like
//! [this](https://github.com/paritytech/cumulus/blob/d4bb2215bb28ee05159c4c7df1b3435177b5bf4e/parachains/runtimes/assets/asset-hub-polkadot/src/lib.rs#L786):
//!
//! ```rs
//! ```rust,ignore
//! pub type SignedExtra = (
//! frame_system::CheckNonZeroSender<Runtime>,
//! frame_system::CheckSpecVersion<Runtime>,
+2 -2
View File
@@ -15,7 +15,7 @@
//!
//! We can use the statically generated interface to build constant queries:
//!
//! ```rust,no_run
//! ```rust,no_run,standalone_crate
//! #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata_full.scale")]
//! pub mod polkadot {}
//!
@@ -24,7 +24,7 @@
//!
//! Alternately, we can dynamically construct a constant query:
//!
//! ```rust,no_run
//! ```rust,no_run,standalone_crate
//! use subxt::dynamic::Value;
//!
//! let storage_query = subxt::dynamic::constant("System", "BlockLength");
+1 -1
View File
@@ -18,7 +18,7 @@
//! by that transaction being executed. We can also access _all_ of the events produced in a single block using one
//! of these two interfaces:
//!
//! ```rust,no_run
//! ```rust,no_run,standalone_crate
//! # #[tokio::main]
//! # async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! use subxt::client::OnlineClient;
+1 -1
View File
@@ -21,7 +21,7 @@
//!
//! We can use the statically generated interface to build runtime calls:
//!
//! ```rust,no_run
//! ```rust,no_run,standalone_crate
//! #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata_small.scale")]
//! pub mod polkadot {}
//!
+3 -3
View File
@@ -15,7 +15,7 @@
//!
//! We can use the statically generated interface to build storage queries:
//!
//! ```rust,no_run
//! ```rust,no_run,standalone_crate
//! use subxt_signer::sr25519::dev;
//!
//! #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata_small.scale")]
@@ -28,7 +28,7 @@
//! Alternately, we can dynamically construct a storage query. This will not be type checked or
//! validated until it's submitted:
//!
//! ```rust,no_run
//! ```rust,no_run,standalone_crate
//! use subxt_signer::sr25519::dev;
//! use subxt::dynamic::Value;
//!
@@ -42,7 +42,7 @@
//! the map of account information). To do this, suffix `_iter` onto the query constructor (this
//! will only be available on static constructors when iteration is actually possible):
//!
//! ```rust,no_run
//! ```rust,no_run,standalone_crate
//! #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata_small.scale")]
//! pub mod polkadot {}
//!
+4 -4
View File
@@ -25,7 +25,7 @@
//!
//! We can use the statically generated interface to build transaction payloads:
//!
//! ```rust,no_run
//! ```rust,no_run,standalone_crate
//! #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata_small.scale")]
//! pub mod polkadot {}
//!
@@ -41,7 +41,7 @@
//! Alternately, we can dynamically construct a transaction payload. This will not be type checked or
//! validated until it's submitted:
//!
//! ```rust,no_run
//! ```rust,no_run,standalone_crate
//! use subxt::dynamic::Value;
//!
//! let tx_payload = subxt::dynamic::tx("System", "remark", vec![
@@ -79,7 +79,7 @@
//!
//! Let's go through how to create a signer using the `subxt_signer` crate:
//!
//! ```rust
//! ```rust,standalone_crate
//! use subxt::config::PolkadotConfig;
//! use std::str::FromStr;
//!
@@ -97,7 +97,7 @@
//!
//! After initializing the signer, let's also go through how to create a transaction and sign it:
//!
//! ```rust,no_run
//! ```rust,no_run,standalone_crate
//! # #[tokio::main]
//! # async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! use subxt::client::OnlineClient;