Tokens Managed by Smart Contracts
Last updated
Was this helpful?
Last updated
Was this helpful?
can be used to create, manage, or serve as the description of tokens. A token is a digital representation of an asset that can include artwork, , carbon credits, etc.
The and standards define a common interface for token contracts, enabling interoperability between wallets, exchanges, and standardized interaction between different smart contracts and in the Ethereum ecosystem. ERC stands for Ethereum Request for Comments, where developers can propose improvements, new features, and protocols for the Ethereum blockchain.
Implementing these interfaces simplifies the process of integrating tokens into applications for developers and ensures consistent user interactions with token contracts. Hedera smart contracts support the following ERCs:
➡
➡
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 .
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 .