Nhảy tới nội dung

[Trace] debug_traceCall

The debug_traceCall allows tracing on a specific block if callArgs is provided.

JSONRPC: debug_traceCall

Request

Body

    method stringrequired

    Default value: debug_traceCall

    Method name

    id int64required

    Default value: 1

    Request ID, Random or Auto incrementation

    jsonrpc stringrequired

    Default value: 2.0

    JSON-RPC Version (2.0)

    params

    undefined[]

  • Array [

  • TracerCallObject

    object

    The tracer call object. See the next table for the object's properties.

    from 20-byte DATA

    (optional) Address the transaction is simulated to have been sent from. The 0x00..0 address is used if no address is specified.

    to 20-byte DATA

    (optional) Address the transaction is sent to.

    input DATA

    (optional) Hash of the method signature and encoded parameter. It replaces data field, but 'data` field is still supported for backward compatibility.

    BlockNumberOrHashOrTag

    object

    oneOf

    number

    TracerObject

    object

    Tracer type.

    tracer string

    Possible values: [4byteTracer, callTracer, fastCallTracer, evmdisTracer, noopTracer, opcountTracer, prestateTracer, revertTracer, unigramTracer, bigramTracer, trigramTracer]

    Setting this will enable JavaScript-based transaction tracing, described in the next section. If set, the previous four arguments will be ignored. The predefined tracers can also be used as the following table. | Tracer Name | Description | |-----|-----| | 4byteTracer | 4byteTracer searches for 4byte-identifiers, and collects them for post-processing. It collects the methods identifiers along with the size of the supplied data, so a reversed signature can be matched against the size of the data. | | callTracer | callTracer is a full-blown transaction tracer that extracts and reports all the internal calls made by a transaction, along with any useful information. | | fastCallTracer | fastCallTracer is a Go-native version of callTracer. Since it is not executed on JavaScript VM, it shows more than 10x speedup compared to callTracer. Please use fastCallTracer instead of callTracer if the performance is the matter of the first importance. | | evmdisTracer | evmdisTracer returns sufficient information from a trace to perform evmdis-style disassembly. | | noopTracer | noopTracer is just the barebone boilerplate code required from a JavaScript object to be usable as a transaction tracer. | | opcountTracer | opcountTracer is a sample tracer that just counts the number of instructions executed by the KLVM before the transaction terminated. | | prestateTracer | prestateTracer outputs sufficient information to create a local execution of the transaction from a custom assembled genesis block. | | revertTracer | revertTracer outputs the error string of REVERT. If the execution is not reverted, it outputs an empty string. | | unigramTracer | unigramTracer returns the number of occurrences of each opcode. | | bigramTracer | bigramTracer returns the number of occurrences of two consecutive opcodes. | | trigramTracer | trigramTracer returns the number of occurrences of three consecutive opcodes. |

  • ]

Responses

The detail tracing infomation

Schema

    jsonrpc stringrequired

    Default value: 2.0

    id int64required

    error

    object

    code int64required

    A Number that indicates the error type that occurred. This MUST be an integer.

    | code | message | description | |-----|-----|-------| | -32700 | Parse error | invalid JSON was received by the server. An error occurred on the server while parsing the JSON text. | |-32602 | Invalid params | Invalid method parameter(s). |

    message string

    A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.

    data string

    A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.).

    result
Loading...
Make this page better