-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The parameters that are sent to eth_sign is swapped #2555
Comments
15 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
According to the documentation, the parameters for
web3.eth.sign
would bedataToSign
andaddress
[1][2][3].However, for
eth_sign
, the parameters in order should beaddress
anddata
; which is reversed compared to the givenweb3.eth.sign
[4].From [1] to [3], the order of parameters are not swapped. For versions prior to 1.0.0-beta.37, it seems to be handled.
Expected behavior
Either one of the following should work:
web3.eth.sign('hello', '0xBCe00FD336be3be338458e93EfC80Da14f8a3e05')
(according to the documentation);web3.eth.sign('0xBCe00FD336be3be338458e93EfC80Da14f8a3e05', 'hello')
(according to the RPC)would work.
Actual behavior
In the current (recent) versions, none of the above works:
When calling
web3.eth.sign('hello', '0xBCe00FD336be3be338458e93EfC80Da14f8a3e05')
, it showsYet, when calling
web3.eth.sign('0xBCe00FD336be3be338458e93EfC80Da14f8a3e05', 'hello')
, it showsI am testing with the MetaMask provider, but I tried HookedWalletSubprovider and it doesn't work too.
Versions
The text was updated successfully, but these errors were encountered: