SpectreGuides

Guide — the Ethereum IBC transfer app

Guides · 3 of 3 — the reference ICS-20 app, and the working demo.

ICS20Transfer is the reference token app on Ethereum. It mints an IBCERC20 when Cosmos tokens arrive, and locks native Ethereum tokens in an Escrow when they leave (released on ack/timeout). The ICS26Router dispatches to it via the standard onRecvPacket / onAcknowledgementPacket / onTimeoutPacket callbacks.

Working demo — Gaia ↔ Sepolia

Send stake from Cosmos to an Ethereum address over Spectre. The client id is the one create-clients-cosmos wrote into your config as cosmos_wasm_client_id — it follows ibc-go's global sequence (08-wasm-<N>), so it is not necessarily 08-wasm-0:

# 08-wasm-<N> = your cosmos_wasm_client_id (see config)
gaiad tx ibc-transfer transfer \
  transfer 08-wasm-<N> 0x<eth-addr> 1000stake \
  --absolute-timeouts \
  --packet-timeout-timestamp $(($(date +%s)+2000)) \
  --generate-only > tx.json

# ABI-encode the packet for the ETH router
jq '.body.messages[0].encoding = "application/x-solidity-abi"' tx.json > tx.abi.json

gaiad tx sign tx.abi.json ... | gaiad tx broadcast /dev/stdin -y

The application/x-solidity-abi encoding is what tells the Cosmos transfer module to format the packet for the Ethereum router.

Confirm arrival on Ethereum — find the wrapped ERC-20, then check the balance. The denom path is transfer/<ics26_client_id>/<base>, where the middle segment is the client id the ETH router uses for the Cosmos chain (ics26_client_id in your config — provider here):

# resolve the wrapped ERC-20 from its denom path
cast call <ICS20Transfer> \
  'ibcERC20Contract(string)(address)' 'transfer/provider/stake' \
  --rpc-url <eth>

# check the recipient balance
cast call <IBCERC20> \
  'balanceOf(address)(uint256)' 0x<eth-addr> \
  --rpc-url <eth>

The reverse (Ethereum → Cosmos) burns the IBCERC20 and releases from Escrow on the Cosmos side, verified by the 08-wasm Ethereum light client — no ZK proof on that leg.

On this page