I’ve been reading the puya-ts compiler and found a bug that let two contract members share the same storage key without any error, which silently overwrote state (I sent a fix: https://github.com/algorandfoundation/puya-ts/pull/408). It made me wonder what other mistakes pass the current unit tests.
I’m considering a small open-source tool that runs property-based and fuzz tests against Algorand contracts written in Algorand TypeScript or Puya Python. It would generate random inputs and call sequences, and check invariants you define, such as “total supply never changes” or “only the owner can call this method”.
Before I build anything, I’d like to hear from people who write contracts:
-
Have you had a bug that your unit tests missed? What was it?
-
Would you use something like this, and in which language: TypeScript or Python?
-
Is there something already doing this that I’ve missed?
-
What would it need to do on day one to be worth trying?
If nobody needs it, I’d rather know now. Thanks for any replies.
