Skip to content
Discussion options

You must be logged in to vote

Yes you are rigth, I forgot about the -vvvvv option in foundry... The withdrawToken functions are called at the beginning of the test, and then the fuzzer attempts to break the invariants by calling other functions specified in the handler. The process is basically as follows:

  1. The statefulFuzz_testInvariantBreakHandler function is called (executing everything on it).
  2. A random function from the Handler contract is called.
  3. State is preserved.
  4. Number 1 again until it breaks.

Basically, at step 1 we are withdrawing everything that the Handler (probably) deposited. Nice.

Replies: 2 comments 1 reply

Comment options

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

Answer selected by wildanvin
Comment options

You must be logged in to vote
0 replies
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