IVRFCoordinatorV2Plus
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
| Name | Type | Description |
|---|---|---|
| req | RandomWordsRequest | The request parameters. |
Returns
| Name | Type | Description |
|---|---|---|
| requestId | uint256 | The 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
| Name | Type | Description |
|---|---|---|
| keyHash | bytes32 | |
| subId | uint256 | |
| requestConfirmations | uint16 | |
| callbackGasLimit | uint32 | |
| numWords | uint32 | |
| extraArgs | bytes |