Skip to content

Commit

Permalink
(feat): add support for querying from multiple chains at the same time
Browse files Browse the repository at this point in the history
  • Loading branch information
Jipperism committed Mar 26, 2024
1 parent bf0a66b commit 05c014b
Show file tree
Hide file tree
Showing 8 changed files with 170 additions and 75 deletions.
17 changes: 10 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@graphql-typed-document-node/core": "^3.2.0",
"@hypercerts-org/contracts": "1.1.2",
"@openzeppelin/merkle-tree": "^1.0.5",
"@urql/core": "^4.2.0",
"@urql/core": "^4.3.0",
"@whatwg-node/fetch": "^0.9.13",
"ajv": "^8.11.2",
"axios": "^1.6.2",
Expand All @@ -35,7 +35,8 @@
"graphql": "^16.8.1",
"loglevel": "^1.8.1",
"urql": "^4.0.6",
"viem": "^1.21.4"
"viem": "^1.21.4",
"wonka": "^6.3.4"
},
"devDependencies": {
"@babel/core": "^7.23.5",
Expand Down
7 changes: 6 additions & 1 deletion sdk/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import { Deployment, SupportedChainIds } from "./types";
import { deployments } from "@hypercerts-org/contracts";

const DEFAULT_GRAPH_BASE_URL = "https://api.thegraph.com/subgraphs/name/hypercerts-admin";
const DEFAULT_GRAPH_BASE_URL = "https://api.thegraph.com/subgraphs/name/hypercerts-org";

// The APIs we expose

Expand All @@ -20,26 +20,31 @@ const DEPLOYMENTS: { [key in SupportedChainIds]: Partial<Deployment> } = {
addresses: deployments[10],
graphName: "hypercerts-optimism-mainnet",
graphUrl: `${DEFAULT_GRAPH_BASE_URL}/hypercerts-optimism-mainnet`,
isTestnet: false,
} as const,
42220: {
addresses: deployments[42220],
graphName: "hypercerts-celo",
graphUrl: `${DEFAULT_GRAPH_BASE_URL}/hypercerts-celo`,
isTestnet: false,
},
11155111: {
addresses: deployments[11155111],
graphName: "hypercerts-sepolia",
graphUrl: `${DEFAULT_GRAPH_BASE_URL}/hypercerts-sepolia`,
isTestnet: true,
} as const,
84532: {
addresses: deployments[84532],
graphName: "hypercerts-base-sepolia",
graphUrl: `${DEFAULT_GRAPH_BASE_URL}/hypercerts-base-sepolia`,
isTestnet: true,
} as const,
8453: {
addresses: deployments[8453],
graphName: "hypercerts-base-mainnet",
graphUrl: `${DEFAULT_GRAPH_BASE_URL}/hypercerts-base-mainnet`,
isTestnet: false,
} as const,
};

Expand Down
Loading

0 comments on commit 05c014b

Please sign in to comment.