🔵 Base
debug_traceCallMany

🛠️ debug_traceCallMany RPC Method (Base Chain)

The debug_traceCallMany method simulates multiple bundles of transactions and returns detailed traces — without sending anything to the blockchain.

It's like eth_callMany, but returns full debug traces so you can see exactly what happens inside each call.


Parameters

1. bundles [required]

This is an array of transaction bundles. Each bundle includes:

  • transactions: An array of transaction objects (just like in eth_call)
  • blockOverride (optional): You can override the default block context:
    • blockNumber: Custom block number for the simulation
    • blockHash: Custom block hash (can be used in contracts via BLOCKHASH)
    • coinbase: Custom miner address
    • timestamp: Custom block timestamp
    • difficulty: Custom block difficulty
    • gasLimit: Custom block gas limit
    • baseFee: Custom base fee

2. simulation context [required]

Controls when and where the simulation happens:

  • blockNumber or Tag: Choose "latest", "earliest", "pending", "safe", "finalized", or a hex block number
    đź”’ Note: "safe" and "finalized" only work on Ethereum and Arbitrum

  • transactionIndex: Where the simulated txs appear in the block. Default is -1, which means they run after the real txs.


3. state overrids [optional]

If you want to override specific accounts’ balance or code during the simulation, use this.

{
  "0xAddress": {
    "balance": "0xDE0B6B3A7640000" // 1 ETH
  }
}

4. timeout [optional]

The max simulation time in milliseconds (default: 5000 ms). Use this if simulating a large number of complex calls.


5. trace type [optional]

Use a tracer for more advanced introspection:

  • tracer: "callTracer" or "prestateTracer"
    • "callTracer" - The calltracer keeps track of all call frames, including depth 0 calls, that are made during a transaction.
    • "prestateTracer" - The prestateTracer replays the transaction and tracks every part of state that occured during the transaction
  • tracerConfig:
    • onlyTopCall: If true, skips sub-calls for faster output. When set to true, this will only trace the primary (top-level) call and not any sub-calls. It eliminates the additional processing for each call frame.

Returns

The return is the same structure as debug_traceCall (opens in a new tab), except you get an array of traces — one for each bundle/transaction.

callTracer response

FieldDescription
typeType of call (CALL, DELEGATECALL, etc.)
fromSender address
toRecipient
gasGas limit provided
gasUsedGas actually used
valueAmount sent
inputFunction calldata
outputReturn value
errorError string (if any)
callsList of internal sub-calls
revertReasonReason for revert (if any)

prestateTracer response

For each contract touched:

  • balance: Contract balance in wei
  • code: Contract bytecode
  • nonce: Contract nonce
  • storage: Key-value mapping of storage slots

struct/opcode response (default if no tracer used)

Shows low-level execution logs:

  • failed: Was execution successful?
  • gas: Total gas used
  • returnValue: Output of the call
  • structLogs: Opcode trace steps:
    • pc, op, gas, gasCost, depth
    • stack, storage, memory
    • refund, error

Need RPC API keys?

Get 12.5M archival requests for free today.

Request

POST https://base-mainnet.chainnodes.org/YOUR-API-KEY

Example

đź’ˇ
curl https://base-mainnet.chainnodes.org/YOUR-API-KEY \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"debug_traceCallMany","params":[[{"transactions":[{"from":"0xDAFEA492D9c6733ae3d56b7Ed1ADB60692c98Bc5","to":"0xdAC17F958D2ee523a2206206994597C13D831ec7","gas":"0x92c0","gasPrice":"0x7896e72a000","value":"0x0","data":"0x70a0823100000000000000000000000047ac0fb4f2d84898e4d9e7b4dab3c24507a6d503"}],"blockOverride":{"blockNumber":"0xe39dd0"}}],{"blockNumber":"0x103434E","transactionIndex":234},{}],"id":1}'

Sample Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    [
      {
        "structLogs": [
          {
            "pc": 0,
            "op": "PUSH1",
            "gas": 16136,
            "gasCost": 3,
            "depth": 1,
            "stack": [],
            "memory": []
          },
          {
            "pc": 2,
            "op": "PUSH1",
            "gas": 16133,
            "gasCost": 3,
            "depth": 1,
            "stack": ["0x60"],
            "memory": []
          },
          {
            "pc": 4,
            "op": "MSTORE",
            "gas": 16130,
            "gasCost": 12,
            "depth": 1,
            "stack": ["0x60", "0x40"],
            "memory": [
              "0000000000000000000000000000000000000000000000000000000000000000",
              "0000000000000000000000000000000000000000000000000000000000000000"
            ]
          }
        ]
      }
    ]
  ]
}