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

# trace_block

> Returns traces created at given block.

### Parameters

<ParamField query="chainId" type="string" default="1" required>
  Unique identifier for a blockchain network.
</ParamField>

<ParamField body="id" type="number" default={1} required>
  Request identifier used to match responses.
</ParamField>

<ParamField body="jsonrpc" type="string" default="2.0" required>
  JSON-RPC version.
</ParamField>

<ParamField body="method" type="string" default="trace_block" required>
  JSON-RPC method name.
</ParamField>

<ParamField body="params" type="object" default={["0x2ed119"]} placeholder="[&#x22;0x2ed119&#x22;]" required>
  Parameters for trace\_block method: \[defaultBlock]

  Positional parameters for <code>trace\_block</code>:

  <ul>
    <li><code>params\[0]</code>: Integer block number.</li>
    <li><code>params\[1]</code>: Block tag: "earliest", "latest", or "pending".</li>
  </ul>
</ParamField>

### Returns

<ResponseField name="result" type="array">
  Array - Block traces.

  <Expandable title="items">
    <ResponseField name="items[]" type="object">
      Single block-level trace result.

      <Expandable title="properties">
        <ResponseField name="action" type="object">
          Details of the action performed (e.g., call, create, suicide).

          <Expandable title="properties">
            <ResponseField name="callType" type="string">
              Type of call (e.g., call, delegatecall, staticcall, etc.).
            </ResponseField>

            <ResponseField name="from" type="string">
              Address that initiated the action.
            </ResponseField>

            <ResponseField name="to" type="string">
              Recipient address (if applicable).
            </ResponseField>

            <ResponseField name="input" type="string">
              Input data sent along with the call.
            </ResponseField>

            <ResponseField name="value" type="string">
              Value transferred in Wei.
            </ResponseField>

            <ResponseField name="init" type="string">
              Contract creation code (only for create).
            </ResponseField>

            <ResponseField name="address" type="string">
              Contract address created or affected.
            </ResponseField>

            <ResponseField name="balance" type="string">
              Balance involved in suicide actions.
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="result" type="object">
          Result of the action (if successful).

          <Expandable title="properties">
            <ResponseField name="gasUsed" type="string">
              Gas used for this action.
            </ResponseField>

            <ResponseField name="output" type="string">
              Returned data (if any).
            </ResponseField>

            <ResponseField name="code" type="string">
              Deployed contract code (if applicable).
            </ResponseField>

            <ResponseField name="address" type="string">
              Address created (for contract creations).
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="subtraces" type="integer">
          Number of nested trace steps inside this one.
        </ResponseField>

        <ResponseField name="traceAddress" type="array">
          Path to this trace in nested trace structure.

          <Expandable title="items">
            <ResponseField name="items[]" type="integer" />
          </Expandable>
        </ResponseField>

        <ResponseField name="type" type="string">
          Type of trace (e.g., call, create, suicide).
        </ResponseField>

        <ResponseField name="error" type="string">
          Error message if the trace step failed.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash Curl theme={null}
  curl --request POST \
    --url https://api.uniblock.dev/uni/v1/json-rpc?chainId=1 \
    --header 'content-type: application/json' \
    --data '{
      "id": 1,
      "jsonrpc": "2.0",
      "method": "trace_block",
      "params": [
        "0x2ed119"
      ]
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json Success theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": [
      {
        "action": {
          "callType": "call",
          "from": "0xaa7b131dc60b80d3cf5e59b5a21a666aa039c951",
          "gas": "0x0",
          "input": "0x",
          "to": "0xd40aba8166a212d6892125f079c33e6f5ca19814",
          "value": "0x4768d7effc3fbe"
        },
        "blockHash": "0x7eb25504e4c202cf3d62fd585d3e238f592c780cca82dacb2ed3cb5b38883add",
        "blockNumber": 3068185,
        "result": {
          "gasUsed": "0x0",
          "output": "0x"
        },
        "subtraces": 0,
        "traceAddress": [],
        "transactionHash": "0x07da28d752aba3b9dd7060005e554719c6205c8a3aea358599fc9b245c52f1f6",
        "transactionPosition": 0,
        "__truncated": true
      }
    ]
  }
  ```
</ResponseExample>
