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

Forge 1.0 support #778

Merged
merged 5 commits into from
Apr 30, 2023
Merged

Forge 1.0 support #778

merged 5 commits into from
Apr 30, 2023

Conversation

grandizzy
Copy link
Contributor

@grandizzy grandizzy commented Apr 30, 2023

  • adapt tests to work with forge 1.0

Unit tests:

  • all tests start with fake startPrank by calling _startTest()
  • through test helper functions only changePrank is used (as start prank ensured in _startTest())

Gas load tests:

  • always startPrank before using test helper functions (which use changePrank)
  • always soptPrank after using test helper functions

Invariant tests - in useRandomActor modifier:

  • try to start prank using startPrank, if that fails then fallback to changePrank
  • remove stopPrank as not needed (changePrank does stop/startPrank)

Switch CI back to use nightly forge

- all tests start with fake startPrank by calling _startTest()
- through test helper methods only changePrank is used (as start prank ensured in _startTest())
Copy link
Contributor

@mattcushman mattcushman left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@EdNoepel EdNoepel left a comment

Choose a reason for hiding this comment

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

Looks cleaner. Just hope it doesn't break again when they fix foundry-rs/foundry#4826 .

@grandizzy
Copy link
Contributor Author

Looks cleaner. Just hope it doesn't break again when they fix foundry-rs/foundry#4826 .

Good point, thanks, wasn't aware of that issue. I'll set a watch on it

@grandizzy grandizzy merged commit 3cdede5 into develop Apr 30, 2023
@grandizzy grandizzy deleted the forge-1.0-support branch April 30, 2023 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants