Token Transfer (ICTT)
Transfer an ERC-20 across chains with Interchain Token Transfer
transfer-token.ts runs a complete Interchain Token Transfer (ICTT) ERC-20 round-trip: it deploys a token and a home contract on the C-Chain, a remote contract on the destination L1, registers them, then moves wrapped tokens across.
Prerequisites
Boot a local network and build the contracts first:
pnpm run up # writes .interchain-kit/artifacts/network.json
forge build --root contracts # produces contracts/out/*.jsonRun It
Run from the repo root:
pnpm --filter @interchain-kit/examples run transfer-tokenOverride the amount and destination with flags or env vars (precedence: flag > env var > default):
pnpm --filter @interchain-kit/examples run transfer-token --amount 100 --destination myl1
# or
DESTINATION=myl1 AMOUNT=42 pnpm --filter @interchain-kit/examples run transfer-tokenWhat It Does
- Deploy a
DemoERC20token on the C-Chain. - Deploy
ERC20TokenHomeon the C-Chain to lock the token. - Deploy
ERC20TokenRemoteon the destination L1 to mint the wrapped representation. - The remote registers with the home over Teleporter.
- Approve and send tokens from the home; poll the remote until the wrapped balance arrives.
The example uses 18 token decimals so the underlying and wrapped tokens scale 1:1 with no rescaling. On success you'll see the deployment lines plus a balance journey on the remote — for example 0 -> 100000000000000000000 (100 tokens at 18 decimals).
Home and remote
ICTT uses a home contract on the chain where the token originates (it locks/holds the underlying) and a remote contract on each destination chain (it mints/burns a wrapped representation). Registration is a Teleporter message from the remote back to the home, so the relayer must be running in both directions.
Next Steps
Is this guide helpful?