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(widget): Adds scroll #2805

Merged
merged 14 commits into from
Jun 27, 2024
Merged

feat(widget): Adds scroll #2805

merged 14 commits into from
Jun 27, 2024

Conversation

abtestingalpha
Copy link
Collaborator

@abtestingalpha abtestingalpha commented Jun 27, 2024

Summary by CodeRabbit

  • New Features

    • Added support for the SCROLL blockchain network, enabling users to interact with this new chain within the app.
  • Enhancements

    • Expanded the list of supported origins and destinations for various tokens, including RFQ.USDC and RFQ.ETH, improving token bridging options.

Copy link
Contributor

coderabbitai bot commented Jun 27, 2024

Walkthrough

The recent updates enhance the widget package by adding new token origins and destinations and extending support to a new blockchain network named SCROLL. The bridgeable.ts, bridgeMap.ts, and chains.ts files have been modified to incorporate these changes, enabling expanded token bridging capabilities and integrating the SCROLL blockchain.

Changes

Files Change Summary
packages/widget/src/constants/bridgeMap.ts Updated BRIDGE_MAP to include new origin and destination tokens, updated symbol and decimals properties.
packages/widget/src/constants/bridgeable.ts Added support for the SCROLL chain for USDC and ETH tokens.
packages/widget/src/constants/chains.ts Introduced the SCROLL blockchain constant with relevant network details.

Poem

In code we weave a seamless dance,
Tokens leap and new chains prance.
Scroll's the name, a fresh new path,
Bridging gaps, reducing wrath.
With USDC and ETH in tow,
Our widget grows through seamless flow.

🐇✨


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 Configration 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.

Copy link

cloudflare-workers-and-pages bot commented Jun 27, 2024

Deploying sanguine-fe with  Cloudflare Pages  Cloudflare Pages

Latest commit: 406b7db
Status: ✅  Deploy successful!
Preview URL: https://7fec771d.sanguine-fe.pages.dev
Branch Preview URL: https://widget-adds-scroll.sanguine-fe.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

  • Added NewTag component to SelectSpecificNetworkButton.tsx
  • Expanded bridgeable assets in bridgeMap.ts
  • Added SCROLL chain support in bridgeable.ts
  • Included new blockchain network 'Scroll' in chains.ts

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

Copy link

codecov bot commented Jun 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 25.70782%. Comparing base (8d04213) to head (406b7db).

Additional details and impacted files
@@                 Coverage Diff                 @@
##              master       #2805         +/-   ##
===================================================
+ Coverage   25.59422%   25.70782%   +0.11360%     
===================================================
  Files            758         700         -58     
  Lines          54399       51673       -2726     
  Branches          80          80                 
===================================================
- Hits           13923       13284        -639     
+ Misses         39044       37026       -2018     
+ Partials        1432        1363         -69     
Flag Coverage Δ
cctp-relayer ?
packages 90.47619% <ø> (-0.09921%) ⬇️
promexporter ?

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)

  • Improved JSON handling in BlacklistAddress and GenerateSignature in client.go
  • Removed data field from db.BlacklistedAddress in Swagger documentation (docs.go, swagger.json, swagger.yaml)
  • Enhanced authMiddleware for better request body handling in screener.go
  • Added BytesToJSONString function and tests in core/bytes.go and core/bytes_test.go
  • Centralized NewTag component in SelectSpecificNetworkButton.tsx

8 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 8d04213 and 406b7db.

Files selected for processing (3)
  • packages/widget/src/constants/bridgeMap.ts (36 hunks)
  • packages/widget/src/constants/bridgeable.ts (4 hunks)
  • packages/widget/src/constants/chains.ts (2 hunks)
Additional comments not posted (13)
packages/widget/src/constants/chains.ts (2)

285-297: Well-structured addition of the SCROLL blockchain

The addition of the SCROLL blockchain network is consistent with the structure used for other chains in this file. The properties such as id, name, rpcUrls, explorerUrl, explorerName, blockTime, and imgUrl are all set in a similar fashion to the existing entries, ensuring uniformity and maintainability.


