Last active
September 27, 2022 09:43
-
-
Save DoguD/6b4032fc2fea8eb2f3d2fa2f5385270c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
pragma solidity ^0.8.0; | |
contract RandomNumbers{ | |
uint256 public preparationBlockNumber; | |
bool public canCallRandom; | |
function prepareRandom() public { | |
/** | |
When called sets the preparation block number to the current block number. | |
*/ | |
require(!canCallRandom, "Already prepared."); | |
// TODO: Commit the caller to random | |
preparationBlockNumber = block.number; | |
canCallRandom = true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment