Skip to content

Commit 2348188

Browse files
committed
add placeholders
1 parent 813ac9a commit 2348188

File tree

18 files changed

+24
-105
lines changed

18 files changed

+24
-105
lines changed

.chain-interactions/query-data/query-sdks.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ This guide demonstrates how to query on-chain storage using five popular SDKs:
2020

2121
Select your preferred SDK below to see complete, runnable examples that query Polkadot Hub for account balances and asset information.
2222

23+
!!! note
24+
Ensure to replace `INSERT_WS_ENDPOINT` with the proper WebSocket endpoint and `INSERT_ADDRESS` with the account address you want to query. For this example, you can use Polkadot Hub (`wss://polkadot-asset-hub-rpc.polkadot.io`).
25+
2326
## Query On-Chain Data
2427

2528
=== "PAPI"
@@ -315,7 +318,7 @@ Select your preferred SDK below to see complete, runnable examples that query Po
315318
3. Download the Polkadot Hub metadata:
316319

317320
```bash
318-
subxt metadata --url wss://polkadot-asset-hub-rpc.polkadot.io -o asset_hub_metadata.scale
321+
subxt metadata --url INSERT_WS_ENDPOINT -o asset_hub_metadata.scale
319322
```
320323

321324
4. Update `Cargo.toml` with the required dependencies:

.snippets/code/chain-interactions/query-data/query-sdks/dedot/package.json

Lines changed: 0 additions & 18 deletions
This file was deleted.

.snippets/code/chain-interactions/query-data/query-sdks/dedot/query-asset.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ import { DedotClient, WsProvider } from "dedot";
22
import { hexToString } from "dedot/utils";
33
import type { PolkadotAssetHubApi } from "@dedot/chaintypes";
44

5-
const ASSET_HUB_RPC = "wss://polkadot-asset-hub-rpc.polkadot.io";
5+
const ASSET_HUB_RPC = "INSERT_WS_ENDPOINT";
66

77
// USDT on Polkadot Hub
88
const USDT_ASSET_ID = 1984;
99

1010
// Example address to query asset balance
11-
const ADDRESS = "14E5nqKAp3oAJcmzgZhUD2RcptBeUBScxKHgJKU4HPNcKVf3";
11+
const ADDRESS = "INSERT_ADDRESS";
1212

1313
async function main() {
1414
// Initialize provider and client with Asset Hub types

.snippets/code/chain-interactions/query-data/query-sdks/dedot/query-balance.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { DedotClient, WsProvider } from "dedot";
22
import type { PolkadotAssetHubApi } from "@dedot/chaintypes";
33

4-
const ASSET_HUB_RPC = "wss://polkadot-asset-hub-rpc.polkadot.io";
4+
const ASSET_HUB_RPC = "INSERT_WS_ENDPOINT";
55

66
// Example address to query (Polkadot Hub address)
7-
const ADDRESS = "14E5nqKAp3oAJcmzgZhUD2RcptBeUBScxKHgJKU4HPNcKVf3";
7+
const ADDRESS = "INSERT_ADDRESS";
88

99
async function main() {
1010
// Initialize provider and client with Asset Hub types

.snippets/code/chain-interactions/query-data/query-sdks/dedot/tsconfig.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

.snippets/code/chain-interactions/query-data/query-sdks/papi/package.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

.snippets/code/chain-interactions/query-data/query-sdks/papi/query-asset.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import { getWsProvider } from "polkadot-api/ws-provider/node";
33
import { withPolkadotSdkCompat } from "polkadot-api/polkadot-sdk-compat";
44
import { pah } from "@polkadot-api/descriptors";
55

6-
const ASSET_HUB_RPC = "wss://polkadot-asset-hub-rpc.polkadot.io";
6+
const ASSET_HUB_RPC = "INSERT_WS_ENDPOINT";
77

88
// USDT on Polkadot Hub
99
const USDT_ASSET_ID = 1984;
1010

1111
// Example address to query asset balance
12-
const ADDRESS = "14E5nqKAp3oAJcmzgZhUD2RcptBeUBScxKHgJKU4HPNcKVf3";
12+
const ADDRESS = "INSERT_ADDRESS";
1313

1414
async function main() {
1515
// Create the client connection

.snippets/code/chain-interactions/query-data/query-sdks/papi/query-balance.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import { getWsProvider } from "polkadot-api/ws-provider/node";
33
import { withPolkadotSdkCompat } from "polkadot-api/polkadot-sdk-compat";
44
import { pah } from "@polkadot-api/descriptors";
55

6-
const ASSET_HUB_RPC = "wss://polkadot-asset-hub-rpc.polkadot.io";
6+
const ASSET_HUB_RPC = "INSERT_WS_ENDPOINT";
77

88
// Example address to query (Polkadot Hub address)
9-
const ADDRESS = "14E5nqKAp3oAJcmzgZhUD2RcptBeUBScxKHgJKU4HPNcKVf3";
9+
const ADDRESS = "INSERT_ADDRESS";
1010

1111
async function main() {
1212
// Create the client connection

.snippets/code/chain-interactions/query-data/query-sdks/papi/tsconfig.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

.snippets/code/chain-interactions/query-data/query-sdks/pjs/package.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)