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

Updating the bridge map #3400

Merged
merged 3 commits into from
Nov 20, 2024
Merged

Updating the bridge map #3400

merged 3 commits into from
Nov 20, 2024

Conversation

Defi-Moses
Copy link
Collaborator

@Defi-Moses Defi-Moses commented Nov 18, 2024

Removing WLD bridging from the FE

Summary by CodeRabbit

  • New Features
    • Added support for new tokens 'BNB' and 'WBNB' across multiple chains.
  • Updates
    • Updated the token mapping for 'WETH' to reflect changes in its origin and destination properties.
    • Updated URLs for blockchain providers to ensure accurate network connections.
  • Bug Fixes
    • Removed outdated token entries for 'WLD' from multiple chains to streamline token management.
    • Adjusted expected token counts in API response tests to align with current mappings.

1eccd6c: synapse-interface preview link
567f181: synapse-interface preview link
ab37464: synapse-interface preview link

Copy link
Contributor

coderabbitai bot commented Nov 18, 2024

Walkthrough

The pull request introduces modifications to the BRIDGE_MAP constants across multiple files, specifically targeting token mappings for various chains. The changes include the removal of the token 'WLD' from chains '1' and '480', the addition of 'BNB' and 'WBNB' under chains '25' and '56', respectively, and updates to the 'WETH' token's properties. Additionally, the URLs for several blockchain providers in providers.json have been updated to new endpoints.

Changes

File Change Summary
packages/rest-api/src/constants/bridgeMap.ts Removed 'WLD' entries from chains '1' and '480'; added 'BNB' and 'WBNB' under chain '56'; updated 'WETH' entry in chain '480'.
packages/synapse-constants/src/constants/bridgeMap.ts Removed 'WLD' entries from chains '1' and '480'; added 'BNB' and 'WBNB' under chain '25'; updated 'WETH' entry in chain '480'.
packages/synapse-interface/constants/bridgeMap.ts Removed 'WLD' entries from chains '1' and '10'; added 'BNB' under chain '25' and 'WBNB' under chain '56'; updated 'WETH' entry in chain '480'.
packages/synapse-interface/scripts/data/providers.json Updated URLs for keys "288", "42161", and "1666600000" to new blockchain provider endpoints.
packages/rest-api/src/constants/bridgeable.ts Removed WLD constant from bridgeable.ts.
packages/synapse-constants/src/constants/tokens/bridgeable.ts Removed WLD token declaration from bridgeable.ts.
packages/synapse-interface/constants/tokens/bridgeable.ts Removed WLD token declaration from bridgeable.ts.
packages/widget/src/constants/bridgeMap.ts Removed 'WLD' entries from sections '1' and '480'; added 'WETH' under section '480'; added 'BNB' and 'WBNB' under section '25'.
packages/widget/src/constants/bridgeable.ts Removed WLD constant from bridgeable.ts.
packages/widget/src/index.tsx Removed WLD from exports in index.tsx.
services/explorer/static/tokenIDToCoinGeckoID.yaml Reordered key-value pairs without changing values.
services/explorer/static/tokenSymbolToCoinGeckoID.yaml Reformatted entries for consistent spacing; added new tokens.
services/explorer/static/tokenSymbolToTokenID.yaml Reorganized entries; added new tokens.

Possibly related PRs

  • feat(widget): Adds scroll #2805: The changes in the BRIDGE_MAP constant in packages/widget/src/constants/bridgeMap.ts involve adding new entries for tokens, including 'BNB' and 'WBNB', which are relevant to the restructuring of token mappings in the main PR.
  • fear(widget): Adds Linea #2983: This PR also modifies the BRIDGE_MAP constant, adding new token entries and updating existing ones, which aligns with the changes in the main PR.
  • feature(synapse-interface): Chain and bridgeMap updates #3318: The addition of the 'WLD' token in the BRIDGE_MAP constant in packages/synapse-interface/constants/bridgeMap.ts aligns with the updates made in the main PR regarding token mappings.
  • feat(rest-api): Chain and token updates #3319: The updates to the BRIDGE_MAP constant in packages/rest-api/src/constants/bridgeMap.ts include new entries for 'WLD', which directly relate to the changes made in the main PR.
  • feat(synapse-constants): chain and token updates #3320: The modifications to the BRIDGE_MAP constant in packages/synapse-constants/src/constants/bridgeMap.ts include new entries for 'WLD', which are consistent with the changes in the main PR.
  • feat(widget): Chain & token update #3331: The addition of the 'WLD' token in the bridgeable.ts file in packages/widget/src/constants/bridgeable.ts corresponds with the updates made in the main PR regarding token definitions.

