> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# debug_traceCall | Arbitrum

Arbitrum API method that traces the execution of [eth\_call](/reference/arbitrum-ethcall) within the context of a specific block's execution. This method uses the final state of the parent block as its base and allows developers to trace the execution of a particular call without submitting an on-chain transaction.

<Note>
  Learn how to [deploy a node](/docs/debug-and-trace-apis#arbitrum) with the debug and trace API methods enabled.
</Note>

<Warning>
  This method is available for post-Nitro blocks only (block 22,207,815 and later). For pre-Nitro blocks, use [`arbtrace_call`](/reference/arbitrum-arbtrace-call) instead.
</Warning>

<Check>
  **Get your own node endpoint today**

  [Start for free](https://console.chainstack.com/) and get your app to production levels immediately. No credit card required.

  You can sign up with your GitHub, X, Google, or Microsoft account.
</Check>

## Parameters

* `object` — the transaction call object:
  * `from` — (optional) the address used to send the transaction.
  * `to` — the address to which the transaction is directed, a wallet or a smart contract.
  * `gas` — (optional) the maximum amount of gas that can be used by the transaction.
  * `gasPrice` — (optional) the amount of gas price the sender is willing to pay for each gas unit in Wei.
  * `value` — (optional) the value sent with this transaction, encoded as hexadecimal.
  * `data` — (optional) additional data to be sent with the call, usually used to invoke functions from smart contracts.

* `quantity or tag` — the block number in hex format or block tag (`latest`, `earliest`, `pending`, `safe`, `finalized`).

* `object` — (optional) an object identifying the type of tracer and its configuration:
  * `4byteTracer` — tracer that captures the function signatures and call data sizes.
  * `callTracer` — tracer that captures information on all call frames executed during a transaction.
  * `prestateTracer` — tracer with two modes: `prestate` and `diff`.

<Note>
  Find a complete [list of available built-in tracers](/reference/arbitrum-debug-and-trace-rpc-methods#pre-built-tracers) in the debug and trace overview.
</Note>

You can also use additional configuration parameters:

* `disableStorage` — when enabled, prevents tracing of storage changes.
* `disableStack` — when enabled, skips tracing of stack changes.
* `enableMemory` — when `false`, prevents tracing of memory changes.
* `enableReturnData` — when `false`, prevents tracing of return data.
* `timeout` — timeout period for JavaScript-based tracing calls. Default is `5s`.

<Note>
  When using one of the built-in tracers, the `enableMemory`, `disableStorage`, `disableStack`, and `enableReturnData` settings will not have any effect.

  When no built-in tracer is selected, the response defaults to the Struct/opcode logger.
</Note>

## Response types

### `callTracer` response

* `object` — the `callTracer` traces object:
  * `from` — the address of the sender who initiated the transaction.
  * `gas` — the units of gas included in the transaction by the sender.
  * `gasUsed` — the total used gas by the call, encoded as hexadecimal.
  * `to` — the address of the recipient of the transaction. For contract creation transactions, this field is `null`.
  * `input` — the optional input data sent with the transaction.
  * `output` — the return value of the call, encoded as a hexadecimal string.
  * `error` — an error message in case the execution failed.
  * `revertReason` — the reason why the transaction was reverted, returned by the smart contract if any.
  * `calls` — a list of sub-calls made by the contract during the call, each represented as a nested call frame object.

### `4byteTracer` response

* `object` — the `4byteTracer` traces object:
  * `result` — a map of the function signature, the call data size, and how many times the function was called.

### `prestateTracer` response

* `object` — the `prestateTracer` traces object:
  * `smart contract address` — the address of the smart contract associated with the result.
    * `balance` — the balance of the contract, expressed in Wei and encoded as a hexadecimal string.
    * `code` — the bytecode of the contract, encoded as a hexadecimal string.
    * `nonce` — the nonce of the account associated with the contract, represented as an unsigned integer.
    * `storage` — a map of key-value pairs representing the storage slots of the contract.

## `debug_traceCall` code examples

<CodeGroup>
  ```javascript ethers.js theme={"system"}
  const ethers = require('ethers');
  const NODE_URL = "YOUR_CHAINSTACK_ENDPOINT";
  const provider = new ethers.JsonRpcProvider(NODE_URL);

  const traceCall = async () => {
    const call = {
      to: "0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9",
      data: "0x70a08231000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa96045"
    };

    const block = "latest";
    const tracer = { tracer: "callTracer" };
    const traces = await provider.send("debug_traceCall", [call, block, tracer]);
    console.log(traces);
  };

  traceCall();
  ```

  ```python web3.py theme={"system"}
  from web3 import Web3
  node_url = "YOUR_CHAINSTACK_ENDPOINT"
  web3 = Web3(Web3.HTTPProvider(node_url))

  call = {
      'to': '0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9',
      'data': '0x70a08231000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa96045'
  }

  block = 'latest'
  tracer = {"tracer": "callTracer"}
  tx_traces = web3.provider.make_request('debug_traceCall', [call, block, tracer])
  print(tx_traces)
  ```
</CodeGroup>

## Use case

A practical use case for the `debug_traceCall` method is to simulate and trace a smart contract function call without submitting an actual transaction. Developers can use this to inspect internal calls, verify expected behavior, and debug contract interactions before committing transactions on-chain. This is particularly useful for testing complex DeFi interactions on Arbitrum.


## OpenAPI

````yaml /openapi/arbitrum_node_api/debug_and_trace/debug_traceCall.json POST /66f812de2a6724a75a51f60dd6f2a154
openapi: 3.0.0
info:
  title: Chainstack Node API
  version: 1.0.6
  description: >-
    This is an API for interacting with a Chainstack node using the
    debug_traceCall method.
servers:
  - url: https://nd-954-882-037.p2pify.com
security: []
paths:
  /66f812de2a6724a75a51f60dd6f2a154:
    post:
      tags:
        - upload
      summary: debug_traceCall
      operationId: arbitrumTraceCall
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: debug_traceCall
                params:
                  type: array
                  items:
                    anyOf:
                      - type: object
                        properties:
                          to:
                            type: string
                            default: '0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9'
                          data:
                            type: string
                            default: >-
                              0x70a08231000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa96045
                      - type: string
                        default: latest
                      - type: object
                        properties:
                          tracer:
                            type: string
                            default: callTracer
                  default:
                    - to: '0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9'
                      data: >-
                        0x70a08231000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa96045
                    - latest
                    - tracer: callTracer
      responses:
        '200':
          description: The result of the debug trace call.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: object

````