Skip to content

forge invariant test not fuzzing functions #101

Discussion options

You must be logged in to vote

I figured it out. The problem was the array length I specified was too large (4). The space of the array I specified is not the amount that I actually used.

Foundry probably checks if any selector of the selectors array is empty / not used.

I had to change the code from:

bytes4[] memory selectors = new bytes4[](4);
bytes4[] memory selectors = new bytes4[](2);

Because I only had 2 functions to fuzz call.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@PatrickAlphaC
Comment options

Answer selected by jaimebarrancos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants