diff --git a/typescript/infra/config/environments/mainnet3/agent.ts b/typescript/infra/config/environments/mainnet3/agent.ts index 0ab6431aa5..3a3ff3df69 100644 --- a/typescript/infra/config/environments/mainnet3/agent.ts +++ b/typescript/infra/config/environments/mainnet3/agent.ts @@ -14,7 +14,6 @@ import { import { GasPaymentEnforcementConfig, routerMatchingList, - warpRouteMatchingList, } from '../../../src/config/agent/relayer'; import { ALL_KEY_ROLES, Role } from '../../../src/roles'; import { Contexts } from '../../contexts'; @@ -23,8 +22,8 @@ import { environment, supportedChainNames } from './chains'; import { helloWorld } from './helloworld'; import { validatorChainConfig } from './validators'; import arbitrumTIAAddresses from './warp/arbitrum-TIA-addresses.json'; -import injectiveInevmUsdcAddresses from './warp/inevm-USDC-addresses.json'; -import injectiveInevmUsdtAddresses from './warp/inevm-USDT-addresses.json'; +import inevmEthereumUsdcAddresses from './warp/inevm-USDC-addresses.json'; +import inevmEthereumUsdtAddresses from './warp/inevm-USDT-addresses.json'; import injectiveInevmInjAddresses from './warp/injective-inevm-addresses.json'; import mantaTIAAddresses from './warp/manta-TIA-addresses.json'; @@ -158,11 +157,11 @@ const hyperlane: RootAgentConfig = { }, { name: 'inevm_ethereum_usdc', - matchingList: warpRouteMatchingList(injectiveInevmUsdcAddresses), + matchingList: routerMatchingList(inevmEthereumUsdcAddresses), }, { name: 'inevm_ethereum_usdt', - matchingList: warpRouteMatchingList(injectiveInevmUsdtAddresses), + matchingList: routerMatchingList(inevmEthereumUsdtAddresses), }, ], }, diff --git a/typescript/infra/src/config/agent/relayer.ts b/typescript/infra/src/config/agent/relayer.ts index 2dce2ae011..b02ae1b8a9 100644 --- a/typescript/infra/src/config/agent/relayer.ts +++ b/typescript/infra/src/config/agent/relayer.ts @@ -178,30 +178,3 @@ export function routerMatchingList( return matchingList; } - -type HypErc20Address = { HypERC20: string }; -type HypERC20CollateralAddress = { HypERC20Collateral: string }; -type HypErc721Address = { HypERC721: string }; -type HypErc721CollateralAddress = { HypERC721Collateral: string }; -type HypNativeAddress = { HypNativeAddress: string }; - -type WarpRoute = - | HypErc20Address - | HypERC20CollateralAddress - | HypErc721Address - | HypErc721CollateralAddress - | HypNativeAddress; - -// Create a matching list for the given warp route addresses -export function warpRouteMatchingList( - routers: ChainMap, -): MatchingList { - let standardizedRouters: ChainMap<{ router: string }> = {}; - Object.entries(routers).forEach(([chain, route]) => { - let routerAddress = Object.values(route); - // Due to duck typing there could be more than one value in the route object, - // but the line below assumes there is only one. - standardizedRouters[chain] = { router: routerAddress[0] }; - }); - return routerMatchingList(standardizedRouters); -}