diff --git a/cross-chain/arbitrum/README.adoc b/cross-chain/arbitrum/README.adoc index 5c4786b1b..d70e7e4e3 100644 --- a/cross-chain/arbitrum/README.adoc +++ b/cross-chain/arbitrum/README.adoc @@ -27,7 +27,7 @@ Wormhole-specific tBTC representation into the canonical `ArbitrumTBTC` token. The deployment scripts are responsible for managing updates of the tBTC gateway addresses across various chains. These addresses are stored in the `external/` -directory for a specific network, such as `arbitrumGoerli/OptimismWormholeGateway.json.` +directory for a specific network, such as `arbitrumSepolia/OptimismWormholeGateway.json.` It is important to note that these addresses should remain constant for the mainnet network. However, there may be instances where a new version of a cross-chain module is deployed to the testing network, which would require a @@ -42,7 +42,7 @@ yarn deploy --network Supported networks: - `hardhat` - for local development -- `arbitrumGoerli` - L2 testing network +- `arbitrumSepolia` - L2 testing network - `arbitrumOne` - L2 mainnet Currently, this module does not deploy any contracts on L1. All the existing @@ -54,6 +54,6 @@ the contracts before running the deployment script. This command produces an `export.json` file containing contract deployment info. Note that for the chains other than `hardhat` the following environment variables are needed: -- `L2_CHAIN_API_URL` - URL to access blockchain services, e.g. `https://arb-goerli.g.alchemy.com/v2/` +- `L2_CHAIN_API_URL` - URL to access blockchain services, e.g. `https://arb-sepolia.g.alchemy.com/v2/` - `L2_ACCOUNTS_PRIVATE_KEYS` - Private keys for the deployer and council `<0xOwnerPrivKey,0xCouncilPrivKey>` - `ARBISCAN_API_KEY` - Arbiscan API key diff --git a/cross-chain/arbitrum/deploy_l2/12_update_wormhole_gateway_mapping.ts b/cross-chain/arbitrum/deploy_l2/12_update_wormhole_gateway_mapping.ts index 512a262f0..c5401d158 100644 --- a/cross-chain/arbitrum/deploy_l2/12_update_wormhole_gateway_mapping.ts +++ b/cross-chain/arbitrum/deploy_l2/12_update_wormhole_gateway_mapping.ts @@ -8,6 +8,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { // See https://book.wormhole.com/reference/contracts.html // This ID is valid for both Arbitrum Goerli and Mainnet + // TODO: check if id is correct for Arbitrum Sepolia as well (once Wormhole + // supports that testnet) const wormholeChainID = 23 const ArbitrumWormholeGateway = await deployments.get( diff --git a/cross-chain/arbitrum/deploy_l2/13_update_with_optimism_in_wormhole_gateway_mapping.ts b/cross-chain/arbitrum/deploy_l2/13_update_with_optimism_in_wormhole_gateway_mapping.ts index d78a29ba7..54d523689 100644 --- a/cross-chain/arbitrum/deploy_l2/13_update_with_optimism_in_wormhole_gateway_mapping.ts +++ b/cross-chain/arbitrum/deploy_l2/13_update_with_optimism_in_wormhole_gateway_mapping.ts @@ -12,6 +12,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { // See https://book.wormhole.com/reference/contracts.html // This ID is valid for both Optimism Goerli and Mainnet + // TODO: check if id is correct for Optimism Sepolia as well (once Wormhole + // supports that testnet) const optimismWormholeChainID = 24 const optimismWormholeGateway = await deployments.getOrNull( diff --git a/cross-chain/arbitrum/deploy_l2/14_update_with_polygon_in_wormhole_gateway_mapping.ts b/cross-chain/arbitrum/deploy_l2/14_update_with_polygon_in_wormhole_gateway_mapping.ts index 1566d0492..8197708ce 100644 --- a/cross-chain/arbitrum/deploy_l2/14_update_with_polygon_in_wormhole_gateway_mapping.ts +++ b/cross-chain/arbitrum/deploy_l2/14_update_with_polygon_in_wormhole_gateway_mapping.ts @@ -12,6 +12,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { // See https://book.wormhole.com/reference/contracts.html // This ID is valid for both Polygon Testnet (Mumbai) and Mainnet + // TODO: check ID for the new L2 Polygon testnet once it's annunced and + // supported by Wormhole const polygonWormholeChainID = 5 const polygonWormholeGateway = await deployments.getOrNull( diff --git a/cross-chain/arbitrum/deploy_l2/15_update_with_base_in_wormhole_gateway_mapping.ts b/cross-chain/arbitrum/deploy_l2/15_update_with_base_in_wormhole_gateway_mapping.ts index bed5ff5ad..02d693c55 100644 --- a/cross-chain/arbitrum/deploy_l2/15_update_with_base_in_wormhole_gateway_mapping.ts +++ b/cross-chain/arbitrum/deploy_l2/15_update_with_base_in_wormhole_gateway_mapping.ts @@ -11,6 +11,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { // See https://docs.wormhole.com/wormhole/blockchain-environments/evm#base // This ID is valid for both Base Testnet and Mainnet + // TODO: check if id is correct for Base Sepolia as well (once Wormhole + // supports that testnet) const baseWormholeChainID = 30 const baseWormholeGateway = await deployments.getOrNull("BaseWormholeGateway") diff --git a/cross-chain/arbitrum/hardhat.config.ts b/cross-chain/arbitrum/hardhat.config.ts index cd1cc255e..3894aa1ae 100644 --- a/cross-chain/arbitrum/hardhat.config.ts +++ b/cross-chain/arbitrum/hardhat.config.ts @@ -44,6 +44,15 @@ const config: HardhatUserConfig = { : undefined, tags: ["etherscan"], }, + sepolia: { + url: process.env.L1_CHAIN_API_URL || "", + chainId: 11155111, + deploy: ["deploy_l1"], + accounts: process.env.L1_ACCOUNTS_PRIVATE_KEYS + ? process.env.L1_ACCOUNTS_PRIVATE_KEYS.split(",") + : undefined, + tags: ["etherscan"], + }, mainnet: { url: process.env.L1_CHAIN_API_URL || "", chainId: 1, @@ -65,6 +74,19 @@ const config: HardhatUserConfig = { // l1: "goerli", // }, }, + arbitrumSepolia: { + url: process.env.L2_CHAIN_API_URL || "", + chainId: 421614, + deploy: ["deploy_l2"], + accounts: process.env.L2_ACCOUNTS_PRIVATE_KEYS + ? process.env.L2_ACCOUNTS_PRIVATE_KEYS.split(",") + : undefined, + // TODO: uncomment below line once https://github.com/NomicFoundation/hardhat/issues/4582 is resolved + // tags: ["arbiscan"], + // companionNetworks: { + // l1: "sepolia", + // }, + }, arbitrumOne: { url: process.env.L2_CHAIN_API_URL || "", chainId: 42161, @@ -82,24 +104,30 @@ const config: HardhatUserConfig = { external: { deployments: { goerli: ["./external/goerli"], + sepolia: ["./external/sepolia"], mainnet: ["./external/mainnet"], arbitrumGoerli: ["./external/arbitrumGoerli"], + arbitrumSepolia: ["./external/arbitrumSepolia"], arbitrumOne: ["./external/arbitrumOne"], }, }, deploymentArtifactsExport: { goerli: "artifacts/l1", + sepolia: "artifacts/l1", mainnet: "artifacts/l1", arbitrumGoerli: "artifacts/l2", + arbitrumSepolia: "artifacts/l2", arbitrumOne: "artifacts/l2", }, etherscan: { apiKey: { goerli: process.env.ETHERSCAN_API_KEY, + sepolia: process.env.ETHERSCAN_API_KEY, mainnet: process.env.ETHERSCAN_API_KEY, arbitrumGoerli: process.env.ARBISCAN_API_KEY, + arbitrumSepolia: process.env.ARBISCAN_API_KEY, arbitrumOne: process.env.ARBISCAN_API_KEY, }, }, @@ -108,14 +136,18 @@ const config: HardhatUserConfig = { deployer: { default: 1, goerli: 0, + sepolia: 0, arbitrumGoerli: 0, + arbitrumSepolia: 0, mainnet: "0x123694886DBf5Ac94DDA07135349534536D14cAf", arbitrumOne: "0x123694886DBf5Ac94DDA07135349534536D14cAf", }, governance: { default: 2, goerli: 0, + sepolia: 0, arbitrumGoerli: 0, + arbitrumSepolia: 0, mainnet: "0x9f6e831c8f8939dc0c830c6e492e7cef4f9c2f5f", arbitrumOne: "0x9f6e831c8f8939dc0c830c6e492e7cef4f9c2f5f", }, diff --git a/cross-chain/arbitrum/package.json b/cross-chain/arbitrum/package.json index 4a4d91ddd..5ba52e472 100644 --- a/cross-chain/arbitrum/package.json +++ b/cross-chain/arbitrum/package.json @@ -31,6 +31,7 @@ "lint:config:fix": "prettier --write '**/*.@(json|yaml)'", "prepack": "tsc -p tsconfig.export.json && hardhat export-artifacts export/artifacts", "export-artifacts:goerli": "yarn hardhat export-deployment-artifacts --network arbitrumGoerli", + "export-artifacts:sepolia": "yarn hardhat export-deployment-artifacts --network arbitrumSepolia", "export-artifacts:mainnet": "yarn hardhat export-deployment-artifacts --network arbitrumOne", "prepublishOnly": "npm run export-artifacts:$npm_config_network", "test": "hardhat test"