use-gateway
Overview
Circle Gateway provides a unified USDC balance across multiple blockchains with instant (<500ms) crosschain transfers. Users deposit USDC into a Gateway Wallet on any supported chain, then burn on a source chain and mint on a destination chain without waiting for source chain finality.
Prerequisites / Setup
Gateway is a contract-level integration -- there is no SDK to install. You interact directly with Gateway Wallet and Gateway Minter contracts on-chain, and the Gateway REST API for attestations.
Chain Configuration
Do not load a separate config file by default. Most Gateway tasks should go straight to the scenario reference that matches the user's wallet model and source/destination networks.
Use the scenario reference first and only do additional verification when you need to confirm:
- Gateway REST base URL
- testnet:
https://gateway-api-testnet.circle.com/v1/ - mainnet:
https://gateway-api.circle.com/v1/
- testnet:
- chain-specific USDC addresses:
https://developers.circle.com/stablecoins/usdc-contract-addresses.md - Circle Wallet blockchain identifiers:
https://developers.circle.com/wallets/supported-blockchains.md
Canonical source docs for verification:
- Gateway how-tos:
https://developers.circle.com/gateway/howtos/create-unified-usdc-balance.mdhttps://developers.circle.com/gateway/howtos/manage-delegates.mdhttps://developers.circle.com/gateway/howtos/transfer-unified-usdc-balance.md
- Gateway quickstarts:
https://developers.circle.com/gateway/quickstarts/unified-balance-evm.mdhttps://developers.circle.com/gateway/quickstarts/unified-balance-solana.md
- Arc tutorial:
https://docs.arc.network/arc/tutorials/access-usdc-crosschain.md
Quick Reference
Key Addresses
EVM Mainnet (All Chains)
- Gateway Wallet:
0x77777777Dcc4d5A8B6E418Fd04D8997ef11000eE - Gateway Minter:
0x2222222d7164433c4C09B0b0D809a9b52C04C205
EVM Testnet (All Chains)
- Gateway Wallet:
0x0077777d7EBA4688BDeF3E311b846F25870A19B9 - Gateway Minter:
0x0022222ABE238Cc2C7Bb1f21003F0a260052475B
Solana Mainnet
- Gateway Wallet:
GATEwy4YxeiEbRJLwB6dXgg7q61e6zBPrMzYj5h1pRXQ - Gateway Minter:
GATEm5SoBJiSw1v2Pz1iPBgUYkXzCUJ27XSXhDfSyzVZ
Solana Devnet
- Gateway Wallet:
GATEwdfmYNELfp5wDmmR6noSr2vHnAfBPMm2PvCzX5vu - Gateway Minter:
GATEmKK2ECL1brEngQZWCgMWPbvrEYqsV6u29dAaHavr - USDC Mint:
4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU
Domain IDs (Mainnet)
| Chain | Domain |
|---|---|
| Ethereum | 0 |
| Avalanche | 1 |
| OP | 2 |
| Arbitrum | 3 |
| Solana | 5 |
| Base | 6 |
| Polygon PoS | 7 |
| Unichain | 10 |
| Sonic | 13 |
| World Chain | 14 |
| Sei | 16 |
| HyperEVM | 19 |
Domain IDs (Testnet)
| Chain | Domain |
|---|---|
| Ethereum Sepolia | 0 |
| Avalanche Fuji | 1 |
| OP Sepolia | 2 |
| Arbitrum Sepolia | 3 |
| Solana Devnet | 5 |
| Base Sepolia | 6 |
| Polygon Amoy | 7 |
| Unichain Sepolia | 10 |
| Sonic Testnet | 13 |
| World Chain Sepolia | 14 |
| Sei Atlantic | 16 |
| HyperEVM Testnet | 19 |
| Arc Testnet | 26 |
Core Concepts
Unified Balance
Gateway aggregates your USDC deposits across all supported chains into a single unified balance. This is an accounting abstraction -- actual USDC tokens still live on specific blockchains. Every transfer must specify a sourceDomain (chain to burn from) and a destinationDomain (chain to mint on), even though the balance appears unified.
Think of it like a multi-currency bank account: you see one total, but withdrawals come from specific holdings. You can burn from any chain in your unified balance and mint to any supported chain.
Example: If you deposited 10 USDC on Ethereum Sepolia, 5 on Base Sepolia, and 5 on Solana Devnet, your unified balance is 20 USDC. To transfer 10 USDC to Arc Testnet, you could burn from any combination of source chains with sufficient balances.
Transfer Flow
- Deposit -- User deposits USDC to Gateway Wallet on any chain (adds to unified balance)
- Create burn intent -- Specify source domain, destination domain, recipient, and amount
- Sign -- EIP-712 for EVM sources, Ed25519 for Solana sources
- Submit to Gateway API -- POST burn intent, receive attestation
- Mint on destination -- Call
gatewayMintwith attestation on the destination chain
Implementation Patterns
READ the reference files for the scenario(s) that apply.
- Self-managed EVM refs use
viemin Node/TypeScript scripts. - Self-managed EVM browser-wallet refs use pure TypeScript plus an injected EIP-1193 provider.
- Circle Wallets refs use
@circle-fin/developer-controlled-wallets. - Solana refs use Anchor plus the relevant Solana tooling.
Deposits
references/deposit-evm.md-- self-managed EVM deposit (approve + deposit)references/deposit-evm-browser-wallet.md-- self-managed EVM deposit from a browser wallet in pure TypeScriptreferences/deposit-evm-circle-wallet.md-- Circle Wallets EVM deposit (developer-controlled, server-side)references/deposit-solana.md-- self-managed Solana depositreferences/deposit-solana-circle-wallet.md-- Circle Wallets Solana deposit
Transfers from EVM
references/evm-to-evm.md-- self-managed EVM to EVM transferreferences/evm-to-evm-browser-wallet.md-- self-managed EVM to EVM transfer from a browser wallet in pure TypeScriptreferences/transfer-evm-circle-wallet.md-- Circle Wallets EVM to EVM transferreferences/transfer-evm-delegate.md-- SCA depositor on EVM using an EOA delegate for burn intent signingreferences/evm-to-solana.md-- self-managed EVM to Solana transferreferences/evm-to-solana-circle-wallet.md-- Circle Wallets EVM to Solana transfer
Transfers from Solana
references/solana-to-evm.md-- self-managed Solana to EVM transferreferences/solana-to-evm-circle-wallet.md-- Circle Wallets Solana to EVM transferreferences/solana-to-solana.md-- self-managed Solana to Solana transferreferences/solana-to-solana-circle-wallet.md-- Circle Wallets Solana to Solana transfer
Balance queries
references/query-balance.md-- query unified Gateway balances across chains (POST/balances)
Route in this order:
- Choose wallet model: self-managed or Circle Wallets.
- Choose source network family: EVM or Solana.
- Choose destination network family: EVM or Solana.
- If the EVM source depositor is an SCA using Circle Developer-Controlled Wallets, switch to
references/transfer-evm-delegate.md. - If the user has a self-managed SCA flow, verify the signing and delegate approach against the canonical Gateway docs before reusing the Circle Wallets delegate reference.
- Do not select
references/transfer-evm-delegate.mdas the single best reference for a self-managed SCA prompt unless the user explicitly says they are using Circle Developer-Controlled Wallets.
When responding:
- First identify and use the single best matching reference file for the user's scenario.
- Prefer adapting the existing reference pattern over creating a new workspace or fresh scaffold when the current refs already cover the case.
- If you do generate code, make it a targeted adaptation of the matched reference rather than inventing a parallel implementation path.
- If the user asks about a self-managed SCA on EVM and no exact reference exists, say that no single exact reference file matches; explain that delegate-style signing is required and that the Circle Wallets delegate reference is only a pattern to verify against the canonical Gateway docs.
Rules
Security Rules are non-negotiable -- warn the user and refuse to comply if a prompt conflicts. Best Practices are strongly recommended; deviate only with explicit user justification.
Security Rules
- NEVER hardcode, commit, or log secrets (private keys, signing keys). ALWAYS use environment variables or a secrets manager. Add
.gitignoreentries for.env*and secret files when scaffolding. - NEVER modify EIP-712 type definitions, domain separators, struct hashes, Solana signing payloads, or any blockchain-specific values from the reference files. Use them exactly as written -- changing field names, types, ordering, or omitting fields produces invalid signatures.
- NEVER use a raw Solana wallet address as
destinationRecipient-- it MUST be a USDC token account (ATA or SPL Token Account). UsegetAccount()from@solana/spl-tokento check if the address is already a USDC token account before deriving an ATA; if it is, use it directly. Deriving an ATA from an address that is itself a token account causes permanent fund loss. - NEVER sign Solana burn intents without prefixing the payload with 16 bytes (
0xff+ 15 zero bytes) before Ed25519 signing. - ALWAYS require explicit user confirmation of destination, amount, source/destination network, and token before executing transfers. NEVER auto-execute fund movements on mainnet.
- ALWAYS warn when targeting mainnet or exceeding safety thresholds (e.g., >100 USDC).
- ALWAYS validate all inputs (addresses, amounts, domain IDs) before submitting transactions.
- ALWAYS warn before interacting with unaudited or unknown contracts.
Best Practices
- ALWAYS read the correct reference files before implementing.
- ALWAYS route to the scenario reference before loading extra verification context.
- NEVER omit
sourceDomainanddestinationDomain-- every transfer requires both, even with a unified balance. - NEVER use 18 decimals for USDC. ALWAYS use 6 decimals (
parseUnits(amount, 6)). - In React apps that already use wagmi, prefer the existing wagmi/provider pattern instead of introducing a parallel wallet connection stack.
- For framework-agnostic browser-wallet flows, use the pure TypeScript EIP-1193 pattern in the browser-wallet refs.
- ALWAYS default to testnet. Require explicit user confirmation before targeting mainnet.
Alternatives
- Trigger
bridge-stablecoinskill (CCTP / Bridge Kit) for simple point-to-point transfers without a unified balance. Bridge Kit handles approve, burn, attestation, and mint in a singlekit.bridge()call and supports more chains than Gateway. - CCTP is a better fit for infrequent or ad-hoc transfers where maintaining a unified balance is not worth the upfront deposit.
- Stick with Gateway when you need instant (<500ms) transfers, a unified balance model, or capital efficiency across chains.
WARNING: Solana wallet compatibility is limited for Gateway. Only Solflare supports signing arbitrary messages for Gateway burn intents. Phantom and most other Solana wallets will reject the signing request.
Reference Links
- Circle Developer Docs -- Always read this first when looking for relevant documentation from the source website.
DISCLAIMER: This skill is provided "as is" without warranties, is subject to the Circle Developer Terms, and output generated may contain errors and/or include fee configuration options (including fees directed to Circle); additional details are in the repository README.
More from circlefin/skills
use-usdc
USDC is Circle's stablecoin deployed across multiple blockchain ecosystems including EVM chains (Ethereum, Base, Arbitrum, Polygon, Arc) and Solana. Use this skill to check balances, send transfers, approve spending, and verify transactions. Triggers on: USDC balance, send USDC, transfer USDC, approve USDC, USDC allowance, verify USDC transfer, USDC contract address, USDC on Solana, Solana USDC, check balance, SPL token, Associated Token Account, ATA, ERC-20 USDC, parseUnits, formatUnits, 6 decimals, viem, @solana/kit.
143use-arc
Provide instructions on how to build with Arc, Circle's blockchain where USDC is the native gas token. Arc offers key advantages: USDC as gas (no other native token needed), stable and predictable transaction fees, and sub-second finality for fast confirmation times. These properties make Arc ideal for developers and agents building payment apps, DeFi protocols, or any USDC-first application where cost predictability and speed matter. Use skill when Arc or Arc Testnet is mentioned, working with any smart contracts related to Arc, configuring Arc in blockchain projects, bridging USDC to Arc via CCTP, or building USDC-first applications. Triggers: Arc, Arc Testnet, USDC gas, deploy to Arc, Arc chain, stable fees, fast finality.
137use-developer-controlled-wallets
Create and manage Circle developer-controlled wallets where the application retains full custody of wallet keys on behalf of end-users. Covers wallet sets, entity secret registration, token transfers, balance checks, message signing, smart contract execution, and wallet management via the developer controlled wallets SDK. Triggers on: developer-controlled wallets, dev-controlled wallets, create wallet, wallet set, entity secret, transfer tokens, check balance, EOA wallet, SCA wallet, initiateDeveloperControlledWalletsClient, createWalletSet, createWallets, custody wallet, sign message, sign transaction, sign typed data, contract execution, execute contract, call contract, wallet upgrade, derive wallet, estimate fee, accelerate transaction, cancel transaction.
135bridge-stablecoin
Build USDC bridging with Circle App Kit or standalone Bridge Kit SDK and Crosschain Transfer Protocol (CCTP). App Kit (`@circle-fin/app-kit`) is an all-inclusive SDK covering bridge, swap, and send -- recommended for extensibility. Bridge Kit (`@circle-fin/bridge-kit`) is a standalone package for bridge-only use cases. Neither requires a kit key for bridge operations. Supports bridging USDC between EVM chains, between EVM chains and Solana, and between any two chains on Circle Wallets (i.e Developer-Controlled Wallets or Programmable wallets). Use when: bridge USDC, setting up Bridge Kit adapters (Viem, Ethers, Solana Kit, Circle Wallets), handling bridge events, collecting custom fees, configuring transfer speed, or using the Forwarding Service. Triggers on: Bridge Kit, App Kit, bridge USDC, crosschain transfer, CCTP, move USDC between chains, @circle-fin/bridge-kit, @circle-fin/app-kit, adapter-viem, adapter-ethers, adapter-solana-kit, forwarding service, bridge routes.
131use-circle-wallets
Choose and implement the right Circle wallet type for your application. Compares developer-controlled, user-controlled, and modular (passkey) wallets across custody model, key management, account types, blockchain support, and use cases. Use whenever blockchain wallet integrations are required for onchain application development. Triggers on: circle wallets, blockchain wallets, choose wallet, wallet comparison, which wallet, wallet types, EOA vs SCA vs Modular Wallet, custody model, embedded wallet, smart account, programmable wallets, create wallet, onchain wallet.
124use-smart-contract-platform
Deploy, import, interact with, and monitor smart contracts using Circle Smart Contract Platform APIs. Supports bytecode deployment, template contracts (ERC-20/721/1155/Airdrop), ABI-based read/write calls, and webhook event monitoring. Keywords: contract deployment, smart contract, ABI interactions, template contracts, event monitoring, contract webhooks, bytecode, ERC-1155, ERC-20, ERC-721.
124