Skip to content

Implement the cryptoTransfer method defined in the IHederaTokenService #195

@arianejasuwienas

Description

@arianejasuwienas

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)

Metadata

Metadata

Assignees

Labels

featureEnhancing an existing feature driven by business requirements. Typically backwards compatible.

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions