Skip to content

Commit 198e159

Browse files
Update Prerequisites
1 parent 7eca3f1 commit 198e159

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

llms.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27845,6 +27845,7 @@ Before you begin, ensure you've:
2784527845

2784627846
- [Chopsticks](/develop/toolkit/parachains/fork-chains/chopsticks/get-started/){target=\_blank} installed (`npm i -g @acala-network/chopsticks`)
2784727847
- Access to the endpoint or genesis file of the parachain you wish to fork
27848+
- Set up your TypeScript project with the essential tools
2784827849

2784927850
If you haven't replayed or dry-run XCMs before, see the [Replay and Dry Run XCMs Using Chopsticks](/tutorials/interoperability/replay-and-dry-run-xcms/){target=\_blank} tutorial for step-by-step guidance.
2785027851

@@ -27861,15 +27862,15 @@ npx @acala-network/chopsticks xcm \
2786127862
-p hydradx
2786227863
```
2786327864

27865+
→ See the [Fork a Chain with Chopsticks guide](/tutorials/polkadot-sdk/testing/fork-live-chains/){target=\_blank} for detailed instructions.
27866+
2786427867
Before running the script, add the descriptors:
2786527868

2786627869
```bash
2786727870
npx papi add assetHub -w ws://localhost:8000
2786827871
npx papi add hydration -w ws://localhost:8001
2786927872
```
2787027873

27871-
→ See the [Fork a Chain with Chopsticks guide](/tutorials/polkadot-sdk/testing/fork-live-chains/){target=\_blank} for detailed instructions.
27872-
2787327874
## Understanding the Basics
2787427875

2787527876
When sending XCMs using `limited_reserve_transfer_assets` or other extrinsics from the `PolkadotXcm` pallet, two key observability features allow developers to trace and correlate messages across chains:
@@ -27912,6 +27913,8 @@ This example uses the `PolkadotXcm.limited_reserve_transfer_assets` extrinsic to
2791227913

2791327914
The runtime automatically appends a `SetTopic` instruction to the forwarded XCM. This topic becomes the `message_id` used in both `Sent` and `Processed` events, enabling traceability without manual intervention.
2791427915

27916+
Create a new script, `limited-reserve-transfer-assets.ts`
27917+
2791527918
```ts
2791627919
import {Binary, createClient, Enum, Transaction} from "polkadot-api";
2791727920
import {withPolkadotSdkCompat} from "polkadot-api/polkadot-sdk-compat";
@@ -28165,6 +28168,8 @@ In complex XCM flows, such as multi-hop transfers that span multiple parachains,
2816528168
- **Topic assignment**: Manually set via `SetTopic` instruction
2816628169
- **Goal**: Transfer DOT and trace the XCM using the manually assigned `message_id`
2816728170

28171+
Create a new script, `multi-hop-with-set-topic.ts`
28172+
2816828173
```ts
2816928174
import {Binary, createClient, Enum, Transaction} from "polkadot-api";
2817028175
import {withPolkadotSdkCompat} from "polkadot-api/polkadot-sdk-compat";

tutorials/interoperability/xcm-observability.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Before you begin, ensure you've:
2525

2626
- [Chopsticks](/develop/toolkit/parachains/fork-chains/chopsticks/get-started/){target=\_blank} installed (`npm i -g @acala-network/chopsticks`)
2727
- Access to the endpoint or genesis file of the parachain you wish to fork
28+
- Set up your TypeScript project with the essential tools
2829

2930
If you haven't replayed or dry-run XCMs before, see the [Replay and Dry Run XCMs Using Chopsticks](/tutorials/interoperability/replay-and-dry-run-xcms/){target=\_blank} tutorial for step-by-step guidance.
3031

@@ -41,15 +42,15 @@ npx @acala-network/chopsticks xcm \
4142
-p hydradx
4243
```
4344

45+
→ See the [Fork a Chain with Chopsticks guide](/tutorials/polkadot-sdk/testing/fork-live-chains/){target=\_blank} for detailed instructions.
46+
4447
Before running the script, add the descriptors:
4548

4649
```bash
4750
npx papi add assetHub -w ws://localhost:8000
4851
npx papi add hydration -w ws://localhost:8001
4952
```
5053

51-
→ See the [Fork a Chain with Chopsticks guide](/tutorials/polkadot-sdk/testing/fork-live-chains/){target=\_blank} for detailed instructions.
52-
5354
## Understanding the Basics
5455

5556
When sending XCMs using `limited_reserve_transfer_assets` or other extrinsics from the `PolkadotXcm` pallet, two key observability features allow developers to trace and correlate messages across chains:
@@ -92,6 +93,8 @@ This example uses the `PolkadotXcm.limited_reserve_transfer_assets` extrinsic to
9293

9394
The runtime automatically appends a `SetTopic` instruction to the forwarded XCM. This topic becomes the `message_id` used in both `Sent` and `Processed` events, enabling traceability without manual intervention.
9495

96+
Create a new script, `limited-reserve-transfer-assets.ts`
97+
9598
```ts
9699
--8<-- 'code/tutorials/interoperability/xcm-observability/limited-reserve-transfer-assets.ts'
97100
```
@@ -136,6 +139,8 @@ In complex XCM flows, such as multi-hop transfers that span multiple parachains,
136139
- **Topic assignment**: Manually set via `SetTopic` instruction
137140
- **Goal**: Transfer DOT and trace the XCM using the manually assigned `message_id`
138141

142+
Create a new script, `multi-hop-with-set-topic.ts`
143+
139144
```ts
140145
--8<-- 'code/tutorials/interoperability/xcm-observability/multi-hop-with-set-topic.ts'
141146
```

0 commit comments

Comments
 (0)