Skip to main content
Use the Multicall3From contract to batch multiple USDC transfers into one Arc transaction. This tutorial shows the full flow with viem, ethers.js, Python, and curl. You will configure a client, encode two ERC-20 transfer(...) subcalls, submit them through Multicall3From.aggregate3(...), and verify the resulting Transfer events. To learn how Multicall3From preserves your wallet as the sender, see Batched transactions.

Prerequisites

Before you begin, ensure that you’ve:
  • Installed Node.js v22+ for the TypeScript examples, or Python 3.10+ for the Python example.
  • Created an Arc Testnet wallet.
  • Funded the wallet with testnet USDC from the Circle Faucet.
  • Chosen two recipient addresses on Arc Testnet.

Step 1. Set up the project

Create a new project and install the dependencies for the client library you want to use:
Create an .env file:
Shell
Add your configuration:
.env
Replace YOUR_PRIVATE_KEY with the 0x-prefixed private key for the funded wallet. Replace each recipient value with an Arc Testnet address.

Step 2. Review the contract address and ABI

Arc Testnet uses the following predeployed contracts for this tutorial: For the full address list, see contract addresses. Create multicall3from-abi.json in your project:
multicall3from-abi.json
The script you build in the next steps loads this ABI file from the project root.

Step 3. Configure the client connection

Create the script file for your client library. The first chunk reads the wallet and recipient configuration from .env, sets the contract addresses, loads the Multicall3From ABI, and creates the clients that read chain state and submit transactions.
Create viem-batch.ts:
TypeScript