Skip to content

Commit d5e4dab

Browse files
committed
add note for replacing INSERT
1 parent 2348188 commit d5e4dab

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

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

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ 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-
2623
## Query On-Chain Data
2724

2825
=== "PAPI"
@@ -66,6 +63,8 @@ Select your preferred SDK below to see complete, runnable examples that query Po
6663
--8<-- "code/chain-interactions/query-data/query-sdks/papi/query-balance.ts"
6764
```
6865

66+
Ensure to replace `INSERT_WS_ENDPOINT` with a valid WebSocket endpoint (e.g., `wss://polkadot-asset-hub-rpc.polkadot.io`) and `INSERT_ADDRESS` with the account address you want to query.
67+
6968
Run the script:
7069

7170
```bash
@@ -86,6 +85,8 @@ Select your preferred SDK below to see complete, runnable examples that query Po
8685
--8<-- "code/chain-interactions/query-data/query-sdks/papi/query-asset.ts"
8786
```
8887

88+
Ensure to replace `INSERT_WS_ENDPOINT` with a valid WebSocket endpoint (e.g., `wss://polkadot-asset-hub-rpc.polkadot.io`) and `INSERT_ADDRESS` with the account address you want to query.
89+
8990
Run the script:
9091

9192
```bash
@@ -133,6 +134,8 @@ Select your preferred SDK below to see complete, runnable examples that query Po
133134
--8<-- "code/chain-interactions/query-data/query-sdks/pjs/query-balance.js"
134135
```
135136

137+
Ensure to replace `INSERT_WS_ENDPOINT` with a valid WebSocket endpoint (e.g., `wss://polkadot-asset-hub-rpc.polkadot.io`) and `INSERT_ADDRESS` with the account address you want to query.
138+
136139
Run the script:
137140

138141
```bash
@@ -153,6 +156,8 @@ Select your preferred SDK below to see complete, runnable examples that query Po
153156
--8<-- "code/chain-interactions/query-data/query-sdks/pjs/query-asset.js"
154157
```
155158

159+
Ensure to replace `INSERT_WS_ENDPOINT` with a valid WebSocket endpoint (e.g., `wss://polkadot-asset-hub-rpc.polkadot.io`) and `INSERT_ADDRESS` with the account address you want to query.
160+
156161
Run the script:
157162

158163
```bash
@@ -198,6 +203,8 @@ Select your preferred SDK below to see complete, runnable examples that query Po
198203
--8<-- "code/chain-interactions/query-data/query-sdks/dedot/query-balance.ts"
199204
```
200205

206+
Ensure to replace `INSERT_WS_ENDPOINT` with a valid WebSocket endpoint (e.g., `wss://polkadot-asset-hub-rpc.polkadot.io`) and `INSERT_ADDRESS` with the account address you want to query.
207+
201208
Run the script:
202209

203210
```bash
@@ -218,6 +225,8 @@ Select your preferred SDK below to see complete, runnable examples that query Po
218225
--8<-- "code/chain-interactions/query-data/query-sdks/dedot/query-asset.ts"
219226
```
220227

228+
Ensure to replace `INSERT_WS_ENDPOINT` with a valid WebSocket endpoint (e.g., `wss://polkadot-asset-hub-rpc.polkadot.io`) and `INSERT_ADDRESS` with the account address you want to query.
229+
221230
Run the script:
222231

223232
```bash
@@ -262,6 +271,8 @@ Select your preferred SDK below to see complete, runnable examples that query Po
262271
--8<-- "code/chain-interactions/query-data/query-sdks/psi/query_balance.py"
263272
```
264273

274+
Ensure to replace `INSERT_WS_ENDPOINT` with a valid WebSocket endpoint (e.g., `wss://polkadot-asset-hub-rpc.polkadot.io`) and `INSERT_ADDRESS` with the account address you want to query.
275+
265276
Run the script:
266277

267278
```bash
@@ -282,6 +293,8 @@ Select your preferred SDK below to see complete, runnable examples that query Po
282293
--8<-- "code/chain-interactions/query-data/query-sdks/psi/query_asset.py"
283294
```
284295

296+
Ensure to replace `INSERT_WS_ENDPOINT` with a valid WebSocket endpoint (e.g., `wss://polkadot-asset-hub-rpc.polkadot.io`) and `INSERT_ADDRESS` with the account address you want to query.
297+
285298
Run the script:
286299

287300
```bash
@@ -321,6 +334,8 @@ Select your preferred SDK below to see complete, runnable examples that query Po
321334
subxt metadata --url INSERT_WS_ENDPOINT -o asset_hub_metadata.scale
322335
```
323336

337+
Ensure to replace `INSERT_WS_ENDPOINT` with the proper WebSocket endpoint, such as `wss://polkadot-asset-hub-rpc.polkadot.io` for Polkadot Hub.
338+
324339
4. Update `Cargo.toml` with the required dependencies:
325340

326341
```toml title="Cargo.toml"
@@ -337,6 +352,8 @@ Select your preferred SDK below to see complete, runnable examples that query Po
337352
--8<-- "code/chain-interactions/query-data/query-sdks/subxt/src/bin/query_balance.rs"
338353
```
339354

355+
Ensure to replace `INSERT_WS_ENDPOINT` with a valid WebSocket endpoint (e.g., `wss://polkadot-asset-hub-rpc.polkadot.io`) and `INSERT_ADDRESS` with the account address you want to query.
356+
340357
Run the script:
341358

342359
```bash
@@ -360,6 +377,8 @@ Select your preferred SDK below to see complete, runnable examples that query Po
360377
--8<-- "code/chain-interactions/query-data/query-sdks/subxt/src/bin/query_asset.rs"
361378
```
362379

380+
Ensure to replace `INSERT_WS_ENDPOINT` with a valid WebSocket endpoint (e.g., `wss://polkadot-asset-hub-rpc.polkadot.io`) and `INSERT_ADDRESS` with the account address you want to query.
381+
363382
Run the script:
364383

365384
```bash

0 commit comments

Comments
 (0)