We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
According to the documentation, the parameters for web3.eth.sign would be dataToSign and address [1][2][3].
web3.eth.sign
dataToSign
address
However, for eth_sign, the parameters in order should be address and data; which is reversed compared to the given web3.eth.sign [4].
eth_sign
data
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.
Either one of the following should work:
web3.eth.sign('hello', '0xBCe00FD336be3be338458e93EfC80Da14f8a3e05')
web3.eth.sign('0xBCe00FD336be3be338458e93EfC80Da14f8a3e05', 'hello')
In the current (recent) versions, none of the above works:
When calling web3.eth.sign('hello', '0xBCe00FD336be3be338458e93EfC80Da14f8a3e05'), it shows
MetaMask - RPC Error: Error: WalletMiddleware - Invalid "from" address.
Yet, when calling web3.eth.sign('0xBCe00FD336be3be338458e93EfC80Da14f8a3e05', 'hello'), it shows
Error: Provided address "hello" is invalid, the capitalization checksum test failed, or its an indrect IBAN address which can't be converted.
I am testing with the MetaMask provider, but I tried HookedWalletSubprovider and it doesn't work too.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
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: