Open stoqnkpL opened 1 year ago
Hi @stoqnkpL would the ERC20/721 events also be emitted on HTS actions initiated from other than the HTS precompiled contract? For example if an SDK TransferTransaction
or an IERC20/721(tokenAddress).transfer()
from an EOA.
If a subgraph has an ERC20/721 Transfer
event handler then it should be indexing all HTS transfers regardless of how that transfer was initiated.
Hi @mshakeg, yes, exactly, this is the idea.
Some work was done on the Mirror Node side already to support creation of synthetic events for HAPI transactions (e.g. an SDK TransferTransaction
). This ticket captures the remaining required work.
@georgi-l95 would you say that this ticket completed?
The functions implemented in the HTS precompiled contract as part of HIP-206 and before HIP-218 was proposed and compatibility between HTS tokens and the ERC20/ERC721 industry standards was introduced, do not emit the corresponding events when the following contract functions are called:
cryptoTransfer((address,(address,int64)[],(address,address,int64)[])[])
transferTokens(address,address[],int64[])
transferToken(address,address,address,int64)
transferNFTs(address,address[],address[],int64[])
transferNFT(address,address,address,int64)
mintToken(address,uint64,bytes[])
burnToken(address,uint64,int64[])
Solution: Emit the
Transfer(address indexed from, address indexed to, uint256 value)
event on each function call.