Skip to content

Commit

Permalink
Filter infra core env chains to EVM
Browse files Browse the repository at this point in the history
  • Loading branch information
jmrossy committed Apr 30, 2024
1 parent 6166d1b commit 9e4bde9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
5 changes: 4 additions & 1 deletion typescript/infra/config/environments/mainnet3/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ import {
RoutingIsmConfig,
defaultMultisigConfigs,
} from '@hyperlane-xyz/sdk';
import { Address, objMap } from '@hyperlane-xyz/utils';
import { Address, ProtocolType, objMap } from '@hyperlane-xyz/utils';

import { getChain } from '../../registry.js';

import { igp } from './igp.js';
import { DEPLOYER, owners } from './owners.js';
Expand All @@ -27,6 +29,7 @@ import { supportedChainNames } from './supportedChainNames.js';
export const core: ChainMap<CoreConfig> = objMap(owners, (local, owner) => {
const originMultisigs: ChainMap<MultisigConfig> = Object.fromEntries(
supportedChainNames
.filter((chain) => getChain(chain).protocol === ProtocolType.Ethereum)
.filter((chain) => chain !== local)
.map((origin) => [origin, defaultMultisigConfigs[origin]]),
);
Expand Down
5 changes: 4 additions & 1 deletion typescript/infra/config/environments/testnet4/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ import {
RoutingIsmConfig,
defaultMultisigConfigs,
} from '@hyperlane-xyz/sdk';
import { Address, objMap } from '@hyperlane-xyz/utils';
import { Address, ProtocolType, objMap } from '@hyperlane-xyz/utils';

import { getChain } from '../../registry.js';

import { igp } from './igp.js';
import { owners } from './owners.js';
Expand All @@ -29,6 +31,7 @@ export const core: ChainMap<CoreConfig> = objMap(
(local, ownerConfig) => {
const originMultisigs: ChainMap<MultisigConfig> = Object.fromEntries(
supportedChainNames
.filter((chain) => getChain(chain).protocol === ProtocolType.Ethereum)
.filter((chain) => chain !== local)
.map((origin) => [origin, defaultMultisigConfigs[origin]]),
);
Expand Down
2 changes: 1 addition & 1 deletion typescript/infra/config/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
} from '@hyperlane-xyz/sdk';
import { objFilter, rootLogger } from '@hyperlane-xyz/utils';

import { DeployEnvironment } from '../src/config/environment.js';
import type { DeployEnvironment } from '../src/config/environment.js';

import { supportedChainNames as mainnet3Chains } from './environments/mainnet3/supportedChainNames.js';
import { testChainNames as testChains } from './environments/test/chains.js';
Expand Down
3 changes: 1 addition & 2 deletions typescript/sdk/src/core/HyperlaneCoreChecker.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ethers, utils as ethersUtils } from 'ethers';

import { assert, eqAddress, rootLogger } from '@hyperlane-xyz/utils';
import { assert, eqAddress } from '@hyperlane-xyz/utils';

import { BytecodeHash } from '../consts/bytecode.js';
import { HyperlaneAppChecker } from '../deploy/HyperlaneAppChecker.js';
Expand Down Expand Up @@ -63,7 +63,6 @@ export class HyperlaneCoreChecker extends HyperlaneAppChecker<
const actualIsm = await mailbox.defaultIsm();

const config = this.configMap[chain];
rootLogger.debug('Checking mailbox for ism config', config.defaultIsm);
const matches = await moduleMatchesConfig(
chain,
actualIsm,
Expand Down

0 comments on commit 9e4bde9

Please sign in to comment.