Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
function genRandom() private view returns (uint) {
uint rand = uint(keccak256(block.blockhash(block.number-1)));
return uint(rand % (10 ** 20));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.