@semaphore-protocol/cli-template-contracts-hardhat

4.10.0 • Public • Published

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.

Install

Install dependencies

yarn

Usage

Compile contracts

yarn compile

Test contracts

yarn test

You can also generate a test coverage report:

yarn test:coverage

Or a test gas report:

yarn test:report-gas

Deploy contracts

  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> --network sepolia

[!NOTE] Check the Semaphore contract addresses here.

Code quality and formatting

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

Readme

Keywords

none

Package Sidebar

Install

npm i @semaphore-protocol/cli-template-contracts-hardhat

Weekly Downloads

74

Version

4.10.0

License

Unlicense

Unpacked Size

997 kB

Total Files

15

Last publish

Collaborators

  • vplasencia