hashgraph / hedera-mirror-node

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

Refactor the way contract action index is tracked in `OpcodeTracer` #8650

Open victor-yanev opened 4 days ago

victor-yanev commented 4 days ago

Description:

Problem

Currently the way that the contractActionIndexOfCurrentFrame is tracked inside OpcodeTracer is not exactly how it is done in the HederaTracer, where the list of contract actions is built and we are still using the mono code in the web3 module, so we need to refactor this to be identical to what is done in HederaTracer. We need to copy the logic from there and increment the contractActionIndexOfCurrentFrame in the places where items are pushed to the allActions list in HederaTracer.

This PR

Copies the way contract actions are added to the allActions list in HederaTracer

TODO:

Related issue(s):

Fixes #8639

Notes for reviewer:

Checklist

codecov[bot] commented 4 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 91.90%. Comparing base (1733949) to head (2714de0).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #8650 +/- ## ============================================ - Coverage 92.11% 91.90% -0.22% + Complexity 7541 3778 -3763 ============================================ Files 920 606 -314 Lines 30066 19797 -10269 Branches 3659 2489 -1170 ============================================ - Hits 27696 18194 -9502 + Misses 1547 1197 -350 + Partials 823 406 -417 ```

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

sonarcloud[bot] commented 3 days ago

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint