How do I convert the result returned from a JSON-RPC eth_call from my geth client?
This is the call:
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_call","params":[{"to":"0x86312d97c0dd3fd9202fdbdec434f36ee1b30720", "data":"0x18160ddd"}, "latest"],"id":1}' 127.0.0.1:8545
This is the return:
{"jsonrpc":"2.0","id":1,"result":"0x00000000000000000000000000000000000000000000000000000000000f4240"}
How to convert:
0x00000000000000000000000000000000000000000000000000000000000f4240 back to human readable characters?
web3.toAscii("0x00000000000000000000000000000000000000000000000000000000000f4240")and this is what I get:"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0fB@"– Jupiter Jul 14 '17 at 13:56