Suggested labels

size/s, M-docs

Suggested reviewers

  • trajan0x
  • bigboydiamonds
  • abtestingalpha

🐇 In the meadow where tokens play,
WLD has hopped away today.
New BNB and WBNB join the fun,
With WETH updated, the changes are done!
Hooray for bridges, let’s dance and cheer,
For a brighter blockchain future, oh so near! 🌼


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 4edf087 and 7d00601.

📒 Files selected for processing (2)
  • packages/rest-api/src/tests/indexRoute.test.ts (1 hunks)
  • packages/rest-api/src/tests/tokenListRoute.test.ts (1 hunks)
🧰 Additional context used
📓 Learnings (1)
packages/rest-api/src/tests/indexRoute.test.ts (1)
Learnt from: abtestingalpha
PR: synapsecns/sanguine#3126
File: packages/rest-api/src/tests/indexRoute.test.ts:21-31
Timestamp: 2024-11-12T03:37:02.230Z
Learning: In this project, tests intentionally use hardcoded values for counts to capture changes in the number of available chains and tokens.
🔇 Additional comments (3)
packages/rest-api/src/tests/tokenListRoute.test.ts (2)

17-17: LGTM! Token count update aligns with WLD removal

The reduction in expected token count from 64 to 63 correctly reflects the removal of the WLD token from the bridge map.


17-17: Verify token count consistency across the codebase

Let's ensure this token count is consistent with other related test files and configurations.

packages/rest-api/src/tests/indexRoute.test.ts (1)

30-30: LGTM! The updated token count reflects WLD removal.

The reduction in expected token count from 64 to 63 correctly aligns with the removal of WLD bridging.

Let's verify that the token count matches the actual bridge map configuration:


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

cloudflare-workers-and-pages bot commented Nov 18, 2024

Deploying sanguine-fe with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7d00601
Status: ✅  Deploy successful!
Preview URL: https://1eea31fb.sanguine-fe.pages.dev
Branch Preview URL: https://fe-bridge-map-update.sanguine-fe.pages.dev

View logs

Copy link

codecov bot commented Nov 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 9.52333%. Comparing base (798286f) to head (7d00601).
Report is 17 commits behind head on master.

Additional details and impacted files
@@                 Coverage Diff                 @@
##              master      #3400          +/-   ##
===================================================
- Coverage   90.44834%   9.52333%   -80.92501%     
===================================================
  Files             54        188         +134     
  Lines           1026      19657       +18631     
  Branches          82         82                  
===================================================
+ Hits             928       1872         +944     
- Misses            95      17585       +17490     
- Partials           3        200         +197     
Flag Coverage Δ
explorer 4.93656% <ø> (?)
packages 90.44834% <ø> (ø)
promexporter 6.81642% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

Copy link

cloudflare-workers-and-pages bot commented Nov 18, 2024

Deploying sanguine with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7d00601
Status: ✅  Deploy successful!
Preview URL: https://d3fda55d.sanguine.pages.dev
Branch Preview URL: https://fe-bridge-map-update.sanguine.pages.dev

View logs

Copy link

codecov bot commented Nov 18, 2024

Bundle Report

Changes will decrease total bundle size by 3.52MB (-9.87%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sdk-router-@synapsecns/sdk-router-esm 255.26kB 609 bytes (0.24%) ⬆️
sdk-router-@synapsecns/sdk-router-cjs 117.55kB 312 bytes (0.27%) ⬆️
explorer-ui-server-cjs* 724.74kB 141.33kB (-16.32%) ⬇️
explorer-ui-client-array-push* 2.17MB 146.44kB (-6.33%) ⬇️
synapse-interface-client-array-push 7.41MB 132.47kB (1.82%) ⬆️
synapse-interface-server-cjs 1.65MB 160.4kB (10.73%) ⬆️
widget-cjs-esm* 271.27kB 2.03kB (-0.74%) ⬇️
docs-bridge-client-array-push* 7.34MB 564.22kB (-7.14%) ⬇️
docs-bridge-server-cjs* 11.57MB 3.31MB (-22.22%) ⬇️
synapse-constants-esm-cjs* 174.63kB 174.63kB (100%) ⬆️
synapse-constants-cjs-esm* 174.18kB 174.18kB (100%) ⬆️

ℹ️ *Bundle size includes cached data from a previous commit

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

Successfully merging this pull request may close these issues.

2 participants