From 84b74a3ded4d9dce7187a400b86e930f33beab82 Mon Sep 17 00:00:00 2001 From: xeno097 Date: Thu, 19 Dec 2024 16:40:59 -0400 Subject: [PATCH 1/7] feat(infra): added the getEthereumFormUSDTWarpConfig func --- .../getEthereumFormUSDTWarpConfig.ts | 38 +++++++++++++++++++ .../environments/mainnet3/warp/warpIds.ts | 1 + typescript/infra/config/warp.ts | 2 + 3 files changed, 41 insertions(+) create mode 100644 typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumFormUSDTWarpConfig.ts diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumFormUSDTWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumFormUSDTWarpConfig.ts new file mode 100644 index 0000000000..a1449f00cf --- /dev/null +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumFormUSDTWarpConfig.ts @@ -0,0 +1,38 @@ +import { ethers } from 'ethers'; + +import { ChainMap, HypTokenRouterConfig, TokenType } from '@hyperlane-xyz/sdk'; +import { Address } from '@hyperlane-xyz/utils'; + +import { + RouterConfigWithoutOwner, + tokens, +} from '../../../../../src/config/warp.js'; + +const safeOwners: ChainMap
= { + ethereum: '0xec5ad23e29203301B2C1a765718Cc1de7A8d3FbF', + form: '0x41B624412B529409A437f08Ef80bCabE81053650', +}; + +export const getEthereumFormUSDTWarpConfig = async ( + routerConfig: ChainMap, +): Promise> => { + const ethereum: HypTokenRouterConfig = { + mailbox: routerConfig.ethereum.mailbox, + owner: safeOwners.ethereum, + type: TokenType.collateral, + token: tokens.ethereum.USDT, + interchainSecurityModule: ethers.constants.AddressZero, + }; + + const form: HypTokenRouterConfig = { + mailbox: routerConfig.form.mailbox, + owner: safeOwners.form, + type: TokenType.synthetic, + interchainSecurityModule: ethers.constants.AddressZero, + }; + + return { + ethereum, + form, + }; +}; diff --git a/typescript/infra/config/environments/mainnet3/warp/warpIds.ts b/typescript/infra/config/environments/mainnet3/warp/warpIds.ts index d9bf87760d..9d4d5270b4 100644 --- a/typescript/infra/config/environments/mainnet3/warp/warpIds.ts +++ b/typescript/infra/config/environments/mainnet3/warp/warpIds.ts @@ -38,4 +38,5 @@ export enum WarpRouteIds { ArbitrumBaseBlastBscEthereumGnosisLiskMantleModeOptimismPolygonScrollZeroNetworkZoraMainnet = 'ETH/arbitrum-base-blast-bsc-ethereum-gnosis-lisk-mantle-mode-optimism-polygon-scroll-zeronetwork-zoramainnet', AppchainBaseUSDC = 'USDC/appchain-base', BobaBsquaredSwellUBTC = 'UBTC/boba-bsquared-swell', + EthereumFormUSDT = 'USDT/ethereum-form', } diff --git a/typescript/infra/config/warp.ts b/typescript/infra/config/warp.ts index c68e2221d9..9a10ce8548 100644 --- a/typescript/infra/config/warp.ts +++ b/typescript/infra/config/warp.ts @@ -30,6 +30,7 @@ import { getEclipseStrideTiaWarpConfig } from './environments/mainnet3/warp/conf import { getEclipseStrideStTiaWarpConfig } from './environments/mainnet3/warp/configGetters/getEclipseStrideTIAWarpConfig.js'; import { getEthereumBscLUMIAWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumBscLumiaLUMIAWarpConfig.js'; import { getEthereumFlowCbBTCWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumFlowCbBTCWarpConfig.js'; +import { getEthereumFormUSDTWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumFormUSDTWarpConfig.js'; import { getEthereumInevmUSDCWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumInevmUSDCWarpConfig.js'; import { getEthereumInevmUSDTWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumInevmUSDTWarpConfig.js'; import { getEthereumSeiFastUSDWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumSeiFastUSDWarpConfig.js'; @@ -84,6 +85,7 @@ export const warpConfigGetterMap: Record = { [WarpRouteIds.AppchainBaseUSDC]: getAppChainBaseUSDCWarpConfig, [WarpRouteIds.BobaBsquaredSwellUBTC]: getBobaBsquaredSwellUBTCWarpConfig, [WarpRouteIds.EthereumZircuitRe7LRT]: getEthereumZircuitRe7LRTWarpConfig, + [WarpRouteIds.EthereumFormUSDT]: getEthereumFormUSDTWarpConfig, }; export async function getWarpConfig( From ea6bf5b21ad2f31deb64cb45d444168c829a7d3a Mon Sep 17 00:00:00 2001 From: nambrot Date: Fri, 20 Dec 2024 16:16:23 -0500 Subject: [PATCH 2/7] Add USDC form warp route --- ...USDTWarpConfig.ts => formConfigGetters.ts} | 27 +++++++++++++++++++ .../environments/mainnet3/warp/warpIds.ts | 1 + typescript/infra/config/warp.ts | 6 ++++- 3 files changed, 33 insertions(+), 1 deletion(-) rename typescript/infra/config/environments/mainnet3/warp/configGetters/{getEthereumFormUSDTWarpConfig.ts => formConfigGetters.ts} (55%) diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumFormUSDTWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/formConfigGetters.ts similarity index 55% rename from typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumFormUSDTWarpConfig.ts rename to typescript/infra/config/environments/mainnet3/warp/configGetters/formConfigGetters.ts index a1449f00cf..e6268ef755 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumFormUSDTWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/formConfigGetters.ts @@ -13,6 +13,33 @@ const safeOwners: ChainMap
= { form: '0x41B624412B529409A437f08Ef80bCabE81053650', }; +export const getEthereumFormUSDCWarpConfig = async ( + routerConfig: ChainMap, +): Promise> => { + const ethereum: HypTokenRouterConfig = { + mailbox: routerConfig.ethereum.mailbox, + owner: safeOwners.ethereum, + type: TokenType.collateral, + token: tokens.ethereum.USDC, + interchainSecurityModule: ethers.constants.AddressZero, + }; + + // FiatTokenProxy 0xFBf489bb4783D4B1B2e7D07ba39873Fb8068507D + // MasterMinter 0x9Dec8Dfafcce2d45E8FF8C7792DB1D704AB1dc9D + const form: HypTokenRouterConfig = { + mailbox: routerConfig.form.mailbox, + owner: safeOwners.form, + type: TokenType.collateralFiat, + token: '0xFBf489bb4783D4B1B2e7D07ba39873Fb8068507D', + interchainSecurityModule: ethers.constants.AddressZero, + }; + + return { + ethereum, + form, + }; +}; + export const getEthereumFormUSDTWarpConfig = async ( routerConfig: ChainMap, ): Promise> => { diff --git a/typescript/infra/config/environments/mainnet3/warp/warpIds.ts b/typescript/infra/config/environments/mainnet3/warp/warpIds.ts index 9d4d5270b4..475e85e53f 100644 --- a/typescript/infra/config/environments/mainnet3/warp/warpIds.ts +++ b/typescript/infra/config/environments/mainnet3/warp/warpIds.ts @@ -39,4 +39,5 @@ export enum WarpRouteIds { AppchainBaseUSDC = 'USDC/appchain-base', BobaBsquaredSwellUBTC = 'UBTC/boba-bsquared-swell', EthereumFormUSDT = 'USDT/ethereum-form', + EthereumFormUSDC = 'USDC/ethereum-form', } diff --git a/typescript/infra/config/warp.ts b/typescript/infra/config/warp.ts index 9a10ce8548..95fd9efb82 100644 --- a/typescript/infra/config/warp.ts +++ b/typescript/infra/config/warp.ts @@ -12,6 +12,10 @@ import { } from '../src/config/environment.js'; import { RouterConfigWithoutOwner } from '../src/config/warp.js'; +import { + getEthereumFormUSDCWarpConfig, + getEthereumFormUSDTWarpConfig, +} from './environments/mainnet3/warp/configGetters/formConfigGetters.js'; import { getAncient8EthereumUSDCWarpConfig } from './environments/mainnet3/warp/configGetters/getAncient8EthereumUSDCWarpConfig.js'; import { getAppChainBaseUSDCWarpConfig } from './environments/mainnet3/warp/configGetters/getAppchainBaseUSDCWarpConfig.js'; import { getArbitrumBaseBlastBscEthereumGnosisMantleModeOptimismPolygonScrollZeroNetworkZoraMainnetETHWarpConfig } from './environments/mainnet3/warp/configGetters/getArbitrumBaseBlastBscEthereumGnosisMantleModeOptimismPolygonScrollZeroNetworkZoraMainnetETHWarpConfig.js'; @@ -30,7 +34,6 @@ import { getEclipseStrideTiaWarpConfig } from './environments/mainnet3/warp/conf import { getEclipseStrideStTiaWarpConfig } from './environments/mainnet3/warp/configGetters/getEclipseStrideTIAWarpConfig.js'; import { getEthereumBscLUMIAWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumBscLumiaLUMIAWarpConfig.js'; import { getEthereumFlowCbBTCWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumFlowCbBTCWarpConfig.js'; -import { getEthereumFormUSDTWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumFormUSDTWarpConfig.js'; import { getEthereumInevmUSDCWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumInevmUSDCWarpConfig.js'; import { getEthereumInevmUSDTWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumInevmUSDTWarpConfig.js'; import { getEthereumSeiFastUSDWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumSeiFastUSDWarpConfig.js'; @@ -86,6 +89,7 @@ export const warpConfigGetterMap: Record = { [WarpRouteIds.BobaBsquaredSwellUBTC]: getBobaBsquaredSwellUBTCWarpConfig, [WarpRouteIds.EthereumZircuitRe7LRT]: getEthereumZircuitRe7LRTWarpConfig, [WarpRouteIds.EthereumFormUSDT]: getEthereumFormUSDTWarpConfig, + [WarpRouteIds.EthereumFormUSDC]: getEthereumFormUSDCWarpConfig, }; export async function getWarpConfig( From 250a4b00208ba26fcea5816ae4697abb89c44670 Mon Sep 17 00:00:00 2001 From: xeno097 Date: Mon, 13 Jan 2025 15:53:02 -0400 Subject: [PATCH 3/7] chore: pr review changes --- ...rs.ts => getEthereumFormUSDCWarpConfig.ts} | 34 +++------------- .../getEthereumFormUSDTWarpConfig.ts | 40 +++++++++++++++++++ typescript/infra/config/warp.ts | 6 +-- 3 files changed, 48 insertions(+), 32 deletions(-) rename typescript/infra/config/environments/mainnet3/warp/configGetters/{formConfigGetters.ts => getEthereumFormUSDCWarpConfig.ts} (58%) create mode 100644 typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumFormUSDTWarpConfig.ts diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/formConfigGetters.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumFormUSDCWarpConfig.ts similarity index 58% rename from typescript/infra/config/environments/mainnet3/warp/configGetters/formConfigGetters.ts rename to typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumFormUSDCWarpConfig.ts index e6268ef755..2118a3860f 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/formConfigGetters.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumFormUSDCWarpConfig.ts @@ -3,11 +3,13 @@ import { ethers } from 'ethers'; import { ChainMap, HypTokenRouterConfig, TokenType } from '@hyperlane-xyz/sdk'; import { Address } from '@hyperlane-xyz/utils'; +import { getOwnerConfigForAddress } from '../../../../../src/config/environment.js'; import { RouterConfigWithoutOwner, tokens, } from '../../../../../src/config/warp.js'; +// Safes from the FORM team const safeOwners: ChainMap
= { ethereum: '0xec5ad23e29203301B2C1a765718Cc1de7A8d3FbF', form: '0x41B624412B529409A437f08Ef80bCabE81053650', @@ -17,8 +19,8 @@ export const getEthereumFormUSDCWarpConfig = async ( routerConfig: ChainMap, ): Promise> => { const ethereum: HypTokenRouterConfig = { - mailbox: routerConfig.ethereum.mailbox, - owner: safeOwners.ethereum, + ...routerConfig.ethereum, + ...getOwnerConfigForAddress(safeOwners.ethereum), type: TokenType.collateral, token: tokens.ethereum.USDC, interchainSecurityModule: ethers.constants.AddressZero, @@ -27,8 +29,8 @@ export const getEthereumFormUSDCWarpConfig = async ( // FiatTokenProxy 0xFBf489bb4783D4B1B2e7D07ba39873Fb8068507D // MasterMinter 0x9Dec8Dfafcce2d45E8FF8C7792DB1D704AB1dc9D const form: HypTokenRouterConfig = { - mailbox: routerConfig.form.mailbox, - owner: safeOwners.form, + ...routerConfig.form, + ...getOwnerConfigForAddress(safeOwners.form), type: TokenType.collateralFiat, token: '0xFBf489bb4783D4B1B2e7D07ba39873Fb8068507D', interchainSecurityModule: ethers.constants.AddressZero, @@ -39,27 +41,3 @@ export const getEthereumFormUSDCWarpConfig = async ( form, }; }; - -export const getEthereumFormUSDTWarpConfig = async ( - routerConfig: ChainMap, -): Promise> => { - const ethereum: HypTokenRouterConfig = { - mailbox: routerConfig.ethereum.mailbox, - owner: safeOwners.ethereum, - type: TokenType.collateral, - token: tokens.ethereum.USDT, - interchainSecurityModule: ethers.constants.AddressZero, - }; - - const form: HypTokenRouterConfig = { - mailbox: routerConfig.form.mailbox, - owner: safeOwners.form, - type: TokenType.synthetic, - interchainSecurityModule: ethers.constants.AddressZero, - }; - - return { - ethereum, - form, - }; -}; diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumFormUSDTWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumFormUSDTWarpConfig.ts new file mode 100644 index 0000000000..aa8bd4013a --- /dev/null +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumFormUSDTWarpConfig.ts @@ -0,0 +1,40 @@ +import { ethers } from 'ethers'; + +import { ChainMap, HypTokenRouterConfig, TokenType } from '@hyperlane-xyz/sdk'; +import { Address } from '@hyperlane-xyz/utils'; + +import { getOwnerConfigForAddress } from '../../../../../src/config/environment.js'; +import { + RouterConfigWithoutOwner, + tokens, +} from '../../../../../src/config/warp.js'; + +// Safes from the FORM team +const safeOwners: ChainMap
= { + ethereum: '0xec5ad23e29203301B2C1a765718Cc1de7A8d3FbF', + form: '0x41B624412B529409A437f08Ef80bCabE81053650', +}; + +export const getEthereumFormUSDTWarpConfig = async ( + routerConfig: ChainMap, +): Promise> => { + const ethereum: HypTokenRouterConfig = { + ...routerConfig.ethereum, + ...getOwnerConfigForAddress(safeOwners.ethereum), + type: TokenType.collateral, + token: tokens.ethereum.USDT, + interchainSecurityModule: ethers.constants.AddressZero, + }; + + const form: HypTokenRouterConfig = { + ...routerConfig.form, + ...getOwnerConfigForAddress(safeOwners.form), + type: TokenType.synthetic, + interchainSecurityModule: ethers.constants.AddressZero, + }; + + return { + ethereum, + form, + }; +}; diff --git a/typescript/infra/config/warp.ts b/typescript/infra/config/warp.ts index b3cabde9a4..33d26c2818 100644 --- a/typescript/infra/config/warp.ts +++ b/typescript/infra/config/warp.ts @@ -12,10 +12,6 @@ import { } from '../src/config/environment.js'; import { RouterConfigWithoutOwner } from '../src/config/warp.js'; -import { - getEthereumFormUSDCWarpConfig, - getEthereumFormUSDTWarpConfig, -} from './environments/mainnet3/warp/configGetters/formConfigGetters.js'; import { getAncient8EthereumUSDCWarpConfig } from './environments/mainnet3/warp/configGetters/getAncient8EthereumUSDCWarpConfig.js'; import { getAppChainBaseUSDCWarpConfig } from './environments/mainnet3/warp/configGetters/getAppchainBaseUSDCWarpConfig.js'; import { getArbitrumBaseBlastBscEthereumGnosisMantleModeOptimismPolygonScrollZeroNetworkZoraMainnetETHWarpConfig } from './environments/mainnet3/warp/configGetters/getArbitrumBaseBlastBscEthereumGnosisMantleModeOptimismPolygonScrollZeroNetworkZoraMainnetETHWarpConfig.js'; @@ -36,6 +32,8 @@ import { getEclipseStrideTiaWarpConfig } from './environments/mainnet3/warp/conf import { getEclipseStrideStTiaWarpConfig } from './environments/mainnet3/warp/configGetters/getEclipseStrideTIAWarpConfig.js'; import { getEthereumBscLUMIAWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumBscLumiaLUMIAWarpConfig.js'; import { getEthereumFlowCbBTCWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumFlowCbBTCWarpConfig.js'; +import { getEthereumFormUSDCWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumFormUSDCWarpConfig.js'; +import { getEthereumFormUSDTWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumFormUSDTWarpConfig.js'; import { getEthereumFormWBTCWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumFormWBTCWarpConfig.js'; import { getEthereumFormWSTETHWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumFormWSTETHWarpConfig.js'; import { getEthereumInevmUSDCWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumInevmUSDCWarpConfig.js'; From 847b9f632caa841783ec80faccce3fe8ce5346e5 Mon Sep 17 00:00:00 2001 From: xeno097 Date: Mon, 13 Jan 2025 16:05:05 -0400 Subject: [PATCH 4/7] chore: updated registry.rc commit hash --- .registryrc | 2 +- typescript/infra/src/warp/helm.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.registryrc b/.registryrc index 4b56572aa1..f761f3a9fb 100644 --- a/.registryrc +++ b/.registryrc @@ -1 +1 @@ -2184e5e3064ddec2734aa53c1aff6d9f7d958bdf +d010c649e38a657dba70677d3e1333de9db6e1c6 diff --git a/typescript/infra/src/warp/helm.ts b/typescript/infra/src/warp/helm.ts index be9b752f88..017039c650 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: '20a0c4b-20250109-221853', + tag: '250a4b0-20250113-195343', }, warpRouteId: this.warpRouteId, fullnameOverride: this.helmReleaseName, From 702c80031c6cfdabfc9368ed7c99feee58590684 Mon Sep 17 00:00:00 2001 From: xeno097 Date: Mon, 13 Jan 2025 17:00:45 -0400 Subject: [PATCH 5/7] fix: maybe fix monitor crashing --- .registryrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.registryrc b/.registryrc index f761f3a9fb..b33d8bbfde 100644 --- a/.registryrc +++ b/.registryrc @@ -1 +1 @@ -d010c649e38a657dba70677d3e1333de9db6e1c6 +52f72b3f298bfb38ce0de40b078d886a28d5b07d From d76988e270ec494e2e8c855f71ef96ffee06a8e1 Mon Sep 17 00:00:00 2001 From: xeno097 Date: Mon, 13 Jan 2025 18:04:34 -0400 Subject: [PATCH 6/7] chore: updated helm war route monitor docker tag --- typescript/infra/src/warp/helm.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typescript/infra/src/warp/helm.ts b/typescript/infra/src/warp/helm.ts index 017039c650..42d3b957c2 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: '250a4b0-20250113-195343', + tag: '702c800-20250113-210127', }, warpRouteId: this.warpRouteId, fullnameOverride: this.helmReleaseName, From 033fa7ff8147774002edc6b573f84b244a172f3f Mon Sep 17 00:00:00 2001 From: xeno097 Date: Tue, 14 Jan 2025 13:28:57 -0400 Subject: [PATCH 7/7] chore: update registry.rc --- .registryrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.registryrc b/.registryrc index 41ee7283ce..001391d9ac 100644 --- a/.registryrc +++ b/.registryrc @@ -1 +1 @@ -9d7868fa55b97d610c9c1916d22d71d3e67b5aa8 +195c073c3c34b234c8d0aed2a16962a2d3945354