Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@semaphore-protocol/contracts

Package Overview
Dependencies
Maintainers
2
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@semaphore-protocol/contracts

Semaphore contracts to manage groups and broadcast anonymous signals.

  • 4.0.0-beta.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
350
decreased by-27.08%
Maintainers
2
Weekly downloads
 
Created
Source

Semaphore contracts

Semaphore contracts to manage groups and broadcast anonymous signals.

NPM license NPM version Downloads

👥 Contributing   |   🤝 Code of conduct   |   🔎 Issues   |   🗣️ Chat & Support

To learn more about contracts visit semaphore.pse.dev.


🛠 Install

npm or yarn

Install the @semaphore-protocol/contracts package with npm:

npm i @semaphore-protocol/contracts

or yarn:

yarn add @semaphore-protocol/contracts

📜 Usage

Compile contracts

Compile the smart contracts with Hardhat:

yarn compile

Testing

Run Mocha to test the 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

Deploy the Semaphore.sol contract without any parameter:

yarn deploy:semaphore

or deploy it by providing the addresses of the contracts/libraries on which it depends:

yarn deploy:semaphore --semaphoreVerifier <address>

Note
Run yarn deploy:semaphore --help to see the complete list.

If you want to deploy your contract in a specific network you can set up the DEFAULT_NETWORK variable in your .env file with the name of one of our supported networks (hardhat, localhost, sepolia, arbitrum). Or you can specify it as an option:

yarn deploy:semaphore --network sepolia
yarn deploy:semaphore --network mumbai
yarn deploy:semaphore --network optimism-sepolia
yarn deploy:semaphore --network arbitrum-sepolia
yarn deploy:semaphore --network arbitrum

If you want to deploy contracts on Sepolia or Arbitrum, remember to provide a valid private key and an Infura API in your .env file.

Keywords

FAQs

Package last updated on 26 Mar 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc