Skip to content

Commit cdd7fd3

Browse files
committed
Revise for AH to People Chain
1 parent 636e035 commit cdd7fd3

File tree

10 files changed

+839
-48
lines changed

10 files changed

+839
-48
lines changed

.snippets/code/develop/toolkit/interoperability/paraspell/dry-run-output.html

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,23 @@
66
origin: {
77
success: true,
88
fee: 17965000n,
9+
currency: 'PAS',
10+
asset: {
11+
symbol: 'PAS',
12+
isNative: true,
13+
decimals: 10,
14+
existentialDeposit: '100000000',
15+
location: { parents: 1, interior: { Here: null } },
16+
isFeeAsset: true,
17+
amount: 100000000000n
18+
},
919
weight: undefined,
1020
forwardedXcms: [
1121
{
1222
type: 'V3',
1323
value: {
1424
parents: 1,
15-
interior: { type: 'X1', value: { type: 'Parachain', value: 1002 } }
25+
interior: { type: 'X1', value: { type: 'Parachain', value: 1004 } }
1626
}
1727
},
1828
[
@@ -93,18 +103,25 @@
93103
}
94104
]
95105
],
96-
destParaId: 1002,
97-
currency: 'PAS'
106+
destParaId: 1004
98107
},
99108
assetHub: undefined,
100109
bridgeHub: undefined,
101110
destination: {
102111
success: true,
103-
fee: 17965000n,
104-
weight: { refTime: 164770000n, proofSize: 3593n },
112+
fee: 817598n,
113+
currency: 'PAS',
114+
asset: {
115+
symbol: 'PAS',
116+
isNative: true,
117+
decimals: 10,
118+
existentialDeposit: '1000000000',
119+
location: { parents: 1, interior: { Here: null } },
120+
isFeeAsset: true
121+
},
122+
weight: { refTime: 176858000n, proofSize: 0n },
105123
forwardedXcms: [],
106-
destParaId: undefined,
107-
currency: 'PAS'
124+
destParaId: undefined
108125
},
109126
hops: []
110127
}</span>
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<div id="termynal" data-termynal>
22
<span data-ty="input"><span class="file-path"></span>bun run index.ts</span>
3-
<span data-ty>...</span>
43
<span data-ty>ED verification successful.</span>
54
</div>

