use of com.hederahashgraph.api.proto.java.ContractFunctionResult in project hedera-mirror-node by hashgraph.
the class ContractResultServiceImplIntegrationTest method getContractCallResultDefaultFunctionResult.
@Test
void getContractCallResultDefaultFunctionResult() {
RecordItem recordItem = recordItemBuilder.contractCall().record(x -> x.clearContractCallResult()).build();
ContractFunctionResult contractFunctionResult = recordItem.getRecord().getContractCreateResult();
contractResultsTest(recordItem, contractFunctionResult);
}
use of com.hederahashgraph.api.proto.java.ContractFunctionResult in project hedera-mirror-node by hashgraph.
the class ContractResultServiceImplIntegrationTest method getContractResultOnTokenMintNFT.
@Test
void getContractResultOnTokenMintNFT() {
RecordItem recordItem = recordItemBuilder.tokenMint(TokenType.NON_FUNGIBLE_UNIQUE).record(x -> x.setContractCallResult(recordItemBuilder.contractFunctionResult(CONTRACT_ID))).build();
ContractFunctionResult contractFunctionResult = recordItem.getRecord().getContractCallResult();
contractResultsTest(recordItem, contractFunctionResult);
}
use of com.hederahashgraph.api.proto.java.ContractFunctionResult in project hedera-mirror-node by hashgraph.
the class ContractResultServiceImplIntegrationTest method contractCreateResultOnFailure.
@Test
void contractCreateResultOnFailure() {
RecordItem recordItem = recordItemBuilder.contractCreate().record(x -> x.clearContractCreateResult()).receipt(r -> r.clearContractID().setStatus(ResponseCodeEnum.CONTRACT_EXECUTION_EXCEPTION)).build();
ContractFunctionResult contractFunctionResult = recordItem.getRecord().getContractCreateResult();
contractResultsTest(recordItem, contractFunctionResult);
}
use of com.hederahashgraph.api.proto.java.ContractFunctionResult in project hedera-mirror-node by hashgraph.
the class ContractResultServiceImplIntegrationTest method getContractCreateResultDefaultFunctionResult.
@Test
void getContractCreateResultDefaultFunctionResult() {
RecordItem recordItem = recordItemBuilder.contractCreate().record(x -> x.clearContractCreateResult()).build();
ContractFunctionResult contractFunctionResult = recordItem.getRecord().getContractCreateResult();
contractResultsTest(recordItem, contractFunctionResult);
}
use of com.hederahashgraph.api.proto.java.ContractFunctionResult in project hedera-services by hashgraph.
the class HapiContractCallLocal method assertExpectationsGiven.
@Override
protected void assertExpectationsGiven(HapiApiSpec spec) throws Throwable {
if (expectations.isPresent()) {
ContractFunctionResult actual = response.getContractCallLocal().getFunctionResult();
if (!loggingOff) {
log.info(CommonUtils.hex(actual.getContractCallResult().toByteArray()));
}
ErroringAsserts<ContractFunctionResult> asserts = expectations.get().assertsFor(spec);
List<Throwable> errors = asserts.errorsIn(actual);
rethrowSummaryError(log, "Bad local call result!", errors);
}
}
Aggregations