Account for non-evm for domain fetching (#3316)

### Description

Copies https://github.com/hyperlane-xyz/hyperlane-monorepo/pull/3275 for
the core deployer
injective-ism-fix
Nam Chu Hoai 8 months ago committed by GitHub
parent 16cb5e19ec
commit eeac4679e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      typescript/sdk/src/hook/HyperlaneHookDeployer.ts
  2. 8
      typescript/sdk/src/ism/utils.ts

@ -12,6 +12,7 @@ import {
} from '@hyperlane-xyz/core';
import { Address, addressToBytes32 } from '@hyperlane-xyz/utils';
import { chainMetadata } from '../consts/chainMetadata';
import { HyperlaneContracts } from '../contracts/types';
import { CoreAddresses } from '../core/contracts';
import { HyperlaneDeployer } from '../deploy/HyperlaneDeployer';
@ -287,7 +288,8 @@ export class HyperlaneHookDeployer extends HyperlaneDeployer<
const routingConfigs: DomainRoutingHook.HookConfigStruct[] = [];
for (const [dest, hookConfig] of Object.entries(config.domains)) {
const destDomain = this.multiProvider.getDomainId(dest);
const destDomain =
chainMetadata[dest]?.domainId ?? this.multiProvider.getDomainId(dest);
if (typeof hookConfig === 'string') {
routingConfigs.push({
destination: destDomain,

@ -20,6 +20,7 @@ import {
objMap,
} from '@hyperlane-xyz/utils';
import { chainMetadata } from '../consts/chainMetadata';
import { HyperlaneContracts } from '../contracts/types';
import { ProxyFactoryFactories } from '../deploy/contracts';
import { MultiProvider } from '../providers/MultiProvider';
@ -327,8 +328,11 @@ export async function routingModuleDelta(
domain.toNumber(),
);
// config.domains is already filtered to only include domains in the multiprovider
const safeConfigDomains = objMap(config.domains, (domain) =>
multiProvider.getDomainId(domain),
const safeConfigDomains = objMap(
config.domains,
(chainName) =>
chainMetadata[chainName]?.domainId ??
multiProvider.getDomainId(chainName),
);
const delta: RoutingIsmDelta = {

Loading…
Cancel
Save