Comment on page
Token Transfers
Sending ERC20 Tokens to Polkadot
The bridge currently supports sending ERC20 tokens from Ethereum to any Polkadot parachain, and back again.
The bridged tokens are minted in
ForeignAssets
pallet of the AssetHub parachain, and then transferred to the final destination using a reserve transfer.Sending tokens is usually a single step for the user. However, a preliminary registration step is required for tokens which have not previously been bridged before.
First, the ERC20 token needs to be registered on AssetHub in the
ForeignAssets
pallet.This can initiated by sending the following transaction to the Gateway.
/// @dev Send a message to the AssetHub parachain to register a new fungible asset
/// in the `ForeignAssets` pallet.
function registerToken(address token) external payable;
This function will charge a fee in Ether that can be retrieved ahead of time by calling
quoteRegisterTokenFee
.To send a previously registered token to a destination parachain, send this transaction to the Gateway:
/// @dev Send ERC20 tokens to parachain `destinationChain` and deposit into account `destinationAddress`
function sendToken(address token, ParaID destinationChain, MultiAddress destinationAddress, uint128 destinationFee, uint128 amount)
external
payable;
This function will charge a fee in Ether that can be retrieved ahead of time by calling
quoteSendTokenFee
.
Last modified 8d ago