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: develop/interoperability/best-practices-for-teleporting-assets.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -312,7 +312,7 @@ You can find a full list of XCM errors in the [Polkadot Rust Docs](https://parit
312
312
313
313
### TestNet vs MainNet Configuration
314
314
315
-
Different networks within the Polkadot ecosystem have varying characteristics that affect teleportation implementation. TestNet environments like Paseo use different decimal precision (12 for PAS vs 10 for DOT), can have different existential deposit amounts, and require test-specific RPC endpoints. Always use appropriate configuration for the target environment and avoid mixing TestNet and MainNet configurations.
315
+
Different networks within the Polkadot ecosystem have varying characteristics that affect teleportation implementation. TestNet environments like [Paseo](/develop/networks/#paseo){target=\_blank} use different decimal precision (12 for PAS vs 10 for DOT), can have different existential deposit amounts, and require test-specific RPC endpoints. Always use appropriate configuration for the target environment and avoid mixing TestNet and MainNet configurations.
316
316
317
317
MainNet production environments require higher existential deposits, involve real economic value at risk, experience network congestion that affects fees, and have stricter validation requirements. Plan for these production realities by implementing robust error handling, fee buffers, and comprehensive monitoring systems.
Copy file name to clipboardExpand all lines: llms.txt
+35-35Lines changed: 35 additions & 35 deletions
Original file line number
Diff line number
Diff line change
@@ -837,7 +837,7 @@ You can find a full list of XCM errors in the [Polkadot Rust Docs](https://parit
837
837
838
838
### TestNet vs MainNet Configuration
839
839
840
-
Different networks within the Polkadot ecosystem have varying characteristics that affect teleportation implementation. TestNet environments like Paseo use different decimal precision (12 for PAS vs 10 for DOT), can have different existential deposit amounts, and require test-specific RPC endpoints. Always use appropriate configuration for the target environment and avoid mixing TestNet and MainNet configurations.
840
+
Different networks within the Polkadot ecosystem have varying characteristics that affect teleportation implementation. TestNet environments like [Paseo](/develop/networks/#paseo){target=\_blank} use different decimal precision (12 for PAS vs 10 for DOT), can have different existential deposit amounts, and require test-specific RPC endpoints. Always use appropriate configuration for the target environment and avoid mixing TestNet and MainNet configurations.
841
841
842
842
MainNet production environments require higher existential deposits, involve real economic value at risk, experience network congestion that affects fees, and have stricter validation requirements. Plan for these production realities by implementing robust error handling, fee buffers, and comprehensive monitoring systems.
843
843
@@ -22711,9 +22711,9 @@ The Foreign Assets pallet, an instance of the Assets pallet, manages these asset
22711
22711
22712
22712
## Sufficient and Non-Sufficient Assets
22713
22713
22714
-
[Sufficient assets](https://wiki.polkadot.network/learn/learn-assets/#sufficient-assets) are assets that have been voted upon and approved by governance that can suffice for account existence. This means that sufficient assets can be used for an account's [existential deposit](https://wiki.polkadot.network/learn/learn-accounts/#existential-deposit-and-reaping) on Asset Hub.
22714
+
[Sufficient assets](https://wiki.polkadot.network/learn/learn-assets/#sufficient-assets){target=\_blank} are assets that have been voted upon and approved by governance that can suffice for account existence. This means that sufficient assets can be used for an account's [existential deposit](https://wiki.polkadot.network/learn/learn-accounts/#existential-deposit-and-reaping){target=\_blank} on Asset Hub.
22715
22715
22716
-
Non-sufficient assets, on the other hand, **cannot** suffice on their own for account existence. Non-sufficient assets rely on a sufficient asset for the existential deposit. However, through the use of [asset conversion](https://wiki.polkadot.network/learn/learn-asset-conversion-assethub/), non-sufficient assets can be treated as first-class citizens on Asset Hub with similar functionality to sufficient assets, creating a seamless experience for end users.
22716
+
Non-sufficient assets, on the other hand, **cannot** suffice on their own for account existence. Non-sufficient assets rely on a sufficient asset for the existential deposit. However, through the use of [asset conversion](https://wiki.polkadot.network/learn/learn-asset-conversion-assethub/){target=\_blank}, non-sufficient assets can be treated as first-class citizens on Asset Hub with similar functionality to sufficient assets, creating a seamless experience for end users.
22717
22717
22718
22718
### Sufficient Assets
22719
22719
@@ -22726,9 +22726,9 @@ On Asset Hub, sufficient assets:
22726
22726
22727
22727
### Non-Sufficient Assets
22728
22728
22729
-
Through the use of [asset conversion](https://wiki.polkadot.network/learn/learn-asset-conversion-assethub), Asset Hub provides an abstraction layer and mechanism that can convert any asset regardless of asset type (sufficient or non-sufficient) to the parachain's native asset which in turn allows for non-sufficient assets to be swapped for the native asset to pay for the existential deposit, the transaction fee, the XCM fee, and the storage deposit.
22729
+
Through the use of [asset conversion](https://wiki.polkadot.network/learn/learn-asset-conversion-assethub){target=\_blank}, Asset Hub provides an abstraction layer and mechanism that can convert any asset regardless of asset type (sufficient or non-sufficient) to the parachain's native asset which in turn allows for non-sufficient assets to be swapped for the native asset to pay for the existential deposit, the transaction fee, the XCM fee, and the storage deposit.
22730
22730
22731
-
This allows developers to create a seamless experience for end users by allowing end users to use any asset as long as the asset has a [liquidity pool set up](https://wiki.polkadot.network/learn/learn-guides-asset-conversion/#create-a-liquidity-pool) against the native asset (e.g. DOT) on Asset Hub and has healthy liquidity in the pool to prevent getting burned on swaps.
22731
+
This allows developers to create a seamless experience for end users by allowing end users to use any asset as long as the asset has a [liquidity pool set up](https://wiki.polkadot.network/learn/learn-guides-asset-conversion/#create-a-liquidity-pool){target=\_blank} against the native asset (e.g. DOT) on Asset Hub and has healthy liquidity in the pool to prevent getting burned on swaps.
22732
22732
22733
22733
!!!note "Parachain Compatibility"
22734
22734
It is important to note that the functionality covered on this page is configured for Asset Hub. Depending on the use case, the destination parachain or sending parachain may also need to be configured in a similar manner (e.g. supporting sufficient assets, support ED in any sufficient asset, paying fees in any sufficient asset, swapping a non-sufficient asset for a native asset) to allow for the features covered on this page to also exist on that chain.
@@ -22739,7 +22739,7 @@ This allows developers to create a seamless experience for end users by allowing
22739
22739
22740
22740
### Transaction Fees
22741
22741
22742
-
On Asset Hub, both sufficient and non-sufficient assets can be used for paying transaction fees. For sufficient assets, Asset Hub natively converts the native asset (e.g. DOT) amount required to an asset balance and the signer actually pays that asset to a collator. And for non-sufficient assets on Asset Hub developers can leverage [asset conversion](https://wiki.polkadot.network/learn/learn-asset-conversion-assethub) via a [swap](/tutorials/polkadot-sdk/system-chains/asset-hub/asset-conversion/) or an XCM `ExchangeAsset` instruction to swap the non-sufficient asset for the native asset. For this to work, non-sufficient assets need to have a [liquidity pool set up](https://wiki.polkadot.network/learn/learn-guides-asset-conversion/#create-a-liquidity-pool) against the native asset (e.g. DOT).
22742
+
On Asset Hub, both sufficient and non-sufficient assets can be used for paying transaction fees. For sufficient assets, Asset Hub natively converts the native asset (e.g. DOT) amount required to an asset balance and the signer actually pays that asset to a collator. And for non-sufficient assets on Asset Hub developers can leverage [asset conversion](https://wiki.polkadot.network/learn/learn-asset-conversion-assethub){target=\_blank} via a [swap](/tutorials/polkadot-sdk/system-chains/asset-hub/asset-conversion/) or an XCM `ExchangeAsset` instruction to swap the non-sufficient asset for the native asset. For this to work, non-sufficient assets need to have a [liquidity pool set up](https://wiki.polkadot.network/learn/learn-guides-asset-conversion/#create-a-liquidity-pool){target=\_blank} against the native asset (e.g. DOT).
22743
22743
22744
22744
!!!note
22745
22745
UI's, wallets, and tools may have limitations because of design decisions and/or contraints it places e.g. constructing the XCM call in a specific manner and therefore limiting the end user when in reality Asset Hub encompasses more functionality such as the ability to pay transaction fees and XCM fees in any asset.
@@ -22748,23 +22748,23 @@ On Asset Hub, both sufficient and non-sufficient assets can be used for paying t
22748
22748
22749
22749
Both sufficient assets and non-sufficient assets can be used to pay for XCM fees on Asset Hub. However, it is important to note that the XCM program needs to explicitly reference the asset to pay the XCM fee in.
22750
22750
22751
-
For non-sufficient assets, this can be done by calling [asset conversion's swap](https://paritytech.github.io/polkadot-sdk/master/pallet_asset_conversion/pallet/dispatchables/fn.swap_tokens_for_exact_tokens.html) or including an [`ExchangeAsset`](https://paritytech.github.io/polkadot-sdk/master/cumulus_primitives_core/enum.Instruction.html#variant.ExchangeAsset) instruction in the XCM program to swap the non-sufficient asset for the native asset to pay for the XCM fee.
22751
+
For non-sufficient assets, this can be done by calling [asset conversion's swap](https://paritytech.github.io/polkadot-sdk/master/pallet_asset_conversion/pallet/dispatchables/fn.swap_tokens_for_exact_tokens.html){target=\_blank} or including an [`ExchangeAsset`](https://paritytech.github.io/polkadot-sdk/master/cumulus_primitives_core/enum.Instruction.html#variant.ExchangeAsset){target=\_blank} instruction in the XCM program to swap the non-sufficient asset for the native asset to pay for the XCM fee.
22752
22752
22753
22753
!!!note "UIs, Wallets, and Tools Interacting with Asset Hub"
22754
22754
When developing cross-chain applications to interact with Asset Hub it is important to consider the UI/UX and the trade-offs it may have.
22755
22755
22756
22756
Example Scenario: Sending 100 USDT to a new Asset Hub account
description: A tutorial detailing the step-by-step process of batch teleporting assets
36068
+
description: A comprehensive tutorial detailing the step-by-step process of batch teleporting assets across Polkadot parachains using ParaSpell SDK
36069
36069
tutorial_badge: Intermediate
36070
36070
---
36071
36071
36072
36072
# Batch Teleport Assets
36073
36073
36074
36074
## Introduction
36075
36075
36076
-
Cross-chain asset transfers are a fundamental feature of the Polkadot ecosystem, enabling seamless movement of tokens between different parachains. The [ParaSpell SDK](https://paraspell.github.io/docs/){target=_blank} simplifies this process by providing powerful tools for executing both single and batch teleport operations.
36076
+
Cross-chain asset transfers are a fundamental feature of the Polkadot ecosystem, enabling seamless movement of tokens between different parachains. The [ParaSpell SDK](https://paraspell.github.io/docs/){target=\_blank} simplifies this process by providing powerful tools for executing both single and batch teleport operations.
36077
36077
36078
-
This tutorial will guide you through creating batch teleport transactions using the [ParaSpell SDK](https://paraspell.github.io/docs/){target=_blank}. You'll learn how to bundle multiple cross-chain transfers into a single transaction, making your operations more efficient and cost-effective. By the end, you'll be able to execute batch teleports between Polkadot Hub chains and understand the underlying mechanisms.
36078
+
This tutorial will guide you through creating batch teleport transactions using the [ParaSpell SDK](https://paraspell.github.io/docs/){target=\_blank}. You'll learn how to bundle multiple cross-chain transfers into a single transaction, making your operations more efficient and cost-effective. By the end, you'll be able to execute batch teleports between Polkadot Hub chains and understand the underlying mechanisms.
36079
36079
36080
36080
## Prerequisites
36081
36081
36082
36082
Before getting started, ensure you have the following:
36083
36083
36084
-
- [Bun](https://bun.sh/){target=_blank} v1.0 or later installed on your system
36084
+
- [Bun](https://bun.sh/){target=\_blank} v1.0 or later installed on your system
36085
36085
- A Polkadot wallet with sufficient test tokens for transaction fees
36086
36086
- Basic understanding of TypeScript/JavaScript
36087
-
- General understanding of the [Polkadot protocol](/polkadot-protocol/parachain-basics/){target=_blank}
36088
-
- Some knowledge of [XCM (Cross-Consensus Messaging)](/develop/interoperability/intro-to-xcm/){target=_blank}
36087
+
- General understanding of the [Polkadot protocol](/polkadot-protocol/parachain-basics/){target=\_blank}
36088
+
- Some knowledge of [XCM (Cross-Consensus Messaging)](/develop/interoperability/intro-to-xcm/){target=\_blank}
36089
36089
36090
36090
## Project Overview
36091
36091
36092
36092
This tutorial demonstrates how to create batch teleport transactions that can transfer tokens from one parachain to multiple destinations on the Polkadot relay chain in a single operation. You'll work with:
36093
36093
36094
-
- [Asset Hub](/polkadot-protocol/architecture/system-chains/asset-hub/){target=_blank} as the source chain
36094
+
- [Asset Hub](/polkadot-protocol/architecture/system-chains/asset-hub/){target=\_blank} as the source chain
36095
36095
- Multiple destination addresses
36096
36096
- DOT/PAS tokens as the transferred assets
36097
36097
- Batch transaction construction and execution
@@ -36158,10 +36158,9 @@ bun add @paraspell/sdk@{{dependencies.javascript_packages.paraspell_sdk.version}
36158
36158
36159
36159
## Create the Implementation
36160
36160
36161
-
Create an `index.ts` file with the complete batch teleport implementation.
36162
-
> For testing purposes, you will be using [Paseo Asset Hub](/develop/networks/#paseo){target=_blank} (a Polkadot community-driven TestNet).
36161
+
Create an `index.ts` file with the complete batch teleport implementation. For testing purposes, you will be using [Paseo Asset Hub](/develop/networks/#paseo){target=\_blank} (a Polkadot community-driven TestNet).
36163
36162
36164
-
```typescript
36163
+
```typescript title="index.ts"
36165
36164
import { Builder, Version, BatchMode } from '@paraspell/sdk';
0 commit comments