Skip to content
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 and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: modularize foundry-evm #6128

Merged
merged 7 commits into from
Oct 26, 2023
Merged

Conversation

DaniPopes
Copy link
Member

@DaniPopes DaniPopes commented Oct 26, 2023

Motivation

Closes #6052

foundry-cheatcodes integration will happen in a follow up

Solution

See #6052

No functional changes.

Breakage in foundry_evm interface:

  • executor -> executors
  • executor::{<modules>} -> ::{<modules>}
  • executor::inspector -> inspectors
  • trace -> traces
  • executor::backend::{error, snapshot} inlined into super
  • DatabaseRef and HashMap re-export removed in favor of their own crate re-export (revm and hashbrown respectively)
  • executor and inspector types moved from submodule to executors and inspectors
    • inspectors are re-exported, executors were moved, thus inspectors are available in both
  • executor::fuzz::invariant partially split to executors::invariant
  • cheatcode utils merged into root utils
  • CallKind and StateChangeset moved into utils

@DaniPopes DaniPopes added A-evm Area: EVM T-debt Type: code debt labels Oct 26, 2023
@DaniPopes DaniPopes requested review from mattsse and Evalir October 26, 2023 17:41
@DaniPopes DaniPopes self-assigned this Oct 26, 2023
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

this is so much better

/// This is the same address as the one used in DappTools's HEVM.
/// It is calculated as:
/// `address(bytes20(uint160(uint256(keccak256('hevm cheat code')))))`
pub const CHEATCODE_ADDRESS: Address = address!("7109709ECfa91a80626fF3989D68f67F5b1DD12D");
Copy link
Member

Choose a reason for hiding this comment

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

nice, finally constants in one place

@DaniPopes DaniPopes merged commit 6893e38 into foundry-rs:master Oct 26, 2023
17 checks passed
@DaniPopes DaniPopes deleted the evm-refactor1 branch October 26, 2023 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-evm Area: EVM T-debt Type: code debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

modularize foundry-evm
2 participants