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 deploy
Step 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 generate
to create a new deployer account. themnemonic.txt
is now created in the hardhat directory. - run
yarn account
to get address of that account and then send some native funds to that address - deploy to desired network with
yarn deploy --network NETWORK_NAME_HERE
and set desired gas price using--gasprice 100000000
in wei
in packages/react-app
directory:
.sample.env
to.env
and set network to desired network (e.glocalhost
ordevnetHarmony
) 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/build
folder on any webserver. an easy way it to use surge by runningyarn surge