Skip to content

Commit c3029fa

Browse files
Mani BrarMani Brar
authored andcommitted
chore(veascan): add arbToGnosis config
1 parent e66d90b commit c3029fa

File tree

3 files changed

+32
-6
lines changed

3 files changed

+32
-6
lines changed

veascan-web/.env.public

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# Subgraph endpoints for veascan, Example: "85918/vea-inbox-arb-sepolia-devnet/version/latest"
2-
export VEASCAN_INBOX_SUBGRAPH=61738/veascan-inbox-arb-sepolia/version/latest
3-
export VEASCAN_OUTBOX_SUBGRAPH=61738/veascan-outbox-sepolia/version/latest
2+
export VEASCAN_INBOX_SUBGRAPH_ARBSEPOLIA=61738/veascan-inbox-arb-sepolia/version/latest
3+
export VEASCAN_OUTBOX_SUBGRAPH_CHIADO=61738/veascan-outbox-chiado/version/latest
4+
export VEASCAN_OUTBOX_SUBGRAPH_SEPOLIA=61738/veascan-outbox-sepolia/version/latest

veascan-web/codegen.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ import type { CodegenConfig } from "@graphql-codegen/cli";
33
const config: CodegenConfig = {
44
overwrite: true,
55
schema: [
6-
`https://api.studio.thegraph.com/query/${process.env.VEASCAN_INBOX_SUBGRAPH}`,
7-
`https://api.studio.thegraph.com/query/${process.env.VEASCAN_OUTBOX_SUBGRAPH}`,
6+
`https://api.studio.thegraph.com/query/${process.env.VEASCAN_INBOX_SUBGRAPH_ARBSEPOLIA}`,
7+
`https://api.studio.thegraph.com/query/${process.env.VEASCAN_OUTBOX_SUBGRAPH_CHIADO}`,
8+
`https://api.studio.thegraph.com/query/${process.env.VEASCAN_OUTBOX_SUBGRAPH_SEPOLIA}`,
89
],
910
documents: "src/hooks/queries/*.ts",
1011
generates: {

veascan-web/src/consts/bridges.ts

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ import VeaOutboxSepoliaDevnet from "@kleros/vea-contracts/deployments/sepolia/Ve
33
import VeaInboxArbitrumSepoliaTestnet from "@kleros/vea-contracts/deployments/arbitrumSepolia/VeaInboxArbToEthTestnet.json";
44
import VeaOutboxArbitrumSepoliaTestnet from "@kleros/vea-contracts/deployments/sepolia/VeaOutboxArbToEthTestnet.json";
55

6+
import VeaInboxArbitrumSepoliaDevnetGnosis from "@kleros/vea-contracts/deployments/arbitrumSepolia/VeaInboxArbToGnosisDevnet.json";
7+
import VeaOutboxSepoliaDevnetGnosis from "@kleros/vea-contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json";
8+
import VeaInboxArbitrumSepoliaTestnetGnosis from "@kleros/vea-contracts/deployments/arbitrumSepolia/VeaInboxArbToGnosisTestnet.json";
9+
import VeaOutboxArbitrumSepoliaTestnetGnosis from "@kleros/vea-contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json";
10+
611
import {
712
Chain,
813
arbitrumSepolia,
@@ -34,6 +39,17 @@ const arbToEthContracts: { [key in Network]: VeaContracts } = {
3439
},
3540
};
3641

42+
const arbToGnosisContracts: { [key in Network]: VeaContracts } = {
43+
[Network.DEVNET]: {
44+
veaInbox: VeaInboxArbitrumSepoliaDevnetGnosis.address as `0x${string}`,
45+
veaOutbox: VeaOutboxSepoliaDevnetGnosis.address as `0x${string}`,
46+
},
47+
[Network.TESTNET]: {
48+
veaInbox: VeaInboxArbitrumSepoliaTestnetGnosis.address as `0x${string}`,
49+
veaOutbox: VeaOutboxArbitrumSepoliaTestnetGnosis.address as `0x${string}`,
50+
},
51+
};
52+
3753
export interface IChain extends Chain {
3854
logo: React.FC<React.SVGAttributes<SVGElement>>;
3955
}
@@ -62,8 +78,16 @@ export const bridges: IBridge[] = [
6278
from: arbitrumSepolia.id,
6379
to: sepolia.id,
6480
contracts: arbToEthContracts,
65-
inboxEndpoint: `https://api.studio.thegraph.com/query/${process.env.VEASCAN_INBOX_SUBGRAPH}`,
66-
outboxEndpoint: `https://api.studio.thegraph.com/query/${process.env.VEASCAN_OUTBOX_SUBGRAPH}`,
81+
inboxEndpoint: `https://api.studio.thegraph.com/query/${process.env.VEASCAN_INBOX_SUBGRAPH_ARBSEPOLIA}`,
82+
outboxEndpoint: `https://api.studio.thegraph.com/query/${process.env.VEASCAN_OUTBOX_SUBGRAPH_SEPOLIA}`,
83+
},
84+
{
85+
id: 1,
86+
from: arbitrumSepolia.id,
87+
to: gnosisChiado.id,
88+
contracts: arbToGnosisContracts,
89+
inboxEndpoint: `https://api.studio.thegraph.com/query/${process.env.VEASCAN_INBOX_SUBGRAPH_ARBSEPOLIA}`,
90+
outboxEndpoint: `https://api.studio.thegraph.com/query/${process.env.VEASCAN_OUTBOX_SUBGRAPH_CHIADO}`,
6791
},
6892
];
6993

0 commit comments

Comments
 (0)