Last updated
Last updated
A is a programmable, self-executing agreement designed to create, manage, or enforce the conditions of digital assets, also known as tokens. Tokens managed by smart contracts serve as digital representations of various asset types, such as artwork, cryptocurrency, and carbon credits on the blockchain. These tokens allow assets to be securely transferred between users or contracts and interact with others, adding functionality and interoperability within the blockchain ecosystem.
The and standards provide common interfaces for token contracts to standardize how tokens function across platforms. These interfaces enable tokens to be easily recognized by wallets, exchanges, and decentralized applications (dApps) in the Ethereum ecosystem. By conforming to these standards, tokens gain a predictable structure, simplifying integration for developers and ensuring users experience consistent functionality across compatible smart contract platforms.
"ERC" stands for , a protocol developers can follow to propose improvements or introduce new guidelines to the Ethereum blockchain. Hedera smart contracts are compatible with several ERC standards, allowing developers to implement these standardized interfaces. This compatibility simplifies the token integration and provides a consistent user experience with token contracts across different platforms.
With and , Hedera provides the ability to treat native HTS tokens as if they were ERC-20 (if fungible) or ERC-721 (if non-fungible) contracts. This ensures that developers have predictable functionality and minimal to not changes when bring their smart contracts to Hedera.
Explore some of the token standards supported and compatible with Hedera:
➡
➡
➡
➡
Before sending a token to a smart contract, you need to confirm whether you need to associate the token with the smart contract before transferring it. The transfer will fail if you transfer a token to a smart contract that was not associated with it first or does not have an open auto-association slot.
You can associate a smart contract with a token in the following ways:
Use the TokenAssociationTransaction
in the supported Hedera SDKs
Use the associateToken()
or associateTokens()
from .
Note: Token association
is for HTS tokens only.
Smart contract tokens like ERC-20 and ERC-721 emit events, creating contract logs that developers can query or subscribe to. Hedera Token Service (HTS) tokens are not inherently equipped with such event logs. As a solution to this limitation, Hedera Mirror Nodes now generates synthetic event logs for HTS tokens. Learn more .