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): ensure vm.difficulty and vm.prevrandao fail if not using the correct EVM Version #4904

Merged
merged 2 commits into from
May 9, 2023

Conversation

Evalir
Copy link
Member

@Evalir Evalir commented May 8, 2023

Motivation

Right now, the vm.difficulty/vm.prevrandao just do not work if the correct EVM version is not being used and give no warnings. See foundry-rs/forge-std#373

Solution

Make them completely fail if not using the correct EVM version, to avoid unexpected behavior during tests.

Feel free to nit over the fail message!

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.

lgtm!

@mattsse mattsse merged commit 1c19c8c into master May 9, 2023
@mattsse mattsse deleted the evalir/cheatcode_version branch May 9, 2023 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants