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

HIP-584: Add tests for estimateGas with precompiles #6241

Merged
merged 37 commits into from
Sep 1, 2023

Conversation

yiliev0
Copy link
Contributor

@yiliev0 yiliev0 commented Jun 20, 2023

Description:

This PR contains tests related to eth_estimateGas with precompiles. It covers test cases related to:

  • associateToken, dissociateToken, associateTokens, dissociateTokens
  • approve, approveNFT, ERC approve, setAprovalForAll, getApproved, ERC getApproved, isApprovedForAll, ERC isApprovedForAll
  • allowance, ERC allowance
  • mintToken, burnToken
  • transferFrom, transferFromNFT, transferToken, transferNFT, transferTokens, transferNFTs, cryptoTransfer, ERC Transfer, ERC transferFrom
  • wipeTokenAccount, wipeTokenAccountNFT
  • grantTokenKYC, revokeTokenKYC
  • freezeToken, unfreezeToken, pauseToken, unpauseToken
  • createFungibleToken, createNonFungibleToken, createFungibleTokenWithCustomFees, createNonFungibleTokenWithCustomFees
  • deleteToken
  • updateTokenExpiryInfo, updateTokenInfo, updateTokenKeys
  • ERC read functions -> name, symbol, decimals, totalSupply, balanceOf, ownerOf, tokenURI, getTokenInfo, isKYC, isFrozen, getTokenType
  • redirectForToken

Related issue(s):

Fixes #6109

Notes for reviewer:

Checklist

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

@yiliev0 yiliev0 marked this pull request as draft June 20, 2023 13:39
@codecov
Copy link

codecov bot commented Jun 20, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.21% 🎉

Comparison is base (8f04c80) 92.50% compared to head (df0880e) 92.71%.
Report is 65 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6241      +/-   ##
============================================
+ Coverage     92.50%   92.71%   +0.21%     
  Complexity     6526     6526              
============================================
  Files           794      838      +44     
  Lines         25116    27512    +2396     
  Branches       3144     3157      +13     
============================================
+ Hits          23233    25508    +2275     
- Misses         1208     1290      +82     
- Partials        675      714      +39     
Files Changed Coverage Δ
...tore/contracts/precompile/SyntheticTxnFactory.java 96.24% <ø> (+0.28%) ⬆️

... and 157 files with indirect coverage changes

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

@IvanKavaldzhiev IvanKavaldzhiev added test Test infrastructure, automated tests required, etc web3 Area: Web3 API limechain Work planned for the LimeChain team labels Jun 23, 2023
@yiliev0 yiliev0 force-pushed the 6109-tests-for-eth-estimateGas-with-precompiles branch from 5a48263 to 196805f Compare July 7, 2023 08:01
…ociate, approve, transfer

Signed-off-by: Yordan Iliev <yordan.iliev@limechain.tech>
Signed-off-by: Yordan Iliev <yordan.iliev@limechain.tech>
Signed-off-by: Yordan Iliev <yordan.iliev@limechain.tech>
Signed-off-by: Yordan Iliev <yordan.iliev@limechain.tech>
Signed-off-by: Yordan Iliev <yordan.iliev@limechain.tech>
…ord file arrival in mirror node

Signed-off-by: Yordan Iliev <yordan.iliev@limechain.tech>
…ecompile.

Signed-off-by: Yordan Iliev <yordan.iliev@limechain.tech>
…ove/transferFrom/transfer

Signed-off-by: Yordan Iliev <yordan.iliev@limechain.tech>
…ng function for associate/approveNftAll to work with contract id

Signed-off-by: Yordan Iliev <yordan.iliev@limechain.tech>
Signed-off-by: Yordan Iliev <yordan.iliev@limechain.tech>
@yiliev0 yiliev0 force-pushed the 6109-tests-for-eth-estimateGas-with-precompiles branch from 0119e0b to de4c0d3 Compare July 27, 2023 07:01
yiliev0 and others added 11 commits July 31, 2023 09:38
Signed-off-by: Yordan Iliev <yordan.iliev@limechain.tech>
Signed-off-by: Yordan Iliev <yordan.iliev@limechain.tech>
Signed-off-by: Yordan Iliev <yordan.iliev@limechain.tech>
…balanceOf, ownerOf, tokenURI

Signed-off-by: Yordan Iliev <yordan.iliev@limechain.tech>
Signed-off-by: Yordan Iliev <yordan.iliev@limechain.tech>
Signed-off-by: Yordan Iliev <yordan.iliev@limechain.tech>
Signed-off-by: Yordan Iliev <yordan.iliev@limechain.tech>
…109-tests-for-eth-estimateGas-with-precompiles

# Conflicts:
#	hedera-mirror-test/src/test/java/com/hedera/mirror/test/e2e/acceptance/client/TokenClient.java
Signed-off-by: Mustafa Uzun <mustafa.uzun@limechain.tech>
…diting the actualGas value

Signed-off-by: Yordan Iliev <yordan.iliev@limechain.tech>
Signed-off-by: Yordan Iliev <yordan.iliev@limechain.tech>
Signed-off-by: Yordan Iliev <yordan.iliev@limechain.tech>
Signed-off-by: Yordan Iliev <yordan.iliev@limechain.tech>
Signed-off-by: Yordan Iliev <yordan.iliev@limechain.tech>
Signed-off-by: Yordan Iliev <yordan.iliev@limechain.tech>
Signed-off-by: Yordan Iliev <yordan.iliev@limechain.tech>
Signed-off-by: Yordan Iliev <yordan.iliev@limechain.tech>
Signed-off-by: Yordan Iliev <yordan.iliev@limechain.tech>
…ractFeature's createContract for InputStream

Signed-off-by: Yordan Iliev <yordan.iliev@limechain.tech>
Signed-off-by: Yordan Iliev <yordan.iliev@limechain.tech>
Signed-off-by: Yordan Iliev <yordan.iliev@limechain.tech>
@sonarcloud
Copy link

sonarcloud bot commented Sep 1, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

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. Thanks for doing the extra cleanup to reduce duplication!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
limechain Work planned for the LimeChain team test Test infrastructure, automated tests required, etc web3 Area: Web3 API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HIP-584: Add tests for eth_estimateGas with precompiles
4 participants