Check the Documentation for detailed info about project structure.
The project is currently on Harmony Devnet and the frontend is hosted on Surge.
- Install the required node modules by running:
yarn install- compile circuits, this step will also copy necessary files to hardhat and react-app folders:
cd packages/circom
chmod u+x ./scripts/run.sh
./scripts/run.sh LessThanWinner 14- install and start your 👷 Hardhat chain:
yarn chain- in a second terminal window, start your 📱 frontend:
yarn start- in a third terminal window, 🛰 deploy your contract:
yarn deployStep 1 and 2 are same as Run Locally, but instead of spinning your local blockchain do as follows:
in packages/hardhat directory:
- go to hardhat directory
packages/hardhat - modify Hardhat's config file to add your desired EVM based chain in networks section.
- run
yarn generateto create a new deployer account. themnemonic.txtis now created in the hardhat directory. - run
yarn accountto get address of that account and then send some native funds to that address - deploy to desired network with
yarn deploy --network NETWORK_NAME_HEREand set desired gas price using--gasprice 100000000in wei
in packages/react-app directory:
.sample.envto.envand set network to desired network (e.glocalhostordevnetHarmony) also add the public address of front-end domain with its protocol (e.gREACT_APP_PUBLIC_URL=https://example.surge.sh)- run
yarn build - you can deploy the
packages/react-app/buildfolder on any webserver. an easy way it to use surge by runningyarn surge