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 has been archived by the owner on Apr 20, 2021. It is now read-only.
From @vignesh-msundaram.
I also have been trying to use your ecrecover implementation from here : https://github.com/LayerXcom/verified-vyper-contracts/blob/master/contracts/ecdsa/ECDSA.vy
Since I'm using
web3.eth.sign()
, I realized the ecrecover didn't return the correct signer address.So, we need to replace Line 23 :
ecrecover(_hash, convert(v, uint256), r, s)
with
ecrecover(sha3(concat("\x19Ethereum Signed Message:\n32", _hash)), convert(v, uint256), r, s)
Also, it's better to let user send r,s,v from web 3 using
web3._extend.utils.toBigNumber()
instead of parsing thebytes[65]
input.Eg,
In web3,
Then in contract,
Reference : https://ethereum.stackexchange.com/questions/15364/ecrecover-from-geth-and-web3-eth-sign
The text was updated successfully, but these errors were encountered: