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.

Transaction Methods

transfer

Initiates a cross-chain token transfer using the IBC protocol.

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