Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Goerli from supported networks #569

Merged
merged 5 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions apps/subgraph/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@

## Networks

| Semaphore version | Sepolia | Goerli | Mumbai | Optimism Goerli | Arbitrum Goerli | Arbitrum One |
| ----------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| v2.0 | N/A | N/A | N/A | N/A | N/A | [semaphore-protocol/arbitrum](https://thegraph.com/hosted-service/subgraph/semaphore-protocol/arbitrum) |
| v2.5 | N/A | [semaphore-protocol/goerli](https://thegraph.com/hosted-service/subgraph/semaphore-protocol/goerli) | N/A | N/A | N/A | N/A |
| v2.6 | N/A | [semaphore-protocol/goerli-5259d3](https://thegraph.com/hosted-service/subgraph/semaphore-protocol/goerli-5259d3) | N/A | N/A | N/A | [semaphore-protocol/arbitrum-86337c](https://thegraph.com/hosted-service/subgraph/semaphore-protocol/arbitrum-86337c) |
| v3.0 - v3.1 | N/A | [semaphore-protocol/goerli-89490c](https://thegraph.com/hosted-service/subgraph/semaphore-protocol/goerli-89490c) | N/A | N/A | N/A | [semaphore-protocol/arbitrum-72dca3](https://thegraph.com/hosted-service/subgraph/semaphore-protocol/arbitrum-72dca3) |
| >= v3.2 | [semaphore-sepolia](https://api.studio.thegraph.com/query/14377/semaphore-sepolia/v3.6.1) | [semaphore-goerli](https://api.studio.thegraph.com/query/14377/semaphore-goerli/v3.6.1) | [semaphore-mumbai](https://api.studio.thegraph.com/query/14377/semaphore-mumbai/v3.6.1) | [semaphore-optimism-goerli](https://api.studio.thegraph.com/query/14377/semaphore-optimism-goerli/v3.6.1) | [semaphore-arbitrum-goerli](https://api.studio.thegraph.com/query/14377/semaphore-arbitrum-goerli/v3.6.1) | [semaphore-arbitrum](https://api.studio.thegraph.com/query/14377/semaphore-arbitrum/v3.6.1) |
| Semaphore version | Sepolia | Mumbai | Optimism Sepolia | Arbitrum Sepolia | Arbitrum One |
| ----------------- | ----------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | ---------------- | ---------------- | --------------------------------------------------------------------------------------------------------------------- |
| v2.0 | N/A | N/A | N/A | N/A | [semaphore-protocol/arbitrum](https://thegraph.com/hosted-service/subgraph/semaphore-protocol/arbitrum) |
| v2.5 | 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) |
| 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) |
| >= 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) |

## 🛠 Install

Expand Down
2 changes: 1 addition & 1 deletion apps/subgraph/docker-compose-graph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services:
postgres_port: 5432
ipfs: "ipfs:5001"
ethereum: "localhost:http://host.docker.internal:8545" # Should use the `localhost` as network name in subgraph.yml
# ethereum: 'goerli:https://goerli.infura.io/v3/YOUR-API-KEY'
# ethereum: 'sepolia:https://sepolia.infura.io/v3/YOUR-API-KEY'
GRAPH_LOG: info
GRAPH_ALLOW_NON_DETERMINISTIC_IPFS: 1
networks:
Expand Down
10 changes: 2 additions & 8 deletions apps/subgraph/networks.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,19 @@
"startBlock": 3231111
}
},
"goerli": {
"Semaphore": {
"address": "0x3889927F0B5Eb1a02C6E2C20b39a1Bd4EAd76131",
"startBlock": 8777695
}
},
"mumbai": {
"Semaphore": {
"address": "0x3889927F0B5Eb1a02C6E2C20b39a1Bd4EAd76131",
"startBlock": 33995010
}
},
"optimism-goerli": {
"optimism-sepolia": {
"Semaphore": {
"address": "0x3889927F0B5Eb1a02C6E2C20b39a1Bd4EAd76131",
"startBlock": 7632846
}
},
"arbitrum-goerli": {
"arbitrum-sepolia": {
"Semaphore": {
"address": "0x3889927F0B5Eb1a02C6E2C20b39a1Bd4EAd76131",
"startBlock": 15174410
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
"private": true,
"scripts": {
"build:libraries": "yarn workspaces foreach -t --no-private run build",
"build:subgraph": "yarn workspace semaphore-subgraph codegen goerli && yarn workspace semaphore-subgraph build",
"build:subgraph": "yarn workspace semaphore-subgraph codegen sepolia && yarn workspace semaphore-subgraph build",
"compile:contracts": "yarn workspace semaphore-contracts compile",
"remove:template-files": "ts-node scripts/remove-template-files.ts",
"test": "yarn test:libraries && yarn test:contracts && yarn test:circuits && yarn test:subgraph",
"test:libraries": "jest --coverage",
"test:subgraph": "yarn workspace semaphore-subgraph test",
Expand All @@ -21,8 +20,10 @@
"prettier:write": "prettier -w .",
"docs": "typedoc --cname js.semaphore.pse.dev --githubPages true",
"version:bump": "yarn workspaces foreach --no-private version -d ${0} && yarn version apply --all && git commit -am \"chore: v${0}\" && git tag v${0}",
"version:publish": "yarn build:libraries && yarn remove:template-files && yarn workspaces foreach --no-private npm publish --tolerate-republish --access public",
"version:publish": "yarn build:libraries && yarn clean:cli-templates && yarn workspaces foreach --no-private npm publish --tolerate-republish --access public",
cedoor marked this conversation as resolved.
Show resolved Hide resolved
"version:release": "changelogithub",
"clean": "ts-node scripts/clean-apps.ts && ts-node scripts/clean-packages.ts && yarn clean:cli-templates && rimraf node_modules",
"clean:cli-templates": "ts-node scripts/clean-cli-templates.ts",
"commit": "cz",
"precommit": "lint-staged",
"postinstall": "husky install"
Expand Down
2 changes: 1 addition & 1 deletion packages/cli-template-contracts-hardhat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ cp .env.example .env
3. And deploy your contract.

```bash
yarn deploy --semaphore <semaphore-address> --group <group-id> --network goerli
yarn deploy --semaphore <semaphore-address> --group <group-id> --network sepolia
```

> **Note**
Expand Down
18 changes: 9 additions & 9 deletions packages/cli-template-contracts-hardhat/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ function getNetworks(): NetworksUserConfig {
const infuraApiKey = process.env.INFURA_API_KEY

return {
goerli: {
url: `https://goerli.infura.io/v3/${infuraApiKey}`,
chainId: 5,
accounts
},
sepolia: {
url: `https://sepolia.infura.io/v3/${infuraApiKey}`,
chainId: 11155111,
Expand All @@ -36,13 +31,18 @@ function getNetworks(): NetworksUserConfig {
chainId: 80001,
accounts
},
"optimism-goerli": {
url: `https://optimism-goerli.infura.io/v3/${infuraApiKey}`,
chainId: 420,
"optimism-sepolia": {
url: `https://optimism-sepolia.infura.io/v3/${infuraApiKey}`,
chainId: 11155420,
accounts
},
"arbitrum-sepolia": {
url: "https://sepolia-rollup.arbitrum.io/rpc",
chainId: 7745327,
accounts
},
arbitrum: {
url: `https://arbitrum-mainnet.infura.io/v3/${infuraApiKey}`,
url: "https://arb1.arbitrum.io/rpc",
chainId: 42161,
accounts
}
Expand Down
2 changes: 1 addition & 1 deletion packages/cli-template-monorepo-ethers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ yarn dev
1. Go to the `apps/contracts` directory and deploy your contract:

```bash
yarn deploy --semaphore <semaphore-address> --group <group-id> --network arbitrum-goerli
yarn deploy --semaphore <semaphore-address> --group <group-id> --network arbitrum-sepolia
```

2. Update your `.env` file with your new contract address, the group id and the semaphore contract address.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ function getNetworks(): NetworksUserConfig {
const infuraApiKey = process.env.INFURA_API_KEY

return {
goerli: {
url: `https://goerli.infura.io/v3/${infuraApiKey}`,
chainId: 5,
accounts
},
sepolia: {
url: `https://sepolia.infura.io/v3/${infuraApiKey}`,
chainId: 11155111,
Expand All @@ -38,14 +33,14 @@ function getNetworks(): NetworksUserConfig {
chainId: 80001,
accounts
},
"optimism-goerli": {
url: `https://optimism-goerli.infura.io/v3/${infuraApiKey}`,
chainId: 420,
"optimism-sepolia": {
url: `https://optimism-sepolia.infura.io/v3/${infuraApiKey}`,
chainId: 11155420,
accounts
},
"arbitrum-goerli": {
url: "https://goerli-rollup.arbitrum.io/rpc",
chainId: 421613,
"arbitrum-sepolia": {
url: "https://sepolia-rollup.arbitrum.io/rpc",
chainId: 7745327,
accounts
},
arbitrum: {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli-template-monorepo-subgraph/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ yarn dev
1. Go to the `apps/contracts` directory and deploy your contract:

```bash
yarn deploy --semaphore <semaphore-address> --group <group-id> --network arbitrum-goerli
yarn deploy --semaphore <semaphore-address> --group <group-id> --network arbitrum-sepolia
```

2. Update your `.env` file with your new contract address, the group id and the semaphore contract address.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ function getNetworks(): NetworksUserConfig {
const infuraApiKey = process.env.INFURA_API_KEY

return {
goerli: {
url: `https://goerli.infura.io/v3/${infuraApiKey}`,
chainId: 5,
accounts
},
sepolia: {
url: `https://sepolia.infura.io/v3/${infuraApiKey}`,
chainId: 11155111,
Expand All @@ -38,14 +33,14 @@ function getNetworks(): NetworksUserConfig {
chainId: 80001,
accounts
},
"optimism-goerli": {
url: `https://optimism-goerli.infura.io/v3/${infuraApiKey}`,
chainId: 420,
"optimism-sepolia": {
url: `https://optimism-sepolia.infura.io/v3/${infuraApiKey}`,
chainId: 11155420,
accounts
},
"arbitrum-goerli": {
url: "https://goerli-rollup.arbitrum.io/rpc",
chainId: 421613,
"arbitrum-sepolia": {
url: "https://sepolia-rollup.arbitrum.io/rpc",
chainId: 7745327,
accounts
},
arbitrum: {
Expand Down
8 changes: 4 additions & 4 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ Options:

Commands:
create [options] [project-directory] Create a Semaphore project with a supported template.
get-groups [options] Get the list of groups from a supported network (e.g. goerli or arbitrum).
get-group [options] [group-id] Get the data of a group from a supported network (e.g. goerli or arbitrum).
get-members [options] [group-id] Get the members of a group from a supported network (e.g. goerli or arbitrum).
get-proofs [options] [group-id] Get the proofs of a group from a supported network (e.g. goerli or arbitrum).
get-groups [options] Get the list of groups from a supported network (e.g. sepolia or arbitrum).
cedoor marked this conversation as resolved.
Show resolved Hide resolved
get-group [options] [group-id] Get the data of a group from a supported network (e.g. sepolia or arbitrum).
get-members [options] [group-id] Get the members of a group from a supported network (e.g. sepolia or arbitrum).
get-proofs [options] [group-id] Get the proofs of a group from a supported network (e.g. sepolia or arbitrum).
help [command] Display help for a specific command.
```
8 changes: 4 additions & 4 deletions packages/cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ program

program
.command("get-groups")
.description("Get the list of groups from a supported network (e.g. goerli or arbitrum).")
.description("Get the list of groups from a supported network (e.g. sepolia or arbitrum).")
cedoor marked this conversation as resolved.
Show resolved Hide resolved
.option("-n, --network <network-name>", "Supported Ethereum network.")
.allowExcessArguments(false)
.action(async ({ network }) => {
Expand Down Expand Up @@ -146,7 +146,7 @@ program

program
.command("get-group")
.description("Get the data of a group from a supported network (e.g. goerli or arbitrum).")
.description("Get the data of a group from a supported network (e.g. sepolia or arbitrum).")
.argument("[group-id]", "Identifier of the group.")
.option("-n, --network <network-name>", "Supported Ethereum network.")
.allowExcessArguments(false)
Expand Down Expand Up @@ -217,7 +217,7 @@ program

program
.command("get-members")
.description("Get the members of a group from a supported network (e.g. goerli or arbitrum).")
.description("Get the members of a group from a supported network (e.g. sepolia or arbitrum).")
.argument("[group-id]", "Identifier of the group.")
.option("-n, --network <network-name>", "Supported Ethereum network.")
.allowExcessArguments(false)
Expand Down Expand Up @@ -283,7 +283,7 @@ program

program
.command("get-proofs")
.description("Get the proofs of a group from a supported network (e.g. goerli or arbitrum).")
.description("Get the proofs of a group from a supported network (e.g. sepolia or arbitrum).")
.argument("[group-id]", "Identifier of the group.")
.option("-n, --network <network-name>", "Supported Ethereum network.")
.allowExcessArguments(false)
Expand Down
8 changes: 4 additions & 4 deletions packages/contracts/contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@ yarn deploy:semaphore --semaphoreVerifier <address>
> **Note**
> Run `yarn deploy:semaphore --help` to see the complete list.

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, goerli, arbitrum). Or you can specify it as an option:
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:

```bash
yarn deploy:semaphore --network goerli
yarn deploy:semaphore --network sepolia
yarn deploy:semaphore --network mumbai
yarn deploy:semaphore --network optimism-goerli
yarn deploy:semaphore --network optimism-sepolia
yarn deploy:semaphore --network arbitrum-sepolia
yarn deploy:semaphore --network arbitrum
```

If you want to deploy contracts on Goerli or Arbitrum, remember to provide a valid private key and an Infura API in your `.env` file.
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.
17 changes: 6 additions & 11 deletions packages/contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ function getNetworks(): NetworksUserConfig {
const accounts = [`0x${process.env.BACKEND_PRIVATE_KEY}`]

return {
goerli: {
url: `https://goerli.infura.io/v3/${infuraApiKey}`,
chainId: 5,
accounts
},
sepolia: {
url: `https://sepolia.infura.io/v3/${infuraApiKey}`,
chainId: 11155111,
Expand All @@ -37,14 +32,14 @@ function getNetworks(): NetworksUserConfig {
chainId: 80001,
accounts
},
"optimism-goerli": {
url: `https://optimism-goerli.infura.io/v3/${infuraApiKey}`,
chainId: 420,
"optimism-sepolia": {
url: `https://optimism-sepolia.infura.io/v3/${infuraApiKey}`,
chainId: 11155420,
accounts
},
"arbitrum-goerli": {
url: "https://goerli-rollup.arbitrum.io/rpc",
chainId: 421613,
"arbitrum-sepolia": {
url: "https://sepolia-rollup.arbitrum.io/rpc",
chainId: 7745327,
accounts
},
arbitrum: {
Expand Down
2 changes: 1 addition & 1 deletion packages/data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ await semaphoreSubgraph.isGroupMember(
)
```

\# **new Ethers**(networkOrEthereumURL: Network | string = "goerli", options: EthersOptions = {}): _SemaphoreEthers_
\# **new Ethers**(networkOrEthereumURL: Network | string = "sepolia", options: EthersOptions = {}): _SemaphoreEthers_

```typescript
import { SemaphoreEthers } from "@semaphore-protocol/data"
Expand Down
Loading
Loading