Skip to content

Commit 0faa8a8

Browse files
Update limited-reserve-transfer-assets.ts
1 parent 322a0e3 commit 0faa8a8

File tree

5 files changed

+20
-22
lines changed

5 files changed

+20
-22
lines changed

.snippets/code/tutorials/interoperability/xcm-observability/deposit-reserve-asset-with-set-topic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import {
2323
} from "@polkadot-labs/hdkd-helpers";
2424

2525
const XCM_VERSION = 5;
26-
const MAX_RETRIES = 6;
26+
const MAX_RETRIES = 8;
2727

2828
const toHuman = (_key: any, value: any) => {
2929
if (typeof value === "bigint") {

.snippets/code/tutorials/interoperability/xcm-observability/initiate-reserve-withdraw-with-set-topic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import {
2424
} from "@polkadot-labs/hdkd-helpers";
2525

2626
const XCM_VERSION = 5;
27-
const MAX_RETRIES = 6;
27+
const MAX_RETRIES = 8;
2828

2929
const toHuman = (_key: any, value: any) => {
3030
if (typeof value === "bigint") {

.snippets/code/tutorials/interoperability/xcm-observability/limited-reserve-transfer-assets.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Binary, BlockInfo, createClient, Enum, PolkadotClient, TypedApi} from "polkadot-api";
1+
import {Binary, createClient, Enum} from "polkadot-api";
22
import {withPolkadotSdkCompat} from "polkadot-api/polkadot-sdk-compat";
33
import {getPolkadotSigner} from "polkadot-api/signer";
44
import {getWsProvider} from "polkadot-api/ws-provider/web";
@@ -21,7 +21,7 @@ import {
2121
} from "@polkadot-labs/hdkd-helpers";
2222

2323
const XCM_VERSION = 5;
24-
const MAX_RETRIES = 6;
24+
const MAX_RETRIES = 8;
2525

2626
const toHuman = (_key: any, value: any) => {
2727
if (typeof value === "bigint") {
@@ -36,10 +36,10 @@ const toHuman = (_key: any, value: any) => {
3636
};
3737

3838
async function assertProcessedMessageId(
39-
client: PolkadotClient,
40-
api: TypedApi<any>,
39+
client: any,
40+
api: any,
4141
name: String,
42-
blockBefore: BlockInfo,
42+
blockBefore: any,
4343
expectedMessageId: String,
4444
) {
4545
let processedMessageId = undefined;
@@ -165,7 +165,7 @@ async function main() {
165165
}
166166
}
167167

168-
const sentEvents = await para1Api.event.PolkadotXcm.Sent.pull();
168+
const sentEvents: any = await para1Api.event.PolkadotXcm.Sent.pull();
169169
if (sentEvents.length > 0) {
170170
const sentMessageId = sentEvents[0].payload.message_id.asHex();
171171
console.log(`📣 Last message sent on ${para1Name}: ${sentMessageId}`);

llms-full.txt

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30937,8 +30937,7 @@ If you're new to XCM replay or dry-run, see [Replay and Dry Run XCMs Using Chops
3093730937

3093830938
```yaml title="configs/polkadot-hub-override.yaml"
3093930939
...
30940-
# wasm-override: wasms/asset_hub_polkadot_runtime.wasm # Uncomment if using the `debug` build
30941-
wasm-override: wasms/asset-hub-polkadot_v1.6.0.wasm # Use this if you built with `release`
30940+
wasm-override: wasms/asset-hub-polkadot_v1.6.0.wasm
3094230941
...
3094330942
```
3094430943

@@ -30953,7 +30952,7 @@ If you're new to XCM replay or dry-run, see [Replay and Dry Run XCMs Using Chops
3095330952
7. Open a **new terminal** in the same folder and initialise a Node.js project:
3095430953

3095530954
```bash
30956-
npm init -y
30955+
npm init -y && npm pkg set type="module"
3095730956
```
3095830957

3095930958
8. Install TypeScript and Polkadot dependencies:
@@ -31054,7 +31053,7 @@ flowchart TD
3105431053
Create and run `limited-reserve-transfer-assets.ts`:
3105531054

3105631055
```ts
31057-
import {Binary, BlockInfo, createClient, Enum, PolkadotClient, TypedApi} from "polkadot-api";
31056+
import {Binary, createClient, Enum} from "polkadot-api";
3105831057
import {withPolkadotSdkCompat} from "polkadot-api/polkadot-sdk-compat";
3105931058
import {getPolkadotSigner} from "polkadot-api/signer";
3106031059
import {getWsProvider} from "polkadot-api/ws-provider/web";
@@ -31077,7 +31076,7 @@ import {
3107731076
} from "@polkadot-labs/hdkd-helpers";
3107831077

3107931078
const XCM_VERSION = 5;
31080-
const MAX_RETRIES = 6;
31079+
const MAX_RETRIES = 8;
3108131080

3108231081
const toHuman = (_key: any, value: any) => {
3108331082
if (typeof value === "bigint") {
@@ -31092,10 +31091,10 @@ const toHuman = (_key: any, value: any) => {
3109231091
};
3109331092

3109431093
async function assertProcessedMessageId(
31095-
client: PolkadotClient,
31096-
api: TypedApi<any>,
31094+
client: any,
31095+
api: any,
3109731096
name: String,
31098-
blockBefore: BlockInfo,
31097+
blockBefore: any,
3109931098
expectedMessageId: String,
3110031099
) {
3110131100
let processedMessageId = undefined;
@@ -31221,7 +31220,7 @@ async function main() {
3122131220
}
3122231221
}
3122331222

31224-
const sentEvents = await para1Api.event.PolkadotXcm.Sent.pull();
31223+
const sentEvents: any = await para1Api.event.PolkadotXcm.Sent.pull();
3122531224
if (sentEvents.length > 0) {
3122631225
const sentMessageId = sentEvents[0].payload.message_id.asHex();
3122731226
console.log(`📣 Last message sent on ${para1Name}: ${sentMessageId}`);
@@ -31334,7 +31333,7 @@ import {
3133431333
} from "@polkadot-labs/hdkd-helpers";
3133531334

3133631335
const XCM_VERSION = 5;
31337-
const MAX_RETRIES = 6;
31336+
const MAX_RETRIES = 8;
3133831337

3133931338
const toHuman = (_key: any, value: any) => {
3134031339
if (typeof value === "bigint") {
@@ -31632,7 +31631,7 @@ import {
3163231631
} from "@polkadot-labs/hdkd-helpers";
3163331632

3163431633
const XCM_VERSION = 5;
31635-
const MAX_RETRIES = 6;
31634+
const MAX_RETRIES = 8;
3163631635

3163731636
const toHuman = (_key: any, value: any) => {
3163831637
if (typeof value === "bigint") {

tutorials/interoperability/xcm-observability.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ If you're new to XCM replay or dry-run, see [Replay and Dry Run XCMs Using Chops
6565

6666
```yaml title="configs/polkadot-hub-override.yaml"
6767
...
68-
# wasm-override: wasms/asset_hub_polkadot_runtime.wasm # Uncomment if using the `debug` build
69-
wasm-override: wasms/asset-hub-polkadot_v1.6.0.wasm # Use this if you built with `release`
68+
wasm-override: wasms/asset-hub-polkadot_v1.6.0.wasm
7069
...
7170
```
7271

@@ -81,7 +80,7 @@ If you're new to XCM replay or dry-run, see [Replay and Dry Run XCMs Using Chops
8180
7. Open a **new terminal** in the same folder and initialise a Node.js project:
8281

8382
```bash
84-
npm init -y
83+
npm init -y && npm pkg set type="module"
8584
```
8685

8786
8. Install TypeScript and Polkadot dependencies:

0 commit comments

Comments
 (0)