
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
@semaphore-protocol/cli-template-contracts-foundry
Advanced tools
This project demonstrates a basic Semaphore use case. It comes with a sample contract, a test for that contract and a sample script that deploys that contract.
This project requires Foundry, and thus a Rust environment, installed in the machine.
yarn
yarn compile
yarn test
You can also generate a test coverage report:
yarn test:coverage
Or a test gas report:
yarn test:gas-report
You can also start a local Anvil node with Semaphore and Feedback contracts deployed on it with:
yarn dev
Run 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
You can also integrate this project with Semaphore Boilerplate, using this project as the contract end and connecting with Boilerplate front end.
In cli-template-contracts-foundry package directory, run:
yarn install
yarn dev
After running yarn dev, notice the output of
# ...
# ...
== Return ==
feedbackAddr: address 0x6f1AFCA8BCA87bF02091AF6187a5002802f9FB31
semaphoreAddr: address 0xb730ce6CAE3FB706e83E4E00dFA31623966570eB
semaphoreVerifierAddr: address 0xE2c114f548bEf410eaCe04D0390b61cc963df295
# ...
# ...
Now, with another terminal, clone Semaphore Boilerplate down:
# Clone Semaphore boilerplate and build dependencies
git clone https://github.com/semaphore-protocol/boilerplate.git
cd boilerplate
yarn install
# Use the sample .env.example
cp .env.example .env
Open the file apps/web-app/.env.development. Modify the values of NEXT_PUBLIC_FEEDBACK_CONTRACT_ADDRESS and NEXT_PUBLIC_SEMAPHORE_CONTRACT_ADDRESS with feedbackAddr and semaphoreAddr values shown in step 1.
Run the Boilerplate front end:
yarn dev:web-app
FAQs
Semaphore Foundry template.
We found that @semaphore-protocol/cli-template-contracts-foundry demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

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.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.