hashgraph / hedera-sdk-java

Hedera™ Hashgraph SDK for Java
https://docs.hedera.com/guides/docs/sdks
Apache License 2.0
229 stars 117 forks source link

feat: Implement `MirrorNodeContractQuery` #2073

Open 0xivanov opened 1 week ago

0xivanov commented 1 week ago

Description: A new MirrorNodeContractQuery is added to support EVM gas estimation and simulation. The inputs should match that of ContractExecuteTransaction as devs will be looking to calculate the cost of a follow up transaction.

This query issues an api/v1/contracts/call to the mirror node web3 module that support estimate and simulation of state changing transactions.

Related issue(s):

Fixes #2076

Notes for reviewer:

Checklist

codecov[bot] commented 3 days ago

Codecov Report

Attention: Patch coverage is 91.07143% with 10 lines in your changes missing coverage. Please review.

Project coverage is 82.70%. Comparing base (b86ee46) to head (dd5edd5). Report is 159 commits behind head on main.

Files with missing lines Patch % Lines
.../hedera/hashgraph/sdk/MirrorNodeContractQuery.java 92.77% 3 Missing and 3 partials :warning:
.../java/com/hedera/hashgraph/sdk/EntityIdHelper.java 86.20% 3 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2073 +/- ## ============================================ + Coverage 82.20% 82.70% +0.50% - Complexity 3588 3975 +387 ============================================ Files 186 200 +14 Lines 11697 12825 +1128 Branches 1150 1263 +113 ============================================ + Hits 9615 10607 +992 - Misses 1604 1717 +113 - Partials 478 501 +23 ```

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


🚨 Try these New Features: