@maci-protocol/website 0.0.0-ci.2cf83db → 0.0.0-ci.2d9201c

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maci-protocol/website",
3
- "version": "0.0.0-ci.2cf83db",
3
+ "version": "0.0.0-ci.2d9201c",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -21,11 +21,11 @@
21
21
  "types": "tsc -p tsconfig.json --noEmit"
22
22
  },
23
23
  "dependencies": {
24
- "@docusaurus/core": "^3.7.0",
25
- "@docusaurus/preset-classic": "^3.7.0",
26
- "@docusaurus/theme-classic": "^3.7.0",
27
- "@docusaurus/theme-common": "^3.7.0",
28
- "@easyops-cn/docusaurus-search-local": "^0.49.1",
24
+ "@docusaurus/core": "^3.8.1",
25
+ "@docusaurus/preset-classic": "^3.8.1",
26
+ "@docusaurus/theme-classic": "^3.8.1",
27
+ "@docusaurus/theme-common": "^3.8.1",
28
+ "@easyops-cn/docusaurus-search-local": "^0.51.1",
29
29
  "@mdx-js/react": "^3.1.0",
30
30
  "clsx": "^2.1.1",
31
31
  "docusaurus-plugin-image-zoom": "^3.0.1",
@@ -38,11 +38,11 @@
38
38
  "remark-math": "^6.0.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@docusaurus/module-type-aliases": "^3.7.0",
42
- "@docusaurus/tsconfig": "^3.7.0",
43
- "@docusaurus/types": "^3.7.0",
44
- "@types/node": "^22.15.17",
45
- "@types/react": "^19.1.4",
41
+ "@docusaurus/module-type-aliases": "^3.8.1",
42
+ "@docusaurus/tsconfig": "^3.8.1",
43
+ "@docusaurus/types": "^3.8.1",
44
+ "@types/node": "^24.0.4",
45
+ "@types/react": "^19.1.8",
46
46
  "ts-node": "^10.9.2",
47
47
  "typescript": "^5.8.3"
48
48
  },
@@ -61,5 +61,5 @@
61
61
  "engines": {
62
62
  "node": ">=18.0"
63
63
  },
64
- "gitHead": "299cbd8c36027a4ed8b96601250fed0638827789"
64
+ "gitHead": "3d92f87ac283af873035188034840641fc58a064"
65
65
  }
