From 03fce881ca8ec792285c400b7f0cc5e13637cdb2 Mon Sep 17 00:00:00 2001 From: -f Date: Fri, 1 Dec 2023 00:49:25 -0500 Subject: [PATCH] give option in the CLI --- .changeset/large-guests-jump.md | 8 ++++++++ typescript/cli/src/config/ism.ts | 16 +++++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 .changeset/large-guests-jump.md diff --git a/.changeset/large-guests-jump.md b/.changeset/large-guests-jump.md new file mode 100644 index 0000000000..6276c4c088 --- /dev/null +++ b/.changeset/large-guests-jump.md @@ -0,0 +1,8 @@ +--- +'@hyperlane-xyz/infra': patch +'@hyperlane-xyz/cli': patch +'@hyperlane-xyz/sdk': patch +'@hyperlane-xyz/core': patch +--- + +Supporting DefaultFallbackRoutingIsm through non-factory deployments diff --git a/typescript/cli/src/config/ism.ts b/typescript/cli/src/config/ism.ts index d445f62716..732182f382 100644 --- a/typescript/cli/src/config/ism.ts +++ b/typescript/cli/src/config/ism.ts @@ -159,6 +159,12 @@ export async function createIsmConfig( description: 'Each origin chain can be verified by the specified ISM type via RoutingISM', }, + { + value: IsmType.FALLBACK_ROUTING, + name: IsmType.FALLBACK_ROUTING, + description: + "You can specify ISM type for specific chains you like and fallback to mailbox's default ISM for other chains via DefaultFallbackRoutingISM", + }, { value: IsmType.AGGREGATION, name: IsmType.AGGREGATION, @@ -179,8 +185,11 @@ export async function createIsmConfig( moduleType === IsmType.MERKLE_ROOT_MULTISIG ) { lastConfig = await createMultisigConfig(moduleType); - } else if (moduleType === IsmType.ROUTING) { - lastConfig = await createRoutingConfig(chain, chainConfigPath); + } else if ( + moduleType === IsmType.ROUTING || + moduleType === IsmType.FALLBACK_ROUTING + ) { + lastConfig = await createRoutingConfig(moduleType, chain, chainConfigPath); } else if (moduleType === IsmType.AGGREGATION) { lastConfig = await createAggregationConfig(chain, chainConfigPath); } else if (moduleType === IsmType.TEST_ISM) { @@ -240,6 +249,7 @@ export async function createAggregationConfig( } export async function createRoutingConfig( + type: IsmType.ROUTING | IsmType.FALLBACK_ROUTING, chain: ChainName, chainConfigPath: string, ): Promise { @@ -264,7 +274,7 @@ export async function createRoutingConfig( domainsMap[chain] = config; } return { - type: IsmType.ROUTING, + type, owner: ownerAddress, domains: domainsMap, };