A Mina zkApp for creating whitelisted events and have users claim tickets. Users can also send tickets to other users and prove ticket ownership at the event.
Each event has its own smart contract which stores a merkle root for the whitelist merkle tree. The merkle tree keeps track of any change in ticket balance for the users. The merkle root is updated whenever user claims or transfers a ticket. The smart contract also keeps track of the event details (max total tickets, max tickets per user, whitelist size, tickets claimed, owner). The zkApp also generates a ticket QR code containing data that can be used to prove ticket ownership at the venue.
- General architecture
- Event generation with whitelist
- Ticket claiming if in whitelist
- Gameify console interaction
- Limits on total number of tickets
- Limits on maximum number of tickets claimable per user
- Prove ticket ownership
- Ticket transfer between users
- QR code generation
- Write tests
- Separate into multiple files tests, contract and demo
- Add msg.sender check on claim and transfer
- More concise tests
- Whitelist modifiable by owner
- Add timestamp check on claim and transfer
- Hide more data
- QR code with less identifiable data
- Create verifier program to run at the event
- Frontend
Run demo:
npm run demo
Run tests:
npm run test
- Snarkyjs documentation: https://o1-labs.github.io/snarkyjs/index.html
The zkApp is still actively under development.
This project is being built as part of Mina's zkApp Builders Program.