Conversation
45c3c66 to
68f5a03
Compare
|
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 { |
There was a problem hiding this comment.
Is this address format common for all EVM coins?
There was a problem hiding this comment.
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 && |
There was a problem hiding this comment.
Can this check be made coin agnostic?
There was a problem hiding this comment.
Dropped the coinFamily check, since isHtsEvmAddress is sufficient to detect native token on hederaEVM chain and no other evm coin has this address format.
hbarevm is already onboarded with sdk-coin-evm as per evm optimization. |
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 usesafeTransferFrom(address,address,uint256,bytes). This PR detects HTS native token contracts and routes to the appropriate ABI encoding.