Skip to content

Commit 00e3c4a

Browse files
committed
feat(data): add support for optimism goerli network
re #234 Former-commit-id: 3722b15
1 parent 0176a67 commit 00e3c4a

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
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/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
}

0 commit comments

Comments
 (0)