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

Refactor ContractCallNestedCallsHistoricalTest #9164

Merged
merged 2 commits into from
Aug 27, 2024

Conversation

kselveliev
Copy link
Contributor

Description:
This pr refactors ContractCallNestedCallsHistoricalTest to use the web3j plugin and use native java type.

The class test 3 method getTokenInfo, getApproved and mintNft in historical context.
The historical context is for blocks pre evm 34 version.

This PR modifies:
TestWeb3jService - Adds a new check to execute estimate gas calls only when we are not in historical context since estimate gas does not support historical blocks.

Added NestedCallHistorical.sol file. Modified the 3 tests to not return "hardcoded result" but instead take the response from the Hts call.

Modified ContractCallNestedCallsHistoricalTest to use the new approach with web3j.

Related issue(s):

Fixes #8956

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Signed-off-by: Kristiyan Selveliev <kristiyan.selveliev@limechain.tech>
@kselveliev kselveliev self-assigned this Aug 26, 2024
@kselveliev kselveliev added limechain Work planned for the LimeChain team web3 Area: Web3 API enhancement Type: New feature technical debt labels Aug 26, 2024
@kselveliev kselveliev marked this pull request as ready for review August 26, 2024 14:32
Copy link

codecov bot commented Aug 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.14%. Comparing base (b6fffa2) to head (8ea9f93).
Report is 15 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #9164   +/-   ##
=========================================
  Coverage     92.14%   92.14%           
- Complexity     7713     7714    +1     
=========================================
  Files           933      933           
  Lines         30823    30823           
  Branches       3762     3762           
=========================================
  Hits          28402    28402           
  Misses         1575     1575           
  Partials        846      846           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Kristiyan Selveliev <kristiyan.selveliev@limechain.tech>
Copy link

sonarcloud bot commented Aug 26, 2024

@steven-sheehy steven-sheehy added this to the 0.113.0 milestone Aug 26, 2024
Copy link
Member

@steven-sheehy steven-sheehy left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@nickeynikolovv nickeynikolovv left a comment

Choose a reason for hiding this comment

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

LGTM

@steven-sheehy steven-sheehy merged commit 01c881a into main Aug 27, 2024
35 checks passed
@steven-sheehy steven-sheehy deleted the 08956-contract-call-nested-historical branch August 27, 2024 15:37
@steven-sheehy steven-sheehy changed the title feat: Refactor ContractCallNestedCallsHistoricalTest Refactor ContractCallNestedCallsHistoricalTest Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type: New feature limechain Work planned for the LimeChain team technical debt web3 Area: Web3 API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor ContractCallNestedCallsHistoricalTest
3 participants