Skip to content

fix(sdk): deprecate NttAutomaticRoute in favor of NttExecutorRoute#854

Open
evgeniko wants to merge 2 commits into
mainfrom
deprecate-ntt-automatic-route
Open

fix(sdk): deprecate NttAutomaticRoute in favor of NttExecutorRoute#854
evgeniko wants to merge 2 commits into
mainfrom
deprecate-ntt-automatic-route

Conversation

@evgeniko

@evgeniko evgeniko commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Mark nttAutomaticRoute / NttAutomaticRoute as @deprecated with pointer to nttExecutorRoute / NttExecutorRoute
  • Add runtime console.warn in EvmNtt.quoteDeliveryPrice when automatic: true is passed
  • Update sdk/examples/src/route.ts to use nttExecutorRoute

Context

The EVM on-chain special/standard relayer pricing was removed from WormholeTransceiver in 36570ce ("SR removal and CCL"), but older deployed transceivers (v1.0.0/v1.1.0) still have isSpecialRelayingEnabled active with stale pricing. This causes quoteDeliveryPrice with automatic: true to return inflated fees (e.g. 0.6 ETH for an ETH→Solana transfer) via the unmaintained special relayer contract.

The executor route (NttExecutorRoute) replaced this path and quotes via an off-chain service, returning correct fees. The Solana automatic relay path (via the on-chain NttQuoter program) is unaffected and still valid.

Summary by CodeRabbit

  • Deprecations
    • Automatic NTT routing for EVM chains is deprecated; on-chain relayer pricing is no longer maintained and may yield stale or inflated delivery quotes. Migrate to executor-based routing with quote support.
  • Documentation
    • Deprecated APIs now include deprecation notes and runtime warnings directing users to the executor-based approach.
  • Examples
    • Sample configurations updated to demonstrate the executor-based routing pattern.

The EVM on-chain special/standard relayer pricing is no longer maintained
since the relay logic was removed from WormholeTransceiver (36570ce). Older
deployed transceivers still have stale pricing enabled, causing
quoteDeliveryPrice with automatic: true to return inflated fees (e.g. 0.6 ETH
for ETH→Solana). The executor route uses an off-chain quoting service and is
the correct path for automatic EVM transfers.

- Mark nttAutomaticRoute/NttAutomaticRoute as @deprecated
- Add console.warn in EvmNtt.quoteDeliveryPrice when automatic: true
- Update example to use nttExecutorRoute
@coderabbitai

coderabbitai Bot commented Mar 30, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1fdd96e6-f609-498a-bacb-b8824fefd996

📥 Commits

Reviewing files that changed from the base of the PR and between b91f62c and 2957294.

📒 Files selected for processing (2)
  • evm/ts/src/ntt.ts
  • sdk/route/src/automatic.ts
✅ Files skipped from review due to trivial changes (1)
  • sdk/route/src/automatic.ts

📝 Walkthrough

Walkthrough

Added a conditional runtime warning for automatic NTT quotes advising use of the executor route, updated example usage to use nttExecutorRoute, and marked the automatic route API as deprecated in JSDoc comments.

Changes

Cohort / File(s) Summary
Runtime warning
evm/ts/src/ntt.ts
Emit console.warn when options.automatic === true advising that on-chain relayer pricing is no longer maintained and directing callers to nttExecutorRoute and route.quote(); no other logic changes.
Examples
sdk/examples/src/route.ts
Replaced nttAutomaticRoute usage with nttExecutorRoute in resolver/example setup to reflect recommended pattern.
Deprecation docs
sdk/route/src/automatic.ts
Added @deprecated JSDoc annotations to nttAutomaticRoute and NttAutomaticRoute, pointing users to nttExecutorRoute / NttExecutorRoute; no API signature or runtime changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • DBosley
  • dvgui

Poem

🐰 I sniffed the code, a soft alarm,
Old automatic routes lose charm,
Executor paths now lead the way,
I hop to quote another day,
☕️🥕 Happy routes, hop hooray!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: deprecating NttAutomaticRoute in favor of NttExecutorRoute, which aligns with the primary objectives of marking these APIs as deprecated and adding associated warnings.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch deprecate-ntt-automatic-route

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@tonyjin tonyjin self-requested a review March 30, 2026 17:31
tonyjin
tonyjin previously approved these changes Mar 30, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
evm/ts/src/ntt.ts (1)

527-534: Consider warning once to avoid noisy logs in quote loops.

This warning is helpful, but repeated quote calls (e.g., UI refresh/polling) may flood console output. A one-time guard keeps the signal while reducing noise.

💡 Suggested diff
 export class EvmNtt<N extends Network, C extends EvmChains>
   implements Ntt<N, C>
 {
+  private _hasWarnedAutomaticQuote = false;
   tokenAddress: string;
   readonly chainId: bigint;
@@
   async quoteDeliveryPrice(
     dstChain: Chain,
     options: Ntt.TransferOptions
   ): Promise<bigint> {
-    if (options.automatic) {
+    if (options.automatic && !this._hasWarnedAutomaticQuote) {
+      this._hasWarnedAutomaticQuote = true;
       console.warn(
         "EvmNtt.quoteDeliveryPrice with automatic: true queries on-chain " +
           "special/standard relayer pricing which is no longer maintained " +
           "and may return inflated fees. " +
           "For automatic EVM transfers, use nttExecutorRoute and obtain quotes via route.quote() instead."
       );
     }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@evm/ts/src/ntt.ts` around lines 527 - 534, The console.warn in
EvmNtt.quoteDeliveryPrice is noisy during repeated quote calls; add a one-time
guard (e.g., a module-scoped or static boolean like warnedAutomaticQuote) and
only emit the warning the first time options.automatic is true, setting the flag
after the first warn; update the check in quoteDeliveryPrice to reference that
flag so subsequent calls are silent.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@evm/ts/src/ntt.ts`:
- Around line 527-534: The console.warn in EvmNtt.quoteDeliveryPrice is noisy
during repeated quote calls; add a one-time guard (e.g., a module-scoped or
static boolean like warnedAutomaticQuote) and only emit the warning the first
time options.automatic is true, setting the flag after the first warn; update
the check in quoteDeliveryPrice to reference that flag so subsequent calls are
silent.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c03be426-41cc-4b85-8119-c3fd328d43e5

📥 Commits

Reviewing files that changed from the base of the PR and between 25a5c3f and b91f62c.

📒 Files selected for processing (3)
  • evm/ts/src/ntt.ts
  • sdk/examples/src/route.ts
  • sdk/route/src/automatic.ts

Comment thread evm/ts/src/ntt.ts
console.warn(
"EvmNtt.quoteDeliveryPrice with automatic: true queries on-chain " +
"special/standard relayer pricing which is no longer maintained " +
"and may return inflated fees. " +

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest adding "Any messages sent via the Standard Relayer will not be automatically delivered to the destination chain."

Comment thread sdk/route/src/automatic.ts Outdated
* @deprecated Use {@link nttExecutorRoute} instead.
* When the source chain is EVM, this route relies on on-chain special/standard relayer pricing
* which is no longer maintained. Older EVM transceiver deployments may return stale or inflated
* delivery quotes.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of "Older EVM transceiver deployments may return stale or inflated delivery quotes", let's say: "Messages sent via the Standard Relayer will not be automatically delivered to the destination chain past April 1st, 2026."

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call on adding the delivery deadline, I'll add it, but I would still keep the stale quotes note too since that's the main issue integrators have been hitting. An explanation for why the quote is very high is important here imo.

Comment thread sdk/route/src/automatic.ts Outdated
* @deprecated Use {@link NttExecutorRoute} instead.
* When the source chain is EVM, this route relies on on-chain special/standard relayer pricing
* which is no longer maintained. Older EVM transceiver deployments may return stale or inflated
* delivery quotes.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as the above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants