Inspiration / What it does
Cnry makes it easy to publish and keep track of warrant canaries.
A warrant canary is a method by which a service provider can inform users that they been served with a government subpoena despite legal prohibitions on revealing the existence of the subpoena.
With Cnry, a user can publish a statement via a Clarity contract to Stacks and an nft is minted that represents the warrant canary.
Even if you don't need a warrant canary, you can publish a Cnry as a pet that you need to feed once in a while (via the keepalive function) or it will expire. How often you need to feed it is configurable in the contract.
Warrant canaries are only useful if someone's paying attention. So anyone can call the watch function which will mint a WATCHER nft that keeps track of that activity. I have some further features in the works that will expand on that concept.
How we built it
As an open source project, Cnry contains a set of Clarity contracts running on Stacks and powered by Bitcoin. It also knits together a web frontend interface, testing frameworks, integration environment, scripting setup, and static IPFS deployment workflow.
Cnry and its little sister BirdCount were developed while participating in the first Clarity Universe cohort.
It was bootstrapped with create-next-app and then integrated with Clarinet (testing and integration) and Clarigen (testing and boilerplate). It utilizes micro-stacks to connect to Stacks and jotai-query-toolkit for managing query state.
The interface is currently built with components from MUI v5 and the styled-components library but that could change in the future if more flexible options become apparent (suggestions welcome!).
Implementing a fully static SSG build using Next.js export, "no compromises" DarkMode, i18n/l10n (including RTL support) are core principles of the project. There's no server and you keep custody of your private keys at all times using the app. You also keep custody of all your data which you can download using the links in the privacy shield menu.
Challenges we ran into
Too numerous to enumerate.
Accomplishments that we're proud of
The use of a second nft (watcher) to store watch transactions. There are some interesting consistency issues if you allow transfer so that function has been crippled pending resolution.
The third contract (maintenance) manages a maintenance messaging and storage system on the bockchain that's tied to the deployer's address. Because Cnry's interface is a fully static site (there's no server), it's by definition impossible to make changes once it's deployed without releasing a new version. The maintenance contract lets the deployer send a message on any build of the site by publishing it in the contract storage. Each build is identified by its git commit hash and that hash is available to the dapp and displayed in the footer of the Cnry frontend.
Also proud to have made the deadline for submission. Wouldn't have happened without the extra week, so thank you for that!
What we learned
So much. Yet not enough.
What's next for Cnry
Would like to continue working on it until it's ready for a product launch. At the moment it's very much a WIP. There are quite a few more features that need to be implemented and it needs audits and some help with ui/ux, graphics as well as documentation and marketing.
Built With
- nextjs
- react
- stacks

Log in or sign up for Devpost to join the conversation.