Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

Malformatted numbers (i.e. hex digits) #5

Closed
plainerman opened this issue Jul 13, 2018 · 0 comments
Closed

Malformatted numbers (i.e. hex digits) #5

plainerman opened this issue Jul 13, 2018 · 0 comments

Comments

@plainerman
Copy link
Contributor

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_blockNumber method but most numbers (actually, I do not know of any number that is sent as decimal number).

@plainerman plainerman changed the title Malformated numbers (i.e. hex digits) Malformatted numbers (i.e. hex digits) Jul 13, 2018
@uldaman uldaman mentioned this issue Jul 16, 2018
@uldaman uldaman reopened this Jul 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants