I am trying to build raw transactions in Java with Web3j.
Our goal that we are trying to achieve is, we want to build raw transactions, send them to another trusted party that does the signing for us, they return the signed transaction and we broadcast it.
I found this so far:
RawTransaction.createContractTransaction(nonce, gasPrice, gasLimit, value, init)
However two things irritate me:
- There is no destination-field
- I don’t know how to fill out the init-data
In web3js, something like this would work in order to fill out the init field:
And then I could call the functions of that contract and assign it to the init field and put it into the raw transaction.
What is the web3j equivalent to this?
An example that includes filling out the init field aswell would be highly appreciated