Skip to content

Comments

Deduplicate call input lookup in inspector stack#13032

Closed
splinter012 wants to merge 2 commits intofoundry-rs:masterfrom
splinter012:patch-3
Closed

Deduplicate call input lookup in inspector stack#13032
splinter012 wants to merge 2 commits intofoundry-rs:masterfrom
splinter012:patch-3

Conversation

@splinter012
Copy link

Remove double call.input.bytes(ecx) by caching input_bytes when resolving mocked functions; behavior unchanged, avoids redundant work/allocation. Scope: foundry/crates/evm/evm/src/inspectors/stack.rs.


if let Some(cheatcodes) = self.cheatcodes.as_deref_mut() {
// Handle mocked functions, replace bytecode address with mock if matched.
let input_bytes = call.input.bytes(ecx);
Copy link
Member

Choose a reason for hiding this comment

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

wrong scope, move down one line

Copy link
Author

Choose a reason for hiding this comment

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

Done

Copy link
Member

@onbjerg onbjerg left a comment

Choose a reason for hiding this comment

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

please make sure your prs are formatted using rustmft

DaniPopes added a commit that referenced this pull request Jan 15, 2026
This PR aggregates changes from the following PRs:

- Closes #13032 by @\splinter012
- Closes #13059 by @\phrwlk
@DaniPopes DaniPopes mentioned this pull request Jan 15, 2026
github-merge-queue bot pushed a commit that referenced this pull request Jan 15, 2026
* chore: aggregate PRs

This PR aggregates changes from the following PRs:

- Closes #13032 by @\splinter012
- Closes #13059 by @\phrwlk

* fmt
@github-project-automation github-project-automation bot moved this to Done in Foundry Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants