Skip to content

Commit

Permalink
Documented debug_traceCall
Browse files Browse the repository at this point in the history
Signed-off-by: Atreay Kukanur <66585295+ATREAY@users.noreply.github.com>
  • Loading branch information
ATREAY committed Nov 13, 2023
1 parent f1a130d commit 43ffa1a
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions docs/public-networks/reference/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1741,6 +1741,77 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"debug_traceBlockByNumber","param
# JSON result
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"gas": 21000,
"failed": false,
"returnValue": "",
"structLogs": [
{
"pc": 0,
"op": "STOP",
"gas": 0,
"gasCost": 0,
"depth": 1,
"stack": [],
"memory": [],
"storage": null,
"reason": null
}
]
}
]
}
```
<!--/tabs-->
### `debug_traceCall`
Returns a detailed trace of the executed opcodes for a specific transaction.
#### Parameters
- `requestContext`: _object_ - JSON-RPC request context with essential fields like `from`, `to`, `gas`, `gasPrice`, `value`, `data`, `nonce`.
- `options`: _object_ - request options object with the following fields (all optional and default to `false`):
- `disableStorage`: _boolean_ - `true` disables storage capture.
- `disableMemory`: _boolean_ - `true` disables memory capture.
- `disableStack` : _boolean_ - `true` disables stack capture.
#### Returns
`result`: _array_ of _objects_ - list of [trace objects](objects.md#trace-object)
<!--tabs-->
# curl HTTP request
```bash
curl -X POST --data '{"jsonrpc":"2.0","method":"debug_traceCall","params":[{"from":"","to":"","gas":"0xfffff2","gasPrice":"0xef","value":"0x0","data":""},"latest",{"disableMemory":true,"disableStack":true,"disableStorage":true}], "id":1}' http://127.0.0.1:8545
```
# wscat WS request
```json
{
"jsonrpc": "2.0",
"method": "debug_traceCall",
"params": [{"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73","0x0050000000000000000000000000000000000000", "0xfffff2","0xef","0x0","0x0000000000000000000000000030000000000000000000000000000000000000f000000000000000000000000000000000000000000000000000000000000001"},"latest",{"disableMemory":true,"disableStack":true,"disableStorage":true}],
"id": 1
}
```
# JSON result
```json
{
"jsonrpc": "2.0",
Expand Down

0 comments on commit 43ffa1a

Please sign in to comment.