Search in sources :

Example 1 with TRUE

use of com.hedera.services.bdd.spec.HapiApiSpec.UTF8Mode.TRUE in project hedera-services by hashgraph.

the class TxnFactory method defaultBodySpec.

public Consumer<TransactionBody.Builder> defaultBodySpec() {
    TransactionID defaultTxnId = defaultTransactionID();
    if (r.nextDouble() < TXN_ID_SAMPLE_PROBABILITY) {
        sampleTxnId.set(defaultTxnId);
    }
    final var memoToUse = (setup.isMemoUTF8() == TRUE) ? setup.defaultUTF8memo() : setup.defaultMemo();
    return builder -> builder.setTransactionID(defaultTxnId).setMemo(memoToUse).setTransactionFee(setup.defaultFee()).setTransactionValidDuration(setup.defaultValidDuration()).setNodeAccountID(setup.defaultNode());
}
Also used : CryptoDeleteTransactionBody(com.hederahashgraph.api.proto.java.CryptoDeleteTransactionBody) FileDeleteTransactionBody(com.hederahashgraph.api.proto.java.FileDeleteTransactionBody) Arrays(java.util.Arrays) TokenUnpauseTransactionBody(com.hederahashgraph.api.proto.java.TokenUnpauseTransactionBody) ContractUpdateTransactionBody(com.hederahashgraph.api.proto.java.ContractUpdateTransactionBody) TokenDeleteTransactionBody(com.hederahashgraph.api.proto.java.TokenDeleteTransactionBody) HapiSpecSetup(com.hedera.services.bdd.spec.HapiSpecSetup) ScheduleCreateTransactionBody(com.hederahashgraph.api.proto.java.ScheduleCreateTransactionBody) TokenRevokeKycTransactionBody(com.hederahashgraph.api.proto.java.TokenRevokeKycTransactionBody) FileAppendTransactionBody(com.hederahashgraph.api.proto.java.FileAppendTransactionBody) ScheduleDeleteTransactionBody(com.hederahashgraph.api.proto.java.ScheduleDeleteTransactionBody) ConsensusDeleteTopicTransactionBody(com.hederahashgraph.api.proto.java.ConsensusDeleteTopicTransactionBody) SplittableRandom(java.util.SplittableRandom) ContractCallTransactionBody(com.hederahashgraph.api.proto.java.ContractCallTransactionBody) Method(java.lang.reflect.Method) CryptoCreateTransactionBody(com.hederahashgraph.api.proto.java.CryptoCreateTransactionBody) CryptoUpdateTransactionBody(com.hederahashgraph.api.proto.java.CryptoUpdateTransactionBody) SystemDeleteTransactionBody(com.hederahashgraph.api.proto.java.SystemDeleteTransactionBody) CryptoTransferTransactionBody(com.hederahashgraph.api.proto.java.CryptoTransferTransactionBody) TokenPauseTransactionBody(com.hederahashgraph.api.proto.java.TokenPauseTransactionBody) ConsensusUpdateTopicTransactionBody(com.hederahashgraph.api.proto.java.ConsensusUpdateTopicTransactionBody) Instant(java.time.Instant) Collectors.joining(java.util.stream.Collectors.joining) ByteString(com.google.protobuf.ByteString) KeyFactory(com.hedera.services.bdd.spec.keys.KeyFactory) List(java.util.List) SystemUndeleteTransactionBody(com.hederahashgraph.api.proto.java.SystemUndeleteTransactionBody) Stream(java.util.stream.Stream) TokenFeeScheduleUpdateTransactionBody(com.hederahashgraph.api.proto.java.TokenFeeScheduleUpdateTransactionBody) ConsensusSubmitMessageTransactionBody(com.hederahashgraph.api.proto.java.ConsensusSubmitMessageTransactionBody) ContractDeleteTransactionBody(com.hederahashgraph.api.proto.java.ContractDeleteTransactionBody) TokenMintTransactionBody(com.hederahashgraph.api.proto.java.TokenMintTransactionBody) TRUE(com.hedera.services.bdd.spec.HapiApiSpec.UTF8Mode.TRUE) Transaction(com.hederahashgraph.api.proto.java.Transaction) IntStream(java.util.stream.IntStream) TxnUtils.getUniqueTimestampPlusSecs(com.hedera.services.bdd.spec.transactions.TxnUtils.getUniqueTimestampPlusSecs) UncheckedSubmitBody(com.hederahashgraph.api.proto.java.UncheckedSubmitBody) TokenAssociateTransactionBody(com.hederahashgraph.api.proto.java.TokenAssociateTransactionBody) AtomicReference(java.util.concurrent.atomic.AtomicReference) ScheduleSignTransactionBody(com.hederahashgraph.api.proto.java.ScheduleSignTransactionBody) TransactionBody(com.hederahashgraph.api.proto.java.TransactionBody) FreezeTransactionBody(com.hederahashgraph.api.proto.java.FreezeTransactionBody) Timestamp(com.hederahashgraph.api.proto.java.Timestamp) FileUpdateTransactionBody(com.hederahashgraph.api.proto.java.FileUpdateTransactionBody) FileCreateTransactionBody(com.hederahashgraph.api.proto.java.FileCreateTransactionBody) TokenGrantKycTransactionBody(com.hederahashgraph.api.proto.java.TokenGrantKycTransactionBody) TokenUpdateTransactionBody(com.hederahashgraph.api.proto.java.TokenUpdateTransactionBody) TokenCreateTransactionBody(com.hederahashgraph.api.proto.java.TokenCreateTransactionBody) TransactionID(com.hederahashgraph.api.proto.java.TransactionID) CryptoAdjustAllowanceTransactionBody(com.hederahashgraph.api.proto.java.CryptoAdjustAllowanceTransactionBody) Consumer(java.util.function.Consumer) ConsensusCreateTopicTransactionBody(com.hederahashgraph.api.proto.java.ConsensusCreateTopicTransactionBody) Collectors.toList(java.util.stream.Collectors.toList) ContractCreateTransactionBody(com.hederahashgraph.api.proto.java.ContractCreateTransactionBody) TokenUnfreezeAccountTransactionBody(com.hederahashgraph.api.proto.java.TokenUnfreezeAccountTransactionBody) Message(com.google.protobuf.Message) TokenWipeAccountTransactionBody(com.hederahashgraph.api.proto.java.TokenWipeAccountTransactionBody) Clock(java.time.Clock) TokenDissociateTransactionBody(com.hederahashgraph.api.proto.java.TokenDissociateTransactionBody) TokenBurnTransactionBody(com.hederahashgraph.api.proto.java.TokenBurnTransactionBody) TokenFreezeAccountTransactionBody(com.hederahashgraph.api.proto.java.TokenFreezeAccountTransactionBody) CryptoApproveAllowanceTransactionBody(com.hederahashgraph.api.proto.java.CryptoApproveAllowanceTransactionBody) TransactionID(com.hederahashgraph.api.proto.java.TransactionID)

