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
+20-14Lines changed: 20 additions & 14 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
6
# Transfer Tokens 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.
0 commit comments