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(synapse-interface): adds BSC, Blast, Linea to RFQ #2905

Merged
merged 12 commits into from
Jul 29, 2024

Conversation

bigboydiamonds
Copy link
Collaborator

@bigboydiamonds bigboydiamonds commented Jul 22, 2024

Summary by CodeRabbit

  • New Features
    • Updated the Announcement Banner to promote RFQ transactions on Linea with new display dates.
    • Expanded the allowed chain IDs for RFQ transactions, enhancing compatibility with additional blockchain networks.
    • Added support for the LINEA blockchain, improving interaction capabilities with this network.
    • Enhanced token definitions to support USDC, USDT, and ETH on the LINEA chain.
    • Introduced a new RPC endpoint for the Linea network, facilitating smoother connections.

0425b78: synapse-interface preview link
f51f5e2: synapse-interface preview link
b5ce561: synapse-interface preview link
9c650fe: synapse-interface preview link
6a745c1: synapse-interface preview link
7d047b2: synapse-interface preview link
14170d3: synapse-interface preview link
bedf841: synapse-interface preview link

Copy link
Contributor

coderabbitai bot commented Jul 22, 2024

Walkthrough

The recent updates enhance the Synapse interface by promoting RFQ transactions specifically on the Linea blockchain. The AnnouncementBanner has been refreshed with new content and date ranges, while the supported chain IDs and token definitions have been expanded. These changes represent a strategic move to improve interoperability and engagement across various blockchain networks.

Changes

File Path Change Summary
packages/synapse-interface/components/layouts/... Updated AnnouncementBanner content and date range for RFQ transactions from July 10, 2024, to August 15, 2024.
packages/synapse-interface/scripts/generateMaps.js Expanded allowedChainIdsForRfq to include new chain IDs: 56, 59144, 81457, enhancing system interoperability.
packages/synapse-interface/constants/bridgeMap.ts Modified BRIDGE_MAP to include new entries for USDC and ETH tokens, and updated existing entries to integrate RFQ tokens.
packages/synapse-interface/constants/chains/... Added LINEA with ID 59144 to chain definitions, enhancing blockchain support.
packages/synapse-interface/constants/tokens/... Added new entries for USDC, USDT, and ETH to include compatibility with the LINEA chain.
packages/synapse-interface/scripts/data/providers.json Added new RPC endpoint for the LINEA network.

Poem

In a world where chains unite,
RFQs bring transactions bright.
With banners bold and dates anew,
We hop along, just me and you!
For every bridge and path we take,
A brighter day, for all our sake! 🐇✨


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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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.

@github-actions github-actions bot added javascript Pull requests that update Javascript code M-synapse-interface size/xs labels Jul 22, 2024
Copy link

cloudflare-workers-and-pages bot commented Jul 22, 2024

Deploying sanguine with  Cloudflare Pages  Cloudflare Pages

Latest commit: 72b33a2
Status: ✅  Deploy successful!
Preview URL: https://e7db96a3.sanguine.pages.dev
Branch Preview URL: https://fe-adds-bsc-linea-blast-rfq.sanguine.pages.dev

View logs

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This pull request adds support for RFQ transactions on BSC, Blast, and Linea networks.

  • Updated Banner Message: Modified packages/synapse-interface/components/layouts/LandingPageWrapper/index.tsx to display a new banner message about RFQ transactions on BSC, Blast, and Linea.
  • Allowed Chain IDs: Updated packages/synapse-interface/scripts/generateMaps.js to include chain IDs 56, 59144, and 81457 for RFQ operations.

These changes ensure users are informed about new RFQ capabilities and expand the supported blockchain networks for RFQ operations.

2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Copy link

cloudflare-workers-and-pages bot commented Jul 22, 2024

Deploying sanguine-fe with  Cloudflare Pages  Cloudflare Pages

Latest commit: 72b33a2
Status: ✅  Deploy successful!
Preview URL: https://c07cc322.sanguine-fe.pages.dev
Branch Preview URL: https://fe-adds-bsc-linea-blast-rfq.sanguine-fe.pages.dev

View logs

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between d4a71b8 and 47aeabc.

Files selected for processing (2)
  • packages/synapse-interface/components/layouts/LandingPageWrapper/index.tsx (1 hunks)
  • packages/synapse-interface/scripts/generateMaps.js (1 hunks)
Additional comments not posted (3)
packages/synapse-interface/components/layouts/LandingPageWrapper/index.tsx (2)

54-57: Ensure the banner ID is unique.

Verify that the bannerId is unique across the codebase to avoid conflicts.

Verification successful

The banner ID is unique.

The bannerId "2024-07-22-rfq" appears only once in the codebase, ensuring its uniqueness.

  • Location: packages/synapse-interface/components/layouts/LandingPageWrapper/index.tsx
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the uniqueness of the banner ID.

# Test: Search for the banner ID in the codebase. Expect: Only one occurrence.
rg --type js $'2024-07-22-rfq'

Length of output: 29


Script:

#!/bin/bash
# Description: Verify the uniqueness of the banner ID across all file types.

# Test: Search for the banner ID in the codebase. Expect: Only one occurrence.
rg '2024-07-22-rfq'

Length of output: 130


54-57: Verify the correctness of the new dates and content.

Ensure that the new startDate and endDate are correct and fall within the expected range. Also, verify that the bannerContent accurately reflects the intended message.

Verification successful

Verify the correctness of the new dates and content.

The startDate and endDate provided in the LandingPageWrapper component are:

  • startDate: 2024-07-10T18:45:09+00:00
  • endDate: 2024-08-15T18:45:09+00:00

These dates appear to be within a reasonable range for an announcement banner. The bannerContent "RFQ transactions now available on BSC, Blast, and Linea" accurately reflects the intended message.

Ensure the banner ID is unique.

The bannerId "2024-07-22-rfq" appears to be unique based on the context provided.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the new dates and content for the AnnouncementBanner.

# Test: Check if the dates are within the expected range and the content is accurate.
rg --type js -A 5 $'AnnouncementBanner'

Length of output: 38


Script:

#!/bin/bash
# Description: Locate the `AnnouncementBanner` component definition and its usage in the codebase.

# Search for the `AnnouncementBanner` component definition
rg --type tsx --type ts --type js --type jsx 'AnnouncementBanner' -A 10

Length of output: 99


Script:

#!/bin/bash
# Description: Locate the `AnnouncementBanner` component definition and its usage in the codebase.

# Search for the `AnnouncementBanner` component definition
rg --type ts --type js --type jsx 'AnnouncementBanner' -A 10

Length of output: 88


Script:

#!/bin/bash
# Description: Locate the `AnnouncementBanner` component definition and its usage in the codebase.

# Search for the `AnnouncementBanner` component definition
rg --type ts --type js 'AnnouncementBanner' -A 10

Length of output: 8277


Script:

#!/bin/bash
# Description: Verify the implementation of the `AnnouncementBanner` component and check the relevant lines for date and content validation.

# Search for the `AnnouncementBanner` component implementation
rg --type ts 'export const AnnouncementBanner' -A 10

Length of output: 1162

packages/synapse-interface/scripts/generateMaps.js (1)

43-43: Verify the correctness and validity of the new chain IDs.

Ensure that the new chain IDs (56, 59144, 81457) are correct and valid within the context of the application.

Copy link

codecov bot commented Jul 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.48563%. Comparing base (bda3181) to head (72b33a2).
Report is 10 commits behind head on master.

Additional details and impacted files
@@                 Coverage Diff                  @@
##              master       #2905          +/-   ##
====================================================
+ Coverage   25.71336%   90.48563%   +64.77226%     
====================================================
  Files            770          54         -716     
  Lines          55512        1009       -54503     
  Branches          80          80                  
====================================================
- Hits           14274         913       -13361     
+ Misses         39760          93       -39667     
+ Partials        1478           3        -1475     
Flag Coverage Δ
agents ?
cctp-relayer ?
core ?
ethergo ?
explorer ?
git-changes-action ?
omnirpc ?
opbot ?
packages 90.48563% <ø> (+0.00943%) ⬆️
rfq ?
screener-api ?
scribe ?
tools ?

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.

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

(updates since last review)

