Wordle game implemented using the Zero-Knowledge Proofs. This project is my first exploration of zero-knowledge proofs. Check out this series of articles to learn the story behind it.
npm install
npm run compile
You will be asked to provide random entropy text during the circuits compilation.
Start the local chain:
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:
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:
forge script script/ZKWordle.s.sol --ffi --rpc-url <YOUR RPC URL (e.g., Infura)> --private-key <YOUR ETHEREUM PRIVATE KEY> -vvv --broadcast --etherscan-api-key <YOUR ETHERSCAN API KEY> --verify
- Rename
backend/.env.example
tobackend/.env
and paste the private key of an Ethereum account you intend to use as a signer in the backend. - Run
cd backend
npm install
npm run start-dev
- Rename
frontend/.env.example
tofrontend/.env
- Run
cd frontend
npm install
npm run start