hashgraph / hedera-smart-contracts

Contains Hedera Smart Contract Service supporting files
Apache License 2.0
46 stars 54 forks source link

Include "facade" interface for HTS fungible and non-fungible tokens #1026

Open acuarica opened 22 hours ago

acuarica commented 22 hours ago

Problem

Currently, we provide an interface for all supported methods behind 0x167, the IHederaTokenService interface.

The tokens (both fungible and non-fungible) also support methods to be called on themselves, that is, IERC20 and IERC721 respectively. In addition, both kind of tokens support association methods defined by IHRC719. However, there is no "facade" interface that contains "all" these methods combined.

Solution

Add two new interfaces IHtsFungibleToken and IHtsNonFungibleToken that would allow the user to call all methods behind a fungible and non-fungible token respectively.

interface IHtsFungibleToken is IERC20, IHRC719 {}
interface IHtsNonFungibleToken is IERC721, IHRC719 {}

Alternatives

No response