code block:
TransactionManager txManager = new RawTransactionManager(web3j(), credentials());
String txHash = "";
TransactionReceipt txReceipt;
try {
txHash = txManager.sendTransaction(
DefaultGasProvider.GAS_PRICE,
DefaultGasProvider.GAS_LIMIT,
contractAddress,
encodedFunction,
BigInteger.ZERO).getTransactionHash();
} catch (IOException e) {
e.printStackTrace();
}
TransactionReceiptProcessor receiptProcessor = new PollingTransactionReceiptProcessor(
web3j(),
TransactionManager.DEFAULT_POLLING_FREQUENCY,
TransactionManager.DEFAULT_POLLING_ATTEMPTS_PER_TX_HASH);
try {
txReceipt = receiptProcessor.waitForTransactionReceipt(txHash);
} catch (IOException e) {
e.printStackTrace();
} catch (TransactionException e) {
e.printStackTrace();
}
Last exception returns:
org.web3j.protocol.exceptions.TransactionException: Error processing request: invalid argument 0: json: cannot unmarshal non-string into Go value of type common.Hash
I'm using a metaMask wallet and with HttpService as a public RPC enpoint for ethereum