Skip to content

Latest commit

 

History

History
58 lines (40 loc) · 1.67 KB

README.md

File metadata and controls

58 lines (40 loc) · 1.67 KB

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.