For Solana-specific Gateway flows, use the dedicated Circle Gateway
quickstarts.
- Circle Wallets
- Viem
Prerequisites
Before you begin, make sure you have:- A Circle Developer Console account
- An API key created in the Console
- Your Entity Secret registered
- Testnet USDC and native tokens on Arc Testnet
- Testnet native tokens on Ethereum Sepolia for the destination mint
Step 1. Set up your project
In this step, you create the project, install dependencies, and configure the environment for the Arc-first Gateway flow.1.1. Create the project and install dependencies
1.2. Configure TypeScript (optional)
Create atsconfig.json file:tsconfig.json file:1.3. Set environment variables
Create a.env file in the project directory:.env
CIRCLE_API_KEYis your Circle Developer API key.CIRCLE_ENTITY_SECRETis your registered Entity Secret.DEPOSITOR_ADDRESSis the Arc wallet address that deposits into Gateway and signs the burn intent.RECIPIENT_ADDRESSis the Ethereum Sepolia address that receives the minted USDC.
npm run commands in this tutorial load variables from .env using Node.js
native env-file support.Step 2. Set up and fund your wallets
In this step, you create matching dev-controlled EVM wallets on Arc Testnet and Ethereum Sepolia and fund them for the Gateway flow. If you already have funded wallets on both chains, skip ahead to the deposit step.2.1. Create wallets
Create one dev-controlled wallet on Arc Testnet and one on Ethereum Sepolia using the samerefId. Circle assigns the same EVM address to both wallets,
which keeps the source and destination flow easier to follow.If you want to mint on another supported EVM destination later, create a
matching dev-controlled wallet on that chain with the same refId, then update
DESTINATION_CHAIN and RECIPIENT_ADDRESS to match.create-wallets.ts
If you’re calling the API directly, you’ll need to make two requests: one to
create the wallet set and one to create the wallet. Be sure to replace the
Entity Secret ciphertext and the idempotency key in your request. If you’re
using the SDKs, this is handled automatically for you.
DEPOSITOR_ADDRESS and
RECIPIENT_ADDRESS in .env. You can use the same EVM address for both in this
quickstart.This quickstart uses the same EVM address for DEPOSITOR_ADDRESS and
RECIPIENT_ADDRESS. That way, the same dev-controlled wallet can receive the
USDC and submit the mint transaction on Ethereum Sepolia.2.2. Fund your wallets
To follow this flow:- fund the Arc Testnet wallet with testnet USDC and native tokens
- fund the Ethereum Sepolia wallet with native tokens for the destination mint
Step 3. Deposit USDC into a Gateway balance on Arc
In this step, you deposit USDC from Arc Testnet into your unified Gateway balance. The script fixes the source chain to Arc Testnet, but theSUPPORTED_EVM_CHAINS object shows the broader EVM support you can extend
later.3.1. Create the shared config file
config.ts
3.2. Create the deposit script
The main logic performs two key actions:- Approve USDC transfers: It calls the
approvemethod on the USDC contract to allow the Gateway Wallet contract to transfer USDC from your wallet. - Deposit USDC into Gateway: After receiving the approval transaction hash,
it calls the
depositmethod on the Gateway Wallet contract.
deposit.ts
3.3. Check the Gateway balances
Create a balance script that queries your unified Gateway balance across the configured EVM domains.balances.ts
Step 4. Transfer USDC from the Arc Gateway balance to Ethereum
In this step, you burn from the Arc Gateway balance and mint on Ethereum Sepolia. The same script shape works for other supported EVM destinations after you create and fund a matching dev-controlled wallet on that chain and updateDESTINATION_CHAIN and RECIPIENT_ADDRESS.In this flow, RECIPIENT_ADDRESS receives the USDC, and DEPOSITOR_ADDRESS
submits the mint transaction on Ethereum Sepolia. This quickstart keeps them the
same.4.1. Create the transfer script
This example submits one burn intent for clarity. You can also submit multiple burn intents to the Gateway API in a single request and receive a single attestation response to use when minting on the destination chain.transfer.ts
4.2. Run the transfer script
Run the transfer script to transfer 1 USDC from your Arc Gateway balance to Ethereum Sepolia.Summary
After completing this tutorial, you have:- created or prepared the wallets needed for the Arc-to-Ethereum flow
- deposited USDC from Arc Testnet into a unified Gateway balance
- checked the Gateway balance across supported EVM domains
- transferred that Arc Gateway balance to Ethereum Sepolia