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

FE Release [2024-08-06] #2978

Merged
merged 25 commits into from
Aug 6, 2024
Merged

FE Release [2024-08-06] #2978

merged 25 commits into from
Aug 6, 2024

Conversation

aureliusbtc
Copy link
Contributor

@aureliusbtc aureliusbtc commented Aug 6, 2024

Description
A clear and concise description of the features you're adding in this pull request.

Additional context
Add any other context about the problem you're solving.

Metadata

  • Fixes #[Link to Issue]

0f58744: synapse-interface preview link
0f58744: explorer-ui preview link

aureliusbtc and others added 25 commits July 29, 2024 12:38
* Linea + Blast RFQ FastBridge deployments

* add linea fast bridge address

* lint

* lint

* rm create2factory
* Fetch and store Maintenance data

* Construct maintenance lists from fetched data

* Use state to construct Maintenance components

* Maintenance components working except for countdown

* useMaintenance exports bridge maintenance components

* Add Swap maintenance components in useMaintenance

* Maintenance Banners exported from useMaintenance

* Clean

* Text size in Progress Bar

* Prevent active chain pause clashes between diff instances

* Clean

* Use fetched paused bridge module list in Bridge

* Clean

* Organize

* Type Maintenance State

* Lift isFetching status to store

* Organize

* Add tests for fetchJSONData, implement retries

* Use local data source as backup when fetch retries fail

* useMaintenanceListener

* Clean, fix current chain pause selection when only single pause exists

* Clean, use jsdelivr urls

* Revert package.json, remove jest command

* Resolve file name

* Add randomized query params to cache bust git rest api

* Test URLs

* Revert changes

* No cache fetch request, update to gh pages cdn url

* yarn

* useSynapsePauseData hook (#2921)
* Compare against 0xee

* Use constant defined ethereum address

---------

Co-authored-by: abtestingalpha <[email protected]>
Co-authored-by: Trajan0x <[email protected]>
…aps (#2955)

* feat: add FB Router to generateMaps

* fix: filter out very old RFQ data

* feat: rework RFQ bridge map generation

* cleanup: remove deprecated `extractBridgeSymbolsMap`

* build: regenerate maps

* fix: generate swappable lists on chains w/o SynapseRouter

* build: regenerate
* Lint fix

* Refactor named functions to arrow functions per lint

* Fix errors

* cleaning up all linting problems

---------

Co-authored-by: defi-moses <[email protected]>
* `formatAmount`

* Show greater than minimum value if amount is zero (assume no bridge tx has absolute zero value)
* Format raw bigint value in transaction

* Display full amount on hover
* Feat: configure Confirmations

* [goreleaser]

* Fix: build

* [goreleaser]

* [goreleaser]
* [goreleaser]

* small optimizaiton

* [goreleaser]

* better
* feat: add option to exclude RFQ quotes

* feat: scaffold passing originUserAddress

* feat: encode user's origin address in rawParams for RFQ

* feat!: introduce a single bridge quote options object

BREAKING CHANGE: The `bridgeQuote` and `allBridgeQuotes` functions now accept an options object instead of individual optional parameters.

* docs: new options

* test: update

* test: cleanup

* fix: make `createRFQDestQuery` static, expose for tests

* test: add unit tests for `createRFQDestQuery`

* feat: use FastBridgeRouterV2 address

* docs: be more explicit about smart contract integrations

* docs: add address section

* docs: strike through deprecated addresses

* feat: use newest address

* docs: more explicit language

* docs: be more explicit in README as well

* fix: update docs link, slippage wording
 - @synapsecns/[email protected]
 - @synapsecns/[email protected]
 - @synapsecns/[email protected]
 - @synapsecns/[email protected]
* decimals implementation

* add test

* add test

* lint

* [goreleaser]

* handle native gas token

* combine into Validate func

* commnent

* [goreleaser]

* better call to loadconfig and abstract away validate

* abstract away validate

* [goreleaser]

---------

Co-authored-by: Trajan0x <[email protected]>
…uotes (#2969)

* feat: pass connected address as `originUserAddress` option

* feat: use `originUserAddress` option for gas estimation
@github-actions github-actions bot added M-ci Module: CI javascript Pull requests that update Javascript code go Pull requests that update Go code M-explorer-ui M-synapse-interface Sol Typescript size/l labels Aug 6, 2024
Copy link
Contributor

coderabbitai bot commented Aug 6, 2024

Important

Review skipped

More than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review.

131 files out of 184 files are above the max files limit of 50. Please upgrade to Pro plan to get higher limits.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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.

Copy link

codecov bot commented Aug 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (fe-release@0d734dd). Learn more about missing BASE report.
Report is 2 commits behind head on fe-release.

Additional details and impacted files
@@               Coverage Diff                @@
##             fe-release       #2978   +/-   ##
================================================
  Coverage              ?   25.84352%           
================================================
  Files                 ?         775           
  Lines                 ?       55689           
  Branches              ?         116           
================================================
  Hits                  ?       14392           
  Misses                ?       39812           
  Partials              ?        1485           
Flag Coverage Δ
packages 90.64961% <100.00000%> (?)
solidity 86.44068% <ø> (?)

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

codecov bot commented Aug 6, 2024

Bundle Report

Changes will decrease total bundle size by 9.52MB ⬇️

Bundle name Size Change
sdk-router-@synapsecns/sdk-router-cjs 526.89kB 526.89kB ⬆️
synapse-interface-edge-server-array-push 83 bytes 83 bytes ⬆️
sdk-router-@synapsecns/sdk-router-esm 254.83kB 254.83kB ⬆️
explorer-ui-server-cjs 865.77kB 865.77kB ⬆️
synapse-interface-client-array-push 7.46MB 7.46MB ⬆️
explorer-ui-client-array-push 2.31MB 2.31MB ⬆️
explorer-ui-edge-server-array-push 83 bytes 83 bytes ⬆️
widget-cjs-esm 273.3kB 273.3kB ⬆️
synapse-interface-server-cjs 1.53MB 1.53MB ⬆️
docs-bridge-client-array-push (removed) 7.89MB ⬇️
docs-bridge-server-cjs (removed) 14.85MB ⬇️

@aureliusbtc aureliusbtc merged commit 31d7cfd into fe-release Aug 6, 2024
22 checks passed
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 introduces several changes across multiple components of the Sanguine project, focusing on improving functionality, performance, and code quality. Here's a summary of the key changes:

  • Enhanced Chainalysis API client with caching for address screening results
  • Updated transaction handling and querying in the submitter package
  • Added support for new networks (Blast and Linea) in the contracts-rfq package
  • Improved UI components in the explorer-ui package
  • Minor version updates and changelog entries

Key points to consider:

  • The Chainalysis API client improvements may need further review for potential caching strategy and error handling issues
  • New FastBridge.json files for Blast and Linea networks are missing 'receipt' and 'abi' fields, which could cause functionality issues
  • The ScrollToTop component in the explorer-ui package has several issues that need addressing, including unused variables and unclear functionality
  • Some components in the explorer-ui package have TypeScript ignores present, which could lead to type-related issues

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

Comment on lines +79 to +81
if _, ok := c.registrationCache.Get(address); ok {
return true, nil
}
Copy link

Choose a reason for hiding this comment

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

logic: This caching strategy may lead to false positives. Consider caching both positive and negative results with an expiration time.

Comment on lines 128 to +133
risk := fastjson.GetString(resp.Body(), "risk")
return slices.Contains(c.riskLevels, risk), nil

if slices.Contains(c.riskLevels, risk) {
c.registrationCache.Set(address, struct{}{})
return true, nil
}
Copy link

Choose a reason for hiding this comment

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

style: Only caching risky addresses may lead to unnecessary API calls for non-risky addresses that have been checked before.

func ParseOptions(opts ...Option) OptionsFetcher {
myOptions := &options{
statuses: nil,
maxResults: DefaultMaxResultsPerChain, // Default to 0 for no limit.
Copy link

Choose a reason for hiding this comment

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

syntax: Comment is incorrect. Default is set to DefaultMaxResultsPerChain (10), not 0

@@ -123,10 +118,11 @@ func (s *Store) GetDistinctChainIDs(ctx context.Context) ([]*big.Int, error) {
// GetTXS returns all transactions for a given address on a given (or any) chain id that match a given status.
// there is a limit of 50 transactions per chain id. The limit does not make any guarantees about the number of nonces per chain.
// the submitter will get only the most recent tx submitted for each chain so this can be used for gas pricing.
func (s *Store) GetTXS(ctx context.Context, fromAddress common.Address, chainID *big.Int, matchStatuses ...db.Status) (txs []db.TX, err error) {
func (s *Store) GetTXS(ctx context.Context, fromAddress common.Address, chainID *big.Int, options ...db.Option) (txs []db.TX, err error) {
Copy link

Choose a reason for hiding this comment

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

style: update comment to reflect new option-based approach

Comment on lines +1 to +4
{
"address": "0x34F52752975222d5994C206cE08C1d5B329f24dD",
"constructorArgs": "0x000000000000000000000000bd88862fcc17de436f7bd17276c537acadda9a67"
}
Copy link

Choose a reason for hiding this comment

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

logic: Missing 'receipt' and 'abi' fields. Check if these are required for system functionality.

@@ -1,6 +1,6 @@
import { useEffect } from 'react'

export function ScrollToTop() {
export const ScrollToTop = () => {
const pathname = ''
Copy link

Choose a reason for hiding this comment

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

logic: pathname is unused. Remove or use useRouter to set it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Pull requests that update Go code javascript Pull requests that update Javascript code M-ci Module: CI M-explorer-ui M-synapse-interface size/l Sol Typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants