Skip to content

Latest commit

 

History

History

downward-upward-native-token-tx

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Upward/ Downward native-token transfers

Working example for polkadot-v0.9.13 to transfer the native token from the relay-chain to the parachain via the xcm-pallet and vice-versa. The message format is very generic, hence the correct extrinsics for those transfers are shown below.

Preliminaries

The relay chain must have marked encointer as a trusted teleporter, which is not yet the case. This polkadot fork contains slightly amended westend and rococo runtimes, where encointer is a trusted teleporter.

Downwards Tx

Send from Alice on the relay chain to Ferdie on the parachain.

downward-token-tx.png

Upwards Token Tx

Send from Alice on the parachain to Ferdie on the relay chain.

Note: The relay chain tracks teleported assets. Hence, we must perform a downward transfer before we do the upward transfer such that the total token stream in parachain direction remains positive. Otherwise, we get a NotWithdrawable error upon the upward transfer on the relay chain side. In production system this condition always holds as the parachain starts with 0 tokens anyhow.

upward-token-tx.png

Related Resources