Im trying to get transaction amount of Besu transaction using web3j and java. Unfortunately without success. Input allways return 0x. Can anyone tell me what to change?
String transactionHash = "0xe7df62446f91106dea2cca0d9cdb2655cd15738d6cdad00f5bb5327fd35648dd";
Web3j web3j = Web3j.build(new HttpService(Vars.nodeUrl));
EthGetTransactionReceipt transactionReceipt = web3j.ethGetTransactionReceipt(transactionHash).send();
System.out.println("Transaction receipt: " + transactionReceipt.getTransactionReceipt().get());
List<Log> logs = transactionReceipt.getTransactionReceipt().get().getLogs();
System.out.println("Log size: "+logs.size());
String inputdata;
Optional<Transaction> tx = web3j.ethGetTransactionByHash(transactionHash).send().getTransaction();
if (tx.isPresent()) {
inputdata = tx.get().getInput();
System.out.println("Input data: "+inputdata);
}
Optional<TransactionReceipt> transReceipt = web3j.ethGetTransactionReceipt(transactionHash).send().getTransactionReceipt();