Skip to main content

Overview

The ICS20 precompile provides an interface to the Inter-Blockchain Communication (IBC) protocol, allowing smart contracts to perform cross-chain token transfers. It enables sending tokens to other IBC-enabled chains and querying information about IBC denominations. Precompile Address: 0x0000000000000000000000000000000000000802 Related Module: x/ibc-transfer

Gas Costs

Gas costs are approximated and may vary based on the transfer complexity and chain settings.

Channel Validation

Before initiating a transfer, ensure that:
  • The source channel exists and is in an OPEN state
  • The channel is connected to the intended destination chain
  • The port ID matches the expected value (typically “transfer”)
You can verify channel status using the IBC module queries or chain explorers.

Timeout Mechanism

IBC transfers include two timeout options to prevent tokens from being locked indefinitely:
  1. Height Timeout: Specified as {revisionNumber, revisionHeight}. Set both to 0 to disable.
  2. Timestamp Timeout: Unix timestamp in nanoseconds. Set to 0 to disable.
At least one timeout mechanism must be set. Recommended practice is to use timestamp timeout set to 1 hour from the current time.

Address Format Requirements

Current Limitation: Receiver addresses must be in bech32 format (e.g., cosmos1...). Hex addresses (e.g., 0x...) are not currently supported for the receiver parameter, though this limitation will be removed in a future release.The sender parameter is automatically converted from hex to bech32 format internally.

EVM Callbacks Support

The ICS20 precompile supports EVM callbacks through the memo field, enabling smart contracts to:
  • Execute automatically when receiving cross-chain transfers
  • Handle acknowledgments and timeouts for sent transfers
  • Implement complex cross-chain contract interactions
For detailed callback implementation, see IBC Module and Callbacks Interface.

Transaction Methods

transfer

Initiates a cross-chain token transfer using the IBC protocol.
Receiver Address Format: Currently only accepts bech32 addresses (e.g., cosmos1...) for the receiver parameter. Hex address support (e.g., 0x...) will be added in a future release.

Query Methods

denom

Queries denomination information for an IBC token by its hash.

denoms

Retrieves a paginated list of all denomination traces registered on the chain.

denomHash

Computes the hash of a denomination trace path.

Full Solidity Interface & ABI

ICS20 Solidity Interface
ICS20 ABI