Last active
November 20, 2021 10:03
-
-
Save PhABC/b123cc9de7ef67b0d197c5dbf30e2736 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Message to sign : contract address + address to give access | |
var message = web3.sha3(contractAddress.substr(2) + userAddress.substr(2), {encoding: 'hex'}) | |
// Signing message (with "\x19Ethereum Signed Message:\n32" as prefix by default) | |
web3.personal.sign(message, web3.eth.defaultAccount, (err, res) => sign = res) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello.
I have read your post carefully.
What does web3.personal mean here?