hashgraph / hedera-sdk-go

Hedera™ Hashgraph SDK for Go
https://docs.hedera.com/docs/hedera-sdks
Apache License 2.0
88 stars 64 forks source link

Add HIP-904 Token Airdrops Example #1027

Open SimiHunjan opened 3 weeks ago

SimiHunjan commented 3 weeks ago

Problem

Example: Create four accounts Account 1 has unlimited auto associations Account 2 has one auto association Account 3 has no auto associations Account 4 is the treasury account for the tokens about to be created Create a new fungible token Create a new NFT Mint 3 of the NFTs Associate Account 2 with the fungible token Airdrop the fungible token to all three accounts Get the transaction record and see one pending airdrop (for Account 3) Query to verify Account 1 and Account 2 received the airdrops and Account 3 did not Claim the airdrop for Account 3 Query to verify Account 3 received the airdrop Airdrop the NFTs to all three accounts Get the transaction record and verify two pending airdrops (for Account 2 & 3) Query to verify Account 1 received the airdrop and Account 2 and Account 3 did not Claim the airdrop for Account 2 Query to verify Account 2 received the airdrop Cancel the airdrop for Account 3 Query to verify Account 3 did not receive the airdrop Reject the NFT for Account 2 Query to verify Account 2 no longer has the NFT Query to verify the NFT was returned to Account 4 Reject the fungible tokens for Account 3 Query to verify Account 3 no longer has the fungible tokens Query to verify Account 4 received the rejected fungible tokens

Solution

Add support for each feature according to the Services release plan for this HIP.

Alternatives

No response