Compare commits

...

80 Commits

Author SHA1 Message Date
Vivian Plasencia
a2e8f5a15c chore: v4.8.2 2024-12-18 13:06:36 +01:00
Vivian Plasencia
f77df8d98f fix: include solhint config file in contracts templates (#929) 2024-12-18 13:01:35 +01:00
Vivian Plasencia
2b9fde2676 chore: v4.8.1 2024-12-18 11:41:01 +01:00
Vivian Plasencia
ac4ddfc6eb chore(cli-template-contracts-foundry): add prepublish script (#927)
chore(cli-template-contracts-foundry): add prepublish script to publish foundry template
2024-12-18 11:32:36 +01:00
Vivian Plasencia
afae06e8e1 chore: v4.8.0 2024-12-17 15:06:02 +01:00
Jimmy Chu
4cc6980b55 Add CLI Foundry Template (cont.) (#905)
* Semaphore identity example code bug fix

* Receive suggestion for consistency

* chore: forge init

* forge install: forge-std

v1.9.2

* Foundry CLI First Draft

* modules

* forge install: semaphore

v4.0.3

* forge install: zk-kit.solidity

* forge install: poseidon-solidity

v0.0.5

* forge install: openzeppelin-contracts

v5.0.2

* modules

* forge install: semaphore

v4.0.3

* forge install: zk-kit.solidity

* forge install: poseidon-solidity

v0.0.5

* forge install: openzeppelin-contracts

v5.0.2

* modules

* forge install: semaphore

v4.0.3

* forge install: zk-kit.solidity

* forge install: poseidon-solidity

v0.0.5

* forge install: openzeppelin-contracts

v5.0.2

* modules

* forge install: semaphore

v4.0.3

* forge install: zk-kit.solidity

* forge install: poseidon-solidity

v0.0.5

* forge install: openzeppelin-contracts

v5.0.2

* modules

* forge install: semaphore

v4.0.3

* forge install: zk-kit.solidity

* forge install: poseidon-solidity

v0.0.5

* forge install: openzeppelin-contracts

v5.0.2

* modules

* forge install: semaphore

v4.0.3

* forge install: zk-kit.solidity

* forge install: poseidon-solidity

v0.0.5

* forge install: openzeppelin-contracts

v5.0.2

* forge install: forge-std

v1.9.2

* modules

* forge install: semaphore

v4.0.3

* forge install: zk-kit.solidity

* forge install: poseidon-solidity

v0.0.5

* forge install: openzeppelin-contracts

v5.0.2

* modules

* forge install: semaphore

v4.0.3

* forge install: zk-kit.solidity

* forge install: poseidon-solidity

v0.0.5

* forge install: openzeppelin-contracts

v5.0.2

* forge install: forge-std

v1.9.2

* modules

* forge install: semaphore

v4.0.3

* forge install: zk-kit.solidity

* forge install: poseidon-solidity

v0.0.5

* forge install: openzeppelin-contracts

v5.0.2

* forge install: forge-std

v1.9.2

* modules

* forge install: semaphore

v4.0.3

* forge install: zk-kit.solidity

* forge install: poseidon-solidity

v0.0.5

* forge install: openzeppelin-contracts

v5.0.2

* modules

* forge install: semaphore

v4.0.3

* forge install: zk-kit.solidity

* forge install: poseidon-solidity

v0.0.5

* forge install: openzeppelin-contracts

v5.0.2

* forge install: forge-std

v1.9.2

* modules

* forge install: semaphore

v4.0.3

* forge install: zk-kit.solidity

* forge install: poseidon-solidity

v0.0.5

* forge install: openzeppelin-contracts

v5.0.2

* forge install: forge-std

v1.9.2

* change test name

* modify declaration of semaphore and verifier

* Modify Test Function Name

* Add Test Chain Target

* forge std install

* refactor(cli-template-contracts-foundry): change default Anvil address and private key

* chore(cli-template-contracts-foundry): add comments

* refactor(cli-template-contracts-foundry): add Semaphore & SemaphoreVerifier addresses for test chain

* chore(cli-template-contracts-foundry): add forge coverage for Makefile

* chore(cli-template-contracts-foundry): add env.example

* docs(cli-template-contracts-foundry): add command instructions

* updated

* forge build works

* Fixed for linting

* chore(cli-template-contracts-foundry): make the lint, prettier, and lint-staged pass

* chore(cli-template-contracts-foundry): replace Makefile(removed) with package.json

* chore(cli-template-contracts-foundry): passing the ci test

* updated test

* feat(cli-template-contracts-foundry): complete cli-template-contracts-foundry

re #854, #185

* Update dependencies

* Add explanation on `yarn dev`

* fix(cli-template-contracts-foundry): fix `yarn dev` command and add docs on integrate w/ boilerplate

* Added yarnrc

* updated version

* Added Foundry in template option

---------

Co-authored-by: weipooppys93030 <55434365+weipooppys93030@users.noreply.github.com>
Co-authored-by: timou0911 <x0928048316@gmail.com>
Co-authored-by: csiejimmyliu <91661606+csiejimmyliu@users.noreply.github.com>
2024-12-17 14:48:36 +01:00
cedoor
6b04ec0eca chore: v4.7.3 2024-12-12 08:55:13 +00:00
Jake C-T
13a9480165 fix(core): bump ethers to v6.13.4 (#921)
Update ethers version to resolve ws security issue (CVE-2024-37890).
Move contract address check outside of branch statement so Typescript can see.
Add build instructions to setup to resolve 'Cannot find module '@semaphore-protocol/...' when
running tests for the first time.

re #920
2024-12-12 08:53:17 +00:00
cedoor
53967a9a3c chore: v4.7.2 2024-12-09 10:44:07 +01:00
Lautaro Di Sanza
5b92c0a2bc fix(group): after a sequence of updates a proof is invalid (#910)
* fix(group): after a sequence of updates a proof is invalid

* fix(group): after a sequence of updates a proof is invalid
2024-12-09 10:43:08 +01:00
Dmytrol
31c776ea68 Fix Typo in Quick Setup Documentation (#916)
typos quick-setup.md
2024-12-06 10:05:56 +05:30
Vivian Plasencia
8d83d59220 chore: v4.7.1 2024-12-05 18:49:30 +01:00
Vivian Plasencia
9e4fb5376c chore: update subgraph versions (#913)
re #912
2024-12-05 18:45:49 +01:00
Vivian Plasencia
745edb8e92 chore(website): add ethindia event to the website (#911) 2024-12-04 19:15:22 +01:00
Cypher Pepe
e732992952 docs: Typo Fixes and Documentation Updates (#907)
* typo howitworks.md

* typos libsemaphore.md

* typos what-is-semaphore.md

* typo subgraph.md

* typo identities.mdx

* typo proofs.mdx

* typos page.tsx

* typo page.tsx
2024-12-02 14:35:45 +07:00
Dmitry
3fcce15375 Fix typo in section.identities.box2.description Update code.json (#909)
Correct "identtity" to "identity"
2024-12-02 14:34:08 +07:00
Cedoor
ebb6731d89 docs(subgraph): update README.md (#906)
* docs(subgraph): update README.md

* docs(subgraph): update README.md
2024-11-28 18:02:55 +07:00
wangjingcun
0c23acf9cf chore: fix 404 status URL (#904)
Signed-off-by: wangjingcun <wangjingcun@aliyun.com>
2024-11-28 14:57:10 +07:00
cedoor
3e7db08eeb chore: v4.7.0 2024-11-27 17:24:57 +07:00
Cedoor
8adfc30da8 chore(contracts): add scroll sepolia to supported networks (#902)
* chore(contracts): add scroll sepolia to supported networks

* chore(contracts): deploy contracts on scroll sepolia

re #899

* chore(contracts): deploy semaphore on correct scroll sepolia network

re #899
2024-11-27 17:24:08 +07:00
sripwoud
42639662c3 docs: add soldeer install instructions (#903)
* docs: add  `soldeer` install instructions

* update README
2024-11-27 12:36:36 +07:00
Shikhar Singh
64025516c0 feat: clean node_modules before building subgraph (#884)
* feat(cli): remove @semaphore-protocol/cli prepublish script

The idea is to remove the prepublish script from the scripts object of the package.json file of
every cli template when the template is downloaded using the CLI.

BREAKING CHANGE: n

* refactor(cli): add comment

* refactor(cli): create seperate file for removePrePublishScript function

* refactor(cli): using updatedPackageJsonContent var instead of calling readFileSync again

* fix(subgraph): clean node_modules before building subgraph

* refactor(subgraph): fix: test typo

* refactor(subgraph): refactor: remove nohoist

* refactor(subgraph): refactor: workspaces structure
2024-11-26 09:42:42 +01:00
sripwoud
91f8a4be2a fix(ci): publish pkg if no releases yet (#900)
* fix(ci): publish pkg if no releases yet

* chore(ci): add workflow release trigger

* fix: workflow dispatch instead of workflow release
2024-11-26 15:21:07 +07:00
Bryer
ebd9a27c1b typo fix Update CONTRIBUTING.md (#901)
Corrected phrasing in "Commit rules" section
2024-11-26 15:20:14 +07:00
cedoor
bada8b8792 chore: v4.6.0 2024-11-25 13:09:50 +07:00
Cedoor
e93b19c566 chore(contracts): deploy contracts (#892)
* chore(contracts): deploy contracts

* chore(subgraph): deploy new subgraphs
2024-11-25 13:08:31 +07:00
leopardracer
862f715d05 fix: typos in documentation files (#898)
* Update usage.md

* Update glossary.md
2024-11-25 12:42:49 +07:00
Dmitry
3ed6c38587 Fixed closing tag issue in Update README.md (#894)
In the table section, there is a minor mistake in the closing tag. Instead of using </tbody>, it should be </tbody>. This is a formatting mistake.
2024-11-20 15:53:14 +07:00
Cedoor
7e183f3d2c refactor(contracts): support version range (#891)
re #888
2024-10-31 13:19:05 +00:00
Jimmy Chu
901d0954c0 refactor(contracts): specify gas cost in SemaphoreVerifier precompile calls (#883)
* chore(contracts): remove sub() from gas() in staticcall at SemaphoreVerifier

re #871

* refactor(contracts): using fixed gas cost on precompile calls

re #871

* refactor(contracts): increease fixed gas cost with safety buffer
2024-10-31 12:35:19 +00:00
Erick Vasquez
caebc1a4ab feat: add veilescrow to projects section (#890) 2024-10-30 18:46:38 +01:00
Vivian Plasencia
9b419f0c78 docs: add benchmarks page (#889)
* docs(docs): add benchmarks page to the docs

re #815

* chore(docs): update the docusaurus version
2024-10-30 10:54:13 +01:00
Vivian Plasencia
c67b888eb6 chore: v4.5.0 2024-10-28 20:23:40 +01:00
Vivian Plasencia
376cd11808 docs(identity): add export import identity to the docs (#887)
re #872
2024-10-28 13:29:35 +01:00
Vivian Plasencia
58132a9478 feat(identity): export point and signature types (#886)
* feat(identity): export point and signature types

re #885

* docs(identity): add the generate commitment function to the readme file
2024-10-28 13:29:03 +01:00
Vivian Plasencia
fadcf19206 chore: v4.4.2 2024-10-23 22:42:39 +02:00
Shikhar Singh
3be17268ab feat: remove prepublish script when creating template with Semaphore CLI (#882)
* feat(cli): remove @semaphore-protocol/cli prepublish script

The idea is to remove the prepublish script from the scripts object of the package.json file of
every cli template when the template is downloaded using the CLI.

BREAKING CHANGE: n

* refactor(cli): add comment

* refactor(cli): create seperate file for removePrePublishScript function

* refactor(cli): using updatedPackageJsonContent var instead of calling readFileSync again
2024-10-23 22:07:48 +02:00
Vivian Plasencia
82cdc60af6 fix: update shebang lines in the ts scripts (#881)
re #880
2024-10-23 10:50:46 +01:00
sripwoud
6c9ede6931 ci: install soldeer in release workflow (#867)
* ci: install `soldeer` in release workflow

* ci: setup soldeer login file (#868)

* chore: trigger release workflow

* chore: format

* ci: set `soldeer` credentials in github workspace

* chore: remove commentouts

* chore: add back tag trigger
2024-10-22 09:20:34 +01:00
cedoor
e6576cdc47 chore: v4.4.1 2024-10-21 12:41:11 +01:00
cedoor
c07dc88490 style: format code with prettier 2024-10-21 12:02:54 +01:00
Yago Pajariño
67060dd412 Update cli monorepo ethers and subgraph web app UI (#841)
* refactor(cli-template-monorepo-ethers): update cli-template-monorepo-ethers web app UI

re #836

* refactor(cli-template-monorepo-subgraph): update cli-template-monorepo-subgraph web app UI

re #836

* refactor(cli-template-monorepo-subgraph): rename subgraph web app on package.json

re #836

* refactor: update yarn.lock

re #836

* chore: fix indentation error on yarn.lock

re 836

* chore: update cli monorepo package.json

re #836

* chore(cli-template-monorepo-ethers): remove .env values

* chore(cli-template-monorepo-subgraph): change .env values

* chore(cli-template-monorepo-ethers): update .gitignore file

* chore(cli-template-monorepo-subgraph): update .gitignore file

* style(cli-template-monorepo-ethers): update globals.css

* refactor(cli-template-monorepo-ethers): replace chakra with plain html+css on cli-ethers page.tsx

* style(cli-template-monorepo-ethers): import globals css in layout

* style(cli-template-monorepo-ethers): remove chakra ui elements

* refactor(cli-template-monorepo-ethers): remove chakra ui from layout

* refactor(cli-template-monorepo-ethers): remove chakra ui from PageContainer, Stepper

* style(cli-template-monorepo-ethers): add font link

* chore(cli-template-monorepo-ethers): remove unused groups page

* style(cli-template-monorepo-ethers): remove chakra ui from group page

* style(cli-template-monorepo-ethers): remove chakra ui from proof page

* style(cli-template-monorepo-ethers): update css and add class names

* style(cli-template-monorepo-ethers): add css declarations

* style(cli-template-monorepo-ethers): add github icon

* style(cli-template-monorepo-ethers): add left arrow on stepper

* style(cli-template-monorepo-ethers): remove chakra from proofs page

* style(cli-template-monorepo-ethers): minor style improvements

* style(cli-template-monorepo-ethers): remove chakra libraries from package.json

* refactor(cli-template-monorepo-ethers): update yarn.lock file after package.json modified

* style(cli-template-monorepo-ethers): fix deepscan issues

* chore(cli-template-monorepo-ethers): remove unused packages and update dotenv version

* style(cli-template-monorepo-ethers): update stylesheet

* chore(cli-template-monorepo-ethers): update github logo

* chore(cli-template-monorepo-ethers): add loader to join group button

* chore(cli-template-monorepo-subgraph): update packages

* style(cli-template-monorepo-subgraph): update stylesheet

* style(cli-template-monorepo-subgraph): update user interface

* chore: update yarn.lock

* style: change styling and add feedback link

* chore(cli-template-monorepo-subgraph): remove unused styles and icons

* chore: remove unused context logs

* chore(cli-template-monorepo-subgraph): change data source subgraph web app

* chore: change repo url

* chore: remove unused hook useSemaphore
2024-10-21 11:58:05 +01:00
Cedoor
a4e540d8f4 chore(website): update roadmap (#878) 2024-10-18 13:03:16 +01:00
Jimmy Chu
79976f33cb Split SemaphoreVerifier key points into a separate library (#875)
* refactor(scripts): added a script to convert bigint to hex

* refactor(contracts): split SemaphoreVerifier verification key points into a separate library (#330)

* chore(contracts): yarn format & lint

* refactor(contracts): update SemaphoreVerifierKeyPts library to be internal

re #330

* chore(contracts): update spacing

* chore(contracts): updated per peer review and added invariant check for VerifierKeyPts lib

* chore(contracts): update invariant check to revert with custom error
2024-10-17 14:21:41 +01:00
cedoor
822530f2cf chore: v4.4.0 2024-10-17 14:19:38 +01:00
Vivian Plasencia
b3f862979d feat(identity): add generate commitment function (#877)
This static method is particularly useful after signature verification, as it allows retrieval of
the corresponding commitment associated with the public key.

re #873
2024-10-17 13:28:49 +02:00
cedoor
06e11d5c34 chore: v4.3.1 2024-10-16 12:20:26 +01:00
cedoor
88d4470b11 ci(circuits): add sudo before running wget command 2024-10-16 12:16:22 +01:00
Vivian Plasencia
bb1c6984b2 ci: add -O flag to the wget command 2024-10-16 13:04:32 +02:00
cedoor
5841327477 ci(circuits): update circom url 2024-10-16 11:52:02 +01:00
cedoor
eab3ab30c6 ci(circuits): update circom url 2024-10-16 11:48:30 +01:00
Cedoor
cd6dc38f9e ci(circuits): set static version of circom (#874)
* fix(circuits): add override for circom_runtime

* chore(circuits): use yarn syntax for overrides

* ci(circuits): set static version of circom
2024-10-16 11:05:07 +01:00
cedoor
3cb1b5757d revert(circuits): set previous circomkit version as static 2024-10-15 11:30:11 +01:00
cedoor
a8db8393c1 chore(circuits): update circomkit config 2024-10-15 11:24:55 +01:00
cedoor
391b571c31 chore(circuits): update circomkit dep version 2024-10-15 11:21:04 +01:00
cedoor
4c2769099f chore(circuits): update dev dependencies 2024-10-15 11:05:08 +01:00
Cedoor
29cabb49d6 build: move poseidon-lite to dependencies (#870) 2024-10-15 10:58:51 +01:00
cedoor
48b0694586 chore: v4.3.0 2024-10-03 12:46:01 +01:00
Cedoor
28684fdb1a Chore/mainnet deployments (#869)
* chore(contracts): deploy semaphore contracts on base

re #865

* chore(contracts): deploy semaphore contracts on linea

re #865

* refactor(data): add types for new networks

re #865
2024-10-03 12:42:36 +01:00
Cedoor
49a16635d8 chore(website): update roadmap.json (#866) 2024-10-01 19:04:11 +01:00
cedoor
4bfe6d8791 chore: v4.2.0 2024-10-01 18:48:37 +01:00
Cedoor
a3d97795fe Chore/new testnets (#864)
* chore(contracts): deploy contracts on base sepolia

re #863

* chore(contracts): deploy contracts on linea sepolia

re #863
2024-10-01 18:36:55 +01:00
cedoor
4c8d297902 chore: v4.1.0 2024-10-01 11:35:27 +01:00
Cedoor
fdbadf5b71 Chore/mainnet deployments (#862)
* chore(contracts): deploy contracts on arbitrum

re #859

* chore(contracts): deploy contracts on polygon

re #859

* chore(contracts): deploy contracts on optimism

re #859
2024-10-01 11:31:29 +01:00
Vivian Plasencia
4496eee137 docs(website): update events (#857) 2024-09-20 17:53:55 +02:00
Cedoor
215a12e25c docs(website): add new project (#856)
re #855
2024-09-20 16:24:23 +01:00
Cedoor
87331114c1 chore: replace discord link with telegram (#853) 2024-09-03 12:49:31 +02:00
sripwoud
0d41562dad chore: publish contracts to soldeer (#820)
* chore: define separate version.ts script

* chore: include publishing to soldeer in script

* fix(contracts): push to soldeer

re 800

* ci: fetch latest contract version from soldeer

* refactor: do not use execa in scripts

* fix: do not exit process in script

* chore: remove comments

* refactor: use shebang in ts scripts

* chore(contracts): add soldeerignore

* chore: inherit stdio in scripts

* chore: remove dry run flag

* chore: uncomment

* chore: fix typo in comment
2024-08-28 16:26:48 +02:00
Elias Rad
c435712656 docs fix spelling issues (#852)
* Update README.md

* Update contract-api.md

* Update howitworks.md

* Update libsemaphore.md
2024-08-28 16:26:31 +02:00
Vivian Plasencia
7d48311474 chore: v4.0.3 2024-08-13 09:53:22 +02:00
csiejimmyliu
5ef73e2819 Semaphore Identity example code bug fix (Fix #848) (#849)
* Semaphore identity example code bug fix

* Receive suggestion for consistency

---------

Co-authored-by: weipooppys93030 <55434365+weipooppys93030@users.noreply.github.com>
2024-08-12 23:29:04 +02:00
cedoor
de7bdd6d17 chore: v4.0.2 2024-08-12 12:00:57 +02:00
Cedoor
21c2739f19 fix(group): update lean-imt dependency (#850)
re #847
2024-08-12 11:56:08 +02:00
Vivian Plasencia
1ed170d0db chore: add pairwise to the list of projects (#846)
* chore: add pairwise to the list of projects

re #845

* refactor: remove slash from the website url

* refactor: remove www from website url
2024-07-31 13:12:54 +01:00
Cedoor
bc041486b0 chore(website): add new project (#844)
re #839
2024-07-31 10:51:52 +01:00
cedoor
5db1bccb84 chore: v4.0.1 2024-07-31 10:39:27 +01:00
Cedoor
b2da0a685a fix(proof): replace root public signal with actual root (#843)
The public signal of proof related to the Merkle root could obviously be different from what is
expected to be the root of the group. Therefore, for the proof to be valid, it is necessary that the
group root passed as a parameter matches the proof/circuit root output.

re #842
2024-07-31 10:38:02 +01:00
Cedoor
9329eed754 docs(docs): update credits.md (#840) 2024-07-26 18:59:56 +02:00
Cedoor
75563ee0d5 docs(docs): update v4 doc (#837)
* docs(docs): update v4 doc

* Update apps/docs/docusaurus.config.ts

Co-authored-by: Vivian Plasencia <v.pcalana@gmail.com>

---------

Co-authored-by: Vivian Plasencia <v.pcalana@gmail.com>
2024-07-25 12:51:06 +01:00
Cedoor
368bbd4bcd docs(website): add roadmap to home page (#834)
* docs(website): add roadmap to home page

re #833

* fix(website): add key property

re #833

* docs(website): add vertical roadmap
2024-07-25 12:50:49 +01:00
197 changed files with 6693 additions and 4160 deletions

View File

@@ -26,5 +26,13 @@
"no-console": ["warn", { "allow": ["info", "warn", "error"] }],
"@typescript-eslint/lines-between-class-members": "off",
"no-param-reassign": "off"
}
},
"overrides": [
{
"files": ["./scripts/*"],
"rules": {
"no-console": "off"
}
}
]
}

View File

@@ -83,7 +83,7 @@ jobs:
sudo apt-get update && sudo apt-get install -y wget nlohmann-json3-dev libgmp-dev nasm g++ build-essential
- name: Setup Circom
run: wget https://github.com/iden3/circom/releases/latest/download/circom-linux-amd64 && sudo mv ./circom-linux-amd64 /usr/bin/circom && sudo chmod +x /usr/bin/circom
run: sudo wget https://github.com/iden3/circom/releases/download/v2.1.9/circom-linux-amd64 -O /usr/bin/circom && sudo chmod +x /usr/bin/circom
- name: Install dependencies
run: yarn

View File

@@ -111,7 +111,7 @@ jobs:
run: |
sudo rm /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update && sudo apt-get install -y wget nlohmann-json3-dev libgmp-dev nasm g++ build-essential
wget https://github.com/iden3/circom/releases/latest/download/circom-linux-amd64 && sudo mv ./circom-linux-amd64 /usr/bin/circom && sudo chmod +x /usr/bin/circom
sudo wget https://github.com/iden3/circom/releases/download/v2.1.9/circom-linux-amd64 -O /usr/bin/circom && sudo chmod +x /usr/bin/circom
yarn workspace @semaphore-protocol/group build
yarn workspace @semaphore-protocol/identity build
yarn workspace @semaphore-protocol/proof build

View File

@@ -4,6 +4,7 @@ permissions:
contents: write
on:
workflow_dispatch:
push:
tags:
- "v*"
@@ -17,6 +18,16 @@ jobs:
with:
fetch-depth: 0
- name: Install soldeer
uses: taiki-e/install-action@v2
with:
tool: soldeer
- name: Store soldeer login credential
env:
SOLDEER_TOKEN: ${{ secrets.SOLDEER_TOKEN }}
run: |
echo "$SOLDEER_TOKEN" > "$GITHUB_WORKSPACE"/soldeer_login
- name: Install Node.js
uses: actions/setup-node@v4
with:
@@ -37,6 +48,7 @@ jobs:
run: yarn version:publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
SOLDEER_LOGIN_FILE: ${{ github.workspace }}/soldeer_login
- run: yarn version:release
env:

2
.gitignore vendored
View File

@@ -94,3 +94,5 @@ typechain-types
# Other
snark-artifacts
*.zip

1
.soldeerignore Normal file
View File

@@ -0,0 +1 @@
package.json

View File

@@ -42,7 +42,7 @@ When you submit your PR (or later change that code), a CI build will automatical
We always use ESLint and Prettier. To check that your code follows the rules, simply run the npm script `yarn lint`.
### Commits rules
### Commit rules
For commits it is recommended to use [Conventional Commits](https://www.conventionalcommits.org).

View File

@@ -53,7 +53,7 @@
🔎 Issues
</a>
<span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
<a href="https://semaphore.pse.dev/discord">
<a href="https://semaphore.pse.dev/telegram">
🗣️ Chat &amp; Support
</a>
<span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
@@ -264,7 +264,7 @@ The core of the Semaphore protocol is in the [circuit logic](/packages/circuits/
</a>
</td>
</tr>
<tbody>
</tbody>
</table>
## 🛠 Install
@@ -275,12 +275,18 @@ Clone this repository:
git clone https://github.com/semaphore-protocol/semaphore.git
```
And install the dependencies:
Install the dependencies:
```bash
cd semaphore && yarn
```
And build the repositiory:
```bash
yarn build
```
## 📜 Usage
Copy the `.env.example` file as `.env`:
@@ -374,5 +380,5 @@ yarn version:bump <version>
# e.g. yarn version:bump 2.0.0
```
It will create a commit and a git tag that will need to pushed on the main branch. A workflow will be triggered and will
It will create a commit and a git tag that will need to be pushed on the main branch. A workflow will be triggered and will
publish the Semaphore packages on [npm](https://www.npmjs.com/) and release a new version on Github with its changelogs automatically.

View File

@@ -34,7 +34,7 @@
🔎 Issues
</a>
<span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
<a href="https://semaphore.pse.dev/discord">
<a href="https://semaphore.pse.dev/telegram">
🗣️ Chat &amp; Support
</a>
</h4>

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

View File

@@ -67,7 +67,7 @@ const config: Config = {
announcementBar: {
id: "semaphore-v4-beta",
content:
'<b>Semaphore V4-beta is out 🎉 <a href="/getting-started">Try it out</a> and contribute to the <a href="/trusted-setup">Trusted Setup ceremony</a>. Let us know for any feedback on <a href="https://semaphore.pse.dev/discord" target="_blank">Discord</a> or <a href="https://github.com/orgs/semaphore-protocol/discussions" target="_blank">Github</a>!</b>',
'<b><a href="https://github.com/semaphore-protocol/semaphore/releases/tag/v4.0.0" target="_blank">Semaphore V4</a> is out 🎉 <a href="/getting-started">Try it out</a> and let us know if you have any feedback on <a href="https://semaphore.pse.dev/telegram" target="_blank">Telegram</a> or <a href="https://github.com/orgs/semaphore-protocol/discussions" target="_blank">Github</a>!</b>',
backgroundColor: "#dde6fc",
textColor: "#000000"
},

View File

@@ -386,7 +386,7 @@
"message": "Connect"
},
"footer.right.connect.link1": {
"message": "Discord"
"message": "Telegram"
},
"footer.right.connect.link2": {
"message": "X (Twitter)"

View File

@@ -42,7 +42,7 @@
"message": "Valores públicos"
},
"section.identities.box2.description": {
"message": "Semaphore utiliza la función hash Poseidon para crear el identtity commitment a partir de los valores privados. Los identity commitments se pueden compartir públicamente, de forma similar a las direcciones Ethereum."
"message": "Semaphore utiliza la función hash Poseidon para crear el identity commitment a partir de los valores privados. Los identity commitments se pueden compartir públicamente, de forma similar a las direcciones Ethereum."
},
"section.identities.box3.title": {
"message": "Generar identidades"
@@ -386,7 +386,7 @@
"message": "Conecta con nosotros"
},
"footer.right.connect.link1": {
"message": "Discord"
"message": "Telegram"
},
"footer.right.connect.link2": {
"message": "X (Twitter)"

View File

@@ -12,6 +12,6 @@ as well as relevant circuits in
which the Semaphore zk-SNARK uses.
The summary of the audit results can be found
[here](https://github.com/appliedzkp/semaphore/tree/master/audit). After three
[here](https://github.com/semaphore-protocol/semaphore/blob/main/apps/docs/versioned_docs/version-V1/audit.md). After three
rounds of fixes, all security and performance issues were fixed, and the few
remaining issues are minor and do not affect security.

View File

@@ -58,7 +58,7 @@ Hardhat includes the Hardhat Network, a local Ethereum network for development.
## Install Semaphore packages
Semaphore provides contracts, JavaScript libraries and an Hardhat plugin for developers building zero-knowledge applications.
Semaphore provides contracts, JavaScript libraries and a Hardhat plugin for developers building zero-knowledge applications.
- `@semaphore-protocol/contracts` provides contracts to manage groups and verify Semaphore proofs on-chain.
- JavaScript libraries help developers build zero-knowledge applications.

View File

@@ -14,7 +14,7 @@ También proporciona un mecanismo simple para evitar la doble señalización, lo
## ¿Dónde puedo hacer preguntas sobre Semaphore?
Puede hacer preguntas sobre Semaphore en [Discord](https://semaphore.pse.dev/discord) o abriendo un [Semaphore Discussion](https://github.com/semaphore-protocol/semaphore/discussions).
Puede hacer preguntas sobre Semaphore en [Telegram](https://semaphore.pse.dev/telegram) o abriendo un [Semaphore Discussion](https://github.com/semaphore-protocol/semaphore/discussions).
## ¿Por qué las identidades requieren tanto `identity trapdoor` como `identity nullifier`?

View File

@@ -7,7 +7,7 @@ import TabItem from "@theme/TabItem"
# Solución de problemas
Si estas sugerencias no funcionan, no dude en preguntar en las [Semaphore Discussions](https://github.com/semaphore-protocol/semaphore/discussions) o en el canal `dev-chat` en el [Semaphore Discord](https://semaphore.pse.dev/discord).
Si estas sugerencias no funcionan, no dude en preguntar en las [Semaphore Discussions](https://github.com/semaphore-protocol/semaphore/discussions) o en el canal [Semaphore Telegram](https://semaphore.pse.dev/telegram).
## Usando Semaphore en the frontend

View File

@@ -16,10 +16,10 @@
"format:write": "remark ./**/*.mdx --output"
},
"dependencies": {
"@docusaurus/core": "3.1.1",
"@docusaurus/preset-classic": "3.1.1",
"@docusaurus/core": "3.5.2",
"@docusaurus/preset-classic": "3.5.2",
"@mdx-js/react": "^3.0.0",
"@semaphore-protocol/utils": "4.0.0",
"@semaphore-protocol/utils": "4.8.2",
"@svgr/webpack": "^5.5.0",
"clsx": "^1.2.1",
"docusaurus-plugin-sass": "^0.2.5",
@@ -31,8 +31,8 @@
"url-loader": "^4.1.1"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.1.1",
"@docusaurus/tsconfig": "3.1.1",
"@docusaurus/module-type-aliases": "3.5.2",
"@docusaurus/tsconfig": "3.5.2",
"@types/react": "^18.2.29",
"remark-cli": "^12.0.0",
"remark-frontmatter": "^5.0.0",

View File

@@ -32,7 +32,7 @@ function Footer() {
id: "footer.right.connect.title"
})}
</h3>
<Link href="https://semaphore.pse.dev/discord" target="_blank">
<Link href="https://semaphore.pse.dev/telegram" target="_blank">
{translate({
id: "footer.right.connect.link1"
})}

View File

@@ -12,6 +12,6 @@ as well as relevant circuits in
which the Semaphore zk-SNARK uses.
The summary of the audit results can be found
[here](https://github.com/appliedzkp/semaphore/tree/master/audit). After three
[here](https://github.com/semaphore-protocol/semaphore/blob/main/apps/docs/versioned_docs/version-V1/audit.md). After three
rounds of fixes, all security and performance issues were fixed, and the few
remaining issues are minor and do not affect security.

View File

@@ -21,7 +21,7 @@ The first external nullifier will be added as an external nullifier to the
contract, and this external nullifier will be active once the deployment
completes.
## Add, deactivate, or reactivate external nullifiiers
## Add, deactivate, or reactivate external nullifiers
**Contract ABI**:

View File

@@ -10,8 +10,8 @@ An identity is comprised of the following information:
1. An [EdDSA](https://en.wikipedia.org/wiki/EdDSA) private key. Note that it is
_not_ an Ethereum private key.
2. An identity nullifier, whih is a random 32-byte value.
3. An identity trapdoor, whih is a random 32-byte value.
2. An identity nullifier, which is a random 32-byte value.
3. An identity trapdoor, which is a random 32-byte value.
An identity commitment is the Pedersen hash of:
@@ -121,7 +121,7 @@ authenticity of the signal and prevents front-running attacks.
## Cryptographic primitives
Semaphore uses MiMC for the Merkle tree, Pedersen commmitments for the identity
Semaphore uses MiMC for the Merkle tree, Pedersen commitments for the identity
commitments, Blake2 for the nullifiers hash, and EdDSA for the signature.
MiMC is a relatively new hash function. We use the recommended MiMC

View File

@@ -145,7 +145,7 @@ Returns `false` otherwise.
**`signMsg(privKey: EddsaPrivateKey, msg: SnarkBigInt): EdDSAMiMcSpongeSignature)`**
Encapsualtes `circomlib.eddsa.signMiMCSponge` to sign a message `msg` using private key `privKey`.
Encapsulates `circomlib.eddsa.signMiMCSponge` to sign a message `msg` using private key `privKey`.
**`verifySignature(msg: SnarkBigInt, signature: EdDSAMiMcSpongeSignature, pubKey: EddsaPublicKey)`: boolean**
@@ -190,7 +190,7 @@ const genWitness = async (
- `circuit` is the output of `genCircuit()`.
- `identity` is the `Identity` whose identity commitment you want to prove is
in the set of registered identities.
- `idCommitments` is an array of registered identity commmitments; i.e. the
- `idCommitments` is an array of registered identity commitments; i.e. the
leaves of the tree.
- `treeDepth` is the number of levels which the Merkle tree used has
- `externalNullifier` is the current external nullifier
@@ -204,7 +204,7 @@ It returns an object as such:
- `msg`: The hash of the external nullifier and the signal hash
- `signature`: The signature on the above msg.
- `tree`: The Merkle tree object after it has been updated with the identity commitment
- `identityPath`: The Merkle path to the identity commmitment
- `identityPath`: The Merkle path to the identity commitment
- `identityPathIndex`: The leaf index of the identity commitment
- `identityPathElements`: The elements along the above Merkle path
@@ -212,7 +212,7 @@ Only `witness` is essential to generate the proof; the other data is only
useful for debugging and additional off-chain checks, such as verifying the
signature and the Merkle tree root.
**`formatForVerifierContract = (proof: SnarkProof, publicSignals: SnarkPublicSignals`**
**`formatForVerifierContract = (proof: SnarkProof, publicSignals: SnarkPublicSignals)`**
Converts the data in `proof` and `publicSignals` to strings and rearranges
elements of `proof.pi_b` so that `snarkjs`'s `verifier.sol` will accept it.

View File

@@ -26,7 +26,7 @@ With the Client contract as the owner of the Semaphore contract, the Client
contract may call owner-only Semaphore functions such as
`addExternalNullifier()`.
## Add, deactivate, or reactivate external nullifiiers
## Add, deactivate, or reactivate external nullifiers
These functions add, deactivate, and reactivate an external nullifier respectively.
As each identity can only signal once to an external nullifier, and as a signal

View File

@@ -55,7 +55,7 @@ In sum, Semaphore provides the ability to:
### External nullifiers
Think of an external nullifier as a voting booth where each user may only cast
one vote. If they try to cast a second vote a the same booth, that vote is
one vote. If they try to cast a second vote at the same booth, that vote is
invalid.
An external nullifier is any 29-byte value. Semaphore always starts with one
@@ -89,7 +89,7 @@ An anonymous voting app would be configured differently:
| ----------------------------------- | ------------------------ |
| The hash of the respondent's answer | The hash of the question |
This allows any user to vote with an arbitary response (e.g. yes, no, or maybe)
This allows any user to vote with an arbitrary response (e.g. yes, no, or maybe)
to any question. The user, however, can only vote once per question.
## About the code

View File

@@ -9,7 +9,7 @@ Site owners publish _subgraphs_ that expose site data for anyone to query.
Semaphore's subgraph allows you to retrieve data from the [`Semaphore.sol`](https://github.com/semaphore-protocol/semaphore/tree/v2.6.1/packages/contracts/Semaphore.sol) smart contract.
:::tip
The Graph protocol uses the [GraphQL](https://graphql.org/) query lanaguage. For examples, see the [GraphQL API documentation](https://thegraph.com/docs/developer/graphql-api). Visit the [subgraph repository](https://github.com/semaphore-protocol/subgraph) to see the list of Semaphore subgraphs.
The Graph protocol uses the [GraphQL](https://graphql.org/) query language. For examples, see the [GraphQL API documentation](https://thegraph.com/docs/developer/graphql-api). Visit the [subgraph repository](https://github.com/semaphore-protocol/subgraph) to see the list of Semaphore subgraphs.
:::
## Schema

View File

@@ -14,7 +14,7 @@ It also provides a simple mechanism to prevent double-signaling, which means you
## Where can I ask questions about Semaphore?
You can ask questions about Semaphore on [Discord](https://semaphore.pse.dev/discord) or by opening a [Semaphore Discussion](https://github.com/semaphore-protocol/semaphore/discussions).
You can ask questions about Semaphore on [Telegram](https://semaphore.pse.dev/telegram) or by opening a [Semaphore Discussion](https://github.com/semaphore-protocol/semaphore/discussions).
## Why do identities require both the `identity trapdoor` and the `identity nullifier`?

View File

@@ -37,7 +37,7 @@ For more information, see [Merkle tree in Wikipedia](https://en.wikipedia.org/wi
## Nullifier
A value used to prevent double entry or double signalling.
A value used to prevent double entry or double signaling.
See [Circuit nullifier hash](/V3/technical-reference/circuits/#nullifier-hash).

View File

@@ -7,7 +7,7 @@ import TabItem from "@theme/TabItem"
# Troubleshooting
If these suggestions do not work, feel free to ask in the [Semaphore Discussions](https://github.com/semaphore-protocol/semaphore/discussions) or in the `dev-chat` channel in the [Semaphore Discord](https://semaphore.pse.dev/discord).
If these suggestions do not work, feel free to ask in the [Semaphore Discussions](https://github.com/semaphore-protocol/semaphore/discussions) or in the [Semaphore Telegram](https://semaphore.pse.dev/telegram).
## Using Semaphore in the frontend

View File

@@ -1,50 +0,0 @@
---
sidebar_position: 6
---
# Trusted Setup
gm, everyone 😎 we are excited to announce the upcoming Multi-Party Computation (MPC) Phase 2 Trusted Setup ceremony for the Semaphore V4 circuit - this is crucial for establishing a robust security foundation for the cryptographic protocol 🎉
The ceremony will take place from **June 10** to **July 10**. If all goes to plan, finalization should take place on **July 15** with the announcement of the final beacon on **July 12**.
## Securing Semaphore V4
To contribute to this ceremony, you will just need your browser!
1. Visit [ceremony.pse.dev](https://ceremony.pse.dev/projects/Semaphore%20V4%20Ceremony).
2. Login and associate your **Github** account.
3. Hit the `contribute` button and wait for your turn.
nb. you will find your contribution certificate on your GitHub gists - and, if all goes wrong or you feel lost, there are instructions on site or post a message on Semaphore / PSE discord.
## What You Need to Know About the Ceremony
### Your Role
Many zero-knowledge proof systems, including those based on the Groth16 scheme, require this layer of randomness, often referred to as "toxic waste” which must remain unknown to anyone to maintain the integrity of the zero-knowledge proof system. Trusted setups rely on a 1 of N honest participant assumption. As long as just one participant actually discards their “toxic waste”, the proof system will be secure. You can be that one participant by providing your unique entropy with your contribution, making the ceremony unpredictable and unbiased, safeguarding the entire process against potential vulnerabilities.
### Why It Matters
Trusted setups are crucial as they generate a set of parameters necessary to initiate SNARK-based systems. Through a series of computations performed by various participants. This sequence involves downloading previous contributions, adding generated randomness, and uploading the results of your contribution. These contributions are then integrated into the final artifacts crucial for proof generation/verification.
### Semaphore Circuit
The [Semaphore circuit](https://github.com/semaphore-protocol/semaphore/blob/main/packages/circuits/src/semaphore.circom) centered around the creation of the _Semaphore identity_ and _identity commitment_, includes verification processes, and facilitates the generation of the _nullifier_. We are going to support `MAX_DEPTH` from 1 to 32 - therefore you will have to contribute to 32 variants of the same circuit. Since the constraints will range from 2k to less than 10k with very small artifacts size (≤ 8mb x contribution), the waiting and contribution time shouldnt be much!
### Transparency and Fairness
We are committed to transparency on ceremony setup, execution, finalization, and later verification. Our primary goal is to **engage as many contributors as possible** to ensure the circuit is **secure** and **production-ready**. To this end, the ceremony is designed to _maximize contributor inclusion_, monitor & troubleshoot whenever is needed, _lower the entry barriers_, _making contributiong as effortless as possible_. A key step towards achieving these goals is running the ceremony w/ [p0tion](https://github.com/privacy-scaling-explorations/p0tion): an in-house developed, open-source, battle-tested tool that is fully equipped to meet our needs.
### Ceremony Settings
To protect the ceremony from sybils, in order to contribute you must have a GitHub account such that you have: 1 public repository, at least 1 follower, following at least 5 other accounts and, your account is at least 1 month old. While to protect from fake contributors or people hanging due to connection/machine resources, we are going to set a 10 minutes time-window on contributions (+ 1 hour verification) - after this amount of time, you will be kicked out and will have to wait **1 day** before you can contribute again.
## Troubleshooting
- If you have been idle longer than expected, it may be that the current contributor has been blocked for some reason. Do not worry, the maximum wait in this case is one hour, after which you will be able to continue contributing.
### Learn more about Trusted Setups
- [How Do Trusted Setups Work? - Vitalik](https://vitalik.eth.limo/general/2022/03/14/trustedsetup.html)
- [p0tion FAQs](https://p0tion.super.site/faqs#block-cebca23ebb514c2ea096ad44d4833356)

View File

@@ -0,0 +1,131 @@
---
sidebar_position: 8
---
# Benchmarks
Semaphore v4 introduces new features and performance improvements. Detailed changes are available in the [release changelog](https://github.com/semaphore-protocol/semaphore/releases/tag/v4.0.0).
The primary changes in benchmark values are driven by the two major protocol updates:
- New [Identity schema](https://github.com/semaphore-protocol/semaphore/tree/main/packages/identity).
- [LeanIMT](https://github.com/privacy-scaling-explorations/zk-kit/tree/main/packages/lean-imt): New optimized IMT.
## New Identity schema
Semaphore v4 includes a new schema for the identities allowing the creation and verification of signatures.
Although the new Identity package is slightly slower than the one in Semaphore v3 (by just a few milliseconds), the trade-off is minimal considering the included functionality.
The new identity schema adds additional constraints to the Semaphore v4 circuit; however, this does not negatively impact overall performance of the protocol.
## LeanIMT
Semaphore v4 uses the LeanIMT data structure for group operations, an improvement over the IMT used in v3.
For further details, see the [LeanIMT paper](https://github.com/privacy-scaling-explorations/zk-kit/tree/main/papers/leanimt).
The LeanIMT offers dynamic depth, resulting in faster and more cost-effective group operations, across Node.js, browser and smart contracts.
Semaphore v4 support tree depths from 1 to 32, while v3 supports depths from 16 to 32, both for proof generation and verification.
## System Specifications and Software environment
All the benchmarks were run in an environment with these properties:
**System Specifications**
Computer: MacBook Pro
Chip: Apple M2 Pro
Memory (RAM): 16 GB
Operating System: macOS Sequoia version 15.0.1
**Software environment**
Node.js version: 20.18.0
Browser: Google Chrome Version 130.0.6723.92 (Official Build) (arm64)
## Running the benchmarks
### Javascript and Circom
GitHub repository to the run Node.js, browser and Circom benchmarks: https://github.com/vplasencia/semaphore-benchmarks
### Solidity
GitHub repository to run the Solidity benchmarks: https://github.com/semaphore-protocol/semaphore
## Node.js benchmarks
### Identities
![Identities](../../assets/img-benchmarks/node/identity-node-benchmarks.png)
### Create Group
Create group, either empty or with initial members.
![Create Group](../../assets/img-benchmarks/node/create-group-node-benchmarks.png)
### Add Member
Add a member to groups with different sizes.
![Add Member](../../assets/img-benchmarks/node/add-member-node-benchmarks.png)
### Generate Proof
Generate a proof using groups with different numbers of members.
![Generate Proof](../../assets/img-benchmarks/node/generate-proof-node-benchmarks.png)
### Verify Proof
Verify a proof using groups with different numbers of members.
![Verify Proof](../../assets/img-benchmarks/node/verify-proof-node-benchmarks.png)
## Browser benchmarks
Main functions used in the browser.
![Browser benchmarks](../../assets/img-benchmarks/browser/browser-benchmarks.png)
## Circuit benchmarks
### Semaphore V3
<img
src={require('../../assets/img-benchmarks/circuits/semaphore-v3-circuits-benchmarks.png').default}
alt="Circuit benchmarks Semaphore v3"
style={{ width: '300px', height: 'auto' }}
/>
### Semaphore V4
<img
src={require('../../assets/img-benchmarks/circuits/semaphore-v4-circuits-benchmarks.png').default}
alt="Circuit benchmarks Semaphore v4"
style={{ width: '300px', height: 'auto' }}
/>
## Contracts
<img
src={require('../../assets/img-benchmarks/contracts/contract-benchmarks.png').default}
alt="Contract Benchmarks"
style={{ width: '590px', height: 'auto' }}
/>
### Semaphore V3 gas report
![Contracts benchmarks Semaphore v3](../../assets/img-benchmarks/contracts/semaphore-v3-contracts-benchmarks.png)
### Semaphore V4 gas report
![Contracts benchmarks Semaphore v4](../../assets/img-benchmarks/contracts/semaphore-v4-contracts-benchmarks.png)

View File

@@ -1,5 +1,5 @@
---
sidebar_position: 12
sidebar_position: 13
---
# Credits
@@ -17,3 +17,4 @@ Semaphore is the work of several people, for a complete list of contributors you
- [LauNaMu](https://github.com/0xyNaMu)
- [0xjei](https://github.com/0xjei)
- [Mari Poveda](https://github.com/maripoveda)
- [Gauthier](https://github.com/sripwoud)

View File

@@ -1,12 +1,12 @@
---
sidebar_position: 11
sidebar_position: 12
---
# FAQ
## Where can I ask questions about Semaphore?
You can ask questions about Semaphore on [Discord](https://semaphore.pse.dev/discord) or by opening a [Semaphore Discussion](https://github.com/semaphore-protocol/semaphore/discussions). The most frequent questions will be listed below.
You can ask questions about Semaphore on [Telegram](https://semaphore.pse.dev/telegram) or by opening a [Semaphore Discussion](https://github.com/semaphore-protocol/semaphore/discussions). The most frequent questions will be listed below.
## Why should I prevent proofs from being verified twice?

View File

@@ -1,5 +1,5 @@
---
sidebar_position: 8
sidebar_position: 9
---
# Glossary

View File

@@ -20,7 +20,7 @@ To prevent fraud, the owner should keep their private key secret.
## Install package
In your code, use the [`@semaphore-protocol/identity`](https://github.com/semaphore-protocol/semaphore/tree/main/packages/identity) package to manage Semaphore identites.
In your code, use the [`@semaphore-protocol/identity`](https://github.com/semaphore-protocol/semaphore/tree/main/packages/identity) package to manage Semaphore identities.
<Tabs
defaultValue="npm"
@@ -109,3 +109,33 @@ After a message is signed, anyone can verify the signature using the message its
// Static method.
Identity.verifySignature(message, signature, identity1.publicKey)
```
## Export and import an identity
A Semaphore Identity can be exported and then imported later for reuse.
### Export an identity
Returns the private key encoded as a base64 string.
```ts
import { Identity } from "@semaphore-protocol/identity"
const identity = new Identity()
const privateKey = identity.export()
```
### Import an identity
Returns a Semaphore identity based on a private key encoded as a base64 string.
```ts
import { Identity } from "@semaphore-protocol/identity"
const identity = new Identity()
const privateKey = identity.export()
const identity2 = Identity.import(privateKey)
```

View File

@@ -79,7 +79,7 @@ const group = new Group(members)
Each proof requires a [scope](/glossary#scope), on which each user may only generate one valid proof. The scope, together with the user's private key, is used to generate the nullifier, which is the value you can actually use to check whether a proof with that scope has already been generated by that user. In a voting application where double-voting must be prevented, the scope could be the ballot id, or the Merkle root of the group.
### 4. Generate the anomymous message
### 4. Generate the anonymous message
Finally, you can generate the proof with the anonymous message using the `generateProof` function. For example:

View File

@@ -1,5 +1,5 @@
---
sidebar_position: 9
sidebar_position: 10
---
import Articles from '@site/src/components/Articles';

View File

@@ -1,5 +1,5 @@
---
sidebar_position: 10
sidebar_position: 11
---
import Tabs from "@theme/Tabs"
@@ -7,13 +7,7 @@ import TabItem from "@theme/TabItem"
# Troubleshooting
If these suggestions do not work, feel free to ask for more help and support on [Github Discussions](https://github.com/semaphore-protocol/semaphore/discussions) or [Discord](https://semaphore.pse.dev/discord) ("dev-chat" channel).
## Creating a Group
When you create a group and the transaction is reverted, make sure that the group id you are using does not exist on the network you are using.
To check that, you can use the [Semaphore CLI](https://github.com/semaphore-protocol/semaphore/tree/main/packages/cli) with the command `get-groups` and the network you are using and then, make sure that your group id is not part of that list. You can also use the [Semaphore explorer](https://explorer.semaphore.pse.dev/).
If these suggestions do not work, feel free to ask for more help and support on [Github Discussions](https://github.com/semaphore-protocol/semaphore/discussions) or [Telegram](https://semaphore.pse.dev/telegram).
## Transaction reverted when using the same nullifier

View File

@@ -38,6 +38,10 @@ In addition to circuits,
Semaphore provides [Solidity contracts](https://github.com/semaphore-protocol/semaphore/tree/main/packages/contracts)
and [JavaScript libraries](https://github.com/semaphore-protocol/semaphore/tree/main#-packages) that allow developers to generate zero-knowledge proofs and verify them with minimal effort.
## Trusted Setup Ceremony
The [secure parameters](https://snark-artifacts.pse.dev) for generating valid proofs with Semaphore circuits were generated in a [Trusted Setup Ceremony](https://ceremony.pse.dev/projects/Semaphore%20V4%20Ceremony) that was completed with over 400 participants on [13 July 2024](https://etherscan.io/block/20300394).
### Audits
| Version | Auditors | Report | Scope |
@@ -46,7 +50,3 @@ and [JavaScript libraries](https://github.com/semaphore-protocol/semaphore/tree/
| v2.5.0 | [PSE](https://pse.dev/) | [Semaphore_2.5.0_Audit.pdf](https://semaphore.pse.dev/Semaphore_2.5.0_Audit.pdf) | `contracts`, `libraries` |
| v3.0.0 | [Veridise](https://veridise.com/) | [Semaphore_3.0.0_Audit.pdf](https://semaphore.pse.dev/Semaphore_3.0.0_Audit.pdf) | `circuits`, `contracts` |
| v4.0.0 | [PSE](https://pse.dev/) | [Semaphore_4.0.0_Audit.pdf](https://semaphore.pse.dev/Semaphore_4.0.0_Audit.pdf) | `circuits`, `contracts`, `libraries` |
:::caution
Semaphore V4 is in early testing and might have bugs. Please, don't use it in production.
:::

View File

@@ -1 +1 @@
["V4-beta", "V3", "V2", "V1"]
["V4", "V3", "V2", "V1"]

View File

@@ -31,7 +31,7 @@
🔎 Issues
</a>
<span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
<a href="https://semaphore.pse.dev/discord">
<a href="https://semaphore.pse.dev/telegram">
🗣️ Chat &amp; Support
</a>
</h4>
@@ -42,15 +42,22 @@
## Networks
| Semaphore version | Sepolia | Polygon Mumbai | Optimism Sepolia | Arbitrum Sepolia | Arbitrum One | Polygon Amoy |
| ----------------- | ------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| v2.0 | N/A | N/A | N/A | N/A | [semaphore-protocol/arbitrum](https://thegraph.com/hosted-service/subgraph/semaphore-protocol/arbitrum) | N/A |
| v2.5 | N/A | N/A | N/A | N/A | N/A | N/A |
| v2.6 | N/A | N/A | N/A | N/A | [semaphore-protocol/arbitrum-86337c](https://thegraph.com/hosted-service/subgraph/semaphore-protocol/arbitrum-86337c) | N/A |
| v3.0 - v3.1 | N/A | N/A | N/A | N/A | [semaphore-protocol/arbitrum-72dca3](https://thegraph.com/hosted-service/subgraph/semaphore-protocol/arbitrum-72dca3) | N/A |
| >= v3.2 | [semaphore-sepolia](https://api.studio.thegraph.com/query/14377/semaphore-sepolia/v3.6.1) | [semaphore-mumbai](https://api.studio.thegraph.com/query/14377/semaphore-mumbai/v3.6.1) | N/A | N/A | [semaphore-arbitrum](https://api.studio.thegraph.com/query/14377/semaphore-arbitrum/v3.6.1) | N/A |
| v4.0.0-beta | [semaphore-sepolia](https://api.studio.thegraph.com/query/14377/semaphore-sepolia/v4.0.0-beta) | [semaphore-matic-mumbai](https://api.studio.thegraph.com/query/14377/semaphore-matic-mumbai/v4.0.0-beta) | [semaphore-optimism-sepolia](https://api.studio.thegraph.com/query/14377/semaphore-optimism-sepolia/v4.0.0-beta) | [semaphore-arbitrum-sepolia](https://api.studio.thegraph.com/query/14377/semaphore-arbitrum-sepolia/v4.0.0-beta) | N/A | N/A |
| >= v4.0.0-beta.17 | [semaphore-sepolia](https://api.studio.thegraph.com/query/14377/semaphore-sepolia/v4.0.0-beta.17) | N/A | [semaphore-optimism-sepolia](https://api.studio.thegraph.com/query/14377/semaphore-optimism-sepolia/v4.0.0-beta.17) | [semaphore-arbitrum-sepolia](https://api.studio.thegraph.com/query/14377/semaphore-arbitrum-sepolia/v4.0.0-beta.17) | N/A | [semaphore-matic-amoy](https://api.studio.thegraph.com/query/14377/semaphore-matic-amoy/v4.0.0-beta.17) |
You can access any subgraph supported by Semaphore with the following URL: `https://api.studio.thegraph.com/query/14377/semaphore-<network-name>/v4.2.0`.
Supported networks:
- `sepolia`
- `optimism`
- `optimism-sepolia`
- `arbitrum`
- `arbitrum-sepolia`
- `matic`
- `matic-amoy`
- `base-sepolia`
- `base`
- `linea-sepolia`
- `linea`
- `scroll-sepolia`
## 🛠 Install

View File

@@ -20,7 +20,7 @@
"dependencies": {
"@graphprotocol/graph-cli": "0.78.0",
"@graphprotocol/graph-ts": "0.35.1",
"@semaphore-protocol/utils": "4.0.0"
"@semaphore-protocol/utils": "workspace:packages/utils"
},
"devDependencies": {
"@types/mustache": "^4.2.2",

View File

@@ -6,8 +6,20 @@ const network = process.argv.at(2)
const template = readFileSync("./subgraph.template.yaml", "utf-8")
function mapNetwork(n) {
if (n === "matic-amoy") {
return "polygon-amoy"
}
if (n === "arbitrum") {
return "arbitrum-one"
}
return network
}
const subgraph = Mustache.render(template, {
network: network === "matic-amoy" ? "polygon-amoy" : network,
network: mapNetwork(network),
...getDeployedContract(network)
})

View File

@@ -34,7 +34,7 @@
🔎 Issues
</a>
<span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
<a href="https://semaphore.pse.dev/discord">
<a href="https://semaphore.pse.dev/telegram">
🗣️ Chat &amp; Support
</a>
</h4>

View File

@@ -26,7 +26,7 @@ export default function Build() {
url: "https://github.com/semaphore-protocol/boilerplate",
details: [
"Begin your projects with a ready-to-use example template",
"Create identity, join group, send anonmous feedback",
"Create identity, join group, send anonymous feedback",
"Easily modify to align with specific project goals"
]
},
@@ -133,7 +133,7 @@ export default function Build() {
</VStack>
</Flex>
<Box position="relative" w={{ base: "full", xl: "727px" }} h="630" overflow="hidden">
<Box position="relative" w={{ base: "full", xl: "727px" }} h="630px" overflow="hidden">
<Image
src="https://semaphore.cedoor.dev/flower-shadow.jpg"
alt=""

View File

@@ -32,19 +32,18 @@ export default function RootLayout({ children }: { children: React.ReactNode })
<body suppressHydrationWarning>
<Providers>
<Banner>
Semaphore V4
<Link
_hover={{
textDecoration: "underline",
textDecorationColor: "primary.600"
}}
href="https://ceremony.pse.dev/projects/Semaphore%20V4%20Ceremony"
href="https://github.com/semaphore-protocol/semaphore/releases/tag/v4.0.0"
ml="1"
isExternal
>
<b>Trusted Setup</b>
<b>Semaphore V4</b>
</Link>{" "}
ceremony is open for contributions until <b>July 10</b>.
has been released 🚀
</Banner>
<Navbar />
<Container maxW="1440px" px={{ base: "5", md: "10" }}>

View File

@@ -1,11 +1,13 @@
import { Box, Button, Card, CardBody, HStack, Heading, Image, Link, Stack, Text, VStack } from "@chakra-ui/react"
import NextLink from "next/link"
import { Sora } from "next/font/google"
import NextLink from "next/link"
import Carousel from "../components/Carousel"
import ProjectCard from "../components/ProjectCard"
import events from "../data/events.json"
import allProjects from "../data/projects.json"
import IconDiscord from "../icons/IconDiscord"
import IconTelegram from "../icons/IconTelegram"
import HRoadmap from "@/components/HRoadmap"
import VRoadmap from "@/components/VRoadmap"
const sora = Sora({
subsets: ["latin"]
@@ -220,6 +222,35 @@ export default function Home() {
</Card>
</HStack>
<VStack mb="32" spacing="32">
<VStack w="full" maxW="1110px">
<Heading fontSize={{ base: "30px", md: "44px" }} pb="90px">
2024 Roadmap
</Heading>
<HStack display={{ base: "none", md: "flex" }} w="full" mt="60px">
<HRoadmap />
</HStack>
<VStack display={{ base: "flex", md: "none" }}>
<VRoadmap />
</VStack>
</VStack>
<VStack maxW="650" align="center" spacing="8">
<Heading fontSize={{ base: "30px", md: "44px" }}>Join the Semaphore community</Heading>
<Text fontSize={{ base: "16px", md: "18px" }} textAlign="center">
Ask questions, suggest ideas, stay up-to-date, and meet other people building privacy
applications with Zero Knowledge.
</Text>
<Link href="https://semaphore.pse.dev/telegram" isExternal>
<Button leftIcon={<IconTelegram />} size="lg">
Telegram
</Button>
</Link>
</VStack>
</VStack>
<VStack justify="center" spacing="40" py="32" position="relative">
<Box
zIndex="-1"
@@ -239,27 +270,16 @@ export default function Home() {
/>
</Box>
<Stack direction={{ base: "column", md: "row" }} px={{ base: "0", md: "12" }} spacing="32">
<VStack maxW="450" align="left" spacing="8">
<Heading fontSize={{ base: "30px", md: "44px" }}>Join the Semaphore community</Heading>
<Text fontSize={{ base: "16px", md: "18px" }}>
Ask questions, suggest ideas, stay up-to-date, and meet other people building privacy
applications with Zero Knowledge.
</Text>
<Link href="https://semaphore.pse.dev/discord" isExternal>
<Button leftIcon={<IconDiscord />} size="lg">
Discord
</Button>
</Link>
</VStack>
<Stack direction={{ base: "column", md: "row" }} px={{ base: "0", md: "12" }} w="full">
<Box flex="1" />
<Card
bg="inherit"
flex="1"
bg="darkBlue"
color="white"
backdropFilter="blur(4px)"
borderRadius="18px"
border="1px"
borderColor="white"
borderColor="text.900"
padding="50px"
>
<CardBody padding="0">
@@ -267,7 +287,7 @@ export default function Home() {
Upcoming Events
</Heading>
<VStack align="left" spacing="10" maxH="600" overflowY="auto">
<VStack align="left" spacing="10" maxH="600px" overflowY="auto">
{events.map((event) => (
<Link href={event.link} key={event.name} isExternal>
<VStack align="left">

View File

@@ -2,7 +2,7 @@ import { Divider, Heading, HStack, Link, Stack, Text, VStack } from "@chakra-ui/
import Image from "next/image"
import NextLink from "next/link"
import IconArrowUpRight from "../icons/IconArrowUpRight"
import IconDiscord from "../icons/IconDiscord"
import IconTelegram from "../icons/IconTelegram"
import IconThumbsUp from "../icons/IconThumbsUp"
import IconX from "@/icons/IconX"
@@ -59,11 +59,11 @@ export default function Footer() {
<Divider />
<VStack spacing="5">
<HStack spacing="5">
<Link href="https://semaphore.pse.dev/discord" isExternal>
<Link href="https://semaphore.pse.dev/telegram" isExternal>
<HStack>
<IconDiscord boxSize={{ base: "16px", md: "24px" }} />
<IconTelegram boxSize={{ base: "16px", md: "24px" }} />
<Heading fontSize={{ base: "14px", md: "18px" }} fontWeight="normal">
Discord
Telegram
</Heading>
</HStack>
</Link>

View File

@@ -0,0 +1,58 @@
import { Box, Text } from "@chakra-ui/react"
import roadmap from "../data/roadmap.json"
import IconInnerCheck from "../icons/IconInnerCheck"
export default function HRoadmap() {
return roadmap.map((milestone, i) => (
<Box
key={milestone.name}
borderBottomWidth={i % 2 === 0 ? "5px" : "0px"}
borderTopWidth={i % 2 !== 0 ? "5px" : "0px"}
borderLeftWidth="1px"
borderColor="#1E46F2"
transform={i % 2 === 0 ? "translateY(-74px)" : ""}
h="80px"
w="full"
pos="relative"
>
{milestone.done ? (
<IconInnerCheck
pos="absolute"
top={i % 2 !== 0 ? "-14px" : "inherit"}
bottom={i % 2 === 0 ? "-14px" : "inherit"}
left="-12px"
bg="#1E46F2"
borderRadius="50px"
p="7px"
w="24px"
h="24px"
color="white"
/>
) : (
<Box
pos="absolute"
top={i % 2 !== 0 ? "-14px" : "inherit"}
bottom={i % 2 === 0 ? "-14px" : "inherit"}
left="-12px"
bg="darkBlueBg"
borderWidth="5px"
borderColor="#1E46F2"
borderRadius="50px"
w="24px"
h="24px"
/>
)}
<Text
pos="absolute"
bg="darkBlueBg"
fontSize="14px"
py="5px"
top={i % 2 === 0 ? "-35px" : "inherit"}
bottom={i % 2 !== 0 ? "-35px" : "inherit"}
left="-1px"
>
{milestone.name}
</Text>
</Box>
))
}

View File

@@ -20,7 +20,7 @@ import {
} from "@chakra-ui/react"
import Image from "next/image"
import NextLink from "next/link"
import IconDiscord from "../icons/IconDiscord"
import IconTelegram from "../icons/IconTelegram"
import IconMenu from "../icons/IconMenu"
import IconThumbsUp from "../icons/IconThumbsUp"
import NavbarLinks from "./NavbarLinks"
@@ -71,11 +71,11 @@ export default function Navbar() {
<VStack w="full" justify="center" spacing="5">
<HStack spacing="5">
<Link href="https://semaphore.pse.dev/discord" isExternal>
<Link href="https://semaphore.pse.dev/telegram" isExternal>
<HStack>
<IconDiscord boxSize={{ base: "16px", md: "24px" }} />
<IconTelegram boxSize={{ base: "16px", md: "24px" }} />
<Heading fontSize={{ base: "14px", md: "18px" }} fontWeight="normal">
Discord
Telegram
</Heading>
</HStack>
</Link>

View File

@@ -0,0 +1,61 @@
import { Box, Text } from "@chakra-ui/react"
import roadmap from "../data/roadmap.json"
import IconInnerCheck from "../icons/IconInnerCheck"
export default function VRoadmap() {
return roadmap.map((milestone, i) => (
<Box
key={milestone.name}
ml="-74px"
borderLeftWidth={i % 2 === 0 ? "5px" : "0px"}
borderRightWidth={i % 2 !== 0 ? "5px" : "0px"}
borderTopWidth="1px"
borderColor="#1E46F2"
transform={i % 2 === 0 ? "translateX(74px)" : ""}
h="80px"
w="80px"
pos="relative"
>
{milestone.done ? (
<IconInnerCheck
pos="absolute"
right={i % 2 !== 0 ? "-14px" : "inherit"}
left={i % 2 === 0 ? "-14px" : "inherit"}
top="-12px"
bg="#1E46F2"
borderRadius="50px"
p="7px"
w="24px"
h="24px"
color="white"
/>
) : (
<Box
pos="absolute"
right={i % 2 !== 0 ? "-14px" : "inherit"}
left={i % 2 === 0 ? "-14px" : "inherit"}
top="-12px"
bg="darkBlueBg"
borderWidth="5px"
borderColor="#1E46F2"
borderRadius="50px"
w="24px"
h="24px"
/>
)}
<Text
pos="absolute"
bg="darkBlueBg"
fontSize="14px"
w="140px"
px="16px"
textAlign={i % 2 === 0 ? "left" : "right"}
left={i % 2 === 0 ? "70px" : "inherit"}
right={i % 2 !== 0 ? "70px" : "inherit"}
top="-5px"
>
{milestone.name}
</Text>
</Box>
))
}

View File

@@ -1,20 +1,20 @@
[
{
"name": "Trusted Setup ceremony",
"date": "June 10 - July 10, 2024",
"description": "The Semaphore team will perform the Phase 2 MPC Trusted Setup ceremony to secure V4 circuit variants from 1 to 32 tree depths.",
"link": "https://docs.semaphore.pse.dev/trusted-setup"
},
{
"name": "ETHRome",
"date": "Oct 4-6, 2024",
"description": "Semaphore team will deliver an in-person talk and sponsor prizes for the hackathon.",
"link": "https://www.ethrome.org/"
"name": "DIF - Decentralized Identity Foundation",
"date": "Oct 1 - Nov 4, 2024",
"description": "Semaphore team will deliver a talk and sponsor prizes for the online hackathon.",
"link": "https://identity.foundation/"
},
{
"name": "Devcon",
"date": "Nov 12-15, 2024",
"description": "Semaphore team will deliver an in-person talk and run workshops.",
"link": "https://devcon.org/en/"
},
{
"name": "ETHIndia",
"date": "Dec 6-8, 2024",
"description": "Semaphore team will deliver an in-person talk on Semaphore and Bandada.",
"link": "https://ethindia.co"
}
]

View File

@@ -11,15 +11,14 @@
}
},
{
"name": "Unirep",
"tagline": "Private and nonrepudiable reputation system based on ZKP.",
"categories": ["Reputation", "Identity", "Social"],
"pse": true,
"name": "Worldcoin",
"categories": ["Identity"],
"tagline": "A global digital currency offering universal access to a more inclusive financial system.",
"pse": false,
"icon": "",
"links": {
"website": "https://developer.unirep.io",
"github": "https://github.com/Unirep",
"discord": "https://discord.gg/VzMMDJmYc5"
"github": "https://github.com/worldcoin",
"website": "https://worldcoin.org"
}
},
{
@@ -33,6 +32,26 @@
"website": "https://bandada.pse.dev"
}
},
{
"name": "ZkDemocracy",
"categories": ["Infra", "Data"],
"tagline": "ZkDemocracy is a ready-to-use anonymous voting system based on Semaphore.",
"pse": false,
"icon": "",
"links": {
"github": "https://github.com/TheBojda/zkdemocracy"
}
},
{
"name": "Super Secret ZK Ballot",
"tagline": "A Solidity contract for anonymous voting.",
"categories": ["Voting"],
"pse": false,
"icon": "",
"links": {
"github": "https://github.com/dutragustavo/super-secret-zkballot"
}
},
{
"name": "ZK Proof of Humanity",
"tagline": "A project that allows humans, registered in Proof of Humanity, to prove their humanity without doxing.",
@@ -106,20 +125,7 @@
"icon": "",
"links": {
"website": "https://explorer.semaphore.pse.dev",
"github": "https://github.com/semaphore-protocol/explorer",
"discord": "https://semaphore.pse.dev/discord"
}
},
{
"name": "Semaphore Discord Bot",
"tagline": "A Discord Bot for Semaphore",
"categories": ["Development"],
"pse": true,
"icon": "",
"links": {
"website": "https://discord.com/api/oauth2/authorize?client_id=1082429985496772628&permissions=1024&scope=bot",
"github": "https://github.com/semaphore-protocol/discord-bot",
"discord": "https://semaphore.pse.dev/discord"
"github": "https://github.com/semaphore-protocol/explorer"
}
},
{
@@ -487,14 +493,15 @@
}
},
{
"name": "Worldcoin",
"categories": ["Identity"],
"tagline": "A global digital currency offering universal access to a more inclusive financial system.",
"pse": false,
"name": "Unirep",
"tagline": "Private and nonrepudiable reputation system based on ZKP.",
"categories": ["Reputation", "Identity", "Social"],
"pse": true,
"icon": "",
"links": {
"github": "https://github.com/worldcoin",
"website": "https://worldcoin.org"
"website": "https://developer.unirep.io",
"github": "https://github.com/Unirep",
"discord": "https://discord.gg/VzMMDJmYc5"
}
},
{
@@ -537,5 +544,26 @@
"github": "https://github.com/AsteriskDAO",
"website": "https://ethglobal.com/showcase/asteriskdao-4hvhf"
}
},
{
"name": "Pairwise",
"tagline": "A fun pseudonymous way to signal in Retro Funding 4.",
"categories": ["Retro Funding", "Public Goods", "Privacy", "Community"],
"pse": false,
"icon": "",
"links": {
"github": "https://github.com/GeneralMagicio/pairwise-RPGF4",
"website": "https://pairwise.vote"
}
},
{
"name": "VeilEscrow",
"categories": ["Privacy", "Coordination"],
"tagline": "Secure, private, and decentralized escrows for anonymous transactions",
"pse": false,
"icon": "",
"links": {
"github": "https://github.com/evgongora/VeilEscrow"
}
}
]

View File

@@ -0,0 +1,38 @@
[
{
"name": "Launched New Website",
"done": true
},
{
"name": "V4 Audit",
"done": true
},
{
"name": "V4 Trusted Setup",
"done": true
},
{
"name": "V4 Stable Release",
"done": true
},
{
"name": "LeanIMT Paper",
"done": true
},
{
"name": "Support more Testnets/Mainnets",
"done": true
},
{
"name": "Documentation improvements",
"done": false
},
{
"name": "New Explorer",
"done": false
},
{
"name": "RLN extension",
"done": false
}
]

View File

@@ -0,0 +1,15 @@
import { Icon, IconProps } from "@chakra-ui/react"
import React from "react"
export default function IconInnerCheck(props: IconProps): JSX.Element {
return (
<Icon viewBox="0 0 9 7" {...props}>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M7.84114 1.12297C8.23166 1.5135 8.23166 2.14666 7.84114 2.53718L3.84114 6.53718C3.45062 6.92771 2.81745 6.92771 2.42693 6.53718L0.426926 4.53718C0.0364021 4.14666 0.0364021 3.5135 0.426926 3.12297C0.817451 2.73245 1.45062 2.73245 1.84114 3.12297L3.13403 4.41586L6.42693 1.12297C6.81745 0.732447 7.45062 0.732447 7.84114 1.12297Z"
fill="white"
/>
</Icon>
)
}

View File

@@ -0,0 +1,13 @@
import { Icon, IconProps } from "@chakra-ui/react"
import React from "react"
export default function IconTelegram(props: IconProps): JSX.Element {
return (
<Icon viewBox="0 0 48 48" {...props}>
<path
d="M41.4193 7.30899C41.4193 7.30899 45.3046 5.79399 44.9808 9.47328C44.8729 10.9883 43.9016 16.2908 43.1461 22.0262L40.5559 39.0159C40.5559 39.0159 40.3401 41.5048 38.3974 41.9377C36.4547 42.3705 33.5408 40.4227 33.0011 39.9898C32.5694 39.6652 24.9068 34.7955 22.2086 32.4148C21.4531 31.7655 20.5897 30.4669 22.3165 28.9519L33.6487 18.1305C34.9438 16.8319 36.2389 13.8019 30.8426 17.4812L15.7331 27.7616C15.7331 27.7616 14.0063 28.8437 10.7686 27.8698L3.75342 25.7055C3.75342 25.7055 1.16321 24.0823 5.58815 22.459C16.3807 17.3729 29.6555 12.1786 41.4193 7.30899Z"
fill="currentColor"
/>
</Icon>
)
}

View File

@@ -9,7 +9,8 @@
"scripts": {
"build": "yarn build:libraries && yarn build:subgraph && yarn build:website && yarn build:docs",
"build:libraries": "yarn workspaces foreach -Apt --no-private run build",
"build:subgraph": "yarn workspace semaphore-subgraph build:sepolia",
"clean:subgraph": "rimraf apps/subgraph/node_modules",
"build:subgraph": "yarn clean:subgraph && yarn workspace semaphore-subgraph build:sepolia",
"build:website": "yarn workspace semaphore-website build",
"build:docs": "yarn workspace semaphore-docs build",
"compile:contracts": "yarn workspace semaphore-contracts compile",
@@ -23,12 +24,12 @@
"format": "concurrently -c auto -g -n prettier,embark \"prettier -c .\" \"yarn workspace semaphore-docs format\"",
"format:write": "concurrently -c auto -g -n prettier,embark \"prettier -w .\" \"yarn workspace semaphore-docs format:write\"",
"docs": "typedoc",
"version:bump": "yarn workspaces foreach -A --no-private version -d ${0} && yarn version apply --all && yarn remove:stable-version-field && NO_HOOK=1 git commit -am \"chore: v${0}\" && git tag v${0}",
"version:publish": "yarn build:libraries && yarn clean:cli-templates && yarn workspaces foreach -A --no-private npm publish --tolerate-republish --access public",
"version:bump": "scripts/version.ts ${0}",
"version:publish": "scripts/publish.ts",
"version:release": "changelogithub",
"clean": "ts-node scripts/clean-apps.ts && ts-node scripts/clean-packages.ts && yarn clean:cli-templates && rimraf node_modules",
"clean:cli-templates": "ts-node scripts/clean-cli-templates.ts",
"remove:stable-version-field": "ts-node scripts/remove-stable-version-field.ts && yarn format:write",
"clean": "scripts/clean-apps.ts && scripts/clean-packages.ts && yarn clean:cli-templates && rimraf node_modules",
"clean:cli-templates": "scripts/clean-cli-templates.ts",
"remove:stable-version-field": "scripts/remove-stable-version-field.ts && yarn format:write",
"precommit": "lint-staged",
"postinstall": "husky && git config --local core.editor cat"
},
@@ -57,6 +58,7 @@
"@types/glob": "^7.2.0",
"@types/jest": "^29.5.12",
"@types/node": "^20",
"@types/semver": "^7",
"@typescript-eslint/eslint-plugin": "^7.0.2",
"@typescript-eslint/parser": "^7.0.2",
"changelogithub": "0.12.7",
@@ -78,6 +80,7 @@
"lint-staged": "^15.2.2",
"prettier": "^3.2.5",
"rimraf": "^5.0.5",
"semver": "^7.6.2",
"snarkjs": "0.7.4",
"ts-jest": "^29.1.2",
"ts-node": "^10.9.2",

View File

@@ -34,7 +34,7 @@
🔎 Issues
</a>
<span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
<a href="https://semaphore.pse.dev/discord">
<a href="https://semaphore.pse.dev/telegram">
🗣️ Chat &amp; Support
</a>
</h4>

View File

@@ -1,6 +1,6 @@
{
"name": "@semaphore-protocol/circuits",
"version": "4.0.0",
"version": "4.8.2",
"description": "Semaphore Circom circuits to generate zero-knowledge proofs.",
"license": "MIT",
"files": [
@@ -30,9 +30,9 @@
"devDependencies": {
"@semaphore-protocol/core": "workspace:^",
"@types/mocha": "^10.0.6",
"@zk-kit/baby-jubjub": "1.0.1",
"circomkit": "^0.0.19",
"@zk-kit/baby-jubjub": "1.0.3",
"circomkit": "0.0.19",
"mocha": "^10.2.0",
"poseidon-lite": "^0.2.0"
"poseidon-lite": "^0.3.0"
}
}

View File

@@ -0,0 +1,13 @@
#root = true
[*]
indent_style = space
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120
indent_size = 4
[*.md]
trim_trailing_whitespace = false

View File

@@ -0,0 +1,3 @@
SEPOLIA_RPC_URL=
PRIVATE_KEY=
ETHERSCAN_API_KEY=

View File

@@ -0,0 +1,43 @@
node_modules
.env
# solidity-coverage files
/coverage
/coverage.json
# Output of 'npm pack'
*.tgz
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
# Optional npm cache directory
.npm
.DS_Store
# yarn v3
.pnp.*
.pnp.js
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Foundry artifact
cache/
out/
# artifact for deploying on local Anvil node
**/31337

View File

@@ -0,0 +1,30 @@
# dependencies
node_modules
package-lock.json
yarn.lock
.yarn
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# testing
coverage
coverage.json
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Foundry artifact
cache/
out/
# artifact for deploying on local Anvil node
**/31337

View File

@@ -0,0 +1,6 @@
{
"semi": false,
"arrowParens": "always",
"trailingComma": "none",
"plugins": ["prettier-plugin-solidity"]
}

View File

@@ -0,0 +1,6 @@
{
"extends": "solhint:recommended",
"rules": {
"func-visibility": ["error", { "ignoreConstructors": true }]
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,7 @@
compressionLevel: mixed
enableGlobalCache: false
nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-4.1.0.cjs

View File

@@ -0,0 +1,113 @@
# Semaphore Foundry Template
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.
## Prerequisites
This project requires [**Foundry**](https://getfoundry.sh/), and thus a [**Rust environment**](https://www.rust-lang.org/), installed in the machine.
## Install
### Install dependencies
```bash
yarn
```
## Usage
### Compile contracts
```bash
yarn compile
```
### Test contracts
```bash
yarn test
```
You can also generate a test coverage report:
```bash
yarn test:coverage
```
Or a test gas report:
```bash
yarn test:gas-report
```
You can also start a local [Anvil node](https://book.getfoundry.sh/anvil/) with Semaphore and Feedback contracts deployed on it with:
```bash
yarn dev
```
### Code quality and formatting
Run [solhint](https://github.com/protofire/solhint) 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
```
### Integrating with Semaphore Boilerplate
You can also integrate this project with [Semaphore Boilerplate](https://github.com/semaphore-protocol/boilerplate), using this project as the contract end and connecting with Boilerplate front end.
1. In `cli-template-contracts-foundry` package directory, run:
```sh
yarn install
yarn dev
```
After running `yarn dev`, notice the output of
```sh
# ...
# ...
== Return ==
feedbackAddr: address 0x6f1AFCA8BCA87bF02091AF6187a5002802f9FB31
semaphoreAddr: address 0xb730ce6CAE3FB706e83E4E00dFA31623966570eB
semaphoreVerifierAddr: address 0xE2c114f548bEf410eaCe04D0390b61cc963df295
# ...
# ...
```
2. Now, with another terminal, clone Semaphore Boilerplate down:
```sh
# 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
```
3. 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.
4. Run the Boilerplate front end:
```sh
yarn dev:web-app
```

View File

@@ -0,0 +1,15 @@
[profile.default]
src = "src"
out = "out"
script = "script"
libs = ["node_modules"]
allow_paths = ["*", "../.."]
[rpc_endpoints]
anvil = "http://127.0.0.1:8545"
# sepolia = "${SEPOLIA_RPC_URL}"
[etherscan]
# sepolia = { key = "${ETHERSCAN_API_KEY}" }
# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options

View File

@@ -0,0 +1,45 @@
{
"name": "@semaphore-protocol/cli-template-contracts-foundry",
"version": "4.8.2",
"description": "Semaphore Foundry template.",
"license": "Unlicense",
"devDependencies": {
"@semaphore-protocol/contracts": "4.8.2",
"@zk-kit/lean-imt.sol": "2.0.0",
"forge-std": "github:foundry-rs/forge-std#v1.9.4",
"poseidon-solidity": "0.0.5",
"prettier": "^3.2.5",
"prettier-plugin-solidity": "^1.3.1",
"solhint": "^4.1.1",
"wait-on": "^8.0.1"
},
"scripts": {
"dev": "anvil & (wait-on tcp:8545 && forge script script/DeployFeedback.s.sol --rpc-url anvil --broadcast --sender 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266)",
"compile": "forge build",
"clean": "forge clean",
"test": "forge test -vvv",
"test:report-gas": "forge test --gas-report",
"test:coverage": "forge coverage",
"lint": "yarn solhint \"{script,src,test}/**/*.sol\"",
"prettier": "prettier -c \"**/*.{json,md,svg,yml,sol}\"",
"prettier:write": "prettier -w \"**/*.{json,md,svg,yml,sol}\"",
"check": "yarn test & yarn lint & yarn prettier",
"prepublish": "tar -czf files.tgz .gitignore .yarn .yarnrc.yml"
},
"files": [
"src",
"test",
"script",
"package.json",
"foundry.toml",
"remappings.txt",
"README.md",
"files.tgz",
".editorconfig",
".env.example",
".prettierignore",
".prettierrc.json",
".solhint.json"
],
"packageManager": "yarn@4.1.0"
}

View File

@@ -0,0 +1,4 @@
@semaphore/contracts/=./node_modules/@semaphore-protocol/contracts/
@zk-kit/lean-imt.sol/=./node_modules/@zk-kit/lean-imt.sol/
forge-std/=./node_modules/forge-std/src/
poseidon-solidity/=./node_modules/poseidon-solidity/

View File

@@ -0,0 +1,37 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;
import {Feedback} from "../src/Feedback.sol";
import {Semaphore} from "@semaphore/contracts/Semaphore.sol";
import {SemaphoreVerifier} from "@semaphore/contracts/base/SemaphoreVerifier.sol";
import {ISemaphoreVerifier} from "@semaphore/contracts/interfaces/ISemaphoreVerifier.sol";
import {Script} from "forge-std/Script.sol";
// Passing SALT parameter to use CREATE2 for deterministic contract address
bytes32 constant SALT = bytes32(0);
contract DeployFeedback is Script {
function run() external returns (address feedbackAddr, address semaphoreAddr, address semaphoreVerifierAddr) {
// Default to use the first test user private key of anvil node
uint256 deployerPrivateKey = vm.envOr(
"PRIVATE_KEY",
uint256(0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80)
);
vm.startBroadcast(deployerPrivateKey);
// Deploy SemaphoreVerifier
SemaphoreVerifier semaphoreVerifierContract = new SemaphoreVerifier{salt: SALT}();
semaphoreVerifierAddr = address(semaphoreVerifierContract);
// Deploy Semaphore
Semaphore semaphoreContract = new Semaphore{salt: SALT}(ISemaphoreVerifier(semaphoreVerifierAddr));
semaphoreAddr = address(semaphoreContract);
// Deploy Feedback
Feedback feedbackContract = new Feedback{salt: SALT}(semaphoreAddr);
feedbackAddr = address(feedbackContract);
vm.stopBroadcast();
}
}

View File

@@ -0,0 +1,39 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;
import {ISemaphore} from "@semaphore/contracts/interfaces/ISemaphore.sol";
contract Feedback {
ISemaphore public semaphore;
uint256 public groupId;
constructor(address semaphoreAddress) {
semaphore = ISemaphore(semaphoreAddress);
groupId = semaphore.createGroup();
}
function joinGroup(uint256 identityCommitment) external {
semaphore.addMember(groupId, identityCommitment);
}
function sendFeedback(
uint256 merkleTreeDepth,
uint256 merkleTreeRoot,
uint256 nullifier,
uint256 feedback,
uint256[8] calldata points
) external {
ISemaphore.SemaphoreProof memory proof = ISemaphore.SemaphoreProof(
merkleTreeDepth,
merkleTreeRoot,
nullifier,
feedback,
groupId,
points
);
semaphore.validateProof(groupId, proof);
}
}

View File

@@ -0,0 +1,74 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;
import {Test} from "forge-std/Test.sol";
import {ISemaphore} from "@semaphore/contracts/interfaces/ISemaphore.sol";
import {ISemaphoreGroups} from "@semaphore/contracts/interfaces/ISemaphoreGroups.sol";
import {Feedback} from "../src/Feedback.sol";
import {DeployFeedback} from "../script/DeployFeedback.s.sol";
contract FeedbackTest is Test {
event MemberAdded(uint256 indexed groupId, uint256 index, uint256 identityCommitment, uint256 merkleTreeRoot);
Feedback internal feedbackContract;
ISemaphore internal semaphoreContract;
ISemaphoreGroups internal semaphoreGroups;
uint256 internal groupId;
function setUp() external {
DeployFeedback deployFeedback = new DeployFeedback();
(address feedbackAddress, address semaphoreAddress, ) = deployFeedback.run();
feedbackContract = Feedback(feedbackAddress);
semaphoreContract = ISemaphore(semaphoreAddress);
semaphoreGroups = ISemaphoreGroups(semaphoreAddress);
groupId = feedbackContract.groupId();
}
function testGroupCreatedInConstructor() public view {
uint256 groupCount = semaphoreContract.groupCounter();
assertEq(groupCount, 1);
}
function testJoinGroup() public {
// The commitment below is generated with private key of the first account in Anvil
uint256 identityCommitment = 15072455385723004728391568434269917452175057560864330595979104241296826134229;
// Test: expect an event emitted. Check for all event topics and data
vm.expectEmit(true, true, true, true);
emit MemberAdded(groupId, 0, identityCommitment, identityCommitment);
feedbackContract.joinGroup(identityCommitment);
}
function testSendFeedback() public {
uint256[] memory commitments = new uint256[](2);
commitments[0] = uint256(11005642493773047649202648265396872197147567800455247120861783398111750817516);
commitments[1] = uint256(14473821761500463903284857947161896352613497175238126022206384102438097355186);
for (uint256 i = 0; i < commitments.length; ++i) {
feedbackContract.joinGroup(commitments[i]);
}
uint256 merkleTreeDepth = 1;
uint256 merkleTreeRoot = semaphoreGroups.getMerkleTreeRoot(groupId);
uint256 feedback = uint256(bytes32("Hello World"));
// These values are computed by running through @semaphore-protocol/circuits
uint256 nullifier = 14622092170088252518938850323258916742048811914834592843410744760450844885096;
uint256[8] memory points = [
2004484873491928515306456072357737929124240734208600886081152392890959117520,
21291026142870585364296731900941597996672838511394659364623185352043543529323,
4657264777014371046112557309523098953851041383509685591373847255581509612788,
6904165961903336246592681066375875983213983935764940579845010085396463328555,
1952750241178995674697344628236393389729638396609772141225880353616301956443,
106937615136633409337870509099767689510837462832227699340906789167349502398,
13080722838047436988558418790480431472161933638137155324683844808531903905810,
2547578906197450986657523555784319153413167960139250957065929818900731634820
];
vm.expectEmit(true, true, true, true);
emit ISemaphore.ProofValidated(groupId, merkleTreeDepth, merkleTreeRoot, nullifier, feedback, groupId, points);
feedbackContract.sendFeedback(merkleTreeDepth, merkleTreeRoot, nullifier, feedback, points);
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@semaphore-protocol/cli-template-contracts-hardhat",
"version": "4.0.0",
"version": "4.8.2",
"description": "Semaphore Hardhat template.",
"license": "Unlicense",
"files": [
@@ -16,7 +16,8 @@
".prettierrc.json",
"hardhat.config.ts",
"tsconfig.json",
"README.md"
"README.md",
".solhint.json"
],
"publishConfig": {
"access": "public"
@@ -41,9 +42,9 @@
"@nomicfoundation/hardhat-network-helpers": "^1.0.0",
"@nomicfoundation/hardhat-toolbox": "^4.0.0",
"@nomicfoundation/hardhat-verify": "^2.0.0",
"@semaphore-protocol/core": "4.0.0",
"@semaphore-protocol/hardhat": "4.0.0",
"@semaphore-protocol/utils": "4.0.0",
"@semaphore-protocol/core": "4.8.2",
"@semaphore-protocol/hardhat": "4.8.2",
"@semaphore-protocol/utils": "4.8.2",
"@typechain/ethers-v6": "^0.5.0",
"@typechain/hardhat": "^9.0.0",
"@types/chai": "^4.2.0",
@@ -59,7 +60,7 @@
"eslint-config-airbnb-typescript": "^17.1.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"ethers": "^6.4.0",
"ethers": "^6.13.4",
"hardhat": "^2.20.1",
"hardhat-gas-reporter": "^1.0.8",
"prettier": "^3.2.5",
@@ -71,7 +72,7 @@
"typescript": "^5.3.3"
},
"dependencies": {
"@semaphore-protocol/contracts": "4.0.0"
"@semaphore-protocol/contracts": "4.8.2"
},
"packageManager": "yarn@4.1.0"
}

View File

@@ -20,9 +20,9 @@
"@nomicfoundation/hardhat-network-helpers": "^1.0.0",
"@nomicfoundation/hardhat-toolbox": "^4.0.0",
"@nomicfoundation/hardhat-verify": "^2.0.0",
"@semaphore-protocol/core": "4.0.0",
"@semaphore-protocol/hardhat": "4.0.0",
"@semaphore-protocol/utils": "4.0.0",
"@semaphore-protocol/core": "4.8.2",
"@semaphore-protocol/hardhat": "4.8.2",
"@semaphore-protocol/utils": "4.8.2",
"@typechain/ethers-v6": "^0.5.0",
"@typechain/hardhat": "^9.0.0",
"@types/chai": "^4.2.0",
@@ -38,7 +38,7 @@
"eslint-config-airbnb-typescript": "^17.1.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"ethers": "^6.4.0",
"ethers": "^6.13.4",
"hardhat": "^2.20.1",
"hardhat-gas-reporter": "^1.0.8",
"prettier": "^3.2.5",
@@ -50,7 +50,7 @@
"typescript": "^5.3.3"
},
"dependencies": {
"@semaphore-protocol/contracts": "4.0.0"
"@semaphore-protocol/contracts": "4.8.2"
},
"packageManager": "yarn@4.1.0"
}

View File

@@ -1,4 +1,4 @@
NEXT_PUBLIC_DEFAULT_NETWORK=localhost
NEXT_PUBLIC_FEEDBACK_CONTRACT_ADDRESS=0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9
NEXT_PUBLIC_FEEDBACK_CONTRACT_ADDRESS=0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9
NEXT_PUBLIC_SEMAPHORE_CONTRACT_ADDRESS=0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0
NEXT_PUBLIC_GROUP_ID=0

View File

@@ -1,5 +1,8 @@
NEXT_PUBLIC_DEFAULT_NETWORK=sepolia
NEXT_PUBLIC_INFURA_API_KEY=abf67af1010b4b8d877e04244f1eac3d
NEXT_PUBLIC_FEEDBACK_CONTRACT_ADDRESS=
NEXT_PUBLIC_SEMAPHORE_CONTRACT_ADDRESS=0x1e0d7FF1610e480fC93BdEC510811ea2Ba6d7c2f
NEXT_PUBLIC_OPENZEPPELIN_AUTOTASK_WEBHOOK=https://api.defender.openzeppelin.com/actions/20fce2ae-844b-4ec0-a6a2-90a3350a9d2c/runs/webhook/303216d1-fa7d-4fca-8c5b-7ba1ba544fc7/2T7i9xrkZA5j37hoaQLUuw
NEXT_PUBLIC_GELATO_RELAYER_ENDPOINT=https://api.gelato.digital/relays/v2/sponsored-call
NEXT_PUBLIC_GELATO_RELAYER_CHAIN_ID=11155111
NEXT_PUBLIC_GROUP_ID=

View File

@@ -1,5 +1,8 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# testing
/coverage
# next.js
/.next/
/out/
@@ -7,3 +10,18 @@
# production
/build
# misc
.DS_Store
*.pem
# typescript
*.tsbuildinfo
next-env.d.ts
# Auto Generated PWA files
public/sw.js
public/workbox-*.js
public/worker-*.js
public/sw.js.map
public/workbox-*.js.map
public/worker-*.js.map

View File

@@ -9,11 +9,6 @@
"internalType": "address",
"name": "semaphoreAddress",
"type": "address"
},
{
"internalType": "uint256",
"name": "_groupId",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
@@ -92,8 +87,8 @@
"type": "function"
}
],
"bytecode": "0x608060405234801561001057600080fd5b5060405161083f38038061083f833981810160405281019061003291906101a8565b816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060018190555060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c96e71fb600154306040518363ffffffff1660e01b81526004016100d6929190610206565b600060405180830381600087803b1580156100f057600080fd5b505af1158015610104573d6000803e3d6000fd5b50505050505061022f565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061013f82610114565b9050919050565b61014f81610134565b811461015a57600080fd5b50565b60008151905061016c81610146565b92915050565b6000819050919050565b61018581610172565b811461019057600080fd5b50565b6000815190506101a28161017c565b92915050565b600080604083850312156101bf576101be61010f565b5b60006101cd8582860161015d565b92505060206101de85828601610193565b9150509250929050565b6101f181610172565b82525050565b61020081610134565b82525050565b600060408201905061021b60008301856101e8565b61022860208301846101f7565b9392505050565b6106018061023e6000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80637b5d2534146100515780637b85d27a1461006f578063a0f44c921461008b578063eed02e4b146100a9575b600080fd5b6100596100c5565b6040516100669190610301565b60405180910390f35b6100896004803603810190610084919061037e565b6100e9565b005b6100936101ea565b6040516100a09190610409565b60405180910390f35b6100c360048036038101906100be9190610424565b6101f0565b005b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006040518060c001604052808781526020018681526020018581526020018481526020016001548152602001836008806020026040519081016040528092919082600860200280828437600081840152601f19601f820116905080830192505050505050815250905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0d898dd600154836040518363ffffffff1660e01b81526004016101b0929190610578565b600060405180830381600087803b1580156101ca57600080fd5b505af11580156101de573d6000803e3d6000fd5b50505050505050505050565b60015481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631783efc3600154836040518363ffffffff1660e01b815260040161024d9291906105a2565b600060405180830381600087803b15801561026757600080fd5b505af115801561027b573d6000803e3d6000fd5b5050505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006102c76102c26102bd84610282565b6102a2565b610282565b9050919050565b60006102d9826102ac565b9050919050565b60006102eb826102ce565b9050919050565b6102fb816102e0565b82525050565b600060208201905061031660008301846102f2565b92915050565b600080fd5b6000819050919050565b61033481610321565b811461033f57600080fd5b50565b6000813590506103518161032b565b92915050565b600080fd5b60008190508260206008028201111561037857610377610357565b5b92915050565b6000806000806000610180868803121561039b5761039a61031c565b5b60006103a988828901610342565b95505060206103ba88828901610342565b94505060406103cb88828901610342565b93505060606103dc88828901610342565b92505060806103ed8882890161035c565b9150509295509295909350565b61040381610321565b82525050565b600060208201905061041e60008301846103fa565b92915050565b60006020828403121561043a5761043961031c565b5b600061044884828501610342565b91505092915050565b61045a81610321565b82525050565b600060089050919050565b600081905092915050565b6000819050919050565b600061048c8383610451565b60208301905092915050565b6000602082019050919050565b6104ae81610460565b6104b8818461046b565b92506104c382610476565b8060005b838110156104f45781516104db8782610480565b96506104e683610498565b9250506001810190506104c7565b505050505050565b6101a0820160008201516105136000850182610451565b5060208201516105266020850182610451565b5060408201516105396040850182610451565b50606082015161054c6060850182610451565b50608082015161055f6080850182610451565b5060a082015161057260a08501826104a5565b50505050565b60006101c08201905061058e60008301856103fa565b61059b60208301846104fc565b9392505050565b60006040820190506105b760008301856103fa565b6105c460208301846103fa565b939250505056fea2646970667358221220f33606b2d5ad7c0dfc5d22afb43476e1974ea7fd160e1f28203a3e433f29cb4964736f6c63430008170033",
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80637b5d2534146100515780637b85d27a1461006f578063a0f44c921461008b578063eed02e4b146100a9575b600080fd5b6100596100c5565b6040516100669190610301565b60405180910390f35b6100896004803603810190610084919061037e565b6100e9565b005b6100936101ea565b6040516100a09190610409565b60405180910390f35b6100c360048036038101906100be9190610424565b6101f0565b005b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006040518060c001604052808781526020018681526020018581526020018481526020016001548152602001836008806020026040519081016040528092919082600860200280828437600081840152601f19601f820116905080830192505050505050815250905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0d898dd600154836040518363ffffffff1660e01b81526004016101b0929190610578565b600060405180830381600087803b1580156101ca57600080fd5b505af11580156101de573d6000803e3d6000fd5b50505050505050505050565b60015481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631783efc3600154836040518363ffffffff1660e01b815260040161024d9291906105a2565b600060405180830381600087803b15801561026757600080fd5b505af115801561027b573d6000803e3d6000fd5b5050505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006102c76102c26102bd84610282565b6102a2565b610282565b9050919050565b60006102d9826102ac565b9050919050565b60006102eb826102ce565b9050919050565b6102fb816102e0565b82525050565b600060208201905061031660008301846102f2565b92915050565b600080fd5b6000819050919050565b61033481610321565b811461033f57600080fd5b50565b6000813590506103518161032b565b92915050565b600080fd5b60008190508260206008028201111561037857610377610357565b5b92915050565b6000806000806000610180868803121561039b5761039a61031c565b5b60006103a988828901610342565b95505060206103ba88828901610342565b94505060406103cb88828901610342565b93505060606103dc88828901610342565b92505060806103ed8882890161035c565b9150509295509295909350565b61040381610321565b82525050565b600060208201905061041e60008301846103fa565b92915050565b60006020828403121561043a5761043961031c565b5b600061044884828501610342565b91505092915050565b61045a81610321565b82525050565b600060089050919050565b600081905092915050565b6000819050919050565b600061048c8383610451565b60208301905092915050565b6000602082019050919050565b6104ae81610460565b6104b8818461046b565b92506104c382610476565b8060005b838110156104f45781516104db8782610480565b96506104e683610498565b9250506001810190506104c7565b505050505050565b6101a0820160008201516105136000850182610451565b5060208201516105266020850182610451565b5060408201516105396040850182610451565b50606082015161054c6060850182610451565b50608082015161055f6080850182610451565b5060a082015161057260a08501826104a5565b50505050565b60006101c08201905061058e60008301856103fa565b61059b60208301846104fc565b9392505050565b60006040820190506105b760008301856103fa565b6105c460208301846103fa565b939250505056fea2646970667358221220f33606b2d5ad7c0dfc5d22afb43476e1974ea7fd160e1f28203a3e433f29cb4964736f6c63430008170033",
"bytecode": "0x608060405234801561001057600080fd5b506040516108473803806108478339818101604052810190610032919061017d565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c3f3b60306040518263ffffffff1660e01b81526004016100cb91906101b9565b6020604051808303816000875af11580156100ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061010e919061020a565b60018190555050610237565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061014a8261011f565b9050919050565b61015a8161013f565b811461016557600080fd5b50565b60008151905061017781610151565b92915050565b6000602082840312156101935761019261011a565b5b60006101a184828501610168565b91505092915050565b6101b38161013f565b82525050565b60006020820190506101ce60008301846101aa565b92915050565b6000819050919050565b6101e7816101d4565b81146101f257600080fd5b50565b600081519050610204816101de565b92915050565b6000602082840312156102205761021f61011a565b5b600061022e848285016101f5565b91505092915050565b610601806102466000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80637b5d2534146100515780637b85d27a1461006f578063a0f44c921461008b578063eed02e4b146100a9575b600080fd5b6100596100c5565b6040516100669190610301565b60405180910390f35b6100896004803603810190610084919061037e565b6100e9565b005b6100936101ea565b6040516100a09190610409565b60405180910390f35b6100c360048036038101906100be9190610424565b6101f0565b005b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006040518060c001604052808781526020018681526020018581526020018481526020016001548152602001836008806020026040519081016040528092919082600860200280828437600081840152601f19601f820116905080830192505050505050815250905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0d898dd600154836040518363ffffffff1660e01b81526004016101b0929190610578565b600060405180830381600087803b1580156101ca57600080fd5b505af11580156101de573d6000803e3d6000fd5b50505050505050505050565b60015481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631783efc3600154836040518363ffffffff1660e01b815260040161024d9291906105a2565b600060405180830381600087803b15801561026757600080fd5b505af115801561027b573d6000803e3d6000fd5b5050505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006102c76102c26102bd84610282565b6102a2565b610282565b9050919050565b60006102d9826102ac565b9050919050565b60006102eb826102ce565b9050919050565b6102fb816102e0565b82525050565b600060208201905061031660008301846102f2565b92915050565b600080fd5b6000819050919050565b61033481610321565b811461033f57600080fd5b50565b6000813590506103518161032b565b92915050565b600080fd5b60008190508260206008028201111561037857610377610357565b5b92915050565b6000806000806000610180868803121561039b5761039a61031c565b5b60006103a988828901610342565b95505060206103ba88828901610342565b94505060406103cb88828901610342565b93505060606103dc88828901610342565b92505060806103ed8882890161035c565b9150509295509295909350565b61040381610321565b82525050565b600060208201905061041e60008301846103fa565b92915050565b60006020828403121561043a5761043961031c565b5b600061044884828501610342565b91505092915050565b61045a81610321565b82525050565b600060089050919050565b600081905092915050565b6000819050919050565b600061048c8383610451565b60208301905092915050565b6000602082019050919050565b6104ae81610460565b6104b8818461046b565b92506104c382610476565b8060005b838110156104f45781516104db8782610480565b96506104e683610498565b9250506001810190506104c7565b505050505050565b6101a0820160008201516105136000850182610451565b5060208201516105266020850182610451565b5060408201516105396040850182610451565b50606082015161054c6060850182610451565b50608082015161055f6080850182610451565b5060a082015161057260a08501826104a5565b50505050565b60006101c08201905061058e60008301856103fa565b61059b60208301846104fc565b9392505050565b60006040820190506105b760008301856103fa565b6105c460208301846103fa565b939250505056fea264697066735822122078569abd7f309f3107c4d19e9b4a4f4812522ccc5dc57c7ccbe2b06a5ba461b064736f6c63430008170033",
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80637b5d2534146100515780637b85d27a1461006f578063a0f44c921461008b578063eed02e4b146100a9575b600080fd5b6100596100c5565b6040516100669190610301565b60405180910390f35b6100896004803603810190610084919061037e565b6100e9565b005b6100936101ea565b6040516100a09190610409565b60405180910390f35b6100c360048036038101906100be9190610424565b6101f0565b005b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006040518060c001604052808781526020018681526020018581526020018481526020016001548152602001836008806020026040519081016040528092919082600860200280828437600081840152601f19601f820116905080830192505050505050815250905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0d898dd600154836040518363ffffffff1660e01b81526004016101b0929190610578565b600060405180830381600087803b1580156101ca57600080fd5b505af11580156101de573d6000803e3d6000fd5b50505050505050505050565b60015481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631783efc3600154836040518363ffffffff1660e01b815260040161024d9291906105a2565b600060405180830381600087803b15801561026757600080fd5b505af115801561027b573d6000803e3d6000fd5b5050505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006102c76102c26102bd84610282565b6102a2565b610282565b9050919050565b60006102d9826102ac565b9050919050565b60006102eb826102ce565b9050919050565b6102fb816102e0565b82525050565b600060208201905061031660008301846102f2565b92915050565b600080fd5b6000819050919050565b61033481610321565b811461033f57600080fd5b50565b6000813590506103518161032b565b92915050565b600080fd5b60008190508260206008028201111561037857610377610357565b5b92915050565b6000806000806000610180868803121561039b5761039a61031c565b5b60006103a988828901610342565b95505060206103ba88828901610342565b94505060406103cb88828901610342565b93505060606103dc88828901610342565b92505060806103ed8882890161035c565b9150509295509295909350565b61040381610321565b82525050565b600060208201905061041e60008301846103fa565b92915050565b60006020828403121561043a5761043961031c565b5b600061044884828501610342565b91505092915050565b61045a81610321565b82525050565b600060089050919050565b600081905092915050565b6000819050919050565b600061048c8383610451565b60208301905092915050565b6000602082019050919050565b6104ae81610460565b6104b8818461046b565b92506104c382610476565b8060005b838110156104f45781516104db8782610480565b96506104e683610498565b9250506001810190506104c7565b505050505050565b6101a0820160008201516105136000850182610451565b5060208201516105266020850182610451565b5060408201516105396040850182610451565b50606082015161054c6060850182610451565b50608082015161055f6080850182610451565b5060a082015161057260a08501826104a5565b50505050565b60006101c08201905061058e60008301856103fa565b61059b60208301846104fc565b9392505050565b60006040820190506105b760008301856103fa565b6105c460208301846103fa565b939250505056fea264697066735822122078569abd7f309f3107c4d19e9b4a4f4812522ccc5dc57c7ccbe2b06a5ba461b064736f6c63430008170033",
"linkReferences": {},
"deployedLinkReferences": {}
}

View File

@@ -14,7 +14,8 @@ const nextConfig = withPWA({
})({
env: {
INFURA_API_KEY: process.env.INFURA_API_KEY,
ETHEREUM_PRIVATE_KEY: process.env.ETHEREUM_PRIVATE_KEY
ETHEREUM_PRIVATE_KEY: process.env.ETHEREUM_PRIVATE_KEY,
GELATO_RELAYER_API_KEY: process.env.GELATO_RELAYER_API_KEY
}
})

Some files were not shown because too many files have changed in this diff Show More