Aggregations

ByteString (com.google.protobuf.ByteString)1 Message (com.google.protobuf.Message)1 TRUE (com.hedera.services.bdd.spec.HapiApiSpec.UTF8Mode.TRUE)1 HapiSpecSetup (com.hedera.services.bdd.spec.HapiSpecSetup)1 KeyFactory (com.hedera.services.bdd.spec.keys.KeyFactory)1 TxnUtils.getUniqueTimestampPlusSecs (com.hedera.services.bdd.spec.transactions.TxnUtils.getUniqueTimestampPlusSecs)1 ConsensusCreateTopicTransactionBody (com.hederahashgraph.api.proto.java.ConsensusCreateTopicTransactionBody)1 ConsensusDeleteTopicTransactionBody (com.hederahashgraph.api.proto.java.ConsensusDeleteTopicTransactionBody)1 ConsensusSubmitMessageTransactionBody (com.hederahashgraph.api.proto.java.ConsensusSubmitMessageTransactionBody)1 ConsensusUpdateTopicTransactionBody (com.hederahashgraph.api.proto.java.ConsensusUpdateTopicTransactionBody)1 ContractCallTransactionBody (com.hederahashgraph.api.proto.java.ContractCallTransactionBody)1 ContractCreateTransactionBody (com.hederahashgraph.api.proto.java.ContractCreateTransactionBody)1 ContractDeleteTransactionBody (com.hederahashgraph.api.proto.java.ContractDeleteTransactionBody)1 ContractUpdateTransactionBody (com.hederahashgraph.api.proto.java.ContractUpdateTransactionBody)1 CryptoAdjustAllowanceTransactionBody (com.hederahashgraph.api.proto.java.CryptoAdjustAllowanceTransactionBody)1 CryptoApproveAllowanceTransactionBody (com.hederahashgraph.api.proto.java.CryptoApproveAllowanceTransactionBody)1 CryptoCreateTransactionBody (com.hederahashgraph.api.proto.java.CryptoCreateTransactionBody)1 CryptoDeleteTransactionBody (com.hederahashgraph.api.proto.java.CryptoDeleteTransactionBody)1 CryptoTransferTransactionBody (com.hederahashgraph.api.proto.java.CryptoTransferTransactionBody)1 CryptoUpdateTransactionBody (com.hederahashgraph.api.proto.java.CryptoUpdateTransactionBody)1