You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
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: