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: solution to query the mirror node for the account balance, account info, and contract info data #2289

Conversation

svetoslav-nikol0v
Copy link
Contributor

Description:

This PR adds a solution to query the mirror node for the account balance, account info, and contract info data.

Related issue(s): #2070

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@svetoslav-nikol0v svetoslav-nikol0v force-pushed the 2070-add-account-balanceinfo-contract-info-mirror-node-queries branch from 610ee0c to 0fb3249 Compare May 16, 2024 07:55
src/network/MirrorNodeService.js Show resolved Hide resolved
src/network/MirrorNodeGateway.js Show resolved Hide resolved
@svetoslav-nikol0v svetoslav-nikol0v linked an issue May 27, 2024 that may be closed by this pull request
@svetoslav-nikol0v svetoslav-nikol0v force-pushed the 2070-add-account-balanceinfo-contract-info-mirror-node-queries branch from ff3f110 to 0e823f5 Compare May 28, 2024 06:50
@svetoslav-nikol0v svetoslav-nikol0v marked this pull request as ready for review May 28, 2024 08:11
@svetoslav-nikol0v svetoslav-nikol0v requested review from a team as code owners May 28, 2024 08:11
@svetoslav-nikol0v svetoslav-nikol0v requested review from a team as code owners May 28, 2024 14:06
Copy link

codecov bot commented May 29, 2024

Codecov Report

Attention: Patch coverage is 49.93865% with 408 lines in your changes missing coverage. Please review.

Project coverage is 56.75%. Comparing base (5c428d4) to head (ba5f41c).
Report is 73 commits behind head on main.

Current head ba5f41c differs from pull request most recent head 495d2ed

Please upload reports for the commit 495d2ed to get more accurate results.

Files Patch % Lines
src/network/MirrorNodeService.js 45.21% 103 Missing ⚠️
src/account/AccountBalanceQuery.js 13.33% 65 Missing ⚠️
src/account/AccountInfoQuery.js 14.66% 64 Missing ⚠️
src/contract/ContractInfoQuery.js 12.85% 61 Missing ⚠️
src/network/MirrorNodeGateway.js 69.49% 36 Missing ⚠️
src/token/TokenFreezeStatus.js 70.11% 26 Missing ⚠️
src/token/TokenKycStatus.js 70.11% 26 Missing ⚠️
src/network/MirrorNodeRouter.js 73.56% 23 Missing ⚠️
src/client/NodeClient.js 0.00% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2289       +/-   ##
===========================================
- Coverage   76.49%   56.75%   -19.75%     
===========================================
  Files         304      233       -71     
  Lines       75800    58209    -17591     
===========================================
- Hits        57986    33036    -24950     
- Misses      17814    25173     +7359     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

src/Executable.js Outdated Show resolved Hide resolved
src/Executable.js Outdated Show resolved Hide resolved
src/account/AccountBalanceQuery.js Outdated Show resolved Hide resolved
src/account/AccountBalanceQuery.js Outdated Show resolved Hide resolved
src/account/AccountInfoQuery.js Outdated Show resolved Hide resolved
src/account/TokenRelationship.js Show resolved Hide resolved
common_js_test/src/test.js Outdated Show resolved Hide resolved
src/network/MirrorNodeGateway.js Outdated Show resolved Hide resolved
src/network/MirrorNodeRouter.js Outdated Show resolved Hide resolved
@svetoslav-nikol0v svetoslav-nikol0v requested review from agadzhalov and removed request for leninmehedy, rwalworth and matteriben June 4, 2024 07:19
agadzhalov
agadzhalov previously approved these changes Jun 5, 2024
Copy link
Contributor

@agadzhalov agadzhalov left a comment

Choose a reason for hiding this comment

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

besides three minor typos in comments LGTM, ty @svetoslav-nikol0v

src/account/AccountBalanceQuery.js Outdated Show resolved Hide resolved
src/contract/ContractInfoQuery.js Outdated Show resolved Hide resolved
src/account/AccountInfoQuery.js Outdated Show resolved Hide resolved
Signed-off-by: svetoslav-nikol0v <[email protected]>
Signed-off-by: svetoslav-nikol0v <[email protected]>
Signed-off-by: svetoslav-nikol0v <[email protected]>
Signed-off-by: svetoslav-nikol0v <[email protected]>
Signed-off-by: svetoslav-nikol0v <[email protected]>
Signed-off-by: svetoslav-nikol0v <[email protected]>
Signed-off-by: svetoslav-nikol0v <[email protected]>
Signed-off-by: svetoslav-nikol0v <[email protected]>
Signed-off-by: svetoslav-nikol0v <[email protected]>
Signed-off-by: svetoslav-nikol0v <[email protected]>
Signed-off-by: svetoslav-nikol0v <[email protected]>
Signed-off-by: svetoslav-nikol0v <[email protected]>
Signed-off-by: svetoslav-nikol0v <[email protected]>
Signed-off-by: svetoslav-nikol0v <[email protected]>
Signed-off-by: svetoslav-nikol0v <[email protected]>
Signed-off-by: svetoslav-nikol0v <[email protected]>
Signed-off-by: svetoslav-nikol0v <[email protected]>
Signed-off-by: svetoslav-nikol0v <[email protected]>
Signed-off-by: svetoslav-nikol0v <[email protected]>
Signed-off-by: svetoslav-nikol0v <[email protected]>
Signed-off-by: svetoslav-nikol0v <[email protected]>
@svetoslav-nikol0v svetoslav-nikol0v force-pushed the 2070-add-account-balanceinfo-contract-info-mirror-node-queries branch from 75215ed to 495d2ed Compare June 6, 2024 08:45
Copy link

sonarcloud bot commented Jun 6, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
28.2% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

Copy link
Contributor

@agadzhalov agadzhalov left a comment

Choose a reason for hiding this comment

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

LGTM

@svetoslav-nikol0v svetoslav-nikol0v merged commit 70214b1 into main Jun 6, 2024
8 of 9 checks passed
@svetoslav-nikol0v svetoslav-nikol0v deleted the 2070-add-account-balanceinfo-contract-info-mirror-node-queries branch June 6, 2024 11:24
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.

Add Account Balance/Info, Contract Info Mirror Node Queries
3 participants