trace_call - 跟踪以太坊调用
trace_call
执行指定的调用,返回一组可能的跟踪结果。
调用参数
- 调用选项对象,类似于eth_call:
- from:交易发起地址,可选
- to:交易目标地址,可选
- gas:交易gas用量,可选
- gasPrice:交易gas价格,可选
- value:交易转账数量,可选
- data:交易附加数据,可选
- 跟踪类型,以下值中的一个或多个:vmTrace、trace、stateDiff
- 区块号,或者表示区块位置的标签
earliest
、latest
、pending
返回结果
trace_call
调用返回区块跟踪结果数组。
示例代码
请求:
~$ curl --data '{"method":"trace_call","params":[{ ... },["trace"]],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
响应结果:
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"output": "0x",
"stateDiff": null,
"trace": [{
"action": { ... },
"result": {
"gasUsed": "0x0",
"output": "0x"
},
"subtraces": 0,
"traceAddress": [],
"type": "call"
}],
"vmTrace": null
}
}