0

I have an Oraclize call that returns the following (a string):

"00000000000000000000000000000000000000000000000000000000000003e8"

Now this is 1000 (bytes32 hex)

You can check here: https://www.rapidtables.com/convert/number/hex-to-decimal.html

Now the question is how do I read/convert this to 1000 in solidity?

thefett
  • 3,873
  • 5
  • 26
  • 48

1 Answers1

1

This answer may be what your looking for, it converts a hex string into bytes and gets the decimal value. Let me know if I understood your question wrong.

https://ethereum.stackexchange.com/a/40247/33496

savard
  • 448
  • 1
  • 4
  • 16