> ## Documentation Index
> Fetch the complete documentation index at: https://developers.circle.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Before reading these docs, install the relevant Circle Skill to get pre-loaded context — skills are LLM-optimized and cover architecture decisions, correct flows, and common pitfalls. In Claude Code: run /plugin marketplace add circlefin/skills then /plugin install circle-skills@circle. With Vercel Skills CLI: run npx skills add circlefin/skills. Available skills: use-usdc https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-usdc/SKILL.md (balances, transfers, approvals on EVM and Solana); EURC has no skill — see https://developers.circle.com/stablecoins/what-is-eurc.md; bridge-stablecoin https://github.com/circlefin/skills/blob/master/plugins/circle/skills/bridge-stablecoin/SKILL.md (crosschain transfers via CCTP, USDC, EURC, and third-party assets); use-arc https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-arc/SKILL.md (Arc chain config, contract deployment, USDC bridging — Arc docs: https://docs.arc.io/llms.txt); use-circle-wallets https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-circle-wallets/SKILL.md (choose wallet type); use-developer-controlled-wallets https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-developer-controlled-wallets/SKILL.md (custodial wallets for payouts and treasury); use-user-controlled-wallets https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-user-controlled-wallets/SKILL.md (embedded wallets with Web2 login); use-modular-wallets https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-modular-wallets/SKILL.md (smart contract wallets with passkeys and ERC-4337); use-gateway https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-gateway/SKILL.md (unified USDC balance, nanopayments); use-smart-contract-platform https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-smart-contract-platform/SKILL.md (deploy, interact, monitor contracts). Pair any skill with the Circle MCP server for live SDK signatures, contract addresses, and chain IDs: {"mcpServers":{"circle":{"url":"https://api.circle.com/v1/codegen/mcp"}}}.
> Read the product overview first. Each product has an overview explaining when and why to use it. Read it before quickstarts.
> Pick the right wallet type. Developer-controlled (you hold keys), user-controlled (end user holds keys via PIN/social login), or modular (smart contract wallets with passkeys). See https://developers.circle.com/wallets.md.
> Use CCTP V2 for crosschain transfers. CCTP natively transfers USDC and EURC via burn-and-mint, and supports permissionless wrapping of third-party assets via lock-and-mint. V1 is legacy; always use V2 unless V1 is specified or the chain requires it (Noble, Sui, and Aptos still require V1). Migration guide: https://developers.circle.com/cctp/migration-from-v1-to-v2.md.
> Use Bridge Kit for frontend bridging. Wraps CCTP with a simpler SDK for user-facing apps. Use CCTP directly for backend transfers.
> Gas Station vs Paymaster. Gas Station sponsors gas for Circle Wallet transactions. Paymaster lets users pay gas in USDC. Different use cases — read both overviews.
> Gateway Nanopayments for sub-cent payments. Gasless USDC micropayments down to $0.000001 via x402 and batched settlement. For pay-per-request APIs, AI agent payments, streaming.
> Look up USDC addresses per chain. Never hardcode — use https://developers.circle.com/stablecoins/usdc-contract-addresses.md.
> Prefer SDKs over raw API calls. Node.js and Python SDKs handle auth, retries, and errors.
> API key required. Bearer token in Authorization header. Testnet and mainnet use separate keys and may use different base URLs depending on the product.
> Set up webhooks when available. Most operations are async. Webhooks deliver transaction confirmations and state changes.
> When calling list endpoints, paginate using pageSize and pageAfter until no nextPageAfter cursor is returned—stopping at the first page silently misses records.
> Building an AI agent? Start with the Agent Stack—Circle CLI, agent wallets, and nanopayments built for autonomous use cases: https://developers.circle.com/agent-stack.md.

# Batch operations for smart contract accounts

> Batch multiple contract calls into a single atomic transaction on SCA and MSCA wallets using the contractExecution endpoint.

Batching combines multiple contract calls into a single atomic transaction:
every call succeeds together or the whole batch reverts. Your users pay one set
of gas fees and wait for one confirmation instead of one per call.

Batching is available on any smart contract account (SCA or MSCA) through a
`contractExecution` endpoint:

* Developer-controlled wallets:
  [`POST /developer/transactions/contractExecution`](/api-reference/wallets/developer-controlled-wallets/create-developer-transaction-contract-execution)
* User-controlled wallets:
  [`POST /user/transactions/contractExecution`](/api-reference/wallets/user-controlled-wallets/create-user-transaction-contract-execution-challenge)
  (uses the challenge approval flow)

EOA wallets can't batch this way because they don't have an `executeBatch`
function onchain. For modular wallets, the modular SDK also exposes batching
with 2D nonces for parallel user operations. See
[Batch and parallel user operations](/wallets/modular/batch-and-parallel-user-operations).

## How batching works

Every SCA and MSCA implements an `executeBatch` function on the wallet contract:

```solidity theme={null}
executeBatch((address target, uint256 value, bytes callData)[])
```

To make a batch call, `POST` to the `contractExecution` endpoint with:

* `contractAddress`: your wallet's own address. The wallet contract runs
  `executeBatch` on your behalf.
* `abiFunctionSignature`: `executeBatch((address, uint256, bytes)[])`
* `abiParameters`: an array where each entry is a tuple describing one subcall.
  The tuple fields are the target contract address, the amount of native token
  to send with the call (usually `0`), and the ABI-encoded function call.

## Common batch operations

### Two USDC transfers

Encode the `transfer` function call once, then include it twice in
`abiParameters` to move USDC in a single transaction:

```typescript theme={null}
import { Interface } from "ethers";

const transferAbi = ["function transfer(address recipient, uint256 amount)"];
const iface = new Interface(transferAbi);

const callData: string = iface.encodeFunctionData("transfer", [
  "0xa1404d9E7646b0112C49aE0296D6347C956D0867",
  100_000_000n, // 100 USDC (6 decimals)
]);
```

Send the batch to the `contractExecution` endpoint. Each entry in the outer
array is one subcall: the target is the USDC contract, the value is `0` (USDC
transfers don't send native token), and the `callData` is the encoded `transfer`
call:

```json theme={null}
{
  "idempotencyKey": "YOUR_IDEMPOTENCY_KEY",
  "walletId": "YOUR_WALLET_ID",
  "feeLevel": "HIGH",
  "refId": "YOUR_REF_ID",
  "contractAddress": "YOUR_SCA_WALLET_ADDRESS",
  "abiFunctionSignature": "executeBatch((address, uint256, bytes)[])",
  "abiParameters": [
    [
      [
        "0x1c7d4b196cb0c7b01d743fbc6116a902379c7238",
        "0",
        "0xa9059cbb000000000000000000000000a1404d9e7646b0112c49ae0296d6347c956d08670000000000000000000000000000000000000000000000000000000005f5e100"
      ],
      [
        "0x1c7d4b196cb0c7b01d743fbc6116a902379c7238",
        "0",
        "0xa9059cbb000000000000000000000000a1404d9e7646b0112c49ae0296d6347c956d08670000000000000000000000000000000000000000000000000000000005f5e100"
      ]
    ]
  ],
  "entitySecretCiphertext": "..."
}
```

The `contractAddress` is your SCA wallet address. The two subcalls in
`abiParameters` produce a total of 200 USDC transferred to the recipient.

### A USDC approval and CCTP burn

To send USDC across blockchains using CCTP, first approve the CCTP
`TokenMessenger` contract to spend your USDC, then call `depositForBurn` to
initiate the transfer. Batching runs both atomically:

```typescript theme={null}
import { AbiCoder, Interface } from "ethers";

const approveAbi = ["function approve(address spender, uint256 amount)"];
const burnAbi = [
  "function depositForBurn(uint256 amount, uint32 destinationDomain, bytes32 mintRecipient, address burnToken)",
];

const approveIface = new Interface(approveAbi);
const burnIface = new Interface(burnAbi);

const approveData: string = approveIface.encodeFunctionData("approve", [
  "0x9f3B8679c73C2Fef8b59B4f3444d4e156fb70AA5", // TokenMessenger
  100_000_000n, // 100 USDC
]);

const mintRecipient: string = AbiCoder.defaultAbiCoder().encode(
  ["address"],
  ["0xc4b69f1f26c820e7fa18c925da8bf2b2a3357fe0"], // destination wallet
);

const burnData: string = burnIface.encodeFunctionData("depositForBurn", [
  100_000_000n,
  2, // Avalanche destination domain
  mintRecipient,
  "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", // USDC on source blockchain
]);
```

For the full list of CCTP `destinationDomain` values, see the
[CCTP domain list](/cctp/cctp-supported-blockchains#cctp-supported-domains).

Send the batch. The first subcall targets the USDC contract with the encoded
`approve` calldata; the second targets the `TokenMessenger` with the encoded
`depositForBurn` calldata:

```json theme={null}
{
  "idempotencyKey": "YOUR_IDEMPOTENCY_KEY",
  "walletId": "YOUR_WALLET_ID",
  "feeLevel": "HIGH",
  "refId": "YOUR_REF_ID",
  "contractAddress": "YOUR_SCA_WALLET_ADDRESS",
  "abiFunctionSignature": "executeBatch((address, uint256, bytes)[])",
  "abiParameters": [
    [
      [
        "0x1c7d4b196cb0c7b01d743fbc6116a902379c7238",
        "0",
        "0x095ea7b30000000000000000000000009f3b8679c73c2fef8b59b4f3444d4e156fb70aa50000000000000000000000000000000000000000000000000000000005f5e100"
      ],
      [
        "0x9f3B8679c73C2Fef8b59B4f3444d4e156fb70AA5",
        "0",
        "0x6fd3504e0000000000000000000000000000000000000000000000000000000005f5e1000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c4b69f1f26c820e7fa18c925da8bf2b2a3357fe00000000000000000000000001c7d4b196cb0c7b01d743fbc6116a902379c7238"
      ]
    ]
  ],
  "entitySecretCiphertext": "..."
}
```

## Retrieve batched transactions

Set a `refId` on the request, then filter
[`GET /transactions`](/api-reference/wallets/developer-controlled-wallets/list-transactions)
by that `refId` to retrieve every transaction in the batch.
