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

# debug_traceTransaction

Returns all traces of a given transaction.

This method will use `80` [Compute Units](https://docs.validationcloud.io/nodeapi/about/billing.md).

***

> [!NOTE]
>
> Traces need the state of the traced block, so Linea Mainnet can trace the last 512 blocks, about an hour. For older blocks, `debug_traceBlockByNumber` and `debug_traceBlockByHash` return an empty list even when the block has transactions, and `debug_traceTransaction` returns JSON-RPC error `-32603` with the message `Internal error`. The example below uses a block from 3 December 2026: replace it with a block or transaction from the last 512 blocks, for example from `eth_getBlockByNumber` with `"latest"`.

## **Parameters**

`transactionHash` - String - Required - The transaction hash to be traced.

`object` - Object - Required - The tracer object with the following fields:

* `tracer` - String - The type of tracer, options are: `callTracer` or `prestateTracer`.
  * `callTracer` - String - The callTracer keeps track of all call frames, including depth - calls, that are made during a transaction.
  * `prestateTracer` - String - The prestateTracer replays the transaction and tracks every part of state that occurred during the transaction.
* `tracerConfig` - Object (Optional) - The object to specify the configurations of the tracer.
  * `onlyTopCall` - Boolean - 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.
* `timeout` - String (Optional) - A string of decimal integers that overrides the JavaScript-based tracing calls default timeout of 5 seconds. Example: `10s` for 10 seconds.

## **Returns**

`result` - With `callTracer`, an object with the result of the trace, containing:

* `from` - The address the transaction is sent from.
* `gas` - The integer of the gas provided for the transaction execution.
* `gasUsed` - The integer of the gas used.
* `to` - The address the transaction is directed to.
* `input` - The data given at the time of input.
* `value` - The integer of the value sent with this transaction.
* `type` - The type of call.

With `prestateTracer`, the result is instead a map keyed by account address, holding the state the transaction touched (such as `balance`, `nonce`, `code` and `storage`).

```json theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
// Result
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "from": "0xdeb02f83136766adf5f9add4a93b38de28087fee",
    "gas": "0x7a120",
    "gasUsed": "0x1c5ef",
    "to": "0x61b7492a40ae4c403629703a38d24851caa1e7e4",
    "input": "0xde5e0b9a000a5d7ac72f7f6e102979738bd07b91fc6346571ca8e2c44daa37c89f0a4f2d00000000000000000000000000000000000000000000000000000000...",
    "calls": [
      {
        "from": "0x61b7492a40ae4c403629703a38d24851caa1e7e4",
        "gas": "0x6d150",
        "gasUsed": "0x29c0",
        "to": "0x1f4b7011ee3d53969bb67f59428a9ec0477856e9",
        "input": "0x3937306f000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000...",
        "value": "0x0",
        "type": "CALL"
      },
      {
        "from": "0x61b7492a40ae4c403629703a38d24851caa1e7e4",
        "gas": "0x65b23",
        "gasUsed": "0xbb8",
        "to": "0x0000000000000000000000000000000000000001",
        "input": "0x0a9f594cd5c8fa3bcad9018b8717367859beb21d1d1e61e2ab33d34f49c5e5b1000000000000000000000000000000000000000000000000000000000000001b...",
        "output": "0x0000000000000000000000008c8167acfa0dc624e88054f5f4f92853ff0300cb",
        "type": "STATICCALL"
      },
      {
        "from": "0x61b7492a40ae4c403629703a38d24851caa1e7e4",
        "gas": "0x642c5",
        "gasUsed": "0xbb8",
        "to": "0x0000000000000000000000000000000000000001",
        "input": "0x0a9f594cd5c8fa3bcad9018b8717367859beb21d1d1e61e2ab33d34f49c5e5b1000000000000000000000000000000000000000000000000000000000000001c...",
        "output": "0x0000000000000000000000008c027d245d800f9887adb0a0bf23fb0816fc3d83",
        "type": "STATICCALL"
      },
      {
        "from": "0x61b7492a40ae4c403629703a38d24851caa1e7e4",
        "gas": "0x62a66",
        "gasUsed": "0xbb8",
        "to": "0x0000000000000000000000000000000000000001",
        "input": "0x0a9f594cd5c8fa3bcad9018b8717367859beb21d1d1e61e2ab33d34f49c5e5b1000000000000000000000000000000000000000000000000000000000000001b...",
        "output": "0x000000000000000000000000376038c76d067eae5cefa1042dd7fd382f9ebc61",
        "type": "STATICCALL"
      },
      {
        "from": "0x61b7492a40ae4c403629703a38d24851caa1e7e4",
        "gas": "0x61208",
        "gasUsed": "0xbb8",
        "to": "0x0000000000000000000000000000000000000001",
        "input": "0x0a9f594cd5c8fa3bcad9018b8717367859beb21d1d1e61e2ab33d34f49c5e5b1000000000000000000000000000000000000000000000000000000000000001c...",
        "output": "0x000000000000000000000000c3cfa4ff2a4b4fe39cf7ffdcdd44584ce57d244b",
        "type": "STATICCALL"
      },
      {
        "from": "0x61b7492a40ae4c403629703a38d24851caa1e7e4",
        "gas": "0x5f9a9",
        "gasUsed": "0xbb8",
        "to": "0x0000000000000000000000000000000000000001",
        "input": "0x0a9f594cd5c8fa3bcad9018b8717367859beb21d1d1e61e2ab33d34f49c5e5b1000000000000000000000000000000000000000000000000000000000000001b...",
        "output": "0x000000000000000000000000a761c71063cbdd6bce3d83b6da19bbac10aa23f7",
        "type": "STATICCALL"
      },
      {
        "from": "0x61b7492a40ae4c403629703a38d24851caa1e7e4",
        "gas": "0x5e14b",
        "gasUsed": "0xbb8",
        "to": "0x0000000000000000000000000000000000000001",
        "input": "0x0a9f594cd5c8fa3bcad9018b8717367859beb21d1d1e61e2ab33d34f49c5e5b1000000000000000000000000000000000000000000000000000000000000001c...",
        "output": "0x000000000000000000000000c4940a913488e924820a66dabcd0cf33830b8c1d",
        "type": "STATICCALL"
      }
    ],
    "value": "0x0",
    "type": "CALL"
  }
}
```

```bash title="mainnet" theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
curl https://mainnet.linea.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"debug_traceTransaction","params":["0x5dc8d47cfcda136bcd84d3661c7bbaf4e53e23ba70b46bb5a310481ed724a034",{"tracer":"callTracer"}],"id":1}'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.