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

Params - a string array containing (required):
  • Object - Call options, same as eth_call.
    • from: Address - (optional) 20 Bytes - The address the transaction is send from.
    • to: Address - (optional when creating 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'.

Array - Block traces.
  • trace(array). Array of the given transactions’ traces.
    • action(object). DATA - Transaction details.
      • callType(string). type of method, such as call or create.
      • from(hex string). DATA, 20 Bytes - address of the sender.
      • to(hex string). DATA, 20 Bytes - address of the receiver.
      • gas(hex string) . QUANTITY - the amount of gas used by transaction.
      • input(hex string). DATA - the data send along with the transaction.
      • value(hex string). QUANTITY - value transferred in Wei.
    • result(object). DATA - Transaction result.
      • gasUsed(hex string) . QUANTITY - the amount of gas used by transaction.
      • output(hex string). DATA - Return value of the contract call. Contains only the actual value sent by a RETURN operation. If a RETURN was not executed, the output is empty bytes.
    • subTraces(hex string). - Traces of contract calls made by the transaction.
    • traceAddress(Array). - Tree list address of where the call occurred, address of the parents, and order of the current sub call.
    • type(string). type of method, such as call or create.

curl https://api.blockvision.org/v1/<api key> \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "trace_call",
"params": [
{
"from": "0xb603da66c08d3d316b3462614cdab768217147c5",
"to": "0x06bcc078233082021df764a1d5a35a423403d965",
"value": "0x0",
"data": "0xa67a6a45000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000"
},
["trace"]
],
"id": 1
}'

{
"jsonrpc": "2.0",
"id": 0,
"result": {
"trace": [
{
"action": {
"from": "0xb603da66c08d3d316b3462614cdab768217147c5",
"callType": "call",
"gas": "0x2fa9d78",
"input": "0xa67a6a45000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000",
"to": "0x06bcc078233082021df764a1d5a35a423403d965",
"value": "0x0"
},
"result": {
"gasUsed": "0x0",
"output": "0x"
},
"subtraces": 0,
"traceAddress": [],
"type": "call"
"output": "0x",
"stateDiff": null
}
],
"vmTrace": null
}
}
Copy link
On this page
Parameters
Returns
Example
Request
Result