Skip to content

fix: Optimize resume txn logic using Wormholescan#3656

Draft
tonyjin wants to merge 1 commit into
developmentfrom
refactor-resume-txn
Draft

fix: Optimize resume txn logic using Wormholescan#3656
tonyjin wants to merge 1 commit into
developmentfrom
refactor-resume-txn

Conversation

@tonyjin

@tonyjin tonyjin commented Jul 21, 2025

Copy link
Copy Markdown
Contributor

Fixes PROD-283

  1. Modified src/routes/operator.ts to integrate with Wormholescan API:

    • Added getRoutesFromWormholescan() method that queries Wormholescan API to identify the transfer type
    • Created mappings from Wormholescan appIds to Connect route names:
      • CCTP_WORMHOLE_INTEGRATION → CCTP routes (ManualCCTP, AutomaticCCTPRoute, CCTPRoute, etc.)
      • PORTAL_TOKEN_BRIDGE → TokenBridge routes
      • NATIVE_TOKEN_TRANSFER → NTT routes
      • GENERIC_RELAYER → Automatic routes
    • Added trySpecificRoutes() to attempt only the identified routes
    • Kept tryAllRoutes() as a fallback for the original brute force approach
  2. Flow:
    - First attempts to identify the route type via Wormholescan API
    - If successful, only tries the relevant routes (avoiding Circle API calls for non-CCTP transfers)
    - Falls back to the original brute force approach if:

    • Wormholescan API is unavailable
    • Transaction not found in Wormholescan
    • Identified routes don't succeed
  3. Benefits:
    - Prevents unnecessary Circle attestation API calls for non-Circle transfers
    - More efficient route identification
    - Maintains backward compatibility with graceful fallback
    - No breaking changes to existing functionality

@netlify

netlify Bot commented Jul 21, 2025

Copy link
Copy Markdown

Deploy Preview for wormhole-connect-mainnet failed.

Name Link
🔨 Latest commit 21d8fc3
🔍 Latest deploy log https://app.netlify.com/projects/wormhole-connect-mainnet/deploys/687eba34b7ad250008e6af77

@netlify

netlify Bot commented Jul 21, 2025

Copy link
Copy Markdown

Deploy Preview for wormhole-connect failed.

Name Link
🔨 Latest commit 21d8fc3
🔍 Latest deploy log https://app.netlify.com/projects/wormhole-connect/deploys/687eba342a5f060008838c5c

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.

1 participant