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

Add missing logics and validations from services part 1 #8074

Closed

Conversation

zhpetkov
Copy link
Contributor

@zhpetkov zhpetkov commented Apr 12, 2024

Description:
AccessorBasedUsages#estimateCryptoTransfer - token multiplier
Add MirrorNodeEvmProperties in AccessorBasedUsages, ServiceConfiguration. Add feesTransferUsageMultiplier with default value 380 in MirrorNodeEvmProperties. Set token multiplier value from mirrorNodeEvmProperties in AccessorBasedUsages. Modification in AccessorBasedUsagesTest.

HederaSelfDestructOperationV038 - reasonToHalt missing if statements
Add contractIsTokenTreasury, contractHasAnyBalance, contractOwnsNfts in HederaEvmStackedWorldStateUpdater, because they are needed in reasonToHalt statements. Add more tests in HederaSelfDestructOperationV038 - rejectsSelfDestructIfTreasury(), rejectsSelfDestructIfContractHasAnyTokenBalance(), rejectsSelfDestructIfContractHasAnyNfts().

AbstractAutoCreationLogic#create - missing analyzeTokenTransferCreations part
Add tokenAliasMap, analyzeTokenTransferCreations and reset in AbstractAutoCreationLogic. Add getTokenAliasMap in AutoCreationLogic. Add needed modifications in MirrorEvmMessageCallProcessorTest, TransferLogicTest, SyntheticTxnFactoryTest, TransferPrecompileTest. Add new tests in AutoCreationLogicTest.

Related issue(s):

Fixes #8056

Notes for reviewer:

Checklist

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

Signed-off-by: Zhivko Petkov <zhpetkov9@gmail.com>
Signed-off-by: Zhivko Petkov <zhpetkov9@gmail.com>
…ct-V38' into 8056-add-missing-logics-and-validations-from-services-1
Signed-off-by: Zhivko Petkov <zhpetkov9@gmail.com>
…8056-add-missing-logics-and-validations-from-services-1
@zhpetkov zhpetkov changed the title Add missing logics and validations from services 1 Add missing logics and validations from services part 1 Apr 12, 2024
@zhpetkov zhpetkov self-assigned this Apr 12, 2024
@zhpetkov zhpetkov added limechain Work planned for the LimeChain team enhancement Type: New feature web3 Area: Web3 API labels Apr 12, 2024
@codecov-commenter
Copy link

codecov-commenter commented Apr 12, 2024

Codecov Report

Attention: Patch coverage is 84.02778% with 69 lines in your changes are missing coverage. Please review.

Project coverage is 92.26%. Comparing base (844b4f3) to head (ddc503e).
Report is 37 commits behind head on main.

Files Patch % Lines
...n/java/com/hedera/services/store/models/Token.java 71.57% 0 Missing and 27 partials ⚠️
...java/com/hedera/services/store/models/Account.java 79.16% 1 Missing and 14 partials ⚠️
...r/restjava/controller/GenericControllerAdvice.java 60.00% 5 Missing and 1 partial ⚠️
...edera/services/store/models/TokenRelationship.java 81.48% 0 Missing and 5 partials ⚠️
...ervices/txns/crypto/AbstractAutoCreationLogic.java 83.33% 3 Missing and 1 partial ⚠️
...era/mirror/restjava/config/CacheConfiguration.java 71.42% 1 Missing and 1 partial ⚠️
hedera-mirror-rest/model/token.js 0.00% 2 Missing ⚠️
...re/contract/HederaEvmStackedWorldStateUpdater.java 84.61% 2 Missing ⚠️
...com/hedera/mirror/restjava/RestJavaProperties.java 66.66% 1 Missing ⚠️
.../hedera/mirror/restjava/cache/CacheProperties.java 75.00% 0 Missing and 1 partial ⚠️
... and 4 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8074      +/-   ##
============================================
- Coverage     92.33%   92.26%   -0.08%     
- Complexity     7182     7305     +123     
============================================
  Files           893      902       +9     
  Lines         29100    29346     +246     
  Branches       3508     3589      +81     
============================================
+ Hits          26870    27075     +205     
- Misses         1447     1449       +2     
- Partials        783      822      +39     

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

Signed-off-by: Zhivko Petkov <zhpetkov9@gmail.com>
Signed-off-by: Zhivko Petkov <zhpetkov9@gmail.com>
Copy link

sonarcloud bot commented Apr 19, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
9.5% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@steven-sheehy steven-sheehy added this to the 0.104.0 milestone Apr 19, 2024
@steven-sheehy
Copy link
Member

Need to fix DCO and conflicts

@zhpetkov zhpetkov closed this Apr 24, 2024
@steven-sheehy steven-sheehy deleted the 8056-add-missing-logics-and-validations-from-services-1 branch April 24, 2024 14:36
@steven-sheehy steven-sheehy removed this from the 0.104.0 milestone Apr 24, 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 web3 Area: Web3 API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add missing logics and validations from services part 1
4 participants