Overview
Starting in ibc-gov10.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: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:Application Wiring
After initializing your transfer keeper, configure the codec using theSetAddressCodec method:
Usage
Once configured, the chain accepts IBC transfers with receiver addresses in either format:Reference Implementation
The cosmos/evm repository provides a complete implementation inutils/address_codec.go with integration examples in the evmd reference chain: