foundry-rs / foundry-rs/foundry
meta(tracing): tracking issue for tracing improvements
- Dominant language
- Rust
- Stars
- 10.6k
- Forks
- 2.6k
- Avg merge
- 18h 20m
- Merged PRs (30d)
- 510
Description
### Component
Forge, Cast
### Describe the feature you would like
`forge test`, `forge script`, and `cast run` all produce traces. Depending on your use case, there are various display modes that may be the most helpful:
1. Hiding addresses if you have a label vs. showing label + addr vs. always showing addr (ref https://github.com/foundry-rs/foundry/issues/3381)
2. Truncated address like `0x123...def` vs full addresses (this has come up in an issue before, can't find it now though)
3. Overall tx state diffs vs. no state diffs (ref https://github.com/foundry-rs/foundry/issues/2846)
4. Call-level state diffs within the trace (arguably would get cluttered, but still is useful)
5. Showing only logs instead of a full trace
6. Showing vs. hiding function parameter names
7. Showing vs. hiding decoded SSTOREs and SLOADs in a call, similar to https://tx.eth.samczsun.com/#txhash=0x3443cd8f0c722fa9d83e12033f29eb590b177804ae625f2072625dfb79b329c2
8. Hide/modify certain calls in the traces, for example file/json reading/writing large files can quickly clutter logs. Perhaps a flag that takes an array of VM function names/signatures and replaces them with some other value
I think we should support these various options in two ways:
- A new `[trace]` section in the config file (more useful for forge)
- CLI flags (more useful for cast)
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.