💎 Ethereum
trace_get

trace_get RPC Method

Executes traces for the given transaction and only returns specified trace indexes.

Parameters

Transaction hash [required]

The transaction hash to trace.

Index positions [required]

The array of index positions of the traces to return. Hex encoded.

Need RPC API keys?

Get 12.5M archival requests for free today.

Returns

  • The trace object.

    • action - The action performed, parity style.

      • from - The sender address.

      • to - The receiver address.

      • callType - The type of the call, either call or delegatecall.

      • gas - The gas provided.

      • input - The input data of the action (transaction).

      • value - The amount of ETH sent in this action (transaction).

      • author - The author of this transaction, for some transaction types.

      • rewardType - The type of the reward, for reward transactions.

    • blockHash - The hash of the block where this action happened.

    • blockNumber - The number of the block where this action happened.

    • result - The result object, parity style.

      • gasUsed - The amount of gas used by this transaction.

      • output - The output of this transaction.

    • subtraces - The number of traces of internal transactions that happened during this transaction.

    • traceAddress - The trace addresses (array) where the call executed (every contract where code was executed).

    • transactionHash - The hash of the transaction being traced.

    • transactionPosition - The position of the transaction in the block.

    • type - The type of the transaction like call or create or reward.

Request

POST https://<network>.chainnodes.org/YOUR-API-KEY

Example

💡

Confusing? Ask blockchain developers in Chainnodes Telegram Chat (opens in a new tab)

  • HTTPS POST Request with a JSON RPC call in the body
  • Replace YOUR-API-KEY with the API key from your Chainnodes.org Dashboard
  • You can use a different supported network by replacing mainnet
curl https://mainnet.chainnodes.org/YOUR-API-KEY \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"method":"trace_get","params":["0x6cb6f41be1384dfb2c03eb3de02b68440923575baf77fb1f8b7ccf3ed9505dd6", ["0x0"]],"id":1,"jsonrpc":"2.0"}'

Body

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "action": {
            "from": "0x000000000000ad05ccc4f10045630fb830b95127",
            "callType": "delegatecall",
            "gas": "0x1e399c",
            "input": "0xb3be57f80000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000001.....",
            "to": "0x983e96c26782a8db500a6fb8ab47a52e1b44862d",
            "value": "0x0"
        },
        "blockHash": "0x70c05b19b13856e90b07bb559cd9b7e222810d812543ba4bc2afe7990a79a586",
        "blockNumber": 16990620,
        "result": {
            "gasUsed": "0x1a5b1e",
            "output": "0x"
        },
        "subtraces": 10,
        "traceAddress": [
            0
        ],
        "transactionHash": "0x6cb6f41be1384dfb2c03eb3de02b68440923575baf77fb1f8b7ccf3ed9505dd6",
        "transactionPosition": 140,
        "type": "call"
    }
}