Skip to content

Commit 6cb016c

Browse files
committed
Merge mainreplica into main [skip ci]
2 parents d8d0876 + 0740f43 commit 6cb016c

File tree

26 files changed

+5537
-593
lines changed

26 files changed

+5537
-593
lines changed

README.md

Lines changed: 111 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,139 @@
1-
# 🏗 Scaffold-ETH 2
1+
# ZKonnect: Decentralized Event Management and Ticketing powered by Zero Knowledge.
22

3-
<h4 align="center">
4-
<a href="https://docs.scaffoldeth.io">Documentation</a> |
5-
<a href="https://scaffoldeth.io">Website</a>
6-
</h4>
3+
<p align="center">
4+
<img src="https://github.com/user-attachments/assets/aa342c7e-8ca2-4d95-a2f1-598c32d79cad" alt="Sublime's custom image"/>
5+
</p>
76

8-
🧪 An open-source, up-to-date toolkit for building decentralized applications (dapps) on the Ethereum blockchain. It's designed to make it easier for developers to create and deploy smart contracts and build user interfaces that interact with those contracts.
7+
ZKonnect is a blockchain-based event management and ticketing platform that leverages decentralized technologies to enhance transparency, security, and fairness in ticketing systems. Designed for organizers and attendees, ZKonnect eliminates ticket fraud, prevents black-market reselling, and enables seamless event management with role-based access control.
98

10-
⚙️ Built using NextJS, RainbowKit, Hardhat, Wagmi, Viem, and Typescript.
9+
## **Features**
1110

