-
|
Hello! For the stablecoin DeFi protocol invariant fuzz testing Patrick mentioned that we need to test getters so that they never revert. The code like this is understandable for me: In the above example we're basically testing pure getters on DSCEngine. In the meantime, would it be possible to test something like I tried to add parameter to the test, but then getting error: Let me know if something else can be done. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
|
There are a number of tokens your Protocol support so fuzzing the I don't understand what you mean when you said, |
Beta Was this translation helpful? Give feedback.
You can't do this
function invariant_gettersShouldNotRevert(uint256 tokenSeed) public view {as theinvariantfunction does not take any arguments. You could create a handler and use the handler to give fuzz input to the getter function of the implementation contract.For your argument that it makes to fuzz
tokeninput in a getter that should never revert, I leave you to do you.