Skip to main content
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: 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.

How batching works

Every SCA and MSCA implements an executeBatch function on the wallet contract:
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:
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:
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:
For the full list of CCTP destinationDomain values, see the CCTP domain list. 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:

Retrieve batched transactions

Set a refId on the request, then filter GET /transactions by that refId to retrieve every transaction in the batch.