Search in sources :

Example 61 with TransactionBody

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

the class EntityRecordItemListenerPerformanceCryptoTest method getCreateAccountRecordItem.

private RecordItem getCreateAccountRecordItem(int accountNum) throws Exception {
    Transaction createTransaction = cryptoCreateTransaction();
    TransactionBody createTransactionBody = getTransactionBody(createTransaction);
    TransactionRecord createRecord = transactionRecord(createTransactionBody, ResponseCodeEnum.SUCCESS.getNumber(), accountNum);
    return new RecordItem(createTransaction, createRecord);
}
Also used : TransactionBody(com.hederahashgraph.api.proto.java.TransactionBody) Transaction(com.hederahashgraph.api.proto.java.Transaction) TransactionRecord(com.hederahashgraph.api.proto.java.TransactionRecord) RecordItem(com.hedera.mirror.common.domain.transaction.RecordItem)

Example 62 with TransactionBody

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

the class EntityRecordItemListenerPerformanceCryptoTest method getUpdateAccountRecordItem.

private RecordItem getUpdateAccountRecordItem(int accountNum) throws Exception {
    Transaction updateTransaction = cryptoUpdateTransaction(AccountID.newBuilder().setShardNum(0).setRealmNum(0).setAccountNum(accountNum).build());
    TransactionBody updateTransactionBody = getTransactionBody(updateTransaction);
    TransactionRecord createRecord = transactionRecord(updateTransactionBody, ResponseCodeEnum.SUCCESS.getNumber(), accountNum);
    return new RecordItem(updateTransaction, createRecord);
}
Also used : TransactionBody(com.hederahashgraph.api.proto.java.TransactionBody) Transaction(com.hederahashgraph.api.proto.java.Transaction) TransactionRecord(com.hederahashgraph.api.proto.java.TransactionRecord) RecordItem(com.hedera.mirror.common.domain.transaction.RecordItem)

Example 63 with TransactionBody

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

the class EntityRecordItemListenerScheduleTest method insertScheduleCreateTransaction.

private void insertScheduleCreateTransaction(long createdTimestamp, AccountID payer, ScheduleID scheduleID) {
    Transaction createTransaction = scheduleCreateTransaction(payer);
    TransactionBody createTransactionBody = getTransactionBody(createTransaction);
    var createTransactionRecord = createTransactionRecord(createdTimestamp, scheduleID, createTransactionBody, SUCCESS, false);
    parseRecordItemAndCommit(new RecordItem(createTransaction, createTransactionRecord));
}
Also used : ScheduleCreateTransactionBody(com.hederahashgraph.api.proto.java.ScheduleCreateTransactionBody) TransactionBody(com.hederahashgraph.api.proto.java.TransactionBody) ScheduleDeleteTransactionBody(com.hederahashgraph.api.proto.java.ScheduleDeleteTransactionBody) SchedulableTransactionBody(com.hederahashgraph.api.proto.java.SchedulableTransactionBody) Transaction(com.hederahashgraph.api.proto.java.Transaction) RecordItem(com.hedera.mirror.common.domain.transaction.RecordItem)

Example 64 with TransactionBody

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

the class EntityRecordItemListenerScheduleTest method insertScheduledTransaction.

private void insertScheduledTransaction(long signTimestamp, ScheduleID scheduleID, ResponseCodeEnum responseCodeEnum) {
    Transaction scheduledTransaction = scheduledTransaction();
    TransactionBody scheduledTransactionBody = getTransactionBody(scheduledTransaction);
    var scheduledTransactionRecord = createTransactionRecord(signTimestamp, scheduleID, scheduledTransactionBody, responseCodeEnum, true);
    parseRecordItemAndCommit(new RecordItem(scheduledTransaction, scheduledTransactionRecord));
}
Also used : ScheduleCreateTransactionBody(com.hederahashgraph.api.proto.java.ScheduleCreateTransactionBody) TransactionBody(com.hederahashgraph.api.proto.java.TransactionBody) ScheduleDeleteTransactionBody(com.hederahashgraph.api.proto.java.ScheduleDeleteTransactionBody) SchedulableTransactionBody(com.hederahashgraph.api.proto.java.SchedulableTransactionBody) Transaction(com.hederahashgraph.api.proto.java.Transaction) RecordItem(com.hedera.mirror.common.domain.transaction.RecordItem)

Example 65 with TransactionBody

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

the class EntityRecordItemListenerTokenTest method updateTokenFeeSchedule.

private void updateTokenFeeSchedule(TokenID tokenID, long consensusTimestamp, List<CustomFee> customFees) {
    Transaction transaction = buildTransaction(builder -> builder.getTokenFeeScheduleUpdateBuilder().setTokenId(tokenID).addAllCustomFees(convertCustomFees(customFees)));
    TransactionBody transactionBody = getTransactionBody(transaction);
    TransactionRecord transactionRecord = buildTransactionRecord(builder -> builder.setConsensusTimestamp(TestUtils.toTimestamp(consensusTimestamp)), transactionBody, ResponseCodeEnum.SUCCESS.getNumber());
    parseRecordItemAndCommit(new RecordItem(transaction, transactionRecord));
}
Also used : TransactionBody(com.hederahashgraph.api.proto.java.TransactionBody) Transaction(com.hederahashgraph.api.proto.java.Transaction) TransactionRecord(com.hederahashgraph.api.proto.java.TransactionRecord) RecordItem(com.hedera.mirror.common.domain.transaction.RecordItem)

Aggregations

TransactionBody (com.hederahashgraph.api.proto.java.TransactionBody)145 RecordItem (com.hedera.mirror.common.domain.transaction.RecordItem)106 Test (org.junit.jupiter.api.Test)100 TransactionRecord (com.hederahashgraph.api.proto.java.TransactionRecord)96 Transaction (com.hederahashgraph.api.proto.java.Transaction)91 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)91 FileAppendTransactionBody (com.hederahashgraph.api.proto.java.FileAppendTransactionBody)34 AccountID (com.hederahashgraph.api.proto.java.AccountID)32 EnumSource (org.junit.jupiter.params.provider.EnumSource)32 EntityId (com.hedera.mirror.common.domain.entity.EntityId)31 CryptoAddLiveHashTransactionBody (com.hederahashgraph.api.proto.java.CryptoAddLiveHashTransactionBody)31 CryptoCreateTransactionBody (com.hederahashgraph.api.proto.java.CryptoCreateTransactionBody)31 CryptoUpdateTransactionBody (com.hederahashgraph.api.proto.java.CryptoUpdateTransactionBody)31 FileUpdateTransactionBody (com.hederahashgraph.api.proto.java.FileUpdateTransactionBody)31 SignedTransaction (com.hederahashgraph.api.proto.java.SignedTransaction)31 Entity (com.hedera.mirror.common.domain.entity.Entity)29 ResponseCodeEnum (com.hederahashgraph.api.proto.java.ResponseCodeEnum)29 CryptoDeleteLiveHashTransactionBody (com.hederahashgraph.api.proto.java.CryptoDeleteLiveHashTransactionBody)28 FileCreateTransactionBody (com.hederahashgraph.api.proto.java.FileCreateTransactionBody)28 Contract (com.hedera.mirror.common.domain.contract.Contract)27