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

Include token decimals in query responses #1078

Merged
merged 11 commits into from
Feb 11, 2021

Conversation

tinker-michaelj
Copy link
Collaborator

@tinker-michaelj tinker-michaelj commented Feb 10, 2021

Related issue(s):
Closes #1075

Summary of the change:

  • Set the decimals field in TokenBalance and TokenRelationship messages returned from queries.
  • NOTE: this PR also includes some unrelated EET changes helpful for recording cost snapshots in crypto/file mutations.

External impacts:
Nothing breaking; this information will simply be available in queries now.

Applicable documentation

  • HAPI protobuf comments

tinker-michaelj added 4 commits February 10, 2021 12:37
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
@codecov
Copy link

codecov bot commented Feb 10, 2021

Codecov Report

Merging #1078 (3ca6c66) into master (1288bbe) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1078   +/-   ##
=========================================
  Coverage     87.13%   87.14%           
  Complexity     5251     5251           
=========================================
  Files           435      435           
  Lines         15714    15718    +4     
  Branches       1619     1617    -2     
=========================================
+ Hits          13693    13697    +4     
  Misses         1559     1559           
  Partials        462      462           
Impacted Files Coverage Δ Complexity Δ
.../hedera/services/context/primitives/StateView.java 94.94% <ø> (ø) 45.00 <0.00> (ø)
...c/main/java/com/hedera/services/ServicesState.java 93.75% <100.00%> (+0.03%) 38.00 <0.00> (+1.00)
...hedera/services/keys/InHandleActivationHelper.java 100.00% <100.00%> (ø) 19.00 <0.00> (ø)
...rvices/queries/crypto/GetAccountBalanceAnswer.java 95.00% <100.00%> (+0.26%) 14.00 <0.00> (ø)
...era/services/records/TxnAwareRecordsHistorian.java 100.00% <100.00%> (ø) 10.00 <2.00> (-1.00)
...services/state/submerkle/RawTokenRelationship.java 86.66% <100.00%> (+0.30%) 16.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1288bbe...3ca6c66. Read the comment docs.

tinker-michaelj added 3 commits February 10, 2021 15:40
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
ljianghedera
ljianghedera previously approved these changes Feb 11, 2021
Copy link
Contributor

@ljianghedera ljianghedera left a comment

Choose a reason for hiding this comment

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

LGTM.

tinker-michaelj added 2 commits February 11, 2021 09:38
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
ljianghedera
ljianghedera previously approved these changes Feb 11, 2021
Copy link
Contributor

@ljianghedera ljianghedera left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
@tinker-michaelj tinker-michaelj merged commit 8e5cd04 into master Feb 11, 2021
@tinker-michaelj tinker-michaelj deleted the 01075-M-ReturnTokenDecimals branch February 11, 2021 19:07
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.

Return token decimals in queries that include token balances
2 participants