Skip to content

feat(relayer): port PROMPT to wayfinder adapter, remove legacy pipeline #372

Description

@sadiq1971

Goal

Port PROMPT bridging from the legacy relayer pipeline (processor + source/destination + reconcile loop) to a wayfinder adapter under the TokenBridge interface introduced in #356, then delete the legacy pipeline. Deferred from #356 to keep the USDCx track unblocked (see epic #361).

Work items

  • pkg/relayer/bridges/wayfinder/bridge.go (Key, Sources, Step), source_eth.go + source_canton.go (moved from engine/source.go), convert.go (per-token decimals replacing const decimalPlaces = 18)
  • Step, deposit: idempotency check -> CreatePendingDeposit -> ProcessDepositAndMint -> completed (single step, as today)
  • Step, withdrawal: "" -> eth_submitted -> completed; folding CompleteWithdrawal into a stage fixes the existing gap where the retry path skips the post-submit hook
  • Resolve token from the deposit event's token field via config (finally using CantonBridge.sol's existing ethereumToCantonToken mappings)
  • Delete engine/processor.go, engine/destination.go, engine/source.go and the reconcile loop; PROMPT config moves fully into the per-token Tokens map
  • Migrate/regenerate mocks; existing PROMPT unit + e2e tests pass unchanged

Acceptance

  • PROMPT deposits and withdrawals behave identically on devstack (existing e2e green)
  • pkg/relayer/engine has no imports of pkg/cantonsdk/bridge or pkg/ethereum contract bindings — all mechanism-specific code lives under bridges/
  • Adding a second wayfinder-style token is config-only
  • In-flight transfers created by the legacy pipeline complete correctly after the cutover (rows already keyed bridge_key=wayfinder by feat(relayer): TokenBridge adapter foundation (interface, registry, driver) #356's migration)

Depends on

Metadata

Metadata

Assignees

No one assigned

    Labels

    CIP-0086: Phase 2Phase 2 multi-token generalizationDeliverable: D3D3: Middleware ServiceStatus: On IceAdded to issues and PRs that are considered important but no longer pursued for the near future.Type: FeatureAdded to issues and PRs to identify that the change is a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions