feat: print optional opcodes in forge test#14843
Conversation
grandizzy
left a comment
There was a problem hiding this comment.
thank you, direction is good, left couple of comments. Please make sure clippy and fmt pass, see https://github.com/foundry-rs/foundry/blob/master/CONTRIBUTING.md#resolving-an-issue for details
mablr
left a comment
There was a problem hiding this comment.
Please fix the Cargo.lock file + 2 small nits
mablr
left a comment
There was a problem hiding this comment.
Sgtm, thanks.
Pending @grandizzy :)
mablr
left a comment
There was a problem hiding this comment.
Moved resolved.to_mut() inside the if with_storage_changes block, so the clone only happens when we actually need to mutate the rendered copy.
Should be good to go. Thank you @jaimebarrancos.
grandizzy
left a comment
There was a problem hiding this comment.
One blocking issue: the storage de-dup clones the whole trace arena on every -vvvvv render, even when --opcodes isn't used. Fix inline below. One minor follow-up noted as well.
# Conflicts: # crates/forge/src/cmd/test/mod.rs
Added
--opcodesargument in forge test.This allows opcodes to be analyzed in more detail as well as their gas costs and storage changes (if any).
AI was not used to write any code.
This is my first contribution to open source!
Motivation
Closes #8198.
Solution
Passed opcode lines to the renderer.
PR Checklist