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: Enable NFT Airdrop to distribute multiple serials #17413

Merged
merged 3 commits into from
Jan 27, 2025

Conversation

stoyanov-st
Copy link
Contributor

Description:

This PR fixes the limit of one NFT serial Airdropped with a single transaction.
WIth this logic we can now distribute a NFT to multiple receivers.
The configured limits for airdrops are still applied here.

Related issue(s):

Fixes #17409

Notes for reviewer:

Checklist

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

@stoyanov-st stoyanov-st added this to the v0.59 milestone Jan 16, 2025
@stoyanov-st stoyanov-st self-assigned this Jan 16, 2025
@stoyanov-st stoyanov-st requested review from a team and tinker-michaelj as code owners January 16, 2025 16:08
Copy link

codacy-production bot commented Jan 16, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.23% (target: -1.00%) 100.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (79f9327) 96710 70241 72.63%
Head commit (f3c676c) 97698 (+988) 71185 (+944) 72.86% (+0.23%)

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 (#17413) 16 16 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

Copy link
Member

@david-bakin-sl david-bakin-sl left a comment

Choose a reason for hiding this comment

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

I think I'd like to see a test with multiple airdrops where one or more (but not all, and not the first in the list) fail.

Signed-off-by: Stanimir Stoyanov <[email protected]>
Copy link

codecov bot commented Jan 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.99%. Comparing base (79f9327) to head (f3c676c).
Report is 47 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main   #17413      +/-   ##
============================================
+ Coverage     68.69%   68.99%   +0.29%     
- Complexity    22520    22771     +251     
============================================
  Files          2605     2619      +14     
  Lines         96927    98272    +1345     
  Branches      10101    10184      +83     
============================================
+ Hits          66586    67800    +1214     
- Misses        26535    26644     +109     
- Partials       3806     3828      +22     
Files with missing lines Coverage Δ
...temcontracts/hts/airdrops/TokenAirdropDecoder.java 100.00% <100.00%> (ø)

... and 146 files with indirect coverage changes

Impacted file tree graph

lukelee-sl
lukelee-sl previously approved these changes Jan 21, 2025
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. Just a comment on an additional test if possible.

Signed-off-by: Stanimir Stoyanov <[email protected]>
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.

@stoyanov-st stoyanov-st merged commit 87741e3 into main Jan 27, 2025
48 of 49 checks passed
@stoyanov-st stoyanov-st deleted the 17409-nft-airdrop-distribute-fix branch January 27, 2025 08:20
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.

Airdropping an NFT with multiple serials in one TokenTransferList only sends the first serial
3 participants