Log In

trace_call - Trace API

Executes the given call and returns a number of possible traces for it.

Parameters

  • Object - Call options, same as eth_call.
    • from: Address - (optional) 20 Bytes - The address the transaction is sent from.
    • to: Address - (optional when creating a new contract) 20 Bytes - The address the transaction is directed to.
    • gas: Quantity - (optional) Integer formatted as a hex string of the gas provided for the transaction execution. eth_call consumes zero gas, but this parameter may be needed by some executions.
    • gasPrice: Quantity - (optional) Integer formatted as a hex string of the gas price used for each paid gas.
    • value: Quantity - (optional) Integer formatted as a hex string of the value sent with this transaction.
    • data: Data - (optional) 4 byte hash of the method signature followed by encoded parameters. For details see Ethereum Contract ABI.
  • Array - Type of trace, one or more of: "vmTrace", "trace", "stateDiff".
  • Quantity or Tag - (optional) Integer of a block number, or the string 'earliest' or 'latest'.

Returns

Array - Block traces.


Example

Request

curl --location --request POST 'https://eth-mainnet.unifra.io/v1/de06bac5217b49c3af79fd3aeb06a87b' \
--header 'Content-Type: application/json' \
--data-raw '{"method":"trace_call",
    "params":[{
      "from": "0x690b9a9e9aa1c9db991c7721a92d351db4fac990",
      "to": "0x87b3f3c934a13c779e100a5d6e6d7ef577e86671",
      "value": "0x0"},
      ["trace"]],
    "id":1,
    "jsonrpc":"2.0"}'

Result

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "output": "0x",
        "stateDiff": null,
        "trace": [
            {
                "action": {
                    "from": "0x690b9a9e9aa1c9db991c7721a92d351db4fac990",
                    "callType": "call",
                    "gas": "0x2fa9e78",
                    "input": "0x",
                    "to": "0x87b3f3c934a13c779e100a5d6e6d7ef577e86671",
                    "value": "0x0"
                },
                "result": {
                    "gasUsed": "0x0",
                    "output": "0x"
                },
                "subtraces": 0,
                "traceAddress": [],
                "type": "call"
            }
        ],
        "vmTrace": null
    }
}

🚧

The below parameter inputs do not work, please reference the section above instead.

Language
Click Try It! to start a request and see the response here!