12-
-**Contract Hot Reload**: Your frontend auto-adapts to your smart contract as you edit it.
13-
- 🪝 **[Custom hooks](https://docs.scaffoldeth.io/hooks/)**: Collection of React hooks wrapper around [wagmi](https://wagmi.sh/) to simplify interactions with smart contracts with typescript autocompletion.
14-
- 🧱 [**Components**](https://docs.scaffoldeth.io/components/): Collection of common web3 components to quickly build your frontend.
15-
- 🔥 **Burner Wallet & Local Faucet**: Quickly test your application with a burner wallet and local faucet.
16-
- 🔐 **Integration with Wallet Providers**: Connect to different wallet providers and interact with the Ethereum network.
11+
### For Organizers:
12+
![image](https://github.com/user-attachments/assets/81ad9f8c-a959-419e-acb1-11b5bc5db70d)
1713

18-
![Debug Contracts tab](https://github.com/scaffold-eth/scaffold-eth-2/assets/55535804/b237af0c-5027-4849-a5c1-2e31495cccb1)
14+
- **Event Creation**: Organizers can create events by specifying details like event name, image, maximum attendees, and a secret staking ID.
15+
- **Editable Event Details**: Organizers can modify event details as needed, stored securely on-chain or via decentralized storage.
16+
- **Secure Ticket Validation**: Attendees are validated on the day of the event using Zero-Knowledge Proofs (zkProofs).
1917

20-
## Requirements
18+
### For Buyers:
19+
![Screencast from 2024-12-12 15-19-29](https://github.com/user-attachments/assets/0025a082-6017-40e4-bb28-d0cf28ab082f)
2120

22-
Before you begin, you need to install the following tools:
21+
- **Role-Based Access Control**: Buyers and organizers have separate views, authenticated using MetaMask/Coinbase wallet addresses.
22+
- **Seamless Ticket Purchase**: Buyers stake a secret ID, verify using zkProofs, and pay via cryptocurrency.
23+
- **NFT Ticketing**: After purchasing, buyers receive a minted NFT containing event details and a zkProof-generated hash as a secure ticket.
2324

24-
- [Node (>= v18.18)](https://nodejs.org/en/download/)
25-
- Yarn ([v1](https://classic.yarnpkg.com/en/docs/install/) or [v2+](https://yarnpkg.com/getting-started/install))
26-
- [Git](https://git-scm.com/downloads)
25+
---
2726

28-
## Quickstart
27+
## **Setup Instructions**
2928

30-
To get started with Scaffold-ETH 2, follow the steps below:
29+
### **Prerequisites**
30+
- Node.js (v16 or higher)
31+
- Yarn or npm
32+
- Hardhat (for smart contract deployment)
33+
- MetaMask wallet extension
34+
- Polygon zkEVM/Amoy testnet configuration
3135

32-
1. Install dependencies if it was skipped in CLI:
33-
34-
```
35-
cd my-dapp-example
36-
yarn install
36+
### **1. Clone the Repository**
37+
```bash
38+
git clone https://github.com/your-username/ETH24Submission.git
39+
cd ETH24Submission
3740
```
3841

39-
2. Run a local network in the first terminal:
40-
42+
### **2. Install Dependencies**
43+
#### For Scaffold-ETH2 Setup
44+
- Install required tools:
45+
```bash
46+
yarn install
47+
```
48+
49+
### **3. Smart Contract Deployment**
50+
#### Scaffold-ETH2
51+
1. Run a local Ethereum network in the first terminal:
52+
```bash
53+
yarn chain
54+
```
55+
56+
2. Deploy the test contract on a second terminal:
57+
```bash
58+
yarn deploy
59+
```
60+
61+
#### ZKonnect
62+
1. Navigate to the backend directory:
63+
```bash
64+
cd packages/hardhat
65+
```
66+
2. Configure the deployment network in `hardhat.config.js` (e.g., Polygon zkEVM/Amoy testnet or local network).
67+
3. Compile the contracts:
68+
```bash
69+
npx hardhat compile
70+
```
71+
4. Deploy the smart contracts:
72+
```bash
73+
npx hardhat deploy --network polygonZkEvm
74+
```
75+
5. Copy the deployed contract address and update the frontend configuration file (`frontend/src/config.js`).
76+
77+
### **4. Run the Backend**
78+
Start the backend server:
79+
```bash
80+
npm start
4181
```
42-
yarn chain
43-
```
44-
45-
This command starts a local Ethereum network using Hardhat. The network runs on your local machine and can be used for testing and development. You can customize the network configuration in `packages/hardhat/hardhat.config.ts`.
46-
47-
3. On a second terminal, deploy the test contract:
4882

83+
### **5. Run the Frontend**
84+
#### Scaffold-ETH2
85+
Start the Next.js app:
86+
```bash
87+
yarn start
4988
```
50-
yarn deploy
51-
```
52-
53-
This command deploys a test smart contract to the local network. The contract is located in `packages/hardhat/contracts` and can be modified to suit your needs. The `yarn deploy` command uses the deploy script located in `packages/hardhat/deploy` to deploy the contract to the network. You can also customize the deploy script.
89+
Visit the app at `http://localhost:3000`.
5490

55-
4. On a third terminal, start your NextJS app:
91+
#### ZKonnect
92+
1. Navigate to the frontend directory:
93+
```bash
94+
cd ../nextjs
95+
```
96+
2. Start the development server:
97+
```bash
98+
yarn start
99+
```
100+
3. Open the app in your browser at `http://localhost:3000`.
56101

57-
```
58-
yarn start
59-
```
102+
---
60103

61-
Visit your app on: `http://localhost:3000`. You can interact with your smart contract using the `Debug Contracts` page. You can tweak the app config in `packages/nextjs/scaffold.config.ts`.
104+
## **How It Works**
62105

63-
Run smart contract test with `yarn hardhat:test`
106+
### **Organizer Workflow**:
107+
1. Login with MetaMask or Coinbase Wallet.
108+
2. Create an event by filling in event details and uploading images.
109+
3. Manage and edit event details stored securely on Polygon zkEVM.
64110

65-
- Edit your smart contracts in `packages/hardhat/contracts`
66-
- Edit your frontend homepage at `packages/nextjs/app/page.tsx`. For guidance on [routing](https://nextjs.org/docs/app/building-your-application/routing/defining-routes) and configuring [pages/layouts](https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts) checkout the Next.js documentation.
67-
- Edit your deployment scripts in `packages/hardhat/deploy`
111+
### **Buyer Workflow**:
112+
1. Login with MetaMask or Coinbase Wallet.
113+
2. Browse events and select an event.
114+
3. Enter the secret staking ID and pay using cryptocurrency.
115+
4. Receive an NFT ticket as proof of purchase. Wait for the event :)
68116

117+
### **Event Verification**:
118+
- On the event day, buyers provide their zkProof-generated hash, which the organizer verifies to grant entry, and all of this is automated via QR codes.
119+
[![Deep Dive into out architecture](https://img.youtube.com/vi/VIDEO_ID/0.jpg)](https://www.youtube.com/watch?v=fGA3MQ0U6fA)
120+
---
69121

70-
## Documentation
122+
## **Technologies Used**
71123

72-
Visit our [docs](https://docs.scaffoldeth.io) to learn how to start building with Scaffold-ETH 2.
124+
### **Blockchain and smart contracts**:
125+
![image](https://github.com/user-attachments/assets/d96ba7fd-a3f6-4212-9651-c2ab6193a74f)
126+
![image](https://github.com/user-attachments/assets/4347563b-beb3-4aa5-b541-2ab4d3653765)
127+
![image](https://github.com/user-attachments/assets/173af87d-86cd-4db2-bf2c-d611f52fa9b0)
73128

74-
To know more about its features, check out our [website](https://scaffoldeth.io).
129+
### **Authentication**:
130+
![image](https://github.com/user-attachments/assets/32ce03ce-47ff-43c1-b576-808a5abefbbb)
131+
![image](https://github.com/user-attachments/assets/3968f01d-a999-41b9-b477-d571f6576422)
75132

76-
## Contributing to Scaffold-ETH 2
77133

78-
We welcome contributions to Scaffold-ETH 2!
134+
### **Proof Generation**:
135+
- **Circom and Snark.js**: For generating and validating zkProofs to secure sensitive data.
79136

80-
Please see [CONTRIBUTING.MD](https://github.com/scaffold-eth/scaffold-eth-2/blob/main/CONTRIBUTING.md) for more information and guidelines for contributing to Scaffold-ETH 2.
137+
### **Frontend**:
138+
- **Next.js**: For a modern, responsive, and performant frontend.
139+
- **Scaffold-ETH2**: For integrating Ethereum and bootstrapping frontend components.

0 commit comments

Comments
 (0)