-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(contracts): deploy contracts to L2s, store addresses and benchm…
…ark message batch size (#1751)
- Loading branch information
Showing
7 changed files
with
960 additions
and
59 deletions.
There are no files selected for viewing
550 changes: 492 additions & 58 deletions
550
...ed_docs/version-v2.x/developers-references/smart-contracts/DeployedContracts.md
Large diffs are not rendered by default.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
...ed_docs/version-v2.x/developers-references/smart-contracts/SupportedNetworks.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
title: Supported Networks | ||
description: Supported Networks | ||
sidebar_label: Supported Networks | ||
sidebar_position: 11 | ||
--- | ||
|
||
MACI has been tested on the following EVM networks: | ||
|
||
- Optimism | ||
- Optimism Sepolia | ||
- Arbitrum | ||
- Arbitrum Sepolia | ||
- Base | ||
- Base Sepolia | ||
|
||
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. | ||
|
||
## Limitations | ||
|
||
For better UX, MACI clients should be sending votes (messages) in batches. Depending on the number of vote options available, larger batch might be sent. Below you can find the largest batch you can send for each network and how much gas it consumes: | ||
|
||
| Network | Max Batch Size | Gas used | Price (based on Ether price at the time ~$2595) | | ||
| ---------------- | -------------- | -------- | ----------------------------------------------- | | ||
| Optimism | 89 | 28167603 | 0.000036061732019822 ETH ($0.09) | | ||
| Optimism Sepolia | 89 | 28163331 | 0.005651520470449442 ETH ($10.46) | | ||
| Arbitrum | 98 | 31017545 | 0.00031017545 ETH ($0.80) | | ||
| Arbitrum Sepolia | 98 | 31115404 | 0.0031115404 ETH ($8.06) | | ||
| Base | 89 | 28165467 | 0.000591851649982612 ETH ($1.54) | | ||
| Base Sepolia | 89 | 28190232 | 0.002072926785842714 ETH ($0.000000) | | ||
|
||
## Test yourself | ||
|
||
To test MACI on a network, whether it's one of the ones listed above, or a new one, you can use the `benchmark` hardhat task: | ||
|
||
1. Ensure you have copied `.env.example` to `.env` and set the correct values for the network you want to test on. | ||
2. Configure your `deploy-config.json` - ensure `messageTreeDepth` is set to at least 3 (supporting 5 \*\* 3 votes) | ||
3. Ensure you have copied the `default-deployed-contracts.json` to `deployed-contracts.json` to avoid deploying unnecessary contracts again. | ||
4. Run the `benchmark` task: `pnpm benchmark:$NETWORK` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.