ScopeLift / flexible-voting

💪🗳️ Flexible Voting – A Powerful Building Block for DAO Governance
https://flexiblevoting.com
MIT License
85 stars 8 forks source link

Add Invariant Testing #24

Open apbendi opened 1 year ago

apbendi commented 1 year ago

Set up invariant testing and add invariant tests where appropriate.

For example, testing that the total weight being voted with never exceeds the voting weight delegated by the gov token (would revert if so).

mds1 commented 1 year ago

References for invariant testing patterns, lmk if you have any questions when implementing:

Perelyn-sama commented 1 year ago

This should also help - https://github.com/foundry-rs/foundry/tree/master/testdata/fuzz/invariant