VRFV2WrapperInterface
Functions
lastRequestId
function lastRequestId() external view returns (uint256);
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | the request ID of the most recent VRF V2 request made by this wrapper. This should only be relied option within the same transaction that the request was made. |
calculateRequestPrice
Calculates the price of a VRF request with the given callbackGasLimit at the current
block.
This function relies on the transaction gas price which is not automatically set during
simulation. To estimate the price at a specific gas price, use the estimatePrice function.
function calculateRequestPrice(uint32 _callbackGasLimit) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
_callbackGasLimit | uint32 | is the gas limit used to estimate the price. |
estimateRequestPrice
Estimates the price of a VRF request with a specific gas limit and gas price.
This is a convenience function that can be called in simulation to better understand
pricing.
function estimateRequestPrice(uint32 _callbackGasLimit, uint256 _requestGasPriceWei) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
_callbackGasLimit | uint32 | is the gas limit used to estimate the price. |
_requestGasPriceWei | uint256 | is the gas price in wei used for the estimation. |