Docs
Supported ChainsXDC NetworkJSON-RPC APIDebug Methods

debug_traceCall - XDC Network RPC Method

Trace a call without executing on XDC Network. Requires archive node for debugging tokenized trade finance (Letters of Credit, Bills of Lading), cross-border payments, and real-world asset tokenization.

Traces a call without creating a transaction on XDC Network.

Archive Node Required

This method requires an archive node. It is not available on full nodes.

Use Cases

  • Transaction simulation - Debug before sending
  • Gas analysis - Analyze gas usage per opcode
  • Contract debugging - Step through execution for tokenized trade finance (Letters of Credit, Bills of Lading), cross-border payments, and real-world asset tokenization

Request Parameters

Request
callObject

Call object (same as eth_call)

blockNumberQUANTITY|TAG

Block number or tag

tracerConfigObject

Tracer configuration

Response Body

Response

Code Examples

Bash
curl -X POST https://api-xdc-mainnet.n.dwellir.com/YOUR_API_KEY \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "debug_traceCall",
    "params": [
      {"to": "0x951857744785E80e2De051c32EE7b25f9c458C42", "data": "0x70a08231000000000000000000000000951857744785E80e2De051c32EE7b25f9c458C42"},
      "latest",
      {"tracer": "callTracer"}
    ],
    "id": 1
  }'
JavaScript
import { JsonRpcProvider } from 'ethers';

const provider = new JsonRpcProvider('https://api-xdc-mainnet.n.dwellir.com/YOUR_API_KEY');

const trace = await provider.send('debug_traceCall', [
  { to: '0x951857744785E80e2De051c32EE7b25f9c458C42', data: '0x70a08231000000000000000000000000951857744785E80e2De051c32EE7b25f9c458C42' },
  'latest',
  { tracer: 'callTracer' }
]);
console.log('Trace:', trace);

On this page