Skip to content

Decentralized Pay-to-Play Wordle using a RSA accumulator to store the encrypted solution and verifier on a public blockchain.

License

Notifications You must be signed in to change notification settings

vlmlee/Wordle-Dapp

Repository files navigation

Decentralized Wordle

Come play with it live here.

Deploying to Sepolia Testnet with Infura

If you'd like to deploy your own version, first create a .env file at the root of the project and put in your Infura credentials (make sure to .gitignore this file):

INFURA_URL="https://sepolia.infura.io/v3/"
INFURA_API_KEY="<your-api-key>"
MNEMONIC="<your-mnemonic>"
PRIVATE_KEY="<your-private-key>"
ADDRESS="<your-wallet-address>"
SOLUTION="<your-wordle-solution>"

Then deploy your version onto the Sepolia testnet with:

npm run deploy-wordle-and-create-puzzle-on-sepolia

When the script finishes, the console will print out the deployer's wallet address and the contract's deployed address. If you want to create a new Wordle puzzle, edit the $SOLUTION environment variable inside .env and then run:

npm run create-new-wordle-sepolia

To interact with the smart contract, you'll need a frontend. So in the command line, run:

cd frontend
npm install
npm start

And that should spin up a React app that connects to your deployed contract. Look up the smart contract on https://sepolia.etherscan.io/ to make sure it's there, and you're set!

Running locally

You can also run this project locally with the hardhat test node with the commands:

npx hardhat node
npm run deploy-local
npm run create-new-wordle-local

Testing

To run the test suite and check what functionality has been tested, run:

npm test

The unit tests are not exhaustive and the smart contract has not been audited so please do not use this in production.

About

Decentralized Pay-to-Play Wordle using a RSA accumulator to store the encrypted solution and verifier on a public blockchain.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published