Frictionless Airdrops and Update Token Custom Fee Schedules via Smart Contract
The Hedera team and community are constantly working to improve the network and deliver the best possible user experience for enthusiasts, developers, and enterprises alike. With the release of mainnet upgrade to version 0.54, a number of new features and capabilities have been implemented to enhance the functionality of the Hedera network. Let’s explore:
HIP-904: Frictionless Airdrops - Full Implementation
Mainnet release v0.53 included several technical components key to the implementation of HIP-904: Frictionless Airdrops on Hedera, including Unlimited Max Automatic Associations - enabling accounts to automatically associate with an unlimited number of tokens (both fungible and non-fungible) that have been sent to them - and, in relation, Sender Pays Auto Associations - charging association fees to the sender of the tokens as opposed to receivers pre-paying for automatic association slots whether they are used or not.
With the release of mainnet v0.54, all additional core features of Frictionless Airdrops - empowering token creators and users alike - have been implemented. Detailed briefly below are some of the key components of Frictionless Airdrops:
Pending Token Transfers
- Allows sent/received tokens to be kept in a "pending" state - as opposed to the transaction outright failing - when the receiver account has no available or automatic association slots remaining.
TokenAirdrop
- Enables senders to distribute tokens to multiple recipients in a single transaction, with consideration of account association properties.
TokenClaimAirdrop
- Enables receivers to selectively claim airdropped tokens that are in a pending state.
TokenCancelAirdrop
- Enables the ability for token senders to cancel unclaimed airdropped tokens post-distribution.
TokenReject (implemented previously in v0.53)
- Enables receivers the ability to transfer either their entire balance of a fungible token or specific non-fungible token serials back to the token's treasury account, regardless of how these tokens were acquired.
For a more detailed look at what Frictionless Airdrops brings to the Hedera ecosystem as well as deeper insights into each of the major features and new transactions that have been implemented, dive into our dedicated blog on Frictionless Airdrops here.
HIP-1010: Update Token Custom Fee Schedules via Smart Contracts
The implementation of HIP-1010 extends the capabilities of smart contracts in managing token fee schedules, introducing the ability to update or remove Custom Fees for tokens. Two new system contract functions in the Hedera Smart Contract Service (HSCS) have been introduced:
updateFungibleTokenCustomFees
- Specifically handles fee updates for fungible tokens, allowing the setting of both fixed fees (which can be in HBAR or other tokens) and fractional fees (percentage-based fees).
updateNonFungibleTokenCustomFees
- Specifically handles fee updates for non-fungible tokens (NFTs), allowing the setting of both fixed fees and royalty fees.
Both functions are designed to work within the existing Hedera Token Service (HTS) system contract interface (IHederaTokenService) and utilize the existing HAPI transaction for TokenFeeScheduleUpdate. The separation into two distinct functions was chosen over a unified approach to provide a cleaner solution that clearly differentiates between fungible and non-fungible token fee structures.
The implementation ensures backward compatibility as it doesn't modify existing features, and security is maintained by adopting the HAPI authorization logic - meaning transactions will only succeed if the contract making the call is set as a feeScheduleKey to the token or is part of a threshold key set.
For more information, refer to HIP-1010 or check out this GitHub repository with code examples.
Stay tuned for more updates and information moving forward as we continue to improve the Hedera network for our users, developers, and community.
Hello Future.