diff --git a/rust/main/helm/hyperlane-agent/templates/relayer-configmap.yaml b/rust/main/helm/hyperlane-agent/templates/relayer-configmap.yaml new file mode 100644 index 000000000..bc16a7404 --- /dev/null +++ b/rust/main/helm/hyperlane-agent/templates/relayer-configmap.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "agent-common.fullname" . }}-relayer-configmap + labels: + {{- include "agent-common.labels" . | nindent 4 }} +data: + relayer-config.json: | +{{- toJson .Values.hyperlane.relayer.configMapConfig | nindent 4 }} diff --git a/rust/main/helm/hyperlane-agent/templates/relayer-statefulset.yaml b/rust/main/helm/hyperlane-agent/templates/relayer-statefulset.yaml index 4160e0c25..d317a0c84 100644 --- a/rust/main/helm/hyperlane-agent/templates/relayer-statefulset.yaml +++ b/rust/main/helm/hyperlane-agent/templates/relayer-statefulset.yaml @@ -55,15 +55,23 @@ spec: - secretRef: name: {{ include "agent-common.fullname" . }}-relayer-secret env: - {{- include "agent-common.config-env-vars" (dict "config" .Values.hyperlane.relayer.config) | nindent 10 }} + {{- include "agent-common.config-env-vars" (dict "config" .Values.hyperlane.relayer.envConfig) | nindent 10 }} + - name: CONFIG_FILES + value: "/relayer-configmap/relayer-config.json" resources: {{- toYaml .Values.hyperlane.relayer.resources | nindent 10 }} volumeMounts: - name: state mountPath: {{ .Values.hyperlane.dbPath }} + - name: relayer-configmap + mountPath: /relayer-configmap ports: - name: metrics containerPort: {{ .Values.hyperlane.metrics.port }} + volumes: + - name: relayer-configmap + configMap: + name: {{ include "agent-common.fullname" . }}-relayer-configmap {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/rust/main/helm/hyperlane-agent/values.yaml b/rust/main/helm/hyperlane-agent/values.yaml index 691bb81c6..6e498dc51 100644 --- a/rust/main/helm/hyperlane-agent/values.yaml +++ b/rust/main/helm/hyperlane-agent/values.yaml @@ -114,10 +114,9 @@ hyperlane: requests: cpu: 1000m memory: 1024Mi - config: + envConfig: relayChains: '' - multisigCheckpointSyncer: - checkpointSyncers: + configMapConfig: {} # -- Specify whether a default signer key is used for all chains in Values.hyperlane.relayerChains list. # It affects chains whose signer type is hexKey. usingDefaultSignerKey: true diff --git a/typescript/infra/config/environments/mainnet3/agent.ts b/typescript/infra/config/environments/mainnet3/agent.ts index 1637a3538..5accd4f46 100644 --- a/typescript/infra/config/environments/mainnet3/agent.ts +++ b/typescript/infra/config/environments/mainnet3/agent.ts @@ -10,12 +10,13 @@ import { getAgentChainNamesFromConfig, } from '../../../src/config/agent/agent.js'; import { - matchingList, + MetricAppContext, routerMatchingList, + warpRouteMatchingList, } from '../../../src/config/agent/relayer.js'; import { ALL_KEY_ROLES, Role } from '../../../src/roles.js'; import { Contexts } from '../../contexts.js'; -import { getDomainId, getWarpAddresses } from '../../registry.js'; +import { getDomainId } from '../../registry.js'; import { environment } from './chains.js'; import { helloWorld } from './helloworld.js'; @@ -24,20 +25,9 @@ import { supportedChainNames, } from './supportedChainNames.js'; import { validatorChainConfig } from './validators.js'; -import ancient8EthereumUsdcAddresses from './warp/artifacts/ancient8-USDC-addresses.json'; -import arbitrumTIAAddresses from './warp/artifacts/arbitrum-TIA-addresses.json'; -import arbitrumNeutronEclipAddresses from './warp/artifacts/arbitrum-neutron-eclip-addresses.json'; -import eclipseStrideTiaAddresses from './warp/artifacts/eclipse-stride-TIA-addresses.json'; -import eclipseStrideStTiaAddresses from './warp/artifacts/eclipse-stride-stTIA-addresses.json'; -import inevmEthereumUsdcAddresses from './warp/artifacts/inevm-USDC-addresses.json'; -import inevmEthereumUsdtAddresses from './warp/artifacts/inevm-USDT-addresses.json'; -import injectiveInevmInjAddresses from './warp/artifacts/injective-inevm-addresses.json'; -import mantaTIAAddresses from './warp/artifacts/manta-TIA-addresses.json'; import merklyEthAddresses from './warp/artifacts/merkly-eth-addresses.json'; -import renzoEzEthAddressesV3 from './warp/artifacts/renzo-ezETH-addresses-v3.json'; -import victionEthereumEthAddresses from './warp/artifacts/viction-ETH-addresses.json'; -import victionEthereumUsdcAddresses from './warp/artifacts/viction-USDC-addresses.json'; -import victionEthereumUsdtAddresses from './warp/artifacts/viction-USDT-addresses.json'; +import merklyNftAddresses from './warp/artifacts/merkly-eth-addresses.json'; +import merklyErc20Addresses from './warp/artifacts/merkly-eth-addresses.json'; import { WarpRouteIds } from './warp/warpIds.js'; // const releaseCandidateHelloworldMatchingList = routerMatchingList( @@ -344,101 +334,49 @@ const gasPaymentEnforcement: GasPaymentEnforcement[] = [ type: GasPaymentEnforcementPolicyType.Minimum, payment: '1', matchingList: [ - // Temporarily allow Merkly ETH messages to just require some payment - // as a workaround to https://github.com/hyperlane-xyz/issues/issues/1294 - ...routerMatchingList(merklyEthAddresses), + // Temporary workaround due to funky Mantle gas amounts. { destinationDomain: getDomainId('mantle') }, ], }, - // To cover ourselves against IGP indexing issues and to ensure Nexus - // users have the best possible experience, we whitelist messages between - // warp routes that we know are certainly paying for gas. - { - type: GasPaymentEnforcementPolicyType.None, - matchingList: [ - ...routerMatchingList(injectiveInevmInjAddresses), - // As we are still indexing the IGP on Stride, temporarily whitelist - // Stride to Eclipse messages. - ...routerMatchingList(eclipseStrideTiaAddresses), - ...routerMatchingList(eclipseStrideStTiaAddresses), - ], - }, { type: GasPaymentEnforcementPolicyType.OnChainFeeQuoting, }, ]; -const metricAppContexts = [ - { - name: 'helloworld', - matchingList: routerMatchingList(helloWorld[Contexts.Hyperlane].addresses), - }, - { - name: 'injective_inevm_inj', - matchingList: routerMatchingList(injectiveInevmInjAddresses), - }, - { - name: 'inevm_ethereum_usdc', - matchingList: matchingList(inevmEthereumUsdcAddresses), - }, - { - name: 'inevm_ethereum_usdt', - matchingList: matchingList(inevmEthereumUsdtAddresses), - }, - { - name: 'viction_ethereum_eth', - matchingList: routerMatchingList(victionEthereumEthAddresses), - }, - { - name: 'viction_ethereum_usdc', - matchingList: routerMatchingList(victionEthereumUsdcAddresses), - }, - { - name: 'viction_ethereum_usdt', - matchingList: routerMatchingList(victionEthereumUsdtAddresses), - }, - { - name: 'ancient8_ethereum_usdc', - matchingList: routerMatchingList(ancient8EthereumUsdcAddresses), - }, - { - name: 'renzo_ezeth', - matchingList: matchingList(renzoEzEthAddressesV3), - }, - { - name: 'eclipse_usdc', - matchingList: matchingList( - getWarpAddresses(WarpRouteIds.EclipseEthereumSolanaUSDC), - ), - }, - { - name: 'eclipse_teth', - matchingList: matchingList( - getWarpAddresses(WarpRouteIds.EclipseEthereumTETH), - ), - }, - { - name: 'eclipse_wif', - matchingList: matchingList(getWarpAddresses(WarpRouteIds.EclipseSolanaWIF)), - }, - { - name: 'eclipse_sol', - matchingList: matchingList(getWarpAddresses(WarpRouteIds.EclipseSolanaSOL)), - }, - // Hitting max env var size limits, see https://stackoverflow.com/questions/28865473/setting-environment-variable-to-a-large-value-argument-list-too-long#answer-28865503 - // { - // name: 'merkly_erc20', - // matchingList: routerMatchingList(merklyErc20Addresses), - // }, - // { - // name: 'merkly_eth', - // matchingList: routerMatchingList(merklyErc20Addresses), - // }, - // { - // name: 'merkly_nft', - // matchingList: routerMatchingList(merklyErc20Addresses), - // }, -]; +// Gets metric app contexts, including: +// - helloworld +// - all warp routes defined in WarpRouteIds, using addresses from the registry +// - misc important applications not defined in the registry, e.g. merkly +const metricAppContextsGetter = (): MetricAppContext[] => { + const warpContexts = Object.values(WarpRouteIds).map((warpRouteId) => { + return { + name: warpRouteId, + matchingList: warpRouteMatchingList(warpRouteId), + }; + }); + + return [ + ...warpContexts, + { + name: 'helloworld', + matchingList: routerMatchingList( + helloWorld[Contexts.Hyperlane].addresses, + ), + }, + { + name: 'merkly_erc20', + matchingList: routerMatchingList(merklyErc20Addresses), + }, + { + name: 'merkly_eth', + matchingList: routerMatchingList(merklyEthAddresses), + }, + { + name: 'merkly_nft', + matchingList: routerMatchingList(merklyNftAddresses), + }, + ]; +}; // Resource requests are based on observed usage found in https://abacusworks.grafana.net/d/FSR9YWr7k const relayerResources = { @@ -474,7 +412,7 @@ const hyperlane: RootAgentConfig = { tag: '75d62ae-20241107-060707', }, gasPaymentEnforcement: gasPaymentEnforcement, - metricAppContexts, + metricAppContextsGetter, resources: relayerResources, }, validators: { @@ -505,13 +443,13 @@ const releaseCandidate: RootAgentConfig = { rpcConsensusType: RpcConsensusType.Fallback, docker: { repo, - tag: 'a64af8b-20241024-120818', + tag: '75d62ae-20241107-060707', }, // We're temporarily (ab)using the RC relayer as a way to increase // message throughput. // whitelist: releaseCandidateHelloworldMatchingList, gasPaymentEnforcement, - metricAppContexts, + metricAppContextsGetter, resources: relayerResources, }, validators: { @@ -538,33 +476,10 @@ const neutron: RootAgentConfig = { rpcConsensusType: RpcConsensusType.Fallback, docker: { repo, - tag: 'b1ff48b-20241016-183301', + tag: '75d62ae-20241107-060707', }, - gasPaymentEnforcement: [ - { - type: GasPaymentEnforcementPolicyType.None, - matchingList: [ - ...routerMatchingList(mantaTIAAddresses), - ...routerMatchingList(arbitrumTIAAddresses), - ...routerMatchingList(arbitrumNeutronEclipAddresses), - ], - }, - ...gasPaymentEnforcement, - ], - metricAppContexts: [ - { - name: 'manta_tia', - matchingList: routerMatchingList(mantaTIAAddresses), - }, - { - name: 'arbitrum_tia', - matchingList: routerMatchingList(arbitrumTIAAddresses), - }, - { - name: 'arbitrum_neutron_eclip', - matchingList: routerMatchingList(arbitrumNeutronEclipAddresses), - }, - ], + gasPaymentEnforcement, + metricAppContextsGetter, resources: relayerResources, }, }; diff --git a/typescript/infra/config/environments/mainnet3/warp/artifacts/addresses.json b/typescript/infra/config/environments/mainnet3/warp/artifacts/addresses.json deleted file mode 100644 index 6325ed7c8..000000000 --- a/typescript/infra/config/environments/mainnet3/warp/artifacts/addresses.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "ethereum": { - "HypERC20Collateral": "0x1D622da2ce4C4D9D4B0611718cb3BcDcAd008DD4", - "collateral": "0x1D622da2ce4C4D9D4B0611718cb3BcDcAd008DD4", - "proxyAdmin": "0xe41a3270875f28A03312877cD95A01e9a53664b1", - "timelockController": "0x0000000000000000000000000000000000000000" - } -} diff --git a/typescript/infra/config/environments/mainnet3/warp/artifacts/ancient8-USDC-addresses.json b/typescript/infra/config/environments/mainnet3/warp/artifacts/ancient8-USDC-addresses.json deleted file mode 100644 index 7c7e807bc..000000000 --- a/typescript/infra/config/environments/mainnet3/warp/artifacts/ancient8-USDC-addresses.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "ancient8": { - "router": "0x97423A68BAe94b5De52d767a17aBCc54c157c0E5" - }, - "ethereum": { - "router": "0x8b4192B9Ad1fCa440A5808641261e5289e6de95D" - } -} diff --git a/typescript/infra/config/environments/mainnet3/warp/artifacts/arbitrum-TIA-addresses.json b/typescript/infra/config/environments/mainnet3/warp/artifacts/arbitrum-TIA-addresses.json deleted file mode 100644 index b57885701..000000000 --- a/typescript/infra/config/environments/mainnet3/warp/artifacts/arbitrum-TIA-addresses.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "neutron": { - "router": "neutron1jyyjd3x0jhgswgm6nnctxvzla8ypx50tew3ayxxwkrjfxhvje6kqzvzudq" - }, - "arbitrum": { - "router": "0xd56734d7f9979dd94fae3d67c7e928234e71cd4c" - } -} diff --git a/typescript/infra/config/environments/mainnet3/warp/artifacts/arbitrum-neutron-eclip-addresses.json b/typescript/infra/config/environments/mainnet3/warp/artifacts/arbitrum-neutron-eclip-addresses.json deleted file mode 100644 index 7b1ac51c0..000000000 --- a/typescript/infra/config/environments/mainnet3/warp/artifacts/arbitrum-neutron-eclip-addresses.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "neutron": { - "router": "neutron1dvzvf870mx9uf65uqhx40yzx9gu4xlqqq2pnx362a0ndmustww3smumrf5" - }, - "arbitrum": { - "router": "0x93ca0d85837FF83158Cd14D65B169CdB223b1921" - } -} diff --git a/typescript/infra/config/environments/mainnet3/warp/artifacts/eclipse-stride-TIA-addresses.json b/typescript/infra/config/environments/mainnet3/warp/artifacts/eclipse-stride-TIA-addresses.json deleted file mode 100644 index 67cf44d89..000000000 --- a/typescript/infra/config/environments/mainnet3/warp/artifacts/eclipse-stride-TIA-addresses.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "eclipsemainnet": { - "router": "0xa0c167513f4d025217a48891973c3dbe41e10e76230033ef5d676299a18ca7f5" - }, - "stride": { - "router": "stride1pvtesu3ve7qn7ctll2x495mrqf2ysp6fws68grvcu6f7n2ajghgsh2jdj6" - } -} diff --git a/typescript/infra/config/environments/mainnet3/warp/artifacts/eclipse-stride-stTIA-addresses.json b/typescript/infra/config/environments/mainnet3/warp/artifacts/eclipse-stride-stTIA-addresses.json deleted file mode 100644 index 538b9fe9a..000000000 --- a/typescript/infra/config/environments/mainnet3/warp/artifacts/eclipse-stride-stTIA-addresses.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "eclipsemainnet": { - "router": "0x0d258188d0761163da174da890d0c1becdee51a01dbc9e2a6bfcb342140eb509" - }, - "stride": { - "router": "stride134axwdlam929m3mar3wv95nvkyep7mr87ravkqcpf8dfe3v0pjlqwrw6ee" - } -} diff --git a/typescript/infra/config/environments/mainnet3/warp/artifacts/inevm-USDC-addresses.json b/typescript/infra/config/environments/mainnet3/warp/artifacts/inevm-USDC-addresses.json deleted file mode 100644 index 08aeb44c5..000000000 --- a/typescript/infra/config/environments/mainnet3/warp/artifacts/inevm-USDC-addresses.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "inevm": { - "synthetic": "0x8358D8291e3bEDb04804975eEa0fe9fe0fAfB147" - }, - "ethereum": { - "collateral": "0xED56728fb977b0bBdacf65bCdD5e17Bb7e84504f" - } -} diff --git a/typescript/infra/config/environments/mainnet3/warp/artifacts/inevm-USDT-addresses.json b/typescript/infra/config/environments/mainnet3/warp/artifacts/inevm-USDT-addresses.json deleted file mode 100644 index a6880864e..000000000 --- a/typescript/infra/config/environments/mainnet3/warp/artifacts/inevm-USDT-addresses.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "inevm": { - "synthetic": "0x97423A68BAe94b5De52d767a17aBCc54c157c0E5" - }, - "ethereum": { - "collateral": "0xab852e67bf03E74C89aF67C4BA97dd1088D3dA19" - } -} diff --git a/typescript/infra/config/environments/mainnet3/warp/artifacts/injective-inevm-addresses.json b/typescript/infra/config/environments/mainnet3/warp/artifacts/injective-inevm-addresses.json deleted file mode 100644 index d92b53abf..000000000 --- a/typescript/infra/config/environments/mainnet3/warp/artifacts/injective-inevm-addresses.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "injective": { - "router": "inj1mv9tjvkaw7x8w8y9vds8pkfq46g2vcfkjehc6k" - }, - "inevm": { - "router": "0x26f32245fCF5Ad53159E875d5Cae62aEcf19c2d4" - } -} diff --git a/typescript/infra/config/environments/mainnet3/warp/artifacts/manta-TIA-addresses.json b/typescript/infra/config/environments/mainnet3/warp/artifacts/manta-TIA-addresses.json deleted file mode 100644 index cfe967bb1..000000000 --- a/typescript/infra/config/environments/mainnet3/warp/artifacts/manta-TIA-addresses.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "neutron": { - "router": "neutron1ch7x3xgpnj62weyes8vfada35zff6z59kt2psqhnx9gjnt2ttqdqtva3pa" - }, - "mantapacific": { - "router": "0x6fae4d9935e2fcb11fc79a64e917fb2bf14dafaa" - } -} diff --git a/typescript/infra/config/environments/mainnet3/warp/artifacts/merkly-erc20-addresses.json b/typescript/infra/config/environments/mainnet3/warp/artifacts/merkly-erc20-addresses.json index 60566469d..e54113967 100644 --- a/typescript/infra/config/environments/mainnet3/warp/artifacts/merkly-erc20-addresses.json +++ b/typescript/infra/config/environments/mainnet3/warp/artifacts/merkly-erc20-addresses.json @@ -8,18 +8,39 @@ "avalanche": { "router": "0x904550e0D182cd4aEe0D305891c666a212EC8F01" }, + "fuse": { + "router": "0xCd8EAE908E27b9046ca7845DA22f6d3cdf367588" + }, + "kaia": { + "router": "0xCd8EAE908E27b9046ca7845DA22f6d3cdf367588" + }, + "arbitrumnova": { + "router": "0x1753Dd0743FC555898EF486b662aa77c9CD6CCa2" + }, "polygonzkevm": { "router": "0x46B4eDaA761eF8d2934e9F7AAf32B5Bf2C9C9F67" }, + "harmony": { + "router": "0xbA32747EF144B5eA6a01A18f7756034e23C998ae" + }, "bsc": { "router": "0x7b4f475d32f9c65de1834A578859F9823bE3c5Cf" }, "moonbeam": { "router": "0xf3D41b377c93fA5C3b0071966f1811c5063fAD40" }, + "metis": { + "router": "0xeB5108C41932b6Db7C933EEf783c651a68cB5178" + }, "gnosis": { "router": "0xFD34afDFbaC1E47aFC539235420e4bE4A206f26D" }, + "coredao": { + "router": "0xE94985A7C29db999109330dfB22803A82cAb7022" + }, + "fantom": { + "router": "0xF6fF3D86D43B7967E8b03Fc169578af1C5100C61" + }, "arbitrum": { "router": "0xFD34afDFbaC1E47aFC539235420e4bE4A206f26D" }, @@ -35,18 +56,33 @@ "mantle": { "router": "0x261e36AF8C6Cb974a468025E58f3bd39b0419275" }, + "zoramainnet": { + "router": "0x63F0973Fe299E9635Df70C22C39B9Da0700ef0aB" + }, "viction": { "router": "0xb00300fCe618E049d284eb92E57582A5d15295F4" }, + "astar": { + "router": "0x25e6cA1A7cB794835Cb83536874643ccE5c3538b" + }, "scroll": { "router": "0x904550e0D182cd4aEe0D305891c666a212EC8F01" }, "ethereum": { "router": "0xf3D41b377c93fA5C3b0071966f1811c5063fAD40" }, + "orderly": { + "router": "0x814490128eB60e6FCB56a38B46FC9FC37726414a" + }, "mantapacific": { "router": "0xb1d2B9446A9d1550e8d409C0F9745c5A2f10D332" }, + "rarichain": { + "router": "0x9cDb9f7Ede01291556560541a1A802814cB693f9" + }, + "xai": { + "router": "0x122149a5bcB71AE690b66A71bbaf6fE5C86C6e16" + }, "fraxtal": { "router": "0xDE5E2bf75005422dc408ea96F22467E02cBA8c93" }, @@ -56,6 +92,18 @@ "blast": { "router": "0xd9371FFFd58D57bfC65e897e18DAF88C88ec273E" }, + "astarzkevm": { + "router": "0x61eE60cf66F7f500fD7ed5077646ec6543837A63" + }, + "degenchain": { + "router": "0x354Fb3fC5b5102569491aA54Ded4fe8F3f803616" + }, + "merlin": { + "router": "0xCcB5eCb98F05d6A13eaA03b3a1135D155c8cb95a" + }, + "xlayer": { + "router": "0xbfD3425475dd8aF64B29424BDbC5f7957035d711" + }, "ancient8": { "router": "0xAFa5f9313F1F2b599173f24807a882F498Be118c" }, @@ -73,5 +121,65 @@ }, "bob": { "router": "0x6f6aE8851a460406bBB3c929a415d2Df9305AcD5" + }, + "endurance": { + "router": "0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5" + }, + "worldchain": { + "router": "0xc072c3EbAf165955C5aAd2DbB4293f771de6dbd3" + }, + "cheesechain": { + "router": "0xCd06b1563a8B4663ff8f1ccedE99F8eF4Dd99f88" + }, + "zircuit": { + "router": "0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5" + }, + "kroma": { + "router": "0x6f6aE8851a460406bBB3c929a415d2Df9305AcD5" + }, + "cyber": { + "router": "0x6Ca118bdF9BD900Da5D3d85094D92C5B3b9c0DA5" + }, + "lisk": { + "router": "0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5" + }, + "lukso": { + "router": "0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5" + }, + "mint": { + "router": "0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5" + }, + "proofofplay": { + "router": "0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5" + }, + "real": { + "router": "0x6f6aE8851a460406bBB3c929a415d2Df9305AcD5" + }, + "sanko": { + "router": "0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5" + }, + "tangle": { + "router": "0x6f6aE8851a460406bBB3c929a415d2Df9305AcD5" + }, + "bitlayer": { + "router": "0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5" + }, + "dogechain": { + "router": "0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5" + }, + "flare": { + "router": "0xAFa5f9313F1F2b599173f24807a882F498Be118c" + }, + "molten": { + "router": "0xAFa5f9313F1F2b599173f24807a882F498Be118c" + }, + "shibarium": { + "router": "0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5" + }, + "everclear": { + "router": "0xAFa5f9313F1F2b599173f24807a882F498Be118c" + }, + "morph": { + "router": "0x7dFb5E7808B5eb4fB8b9e7169537575f6fF1a218" } } diff --git a/typescript/infra/config/environments/mainnet3/warp/artifacts/merkly-eth-addresses.json b/typescript/infra/config/environments/mainnet3/warp/artifacts/merkly-eth-addresses.json index c4dd7482a..0eb22a6ab 100644 --- a/typescript/infra/config/environments/mainnet3/warp/artifacts/merkly-eth-addresses.json +++ b/typescript/infra/config/environments/mainnet3/warp/artifacts/merkly-eth-addresses.json @@ -20,6 +20,12 @@ "linea": { "router": "0x8F2161c83F46B46628cb591358dE4a89A63eEABf" }, + "mantle": { + "router": "0xf4368751f99127F052AFa993aEc3C6393AcA5466" + }, + "zoramainnet": { + "router": "0x8028d4f11d10730B12Ae011474F9db8140F112F4" + }, "scroll": { "router": "0xc0faBF14f8ad908b2dCE4C8aA2e7c1a6bD069957" }, @@ -32,6 +38,9 @@ "mode": { "router": "0x9970cB23f10dBd95B8A3E643f3A6A6ABB6f3cB9b" }, + "xlayer": { + "router": "0x444791b5cA0E0BdC2De93467f430fbe925b35487" + }, "ancient8": { "router": "0x7dFb5E7808B5eb4fB8b9e7169537575f6fF1a218" }, @@ -49,5 +58,20 @@ }, "bob": { "router": "0xEF62b433Ca3AC8b151c4a255de3eD3dA4e60AdD2" + }, + "worldchain": { + "router": "0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5" + }, + "zircuit": { + "router": "0xA5f471A19fdB367Ea80c4c82ecd30eA94090d549" + }, + "kroma": { + "router": "0x9f6f71f3D58aCeba796ADD5f00A893C636163BB2" + }, + "everclear": { + "router": "0xe35030B407C96C037190B63646AC1Eb34F43Cc2b" + }, + "morph": { + "router": "0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5" } } diff --git a/typescript/infra/config/environments/mainnet3/warp/artifacts/merkly-nft-addresses.json b/typescript/infra/config/environments/mainnet3/warp/artifacts/merkly-nft-addresses.json index 5aab300f6..6129febbc 100644 --- a/typescript/infra/config/environments/mainnet3/warp/artifacts/merkly-nft-addresses.json +++ b/typescript/infra/config/environments/mainnet3/warp/artifacts/merkly-nft-addresses.json @@ -8,18 +8,39 @@ "avalanche": { "router": "0x7daC480d20f322D2ef108A59A465CCb5749371c4" }, + "fusemainnet": { + "router": "0xDED4D91f77F69DE32c6da32CE8c1905C7de03C46" + }, + "kaia": { + "router": "0x80Abe17c3Ca312f63a96D31DdE1F829e90Ee05b7" + }, + "arbitrumnova": { + "router": "0xb3ae37826ca27CeF44694d4F8975916eF193454F" + }, "polygonzkevm": { "router": "0x7daC480d20f322D2ef108A59A465CCb5749371c4" }, + "harmony": { + "router": "0xDED4D91f77F69DE32c6da32CE8c1905C7de03C46" + }, "bsc": { "router": "0xf3D41b377c93fA5C3b0071966f1811c5063fAD40" }, "moonbeam": { "router": "0x7daC480d20f322D2ef108A59A465CCb5749371c4" }, + "metis": { + "router": "0xB598ECFb72207B11d7F3f8B0e4031d86a1d76381" + }, "gnosis": { "router": "0x7dac480d20f322d2ef108a59a465ccb5749371c4" }, + "coredao": { + "router": "0x72FA03C5868EBFeBcA21EB963bEFc4Ae2586a422" + }, + "fantom": { + "router": "0xE9994efe91B3fCbCF343BB9bcA7e6b7251173ea0" + }, "arbitrum": { "router": "0x7daC480d20f322D2ef108A59A465CCb5749371c4" }, @@ -35,18 +56,33 @@ "mantle": { "router": "0x2F1562Cc3044B95cb969D1684a1f4E43A207476E" }, + "zoramainnet": { + "router": "0xE95E517f9EE4b43AE198606407b6859f767De95b" + }, "viction": { "router": "0x80Abe17c3Ca312f63a96D31DdE1F829e90Ee05b7" }, + "astar": { + "router": "0xcAB586182E6a3CFF18f97F2b0cb316b6879B83a5" + }, "scroll": { "router": "0x7daC480d20f322D2ef108A59A465CCb5749371c4" }, "ethereum": { "router": "0x7daC480d20f322D2ef108A59A465CCb5749371c4" }, + "orderly": { + "router": "0xfD7c029D1F1198826302F5F6c9CD482c06F0D72f" + }, "mantapacific": { "router": "0xc7a66e3A9d1a84dC60f8a630C3eC3D84aCFBE5EC" }, + "rarichain": { + "router": "0xC7F09Ca5E3F5D47BedA89c0FA6E7f07De7385902" + }, + "xai": { + "router": "0x9e3dcb75d2388B1330b3Ff7e9c5b9f51EE5952F3" + }, "fraxtal": { "router": "0x49e6d51a220acab3b44d325edcab0f164cf48111" }, @@ -56,6 +92,18 @@ "blast": { "router": "0xDc09f06D11dFC7703BF8f3049E2CcF4507bEA1ab" }, + "astarzkevm": { + "router": "0x4924bFdfCfd3DB8D170c5882936396f1EB5542bB" + }, + "degenchain": { + "router": "0x85Fd2DA31262d26471c738Ce357a3767635A0956" + }, + "merlin": { + "router": "0x8796f4A273225ac8468585b1E9CFB97A0cEB6174" + }, + "xlayer": { + "router": "0x1812d05671EefA040ac605a0198476dEd081d520" + }, "ancient8": { "router": "0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5" }, @@ -73,5 +121,65 @@ }, "bob": { "router": "0xc072c3EbAf165955C5aAd2DbB4293f771de6dbd3" + }, + "endurance": { + "router": "0xAFa5f9313F1F2b599173f24807a882F498Be118c" + }, + "worldchain": { + "router": "0x6f6aE8851a460406bBB3c929a415d2Df9305AcD5" + }, + "cheesechain": { + "router": "0x829761FC0d35F1d05C77EEA2B629255e94Af8F60" + }, + "zircuit": { + "router": "0xAFa5f9313F1F2b599173f24807a882F498Be118c" + }, + "kroma": { + "router": "0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5" + }, + "cyber": { + "router": "0xc072c3EbAf165955C5aAd2DbB4293f771de6dbd3" + }, + "lisk": { + "router": "0xAFa5f9313F1F2b599173f24807a882F498Be118c" + }, + "lukso": { + "router": "0xAFa5f9313F1F2b599173f24807a882F498Be118c" + }, + "mint": { + "router": "0xAFa5f9313F1F2b599173f24807a882F498Be118c" + }, + "proofofplay": { + "router": "0xAFa5f9313F1F2b599173f24807a882F498Be118c" + }, + "real": { + "router": "0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5" + }, + "sanko": { + "router": "0xAFa5f9313F1F2b599173f24807a882F498Be118c" + }, + "tangle": { + "router": "0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5" + }, + "bitlayer": { + "router": "0xAFa5f9313F1F2b599173f24807a882F498Be118c" + }, + "dogechain": { + "router": "0xAFa5f9313F1F2b599173f24807a882F498Be118c" + }, + "flare": { + "router": "0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5" + }, + "molten": { + "router": "0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5" + }, + "shibarium": { + "router": "0xAFa5f9313F1F2b599173f24807a882F498Be118c" + }, + "everclear": { + "router": "0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5" + }, + "morph": { + "router": "0xAFa5f9313F1F2b599173f24807a882F498Be118c" } } diff --git a/typescript/infra/config/environments/mainnet3/warp/artifacts/renzo-ezETH-addresses-v1.json b/typescript/infra/config/environments/mainnet3/warp/artifacts/renzo-ezETH-addresses-v1.json deleted file mode 100644 index e4c2a871f..000000000 --- a/typescript/infra/config/environments/mainnet3/warp/artifacts/renzo-ezETH-addresses-v1.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "bsc": { - "router": "0x9Ff085A556A498395B9edA690666E3BD34751024" - }, - "arbitrum": { - "router": "0x1217441e6E8E960D065698317FE13594a5704f69" - }, - "optimism": { - "router": "0xEF90AF9FCC831c5E2266285C4A1787201f96736a" - }, - "base": { - "router": "0x4b36617B3D2cAb714a056090306A88Dd6DD4cCcf" - }, - "blast": { - "router": "0xB951c9b16603825C285bf59b14e983047d421Af5" - }, - "mode": { - "router": "0x477614191C3ccF8e10a6D1291dBAf098D17497BE" - }, - "linea": { - "router": "0x477614191C3ccF8e10a6D1291dBAf098D17497BE" - }, - "ethereum": { - "router": "0x0B386cAe2851E954b52D10Aee4ba8CCDC11463E1" - }, - "fraxtal": { - "router": "0xdFf621F952c23972dFD3A9E5d7B9f6339e9c078B" - } -} diff --git a/typescript/infra/config/environments/mainnet3/warp/artifacts/renzo-ezETH-addresses-v3.json b/typescript/infra/config/environments/mainnet3/warp/artifacts/renzo-ezETH-addresses-v3.json deleted file mode 100644 index e5c7023b2..000000000 --- a/typescript/infra/config/environments/mainnet3/warp/artifacts/renzo-ezETH-addresses-v3.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "arbitrum": { - "xERC20": "0xB26bBfC6d1F469C821Ea25099017862e7368F4E8" - }, - "base": { - "xERC20": "0x2552516453368e42705D791F674b312b8b87CD9e" - }, - "blast": { - "xERC20": "0x486b39378f99f073A3043C6Aabe8666876A8F3C5" - }, - "bsc": { - "xERC20": "0xE00C6185a5c19219F1FFeD213b4406a254968c26" - }, - "ethereum": { - "xERC20Lockbox": "0xC59336D8edDa9722B4f1Ec104007191Ec16f7087" - }, - "fraxtal": { - "xERC20": "0x3aE8635A4D581d40a6Edfb3f2ED480f9532994F5" - }, - "linea": { - "xERC20": "0xC59336D8edDa9722B4f1Ec104007191Ec16f7087" - }, - "mode": { - "xERC20": "0xC59336D8edDa9722B4f1Ec104007191Ec16f7087" - }, - "optimism": { - "xERC20": "0xacEB607CdF59EB8022Cc0699eEF3eCF246d149e2" - }, - "sei": { - "xERC20": "0xE5163F148C82a0818545d5D34e30BC1EDA870cB9" - }, - "taiko": { - "xERC20": "0x5eAFB1D4b5BDFaFE81715EeBcC7713e418C80E78" - }, - "zircuit": { - "xERC20": "0x2552516453368e42705D791F674b312b8b87CD9e" - } -} diff --git a/typescript/infra/config/environments/mainnet3/warp/artifacts/verification.json b/typescript/infra/config/environments/mainnet3/warp/artifacts/verification.json deleted file mode 100644 index 35d738ece..000000000 --- a/typescript/infra/config/environments/mainnet3/warp/artifacts/verification.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "ancient8": [ - { - "address": "0xB3fCcD379ad66CED0c91028520C64226611A48c9", - "constructorArguments": "00000000000000000000000000000000000000000000000000000000000000060000000000000000000000002f2afae1139ce54fefc03593fee8ab2adf4a85a7", - "isProxy": false, - "name": "Synthetic" - }, - { - "address": "0xdB670e1a1e312BF17425b08cE55Bdf2cD8F8eD54", - "constructorArguments": "", - "isProxy": false, - "name": "ProxyAdmin" - }, - { - "address": "0x9fA986ACB22953c504Fcf5985DFA476d481C3b1B", - "constructorArguments": "00000000000000000000000000000000000000000000000000000000000000060000000000000000000000002f2afae1139ce54fefc03593fee8ab2adf4a85a7", - "isProxy": false, - "name": "HypERC20" - }, - { - "address": "0x97423A68BAe94b5De52d767a17aBCc54c157c0E5", - "constructorArguments": "0000000000000000000000009fa986acb22953c504fcf5985dfa476d481c3b1b000000000000000000000000db670e1a1e312bf17425b08ce55bdf2cd8f8ed5400000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000144e80a7c79000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a7eccdb9be08178f896c26b7bbd8c3d4e844d9ba000000000000000000000000000000000000000000000000000000000000000855534420436f696e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004555344430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "isProxy": true, - "name": "TransparentUpgradeableProxy" - }, - { - "address": "0x086eF95a2F74582Ee30E7D698518a872fb18301f", - "constructorArguments": "", - "isProxy": false, - "name": "ProxyAdmin" - }, - { - "address": "0x8358D8291e3bEDb04804975eEa0fe9fe0fAfB147", - "constructorArguments": "", - "isProxy": false, - "name": "ProxyAdmin" - } - ], - "arbitrum": [ - { - "address": "0x93ca0d85837FF83158Cd14D65B169CdB223b1921", - "constructorArguments": "0000000000000000000000000000000000000000000000000000000000000006000000000000000000000000979ca5202784112f4738403dbec5d0f3b9daabb9", - "isProxy": false, - "name": "HypERC20" - } - ], - "ethereum": [ - { - "address": "0x15b5D6B614242B118AA404528A7f3E2Ad241e4A4", - "constructorArguments": "000000000000000000000000c005dc82818d67af737725bd4bf75435d065d239", - "isProxy": false, - "name": "HypNative" - }, - { - "address": "0x31Dca7762930f56D81292f85E65c9D67575804fE", - "constructorArguments": "000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000c005dc82818d67af737725bd4bf75435d065d239", - "isProxy": false, - "name": "HypERC20Collateral" - }, - { - "address": "0x4221a16A01F61c2b38A03C52d828a7041f6AAA49", - "constructorArguments": "000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000c005dc82818d67af737725bd4bf75435d065d239", - "isProxy": false, - "name": "HypERC20Collateral" - }, - { - "address": "0xab852e67bf03E74C89aF67C4BA97dd1088D3dA19", - "constructorArguments": "000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000c005dc82818d67af737725bd4bf75435d065d239", - "isProxy": false, - "name": "HypERC20Collateral" - }, - { - "address": "0xED56728fb977b0bBdacf65bCdD5e17Bb7e84504f", - "constructorArguments": "000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000c005dc82818d67af737725bd4bf75435d065d239", - "isProxy": false, - "name": "HypERC20Collateral" - }, - { - "address": "0x9f5cF636b4F2DC6D83c9d21c8911876C235DbC9f", - "constructorArguments": "000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000c005dc82818d67af737725bd4bf75435d065d239", - "isProxy": false, - "name": "Collateral" - }, - { - "address": "0x870464fE2EA3a6b3c242f30BDa1f1EFdDf580890", - "constructorArguments": "", - "isProxy": false, - "name": "ProxyAdmin" - }, - { - "address": "0xEd96482beA3C51a33b4c1aDa8b438e33A2367413", - "constructorArguments": "", - "isProxy": false, - "name": "ProxyAdmin" - }, - { - "address": "0x7D0C8B23C5b35091972023cCc689cfeDcD881c7d", - "constructorArguments": "000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000c005dc82818d67af737725bd4bf75435d065d239", - "isProxy": false, - "name": "HypERC20Collateral" - }, - { - "address": "0x8b4192B9Ad1fCa440A5808641261e5289e6de95D", - "constructorArguments": "0000000000000000000000007d0c8b23c5b35091972023ccc689cfedcd881c7d000000000000000000000000ed96482bea3c51a33b4c1ada8b438e33a236741300000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000064c0c53b8b00000000000000000000000019b2cf952b70b217c90fc408714fbc1acd29a6a8000000000000000000000000d17b4100cc66a2f1b9a452007ff26365aaeb7ec3000000000000000000000000a7eccdb9be08178f896c26b7bbd8c3d4e844d9ba00000000000000000000000000000000000000000000000000000000", - "isProxy": true, - "name": "TransparentUpgradeableProxy" - }, - { - "address": "0xe41a3270875f28A03312877cD95A01e9a53664b1", - "constructorArguments": "", - "isProxy": false, - "name": "ProxyAdmin" - }, - { - "address": "0xbE6501A4E68a3463A217eC0dEc862b1593C0A47D", - "constructorArguments": "0000000000000000000000008c9532a60e0e7c6bbd2b2c1303f63ace1c3e9811000000000000000000000000c005dc82818d67af737725bd4bf75435d065d239", - "isProxy": false, - "name": "HypERC20Collateral" - }, - { - "address": "0x1D622da2ce4C4D9D4B0611718cb3BcDcAd008DD4", - "constructorArguments": "000000000000000000000000be6501a4e68a3463a217ec0dec862b1593c0a47d000000000000000000000000e41a3270875f28a03312877cd95a01e9a53664b100000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000064c0c53b8b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a7eccdb9be08178f896c26b7bbd8c3d4e844d9ba00000000000000000000000000000000000000000000000000000000", - "expectedimplementation": "0xbE6501A4E68a3463A217eC0dEc862b1593C0A47D", - "isProxy": true, - "name": "TransparentUpgradeableProxy" - } - ], - "inevm": [ - { - "address": "0x97423A68BAe94b5De52d767a17aBCc54c157c0E5", - "constructorArguments": "00000000000000000000000000000000000000000000000000000000000000060000000000000000000000002f2afae1139ce54fefc03593fee8ab2adf4a85a7", - "isProxy": false, - "name": "HypERC20" - }, - { - "address": "0x8358D8291e3bEDb04804975eEa0fe9fe0fAfB147", - "constructorArguments": "00000000000000000000000000000000000000000000000000000000000000060000000000000000000000002f2afae1139ce54fefc03593fee8ab2adf4a85a7", - "isProxy": false, - "name": "HypERC20" - } - ], - "viction": [ - { - "address": "0x182E8d7c5F1B06201b102123FC7dF0EaeB445a7B", - "constructorArguments": "00000000000000000000000000000000000000000000000000000000000000120000000000000000000000002f2afae1139ce54fefc03593fee8ab2adf4a85a7", - "isProxy": false, - "name": "HypERC20" - }, - { - "address": "0x811808Dd29ba8B0FC6C0ec0b5537035E59745162", - "constructorArguments": "00000000000000000000000000000000000000000000000000000000000000120000000000000000000000002f2afae1139ce54fefc03593fee8ab2adf4a85a7", - "isProxy": false, - "name": "HypERC20" - }, - { - "address": "0x61DDB465eEA5bc3708Cf8B53156aC91a77A2f029", - "constructorArguments": "00000000000000000000000000000000000000000000000000000000000000120000000000000000000000002f2afae1139ce54fefc03593fee8ab2adf4a85a7", - "isProxy": false, - "name": "HypERC20" - } - ] -} diff --git a/typescript/infra/config/environments/mainnet3/warp/artifacts/viction-ETH-addresses.json b/typescript/infra/config/environments/mainnet3/warp/artifacts/viction-ETH-addresses.json deleted file mode 100644 index c5842c176..000000000 --- a/typescript/infra/config/environments/mainnet3/warp/artifacts/viction-ETH-addresses.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "viction": { - "router": "0x182E8d7c5F1B06201b102123FC7dF0EaeB445a7B" - }, - "ethereum": { - "router": "0x15b5D6B614242B118AA404528A7f3E2Ad241e4A4" - } -} diff --git a/typescript/infra/config/environments/mainnet3/warp/artifacts/viction-USDC-addresses.json b/typescript/infra/config/environments/mainnet3/warp/artifacts/viction-USDC-addresses.json deleted file mode 100644 index c56719309..000000000 --- a/typescript/infra/config/environments/mainnet3/warp/artifacts/viction-USDC-addresses.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "ethereum": { - "HypERC20Collateral": "0x31Dca7762930f56D81292f85E65c9D67575804fE", - "router": "0x31Dca7762930f56D81292f85E65c9D67575804fE" - }, - "viction": { - "HypERC20": "0xBDa330Ea8F3005C421C8088e638fBB64fA71b9e0", - "router": "0xBDa330Ea8F3005C421C8088e638fBB64fA71b9e0" - } -} diff --git a/typescript/infra/config/environments/mainnet3/warp/artifacts/viction-USDT-addresses.json b/typescript/infra/config/environments/mainnet3/warp/artifacts/viction-USDT-addresses.json deleted file mode 100644 index e455bb7e2..000000000 --- a/typescript/infra/config/environments/mainnet3/warp/artifacts/viction-USDT-addresses.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "ethereum": { - "router": "0x4221a16A01F61c2b38A03C52d828a7041f6AAA49", - "HypERC20Collateral": "0x4221a16A01F61c2b38A03C52d828a7041f6AAA49" - }, - "viction": { - "router": "0x48083c69f5a42c6b69abbad48ae195bd36770ee2", - "HypERC20": "0x48083c69f5a42c6b69abbad48ae195bd36770ee2" - } -} diff --git a/typescript/infra/config/environments/testnet4/agent.ts b/typescript/infra/config/environments/testnet4/agent.ts index 7089098d0..fbf6b4b88 100644 --- a/typescript/infra/config/environments/testnet4/agent.ts +++ b/typescript/infra/config/environments/testnet4/agent.ts @@ -225,7 +225,7 @@ const hyperlane: RootAgentConfig = { }, blacklist: [...releaseCandidateHelloworldMatchingList, ...relayBlacklist], gasPaymentEnforcement, - metricAppContexts: [ + metricAppContextsGetter: () => [ { name: 'helloworld', matchingList: routerMatchingList( diff --git a/typescript/infra/src/agents/index.ts b/typescript/infra/src/agents/index.ts index 3f3f6469a..b505bea1a 100644 --- a/typescript/infra/src/agents/index.ts +++ b/typescript/infra/src/agents/index.ts @@ -1,7 +1,8 @@ import fs from 'fs'; import { join } from 'path'; -import { ChainName, RpcConsensusType } from '@hyperlane-xyz/sdk'; +import { ChainName, RelayerConfig, RpcConsensusType } from '@hyperlane-xyz/sdk'; +import { objFilter, objOmit, objOmitKeys, pick } from '@hyperlane-xyz/utils'; import { Contexts } from '../../config/contexts.js'; import { getChain } from '../../config/registry.js'; @@ -13,7 +14,11 @@ import { KubernetesResources, RootAgentConfig, } from '../config/agent/agent.js'; -import { RelayerConfigHelper } from '../config/agent/relayer.js'; +import { + RelayerConfigHelper, + RelayerConfigMapConfig, + RelayerEnvConfig, +} from '../config/agent/relayer.js'; import { ScraperConfigHelper } from '../config/agent/scraper.js'; import { ValidatorConfigHelper } from '../config/agent/validator.js'; import { DeployEnvironment } from '../config/environment.js'; @@ -151,10 +156,25 @@ export class RelayerHelmManager extends OmniscientAgentHelmManager { async helmValues(): Promise { const values = await super.helmValues(); + + const config = await this.config.buildConfig(); + + // Divide the keys between the configmap and the env config. + const configMapConfig: RelayerConfigMapConfig = { + addressBlacklist: config.addressBlacklist, + metricAppContexts: config.metricAppContexts, + gasPaymentEnforcement: config.gasPaymentEnforcement, + }; + const envConfig = objOmitKeys( + config, + Object.keys(configMapConfig), + ) as RelayerEnvConfig; + values.hyperlane.relayer = { enabled: true, aws: this.config.requiresAwsCredentials, - config: await this.config.buildConfig(), + envConfig, + configMapConfig, resources: this.kubernetesResources(), }; diff --git a/typescript/infra/src/config/agent/relayer.ts b/typescript/infra/src/config/agent/relayer.ts index cd7e4a46d..648ab81ac 100644 --- a/typescript/infra/src/config/agent/relayer.ts +++ b/typescript/infra/src/config/agent/relayer.ts @@ -20,7 +20,11 @@ import { rootLogger, } from '@hyperlane-xyz/utils'; -import { getChain, getDomainId } from '../../../config/registry.js'; +import { + getChain, + getDomainId, + getWarpAddresses, +} from '../../../config/registry.js'; import { AgentAwsUser } from '../../agents/aws/user.js'; import { Role } from '../../roles.js'; import { HelmStatefulSetValues } from '../infrastructure.js'; @@ -45,17 +49,31 @@ export interface BaseRelayerConfig { addressBlacklist?: string; transactionGasLimit?: BigNumberish; skipTransactionGasLimitFor?: string[]; - metricAppContexts?: MetricAppContext[]; + metricAppContextsGetter?: () => MetricAppContext[]; } // Full relayer-specific agent config for a single chain export type RelayerConfig = Omit; +// Config intended to be set as configMap values, these are usually really long +// and are intended to derisk hitting max env var length limits. +export type RelayerConfigMapConfig = Pick< + RelayerConfig, + 'addressBlacklist' | 'gasPaymentEnforcement' | 'metricAppContexts' +>; +// The rest of the config is intended to be set as env vars. +export type RelayerEnvConfig = Omit< + RelayerConfig, + keyof RelayerConfigMapConfig +>; // See rust/main/helm/values.yaml for the full list of options and their defaults. // This is at `.hyperlane.relayer` in the values file. export interface HelmRelayerValues extends HelmStatefulSetValues { aws: boolean; - config?: RelayerConfig; + // Config intended to be set as env vars + envConfig?: RelayerEnvConfig; + // Config intended to be set as configMap values + configMapConfig?: RelayerConfigMapConfig; } // See rust/main/helm/values.yaml for the full list of options and their defaults. @@ -105,9 +123,9 @@ export class RelayerConfigHelper extends AgentConfigHelper { relayerConfig.skipTransactionGasLimitFor = baseConfig.skipTransactionGasLimitFor.join(','); } - if (baseConfig.metricAppContexts) { + if (baseConfig.metricAppContextsGetter) { relayerConfig.metricAppContexts = JSON.stringify( - baseConfig.metricAppContexts, + baseConfig.metricAppContextsGetter(), ); } @@ -213,6 +231,11 @@ export class RelayerConfigHelper extends AgentConfigHelper { } } +// Gets the matching list for the given warp route using addresses from the registry. +export function warpRouteMatchingList(warpRouteId: string): MatchingList { + return matchingList(getWarpAddresses(warpRouteId)); +} + export function routerMatchingList( routers: ChainMap<{ router: Address }>, ): MatchingList { diff --git a/typescript/utils/src/index.ts b/typescript/utils/src/index.ts index 0907631ca..c4a869283 100644 --- a/typescript/utils/src/index.ts +++ b/typescript/utils/src/index.ts @@ -120,6 +120,7 @@ export { objMapEntries, objMerge, objOmit, + objOmitKeys, pick, promiseObjAll, stringifyObject, diff --git a/typescript/utils/src/objects.ts b/typescript/utils/src/objects.ts index 6446f9736..97d9d99db 100644 --- a/typescript/utils/src/objects.ts +++ b/typescript/utils/src/objects.ts @@ -190,6 +190,13 @@ export function objOmit = any>( return ret as T; } +export function objOmitKeys = any>( + obj: Record, + keys: string[], +): Partial { + return objFilter(obj, (k, _v): _v is any => !keys.includes(k)) as Partial; +} + export function invertKeysAndValues(data: any) { return Object.fromEntries( Object.entries(data)