How to use it

// yarn add @tatumio/tatum

import { TatumSDK, Fantom, Network } from '@tatumio/tatum'
const tatum = await TatumSDK.init<Fantom>({ network: Network.FANTOM })

const result = await tatum.rpc.debugTraceCall({
      "from": "0x365a2dabcdb56f4f595c3af088b8975c26331448",
      "to": "0x365a2dabcdb56f4f595c3af088b8975c26331449",
      "gas": "0x76c0",
      "gasPrice": "0x9184e72a000",
      "value": "0x9184e72a",
      "data": "0x606060..."
  tracer: 'callTracer',
  tracerConfig: {
      onlyTopCall: true,
      timeout: '5s',

await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs


debug_traceCall is an method that allows you to execute a given call (message), tracing the steps of its execution. This can be helpful for developers and auditors who want to inspect and analyze the internal operations and state changes of a contract call without modifying the blockchain state. This method can assist in debugging and identifying potential issues with contract execution, as well as understanding how gas is consumed during the execution of a call.


The debug_traceCall method accepts the following parameters:

  • transaction: An object that contains the following fields:

    • from: The address from which the call is initiated. Example: "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d"

    • to: The address of the contract to be called. Example: "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"

    • gas: (Optional) The gas limit for the call. Example: "0x76c0"

    • gasPrice: (Optional) The gas price for the call. Example: "0x9184e72a000"

    • value: (Optional) The value to be transferred during the call. Example: "0x9184e72a"

    • data: (Optional) The input data for the call, encoded as a hexadecimal string. Example: "0x606060..."

  • blockNumber: The block number as a hexadecimal string for which the call should be traced. Example: "0x42C1D80"

Return Object

The return object is an object containing the following fields:

  • output: The output data from the call.

  • gasUsed: The total gas used by the call.

  • calls: An array of objects, each representing a nested call made during the call. Each object contains:

    • from: The address the call was made from.

    • gas: The gas provided for the call.

    • gasUsed: The gas used by the call.

    • to: The address the call was made to.

    • input: The input data for the call.

    • output: The output data from the call.

    • type: The type of the call (e.g., "STATICCALL").

This method is available only on the full archive node.

JSON-RPC Request and Response Examples


  "jsonrpc": "2.0",
  "id": 1,
  "method": "debug_traceCall",
  "params": [