Skip to content

Instantly share code, notes, and snippets.

@michielmulders
Created May 24, 2018 08:49
Simple random number generation Ethereum smart contract Solidity
function random() private view returns (uint8) {
return uint8(uint256(keccak256(block.timestamp, block.difficulty))%251);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment