Created
May 24, 2018 08:49
-
-
Save michielmulders/b14d795a1d2c38af1133ea546fc641bc to your computer and use it in GitHub Desktop.
Simple random number generation Ethereum smart contract Solidity
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 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