Search in sources :

Example 6 with NftTransfer

use of com.hederahashgraph.api.proto.java.NftTransfer in project hedera-mirror-node by hashgraph.

the class EntityRecordItemListenerTokenTest method domainNftTransfer.

private com.hedera.mirror.common.domain.token.NftTransfer domainNftTransfer(long consensusTimestamp, AccountID receiver, AccountID sender, long serialNumber, TokenID token, AccountID payer) {
    var nftTransfer = new com.hedera.mirror.common.domain.token.NftTransfer();
    nftTransfer.setId(new NftTransferId(consensusTimestamp, serialNumber, EntityId.of(token)));
    nftTransfer.setIsApproval(false);
    nftTransfer.setPayerAccountId(EntityId.of(payer));
    if (!receiver.equals(DEFAULT_ACCOUNT_ID)) {
        nftTransfer.setReceiverAccountId(EntityId.of(receiver));
    }
    if (!sender.equals(DEFAULT_ACCOUNT_ID)) {
        nftTransfer.setSenderAccountId(EntityId.of(sender));
    }
    return nftTransfer;
}
Also used : NftTransfer(com.hederahashgraph.api.proto.java.NftTransfer) NftTransferId(com.hedera.mirror.common.domain.token.NftTransferId)

Aggregations

NftTransfer (com.hederahashgraph.api.proto.java.NftTransfer)6 TokenTransferList (com.hederahashgraph.api.proto.java.TokenTransferList)4 EntityId (com.hedera.mirror.common.domain.entity.EntityId)3 NftTransferId (com.hedera.mirror.common.domain.token.NftTransferId)3 AccountAmount (com.hederahashgraph.api.proto.java.AccountAmount)3 ArrayList (java.util.ArrayList)2 ByteString (com.google.protobuf.ByteString)1 StringValue (com.google.protobuf.StringValue)1 ContractResult (com.hedera.mirror.common.domain.contract.ContractResult)1 Entity (com.hedera.mirror.common.domain.entity.Entity)1 EntityIdEndec (com.hedera.mirror.common.domain.entity.EntityIdEndec)1 EntityType (com.hedera.mirror.common.domain.entity.EntityType)1 Nft (com.hedera.mirror.common.domain.token.Nft)1 NftId (com.hedera.mirror.common.domain.token.NftId)1 Token (com.hedera.mirror.common.domain.token.Token)1 TokenAccount (com.hedera.mirror.common.domain.token.TokenAccount)1 TokenAccountId (com.hedera.mirror.common.domain.token.TokenAccountId)1 TokenFreezeStatusEnum (com.hedera.mirror.common.domain.token.TokenFreezeStatusEnum)1 TokenId (com.hedera.mirror.common.domain.token.TokenId)1 TokenKycStatusEnum (com.hedera.mirror.common.domain.token.TokenKycStatusEnum)1