Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.