ZORP is a privacy-preserving data collection and reward distribution platform built on Semaphore. It allows participants to submit data (e.g., EEG or survey results) anonymously, while enabling administrators to moderate submissions and distribute rewards in ETH or a native token.
- Smart Contracts (
zorp-contracts
): Written in Solidity using Foundry, handle study creation, data submission, moderation, and reward payout. - Front-End (
zorp-frontend
): A Next.js + RainbowKit application that lets users create and manage studies, upload data to IPFS, and interact with the contracts on-chain (e.g., Base Goerli / Base mainnet).
zorp/
├─ README.md
├─ zorp-contracts/
│ ├─ foundry.toml
│ ├─ src/
│ ├─ script/
│ ├─ test/
│ ├─ lib/
│ └─ ...
├─ zorp-frontend/
│ ├─ package.json
│ ├─ app/
│ ├─ components/
│ ├─ ...
└─ .gitignore
- Purpose: Contains all the ZORP smart contracts (e.g.,
ZorpFactory.sol
,ZorpStudy.sol
) and Foundry configuration/testing. - Key Files:
foundry.toml
: Foundry configuration (compiler settings, etc.).src/
: Your main Solidity source files (contracts).test/
: Solidity tests using Foundry’s test framework.script/
: Scripts for deploying or interacting with the contracts (.s.sol
files).lib/
: For external libraries like OpenZeppelin.
- Install Foundry (if not already):
curl -L https://foundry.paradigm.xyz | bash foundryup
- Build the project:
cd zorp-contracts forge build
- Run tests:
forge test
- Deploying:
- Example:
forge script script/DeployZorp.s.sol --rpc-url <YOUR_RPC> --private-key <YOUR_KEY> --broadcast
- Example:
- Purpose: A React-based web application for managing studies, uploading data to IPFS, and interacting with the ZORP contracts.
- Key Files:
package.json
: Manages dependencies, including Next.js, wagmi, RainbowKit.pages/
: Next.js pages likeindex.tsx
,[studyId].tsx
for study detail, etc.components/
: Reusable UI components.styles/
: Tailwind CSS files or global styles.
- Install Dependencies:
cd zorp-frontend npm install # or yarn install
- Configure Environment (e.g.,
.env.local
):- You may need variables for NEXT_PUBLIC_RPC_URL, NEXT_PUBLIC_CONTRACT_ADDRESS, or IPFS_API_KEY if using a pinned storage service.
- Start the Dev Server:
npm run dev # or yarn dev
- Open http://localhost:3000 in your browser to see the app.
- Fork the repo or clone it locally.
- Work on a feature branch (e.g.,
feature/add-contract-tests
). - Submit a Pull Request for review.
This project is licensed under GPL-3.0.