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(invariant): add excludeSelectors() filter #8185

Merged
merged 3 commits into from
Jun 18, 2024

Conversation

grandizzy
Copy link
Collaborator

@grandizzy grandizzy commented Jun 18, 2024

Motivation

Closes #4352

After merged will follow up with forge-std and foundry book PRs

Solution

  • add excludeSelectors function, collect excluded selectors in TargetedContract.excluded_functions
  • check if function is not in exclude_functions when returning abi functions to fuzz

@grandizzy grandizzy marked this pull request as ready for review June 18, 2024 09:22
@grandizzy grandizzy requested a review from klkvr June 18, 2024 09:22
crates/evm/evm/src/executors/invariant/mod.rs Outdated Show resolved Hide resolved
crates/evm/evm/src/executors/invariant/mod.rs Outdated Show resolved Hide resolved
crates/evm/evm/src/executors/invariant/mod.rs Show resolved Hide resolved
crates/evm/evm/src/executors/invariant/mod.rs Show resolved Hide resolved
grandizzy and others added 2 commits June 18, 2024 14:41
Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
@grandizzy grandizzy requested a review from DaniPopes June 18, 2024 12:25
@DaniPopes DaniPopes merged commit 6723834 into foundry-rs:master Jun 18, 2024
19 checks passed
klkvr pushed a commit to klkvr/foundry that referenced this pull request Jun 19, 2024
* feat(invariant): add excludeSelectors() filter

* Apply suggestions from code review

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* Review changes: shorter err message

---------

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
klkvr pushed a commit to klkvr/foundry that referenced this pull request Jun 19, 2024
* feat(invariant): add excludeSelectors() filter

* Apply suggestions from code review

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* Review changes: shorter err message

---------

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
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.

Add invariant testing filter for excludeSelectors()
2 participants