Skip to main content
Try Cobo WaaS Skill in your AI coding assistant (Claude Code, Cursor, etc.). Describe your needs in natural language to auto-generate production-ready SDK code and debug faster 🚀
A batch transfer smart contract allows you to execute multiple token transfers in a single on-chain transaction, making it suitable for scenarios such as batch payouts or batch withdrawals. Compared to repeatedly calling the transfer API, the batch method reduces the need for multiple signatures and requests, improving operational efficiency. This guide explains how to use the Call smart contract API to invoke the batch transfer smart contract deployed by Cobo, enabling batch token transfers.
The transaction fee for batch transfers using the smart contract API may not necessarily be lower than the total fee for multiple individual transfer token API calls. The actual cost depends on the on-chain gas price and the number of transfers; with a small number of recipients, batch transfers could even be more expensive. We recommend using the Estimate transaction fee API to compare the cost of both approaches before initiating a transfer.

Supported chains

The following EVM-compatible chains are supported:
  • Ethereum Mainnet
  • BNB Smart Chain
  • Base Mainnet
  • Arbitrum One
  • Polygon PoS
The address of the batch transfer smart contract is 0x3d963e23a9229D2ACd25E9FFC358be1a35460ecc

Prerequisites

  • You have set up Cobo Accounts and successfully sent requests as described in Send your first API request.
  • You are familiar with and able to use the Call smart contract API.
  • You have basic knowledge of interacting with smart contracts, including preparing calldata, locating contract methods, and using the approve method on a token contract to authorize the batch transfer contract to spend tokens.
  • The batch transfer feature currently only supports transactions initiated from MPC Wallets and Custodial Wallets (Web3 Wallets).

Batch transfer of ETH

The following steps apply to batch transfers of ETH (native coin) on the supported chains:
  1. Prepare parameters
    • Use the sendEther method to generate calldata (either with Cobo’s script or your own tool).
      When generating calldata, provide:
      • recipients (address[]): array of recipient addresses.
      • values (uint256[]): array of amounts for each address (in wei).
    • The number of recipients must not exceed 200 (recipients array length ≤ 200).
  2. Call the Call smart contract API
    • Specify the batch transfer contract address: 0x3d963e23a9229D2ACd25E9FFC358be1a35460ecc
    • Provide the generated calldata.
    • The value in the API request must equal the sum of all values in the values array in the calldata.
  3. Wait for confirmation and check results
    • Use the returned tx_hash to check the transaction status.
    • In Cobo Portal’s transaction history, you will see a transaction of the contract call type.
    • If any recipient address belongs to a Cobo Account, the corresponding organization will also see a transaction of the deposit type.

Batch transfer of other tokens

The following steps apply to batch transfers of ERC-20 tokens on the supported chains:
  1. Call the token contract’s approve method
    • Each token has its own contract address, so run approve on the specific token’s contract.
    • Approve the source address (the one specified in the source field of the smart contract call request).
    • The approved amount must be greater than or equal to the total transfer amount.
      Before calling the batch transfer contract, use an on-chain query or API request to confirm that the approve transaction has been successfully confirmed and completed.
  2. Prepare parameters
    • Use the sendToken method to generate calldata (either with Cobo’s script or your own tool).
      When generating calldata, provide:
      • token (address): ERC-20 token contract address.
      • recipients (address[]): array of recipient addresses.
      • values (uint256[]): array of amounts for each address (in the token’s smallest unit).
    • The number of recipients must not exceed 200 (recipients array length ≤ 200).
  3. Call the Call smart contract API
  4. Wait for confirmation and check results
    • Use the returned tx_hash to check the transaction status.
    • In Cobo Portal’s transaction history, you will see a transaction of the contract call type.
    • If any recipient address belongs to a Cobo Account, the corresponding organization will also see a transaction of the deposit type.

Additional notes

  • You can use Fee Station to pay on-chain transaction fees with gas tokens or USD stablecoins.
  • You can also manually call the batch transfer smart contract with the “Write Contract” function on a blockchain explorer. This method requires connecting your MPC Wallet or Custodial Wallet (Web3 Wallet) using a supported browser extension (such as Cobo Connect), without using API calls.

Common failure causes

  • Insufficient balance or insufficient approval amount.
  • Mismatch between the length of recipients and the length of the amount array.
  • Number of recipients exceeds the limit.
  • Mismatch between the value in the API request and the amounts in the calldata (for ETH transfers).
  • Insufficient gas limit.

Example script for generating calldata

The following is a Python script provided by Cobo to generate calldata. You can also generate on your own.