For AI agents: an LLM-friendly Markdown version of every page is available by appending .md to its URL or by sending an Accept: text/markdown request header. The full documentation index is at https://www.ankr.com/docs/llms.txt
Skip to main content

Telos — trace

API reference for Telos. All methods ->

trace_transaction

Retrieves the traces created during the execution of a given transaction.

Parameters


  • id (integer; required): a request ID (example: 1).

  • jsonrpc (string; required): a JSON RPC spec used (example: 2.0).

  • method (string; required): a method used for the request.

  • params (array; required):

    • transactionHash (string; required): the hash of the transaction for which you want to retrieve the traces.

Returns


  • action (object)

    • For call:
      • callType (string): the type of call (e.g., "call", "delegatecall", "staticcall").
      • from (string): the address that initiated the call.
      • to (string): the address that was called.
      • gas (string): the amount of gas provided for the call.
      • input (string): the input data for the call.
      • value (string): the amount of Wei sent with the call.
    • For create:
      • from (string): the address that created the contract.
      • gas (string): the amount of gas provided for the creation.
      • init (string): the initialization code for the contract.
      • value (string): the amount of Wei sent with the creation.
    • For reward:
      • author (string): the address that received the reward.
      • value (string): the amount of Wei rewarded.
      • rewardType (string): the type of reward (e.g., "block", "uncle").
    • For suicide:
      • address (string): the address of the contract that self-destructed.
      • refundAddress (string): the address that received the remaining balance.
      • balance (string): the remaining balance of the contract.
  • blockHash (string): the hash of the block containing the transaction.

  • blockNumber (string): The number of the block containing the transaction.

  • result (object)

    • For call:
      • gasUsed (string): The amount of gas used by the call.
      • output (string): The output data from the call.
    • For create:
      • address (string): The address of the created contract.
      • code (string): The runtime code of the created contract.
      • gasUsed (string): The amount of gas used by the creation.
    • For reward: No additional fields.
    • For suicide: No additional fields.
  • subtraces (integer): The number of subtraces (nested traces) generated by this trace.

  • traceAddress (array of integers): The address within the trace hierarchy.

  • transactionHash (string): The hash of the transaction containing the trace.

  • transactionPosition (integer): The index position of the transaction within the block.

  • type (string): The type of trace (e.g., "call", "create", "reward", "suicide").

Request example

curl -X POST https://rpc.ankr.com/telos/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "trace_transaction",
"params": ["0x58ddccddbc8d1deddf91e43e6623cdc2e1186f067dc687bb3928076a02bad39e"],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"action": {
"callType": "call",
"from": "0x339d413ccefd986b1b3647a9cfa9cbbe70a30749",
"gas": "0x38025",
"input": "0x3161b7f60000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000a50000000000000000000000000000000000000000000123a8d6d9f1c9e741075000000000000000000000000000000000000000000000000000000000017d78400000000000000000000000000000000000000000000000000000000000000010",
"value": "0x0",
"to": "0x2d61dcdd36f10b22176e0433b86f74567d529aaa"
},
"result": {
"gasUsed": "0x38025",
"output": "0x"
},
"subtraces": 1,
"traceAddress": [],
"type": "call",
"blockHash": "0xb20d0897ac3567d603afb646238b66e455bf28d234ce96cdbbe86ddc8d27c9e9",
"blockNumber": 344366750,
"transactionHash": "0x58ddccddbc8d1deddf91e43e6623cdc2e1186f067dc687bb3928076a02bad39e",
"transactionPosition": 0
},
{
"action": {
"callType": "delegatecall",
"from": "0x339d413ccefd986b1b3647a9cfa9cbbe70a30749",
"gas": "0x02e970",
"input": "0x3161b7f60000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000a50000000000000000000000000000000000000000000123a8d6d9f1c9e741075000000000000000000000000000000000000000000000000000000000017d78400000000000000000000000000000000000000000000000000000000000000010",
"value": "0x0",
"to": "0x2d61dcdd36f10b22176e0433b86f74567d529aaa"
},
"result": {
"gasUsed": "0x2a78"
},
"subtraces": 0,
"traceAddress": [
0
],
"type": "call",
"blockHash": "0xb20d0897ac3567d603afb646238b66e455bf28d234ce96cdbbe86ddc8d27c9e9",
"blockNumber": 344366750,
"transactionHash": "0x58ddccddbc8d1deddf91e43e6623cdc2e1186f067dc687bb3928076a02bad39e",
"transactionPosition": 0
}
]
}

trace_replayTransaction

Replays a transaction and returns the traces produced by its execution along with the state changes.

Parameters


  • id (integer; required): a request ID (example: 1).

  • jsonrpc (string; required): a JSON RPC spec used (example: 2.0).

  • method (string; required): a method used for the request.

  • params (array; required):

    • transactionHash (string): the hash of the transaction to be replayed.
    • traceTypes (array of strings): the types of traces to be included in the response. Possible value: trace.

Returns

The method returns an object that can include the following fields:

  • trace (array): an array of trace objects, similar to those returned by trace_transaction and trace_filter:

    • action (object)

      • For call:
        • callType (string): the type of call (e.g., "call", "delegatecall", "staticcall").
        • from (string): the address that initiated the call.
        • to (string): the address that was called.
        • gas (string): the amount of gas provided for the call.
        • input (string): the input data for the call.
        • value (string): the amount of Wei sent with the call.
      • For create:
        • from (string): the address that created the contract.
        • gas (string): the amount of gas provided for the creation.
        • init (string): the initialization code for the contract.
        • value (string): the amount of Wei sent with the creation.
      • For reward:
        • author (string): the address that received the reward.
        • value (string): the amount of Wei rewarded.
        • rewardType (string): the type of reward (e.g., "block", "uncle").
      • For suicide:
        • address (string): the address of the contract that self-destructed.
        • refundAddress (string): the address that received the remaining balance.
        • balance (string): the remaining balance of the contract.
    • blockHash (string): the hash of the block containing the transaction.

    • blockNumber (string): The number of the block containing the transaction.

    • result (object)

      • For call:
        • gasUsed (string): The amount of gas used by the call.
        • output (string): The output data from the call.
      • For create:
        • address (string): The address of the created contract.
        • code (string): The runtime code of the created contract.
        • gasUsed (string): The amount of gas used by the creation.
      • For reward: No additional fields.
      • For suicide: No additional fields.
    • subtraces (integer): The number of subtraces (nested traces) generated by this trace.

    • traceAddress (array of integers): The address within the trace hierarchy.

    • transactionHash (string): The hash of the transaction containing the trace.

    • transactionPosition (integer): The index position of the transaction within the block.

    • type (string): The type of trace (e.g., "call", "create", "reward", "suicide").

Request example

curl -X POST https://rpc.ankr.com/telos/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "trace_replayTransaction",
"params": ["0x58ddccddbc8d1deddf91e43e6623cdc2e1186f067dc687bb3928076a02bad39e", ["trace"]],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"output": "0x",
"stateDiff": null,
"trace": [
{
"action": {
"callType": "call",
"from": "0x339d413ccefd986b1b3647a9cfa9cbbe70a30749",
"gas": "0x38025",
"input": "0x3161b7f60000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000a50000000000000000000000000000000000000000000123a8d6d9f1c9e741075000000000000000000000000000000000000000000000000000000000017d78400000000000000000000000000000000000000000000000000000000000000010",
"value": "0x0",
"to": "0x2d61dcdd36f10b22176e0433b86f74567d529aaa"
},
"result": {
"gasUsed": "0x38025",
"output": "0x"
},
"subtraces": 1,
"traceAddress": [],
"type": "call"
},
{
"action": {
"callType": "delegatecall",
"from": "0x339d413ccefd986b1b3647a9cfa9cbbe70a30749",
"gas": "0x02e970",
"input": "0x3161b7f60000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000a50000000000000000000000000000000000000000000123a8d6d9f1c9e741075000000000000000000000000000000000000000000000000000000000017d78400000000000000000000000000000000000000000000000000000000000000010",
"value": "0x0",
"to": "0x2d61dcdd36f10b22176e0433b86f74567d529aaa"
},
"result": {
"gasUsed": "0x2a78"
},
"subtraces": 0,
"traceAddress": [
0
],
"type": "call"
}
],
"vmTrace": null
}
}

trace_replayBlockTransactions

Replays all the transactions in a given block and returns the traces produced by their execution along with the state changes.

Parameters


  • id (integer; required): a request ID (example: 1).

  • jsonrpc (string; required): a JSON RPC spec used (example: 2.0).

  • method (string; required): a method used for the request.

  • params (array; required):

    • blockHash (string): the hash of the block whose transactions you want to replay.
    • traceTypes (array of strings): the types of traces to be included in the response. Possible value: trace.

Returns

The method returns an object that can include the following fields:

  • trace (array): an array of trace objects, similar to those returned by trace_transaction and trace_filter:

    • action (object)

      • For call:
        • callType (string): the type of call (e.g., "call", "delegatecall", "staticcall").
        • from (string): the address that initiated the call.
        • to (string): the address that was called.
        • gas (string): the amount of gas provided for the call.
        • input (string): the input data for the call.
        • value (string): the amount of Wei sent with the call.
      • For create:
        • from (string): the address that created the contract.
        • gas (string): the amount of gas provided for the creation.
        • init (string): the initialization code for the contract.
        • value (string): the amount of Wei sent with the creation.
      • For reward:
        • author (string): the address that received the reward.
        • value (string): the amount of Wei rewarded.
        • rewardType (string): the type of reward (e.g., "block", "uncle").
      • For suicide:
        • address (string): the address of the contract that self-destructed.
        • refundAddress (string): the address that received the remaining balance.
        • balance (string): the remaining balance of the contract.
    • blockHash (string): the hash of the block containing the transaction.

    • blockNumber (string): The number of the block containing the transaction.

    • result (object)

      • For call:
        • gasUsed (string): The amount of gas used by the call.
        • output (string): The output data from the call.
      • For create:
        • address (string): The address of the created contract.
        • code (string): The runtime code of the created contract.
        • gasUsed (string): The amount of gas used by the creation.
      • For reward: No additional fields.
      • For suicide: No additional fields.
    • subtraces (integer): The number of subtraces (nested traces) generated by this trace.

    • traceAddress (array of integers): The address within the trace hierarchy.

    • transactionHash (string): The hash of the transaction containing the trace.

    • transactionPosition (integer): The index position of the transaction within the block.

    • type (string): The type of trace (e.g., "call", "create", "reward", "suicide").

Request example

curl -X POST https://rpc.ankr.com/telos/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "trace_replayBlockTransactions",
"params": ["0x58ddccddbc8d1deddf91e43e6623cdc2e1186f067dc687bb3928076a02bad39e", ["trace"]],
"id": 1
}'

trace_block

Retrieves a detailed trace of all the transactions in a specific block.

Parameters


  • id (integer; required): a request ID (example: 1).

  • jsonrpc (string; required): a JSON RPC spec used (example: 2.0).

  • method (string; required): a method used for the request.

  • params (array; required):

    • blockNumber (string): the number of the block you want to trace, given as a hexadecimal string.

Returns

The method returns an array of trace objects, each of which contains detailed information about a particular operation. These trace objects include the following fields:

  • action (object): describes the action that was performed. The structure of this object varies based on the type of action.
    • For call actions:

      • callType (string): the type of call (e.g., "call", "delegatecall", "staticcall").
      • from (string): the address that initiated the call.
      • to (string): the address that was called.
      • gas (string): the amount of gas provided for the call.
      • input (string): the input data for the call.
      • value (string): the amount of Wei sent with the call.
    • For create actions:

      • from (string): the address that created the contract.
      • gas (string): the amount of gas provided for the creation.
      • init (string): the initialization code for the contract.
      • value (string): the amount of Wei sent with the creation.
    • For reward actions:

      • author (string): the address that received the reward.
      • value (string): the amount of Wei rewarded.
      • rewardType (string): the type of reward (e.g., "block", "uncle").
    • For suicide actions:

      • address (string): the address of the contract that self-destructed.
      • refundAddress (string): the address that received the remaining balance.
      • balance (string): the remaining balance of the contract.
    • blockHash (string): the hash of the block containing the transaction.

    • blockNumber (string): the number of the block containing the transaction.

    • result (object): describes the result of the action.

      • For call actions:

        • gasUsed (string): the amount of gas used by the call.
        • output (string): the output data from the call.
      • For create actions:

        • address (string): the address of the created contract.
        • code (string): the runtime code of the created contract.
        • gasUsed (string): the amount of gas used by the creation.
      • For reward actions: no additional fields.

      • For suicide actions: no additional fields.

    • subtraces (integer): the number of subtraces (nested traces) generated by this trace.

    • traceAddress (array of integers): the address within the trace hierarchy, indicating the position of the trace in the call stack.

    • transactionHash (string): the hash of the transaction containing the trace.

    • transactionPosition (integer): the index position of the transaction within the block.

    • type (string): the type of trace (e.g., "call", "create", "reward", "suicide").

Request example

curl -X POST https://rpc.ankr.com/telos/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "trace_block",
"params": ["0x14869E9E"],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"id": 1,
"result": []
}