Skip to content

Commit

Permalink
feat: updates pubsub, and debug rpc calls
Browse files Browse the repository at this point in the history
  • Loading branch information
dutterbutter committed Apr 3, 2024
1 parent 8f3e584 commit 591c068
Showing 1 changed file with 2 additions and 22 deletions.
24 changes: 2 additions & 22 deletions content/20.api-reference/30.debug-rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ description:
github: https://github.com/matter-labs/zksync-era/blob/main/core/lib/web3_decl/src/namespaces/debug.rs
---

Here you can find the JSON-RPC API methods for the `debug_` namespace. These methods are useful for debugging purposes.

## `debug_traceBlockByHash`

Traces all calls made from a specific block by its L2 hash.
Expand Down Expand Up @@ -37,28 +39,6 @@ Traces all calls made from a specific block by its L2 hash.
| `revertReason` | `String` | The string reason provided by a `revert` statement, if applicable. |
| `calls` | `Array<Object>` | An array of call objects representing calls made by the current call. This field is recursive, as calls can initiate other calls. |

### Returns

| **Field** | **Type** | **Description** |
|-----------|------------------|------------------------------------------------------|
| `result` | `Array<Object>` | An array of objects, each representing a traced call made from the specified block hash. Each object contains fields such as `type`, `from`, `to`, `gas`, `gasUsed`, `value`, `output`, `input`, `error`, `revertReason`, and `calls`. |

#### Trace Object

| **Field** | **Type** | **Description** |
|-----------------|-----------------|-----------------|
| `type` | `String` | The type of operation (e.g., `Call`, `Create`, etc.), indicating the nature of the trace. |
| `from` | `String` | The address of the account that initiated the operation. |
| `to` | `String` | The recipient address of the call. For `Create` operations, this field is absent as the contract being created doesn't have an address until after the transaction completes. |
| `gas` | `String` | The amount of gas provided for the operation. |
| `gasUsed` | `String` | The amount of gas used by the operation. |
| `value` | `String` | The amount of Ether transferred during the operation. |
| `output` | `String` | The output from the operation. For operations that don't return data or failed, this is typically `0x`. |
| `input` | `String` | The data sent into the call or contract creation. |
| `error` | `String` | An error message if the operation failed. |
| `revertReason` | `String` | The reason provided by a `revert` operation, if applicable. |
| `calls` | `Array<Object>` | An array of nested calls made by this operation. This field is recursive, containing further traces of calls made by the traced operation. |

### Example Request

```sh
Expand Down

0 comments on commit 591c068

Please sign in to comment.