Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
acuarica opened this issue Nov 21, 2024 · 3 comments
Open

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

acuarica opened this issue Nov 21, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@acuarica
Copy link
Contributor

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

@acuarica acuarica added the enhancement New feature or request label Nov 21, 2024
@Nana-EC Nana-EC moved this from Backlog to Tasks In Progress in Smart Contract Sprint Board Jan 14, 2025
@Nana-EC Nana-EC self-assigned this Jan 14, 2025
@david-bakin-sl
Copy link
Member

Consider facade interface for HAS as well?

@acuarica
Copy link
Contributor Author

We should, yes.

@Nana-EC
Copy link
Collaborator

Nana-EC commented Jan 27, 2025

Working on this, making progress on an E2E IHtsFungibleToken version.
However, in implementation I've found that implementing IHRC719 may not be a base case scenario.
For a contract to associate or dissociate it would require the contract to be listed on another accounts admin key.
IHRC719 is mostly intended for contracts to execute on themselves or for EOAs to call as a facade

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Tasks In Progress
Development

No branches or pull requests

3 participants