Search in sources :

Example 1 with TransactionID

use of com.hederahashgraph.api.proto.java.TransactionID in project hedera-services by hashgraph.

the class ScheduleDeleteResourceUsageTest method returnsDefaultIfInfoMissing.

@Test
void returnsDefaultIfInfoMissing() throws Exception {
    // setup:
    long start = 1_234_567L;
    TransactionID txnId = TransactionID.newBuilder().setTransactionValidStart(Timestamp.newBuilder().setSeconds(start)).build();
    given(scheduleDeleteTxn.getTransactionID()).willReturn(txnId);
    given(view.infoForSchedule(target)).willReturn(Optional.empty());
    given(scheduleOpsUsage.scheduleDeleteUsage(scheduleDeleteTxn, sigUsage, start + 1800)).willReturn(expected);
    // expect:
    assertEquals(expected, subject.usageGiven(scheduleDeleteTxn, obj, view));
    // and:
    verify(view).infoForSchedule(target);
}
Also used : TransactionID(com.hederahashgraph.api.proto.java.TransactionID) Test(org.junit.jupiter.api.Test)

Example 2 with TransactionID

use of com.hederahashgraph.api.proto.java.TransactionID in project hedera-services by hashgraph.

the class ContextOptionValidatorTest method acceptsOk.

@Test
void acceptsOk() {
    SignedTxnAccessor accessor = mock(SignedTxnAccessor.class);
    // given:
    long validDuration = 1_000L;
    Instant consensusTime = Instant.ofEpochSecond(1_234_567L);
    Instant validStart = Instant.ofEpochSecond(consensusTime.minusSeconds(validDuration - 1).getEpochSecond());
    // and:
    TransactionID txnId = TransactionID.newBuilder().setTransactionValidStart(Timestamp.newBuilder().setSeconds(validStart.getEpochSecond())).build();
    TransactionBody txn = TransactionBody.newBuilder().setTransactionID(txnId).setTransactionValidDuration(Duration.newBuilder().setSeconds(validDuration)).build();
    // and:
    given(accessor.getTxn()).willReturn(txn);
    given(accessor.getTxnId()).willReturn(txnId);
    // when:
    ResponseCodeEnum status = subject.chronologyStatus(accessor, consensusTime);
    // then:
    assertEquals(OK, status);
}
Also used : ResponseCodeEnum(com.hederahashgraph.api.proto.java.ResponseCodeEnum) TransactionBody(com.hederahashgraph.api.proto.java.TransactionBody) Instant(java.time.Instant) SignedTxnAccessor(com.hedera.services.utils.SignedTxnAccessor) TransactionID(com.hederahashgraph.api.proto.java.TransactionID) Test(org.junit.jupiter.api.Test)

Example 3 with TransactionID

use of com.hederahashgraph.api.proto.java.TransactionID in project hedera-services by hashgraph.

the class ContextOptionValidatorTest method recognizesFutureValidStartStart.

@Test
void recognizesFutureValidStartStart() {
    SignedTxnAccessor accessor = mock(SignedTxnAccessor.class);
    // given:
    long validDuration = 1_000L;
    Instant consensusTime = Instant.ofEpochSecond(1_234_567L);
    Instant validStart = Instant.ofEpochSecond(consensusTime.plusSeconds(1L).getEpochSecond());
    // and:
    TransactionID txnId = TransactionID.newBuilder().setTransactionValidStart(Timestamp.newBuilder().setSeconds(validStart.getEpochSecond())).build();
    TransactionBody txn = TransactionBody.newBuilder().setTransactionID(txnId).setTransactionValidDuration(Duration.newBuilder().setSeconds(validDuration)).build();
    // and:
    given(accessor.getTxn()).willReturn(txn);
    given(accessor.getTxnId()).willReturn(txnId);
    // when:
    ResponseCodeEnum status = subject.chronologyStatus(accessor, consensusTime);
    // then:
    assertEquals(INVALID_TRANSACTION_START, status);
    // and:
    assertEquals(INVALID_TRANSACTION_START, subject.chronologyStatusForTxn(validStart, validDuration, consensusTime));
}
Also used : ResponseCodeEnum(com.hederahashgraph.api.proto.java.ResponseCodeEnum) TransactionBody(com.hederahashgraph.api.proto.java.TransactionBody) Instant(java.time.Instant) SignedTxnAccessor(com.hedera.services.utils.SignedTxnAccessor) TransactionID(com.hederahashgraph.api.proto.java.TransactionID) Test(org.junit.jupiter.api.Test)

Example 4 with TransactionID

use of com.hederahashgraph.api.proto.java.TransactionID in project hedera-services by hashgraph.

the class ScheduleExecutionSpecs method scheduledSubmitFailedWithInvalidChunkNumberStillPaysServiceFeeButHasNoImpact.

private HapiApiSpec scheduledSubmitFailedWithInvalidChunkNumberStillPaysServiceFeeButHasNoImpact() {
    String immutableTopic = "XXX";
    String validSchedule = "withValidChunkNumber";
    String invalidSchedule = "withInvalidChunkNumber";
    String schedulePayer = "somebody";
    String successTxn = "good", failedTxn = "bad";
    AtomicReference<Map<AccountID, Long>> successFeesObs = new AtomicReference<>();
    AtomicReference<Map<AccountID, Long>> failureFeesObs = new AtomicReference<>();
    AtomicReference<TransactionID> initialTxnId = new AtomicReference<>();
    return defaultHapiSpec("ScheduledSubmitFailedWithInvalidChunkNumberStillPaysServiceFeeButHasNoImpact").given(createTopic(immutableTopic), cryptoCreate(schedulePayer)).when(withOpContext((spec, opLog) -> {
        var subOp = usableTxnIdNamed(successTxn).payerId(schedulePayer);
        allRunFor(spec, subOp);
        initialTxnId.set(spec.registry().getTxnId(successTxn));
    }), sourcing(() -> scheduleCreate(validSchedule, submitMessageTo(immutableTopic).chunkInfo(3, 1, scheduledVersionOf(initialTxnId.get()))).txnId(successTxn).logged().signedBy(schedulePayer)), getTopicInfo(immutableTopic).hasSeqNo(1L), getTxnRecord(successTxn).scheduled().logged().revealingDebitsTo(successFeesObs::set), scheduleCreate(invalidSchedule, submitMessageTo(immutableTopic).chunkInfo(3, 111, schedulePayer)).via(failedTxn).logged().payingWith(schedulePayer)).then(getTopicInfo(immutableTopic).hasSeqNo(1L), getTxnRecord(failedTxn).scheduled().hasPriority(recordWith().status(INVALID_CHUNK_NUMBER)).revealingDebitsTo(failureFeesObs::set), assertionsHold((spec, opLog) -> Assertions.assertEquals(successFeesObs.get(), failureFeesObs.get())));
}
Also used : ACCOUNT_DELETED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.ACCOUNT_DELETED) INVALID_NFT_ID(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_NFT_ID) TxnVerbs.cryptoCreate(com.hedera.services.bdd.spec.transactions.TxnVerbs.cryptoCreate) UtilVerbs.sourcing(com.hedera.services.bdd.spec.utilops.UtilVerbs.sourcing) INVALID_TRANSACTION_BODY(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_TRANSACTION_BODY) Random(java.util.Random) TxnVerbs.cryptoTransfer(com.hedera.services.bdd.spec.transactions.TxnVerbs.cryptoTransfer) TxnVerbs.tokenDelete(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenDelete) HapiGetTxnRecord(com.hedera.services.bdd.spec.queries.meta.HapiGetTxnRecord) HapiSpecSetup(com.hedera.services.bdd.spec.HapiSpecSetup) QueryVerbs.getTxnRecord(com.hedera.services.bdd.spec.queries.QueryVerbs.getTxnRecord) TxnUtils.asId(com.hedera.services.bdd.spec.transactions.TxnUtils.asId) QueryVerbs.getAccountInfo(com.hedera.services.bdd.spec.queries.QueryVerbs.getAccountInfo) NO_NEW_VALID_SIGNATURES(com.hederahashgraph.api.proto.java.ResponseCodeEnum.NO_NEW_VALID_SIGNATURES) INVALID_TOKEN_MINT_AMOUNT(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_TOKEN_MINT_AMOUNT) Map(java.util.Map) HapiApiSpec.defaultHapiSpec(com.hedera.services.bdd.spec.HapiApiSpec.defaultHapiSpec) HapiCryptoTransfer.tinyBarsFromTo(com.hedera.services.bdd.spec.transactions.crypto.HapiCryptoTransfer.tinyBarsFromTo) INVALID_ACCOUNT_AMOUNTS(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_ACCOUNT_AMOUNTS) SCHEDULE_ALREADY_EXECUTED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.SCHEDULE_ALREADY_EXECUTED) BATCH_SIZE_LIMIT_EXCEEDED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.BATCH_SIZE_LIMIT_EXCEEDED) MESSAGE_SIZE_TOO_LARGE(com.hederahashgraph.api.proto.java.ResponseCodeEnum.MESSAGE_SIZE_TOO_LARGE) TxnVerbs.scheduleCreate(com.hedera.services.bdd.spec.transactions.TxnVerbs.scheduleCreate) UtilVerbs.newKeyNamed(com.hedera.services.bdd.spec.utilops.UtilVerbs.newKeyNamed) TxnVerbs.deleteTopic(com.hedera.services.bdd.spec.transactions.TxnVerbs.deleteTopic) TxnVerbs.submitMessageTo(com.hedera.services.bdd.spec.transactions.TxnVerbs.submitMessageTo) INVALID_TOKEN_BURN_AMOUNT(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_TOKEN_BURN_AMOUNT) TransactionRecordAsserts.recordWith(com.hedera.services.bdd.spec.assertions.TransactionRecordAsserts.recordWith) SUCCESS(com.hederahashgraph.api.proto.java.ResponseCodeEnum.SUCCESS) TOKEN_NOT_ASSOCIATED_TO_ACCOUNT(com.hederahashgraph.api.proto.java.ResponseCodeEnum.TOKEN_NOT_ASSOCIATED_TO_ACCOUNT) ByteString(com.google.protobuf.ByteString) AccountAmount(com.hederahashgraph.api.proto.java.AccountAmount) List(java.util.List) Logger(org.apache.logging.log4j.Logger) UtilVerbs.assertionsHold(com.hedera.services.bdd.spec.utilops.UtilVerbs.assertionsHold) TxnVerbs.grantTokenKyc(com.hedera.services.bdd.spec.transactions.TxnVerbs.grantTokenKyc) UNRESOLVABLE_REQUIRED_SIGNERS(com.hederahashgraph.api.proto.java.ResponseCodeEnum.UNRESOLVABLE_REQUIRED_SIGNERS) TxnUtils.randomUppercase(com.hedera.services.bdd.spec.transactions.TxnUtils.randomUppercase) UtilVerbs.usableTxnIdNamed(com.hedera.services.bdd.spec.utilops.UtilVerbs.usableTxnIdNamed) HapiApiSpec(com.hedera.services.bdd.spec.HapiApiSpec) METADATA_TOO_LONG(com.hederahashgraph.api.proto.java.ResponseCodeEnum.METADATA_TOO_LONG) TRANSFERS_NOT_ZERO_SUM_FOR_TOKEN(com.hederahashgraph.api.proto.java.ResponseCodeEnum.TRANSFERS_NOT_ZERO_SUM_FOR_TOKEN) TxnVerbs.tokenAssociate(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenAssociate) INSUFFICIENT_PAYER_BALANCE(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INSUFFICIENT_PAYER_BALANCE) INSUFFICIENT_ACCOUNT_BALANCE(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INSUFFICIENT_ACCOUNT_BALANCE) UtilVerbs.withOpContext(com.hedera.services.bdd.spec.utilops.UtilVerbs.withOpContext) QueryVerbs.getTokenInfo(com.hedera.services.bdd.spec.queries.QueryVerbs.getTokenInfo) QueryVerbs.getTopicInfo(com.hedera.services.bdd.spec.queries.QueryVerbs.getTopicInfo) TxnVerbs.createTopic(com.hedera.services.bdd.spec.transactions.TxnVerbs.createTopic) AtomicReference(java.util.concurrent.atomic.AtomicReference) EMPTY_TOKEN_TRANSFER_ACCOUNT_AMOUNTS(com.hederahashgraph.api.proto.java.ResponseCodeEnum.EMPTY_TOKEN_TRANSFER_ACCOUNT_AMOUNTS) TOKEN_WAS_DELETED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.TOKEN_WAS_DELETED) TOKEN_HAS_NO_SUPPLY_KEY(com.hederahashgraph.api.proto.java.ResponseCodeEnum.TOKEN_HAS_NO_SUPPLY_KEY) TokenMovement.moving(com.hedera.services.bdd.spec.transactions.token.TokenMovement.moving) HapiApiSuite(com.hedera.services.bdd.suites.HapiApiSuite) TxnVerbs.cryptoDelete(com.hedera.services.bdd.spec.transactions.TxnVerbs.cryptoDelete) TxnVerbs.invalidBurnToken(com.hedera.services.bdd.spec.transactions.TxnVerbs.invalidBurnToken) INSUFFICIENT_TOKEN_BALANCE(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INSUFFICIENT_TOKEN_BALANCE) ScheduleRecordSpecs.scheduledVersionOf(com.hedera.services.bdd.suites.schedule.ScheduleRecordSpecs.scheduledVersionOf) ACCOUNT_KYC_NOT_GRANTED_FOR_TOKEN(com.hederahashgraph.api.proto.java.ResponseCodeEnum.ACCOUNT_KYC_NOT_GRANTED_FOR_TOKEN) TxnVerbs.revokeTokenKyc(com.hedera.services.bdd.spec.transactions.TxnVerbs.revokeTokenKyc) AccountID(com.hederahashgraph.api.proto.java.AccountID) TxnVerbs.mintToken(com.hedera.services.bdd.spec.transactions.TxnVerbs.mintToken) TxnVerbs.tokenCreate(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenCreate) SOME_SIGNATURES_WERE_INVALID(com.hederahashgraph.api.proto.java.ResponseCodeEnum.SOME_SIGNATURES_WERE_INVALID) INVALID_CHUNK_NUMBER(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_CHUNK_NUMBER) TxnVerbs.updateTopic(com.hedera.services.bdd.spec.transactions.TxnVerbs.updateTopic) ACCOUNT_FROZEN_FOR_TOKEN(com.hederahashgraph.api.proto.java.ResponseCodeEnum.ACCOUNT_FROZEN_FOR_TOKEN) TxnVerbs.tokenFreeze(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenFreeze) UtilVerbs.recordFeeAmount(com.hedera.services.bdd.spec.utilops.UtilVerbs.recordFeeAmount) INVALID_TOKEN_BURN_METADATA(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_TOKEN_BURN_METADATA) TOKEN_ID_REPEATED_IN_TOKEN_LIST(com.hederahashgraph.api.proto.java.ResponseCodeEnum.TOKEN_ID_REPEATED_IN_TOKEN_LIST) TxnVerbs.scheduleSign(com.hedera.services.bdd.spec.transactions.TxnVerbs.scheduleSign) HapiCryptoTransfer.tinyBarsFromToWithInvalidAmounts(com.hedera.services.bdd.spec.transactions.crypto.HapiCryptoTransfer.tinyBarsFromToWithInvalidAmounts) TransactionID(com.hederahashgraph.api.proto.java.TransactionID) QueryVerbs.getAccountBalance(com.hedera.services.bdd.spec.queries.QueryVerbs.getAccountBalance) TxnVerbs.burnToken(com.hedera.services.bdd.spec.transactions.TxnVerbs.burnToken) CustomSpecAssert.allRunFor(com.hedera.services.bdd.spec.utilops.CustomSpecAssert.allRunFor) QueryVerbs.getScheduleInfo(com.hedera.services.bdd.spec.queries.QueryVerbs.getScheduleInfo) TokenType(com.hederahashgraph.api.proto.java.TokenType) TxnVerbs.invalidMintToken(com.hedera.services.bdd.spec.transactions.TxnVerbs.invalidMintToken) INVALID_CHUNK_TRANSACTION_ID(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_CHUNK_TRANSACTION_ID) Assertions(org.junit.jupiter.api.Assertions) LogManager(org.apache.logging.log4j.LogManager) TxnVerbs.tokenUnfreeze(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenUnfreeze) AtomicReference(java.util.concurrent.atomic.AtomicReference) ByteString(com.google.protobuf.ByteString) Map(java.util.Map) TransactionID(com.hederahashgraph.api.proto.java.TransactionID)

Example 5 with TransactionID

use of com.hederahashgraph.api.proto.java.TransactionID in project hedera-services by hashgraph.

the class ScheduleExecutionSpecs method scheduledSubmitFailedWithInvalidChunkTxnIdStillPaysServiceFeeButHasNoImpact.

private HapiApiSpec scheduledSubmitFailedWithInvalidChunkTxnIdStillPaysServiceFeeButHasNoImpact() {
    String immutableTopic = "XXX";
    String validSchedule = "withValidChunkTxnId";
    String invalidSchedule = "withInvalidChunkTxnId";
    String schedulePayer = "somebody";
    String successTxn = "good", failedTxn = "bad";
    AtomicReference<Map<AccountID, Long>> successFeesObs = new AtomicReference<>();
    AtomicReference<Map<AccountID, Long>> failureFeesObs = new AtomicReference<>();
    AtomicReference<TransactionID> initialTxnId = new AtomicReference<>();
    AtomicReference<TransactionID> irrelevantTxnId = new AtomicReference<>();
    return defaultHapiSpec("ScheduledSubmitFailedWithInvalidChunkTxnIdStillPaysServiceFeeButHasNoImpact").given(createTopic(immutableTopic), cryptoCreate(schedulePayer)).when(withOpContext((spec, opLog) -> {
        var subOp = usableTxnIdNamed(successTxn).payerId(schedulePayer);
        var secondSubOp = usableTxnIdNamed("wontWork").payerId(schedulePayer);
        allRunFor(spec, subOp, secondSubOp);
        initialTxnId.set(spec.registry().getTxnId(successTxn));
        irrelevantTxnId.set(spec.registry().getTxnId("wontWork"));
    }), sourcing(() -> scheduleCreate(validSchedule, submitMessageTo(immutableTopic).chunkInfo(3, 1, scheduledVersionOf(initialTxnId.get()))).txnId(successTxn).logged().signedBy(schedulePayer)), getTopicInfo(immutableTopic).hasSeqNo(1L), getTxnRecord(successTxn).scheduled().logged().revealingDebitsTo(successFeesObs::set), sourcing(() -> scheduleCreate(invalidSchedule, submitMessageTo(immutableTopic).chunkInfo(3, 1, scheduledVersionOf(irrelevantTxnId.get()))).designatingPayer(schedulePayer).via(failedTxn).logged().signedBy(DEFAULT_PAYER, schedulePayer))).then(getTopicInfo(immutableTopic).hasSeqNo(1L), getTxnRecord(failedTxn).scheduled().hasPriority(recordWith().status(INVALID_CHUNK_TRANSACTION_ID)).revealingDebitsTo(failureFeesObs::set), assertionsHold((spec, opLog) -> Assertions.assertEquals(successFeesObs.get(), failureFeesObs.get())));
}
Also used : ACCOUNT_DELETED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.ACCOUNT_DELETED) INVALID_NFT_ID(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_NFT_ID) TxnVerbs.cryptoCreate(com.hedera.services.bdd.spec.transactions.TxnVerbs.cryptoCreate) UtilVerbs.sourcing(com.hedera.services.bdd.spec.utilops.UtilVerbs.sourcing) INVALID_TRANSACTION_BODY(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_TRANSACTION_BODY) Random(java.util.Random) TxnVerbs.cryptoTransfer(com.hedera.services.bdd.spec.transactions.TxnVerbs.cryptoTransfer) TxnVerbs.tokenDelete(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenDelete) HapiGetTxnRecord(com.hedera.services.bdd.spec.queries.meta.HapiGetTxnRecord) HapiSpecSetup(com.hedera.services.bdd.spec.HapiSpecSetup) QueryVerbs.getTxnRecord(com.hedera.services.bdd.spec.queries.QueryVerbs.getTxnRecord) TxnUtils.asId(com.hedera.services.bdd.spec.transactions.TxnUtils.asId) QueryVerbs.getAccountInfo(com.hedera.services.bdd.spec.queries.QueryVerbs.getAccountInfo) NO_NEW_VALID_SIGNATURES(com.hederahashgraph.api.proto.java.ResponseCodeEnum.NO_NEW_VALID_SIGNATURES) INVALID_TOKEN_MINT_AMOUNT(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_TOKEN_MINT_AMOUNT) Map(java.util.Map) HapiApiSpec.defaultHapiSpec(com.hedera.services.bdd.spec.HapiApiSpec.defaultHapiSpec) HapiCryptoTransfer.tinyBarsFromTo(com.hedera.services.bdd.spec.transactions.crypto.HapiCryptoTransfer.tinyBarsFromTo) INVALID_ACCOUNT_AMOUNTS(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_ACCOUNT_AMOUNTS) SCHEDULE_ALREADY_EXECUTED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.SCHEDULE_ALREADY_EXECUTED) BATCH_SIZE_LIMIT_EXCEEDED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.BATCH_SIZE_LIMIT_EXCEEDED) MESSAGE_SIZE_TOO_LARGE(com.hederahashgraph.api.proto.java.ResponseCodeEnum.MESSAGE_SIZE_TOO_LARGE) TxnVerbs.scheduleCreate(com.hedera.services.bdd.spec.transactions.TxnVerbs.scheduleCreate) UtilVerbs.newKeyNamed(com.hedera.services.bdd.spec.utilops.UtilVerbs.newKeyNamed) TxnVerbs.deleteTopic(com.hedera.services.bdd.spec.transactions.TxnVerbs.deleteTopic) TxnVerbs.submitMessageTo(com.hedera.services.bdd.spec.transactions.TxnVerbs.submitMessageTo) INVALID_TOKEN_BURN_AMOUNT(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_TOKEN_BURN_AMOUNT) TransactionRecordAsserts.recordWith(com.hedera.services.bdd.spec.assertions.TransactionRecordAsserts.recordWith) SUCCESS(com.hederahashgraph.api.proto.java.ResponseCodeEnum.SUCCESS) TOKEN_NOT_ASSOCIATED_TO_ACCOUNT(com.hederahashgraph.api.proto.java.ResponseCodeEnum.TOKEN_NOT_ASSOCIATED_TO_ACCOUNT) ByteString(com.google.protobuf.ByteString) AccountAmount(com.hederahashgraph.api.proto.java.AccountAmount) List(java.util.List) Logger(org.apache.logging.log4j.Logger) UtilVerbs.assertionsHold(com.hedera.services.bdd.spec.utilops.UtilVerbs.assertionsHold) TxnVerbs.grantTokenKyc(com.hedera.services.bdd.spec.transactions.TxnVerbs.grantTokenKyc) UNRESOLVABLE_REQUIRED_SIGNERS(com.hederahashgraph.api.proto.java.ResponseCodeEnum.UNRESOLVABLE_REQUIRED_SIGNERS) TxnUtils.randomUppercase(com.hedera.services.bdd.spec.transactions.TxnUtils.randomUppercase) UtilVerbs.usableTxnIdNamed(com.hedera.services.bdd.spec.utilops.UtilVerbs.usableTxnIdNamed) HapiApiSpec(com.hedera.services.bdd.spec.HapiApiSpec) METADATA_TOO_LONG(com.hederahashgraph.api.proto.java.ResponseCodeEnum.METADATA_TOO_LONG) TRANSFERS_NOT_ZERO_SUM_FOR_TOKEN(com.hederahashgraph.api.proto.java.ResponseCodeEnum.TRANSFERS_NOT_ZERO_SUM_FOR_TOKEN) TxnVerbs.tokenAssociate(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenAssociate) INSUFFICIENT_PAYER_BALANCE(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INSUFFICIENT_PAYER_BALANCE) INSUFFICIENT_ACCOUNT_BALANCE(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INSUFFICIENT_ACCOUNT_BALANCE) UtilVerbs.withOpContext(com.hedera.services.bdd.spec.utilops.UtilVerbs.withOpContext) QueryVerbs.getTokenInfo(com.hedera.services.bdd.spec.queries.QueryVerbs.getTokenInfo) QueryVerbs.getTopicInfo(com.hedera.services.bdd.spec.queries.QueryVerbs.getTopicInfo) TxnVerbs.createTopic(com.hedera.services.bdd.spec.transactions.TxnVerbs.createTopic) AtomicReference(java.util.concurrent.atomic.AtomicReference) EMPTY_TOKEN_TRANSFER_ACCOUNT_AMOUNTS(com.hederahashgraph.api.proto.java.ResponseCodeEnum.EMPTY_TOKEN_TRANSFER_ACCOUNT_AMOUNTS) TOKEN_WAS_DELETED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.TOKEN_WAS_DELETED) TOKEN_HAS_NO_SUPPLY_KEY(com.hederahashgraph.api.proto.java.ResponseCodeEnum.TOKEN_HAS_NO_SUPPLY_KEY) TokenMovement.moving(com.hedera.services.bdd.spec.transactions.token.TokenMovement.moving) HapiApiSuite(com.hedera.services.bdd.suites.HapiApiSuite) TxnVerbs.cryptoDelete(com.hedera.services.bdd.spec.transactions.TxnVerbs.cryptoDelete) TxnVerbs.invalidBurnToken(com.hedera.services.bdd.spec.transactions.TxnVerbs.invalidBurnToken) INSUFFICIENT_TOKEN_BALANCE(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INSUFFICIENT_TOKEN_BALANCE) ScheduleRecordSpecs.scheduledVersionOf(com.hedera.services.bdd.suites.schedule.ScheduleRecordSpecs.scheduledVersionOf) ACCOUNT_KYC_NOT_GRANTED_FOR_TOKEN(com.hederahashgraph.api.proto.java.ResponseCodeEnum.ACCOUNT_KYC_NOT_GRANTED_FOR_TOKEN) TxnVerbs.revokeTokenKyc(com.hedera.services.bdd.spec.transactions.TxnVerbs.revokeTokenKyc) AccountID(com.hederahashgraph.api.proto.java.AccountID) TxnVerbs.mintToken(com.hedera.services.bdd.spec.transactions.TxnVerbs.mintToken) TxnVerbs.tokenCreate(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenCreate) SOME_SIGNATURES_WERE_INVALID(com.hederahashgraph.api.proto.java.ResponseCodeEnum.SOME_SIGNATURES_WERE_INVALID) INVALID_CHUNK_NUMBER(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_CHUNK_NUMBER) TxnVerbs.updateTopic(com.hedera.services.bdd.spec.transactions.TxnVerbs.updateTopic) ACCOUNT_FROZEN_FOR_TOKEN(com.hederahashgraph.api.proto.java.ResponseCodeEnum.ACCOUNT_FROZEN_FOR_TOKEN) TxnVerbs.tokenFreeze(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenFreeze) UtilVerbs.recordFeeAmount(com.hedera.services.bdd.spec.utilops.UtilVerbs.recordFeeAmount) INVALID_TOKEN_BURN_METADATA(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_TOKEN_BURN_METADATA) TOKEN_ID_REPEATED_IN_TOKEN_LIST(com.hederahashgraph.api.proto.java.ResponseCodeEnum.TOKEN_ID_REPEATED_IN_TOKEN_LIST) TxnVerbs.scheduleSign(com.hedera.services.bdd.spec.transactions.TxnVerbs.scheduleSign) HapiCryptoTransfer.tinyBarsFromToWithInvalidAmounts(com.hedera.services.bdd.spec.transactions.crypto.HapiCryptoTransfer.tinyBarsFromToWithInvalidAmounts) TransactionID(com.hederahashgraph.api.proto.java.TransactionID) QueryVerbs.getAccountBalance(com.hedera.services.bdd.spec.queries.QueryVerbs.getAccountBalance) TxnVerbs.burnToken(com.hedera.services.bdd.spec.transactions.TxnVerbs.burnToken) CustomSpecAssert.allRunFor(com.hedera.services.bdd.spec.utilops.CustomSpecAssert.allRunFor) QueryVerbs.getScheduleInfo(com.hedera.services.bdd.spec.queries.QueryVerbs.getScheduleInfo) TokenType(com.hederahashgraph.api.proto.java.TokenType) TxnVerbs.invalidMintToken(com.hedera.services.bdd.spec.transactions.TxnVerbs.invalidMintToken) INVALID_CHUNK_TRANSACTION_ID(com.hederahashgraph.api.proto.java.ResponseCodeEnum.INVALID_CHUNK_TRANSACTION_ID) Assertions(org.junit.jupiter.api.Assertions) LogManager(org.apache.logging.log4j.LogManager) TxnVerbs.tokenUnfreeze(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenUnfreeze) AtomicReference(java.util.concurrent.atomic.AtomicReference) ByteString(com.google.protobuf.ByteString) Map(java.util.Map) TransactionID(com.hederahashgraph.api.proto.java.TransactionID)

Aggregations

TransactionID (com.hederahashgraph.api.proto.java.TransactionID)21 Test (org.junit.jupiter.api.Test)13 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)8 RecordItem (com.hedera.mirror.common.domain.transaction.RecordItem)7 Instant (java.time.Instant)5 TransactionBody (com.hederahashgraph.api.proto.java.TransactionBody)4 ByteString (com.google.protobuf.ByteString)3 HapiSpecSetup (com.hedera.services.bdd.spec.HapiSpecSetup)3 AccountID (com.hederahashgraph.api.proto.java.AccountID)3 List (java.util.List)3 AtomicReference (java.util.concurrent.atomic.AtomicReference)3 HapiApiSpec (com.hedera.services.bdd.spec.HapiApiSpec)2 HapiApiSpec.defaultHapiSpec (com.hedera.services.bdd.spec.HapiApiSpec.defaultHapiSpec)2 TransactionRecordAsserts.recordWith (com.hedera.services.bdd.spec.assertions.TransactionRecordAsserts.recordWith)2 QueryVerbs.getAccountBalance (com.hedera.services.bdd.spec.queries.QueryVerbs.getAccountBalance)2 QueryVerbs.getAccountInfo (com.hedera.services.bdd.spec.queries.QueryVerbs.getAccountInfo)2 QueryVerbs.getScheduleInfo (com.hedera.services.bdd.spec.queries.QueryVerbs.getScheduleInfo)2 QueryVerbs.getTokenInfo (com.hedera.services.bdd.spec.queries.QueryVerbs.getTokenInfo)2 QueryVerbs.getTopicInfo (com.hedera.services.bdd.spec.queries.QueryVerbs.getTopicInfo)2 QueryVerbs.getTxnRecord (com.hedera.services.bdd.spec.queries.QueryVerbs.getTxnRecord)2