@semaphore-protocol/contracts 4.0.0-beta.14 → 4.0.0-beta.16

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
@@ -95,13 +95,13 @@ yarn test:report-gas
95
95
  Deploy the `Semaphore.sol` contract without any parameter:
96
96
 
97
97
  ```bash
98
- yarn deploy:semaphore
98
+ yarn deploy
99
99
  ```
100
100
 
101
101
  or deploy it by providing the addresses of the contracts/libraries on which it depends:
102
102
 
103
103
  ```bash
104
- yarn deploy:semaphore --semaphoreVerifier <address>
104
+ yarn deploy --semaphoreVerifier <address>
105
105
  ```
106
106
 
107
107
  > **Note**
@@ -110,11 +110,11 @@ yarn deploy:semaphore --semaphoreVerifier <address>
110
110
  If you want to deploy your contract in a specific network you can set up the `DEFAULT_NETWORK` variable in your `.env` file with the name of one of our supported networks (hardhat, localhost, sepolia, arbitrum). Or you can specify it as an option:
111
111
 
112
112
  ```bash
113
- yarn deploy:semaphore --network sepolia
114
- yarn deploy:semaphore --network mumbai
115
- yarn deploy:semaphore --network optimism-sepolia
116
- yarn deploy:semaphore --network arbitrum-sepolia
117
- yarn deploy:semaphore --network arbitrum
113
+ yarn deploy --network sepolia
114
+ yarn deploy --network mumbai
115
+ yarn deploy --network optimism-sepolia
116
+ yarn deploy --network arbitrum-sepolia
117
+ yarn deploy --network arbitrum
118
118
  ```
119
119
 
120
120
  If you want to deploy contracts on Sepolia or Arbitrum, remember to provide a valid private key and an Infura API in your `.env` file.
package/Semaphore.sol CHANGED
@@ -19,6 +19,7 @@ contract Semaphore is ISemaphore, SemaphoreGroups {
19
19
  mapping(uint256 => Group) public groups;
20
20
 
21
21
  /// @dev Counter to assign an incremental id to the groups.
22
+ /// This counter is used to keep track of the number of groups created.
22
23
  uint256 public groupCounter;
23
24
 
24
25
  /// @dev Initializes the Semaphore verifier used to verify the user's ZK proofs.
@@ -55,6 +55,10 @@ interface ISemaphore {
55
55
  uint256[8] points
56
56
  );
57
57
 
58
+ /// @dev Returns the current value of the group counter.
59
+ /// @return The current group counter value.
60
+ function groupCounter() external view returns (uint256);
61
+
58
62
  /// @dev See {SemaphoreGroups-_createGroup}.
59
63
  function createGroup() external returns (uint256);
60
64
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@semaphore-protocol/contracts",
3
- "version": "4.0.0-beta.14",
3
+ "version": "4.0.0-beta.16",
4
4
  "description": "Semaphore contracts to manage groups and broadcast anonymous signals.",
5
5
  "license": "MIT",
6
6
  "files": [