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

feat: HIP-904 Implement TokenClaimAirdrop System Contract #16054

Merged
merged 8 commits into from
Oct 25, 2024

Conversation

stoyanov-st
Copy link
Contributor

Description:
This PR aims to implement the TokenClaimAirdrop system contract described in https://github.com/hashgraph/hedera-services/pull/15435/files?short_path=03ab1e7#diff-03ab1e73f0ded9a04739c3b1a68c13f779dce416cd2f7b6637b03d8e2e41e105

Related issue(s):

Fixes #15590

Notes for reviewer:

This feature is enabled only for dev and previewnet envs.

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>
@stoyanov-st stoyanov-st added this to the v0.56 milestone Oct 21, 2024
@stoyanov-st stoyanov-st self-assigned this Oct 21, 2024
Copy link

codecov bot commented Oct 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.08%. Comparing base (a0cc065) to head (1faecf4).
Report is 5 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##             develop   #16054      +/-   ##
=============================================
+ Coverage      58.05%   58.08%   +0.03%     
- Complexity     19765    19791      +26     
=============================================
  Files           2726     2728       +2     
  Lines          99747    99824      +77     
  Branches       10295    10304       +9     
=============================================
+ Hits           57908    57986      +78     
  Misses         38233    38233              
+ Partials        3606     3605       -1     
Files with missing lines Coverage Δ
...p/service/contract/impl/exec/gas/DispatchType.java 100.00% <100.00%> (ø)
...act/impl/exec/processors/HtsTranslatorsModule.java 100.00% <100.00%> (ø)
...ts/hts/claimairdrops/TokenClaimAirdropDecoder.java 100.00% <100.00%> (ø)
...hts/claimairdrops/TokenClaimAirdropTranslator.java 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

Impacted file tree graph

Copy link

codacy-production bot commented Oct 21, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.03% (target: -1.00%) 100.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (a0cc065) 99564 61377 61.65%
Head commit (1faecf4) 99641 (+77) 61454 (+77) 61.68% (+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 (#16054) 78 78 100.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

Signed-off-by: Stanimir Stoyanov <stanimir.stoyanov@limechain.tech>
Copy link

github-actions bot commented Oct 21, 2024

Node: HAPI Test (Restart) Results

9 files  1 errors  8 suites   7m 20s ⏱️
7 tests 7 ✅ 0 💤 0 ❌
8 runs  8 ✅ 0 💤 0 ❌

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

Results for commit a6a3a82.

♻️ This comment has been updated with latest results.

Signed-off-by: Stanimir Stoyanov <stanimir.stoyanov@limechain.tech>
Signed-off-by: Stanimir Stoyanov <stanimir.stoyanov@limechain.tech>
@stoyanov-st stoyanov-st marked this pull request as ready for review October 22, 2024 11:18
@stoyanov-st stoyanov-st requested review from a team and tinker-michaelj as code owners October 22, 2024 11:18
Signed-off-by: Stanimir Stoyanov <stanimir.stoyanov@limechain.tech>
Signed-off-by: Stanimir Stoyanov <stanimir.stoyanov@limechain.tech>
lukelee-sl
lukelee-sl previously approved these changes Oct 23, 2024
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.

LG. The code here is very similar to the Cancel Airdrop pr. I wonder if it is worth considering if there is room for more sharing between the 2 prs?

@stoyanov-st
Copy link
Contributor Author

LG. The code here is very similar to the Cancel Airdrop pr. I wonder if it is worth considering if there is room for more sharing between the 2 prs?

I plan to add a follow up PR to extract the common logic or update the second PR whenever we merge the first (whichever gods in first)

# Conflicts:
#	hedera-node/hedera-smart-contract-service-impl/src/main/java/com/hedera/node/app/service/contract/impl/exec/gas/DispatchType.java
#	hedera-node/hedera-smart-contract-service-impl/src/main/java/com/hedera/node/app/service/contract/impl/exec/processors/HtsTranslatorsModule.java
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

@stoyanov-st stoyanov-st merged commit 2c35e13 into develop Oct 25, 2024
52 of 53 checks passed
@stoyanov-st stoyanov-st deleted the 15587-token-claim-airdrop branch October 25, 2024 06:45
netopyr added a commit that referenced this pull request Oct 25, 2024
* develop:
  feat: HIP-904 Implement TokenClaimAirdrop System Contract (#16054)
  ci: Fix bug with deleting xts-candidate tag prior to creation or use  (#16159)
  ci: Fix ZXCron Promote Build Candidate Checkout Tagged Code step (#16154)
  ci: Add logic to only delete xts-candidate tag if it already exists (#16140)
  chore: migrate cryptography from .pfx to .pem files (#16025)
Evdokia-Georgieva pushed a commit that referenced this pull request Oct 31, 2024
Signed-off-by: Stanimir Stoyanov <stanimir.stoyanov@limechain.tech>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HIP-904: Token Claim Airdrop System Contract
2 participants