https://github.com/vplasencia/semaphore-hardhat-foundry
Semaphore-Hardhat-Foundry template. It uses Foundry tests in a Hardhat project.
https://github.com/vplasencia/semaphore-hardhat-foundry
Last synced: 3 months ago
JSON representation
Semaphore-Hardhat-Foundry template. It uses Foundry tests in a Hardhat project.
- Host: GitHub
- URL: https://github.com/vplasencia/semaphore-hardhat-foundry
- Owner: vplasencia
- Created: 2023-02-01T03:06:21.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-01T03:26:16.000Z (over 2 years ago)
- Last Synced: 2025-01-22T13:14:13.182Z (5 months ago)
- Language: TypeScript
- Homepage:
- Size: 146 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Semaphore-Hardhat-Foundry template
This is a sample Semaphore project that can be used as a template. It uses Foundry tests in a Hardhat project.
## Clone the repository
```bash
git clone https://github.com/vplasencia/semaphore-hardhat-foundry.git
```## Install dependencies
```bash
yarn install:all
```## Compile contracts
```bash
yarn compile
```## Test contracts
```bash
yarn test:all
```## Show gas report
```bash
make gas-report
```## Snapshot
```bash
make snapshot
```You can also generate a test coverage report:
```bash
yarn test:coverage
```Or a test gas report:
```bash
yarn test:report-gas
```### Deploy
1. Copy the `.env.example` file as `.env`.
```bash
cp .env.example .env
```2. Add your environment variables.
> **Note**
> You should at least set a valid Ethereum URL (e.g. Infura) and a private key with some ethers.3. And deploy your contract.
```bash
yarn deploy --semaphore --group --network goerli
```> **Note**
> Check the Semaphore contract addresses [here](https://semaphore.appliedzkp.org/docs/deployed-contracts#semaphore).> **Warning**
> The group id is a number!