This pull request adds support for RFQ transactions on BSC, Blast, and Linea networks, along with various dependency updates and enhancements.

  • Updated Go Version and Dependencies: Updated go.mod files across multiple modules to Go 1.22.1 and added github.com/samborkent/uuid for UUID generation.
  • Enhanced RFQ Functionality: Added new environment variables and deployment configurations for BSC, Blast, and Linea in packages/contracts-rfq.
  • Improved Error Handling: Modified core/retry/retry.go to use go.uber.org/multierr for better error aggregation.
  • New Testnet Scripts: Added testnet-fb-config.sh and testnet-fb-deploy.sh scripts for configuring and deploying FastBridge contracts on testnets.
  • Updated Metrics Handling: Enhanced core/metrics/base.go and core/metrics/otlp.go for better tracer provider management and graceful shutdown.

85 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

(updates since last review)

This pull request adds support for RFQ transactions on BSC, Blast, and Linea networks, enhancing the Synapse interface's compatibility and functionality.

  • packages/synapse-interface/constants/bridgeMap.ts: Added support for BSC, Blast, and Linea by defining new chain IDs and mapping token addresses.
  • packages/synapse-interface/constants/chains/index.tsx: Introduced new chain IDs for Blast and Linea, expanding chain data mappings.
  • packages/synapse-interface/constants/chains/master.tsx: Included Linea blockchain network with detailed properties and configurations.
  • packages/synapse-interface/constants/chains/supportedChains.ts: Added BSC, Blast, and Linea to the supportedChains array.
  • packages/synapse-interface/constants/tokens/bridgeable.ts: Included token addresses and decimals for Linea and Scroll networks for USDC, USDT, and ETH tokens.

6 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 47aeabc and 6129fce.

Files ignored due to path filters (1)
  • packages/synapse-interface/assets/chains/linea.svg is excluded by !**/*.svg
Files selected for processing (6)
  • packages/synapse-interface/constants/bridgeMap.ts (4 hunks)
  • packages/synapse-interface/constants/chains/index.tsx (1 hunks)
  • packages/synapse-interface/constants/chains/master.tsx (2 hunks)
  • packages/synapse-interface/constants/chains/supportedChains.ts (2 hunks)
  • packages/synapse-interface/constants/tokens/bridgeable.ts (5 hunks)
  • packages/synapse-interface/scripts/data/providers.json (1 hunks)
Additional comments not posted (12)
packages/synapse-interface/constants/chains/supportedChains.ts (2)

21-21: LGTM! Import statement correctly updated.

The linea chain is correctly added to the import statement.


34-34: LGTM! supportedChains array correctly updated.

The linea chain is correctly added to the supportedChains array.

packages/synapse-interface/scripts/data/providers.json (1)

19-19: LGTM! JSON configuration correctly updated.

The linea RPC endpoint is correctly added to the JSON configuration.

packages/synapse-interface/constants/chains/index.tsx (1)

55-55: LGTM! ChainId object correctly updated.

The LINEA chain ID is correctly added to the ChainId object.

packages/synapse-interface/constants/chains/master.tsx (1)

568-592: LGTM! The LINEA blockchain entity addition is consistent and comprehensive.

The properties defined for LINEA are consistent with the format used for other blockchain entities in the file.

packages/synapse-interface/constants/tokens/bridgeable.ts (3)

414-414: LGTM! The LINEA entry in USDC token definition is consistent.

The address and decimal value for CHAINS.LINEA.id are consistent with the format used for other chains in the USDC token definition.

Also applies to: 431-431


471-471: LGTM! The SCROLL entry in USDT token definition is consistent.

The address and decimal value for CHAINS.SCROLL.id are consistent with the format used for other chains in the USDT token definition.

Also applies to: 484-484


710-710: LGTM! The LINEA entry in ETH token definition is consistent.

The entry for CHAINS.LINEA.id with a value of zeroAddress is consistent with the format used for other chains in the ETH token definition.

packages/synapse-interface/constants/bridgeMap.ts (4)

1796-1810: Verify the correctness of the added entries for chain ID '59144'.

The entries for USDC and ETH tokens appear to be correctly structured with appropriate properties. Ensure that these tokens are correctly integrated and tested within the broader system.


Line range hint 1823-1857:
Verify the consistency of the modified entries for chain ID '81457'.

The modifications to the USDB and WETH tokens include references to the new RFQ tokens. Ensure that these changes are consistent with the new RFQ functionality and are properly tested.


Line range hint 1858-1869:
Verify the correctness of the added entries for chain ID '534352'.

The entries for USDC and ETH tokens appear to be correctly structured with appropriate properties. Ensure that these tokens are correctly integrated and tested within the broader system.


Line range hint 1870-1888:
Verify the consistency of the modified entries for chain ID '1313161554'.

The modifications to the nUSD, USDT.e, and USDC.e tokens include references to the new RFQ tokens. Ensure that these changes are consistent with the new RFQ functionality and are properly tested.

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

(updates since last review)

Added support for RFQ transactions on BSC, Blast, and Linea networks, enhancing the Synapse interface's compatibility and functionality.

  • packages/synapse-interface/constants/bridgeMap.ts: Defined new chain IDs and mapped token addresses for BSC, Blast, and Linea.
  • packages/synapse-interface/constants/chains/index.tsx: Introduced new chain IDs for Blast and Linea, expanding chain data mappings.
  • packages/synapse-interface/constants/chains/master.tsx: Included Linea blockchain network with detailed properties and configurations.
  • packages/synapse-interface/constants/chains/supportedChains.ts: Added BSC, Blast, and Linea to the supportedChains array.
  • packages/synapse-interface/constants/tokens/bridgeable.ts: Included token addresses and decimals for Linea and Scroll networks for USDC, USDT, and ETH tokens.

No file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

(updates since last review)

Added support for RFQ transactions on BSC, Blast, and Linea networks, enhancing the Synapse interface's compatibility and functionality.

  • contrib/opbot/botmd/commands.go: Refactored getTxAge function for improved readability and error handling.
  • packages/sdk-router/src/constants/chainIds.ts: Added new chain IDs for LINEA and BLAST networks.
  • packages/sdk-router/src/constants/medianTime.ts: Updated median transaction times for BSC, Blast, and Linea.
  • packages/synapse-interface/components/StateManagedBridge/SettingsToggle.tsx: Introduced a new SettingsToggle component.
  • packages/synapse-interface/pages/state-managed-bridge/index.tsx: Refactored settings toggle functionality and updated bridge transaction logic for new chain IDs.

10 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

(updates since last review)

Added support for RFQ transactions on BSC, Blast, and Linea networks, enhancing the Synapse interface's compatibility and functionality.

  • packages/rest-api/package.json: Updated @synapsecns/sdk-router dependency to 0.9.0.
  • packages/sdk-router/CHANGELOG.md: Documented new features for Blast and Linea support in version 0.9.0.
  • packages/sdk-router/package.json: Bumped version to 0.9.0 and specified Node.js engine requirement as >=18.17.0.
  • packages/synapse-interface/package.json: Updated @synapsecns/sdk-router dependency to 0.9.0.
  • packages/widget/package.json: Updated @synapsecns/sdk-router dependency to 0.9.0.

8 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

(updates since last review)

Added support for RFQ transactions on BSC, Blast, and Linea networks, enhancing the Synapse interface's compatibility and functionality.

  • packages/synapse-interface/src/components/AnnouncementBanner.tsx: Updated to promote RFQ transactions on BSC, Blast, and Linea with new display dates.
  • packages/sdk-router/src/constants.ts: Expanded allowed chain IDs for RFQ transactions.
  • packages/sdk-router/src/rpcEndpoints.ts: Introduced a new RPC endpoint for the Linea network.
  • packages/sdk-router/src/tokens.ts: Enhanced token definitions to support USDC, USDT, and ETH on the LINEA chain.
  • packages/sdk-router/src/index.ts: Added support for the LINEA blockchain.

No file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

(updates since last review)

The latest changes add support for RFQ transactions on BSC, Blast, and Linea networks, enhancing the Synapse interface's compatibility and functionality.

  • packages/synapse-interface/components/layouts/LandingPageWrapper/index.tsx: Updated announcement banner to promote Linea blockchain support and updated display dates.

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 6129fce and 72b33a2.

Files ignored due to path filters (1)
  • packages/synapse-interface/assets/chains/linea.svg is excluded by !**/*.svg
Files selected for processing (1)
  • packages/synapse-interface/components/layouts/LandingPageWrapper/index.tsx (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • packages/synapse-interface/components/layouts/LandingPageWrapper/index.tsx

@aureliusbtc aureliusbtc merged commit 8fde07a into master Jul 29, 2024
37 checks passed
@aureliusbtc aureliusbtc deleted the fe/adds-bsc-linea-blast-rfq branch July 29, 2024 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants