Skip to content

picaroloco/zkLottery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Zero-Knowledge Proof Lottery Project

This repository implements a decentralized lottery system that utilizes zero-knowledge proofs to ensure secure, private, and verifiable lottery operations. The project is divided into several components:

  • circuits/: Contains Circom circuits and related scripts for generating zero-knowledge proofs.
  • contracts/: Houses Solidity smart contracts for lottery logic, ticket management, and proof verification.
  • frontend/ (optional): A Next.js-based decentralized application (DApp) for interacting with the smart contracts.

Repository Structure

``` . ├── circuits/ # ZK circuits, artifacts, scripts, and tests ├── contracts/ # Solidity contracts, tests, and deployment scripts ├── frontend/ # (Optional) Next.js frontend DApp using ethers.js └── README.md # This file ```

Prerequisites

  • Node.js and npm/yarn.
  • Foundry (for smart contract development).
  • Circom and snarkjs (for zero-knowledge circuit compilation and proof generation).
  • (Optional) Next.js for the frontend.

Setup

Contracts

  1. Navigate to the contracts/ directory.

  2. Install dependencies:

    ``` yarn install ```

  3. Compile the contracts:

    ``` forge build ```

  4. Run tests:

    ``` forge test --ffi ```

Circuits

  1. Navigate to the circuits/ directory.

  2. Install dependencies:

    ``` yarn install ```

Frontend (Optional)

  1. Navigate to the frontend/ directory.

  2. Install dependencies:

    ``` npm install ```

  3. Start the development server:

    ``` npm run dev ```

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors