@semaphore-protocol/contracts 3.1.0 → 3.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -34,7 +34,7 @@
34
34
  🔎 Issues
35
35
  </a>
36
36
  <span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
37
- <a href="https://discord.gg/6mSdGHnstH">
37
+ <a href="https://semaphore.appliedzkp.org/discord">
38
38
  🗣️ Chat &amp; Support
39
39
  </a>
40
40
  </h4>
@@ -111,6 +111,9 @@ If you want to deploy your contract in a specific network you can set up the `DE
111
111
 
112
112
  ```bash
113
113
  yarn deploy:semaphore --network goerli
114
+ yarn deploy:semaphore --network sepolia
115
+ yarn deploy:semaphore --network mumbai
116
+ yarn deploy:semaphore --network optimism-goerli
114
117
  yarn deploy:semaphore --network arbitrum
115
118
  ```
116
119
 
package/base/Pairing.sol CHANGED
@@ -9,7 +9,7 @@
9
9
  pragma solidity ^0.8.4;
10
10
 
11
11
  library Pairing {
12
- error Semaphore__InvalidProof();
12
+ error InvalidProof();
13
13
 
14
14
  // The prime q in the base field F_q for G1
15
15
  uint256 constant BASE_MODULUS = 21888242871839275222246405745257275088696311157297823662689037894645226208583;
@@ -56,7 +56,7 @@ library Pairing {
56
56
 
57
57
  // Validate input or revert
58
58
  if (p.X >= BASE_MODULUS || p.Y >= BASE_MODULUS) {
59
- revert Semaphore__InvalidProof();
59
+ revert InvalidProof();
60
60
  }
61
61
 
62
62
  // We know p.Y > 0 and p.Y < BASE_MODULUS.
@@ -82,7 +82,7 @@ library Pairing {
82
82
  }
83
83
 
84
84
  if (!success) {
85
- revert Semaphore__InvalidProof();
85
+ revert InvalidProof();
86
86
  }
87
87
  }
88
88
 
@@ -92,7 +92,7 @@ library Pairing {
92
92
  // By EIP-196 the values p.X and p.Y are verified to less than the BASE_MODULUS and
93
93
  // form a valid point on the curve. But the scalar is not verified, so we do that explicitelly.
94
94
  if (s >= SCALAR_MODULUS) {
95
- revert Semaphore__InvalidProof();
95
+ revert InvalidProof();
96
96
  }
97
97
 
98
98
  uint256[3] memory input;
@@ -109,7 +109,7 @@ library Pairing {
109
109
  }
110
110
 
111
111
  if (!success) {
112
- revert Semaphore__InvalidProof();
112
+ revert InvalidProof();
113
113
  }
114
114
  }
115
115
 
@@ -120,7 +120,7 @@ library Pairing {
120
120
  // By EIP-197 all input is verified to be less than the BASE_MODULUS and form elements in their
121
121
  // respective groups of the right order.
122
122
  if (p1.length != p2.length) {
123
- revert Semaphore__InvalidProof();
123
+ revert InvalidProof();
124
124
  }
125
125
 
126
126
  uint256 elements = p1.length;
@@ -145,7 +145,7 @@ library Pairing {
145
145
  }
146
146
 
147
147
  if (!success || out[0] != 1) {
148
- revert Semaphore__InvalidProof();
148
+ revert InvalidProof();
149
149
  }
150
150
  }
151
151
  }
package/package.json CHANGED
@@ -1,35 +1,36 @@
1
1
  {
2
- "name": "@semaphore-protocol/contracts",
3
- "version": "3.1.0",
4
- "description": "Semaphore contracts to manage groups and broadcast anonymous signals.",
5
- "license": "MIT",
6
- "files": [
7
- "**/*.sol"
8
- ],
9
- "keywords": [
10
- "blockchain",
11
- "ethereum",
12
- "hardhat",
13
- "smart-contracts",
14
- "semaphore",
15
- "identity",
16
- "solidity",
17
- "zero-knowledge",
18
- "zk-snarks",
19
- "zero-knowledge-proofs",
20
- "circom",
21
- "proof-of-membership"
22
- ],
23
- "repository": "https://github.com/semaphore-protocol/semaphore",
24
- "homepage": "https://github.com/semaphore-protocol/semaphore/tree/main/packages/contracts",
25
- "bugs": {
26
- "url": "https://github.com/semaphore-protocol/semaphore.git/issues"
27
- },
28
- "publishConfig": {
29
- "access": "public"
30
- },
31
- "dependencies": {
32
- "@openzeppelin/contracts": "4.7.3",
33
- "@zk-kit/incremental-merkle-tree.sol": "1.3.3"
34
- }
35
- }
2
+ "name": "@semaphore-protocol/contracts",
3
+ "version": "3.2.1",
4
+ "description": "Semaphore contracts to manage groups and broadcast anonymous signals.",
5
+ "license": "MIT",
6
+ "files": [
7
+ "Semaphore.sol",
8
+ "**/*.sol"
9
+ ],
10
+ "keywords": [
11
+ "blockchain",
12
+ "ethereum",
13
+ "hardhat",
14
+ "smart-contracts",
15
+ "semaphore",
16
+ "identity",
17
+ "solidity",
18
+ "zero-knowledge",
19
+ "zk-snarks",
20
+ "zero-knowledge-proofs",
21
+ "circom",
22
+ "proof-of-membership"
23
+ ],
24
+ "repository": "https://github.com/semaphore-protocol/semaphore",
25
+ "homepage": "https://github.com/semaphore-protocol/semaphore/tree/main/packages/contracts",
26
+ "bugs": {
27
+ "url": "https://github.com/semaphore-protocol/semaphore.git/issues"
28
+ },
29
+ "publishConfig": {
30
+ "access": "public"
31
+ },
32
+ "dependencies": {
33
+ "@openzeppelin/contracts": "4.7.3",
34
+ "@zk-kit/incremental-merkle-tree.sol": "1.3.3"
35
+ }
36
+ }