use of com.hedera.mirror.common.domain.contract.ContractResult in project hedera-mirror-node by hashgraph.
the class ContractCallTransactionHandlerTest method updateContractResultNonContractCallTransaction.
@Test
void updateContractResultNonContractCallTransaction() {
ContractResult contractResult = ContractResult.builder().build();
var recordItem = recordItemBuilder.contractCreate().build();
transactionHandler.updateContractResult(contractResult, recordItem);
assertThat(contractResult).returns(null, ContractResult::getAmount).returns(null, ContractResult::getGasLimit).returns(null, ContractResult::getFunctionParameters);
}
use of com.hedera.mirror.common.domain.contract.ContractResult in project hedera-mirror-node by hashgraph.
the class ContractCreateTransactionHandlerTest method updateContractResultEmptyContractCallFunctionParams.
@Test
void updateContractResultEmptyContractCallFunctionParams() {
ContractResult contractResult = new ContractResult();
var recordItem = recordItemBuilder.contractCreate().build();
transactionHandler.updateContractResult(contractResult, recordItem);
var transaction = recordItem.getTransactionBody().getContractCreateInstance();
assertThat(contractResult).returns(transaction.getInitialBalance(), ContractResult::getAmount).returns(transaction.getGas(), ContractResult::getGasLimit).returns(DomainUtils.toBytes(transaction.getConstructorParameters()), ContractResult::getFunctionParameters);
}
Aggregations