Skip to main content

Overview

Starting in ibc-go v10.4.0, the IBC transfer module uses the application’s configured address codec to parse sender and receiver addresses. This enables chains to accept multiple address formats in IBC packets—for example, both standard Cosmos bech32 addresses (cosmos1...) and Ethereum hex addresses (0x...).

Interface

The Cosmos SDK defines a simple interface for converting between address representations:
Applications configure a codec implementation on the AccountKeeper. The IBC transfer module retrieves this codec via accountKeeper.AddressCodec() and uses it throughout packet processing—validating sender addresses when creating packets and parsing receiver addresses when delivering funds. Chain independence: Each chain applies its own codec independently. The sending chain validates senders with its codec, the receiving chain validates receivers with its codec. This works seamlessly across chains with different codec configurations without any protocol changes.

Implementation

A typical implementation composes the SDK’s standard bech32 codec and extends it to parse hex addresses:
This pattern accepts both address formats as input while consistently outputting bech32. This makes the codec a drop-in replacement for the standard codec—existing tooling continues to work unchanged while users gain the ability to specify hex addresses where convenient. Note: A recommended address codec implementation is available in the cosmos/evm repository.

Application Wiring

After initializing your transfer keeper, configure the codec using the SetAddressCodec method:
For a complete example showing the transfer keeper initialization and address codec configuration, see evmd app.go.

Usage

Once configured, the chain accepts IBC transfers with receiver addresses in either format:
Both formats resolve to the same on-chain account when derived from the same private key. The codec handles conversion to the internal byte representation transparently.

Reference Implementation

The cosmos/evm repository provides a complete implementation in utils/address_codec.go with integration examples in the evmd reference chain: