@hashcloak/semaphore-contracts-noir
v1.0.1
Published
Semaphore Noir contracts to manage groups and broadcast anonymous signals.
Downloads
33
Readme
To learn more about contracts visit semaphore.pse.dev.
🛠 Install
You can install the semaphore protocol contracts with any node package manager (bun, npm, pnpm,yarn).
bun add @hashcloak/semaphore-contracts-noir
npm i @hashcloak/semaphore-contracts-noir
pnpm add @hashcloak/semaphore-contracts-noir
yarn add @hashcloak/semaphore-contracts-noir📜 Usage
Compile contracts
Compile the smart contracts with Hardhat:
yarn compileTesting
Run Mocha to test the contracts:
yarn testYou can also generate a test coverage report:
yarn test:coverageOr a test gas report:
yarn test:report-gasDeploy contracts
Deploy the SemaphoreNoir.sol contract without any parameter:
yarn deployor deploy it by providing the addresses of the contracts/libraries on which it depends:
yarn deploy --semaphoreVerifier <address>Note
Runyarn deploy:semaphore --helpto 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 --network sepolia
yarn deploy --network mumbai
yarn deploy --network optimism-sepolia
yarn deploy --network arbitrum-sepolia
yarn deploy --network arbitrumIf you want to deploy contracts on Sepolia or Arbitrum, remember to provide a valid private key and an Infura API in your .env file.
