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: HIP-904 Additional e2e test cases where receiver contract and already associated #16399

Merged
merged 16 commits into from
Nov 21, 2024

Conversation

stoyanov-st
Copy link
Contributor

@stoyanov-st stoyanov-st commented Nov 4, 2024

Description:

  • This PR adds additional test cases for Token Airdrop via smart contract where the receiving account is a contract that is already associated with the Airdropped token/s.
  • This PR also enables Contract entities to receive Airdrops.
  • Adds maxAutoAssociations to the Contract annotation.

Related issue(s):

Fixes #16240
Fixes #16241
Fixes #16242
Fixes #16243
Fixes #16244
Fixes #16245
Fixes #16246

Notes for reviewer:
This branch is based on #16216 to include the helper methods for the airdrop tests

Checklist

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

Signed-off-by: Stanimir Stoyanov <stanimir.stoyanov@limechain.tech>
Signed-off-by: Stanimir Stoyanov <stanimir.stoyanov@limechain.tech>
Signed-off-by: Stanimir Stoyanov <stanimir.stoyanov@limechain.tech>
Signed-off-by: Stanimir Stoyanov <stanimir.stoyanov@limechain.tech>
Signed-off-by: Stanimir Stoyanov <stanimir.stoyanov@limechain.tech>
Signed-off-by: Stanimir Stoyanov <stanimir.stoyanov@limechain.tech>
@stoyanov-st stoyanov-st added this to the v0.57 milestone Nov 4, 2024
@stoyanov-st stoyanov-st self-assigned this Nov 4, 2024
@stoyanov-st stoyanov-st requested review from a team and tinker-michaelj as code owners November 4, 2024 12:18
Copy link

codecov bot commented Nov 4, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 63.39%. Comparing base (5cd5714) to head (e41b223).
Report is 39 commits behind head on develop.

Files with missing lines Patch % Lines
...rvice/token/impl/handlers/TokenAirdropHandler.java 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##             develop   #16399      +/-   ##
=============================================
+ Coverage      63.36%   63.39%   +0.02%     
- Complexity     20162    20194      +32     
=============================================
  Files           2533     2538       +5     
  Lines          94097    94261     +164     
  Branches        9844     9873      +29     
=============================================
+ Hits           59625    59755     +130     
- Misses         30855    30903      +48     
+ Partials        3617     3603      -14     
Files with missing lines Coverage Δ
...rvice/token/impl/handlers/TokenAirdropHandler.java 84.64% <0.00%> (ø)

... and 81 files with indirect coverage changes

Impacted file tree graph

---- 🚨 Try these New Features:

Copy link

codacy-production bot commented Nov 4, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-0.03% (target: -1.00%) 0.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (5cd5714) 96916 63104 65.11%
Head commit (e41b223) 96877 (-39) 63054 (-50) 65.09% (-0.03%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#16399) 1 0 0.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

Copy link

github-actions bot commented Nov 4, 2024

Node: HAPI Test (Restart) Results

7 tests   2 ✅  3m 35s ⏱️
8 suites  0 💤
9 files    5 ❌
1 errors

For more details on these parsing errors and failures, see this check.

Results for commit e554bb2.

# Conflicts:
#	hedera-node/hedera-smart-contract-service-impl/src/test/java/com/hedera/node/app/service/contract/impl/test/exec/systemcontracts/hts/airdrops/TokenAirdropTranslatorTest.java
Signed-off-by: Stanimir Stoyanov <stanimir.stoyanov@limechain.tech>
Signed-off-by: Stanimir Stoyanov <stanimir.stoyanov@limechain.tech>
…2e-tests

# Conflicts:
#	hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/airdrops/SystemContractAirdropHelper.java
Signed-off-by: Stanimir Stoyanov <stanimir.stoyanov@limechain.tech>
# Conflicts:
#	hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/precompile/airdrops/SystemContractAirdropHelper.java
@stoyanov-st stoyanov-st marked this pull request as draft November 14, 2024 12:09
Signed-off-by: Stanimir Stoyanov <stanimir.stoyanov@limechain.tech>
@stoyanov-st stoyanov-st changed the title test: HIP-904 Additional e2e test cases where receiver contract and already associated fix: HIP-904 Additional e2e test cases where receiver contract and already associated Nov 18, 2024
Signed-off-by: Stanimir Stoyanov <stanimir.stoyanov@limechain.tech>
@stoyanov-st stoyanov-st marked this pull request as ready for review November 18, 2024 18:00
Signed-off-by: Stanimir Stoyanov <stanimir.stoyanov@limechain.tech>
Copy link
Member

@lukelee-sl lukelee-sl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. tyvm!

Copy link
Member

@Neeharika-Sompalli Neeharika-Sompalli 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 @stoyanov-st

@stoyanov-st stoyanov-st merged commit 6553ab8 into develop Nov 21, 2024
51 of 52 checks passed
@stoyanov-st stoyanov-st deleted the 15237-hip-904-e2e-tests branch November 21, 2024 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants