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 #8157
Add missing logics and validations from services #8157
Conversation
Signed-off-by: Zhivko Petkov <zhpetkov9@gmail.com>
Signed-off-by: Zhivko Petkov <zhpetkov9@gmail.com>
Signed-off-by: Zhivko Petkov <zhpetkov9@gmail.com>
…self-destruct-V38
…8056-add-missing-logics-and-validations-p1
Signed-off-by: Zhivko Petkov <zhpetkov9@gmail.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8157 +/- ##
============================================
+ Coverage 92.28% 92.30% +0.01%
- Complexity 7280 7288 +8
============================================
Files 898 899 +1
Lines 29338 29355 +17
Branches 3575 3583 +8
============================================
+ Hits 27075 27096 +21
+ Misses 1446 1439 -7
- Partials 817 820 +3 ☔ View full report in Codecov by Sentry. |
…ing-logics-and-validations-p1
…ructOperationBase Signed-off-by: Zhivko Petkov <zhpetkov9@gmail.com>
hedera-mirror-web3/src/main/java/com/hedera/services/txns/crypto/AbstractAutoCreationLogic.java
Outdated
Show resolved
Hide resolved
hedera-mirror-web3/src/main/java/com/hedera/services/txns/crypto/AbstractAutoCreationLogic.java
Outdated
Show resolved
Hide resolved
hedera-mirror-web3/src/main/java/com/hedera/services/txns/crypto/AbstractAutoCreationLogic.java
Outdated
Show resolved
Hide resolved
hedera-mirror-web3/src/main/java/com/hedera/services/txns/crypto/AbstractAutoCreationLogic.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Zhivko Petkov <zhpetkov9@gmail.com>
Signed-off-by: Zhivko Petkov <zhpetkov9@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the difference between this pr and #8074
…onLogic Signed-off-by: Zhivko Petkov <zhpetkov9@gmail.com>
hedera-mirror-web3/src/main/java/com/hedera/services/txns/crypto/AbstractAutoCreationLogic.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Zhivko Petkov <zhpetkov9@gmail.com>
PrecompilePricingUtils - computeViewFunctionGas Change calculate implementation and now will return a larger of minimum or gas charge plus premium. Add new tests and modify old ones. AllowanceHelpers - fetchOwxnerAccount ApproveAllowanceLogic - INVALID_ALLOWANCE_SPENDER_ID Add loadAccountOrFailWith and validateUsable in Store which help to load the account from the state and throw the given code if an exception occurs due to an invalid account. Add new tests and modify old ones. --------- Signed-off-by: Zhivko Petkov <zhpetkov9@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to merge and fix DCO
...mirror-web3/src/main/java/com/hedera/mirror/web3/evm/properties/MirrorNodeEvmProperties.java
Show resolved
Hide resolved
hedera-mirror-web3/src/main/java/com/hedera/services/txns/crypto/AbstractAutoCreationLogic.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Zhivko Petkov <zhpetkov9@gmail.com>
Signed-off-by: Zhivko Petkov <119669063+zhpetkov@users.noreply.github.com>
Signed-off-by: Zhivko Petkov <zhpetkov9@gmail.com>
Quality Gate passedIssues Measures |
Merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description:
AccessorBasedUsages#estimateCryptoTransfer - token multiplier
Add
MirrorNodeEvmProperties
inAccessorBasedUsages
,ServiceConfiguration
. AddfeesTransferUsageMultiplier
with default value 380 inMirrorNodeEvmProperties
. Set token multiplier value frommirrorNodeEvmProperties
inAccessorBasedUsages
. Modification inAccessorBasedUsagesTest
.HederaSelfDestructOperationV038 - reasonToHalt missing if statements
Add
contractIsTokenTreasury
,contractHasAnyBalance
,contractOwnsNfts
inHederaEvmStackedWorldStateUpdater
, because they are needed inreasonToHalt
statements. Add more tests inHederaSelfDestructOperationV038
-rejectsSelfDestructIfTreasury()
,rejectsSelfDestructIfContractHasAnyTokenBalance()
,rejectsSelfDestructIfContractHasAnyNfts()
.AbstractAutoCreationLogic#create - missing analyzeTokenTransferCreations part
Add
tokenAliasMap
,analyzeTokenTransferCreations
andreset
inAbstractAutoCreationLogic
. AddgetTokenAliasMap
inAutoCreationLogic
. Add needed modifications inMirrorEvmMessageCallProcessorTest
,TransferLogicTest
,SyntheticTxnFactoryTest
,TransferPrecompileTest
. Add new tests inAutoCreationLogicTest
.SyntethicTxnFactory#createHollowAccount - setMaxAutomaticTokenAssociations
Add
maxAutoAssociations
increateHollowAccount
.Related issue(s):
Fixes #8056
Fixes #8137
Notes for reviewer:
Checklist