You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .snippets/code/chain-interactions/send-transactions/interoperability/transfer-assets-parachains/dry-run-output.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
<divid="termynal" data-termynal>
2
-
<spandata-ty="input"><spanclass="file-path"></span>bun run index.ts</span>
Copy file name to clipboardExpand all lines: .snippets/code/chain-interactions/send-transactions/interoperability/transfer-assets-parachains/transfer-info-output.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
<divid="termynal" data-termynal>
2
-
<spandata-ty="input"><spanclass="file-path"></span>bun run index.ts</span>
Copy file name to clipboardExpand all lines: .snippets/code/chain-interactions/send-transactions/interoperability/transfer-assets-parachains/transfer-output.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
<divid="termynal" data-termynal>
2
-
<spandata-ty="input"><spanclass="file-path"></span>bun run index.ts</span>
Copy file name to clipboardExpand all lines: chain-interactions/send-transactions/interoperability/transfer-assets-parachains.md
+21-15Lines changed: 21 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,52 +1,58 @@
1
1
---
2
-
title: Transfer Tokens Between Parachains
2
+
title: Transfer Assets Between Parachains
3
3
description: A step-by-step guide to using the ParaSpell XCM SDK to build, verify, and execute a transfer from one Parachain to another.
4
4
---
5
5
6
-
# Transfer Tokens Between Parachains
6
+
# Transfer Assets Between Parachains
7
7
8
8
## Introduction
9
9
10
-
This guide walks you through transferring tokens between two parachains using the [ParaSpell XCM SDK](https://paraspell.github.io/docs/){target=\_blank}. This example utilizes [Asset Hub](/polkadot-protocol/architecture/system-chains/asset-hub/){target=\_blank} and the [People Chain](/polkadot-protocol/architecture/system-chains/people/){target=\_blank}. However, the same approach can be applied to transfers between other parachains.
10
+
This guide walks you through transferring tokens between two parachains using the [ParaSpell XCM SDK](/reference/tools/paraspell/){target=\_blank}. This example utilizes [Asset Hub](/polkadot-protocol/architecture/system-chains/asset-hub/){target=\_blank} and the [People Chain](/polkadot-protocol/architecture/system-chains/people/){target=\_blank}. However, the same approach can be applied to transfers between other parachains.
11
11
12
12
For development purposes, this guide will use the [Polkadot TestNet](/develop/networks/#paseo){target=\_blank}, so the transferred token will be PAS.
13
13
14
14
In this guide, you will:
15
15
16
16
- Build an XCM transfer transaction using ParaSpell XCM SDK.
17
17
- Perform a dry run to validate the transfer.
18
-
- Verify the [Existential Deposit (ED)](/polkadot-protocol/glossary/#existential-deposit){target=\_blank} requirement on the destination chain.
18
+
- Verify the [Existential Deposit (ED)](/reference/glossary/#existential-deposit){target=\_blank} requirement on the destination chain.
19
19
- Retrieve information regarding the transfer, along with fee estimates.
20
20
- Submit the transaction.
21
21
22
22
### Prerequisites
23
23
24
24
Before you begin, ensure you have the following:
25
25
26
-
- Knowledge of the [fundamentals of Polkadot](/polkadot-protocol/parachain-basics/){target=\_blank}.
27
-
- Basic understanding of [XCM](/develop/interoperability/intro-to-xcm/){target=\_blank}.
26
+
- Knowledge of the [fundamentals of Polkadot](/parachains/get-started/){target=\_blank}.
27
+
- Basic understanding of [XCM](/parachains/interoperability/get-started/){target=\_blank}.
28
28
- Basic familiarity with JavaScript or TypeScript.
29
-
- Installed [bun](https://bun.com/docs/installation){target=\_blank}, a JavaScript and TypeScript package manager.
29
+
- Installed [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm){target=\_blank}, a JavaScript and TypeScript package manager.
@@ -88,7 +94,7 @@ Add the following dry run code to your `index.ts` script:
88
94
Run the script using the following command:
89
95
90
96
```bash
91
-
bun run index.ts
97
+
npx tsx index.ts
92
98
```
93
99
94
100
The result of the dry run will look similar to the following example output:
@@ -105,7 +111,7 @@ Check if the recipient account meets the [Existential Deposit (ED)](/polkadot-pr
105
111
Comment out the `dryRunTransfer()` function so that it is not executed again. Then, execute the `verifyED()` by running the following command:
106
112
107
113
```bash
108
-
bun run index.ts
114
+
npx tsx index.ts
109
115
```
110
116
111
117
After that, you will get output confirming the ED which will look similar to the following:
@@ -125,7 +131,7 @@ ParaSpell has a helpful function for this: [`getTransferInfo()`](https://paraspe
125
131
Comment out the `verifyED()` function so it doesn't execute again. Then, execute the `XcmTransferInfo()` function by running the following command:
126
132
127
133
```bash
128
-
bun run index.ts
134
+
npx tsx index.ts
129
135
```
130
136
131
137
You will see all the information for your transfer similar to the following example:
@@ -147,7 +153,7 @@ You can execute the transfer function by adding the following function call:
147
153
Comment out the `XcmTransferInfo()` function so it doesn't execute again. Then, execute the transfer by running the following command:
148
154
149
155
```bash
150
-
bun run index.ts
156
+
npx tsx index.ts
151
157
```
152
158
153
159
Your `transfer` function will submit the transaction, and you will get the following output:
@@ -180,4 +186,4 @@ You have now successfully created and sent a cross-chain transfer using the Para
180
186
181
187
- Read the Docs: Dive deeper into the features of the [ParaSpell XCM SDK](https://paraspell.github.io/docs/sdk/getting-started.html){target=\_blank} documentation.
182
188
183
-
- Learn about XCM: Understand the underlying protocol by visiting the [Introduction to XCM page](/develop/interoperability/intro-to-xcm/) in the Polkadot Docs.
189
+
- Learn about XCM: Understand the underlying protocol by visiting the [Introduction to XCM page](/parachains/interoperability/get-started/) in the Polkadot Docs.
Copy file name to clipboardExpand all lines: reference/polkadot-hub/assets-and-smart-contracts.md
-11Lines changed: 0 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -149,17 +149,6 @@ These public instances are primarily for ad-hoc testing and quick checks.
149
149
150
150
`TxWrapper` provides the flexibility needed to integrate asset operations into custom applications while maintaining the security and efficiency of Polkadot's transaction model.
151
151
152
-
### ParaSpell
153
-
154
-
[ParaSpell](https://paraspell.xyz/){target=\_blank} is a collection of open-source XCM tools designed to streamline cross-chain asset transfers and interactions within the Polkadot and Kusama ecosystems. It equips developers with an intuitive interface to manage and optimize XCM-based functionalities. Some key points included by ParaSpell are:
155
-
156
-
-**[XCM SDK](https://paraspell.xyz/#xcm-sdk){target=\_blank}**: Provides a unified layer to incorporate XCM into decentralized applications, simplifying complex cross-chain interactions.
157
-
-**[XCM API](https://paraspell.xyz/#xcm-api){target=\_blank}**: Offers an efficient, package-free approach to integrating XCM functionality while offloading heavy computing tasks, minimizing costs and improving application performance.
158
-
-**[XCM router](https://paraspell.xyz/#xcm-router){target=\_blank}**: Enables cross-chain asset swaps in a single command, allowing developers to send one asset type (such as DOT on Polkadot) and receive a different asset on another chain (like ASTR on Astar).
159
-
-**[XCM analyser](https://paraspell.xyz/#xcm-analyser){target=\_blank}**: Decodes and translates complex XCM multilocation data into readable information, supporting easier troubleshooting and debugging.
160
-
-**[XCM visualizator](https://paraspell.xyz/#xcm-visualizator){target=\_blank}**: A tool designed to give developers a clear, interactive view of XCM activity across the Polkadot ecosystem, providing insights into cross-chain communication flow.
161
-
162
-
ParaSpell's tools make it simple for developers to build, test, and deploy cross-chain solutions without needing extensive knowledge of the XCM protocol. With features like message composition, decoding, and practical utility functions for parachain interactions, ParaSpell is especially useful for debugging and optimizing cross-chain communications.
Copy file name to clipboardExpand all lines: reference/tools/paraspell.md
+45-6Lines changed: 45 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,12 +13,12 @@ The primary goal of ParaSpell is to abstract away the complexities of the XCM pr
13
13
14
14
The ParaSpell suite includes:
15
15
16
-
-**[XCM SDK](https://paraspell.github.io/docs/sdk/getting-started.html){target=\_blank}**: A powerful library for integrating XCM interoperability into dApps.
17
-
-**[XCM API](https://paraspell.github.io/docs/api/g-started.html){target=\_blank}**: A lightweight alternative to the SDK for package-less integration.
18
-
-**[XCM Router](https://paraspell.github.io/docs/router/getting-strtd.html){target=\_blank}**: A tool for enabling cross-chain swaps of different assets in a single transaction.
19
-
-**[XCM Analyser](https://paraspell.github.io/docs/analyser/getng-strtd.html){target=\_blank}**: A utility for decoding and translating complex XCM data into a human-readable format.
20
-
-**[XCM Visualizator](https://paraspell.github.io/docs/visualizer/getting-start.html){target=\_blank}**: A tool for visualizing XCM activity across the Polkadot ecosystem.
21
-
-**[XCM Playground](https://paraspell.github.io/docs/tools/playground.html){target=\_blank}**: A tool for testing different XCM scenarios.
16
+
-**[XCM SDK](https://paraspell.xyz/#xcm-sdk){target=\_blank}**: Provides a unified layer to incorporate XCM into decentralized applications, simplifying complex cross-chain interactions.
17
+
-**[XCM API](https://paraspell.xyz/#xcm-api){target=\_blank}**: Offers an efficient, package-free approach to integrating XCM functionality while offloading heavy computing tasks, minimizing costs and improving application performance.
18
+
-**[XCM Router](https://paraspell.xyz/#xcm-router){target=\_blank}**: Enables cross-chain asset swaps in a single command, allowing developers to send one asset type (such as DOT on Polkadot) and receive a different asset on another chain (like ASTR on Astar).
19
+
-**[XCM Analyser](https://paraspell.xyz/#xcm-analyser){target=\_blank}**: Decodes and translates complex XCM multilocation data into readable information, supporting easier troubleshooting and debugging.
20
+
-**[XCM Visualizator](https://paraspell.xyz/#xcm-visualizator){target=\_blank}**: A tool designed to give developers a clear, interactive view of XCM activity across the Polkadot ecosystem, providing insights into cross-chain communication flow.
21
+
-**[XCM Playground](https://paraspell.xyz/#try-it){target=\_blank}**: An interactive playground for testing different XCM scenarios.
22
22
23
23
### ParaSpell XCM SDK
24
24
@@ -27,3 +27,42 @@ The [ParaSpell XCM SDK](https://paraspell.github.io/docs/sdk/getting-started.htm
27
27
The SDK simplifies the process of creating and sending XCM messages by providing a user-friendly builder pattern. This allows developers to construct complex XCM calls with just a few lines of code, reducing the likelihood of errors and ensuring that messages are constructed correctly.
28
28
29
29
By using the ParaSpell XCM SDK, developers can significantly accelerate their development workflow and build powerful, interoperable dApps that take full advantage of the Polkadot network's cross-chain capabilities.
30
+
31
+
## Install ParaSpell
32
+
33
+
If you want to use ParaSpell in your project you can add it as a dependency with the following command:
Copy file name to clipboardExpand all lines: reference/tools/xcm-tools.md
+1-9Lines changed: 1 addition & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,15 +36,7 @@ For a full overview of each script, visit the [scripts](https://github.com/Moons
36
36
37
37
### ParaSpell
38
38
39
-
[ParaSpell](https://paraspell.xyz/){target=\_blank} is a collection of open-source XCM tools designed to streamline cross-chain asset transfers and interactions within the Polkadot and Kusama ecosystems. It equips developers with an intuitive interface to manage and optimize XCM-based functionalities. Some key points included by ParaSpell are:
40
-
41
-
-**[XCM SDK](https://paraspell.xyz/#xcm-sdk){target=\_blank}**: Provides a unified layer to incorporate XCM into decentralized applications, simplifying complex cross-chain interactions.
42
-
-**[XCM API](https://paraspell.xyz/#xcm-api){target=\_blank}**: Offers an efficient, package-free approach to integrating XCM functionality while offloading heavy computing tasks, minimizing costs and improving application performance.
43
-
-**[XCM router](https://paraspell.xyz/#xcm-router){target=\_blank}**: Enables cross-chain asset swaps in a single command, allowing developers to send one asset type (such as DOT on Polkadot) and receive a different asset on another chain (like ASTR on Astar).
44
-
-**[XCM analyser](https://paraspell.xyz/#xcm-analyser){target=\_blank}**: Decodes and translates complex XCM multilocation data into readable information, supporting easier troubleshooting and debugging.
45
-
-**[XCM visualizator](https://paraspell.xyz/#xcm-visualizator){target=\_blank}**: A tool designed to give developers a clear, interactive view of XCM activity across the Polkadot ecosystem, providing insights into cross-chain communication flow.
46
-
47
-
ParaSpell's tools make it simple for developers to build, test, and deploy cross-chain solutions without needing extensive knowledge of the XCM protocol. With features like message composition, decoding, and practical utility functions for parachain interactions, ParaSpell is especially useful for debugging and optimizing cross-chain communications.
39
+
[ParaSpell](/reference/tools/paraspell/){target=\_blank} is a collection of open-source XCM tools that streamline cross-chain asset transfers and interactions across the Polkadot and Kusama ecosystems. It provides developers with an intuitive interface to build, test, and deploy interoperable dApps, featuring message composition, decoding, and practical utilities for parachain interactions that simplify debugging and cross-chain communication optimization.
0 commit comments