Skip to main content
Version: Mainnet - Dymension

Registering ERC-20 tokens

ICS-20 transfers sdk.Coins which is a different standard than ERC-20 tokens. Converting native sdk.Coins and vice versa, while retaining fungibility with the original asset on the issuing environment/runtime (EVM or Cosmos) and preserving ownership of the ERC-20 contract.

This conversion functionality is governed by the RollApp who manage the canonical TokenPair registrations (ie, ERC20 to Coin mappings).

Registering an IBC token

rollapp-evm tx gov submit-legacy-proposal register-coin proposal.json [flags]

To obtain a IBC token hash choose the relevant channel:

rollapp-evm q ibc-transfer denom-traces

Then find the denom hash:

rollapp-evm query ibc-transfer denom-hash [trace] [flags]

Example proposal.json

{
"metadata": [
{
"description": "The native issuance USDC by Noble",
"denom_units": [
{
"denom": "ibc/<HASH>",
"exponent": 0,
"aliases": ["ibcuusdc"]
},
{
"denom": "USDC",
"exponent": 6
}
],
"base": "ibc/<HASH>",
"display": "USDC",
"name": "USDC",
"symbol": "USDC"
}
]
}

Registering an ERC20

Allows users to submit a RegisterERC20Proposal. To register multiple tokens in one proposal pass them after each other e.g. register-erc20 contract-address1 contract-address2.

rollapp-evm tx gov submit-legacy-proposal register-erc20 ERC20_ADDRESS... [flags]

Toggling existing pair

A valid token pair can be modified through several governance proposals. The internal conversion of a token pair can be toggled with ToggleTokenConversionProposal, so that the conversions between the token pair's tokens can be enabled or disabled.

rollapp-evm tx gov submit-legacy-proposal toggle-token-conversion TOKEN [flags]