Skip to content

Add detail to examples/token_airdrop and examples/token_airdrop_cancel #372

@exploreriii

Description

@exploreriii

Problem

The current token_airdrop.py and token_airdrop_cancel can benefit from more deatil
These example creates a fungible token and an NFT, associates them with a recipient, and performs a token airdrop. However, the user only sees Token airdrop ID: 0.0.6280387@1757534415.470841169 .. an ID and doesn't know what was being airdropped

✅ Success! Token association complete.

Airdropping tokens...
Token airdrop ID: 0.0.6280387@1757534415.470841169
Recipient balance after token airdrop:
0.0.6803566: 1
0.0.6803567: 1

We could add more steps in the logging so the user can see clearly what happened

Solution

Add descriptive print statements when creating tokens, minting NFTs, and airdropping tokens, e.g.:

"To airdrop a token we first create an associate the tokens to airdrop.."
"We airdrop both the fungible and nft tokens.."
"Airdropping fungible token TKA and NFT NFTA (serial 1) to recipient"

Ensure we log sender balances and receiver balances before
Update the output after the airdrop to clearly show recipient balances for each token type.
Check the sender doesn't have them after

Optionally, add a summary table of all token IDs, NFT serials, and recipient balances.
/etc

This is on the higher end of beginner friendly because you may have to leverage other queries to do the above.

Refer to contributing.md

Alternatives

No response

Metadata

Metadata

Labels

Good First IssueIssues which are ideal for a first time or new project contributor.enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions