From 28becff74f8b98ca87244050a2e5875d4c38bc34 Mon Sep 17 00:00:00 2001 From: Jason Guo <33064781+Xaroz@users.noreply.github.com> Date: Tue, 14 Jan 2025 19:05:09 -0600 Subject: [PATCH] feat: artela-base warp route configs (#5169) ### Description - Add `USDC/artela-base` warp route config - Add `WETH/artela-base` warp route config [Related registry PR](https://github.com/hyperlane-xyz/hyperlane-registry/pull/488) ### Drive-by changes No ### Related issues ### Backward compatibility Yes ### Testing CLI --- .changeset/flat-lamps-deliver.md | 5 +++ .registryrc | 2 +- rust/main/config/mainnet_config.json | 2 +- .../getArtelaBaseUSDCWarpConfig.ts | 38 +++++++++++++++++++ .../getArtelaBaseWETHWarpConfig.ts | 38 +++++++++++++++++++ .../environments/mainnet3/warp/warpIds.ts | 2 + typescript/infra/config/warp.ts | 4 ++ typescript/infra/src/config/warp.ts | 1 + typescript/infra/src/warp/helm.ts | 2 +- 9 files changed, 91 insertions(+), 3 deletions(-) create mode 100644 .changeset/flat-lamps-deliver.md create mode 100644 typescript/infra/config/environments/mainnet3/warp/configGetters/getArtelaBaseUSDCWarpConfig.ts create mode 100644 typescript/infra/config/environments/mainnet3/warp/configGetters/getArtelaBaseWETHWarpConfig.ts diff --git a/.changeset/flat-lamps-deliver.md b/.changeset/flat-lamps-deliver.md new file mode 100644 index 0000000000..bca1b390b8 --- /dev/null +++ b/.changeset/flat-lamps-deliver.md @@ -0,0 +1,5 @@ +--- +'@hyperlane-xyz/infra': minor +--- + +Add Artela/Base USDC and WETH warp route config diff --git a/.registryrc b/.registryrc index 001391d9ac..1cc1eb1ad9 100644 --- a/.registryrc +++ b/.registryrc @@ -1 +1 @@ -195c073c3c34b234c8d0aed2a16962a2d3945354 +47aba98bdd78ecb5a3f756dca6dc2e28325bab43 diff --git a/rust/main/config/mainnet_config.json b/rust/main/config/mainnet_config.json index 4aa9b27a4b..bc430715e1 100644 --- a/rust/main/config/mainnet_config.json +++ b/rust/main/config/mainnet_config.json @@ -7372,7 +7372,7 @@ "blockExplorers": [ { "apiUrl": "https://artscan.artela.network/api", - "family": "other", + "family": "blockscout", "name": "Artela Explorer", "url": "https://artscan.artela.network" } diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getArtelaBaseUSDCWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getArtelaBaseUSDCWarpConfig.ts new file mode 100644 index 0000000000..43f1238608 --- /dev/null +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getArtelaBaseUSDCWarpConfig.ts @@ -0,0 +1,38 @@ +import { ethers } from 'ethers'; + +import { ChainMap, HypTokenRouterConfig, TokenType } from '@hyperlane-xyz/sdk'; + +import { + RouterConfigWithoutOwner, + tokens, +} from '../../../../../src/config/warp.js'; + +const artelaOwner = '0x801e8135867D65e742eb070A9fC0aD9c2f69B4cd'; +const baseOwner = '0x801e8135867D65e742eb070A9fC0aD9c2f69B4cd'; + +const ISM_CONFIG = ethers.constants.AddressZero; // Default ISM + +export const getArtelaBaseUSDCWarpConfig = async ( + routerConfig: ChainMap, +): Promise> => { + const artela: HypTokenRouterConfig = { + ...routerConfig.artela, + owner: artelaOwner, + type: TokenType.synthetic, + symbol: 'USDC.a', + interchainSecurityModule: ISM_CONFIG, + }; + + const base: HypTokenRouterConfig = { + ...routerConfig.base, + owner: baseOwner, + type: TokenType.collateral, + token: tokens.base.USDC, + interchainSecurityModule: ISM_CONFIG, + }; + + return { + artela, + base, + }; +}; diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getArtelaBaseWETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getArtelaBaseWETHWarpConfig.ts new file mode 100644 index 0000000000..06756c06e4 --- /dev/null +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getArtelaBaseWETHWarpConfig.ts @@ -0,0 +1,38 @@ +import { ethers } from 'ethers'; + +import { ChainMap, HypTokenRouterConfig, TokenType } from '@hyperlane-xyz/sdk'; + +import { + RouterConfigWithoutOwner, + tokens, +} from '../../../../../src/config/warp.js'; + +const artelaOwner = '0x801e8135867D65e742eb070A9fC0aD9c2f69B4cd'; +const baseOwner = '0x801e8135867D65e742eb070A9fC0aD9c2f69B4cd'; + +const ISM_CONFIG = ethers.constants.AddressZero; // Default ISM + +export const getArtelaBaseWETHWarpConfig = async ( + routerConfig: ChainMap, +): Promise> => { + const artela: HypTokenRouterConfig = { + ...routerConfig.artela, + owner: artelaOwner, + type: TokenType.synthetic, + symbol: 'WETH.a', + interchainSecurityModule: ISM_CONFIG, + }; + + const base: HypTokenRouterConfig = { + ...routerConfig.base, + owner: baseOwner, + type: TokenType.collateral, + token: tokens.base.WETH, + interchainSecurityModule: ISM_CONFIG, + }; + + return { + artela, + base, + }; +}; diff --git a/typescript/infra/config/environments/mainnet3/warp/warpIds.ts b/typescript/infra/config/environments/mainnet3/warp/warpIds.ts index 3c86014b4c..00e8dbd882 100644 --- a/typescript/infra/config/environments/mainnet3/warp/warpIds.ts +++ b/typescript/infra/config/environments/mainnet3/warp/warpIds.ts @@ -52,6 +52,8 @@ export enum WarpRouteIds { EthereumFormWSTETH = 'WSTETH/ethereum-form', BaseFormAIXBT = 'AIXBT/base-form', BaseFormGAME = 'GAME/base-form', + ArtelaBaseUSDC = 'USDC/artela-base', + ArtelaBaseWETH = 'WETH/artela-base', SolanaSoonBonk = 'Bonk/solanamainnet-soon', SolanaSoonSOL = 'SOL/solanamainnet-soon', } diff --git a/typescript/infra/config/warp.ts b/typescript/infra/config/warp.ts index f01ea7edc5..05cc0bf9ad 100644 --- a/typescript/infra/config/warp.ts +++ b/typescript/infra/config/warp.ts @@ -20,6 +20,8 @@ import { getArbitrumEthereumMantleModePolygonScrollZeroNetworkUSDTWarpConfig } f 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 { getArtelaBaseUSDCWarpConfig } from './environments/mainnet3/warp/configGetters/getArtelaBaseUSDCWarpConfig.js'; +import { getArtelaBaseWETHWarpConfig } from './environments/mainnet3/warp/configGetters/getArtelaBaseWETHWarpConfig.js'; import { getBaseFormAIXBTWarpConfig } from './environments/mainnet3/warp/configGetters/getBaseFormAIXBTWarpConfig.js'; import { getBaseFormGAMEWarpConfig } from './environments/mainnet3/warp/configGetters/getBaseFormGAMEWarpConfig.js'; import { getBaseZeroNetworkCBBTCWarpConfig } from './environments/mainnet3/warp/configGetters/getBaseZeroNetworkCBBTCWarpConfig.js'; @@ -111,6 +113,8 @@ export const warpConfigGetterMap: Record = { [WarpRouteIds.EthereumFormWSTETH]: getEthereumFormWSTETHWarpConfig, [WarpRouteIds.BaseFormAIXBT]: getBaseFormAIXBTWarpConfig, [WarpRouteIds.BaseFormGAME]: getBaseFormGAMEWarpConfig, + [WarpRouteIds.ArtelaBaseUSDC]: getArtelaBaseUSDCWarpConfig, + [WarpRouteIds.ArtelaBaseWETH]: getArtelaBaseWETHWarpConfig, }; export async function getWarpConfig( diff --git a/typescript/infra/src/config/warp.ts b/typescript/infra/src/config/warp.ts index 1660b54dd9..8ff0b53554 100644 --- a/typescript/infra/src/config/warp.ts +++ b/typescript/infra/src/config/warp.ts @@ -26,6 +26,7 @@ export const tokens: ChainMap> = { USDC: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', AIXBT: '0x4F9Fd6Be4a90f2620860d680c0d4d5Fb53d1A825', GAME: '0x1C4CcA7C5DB003824208aDDA61Bd749e55F463a3', + WETH: '0x4200000000000000000000000000000000000006', }, bsquared: { uBTC: '0x796e4D53067FF374B89b2Ac101ce0c1f72ccaAc2', diff --git a/typescript/infra/src/warp/helm.ts b/typescript/infra/src/warp/helm.ts index 42d3b957c2..5ef21a3f3b 100644 --- a/typescript/infra/src/warp/helm.ts +++ b/typescript/infra/src/warp/helm.ts @@ -28,7 +28,7 @@ export class WarpRouteMonitorHelmManager extends HelmManager { return { image: { repository: 'gcr.io/abacus-labs-dev/hyperlane-monorepo', - tag: '702c800-20250113-210127', + tag: 'b18ab47-20250114-203624', }, warpRouteId: this.warpRouteId, fullnameOverride: this.helmReleaseName,