@webb-tools/semaphore v0.0.1-5
To learn more about contracts visit semaphore.appliedzkp.org.
🛠 Install
npm or yarn
Install the @webb-tools/semaphore-contracts package with npm:
npm i @webb-tools/semaphore-contractsor yarn:
yarn add @webb-tools/semaphore-contracts📜 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 a verifier contract with depth = 20:
yarn deploy:verifier --depth 20Deploy the Semaphore.sol contract with one verifier:
yarn deploy:semaphore --verifiers '[{"merkleTreeDepth": 20, "contractAddress": "0x06bcD633988c1CE7Bd134DbE2C12119b6f3E4bD1"}]'Deploy all verifiers and Semaphore contract:
yarn deploy:allIf you want to deploy contracts 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, goerli, arbitrum). Or you can specify it as option:
yarn deploy:all --network goerli
yarn deploy:all --network localhostIf you want to deploy contracts on Goerli or Arbitrum, remember to provide a valid private key and an Infura API in your .env file.