Skip to content

Commit af364bd

Browse files
authored
Merge pull request #14 from bobanetwork/update-subgraph
Update subgraph to use TheGraph
2 parents 0f67cee + d4022b3 commit af364bd

8 files changed

+222
-108
lines changed

jest.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const config = {
2020
"lcov"
2121
],
2222
testTimeout: 60000,
23+
setupFiles: ['<rootDir>/jest.setup.js']
2324
};
2425

2526
export default config;

jest.setup.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require('dotenv').config();

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
"@apollo/client": "3.5.10",
2828
"@ethersproject/providers": "^5.7.2",
2929
"@types/jest": "^29.5.12",
30-
"dotenv": "^16.4.5",
3130
"ethers": "^5.5.4",
3231
"graphql": "^16.8.2",
3332
"node-fetch": "^2.6.1",
@@ -36,6 +35,7 @@
3635
"devDependencies": {
3736
"@types/node": "^16.18.62",
3837
"@types/node-fetch": "^2.6.11",
38+
"dotenv": "^16.4.5",
3939
"jest": "^29.7.0",
4040
"jest-config": "^29.7.0",
4141
"jest-coverage-badges": "^1.1.2",

pnpm-lock.yaml

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/graphql.service.ts

+7-8
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if (!fetchLib) {
1919
export class GraphQLService {
2020
private readonly apikey = process.env.REACT_APP_THE_GRAPH_API_KEY
2121

22-
private readonly uri = `https://gateway-arbitrum.network.thegraph.com/api/${this.apikey}/subgraphs/id`
22+
private readonly uri = `https://gateway.thegraph.com/api/${this.apikey}/subgraphs/id`
2323

2424
private withSubgraphId(subgraphId: string) {
2525
return `${this.uri}/${subgraphId}`
@@ -67,11 +67,10 @@ export class GraphQLService {
6767
// Boba BNB
6868
56288: {
6969
[EGraphQLService.LightBridge]: {
70-
gql: 'https://graphql.bnb.boba.network/subgraphs/name/boba-bnb-l2/',
71-
local: '',
70+
gql: this.withSubgraphId('C3ShFVy1GV81GUb9u3Zw1rSQ7oJjegSF3LswvvYa3XgD'),
7271
},
7372
[EGraphQLService.AnchorageBridge]: {
74-
gql: 'https://graphql.bnb.boba.network/subgraphs/name/anchorage-bridging-boba-bnb',
73+
gql: this.withSubgraphId('BmJU8RagxZSKoxwYFVScC7TaJZj9PHGvukXiJhES882a'),
7574
},
7675
},
7776
// BSC
@@ -94,11 +93,11 @@ export class GraphQLService {
9493
// Boba BNB testnet
9594
9728: {
9695
[EGraphQLService.LightBridge]: {
97-
gql: 'https://graphql.testnet.bnb.boba.network/subgraphs/name/boba-bnb-l2-testnet/',
96+
gql: this.withSubgraphId('HnbxKbpVhKeAWQ6jGUZ64wsjcsnEtyyVqU6QMiAsyPR7'),
9897
local: 'http://127.0.0.1:8002/subgraphs/name/boba/Bridges',
9998
},
10099
[EGraphQLService.AnchorageBridge]: {
101-
gql: 'https://graphql.testnet.bnb.boba.network/subgraphs/name/anchorage-bridging-boba-bnb-testnet/',
100+
gql: this.withSubgraphId('46zszHi762PDutPntNcsLSDvms4eufEugwb26DkVCyzW'),
102101
},
103102
},
104103
// Arbitrum Sepolia
@@ -131,10 +130,10 @@ export class GraphQLService {
131130
// Boba Sepolia
132131
28882: {
133132
[EGraphQLService.AnchorageBridge]: {
134-
gql: 'https://graphql.sepolia.boba.network/subgraphs/name/anchorage-bridging-sepolia',
133+
gql: this.withSubgraphId('AKb9A3KPkMtwm9TPMtUxKH75yZXHyrY5PCwwCcmzQpMj'),
135134
},
136135
[EGraphQLService.LightBridge]: {
137-
gql: 'https://graphql.sepolia.boba.network/subgraphs/name/light-bridge-boba-sepolia',
136+
gql: this.withSubgraphId('CdmAWxs3LDCnm4jekfcdPxaLsFynuZ3XgeuM7AcdU3xr'),
138137
local: '',
139138
},
140139
},

0 commit comments

Comments
 (0)