Skip to content

Commit 7a417bb

Browse files
committed
fix: grammarly
1 parent 323dc1e commit 7a417bb

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

llms.txt

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26527,7 +26527,7 @@ Doc-Content: https://docs.polkadot.com/tutorials/interoperability/replay-and-dry
2652726527
--- BEGIN CONTENT ---
2652826528
---
2652926529
title: Replay and Dry Run XCMs
26530-
description: Learn how to replay and dry-run XCMs using Chopsticks with full logging enabled. Diagnose issues, trace message flow, and debug complex cross-chain interactions.
26530+
description: Replay and dry-run XCMs using Chopsticks with full logging enabled. Diagnose issues, trace message flow, and debug complex cross-chain interactions.
2653126531
---
2653226532

2653326533
# Replay and Dry Run XCMs Using Chopsticks
@@ -26554,7 +26554,7 @@ Before you begin, make sure you have:
2655426554

2655526555
If you haven't forked a chain before, see the [Fork a Chain with Chopsticks guide](/tutorials/polkadot-sdk/testing/fork-live-chains/){target=\_blank} or [Fork a Network Locally using Chopsticks](https://wiki.polkadot.network/learn/learn-guides-test-opengov-proposals/#fork-a-network-locally-using-chopsticks){target=\_blank} for step-by-step instructions.
2655626556

26557-
## Step 1: Set Up Your Project
26557+
## Set Up Your Project
2655826558

2655926559
Let's start by creating a dedicated workspace for your XCM replay and dry-run experiments.
2656026560

@@ -26595,17 +26595,17 @@ Let's start by creating a dedicated workspace for your XCM replay and dry-run ex
2659526595
npx tsc --init
2659626596
```
2659726597

26598-
## Step 2: Capture the XCM to Replay
26598+
## Capture the XCM to Replay
2659926599

2660026600
To replay a specific XCM, identify:
2660126601

2660226602
- The source and destination chains involved
2660326603
- The block number or height where the XCM was sent
2660426604
- Optionally, the call payload (if you plan to simulate it manually via development commands)
2660526605

26606-
You can use [Polkadot.Js Apps](/tutorials/polkadot-sdk/testing/fork-live-chains/#use-polkadotjs-apps){target=\_blank}, [papi console](https://dev.papi.how/){target=\_blank}, or indexers such as [Subscan](https://polkadot.subscan.io/xcm_dashboard){target=\_blank} to locate and inspect the original XCM execution.
26606+
You can use [Polkadot.js Apps](/tutorials/polkadot-sdk/testing/fork-live-chains/#use-polkadotjs-apps){target=\_blank}, [papi console](https://dev.papi.how/){target=\_blank}, or indexers such as [Subscan](https://polkadot.subscan.io/xcm_dashboard){target=\_blank} to locate and inspect the original XCM execution.
2660726607

26608-
## Step 3: Fork the Relevant Chains
26608+
## Fork the Relevant Chains
2660926609

2661026610
Use Chopsticks to [fork the required chains](/tutorials/polkadot-sdk/testing/fork-live-chains/#xcm-testing){target=\_blank} at the appropriate block heights.
2661126611

@@ -26623,13 +26623,13 @@ ACALA_BLOCK_NUMBER=8826385
2662326623

2662426624
Full execution logs only work if the runtime was compiled with logging enabled. Most live chains are built using the `production` profile, which disables logs. To enable logging, you'll need to override the Wasm with a locally built `release` or `debug` version. The `release` profile is faster to load in Chopsticks.
2662526625

26626-
1. Clone the `polkadot-fellows/runtimes` repository
26626+
1. Clone the `polkadot-fellows/runtimes` repository:
2662726627

2662826628
```bash
2662926629
git clone [email protected]:polkadot-fellows/runtimes.git
2663026630
```
2663126631

26632-
2. Build the Polkadot Asset Hub runtime
26632+
2. Build the Polkadot Asset Hub runtime:
2663326633

2663426634
```bash
2663526635
cd runtimes
@@ -26640,7 +26640,7 @@ Full execution logs only work if the runtime was compiled with logging enabled.
2664026640
cargo build --release -p asset-hub-polkadot-runtime
2664126641
```
2664226642

26643-
3. Copy the compiled Wasm to your working directory
26643+
3. Copy the compiled Wasm to your working directory:
2664426644

2664526645
```bash
2664626646
# Assuming you're still in the `runtimes` directory
@@ -26655,7 +26655,7 @@ Full execution logs only work if the runtime was compiled with logging enabled.
2665526655
cp target/release/wbuild/asset-hub-polkadot-runtime/asset_hub_polkadot_runtime.compact.compressed.wasm ../wasms
2665626656
```
2665726657

26658-
4. Download and modify a config file
26658+
4. Download and modify a config file:
2665926659

2666026660
```bash
2666126661
# Still in the `runtimes` directory
@@ -26703,29 +26703,29 @@ Full execution logs only work if the runtime was compiled with logging enabled.
2670326703
<span data-ty>[09:29:17.028] INFO (xcm): Connected relaychain 'Polkadot' with parachain 'Acala'</span>
2670426704
</div>
2670526705

26706-
## Step 4: Identify and Extract the XCM
26706+
## Identify and Extract the XCM
2670726707

26708-
To replay an XCM, you'll first need to identify the exact extrinsic that triggered it. In this example, we'll use block `#9079592` on the Polkadot Asset Hub.
26708+
To replay an XCM, you'll first need to identify the exact extrinsic that triggered it. In this example, we'll use block 9079592 on the Polkadot Asset Hub.
2670926709

26710-
1. Find the block on Subscan, open the block in Subscan to inspect its extrinsics and events. In this case, the block is [`#9079592`](https://assethub-polkadot.subscan.io/block/9079592){target=\_blank}.
26710+
1. Find and open the block on Subscan to inspect its extrinsics and events. In this case, the block is [9079592](https://assethub-polkadot.subscan.io/block/9079592){target=\_blank}.
2671126711

26712-
2. Copy the black hash. Look for the block hash at the top of the page. For block `#9079592`, the hash is:
26712+
2. Copy the black hash. Look for the block hash at the top of the page. For block 9079592, the hash is:
2671326713

2671426714
```bash title="Block Hash"
2671526715
0xeb5a5737d47367dc1c02b978232283cdb096eb7e51d2eb22366a106a011347f6
2671626716
```
2671726717

2671826718
3. Explore and view the block in [Polkadot.Js Apps](https://polkadot.js.org/apps){target=\_blank} using this direct link: [Block Hash Explorer](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot-asset-hub-rpc.polkadot.io#/explorer/query/0xeb5a5737d47367dc1c02b978232283cdb096eb7e51d2eb22366a106a011347f6){target=\_blank}.
2671926719

26720-
4. Locate and Decode the XCM Extrinsic. Once you've found the extrinsic (e.g. `9079592-2`), extract and decode its call data. For example, the call data is:
26720+
4. Locate and decode the XCM extrinsic. Once you've found the extrinsic (e.g., 9079592-2), extract and decode its call data. For example, the call data is:
2672126721

2672226722
```bash title="Call Data"
2672326723
0xad028400fc39fcf04a8071b7409823b7c82427ce67910c6ed80aa0e5093aff234624c820016a30461702adc48213e5c9ee4d15c5a481c578cb5cbc935f0bd11fe8aee489082a745ffbbe94282f91b67daa6cb44920d77c30849c1d25f5f6c3e59015a3e383440055040000011f0803010100411f0300010100fc39fcf04a8071b7409823b7c82427ce67910c6ed80aa0e5093aff234624c8200304000002043205011f0092e81d790000000000
2672426724
```
2672526725

26726-
5. Copy the call data. From the decoded view, copy the **hex-encoded call** (e.g. `0x1f08...0000`). You'll pass this into `api.txFromCallData(...)` to replay the XCM locally.
26726+
5. From the decoded view, copy the **hex-encoded call** (e.g. `0x1f08...0000`). You'll pass this into `api.txFromCallData(...)` to replay the XCM locally.
2672726727

26728-
## Step 5: Replay the XCM
26728+
## Replay the XCM
2672926729

2673026730
Once your project is set up, you're ready to replay the XCM locally.
2673126731

@@ -26743,7 +26743,7 @@ This will let you use type-safe APIs with PAPI:
2674326743
npx papi add assetHub -w ws://localhost:8000
2674426744
```
2674526745

26746-
The script assumes the Polkadot Asset Hub is served on `ws://localhost:8000`. If you're using a different port or config, update the WebSocket endpoint in the script or descriptor. You can confirm the port by checking your terminal logs or see [Launch Chopsticks](#launch-chopsticks).
26746+
The script assumes the Polkadot Asset Hub is served on `ws://localhost:8000`. If you're using a different port or config, update the WebSocket endpoint in the script or descriptor. You can confirm the port by checking your terminal logs or by seeing [Launch Chopsticks](#launch-chopsticks).
2674726747

2674826748
### Create a Replay Script
2674926749

@@ -26868,7 +26868,7 @@ executing xcm: {
2686826868
<span data-ty>✅ Process completed, exiting...</span>
2686926869
</div>
2687026870

26871-
## Step 6: Dry Run the XCM
26871+
## Dry Run the XCM
2687226872

2687326873
To simulate the XCM without actually sending it, you can use the `dry_run_call` method. This lets you check whether the XCM would succeed without modifying any state.
2687426874

@@ -26967,7 +26967,7 @@ For more information, see:
2696726967
- [Dry Run Call](/develop/interoperability/xcm-runtime-apis/#dry-run-call){target=\_blank} to simulate a full extrinsic
2696826968
- [Dry Run XCM](/develop/interoperability/xcm-runtime-apis/#dry-run-xcm){target=\_blank} to simulate a raw XCM
2696926969

26970-
## Step 7: Review and Debug
26970+
## Review and Debug
2697126971

2697226972
Replaying XCMs with full logging provides fine-grained control and visibility into cross-chain message behaviour. Chopsticks makes this possible in a safe, local environment – empowering developers to:
2697326973

tutorials/interoperability/replay-and-dry-run-xcms.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ This will let you use type-safe APIs with PAPI:
206206
npx papi add assetHub -w ws://localhost:8000
207207
```
208208
209-
The script assumes the Polkadot Asset Hub is served on `ws://localhost:8000`. If you're using a different port or config, update the WebSocket endpoint in the script or descriptor. You can confirm the port by checking your terminal logs or see [Launch Chopsticks](#launch-chopsticks).
209+
The script assumes the Polkadot Asset Hub is served on `ws://localhost:8000`. If you're using a different port or config, update the WebSocket endpoint in the script or descriptor. You can confirm the port by checking your terminal logs or by seeing [Launch Chopsticks](#launch-chopsticks).
210210
211211
### Create a Replay Script
212212

0 commit comments

Comments
 (0)