Repository: hyperlane-xyz/hyperlane-monorepo
Pull request #5621: feat: check-deploy with --registry
Author: login: ltyu
Created: 2025-03-06T21:37:20Z | Merged: 2025-03-12T15:18:14Z

### Description
This PR 
- allows check-deploy to run with a `--registry` instead of having to check out the Registry branch. This is similar to how CLI's parameter.
- Update getConfigFromMergedRegistry() to fetch from the array in `--registry`
- Adds new functions getWarpCoreConfigFromMergedRegistry() and getWarpAddressesFromMergedRegistry() to fetch from the array in `--registry`
- requires `--warpRouteId` to be filled in and no longer depend on the warpRouteIds mapping

### Related issues
- Fixes #5240 

### Backward compatibility
Yes - We now fetch from the FileSystem and Github Registry instead of just FileSystem

### Testing
Manual


Linked issue #5240: infra's check-deploy can be run with a command line arg for registry commit
This will allow verifies to not have to check out the registry commit locally themselves.
Once this is done, the warp deploy checklist should be updated with this

Diff:
diff --git a/typescript/infra/config/registry.ts b/typescript/infra/config/registry.ts
index d6cab43f936..49ee31a663c 100644
--- a/typescript/infra/config/registry.ts
+++ b/typescript/infra/config/registry.ts
@@ -7,7 +7,10 @@ import {
   PartialRegistry,
   warpConfigToWarpAddresses,
 } from '@hyperlane-xyz/registry';
