1

I have this method where I make a transaction to the network rinkeby, but to know how I can get the hash of the transaction made. I am using java with web3j, in addition to using infura to connect to the network.


public void CrearCertificado(CareerCertificate careercertificate, String id, BigInteger fecha, String nombre, String rutalumno, String instituto, String rutinstituto, String titulo,
                                                        String totalhash, String fechatitulacion, String registronumber, String codigoV ) throws Exception{

careercertificate .createCertificate(id, fecha, nombre, rutalumno, instituto, rutinstituto, titulo, totalhash, fechatitulacion, registronumber, codigoV ) .send(); }

1 Answer 1

1

Did you try this?

careercertificate
    .createCertificate(id, fecha, nombre, rutalumno, instituto, rutinstituto, titulo, totalhash, fechatitulacion, registronumber, codigoV )
    .send().getTransactionHash()
3
  • Yes, I started reading the documentation and saw some examples and everything went well. Thanks for answering Jan 6, 2019 at 17:48
  • How could I get the input data through a txHash? @ivicaa Jan 7, 2019 at 23:11
  • @ivicaa, this should return hash after tx has been mined. Is it possible to get tx hash before? Tx receives hash when it has been put in pool and wait for mining.
    – Gleichmut
    Feb 17 at 12:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.