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

# debug_traceTransaction

Returns all traces of a given transaction

### Body

<ParamField body="id" type="number" placeholder="1">
  Serves as a unique identifier for the request
</ParamField>

<ParamField body="jsonrpc" type="string" placeholder="2.0">
  Indicates the version of JSON-RPC being used
</ParamField>

<ParamField body="method" type="string" placeholder="debug_traceTransaction">
  Represents the name of the remote procedure or method to be called
</ParamField>

<ParamField body="params" type="array">
  Contains the list of parameters passed to the remote method

  <ParamField body="transactionHash" type="string">
    The transaction hash that needs to be traced, encoded in hexadecimal format
  </ParamField>

  <ParamField body="object" type="object">
    <Expandable title="Object">
      <ParamField body="tracer" type="string">
        The type of tracer. It could be callTracer or prestateTracer

        <Expandable title="string">
          <ParamField body="callTracer" type="string">
            The calltracer keeps track of all call frames, including depth 0 calls, that are made during a transaction
          </ParamField>

          <ParamField body="prestateTracer" type="string">
            The prestateTracer replays the transaction and tracks every part of state that occured during the transaction
          </ParamField>
        </Expandable>
      </ParamField>

      <ParamField body="tracerConfig" type="Object">
        The object to specify the configurations of the tracer

        <Expandable title="Object">
          <ParamField body="onlyTopCall" type="bool">
            When set to true, this will only trace the primary (top-level) call and not any sub-calls.
          </ParamField>
        </Expandable>
      </ParamField>

      <ParamField body="timeout" type="string">
        A string of decimal integers that overrides the JavaScript-based tracing calls default timeout of 5 seconds
      </ParamField>
    </Expandable>
  </ParamField>
</ParamField>

### Response

<ResponseField name="id" type="number">
  Returns unique identifier for the request
</ResponseField>

<ResponseField name="jsonrpc" type="string">
  Returns the version of JSON-RPC being used
</ResponseField>

<ResponseField name="result" type="object">
  <Expandable title="result">
    <ResponseField name="callTracer" type="object">
      The callTracer tracks all the call frames executed during a transaction, including depth 0.

      <Expandable title="callTracer">
        <ResponseField name="type" type="string">
          CALL or CREATE
        </ResponseField>

        <ResponseField name="from" type="string">
          address
        </ResponseField>

        <ResponseField name="to" type="string">
          address
        </ResponseField>

        <ResponseField name="value" type="string">
          hex-encoded amount of value transfer
        </ResponseField>

        <ResponseField name="gas" type="string">
          hex-encoded gas provided for call
        </ResponseField>

        <ResponseField name="gasUsed" type="string">
          hex-encoded gas used during call
        </ResponseField>

        <ResponseField name="input" type="string">
          call data
        </ResponseField>

        <ResponseField name="output" type="string">
          return data
        </ResponseField>

        <ResponseField name="error" type="string">
          error, if any
        </ResponseField>

        <ResponseField name="type" type="string">
          CALL or CREATE
        </ResponseField>

        <ResponseField name="revertReason" type="string">
          Solidity revert reason, if any
        </ResponseField>

        <ResponseField name="calls" type="array">
          list of sub-calls
        </ResponseField>
      </Expandable>
    </ResponseField>

    or

    <ResponseField name="prestateTracer" type="object">
      Executing a transaction requires the prior state, including account of sender and recipient, contracts that are called during execution, etc.

      <Expandable title="prestateTracer">
        <ResponseField name="prestateTracer" type="array">
          <Expandable title="prestateTracer">
            <ResponseField name="prestateTracerObject" type="object">
              <Expandable title="prestateTracerObj">
                <ResponseField name="balance" type="string">
                  balance in mol
                </ResponseField>

                <ResponseField name="nonce" type="string">
                  nonce
                </ResponseField>

                <ResponseField name="code" type="string">
                  hex-encoded bytecode
                </ResponseField>

                <ResponseField name="storage" type="map">
                  storage slots of the contract
                </ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash Example Request theme={null}
  curl  'https://rpc1.aries.axiomesh.io' \
  --header 'Content-Type: application/json' \
  --data '{
      "jsonrpc": "2.0",
      "method": "debug_traceTransaction",
      "params": ["0x7832ec555494bd6dd8578c3f47aea5c346185ed83a8a2be73bfc5b7918a283bd",
            {
                 "tracer": "callTracer"
            }],
      "id": 1
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
      "jsonrpc": "2.0",
      "id": 1,
      "result": {
          "from": "0x14e1d181f211eb211b24fe53bd8ebb1580a00eab",
          "gas": "0x5208",
          "gasUsed": "0x5208",
          "to": "0x52100e671baa7af7af2f62ecadc2442453b65950",
          "input": "0x",
          "value": "0xad78ebc5ac6200000",
          "type": "CALL"
      }
  }
  ```
</ResponseExample>
