Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: migrate to Unified Bridge, introduce the ICTT bridge #82

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

meeh0w
Copy link
Member

@meeh0w meeh0w commented Oct 25, 2024

Description

  • 👋 Bye bye @avalabs/bridge-sdk (in the frontend -- some backend parts need to stay for a while)
  • 🤗 Embrace the @avalabs/bridge-unified (comes in with CTTP, ICTT (erc20-erc20) and Avalanche Bridge integrations)

Changes

  • Lots of code removed
    • Some parts that are still using the @avalabs/bridge-sdk are still left - during the migration phase, some people may have old BridgeTransactions either in progress or completed, but not acknowledged in the UI yet. We may need a schema migration, depending on how the UnifiedBridgeSDK handles BTC tracking.
  • Simplified data flows:
    • No more useAvalancheBridge() / useBtcBridge() / useEthBridge() / useUnifiedBridge() hooks. The old useBridge() which previously merged the capabilities of them all is now enough to handle everything.
    • No more BridgeFormETH / BridgeFormBTC / BridgeFormAVAX or BridgeFormUnified. The BridgeForm got promoted and is used directly by Bridge.tsx page.
    • Some unused components & utils got removed

The new user path

  1. User selects assets from those available for bridging on the current active network
  2. Target chains are loaded after asset is selected. The first available target chain is pre-selected.
    • User may change the target chain if there are more options than just one.
  3. User may change the source network at any point (either by changing it in the form, or via the networks widget)
    • If asset is present on the new network, the token & amount is kept in-tact.
    • If asset is not present on the new network, form is reset.

Testing

  • Entire Bridge suite must be tested.
  • Remember about testing the Core Web integration as well.
  • Test how it behaves when the related feature flags are toggled:
    • unified-bridge-cctp
    • unified-bridge-ictt
    • unified-bridge-ab-evm
    • unified-bridge-ab-ava-to-btc
    • unified-bridge-ab-btc-to-ava

Screenshots:

Feature Flags examples

When Bitcoin -> Avalanche bridge IS disabled
image

The moment when selected bridge route (Avalanche -> Bitcoin) gets disabled

Screen.Recording.2024-11-06.at.12.23.58.mov

Checklist for the author

  • I've covered new/modified business logic with Jest test cases.
  • I've tested the changes myself before sending it to code review and QA.

@meeh0w meeh0w changed the title feat: integrate ICTT bridge feat: migrate to Unified Bridge, introduce the ICTT bridge Nov 6, 2024
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.

2 participants