diff --git a/.changeset/metal-clocks-count.md b/.changeset/metal-clocks-count.md new file mode 100644 index 000000000..ccea6b73e --- /dev/null +++ b/.changeset/metal-clocks-count.md @@ -0,0 +1,6 @@ +--- +'@hyperlane-xyz/infra': minor +'@hyperlane-xyz/sdk': minor +--- + +Add Zerion deployments: WBTC, POL, BNB, USDB diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getBlastZeroNetworkUSDBWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getBlastZeroNetworkUSDBWarpConfig.ts new file mode 100644 index 000000000..020ac765e --- /dev/null +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getBlastZeroNetworkUSDBWarpConfig.ts @@ -0,0 +1,31 @@ +import { ethers } from 'ethers'; + +import { + ChainMap, + RouterConfig, + TokenRouterConfig, + TokenType, +} from '@hyperlane-xyz/sdk'; + +import { tokens } from '../../../../../src/config/warp.js'; + +export const getBlastZeroNetworkUSDBWarpConfig = async ( + routerConfig: ChainMap, +): Promise> => { + const blast: TokenRouterConfig = { + ...routerConfig.blast, + type: TokenType.collateral, + token: tokens.blast.usdb, + interchainSecurityModule: ethers.constants.AddressZero, + }; + + const zeronetwork: TokenRouterConfig = { + ...routerConfig.zeronetwork, + type: TokenType.synthetic, + interchainSecurityModule: ethers.constants.AddressZero, + }; + return { + blast, + zeronetwork, + }; +}; diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getBscZeroNetworkBNBConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getBscZeroNetworkBNBConfig.ts new file mode 100644 index 000000000..844e5ba94 --- /dev/null +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getBscZeroNetworkBNBConfig.ts @@ -0,0 +1,28 @@ +import { ethers } from 'ethers'; + +import { + ChainMap, + RouterConfig, + TokenRouterConfig, + TokenType, +} from '@hyperlane-xyz/sdk'; + +export const getBscZeroNetworkBNBWarpConfig = async ( + routerConfig: ChainMap, +): Promise> => { + const bsc: TokenRouterConfig = { + ...routerConfig.bsc, + type: TokenType.native, + interchainSecurityModule: ethers.constants.AddressZero, + }; + + const zeronetwork: TokenRouterConfig = { + ...routerConfig.zeronetwork, + type: TokenType.synthetic, + interchainSecurityModule: ethers.constants.AddressZero, + }; + return { + bsc, + zeronetwork, + }; +}; diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumModeScrollZeronetworkWBTCConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumModeScrollZeronetworkWBTCConfig.ts new file mode 100644 index 000000000..fe47eb321 --- /dev/null +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumModeScrollZeronetworkWBTCConfig.ts @@ -0,0 +1,53 @@ +import { ethers } from 'ethers'; + +import { + ChainMap, + RouterConfig, + TokenRouterConfig, + TokenType, +} from '@hyperlane-xyz/sdk'; +import { Address } from '@hyperlane-xyz/utils'; + +const collateralAddresses: ChainMap
= { + ethereum: '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599', + mode: '0xcDd475325D6F564d27247D1DddBb0DAc6fA0a5CF', + scroll: '0x3C1BCa5a656e69edCD0D4E36BEbb3FcDAcA60Cf1', +}; + +export const getEthereumModeScrollZeronetworkWBTCConfig = async ( + routerConfig: ChainMap, +): Promise> => { + const ethereum: TokenRouterConfig = { + ...routerConfig.ethereum, + type: TokenType.collateral, + token: collateralAddresses.ethereum, + interchainSecurityModule: ethers.constants.AddressZero, + }; + + const mode: TokenRouterConfig = { + ...routerConfig.mode, + type: TokenType.collateral, + token: collateralAddresses.mode, + interchainSecurityModule: ethers.constants.AddressZero, + }; + + const scroll: TokenRouterConfig = { + ...routerConfig.scroll, + type: TokenType.collateral, + token: collateralAddresses.scroll, + interchainSecurityModule: ethers.constants.AddressZero, + }; + + const zeronetwork: TokenRouterConfig = { + ...routerConfig.zeronetwork, + type: TokenType.synthetic, + interchainSecurityModule: ethers.constants.AddressZero, + }; + + return { + ethereum, + mode, + scroll, + zeronetwork, + }; +}; diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getPolygonZeroNetworkPolConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getPolygonZeroNetworkPolConfig.ts new file mode 100644 index 000000000..01a8b3a56 --- /dev/null +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getPolygonZeroNetworkPolConfig.ts @@ -0,0 +1,28 @@ +import { ethers } from 'ethers'; + +import { + ChainMap, + RouterConfig, + TokenRouterConfig, + TokenType, +} from '@hyperlane-xyz/sdk'; + +export const getPolygonZeroNetworkPolWarpConfig = async ( + routerConfig: ChainMap, +): Promise> => { + const polygon: TokenRouterConfig = { + ...routerConfig.polygon, + type: TokenType.native, + interchainSecurityModule: ethers.constants.AddressZero, + }; + + const zeronetwork: TokenRouterConfig = { + ...routerConfig.zeronetwork, + type: TokenType.synthetic, + interchainSecurityModule: ethers.constants.AddressZero, + }; + return { + polygon, + zeronetwork, + }; +}; diff --git a/typescript/infra/config/environments/mainnet3/warp/warpIds.ts b/typescript/infra/config/environments/mainnet3/warp/warpIds.ts index 605f0a794..5dbb3ef55 100644 --- a/typescript/infra/config/environments/mainnet3/warp/warpIds.ts +++ b/typescript/infra/config/environments/mainnet3/warp/warpIds.ts @@ -5,6 +5,8 @@ export enum WarpRouteIds { ArbitrumEthereumZircuitAMPHRETH = 'AMPHRETH/arbitrum-ethereum-zircuit', ArbitrumNeutronEclip = 'ECLIP/arbitrum-neutron', ArbitrumNeutronTIA = 'TIA/arbitrum-neutron', + BlastZeroNetworkUSDB = 'USDB/blast-zeronetwork', + BscZeroNetworkBNB = 'BNB/bsc-zeronetwork', EclipseEthereumSolanaUSDC = 'USDC/eclipsemainnet-ethereum-solanamainnet', EclipseEthereumSolanaUSDT = 'USDT/eclipsemainnet-ethereum-solanamainnet', EclipseEthereumTETH = 'tETH/eclipsemainnet-ethereum', @@ -23,6 +25,8 @@ export enum WarpRouteIds { EthereumVictionUSDT = 'USDT/ethereum-viction', EthereumZircuitPZETH = 'PZETH/ethereum-zircuit', EthereumBscLumiaLUMIA = 'LUMIA/bsc-ethereum-lumia', + EthereumModeScrollZeroNetworkWBTC = 'WBTC/ethereum-mode-scroll-zeronetwork', InevmInjectiveINJ = 'INJ/inevm-injective', MantapacificNeutronTIA = 'TIA/mantapacific-neutron', + PolygonZeroNetworkPOL = 'POL/polygon-zeronetwork', } diff --git a/typescript/infra/config/warp.ts b/typescript/infra/config/warp.ts index 3a9bf87e0..adb475b38 100644 --- a/typescript/infra/config/warp.ts +++ b/typescript/infra/config/warp.ts @@ -15,6 +15,8 @@ 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 { getBlastZeroNetworkUSDBWarpConfig } from './environments/mainnet3/warp/configGetters/getBlastZeroNetworkUSDBWarpConfig.js'; +import { getBscZeroNetworkBNBWarpConfig } from './environments/mainnet3/warp/configGetters/getBscZeroNetworkBNBConfig.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'; @@ -23,12 +25,14 @@ import { getEclipseStrideStTiaWarpConfig } from './environments/mainnet3/warp/co import { getEthereumBscLUMIAWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumBscLumiaLUMIAWarpConfig.js'; import { getEthereumInevmUSDCWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumInevmUSDCWarpConfig.js'; import { getEthereumInevmUSDTWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumInevmUSDTWarpConfig.js'; +import { getEthereumModeScrollZeronetworkWBTCConfig } from './environments/mainnet3/warp/configGetters/getEthereumModeScrollZeronetworkWBTCConfig.js'; import { getEthereumSeiFastUSDWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumSeiFastUSDWarpConfig.js'; import { getEthereumVictionETHWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumVictionETHWarpConfig.js'; import { getEthereumVictionUSDCWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumVictionUSDCWarpConfig.js'; import { getEthereumVictionUSDTWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumVictionUSDTWarpConfig.js'; import { getInevmInjectiveINJWarpConfig } from './environments/mainnet3/warp/configGetters/getInevmInjectiveINJWarpConfig.js'; import { getMantapacificNeutronTiaWarpConfig } from './environments/mainnet3/warp/configGetters/getMantapacificNeutronTiaWarpConfig.js'; +import { getPolygonZeroNetworkPolWarpConfig } from './environments/mainnet3/warp/configGetters/getPolygonZeroNetworkPolConfig.js'; import { getRenzoEZETHWarpConfig } from './environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.js'; import { getRenzoPZETHWarpConfig } from './environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.js'; import { WarpRouteIds } from './environments/mainnet3/warp/warpIds.js'; @@ -52,6 +56,8 @@ export const warpConfigGetterMap: Record< [WarpRouteIds.ArbitrumNeutronTIA]: getArbitrumNeutronTiaWarpConfig, [WarpRouteIds.ArbitrumBaseBlastBscEthereumFraxtalLineaModeOptimismSeiTaikoZircuitEZETH]: getRenzoEZETHWarpConfig, + [WarpRouteIds.BlastZeroNetworkUSDB]: getBlastZeroNetworkUSDBWarpConfig, + [WarpRouteIds.BscZeroNetworkBNB]: getBscZeroNetworkBNBWarpConfig, [WarpRouteIds.InevmInjectiveINJ]: getInevmInjectiveINJWarpConfig, [WarpRouteIds.EthereumSeiFastUSD]: getEthereumSeiFastUSDWarpConfig, [WarpRouteIds.EthereumVictionETH]: getEthereumVictionETHWarpConfig, @@ -59,6 +65,8 @@ export const warpConfigGetterMap: Record< [WarpRouteIds.EthereumVictionUSDT]: getEthereumVictionUSDTWarpConfig, [WarpRouteIds.EthereumZircuitPZETH]: getRenzoPZETHWarpConfig, [WarpRouteIds.EthereumBscLumiaLUMIA]: getEthereumBscLUMIAWarpConfig, + [WarpRouteIds.EthereumModeScrollZeroNetworkWBTC]: + getEthereumModeScrollZeronetworkWBTCConfig, [WarpRouteIds.MantapacificNeutronTIA]: getMantapacificNeutronTiaWarpConfig, [WarpRouteIds.EclipseStrideTIA]: getEclipseStrideTiaWarpConfig, [WarpRouteIds.EclipseStrideSTTIA]: getEclipseStrideStTiaWarpConfig, @@ -66,6 +74,7 @@ export const warpConfigGetterMap: Record< getEclipseEthereumSolanaUSDTWarpConfig, [WarpRouteIds.EclipseEthereumWBTC]: getEclipseEthereumWBTCWarpConfig, [WarpRouteIds.EclipseEthereumWeETHs]: getEclipseEthereumWeEthsWarpConfig, + [WarpRouteIds.PolygonZeroNetworkPOL]: getPolygonZeroNetworkPolWarpConfig, }; export async function getWarpConfig( diff --git a/typescript/infra/src/config/warp.ts b/typescript/infra/src/config/warp.ts index 27f159079..99f0ee4a3 100644 --- a/typescript/infra/src/config/warp.ts +++ b/typescript/infra/src/config/warp.ts @@ -14,4 +14,7 @@ export const tokens: ChainMap> = { sei: { fastUSD: '0x37a4dD9CED2b19Cfe8FAC251cd727b5787E45269', }, + blast: { + usdb: '0x4300000000000000000000000000000000000003', + }, }; 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); }