diff --git a/.changeset/three-walls-count.md b/.changeset/three-walls-count.md new file mode 100644 index 0000000000..37145b9838 --- /dev/null +++ b/.changeset/three-walls-count.md @@ -0,0 +1,5 @@ +--- +'@hyperlane-xyz/cli': minor +--- + +Add explorer link to warp send and send message commands diff --git a/typescript/cli/src/consts.ts b/typescript/cli/src/consts.ts index 9fb27df9f2..9c931cab26 100644 --- a/typescript/cli/src/consts.ts +++ b/typescript/cli/src/consts.ts @@ -3,3 +3,4 @@ export const MINIMUM_WARP_DEPLOY_GAS = (3e7).toString(); export const MINIMUM_TEST_SEND_GAS = (3e5).toString(); export const MINIMUM_AVS_GAS = (3e6).toString(); export const PROXY_DEPLOYED_URL = 'https://proxy.hyperlane.xyz'; +export const EXPLORER_URL = 'https://explorer.hyperlane.xyz'; diff --git a/typescript/cli/src/send/message.ts b/typescript/cli/src/send/message.ts index e43d08fe2c..b6d75b4e51 100644 --- a/typescript/cli/src/send/message.ts +++ b/typescript/cli/src/send/message.ts @@ -3,7 +3,7 @@ import { stringify as yamlStringify } from 'yaml'; import { ChainName, HyperlaneCore, HyperlaneRelayer } from '@hyperlane-xyz/sdk'; import { addressToBytes32, timeout } from '@hyperlane-xyz/utils'; -import { MINIMUM_TEST_SEND_GAS } from '../consts.js'; +import { EXPLORER_URL, MINIMUM_TEST_SEND_GAS } from '../consts.js'; import { CommandContext, WriteCommandContext } from '../context/types.js'; import { runPreflightChecksForChains } from '../deploy/utils.js'; import { errorRed, log, logBlue, logGreen } from '../logger.js'; @@ -102,6 +102,7 @@ async function executeDelivery({ ); logBlue(`Sent message from ${origin} to ${recipient} on ${destination}.`); logBlue(`Message ID: ${message.id}`); + logBlue(`Explorer Link: ${EXPLORER_URL}/message/${message.id}`); log(`Message:\n${indentYamlOrJson(yamlStringify(message, null, 2), 4)}`); if (selfRelay) { diff --git a/typescript/cli/src/send/transfer.ts b/typescript/cli/src/send/transfer.ts index 8aa4cca59b..1fabc3c853 100644 --- a/typescript/cli/src/send/transfer.ts +++ b/typescript/cli/src/send/transfer.ts @@ -14,7 +14,7 @@ import { } from '@hyperlane-xyz/sdk'; import { parseWarpRouteMessage, timeout } from '@hyperlane-xyz/utils'; -import { MINIMUM_TEST_SEND_GAS } from '../consts.js'; +import { EXPLORER_URL, MINIMUM_TEST_SEND_GAS } from '../consts.js'; import { WriteCommandContext } from '../context/types.js'; import { runPreflightChecksForChains } from '../deploy/utils.js'; import { log, logBlue, logGreen, logRed } from '../logger.js'; @@ -167,6 +167,7 @@ async function executeDelivery({ `Sent transfer from sender (${signerAddress}) on ${origin} to recipient (${recipient}) on ${destination}.`, ); logBlue(`Message ID: ${message.id}`); + logBlue(`Explorer Link: ${EXPLORER_URL}/message/${message.id}`); log(`Message:\n${indentYamlOrJson(yamlStringify(message, null, 2), 4)}`); log(`Body:\n${indentYamlOrJson(yamlStringify(parsed, null, 2), 4)}`);