Skip to content

feat: replace informational bridge page with interactive CCTP cross-chain USDC bridge - #258

Merged
Sendi0011 merged 1 commit into
JointSave-org:mainfrom
devJaja:feat/cctp-cross-chain-deposit-bridge
Aug 28, 2026
Merged

feat: replace informational bridge page with interactive CCTP cross-chain USDC bridge#258
Sendi0011 merged 1 commit into
JointSave-org:mainfrom
devJaja:feat/cctp-cross-chain-deposit-bridge

Conversation

@devJaja

@devJaja devJaja commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #253 — replaces the static informational /bridge page with an interactive cross-chain USDC bridge powered by Circle CCTP, letting users bring USDC from a CCTP-supported chain onto Stellar and continue into a pool deposit.

What changed

  • frontend/lib/cctp-bridge.ts — pure, unit-tested logic (no network/React): chain metadata (CCTP_CHAINS, CCTP_DESTINATION), USDC amount/rounding/balance math, and the attestation state machine (resolveAttestationPhase, advanceBridgeStatus for pending → attested → received → deposited → failed). Exposes the typed CctpDriver seam (issue acceptance criteria) and attestation/explorer URL builders.
  • frontend/lib/cctp-driver.ts — thin network seam: real Circle Attestation Service polling plus a deterministic depositForBurn stand-in (no EVM wallet kit is connected in this Stellar-only app yet, so the seam returns a stable message hash and is ready to be swapped for a real implementation).
  • frontend/lib/cctp-bridge.test.ts — 18 unit tests (state machine, amount/rounding/balance, chain metadata, URLs), registered in test:unit.
  • frontend/app/[locale]/bridge/page.tsx — interactive bridge UI: source-chain selector, USDC amount input with live validation/conversion, progress trail, attestation polling with resume-on-reload, refund/explorer links on failure, and a hand-off to the deposit flow.
  • frontend/app/api/bridge/transactions/route.ts + supabase/migrations/20260827010000_cctp_bridge.sql + lib/supabase.ts — typed bridge_transactions table (RLS public-select) + API to upsert/query bridge status so progress survives page refreshes.
  • i18nbridge namespace rewritten in en + es.

Testing / CI

  • 261/261 unit tests, 121/121 component tests (5 new for the bridge page) pass.
  • ESLint clean, Prettier clean, next build + performance-budget check pass.
  • Both fork CI workflows green: Frontend Unit Tests and Build & Test Soroban Contracts.

@Sendi0011
Sendi0011 self-requested a review August 28, 2026 06:48

@Sendi0011 Sendi0011 left a comment

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.

Nice implementation

@Sendi0011
Sendi0011 merged commit 06de8c0 into JointSave-org:main Aug 28, 2026
5 checks passed
olathedev added a commit to olathedev/Joint_Save that referenced this pull request Aug 28, 2026
Resolves the conflict with the CCTP bridge feature (JointSave-org#253, PR JointSave-org#258).

Only frontend/package.json conflicted: both branches appended a suite to
test:unit. Kept both — lib/archival.test.ts and lib/cctp-bridge.test.ts —
rather than taking a side, so neither feature's tests stop running.

lib/supabase.ts, messages/en.json, and messages/es.json auto-merged cleanly;
each side added its own keys in a different part of the file. Verified both
features survived: archive_log/ArchiveReason and bridge_transactions are both
in the Database type, and both message files carry the archival keys and all
36 bridge keys.

Post-merge: 291 unit tests pass (273 + the bridge's 18), 128 component tests
pass, lint clean, build compiles and registers the routes from both features.
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.

[Feature] Integrate Circle CCTP cross-chain USDC bridging into the app (replace informational bridge page)

2 participants