-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resuscitated Arbitrum Sepolia to Sepolia devnet deployment #305
Changes from 5 commits
9532c10
55541e3
258cb11
83b892c
f01e4f9
69285d8
d302601
a941696
57a7cf1
7cb9d80
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// File for handling contants and configurations | ||
require("dotenv").config(); | ||
|
||
interface IBridge { | ||
chainId: number; | ||
veaInbox: string; | ||
veaOutbox: string; | ||
batcher: string; | ||
rpcOutbox: string; | ||
} | ||
|
||
// Using destination chainId to get the route configuration. | ||
const bridges: { [chainId: number]: IBridge } = { | ||
11155111: { | ||
chainId: 11155111, | ||
veaInbox: process.env.VEAINBOX_ARBSEPOLIA_TO_SEPOLIA_ADDRESS, | ||
veaOutbox: process.env.VEAOUTBOX_ARBSEPOLIA_TO_SEPOLIA_ADDRESS, | ||
batcher: process.env.TRANSACTION_BATCHER_CONTRACT_ADDRESS_SEPOLIA, | ||
rpcOutbox: process.env.RPC_SEPOLIA, | ||
}, | ||
10200: { | ||
chainId: 10200, | ||
veaInbox: process.env.VEAINBOX_ARBSEPOLIA_TO_CHIADO_ADDRESS, | ||
veaOutbox: process.env.VEAOUTBOX_ARBSEPOLIA_TO_CHIADO_ADDRESS, | ||
batcher: process.env.TRANSACTION_BATCHER_CONTRACT_ADDRESS_CHIADO, | ||
rpcOutbox: process.env.RPC_CHIADO, | ||
}, | ||
}; | ||
|
||
const getBridgeConfig = (chainId: number): IBridge | undefined => { | ||
return bridges[chainId]; | ||
}; | ||
|
||
const getInboxSubgraph = (chainId: number): string => { | ||
switch (chainId) { | ||
case 11155111: | ||
return process.env.VEAINBOX_ARBSEPOLIA_TO_SEPOLIA_SUBGRAPH; | ||
case 10200: | ||
return process.env.VEAINBOX_ARBSEPOLIA_TO_SEPOLIA_SUBGRAPH; | ||
default: | ||
throw new Error("Invalid chainid"); | ||
} | ||
}; | ||
mani99brar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
export { getBridgeConfig, getInboxSubgraph }; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"ts": 1725086460, | ||
"nonce": "6" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import VeaInboxArbitrumSepolia from "@kleros/vea-contracts/deployments/arbitrumSepolia/VeaInboxArbToEthDevnet.json"; | ||
import VeaOutboxSepolia from "@kleros/vea-contracts/deployments/sepolia/VeaOutboxArbToEthDevnet.json"; | ||
import VeaInboxArbitrumSepoliaChiado from "@kleros/vea-contracts/deployments/arbitrumSepolia/VeaInboxArbToGnosisDevnet.json"; | ||
import VeaOutboxArbitrumSepoliaChiado from "@kleros/vea-contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json"; | ||
// import VeaInboxArbitrumSepoliaChiado from "@kleros/vea-contracts/deployments/arbitrumSepolia/VeaInboxArbToGnosisDevnet.json"; | ||
fcanela marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// import VeaOutboxArbitrumSepoliaChiado from "@kleros/vea-contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json"; | ||
import { | ||
Chain, | ||
arbitrumSepolia, | ||
|
@@ -42,22 +42,22 @@ export const bridges: IBridge[] = [ | |
to: sepolia.id, | ||
inboxAddress: VeaInboxArbitrumSepolia.address as `0x${string}`, | ||
inboxEndpoint: | ||
"https://api.studio.thegraph.com/query/67213/veascan-inbox-arb-sep-devnet/version/latest", | ||
"https://api.studio.thegraph.com/query/85918/veascan-inbox-arb-sep-devnet/v0.8.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same suggestion about extracting to env vars There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, will do. |
||
outboxAddress: VeaOutboxSepolia.address as `0x${string}`, | ||
outboxEndpoint: | ||
"https://api.studio.thegraph.com/query/67213/veascan-outbox-arb-sep-devnet/version/latest", | ||
}, | ||
{ | ||
id: 1, | ||
from: arbitrumSepolia.id, | ||
to: gnosisChiado.id, | ||
inboxAddress: VeaInboxArbitrumSepoliaChiado.address as `0x${string}`, | ||
inboxEndpoint: | ||
"https://api.studio.thegraph.com/query/67213/veascan-inbox-arb-sep-chiado-devnet/version/latest", | ||
outboxAddress: VeaOutboxArbitrumSepoliaChiado.address as `0x${string}`, | ||
outboxEndpoint: | ||
"https://api.studio.thegraph.com/query/67213/veascan-outbox-arb-chiado-devnet/version/latest", | ||
"https://api.studio.thegraph.com/query/85918/veascan-outbox-arb-sep-devnet/v0.8.0", | ||
}, | ||
// { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comment regarding commented code |
||
// id: 1, | ||
// from: arbitrumSepolia.id, | ||
// to: gnosisChiado.id, | ||
// inboxAddress: VeaInboxArbitrumSepoliaChiado.address as `0x${string}`, | ||
// inboxEndpoint: | ||
// "https://api.studio.thegraph.com/query/67213/veascan-inbox-arb-sep-chiado-devnet/version/latest", | ||
// outboxAddress: VeaOutboxArbitrumSepoliaChiado.address as `0x${string}`, | ||
// outboxEndpoint: | ||
// "https://api.studio.thegraph.com/query/67213/veascan-outbox-arb-chiado-devnet/version/latest", | ||
// }, | ||
]; | ||
|
||
export const getBridge = (id: number): IBridge => | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ignoreable Nice comment, it made it very easy to figure out where the value came from