Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2ac6262

Browse files
committedDec 20, 2023
refactor: both the core and drt subgraphs
1 parent b728ee7 commit 2ac6262

39 files changed

+111
-91
lines changed
 

‎.github/workflows/deploy-subgraph.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,20 @@ on:
66
network:
77
description: The network to deploy the subgraph to
88
required: true
9-
default: 'arbitrum-goerli'
9+
default: 'arbitrum-sepolia'
1010
type: choice
1111
options:
12-
- arbitrum-goerli-devnet
13-
- arbitrum-goerli
12+
- arbitrum-sepolia-devnet
13+
- arbitrum-sepolia
1414
- arbitrum
15+
subgraph:
16+
description: The name of the subgraph to deploy
17+
required: true
18+
default: 'core'
19+
type: choice
20+
options:
21+
- core
22+
- drt
1523
update:
1624
description: Whether to update the subgraph with the current artifacts for the selected network.
1725
required: true
@@ -58,19 +66,19 @@ jobs:
5866
if: ${{ inputs.update }}
5967
run: |
6068
export PATH=$PWD/../bin:$PATH
61-
yarn update:${{ inputs.network }}
69+
yarn update:${{ inputs.subgraph }}:${{ inputs.network }}
6270
working-directory: subgraph
6371

6472
- name: Build the subgraph
6573
run: |
66-
yarn codegen
67-
yarn build
74+
yarn codegen:${{ inputs.subgraph }}
75+
yarn build:${{ inputs.subgraph }}
6876
working-directory: subgraph
6977

7078
- name: Authenticate with TheGraph
7179
run: yarn graph auth "${{ secrets.SUBGRAPH_AUTH_TOKEN }}" --product hosted-service
7280
working-directory: subgraph
7381

7482
- name: Deploy the subgraph
75-
run: yarn deploy:${{ inputs.network }}
83+
run: yarn deploy:${{ inputs.subgraph }}:${{ inputs.network }}
7684
working-directory: subgraph

‎subgraph/README.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,30 @@
22

33
## Deployments
44

5-
### Arbitrum Sepolia (hosted service)
5+
### Testnet
66

7-
- [Subgraph explorer](https://thegraph.com/explorer/subgraph/kleros/kleros-v2-core-arbitrum-sepolia)
8-
- [Subgraph endpoints](https://api.thegraph.com/subgraphs/name/kleros/kleros-v2-core-arbitrum-sepolia)
7+
- [Core](https://thegraph.com/studio/subgraph/kleros-v2-core-testnet/)
8+
- [Dispute Registry Template - Arbitrum Sepolia](https://thegraph.com/studio/subgraph/kleros-v2-drt-arbisep-testnet/)
9+
10+
### Devnet
11+
12+
- [Core](https://thegraph.com/studio/subgraph/kleros-v2-core-devnet/)
13+
- [Dispute Registry Template - Arbitrum Sepolia](https://thegraph.com/studio/subgraph/kleros-v2-drt-arbisep-devnet/)
14+
- [Dispute Registry Template - Gnosis]()
15+
- [Dispute Registry Template - Sepolia]()
916

1017
## Build
1118

1219
```bash
1320
# update subgraph.yml using the contract deployment artifacts
14-
$ yarn update:arbitrum-sepolia
21+
$ yarn update:arbitrum-sepolia-devnet
1522

1623
$ yarn codegen
1724

1825
$ yarn build
1926
```
2027

21-
## Deployment to The Graph (hosted service)
28+
## Deployment to The Graph Studio
2229

2330
### Using a personal account for development
2431

@@ -27,13 +34,13 @@ $ yarn build
2734
Get an API key from the thegraph.com, then authenticate.
2835

2936
```bash
30-
$ yarn run graph auth --product hosted-service
37+
$ yarn run graph auth --studio
3138
```
3239

3340
#### Deployment
3441

3542
```bash
36-
yarn deploy:arbitrum-sepolia
43+
yarn deploy:arbitrum-sepolia-devnet
3744
```
3845

3946
### Using the Kleros organization account
File renamed without changes.
File renamed without changes.

‎subgraph/src/HomeGateway.ts renamed to ‎subgraph/core/src/HomeGateway.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
import {
2-
HomeGateway,
3-
Dispute as DisputeEvent,
4-
} from "../generated/HomeGateway/HomeGateway";
5-
import {
6-
GatewayDispute
7-
} from "../generated/schema";
1+
import { HomeGateway, Dispute as DisputeEvent } from "../generated/HomeGateway/HomeGateway";
2+
import { GatewayDispute } from "../generated/schema";
83

94
export function handleDisputeEvent(event: DisputeEvent): void {
105
const contract = HomeGateway.bind(event.address);
File renamed without changes.
File renamed without changes.
File renamed without changes.

‎subgraph/src/entities/ClassicContribution.ts renamed to ‎subgraph/core/src/entities/ClassicContribution.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
import { ClassicContribution } from "../../generated/schema";
2-
import {
3-
Contribution as ContributionEvent,
4-
Withdrawal,
5-
} from "../../generated/DisputeKitClassic/DisputeKitClassic";
2+
import { Contribution as ContributionEvent, Withdrawal } from "../../generated/DisputeKitClassic/DisputeKitClassic";
63
import { DISPUTEKIT_ID } from "../DisputeKitClassic";
74

8-
export function ensureClassicContributionFromEvent<T>(
9-
event: T
10-
): ClassicContribution | null {
5+
export function ensureClassicContributionFromEvent<T>(event: T): ClassicContribution | null {
116
if (!(event instanceof ContributionEvent) && !(event instanceof Withdrawal)) {
127
return null;
138
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

‎subgraph/subgraph.yaml renamed to ‎subgraph/core/subgraph.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ dataSources:
2626
- Counter
2727
abis:
2828
- name: DisputeKitClassic
29-
file: ../contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json
29+
file: ../../contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json
3030
- name: KlerosCore
31-
file: ../contracts/deployments/arbitrumSepoliaDevnet/KlerosCore.json
31+
file: ../../contracts/deployments/arbitrumSepoliaDevnet/KlerosCore.json
3232
eventHandlers:
3333
- event: AppealDecision(indexed uint256,indexed address)
3434
handler: handleAppealDecision
@@ -75,7 +75,7 @@ dataSources:
7575
- Court
7676
abis:
7777
- name: PolicyRegistry
78-
file: ../contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry.json
78+
file: ../../contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry.json
7979
eventHandlers:
8080
- event: PolicyUpdate(indexed uint256,string,string)
8181
handler: handlePolicyUpdate
@@ -98,9 +98,9 @@ dataSources:
9898
- ClassicContribution
9999
abis:
100100
- name: DisputeKitClassic
101-
file: ../contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json
101+
file: ../../contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json
102102
- name: KlerosCore
103-
file: ../contracts/deployments/arbitrumSepoliaDevnet/KlerosCore.json
103+
file: ../../contracts/deployments/arbitrumSepoliaDevnet/KlerosCore.json
104104
eventHandlers:
105105
- event: DisputeCreation(indexed uint256,uint256,bytes)
106106
handler: handleDisputeCreation
@@ -131,7 +131,7 @@ dataSources:
131131
- ClassicEvidence
132132
abis:
133133
- name: EvidenceModule
134-
file: ../contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule.json
134+
file: ../../contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule.json
135135
eventHandlers:
136136
- event: Evidence(indexed uint256,indexed address,string)
137137
handler: handleEvidenceEvent
File renamed without changes.

‎subgraph/package.json

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,37 @@
22
"name": "@kleros/kleros-v2-subgraph",
33
"license": "MIT",
44
"scripts": {
5-
"update:core:arbitrum-sepolia": "./scripts/update.sh arbitrumSepolia arbitrum-sepolia",
6-
"update:core:arbitrum-sepolia-devnet": "./scripts/update.sh arbitrumSepoliaDevnet arbitrum-sepolia",
7-
"update:core:arbitrum": "./scripts/update.sh arbitrum arbitrum",
8-
"update:core:local": "./scripts/update.sh localhost mainnet",
9-
"codegen:core": "graph codegen",
10-
"build:core": "graph build",
11-
"test:core": "graph test",
12-
"clean:core": "graph clean && rm subgraph.yaml.bak.*",
13-
"deploy:core:arbitrum-sepolia": "graph deploy --product subgraph-studio kleros-v2-core-testnet-3 -l v0.0.1",
14-
"deploy:core:arbitrum-sepolia-devnet": "graph deploy --product subgraph-studio kleros-v2-core-devnet -l v0.0.1",
15-
"deploy:core:arbitrum": "graph deploy --product subgraph-studio kleros-v2-core -l v0.0.1",
16-
"update:dr:arbitrum-sepolia": "TODO",
17-
"update:dr:arbitrum-sepolia-devnet": "TODO",
18-
"update:dr:arbitrum": "TODO",
19-
"update:dr:local": "TODO",
20-
"codegen:dr": "cd DisputeTemplateRegistry && graph codegen ./subgraph.yaml",
21-
"build:dr": "cd DisputeTemplateRegistry && graph build ./subgraph.yaml",
22-
"test:dr": "TODO",
23-
"clean:dr": "cd DisputeTemplateRegistry && graph clean ./subgraph.yaml",
24-
"deploy:dr:arbitrum-sepolia-devnet": "cd DisputeTemplateRegistry && graph deploy --product subgraph-studio kleros-v2-dr-devnet -l v0.0.1 ./subgraph.yaml",
5+
"update:core:arbitrum-sepolia-devnet": "./scripts/update.sh arbitrumSepoliaDevnet arbitrum-sepolia core/subgraph.yaml",
6+
"update:core:arbitrum-sepolia": "./scripts/update.sh arbitrumSepolia arbitrum-sepolia core/subgraph.yaml",
7+
"update:core:arbitrum": "./scripts/update.sh arbitrum arbitrum core/subgraph.yaml",
8+
"update:core:local": "./scripts/update.sh localhost mainnet core/subgraph.yaml",
9+
"codegen:core": "graph codegen --output-dir core/generated/ core/subgraph.yaml",
10+
"build:core": "graph build --output-dir core/build/ core/subgraph.yaml",
11+
"test:core": "cd core && graph test",
12+
"clean:core": "graph clean --codegen-dir core/generated/ --build-dir core/build/ && rm core/subgraph.yaml.bak.*",
13+
"deploy:core:arbitrum-sepolia-devnet": "graph deploy --product subgraph-studio kleros-v2-core-devnet -l v0.0.1 core/subgraph.yaml",
14+
"deploy:core:arbitrum-sepolia": "graph deploy --product subgraph-studio kleros-v2-core-testnet -l v0.0.1 core/subgraph.yaml",
15+
"deploy:core:arbitrum": "graph deploy --product subgraph-studio kleros-v2-core -l v0.0.1 core/subgraph.yaml",
16+
"": "------------------------------------------------------------------------------------------",
17+
"update:drt:arbitrum-sepolia-devnet": "./scripts/update.sh arbitrumSepoliaDevnet arbitrum-sepolia dispute-template-registry/subgraph.yaml",
18+
"update:drt:arbitrum-sepolia": "./scripts/update.sh arbitrumSepolia arbitrum-sepolia dispute-template-registry/subgraph.yaml",
19+
"update:drt:arbitrum": "./scripts/update.sh arbitrum arbitrum dispute-template-registry/subgraph.yaml",
20+
"update:drt:local": "./scripts/update.sh localhost mainnet dispute-template-registry/subgraph.yaml",
21+
"codegen:drt": "graph codegen --output-dir dispute-template-registry/generated/ dispute-template-registry/subgraph.yaml",
22+
"build:drt": "graph build --output-dir dispute-template-registry/generated/ dispute-template-registry/subgraph.yaml",
23+
"test:drt": "cd dispute-template-registry && graph test ",
24+
"clean:drt": "graph clean --codegen-dir dispute-template-registry/generated/ --build-dir dispute-template-registry/build/ && rm dispute-template-registry/subgraph.yaml.bak.*",
25+
"deploy:drt:arbitrum-sepolia-devnet": "graph deploy --product subgraph-studio kleros-v2-drt-arbisep-devnet -l v0.0.1 dispute-template-registry/subgraph.yaml",
26+
"deploy:drt:arbitrum-sepolia": "graph deploy --product subgraph-studio kleros-v2-drt-arbisep-testnet -l v0.0.1 dispute-template-registry/subgraph.yaml",
27+
" ": "-----------------------------------------------------------------------------------------",
28+
"update:arbitrum-sepolia-devnet": "./scripts/all.sh update arbitrum-sepolia-devnet",
29+
"update:arbitrum-sepolia": "./scripts/all.sh update arbitrum-sepolia",
30+
"update:arbitrum": "./scripts/all.sh update arbitrum",
31+
"update:local": "./scripts/all.sh update local",
32+
"clean": "./scripts/all.sh clean",
33+
"codegen": "./scripts/all.sh codegen",
34+
"build": "./scripts/all.sh build",
35+
" ": "----------------------------------------------------------------------------------------",
2536
"create-local": "graph create --node http://localhost:8020/ kleros/kleros-v2-core-local",
2637
"remove-local": "graph remove --node http://localhost:8020/ kleros/kleros-v2-core-local",
2738
"deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 kleros/kleros-v2-core-local --version-label v$(date +%s)",

‎subgraph/scripts/all.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
3+
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
4+
5+
cmdPrefix="$1"
6+
cmdPostfix="$2"
7+
if [ -z "$cmdPrefix" ]
8+
then
9+
echo "Usage: $(basename $0) <cmdPrefix> [<cmdPostfix>]"
10+
exit 1
11+
fi
12+
13+
for subgraph in core drt
14+
do
15+
echo "Running for $subgraph"
16+
yarn "${cmdPrefix}:${subgraph}${cmdPostfix:+:}${cmdPostfix}"
17+
done

‎subgraph/scripts/update.sh

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,32 @@
22

33
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
44

5-
function update() #hardhatNetwork #graphNetwork #dataSourceIndex #contract
5+
function update() #hardhatNetwork #graphNetwork #subgraphConfig #dataSourceIndex #contract
66
{
77
local hardhatNetwork="$1"
88
local graphNetwork="$2"
9-
local dataSourceIndex="$3"
10-
local contract="$4"
9+
local subgraphConfig="$3"
10+
local dataSourceIndex="$4"
11+
local contract="$5"
1112
local artifact="$SCRIPT_DIR/../../contracts/deployments/$hardhatNetwork/$contract.json"
1213

1314
# Set the address
1415
address=$(cat "$artifact" | jq '.address')
15-
yq -i ".dataSources[$dataSourceIndex].source.address=$address" "$SCRIPT_DIR"/../subgraph.yaml
16+
yq -i ".dataSources[$dataSourceIndex].source.address=$address" "$subgraphConfig"
1617

1718
# Set the start block
1819
blockNumber="$(cat "$artifact" | jq '.receipt.blockNumber')"
19-
yq -i ".dataSources[$dataSourceIndex].source.startBlock=$blockNumber" "$SCRIPT_DIR"/../subgraph.yaml
20+
yq -i ".dataSources[$dataSourceIndex].source.startBlock=$blockNumber" "$subgraphConfig"
2021

2122
# Set the Graph network
22-
graphNetwork=$graphNetwork yq -i ".dataSources[$dataSourceIndex].network=env(graphNetwork)" "$SCRIPT_DIR"/../subgraph.yaml
23+
graphNetwork=$graphNetwork yq -i ".dataSources[$dataSourceIndex].network=env(graphNetwork)" "$subgraphConfig"
2324

2425
# Set the ABIs path for this Hardhat network
2526
abiIndex=0
26-
for f in $(yq e .dataSources[$dataSourceIndex].mapping.abis[].file subgraph.yaml -o json -I 0 | jq -sr '.[]')
27+
for f in $(yq e .dataSources[$dataSourceIndex].mapping.abis[].file "$subgraphConfig" -o json -I 0 | jq -sr '.[]')
2728
do
2829
f2=$(echo $f | sed "s|\(.*\/deployments\/\).*\/|\1$hardhatNetwork\/|")
29-
yq -i ".dataSources[$dataSourceIndex].mapping.abis[$abiIndex].file=\"$f2\"" "$SCRIPT_DIR"/../subgraph.yaml
30+
yq -i ".dataSources[$dataSourceIndex].mapping.abis[$abiIndex].file=\"$f2\"" "$subgraphConfig"
3031
(( ++abiIndex ))
3132
done
3233
}
@@ -36,13 +37,16 @@ hardhatNetwork=${1:-arbitrumSepolia}
3637

3738
# as per https://thegraph.com/docs/en/developing/supported-networks/
3839
graphNetwork=${2:-arbitrum\-sepolia}
39-
i=0
40+
41+
subgraphConfig="$SCRIPT_DIR/../${3:-core\/subgraph.yaml}"
42+
echo "Updating $subgraphConfig"
4043

4144
# backup
42-
cp "$SCRIPT_DIR"/../subgraph.yaml "$SCRIPT_DIR"/../subgraph.yaml.bak.$(date +%s)
45+
cp "$subgraphConfig" "$subgraphConfig.bak.$(date +%s)"
4346

44-
for contract in $(yq .dataSources[].name "$SCRIPT_DIR"/../subgraph.yaml)
47+
i=0
48+
for contract in $(yq .dataSources[].name "$subgraphConfig")
4549
do
46-
update $hardhatNetwork $graphNetwork $i $contract
50+
update $hardhatNetwork $graphNetwork "$subgraphConfig" $i $contract
4751
(( ++i ))
4852
done

‎web/.env.devnet.public

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Do not enter sensitive information here.
22
export REACT_APP_DEPLOYMENT=devnet
3-
export REACT_APP_KLEROS_CORE_SUBGRAPH_DEVNET=https://api.studio.thegraph.com/query/61688/kleros-v2-core-devnet/v0.0.1
4-
export REACT_APP_DISPUTE_TEMPLATE_ARBSEPOLIA_SUBGRAPH_DEVNET=https://api.studio.thegraph.com/query/61688/kleros-v2-dr-devnet/v0.0.1
3+
export REACT_APP_CORE_SUBGRAPH=https://api.studio.thegraph.com/query/61738/kleros-v2-core-devnet/v0.0.1
4+
export REACT_APP_DRT_ARBSEPOLIA_SUBGRAPH=https://api.studio.thegraph.com/query/61738/kleros-v2-drt-arbisep-devnet/v0.0.1
55
export REACT_APP_STATUS_URL=https://kleros-v2-devnet.betteruptime.com/badge

‎web/.env.local.public

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Do not enter sensitive information here.
22
export REACT_APP_DEPLOYMENT=devnet
3-
export REACT_APP_KLEROS_CORE_SUBGRAPH_DEVNET=http://localhost:8000/subgraphs/name/kleros/kleros-v2-core-local
4-
export REACT_APP_DISPUTE_TEMPLATE_ARBSEPOLIA_SUBGRAPH_DEVNET=https://api.thegraph.com/subgraphs/name/alcercu/templateregistrydevnet
3+
export REACT_APP_CORE_SUBGRAPH=http://localhost:8000/subgraphs/name/kleros/kleros-v2-core-local
4+
export REACT_APP_DRT_ARBSEPOLIA_SUBGRAPH=https://api.thegraph.com/subgraphs/name/alcercu/templateregistrydevnet

‎web/.env.testnet.public

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Do not enter sensitive information here.
22
export REACT_APP_DEPLOYMENT=testnet
3-
export REACT_APP_KLEROS_CORE_SUBGRAPH_TESTNET=REDEPLOY SUBGRAPH IN ARBSEPOLIA AND PUT API THEGRAPH LINK HERE
4-
export REACT_APP_DISPUTE_TEMPLATE_ARBSEPOLIA_SUBGRAPH_TESTNET=REDEPLOY SUBGRAPH IN ARBSEPOLIA AND PUT API THEGRAPH LINK HERE
3+
export REACT_APP_CORE_SUBGRAPH=REDEPLOY SUBGRAPH IN ARBSEPOLIA AND PUT API THEGRAPH LINK HERE
4+
export REACT_APP_DRT_ARBSEPOLIA_SUBGRAPH=REDEPLOY SUBGRAPH IN ARBSEPOLIA AND PUT API THEGRAPH LINK HERE
55
export REACT_APP_STATUS_URL=https://kleros-v2.betteruptime.com/badge

‎web/src/utils/graphqlQueryFnHelper.ts

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,13 @@
11
import request from "graphql-request";
22
import { TypedDocumentNode } from "@graphql-typed-document-node/core";
33

4-
const DEPLOYMENT = process.env.REACT_APP_DEPLOYMENT?.toUpperCase() ?? "TESTNET";
5-
6-
const DEPLOYMENTS_TO_KLEROS_CORE_SUBGRAPHS = {
7-
MAINNET: process.env.REACT_APP_KLEROS_CORE_SUBGRAPH_MAINNET,
8-
TESTNET: process.env.REACT_APP_KLEROS_CORE_SUBGRAPH_TESTNET,
9-
DEVNET: process.env.REACT_APP_KLEROS_CORE_SUBGRAPH_DEVNET,
10-
};
11-
12-
const DEPLOYMENTS_TO_DISPUTE_TEMPLATE_ARBSEPOLIA_SUBGRAPHS = {
13-
MAINNET: process.env.REACT_APP_DISPUTE_TEMPLATE_ARBSEPOLIA_SUBGRAPH_MAINNET,
14-
TESTNET: process.env.REACT_APP_DISPUTE_TEMPLATE_ARBSEPOLIA_SUBGRAPH_TESTNET,
15-
DEVNET: process.env.REACT_APP_DISPUTE_TEMPLATE_ARBSEPOLIA_SUBGRAPH_DEVNET,
16-
};
17-
184
const CHAINID_TO_DISPUTE_TEMPLATE_SUBGRAPH = {
195
421614:
20-
DEPLOYMENTS_TO_DISPUTE_TEMPLATE_ARBSEPOLIA_SUBGRAPHS[DEPLOYMENT] ??
21-
"https://api.thegraph.com/subgraphs/name/alcercu/disputetemplateregistryarbgrli",
6+
process.env.REACT_APP_DRT_ARBSEPOLIA_SUBGRAPH ?? "Wrong Subgraph URL. Please check the environment variables.",
227
};
238

249
export const graphqlUrl = (isDisputeTemplate = false, chainId = 421614) => {
25-
const coreUrl =
26-
DEPLOYMENTS_TO_KLEROS_CORE_SUBGRAPHS[DEPLOYMENT] ??
27-
"https://api.thegraph.com/subgraphs/name/alcercu/kleroscoretest";
10+
const coreUrl = process.env.REACT_APP_CORE_SUBGRAPH ?? "Wrong Subgraph URL. Please check the environment variables.";
2811
return isDisputeTemplate ? CHAINID_TO_DISPUTE_TEMPLATE_SUBGRAPH[chainId] : coreUrl;
2912
};
3013

0 commit comments

Comments
 (0)