Created
October 16, 2018 22:04
-
-
Save merlox/5da6d002b782b3db2d393b7e3d396d51 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
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