浏览代码

clients/js: adds `WormholeRelayer` addresses to `info contract`

Sebastián Claudio Nale 1 年之前
父节点
当前提交
6294969ecf
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      clients/js/src/cmds/info/contract.ts

+ 5 - 1
clients/js/src/cmds/info/contract.ts

@@ -3,6 +3,7 @@ import {
   ChainName,
   assertChain,
 } from "@certusone/wormhole-sdk/lib/esm/utils/consts";
+import { relayer } from "@certusone/wormhole-sdk";
 import yargs from "yargs";
 import { CONTRACTS } from "../../consts";
 import { assertNetwork } from "../../utils";
@@ -24,7 +25,7 @@ export const builder = (y: typeof yargs) =>
     } as const)
     .positional("module", {
       describe: "Module to query",
-      choices: ["Core", "NFTBridge", "TokenBridge"],
+      choices: ["Core", "NFTBridge", "TokenBridge", "WormholeRelayer"],
       demandOption: true,
     } as const);
 export const handler = async (
@@ -52,6 +53,9 @@ export const handler = async (
     case "TokenBridge":
       addr = CONTRACTS[network][chain].token_bridge;
       break;
+    case "WormholeRelayer":
+      addr = relayer.RELAYER_CONTRACTS[network][chain]?.wormholeRelayerAddress;
+      break;
     default:
       impossible(module);
   }