Debugging withdrawToken Fuzz Fail — Getting UnsupportedToken() Instead of Patrick's Errors #342
-
Hey everyone 👋 I'm currently on Section 5: TSwap of Patrick's course, specifically the "Debugging Fuzz Sequences" part. While following along, Patrick gets errors like However, when I run the invariant test, I get:
It seems my test is hitting a revert due to an unsupported token. Could this be because my Just wondering if anyone else ran into this before or if I'm missing a setup step here. Appreciate any help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Hey @successaje, it seems like you did everything correctly. Please run |
Beta Was this translation helpful? Give feedback.
Hello @successaje, you are running into that error because you set your target-contract wrongly. It should be set to the
Handler
contract and not thehsfc
contract as you have it in your Invariant contract.So change
targetContract(address(hsfc))
totargetContract(address(handler));
and the test process should run as expected.