Skip to content

Commit 3eebb3f

Browse files
authored
Merge pull request #359 from kleros/feat/arbSep-chaido-deploy
2 parents b00c1ed + acb800c commit 3eebb3f

File tree

13 files changed

+1629
-739
lines changed

13 files changed

+1629
-739
lines changed

contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const paramsByChainId = {
2626
GNOSIS_CHIADO: {
2727
deposit: parseEther("0.2"), // ~20 WETH budget to start, enough for 8 days of challenges
2828
// bridging speed is 29 - 31 hours.
29-
epochPeriod: 7200, // 2 hours
29+
epochPeriod: 3600, // 1 hours
3030
minChallengePeriod: 10800, // 3 hours
3131
numEpochTimeout: 1000000, // never
3232
maxMissingBlocks: 1000000, // any

contracts/deploy/02-inbox/02-arb-to-gnosis-inbox.ts

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { HardhatRuntimeEnvironment } from "hardhat/types";
22
import { DeployFunction } from "hardhat-deploy/types";
33
import getContractAddress from "../../deploy-helpers/getContractAddress";
44
import { ethers } from "hardhat";
5+
import { providers } from "ethers";
56

67
enum SenderChains {
78
ARBITRUM = 42161,
@@ -39,6 +40,12 @@ const deployInbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
3940

4041
const { epochPeriod } = paramsByChainId[SenderChains[chainId]];
4142

43+
const routerNetworks = {
44+
ARBITRUM: config.networks.mainnet,
45+
ARBITRUM_SEPOLIA: config.networks.sepolia,
46+
HARDHAT: config.networks.localhost,
47+
};
48+
4249
// Hack to predict the deployment address on the sender chain.
4350
// TODO: use deterministic deployments
4451

@@ -76,7 +83,20 @@ const deployInbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
7683
};
7784

7885
// ----------------------------------------------------------------------------------------------
79-
const liveDeployer = async () => {};
86+
const liveDeployer = async () => {
87+
const routerChainProvider = new providers.JsonRpcProvider(routerNetworks[SenderChains[chainId]].url);
88+
let nonceRouter = await routerChainProvider.getTransactionCount(deployer);
89+
90+
const routerAddress = getContractAddress(deployer, nonceRouter);
91+
console.log("calculated future router for nonce %d: %s", nonceRouter, routerAddress);
92+
93+
await deploy("VeaInboxArbToGnosis" + (chainId === 42161 ? "" : "Testnet"), {
94+
contract: "VeaInboxArbToGnosis",
95+
from: deployer,
96+
args: [epochPeriod, routerAddress],
97+
log: true,
98+
});
99+
};
80100

81101
// ----------------------------------------------------------------------------------------------
82102
if (chainId === 31337) {
@@ -93,5 +113,4 @@ deployInbox.skip = async ({ getChainId }) => {
93113
return !SenderChains[chainId];
94114
};
95115
deployInbox.runAtTheEnd = true;
96-
97116
export default deployInbox;

contracts/deployments/arbitrumSepolia/VeaInboxArbToGnosisTestnet.json

Lines changed: 449 additions & 0 deletions
Large diffs are not rendered by default.

contracts/deployments/chiado/VeaInboxGnosisToArbTestnet.json

Lines changed: 0 additions & 450 deletions
This file was deleted.

contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json

Lines changed: 26 additions & 26 deletions
Large diffs are not rendered by default.

contracts/deployments/sepolia/RouterArbToGnosisTestnet.json

Lines changed: 395 additions & 0 deletions
Large diffs are not rendered by default.

contracts/src/canonical/gnosis-chain/IAMB.sol

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,11 @@ interface IAMB {
1212
function messageSender() external view returns (address);
1313

1414
function messageSourceChainId() external view returns (bytes32);
15+
16+
event AffirmationCompleted(
17+
address indexed sender,
18+
address indexed executor,
19+
bytes32 indexed messageId,
20+
bool status
21+
);
1522
}

relayer-cli/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,8 @@
2121
"typescript": "^4.9.5",
2222
"web3": "^1.10.4",
2323
"web3-batched-send": "^1.0.3"
24+
},
25+
"devDependencies": {
26+
"ts-node": "^10.9.2"
2427
}
2528
}

validator-cli/.env.dist

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ PRIVATE_KEY=
33
# Devnet RPCs
44
RPC_CHIADO=https://rpc.chiadochain.net
55
RPC_ARB_SEPOLIA=https://sepolia-rollup.arbitrum.io/rpc
6+
RPC_GNOSIS=https://rpc.chiadochain.net
7+
RPC_ARB=https://sepolia-rollup.arbitrum.io/rpc
68
RPC_SEPOLIA=
79

810
# Testnet or Mainnet RPCs
@@ -16,9 +18,13 @@ VEAOUTBOX_ARB_TO_ETH_ADDRESS=0x209BFdC6B7c66b63A8382196Ba3d06619d0F12c9
1618

1719
# Devnet Addresses
1820
VEAINBOX_ARBSEPOLIA_TO_SEPOLIA_ADDRESS=0x906dE43dBef27639b1688Ac46532a16dc07Ce410
19-
VEAINBOX_ARBSEPOLIA_TO_CHIADO_ADDRESS=0xAb53e341121448Ae259Da8fa17f216Cb0e21199C
2021
VEAOUTBOX_ARBSEPOLIA_TO_SEPOLIA_ADDRESS=0x906dE43dBef27639b1688Ac46532a16dc07Ce410
21-
VEAOUTBOX_ARBSEPOLIA_TO_CHIADO_ADDRESS=0xAb53e341121448Ae259Da8fa17f216Cb0e21199C
22+
23+
#For arbToGnosis bridge
24+
VEAINBOX_ARB_TO_GNOSIS_ADDRESS=0x854374483572FFcD4d0225290346279d0718240b
25+
VEAOUTBOX_ARB_TO_GNOSIS_ADDRESS=0x2f1788F7B74e01c4C85578748290467A5f063B0b
26+
VEAROUTER_ARB_TO_GNOSIS_ADDRESS=0x5BE03fDE7794Bc188416ba16932510Ed1277b193
27+
GNOSIS_AMB_ADDRESS=0x8448E15d0e706C0298dECA99F0b4744030e59d7d
2228

2329
TRANSACTION_BATCHER_CONTRACT_ADDRESS_SEPOLIA=0xe7953da7751063d0a41ba727c32c762d3523ade8
2430
TRANSACTION_BATCHER_CONTRACT_ADDRESS_CHIADO=0xcC0a08D4BCC5f91ee9a1587608f7a2975EA75d73

validator-cli/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"start": "npx ts-node ./src/ArbToEth/watcher.ts",
1414
"start-chiado-devnet": "npx ts-node ./src/devnet/arbToChiado/happyPath.ts",
1515
"start-sepolia-devnet": "npx ts-node ./src/devnet/arbToSepolia/happyPath.ts",
16-
"start-sepolia-testnet": "npx ts-node ./src/ArbToEth/watcherArbToEth.ts"
16+
"start-sepolia-testnet": "npx ts-node ./src/ArbToEth/watcherArbToEth.ts",
17+
"start-arbitrum-to-gnosis": "npx ts-node ./src/ArbToEth/watcherArbToGnosis.ts"
1718
},
1819
"dependencies": {
1920
"@arbitrum/sdk": "4.0.1",
@@ -25,5 +26,8 @@
2526
"typescript": "^4.9.5",
2627
"web3": "^1.10.4",
2728
"web3-batched-send": "^1.0.3"
29+
},
30+
"devDependencies": {
31+
"ts-node": "^10.9.2"
2832
}
2933
}

0 commit comments

Comments
 (0)