https://github.com/sgerodes/pse-semaphore-playground
https://github.com/sgerodes/pse-semaphore-playground
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/sgerodes/pse-semaphore-playground
- Owner: sgerodes
- License: mit
- Created: 2023-10-06T18:56:33.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-06T18:56:36.000Z (over 2 years ago)
- Last Synced: 2024-05-29T22:25:40.893Z (about 2 years ago)
- Language: TypeScript
- Size: 870 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Semaphore Boilerplate
| The repository is divided into two components: [web app](./apps/web-app) and [contracts](./apps/contracts). The app allows users to create their own Semaphore identity, join a group and then send their feedback anonymously (currently on Arbitrum Goerli). |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
## 🛠Install
Use this repository as a Github [template](https://github.com/semaphore-protocol/boilerplate/generate).
Clone your repository:
```bash
git clone https://github.com//.git
```
and install the dependencies:
```bash
cd && yarn
```
## 📜 Usage
Copy the `.env.example` file as `.env`:
```bash
cp .env.example .env
```
and add your environment variables or run the app in a local network.
### Local server
You can start your app locally with:
```bash
yarn dev
```
### Deploy the contract
1. Go to the `apps/contracts` directory and deploy your contract:
```bash
yarn deploy --semaphore --group --network arbitrum-goerli
```
2. Update your `.env` file with your new contract address, the group id and the semaphore contract address.
3. Copy your contract artifacts from `apps/contracts/build/contracts/contracts` folder to `apps/web-app/contract-artifacts` folders manually. Or run `yarn copy:contract-artifacts` in the project root to do it automatically.
> **Note**
> Check the Semaphore contract addresses [here](https://semaphore.pse.dev/docs/deployed-contracts).
> **Warning**
> The group id is a number!
### Code quality and formatting
Run [ESLint](https://eslint.org/) to analyze the code and catch bugs:
```bash
yarn lint
```
Run [Prettier](https://prettier.io/) to check formatting rules:
```bash
yarn prettier
```
or to automatically format the code:
```bash
yarn prettier:write
```