Skip to content

Commit 0886460

Browse files
committed
Rename Subxt metadata file to polkadot_testnet_metadata.scale
1 parent 170a303 commit 0886460

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.chain-interactions/query-data/runtime-api-calls.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ Select your preferred SDK below to see complete, runnable examples that query Po
255255
3. Download the Polkadot Hub TestNet metadata:
256256

257257
```bash
258-
subxt metadata --url INSERT_WS_ENDPOINT -o asset_hub_metadata.scale
258+
subxt metadata --url INSERT_WS_ENDPOINT -o polkadot_testnet_metadata.scale
259259
```
260260

261261
Ensure to replace `INSERT_WS_ENDPOINT` with the proper WebSocket endpoint, such as `wss://asset-hub-paseo.dotters.network` for Polkadot Hub TestNet.

.snippets/code/chain-interactions/query-data/runtime-api-calls/subxt/src/bin/runtime_apis.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ use subxt::utils::AccountId32;
44
use subxt::{OnlineClient, PolkadotConfig};
55

66
// Generate an interface from the node's metadata
7-
#[subxt::subxt(runtime_metadata_path = "asset_hub_metadata.scale")]
8-
pub mod asset_hub {}
7+
#[subxt::subxt(runtime_metadata_path = "polkadot_testnet_metadata.scale")]
8+
pub mod polkadot_testnet {}
99

1010
const POLKADOT_TESTNET_RPC: &str = "INSERT_WS_ENDPOINT";
1111

@@ -24,7 +24,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
2424
let account = AccountId32::from_str(ADDRESS)?;
2525

2626
// Call AccountNonceApi using static interface
27-
let nonce_call = asset_hub::apis()
27+
let nonce_call = polkadot_testnet::apis()
2828
.account_nonce_api()
2929
.account_nonce(account.clone());
3030
let nonce = api.runtime_api().at_latest().await?.call(nonce_call).await?;

0 commit comments

Comments
 (0)