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

Noves integration #1398

Merged
merged 38 commits into from
Mar 26, 2024
Merged

Noves integration #1398

merged 38 commits into from
Mar 26, 2024

Conversation

juanlenoves
Copy link
Contributor

Here's our code for integrating Noves data with Blockscout.

Our goal is to significantly improve user experience by displaying Noves-translated transaction types and human-readable descriptions, on both the account and transaction detail pages.

We've been working on this in close collaboration with the Blockscout team, and are very excited for what's to come :)

Happy to make any revisions as needed.

@tom2drum tom2drum self-requested a review December 7, 2023 04:42
configs/app/features/noves.ts Outdated Show resolved Hide resolved
nextjs/nextjs-routes.d.ts Outdated Show resolved Hide resolved
stubs/noves/Novestranslate.ts Outdated Show resolved Hide resolved
ui/txs/TxsListItem.tsx Outdated Show resolved Hide resolved
ui/txs/TxType.tsx Outdated Show resolved Hide resolved
ui/tx/Noves/components/NovesActionCard.tsx Outdated Show resolved Hide resolved
ui/tx/Noves/utils/NovesGenerateFlowViewData.ts Outdated Show resolved Hide resolved
ui/tx/Noves/utils/NovesGenerateFlowViewData.ts Outdated Show resolved Hide resolved
ui/tx/Noves/utils/NovesGetSplittedDescription.ts Outdated Show resolved Hide resolved
ui/tx/Noves/utils/NovesGetSplittedDescription.ts Outdated Show resolved Hide resolved
@tom2drum
Copy link
Collaborator

Please note that our designer has updated the mock-ups for the assets flow table.

We believe there is no need to truncate the value string. The column width should be sufficient to display the entire value. If required, we can truncate the token symbol instead. Therefore, we can utilize a regular tooltip for the TokenEntity component here instead of creating a custom one.

@juanlenoves juanlenoves requested a review from tom2drum February 6, 2024 12:51
ui/tx/TxSubHeading.tsx Show resolved Hide resolved
ui/tx/TxSubHeading.tsx Outdated Show resolved Hide resolved
ui/txs/TxsContent.tsx Outdated Show resolved Hide resolved
ui/txs/TxsContent.tsx Outdated Show resolved Hide resolved
ui/txs/noves/useDescribeTxs.tsx Outdated Show resolved Hide resolved
ui/txs/noves/useDescribeTxs.tsx Outdated Show resolved Hide resolved
ui/txs/noves/useDescribeTxs.tsx Outdated Show resolved Hide resolved
ui/tx/TxAssetFlows.tsx Outdated Show resolved Hide resolved
ui/tx/assetFlows/components/NovesTokenTransferSnippet.tsx Outdated Show resolved Hide resolved
@juanlenoves
Copy link
Contributor Author

I believe all items from previous submissions have been addressed with the latest push. Please correct me if I'm wrong, but we should be very close or basically done here (and I hope that's a true statement 🙏)

@juanlenoves juanlenoves requested a review from tom2drum February 12, 2024 13:20
lib/api/resources.ts Outdated Show resolved Hide resolved
ui/tx/Noves/NovesTxAssetFlows.tsx Outdated Show resolved Hide resolved
ui/tx/assetFlows/components/NovesActionSnippet.tsx Outdated Show resolved Hide resolved
ui/tx/assetFlows/components/NovesTokenTooltipContent.tsx Outdated Show resolved Hide resolved
@tom2drum
Copy link
Collaborator

Great job, Juan! 🙌

Most of my comments have been addressed. However, there are still a few things that I believe should be changed:

  • The structure of the useDescribeTxs hook
  • The changes in the TxType component

For more details, please refer to the unresolved conversations above.

In addition, since we are nearing the final implementation of the feature, I suggest that you write some visual tests for all the views and components you have added, where appropriate. This will give us greater confidence in future releases that the layout and functionality of these components are not affected by new changes.

After resolving all the questions, I will deploy a demo and share it with our product manager and designer for review. Meanwhile, you can focus on writing test suites.

@juanlenoves
Copy link
Contributor Author

Hi Tom,

Our latest commit should address all pending comments, and we believe this should be ready to go.

I made a final adjustment and assumed that for describe_txs, the API endpoint that you expose via the custom proxy will be called "transaction-descriptions" and not just "transactions". This is much more accurate and descriptive of what that endpoint returns (just the minimalistic output with the descriptions, not the full transactions).

Copy link
Collaborator

@tom2drum tom2drum left a comment

Choose a reason for hiding this comment

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

I made a final adjustment and assumed that for describe_txs, the API endpoint that you expose via the custom proxy will be called "transaction-descriptions" and not just "transactions".

Has the underlying endpoint in Noves API been changed? We have already deployed our proxy service. Can we keep using the previous name? If not, we need to wait for the proxy to be redeployed before building a demo.

ui/address/AddressAccountHistory.tsx Outdated Show resolved Hide resolved
@tom2drum
Copy link
Collaborator

In order to run code checks and tests, could you please merge the main branch into yours and resolve any conflicts?

@juanlenoves juanlenoves force-pushed the noves branch 2 times, most recently from 932d37a to fe5875f Compare March 5, 2024 21:02
Copy link
Collaborator

@tom2drum tom2drum left a comment

Choose a reason for hiding this comment

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

  • The issue with space between tx subheading text and icon is not fixed for loading state
Screenshot Screenshot 2024-03-06 at 11 33 47 AM

nextjs/nextjs-routes.d.ts Outdated Show resolved Hide resolved
ui/address/AddressAccountHistory.tsx Outdated Show resolved Hide resolved
ui/shared/pagination/useQueryWithPages.ts Outdated Show resolved Hide resolved
ui/tx/assetFlows/TxAssetFlowsTableItem.tsx Show resolved Hide resolved
@juanlenoves
Copy link
Contributor Author

  • The issue with space between tx subheading text and icon is not fixed for loading state

Screenshot
Screenshot 2024-03-06 at 11 33 47 AM

Should be addressed in latest commits

ui/tx/TxSubHeading.tsx Outdated Show resolved Hide resolved
Copy link
Collaborator

@tom2drum tom2drum left a comment

Choose a reason for hiding this comment

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

👍 I will re-deploy the demo

@tom2drum tom2drum merged commit cc9cb36 into blockscout:main Mar 26, 2024
7 checks passed
wanpypy pushed a commit to AINNLayer2/ail2-explorer that referenced this pull request Mar 30, 2024
…to branch_individual_retrofits

* 'main' of https://github.com/AINNLayer2/ail2-explorer: (94 commits)
  Update menu list
  [skip ci] fix error when creating wagmi config
  ad provider fix 2
  ad provider fix
  zkSync batches (blockscout#1743)
  change ENV for blob txs (blockscout#1751)
  Noves integration (blockscout#1398)
  test fixes
  Add AdButler as an additional ad provider
  hide login page if no proxy needed
  update `web3modal` to v4 (blockscout#1731)
  chore: fix typos
  add button to tx not found error screen
  enable email for wallet connect
  fix react keys for withdrawals
  bugfix: Cannot convert string to buffer while write to the contract (blockscout#1724)
  bugfix: Real-time incoming transactions are sorted incorrectly (blockscout#1720)
  stats price diff on the homepage
  change icon folder
  solidity scan icon
  ...

# Conflicts:
#	ui/home/indicators/utils/indicators.tsx
Wolmin added a commit to lukso-network/network-explorer-execution-frontend that referenced this pull request Apr 9, 2024
* temporary disable focus reset

* remove marketplace experiment

* remove unused components

* update screenshots

* fix

* fix interpretation checks

* add method call as tx interpretation

* trying to fix problem with affected tests file download

* [skip ci] optimize affected tests script

* sort dapps by favorite

* fix csp policy for hype

* fix label for "Add public tag"

* Fix RSK stats - transaction fees precision (blockscout#1602)

* Fix RSK stats - transaction fees precision

Fixes blockscout#1473

* update screenshot

* Fix broken link in ENVS.md

* add NEXT_PUBLIC_MARKETPLACE_ENABLED env var

* update schema

* enable marketplace in pw tests

* add an explanatory comment

* fix script

* Validators list (blockscout#1621)

* new ENV and page placeholder

* display list data

* comment out SearchInput

* add counters

* add tag to address page

* tests

* refactoring

* fix ts

* change ENVs for demo

* fix ENVs validator

* [skip ci] remove hash

* review fixes

* [skip ci] out out parallel tests in local env

* shibarium deposits and withdrawals

* review fixes

* contract audits

* tests

* tests

* fix schema

* try to remove scroll artifacts

* remove double fetch

* better mock

* review fixes

* Gas tracker page (blockscout#1524)

* add custom headers to API resource

* refactoring

* page title

* chart

* gas prices snippet

* GasPrice component

* add ENV for gas units

* dark theme and other tweaks

* tests

* add base and priority fee

* [skip ci] small fiat values

* change behavior of the variable

* update tooltip layout

* refactor gas info tooltip

* refactor GasPrice component

* fix logic and deploy demo for eth mainnet

* tests

* remove link from anchor

* [skip ci] rollback ENVs for demo

* review fixes

* fix tests

* `outputs` field is not required for contract read method

Fixes blockscout#1624

* rename apps to dapps

* update screenshots

* add ads for GasTracker page test

* add top bar to dapp page

* fix github links in MarketplaceAppModal

* fix envs-validator

* fix csp for marketplace

* update search bar screenshot

* typo: incorrect yarn dev preset command

* add mixpanel events to operations in dapps

* Not possible to remove address filter in token inventory for an address with no NFTs

Fixes blockscout#1514

* OG description bug for NFT instances

Fixes blockscout#1578

* fix navigation reset

* Add a decimal part to the Market cap graph value and handle null values

* update screenshot for home page

* Display arrays of structs on Read/Write contract tabs (blockscout#1556)

* prototype

* change host for preview

* improve labels for nested arrays

* add field path

* bind fields to react form

* transform form fields into method args

* add styles for non-array args

* styles for tuple array

* style nested array inputs

* clear and multiply buttons for inputs

* show errors in inputs

* pass disabled state to inputs

* change direction of accordioin icon

* remove old code

* add asterix to required fields

* improvements and comments

* change styles

* highlight sections with errors

* refactoring field method name

* fix lable color

* fix ts

* preliminary tests

* better complex field labels

* improve tests

* remove outputs for write methods

* rollback review value

* post-review changes

* add mixpanel event for swap button

* fix initial dapp sorting

* post-review changes and style fix

* remove margin

* validators state filter fix

* fix gas price snippet in chrome

* update gas tracker page screenshots

* add test for marketplace page

* remove title second raw gap

* fix block table layout
h ick 7b395881 up node version to 18

* remove title second raw gap

* fix block table layout
h ick 7b395881 up node version to 18

* improve marketplace tests

* add test for app info dropdown

* add test for marketplace app modal

* Fix message shown when there are no deposits on L2

* upgrade dappscout-iframe

* post-review changes

* fix conflict

* truncate domain in domains popup (blockscout#1645)

Fixes blockscout#1644

* Update Safe wallets networks config (blockscout#1654)

Fixes blockscout#1626

* improve perf of highlighting same address in lists (blockscout#1662)

Fixes blockscout#1661

* add fallback for NFT animation media

* Contract: License (blockscout#1668)

* display license on contract page and in the list

* add new field to the form

* review fixes

* fix typo

* Support raw format of v0.7 user ops

* Handle undefined timestamp for zkEVM batch

Fixes blockscout#1674

* Add Blobs support (EIP-4884) (blockscout#1672)

* blob page placeholder

* txs with blobs list view

* tx additional info popup

* blob gas info for tx and block

* update hints

* tx blobs tab

* blob details page

* add ENV to hide blob txs tab

* tx blob fees and adj for tx burnt fees

* preliminary tests

* blob data convertion

* display blob data type in lists

* download asset

* blob txs in block

* tests for blob data preview

* fixes

* fix tests

* support blobs in search

* update blob icon

* more fixes

* highlight code of the main contract

Fixes blockscout#1676

* change api host for demo

* add user ops tx interpretation

* [skip ci] rollback demo env

* Metasuites placeholders (blockscout#1637)

* placeholders for address and txs

* placeholder for explorer link

* move phalcon link

* change api endpoint for demo

* Fixing upstream header too large

* ready flags and navigation events

* add ENV

---------

Co-authored-by: Nick Zenchik <[email protected]>

* fix blob page tests

* handle blobs with no data

* fix connect wallet message

* fix dapps sorting

* add new view with scores for marketplace

* make solidityscan report component reusable

* fix contract method form fields value foramatting

* rename validator status "failed" into "inactive"

* update screenshots

* Revert "update screenshots"

This reverts commit 93098f5.

* update screenshots for MarketplaceApp

* fix useMarketplaceApps hook

* another fix

* remove mobile test

* replace ref with state to fix test

* getit test

* update sdk

* update sdk 2

* error-demo

* update sdk 3

* remove 404 for blob page if blob txs view is hidden

* add security score component, integrate real data

* create contract list modal

* fix blob image parsing

* blob: don't break words for UTF-8 decoding

* add test

* contract method: format all args to string

* change api for demo

* fix contract list modal for mobiles

* update link buttons, add tooltip, update modal title

* add beta label

* fix search input margin on mobile

* move MoreInfo button to separate component

* move components

* add reports to apps inside hook

* rework AppSecurityReport

* add security score to marketplace app modal

* use ids instead of network names

* replace type

* Update values.yaml.gotmpl

* add new env to docs and validator

* add marketplace config url for review deployment

* metadata date fix

* Incorrect NFT media placeholder when navigating between pages

Fixes blockscout#1710

* fix token icon fallback

* 404 for unknown transaction (blockscout#1697)

* 404 for unknown transaction

Fixes blockscout#1689

* add helper for displaying custom error screen

* Remove the use of the token object from the response of the `api/v2/tokens/<address>/holders` endpoint. (blockscout#1696)

Fixes blockscout#1690

* Add a banner to the My Verified Addresses page (blockscout#1695)

* Add a banner to the My Verified Addresses page

Fixes blockscout#1688

* [skip ci] change text copy

* bugfix: No number wrap on the address 'Tokens' tab (blockscout#1691)

* No number wrap on the address 'Tokens' tab

Fixes blockscout#1673

* fix address overlapping in tx state

* design fixes

* display apps without security score

* add security score to dapp page

* change format of security reports data

* Dim out page to focus on a search (blockscout#1711)

* Dim out page to focus on a search

Fixes blockscout#1682

* add backdrop to search results page

* refactoring

* solidity scan icon

* change icon folder

* stats price diff on the homepage

* bugfix: Real-time incoming transactions are sorted incorrectly (blockscout#1720)

* Real-time incoming transactions are sorted incorrectly

Fixes blockscout#1681

* fix checks workflow

* bugfix: Cannot convert string to buffer while write to the contract (blockscout#1724)

Fixes blockscout#1717

* fix react keys for withdrawals

* add skeletons

* fix dapp page top bar for mobiles

* enable email for wallet connect

* fix star icon size

* wrap new components in A/B testing

* rework view switch to use url param and add skeleton

* update no data component

* fix wording for 1 item

* update empty search result

* turn off experiment by default

* update search input placeholder

* add button to tx not found error screen

* replace label with svg

* rename url param

* add mixpanel events

* Update .env.main

* fix warnings

* update star icon

* fix star icon color

* update screenshots

* hide new features

* Update MarketplaceApp.pw.tsx_default_mobile-base-view-1.png

* add security report type

* update envs-validator schema

* chore: fix typos

* update `web3modal` to v4 (blockscout#1731)

* update hooks and methods

* fix typescript

* options fix

* fix pw test build

* try to fix tests

* more pw test fixes

* update screenshots and fix address verification test

* fix types

* remove commented code

* post-review changes

* rework solidity report component

* add test for marketplace with security scores

* hide login page if no proxy needed

* upgrade dappscout-iframe

* Add AdButler as an additional ad provider

* test fixes

* Noves integration (blockscout#1398)

* noves integration

* code refactored

* PR changes added

* Code set up for new proxy 'describeTxs'

* minor fix

* Rename Novestranslate.ts to NovesTranslate.ts

* some quick stuff

* partial fixes and commit for changing how useDescribeTxs and txsContent work (new GET endpoint)

* Pending PR fixes

* tx asset flows pageSize of 50

* PR comments fixes

* rename expected api endpoint for the describe_txs endpoint, more accurate and descriptive

* one final re-name for api endpoint (make it clear it's an object vs an action)

* scrollRef fix

* build error fix

* design fixes

* sub heading fix

* Removed pagination in account history

* remove duplicate route

* updated table theme and icon gap

* Removed wrong color in table

* removed null validation in page params

* updated margin

* margin fix

* add icons to contracts

* Sub-heading interpretation simplified

* token alignment fix

* tests added for new functions

* margin fix

* remove divider on mobile asset flows

---------

Co-authored-by: NahuelNoves <[email protected]>
Co-authored-by: francisco-noves <[email protected]>

* add back button

* fix height of modal header

* change ENV for blob txs (blockscout#1751)

* zkSync batches (blockscout#1743)

* dev preset

* batches page

* batch details view

* batch txs

* adjustments in block view

* adjustments in tx view

* adjustments on home page

* fixes

* tests

* add pagination to batch txs

* ENV values for demo

* fix layout on batch details tab

* add more fields to batch details

* update screenshots

* revert demo ENVs

* ad provider fix

* ad provider fix 2

* Add support of ERC-404 type

* type fixes

* fixes

* tests

* fix

* test fix

* [skip ci] fix error when creating wagmi config

* Playwright tests refactoring, pt.1 (blockscout#1744)

* abort all requests for external resources and single mock for text ad

* render and mockApiResponse fixtures

* move fixtures into separate files

* rewrite Blocks test

* refactor mockApiResponse signature

* test with auth

* rewrite test with other API domains

* fix test

* separate script for installing deps in pw docker

* Numbers over 16(?) digits are rounded in contract method fields (blockscout#1761)

* Numbers over 16(?) digits are rounded in contract method fields

Fixes blockscout#1750

* Update values.yaml.gotmpl

Changed public rpc to Sepolia

* Set NEXT_PUBLIC_NETWORK_ID

---------

Co-authored-by: Yan Vaskov <[email protected]>

* User settings for address icons type (blockscout#1763)

* color theme settings

* address icon settings

* update tests

* add images to the address icon settings

* update styles

* more fixes

* [skip ci] fix error with color mode cookie

* [skip ci] update web3modal to next minor version

* [skip ci] update docs

---------

Co-authored-by: tom <[email protected]>
Co-authored-by: Max Alekseenko <[email protected]>
Co-authored-by: isstuev <[email protected]>
Co-authored-by: Igor Stuev <[email protected]>
Co-authored-by: bap2pecs <[email protected]>
Co-authored-by: Ryan Waldon <[email protected]>
Co-authored-by: Iago Lluque <[email protected]>
Co-authored-by: Nick Zenchik <[email protected]>
Co-authored-by: isstuev <[email protected]>
Co-authored-by: snoppy <[email protected]>
Co-authored-by: Juan Leandro Costa <[email protected]>
Co-authored-by: NahuelNoves <[email protected]>
Co-authored-by: francisco-noves <[email protected]>
Co-authored-by: Yan Vaskov <[email protected]>
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.

4 participants