Skip to content

0x4r45h/zuction

Repository files navigation

Zuction - Zero-Knowledge Auction

Check the Documentation for detailed info about project structure.

The project is currently on Harmony Devnet and the frontend is hosted on Surge.

Run Project Locally

  1. Install the required node modules by running:
yarn install
  1. 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
  1. install and start your 👷‍ Hardhat chain:
yarn chain
  1. in a second terminal window, start your 📱 frontend:
yarn start
  1. in a third terminal window, 🛰 deploy your contract:
yarn deploy

Devnet / Production deployment

Step 1 and 2 are same as Run Locally, but instead of spinning your local blockchain do as follows:

Deploy contracts:

in packages/hardhat directory:

  1. go to hardhat directory packages/hardhat
  2. modify Hardhat's config file to add your desired EVM based chain in networks section.
  3. run yarn generate to create a new deployer account. the mnemonic.txt is now created in the hardhat directory.
  4. run yarn account to get address of that account and then send some native funds to that address
  5. deploy to desired network with yarn deploy --network NETWORK_NAME_HERE and set desired gas price using --gasprice 100000000in wei

Deploy Front-End:

in packages/react-app directory:

  1. .sample.env to .env and set network to desired network (e.g localhost or devnetHarmony) also add the public address of front-end domain with its protocol (e.g REACT_APP_PUBLIC_URL=https://example.surge.sh)
  2. run yarn build
  3. you can deploy the packages/react-app/build folder on any webserver. an easy way it to use surge by running yarn surge