Socket
Book a DemoInstallSign in
Socket

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

Package Overview
Dependencies
Maintainers
4
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Semaphore Hardhat template.

latest
npmnpm
Version
4.14.0
Version published
Maintainers
4
Created
Source

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

  • 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.

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

FAQs

Package last updated on 27 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts