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

apply isVerified property for a list of SC's #1172

Merged

Conversation

cfaur09
Copy link
Contributor

@cfaur09 cfaur09 commented Jan 3, 2024

Reasoning

  • To enhance performance by reducing the number of verification requests for smart contracts and to display SC's that are code verified

Proposed Changes

  • Implemented a new method getVerifiedAccounts in the account service to fetch a list of verified smart contract addresses.
  • Added a new job in CacheWarmerService to periodically update and cache the list of verified smart contracts.
  • Modified getAccountsRaw method to check against the cached list of verified smart contracts and conditionally set the isVerified property for relevant accounts.

How to test (DEVNET)

  • /accounts?isSmartContract=true&size=400 -> should return for some SC's isVerified property. Otherwise, isVerified property is not defined
  • /accounts?size=10000 -> should return also for some SC's isVerified property

Copy link

codecov bot commented Jan 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6bee7aa) 38.41% compared to head (3a75cdc) 38.60%.

Additional details and impacted files
@@               Coverage Diff               @@
##           development    #1172      +/-   ##
===============================================
+ Coverage        38.41%   38.60%   +0.19%     
===============================================
  Files                9        9              
  Lines              315      316       +1     
  Branches            19       19              
===============================================
+ Hits               121      122       +1     
  Misses             175      175              
  Partials            19       19              
Flag Coverage Δ
unittests 38.60% <100.00%> (+0.19%) ⬆️

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.

@bogdan-rosianu bogdan-rosianu self-requested a review January 8, 2024 14:04
@cfaur09 cfaur09 added the feature New feature or request label Jan 8, 2024
@tanghel tanghel merged commit 719178c into development Jan 9, 2024
5 of 7 checks passed
@tanghel tanghel deleted the SERVICES-2044-add-is-verified-fields-for-a-list-of-s-cs branch January 9, 2024 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants