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