Skip to content

Commit 9bfb098

Browse files
committed
Update content
1 parent 82ff4ab commit 9bfb098

File tree

10 files changed

+40
-62
lines changed

10 files changed

+40
-62
lines changed

develop/toolkit/interoperability/paraspell-xcm-sdk/transfer-tokens-between-parachains.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,7 @@ Now that you have:
138138
- Verified the existential deposit on the recipient account.
139139
- Obtained an estimate of the associated XCM fees.
140140

141-
Now you can execute the transfer function by adding the following statement:
142-
143-
Add the following code:
141+
You can execute the transfer function by adding the following function call:
144142

145143
```typescript title="index.ts"
146144
--8<-- 'code/develop/toolkit/interoperability/paraspell/index.ts:108:108'

llms-files/llms-basics.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,8 @@ The [`XcmRouter`](https://paritytech.github.io/polkadot-sdk/master/pallet_xcm/pa
264264
For instance, the Kusama network employs the [`ChildParachainRouter`](https://paritytech.github.io/polkadot-sdk/master/polkadot_runtime_common/xcm_sender/struct.ChildParachainRouter.html){target=\_blank}, which restricts routing to [Downward Message Passing (DMP)](https://wiki.polkadot.com/learn/learn-xcm-transport/#dmp-downward-message-passing){target=\_blank} from the relay chain to parachains, ensuring secure and controlled communication.
265265

266266
```rust
267-
pub type XcmRouter = WithUniqueTopic<(
268-
// Only one router so far - use DMP to communicate with child parachains.
269-
ChildParachainRouter<Runtime, XcmPallet, PriceForChildParachainDelivery>,
270-
)>;
267+
pub type PriceForChildParachainDelivery =
268+
ExponentialPrice<FeeAssetId, BaseDeliveryFee, TransactionByteFee, Dmp>;
271269
```
272270

273271
For more details about XCM transport protocols, see the [XCM Channels](/develop/interoperability/xcm-channels/){target=\_blank} page.

llms-files/llms-dapps.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3488,10 +3488,8 @@ The [`XcmRouter`](https://paritytech.github.io/polkadot-sdk/master/pallet_xcm/pa
34883488
For instance, the Kusama network employs the [`ChildParachainRouter`](https://paritytech.github.io/polkadot-sdk/master/polkadot_runtime_common/xcm_sender/struct.ChildParachainRouter.html){target=\_blank}, which restricts routing to [Downward Message Passing (DMP)](https://wiki.polkadot.com/learn/learn-xcm-transport/#dmp-downward-message-passing){target=\_blank} from the relay chain to parachains, ensuring secure and controlled communication.
34893489

34903490
```rust
3491-
pub type XcmRouter = WithUniqueTopic<(
3492-
// Only one router so far - use DMP to communicate with child parachains.
3493-
ChildParachainRouter<Runtime, XcmPallet, PriceForChildParachainDelivery>,
3494-
)>;
3491+
pub type PriceForChildParachainDelivery =
3492+
ExponentialPrice<FeeAssetId, BaseDeliveryFee, TransactionByteFee, Dmp>;
34953493
```
34963494

34973495
For more details about XCM transport protocols, see the [XCM Channels](/develop/interoperability/xcm-channels/){target=\_blank} page.

llms-files/llms-infrastructure.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2786,10 +2786,8 @@ The [`XcmRouter`](https://paritytech.github.io/polkadot-sdk/master/pallet_xcm/pa
27862786
For instance, the Kusama network employs the [`ChildParachainRouter`](https://paritytech.github.io/polkadot-sdk/master/polkadot_runtime_common/xcm_sender/struct.ChildParachainRouter.html){target=\_blank}, which restricts routing to [Downward Message Passing (DMP)](https://wiki.polkadot.com/learn/learn-xcm-transport/#dmp-downward-message-passing){target=\_blank} from the relay chain to parachains, ensuring secure and controlled communication.
27872787

27882788
```rust
2789-
pub type XcmRouter = WithUniqueTopic<(
2790-
// Only one router so far - use DMP to communicate with child parachains.
2791-
ChildParachainRouter<Runtime, XcmPallet, PriceForChildParachainDelivery>,
2792-
)>;
2789+
pub type PriceForChildParachainDelivery =
2790+
ExponentialPrice<FeeAssetId, BaseDeliveryFee, TransactionByteFee, Dmp>;
27932791
```
27942792

27952793
For more details about XCM transport protocols, see the [XCM Channels](/develop/interoperability/xcm-channels/){target=\_blank} page.

llms-files/llms-networks.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -716,10 +716,8 @@ The [`XcmRouter`](https://paritytech.github.io/polkadot-sdk/master/pallet_xcm/pa
716716
For instance, the Kusama network employs the [`ChildParachainRouter`](https://paritytech.github.io/polkadot-sdk/master/polkadot_runtime_common/xcm_sender/struct.ChildParachainRouter.html){target=\_blank}, which restricts routing to [Downward Message Passing (DMP)](https://wiki.polkadot.com/learn/learn-xcm-transport/#dmp-downward-message-passing){target=\_blank} from the relay chain to parachains, ensuring secure and controlled communication.
717717

718718
```rust
719-
pub type XcmRouter = WithUniqueTopic<(
720-
// Only one router so far - use DMP to communicate with child parachains.
721-
ChildParachainRouter<Runtime, XcmPallet, PriceForChildParachainDelivery>,
722-
)>;
719+
pub type PriceForChildParachainDelivery =
720+
ExponentialPrice<FeeAssetId, BaseDeliveryFee, TransactionByteFee, Dmp>;
723721
```
724722

725723
For more details about XCM transport protocols, see the [XCM Channels](/develop/interoperability/xcm-channels/){target=\_blank} page.

llms-files/llms-parachains.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9907,10 +9907,8 @@ The [`XcmRouter`](https://paritytech.github.io/polkadot-sdk/master/pallet_xcm/pa
99079907
For instance, the Kusama network employs the [`ChildParachainRouter`](https://paritytech.github.io/polkadot-sdk/master/polkadot_runtime_common/xcm_sender/struct.ChildParachainRouter.html){target=\_blank}, which restricts routing to [Downward Message Passing (DMP)](https://wiki.polkadot.com/learn/learn-xcm-transport/#dmp-downward-message-passing){target=\_blank} from the relay chain to parachains, ensuring secure and controlled communication.
99089908

99099909
```rust
9910-
pub type XcmRouter = WithUniqueTopic<(
9911-
// Only one router so far - use DMP to communicate with child parachains.
9912-
ChildParachainRouter<Runtime, XcmPallet, PriceForChildParachainDelivery>,
9913-
)>;
9910+
pub type PriceForChildParachainDelivery =
9911+
ExponentialPrice<FeeAssetId, BaseDeliveryFee, TransactionByteFee, Dmp>;
99149912
```
99159913

99169914
For more details about XCM transport protocols, see the [XCM Channels](/develop/interoperability/xcm-channels/){target=\_blank} page.

llms-files/llms-polkadot-protocol.txt

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -268,10 +268,8 @@ The [`XcmRouter`](https://paritytech.github.io/polkadot-sdk/master/pallet_xcm/pa
268268
For instance, the Kusama network employs the [`ChildParachainRouter`](https://paritytech.github.io/polkadot-sdk/master/polkadot_runtime_common/xcm_sender/struct.ChildParachainRouter.html){target=\_blank}, which restricts routing to [Downward Message Passing (DMP)](https://wiki.polkadot.com/learn/learn-xcm-transport/#dmp-downward-message-passing){target=\_blank} from the relay chain to parachains, ensuring secure and controlled communication.
269269

270270
```rust
271-
pub type XcmRouter = WithUniqueTopic<(
272-
// Only one router so far - use DMP to communicate with child parachains.
273-
ChildParachainRouter<Runtime, XcmPallet, PriceForChildParachainDelivery>,
274-
)>;
271+
pub type PriceForChildParachainDelivery =
272+
ExponentialPrice<FeeAssetId, BaseDeliveryFee, TransactionByteFee, Dmp>;
275273
```
276274

277275
For more details about XCM transport protocols, see the [XCM Channels](/develop/interoperability/xcm-channels/){target=\_blank} page.
@@ -6944,10 +6942,8 @@ The [`XcmRouter`](https://paritytech.github.io/polkadot-sdk/master/pallet_xcm/pa
69446942
For instance, the Kusama network employs the [`ChildParachainRouter`](https://paritytech.github.io/polkadot-sdk/master/polkadot_runtime_common/xcm_sender/struct.ChildParachainRouter.html){target=\_blank}, which restricts routing to [Downward Message Passing (DMP)](https://wiki.polkadot.com/learn/learn-xcm-transport/#dmp-downward-message-passing){target=\_blank} from the relay chain to parachains, ensuring secure and controlled communication.
69456943

69466944
```rust
6947-
pub type XcmRouter = WithUniqueTopic<(
6948-
// Only one router so far - use DMP to communicate with child parachains.
6949-
ChildParachainRouter<Runtime, XcmPallet, PriceForChildParachainDelivery>,
6950-
)>;
6945+
pub type PriceForChildParachainDelivery =
6946+
ExponentialPrice<FeeAssetId, BaseDeliveryFee, TransactionByteFee, Dmp>;
69516947
```
69526948

69536949
For more details about XCM transport protocols, see the [XCM Channels](/develop/interoperability/xcm-channels/){target=\_blank} page.

llms-files/llms-smart-contracts.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5187,10 +5187,8 @@ The [`XcmRouter`](https://paritytech.github.io/polkadot-sdk/master/pallet_xcm/pa
51875187
For instance, the Kusama network employs the [`ChildParachainRouter`](https://paritytech.github.io/polkadot-sdk/master/polkadot_runtime_common/xcm_sender/struct.ChildParachainRouter.html){target=\_blank}, which restricts routing to [Downward Message Passing (DMP)](https://wiki.polkadot.com/learn/learn-xcm-transport/#dmp-downward-message-passing){target=\_blank} from the relay chain to parachains, ensuring secure and controlled communication.
51885188

51895189
```rust
5190-
pub type XcmRouter = WithUniqueTopic<(
5191-
// Only one router so far - use DMP to communicate with child parachains.
5192-
ChildParachainRouter<Runtime, XcmPallet, PriceForChildParachainDelivery>,
5193-
)>;
5190+
pub type PriceForChildParachainDelivery =
5191+
ExponentialPrice<FeeAssetId, BaseDeliveryFee, TransactionByteFee, Dmp>;
51945192
```
51955193

51965194
For more details about XCM transport protocols, see the [XCM Channels](/develop/interoperability/xcm-channels/){target=\_blank} page.

llms-files/llms-tooling.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15398,10 +15398,8 @@ The [`XcmRouter`](https://paritytech.github.io/polkadot-sdk/master/pallet_xcm/pa
1539815398
For instance, the Kusama network employs the [`ChildParachainRouter`](https://paritytech.github.io/polkadot-sdk/master/polkadot_runtime_common/xcm_sender/struct.ChildParachainRouter.html){target=\_blank}, which restricts routing to [Downward Message Passing (DMP)](https://wiki.polkadot.com/learn/learn-xcm-transport/#dmp-downward-message-passing){target=\_blank} from the relay chain to parachains, ensuring secure and controlled communication.
1539915399

1540015400
```rust
15401-
pub type XcmRouter = WithUniqueTopic<(
15402-
// Only one router so far - use DMP to communicate with child parachains.
15403-
ChildParachainRouter<Runtime, XcmPallet, PriceForChildParachainDelivery>,
15404-
)>;
15401+
pub type PriceForChildParachainDelivery =
15402+
ExponentialPrice<FeeAssetId, BaseDeliveryFee, TransactionByteFee, Dmp>;
1540515403
```
1540615404

1540715405
For more details about XCM transport protocols, see the [XCM Channels](/develop/interoperability/xcm-channels/){target=\_blank} page.

llms-full.txt

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -631,10 +631,8 @@ The [`XcmRouter`](https://paritytech.github.io/polkadot-sdk/master/pallet_xcm/pa
631631
For instance, the Kusama network employs the [`ChildParachainRouter`](https://paritytech.github.io/polkadot-sdk/master/polkadot_runtime_common/xcm_sender/struct.ChildParachainRouter.html){target=\_blank}, which restricts routing to [Downward Message Passing (DMP)](https://wiki.polkadot.com/learn/learn-xcm-transport/#dmp-downward-message-passing){target=\_blank} from the relay chain to parachains, ensuring secure and controlled communication.
632632

633633
```rust
634-
pub type XcmRouter = WithUniqueTopic<(
635-
// Only one router so far - use DMP to communicate with child parachains.
636-
ChildParachainRouter<Runtime, XcmPallet, PriceForChildParachainDelivery>,
637-
)>;
634+
pub type PriceForChildParachainDelivery =
635+
ExponentialPrice<FeeAssetId, BaseDeliveryFee, TransactionByteFee, Dmp>;
638636
```
639637

640638
For more details about XCM transport protocols, see the [XCM Channels](/develop/interoperability/xcm-channels/){target=\_blank} page.
@@ -17262,7 +17260,7 @@ This guide walks you through transferring tokens between two parachains using th
1726217260

1726317261
For development purposes, this guide will use the [Polkadot TestNet](/develop/networks/#paseo){target=\_blank}, so the transferred token will be PAS.
1726417262

17265-
In this guide, you’ll learn how to:
17263+
In this guide, you will:
1726617264

1726717265
- Build an XCM transfer transaction using ParaSpell XCM SDK.
1726817266
- Perform a dry run to validate the transfer.
@@ -17272,10 +17270,12 @@ In this guide, you’ll learn how to:
1727217270

1727317271
### Prerequisites
1727417272

17275-
- Knowledge of the [fundamentals of Polkadot](/polkadot-protocol/parachain-basics/){target=\_blank}
17276-
- Basic understanding of [XCM](/develop/interoperability/intro-to-xcm/){target=\_blank}
17277-
- Basic familiarity with JavaScript/TypeScript
17278-
- Install [bun](https://bun.com/docs/installation){target=\_blank}, a JavaScript/TypeScript package manager
17273+
Before you begin, ensure you have the following:
17274+
17275+
- Knowledge of the [fundamentals of Polkadot](/polkadot-protocol/parachain-basics/){target=\_blank}.
17276+
- Basic understanding of [XCM](/develop/interoperability/intro-to-xcm/){target=\_blank}.
17277+
- Basic familiarity with JavaScript or TypeScript.
17278+
- Installed [bun](https://bun.com/docs/installation){target=\_blank}, a JavaScript and TypeScript package manager.
1727917279

1728017280
## Initialize Your Project
1728117281

@@ -17399,13 +17399,13 @@ async function dryRunTransfer() {
1739917399

1740017400
dryRunTransfer();
1740117401
```
17402-
Go ahead and run the script.
17402+
Run the script using the following command:
1740317403

1740417404
```bash
1740517405
bun run index.ts
1740617406
```
1740717407

17408-
The result of the dry run will be similar to this:
17408+
The result of the dry run will look similar to the following example output:
1740917409

1741017410
<div id="termynal" data-termynal>
1741117411
<span data-ty="input"><span class="file-path"></span>bun run index.ts</span>
@@ -17559,13 +17559,13 @@ async function verifyED() {
1755917559

1756017560
verifyED();
1756117561
```
17562-
Comment out the `dryRunTransfer()` and execute the `verifyED()` by running:
17562+
Comment out the `dryRunTransfer()` function so that it is not executed again. Then, execute the `verifyED()` by running the following command:
1756317563

1756417564
```bash
1756517565
bun run index.ts
1756617566
```
1756717567

17568-
After that, you will get output confirming the ED:
17568+
After that, you will get output confirming the ED which will look similar to the following:
1756917569

1757017570
<div id="termynal" data-termynal>
1757117571
<span data-ty="input"><span class="file-path"></span>bun run index.ts</span>
@@ -17598,13 +17598,13 @@ async function XcmTransferInfo() {
1759817598
XcmTransferInfo();
1759917599
```
1760017600

17601-
Comment out the `verifyED()` and execute the `XcmTransferInfo()` by running:
17601+
Comment out the `verifyED()` function so it doesn't execute again. Then, execute the `XcmTransferInfo()` function by running the following command:
1760217602

1760317603
```bash
1760417604
bun run index.ts
1760517605
```
1760617606

17607-
You should be able to see all the information for your transfer:
17607+
You will see all the information for your transfer similar to the following example:
1760817608

1760917609
<div id="termynal" data-termynal>
1761017610
<span data-ty="input"><span class="file-path"></span>bun run index.ts</span>
@@ -17658,19 +17658,17 @@ You should be able to see all the information for your transfer:
1765817658

1765917659
Now that you have:
1766017660

17661-
- Completed a successful dry run of the transaction
17662-
- Verified the existential deposit on the recipient account
17663-
- Obtained an estimate of the associated XCM fees
17664-
17665-
Now you can execute the transfer function by adding the following statement:
17661+
- Completed a successful dry run of the transaction.
17662+
- Verified the existential deposit on the recipient account.
17663+
- Obtained an estimate of the associated XCM fees.
1766617664

17667-
Add the following code:
17665+
You can execute the transfer function by adding the following function call:
1766817666

1766917667
```typescript title="index.ts"
1767017668
transfer();
1767117669
```
1767217670

17673-
Comment out the `XcmTransferInfo()` and execute the transfer:
17671+
Comment out the `XcmTransferInfo()` function so it doesn't execute again. Then, execute the transfer by running the following command:
1767417672

1767517673
```bash
1767617674
bun run index.ts
@@ -17739,7 +17737,7 @@ Your `transfer` function will submit the transaction, and you will get the follo
1773917737
}</span>
1774017738
</div>
1774117739

17742-
Once the transaction is successfully included in a block, you will see the recipient's account balance updated, and you will receive output similar to the one below.
17740+
Once the transaction is successfully included in a block, you will see the recipient's account balance updated, and you will receive output similar to the following.
1774317741

1774417742
???- code "Successful Transaction Submission"
1774517743
This output will be returned once the transaction has been successfully included in a block.

0 commit comments

Comments
 (0)