From 1ca857451039f52c6ed1e478bb5c2441fa496bf0 Mon Sep 17 00:00:00 2001 From: xeno097 Date: Fri, 29 Nov 2024 13:40:34 -0400 Subject: [PATCH] feat: zero warp deploys (#4876) ### Description Adds infra support for tracking and checking USDC, USDT, cbBTC and ETH routes for zeronetwork ### Drive-by changes - Removed unused imports ### Related issues ### Backward compatibility - Yes ### Testing - Manual ![image](https://github.com/user-attachments/assets/4be51df9-1d95-46cc-8dbb-f2e97f9eb744) ![image](https://github.com/user-attachments/assets/848ba67a-e62e-4c9b-ae64-052d935c86f4) --------- Co-authored-by: Trevor Porter --- .changeset/ten-pigs-double.md | 5 + ...rollZeroNetworkZoraMainnetETHWarpConfig.ts | 198 ++++++++++++++++++ ...ptimismPolygonZeroNetworkUSDCWarpConfig.ts | 114 ++++++++++ ...ePolygonScrollZeronetworkUSDTWarpConfig.ts | 116 ++++++++++ .../getBaseZeroNetworkCBBTCWarpConfig.ts | 50 +++++ .../environments/mainnet3/warp/warpIds.ts | 4 + typescript/infra/config/warp.ts | 11 + typescript/infra/scripts/check/check-utils.ts | 19 +- typescript/infra/src/agents/index.ts | 2 +- typescript/infra/src/config/warp.ts | 36 ++++ .../sdk/src/router/HyperlaneRouterChecker.ts | 6 +- 11 files changed, 551 insertions(+), 10 deletions(-) create mode 100644 .changeset/ten-pigs-double.md create mode 100644 typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumBaseBlastBscEthereumGnosisMantleModeOptimismPolygonScrollZeroNetworkZoraMainnetETHWarpConfig.ts create mode 100644 typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumBaseEthereumOptimismPolygonZeroNetworkUSDCWarpConfig.ts create mode 100644 typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumBscEthereumMantleModePolygonScrollZeronetworkUSDTWarpConfig.ts create mode 100644 typescript/infra/config/environments/mainnet3/warp/configGetters/getBaseZeroNetworkCBBTCWarpConfig.ts diff --git a/.changeset/ten-pigs-double.md b/.changeset/ten-pigs-double.md new file mode 100644 index 000000000..842ae825b --- /dev/null +++ b/.changeset/ten-pigs-double.md @@ -0,0 +1,5 @@ +--- +'@hyperlane-xyz/infra': minor +--- + +add USDC, USDT, cbBTC and ETH zeronetwork warp routes support in infra diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumBaseBlastBscEthereumGnosisMantleModeOptimismPolygonScrollZeroNetworkZoraMainnetETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumBaseBlastBscEthereumGnosisMantleModeOptimismPolygonScrollZeroNetworkZoraMainnetETHWarpConfig.ts new file mode 100644 index 000000000..4b77a7c68 --- /dev/null +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumBaseBlastBscEthereumGnosisMantleModeOptimismPolygonScrollZeroNetworkZoraMainnetETHWarpConfig.ts @@ -0,0 +1,198 @@ +import { ethers } from 'ethers'; + +import { + ChainMap, + IsmConfig, + OwnableConfig, + RouterConfig, + TokenRouterConfig, + TokenType, +} from '@hyperlane-xyz/sdk'; + +import { + RouterConfigWithoutOwner, + tokens, +} from '../../../../../src/config/warp.js'; + +export const getArbitrumBaseBlastBscEthereumGnosisMantleModeOptimismPolygonScrollZeroNetworkZoraMainnetETHWarpConfig = + async ( + routerConfig: ChainMap, + abacusWorksEnvOwnerConfig: ChainMap, + ): Promise> => { + const ISM_CONFIG: IsmConfig = ethers.constants.AddressZero; + + const arbitrum: TokenRouterConfig = { + ...routerConfig.arbitrum, + ...abacusWorksEnvOwnerConfig.arbitrum, + proxyAdmin: { + ...abacusWorksEnvOwnerConfig.arbitrum, + address: '0x544BC0f2B619a6920650B0469EA3b6d6Ef3B0b10', + }, + type: TokenType.native, + interchainSecurityModule: ISM_CONFIG, + }; + + const base: TokenRouterConfig = { + ...routerConfig.base, + ...abacusWorksEnvOwnerConfig.base, + proxyAdmin: { + ...abacusWorksEnvOwnerConfig.base, + address: '0x073235Fd88B04e3bA7fAC83146225c0de53E5c31', + }, + type: TokenType.native, + interchainSecurityModule: ISM_CONFIG, + }; + + const blast: TokenRouterConfig = { + ...routerConfig.blast, + ...abacusWorksEnvOwnerConfig.blast, + proxyAdmin: { + ...abacusWorksEnvOwnerConfig.blast, + address: '0x9775Dd30480D545b9bEd2A6a1DC344Ffbad9B223', + }, + type: TokenType.native, + interchainSecurityModule: ISM_CONFIG, + }; + + const bsc: TokenRouterConfig = { + ...routerConfig.bsc, + ...abacusWorksEnvOwnerConfig.bsc, + proxyAdmin: { + ...abacusWorksEnvOwnerConfig.bsc, + address: '0xa0B923456b08944bE30D0F237c041F191Eb0c9D0', + }, + type: TokenType.collateral, + token: tokens.bsc.WETH, + interchainSecurityModule: ISM_CONFIG, + }; + + const ethereum: TokenRouterConfig = { + ...routerConfig.ethereum, + ...abacusWorksEnvOwnerConfig.ethereum, + proxyAdmin: { + ...abacusWorksEnvOwnerConfig.ethereum, + address: '0x5E76be0F4e09057D75140216F70fd4cE3365bb29', + }, + type: TokenType.native, + interchainSecurityModule: ISM_CONFIG, + }; + + const gnosis: TokenRouterConfig = { + ...routerConfig.gnosis, + ...abacusWorksEnvOwnerConfig.gnosis, + proxyAdmin: { + ...abacusWorksEnvOwnerConfig.gnosis, + address: '0xe516A113316cFdF8a44e125E4e3970dE6df0cC59', + }, + type: TokenType.collateral, + token: tokens.gnosis.WETH, + interchainSecurityModule: ISM_CONFIG, + }; + + const mantle: TokenRouterConfig = { + ...routerConfig.mantle, + ...abacusWorksEnvOwnerConfig.mantle, + proxyAdmin: { + ...abacusWorksEnvOwnerConfig.mantle, + address: '0xEaD68fD6e5A69136CD60De50bF22164658A8E04E', + }, + type: TokenType.collateral, + token: tokens.mantle.WETH, + interchainSecurityModule: ISM_CONFIG, + }; + + const mode: TokenRouterConfig = { + ...routerConfig.mode, + ...abacusWorksEnvOwnerConfig.mode, + proxyAdmin: { + ...abacusWorksEnvOwnerConfig.mode, + address: '0xEC1f2f8C42c8Ca4C8d15E6a0814667a379aB9b43', + }, + type: TokenType.native, + interchainSecurityModule: ISM_CONFIG, + }; + + const optimism: TokenRouterConfig = { + ...routerConfig.optimism, + ...abacusWorksEnvOwnerConfig.optimism, + proxyAdmin: { + ...abacusWorksEnvOwnerConfig.optimism, + address: '0xA900858116D7605a01AfC7595450d8D78555Bc83', + }, + type: TokenType.native, + interchainSecurityModule: ISM_CONFIG, + }; + + const polygon: TokenRouterConfig = { + ...routerConfig.polygon, + ...abacusWorksEnvOwnerConfig.polygon, + proxyAdmin: { + ...abacusWorksEnvOwnerConfig.polygon, + address: '0xcA11d580faaE3E6993aA230f437079ac21f3078a', + }, + type: TokenType.collateral, + token: tokens.polygon.WETH, + interchainSecurityModule: ISM_CONFIG, + }; + + const scroll: TokenRouterConfig = { + ...routerConfig.scroll, + ...abacusWorksEnvOwnerConfig.scroll, + proxyAdmin: { + ...abacusWorksEnvOwnerConfig.scroll, + address: '0xA452bDb132Cdf8d11E070786D78907ddB95C5120', + }, + type: TokenType.native, + interchainSecurityModule: ISM_CONFIG, + }; + + const zeronetwork: TokenRouterConfig = { + ...routerConfig.zeronetwork, + ...abacusWorksEnvOwnerConfig.zeronetwork, + proxyAdmin: { + ...abacusWorksEnvOwnerConfig.zeronetwork, + address: '0xc2caD038236ccDB113C9350EF2551633c65252eF', + }, + type: TokenType.native, + interchainSecurityModule: ISM_CONFIG, + }; + + const zoramainnet: TokenRouterConfig = { + ...routerConfig.zoramainnet, + ...abacusWorksEnvOwnerConfig.zoramainnet, + proxyAdmin: { + ...abacusWorksEnvOwnerConfig.zoramainnet, + address: '0x9775Dd30480D545b9bEd2A6a1DC344Ffbad9B223', + }, + type: TokenType.native, + interchainSecurityModule: ISM_CONFIG, + }; + + const lisk: TokenRouterConfig = { + ...routerConfig.lisk, + ...abacusWorksEnvOwnerConfig.lisk, + proxyAdmin: { + ...abacusWorksEnvOwnerConfig.lisk, + address: '0x5E76be0F4e09057D75140216F70fd4cE3365bb29', + }, + type: TokenType.synthetic, + interchainSecurityModule: ISM_CONFIG, + }; + + return { + arbitrum, + base, + blast, + bsc, + gnosis, + mantle, + mode, + optimism, + polygon, + scroll, + zeronetwork, + zoramainnet, + ethereum, + lisk, + }; + }; diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumBaseEthereumOptimismPolygonZeroNetworkUSDCWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumBaseEthereumOptimismPolygonZeroNetworkUSDCWarpConfig.ts new file mode 100644 index 000000000..6249765ef --- /dev/null +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumBaseEthereumOptimismPolygonZeroNetworkUSDCWarpConfig.ts @@ -0,0 +1,114 @@ +import { ethers } from 'ethers'; + +import { + ChainMap, + OwnableConfig, + RouterConfig, + TokenRouterConfig, + TokenType, +} from '@hyperlane-xyz/sdk'; + +import { + RouterConfigWithoutOwner, + tokens, +} from '../../../../../src/config/warp.js'; + +export const getArbitrumBaseEthereumOptimismPolygonZeroNetworkUSDC = async ( + routerConfig: ChainMap, + abacusWorksEnvOwnerConfig: ChainMap, +): Promise> => { + const ISM_CONFIG = ethers.constants.AddressZero; + + const arbitrum: TokenRouterConfig = { + ...routerConfig.arbitrum, + ...abacusWorksEnvOwnerConfig.arbitrum, + proxyAdmin: { + ...abacusWorksEnvOwnerConfig.arbitrum, + address: '0x02317D525FA7ceb5ea388244b4618f0c8Ac1CeC2', + }, + type: TokenType.collateral, + token: tokens.arbitrum.USDC, + interchainSecurityModule: ISM_CONFIG, + }; + + const base: TokenRouterConfig = { + ...routerConfig.base, + ...abacusWorksEnvOwnerConfig.base, + proxyAdmin: { + ...abacusWorksEnvOwnerConfig.base, + address: '0xB6E9331576C5aBF69376AF6989eA61b7C7ea67F1', + }, + type: TokenType.collateral, + token: tokens.base.USDC, + interchainSecurityModule: ISM_CONFIG, + }; + + const optimism: TokenRouterConfig = { + ...routerConfig.optimism, + ...abacusWorksEnvOwnerConfig.optimism, + proxyAdmin: { + ...abacusWorksEnvOwnerConfig.optimism, + address: '0xca9e64761C97b049901dF4E7a5926464969528b1', + }, + type: TokenType.collateral, + token: tokens.optimism.USDC, + interchainSecurityModule: ISM_CONFIG, + }; + + const polygon: TokenRouterConfig = { + ...routerConfig.polygon, + ...abacusWorksEnvOwnerConfig.polygon, + proxyAdmin: { + ...abacusWorksEnvOwnerConfig.polygon, + address: '0x7fd5be37d560626625f395A2e6E30eA89150cc98', + }, + type: TokenType.collateral, + token: tokens.polygon.USDC, + interchainSecurityModule: ISM_CONFIG, + }; + + const zeronetwork: TokenRouterConfig = { + ...routerConfig.zeronetwork, + ...abacusWorksEnvOwnerConfig.zeronetwork, + proxyAdmin: { + ...abacusWorksEnvOwnerConfig.zeronetwork, + address: '0x6E906d8AeEBE9025a410887EAafc58C2561705e0', + }, + type: TokenType.collateral, + token: tokens.zeronetwork.USDC, + interchainSecurityModule: ISM_CONFIG, + }; + + const ethereum: TokenRouterConfig = { + ...routerConfig.ethereum, + ...abacusWorksEnvOwnerConfig.ethereum, + proxyAdmin: { + ...abacusWorksEnvOwnerConfig.ethereum, + address: '0x81063D413Ed6Eac3FCf0521eea14906fD27fEb1A', + }, + type: TokenType.collateral, + token: tokens.ethereum.USDC, + interchainSecurityModule: ISM_CONFIG, + }; + + const lisk: TokenRouterConfig = { + ...routerConfig.lisk, + ...abacusWorksEnvOwnerConfig.lisk, + proxyAdmin: { + ...abacusWorksEnvOwnerConfig.lisk, + address: '0x81Db8B4Bc6F2e95781eeA2a21D0A453Ac046eFc0', + }, + type: TokenType.synthetic, + interchainSecurityModule: ISM_CONFIG, + }; + + return { + arbitrum, + base, + ethereum, + optimism, + polygon, + zeronetwork, + lisk, + }; +}; diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumBscEthereumMantleModePolygonScrollZeronetworkUSDTWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumBscEthereumMantleModePolygonScrollZeronetworkUSDTWarpConfig.ts new file mode 100644 index 000000000..4cd36b4ba --- /dev/null +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumBscEthereumMantleModePolygonScrollZeronetworkUSDTWarpConfig.ts @@ -0,0 +1,116 @@ +import { ethers } from 'ethers'; + +import { + ChainMap, + IsmConfig, + OwnableConfig, + RouterConfig, + TokenRouterConfig, + TokenType, +} from '@hyperlane-xyz/sdk'; + +import { + RouterConfigWithoutOwner, + tokens, +} from '../../../../../src/config/warp.js'; + +export const getArbitrumEthereumMantleModePolygonScrollZeroNetworkUSDTWarpConfig = + async ( + routerConfig: ChainMap, + abacusWorksEnvOwnerConfig: ChainMap, + ): Promise> => { + const ISM_CONFIG: IsmConfig = ethers.constants.AddressZero; + + const arbitrum: TokenRouterConfig = { + ...routerConfig.arbitrum, + ...abacusWorksEnvOwnerConfig.arbitrum, + proxyAdmin: { + ...abacusWorksEnvOwnerConfig.arbitrum, + address: '0x6701d503369cf6aA9e5EdFfEBFA40A2ffdf3dB21', + }, + type: TokenType.collateral, + token: tokens.arbitrum.USDT, + interchainSecurityModule: ISM_CONFIG, + }; + + const ethereum: TokenRouterConfig = { + ...routerConfig.ethereum, + ...abacusWorksEnvOwnerConfig.ethereum, + proxyAdmin: { + ...abacusWorksEnvOwnerConfig.ethereum, + address: '0xA92D6084709469A2B2339919FfC568b7C5D7888D', + }, + type: TokenType.collateral, + token: tokens.ethereum.USDT, + interchainSecurityModule: ISM_CONFIG, + }; + + const mantle: TokenRouterConfig = { + ...routerConfig.mantle, + ...abacusWorksEnvOwnerConfig.mantle, + proxyAdmin: { + ...abacusWorksEnvOwnerConfig.mantle, + address: '0x633268639892C73Fa7340Ec1da4e397cf3913c8C', + }, + type: TokenType.collateral, + token: tokens.mantle.USDT, + interchainSecurityModule: ISM_CONFIG, + }; + + const mode: TokenRouterConfig = { + ...routerConfig.mode, + ...abacusWorksEnvOwnerConfig.mode, + proxyAdmin: { + ...abacusWorksEnvOwnerConfig.mode, + address: '0x633268639892C73Fa7340Ec1da4e397cf3913c8C', + }, + type: TokenType.collateral, + token: tokens.mode.USDT, + interchainSecurityModule: ISM_CONFIG, + }; + + const polygon: TokenRouterConfig = { + ...routerConfig.polygon, + ...abacusWorksEnvOwnerConfig.polygon, + proxyAdmin: { + ...abacusWorksEnvOwnerConfig.polygon, + address: '0x5DBeAEC137d1ef9a240599656073Ae3E717fae3c', + }, + type: TokenType.collateral, + token: tokens.polygon.USDT, + interchainSecurityModule: ISM_CONFIG, + }; + + const scroll: TokenRouterConfig = { + ...routerConfig.scroll, + ...abacusWorksEnvOwnerConfig.scroll, + proxyAdmin: { + ...abacusWorksEnvOwnerConfig.scroll, + address: '0x81Db8B4Bc6F2e95781eeA2a21D0A453Ac046eFc0', + }, + type: TokenType.collateral, + token: tokens.scroll.USDT, + interchainSecurityModule: ISM_CONFIG, + }; + + const zeronetwork: TokenRouterConfig = { + ...routerConfig.zeronetwork, + ...abacusWorksEnvOwnerConfig.zeronetwork, + proxyAdmin: { + ...abacusWorksEnvOwnerConfig.zeronetwork, + address: '0xa3F188BDd6e3894b393e12396347545bC47E7B0e', + }, + type: TokenType.synthetic, + interchainSecurityModule: ISM_CONFIG, + }; + + return { + arbitrum, + ethereum, + mantle, + mode, + polygon, + scroll, + zeronetwork, + }; + }; diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getBaseZeroNetworkCBBTCWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getBaseZeroNetworkCBBTCWarpConfig.ts new file mode 100644 index 000000000..56570748a --- /dev/null +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getBaseZeroNetworkCBBTCWarpConfig.ts @@ -0,0 +1,50 @@ +import { ethers } from 'ethers'; + +import { + ChainMap, + IsmConfig, + OwnableConfig, + RouterConfig, + TokenRouterConfig, + TokenType, +} from '@hyperlane-xyz/sdk'; + +import { + RouterConfigWithoutOwner, + tokens, +} from '../../../../../src/config/warp.js'; + +export const getBaseZeroNetworkCBBTCWarpConfig = async ( + routerConfig: ChainMap, + abacusWorksEnvOwnerConfig: ChainMap, +): Promise> => { + const ISM_CONFIG: IsmConfig = ethers.constants.AddressZero; + + const base: TokenRouterConfig = { + ...routerConfig.base, + ...abacusWorksEnvOwnerConfig.base, + proxyAdmin: { + ...abacusWorksEnvOwnerConfig.base, + address: '0x0FC41a92F526A8CD22060A4052e156502D6B9db0', + }, + type: TokenType.collateral, + token: tokens.base.cbBTC, + interchainSecurityModule: ISM_CONFIG, + }; + + const zeronetwork: TokenRouterConfig = { + ...routerConfig.zeronetwork, + ...abacusWorksEnvOwnerConfig.zeronetwork, + proxyAdmin: { + ...abacusWorksEnvOwnerConfig.zeronetwork, + address: '0xDb0F69187750b52A637938Ea790fAE667123367c', + }, + type: TokenType.synthetic, + interchainSecurityModule: ISM_CONFIG, + }; + + return { + base, + zeronetwork, + }; +}; diff --git a/typescript/infra/config/environments/mainnet3/warp/warpIds.ts b/typescript/infra/config/environments/mainnet3/warp/warpIds.ts index 679d53131..3d23bdc08 100644 --- a/typescript/infra/config/environments/mainnet3/warp/warpIds.ts +++ b/typescript/infra/config/environments/mainnet3/warp/warpIds.ts @@ -28,4 +28,8 @@ export enum WarpRouteIds { EthereumBscLumiaLUMIA = 'LUMIA/bsc-ethereum-lumia', InevmInjectiveINJ = 'INJ/inevm-injective', MantapacificNeutronTIA = 'TIA/mantapacific-neutron', + BaseZeroNetworkCBBTC = 'CBBTC/base-zeronetwork', + ArbitrumEthereumMantleModePolygonScrollZeroNetworkUSDT = 'USDT/arbitrum-ethereum-mantle-mode-polygon-scroll-zeronetwork', + ArbitrumBaseEthereumLiskOptimismPolygonZeroNetworkUSDC = 'USDC/arbitrum-base-ethereum-lisk-optimism-polygon-zeronetwork', + ArbitrumBaseBlastBscEthereumGnosisLiskMantleModeOptimismPolygonScrollZeroNetworkZoraMainnet = 'ETH/arbitrum-base-blast-bsc-ethereum-gnosis-lisk-mantle-mode-optimism-polygon-scroll-zeronetwork-zoramainnet', } diff --git a/typescript/infra/config/warp.ts b/typescript/infra/config/warp.ts index a32dc4228..0d93e10dd 100644 --- a/typescript/infra/config/warp.ts +++ b/typescript/infra/config/warp.ts @@ -13,9 +13,13 @@ import { import { RouterConfigWithoutOwner } from '../src/config/warp.js'; import { getAncient8EthereumUSDCWarpConfig } from './environments/mainnet3/warp/configGetters/getAncient8EthereumUSDCWarpConfig.js'; +import { getArbitrumBaseBlastBscEthereumGnosisMantleModeOptimismPolygonScrollZeroNetworkZoraMainnetETHWarpConfig } from './environments/mainnet3/warp/configGetters/getArbitrumBaseBlastBscEthereumGnosisMantleModeOptimismPolygonScrollZeroNetworkZoraMainnetETHWarpConfig.js'; +import { getArbitrumBaseEthereumOptimismPolygonZeroNetworkUSDC } from './environments/mainnet3/warp/configGetters/getArbitrumBaseEthereumOptimismPolygonZeroNetworkUSDCWarpConfig.js'; +import { getArbitrumEthereumMantleModePolygonScrollZeroNetworkUSDTWarpConfig } from './environments/mainnet3/warp/configGetters/getArbitrumBscEthereumMantleModePolygonScrollZeronetworkUSDTWarpConfig.js'; 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 { getBaseZeroNetworkCBBTCWarpConfig } from './environments/mainnet3/warp/configGetters/getBaseZeroNetworkCBBTCWarpConfig.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'; @@ -65,6 +69,13 @@ export const warpConfigGetterMap: Record = { getEclipseEthereumSolanaUSDTWarpConfig, [WarpRouteIds.EclipseEthereumWBTC]: getEclipseEthereumWBTCWarpConfig, [WarpRouteIds.EclipseEthereumWeETHs]: getEclipseEthereumWeEthsWarpConfig, + [WarpRouteIds.BaseZeroNetworkCBBTC]: getBaseZeroNetworkCBBTCWarpConfig, + [WarpRouteIds.ArbitrumEthereumMantleModePolygonScrollZeroNetworkUSDT]: + getArbitrumEthereumMantleModePolygonScrollZeroNetworkUSDTWarpConfig, + [WarpRouteIds.ArbitrumBaseEthereumLiskOptimismPolygonZeroNetworkUSDC]: + getArbitrumBaseEthereumOptimismPolygonZeroNetworkUSDC, + [WarpRouteIds.ArbitrumBaseBlastBscEthereumGnosisLiskMantleModeOptimismPolygonScrollZeroNetworkZoraMainnet]: + getArbitrumBaseBlastBscEthereumGnosisMantleModeOptimismPolygonScrollZeroNetworkZoraMainnetETHWarpConfig, [WarpRouteIds.EclipseStrideTIA]: getEclipseStrideTiaWarpConfig, [WarpRouteIds.EclipseStrideSTTIA]: getEclipseStrideStTiaWarpConfig, }; diff --git a/typescript/infra/scripts/check/check-utils.ts b/typescript/infra/scripts/check/check-utils.ts index 2d0b6b030..a8289671a 100644 --- a/typescript/infra/scripts/check/check-utils.ts +++ b/typescript/infra/scripts/check/check-utils.ts @@ -204,14 +204,17 @@ export async function getGovernor( ...warpAddresses[key], }; - // if the owner in the config is an AW account, set the proxyAdmin to the AW singleton proxyAdmin - // this will ensure that the checker will check that any proxies are owned by the singleton proxyAdmin - const proxyAdmin = eqAddress( - config[key].owner, - envConfig.owners[key]?.owner, - ) - ? chainAddresses[key]?.proxyAdmin - : undefined; + // Use the specified proxyAdmin if it is set in the config + let proxyAdmin = config[key].proxyAdmin?.address; + // If the owner in the config is an AW account and there is no proxyAdmin in the config, + // set the proxyAdmin to the AW singleton proxyAdmin. + // This will ensure that the checker will check that any proxies are owned by the singleton proxyAdmin. + if ( + !proxyAdmin && + eqAddress(config[key].owner, envConfig.owners[key]?.owner) + ) { + proxyAdmin = chainAddresses[key]?.proxyAdmin; + } if (proxyAdmin) { obj[key].proxyAdmin = proxyAdmin; diff --git a/typescript/infra/src/agents/index.ts b/typescript/infra/src/agents/index.ts index b505bea1a..b7be0e009 100644 --- a/typescript/infra/src/agents/index.ts +++ b/typescript/infra/src/agents/index.ts @@ -2,7 +2,7 @@ import fs from 'fs'; import { join } from 'path'; import { ChainName, RelayerConfig, RpcConsensusType } from '@hyperlane-xyz/sdk'; -import { objFilter, objOmit, objOmitKeys, pick } from '@hyperlane-xyz/utils'; +import { objOmitKeys } from '@hyperlane-xyz/utils'; import { Contexts } from '../../config/contexts.js'; import { getChain } from '../../config/registry.js'; diff --git a/typescript/infra/src/config/warp.ts b/typescript/infra/src/config/warp.ts index e42cd1f03..467386f07 100644 --- a/typescript/infra/src/config/warp.ts +++ b/typescript/infra/src/config/warp.ts @@ -21,6 +21,42 @@ export const tokens: ChainMap> = { sei: { fastUSD: '0x37a4dD9CED2b19Cfe8FAC251cd727b5787E45269', }, + base: { + cbBTC: '0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf', + USDC: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', + }, + arbitrum: { + USDT: '0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9', + USDC: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831', + }, + bsc: { + USDT: '0x55d398326f99059fF775485246999027B3197955', + WETH: '0x2170Ed0880ac9A755fd29B2688956BD959F933F8', + }, + mantle: { + USDT: '0x201EBa5CC46D216Ce6DC03F6a759e8E766e956aE', + WETH: '0xdEAddEaDdeadDEadDEADDEAddEADDEAddead1111', + }, + mode: { + USDT: '0xf0F161fDA2712DB8b566946122a5af183995e2eD', + }, + polygon: { + USDT: '0xc2132D05D31c914a87C6611C10748AEb04B58e8F', + USDC: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359', + WETH: '0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619', + }, + scroll: { + USDT: '0xf55BEC9cafDbE8730f096Aa55dad6D22d44099Df', + }, + optimism: { + USDC: '0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85', + }, + gnosis: { + WETH: '0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1', + }, + zeronetwork: { + USDC: '0x6a6394F47DD0BAF794808F2749C09bd4Ee874E70', + }, }; export type RouterConfigWithoutOwner = Omit; diff --git a/typescript/sdk/src/router/HyperlaneRouterChecker.ts b/typescript/sdk/src/router/HyperlaneRouterChecker.ts index 2dde30791..abdc5c885 100644 --- a/typescript/sdk/src/router/HyperlaneRouterChecker.ts +++ b/typescript/sdk/src/router/HyperlaneRouterChecker.ts @@ -5,6 +5,7 @@ import { addressToBytes32, assert, eqAddress, + isZeroishAddress, rootLogger, } from '@hyperlane-xyz/utils'; @@ -104,7 +105,10 @@ export class HyperlaneRouterChecker< let expectedConfig = config.interchainSecurityModule; - if (typeof expectedConfig === 'string') { + if ( + typeof expectedConfig === 'string' && + !isZeroishAddress(expectedConfig) + ) { expectedConfig = await ismReader.deriveIsmConfig(expectedConfig); }