POSTdebug_traceCall

Runs eth_call in debugging mode and provides trace functionality. You can trace all stack changes that occur when executing a specific call based on the current block's state.

Request Body
idintegerrequired
jsonrpcstringrequired
methodstringrequired
paramsoneOf[]required

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

  1. call object - Enter the contract address to call and the data of the function to execute.
  2. block identifier - Block identifier for the target block: block number, block hash, or block tag.
  3. trace option: Object for trace option configuration.
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

Use block hash, block number, or block tag to specify a block.

  • Block number: Hexadecimal string (ex. "0x1")
  • Block hash: 64-digit hexadecimal string (ex. "0x39008d07edf93c03bb9d1cfc80598fcf63f441ec86e9de3733fa6a484980ca48")]
  • Block tag: Enum string (ex. "latest", "earliest", "pending")
    • earliest: The oldest available block on the chain.
    • finalized: A recently finalized block that can no longer be changed. Primarily used in proof-of-stake (PoS) blockchains.
    • safe: A recent block considered safe by the network (immune to reorgs).
    • latest: The most recent block on the chain (may be subject to reorgs).
    • pending: The next block to be mined, including pending transactions in the mempool.
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

gasstring

Gas limit set for the call (hex)

gasUsedstring

Actual gas used (hex)

tostring

Callee address

inputstring

Call input data (hex)

outputstring

Call return data (hex)

valuestring

Amount of ETH transferred (hex, in wei)

typestring

Call type (CALL, CREATE, STATICCALL, etc.)

callsobject[]

List of internal sub-calls

errorstring

Error message if execution failed

revertReasonstring

Revert reason if the transaction was reverted

X-API-KEY
RequestCU206
cURL
curl -X POST "https://avalanche-mainnet.nodit.io/" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "debug_traceCall",
  "params": [
    {
      "from": "0xc90d3Ac75D1D36dF0b0a229E73D8409FB7F3c4ab",
      "to": "0xd3CdA913deB6f67967B99D67aCDFa1712C293601",
      "value": "0x186a0"
    },
    "finalized",
    {
      "tracer": "callTracer"
    }
  ]
}'
Response
Example · 200
{
  "jsonrpc": "2.0",
  "id": "1",
  "result": {
    "from": "0x0000000000000000000000000000000000000000",
    "gas": "0x2faf080",
    "gasUsed": "0x5d83",
    "to": "0xa3e0dfbf8dbd86e039f7cdb37682a776d66dae4b",
    "input": "0x70a08231000000000000000000000000a03167de1a56160e4647d77d81e9139af55b63d4",
    "output": "0x000000000000000000000000000000000000000000000000000003c18cd105e2",
    "value": "0x0",
    "type": "CALL"
  }
}