Search in sources :

Example 1 with TokenDeleteTransactionBody

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

the class HapiTokenDelete method opBodyDef.

@Override
protected Consumer<TransactionBody.Builder> opBodyDef(HapiApiSpec spec) throws Throwable {
    var tId = TxnUtils.asTokenId(token, spec);
    TokenDeleteTransactionBody opBody = spec.txns().<TokenDeleteTransactionBody, TokenDeleteTransactionBody.Builder>body(TokenDeleteTransactionBody.class, b -> {
        b.setToken(tId);
    });
    return b -> b.setTokenDeletion(opBody);
}
Also used : TokenDeleteUsage(com.hedera.services.usage.token.TokenDeleteUsage) Transaction(com.hederahashgraph.api.proto.java.Transaction) HapiTxnOp(com.hedera.services.bdd.spec.transactions.HapiTxnOp) FeeData(com.hederahashgraph.api.proto.java.FeeData) MoreObjects(com.google.common.base.MoreObjects) TokenDeleteTransactionBody(com.hederahashgraph.api.proto.java.TokenDeleteTransactionBody) SUCCESS(com.hederahashgraph.api.proto.java.ResponseCodeEnum.SUCCESS) Function(java.util.function.Function) Consumer(java.util.function.Consumer) Key(com.hederahashgraph.api.proto.java.Key) List(java.util.List) Logger(org.apache.logging.log4j.Logger) TxnUtils(com.hedera.services.bdd.spec.transactions.TxnUtils) TransactionBody(com.hederahashgraph.api.proto.java.TransactionBody) HederaFunctionality(com.hederahashgraph.api.proto.java.HederaFunctionality) TxnUtils.suFrom(com.hedera.services.bdd.spec.transactions.TxnUtils.suFrom) TransactionResponse(com.hederahashgraph.api.proto.java.TransactionResponse) SigValueObj(com.hederahashgraph.fee.SigValueObj) HapiApiSpec(com.hedera.services.bdd.spec.HapiApiSpec) LogManager(org.apache.logging.log4j.LogManager) TokenDeleteTransactionBody(com.hederahashgraph.api.proto.java.TokenDeleteTransactionBody)

Aggregations

MoreObjects (com.google.common.base.MoreObjects)1 HapiApiSpec (com.hedera.services.bdd.spec.HapiApiSpec)1 HapiTxnOp (com.hedera.services.bdd.spec.transactions.HapiTxnOp)1 TxnUtils (com.hedera.services.bdd.spec.transactions.TxnUtils)1 TxnUtils.suFrom (com.hedera.services.bdd.spec.transactions.TxnUtils.suFrom)1 TokenDeleteUsage (com.hedera.services.usage.token.TokenDeleteUsage)1 FeeData (com.hederahashgraph.api.proto.java.FeeData)1 HederaFunctionality (com.hederahashgraph.api.proto.java.HederaFunctionality)1 Key (com.hederahashgraph.api.proto.java.Key)1 SUCCESS (com.hederahashgraph.api.proto.java.ResponseCodeEnum.SUCCESS)1 TokenDeleteTransactionBody (com.hederahashgraph.api.proto.java.TokenDeleteTransactionBody)1 Transaction (com.hederahashgraph.api.proto.java.Transaction)1 TransactionBody (com.hederahashgraph.api.proto.java.TransactionBody)1 TransactionResponse (com.hederahashgraph.api.proto.java.TransactionResponse)1 SigValueObj (com.hederahashgraph.fee.SigValueObj)1 List (java.util.List)1 Consumer (java.util.function.Consumer)1 Function (java.util.function.Function)1 LogManager (org.apache.logging.log4j.LogManager)1 Logger (org.apache.logging.log4j.Logger)1