320-320: Ensure the newly added SCROLL chain is properly integrated into the CHAINS object

The addition of SCROLL to the CHAINS object is crucial for its accessibility throughout the application. This change appears correct and should allow the SCROLL chain to be used like any other defined chain. It's important to ensure that all functionalities that interact with the CHAINS object are updated to handle this new chain correctly.

Verification successful

The newly added SCROLL chain is properly integrated into the CHAINS object.

The references to SCROLL across multiple files confirm that it is correctly integrated and accessible within the application.

  • packages/widget/src/constants/chains.ts
  • packages/widget/src/constants/bridgeable.ts
  • packages/synapse-interface/constants/tokens/bridgeable.ts
  • packages/synapse-interface/constants/chains/master.tsx
  • packages/synapse-interface/constants/chains/index.tsx
  • packages/sdk-router/src/constants/medianTime.ts
  • packages/sdk-router/src/constants/chainIds.ts
  • packages/synapse-constants/constants/chains/master.ts
  • packages/synapse-constants/constants/chains/index.ts
  • packages/synapse-constants/constants/tokens/bridgeable.ts
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that the SCROLL chain is properly integrated and accessible.

# Test: Search for SCROLL usage in the codebase. Expect: References to SCROLL in relevant places.
rg --type typescript $'SCROLL'

Length of output: 64



Script:

#!/bin/bash
# Description: Verify that the SCROLL chain is properly integrated and accessible.

# Test: Search for SCROLL usage in the codebase. Expect: References to SCROLL in relevant places.
rg 'SCROLL' --glob '*.ts' --glob '*.tsx'

Length of output: 2045

packages/widget/src/constants/bridgeable.ts (2)

438-438: Added SCROLL blockchain support for USDC

The changes correctly add the SCROLL blockchain support for the USDC token. The address and decimal values are consistent with the USDC specifications on other chains. Ensure that the address 0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4 is correct and has been verified.

Also applies to: 454-454


804-804: Added SCROLL blockchain support for ETH

The changes correctly add the SCROLL blockchain support for the ETH token. The address is set to ZeroAddress which implies that ETH is native to the SCROLL blockchain, similar to its treatment on other chains like Ethereum and Arbitrum. Ensure that this setting is intended and aligns with the blockchain's characteristics.

Also applies to: 815-815

packages/widget/src/constants/bridgeMap.ts (9)

34-42: Correct implementation of new token routes for nUSD.
The addition of new origins and destinations for the token nUSD correctly aligns with the objectives of supporting new blockchain interactions.


71-79: Correct implementation of new token routes for LUSD.
The addition of new origins and destinations for the token LUSD is properly formatted and consistent with the PR's objectives.


101-109: Proper extension of token routes for DAI.
The updated origins and destinations for DAI are in line with the expansion plans to new blockchain networks.


124-132: Consistent update for PYUSD origins and destinations.
The modifications to PYUSD token routing are correctly implemented, showing consistency across token configurations.


161-169: Well-implemented routing updates for FRAX.
The changes to the FRAX token's origins and destinations align with the intended support for additional blockchain networks.


191-200: Accurate updates for USDC token configurations.
The addition of new routes for the USDC token is correctly implemented, supporting the expansion into new blockchain networks.


235-243: Correct routing additions for WETH and ETH.
The updates to WETH and ETH tokens include new blockchain interactions which are correctly implemented according to the PR's objectives.


256-264: Appropriate updates for USDT token routes.
The expansion of USDT token's routing to include new blockchain networks is correctly implemented.


286-294: Well-executed updates for crvUSD.
The inclusion of new routes for the crvUSD token aligns with the PR's objectives to support additional blockchain networks.

@abtestingalpha abtestingalpha changed the title Widget/adds scroll feat(widget): Adds scroll Jun 27, 2024
@abtestingalpha abtestingalpha merged commit 1f4a910 into master Jun 27, 2024
36 checks passed
@abtestingalpha abtestingalpha deleted the widget/adds-scroll branch June 27, 2024 16:36
@coderabbitai coderabbitai bot mentioned this pull request Oct 4, 2024
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