Skip to content

Commit

Permalink
Merge pull request #12 from gnosischain/feat/add-sub-graphs
Browse files Browse the repository at this point in the history
Integrate subgraphs for fetching & caching validator registry contract logs
  • Loading branch information
verkhohliad authored Aug 2, 2024
2 parents 9961a0a + 7b544c6 commit 6f8036a
Show file tree
Hide file tree
Showing 40 changed files with 13,253 additions and 78 deletions.
3 changes: 2 additions & 1 deletion .env-example
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
VITE_WALLET_CONNECT_PROJECT_ID=
VITE_WALLET_CONNECT_PROJECT_ID=
VITE_THE_GRAPH_API_KEY=
245 changes: 245 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"deploy": "npm run build & firebase deploy --only hosting:gnosis-shutter"
},
"dependencies": {
"@apollo/client": "^3.11.1",
"@nextui-org/react": "^2.3.6",
"@tanstack/react-query": "^5.45.1",
"@web3modal/wagmi": "^5.0.6",
Expand Down
11 changes: 9 additions & 2 deletions src/constants/chains.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { gnosis, gnosisChiado, type Chain } from "wagmi/chains";
import { type Address } from "viem";
import { gnosis, gnosisChiado, type Chain } from 'wagmi/chains';
import { type Address } from 'viem';

import config from '@/constants/config';

type Token = {
address: string;
Expand Down Expand Up @@ -32,6 +34,7 @@ type EnhancedChain = Chain & {
gbcUrl: string;
genesisTime: number;
tokens: Token[];
theGraphUrl: string,
};

type ChainMap = {
Expand Down Expand Up @@ -86,6 +89,8 @@ export const CHAINS: EnhancedChain[] = [
img: "/gnosisGreen.svg",
},
],
// theGraphUrl: `https://api.studio.thegraph.com/query/83608/m-shutter-validator-registry/мv0.0.2`,
theGraphUrl: `https://gateway-arbitrum.network.thegraph.com/api/${config.theGraphApiKey}/subgraphs/id/GkoCJAFgEvt6UWQkG3W1JpR2tDtRmUkUXCcHjrrz2M4E`,
},
{
...gnosisChiado,
Expand Down Expand Up @@ -127,6 +132,8 @@ export const CHAINS: EnhancedChain[] = [
img: "/gnosisGreen.svg",
},
],
// https://api.studio.thegraph.com/query/83608/shutter-validator-registry/v0.0.1
theGraphUrl: `https://gateway-arbitrum.network.thegraph.com/api/${config.theGraphApiKey}/subgraphs/id/6An9eFzxuuEqPWncZVP6Gr1nEpx4ktz87Re4zANo3Z9`,
},
];

Expand Down
1 change: 1 addition & 0 deletions src/constants/config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export default {
walletConnectProjectId: import.meta.env.VITE_WALLET_CONNECT_PROJECT_ID,
theGraphApiKey: import.meta.env.VITE_THE_GRAPH_API_KEY,
}
Loading

0 comments on commit 6f8036a

Please sign in to comment.