Skip to content

Commit

Permalink
Chore/mainnet deployments (#862)
Browse files Browse the repository at this point in the history
* chore(contracts): deploy contracts on arbitrum

re #859

* chore(contracts): deploy contracts on polygon

re #859

* chore(contracts): deploy contracts on optimism

re #859
  • Loading branch information
cedoor authored Oct 1, 2024
1 parent 4496eee commit fdbadf5
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 1,656 deletions.
20 changes: 11 additions & 9 deletions apps/subgraph/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,17 @@

## 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.0.0-beta.17.

Supported networks:

- `sepolia`
- `optimism`
- `optimism-sepolia`
- `arbitrum-one`
- `arbitrum-sepolia`
- `matic`
- `polygon-amoy`

## 🛠 Install

Expand Down
14 changes: 13 additions & 1 deletion apps/subgraph/scripts/generate-subgraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})

Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"start": "hardhat node",
"copy:abi": "ncp artifacts/contracts/Semaphore.sol/Semaphore.json ../utils/src/semaphore-abi.json",
"copy:abi": "ncp artifacts/contracts/Semaphore.sol/Semaphore.json ../utils/src/semaphore-interface.json",
"compile": "hardhat compile",
"deploy": "hardhat deploy",
"verify": "hardhat run scripts/verify-contracts.ts",
Expand Down
Loading

0 comments on commit fdbadf5

Please sign in to comment.