# Random Gelato

## EeseeRandomGelato

### vrfGelatoOperator

```solidity
address vrfGelatoOperator
```

*Gelato VRF operator.*

### InvalidOperator

```solidity
error InvalidOperator()
```

### requestRandom

```solidity
function requestRandom() external
```

*Requests random from Gelato. Emits {RequestRandom} event.*

### checker

```solidity
function checker() external view returns (bool canExec, bytes execPayload)
```

*Called by Gelato to determine if requestRandom() needs to be called.*

## Inherited from GelatoVRFConsumerBase

### fulfillRandomness

```solidity
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

| Name          | Type    | Description                                                        |
| ------------- | ------- | ------------------------------------------------------------------ |
| randomness    | uint256 | The random number generated by Gelato VRF.                         |
| dataWithRound | bytes   | Additional data provided by Gelato VRF containing request details. |

## Inherited from IGelatoVRFConsumer

### RequestedRandomness

```solidity
event RequestedRandomness(uint256 round, bytes data)
```

Event emitted when a randomness request is made.

#### Parameters

| Name  | Type    | Description                         |
| ----- | ------- | ----------------------------------- |
| round | uint256 |                                     |
| data  | bytes   | The round of randomness to request. |

## Inherited from EeseeRandomBase

### requestRandomImmediate

```solidity
function requestRandomImmediate() external
```

*Request random immediately, skipping canRequestRandom() check. Emits {RequestRandom} event. Note: This function can only be called by REQUEST\_RANDOM\_ROLE.*

### changeRandomRequestInterval

```solidity
function changeRandomRequestInterval(uint32 _randomRequestInterval) external
```

*Changes randomRequestInterval. Emits {ChangeRandomRequestInterval} event.*

#### Parameters

| Name                                                   | Type   | Description                  |
| ------------------------------------------------------ | ------ | ---------------------------- |
| \_randomRequestInterval                                | uint32 | - New randomRequestInterval. |
| Note: This function can only be called by ADMIN\_ROLE. |        |                              |

### getRandomFromTimestamp

```solidity
function getRandomFromTimestamp(uint256 _timestamp) external view returns (uint256 word, uint256 timestamp)
```

### canRequestRandom

```solidity
function canRequestRandom() public view virtual returns (bool randomNeeded)
```

*Check if random needs to be requested.*

### ChangeRandomRequestInterval

```solidity
event ChangeRandomRequestInterval(uint32 previousRandomRequestInterval, uint32 newRandomRequestInterval)
```

## Inherited from EeseeRoleHandler

## Inherited from IEeseeRandom

### random

```solidity
function random(uint256) external view returns (uint256 word, uint256 timestamp)
```

### lastRandomRequestTimestamp

```solidity
function lastRandomRequestTimestamp() external view returns (uint64)
```

### randomRequestInterval

```solidity
function randomRequestInterval() external view returns (uint32)
```

### MAX\_RANDOM\_REQUEST\_INTERVAL

```solidity
function MAX_RANDOM_REQUEST_INTERVAL() external view returns (uint48)
```

### FulfillRandom

```solidity
event FulfillRandom(uint256 random)
```

### RequestRandom

```solidity
event RequestRandom()
```
