Skip to content

Commit aa23034

Browse files
authored
Merge pull request #270 from semaphore-protocol/chore/optimism-goerli
Semaphore support for Optimism Goerli network Former-commit-id: 6344cf4
2 parents d5c24c0 + 00e3c4a commit aa23034

File tree

7 files changed

+18
-6
lines changed

7 files changed

+18
-6
lines changed

packages/cli/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import Spinner from "./spinner.js"
1414
const packagePath = `${dirname(fileURLToPath(import.meta.url))}/..`
1515
const { description, version } = JSON.parse(readFileSync(`${packagePath}/package.json`, "utf8"))
1616

17-
const supportedNetworks = ["goerli", "mumbai", "arbitrum"]
17+
const supportedNetworks = ["goerli", "mumbai", "optimism-goerli", "arbitrum"]
1818

1919
program
2020
.name("semaphore")

packages/contracts/contracts/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ If you want to deploy your contract in a specific network you can set up the `DE
113113
yarn deploy:semaphore --network goerli
114114
yarn deploy:semaphore --network sepolia
115115
yarn deploy:semaphore --network mumbai
116+
yarn deploy:semaphore --network optimism-goerli
116117
yarn deploy:semaphore --network arbitrum
117118
```
118119

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"Pairing": "0xEFD83f827FA5B0496359D817c6CD8a5AA5D2aCe5",
3+
"SemaphoreVerifier": "0x3d3df6CFc6BFf68d9693e097F32bF4a9903E77a5",
4+
"Poseidon": "0x5f4edC58142f4395D1D536e793137A0252dA5a49",
5+
"IncrementalBinaryTree": "0x181B7f34538cE3BceC68597d4A212aB3f7881648",
6+
"Semaphore": "0x220fBdB6F996827b1Cf12f0C181E8d5e6de3a36F"
7+
}

packages/contracts/hardhat.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ function getNetworks(): NetworksUserConfig {
4040
chainId: 80001,
4141
accounts
4242
},
43+
"optimism-goerli": {
44+
url: `https://optimism-goerli.infura.io/v3/${infuraApiKey}`,
45+
chainId: 420,
46+
accounts
47+
},
4348
arbitrum: {
4449
url: `https://arbitrum-mainnet.infura.io/v3/${infuraApiKey}`,
4550
chainId: 42161,

packages/contracts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"devDependencies": {
1818
"@nomicfoundation/hardhat-chai-matchers": "^1.0.5",
1919
"@nomiclabs/hardhat-ethers": "^2.0.6",
20-
"@nomiclabs/hardhat-etherscan": "^3.1.0",
20+
"@nomiclabs/hardhat-etherscan": "^3.1.7",
2121
"@semaphore-protocol/group": "workspace:packages/group",
2222
"@semaphore-protocol/identity": "workspace:packages/identity",
2323
"@semaphore-protocol/proof": "workspace:packages/proof",

packages/data/src/getURL.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ import { Network } from "./types"
88
export default function getURL(network: Network): string {
99
switch (network) {
1010
case "goerli":
11-
return `https://api.studio.thegraph.com/query/14377/semaphore-goerli/v3.2.0`
1211
case "mumbai":
13-
return `https://api.studio.thegraph.com/query/14377/semaphore-mumbai/v3.2.0`
12+
case "optimism-goerli":
1413
case "arbitrum":
15-
return `https://api.studio.thegraph.com/query/14377/semaphore-arbitrum/v3.2.0`
14+
return `https://api.studio.thegraph.com/query/14377/semaphore-${network}/v3.2.0`
1615
default:
1716
throw new TypeError(`Network '${network}' is not supported`)
1817
}

yarn.lock.REMOVED.git-id

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4afd92a35c46c7567b0bc44b3cb38472826bd9f0
1+
dcbb0ad50ab2cbd987f3c326d9a4812d692159a1

0 commit comments

Comments
 (0)