@@ -41,9 +41,7 @@ Refer to the [Glossary](#glossary) for definitions of terms.
41
41
  3. The signup period ends after a fixed amount of time. From that point onwards, users may no longer invoke `signUp()` in this contract.
42
42
 
43
43
  4. Each user votes. To do this, they:
44
-
45
44
  - Sign their command using the key which they had signed up with and then use a random (ephemeral) key as well as the coordinator's public key to generate a shared key (via ECDH) encrypt it.
46
-
47
45
  - If they are bribed, the user should sign it using an old public key which has already been replaced with a new one.
48
46
 
49
47
  - Otherwise, the user should use the most current public key they have registered.
@@ -53,9 +51,7 @@ Refer to the [Glossary](#glossary) for definitions of terms.
53
51
  5. The coordinator processes all the commands after the voting period ends.
54
52
 
55
53
  6. For each batch of commands, they perform the following steps:
56
-
57
54
  - Generate a new state root which is the result of:
58
-
59
55
  - For each valid command, in reverse order, update the state leaf accordingly
60
56
 
61
57
  - Ignore all invalid commands
@@ -78,7 +78,7 @@ Serialized, these will look like **macipk.0e5194a54562ea4d440ac6a0049a41d4b600e3
78
78
  After successfully [installing](/docs/quick-start#installation) MACI, you can easily generate your MACI key pair by running:
79
79
 
80
80
  ```bash
81
- pnpm run generateMaciKeyPair
81
+ pnpm run generate-maci-keypair
82
82
  ```
83
83
 
84
84
  This command will create the necessary public and private keys required for running various MACI operations.
@@ -0,0 +1,121 @@
1
+ ---
2
+ title: MACI SDK
3
+ description: How to use the MACI SDK
4
+ sidebar_label: MACI SDK
5
+ sidebar_position: 6
6
+ ---
7
+
8
+ In this guide we will be looking at how to use the MACI SDK to interact with the MACI protocol.
9
+
10
+ ## Installation
11
+
12
+ ```bash
13
+ npm install @maci-protocol/sdk
14
+ ```
15
+
16
+ ## Browser compatibility
17
+
18
+ As the SDK imports functions from the `@maci-protocol/contracts` package which uses hardhat, certain functionality is not browser compatible.
19
+ However, all it takes to use browser compatible functions is to import from `@maci-protocol/sdk/browser`.
20
+
21
+ As an example, we can import the `signUp` function from the `@maci-protocol/sdk/browser` package.
22
+
23
+ ```typescript
24
+ import { signUp } from "@maci-protocol/sdk/browser";
25
+ ```
26
+
27
+ Let's take a look at an example of how to use the `joinPoll` function to register a user to a poll.
28
+
29
+ ### JoinPoll
30
+
31
+ This step is required to register a user to a specific poll for which they want to vote. In short, it requires the user to generate a zk-SNARK proof that they know the private key to a public key registered to the MACI contract (proving they passed the initial gatekeeping requirements). This forces them to join with the same MACI key to each poll, greatly increasing the value of the key. Should they have been allowed to join with a throwaway key, they could simply sell their key for polls they do not care about.
32
+
33
+ **How does the flow look like?**
34
+
35
+ 1. Reconstruct the MACI state tree by pulling all public keys from the MACI contract (events from RPC or from Subgraph)
36
+ 2. Generate a merkle tree inclusion proof for the user's public key
37
+ 3. Generate a zk-SNARK proof that the user knows the private key to the public key in the merkle tree inclusion proof
38
+ 4. Call the `joinPoll` function on the Poll smart contract
39
+
40
+ **How to use the SDK for this?**
41
+
42
+ > This example is browser specific, as it uses the `@maci-protocol/sdk/browser` package and WASM for witness generation
43
+
44
+ Option 1: Use the `joinPoll` function from the `@maci-protocol/sdk/browser` package.
45
+
46
+ 1. Download the `pollJoining` zk artifacts using [downloadPollJoiningArtifactsBrowser](https://github.com/privacy-scaling-explorations/maci/blob/dev/packages/sdk/ts/proof/download.ts#L46)
47
+
48
+ ```typescript
49
+ import { downloadPollJoiningArtifactsBrowser } from "@maci-protocol/sdk/browser";
50
+
51
+ const artifacts = await downloadPollJoiningArtifactsBrowser({
52
+ testing: true,
53
+ stateTreeDepth: 10,
54
+ });
55
+ ```
56
+
57
+ 2. Use the `joinPoll` function to join the poll
58
+
59
+ ```typescript
60
+ import { joinPoll } from "@maci-protocol/sdk/browser";
61
+
62
+ const joinedPollData = await joinPoll({
63
+ maciAddress: PUBLIC_MACI_ADDRESS,
64
+ privateKey: maciKeypair.privateKey.serialize(),
65
+ signer,
66
+ pollId,
67
+ inclusionProof,
68
+ pollJoiningZkey: artifacts.zKey as unknown as string,
69
+ pollWasm: artifacts.wasm as unknown as string,
70
+ sgDataArg: DEFAULT_SG_DATA,
71
+ ivcpDataArg: DEFAULT_IVCP_DATA,
72
+ blocksPerBatch: 1000,
73
+ });
74
+ ```
75
+
76
+ This is not really efficient, as we are using the user RPC to fetch events, which can be quite slow and prone to errors. A better approach is to use a Subgraph to fetch the events.
77
+
78
+ Option 2: Fetch the MACI keys using a subgraph and reconstruct the state tree locally.
79
+
80
+ 1. Deploy the subgraph - instructions [here](/guides/subgraph)
81
+ 2. Fetch the MACI keys
82
+
83
+ ```typescript
84
+ import { MaciSubgraph } from "@maci-protocol/sdk/browser";
85
+
86
+ const subgraph = new MaciSubgraph("https://api.studio.thegraph.com/query/x/maci/version/latest");
87
+
88
+ const keys = await subgraph.getKeys();
89
+ ```
90
+
91
+ 3. Generate the merkle tree
92
+
93
+ ```typescript
94
+ import { generateSignUpTreeFromKeys } from "@maci-protocol/sdk/browser";
95
+
96
+ const signUpTree = generateSignUpTreeFromKeys(keys);
97
+ ```
98
+
99
+ 4. Generate the inclusion proof - you will need to know the index of the user's public key in the merkle tree
100
+
101
+ ```typescript
102
+ const inclusionProof = signUpTree.generateProof(publicKeyIndex);
103
+ ```
104
+
105
+ 5. Generate the zk-SNARK proof and join the poll
106
+
107
+ ```typescript
108
+ import { joinPoll } from "@maci-protocol/sdk/browser";
109
+
110
+ const joinedPollData = await joinPoll({
111
+ maciAddress: PUBLIC_MACI_ADDRESS,
112
+ privateKey: maciKeypair.privateKey.serialize(),
113
+ signer,
114
+ pollId,
115
+ inclusionProof,
116
+ pollJoiningZkey: artifacts.zKey as unknown as string,
117
+ pollWasm: artifacts.wasm as unknown as string,
118
+ sgDataArg: DEFAULT_SG_DATA,
119
+ ivcpDataArg: DEFAULT_IVCP_DATA,
120
+ });
121
+ ```
@@ -53,6 +53,32 @@ To run Contracts only tests, run:
53
53
  pnpm run test
54
54
  ```
55
55
 
56
+ To run e2e tests for hardhat tasks for `contracts` using the in-memory hardhat network:
57
+
58
+ ```bash
59
+ pnpm run test:hardhat
60
+ ```
61
+
62
+ You can update the `deploy-config.json` file to change policies or other deployment settings used by the test.
63
+
64
+ You can enhance test reporting and gas cost estimation by adding the following variables to your `.env` file:
65
+
66
+ ```bash
67
+ # CoinMarkerCap api key for prices (gas reporter)
68
+ COINMARKETCAP_API_KEY=
69
+ # Gas price for gas reporter
70
+ # Allows you to manually specify the gas price (e.g. 3 gwei)
71
+ GAS_REPORTER_PRICE=
72
+ ```
73
+
74
+ These variables are used by `hardhat-gas-reporter` to show cost estimates for gas usage in the test reports.
75
+
76
+ If you would like to run these E2E tests against a different [supported networks](/docs/supported-networks/), you can override the network like this:
77
+
78
+ ```bash
79
+ pnpm exec hardhat test --network {NETWORK} ./tests/e2e/hardhatTasks.test.ts
80
+ ```
81
+
56
82
  ### Circuits
57
83
 
58
84
  To test the circuits, from the main `maci/` directory, run:
@@ -159,3 +159,48 @@ Error: The verifier contract found the proof invalid.
159
159
  ### The on-chain verification of total spent voice credits failed
160
160
 
161
161
  If you ran the `verify` command and got this error, please ensure consistency in your use of quadratic voting throughout interactions with MACI, including poll deployment, proof generation, and verification.
162
+
163
+ ### Proof generation process is killed
164
+
165
+ If your terminal output ends like this:
166
+
167
+ ```
168
+ [i] Starting to fetch logs from block 8386826
169
+ [i] Generating proofs of message processing...
170
+ [i] Progress: 1 / 1
171
+ [i] Wait until proof generation is finished
172
+ Killed
173
+ ELIFECYCLE  Command failed with exit code 137.
174
+ ```
175
+
176
+ This typically indicates the proof generation process was terminated due to exceeding the system's available memory limit (exit code `137` = SIGKILL by the OS, often due to OOM).
177
+
178
+ Increase Node.js' memory allocation by setting the `NODE_OPTIONS` environment variable before running the command:
179
+
180
+ ```bash
181
+ export NODE_OPTIONS="--max-old-space-size=4096"
182
+ # You can increase the value further (e.g., 8192 for 8GB) if your system has enough RAM:
183
+ export NODE_OPTIONS="--max-old-space-size=8192"
184
+ ```
185
+
186
+ ### Error: Not enough or too many values for input signals
187
+
188
+ If you see errors like:
189
+
190
+ ```
191
+ Error: Not enough values for input signal currentVoteWeightsPathElements
192
+ at /home/maci/node_modules/.pnpm/circom_runtime@0.1.28/node_modules/circom_runtime/build/main.cjs:513:27
193
+ ...
194
+ ```
195
+
196
+ ```
197
+ Error: Too many values for input signal ballots
198
+ at /home/maci/node_modules/.pnpm/circom_runtime@0.1.28/node_modules/circom_runtime/build/main.cjs:513:27
199
+ ...
200
+ ```
201
+
202
+ This usually happens when the Merkle tree depth configured in your MACI deployment does not match the depth expected by the zkey files used during proof generation.
203
+ To solve this:
204
+
205
+ - Download the correct zkey files from a trusted source.
206
+ - Verify that the `stateTreeDepth`, `messageTreeDepth`, and `voteOptionTreeDepth` used in your CLI or config match the values used to generate those zkey files.
@@ -73,7 +73,7 @@ Currently, the ceremony artifacts work with MACI version up to 2.x
73
73
  In order to run MACI polls, a coordinator is required to publish their MACI public key. You will need to generate a MACI keypair, and treat the private key just as your ethereum private keys. Please store them in a safe place as you won't be able to finish a round if you lose access, or if compromised a bad actor could decrypt the vote and publish them online. You can generate a new key pair using maci-cli by running the following command in the root of the project:
74
74
 
75
75
  ```bash
76
- pnpm run generateMaciKeyPair
76
+ pnpm run generate-maci-keypair
77
77
  ```
78
78
 
79
79
  ### Set the .env
@@ -219,7 +219,7 @@ pnpm run prove:[network] --poll [poll-id] \
219
219
  ```
220
220
 
221
221
  :::info
222
- The `--coordinator-private-key` is the one you generated earlier with `pnpm run generateMaciKeyPair`.
222
+ The `--coordinator-private-key` is the one you generated earlier with `pnpm run generate-maci-keypair`.
223
223
 
224
224
  `--start-block` is the block number from which to start looking for events from. You can use the block that you deployed the contracts in.
225
225
 
@@ -0,0 +1,725 @@
1
+ ---
2
+ title: MACI Deployment and Operation Costs
3
+ description: MACI Deployment and Operation Costs
4
+ sidebar_label: MACI Deployment and Operation Costs
5
+ sidebar_position: 3
6
+ ---
7
+
8
+ ## Notes
9
+
10
+ - Prices are estimates and will vary based on actual gas prices and ETH/USD exchange rates.
11
+ - These values assume a consistent gas price across operations, which may vary on-chain.
12
+
13
+ ## Costs on Polygon zkEVM
14
+
15
+ Below are the estimated costs for various MACI operations and deployments, assuming:
16
+
17
+ - **Gas price**: 0.012 gwei
18
+ - **ETH price**: $2595
19
+
20
+ <details>
21
+ <summary>Contract calls cost</summary>
22
+
23
+ | Contract | Method | Min | Max | Avg | USD (avg) |
24
+ | ---------------------------------------- | -------------------------- | ------- | ------- | ------- | --------- |
25
+ | AnonAadhaarCheckerFactory | deploy | - | - | 125971 | 0.00402 |
26
+ | AnonAadhaarPolicy | enforce | - | - | 38141 | 0.00122 |
27
+ | AnonAadhaarPolicy | setTarget | 50133 | 50167 | 50149 | 0.0016 |
28
+ | AnonAadhaarPolicyFactory | deploy | - | - | 129387 | 0.00413 |
29
+ | ConstantInitialVoiceCreditProxyFactory | deploy | - | - | 118665 | 0.00379 |
30
+ | EASCheckerFactory | deploy | - | - | 155556 | 0.00497 |
31
+ | EASPolicyFactory | deploy | - | - | 129387 | 0.00413 |
32
+ | ERC20CheckerFactory | deploy | - | - | 125959 | 0.00402 |
33
+ | ERC20PolicyFactory | deploy | - | - | 129365 | 0.00413 |
34
+ | ERC20VotesCheckerFactory | deploy | - | - | 154673 | 0.00494 |
35
+ | ERC20VotesInitialVoiceCreditProxyFactory | deploy | - | - | 176590 | 0.00564 |
36
+ | ERC20VotesPolicyFactory | deploy | - | - | 129365 | 0.00413 |
37
+ | FreeForAllCheckerFactory | deploy | - | - | 89376 | 0.00286 |
38
+ | FreeForAllPolicyFactory | deploy | 129375 | 129387 | 129386 | 0.00413 |
39
+ | GitcoinPassportCheckerFactory | deploy | - | - | 125937 | 0.00402 |
40
+ | GitcoinPassportPolicyFactory | deploy | - | - | 129365 | 0.00413 |
41
+ | HatsCheckerFactory | deploy | - | - | 169023 | 0.0054 |
42
+ | HatsPolicyFactory | deploy | - | - | 129387 | 0.00413 |
43
+ | MACI | deployPoll | 1580765 | 1583829 | 1581626 | 0.05052 |
44
+ | MACI | signUp | 197667 | 730480 | 315320 | 0.01007 |
45
+ | MerkleProofCheckerFactory | deploy | - | - | 119047 | 0.0038 |
46
+ | MerkleProofPolicyFactory | deploy | - | - | 129387 | 0.00413 |
47
+ | MessageProcessor | processMessages | 252019 | 252918 | 252319 | 0.00806 |
48
+ | Poll | joinPoll | 282314 | 503970 | 334837 | 0.0107 |
49
+ | Poll | mergeState | 198686 | 354005 | 255089 | 0.00815 |
50
+ | Poll | padLastBatch | - | - | 81884 | 0.00262 |
51
+ | Poll | publishMessage | - | - | 358725 | 0.01146 |
52
+ | Poll | publishMessageBatch | - | - | 671490 | 0.02145 |
53
+ | Poll | relayMessagesBatch | - | - | 155235 | 0.00496 |
54
+ | PollFactory | deploy | - | - | 1099100 | 0.03511 |
55
+ | SemaphoreCheckerFactory | deploy | - | - | 106047 | 0.00339 |
56
+ | SemaphorePolicyFactory | deploy | - | - | 129387 | 0.00413 |
57
+ | Tally | addTallyResults | 7311562 | 7844012 | 7577787 | 0.24207 |
58
+ | Tally | tallyVotes | 147262 | 204522 | 161585 | 0.00516 |
59
+ | TokenCheckerFactory | deploy | - | - | 97197 | 0.0031 |
60
+ | TokenPolicyFactory | deploy | - | - | 129387 | 0.00413 |
61
+ | VerifyingKeysRegistry | setPollJoinedVerifyingKey | - | - | 453033 | 0.01447 |
62
+ | VerifyingKeysRegistry | setPollJoiningVerifyingKey | - | - | 453011 | 0.01447 |
63
+ | VerifyingKeysRegistry | setVerifyingKeys | 885514 | 885526 | 885517 | 0.02829 |
64
+ | VerifyingKeysRegistry | setVerifyingKeysBatch | - | - | 1787720 | 0.05711 |
65
+ | ZupassCheckerFactory | deploy | - | - | 206318 | 0.00659 |
66
+ | ZupassPolicyFactory | deploy | - | - | 129365 | 0.00413 |
67
+
68
+ </details>
69
+
70
+ <details>
71
+ <summary>Deployment cost</summary>
72
+
73
+ | Deployments | Min Gas | Max Gas | Avg Gas | % of Limit | USD (avg) |
74
+ | ---------------------------------------- | ------- | ------- | ------- | ---------- | --------- |
75
+ | AnonAadhaarCheckerFactory | - | - | 567621 | 1.9% | 0.01813 |
76
+ | AnonAadhaarPolicyFactory | - | - | 759390 | 2.5% | 0.02426 |
77
+ | ConstantInitialVoiceCreditProxyFactory | - | - | 379812 | 1.3% | 0.01213 |
78
+ | EASCheckerFactory | - | - | 623304 | 2.1% | 0.01991 |
79
+ | EASPolicyFactory | - | - | 690560 | 2.3% | 0.02206 |
80
+ | ERC20CheckerFactory | - | - | 446429 | 1.5% | 0.01426 |
81
+ | ERC20PolicyFactory | - | - | 684892 | 2.3% | 0.02188 |
82
+ | ERC20VotesCheckerFactory | - | - | 464123 | 1.5% | 0.01483 |
83
+ | ERC20VotesInitialVoiceCreditProxyFactory | - | - | 482127 | 1.6% | 0.01540 |
84
+ | ERC20VotesPolicyFactory | - | - | 685960 | 2.3% | 0.02191 |
85
+ | FreeForAllCheckerFactory | - | - | 329927 | 1.1% | 0.01054 |
86
+ | FreeForAllPolicyFactory | - | - | 653501 | 2.2% | 0.02088 |
87
+ | GitcoinPassportCheckerFactory | - | - | 463912 | 1.5% | 0.01482 |
88
+ | GitcoinPassportPolicyFactory | - | - | 687052 | 2.3% | 0.02195 |
89
+ | Hasher | - | - | 426472 | 1.4% | 0.01362 |
90
+ | HatsCheckerFactory | - | - | 572538 | 1.9% | 0.01829 |
91
+ | HatsPolicyFactory | - | - | 684664 | 2.3% | 0.02187 |
92
+ | MACI | 1803354 | 1803438 | 1803408 | 6.0% | 0.05761 |
93
+ | MerkleProofCheckerFactory | - | - | 491985 | 1.6% | 0.01572 |
94
+ | MerkleProofPolicyFactory | - | - | 686188 | 2.3% | 0.02192 |
95
+ | MessageProcessorFactory | 1818377 | 1818401 | 1818398 | 6.1% | 0.05809 |
96
+ | PollFactory | 3720635 | 3720683 | 3720678 | 12.4% | 0.11885 |
97
+ | PoseidonT3 | - | - | 2157126 | 7.2% | 0.06891 |
98
+ | PoseidonT4 | - | - | 2745274 | 9.2% | 0.0877 |
99
+ | PoseidonT5 | - | - | 3569887 | 11.9% | 0.11404 |
100
+ | PoseidonT6 | - | - | 4261625 | 14.2% | 0.13613 |
101
+ | SemaphoreCheckerFactory | - | - | 557606 | 1.9% | 0.01781 |
102
+ | SemaphorePolicyFactory | - | - | 749517 | 2.5% | 0.02394 |
103
+ | TallyFactory | 2176647 | 2176671 | 2176668 | 7.3% | 0.06953 |
104
+ | TokenCheckerFactory | - | - | 435769 | 1.5% | 0.01392 |
105
+ | TokenPolicyFactory | - | - | 690920 | 2.3% | 0.02207 |
106
+ | Utilities | - | - | 664356 | 2.2% | 0.02122 |
107
+ | Verifier | - | - | 775226 | 2.6% | 0.02476 |
108
+ | VerifyingKeysRegistry | - | - | 1755862 | 5.9% | 0.05609 |
109
+ | ZupassCheckerFactory | - | - | 640425 | 2.1% | 0.02046 |
110
+ | ZupassGroth16Verifier | - | - | 1108706 | 3.7% | 0.03542 |
111
+ | ZupassPolicyFactory | - | - | 785744 | 2.6% | 0.0251 |
112
+
113
+ </details>
114
+
115
+ ## Costs on Scroll
116
+
117
+ Below are the estimated costs for various MACI operations and deployments, assuming:
118
+
119
+ - **Gas price**: 0.016 gwei
120
+ - **ETH price**: $2493
121
+
122
+ <details>
123
+ <summary>Contract calls cost</summary>
124
+
125
+ | Contract | Method | Min | Max | Avg | USD (avg) |
126
+ | ---------------------------------------- | -------------------------- | ------- | ------- | ------- | --------- |
127
+ | AnonAadhaarCheckerFactory | deploy | - | - | 125971 | 0.00496 |
128
+ | AnonAadhaarPolicy | enforce | - | - | 38141 | 0.0016 |
129
+ | AnonAadhaarPolicy | setTarget | 50133 | 50167 | 50149 | 0.00208 |
130
+ | AnonAadhaarPolicyFactory | deploy | - | - | 129387 | 0.00512 |
131
+ | ConstantInitialVoiceCreditProxyFactory | deploy | - | - | 118665 | 0.0048 |
132
+ | EASCheckerFactory | deploy | - | - | 155556 | 0.00624 |
133
+ | EASPolicyFactory | deploy | - | - | 129387 | 0.00512 |
134
+ | ERC20CheckerFactory | deploy | - | - | 125959 | 0.00496 |
135
+ | ERC20PolicyFactory | deploy | - | - | 129365 | 0.00512 |
136
+ | ERC20VotesCheckerFactory | deploy | - | - | 154673 | 0.00624 |
137
+ | ERC20VotesInitialVoiceCreditProxyFactory | deploy | - | - | 176590 | 0.00704 |
138
+ | ERC20VotesPolicyFactory | deploy | - | - | 129365 | 0.00512 |
139
+ | FreeForAllCheckerFactory | deploy | - | - | 89376 | 0.00352 |
140
+ | FreeForAllPolicyFactory | deploy | 129375 | 129387 | 129386 | 0.00512 |
141
+ | GitcoinPassportCheckerFactory | deploy | - | - | 125937 | 0.00496 |
142
+ | GitcoinPassportPolicyFactory | deploy | - | - | 129365 | 0.00512 |
143
+ | HatsCheckerFactory | deploy | - | - | 169023 | 0.00672 |
144
+ | HatsPolicyFactory | deploy | - | - | 129387 | 0.00512 |
145
+ | MACI | deployPoll | 1580765 | 1583829 | 1581630 | 0.06304 |
146
+ | MACI | signUp | 197667 | 730492 | 315320 | 0.01264 |
147
+ | MerkleProofCheckerFactory | deploy | - | - | 119047 | 0.0048 |
148
+ | MerkleProofPolicyFactory | deploy | - | - | 129387 | 0.00512 |
149
+ | MessageProcessor | processMessages | 252007 | 252918 | 252317 | 0.01008 |
150
+ | Poll | joinPoll | 282314 | 503970 | 334835 | 0.01328 |
151
+ | Poll | mergeState | 198686 | 354005 | 255089 | 0.01024 |
152
+ | Poll | padLastBatch | - | - | 81884 | 0.0032 |
153
+ | Poll | publishMessage | - | - | 358725 | 0.01424 |
154
+ | Poll | publishMessageBatch | - | - | 671502 | 0.02672 |
155
+ | Poll | relayMessagesBatch | - | - | 155235 | 0.00624 |
156
+ | PollFactory | deploy | - | - | 1099088 | 0.04384 |
157
+ | SemaphoreCheckerFactory | deploy | - | - | 106047 | 0.00416 |
158
+ | SemaphorePolicyFactory | deploy | - | - | 129387 | 0.00512 |
159
+ | Tally | addTallyResults | 7311562 | 7844012 | 7577787 | 0.30224 |
160
+ | Tally | tallyVotes | 147262 | 204522 | 161585 | 0.0064 |
161
+ | TokenCheckerFactory | deploy | - | - | 97197 | 0.00384 |
162
+ | TokenPolicyFactory | deploy | - | - | 129387 | 0.00512 |
163
+ | VerifyingKeysRegistry | setPollJoinedVerifyingKey | - | - | 453033 | 0.01808 |
164
+ | VerifyingKeysRegistry | setPollJoiningVerifyingKey | - | - | 453011 | 0.01808 |
165
+ | VerifyingKeysRegistry | setVerifyingKeys | 885514 | 885526 | 885517 | 0.03536 |
166
+ | VerifyingKeysRegistry | setVerifyingKeysBatch | - | - | 1787720 | 0.07136 |
167
+ | ZupassCheckerFactory | deploy | - | - | 206318 | 0.00816 |
168
+ | ZupassPolicyFactory | deploy | - | - | 129365 | 0.00512 |
169
+
170
+ </details>
171
+
172
+ <details>
173
+ <summary>Deployment cost</summary>
174
+
175
+ | Deployments | Min Gas | Max Gas | Avg Gas | % of Block Limit | USD (avg) |
176
+ | ---------------------------------------- | ------- | ------- | ------- | ---------------- | --------- |
177
+ | AnonAadhaarCheckerFactory | - | - | 567621 | 1.9 % | 0.02272 |
178
+ | AnonAadhaarPolicyFactory | - | - | 759390 | 2.5 % | 0.03024 |
179
+ | ConstantInitialVoiceCreditProxyFactory | - | - | 379812 | 1.3 % | 0.0152 |
180
+ | EASCheckerFactory | - | - | 623304 | 2.1 % | 0.0248 |
181
+ | EASPolicyFactory | - | - | 690560 | 2.3 % | 0.02752 |
182
+ | ERC20CheckerFactory | - | - | 446429 | 1.5 % | 0.01776 |
183
+ | ERC20PolicyFactory | - | - | 684892 | 2.3 % | 0.02736 |
184
+ | ERC20VotesCheckerFactory | - | - | 464123 | 1.5 % | 0.01856 |
185
+ | ERC20VotesInitialVoiceCreditProxyFactory | - | - | 482127 | 1.6 % | 0.0192 |
186
+ | ERC20VotesPolicyFactory | - | - | 685960 | 2.3 % | 0.02736 |
187
+ | FreeForAllCheckerFactory | - | - | 329927 | 1.1 % | 0.01312 |
188
+ | FreeForAllPolicyFactory | - | - | 653501 | 2.2 % | 0.02608 |
189
+ | GitcoinPassportCheckerFactory | - | - | 463912 | 1.5 % | 0.01856 |
190
+ | GitcoinPassportPolicyFactory | - | - | 687052 | 2.3 % | 0.02736 |
191
+ | Hasher | - | - | 426472 | 1.4 % | 0.01696 |
192
+ | HatsCheckerFactory | - | - | 572538 | 1.9 % | 0.02288 |
193
+ | HatsPolicyFactory | - | - | 684664 | 2.3 % | 0.02736 |
194
+ | MACI | 1803354 | 1803438 | 1803408 | 6.0 % | 0.072 |
195
+ | MerkleProofCheckerFactory | - | - | 491985 | 1.6 % | 0.01968 |
196
+ | MerkleProofPolicyFactory | - | - | 686188 | 2.3 % | 0.02736 |
197
+ | MessageProcessorFactory | 1818377 | 1818401 | 1818398 | 6.1 % | 0.07248 |
198
+ | PollFactory | 3720635 | 3720683 | 3720678 | 12.4 % | 0.14848 |
199
+ | PoseidonT3 | - | - | 2157126 | 7.2 % | 0.08608 |
200
+ | PoseidonT4 | - | - | 2745274 | 9.2 % | 0.1096 |
201
+ | PoseidonT5 | - | - | 3569887 | 11.9 % | 0.1424 |
202
+ | PoseidonT6 | - | - | 4261625 | 14.2 % | 0.17008 |
203
+ | SemaphoreCheckerFactory | - | - | 557606 | 1.9 % | 0.02224 |
204
+ | SemaphorePolicyFactory | - | - | 749517 | 2.5 % | 0.02992 |
205
+ | TallyFactory | 2176647 | 2176671 | 2176668 | 7.3 % | 0.08688 |
206
+ | TokenCheckerFactory | - | - | 435769 | 1.5 % | 0.01744 |
207
+ | TokenPolicyFactory | - | - | 690920 | 2.3 % | 0.02752 |
208
+ | Utilities | - | - | 664356 | 2.2 % | 0.02656 |
209
+ | Verifier | - | - | 775226 | 2.6 % | 0.03088 |
210
+ | VerifyingKeysRegistry | - | - | 1755862 | 5.9 % | 0.07008 |
211
+ | ZupassCheckerFactory | - | - | 640425 | 2.1 % | 0.0256 |
212
+ | ZupassGroth16Verifier | - | - | 1108706 | 3.7 % | 0.04416 |
213
+ | ZupassPolicyFactory | - | - | 785744 | 2.6 % | 0.03136 |
214
+
215
+ </details>
216
+
217
+ ## Costs on Linea
218
+
219
+ Below are the estimated costs for various MACI operations and deployments, assuming:
220
+
221
+ - **Gas price**: 0.04 gwei
222
+ - **ETH price**: $2508
223
+
224
+ <details>
225
+ <summary>Contract calls cost</summary>
226
+
227
+ | Contract | Method | Min | Max | Avg | USD (avg) |
228
+ | ---------------------------------------- | -------------------------- | ------- | ------- | ------- | --------- |
229
+ | AnonAadhaarCheckerFactory | deploy | - | - | 125971 | 0.0126 |
230
+ | AnonAadhaarPolicy | enforce | - | - | 38141 | 0.0038 |
231
+ | AnonAadhaarPolicy | setTarget | 50133 | 50167 | 50149 | 0.005 |
232
+ | AnonAadhaarPolicyFactory | deploy | - | - | 129387 | 0.013 |
233
+ | ConstantInitialVoiceCreditProxyFactory | deploy | - | - | 118665 | 0.0119 |
234
+ | EASCheckerFactory | deploy | - | - | 155556 | 0.0156 |
235
+ | EASPolicyFactory | deploy | - | - | 129387 | 0.013 |
236
+ | ERC20CheckerFactory | deploy | - | - | 125959 | 0.0126 |
237
+ | ERC20PolicyFactory | deploy | - | - | 129365 | 0.013 |
238
+ | ERC20VotesCheckerFactory | deploy | - | - | 154673 | 0.0155 |
239
+ | ERC20VotesInitialVoiceCreditProxyFactory | deploy | - | - | 176590 | 0.0177 |
240
+ | ERC20VotesPolicyFactory | deploy | - | - | 129365 | 0.013 |
241
+ | FreeForAllCheckerFactory | deploy | - | - | 89376 | 0.009 |
242
+ | FreeForAllPolicyFactory | deploy | 129375 | 129387 | 129386 | 0.013 |
243
+ | GitcoinPassportCheckerFactory | deploy | - | - | 125937 | 0.0126 |
244
+ | GitcoinPassportPolicyFactory | deploy | - | - | 129365 | 0.013 |
245
+ | HatsCheckerFactory | deploy | - | - | 169023 | 0.017 |
246
+ | HatsPolicyFactory | deploy | - | - | 129387 | 0.013 |
247
+ | MACI | deployPoll | 1580765 | 1583829 | 1581626 | 0.1587 |
248
+ | MACI | signUp | 197667 | 730504 | 315320 | 0.0316 |
249
+ | MerkleProofCheckerFactory | deploy | - | - | 119047 | 0.0119 |
250
+ | MerkleProofPolicyFactory | deploy | - | - | 129387 | 0.013 |
251
+ | MessageProcessor | processMessages | 252019 | 252918 | 252319 | 0.0253 |
252
+ | Poll | joinPoll | 282314 | 503970 | 334838 | 0.0336 |
253
+ | Poll | mergeState | 198686 | 354005 | 255089 | 0.0256 |
254
+ | Poll | padLastBatch | - | - | 81884 | 0.0082 |
255
+ | Poll | publishMessage | - | - | 358737 | 0.0360 |
256
+ | Poll | publishMessageBatch | - | - | 671538 | 0.0674 |
257
+ | Poll | relayMessagesBatch | - | - | 155223 | 0.0156 |
258
+ | PollFactory | deploy | - | - | 1099100 | 0.1103 |
259
+ | SemaphoreCheckerFactory | deploy | - | - | 106047 | 0.0106 |
260
+ | SemaphorePolicyFactory | deploy | - | - | 129387 | 0.013 |
261
+ | Tally | addTallyResults | 7311562 | 7844012 | 7577787 | 0.7604 |
262
+ | Tally | tallyVotes | 147262 | 204522 | 161584 | 0.0162 |
263
+ | TokenCheckerFactory | deploy | - | - | 97197 | 0.0098 |
264
+ | TokenPolicyFactory | deploy | - | - | 129387 | 0.013 |
265
+ | VerifyingKeysRegistry | setPollJoinedVerifyingKey | - | - | 453033 | 0.0455 |
266
+ | VerifyingKeysRegistry | setPollJoiningVerifyingKey | - | - | 453011 | 0.0455 |
267
+ | VerifyingKeysRegistry | setVerifyingKeys | 885514 | 885526 | 885517 | 0.0889 |
268
+ | VerifyingKeysRegistry | setVerifyingKeysBatch | - | - | 1787720 | 0.1794 |
269
+ | ZupassCheckerFactory | deploy | - | - | 206318 | 0.0207 |
270
+ | ZupassPolicyFactory | deploy | - | - | 129365 | 0.013 |
271
+
272
+ </details>
273
+
274
+ <details>
275
+ <summary>Deployment cost</summary>
276
+
277
+ | Deployments | Min Gas | Max Gas | Avg Gas | % of Block Limit | USD (avg) |
278
+ | ---------------------------------------- | ------- | ------- | ------- | ---------------- | --------- |
279
+ | AnonAadhaarCheckerFactory | - | - | 567621 | 1.9 % | 0.057 |
280
+ | AnonAadhaarPolicyFactory | - | - | 759390 | 2.5 % | 0.0762 |
281
+ | ConstantInitialVoiceCreditProxyFactory | - | - | 379812 | 1.3 % | 0.0381 |
282
+ | EASCheckerFactory | - | - | 623304 | 2.1 % | 0.0625 |
283
+ | EASPolicyFactory | - | - | 690560 | 2.3 % | 0.0693 |
284
+ | ERC20CheckerFactory | - | - | 446429 | 1.5 % | 0.0448 |
285
+ | ERC20PolicyFactory | - | - | 684892 | 2.3 % | 0.0687 |
286
+ | ERC20VotesCheckerFactory | - | - | 464123 | 1.5 % | 0.0466 |
287
+ | ERC20VotesInitialVoiceCreditProxyFactory | - | - | 482127 | 1.6 % | 0.0484 |
288
+ | ERC20VotesPolicyFactory | - | - | 685960 | 2.3 % | 0.0688 |
289
+ | FreeForAllCheckerFactory | - | - | 329927 | 1.1 % | 0.0331 |
290
+ | FreeForAllPolicyFactory | - | - | 653501 | 2.2 % | 0.0656 |
291
+ | GitcoinPassportCheckerFactory | - | - | 463912 | 1.5 % | 0.0466 |
292
+ | GitcoinPassportPolicyFactory | - | - | 687052 | 2.3 % | 0.0689 |
293
+ | Hasher | - | - | 426472 | 1.4 % | 0.0428 |
294
+ | HatsCheckerFactory | - | - | 572538 | 1.9 % | 0.0575 |
295
+ | HatsPolicyFactory | - | - | 684664 | 2.3 % | 0.0687 |
296
+ | MACI | 1803354 | 1803438 | 1803408 | 6.0 % | 0.181 |
297
+ | MerkleProofCheckerFactory | - | - | 491985 | 1.6 % | 0.0494 |
298
+ | MerkleProofPolicyFactory | - | - | 686188 | 2.3 % | 0.0689 |
299
+ | MessageProcessorFactory | 1818377 | 1818401 | 1818398 | 6.1 % | 0.1825 |
300
+ | PollFactory | 3720635 | 3720683 | 3720678 | 12.4 % | 0.3734 |
301
+ | PoseidonT3 | - | - | 2157126 | 7.2 % | 0.2165 |
302
+ | PoseidonT4 | - | - | 2745274 | 9.2 % | 0.2755 |
303
+ | PoseidonT5 | - | - | 3569887 | 11.9 % | 0.3582 |
304
+ | PoseidonT6 | - | - | 4261625 | 14.2 % | 0.4277 |
305
+ | SemaphoreCheckerFactory | - | - | 557606 | 1.9 % | 0.0560 |
306
+ | SemaphorePolicyFactory | - | - | 749517 | 2.5 % | 0.0752 |
307
+ | TallyFactory | 2176647 | 2176671 | 2176668 | 7.3 % | 0.2184 |
308
+ | TokenCheckerFactory | - | - | 435769 | 1.5 % | 0.0437 |
309
+ | TokenPolicyFactory | - | - | 690920 | 2.3 % | 0.0693 |
310
+ | Utilities | - | - | 664356 | 2.2 % | 0.0667 |
311
+ | Verifier | - | - | 775226 | 2.6 % | 0.0778 |
312
+ | VerifyingKeysRegistry | - | - | 1755862 | 5.9 % | 0.1762 |
313
+ | ZupassCheckerFactory | - | - | 640425 | 2.1 % | 0.0643 |
314
+ | ZupassGroth16Verifier | - | - | 1108706 | 3.7 % | 0.1113 |
315
+ | ZupassPolicyFactory | - | - | 785744 | 2.6 % | 0.0788 |
316
+
317
+ </details>
318
+
319
+ ## Costs on ZkSync Era
320
+
321
+ Below are the estimated costs for various MACI operations and deployments, assuming:
322
+
323
+ - **Gas price**: 0.04 gwei
324
+ - **ETH price**: $2508
325
+
326
+ <details>
327
+ <summary>Contract calls cost</summary>
328
+
329
+ | Contract | Method | Min | Max | Avg | USD (avg) |
330
+ | ---------------------------------------- | -------------------------- | ------- | ------- | ------- | --------- |
331
+ | AnonAadhaarCheckerFactory | deploy | - | - | 125971 | 0.0126 |
332
+ | AnonAadhaarPolicy | enforce | - | - | 38141 | 0.0038 |
333
+ | AnonAadhaarPolicy | setTarget | 50133 | 50167 | 50149 | 0.005 |
334
+ | AnonAadhaarPolicyFactory | deploy | - | - | 129387 | 0.013 |
335
+ | ConstantInitialVoiceCreditProxyFactory | deploy | - | - | 118665 | 0.0119 |
336
+ | EASCheckerFactory | deploy | - | - | 155556 | 0.0156 |
337
+ | EASPolicyFactory | deploy | - | - | 129387 | 0.013 |
338
+ | ERC20CheckerFactory | deploy | - | - | 125959 | 0.0126 |
339
+ | ERC20PolicyFactory | deploy | - | - | 129365 | 0.013 |
340
+ | ERC20VotesCheckerFactory | deploy | - | - | 154673 | 0.0155 |
341
+ | ERC20VotesInitialVoiceCreditProxyFactory | deploy | - | - | 176590 | 0.0177 |
342
+ | ERC20VotesPolicyFactory | deploy | - | - | 129365 | 0.013 |
343
+ | FreeForAllCheckerFactory | deploy | - | - | 89376 | 0.009 |
344
+ | FreeForAllPolicyFactory | deploy | 129375 | 129387 | 129386 | 0.013 |
345
+ | GitcoinPassportCheckerFactory | deploy | - | - | 125937 | 0.0126 |
346
+ | GitcoinPassportPolicyFactory | deploy | - | - | 129365 | 0.013 |
347
+ | HatsCheckerFactory | deploy | - | - | 169023 | 0.017 |
348
+ | HatsPolicyFactory | deploy | - | - | 129387 | 0.013 |
349
+ | MACI | deployPoll | 1580765 | 1583829 | 1581626 | 0.1587 |
350
+ | MACI | signUp | 197667 | 730504 | 315320 | 0.0316 |
351
+ | MerkleProofCheckerFactory | deploy | - | - | 119047 | 0.0119 |
352
+ | MerkleProofPolicyFactory | deploy | - | - | 129387 | 0.013 |
353
+ | MessageProcessor | processMessages | 252019 | 252918 | 252319 | 0.0253 |
354
+ | Poll | joinPoll | 282314 | 503970 | 334838 | 0.0336 |
355
+ | Poll | mergeState | 198686 | 354005 | 255089 | 0.0256 |
356
+ | Poll | padLastBatch | - | - | 81884 | 0.0082 |
357
+ | Poll | publishMessage | - | - | 358737 | 0.0360 |
358
+ | Poll | publishMessageBatch | - | - | 671538 | 0.0674 |
359
+ | Poll | relayMessagesBatch | - | - | 155223 | 0.0156 |
360
+ | PollFactory | deploy | - | - | 1099100 | 0.1103 |
361
+ | SemaphoreCheckerFactory | deploy | - | - | 106047 | 0.0106 |
362
+ | SemaphorePolicyFactory | deploy | - | - | 129387 | 0.013 |
363
+ | Tally | addTallyResults | 7311562 | 7844012 | 7577787 | 0.7604 |
364
+ | Tally | tallyVotes | 147262 | 204522 | 161584 | 0.0162 |
365
+ | TokenCheckerFactory | deploy | - | - | 97197 | 0.0098 |
366
+ | TokenPolicyFactory | deploy | - | - | 129387 | 0.013 |
367
+ | VerifyingKeysRegistry | setPollJoinedVerifyingKey | - | - | 453033 | 0.0455 |
368
+ | VerifyingKeysRegistry | setPollJoiningVerifyingKey | - | - | 453011 | 0.0455 |
369
+ | VerifyingKeysRegistry | setVerifyingKeys | 885514 | 885526 | 885517 | 0.0889 |
370
+ | VerifyingKeysRegistry | setVerifyingKeysBatch | - | - | 1787720 | 0.1794 |
371
+ | ZupassCheckerFactory | deploy | - | - | 206318 | 0.0207 |
372
+ | ZupassPolicyFactory | deploy | - | - | 129365 | 0.013 |
373
+
374
+ </details>
375
+
376
+ <details>
377
+ <summary>Deployment cost</summary>
378
+
379
+ | Deployments | Min Gas | Max Gas | Avg Gas | % of Block Limit | USD (avg) |
380
+ | ---------------------------------------- | ------- | ------- | ------- | ---------------- | --------- |
381
+ | AnonAadhaarCheckerFactory | - | - | 567621 | 1.9 % | 0.057 |
382
+ | AnonAadhaarPolicyFactory | - | - | 759390 | 2.5 % | 0.0762 |
383
+ | ConstantInitialVoiceCreditProxyFactory | - | - | 379812 | 1.3 % | 0.0381 |
384
+ | EASCheckerFactory | - | - | 623304 | 2.1 % | 0.0625 |
385
+ | EASPolicyFactory | - | - | 690560 | 2.3 % | 0.0693 |
386
+ | ERC20CheckerFactory | - | - | 446429 | 1.5 % | 0.0448 |
387
+ | ERC20PolicyFactory | - | - | 684892 | 2.3 % | 0.0687 |
388
+ | ERC20VotesCheckerFactory | - | - | 464123 | 1.5 % | 0.0466 |
389
+ | ERC20VotesInitialVoiceCreditProxyFactory | - | - | 482127 | 1.6 % | 0.0484 |
390
+ | ERC20VotesPolicyFactory | - | - | 685960 | 2.3 % | 0.0688 |
391
+ | FreeForAllCheckerFactory | - | - | 329927 | 1.1 % | 0.0331 |
392
+ | FreeForAllPolicyFactory | - | - | 653501 | 2.2 % | 0.0656 |
393
+ | GitcoinPassportCheckerFactory | - | - | 463912 | 1.5 % | 0.0466 |
394
+ | GitcoinPassportPolicyFactory | - | - | 687052 | 2.3 % | 0.0689 |
395
+ | Hasher | - | - | 426472 | 1.4 % | 0.0428 |
396
+ | HatsCheckerFactory | - | - | 572538 | 1.9 % | 0.0575 |
397
+ | HatsPolicyFactory | - | - | 684664 | 2.3 % | 0.0687 |
398
+ | MACI | 1803354 | 1803438 | 1803408 | 6.0 % | 0.181 |
399
+ | MerkleProofCheckerFactory | - | - | 491985 | 1.6 % | 0.0494 |
400
+ | MerkleProofPolicyFactory | - | - | 686188 | 2.3 % | 0.0689 |
401
+ | MessageProcessorFactory | 1818377 | 1818401 | 1818398 | 6.1 % | 0.1825 |
402
+ | PollFactory | 3720635 | 3720683 | 3720678 | 12.4 % | 0.3734 |
403
+ | PoseidonT3 | - | - | 2157126 | 7.2 % | 0.2165 |
404
+ | PoseidonT4 | - | - | 2745274 | 9.2 % | 0.2755 |
405
+ | PoseidonT5 | - | - | 3569887 | 11.9 % | 0.3582 |
406
+ | PoseidonT6 | - | - | 4261625 | 14.2 % | 0.4277 |
407
+ | SemaphoreCheckerFactory | - | - | 557606 | 1.9 % | 0.0560 |
408
+ | SemaphorePolicyFactory | - | - | 749517 | 2.5 % | 0.0752 |
409
+ | TallyFactory | 2176647 | 2176671 | 2176668 | 7.3 % | 0.2184 |
410
+ | TokenCheckerFactory | - | - | 435769 | 1.5 % | 0.0437 |
411
+ | TokenPolicyFactory | - | - | 690920 | 2.3 % | 0.0693 |
412
+ | Utilities | - | - | 664356 | 2.2 % | 0.0667 |
413
+ | Verifier | - | - | 775226 | 2.6 % | 0.0778 |
414
+ | VerifyingKeysRegistry | - | - | 1755862 | 5.9 % | 0.1762 |
415
+ | ZupassCheckerFactory | - | - | 640425 | 2.1 % | 0.0643 |
416
+ | ZupassGroth16Verifier | - | - | 1108706 | 3.7 % | 0.1113 |
417
+ | ZupassPolicyFactory | - | - | 785744 | 2.6 % | 0.0788 |
418
+
419
+ </details>
420
+
421
+ ## Costs on Ethereum Mainnet
422
+
423
+ Below are the estimated costs for various MACI operations and deployments, assuming:
424
+
425
+ - **Gas price**: 7 gwei
426
+ - **ETH price**: $2526
427
+
428
+ <details>
429
+ <summary>Contract calls cost</summary>
430
+
431
+ | Contract | Method | Min | Max | Avg | USD (avg) |
432
+ | ---------------------------------------- | -------------------------- | ------- | ------- | ------- | --------- |
433
+ | AnonAadhaarCheckerFactory | deploy | - | - | 125971 | 2.23 |
434
+ | AnonAadhaarPolicy | enforce | - | - | 38141 | 0.67 |
435
+ | AnonAadhaarPolicy | setTarget | 50133 | 50167 | 50149 | 0.89 |
436
+ | AnonAadhaarPolicyFactory | deploy | - | - | 129387 | 2.29 |
437
+ | ConstantInitialVoiceCreditProxyFactory | deploy | - | - | 118665 | 2.10 |
438
+ | EASCheckerFactory | deploy | - | - | 155556 | 2.75 |
439
+ | EASPolicyFactory | deploy | - | - | 129387 | 2.29 |
440
+ | ERC20CheckerFactory | deploy | - | - | 125959 | 2.23 |
441
+ | ERC20PolicyFactory | deploy | - | - | 129365 | 2.29 |
442
+ | ERC20VotesCheckerFactory | deploy | - | - | 154673 | 2.74 |
443
+ | ERC20VotesInitialVoiceCreditProxyFactory | deploy | - | - | 176590 | 3.12 |
444
+ | ERC20VotesPolicyFactory | deploy | - | - | 129365 | 2.29 |
445
+ | FreeForAllCheckerFactory | deploy | - | - | 89376 | 1.58 |
446
+ | FreeForAllPolicyFactory | deploy | 129375 | 129387 | 129386 | 2.29 |
447
+ | GitcoinPassportCheckerFactory | deploy | - | - | 125937 | 2.23 |
448
+ | GitcoinPassportPolicyFactory | deploy | - | - | 129365 | 2.29 |
449
+ | HatsCheckerFactory | deploy | - | - | 169023 | 2.99 |
450
+ | HatsPolicyFactory | deploy | - | - | 129387 | 2.29 |
451
+ | MACI | deployPoll | 1580777 | 1583817 | 1581631 | 27.98 |
452
+ | MACI | signUp | 197667 | 730504 | 315320 | 5.58 |
453
+ | MerkleProofCheckerFactory | deploy | - | - | 119047 | 2.11 |
454
+ | MerkleProofPolicyFactory | deploy | - | - | 129387 | 2.29 |
455
+ | MessageProcessor | processMessages | 252065 | 252976 | 252375 | 4.46 |
456
+ | Poll | joinPoll | 282314 | 503970 | 334836 | 5.92 |
457
+ | Poll | mergeState | 176483 | 331802 | 232886 | 4.12 |
458
+ | Poll | padLastBatch | - | - | 81884 | 1.45 |
459
+ | Poll | publishMessage | - | - | 358677 | 6.34 |
460
+ | Poll | publishMessageBatch | - | - | 671442 | 11.88 |
461
+ | Poll | relayMessagesBatch | - | - | 155223 | 2.75 |
462
+ | PollFactory | deploy | - | - | 1099100 | 19.44 |
463
+ | SemaphoreCheckerFactory | deploy | - | - | 106047 | 1.88 |
464
+ | SemaphorePolicyFactory | deploy | - | - | 129387 | 2.29 |
465
+ | Tally | addTallyResults | 7312489 | 7844939 | 7578714 | 134.05 |
466
+ | Tally | tallyVotes | 147320 | 204580 | 161641 | 2.86 |
467
+ | TokenCheckerFactory | deploy | - | - | 97197 | 1.72 |
468
+ | TokenPolicyFactory | deploy | - | - | 129387 | 2.29 |
469
+ | VerifyingKeysRegistry | setPollJoinedVerifyingKey | - | - | 453033 | 8.01 |
470
+ | VerifyingKeysRegistry | setPollJoiningVerifyingKey | - | - | 453011 | 8.01 |
471
+ | VerifyingKeysRegistry | setVerifyingKeys | 885514 | 885526 | 885517 | 15.66 |
472
+ | VerifyingKeysRegistry | setVerifyingKeysBatch | - | - | 1787720 | 31.62 |
473
+ | ZupassCheckerFactory | deploy | - | - | 206318 | 3.65 |
474
+ | ZupassPolicyFactory | deploy | - | - | 129365 | 2.29 |
475
+
476
+ </details>
477
+
478
+ <details>
479
+ <summary>Deployment cost</summary>
480
+
481
+ | Deployments | Min Gas | Max Gas | Avg Gas | % of Block Limit | USD (avg) |
482
+ | ---------------------------------------- | ------- | ------- | ------- | ---------------- | --------- |
483
+ | AnonAadhaarCheckerFactory | - | - | 567621 | 1.9 % | 10.04 |
484
+ | AnonAadhaarPolicyFactory | - | - | 759390 | 2.5 % | 13.43 |
485
+ | ConstantInitialVoiceCreditProxyFactory | - | - | 379812 | 1.3 % | 6.72 |
486
+ | EASCheckerFactory | - | - | 623304 | 2.1 % | 11.02 |
487
+ | EASPolicyFactory | - | - | 690560 | 2.3 % | 12.21 |
488
+ | ERC20CheckerFactory | - | - | 446429 | 1.5 % | 7.90 |
489
+ | ERC20PolicyFactory | - | - | 684892 | 2.3 % | 12.11 |
490
+ | ERC20VotesCheckerFactory | - | - | 464123 | 1.5 % | 8.21 |
491
+ | ERC20VotesInitialVoiceCreditProxyFactory | - | - | 482127 | 1.6 % | 8.53 |
492
+ | ERC20VotesPolicyFactory | - | - | 685960 | 2.3 % | 12.13 |
493
+ | FreeForAllCheckerFactory | - | - | 329927 | 1.1 % | 5.84 |
494
+ | FreeForAllPolicyFactory | - | - | 653501 | 2.2 % | 11.56 |
495
+ | GitcoinPassportCheckerFactory | - | - | 463912 | 1.5 % | 8.21 |
496
+ | GitcoinPassportPolicyFactory | - | - | 687052 | 2.3 % | 12.15 |
497
+ | Hasher | - | - | 426472 | 1.4 % | 7.54 |
498
+ | HatsCheckerFactory | - | - | 572538 | 1.9 % | 10.13 |
499
+ | HatsPolicyFactory | - | - | 684664 | 2.3 % | 12.11 |
500
+ | MACI | 1803354 | 1803438 | 1803408 | 6 % | 31.90 |
501
+ | MerkleProofCheckerFactory | - | - | 491985 | 1.6 % | 8.70 |
502
+ | MerkleProofPolicyFactory | - | - | 686188 | 2.3 % | 12.14 |
503
+ | MessageProcessorFactory | 1818377 | 1818401 | 1818398 | 6.1 % | 32.16 |
504
+ | PollFactory | 3725815 | 3725863 | 3725858 | 12.4 % | 65.90 |
505
+ | PoseidonT3 | - | - | 2157126 | 7.2 % | 38.15 |
506
+ | PoseidonT4 | - | - | 2745274 | 9.2 % | 48.56 |
507
+ | PoseidonT5 | - | - | 3569887 | 11.9 % | 63.14 |
508
+ | PoseidonT6 | - | - | 4261625 | 14.2 % | 75.38 |
509
+ | SemaphoreCheckerFactory | - | - | 557606 | 1.9 % | 9.86 |
510
+ | SemaphorePolicyFactory | - | - | 749517 | 2.5 % | 13.26 |
511
+ | TallyFactory | 2207358 | 2207382 | 2207379 | 7.4 % | 39.04 |
512
+ | TokenCheckerFactory | - | - | 435769 | 1.5 % | 7.71 |
513
+ | TokenPolicyFactory | - | - | 690920 | 2.3 % | 12.22 |
514
+ | Utilities | - | - | 664356 | 2.2 % | 11.75 |
515
+ | Verifier | - | - | 775226 | 2.6 % | 13.71 |
516
+ | VerifyingKeysRegistry | - | - | 1755862 | 5.9 % | 31.06 |
517
+ | ZupassCheckerFactory | - | - | 640425 | 2.1 % | 11.33 |
518
+ | ZupassGroth16Verifier | - | - | 1108706 | 3.7 % | 19.61 |
519
+ | ZupassPolicyFactory | - | - | 785744 | 2.6 % | 13.90 |
520
+
521
+ </details>
522
+
523
+ ## Costs on Arbitrum
524
+
525
+ Below are the estimated costs for various MACI operations and deployments, assuming:
526
+
527
+ - **Gas price**: 0.012 gwei
528
+ - **ETH price**: $2595
529
+
530
+ <details>
531
+ <summary>Contract calls cost</summary>
532
+
533
+ | Contract | Method | Min | Max | Avg | USD (avg) |
534
+ | ---------------------------------------- | -------------------------- | ------- | ------- | ------- | --------- |
535
+ | AnonAadhaarCheckerFactory | deploy | - | - | 125971 | 0.00402 |
536
+ | AnonAadhaarPolicy | enforce | - | - | 38141 | 0.00122 |
537
+ | AnonAadhaarPolicy | setTarget | 50133 | 50167 | 50149 | 0.0016 |
538
+ | AnonAadhaarPolicyFactory | deploy | - | - | 129387 | 0.00413 |
539
+ | ConstantInitialVoiceCreditProxyFactory | deploy | - | - | 118665 | 0.00379 |
540
+ | EASCheckerFactory | deploy | - | - | 155556 | 0.00497 |
541
+ | EASPolicyFactory | deploy | - | - | 129387 | 0.00413 |
542
+ | ERC20CheckerFactory | deploy | - | - | 125959 | 0.00402 |
543
+ | ERC20PolicyFactory | deploy | - | - | 129365 | 0.00413 |
544
+ | ERC20VotesCheckerFactory | deploy | - | - | 154673 | 0.00494 |
545
+ | ERC20VotesInitialVoiceCreditProxyFactory | deploy | - | - | 176590 | 0.00564 |
546
+ | ERC20VotesPolicyFactory | deploy | - | - | 129365 | 0.00413 |
547
+ | FreeForAllCheckerFactory | deploy | - | - | 89376 | 0.00286 |
548
+ | FreeForAllPolicyFactory | deploy | 129375 | 129387 | 129386 | 0.00413 |
549
+ | GitcoinPassportCheckerFactory | deploy | - | - | 125937 | 0.00402 |
550
+ | GitcoinPassportPolicyFactory | deploy | - | - | 129365 | 0.00413 |
551
+ | HatsCheckerFactory | deploy | - | - | 169023 | 0.0054 |
552
+ | HatsPolicyFactory | deploy | - | - | 129387 | 0.00413 |
553
+ | MACI | deployPoll | 1580765 | 1583829 | 1581626 | 0.05052 |
554
+ | MACI | signUp | 197667 | 730480 | 315320 | 0.01007 |
555
+ | MerkleProofCheckerFactory | deploy | - | - | 119047 | 0.0038 |
556
+ | MerkleProofPolicyFactory | deploy | - | - | 129387 | 0.00413 |
557
+ | MessageProcessor | processMessages | 252019 | 252918 | 252319 | 0.00806 |
558
+ | Poll | joinPoll | 282314 | 503970 | 334837 | 0.0107 |
559
+ | Poll | mergeState | 198686 | 354005 | 255089 | 0.00815 |
560
+ | Poll | padLastBatch | - | - | 81884 | 0.00262 |
561
+ | Poll | publishMessage | - | - | 358725 | 0.01146 |
562
+ | Poll | publishMessageBatch | - | - | 671490 | 0.02145 |
563
+ | Poll | relayMessagesBatch | - | - | 155235 | 0.00496 |
564
+ | PollFactory | deploy | - | - | 1099100 | 0.03511 |
565
+ | SemaphoreCheckerFactory | deploy | - | - | 106047 | 0.00339 |
566
+ | SemaphorePolicyFactory | deploy | - | - | 129387 | 0.00413 |
567
+ | Tally | addTallyResults | 7311562 | 7844012 | 7577787 | 0.24207 |
568
+ | Tally | tallyVotes | 147262 | 204522 | 161585 | 0.00516 |
569
+ | TokenCheckerFactory | deploy | - | - | 97197 | 0.0031 |
570
+ | TokenPolicyFactory | deploy | - | - | 129387 | 0.00413 |
571
+ | VerifyingKeysRegistry | setPollJoinedVerifyingKey | - | - | 453033 | 0.01447 |
572
+ | VerifyingKeysRegistry | setPollJoiningVerifyingKey | - | - | 453011 | 0.01447 |
573
+ | VerifyingKeysRegistry | setVerifyingKeys | 885514 | 885526 | 885517 | 0.02829 |
574
+ | VerifyingKeysRegistry | setVerifyingKeysBatch | - | - | 1787720 | 0.05711 |
575
+ | ZupassCheckerFactory | deploy | - | - | 206318 | 0.00659 |
576
+ | ZupassPolicyFactory | deploy | - | - | 129365 | 0.00413 |
577
+
578
+ </details>
579
+
580
+ <details>
581
+ <summary>Deployment cost</summary>
582
+
583
+ | Deployments | Min Gas | Max Gas | Avg Gas | % of Limit | USD (avg) |
584
+ | ---------------------------------------- | ------- | ------- | ------- | ---------- | --------- |
585
+ | AnonAadhaarCheckerFactory | - | - | 567621 | 1.9% | 0.01813 |
586
+ | AnonAadhaarPolicyFactory | - | - | 759390 | 2.5% | 0.02426 |
587
+ | ConstantInitialVoiceCreditProxyFactory | - | - | 379812 | 1.3% | 0.01213 |
588
+ | EASCheckerFactory | - | - | 623304 | 2.1% | 0.01991 |
589
+ | EASPolicyFactory | - | - | 690560 | 2.3% | 0.02206 |
590
+ | ERC20CheckerFactory | - | - | 446429 | 1.5% | 0.01426 |
591
+ | ERC20PolicyFactory | - | - | 684892 | 2.3% | 0.02188 |
592
+ | ERC20VotesCheckerFactory | - | - | 464123 | 1.5% | 0.01483 |
593
+ | ERC20VotesInitialVoiceCreditProxyFactory | - | - | 482127 | 1.6% | 0.01540 |
594
+ | ERC20VotesPolicyFactory | - | - | 685960 | 2.3% | 0.02191 |
595
+ | FreeForAllCheckerFactory | - | - | 329927 | 1.1% | 0.01054 |
596
+ | FreeForAllPolicyFactory | - | - | 653501 | 2.2% | 0.02088 |
597
+ | GitcoinPassportCheckerFactory | - | - | 463912 | 1.5% | 0.01482 |
598
+ | GitcoinPassportPolicyFactory | - | - | 687052 | 2.3% | 0.02195 |
599
+ | Hasher | - | - | 426472 | 1.4% | 0.01362 |
600
+ | HatsCheckerFactory | - | - | 572538 | 1.9% | 0.01829 |
601
+ | HatsPolicyFactory | - | - | 684664 | 2.3% | 0.02187 |
602
+ | MACI | 1803354 | 1803438 | 1803408 | 6.0% | 0.05761 |
603
+ | MerkleProofCheckerFactory | - | - | 491985 | 1.6% | 0.01572 |
604
+ | MerkleProofPolicyFactory | - | - | 686188 | 2.3% | 0.02192 |
605
+ | MessageProcessorFactory | 1818377 | 1818401 | 1818398 | 6.1% | 0.05809 |
606
+ | PollFactory | 3720635 | 3720683 | 3720678 | 12.4% | 0.11885 |
607
+ | PoseidonT3 | - | - | 2157126 | 7.2% | 0.06891 |
608
+ | PoseidonT4 | - | - | 2745274 | 9.2% | 0.0877 |
609
+ | PoseidonT5 | - | - | 3569887 | 11.9% | 0.11404 |
610
+ | PoseidonT6 | - | - | 4261625 | 14.2% | 0.13613 |
611
+ | SemaphoreCheckerFactory | - | - | 557606 | 1.9% | 0.01781 |
612
+ | SemaphorePolicyFactory | - | - | 749517 | 2.5% | 0.02394 |
613
+ | TallyFactory | 2176647 | 2176671 | 2176668 | 7.3% | 0.06953 |
614
+ | TokenCheckerFactory | - | - | 435769 | 1.5% | 0.01392 |
615
+ | TokenPolicyFactory | - | - | 690920 | 2.3% | 0.02207 |
616
+ | Utilities | - | - | 664356 | 2.2% | 0.02122 |
617
+ | Verifier | - | - | 775226 | 2.6% | 0.02476 |
618
+ | VerifyingKeysRegistry | - | - | 1755862 | 5.9% | 0.05609 |
619
+ | ZupassCheckerFactory | - | - | 640425 | 2.1% | 0.02046 |
620
+ | ZupassGroth16Verifier | - | - | 1108706 | 3.7% | 0.03542 |
621
+ | ZupassPolicyFactory | - | - | 785744 | 2.6% | 0.0251 |
622
+
623
+ </details>
624
+
625
+ ## Costs on Optimism
626
+
627
+ Below are the estimated costs for various MACI operations and deployments, assuming:
628
+
629
+ - **Gas price**: 0.016 gwei
630
+ - **ETH price**: $2493
631
+
632
+ <details>
633
+ <summary>Contract calls cost</summary>
634
+
635
+ | Contract | Method | Min | Max | Avg | USD (avg) |
636
+ | ---------------------------------------- | -------------------------- | ------- | ------- | ------- | --------- |
637
+ | AnonAadhaarCheckerFactory | deploy | - | - | 125971 | 0.00496 |
638
+ | AnonAadhaarPolicy | enforce | - | - | 38141 | 0.0016 |
639
+ | AnonAadhaarPolicy | setTarget | 50133 | 50167 | 50149 | 0.00208 |
640
+ | AnonAadhaarPolicyFactory | deploy | - | - | 129387 | 0.00512 |
641
+ | ConstantInitialVoiceCreditProxyFactory | deploy | - | - | 118665 | 0.0048 |
642
+ | EASCheckerFactory | deploy | - | - | 155556 | 0.00624 |
643
+ | EASPolicyFactory | deploy | - | - | 129387 | 0.00512 |
644
+ | ERC20CheckerFactory | deploy | - | - | 125959 | 0.00496 |
645
+ | ERC20PolicyFactory | deploy | - | - | 129365 | 0.00512 |
646
+ | ERC20VotesCheckerFactory | deploy | - | - | 154673 | 0.00624 |
647
+ | ERC20VotesInitialVoiceCreditProxyFactory | deploy | - | - | 176590 | 0.00704 |
648
+ | ERC20VotesPolicyFactory | deploy | - | - | 129365 | 0.00512 |
649
+ | FreeForAllCheckerFactory | deploy | - | - | 89376 | 0.00352 |
650
+ | FreeForAllPolicyFactory | deploy | 129375 | 129387 | 129386 | 0.00512 |
651
+ | GitcoinPassportCheckerFactory | deploy | - | - | 125937 | 0.00496 |
652
+ | GitcoinPassportPolicyFactory | deploy | - | - | 129365 | 0.00512 |
653
+ | HatsCheckerFactory | deploy | - | - | 169023 | 0.00672 |
654
+ | HatsPolicyFactory | deploy | - | - | 129387 | 0.00512 |
655
+ | MACI | deployPoll | 1580765 | 1583829 | 1581630 | 0.06304 |
656
+ | MACI | signUp | 197667 | 730492 | 315320 | 0.01264 |
657
+ | MerkleProofCheckerFactory | deploy | - | - | 119047 | 0.0048 |
658
+ | MerkleProofPolicyFactory | deploy | - | - | 129387 | 0.00512 |
659
+ | MessageProcessor | processMessages | 252007 | 252918 | 252317 | 0.01008 |
660
+ | Poll | joinPoll | 282314 | 503970 | 334835 | 0.01328 |
661
+ | Poll | mergeState | 198686 | 354005 | 255089 | 0.01024 |
662
+ | Poll | padLastBatch | - | - | 81884 | 0.0032 |
663
+ | Poll | publishMessage | - | - | 358725 | 0.01424 |
664
+ | Poll | publishMessageBatch | - | - | 671502 | 0.02672 |
665
+ | Poll | relayMessagesBatch | - | - | 155235 | 0.00624 |
666
+ | PollFactory | deploy | - | - | 1099088 | 0.04384 |
667
+ | SemaphoreCheckerFactory | deploy | - | - | 106047 | 0.00416 |
668
+ | SemaphorePolicyFactory | deploy | - | - | 129387 | 0.00512 |
669
+ | Tally | addTallyResults | 7311562 | 7844012 | 7577787 | 0.30224 |
670
+ | Tally | tallyVotes | 147262 | 204522 | 161585 | 0.0064 |
671
+ | TokenCheckerFactory | deploy | - | - | 97197 | 0.00384 |
672
+ | TokenPolicyFactory | deploy | - | - | 129387 | 0.00512 |
673
+ | VerifyingKeysRegistry | setPollJoinedVerifyingKey | - | - | 453033 | 0.01808 |
674
+ | VerifyingKeysRegistry | setPollJoiningVerifyingKey | - | - | 453011 | 0.01808 |
675
+ | VerifyingKeysRegistry | setVerifyingKeys | 885514 | 885526 | 885517 | 0.03536 |
676
+ | VerifyingKeysRegistry | setVerifyingKeysBatch | - | - | 1787720 | 0.07136 |
677
+ | ZupassCheckerFactory | deploy | - | - | 206318 | 0.00816 |
678
+ | ZupassPolicyFactory | deploy | - | - | 129365 | 0.00512 |
679
+
680
+ </details>
681
+
682
+ <details>
683
+ <summary>Deployment cost</summary>
684
+
685
+ | Deployments | Min Gas | Max Gas | Avg Gas | % of Block Limit | USD (avg) |
686
+ | ---------------------------------------- | ------- | ------- | ------- | ---------------- | --------- |
687
+ | AnonAadhaarCheckerFactory | - | - | 567621 | 1.9 % | 0.02272 |
688
+ | AnonAadhaarPolicyFactory | - | - | 759390 | 2.5 % | 0.03024 |
689
+ | ConstantInitialVoiceCreditProxyFactory | - | - | 379812 | 1.3 % | 0.0152 |
690
+ | EASCheckerFactory | - | - | 623304 | 2.1 % | 0.0248 |
691
+ | EASPolicyFactory | - | - | 690560 | 2.3 % | 0.02752 |
692
+ | ERC20CheckerFactory | - | - | 446429 | 1.5 % | 0.01776 |
693
+ | ERC20PolicyFactory | - | - | 684892 | 2.3 % | 0.02736 |
694
+ | ERC20VotesCheckerFactory | - | - | 464123 | 1.5 % | 0.01856 |
695
+ | ERC20VotesInitialVoiceCreditProxyFactory | - | - | 482127 | 1.6 % | 0.0192 |
696
+ | ERC20VotesPolicyFactory | - | - | 685960 | 2.3 % | 0.02736 |
697
+ | FreeForAllCheckerFactory | - | - | 329927 | 1.1 % | 0.01312 |
698
+ | FreeForAllPolicyFactory | - | - | 653501 | 2.2 % | 0.02608 |
699
+ | GitcoinPassportCheckerFactory | - | - | 463912 | 1.5 % | 0.01856 |
700
+ | GitcoinPassportPolicyFactory | - | - | 687052 | 2.3 % | 0.02736 |
701
+ | Hasher | - | - | 426472 | 1.4 % | 0.01696 |
702
+ | HatsCheckerFactory | - | - | 572538 | 1.9 % | 0.02288 |
703
+ | HatsPolicyFactory | - | - | 684664 | 2.3 % | 0.02736 |
704
+ | MACI | 1803354 | 1803438 | 1803408 | 6.0 % | 0.072 |
705
+ | MerkleProofCheckerFactory | - | - | 491985 | 1.6 % | 0.01968 |
706
+ | MerkleProofPolicyFactory | - | - | 686188 | 2.3 % | 0.02736 |
707
+ | MessageProcessorFactory | 1818377 | 1818401 | 1818398 | 6.1 % | 0.07248 |
708
+ | PollFactory | 3720635 | 3720683 | 3720678 | 12.4 % | 0.14848 |
709
+ | PoseidonT3 | - | - | 2157126 | 7.2 % | 0.08608 |
710
+ | PoseidonT4 | - | - | 2745274 | 9.2 % | 0.1096 |
711
+ | PoseidonT5 | - | - | 3569887 | 11.9 % | 0.1424 |
712
+ | PoseidonT6 | - | - | 4261625 | 14.2 % | 0.17008 |
713
+ | SemaphoreCheckerFactory | - | - | 557606 | 1.9 % | 0.02224 |
714
+ | SemaphorePolicyFactory | - | - | 749517 | 2.5 % | 0.02992 |
715
+ | TallyFactory | 2176647 | 2176671 | 2176668 | 7.3 % | 0.08688 |
716
+ | TokenCheckerFactory | - | - | 435769 | 1.5 % | 0.01744 |
717
+ | TokenPolicyFactory | - | - | 690920 | 2.3 % | 0.02752 |
718
+ | Utilities | - | - | 664356 | 2.2 % | 0.02656 |
719
+ | Verifier | - | - | 775226 | 2.6 % | 0.03088 |
720
+ | VerifyingKeysRegistry | - | - | 1755862 | 5.9 % | 0.07008 |
721
+ | ZupassCheckerFactory | - | - | 640425 | 2.1 % | 0.0256 |
722
+ | ZupassGroth16Verifier | - | - | 1108706 | 3.7 % | 0.04416 |
723
+ | ZupassPolicyFactory | - | - | 785744 | 2.6 % | 0.03136 |
724
+
725
+ </details>
@@ -23,6 +23,14 @@ MACI has been tested on the following EVM networks:
23
23
  - Gnosis Chiado
24
24
  - Polygon
25
25
  - Polygon Amoy
26
+ - Scroll
27
+ - Scroll Sepolia
28
+ - Linea
29
+ - Linea Sepolia
30
+ - Zksync Era
31
+ - Zksync Sepolia
32
+ - Polygon Zkevm
33
+ - Polygon Cardona Zkevm
26
34
 
27
35
  We recommend using either Optimism, Arbitrum or Base. Please open an issue/PR if you intend to use other EVM networks and would like to contribute to this record of deployed and verified contracts as well as benchmarks, that would be greatly appreciated.
28
36
 
@@ -42,6 +50,14 @@ For better UX, MACI clients should be sending votes (messages) in batches. Depen
42
50
  | Gnosis Chiado | 50 | 15921753 | 0.0000188313 ETH ($0.05) |
43
51
  | Polygon | 85 | 26915773 | 0.0002193417259598 ETH ($0.54) |
44
52
  | Polygon Amoy | 89 | 28192368 | 0.00017069180975304 ETH ($0.43) |
53
+ | Scroll | 62 | 19447318 | 0.000233368 ETH ($0.61) |
54
+ | Scroll Sepolia | 62 | 19447318 | 0.000233368 ETH ($0.61) |
55
+ | Linea | 14 | 4438205 | 0.00005325846 ETH ($0.1382) |
56
+ | Linea Sepolia | 14 | 4438205 | 0.00005325846 ETH ($0.1382) |
57
+ | Zksync Era | 2 | 24000690 | 0.00028801 ETH ($0.75) |
58
+ | Zksync Sepolia | 2 | 24000690 | 0.00028801 ETH ($0.75) |
59
+ | Polygon Zkevm | 6 | 1917872 | 0.00006904 ETH ($0.18) |
60
+ | Polygon Cardona | 6 | 1917872 | 0.00006904 ETH ($0.18) |
45
61
 
46
62
  ## Test yourself
47
63
 
@@ -19,7 +19,7 @@ The MACI smart contracts handle the on-chain aspects - both the functionality an
19
19
 
20
20
  The MACI smart contracts are written in [Solidity](https://soliditylang.org/).
21
21
 
22
- Contracts are released through the [`@maci-contracts`](https://www.npmjs.com/package/maci-contracts) NPM package.
22
+ Contracts are released through the [`@maci-protocol/contracts`](https://www.npmjs.com/package/@maci-protocol/contracts) NPM package.
23
23
 
24
24
  [Learn more about MACI contracts](/docs/technical-references/smart-contracts/)
25
25
 
@@ -29,12 +29,12 @@ The TypeScript libraries manage the business logic between the smart contracts a
29
29
 
30
30
  The MACI [TypeScript](https://www.typescriptlang.org/) libraries are released through the following NPM packages:
31
31
 
32
- - [`@maci-cli`](https://www.npmjs.com/package/maci-cli)
33
- - [`@maci-core`](https://www.npmjs.com/package/maci-core)
34
- - [`@maci-crypto`](https://www.npmjs.com/package/maci-crypto)
35
- - [`@maci-domainobjs`](https://www.npmjs.com/package/maci-domainobjs)
36
- - [`@maci-integrationtests`](https://www.npmjs.com/package/maci-integrationtests)
37
- - [`@maci-sdk`](https://www.npmjs.com/package/maci-sdk)
32
+ - [`@maci-protocol/cli`](https://www.npmjs.com/package/@maci-protocol/cli)
33
+ - [`@maci-protocol/core`](https://www.npmjs.com/package/@maci-protocol/core)
34
+ - [`@maci-protocol/crypto`](https://www.npmjs.com/package/@maci-protocol/crypto)
35
+ - [`@maci-protocol/domainobjs`](https://www.npmjs.com/package/@maci-protocol/domainobjs)
36
+ - [`@maci-protocol/integrationtests`](https://www.npmjs.com/package/@maci-protocol/integrationtests)
37
+ - [`@maci-protocol/sdk`](https://www.npmjs.com/package/@maci-protocol/sdk)
38
38
 
39
39
  ## Circuits
40
40
 
@@ -43,6 +43,6 @@ MACI has multiple circuits that ensure all off-chain computation is completed co
43
43
  The circuits for these zero-knowledge proofs are written
44
44
  in [Circom](https://iden3.io/circom).
45
45
 
46
- The MACI circuits are released through the [`@maci-circuits`](https://www.npmjs.com/package/maci-circuits) NPM package.
46
+ The MACI circuits are released through the [`@maci-protocol/circuits`](https://www.npmjs.com/package/@maci-protocol/circuits) NPM package.
47
47
 
48
48
  [Learn more about MACI circuits](/docs/technical-references/zk-snark-circuits/)
@@ -37,7 +37,7 @@ MACI's circuits are parameterized, and thus can be configured to support differe
37
37
  - **STATE_TREE_DEPTH** = how many users the system supports
38
38
  - **VOTE_OPTIONS_TREE_DEPTH** = how many vote options the system supports
39
39
  - **MESSAGE_BATCH_SIZE** = how many messages in a batch the circuit should process
40
- - **TALLY_PROCESSING_STATE_TREE_DEPTH** = how many ballots can be processed per batch when tallying the results (`5 ** TALLY_PROCESSING_STATE_TREE_DEPTH` ballots)
40
+ - **TALLY_PROCESSING_STATE_TREE_DEPTH** = how many ballots can be processed per batch when tallying the results (`2 ** TALLY_PROCESSING_STATE_TREE_DEPTH` ballots)
41
41
 
42
42
  Please refer to the individual circuit documentation for more details on the inner working of each circuit and where parameters fit.
43
43