mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-22 22:01:08 +00:00
@@ -6,7 +6,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
// Create a client to use:
|
// Create a client to use:
|
||||||
let api = OnlineClient::<PolkadotConfig>::new().await?;
|
let api = OnlineClient::<PolkadotConfig>::new().await?;
|
||||||
|
|
||||||
// A dynamic query to obtain some contant:
|
// A dynamic query to obtain some constant:
|
||||||
let constant_query = subxt::dynamic::constant("System", "BlockLength");
|
let constant_query = subxt::dynamic::constant("System", "BlockLength");
|
||||||
|
|
||||||
// Obtain the value:
|
// Obtain the value:
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
// Create a client to use:
|
// Create a client to use:
|
||||||
let api = OnlineClient::<PolkadotConfig>::new().await?;
|
let api = OnlineClient::<PolkadotConfig>::new().await?;
|
||||||
|
|
||||||
// A query to obtain some contant:
|
// A query to obtain some constant:
|
||||||
let constant_query = polkadot::constants().system().block_length();
|
let constant_query = polkadot::constants().system().block_length();
|
||||||
|
|
||||||
// Obtain the value:
|
// Obtain the value:
|
||||||
|
|||||||
Reference in New Issue
Block a user