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

Add excludeSelector to StdInvariant #299

Closed
horsefacts opened this issue Feb 14, 2023 · 3 comments
Closed

Add excludeSelector to StdInvariant #299

horsefacts opened this issue Feb 14, 2023 · 3 comments

Comments

@horsefacts
Copy link

Most of the invariant test filtering helpers have both target and exclude variants to include or filter contracts/senders/selectors from fuzzing. But there's no corresponding excludeSelector for targetSelector. It's probably a safer practice to start by excluding selectors from a handler contract to avoid forgetting a function or two for large handlers, so it would be useful to have excludeSeclector.

(Secondarily, the naming of targetSelector seems a little odd. It's singular, but the function accepts multiple selectors for a single contract address. It might be clearer as targetSelectors/excludeSelectors plural. I did a double take as I wrote this up, worried that I got it wrong in my examples!)

@mds1
Copy link
Collaborator

mds1 commented Feb 14, 2023

@mattsse do you mind transferring this to the foundry repo since excludeSelector would be a change to forge itself? (or @horsefacts feel free to close and reopen there, sorry for the confusion)

@horsefacts
Copy link
Author

Ah, whoops. I'll move it!

@horsefacts
Copy link
Author

Reopened on forge as foundry-rs/foundry#4352

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

No branches or pull requests

2 participants