Skip to content
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

Feat/arb sep chaido deploy #359

Merged
merged 7 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const paramsByChainId = {
GNOSIS_CHIADO: {
deposit: parseEther("0.2"), // ~20 WETH budget to start, enough for 8 days of challenges
// bridging speed is 29 - 31 hours.
epochPeriod: 7200, // 2 hours
epochPeriod: 3600, // 1 hours
minChallengePeriod: 10800, // 3 hours
numEpochTimeout: 1000000, // never
maxMissingBlocks: 1000000, // any
Expand Down
23 changes: 21 additions & 2 deletions contracts/deploy/02-inbox/02-arb-to-gnosis-inbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { HardhatRuntimeEnvironment } from "hardhat/types";
import { DeployFunction } from "hardhat-deploy/types";
import getContractAddress from "../../deploy-helpers/getContractAddress";
import { ethers } from "hardhat";
import { providers } from "ethers";

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

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

const routerNetworks = {
ARBITRUM: config.networks.mainnet,
ARBITRUM_SEPOLIA: config.networks.sepolia,
HARDHAT: config.networks.localhost,
};

// Hack to predict the deployment address on the sender chain.
// TODO: use deterministic deployments

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

// ----------------------------------------------------------------------------------------------
const liveDeployer = async () => {};
const liveDeployer = async () => {
const routerChainProvider = new providers.JsonRpcProvider(routerNetworks[SenderChains[chainId]].url);
let nonceRouter = await routerChainProvider.getTransactionCount(deployer);

const routerAddress = getContractAddress(deployer, nonceRouter);
console.log("calculated future router for nonce %d: %s", nonceRouter, routerAddress);

madhurMongia marked this conversation as resolved.
Show resolved Hide resolved
await deploy("VeaInboxArbToGnosis" + (chainId === 42161 ? "" : "Testnet"), {
contract: "VeaInboxArbToGnosis",
from: deployer,
args: [epochPeriod, routerAddress],
log: true,
});
};

// ----------------------------------------------------------------------------------------------
if (chainId === 31337) {
Expand All @@ -93,5 +113,4 @@ deployInbox.skip = async ({ getChainId }) => {
return !SenderChains[chainId];
};
deployInbox.runAtTheEnd = true;

export default deployInbox;

Large diffs are not rendered by default.

450 changes: 0 additions & 450 deletions contracts/deployments/chiado/VeaInboxGnosisToArbTestnet.json

This file was deleted.

52 changes: 26 additions & 26 deletions contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json

Large diffs are not rendered by default.

395 changes: 395 additions & 0 deletions contracts/deployments/sepolia/RouterArbToGnosisTestnet.json

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions contracts/src/canonical/gnosis-chain/IAMB.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,11 @@ interface IAMB {
function messageSender() external view returns (address);

function messageSourceChainId() external view returns (bytes32);

event AffirmationCompleted(
address indexed sender,
address indexed executor,
bytes32 indexed messageId,
bool status
);
}
3 changes: 3 additions & 0 deletions relayer-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,8 @@
"typescript": "^4.9.5",
"web3": "^1.10.4",
"web3-batched-send": "^1.0.3"
},
"devDependencies": {
"ts-node": "^10.9.2"
}
}
10 changes: 8 additions & 2 deletions validator-cli/.env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ PRIVATE_KEY=
# Devnet RPCs
RPC_CHIADO=https://rpc.chiadochain.net
RPC_ARB_SEPOLIA=https://sepolia-rollup.arbitrum.io/rpc
RPC_GNOSIS=https://rpc.chiadochain.net
RPC_ARB=https://sepolia-rollup.arbitrum.io/rpc
madhurMongia marked this conversation as resolved.
Show resolved Hide resolved
RPC_SEPOLIA=

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

# Devnet Addresses
VEAINBOX_ARBSEPOLIA_TO_SEPOLIA_ADDRESS=0x906dE43dBef27639b1688Ac46532a16dc07Ce410
VEAINBOX_ARBSEPOLIA_TO_CHIADO_ADDRESS=0xAb53e341121448Ae259Da8fa17f216Cb0e21199C
VEAOUTBOX_ARBSEPOLIA_TO_SEPOLIA_ADDRESS=0x906dE43dBef27639b1688Ac46532a16dc07Ce410
VEAOUTBOX_ARBSEPOLIA_TO_CHIADO_ADDRESS=0xAb53e341121448Ae259Da8fa17f216Cb0e21199C

#For arbToGnosis bridge
VEAINBOX_ARB_TO_GNOSIS_ADDRESS=0x854374483572FFcD4d0225290346279d0718240b
VEAOUTBOX_ARB_TO_GNOSIS_ADDRESS=0x2f1788F7B74e01c4C85578748290467A5f063B0b
VEAROUTER_ARB_TO_GNOSIS_ADDRESS=0x5BE03fDE7794Bc188416ba16932510Ed1277b193
GNOSIS_AMB_ADDRESS=0x8448E15d0e706C0298dECA99F0b4744030e59d7d

TRANSACTION_BATCHER_CONTRACT_ADDRESS_SEPOLIA=0xe7953da7751063d0a41ba727c32c762d3523ade8
TRANSACTION_BATCHER_CONTRACT_ADDRESS_CHIADO=0xcC0a08D4BCC5f91ee9a1587608f7a2975EA75d73
6 changes: 5 additions & 1 deletion validator-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"start": "npx ts-node ./src/ArbToEth/watcher.ts",
"start-chiado-devnet": "npx ts-node ./src/devnet/arbToChiado/happyPath.ts",
"start-sepolia-devnet": "npx ts-node ./src/devnet/arbToSepolia/happyPath.ts",
"start-sepolia-testnet": "npx ts-node ./src/ArbToEth/watcherArbToEth.ts"
"start-sepolia-testnet": "npx ts-node ./src/ArbToEth/watcherArbToEth.ts",
"start-arbitrum-to-gnosis": "npx ts-node ./src/ArbToEth/watcherArbToGnosis.ts"
},
"dependencies": {
"@arbitrum/sdk": "4.0.1",
Expand All @@ -25,5 +26,8 @@
"typescript": "^4.9.5",
"web3": "^1.10.4",
"web3-batched-send": "^1.0.3"
},
"devDependencies": {
"ts-node": "^10.9.2"
}
}
Loading
Loading