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.
yarn
yarn compile
yarn test
You can also generate a test coverage report:
yarn test:coverage
Or a test gas report:
yarn test:report-gas
- Copy the
.env.example
file as.env
.
cp .env.example .env
- Add your environment variables.
[!NOTE] You should at least set a valid Ethereum URL (e.g. Infura) and a private key with some ethers.
- And deploy your contract.
yarn deploy --semaphore <semaphore-address> --network sepolia
[!NOTE] Check the Semaphore contract addresses here.
Run ESLint and solhint to analyze the code and catch bugs:
yarn lint
Run Prettier to check formatting rules:
yarn prettier
Or to automatically format the code:
yarn prettier:write