> ## 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.

# trace_transaction

Returns all traces of given transaction.

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

***

## **Parameters**

`hash` - String - Required - The hash of a transaction

## **Returns**

`array` - The block traces, which have the following fields (all return types are hexadecimal unless otherwise noted):

* `action` - object The ParityTrace action object containing call details
  * `from` - string - The address of the sender
  * `callType` - string - The type of method such as call, staticcall, delegatecall
  * `gas` - string - The gas provided by the sender, encoded as hexadecimal
  * `input` - string - The input data sent along with the transaction
  * `to` - string - The address of the receiver
  * `value` - string - The integer of the value sent with this transaction, encoded as hexadecimal
* `blockHash` - string - The hash of the block where this transaction was included
* `blockNumber` - integer - The block number where this transaction was in
* `result` - object - The result of the trace execution
  * `gasUsed` - string -The amount of gas used by this specific transaction
  * `output` - string - The return value of the contract call, empty if no RETURN executed
* `subtraces` - integer - The number of subtraces (internal calls) made by the transaction
* `traceAddress` - array - The list of addresses where the call executed, including parent addresses and call order
* `transactionHash` - string - The hash of the transaction
* `transactionPosition` - integer - The transaction index position within the block
* `type` - string - The type of the trace, such as call or create

```json theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
// Result
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "action": {
        "from": "0x7a8bcda73a1eca3f47944a7c9ee0133adce3d073",
        "callType": "call",
        "gas": "0x25072",
        "input": "0x64489bf50000000000000000000000000000000000000000000000000021c0331d5dc00000000000000000000000000019e315ec9cce550dcfe7e3972f148219...",
        "to": "0xbff976f8874814e6f2ee98d559826812ff26597f",
        "value": "0x0"
      },
      "blockHash": "0x241a36521807e99d82624139dd3dd2ee0007c3126d9e15b82d08e2e76b6b7c8f",
      "blockNumber": 73949032,
      "result": {
        "gasUsed": "0x1ae57",
        "output": "0x"
      },
      "subtraces": 0,
      "traceAddress": [],
      "transactionHash": "0x6761ad2af540c24d7168489c98e77e8910eba2d07294ae25f24ceeeba11fb382",
      "transactionPosition": 1,
      "type": "call"
    }
  ]
}
```

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


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