Granite Upgrade Activates in06d:23h:31m:12s
Interchain Token Transfers

Interchain Token Transfers

Overview

Transfer ERC20 tokens between Avalanche chains using the Teleporter protocol. Requires deploying token home and remote contracts for each token pair.

Create Client

import { createICTTClient } from "@avalanche-sdk/interchain";

const ictt = createICTTClient();
// Or with default chains
const ictt = createICTTClient(sourceChain, destinationChain);

Workflow

  1. Deploy ERC20 Token - Deploy your token on the source chain
  2. Deploy Token Home - Deploy home contract on source chain
  3. Deploy Token Remote - Deploy remote contract on destination chain
  4. Register Remote - Register remote with home contract
  5. Approve Token - Approve home contract to spend tokens
  6. Send Tokens - Transfer tokens cross-chain

The wallet client's chain configuration must match the sourceChain used in your interchain operations. For example, if you're sending messages from Fuji testnet, ensure your wallet client is configured with the Fuji chain. Mismatched chains will result in an "invalid sender" error.

Methods

Is this guide helpful?