-import { FileSystemRegistry } from '@hyperlane-xyz/registry/fs';
+import {
+  FileSystemRegistry,
+  getRegistry as getMergedRegistry,
+} from '@hyperlane-xyz/registry/fs';
 import {
   ChainMap,
   ChainMetadata,
@@ -112,6 +115,32 @@ export function getWarpAddresses(
   return warpConfigToWarpAddresses(warpCoreConfig);
 }
 
+export async function getWarpCoreConfigFromMergedRegistry(
+  warpRouteId: string,
+  registryUris: string[],
+): Promise<WarpCoreConfig> {
+  const registry = getMergedRegistry({ registryUris, enableProxy: true });
+  const warpRouteConfig = await registry.getWarpRoute(warpRouteId);
+
+  if (!warpRouteConfig) {
+    throw new Error(
+      `Warp route config for ${warpRouteId} not found in registry`,
+    );
+  }
+  return warpRouteConfig;
+}
+
+export async function getWarpAddressesFromMergedRegistry(
+  warpRouteId: string,
+  registryUris: string[],
+): Promise<ChainMap<ChainAddresses>> {
+  const warpCoreConfig = await getWarpCoreConfigFromMergedRegistry(
+    warpRouteId,
+    registryUris,
+  );
+  return warpConfigToWarpAddresses(warpCoreConfig);
+}
+
 export function getEnvChains(env: DeployEnvironment): ChainName[] {
   if (env === 'mainnet3') return mainnet3Chains;
   if (env === 'testnet4') return testnet4Chains;
diff --git a/typescript/infra/config/warp.ts b/typescript/infra/config/warp.ts
index 27b15cad948..4a82aeceed5 100644
--- a/typescript/infra/config/warp.ts
+++ b/typescript/infra/config/warp.ts
@@ -136,9 +136,10 @@ async function getConfigFromMergedRegistry(
   _routerConfig: ChainMap<RouterConfigWithoutOwner>,
   _abacusWorksEnvOwnerConfig: ChainMap<OwnableConfig>,
   warpRouteId: string,
+  registryUris: string[],
 ): Promise<ChainMap<HypTokenRouterConfig>> {
   const registry = getRegistry({
-    registryUris: [DEFAULT_REGISTRY_URI],
+    registryUris,
     enableProxy: true,
   });
   const warpRoute = await registry.getWarpDeployConfig(warpRouteId);
@@ -176,6 +177,7 @@ export async function getWarpConfig(
   multiProvider: MultiProvider,
   envConfig: EnvironmentConfig,
   warpRouteId: string,
+  registryUris = [DEFAULT_REGISTRY_URI],
 ): Promise<ChainMap<HypTokenRouterConfig>> {
   const routerConfig = await getRouterConfigsForAllVms(
     envConfig,
@@ -212,5 +214,6 @@ export async function getWarpConfig(
     routerConfigWithoutOwner,
     abacusWorksEnvOwnerConfig,
     warpRouteId,
+    registryUris,
   );
 }
diff --git a/typescript/infra/scripts/agent-utils.ts b/typescript/infra/scripts/agent-utils.ts
index 069f2b2c456..96444e134c0 100644
--- a/typescript/infra/scripts/agent-utils.ts
+++ b/typescript/infra/scripts/agent-utils.ts
@@ -201,13 +201,17 @@ export function withOutputFile<T>(args: Argv<T>) {
     .alias('o', 'outFile');
 }
 
-export function withWarpRouteId<T>(args: Argv<T>) {
+export function withKnownWarpRouteId<T>(args: Argv<T>) {
   return args
     .describe('warpRouteId', 'warp route id')
     .string('warpRouteId')
     .choices('warpRouteId', Object.values(WarpRouteIds));
 }
 
+export function withWarpRouteId<T>(args: Argv<T>) {
+  return args.describe('warpRouteId', 'warp route id').string('warpRouteId');
+}
+
 export function withDryRun<T>(args: Argv<T>) {
   return args
     .describe('dryRun', 'Dry run')
@@ -215,8 +219,8 @@ export function withDryRun<T>(args: Argv<T>) {
     .default('dryRun', false);
 }
 
-export function withWarpRouteIdRequired<T>(args: Argv<T>) {
-  return withWarpRouteId(args).demandOption('warpRouteId');
+export function withKnownWarpRouteIdRequired<T>(args: Argv<T>) {
+  return withKnownWarpRouteId(args).demandOption('warpRouteId');
 }
 
 export function withProtocol<T>(args: Argv<T>) {
diff --git a/typescript/infra/scripts/check/check-deploy.ts b/typescript/infra/scripts/check/check-deploy.ts
index 1da9e61bc68..1b12d265014 100644
--- a/typescript/infra/scripts/check/check-deploy.ts
+++ b/typescript/infra/scripts/check/check-deploy.ts
@@ -14,6 +14,7 @@ async function main() {
     fork,
     govern,
     warpRouteId,
+    registry,
   } = await getCheckDeployArgs().argv;
 
   const governor = await getGovernor(
@@ -25,6 +26,8 @@ async function main() {
     chains,
     fork,
     govern,
+    undefined,
+    registry,
   );
 
   if (fork) {
diff --git a/typescript/infra/scripts/check/check-utils.ts b/typescript/infra/scripts/check/check-utils.ts
index ef7a2b12151..8e889e13822 100644
--- a/typescript/infra/scripts/check/check-utils.ts
+++ b/typescript/infra/scripts/check/check-utils.ts
@@ -23,7 +23,10 @@ import { eqAddress, objFilter } from '@hyperlane-xyz/utils';
 
 import { Contexts } from '../../config/contexts.js';
 import { DEPLOYER } from '../../config/environments/mainnet3/owners.js';
-import { getWarpAddresses } from '../../config/registry.js';
+import {
+  getWarpAddresses,
+  getWarpAddressesFromMergedRegistry,
+} from '../../config/registry.js';
 import { getWarpConfig } from '../../config/warp.js';
 import { chainsToSkip } from '../../src/config/chain.js';
 import { DeployEnvironment } from '../../src/config/environment.js';
@@ -45,11 +48,12 @@ import {
   withContext,
   withFork,
   withGovern,
+  withKnownWarpRouteId,
   withModule,
   withPushMetrics,
-  withWarpRouteId,
 } from '../agent-utils.js';
 import { getEnvironmentConfig, getHyperlaneCore } from '../core-utils.js';
+import { withRegistryUris } from '../github-utils.js';
 import { getHelloWorldApp } from '../helloworld/utils.js';
 
 export function getCheckBaseArgs() {
@@ -63,7 +67,7 @@ export function getCheckWarpDeployArgs() {
 }
 
 export function getCheckDeployArgs() {
-  return withWarpRouteId(withModule(getCheckBaseArgs()));
+  return withRegistryUris(withKnownWarpRouteId(withModule(getCheckBaseArgs())));
 }
 
 export async function getGovernor(
@@ -76,6 +80,7 @@ export async function getGovernor(
   fork?: string,
   govern?: boolean,
   multiProvider: MultiProvider | undefined = undefined,
+  registryUris?: string[],
 ) {
   const envConfig = getEnvironmentConfig(environment);
   // If the multiProvider is not passed in, get it from the environment
@@ -196,8 +201,15 @@ export async function getGovernor(
     if (!warpRouteId) {
       warpRouteId = await getWarpRouteIdInteractive();
     }
-    const config = await getWarpConfig(multiProvider, envConfig, warpRouteId);
-    const warpAddresses = getWarpAddresses(warpRouteId);
+    const config = await getWarpConfig(
+      multiProvider,
+      envConfig,
+      warpRouteId,
+      registryUris,
+    );
+    const warpAddresses = registryUris
+      ? await getWarpAddressesFromMergedRegistry(warpRouteId, registryUris)
+      : getWarpAddresses(warpRouteId);
     const filteredAddresses = Object.keys(warpAddresses) // filter out changes not in config
       .filter((key) => key in config)
       .reduce((obj, key) => {
diff --git a/typescript/infra/scripts/deploy.ts b/typescript/infra/scripts/deploy.ts
index 85a58e59ce3..994bc6ebd9d 100644
--- a/typescript/infra/scripts/deploy.ts
+++ b/typescript/infra/scripts/deploy.ts
@@ -49,8 +49,8 @@ import {
   withConcurrentDeploy,
   withContext,
   withFork,
+  withKnownWarpRouteId,
   withModule,
-  withWarpRouteId,
 } from './agent-utils.js';
 import { getEnvironmentConfig, getHyperlaneCore } from './core-utils.js';
 
@@ -67,7 +67,9 @@ async function main() {
   } = await withContext(
     withConcurrentDeploy(
       withChains(
-        withModule(withFork(withWarpRouteId(withBuildArtifactPath(getArgs())))),
+        withModule(
+          withFork(withKnownWarpRouteId(withBuildArtifactPath(getArgs()))),
+        ),
       ),
     ),
   ).argv;
diff --git a/typescript/infra/scripts/github-utils.ts b/typescript/infra/scripts/github-utils.ts
new file mode 100644
index 00000000000..c9149e175fb
--- /dev/null
+++ b/typescript/infra/scripts/github-utils.ts
@@ -0,0 +1,8 @@
+import { Argv } from 'yargs';
+
+export function withRegistryUris<T>(args: Argv<T>) {
+  return args
+    .describe('registry', 'Github registry urls (comma separated)')
+    .string('registry')
+    .array('registry');
+}
diff --git a/typescript/infra/scripts/warp-routes/deploy-warp-monitor.ts b/typescript/infra/scripts/warp-routes/deploy-warp-monitor.ts
index 0f34fc9b833..a874c06f702 100644
--- a/typescript/infra/scripts/warp-routes/deploy-warp-monitor.ts
+++ b/typescript/infra/scripts/warp-routes/deploy-warp-monitor.ts
@@ -18,7 +18,7 @@ import {
   getAgentConfig,
   getArgs,
   getWarpRouteIdsInteractive,
-  withWarpRouteId,
+  withKnownWarpRouteId,
 } from '../agent-utils.js';
 import { getEnvironmentConfig } from '../core-utils.js';
 
@@ -42,7 +42,8 @@ async function validateRegistryCommit(commit: string) {
 
 async function main() {
   configureRootLogger(LogFormat.Pretty, LogLevel.Info);
-  const { environment, warpRouteId } = await withWarpRouteId(getArgs()).argv;
+  const { environment, warpRouteId } = await withKnownWarpRouteId(getArgs())
+    .argv;
   const envConfig = getEnvironmentConfig(environment);
   const multiProtocolProvider = await envConfig.getMultiProtocolProvider();
 
diff --git a/typescript/infra/scripts/warp-routes/generate-strategy-config.ts b/typescript/infra/scripts/warp-routes/generate-strategy-config.ts
index 6a3b1e514ee..b4fc81b32b2 100644
--- a/typescript/infra/scripts/warp-routes/generate-strategy-config.ts
+++ b/typescript/infra/scripts/warp-routes/generate-strategy-config.ts
@@ -9,13 +9,17 @@ import {
 
 import { strategyConfigGetterMap } from '../../config/warp.js';
 import { writeYamlAtPath } from '../../src/utils/utils.js';
-import { getArgs, withOutputFile, withWarpRouteId } from '../agent-utils.js';
+import {
+  getArgs,
+  withKnownWarpRouteId,
+  withOutputFile,
+} from '../agent-utils.js';
 
 // Writes the strategy config to disk
 async function main() {
   const logger = configureRootLogger(LogFormat.Pretty, LogLevel.Info);
   const { warpRouteId, outFile } = await withOutputFile(
-    withWarpRouteId(getArgs()),
+    withKnownWarpRouteId(getArgs()),
   ).argv;
   assert(warpRouteId, 'warpRouteId not provided');
 
diff --git a/typescript/infra/scripts/warp-routes/generate-warp-config.ts b/typescript/infra/scripts/warp-routes/generate-warp-config.ts
index c482f1e86ba..99a7af46094 100644
--- a/typescript/infra/scripts/warp-routes/generate-warp-config.ts
+++ b/typescript/infra/scripts/warp-routes/generate-warp-config.ts
@@ -7,14 +7,14 @@ import { getWarpConfig } from '../../config/warp.js';
 import { writeYamlAtPath } from '../../src/utils/utils.js';
 import {
   getArgs,
+  withKnownWarpRouteIdRequired,
   withOutputFile,
-  withWarpRouteIdRequired,
 } from '../agent-utils.js';
 import { getEnvironmentConfig, getHyperlaneCore } from '../core-utils.js';
 
 async function main() {
   const { warpRouteId, environment, outFile } = await withOutputFile(
-    withWarpRouteIdRequired(getArgs()),
+    withKnownWarpRouteIdRequired(getArgs()),
   ).argv;
 
   const { multiProvider } = await getHyperlaneCore(environment);
diff --git a/typescript/infra/scripts/warp-routes/monitor/monitor-warp-route-balances.ts b/typescript/infra/scripts/warp-routes/monitor/monitor-warp-route-balances.ts
index 7747a73f9a8..daf668cfa42 100644
--- a/typescript/infra/scripts/warp-routes/monitor/monitor-warp-route-balances.ts
+++ b/typescript/infra/scripts/warp-routes/monitor/monitor-warp-route-balances.ts
@@ -33,7 +33,7 @@ import { startMetricsServer } from '../../../src/utils/metrics.js';
 import {
   getArgs,
   getWarpRouteIdInteractive,
-  withWarpRouteId,
+  withKnownWarpRouteId,
 } from '../../agent-utils.js';
 import { getEnvironmentConfig } from '../../core-utils.js';
 
@@ -57,7 +57,7 @@ async function main() {
     checkFrequency,
     environment,
     warpRouteId: warpRouteIdArg,
-  } = await withWarpRouteId(getArgs())
+  } = await withKnownWarpRouteId(getArgs())
     .describe('checkFrequency', 'frequency to check balances in ms')
     .demandOption('checkFrequency')
     .alias('v', 'checkFrequency') // v as in Greek letter nu
diff --git a/typescript/infra/scripts/warp-routes/monitor/status.ts b/typescript/infra/scripts/warp-routes/monitor/status.ts
index a6908a1fe09..1bf72a2fad9 100644
--- a/typescript/infra/scripts/warp-routes/monitor/status.ts
+++ b/typescript/infra/scripts/warp-routes/monitor/status.ts
@@ -12,7 +12,7 @@ import { WarpRouteMonitorHelmManager } from '../../../src/warp/helm.js';
 import {
   assertCorrectKubeContext,
   getArgs,
-  withWarpRouteIdRequired,
+  withKnownWarpRouteIdRequired,
 } from '../../agent-utils.js';
 import { getEnvironmentConfig } from '../../core-utils.js';
 
@@ -23,7 +23,7 @@ const LOG_AMOUNT = 5;
 
 async function main() {
   configureRootLogger(LogFormat.Pretty, LogLevel.Info);
-  const { environment, warpRouteId } = await withWarpRouteIdRequired(
+  const { environment, warpRouteId } = await withKnownWarpRouteIdRequired(
     getArgs(),
   ).parse();
 
diff --git a/typescript/infra/scripts/xerc20/xerc20vs-add-bridge.ts b/typescript/infra/scripts/xerc20/xerc20vs-add-bridge.ts
index 140dad3f937..7d03fdcfcd0 100644
--- a/typescript/infra/scripts/xerc20/xerc20vs-add-bridge.ts
+++ b/typescript/infra/scripts/xerc20/xerc20vs-add-bridge.ts
@@ -17,14 +17,14 @@ import {
   getArgs,
   withChains,
   withDryRun,
-  withWarpRouteIdRequired,
+  withKnownWarpRouteIdRequired,
 } from '../agent-utils.js';
 import { getEnvironmentConfig } from '../core-utils.js';
 
 async function main() {
   configureRootLogger(LogFormat.Pretty, LogLevel.Info);
   const { environment, warpRouteId, chains, dryRun } = await withChains(
-    withWarpRouteIdRequired(withDryRun(getArgs())),
+    withKnownWarpRouteIdRequired(withDryRun(getArgs())),
   ).argv;
 
   const { warpDeployConfig, warpCoreConfig } =
diff --git a/typescript/infra/scripts/xerc20/xerc20vs-set-limits.ts b/typescript/infra/scripts/xerc20/xerc20vs-set-limits.ts
index c6f9a0e446c..37f4cae7f4d 100644
--- a/typescript/infra/scripts/xerc20/xerc20vs-set-limits.ts
+++ b/typescript/infra/scripts/xerc20/xerc20vs-set-limits.ts
@@ -17,14 +17,14 @@ import {
   getArgs,
   withChains,
   withDryRun,
-  withWarpRouteIdRequired,
+  withKnownWarpRouteIdRequired,
 } from '../agent-utils.js';
 import { getEnvironmentConfig } from '../core-utils.js';
 
 async function main() {
   configureRootLogger(LogFormat.Pretty, LogLevel.Info);
   const { environment, warpRouteId, chains, dryRun } = await withChains(
-    withWarpRouteIdRequired(withDryRun(getArgs())),
+    withKnownWarpRouteIdRequired(withDryRun(getArgs())),
   ).argv;
 
   const { warpDeployConfig, warpCoreConfig } =


Reviews:
user: login: paulbalaji
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-06T21:46:23Z
user: login: ltyu
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-06T22:06:09Z
user: login: nambrot
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-07T15:33:00Z
user: login: nambrot
body: Would like @paulbalaji 's review on this too
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-03-10T19:50:06Z
user: login: paulbalaji
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-10T19:54:28Z
user: login: paulbalaji
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-10T19:56:00Z
user: login: ltyu
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-10T20:28:21Z
user: login: ltyu
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-11T20:33:42Z
user: login: ltyu
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-11T21:18:17Z
user: login: paulbalaji
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-12T11:13:55Z
user: login: ltyu
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-12T14:14:20Z
user: login: paulbalaji
state: APPROVED
author_association: COLLABORATOR
submitted_at: 2025-03-12T14:34:37Z

Review comments:
diff_hunk: @@ -63,7 +67,9 @@ export function getCheckWarpDeployArgs() {
 }
 
 export function getCheckDeployArgs() {
-  return withWarpRouteId(withModule(getCheckBaseArgs()));
+  return withGithubCommit(
+    withWarpRouteIdNoChoices(withModule(getCheckBaseArgs())),
+  );
 }
path: typescript/infra/scripts/check/check-utils.ts
user: login: paulbalaji
body: this will break a lot of existing flows if we're now demanding that a github commit has to be required with every check-deploy call - imo it should still be optional 
created_at: 2025-03-06T21:46:03Z
author_association: COLLABORATOR
diff_hunk: @@ -63,7 +67,9 @@ export function getCheckWarpDeployArgs() {
 }
 
 export function getCheckDeployArgs() {
-  return withWarpRouteId(withModule(getCheckBaseArgs()));
+  return withGithubCommit(
+    withWarpRouteIdNoChoices(withModule(getCheckBaseArgs())),
+  );
 }
path: typescript/infra/scripts/check/check-utils.ts
user: login: ltyu
body: it is optional though
created_at: 2025-03-06T22:06:09Z
author_association: CONTRIBUTOR
diff_hunk: @@ -104,6 +108,36 @@ export function getWarpCoreConfig(warpRouteId: string): WarpCoreConfig {
   return warpRouteConfig;
 }
 
+export async function getWarpCoreConfigFromGithubFileSystem(
path: typescript/infra/config/registry.ts
user: login: nambrot
body: That's kinda an odd function name?
created_at: 2025-03-07T01:00:11Z
author_association: CONTRIBUTOR
diff_hunk: @@ -7,7 +7,10 @@ import {
   PartialRegistry,
   warpConfigToWarpAddresses,
 } from '@hyperlane-xyz/registry';
-import { FileSystemRegistry } from '@hyperlane-xyz/registry/fs';
+import {
+  FileSystemRegistry,
+  getRegistry as getMergedRegistry,
path: typescript/infra/config/registry.ts
user: login: nambrot
body: Why call this merged registry? Just call this registry, to the caller, it shouldn't matter if its a mergedRegistry no?
created_at: 2025-03-10T19:48:04Z
author_association: CONTRIBUTOR
diff_hunk: @@ -63,7 +67,9 @@ export function getCheckWarpDeployArgs() {
 }
 
 export function getCheckDeployArgs() {
-  return withWarpRouteId(withModule(getCheckBaseArgs()));
+  return withregistryUris(
path: typescript/infra/scripts/check/check-utils.ts
user: login: nambrot
body: Nit: 

```suggestion
  return withRegistryUris(
```
created_at: 2025-03-10T19:49:10Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,8 @@
+import { Argv } from 'yargs';
+
+export function withregistryUris<T>(args: Argv<T>) {
path: typescript/infra/scripts/github-utils.ts
user: login: nambrot
body: Nit:

```suggestion
export function withRegistryUris<T>(args: Argv<T>) {
```
created_at: 2025-03-10T19:49:38Z
author_association: CONTRIBUTOR
diff_hunk: @@ -63,7 +67,9 @@ export function getCheckWarpDeployArgs() {
 }
 
 export function getCheckDeployArgs() {
-  return withWarpRouteId(withModule(getCheckBaseArgs()));
+  return withGithubCommit(
+    withWarpRouteIdNoChoices(withModule(getCheckBaseArgs())),
+  );
 }
path: typescript/infra/scripts/check/check-utils.ts
user: login: paulbalaji
body: the change from withWarpRouteId -> withWarpRouteIdNoChoices has the implication that `warpRouteIds` are now demanded, as per this line:
https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/faabe65cf579101d6d68a5badd6ba049848768cf/typescript/infra/scripts/agent-utils.ts#L213

which makes sense in check-warp-deploy but not in check-deploy
created_at: 2025-03-10T19:54:28Z
author_association: COLLABORATOR
diff_hunk: @@ -63,7 +67,9 @@ export function getCheckWarpDeployArgs() {
 }
 
 export function getCheckDeployArgs() {
-  return withWarpRouteId(withModule(getCheckBaseArgs()));
+  return withGithubCommit(
+    withWarpRouteIdNoChoices(withModule(getCheckBaseArgs())),
+  );
 }
path: typescript/infra/scripts/check/check-utils.ts
user: login: paulbalaji
body: (this `getCheckDeployArgs` function is also used in the base check-deploy script)
created_at: 2025-03-10T19:56:00Z
author_association: COLLABORATOR
diff_hunk: @@ -7,7 +7,10 @@ import {
   PartialRegistry,
   warpConfigToWarpAddresses,
 } from '@hyperlane-xyz/registry';
-import { FileSystemRegistry } from '@hyperlane-xyz/registry/fs';
+import {
+  FileSystemRegistry,
+  getRegistry as getMergedRegistry,
path: typescript/infra/config/registry.ts
user: login: ltyu
body: there's an existing getRegistry
created_at: 2025-03-10T20:28:21Z
author_association: CONTRIBUTOR
diff_hunk: @@ -63,7 +67,9 @@ export function getCheckWarpDeployArgs() {
 }
 
 export function getCheckDeployArgs() {
-  return withWarpRouteId(withModule(getCheckBaseArgs()));
+  return withGithubCommit(
+    withWarpRouteIdNoChoices(withModule(getCheckBaseArgs())),
+  );
 }
path: typescript/infra/scripts/check/check-utils.ts
user: login: ltyu
body: Gotcha. removed!
created_at: 2025-03-11T20:33:41Z
author_association: CONTRIBUTOR
diff_hunk: @@ -104,6 +108,36 @@ export function getWarpCoreConfig(warpRouteId: string): WarpCoreConfig {
   return warpRouteConfig;
 }
 
+export async function getWarpCoreConfigFromGithubFileSystem(
path: typescript/infra/config/registry.ts
user: login: ltyu
body: updated
created_at: 2025-03-11T21:18:17Z
author_association: CONTRIBUTOR
diff_hunk: @@ -208,6 +208,10 @@ export function withWarpRouteId<T>(args: Argv<T>) {
     .choices('warpRouteId', Object.values(WarpRouteIds));
 }
 
+export function withWarpRouteIdNoChoices<T>(args: Argv<T>) {
+  return args.describe('warpRouteId', 'warp route id').string('warpRouteId');
+}
path: typescript/infra/scripts/agent-utils.ts
user: login: paulbalaji
body: i wonder if this is the chance to rename this to `withWarpRouteId` and rename the existing `withWarpRouteId` -> `withKnownWarpRouteId`

and then in your follow up PR the `withWarpRouteIdRequired` makes more sense
created_at: 2025-03-12T11:13:55Z
author_association: COLLABORATOR
diff_hunk: @@ -208,6 +208,10 @@ export function withWarpRouteId<T>(args: Argv<T>) {
     .choices('warpRouteId', Object.values(WarpRouteIds));
 }
 
+export function withWarpRouteIdNoChoices<T>(args: Argv<T>) {
+  return args.describe('warpRouteId', 'warp route id').string('warpRouteId');
+}
path: typescript/infra/scripts/agent-utils.ts
user: login: ltyu
body: Sure, i wanted to reduce the diffs but can do this as well
created_at: 2025-03-12T14:14:20Z
author_association: CONTRIBUTOR

PR comments:
user: login: changeset-bot[bot]
created_at: 2025-03-06T21:37:24Z
body: ###  ⚠️  No Changeset found

Latest commit: 9081cd59f9462e7a09685f1291c0836722584448

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. **If these changes should result in a version bump, you need to add a changeset.**

<details><summary>This PR includes no changesets</summary>

  When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

</details>

[Click here to learn what changesets are, and how to add one](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md).

[Click here if you're a maintainer who wants to add a changeset to this PR](https://github.com/hyperlane-xyz/hyperlane-monorepo/new/ltyu/check-deploy-with-commit?filename=.changeset/smart-beds-obey.md&value=---%0A%22%40hyperlane-xyz%2Finfra%22%3A%20patch%0A---%0A%0Afeat%3A%20check-deploy%20with%20--registry%0A)


author_association: NONE
user: login: codecov[bot]
created_at: 2025-03-06T22:20:44Z
body: ## [Codecov](https://app.codecov.io/gh/hyperlane-xyz/hyperlane-monorepo/pull/5621?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hyperlane-xyz) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 78.33%. Comparing base [(`439befe`)](https://app.codecov.io/gh/hyperlane-xyz/hyperlane-monorepo/commit/439befec9e08e8b5a95910112379d8d8971fb684?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hyperlane-xyz) to head [(`9081cd5`)](https://app.codecov.io/gh/hyperlane-xyz/hyperlane-monorepo/commit/9081cd59f9462e7a09685f1291c0836722584448?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hyperlane-xyz).
> Report is 1 commits behind head on main.

<details><summary>Additional details and impacted files</summary>


```diff
@@           Coverage Diff           @@
##             main    #5621   +/-   ##
=======================================
  Coverage   78.33%   78.33%           
=======================================
  Files         109      109           
  Lines        2165     2165           
  Branches      195      195           
=======================================
  Hits         1696     1696           
  Misses        448      448           
  Partials       21       21           
```

| [Components](https://app.codecov.io/gh/hyperlane-xyz/hyperlane-monorepo/pull/5621/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hyperlane-xyz) | Coverage Δ | |
|---|---|---|
| [core](https://app.codecov.io/gh/hyperlane-xyz/hyperlane-monorepo/pull/5621/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hyperlane-xyz) | `87.80% <ø> (ø)` | |
| [hooks](https://app.codecov.io/gh/hyperlane-xyz/hyperlane-monorepo/pull/5621/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hyperlane-xyz) | `82.78% <ø> (ø)` | |
| [isms](https://app.codecov.io/gh/hyperlane-xyz/hyperlane-monorepo/pull/5621/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hyperlane-xyz) | `84.71% <ø> (ø)` | |
| [token](https://app.codecov.io/gh/hyperlane-xyz/hyperlane-monorepo/pull/5621/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hyperlane-xyz) | `90.78% <ø> (ø)` | |
| [middlewares](https://app.codecov.io/gh/hyperlane-xyz/hyperlane-monorepo/pull/5621/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hyperlane-xyz) | `79.80% <ø> (ø)` | |

</details>
<details><summary>🚀 New features to boost your workflow: </summary>

- ❄ [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- 📦 [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
author_association: NONE