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

Remove SENDER_ALIAS & SPENDER_ALIAS constants in web3 tests #10405

Merged
merged 27 commits into from
Feb 20, 2025

Conversation

filev94
Copy link
Contributor

@filev94 filev94 commented Feb 17, 2025

Description:
This PR removes the SPENDER_ALIAS & SENDER_ALIAS constants and instead uses generated values. Adds a method to generate fully valid SECP256K1 key in DomainBuilder class - generateSecp256k1Key().

Related issue(s):

Fixes #10319

Notes for reviewer:

Checklist

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

Signed-off-by: filev94 <[email protected]>
# Conflicts:
#	hedera-mirror-web3/src/test/java/com/hedera/mirror/web3/service/AbstractContractCallServiceTest.java
#	hedera-mirror-web3/src/test/java/com/hedera/mirror/web3/service/ContractCallDynamicCallsTest.java
#	hedera-mirror-web3/src/test/java/com/hedera/mirror/web3/service/ContractCallServiceERCTokenModificationFunctionsTest.java
#	hedera-mirror-web3/src/test/java/com/hedera/mirror/web3/service/ContractCallServiceERCTokenReadOnlyFunctionsTest.java
#	hedera-mirror-web3/src/test/java/com/hedera/mirror/web3/service/ContractCallServiceHistoricalNegativeTest.java
#	hedera-mirror-web3/src/test/java/com/hedera/mirror/web3/service/ContractCallServicePrecompileModificationTest.java
#	hedera-mirror-web3/src/test/java/com/hedera/mirror/web3/service/ContractCallServicePrecompileReadonlyTest.java
Signed-off-by: filev94 <[email protected]>
Signed-off-by: filev94 <[email protected]>
@filev94 filev94 requested a review from a team as a code owner February 17, 2025 09:42
@filev94 filev94 self-assigned this Feb 17, 2025
Copy link

codecov bot commented Feb 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.17%. Comparing base (8b11f94) to head (986b7e8).

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #10405      +/-   ##
============================================
- Coverage     92.18%   92.17%   -0.02%     
+ Complexity     8111     8110       -1     
============================================
  Files           989      989              
  Lines         33768    33768              
  Branches       4269     4269              
============================================
- Hits          31130    31126       -4     
- Misses         1621     1623       +2     
- Partials       1017     1019       +2     

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

Signed-off-by: filev94 <[email protected]>
@filev94 filev94 changed the title Refactor web3 test code Remove SENDER_ALIAS & SPENDER_ALIAS constants in web3 tests Feb 17, 2025
@filev94 filev94 added enhancement Type: New feature web3 Area: Web3 API labels Feb 17, 2025
Signed-off-by: filev94 <[email protected]>
Signed-off-by: filev94 <[email protected]>
Signed-off-by: filev94 <[email protected]>
@steven-sheehy steven-sheehy added this to the 0.125.0 milestone Feb 18, 2025
@filev94 filev94 requested a review from a team as a code owner February 19, 2025 09:30
Copy link

codecov bot commented Feb 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

see 3 files with indirect coverage changes

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

@kselveliev kselveliev self-requested a review February 19, 2025 14:00
kselveliev
kselveliev previously approved these changes Feb 19, 2025
@kselveliev kselveliev self-requested a review February 20, 2025 15:50
@steven-sheehy steven-sheehy merged commit 80fbaf7 into main Feb 20, 2025
30 of 31 checks passed
@steven-sheehy steven-sheehy deleted the 10319-refactor-web3-test-code branch February 20, 2025 16:08
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.

Refactor web3 integration tests to not use hardcoded constants for sender and spender
4 participants