The above text says you can call your HTS token within a smart contract but does not make it clear that you can call the HTS token directly as the smart contract. It needs to somehow convey that you can call HTS tokens as solidity smart contracts by using it's solidity address or converting the TokenId into a ContractId. You can convert the TokenId into a ContractId using something along the lines of ContractId.fromString(tokenId.toString()).
It is unclear what use cases this contact supports because using the HTS token as the contract is more straightforward.
The confusing part here is the contract is named ERC20Contract but in reality the name should be more like "ContractThatCallsHTSTokenUsingERCStandardCalls". It's a pretty long name but it should be named something alone those lines. There are also methods that are marked as not supported in the solidity contract but are supported in the docs. relevant issue to request to update the contracts is https://github.com/hashgraph/hedera-services/issues/5900
Description
Currently this page https://docs.hedera.com/hedera/core-concepts/smart-contracts/supported-erc-token-standards states: "Interact with Hedera Token Service fungible and non-fungible tokens in your Solidity contract using ERC-20 and ERC-721 standards."
The above text says you can call your HTS token within a smart contract but does not make it clear that you can call the HTS token directly as the smart contract. It needs to somehow convey that you can call HTS tokens as solidity smart contracts by using it's solidity address or converting the
TokenId
into aContractId
. You can convert the TokenId into a ContractId using something along the lines ofContractId.fromString(tokenId.toString())
.In addition, the following contract is linked at the bottom of the page: https://github.com/hashgraph/hedera-services/blob/main/test-clients/src/main/resource/contract/contracts/ERC20Contract/ERC20Contract.sol.
It is unclear what use cases this contact supports because using the HTS token as the contract is more straightforward.
The confusing part here is the contract is named ERC20Contract but in reality the name should be more like "ContractThatCallsHTSTokenUsingERCStandardCalls". It's a pretty long name but it should be named something alone those lines. There are also methods that are marked as not supported in the solidity contract but are supported in the docs. relevant issue to request to update the contracts is https://github.com/hashgraph/hedera-services/issues/5900
Steps to reproduce
see description above.
Additional context
No response
Hedera network
mainnet, testnet, previewnet
Version
2.23.0
Operating system
macOS