I am trying to send a transaction to an address: 0xDD210......... using the EthSendTransaction.sendTransaction() method from the org.web3j.protocol.core.methods.response.EthSendTransaction library.
The transaction contains data but doesn't have any value (I don't have to send funds). I am using the private network(localhost: 8545)
The syntax is:
EthSendTransaction transactionResponse = transactionManager.sendTransaction(220000000,
43000, "0xDD210......", hashedData.toString(), BigInteger.valueOf(0));
String transactionHash = transactionResponse.getTransactionHash();
The value of transactionHash is null.
if (transactionResponse.hasError()) {
logger.info("in error block");
throw new RuntimeException(
"Error processing transaction request: " +
transactionResponse.getError().getMessage());
On runtime, the code gives
"Error processing transaction request: Invalid params: invalid hex."
Does anyone know the solution to this?