Skip to content

Commit 5680f73

Browse files
committed
Update debugging docs
1 parent 8de2a14 commit 5680f73

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

docs/src/snforge-advanced-features/debugging.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ The `--trace-components` flag allows you to specify which components of the trac
2929
- `caller-address`: the address of the caller contract
3030
- `call-type`: the type of the call (e.g., `Call`, `Delegate`, etc.)
3131
- `call-result`: the result of the call, transformed for display
32+
- `gas`: estimated L2 gas consumed by the call
3233

3334
Example usage:
3435

@@ -122,17 +123,18 @@ $ snforge test --trace-verbosity standard
122123
123124
Here's what each tag in the trace represents:
124125
125-
| Tag | Description |
126-
|----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|
127-
| `[test name]` | The path to the test being executed, using the Cairo module structure. Indicates which test case produced this trace. |
128-
| `[selector]` | The name of the contract function being called. The structure shows nested calls when one function triggers another. |
129-
| `[contract name]` | The name of the contract where the selector (function) was invoked. Helps trace calls across contracts. |
130-
| `[entry point type]` | (In detailed view) Type of entry point used: External, Constructor, L1Handler. Useful to differentiate the context in which the call is executed. |
131-
| `[calldata]` | (In standard view and above) The arguments passed into the function call. |
132-
| `[storage address]` | (In detailed view) The storage address of the specific contract instance called. Helps identify which deployment is used if you're testing multiple. |
133-
| `[caller address]` | (In detailed view) The address of the account or contract that made this call. Important to identify who triggered the function. |
134-
| `[call type]` | (In detailed view) Call, Delegate. Describes how the function is being invoked. |
135-
| `[call result]` | (In standard view and above) The return value of the call, success or panic. |
126+
| Tag | Description |
127+
|----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
128+
| `[test name]` | The path to the test being executed, using the Cairo module structure. Indicates which test case produced this trace. |
129+
| `[selector]` | The name of the contract function being called. The structure shows nested calls when one function triggers another. |
130+
| `[contract name]` | The name of the contract where the selector (function) was invoked. Helps trace calls across contracts. |
131+
| `[entry point type]` | (In detailed view) Type of entry point used: External, Constructor, L1Handler. Useful to differentiate the context in which the call is executed. |
132+
| `[calldata]` | (In standard view and above) The arguments passed into the function call. |
133+
| `[storage address]` | (In detailed view) The storage address of the specific contract instance called. Helps identify which deployment is used if you're testing multiple. |
134+
| `[caller address]` | (In detailed view) The address of the account or contract that made this call. Important to identify who triggered the function. |
135+
| `[call type]` | (In detailed view) Call, Delegate. Describes how the function is being invoked. |
136+
| `[call result]` | (In standard view and above) The return value of the call, success or panic. |
137+
| `[gas]` | (In detailed view) L2 gas needed to execute the call. The calculation ignores state changes, calldata and signature lengths, L1 handler payload length and Starknet OS overhead. |
136138
137139
138140

0 commit comments

Comments
 (0)