trace
trace_call
Executes a call and returns the requested traces. This is similar to eth_call but with tracing support.
Executes a call and returns the requested traces. This is similar to eth_call but with tracing support.
Parameters
| # | Type | Description |
|---|---|---|
| 1 | object | Transaction call object. |
| 2 | array | Array of trace types to return. |
| 3 | string | Block tag ("latest", "earliest") or hex block number. |
Transaction Call Object
| Field | Type | Description |
|---|---|---|
to | string | (required) Address to call. |
data | string | (optional) Encoded function call data. |
from | string | (optional) Sender address. |
value | string | (optional) Value to send in wei (hex). |
gas | string | (optional) Gas limit (hex). |
Trace Types
| Value | Description |
|---|---|
"trace" | Returns the call tree trace. |
"vmTrace" | Returns a full VM execution trace (opcodes, stack, memory). |
"stateDiff" | Returns the state changes made by the call. |
Multiple trace types can be requested simultaneously, e.g., ["trace", "stateDiff"].
Returns
| Field | Type | Description |
|---|---|---|
trace | array | Call tree trace (if requested). |
vmTrace | object | VM execution trace (if requested). |
stateDiff | object | State changes per address (if requested). |
output | string | Return value of the call. |
Example
curl -s -X POST https://rpc.pulsechain.box \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "trace_call",
"params": [
{
"to": "0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39",
"data": "0x70a08231000000000000000000000000000000000000000000000000000000000000dead"
},
["trace"],
"latest"
],
"id": 1
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"trace": [
{
"action": {
"callType": "call",
"from": "0x0000000000000000000000000000000000000000",
"gas": "0x2fa9e78",
"input": "0x70a08231000000000000000000000000000000000000000000000000000000000000dead",
"to": "0x2b591e99afe9f32eaa6214f7b7629768c40eeb39",
"value": "0x0"
},
"result": {
"gasUsed": "0x...",
"output": "0x..."
},
"subtraces": 0,
"traceAddress": [],
"type": "call"
}
],
"output": "0x..."
}
}
TRY IT
Notes
- This does not create a transaction on-chain; it simulates the call.
vmTraceproduces very large responses and should be used sparingly.stateDiffshows the before and after values for all storage slots and balances modified by the call.- All trace requests are routed to a an archive node with full trace support.
