Random Gelato
EeseeRandomGelato
vrfGelatoOperator
address vrfGelatoOperator
Gelato VRF operator.
InvalidOperator
error InvalidOperator()
requestRandom
function requestRandom() external
Requests random from Gelato. Emits {RequestRandom} event.
checker
function checker() external view returns (bool canExec, bytes execPayload)
Called by Gelato to determine if requestRandom() needs to be called.
Inherited from GelatoVRFConsumerBase
fulfillRandomness
function fulfillRandomness(uint256 randomness, bytes dataWithRound) external
Callback function used by Gelato VRF to return the random number. The randomness is derived by hashing the provided randomness with the request ID.
Parameters
randomness
uint256
The random number generated by Gelato VRF.
dataWithRound
bytes
Additional data provided by Gelato VRF containing request details.
Inherited from IGelatoVRFConsumer
RequestedRandomness
event RequestedRandomness(uint256 round, bytes data)
Event emitted when a randomness request is made.
Parameters
round
uint256
data
bytes
The round of randomness to request.
Inherited from EeseeRandomBase
requestRandomImmediate
function requestRandomImmediate() external
Request random immediately, skipping canRequestRandom() check. Emits {RequestRandom} event. Note: This function can only be called by REQUEST_RANDOM_ROLE.
changeRandomRequestInterval
function changeRandomRequestInterval(uint32 _randomRequestInterval) external
Changes randomRequestInterval. Emits {ChangeRandomRequestInterval} event.
Parameters
_randomRequestInterval
uint32
- New randomRequestInterval.
Note: This function can only be called by ADMIN_ROLE.
getRandomFromTimestamp
function getRandomFromTimestamp(uint256 _timestamp) external view returns (uint256 word, uint256 timestamp)
canRequestRandom
function canRequestRandom() public view virtual returns (bool randomNeeded)
Check if random needs to be requested.
ChangeRandomRequestInterval
event ChangeRandomRequestInterval(uint32 previousRandomRequestInterval, uint32 newRandomRequestInterval)
Inherited from EeseeRoleHandler
Inherited from IEeseeRandom
random
function random(uint256) external view returns (uint256 word, uint256 timestamp)
lastRandomRequestTimestamp
function lastRandomRequestTimestamp() external view returns (uint64)
randomRequestInterval
function randomRequestInterval() external view returns (uint32)
MAX_RANDOM_REQUEST_INTERVAL
function MAX_RANDOM_REQUEST_INTERVAL() external view returns (uint48)
FulfillRandom
event FulfillRandom(uint256 random)
RequestRandom
event RequestRandom()
Last updated