Home

Awesome

Notice: This repository has been deprecated in favor of the monorepo found at a16z/zkdrops

React + NextJS + Webpacking

Example of computing proofs for the zkp-merkle-airdrop-contracts sample repo in the browser. The majority of the work is done by the zkp-merkle-airdrop-lib which in turn uses the work of the iden3 team's circom libraries. In this repo it's installed as a submodule in zkp-merkle-airdrop-lib.

Proof computation takes 20-60s in the browser depending on the machine.

Fe-ex-picture

Install

Notes

This example front-end depends on the following locally served files:

The library includes imports for server-side only libraries. Because this usage is browser based, this repo ignores them during webpacking in next.config.js.

Testing locally

Setup


UI

Sample keys and secrets

keysecret
0x0049a9ef3d7fd63b5db0a70c83721ca7e53e092e3edb54de90b07e3e069258fc0x003dbe3ecc58da8d8f530d24733846a794fc1047d58ab81fe2dfb240bbc2e994
0x00818a031d8fae48b4685fad60bfb880451bdb0718181b224e45b27b9cd21dd60x002966f64f1829eaefa9971f07294364c9ec106b4381ab373356e6ae16897c61
0x0076f5375cb69a8b00cacb2dfbbf2f9f521ece9bc37676968e403e3aa42d283c0x00284cddbdb17bca11bd55822cda81e28d91f8c0fc021fb1d82d32ca93b2488b
0x00372045d58eff4521feba2696634c589c522c26b8252440fdc05588b36b0b9d0x00d5940fd9784bbfd8e69760cd8d7f469f685e1acddc1156d8d9910a8a5fd72c

source

Adding Hardhat local dev chain to Metamask

Disclaimer

These smart contracts are being provided as is. No guarantee, representation or warranty is being made, express or implied, as to the safety or correctness of the user interface or the smart contracts. They have not been audited and as such there can be no assurance they will work as intended, and users may experience delays, failures, errors, omissions or loss of transmitted information. In addition, any airdrop using these smart contracts should be conducted in accordance with applicable law. Nothing in this repo should be construed as investment advice or legal advice for any particular facts or circumstances and is not meant to replace competent counsel. It is strongly advised for you to contact a reputable attorney in your jurisdiction for any questions or concerns with respect thereto. a16z is not liable for any use of the foregoing and users should proceed with caution and use at their own risk. See a16z.com/disclosure for more info.