Skip to content
Lattice

IVRFCoordinatorV2Plus

Git Source

Title: IVRFCoordinatorV2Plus

Author: Vendored minimal subset of Chainlink (https://github.com/smartcontractkit/chainlink-evm/blob/develop/contracts/src/v0.8/vrf/interfaces/IVRFCoordinatorV2Plus.sol).

Upstream license: MIT.

Minimal interface for Chainlink VRF Coordinator V2.5 (subscription-funded).

Vendored subset — do not add a chainlink dependency.

Functions

requestRandomWords

Requests random words from the VRF coordinator.

function requestRandomWords(RandomWordsRequest calldata req) external returns (uint256 requestId);

Parameters

NameTypeDescription
reqRandomWordsRequestThe request parameters.

Returns

NameTypeDescription
requestIduint256The ID assigned to this request.

Structs

RandomWordsRequest

Parameters for a random words request.

struct RandomWordsRequest {
        /// @notice The key hash identifying the oracle's VRF public key.
        bytes32 keyHash;
        /// @notice The subscription ID used to fund the request.
        uint256 subId;
        /// @notice Minimum number of confirmations before the oracle responds.
        uint16 requestConfirmations;
        /// @notice Gas limit for the fulfillment callback.
        uint32 callbackGasLimit;
        /// @notice Number of random words to request.
        uint32 numWords;
        /// @notice Extra arguments (e.g. LINK payment flag encoded via VRFV2PlusClient).
        bytes extraArgs;
    }

Properties

NameTypeDescription
keyHashbytes32
subIduint256
requestConfirmationsuint16
callbackGasLimituint32
numWordsuint32
extraArgsbytes