Files
semaphore/packages/cli-template-contracts-hardhat

Semaphore Hardhat template

This project demonstrates a basic Semaphore use case. It comes with a sample contract, a test for that contract and a sample task that deploys that contract.

Usage

Compile

yarn compile

Testing

yarn test

You can also generate a test coverage report:

yarn test:coverage

Or a test gas report:

yarn test:report-gas

Deploy

  1. Copy the .env.example file as .env.
cp .env.example .env
  1. Add your environment variables.

Note


You should at least set a valid Ethereum URL (e.g. Infura) and a private key with some ethers.

  1. And deploy your contract.
yarn deploy --semaphore <semaphore-address> --group <group-id> --network goerli

Note


Check the Semaphore contract addresses here.

Warning


The group id is a number!