IncrementalNG
Inherits: RNG
Author: JayBuidl jb@kleros.io
A Random Number Generator which returns a number incremented by 1 each time. Useful as a fallback method.
State Variables
number
uint256 public number;
Functions
constructor
constructor(uint256 _start);
requestRandomness
Request a random number.
function requestRandomness(uint256 _block) external override;
Parameters
Name | Type | Description |
---|---|---|
_block | uint256 | Block the random number is linked to. |
receiveRandomness
Get the "random number" (which is always the same).
function receiveRandomness(uint256 _block) external override returns (uint256 randomNumber);
Parameters
Name | Type | Description |
---|---|---|
_block | uint256 | Block the random number is linked to. |
Returns
Name | Type | Description |
---|---|---|
randomNumber | uint256 | The random number or 0 if it is not ready or has not been requested. |