Numbers in the Web3 implementation of ethereum are sent as hexadecimal numbers, for example:
{
"method": "eth_blockNumber",
"params": []
}
should return (according to the ethereum implementation)
{
"jsonrpc": "2.0",
"result": "0x80023"
}
but they are sent as decimal numbers (not even strings!):
{
"jsonrpc": "2.0",
"result": 524323
}
Many implementations (e..g web3j) require the values to be formatted as hex-strings instead of decimal numbers (enforcing the actual ethereum-style). This issue is not only for the eth_blockNumbermethod but most numbers (actually, I do not know of any number that is sent as decimal number).
Numbers in the Web3 implementation of ethereum are sent as hexadecimal numbers, for example:
should return (according to the ethereum implementation)
but they are sent as decimal numbers (not even strings!):
Many implementations (e..g web3j) require the values to be formatted as hex-strings instead of decimal numbers (enforcing the actual ethereum-style). This issue is not only for the
eth_blockNumber
method but most numbers (actually, I do not know of any number that is sent as decimal number).