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

feat(cheatcodes): add expectCreate and expectCreate2 #9875

Merged
merged 13 commits into from
Feb 20, 2025

Conversation

anukul
Copy link
Contributor

@anukul anukul commented Feb 12, 2025

Motivation

Addresses #9310

Solution

Added cheatcodes:

function expectCreate(bytes calldata bytecode, address deployer) external;
function expectCreate2(bytes calldata bytecode, address deployer) external;

where bytecode refers to the runtime bytecode and not the creation bytecode or initcode

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@anukul anukul changed the title Add expectCreate cheatcodes feat(cheatcodes): add expectCreate and expectCreate2 Feb 12, 2025
Copy link
Member

@zerosnacks zerosnacks left a comment

Choose a reason for hiding this comment

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

Thanks @anukul! lgtm

Copy link
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.

looks good, thank you! left couple of comments

@anukul anukul requested a review from grandizzy February 20, 2025 07:06
Copy link
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, looks good. will merge with CI fix and send

@anukul
Copy link
Contributor Author

anukul commented Feb 20, 2025

@grandizzy Thanks! On another note I wanted to highlight #9310 (comment), your thoughts on this will help me to make a PR for the remaining cheatcodes.

@grandizzy grandizzy added the T-feature Type: feature label Feb 20, 2025
@grandizzy grandizzy added the C-forge Command: forge label Feb 20, 2025
@grandizzy grandizzy merged commit f3130a5 into foundry-rs:master Feb 20, 2025
22 checks passed
@anukul anukul deleted the expectCreate branch February 20, 2025 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-forge Command: forge T-feature Type: feature
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

4 participants