Files
pezkuwi-sdk/vendor/pezkuwi-subxt/subxt/examples/constants_static.rs
T
pezkuwichain 5113cd4264 fix: CI failures - EVM tests and metadata artifacts
- tests-evm.yml: use pezkuwichain/revive-differential-tests fork with
  pez-revive-dev-node platform aliases
- .gitignore: allow vendor/pezkuwi-subxt/artifacts/ to be tracked
- Add metadata .scale files for compile-time macro expansion
- Rename polkadot_metadata_* references to pezkuwi_metadata_*
2026-01-27 15:20:03 +03:00

25 lines
705 B
Rust

#![allow(missing_docs)]
use pezkuwi_subxt::{OnlineClient, PezkuwiConfig};
#[pezkuwi_subxt::subxt(runtime_metadata_path = "../artifacts/pezkuwi_metadata_small.scale")]
pub mod pezkuwi {}
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Create a client to use:
let api = OnlineClient::<PezkuwiConfig>::new().await?;
// A query to obtain some constant:
let constant_query = pezkuwi::constants().system().block_length();
// Obtain the value:
let value = api.constants().at(&constant_query)?;
// Or obtain the bytes:
let bytes = api.constants().bytes_at(&constant_query)?;
println!("Encoded block length: {bytes:?}");
println!("Block length: {value:?}");
Ok(())
}