Skip to content

feat: HTS NFT support#8476

Open
rohitsaw115 wants to merge 1 commit intomasterfrom
hts-nft
Open

feat: HTS NFT support#8476
rohitsaw115 wants to merge 1 commit intomasterfrom
hts-nft

Conversation

@rohitsaw115
Copy link
Copy Markdown
Contributor

@rohitsaw115 rohitsaw115 commented Apr 10, 2026

ticket: cecho-39

Adds support for transferring Hedera Token Service (HTS) native NFTs on the Hedera EVM (hbarevm). HTS native NFTs only support transferFrom(address,address,uint256), whereas standard Solidity ERC721 contracts use safeTransferFrom(address,address,uint256,bytes). This PR detects HTS native token contracts and routes to the appropriate ABI encoding.

@rohitsaw115 rohitsaw115 force-pushed the hts-nft branch 2 times, most recently from 45c3c66 to 68f5a03 Compare April 13, 2026 08:24
@rohitsaw115 rohitsaw115 marked this pull request as ready for review April 13, 2026 09:03
@rohitsaw115 rohitsaw115 requested a review from a team as a code owner April 13, 2026 09:03
@rohitsaw115 rohitsaw115 marked this pull request as draft April 14, 2026 18:06
@rohitsaw115 rohitsaw115 marked this pull request as ready for review April 14, 2026 18:52
@parasgarg-bitgo
Copy link
Copy Markdown
Contributor

parasgarg-bitgo commented Apr 15, 2026

Please consider creating a HBAREVM specific coin-module if the changes are coin specific and cannot be generalized

* and the entity number occupies the last 8 bytes (e.g. 0x00000000000000000000000000000000007ac203).
* Standard Solidity contracts have normal EVM addresses derived from public key hashes.
*/
export function isHtsEvmAddress(address: string): boolean {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this address format common for all EVM coins?

Copy link
Copy Markdown
Contributor Author

@rohitsaw115 rohitsaw115 Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it is only for hedera native token, which is compatiable with erc20/erc721 standard but has different address format, other evm chain has address derrived from deployer Address and salt.

buildNftTransferData(params: BuildNftTransferDataOptions): string {
if (
params.type === 'ERC721' &&
this.getFamily() === CoinFamily.HBAREVM &&
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this check be made coin agnostic?

Copy link
Copy Markdown
Contributor Author

@rohitsaw115 rohitsaw115 Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropped the coinFamily check, since isHtsEvmAddress is sufficient to detect native token on hederaEVM chain and no other evm coin has this address format.

@rohitsaw115
Copy link
Copy Markdown
Contributor Author

Please consider creating a HBAREVM specific coin-module if the changes are coin specific and cannot be generalized

hbarevm is already onboarded with sdk-coin-evm as per evm optimization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants