Skip to main content
Once you have established a unified USDC balance, you can transfer it instantly to any supported destination chain. This guide demonstrates how to transfer your unified balance. Select a tab below for EVM or Solana-specific instructions.

Prerequisites

Before you begin, ensure that you’ve:
  • Installed Node.js v22.6+
  • Prepared an EVM testnet wallet with the private key available
    • Added the supported Testnets of your choice to your wallet (this guide uses Arc Testnet, Avalanche Fuji and Sei Testnet)
  • Funded your testnet wallet with native tokens on the destination chain (this guide uses Sei Testnet)
  • Deposited 10 USDC into the Gateway Wallet contracts on Arc Testnet and Avalanche Fuji (creating a unified balance of 20 USDC)
  • Created a TypeScript project and have viem installed
  • You’ve set up a .env file with the following variables:
    .env

Steps

Follow these steps to transfer a unified USDC balance. This example uses a unified balance split between Arc Testnet and Avalanche Fuji. You can adapt it for any chains where you hold a unified balance.

Step 1. Create and sign burn intents for the source chains

Create a new file called transfer.ts in the root of your project and add the following code to it. This code creates and signs burn intents for 5 USDC on Arc Testnet and 5 USDC on Avalanche Fuji.
transfer.ts
Note: For production apps, verifying the balance on each chain before creating burn intents is best practice. For this how-to, it’s assumed that the balances are created per the prerequisites. For a complete end-to-end example that includes checking and error handling, see the Gateway quickstarts (EVM, Solana).

Step 2. Submit the burn intents to the Gateway API to obtain an attestation

Add the following code to transfer.ts. This code constructs a Gateway API request to the /transfer endpoint and obtains the attestation from that endpoint.
transfer.ts

Step 3. Transfer USDC to the destination chain

Add the following code to transfer.ts. This code performs a call to the Gateway Minter contract on Sei Testnet to instantly mint the USDC to your account on that chain.
transfer.ts

Step 4. Run the script

Run the script with the following command: