For AI agents: an LLM-friendly Markdown version of every page is available by appending .md to its URL or by sending an Accept: text/markdown request header. The full documentation index is at https://www.ankr.com/docs/llms.txt
Skip to main content

Plasma: eth, debug (4/4)

API reference for Plasma. All methods ->

Part 4 of 4: 1 · 2 · 3 · 4

debug_traceTransaction​

Traces the execution of a transaction specified by hash.

Parameters​


  • id (integer; required): a request ID (example: 1).

  • jsonrpc (string; required): a JSON RPC spec used (example: 2.0).

  • method (string; required): a method used for the request.

  • params (array; required):

    • <transactionHash> (string; required): the hash of the transaction to trace.
    • <object> (optional): the tracing options:
      • tracer (string): the tracer to use, for example callTracer or prestateTracer.
      • tracerConfig (object): tracer options, for example {"onlyTopCall": true} for callTracer to skip internal calls.
      • timeout (string): the tracing timeout, for example "5s".

Returns​


  • <object>: the trace produced by the tracer selected.

Request example​

curl -X POST https://rpc.ankr.com/plasma/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "debug_traceTransaction",
"params": [
"0xad1587245b0d6351c443f86052cac39e7e16d4c98ecbab8995cc0b4b379a485a",
{
"tracer": "callTracer",
"timeout": "5s",
"tracerConfig": {
"onlyTopCall": true
}
}
],
"id": 1
}'

Response example​

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"from": "0xfa1711c6513b09b13ee8aeef0dff266114b4e97c",
"gas": "0x169e1",
"gasUsed": "0xedfc",
"to": "0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb",
"input": "0xa9059cbb000000000000000000000000091c0e9517c1c5bf5a6bbc1573be193c8309a20d000000000000000000000000000000000000000000000000000000000510ff40",
"output": "0x0000000000000000000000000000000000000000000000000000000000000001",
"value": "0x0",
"type": "CALL"
}
}

debug_traceCall​

Traces a call executed on top of the state of a block specified, without creating a transaction.

Parameters​


  • id (integer; required): a request ID (example: 1).

  • jsonrpc (string; required): a JSON RPC spec used (example: 2.0).

  • method (string; required): a method used for the request.

  • params (array; required):

    • <object> (required): the call object, the same as for eth_call: from, to, gas, gasPrice, value, data.
    • <string> (required): a block number in hex, or one of the tags latest, earliest, pending.
    • <object> (optional): the tracing options, the same as for debug_traceTransaction.

Returns​


  • <object>: the trace produced by the tracer selected.

Request example​

curl -X POST https://rpc.ankr.com/plasma/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "debug_traceCall",
"params": [
{
"to": "0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb",
"data": "0x70a08231000000000000000000000000fa1711c6513b09b13ee8aeef0dff266114b4e97c"
},
"0x22fff26",
{
"tracer": "callTracer",
"timeout": "5s",
"tracerConfig": {
"onlyTopCall": true
}
}
],
"id": 1
}'

Response example​

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"from": "0x0000000000000000000000000000000000000000",
"gas": "0x23c34600",
"gasUsed": "0x79c4",
"to": "0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb",
"input": "0x70a08231000000000000000000000000fa1711c6513b09b13ee8aeef0dff266114b4e97c",
"output": "0x0000000000000000000000000000000000000000000000000000009ef78e0705",
"value": "0x0",
"type": "CALL"
}
}