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

Implement `ContractBytecodeReadableKVState` #9452

Open bilyana-gospodinova opened 6 days ago

bilyana-gospodinova commented 6 days ago

Description: As part of the implementation for the reusable services we need to implement ContractBytecodeReadableKVState. It reads the contract's runtime bytecode and converts it to Bytecode PBJ type. This PR copies Utils from https://github.com/hashgraph/hedera-mirror-node/pull/9414 which is not merged yet.

Fixes https://github.com/hashgraph/hedera-mirror-node/issues/9255

Checklist

codecov[bot] commented 6 days ago

Codecov Report

Attention: Patch coverage is 90.90909% with 2 lines in your changes missing coverage. Please review.

Project coverage is 92.68%. Comparing base (db65573) to head (be2cef6).

Files with missing lines Patch % Lines
...or/web3/state/ContractBytecodeReadableKVState.java 84.61% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #9452 +/- ## ============================================ - Coverage 92.68% 92.68% -0.01% - Complexity 6943 6951 +8 ============================================ Files 896 898 +2 Lines 29575 29597 +22 Branches 3751 3753 +2 ============================================ + Hits 27411 27431 +20 - Misses 1399 1401 +2 Partials 765 765 ```

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

sonarcloud[bot] commented 4 days 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