Skip to content

Instantly share code, notes, and snippets.

@Bunjin
Bunjin / RNG.sol
Last active September 12, 2019 10:24
Blockhash RNG immune to tampering for PoS and PoW
contract RNG {
bytes32 encrypted_seed;
bytes32 revealed_seed;
bytes32 revealed_secret;
uint odds;
uint bet_blocknumber;
uint bet_input;
bool bet_made;
uint bet_result;
string log;