Skip to content

refactor: reduce code duplication for assertion cheats and introduce legacy_assertions flag #8251

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

Merged
merged 4 commits into from
Jun 26, 2024

Conversation

klkvr
Copy link
Member

@klkvr klkvr commented Jun 25, 2024

Updating code for 100+ impls would've been painful, so decided to clean this up with a macro

legacy_assertions doesn't print any info about failure at the moment, just returns successful result

To print logs we'd need #8181 to push them to LogCollector. We could've collected a separate logs list on Cheatcodes, but it's unclear how to ensure correct ordering

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,

this is blocked by #8181 right?

@klkvr
Copy link
Member Author

klkvr commented Jun 25, 2024

this is blocked by #8181 right?

yeah, we'd need it for complete support of the legacy_assertions, but this can be done in a follow-up

@klkvr klkvr merged commit fbd2251 into master Jun 26, 2024
19 checks passed
@klkvr klkvr deleted the klkvr/non-reverting-assert branch June 26, 2024 09:02
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