use of com.hederahashgraph.api.proto.java.Query in project hedera-services by hashgraph.
the class HapiGetContractBytecode method lookupCostWith.
@Override
protected long lookupCostWith(HapiApiSpec spec, Transaction payment) throws Throwable {
Query query = getContractBytecodeQuery(spec, payment, true);
Response response = spec.clients().getScSvcStub(targetNodeFor(spec), useTls).contractGetBytecode(query);
return costFrom(response);
}
use of com.hederahashgraph.api.proto.java.Query in project hedera-services by hashgraph.
the class HapiGetContractInfo method submitWith.
@Override
protected void submitWith(HapiApiSpec spec, Transaction payment) throws Throwable {
Query query = getContractInfoQuery(spec, payment, false);
response = spec.clients().getScSvcStub(targetNodeFor(spec), useTls).getContractInfo(query);
ContractInfo contractInfo = response.getContractGetInfo().getContractInfo();
if (verboseLoggingOn) {
log.info("Info: " + contractInfo);
}
if (contractInfoPath.isPresent()) {
saveContractInfo(spec, contractInfo);
}
if (validateDirPath.isPresent()) {
validateAgainst(spec, contractInfo);
}
if (registryEntry.isPresent()) {
spec.registry().saveContractInfo(registryEntry.get(), contractInfo);
}
}
use of com.hederahashgraph.api.proto.java.Query in project hedera-services by hashgraph.
the class HapiGetAccountInfo method lookupCostWith.
@Override
protected long lookupCostWith(HapiApiSpec spec, Transaction payment) throws Throwable {
Query query = getAccountInfoQuery(spec, payment, true);
Response response = spec.clients().getCryptoSvcStub(targetNodeFor(spec), useTls).getAccountInfo(query);
return costFrom(response);
}
use of com.hederahashgraph.api.proto.java.Query in project hedera-services by hashgraph.
the class HapiGetAccountRecords method lookupCostWith.
@Override
protected long lookupCostWith(HapiApiSpec spec, Transaction payment) throws Throwable {
Query query = getRecordsQuery(spec, payment, true);
Response response = spec.clients().getCryptoSvcStub(targetNodeFor(spec), useTls).getAccountRecords(query);
return costFrom(response);
}
use of com.hederahashgraph.api.proto.java.Query in project hedera-services by hashgraph.
the class HapiGetFileContents method lookupCostWith.
@Override
protected long lookupCostWith(HapiApiSpec spec, Transaction payment) throws Throwable {
Query query = getFileContentQuery(spec, payment, true);
Response response = spec.clients().getFileSvcStub(targetNodeFor(spec), useTls).getFileContent(query);
return costFrom(response);
}
Aggregations