Skip to content
Lattice

IGelatoVRFConsumer

Git Source

Title: IGelatoVRFConsumer

Author: Vendored minimal subset of Gelato (https://github.com/gelatodigital/vrf-contracts/blob/main/contracts/IGelatoVRFConsumer.sol).

Upstream license: unknown (the linked upstream repository is not publicly reachable).

Callback interface for Gelato VRF (drand-backed) consumers.

Vendored — do not add a gelato dependency. The consumer emits RequestedRandomness; Gelato's dedicated operator fulfils by calling fulfillRandomness. There is no on-chain fee (it is paid off-chain via Gelato 1Balance).

Functions

fulfillRandomness

Called by the Gelato operator to deliver randomness.

function fulfillRandomness(uint256 randomness, bytes calldata dataWithRound) external;

Parameters

NameTypeDescription
randomnessuint256The drand-derived randomness for the requested round.
dataWithRoundbytesThe opaque payload originally emitted in RequestedRandomness.

Events

RequestedRandomness

Emitted to request randomness for a given drand round.

event RequestedRandomness(uint256 round, bytes data);

Parameters

NameTypeDescription
rounduint256The drand round whose beacon will seed the randomness.
databytesOpaque request payload (abi.encode(round, abi.encode(requestId, extraData))).