Deploy with confidence.
Pandora enables property-based testing, fuzzing, and invariant testing for smart contracts that run on the Stacks 2.x layer-1 blockchain. Pandora discovers and run tests written in Clarity and TypeScript.
Clarity is the language for writing smart contracts that run on the Stacks 2.x layer-1 blockchain that connects to Bitcoin for security and enables DApps and predictable smart contracts.
Pandora is backwards compatible with Clarinet; your existing Clarinet tests can–and should–co-exist with property-based ones.
Nearly $3 billion1 has been lost to protocol exploits in 2022, more than double 2021’s total. Most of the protocols have been audited, from the high level, but how good enough were those protocols tested for edge cases?
Property-based testing, fuzzing, and invariant testing are well-established techniques for testing the hard stuff and staying sane. Ethereum supports those techniques in dapp and forge.
Clarity has a LISP-like syntax. Having the option to write tests in Clarity helps you minimize context switching between two languages and focus on what matters.
If you are trying to find ways to improve your testing structure, and make it easier to detect edge cases in your Clarity contracts, you may benefit from the upcoming article series:
Node.js and Deno are required for managing Clarity contracts and running tests. Basic knowledge of Clarity, and property-based testing, is assumed. Feel free to contact me if you need help with those.
The ideas presented in the Pandora article series have their origins in a plethora of existing, well-established, battle-hardened testing tools:
QuickCheck, AutoFixture, Hypothesis, Hedgehog, fast-check, all from the perspective of my open-source contributions to some of those in the past decade, and by actually using those at work.
However, don’t consider that as an indication that I’m always right. I welcome feedback on any article.
“Pandora was the first human woman in Greek mythology, created by the gods for the express purpose of punishing mortals. The gods entrusted Pandora with a jar containing all the evils of the cosmos for her to unleash upon mankind.”
--https://mythopedia.com/topics/pandora
This excludes FTX’s $8 billion collapse, which is another story. ↩