.snippets/code/develop/toolkit/interoperability/paraspell/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ async function teleport() {
3131

3232
const tx = await Builder()
3333
.from('AssetHubPaseo')
34-
.to('BridgeHubPaseo')
34+
.to('PeoplePaseo')
3535
.currency({
3636
symbol: 'PAS',
3737
amount: 10n * PAS_UNITS, // 10 PAS
@@ -53,7 +53,7 @@ async function dryRunTeleport() {
5353

5454
const tx = await Builder()
5555
.from('AssetHubPaseo')
56-
.to('BridgeHubPaseo')
56+
.to('PeoplePaseo')
5757
.currency({
5858
symbol: 'PAS',
5959
amount: 10n * PAS_UNITS,
@@ -70,7 +70,7 @@ dryRunTeleport();
7070
async function verifyED() {
7171
const isValid = await Builder()
7272
.from('AssetHubPaseo')
73-
.to('BridgeHubPaseo')
73+
.to('PeoplePaseo')
7474
.currency({
7575
symbol: 'PAS',
7676
amount: 10n * PAS_UNITS,
@@ -87,7 +87,7 @@ verifyED();
8787
async function XcmTransferInfo() {
8888
const info = await Builder()
8989
.from('AssetHubPaseo')
90-
.to('BridgeHubPaseo')
90+
.to('PeoplePaseo')
9191
.currency({
9292
symbol: 'PAS',
9393
amount: 10n * PAS_UNITS,

.snippets/code/develop/toolkit/interoperability/paraspell/teleport-output.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
type: 'V5',
1414
value: {
1515
parents: 1,
16-
interior: { type: 'X1', value: { type: 'Parachain', value: 1002 } }
16+
interior: { type: 'X1', value: { type: 'Parachain', value: 1004 } }
1717
}
1818
},
1919
beneficiary: {
Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,49 @@
11
<div id="termynal" data-termynal>
22
<span data-ty="input"><span class="file-path"></span>bun run index.ts</span>
3-
<span data-ty>...</span>
43
<span data-ty>Transfer Info: {
54
chain: {
6-
origin: 'AssetHubPaseo',
7-
destination: 'BridgeHubPaseo',
8-
ecosystem: 'PAS'
5+
origin: "AssetHubPaseo",
6+
destination: "PeoplePaseo",
7+
ecosystem: "PAS",
98
},
109
origin: {
1110
selectedCurrency: {
1211
sufficient: true,
13-
balance: 9899002813408n,
14-
balanceAfter: 9799002813408n,
15-
currencySymbol: 'PAS',
16-
existentialDeposit: 100000000n
12+
balance: 9799197260420n,
13+
balanceAfter: 9699197260420n,
14+
currencySymbol: "PAS",
15+
asset: [Object ...],
16+
existentialDeposit: 100000000n,
1717
},
1818
xcmFee: {
1919
sufficient: true,
2020
fee: 17965000n,
21-
balance: 9899002813408n,
22-
balanceAfter: 9898984848408n,
23-
currencySymbol: 'PAS'
24-
}
21+
balance: 9799197260420n,
22+
balanceAfter: 9799179295420n,
23+
currencySymbol: "PAS",
24+
asset: [Object ...],
25+
},
2526
},
2627
assetHub: undefined,
2728
bridgeHub: undefined,
2829
hops: [],
2930
destination: {
3031
receivedCurrency: {
3132
sufficient: true,
32-
receivedAmount: 99982035000n,
33-
balance: 0n,
34-
balanceAfter: 99982035000n,
35-
currencySymbol: 'PAS',
36-
existentialDeposit: 1000000000n
33+
receivedAmount: 99999182402n,
34+
balance: 199998364804n,
35+
balanceAfter: 299997547206n,
36+
currencySymbol: "PAS",
37+
asset: [Object ...],
38+
existentialDeposit: 1000000000n,
3739
},
3840
xcmFee: {
39-
fee: 17965000n,
40-
balance: 0n,
41-
balanceAfter: 99982035000n,
42-
currencySymbol: 'PAS'
43-
}
44-
}
41+
fee: 817598n,
42+
balance: 199998364804n,
43+
balanceAfter: 299997547206n,
44+
currencySymbol: "PAS",
45+
asset: [Object ...],
46+
},
47+
},
4548
}</span>
4649
</div>

develop/toolkit/interoperability/paraspell-xcm-sdk/.nav.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ title: ParaSpell XCM SDK
22
hide: false
33
nav:
44
- index.md
5+
- 'Teleport Tokens from Asset Hub to People Chain': teleport-from-asset-hub-to-people-chain.md

develop/toolkit/interoperability/paraspell-xcm-sdk/index.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,8 @@ The [ParaSpell XCM SDK](https://paraspell.github.io/docs/sdk/getting-started.htm
2727

2828
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.
2929

30-
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+
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.
31+
32+
## In This Section
33+
34+
:::INSERT_IN_THIS_SECTION:::

develop/toolkit/interoperability/paraspell-xcm-sdk/teleport-from-asset-hub-to-bridge-hub.md renamed to develop/toolkit/interoperability/paraspell-xcm-sdk/teleport-from-asset-hub-to-people-chain.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
2-
title: Teleport Tokens from Asset Hub to Bridge Hub
3-
description: A step-by-step guide to building, verifying, and executing a teleport from Asset Hub to Bridge Hub using the ParaSpell XCM SDK.
2+
title: Teleport Tokens from Asset Hub to People Chain
3+
description: A step-by-step guide to building, verifying, and executing a teleport from Asset Hub to People Chain using the ParaSpell XCM SDK.
44
---
55

6-
# Teleport Tokens from Asset Hub to Bridge Hub
6+
# Teleport Tokens from Asset Hub to People Chain
77

88
## Introduction
99

10-
This guide will walk you through the process of teleporting tokens from the Asset Hub to the Bridge Hub system parachain using the [ParaSpell XCM SDK](https://paraspell.github.io/docs/){target=\_blank}.
10+
This guide will walk you through the process of teleporting tokens from Asset Hub to the [People Chain](/polkadot-protocol/architecture/system-chains/people/){target=\_blank} using the [ParaSpell XCM SDK](https://paraspell.github.io/docs/){target=\_blank}.
1111

12-
For development purposes, this guide will use the [Paseo TestNet](/develop/networks/#paseo){target=\_blank}, so the teleport will be from Paseo's Asset Hub to Paseo's Bridge Hub.
12+
For development purposes, this guide will use the [Paseo TestNet](/develop/networks/#paseo){target=\_blank}, so the teleport will be from Paseo's Asset Hub to Paseo's People Chain.
1313

1414
You’ll learn how to:
1515

@@ -62,7 +62,7 @@ Be sure to fund this account with some PAS tokens on Passeo's Asset Hub using th
6262

6363
The next step is to build the transaction that you intend to execute.
6464

65-
In this example, you will teleport 10 PAS tokens from Paseo's Asset Hub to Paseo's Bridge Hub system parachain.
65+
In this example, you will teleport 10 PAS tokens from Paseo's Asset Hub to Paseo's People Chain system parachain.
6666

6767
Add the ParaSpell transaction code to your `index.ts` file:
6868

@@ -159,7 +159,7 @@ Once the transaction is successfully included in a block, you will see the recip
159159

160160
--8<-- 'code/develop/toolkit/interoperability/paraspell/teleport-callback-output.html'
161161

162-
After executing the teleport, check the account balance on [Polkadot.js Apps](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fsys.turboflakes.io%2Fasset-hub-paseo){target=\_blank} for [Paseo's Asset Hub](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fsys.turboflakes.io%2Fasset-hub-paseo#/accounts){target=\_blank} and [Paseo's Bridge Hub](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fbridge-hub-paseo.dotters.network#/accounts){target=\_blank}.
162+
After executing the teleport, check the account balance on [Polkadot.js Apps](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fsys.turboflakes.io%2Fasset-hub-paseo){target=\_blank} for [Paseo's Asset Hub](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fsys.turboflakes.io%2Fasset-hub-paseo#/accounts){target=\_blank} and [Paseo's People Chain](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fsys.ibp.network%2Fpeople-paseo#/accounts){target=\_blank}.
163163

164164
You should see:
165165

@@ -170,9 +170,6 @@ You have now successfully created and sent a cross-chain transfer using the Para
170170

171171
## Next Steps
172172

173-
- Explore other transfers:
174-
- Try a parachain-to-parachain transfer or a transfer from a parachain back to the Relay chain.
175-
176173
- 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.
177174

178175
- Learn about XCM: Understand the underlying protocol by visiting the [Introduction to XCM page](/develop/interoperability/intro-to-xcm/) in the Polkadot Docs.

0 commit comments

Comments
 (0)