Bulk Withdrawal ERC20 Tokens - Multisig

Send multiple ERC20 token transfers in a single transaction using a multisig wallet. See the Guide.

  1. Build a bulk withdrawal transaction by providing multiple recipients in your transaction request, each specifying the recipient address and amount. The SDK consolidates the recipients array into a single transaction that interacts with the batcher contract. The contract then distributes the tokens to each recipient address according to the specified amounts.

    All transfers in a batch must use the same token type. Maximum batch size varies by network (typically around 100 recipients per transaction).

    Prerequisites: Complete Get Started and Create Wallets. Also complete Deposit Assets and Enable Bulk Withdrawals of ERC20 Tokens. Ensure you have sufficient balance of the native coin to cover gas fees.

    API Reference

  2. After building the transaction, sign it and send it to BitGo for processing. For multisig wallets, you can use sendMany to build, sign, and send in one operation. Provide the same recipients array, the token name, and your wallet passphrase.

    API Reference

// 1. Build a Bulk Withdrawal Transaction
// Use the JavaScript SDK for this step (see JavaScript tab)
// 2. Sign and Send Transaction
// Use the JavaScript SDK for this step (see JavaScript tab)
Response
// 2. Sign and Send Transaction Response
{
  "transfer": {
    "coin": "opeth:usdc",
    "id": "63727a81cdbc820007b27caa7b76016d",
    "wallet": "63726fde0a3c94000758f2790536041d",
    "txid": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "height": 0,
    "date": "2023-11-14T17:27:29.128Z",
    "type": "send",
    "value": "-600000000",
    "valueString": "-600000000",
    "baseValueString": "-600000000",
    "baseValueWithoutFeesString": "-600000000",
    "feeString": "0",
    "payGoFee": 0,
    "payGoFeeString": "0",
    "state": "signed",
    "instant": false
  },
  "txid": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
  "status": "signed"
}