Search in sources :

Example 11 with NftTransferId

use of com.hedera.mirror.common.domain.token.NftTransferId 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)

Example 12 with NftTransferId

use of com.hedera.mirror.common.domain.token.NftTransferId in project hedera-mirror-node by hashgraph.

the class BatchUpserterTest method getNftTransfer.

private NftTransfer getNftTransfer(EntityId tokenId, EntityId senderAccountId, long serialNumber, long consensusTimestamp) {
    NftTransfer nftTransfer = new NftTransfer();
    nftTransfer.setId(new NftTransferId(consensusTimestamp, serialNumber, tokenId));
    nftTransfer.setIsApproval(false);
    nftTransfer.setSenderAccountId(senderAccountId);
    return nftTransfer;
}
Also used : NftTransfer(com.hedera.mirror.common.domain.token.NftTransfer) NftTransferId(com.hedera.mirror.common.domain.token.NftTransferId)

Aggregations

NftTransferId (com.hedera.mirror.common.domain.token.NftTransferId)12 NftTransfer (com.hedera.mirror.common.domain.token.NftTransfer)8 EntityId (com.hedera.mirror.common.domain.entity.EntityId)4 NftTransfer (com.hederahashgraph.api.proto.java.NftTransfer)4 Test (org.junit.jupiter.api.Test)4 Range (com.google.common.collect.Range)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 TOKEN (com.hedera.mirror.common.domain.entity.EntityType.TOKEN)1 TokenTransfer (com.hedera.mirror.common.domain.token.TokenTransfer)1 AssessedCustomFee (com.hedera.mirror.common.domain.transaction.AssessedCustomFee)1 CryptoTransfer (com.hedera.mirror.common.domain.transaction.CryptoTransfer)1 NonFeeTransfer (com.hedera.mirror.common.domain.transaction.NonFeeTransfer)1 TransactionType (com.hedera.mirror.common.domain.transaction.TransactionType)1 EnabledIfV1 (com.hedera.mirror.importer.EnabledIfV1)1 IntegrationTest (com.hedera.mirror.importer.IntegrationTest)1 CryptoTransferRepository (com.hedera.mirror.importer.repository.CryptoTransferRepository)1 EntityRepository (com.hedera.mirror.importer.repository.EntityRepository)1 NftTransferRepository (com.hedera.mirror.importer.repository.NftTransferRepository)1