Skip to content
This repository was archived by the owner on Jun 8, 2026. It is now read-only.
This repository was archived by the owner on Jun 8, 2026. It is now read-only.

Gas estimation issues with batched ERC20 transfers. #148

Description

@developerspeak

I'm trying to batch several ERC20 transfers inside of execTransactions, but the call always fails with a TransactionError: batch transaction execution expected to fail error. Using v3.0.0 of the CPK. This happens even for a single transfer (i.e. transactions.length === 1).

const transactions = receivers.map(receiver => ({
    operation: CPK.CALL,
    to: token.address,
    value: 0,
    data: token.interface.functions.transfer.encode([receiver.address, receiver.amount])
  })
);

const txResult = await cpk.execTransactions(transactions);  // <--- throws exception

What am I doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions