feat(forge): Add call tracing support by brockelmore · Pull Request #192 · foundry-rs/foundry (original) (raw)
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation25 Commits40 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
Adds a CallTrace
struct that is built up inside a cheatcode executor. This PR tracks the status
[x] Accumulates all calls
[x] Accumulates all logs
[x] Logs are correctly placed in order relative to calls (may not be possible with sputnik)
[x] Pretty print call tree
[x] Pretty print call inputs
[x] Pretty print logs
[x] Report gas
[x] Parse contract bytecode into contract name
transmissions11, jparklev, odyslam, gakonst, tarrencev, DiveInto, zerosnacks, mds1, nanexcool, mattsse, and 4 more reacted with heart emoji joshieDo, nanexcool, and refcell reacted with rocket emoji
colored prints, better dev ux, verbosity > 2 trace printing
I think this is ready for review - some improvements still needed like pretty printing ethers::abi::Token
.
Traces will be printed if verbosity > 2.
brockelmore changed the title
[WIP] Add call tracing support feat: Add call tracing support
brockelmore changed the title
feat: Add call tracing support feat(forge): Add call tracing support
Once this issue is fixed, this should be production ready
Here is what it looks like once the above issue is fixed (or with an empty out
directory):
Here is what it looks like without the fix (& for contracts that can't be identified):
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LFG
mds1 mentioned this pull request
8 tasks
clifton pushed a commit to clifton/foundry that referenced this pull request
first pass
fixes
fmt
better fmting
updates
colored prints, better dev ux, verbosity > 2 trace printing
fmt
updates
fmt
fix after master merge
fix tests post master merge
warning fixes
fmt
lots of fixes
fmt
fix
cyan color
fixes
prettier raw logs + parse setup contracts
update diff_score threshold
better printing
remove integration tests
improvements
improvements + fmt + clippy
fixes
more cleanup
cleanup and verbosity > 3 setup print
refactor printing
documentation + cleanup
fix negative number printing
fix tests to match master and fix tracing_enabled
fix unnecessary trace_index set
refactor runner tracing + tracing_enabled
nits + value printing
last nits
2 participants