Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
sdk/solana: use pre-shim ntt-transceiver IDL when svmShims is not set
Support both the new shim-based transceiver (from commit a3a63d2)
and deployments using the older non-shim version.
  • Loading branch information
kev1n-peters committed Oct 27, 2025
commit 18c3864002212447e9b75f9a0249b4420fa585f6
28 changes: 17 additions & 11 deletions cli/src/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { chainToPlatform } from "@wormhole-foundation/sdk-base";

/**
* Handles RPC-related errors and provides helpful error messages with suggestions.
*
*
* @param error - The error that occurred
* @param chain - The chain being deployed to
* @param network - The network (Mainnet, Testnet, Devnet)
Expand All @@ -18,7 +18,7 @@ export function handleRpcError(
): never {
const errorMessage = error?.message || String(error);
const errorStack = error?.stack || "";

// Check if this is an RPC-related error by looking for common RPC error indicators
const isRpcError =
errorMessage.toLowerCase().includes("jsonrpc") ||
Expand All @@ -28,7 +28,9 @@ export function handleRpcError(
errorMessage.toLowerCase().includes("network error");

if (isRpcError) {
console.error(chalk.red(`RPC connection error for ${chain} on ${network}\n`));
console.error(
chalk.red(`RPC connection error for ${chain} on ${network}\n`)
);
console.error(chalk.yellow("RPC endpoint:"), chalk.white(rpc));
console.error(chalk.yellow("Error:"), errorMessage);
console.error();
Expand All @@ -42,31 +44,35 @@ export function handleRpcError(
"You can specify a private RPC endpoint by creating an overrides.json file.\n"
)
);
console.error(chalk.cyan("Create a file named ") + chalk.white("overrides.json") + chalk.cyan(" in your project root:"));
console.error(chalk.white(`
console.error(
chalk.cyan("Create a file named ") +
chalk.white("overrides.json") +
chalk.cyan(" in your project root:")
);
console.error(
chalk.white(`
{
"chains": {
"${chain}": {
"rpc": "https://your-private-rpc-endpoint"
}
}
}
`));

`)
);

// Show chainlist.org only for EVM chains
try {
const platform = chainToPlatform(chain as any);
if (platform === "Evm") {
console.error(
chalk.cyan(
`Find RPC endpoints for ${chain}: https://chainlist.org`
)
chalk.cyan(`Find RPC endpoints for ${chain}: https://chainlist.org`)
);
}
} catch (e) {
// If chainToPlatform fails, just skip the platform-specific message
}

console.error(
chalk.cyan(
`For more information about overrides.json:\n` +
Expand Down
7 changes: 7 additions & 0 deletions sdk/route/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ export namespace NttRoute {
transceiver: TransceiverConfig[];
quoter?: string;
isWrappedGasToken?: boolean;
svmShims?: {
postMessageShimOverride?: string;
verifyVaaShimOverride?: string;
};
};

export type Config = {
Expand Down Expand Up @@ -206,6 +210,7 @@ export namespace NttRoute {
)!.address,
},
quoter: srcFound.quoter,
svmShims: srcFound.svmShims,
},
dstContracts: {
token: dstFound.token,
Expand All @@ -215,6 +220,7 @@ export namespace NttRoute {
(v) => v.type === "wormhole"
)!.address,
},
svmShims: dstFound.svmShims,
},
};
}
Expand Down Expand Up @@ -252,6 +258,7 @@ export namespace NttRoute {
.address,
},
quoter: remote.quoter,
svmShims: remote.svmShims,
};
}
}
Expand Down
Loading
Loading