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

fix(test): increment nonce for calls too when isolate #8878

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

grandizzy
Copy link
Collaborator

Motivation

closes #8811 take2

Solution

  • do not reset account nonce when running with isolate
  • explicitly increment nonce in cheatcode inspector only if calls are not isolated
  • cargo test --all --features=isolate-by-default pass

@grandizzy grandizzy changed the title fix(test): increment nonce for calls too when isolate (#8854) fix(test): increment nonce for calls too when isolate Sep 17, 2024
@grandizzy
Copy link
Collaborator Author

grandizzy commented Sep 17, 2024

@klkvr please check and lmk if other tests should be done, cargo test --all --features=isolate-by-default is passing, the only additional change for this was to not increment nonce in cheatcode inspector when running in isolate mode

@grandizzy grandizzy marked this pull request as ready for review September 17, 2024 06:57
Copy link
Member

@klkvr klkvr left a comment

Choose a reason for hiding this comment

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

nice, turned out not that tricky

@grandizzy grandizzy merged commit 604ce1d into foundry-rs:master Sep 17, 2024
20 checks passed
@grandizzy grandizzy deleted the nonce-fix branch September 17, 2024 12:43
rplusq pushed a commit to rplusq/foundry that referenced this pull request Sep 25, 2024
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.

bug(cheatcodes): vm.getNonce(player) the nonce is incorrect
2 participants