Skip to content

feat: print optional opcodes in forge test#14843

Open
jaimebarrancos wants to merge 8 commits into
foundry-rs:masterfrom
jaimebarrancos:master
Open

feat: print optional opcodes in forge test#14843
jaimebarrancos wants to merge 8 commits into
foundry-rs:masterfrom
jaimebarrancos:master

Conversation

@jaimebarrancos
Copy link
Copy Markdown

@jaimebarrancos jaimebarrancos commented May 20, 2026

Added --opcodes argument 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

Added feature as requested in #8198.

Solution

Passed opcode lines to the renderer.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

Copy link
Copy Markdown
Collaborator

@grandizzy grandizzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread crates/forge/src/cmd/test/mod.rs Outdated
Comment thread crates/evm/traces/src/decoder/mod.rs Outdated
Comment thread crates/forge/src/cmd/test/mod.rs Outdated
Comment thread crates/forge/src/cmd/test/mod.rs Outdated
@jaimebarrancos jaimebarrancos requested a review from grandizzy May 29, 2026 13:27
Copy link
Copy Markdown
Collaborator

@mablr mablr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the Cargo.lock file + 2 small nits

Comment thread crates/forge/src/cmd/test/mod.rs Outdated
Comment thread crates/forge/src/cmd/test/mod.rs Outdated
@jaimebarrancos jaimebarrancos requested a review from mablr May 30, 2026 09:50
Comment thread crates/forge/tests/cli/test_cmd/mod.rs
@jaimebarrancos jaimebarrancos requested a review from mablr June 1, 2026 06:36
Copy link
Copy Markdown
Collaborator

@mablr mablr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sgtm, thanks.

Pending @grandizzy :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants