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

Fix BytecodeUtilsTest against modularized #9993

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

kselveliev
Copy link
Contributor

Description:
This PR fixes BytecodeUtilsTest which were failing when ran against modularized flag.

Made BytecodeUtilsTest extend AbstractContractCallServiceTest and now gets initial setup which makes most of the test except for one pass.

The one test that did not pass was -> testExtractRuntimeBytecodeEthCall. The reason was that the EthCall.binary was bigger than services max transaction size with a little bit.
This issue will be fixed in hashgraph/hedera-services#17099

Workaround solution for the test is:
Deleted EthCall methods - getTokenName and getTokenSymbol.
We have the exacts same tests in ContractCallServiceERCTokenReadOnlyFunctionsTest so these 2 can be deleted.
Deleting those decreased the binary and now it passes services max txn size check.

Changes in this PR also fix a couple of tests using the EthCall contract in ContracCallServiceTest.

This PR modifies ... in order to support ...
BytecodeUtilsTest - extends AbstractContractCallServiceTest
EthCall.sol - delete getTokenName and getTokenSymbol to decrease contract binary

Related issue(s):

Fixes #9992

Notes for reviewer:

Checklist

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

Signed-off-by: Kristiyan Selveliev <[email protected]>
@kselveliev kselveliev self-assigned this Dec 20, 2024
@kselveliev kselveliev added web3 Area: Web3 API enhancement Type: New feature labels Dec 20, 2024
@kselveliev kselveliev added this to the 0.121.0 milestone Dec 20, 2024
@kselveliev kselveliev marked this pull request as ready for review December 20, 2024 12:38
@kselveliev kselveliev requested a review from a team as a code owner December 20, 2024 12:38
Copy link

codecov bot commented Dec 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.23%. Comparing base (1423952) to head (24fd576).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #9993   +/-   ##
=========================================
  Coverage     92.23%   92.23%           
  Complexity     7856     7856           
=========================================
  Files           956      956           
  Lines         32896    32896           
  Branches       4148     4148           
=========================================
+ Hits          30341    30342    +1     
  Misses         1579     1579           
+ Partials        976      975    -1     

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

Copy link
Contributor

@bilyana-gospodinova bilyana-gospodinova 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 3f29e8a into main Dec 20, 2024
32 checks passed
@steven-sheehy steven-sheehy deleted the 09992-fix-BytecodeUtilsTest-for-modularized branch December 20, 2024 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type: New feature web3 Area: Web3 API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BytecodeUtilsTest failing against modularized
3 participants