POSTtrace_call

Simulates a specified transaction call and returns the result. This method does not actually send a transaction to the blockchain and provides detailed execution information including gas consumption, execution results, and logs. This is useful when you want to preview how a specific function call will be executed.

Request Body
idintegerrequired
jsonrpcstringrequired
methodstringrequired
paramsoneOf[]required

Enter the following parameters as an array with the appropriate types.

  1. call object is an object containing the following fields.
  2. trace type: Select one or more trace types to use and enter as an array. You can use "vmTrace", "trace", or "stateDiff" values. See the API documentation for details on each option.
  3. block number or block tag: Enter the block number in hexadecimal string format. You can also enter block tags such as "earliest", "latest", or "pending".
params[0]object
fromstring

Enter the transaction's from address as a string.

tostring

Enter the transaction's to address as a string.

gasstring

Enter the gas required to process the transaction as a hex-format string. For smart contract calls, no gas is consumed, so you can enter 0x0.

gasPricestring

Enter the desired cost per gas as a hex-format string.

valuestring

The value of the transaction.

datastring

The method signature hash of the transaction to execute. Can be referenced from the ABI.

params[1]string (enum)[]

Trace type specifies the data types used when querying detailed execution information for a specific transaction or block on the Ethereum blockchain. This array can contain the following three string values:

  • vmTrace: Traces the virtual machine's step-by-step execution in detail. This includes memory state, stack state, and the result of each execution instruction.
  • trace: Provides step-by-step logs of transaction execution. These logs include call flow and details of internal transactions that occurred.
  • stateDiff: Shows the difference in account state before and after transaction execution. This includes changed storage keys and values, account balance changes, and contract code changes.

This information helps developers better understand the transaction processing flow and debug. Each type provides detailed information on a specific aspect of the blockchain to clearly understand the impact of a transaction.

params[2]object
fromstring

Enter the transaction's from address as a string.

tostring

Enter the transaction's to address as a string.

gasstring

Enter the gas required to process the transaction as a hex-format string. For smart contract calls, no gas is consumed, so you can enter 0x0.

gasPricestring

Enter the desired cost per gas as a hex-format string.

valuestring

The value of the transaction.

datastring

The method signature hash of the transaction to execute. Can be referenced from the ABI.

Responses
fromstring

Caller address

callTypestring

Call type (call, delegatecall, staticcall, etc.)

gasstring

Gas limit set for the call (hex)

inputstring

Call input data (hex)

tostring

Callee address

valuestring

Amount of ETH transferred (hex, in wei)

blockHashstring

Hash of the block containing this transaction

blockNumberinteger

Block number containing the transaction

gasUsedstring

Actual gas used (hex)

outputstring

Call return data (hex)

subtracesinteger

Number of sub-traces

traceAddressinteger[]

Index array representing the trace path

transactionHashstring

Hash of the traced transaction

transactionPositioninteger

Position of the transaction within the block

typestring

Trace type (call, create, reward, etc.)

X-API-KEY
RequestCU73
cURL
curl -X POST "https://ethereum-mainnet.nodit.io/" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "trace_call",
  "params": [
    {
      "from": "0xc90d3Ac75D1D36dF0b0a229E73D8409FB7F3c4ab",
      "to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601",
      "value": "0x186a0"
    },
    [
      "trace"
    ],
    "latest"
  ]
}'
Response
Example · 200
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "output": "0x",
    "stateDiff": null,
    "trace": [
      {
        "action": {
          "from": "0xc90d3ac75d1d36df0b0a229e73d8409fb7f3c4ab",
          "callType": "call",
          "gas": "0x2fa9e78",
          "input": "0x",
          "to": "0xd3cda913deb6f67967b99d67acdfa1712c293601",
          "value": "0x186a0"
        },
        "result": {
          "gasUsed": "0x0",
          "output": "0x"
        },
        "subtraces": 0,
        "traceAddress": [],
        "type": "call"
      }
    ],
    "vmTrace": null
  }
}