0

I am looking for how to decode the input data of a transaction and what I have obtained up to now is in utf-8 and it gives me this data:
"Ã;` Q ò  à                                                                                 1 juan 12.456.123-9 Inacap 45.566 963-8 dentist 0xasdasetcdasdaetc 12092019 823 2358."

Then I wanted to see if anyone knows how to decode it and get it in a structured way.

  • Have you tried web3.toAscii(hexString) ? – Iulian Jan 10 '19 at 23:28
  • But can it be used in java? From what I understand is used in JS – Nicolas Flores Muñoz Jan 10 '19 at 23:39
  • 1
    Really sorry mate, I added an 's' in my mind and thought you meant web3js. I have no experience with Java or web3j, however see if any of these links help. https://stackoverflow.com/questions/13990941/how-to-convert-hex-string-to-java-string

    https://stackoverflow.com/questions/36416827/convert-hex-to-original-string-value

    https://ethereum.stackexchange.com/questions/24538/how-to-decode-input-data-with-abi-using-java/24640#24640

    Web3j documentation (which looks poor in my opinion): https://web3j.readthedocs.io/en/latest/

    – Iulian Jan 11 '19 at 01:33
  • I also think the same with the documentation web3j – Nicolas Flores Muñoz Jan 11 '19 at 02:04

0 Answers0