The cryptoTransfer method from the IHederaTokenService interface is a functionality that enables transfers of both HBAR (Hedera’s native cryptocurrency) and tokens (fungible or non-fungible) within the Hedera network.
It requires logic that is not yet present in the IERC721 and IERC20 interfaces, as it processes balance changes for fungible tokens in a different manner. Instead of handling individual transfers with sender, recipient, and amount details, it accounts for the net changes in balances (positive and/or negative) across all accounts. This approach requires ensuring that the overall balances reconcile to zero.
Additionally, it incorporates HBAR transfer functionality.
Interface to implement:
function cryptoTransfer(
TransferList memory transferList,
TokenTransferList[] memory tokenTransfers
) payable htsCall external returns (int64 responseCode)
The
cryptoTransfermethod from the IHederaTokenService interface is a functionality that enables transfers of both HBAR (Hedera’s native cryptocurrency) and tokens (fungible or non-fungible) within the Hedera network.It requires logic that is not yet present in the IERC721 and IERC20 interfaces, as it processes balance changes for fungible tokens in a different manner. Instead of handling individual transfers with sender, recipient, and amount details, it accounts for the net changes in balances (positive and/or negative) across all accounts. This approach requires ensuring that the overall balances reconcile to zero.
Additionally, it incorporates HBAR transfer functionality.
Interface to implement: