diff --git a/.changeset/bright-students-exist.md b/.changeset/bright-students-exist.md new file mode 100644 index 0000000000..84833ecaea --- /dev/null +++ b/.changeset/bright-students-exist.md @@ -0,0 +1,5 @@ +--- +'@hyperlane-xyz/cli': minor +--- + +Support using the CLI to deploy warp routes that involve foreign deployments diff --git a/.registryrc b/.registryrc index 7a6a49b404..01f6449ff0 100644 --- a/.registryrc +++ b/.registryrc @@ -1 +1 @@ -fa13e998aceff5a82b1a4e0791fe392791bb0393 +385b83950adba6f033be836b627bab7d89aae38d diff --git a/rust/sealevel/client/src/cmd_utils.rs b/rust/sealevel/client/src/cmd_utils.rs index e0cd3ff686..f387d3c4fd 100644 --- a/rust/sealevel/client/src/cmd_utils.rs +++ b/rust/sealevel/client/src/cmd_utils.rs @@ -17,6 +17,23 @@ use solana_sdk::{ const SOLANA_DOMAIN: u32 = 1399811149; +pub(crate) fn get_compute_unit_price_micro_lamports_for_id(domain: u32) -> u64 { + get_compute_unit_price(domain == SOLANA_DOMAIN) +} + +pub(crate) fn get_compute_unit_price_micro_lamports_for_chain_name(chain_name: &str) -> u64 { + get_compute_unit_price(chain_name == "solanamainnet") +} + +fn get_compute_unit_price(is_solanamainnet: bool) -> u64 { + if is_solanamainnet { + // Generally taking a low/medium value from https://www.quicknode.com/gas-tracker/solana + 500_000 + } else { + 0 + } +} + pub(crate) fn account_exists(client: &RpcClient, account: &Pubkey) -> Result { // Using `get_account_with_commitment` instead of `get_account` so we get Ok(None) when the account // doesn't exist, rather than an error @@ -73,9 +90,9 @@ pub(crate) fn deploy_program( program_keypair_path, ]; + let compute_unit_price = get_compute_unit_price_micro_lamports_for_id(local_domain).to_string(); if local_domain.eq(&SOLANA_DOMAIN) { - // May need tweaking depending on gas prices / available balance - command.append(&mut vec!["--with-compute-unit-price", "550000"]); + command.extend(vec!["--with-compute-unit-price", &compute_unit_price]); } build_cmd(command.as_slice(), None, None); diff --git a/rust/sealevel/client/src/core.rs b/rust/sealevel/client/src/core.rs index 44cf9cb529..e3abedf035 100644 --- a/rust/sealevel/client/src/core.rs +++ b/rust/sealevel/client/src/core.rs @@ -9,26 +9,21 @@ use solana_sdk::{compute_budget, compute_budget::ComputeBudgetInstruction}; use std::collections::HashMap; use std::{fs::File, path::Path}; +use crate::cmd_utils::get_compute_unit_price_micro_lamports_for_chain_name; +use crate::ONE_SOL_IN_LAMPORTS; use crate::{ artifacts::{read_json, write_json}, cmd_utils::{create_and_write_keypair, create_new_directory, deploy_program}, multisig_ism::deploy_multisig_ism_message_id, Context, CoreCmd, CoreDeploy, CoreSubCmd, }; -use crate::{DEFAULT_INSTRUCTION_COMPUTE_UNIT_LIMIT, ONE_SOL_IN_LAMPORTS}; use hyperlane_core::H256; use hyperlane_sealevel_igp::accounts::{SOL_DECIMALS, TOKEN_EXCHANGE_RATE_SCALE}; pub(crate) fn adjust_gas_price_if_needed(chain_name: &str, ctx: &mut Context) { if chain_name.eq("solanamainnet") { + let compute_unit_price = get_compute_unit_price_micro_lamports_for_chain_name(chain_name); let mut initial_instructions = ctx.initial_instructions.borrow_mut(); - const PROCESS_DESIRED_PRIORITIZATION_FEE_LAMPORTS_PER_TX: u64 = 50_000_000; - const MICRO_LAMPORT_FEE_PER_LIMIT: u64 = - // Convert to micro-lamports - (PROCESS_DESIRED_PRIORITIZATION_FEE_LAMPORTS_PER_TX * 1_000_000) - // Divide by the max compute units - / DEFAULT_INSTRUCTION_COMPUTE_UNIT_LIMIT as u64; - for i in initial_instructions.iter_mut() { if i.instruction.program_id != compute_budget::id() { continue; @@ -41,9 +36,8 @@ pub(crate) fn adjust_gas_price_if_needed(chain_name: &str, ctx: &mut Context) { ComputeBudgetInstruction::SetComputeUnitPrice { .. } ) { // The compute unit price has already been set, so we override it and return early - i.instruction = ComputeBudgetInstruction::set_compute_unit_price( - MICRO_LAMPORT_FEE_PER_LIMIT, - ); + i.instruction = + ComputeBudgetInstruction::set_compute_unit_price(compute_unit_price); return; } } @@ -51,10 +45,10 @@ pub(crate) fn adjust_gas_price_if_needed(chain_name: &str, ctx: &mut Context) { initial_instructions.push( ( - ComputeBudgetInstruction::set_compute_unit_price(MICRO_LAMPORT_FEE_PER_LIMIT), + ComputeBudgetInstruction::set_compute_unit_price(compute_unit_price), Some(format!( - "Set compute unit price to {}", - MICRO_LAMPORT_FEE_PER_LIMIT + "Set compute unit price to {} micro-lamports", + compute_unit_price )), ) .into(), diff --git a/rust/sealevel/environments/mainnet3/warp-routes/apxETH-eclipse-ethereum/program-ids.json b/rust/sealevel/environments/mainnet3/warp-routes/apxETH-eclipse-ethereum/program-ids.json new file mode 100644 index 0000000000..683a275abb --- /dev/null +++ b/rust/sealevel/environments/mainnet3/warp-routes/apxETH-eclipse-ethereum/program-ids.json @@ -0,0 +1,10 @@ +{ + "eclipsemainnet": { + "hex": "0x82f7445ccda6396092998c8f841f0d4eb63cca29ba23cfd2609d283f3ee9d13f", + "base58": "9pEgj7m2VkwLtJHPtTw5d8vbB7kfjzcXXCRgdwruW7C2" + }, + "ethereum": { + "hex": "0x000000000000000000000000d34fe1685c28a68bb4b8faaadcb2769962ae737c", + "base58": "1111111111113wkPRLXCJuj9539UEURsN3qhoaYb" + } +} diff --git a/rust/sealevel/environments/mainnet3/warp-routes/apxETH-eclipse-ethereum/token-config.json b/rust/sealevel/environments/mainnet3/warp-routes/apxETH-eclipse-ethereum/token-config.json new file mode 100644 index 0000000000..1634a20d35 --- /dev/null +++ b/rust/sealevel/environments/mainnet3/warp-routes/apxETH-eclipse-ethereum/token-config.json @@ -0,0 +1,17 @@ +{ + "eclipsemainnet": { + "type": "synthetic", + "decimals": 9, + "remoteDecimals": 18, + "name": "Autocompounding Pirex Ether", + "symbol": "apxETH", + "uri": "https://raw.githubusercontent.com/hyperlane-xyz/hyperlane-registry/ae7df1bc00af19f8ba692c14e4df3acdbf30497d/deployments/warp_routes/APXETH/metadata.json", + "interchainGasPaymaster": "3Wp4qKkgf4tjXz1soGyTSndCgBPLZFSrZkiDZ8Qp9EEj" + }, + "ethereum": { + "type": "collateral", + "decimals": 18, + "token": "0x9ba021b0a9b958b5e75ce9f6dff97c7ee52cb3e6", + "foreignDeployment": "0xd34FE1685c28A68Bb4B8fAaadCb2769962AE737c" + } +} diff --git a/rust/sealevel/environments/mainnet3/warp-routes/ezSOL-eclipse-solana/program-ids.json b/rust/sealevel/environments/mainnet3/warp-routes/ezSOL-eclipse-solana/program-ids.json new file mode 100644 index 0000000000..5a914d4f2c --- /dev/null +++ b/rust/sealevel/environments/mainnet3/warp-routes/ezSOL-eclipse-solana/program-ids.json @@ -0,0 +1,10 @@ +{ + "eclipsemainnet": { + "hex": "0xb06d58417c929a624e9b689e604e6d60ca652168ee76b9a290bd5b974b22b306", + "base58": "CshTfxXWMvnRAwBTCjQ4577bkP5po5ZuNG1QTuQxA5Au" + }, + "solanamainnet": { + "hex": "0x08bb318b88b38cc6f450b185e51a9c42402dc9d36fa6741c19c2aa62464a5eb3", + "base58": "b5pMgizA9vrGRt3hVqnU7vUVGBQUnLpwPzcJhG1ucyQ" + } +} diff --git a/rust/sealevel/environments/mainnet3/warp-routes/ezSOL-eclipse-solana/token-config.json b/rust/sealevel/environments/mainnet3/warp-routes/ezSOL-eclipse-solana/token-config.json new file mode 100644 index 0000000000..eef5c8349b --- /dev/null +++ b/rust/sealevel/environments/mainnet3/warp-routes/ezSOL-eclipse-solana/token-config.json @@ -0,0 +1,17 @@ +{ + "solanamainnet": { + "type": "collateral", + "decimals": 9, + "interchainGasPaymaster": "AkeHBbE5JkwVppujCQQ6WuxsVsJtruBAjUo6fDCFp6fF", + "token": "ezSoL6fY1PVdJcJsUpe5CM3xkfmy3zoVCABybm5WtiC", + "splTokenProgram": "token" + }, + "eclipsemainnet": { + "type": "synthetic", + "decimals": 9, + "name": "Renzo Restaked SOL", + "symbol": "ezSOL", + "uri": "https://raw.githubusercontent.com/hyperlane-xyz/hyperlane-registry/ae7df1bc00af19f8ba692c14e4df3acdbf30497d/deployments/warp_routes/EZSOL/metadata.json", + "interchainGasPaymaster": "3Wp4qKkgf4tjXz1soGyTSndCgBPLZFSrZkiDZ8Qp9EEj" + } +} diff --git a/typescript/cli/src/deploy/warp.ts b/typescript/cli/src/deploy/warp.ts index 026cd594bb..161d296f88 100644 --- a/typescript/cli/src/deploy/warp.ts +++ b/typescript/cli/src/deploy/warp.ts @@ -136,16 +136,24 @@ export async function runWarpRouteDeploy({ await runDeployPlanStep(deploymentParams); + // Some of the below functions throw if passed non-EVM chains + const ethereumChains = chains.filter( + (chain) => chainMetadata[chain].protocol === ProtocolType.Ethereum, + ); + await runPreflightChecksForChains({ context, - chains, + chains: ethereumChains, minGas: MINIMUM_WARP_DEPLOY_GAS, }); const userAddress = await signer.getAddress(); - const initialBalances = await prepareDeploy(context, userAddress, chains); - + const initialBalances = await prepareDeploy( + context, + userAddress, + ethereumChains, + ); const deployedContracts = await executeDeploy(deploymentParams, apiKeys); const warpCoreConfig = await getWarpCoreConfig( @@ -155,7 +163,13 @@ export async function runWarpRouteDeploy({ await writeDeploymentArtifacts(warpCoreConfig, context); - await completeDeploy(context, 'warp', initialBalances, userAddress, chains); + await completeDeploy( + context, + 'warp', + initialBalances, + userAddress, + ethereumChains, + ); } async function runDeployPlanStep({ context, warpDeployConfig }: DeployParams) { diff --git a/typescript/cli/src/utils/balances.ts b/typescript/cli/src/utils/balances.ts index 5cf8019771..4536353e57 100644 --- a/typescript/cli/src/utils/balances.ts +++ b/typescript/cli/src/utils/balances.ts @@ -2,8 +2,9 @@ import { confirm } from '@inquirer/prompts'; import { ethers } from 'ethers'; import { ChainName, MultiProvider } from '@hyperlane-xyz/sdk'; +import { ProtocolType } from '@hyperlane-xyz/utils'; -import { logGreen, logRed } from '../logger.js'; +import { logGray, logGreen, logRed } from '../logger.js'; export async function nativeBalancesAreSufficient( multiProvider: MultiProvider, @@ -15,6 +16,12 @@ export async function nativeBalancesAreSufficient( const sufficientBalances: boolean[] = []; for (const chain of chains) { + // Only Ethereum chains are supported + if (multiProvider.getProtocol(chain) !== ProtocolType.Ethereum) { + logGray(`Skipping balance check for non-EVM chain: ${chain}`); + continue; + } + const provider = multiProvider.getProvider(chain); const gasPrice = await provider.getGasPrice(); const minBalanceWei = gasPrice.mul(minGas).toString(); diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumApxETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumApxETHWarpConfig.ts new file mode 100644 index 0000000000..517836b52c --- /dev/null +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumApxETHWarpConfig.ts @@ -0,0 +1,46 @@ +import { ethers } from 'ethers'; + +import { + ChainMap, + OwnableConfig, + TokenRouterConfig, + TokenType, +} from '@hyperlane-xyz/sdk'; + +import { getOwnerConfigForAddress } from '../../../../../src/config/environment.js'; +import { + RouterConfigWithoutOwner, + tokens, +} from '../../../../../src/config/warp.js'; +import { DEPLOYER } from '../../owners.js'; +import { SEALEVEL_WARP_ROUTE_HANDLER_GAS_AMOUNT } from '../consts.js'; + +const ethereumOwner = DEPLOYER; +const eclipseOwner = '9bRSUPjfS3xS6n5EfkJzHFTRDa4AHLda8BU2pP4HoWnf'; + +export async function getEclipseEthereumApxEthWarpConfig( + routerConfig: ChainMap, + _abacusWorksEnvOwnerConfig: ChainMap, +): Promise> { + const eclipsemainnet: TokenRouterConfig = { + ...routerConfig.eclipsemainnet, + ...getOwnerConfigForAddress(eclipseOwner), + type: TokenType.synthetic, + foreignDeployment: '9pEgj7m2VkwLtJHPtTw5d8vbB7kfjzcXXCRgdwruW7C2', + gas: SEALEVEL_WARP_ROUTE_HANDLER_GAS_AMOUNT, + interchainSecurityModule: ethers.constants.AddressZero, + }; + + let ethereum: TokenRouterConfig = { + ...routerConfig.ethereum, + ...getOwnerConfigForAddress(ethereumOwner), + type: TokenType.collateral, + token: tokens.ethereum.apxETH, + interchainSecurityModule: ethers.constants.AddressZero, + }; + + return { + eclipsemainnet, + ethereum, + }; +} diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumSolanaUSDCWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumSolanaUSDCWarpConfig.ts index 078c90776e..eaaf5749c6 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumSolanaUSDCWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumSolanaUSDCWarpConfig.ts @@ -8,6 +8,7 @@ import { } from '@hyperlane-xyz/sdk'; import { tokens } from '../../../../../src/config/warp.js'; +import { SEALEVEL_WARP_ROUTE_HANDLER_GAS_AMOUNT } from '../consts.js'; export const getEclipseEthereumSolanaUSDCWarpConfig = async ( routerConfig: ChainMap, @@ -16,7 +17,7 @@ export const getEclipseEthereumSolanaUSDCWarpConfig = async ( ...routerConfig.eclipsemainnet, type: TokenType.synthetic, foreignDeployment: 'D6k6T3G74ij6atCtBiWBs5TbFa1hFVcrFUSGZHuV7q3Z', - gas: 300_000, + gas: SEALEVEL_WARP_ROUTE_HANDLER_GAS_AMOUNT, }; const ethereum: TokenRouterConfig = { diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumSolanaUSDTWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumSolanaUSDTWarpConfig.ts index fbece7506f..bbabe4f5dc 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumSolanaUSDTWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumSolanaUSDTWarpConfig.ts @@ -11,6 +11,7 @@ import { RouterConfigWithoutOwner, tokens, } from '../../../../../src/config/warp.js'; +import { SEALEVEL_WARP_ROUTE_HANDLER_GAS_AMOUNT } from '../consts.js'; export const getEclipseEthereumSolanaUSDTWarpConfig = async ( routerConfig: ChainMap, @@ -21,7 +22,7 @@ export const getEclipseEthereumSolanaUSDTWarpConfig = async ( ...abacusWorksEnvOwnerConfig.eclipsemainnet, type: TokenType.synthetic, foreignDeployment: '5g5ujyYUNvdydwyDVCpZwPpgYRqH5RYJRi156cxyE3me', - gas: 300_000, + gas: SEALEVEL_WARP_ROUTE_HANDLER_GAS_AMOUNT, interchainSecurityModule: ethers.constants.AddressZero, }; let ethereum: TokenRouterConfig = { diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumTETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumTETHWarpConfig.ts index db149da15c..ca6138df1d 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumTETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumTETHWarpConfig.ts @@ -7,6 +7,8 @@ import { TokenType, } from '@hyperlane-xyz/sdk'; +import { SEALEVEL_WARP_ROUTE_HANDLER_GAS_AMOUNT } from '../consts.js'; + export const getEthereumEclipseTETHWarpConfig = async ( routerConfig: ChainMap, ): Promise> => { @@ -14,7 +16,7 @@ export const getEthereumEclipseTETHWarpConfig = async ( ...routerConfig.eclipsemainnet, type: TokenType.synthetic, foreignDeployment: 'BJa3fPvvjKx8gRCWunoSrWBbsmieub37gsGpjp4BfTfW', - gas: 300_000, + gas: SEALEVEL_WARP_ROUTE_HANDLER_GAS_AMOUNT, }; const ethereum: TokenRouterConfig = { diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumWBTCWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumWBTCWarpConfig.ts index 4b2a4a7bb0..0b1fd23431 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumWBTCWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumWBTCWarpConfig.ts @@ -11,6 +11,7 @@ import { RouterConfigWithoutOwner, tokens, } from '../../../../../src/config/warp.js'; +import { SEALEVEL_WARP_ROUTE_HANDLER_GAS_AMOUNT } from '../consts.js'; export const getEclipseEthereumWBTCWarpConfig = async ( routerConfig: ChainMap, @@ -21,7 +22,7 @@ export const getEclipseEthereumWBTCWarpConfig = async ( ...abacusWorksEnvOwnerConfig.eclipsemainnet, type: TokenType.synthetic, foreignDeployment: 'A7EGCDYFw5R7Jfm6cYtKvY8dmkrYMgwRCJFkyQwpHTYu', - gas: 300_000, + gas: SEALEVEL_WARP_ROUTE_HANDLER_GAS_AMOUNT, interchainSecurityModule: ethers.constants.AddressZero, }; diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumWeETHsWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumWeETHsWarpConfig.ts index b4d7885f22..7df68ccbac 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumWeETHsWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumWeETHsWarpConfig.ts @@ -13,6 +13,7 @@ import { RouterConfigWithoutOwner, tokens, } from '../../../../../src/config/warp.js'; +import { SEALEVEL_WARP_ROUTE_HANDLER_GAS_AMOUNT } from '../consts.js'; // Safe owned by Veda const ethereumOwner = '0xCEA8039076E35a825854c5C2f85659430b06ec96'; @@ -28,7 +29,7 @@ export async function getEclipseEthereumWeEthsWarpConfig( ...getOwnerConfigForAddress(eclipseOwner), type: TokenType.synthetic, foreignDeployment: '7Zx4wU1QAw98MfvnPFqRh1oyumek7G5VAX6TKB3U1tcn', - gas: 300_000, + gas: SEALEVEL_WARP_ROUTE_HANDLER_GAS_AMOUNT, interchainSecurityModule: ethers.constants.AddressZero, }; diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseStrideSTTIAWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseStrideSTTIAWarpConfig.ts index 4d8c79a7ce..158e6e367f 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseStrideSTTIAWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseStrideSTTIAWarpConfig.ts @@ -7,6 +7,7 @@ import { import { getOwnerConfigForAddress } from '../../../../../src/config/environment.js'; import { RouterConfigWithoutOwner } from '../../../../../src/config/warp.js'; +import { SEALEVEL_WARP_ROUTE_HANDLER_GAS_AMOUNT } from '../consts.js'; // Stride team const strideOwner = 'stride1k8c2m5cn322akk5wy8lpt87dd2f4yh9azg7jlh'; @@ -20,7 +21,7 @@ export const getEclipseStrideTiaWarpConfig = async ( ...abacusWorksEnvOwnerConfig.eclipsemainnet, type: TokenType.synthetic, foreignDeployment: 'BpXHAiktwjx7fN6M9ST9wr6qKAsH27wZFhdHEhReJsR6', - gas: 300_000, + gas: SEALEVEL_WARP_ROUTE_HANDLER_GAS_AMOUNT, }; const stride: TokenRouterConfig = { diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseStrideTIAWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseStrideTIAWarpConfig.ts index d687138b35..9364026599 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseStrideTIAWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseStrideTIAWarpConfig.ts @@ -7,6 +7,7 @@ import { import { getOwnerConfigForAddress } from '../../../../../src/config/environment.js'; import { RouterConfigWithoutOwner } from '../../../../../src/config/warp.js'; +import { SEALEVEL_WARP_ROUTE_HANDLER_GAS_AMOUNT } from '../consts.js'; // Stride team const strideOwner = 'stride1k8c2m5cn322akk5wy8lpt87dd2f4yh9azg7jlh'; @@ -20,7 +21,7 @@ export const getEclipseStrideStTiaWarpConfig = async ( ...abacusWorksEnvOwnerConfig.eclipsemainnet, type: TokenType.synthetic, foreignDeployment: 'tKUHyJ5NxhnwU94JUmzh1ekukDcHHX8mZF6fqxbMwX6', - gas: 300_000, + gas: SEALEVEL_WARP_ROUTE_HANDLER_GAS_AMOUNT, }; const stride: TokenRouterConfig = { diff --git a/typescript/infra/config/environments/mainnet3/warp/consts.ts b/typescript/infra/config/environments/mainnet3/warp/consts.ts new file mode 100644 index 0000000000..f201c1784e --- /dev/null +++ b/typescript/infra/config/environments/mainnet3/warp/consts.ts @@ -0,0 +1,2 @@ +// The amount of gas to pay for when performing a transferRemote to a Sealevel chain. +export const SEALEVEL_WARP_ROUTE_HANDLER_GAS_AMOUNT = 300_000; diff --git a/typescript/infra/config/environments/mainnet3/warp/warpIds.ts b/typescript/infra/config/environments/mainnet3/warp/warpIds.ts index 70246891c8..679d531319 100644 --- a/typescript/infra/config/environments/mainnet3/warp/warpIds.ts +++ b/typescript/infra/config/environments/mainnet3/warp/warpIds.ts @@ -5,11 +5,13 @@ export enum WarpRouteIds { ArbitrumEthereumZircuitAMPHRETH = 'AMPHRETH/arbitrum-ethereum-zircuit', ArbitrumNeutronEclip = 'ECLIP/arbitrum-neutron', ArbitrumNeutronTIA = 'TIA/arbitrum-neutron', + EclipseEthereumApxEth = 'APXETH/eclipsemainnet-ethereum', EclipseEthereumSolanaUSDC = 'USDC/eclipsemainnet-ethereum-solanamainnet', EclipseEthereumSolanaUSDT = 'USDT/eclipsemainnet-ethereum-solanamainnet', EclipseEthereumTETH = 'tETH/eclipsemainnet-ethereum', EclipseEthereumWBTC = 'WBTC/eclipsemainnet-ethereum', EclipseEthereumWeETHs = 'weETHs/eclipsemainnet-ethereum', + EclipseSolanaEzSOL = 'EZSOL/eclipsemainnet-solanamainnet', EclipseSolanaORCA = 'ORCA/eclipsemainnet-solanamainnet', EclipseSolanaSOL = 'SOL/eclipsemainnet-solanamainnet', EclipseSolanaWIF = 'WIF/eclipsemainnet-solanamainnet', diff --git a/typescript/infra/config/warp.ts b/typescript/infra/config/warp.ts index 53c202db8e..a32dc4228b 100644 --- a/typescript/infra/config/warp.ts +++ b/typescript/infra/config/warp.ts @@ -16,6 +16,7 @@ import { getAncient8EthereumUSDCWarpConfig } from './environments/mainnet3/warp/ import { getArbitrumEthereumZircuitAmphrETHWarpConfig } from './environments/mainnet3/warp/configGetters/getArbitrumEthereumZircuitAmphrETHWarpConfig.js'; import { getArbitrumNeutronEclipWarpConfig } from './environments/mainnet3/warp/configGetters/getArbitrumNeutronEclipWarpConfig.js'; import { getArbitrumNeutronTiaWarpConfig } from './environments/mainnet3/warp/configGetters/getArbitrumNeutronTiaWarpConfig.js'; +import { getEclipseEthereumApxEthWarpConfig } from './environments/mainnet3/warp/configGetters/getEclipseEthereumApxETHWarpConfig.js'; import { getEclipseEthereumSolanaUSDTWarpConfig } from './environments/mainnet3/warp/configGetters/getEclipseEthereumSolanaUSDTWarpConfig.js'; import { getEclipseEthereumWBTCWarpConfig } from './environments/mainnet3/warp/configGetters/getEclipseEthereumWBTCWarpConfig.js'; import { getEclipseEthereumWeEthsWarpConfig } from './environments/mainnet3/warp/configGetters/getEclipseEthereumWeETHsWarpConfig.js'; @@ -59,12 +60,13 @@ export const warpConfigGetterMap: Record = { [WarpRouteIds.EthereumZircuitPZETH]: getRenzoPZETHWarpConfig, [WarpRouteIds.EthereumBscLumiaLUMIA]: getEthereumBscLUMIAWarpConfig, [WarpRouteIds.MantapacificNeutronTIA]: getMantapacificNeutronTiaWarpConfig, - [WarpRouteIds.EclipseStrideTIA]: getEclipseStrideTiaWarpConfig, - [WarpRouteIds.EclipseStrideSTTIA]: getEclipseStrideStTiaWarpConfig, + [WarpRouteIds.EclipseEthereumApxEth]: getEclipseEthereumApxEthWarpConfig, [WarpRouteIds.EclipseEthereumSolanaUSDT]: getEclipseEthereumSolanaUSDTWarpConfig, [WarpRouteIds.EclipseEthereumWBTC]: getEclipseEthereumWBTCWarpConfig, [WarpRouteIds.EclipseEthereumWeETHs]: getEclipseEthereumWeEthsWarpConfig, + [WarpRouteIds.EclipseStrideTIA]: getEclipseStrideTiaWarpConfig, + [WarpRouteIds.EclipseStrideSTTIA]: getEclipseStrideStTiaWarpConfig, }; export async function getWarpConfig( diff --git a/typescript/infra/scripts/warp-routes/generate-warp-config.ts b/typescript/infra/scripts/warp-routes/generate-warp-config.ts index 61f1cd46f6..077cef0d4c 100644 --- a/typescript/infra/scripts/warp-routes/generate-warp-config.ts +++ b/typescript/infra/scripts/warp-routes/generate-warp-config.ts @@ -34,4 +34,4 @@ async function main() { } } -main().catch(console.error).then(console.log); +main().catch((err) => console.error('Error:', err)); diff --git a/typescript/infra/src/config/warp.ts b/typescript/infra/src/config/warp.ts index 51dfaf4d2f..e42cd1f03d 100644 --- a/typescript/infra/src/config/warp.ts +++ b/typescript/infra/src/config/warp.ts @@ -10,6 +10,7 @@ import { Address } from '@hyperlane-xyz/utils'; export const tokens: ChainMap> = { ethereum: { amphrETH: '0x5fD13359Ba15A84B76f7F87568309040176167cd', + apxETH: '0x9ba021b0a9b958b5e75ce9f6dff97c7ee52cb3e6', cbBTC: '0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf', deUSD: '0x15700B564Ca08D9439C58cA5053166E8317aa138', USDC: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',