Skip to content

Instantly share code, notes, and snippets.

@miguelmota
Created May 10, 2019 20:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miguelmota/d9b11844806012254649d6e097878b9e to your computer and use it in GitHub Desktop.
Save miguelmota/d9b11844806012254649d6e097878b9e to your computer and use it in GitHub Desktop.
Truffle web3.js add prefix to message hash for signing example
let hash = web3.utils.soliditySha3('abc')
let prefixedHash = web3.utils.soliditySha3('\x19Ethereum Signed Message:\n32', hash)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment