hashgraph / hedera-mirror-node

Hedera Mirror Node archives data from consensus nodes and serves it via an API
Apache License 2.0
128 stars 108 forks source link

feat: Add NFTReadableKVState #9484

Open kselveliev opened 10 hours ago

kselveliev commented 10 hours ago

Description: This PR adds NftReadableKVState

Added repository logic for reading nfts from DB - similar to UniqueTokenDatabaseAccessor Added a new converter between entity and nft DTO types to PBJ, so that the returned object is compliant with the hedera.app state

This PR modifies Add NftReadableKVState - read logic from database for nfts and converts the return result to pbj type Add NftReadableKVStateTest - test logic from NftReadableKVState

The rest of the changes in this PR are copied from https://github.com/hashgraph/hedera-mirror-node/pull/9414/files# since in contains the base logic for the KV state. Must wait merging of https://github.com/hashgraph/hedera-mirror-node/pull/9414

Once the base pr is merged this PR should only contain changes in NftReadableKVState, NftReadableKVStateTest -->

Related issue(s):

Fixes #9418

Checklist

codecov[bot] commented 10 hours ago

Codecov Report

Attention: Patch coverage is 77.77778% with 16 lines in your changes missing coverage. Please review.

Project coverage is 92.54%. Comparing base (19d22d2) to head (261eb72).

Files with missing lines Patch % Lines
...hedera/mirror/web3/state/CommonEntityAccessor.java 0.00% 11 Missing :warning:
.../java/com/hedera/services/utils/EntityIdUtils.java 83.87% 1 Missing and 4 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #9484 +/- ## ============================================ - Coverage 92.57% 92.54% -0.04% - Complexity 7047 7068 +21 ============================================ Files 915 917 +2 Lines 29870 29939 +69 Branches 3773 3777 +4 ============================================ + Hits 27653 27707 +54 - Misses 1446 1458 +12 - Partials 771 774 +3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sonarcloud[bot] commented 10 hours ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud