Skip to content

Instantly share code, notes, and snippets.

@merlox
Created October 16, 2018 22:04
Show Gist options
  • Save merlox/5da6d002b782b3db2d393b7e3d396d51 to your computer and use it in GitHub Desktop.
Save merlox/5da6d002b782b3db2d393b7e3d396d51 to your computer and use it in GitHub Desktop.
function generateHash(nonce, call, bet, balance, sequence) {
const hash = '0x' + ethereumjs.ABI.soliditySHA3(
['uint256', 'uint256', 'uint256', 'uint256', 'uint256'],
[String(nonce), String(call), String(bet), String(balance), String(sequence)]
).toString('hex')
return hash
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment