use of com.hederahashgraph.api.proto.java.ContractDeleteTransactionBody in project hedera-services by hashgraph.
the class HapiContractDelete method opBodyDef.
@Override
protected Consumer<TransactionBody.Builder> opBodyDef(HapiApiSpec spec) throws Throwable {
ContractDeleteTransactionBody opBody = spec.txns().<ContractDeleteTransactionBody, ContractDeleteTransactionBody.Builder>body(ContractDeleteTransactionBody.class, builder -> {
builder.setContractID(TxnUtils.asContractId(contract, spec));
transferContract.ifPresent(c -> builder.setTransferContractID(TxnUtils.asContractId(c, spec)));
transferAccount.ifPresent(a -> builder.setTransferAccountID(spec.registry().getAccountID(a)));
});
return builder -> builder.setContractDeleteInstance(opBody);
}
Aggregations