Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alxkzmn/zk-wordle
The Wordle you know, but with Zero-Knowledge Proofs
https://github.com/alxkzmn/zk-wordle
blockchain circom circomlib ethereum snarkjs wordle wordle-game zk-snarks zkp zkproof zksnark zksnarks
Last synced: 3 days ago
JSON representation
The Wordle you know, but with Zero-Knowledge Proofs
- Host: GitHub
- URL: https://github.com/alxkzmn/zk-wordle
- Owner: alxkzmn
- Created: 2022-01-20T06:49:18.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-12-09T07:18:33.000Z (almost 2 years ago)
- Last Synced: 2023-05-23T13:24:49.444Z (over 1 year ago)
- Topics: blockchain, circom, circomlib, ethereum, snarkjs, wordle, wordle-game, zk-snarks, zkp, zkproof, zksnark, zksnarks
- Language: TypeScript
- Homepage: https://alxkzmn.github.io/zk-wordle/
- Size: 84.1 MB
- Stars: 10
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ZK-Wordle
Wordle game implemented using the Zero-Knowledge Proofs. This project is my first exploration of zero-knowledge proofs. Check out [this series of articles](https://alexkuzmin.io/posts/zk-wordle-1/) to learn the story behind it.
## Compile the circuit, generate the reference zKey and verifier smart contract
```
npm install
npm run compile
```You will be asked to provide random entropy text during the circuits compilation.
## Get local chain up and deploy the contract
Start the local chain:
```bash
cd blockchain
anvil
```Rename `blockchain/.env.example` to `blockchain/.env` and paste the private key of an Ethereum account you intend to use as a deployer.
Deploy the contract in another terminal:
```bash
forge script script/ZKWordle.s.sol --ffi --rpc-url http://localhost:8545 --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 -vvv --broadcast
```This is an Anvil test account's private key - don't use it in production, everyone else knows it!
If you are deploying on a public chain, don't forget to verify the contract on Etherscan for others' convenience:```bash
forge script script/ZKWordle.s.sol --ffi --rpc-url --private-key -vvv --broadcast --etherscan-api-key --verify
```## Run the backend
1. Rename `backend/.env.example` to `backend/.env` and paste the private key of an Ethereum account you intend to use as a signer in the backend.
2. Run```bash
cd backend
npm install
npm run start-dev
```## Run the frontend
1. Rename `frontend/.env.example` to `frontend/.env`
2. Run```bash
cd frontend
npm install
npm run start
```