use of com.hedera.mirror.common.domain.token.NftTransfer in project hedera-mirror-node by hashgraph.
the class SqlEntityListenerTest method getNftTransfer.
private NftTransfer getNftTransfer(long consensusTimestamp, String tokenId, long serialNumber, String receiverId, String senderId) {
NftTransfer nftTransfer = new NftTransfer();
nftTransfer.setId(new NftTransferId(consensusTimestamp, serialNumber, EntityId.of(tokenId, TOKEN)));
nftTransfer.setReceiverAccountId(EntityId.of(receiverId, ACCOUNT));
nftTransfer.setSenderAccountId(EntityId.of(senderId, ACCOUNT));
nftTransfer.setPayerAccountId(TRANSACTION_PAYER);
return nftTransfer;
}
use of com.hedera.mirror.common.domain.token.NftTransfer in project hedera-mirror-node by hashgraph.
the class NftTransferRepositoryTest method saveMintTransfer.
@Test
void saveMintTransfer() {
NftTransfer nftTransfer = new NftTransfer();
nftTransfer.setId(new NftTransferId(1, 1, EntityId.of("0.0.1", EntityType.TOKEN)));
nftTransfer.setReceiverAccountId(EntityId.of("0.0.2", EntityType.ACCOUNT));
nftTransfer.setPayerAccountId(PAYER_ACCOUNT_ID);
NftTransfer saved = repository.save(nftTransfer);
assertThat(repository.findById(saved.getId())).contains(saved);
}
use of com.hedera.mirror.common.domain.token.NftTransfer in project hedera-mirror-node by hashgraph.
the class NftTransferRepositoryTest method save.
@Test
void save() {
NftTransfer nftTransfer = new NftTransfer();
nftTransfer.setId(new NftTransferId(1, 1, EntityId.of("0.0.1", EntityType.TOKEN)));
nftTransfer.setReceiverAccountId(EntityId.of("0.0.2", EntityType.ACCOUNT));
nftTransfer.setSenderAccountId(EntityId.of("0.0.3", EntityType.ACCOUNT));
nftTransfer.setPayerAccountId(PAYER_ACCOUNT_ID);
NftTransfer saved = repository.save(nftTransfer);
assertThat(repository.findById(saved.getId())).contains(saved);
}
use of com.hedera.mirror.common.domain.token.NftTransfer in project hedera-mirror-node by hashgraph.
the class NftTransferRepositoryTest method saveBurnTransfer.
@Test
void saveBurnTransfer() {
NftTransfer nftTransfer = new NftTransfer();
nftTransfer.setId(new NftTransferId(1, 1, EntityId.of("0.0.1", EntityType.TOKEN)));
nftTransfer.setSenderAccountId(EntityId.of("0.0.3", EntityType.ACCOUNT));
nftTransfer.setPayerAccountId(PAYER_ACCOUNT_ID);
NftTransfer saved = repository.save(nftTransfer);
assertThat(repository.findById(saved.getId())).contains(saved);
}
use of com.hedera.mirror.common.domain.token.NftTransfer in project hedera-mirror-node by hashgraph.
the class SupportDeletedTokenDissociateMigrationTest method nftTransfer.
private NftTransfer nftTransfer(long consensusTimestamp, EntityId receiver, EntityId sender, long serialNumber, EntityId tokenId) {
NftTransfer nftTransfer = new NftTransfer();
nftTransfer.setId(new NftTransferId(consensusTimestamp, serialNumber, tokenId));
nftTransfer.setReceiverAccountId(receiver);
nftTransfer.setSenderAccountId(sender);
return nftTransfer;
}
Aggregations