ForgeVRFFacet

VrfResponse

event VrfResponse(address user, uint256 randomNumber, bytes32 requestId, uint256 blockNumber)

GeodeWin

event GeodeWin(address user, uint256 itemId, uint256 geodeTokenId, bytes32 requestId, uint256 blockNumber)

GeodeEmpty

event GeodeEmpty(address user, uint256 geodeTokenId, bytes32 requestId, uint256 blockNumber)

GeodeRefunded

event GeodeRefunded(address user, uint256 geodeTokenId, bytes32 requestId, uint256 blockNumber)

linkBalance

function linkBalance() external view returns (uint256 linkBalance_)

vrfCoordinator

function vrfCoordinator() external view returns (address)
function link() external view returns (address)

keyHash

function keyHash() external view returns (bytes32)

getMaxVrf

function getMaxVrf() public pure returns (uint256)

areGeodePrizesAvailable

function areGeodePrizesAvailable() public view returns (bool)

numTotalPrizesLeft

function numTotalPrizesLeft() public view returns (uint256 total)

openGeodes

function openGeodes(uint256[] _geodeTokenIds, uint256[] _amountPerToken) external

rawFulfillRandomness

function rawFulfillRandomness(bytes32 _requestId, uint256 _randomNumber) external

fulfillRandomness handles the VRF response. Your contract must implement it.

The VRFCoordinator expects a calling contract to have a method with this signature, and will trigger it once it has verified the proof associated with the randomness (It is triggered via a call to rawFulfillRandomness, below.)

Parameters

NameTypeDescription

_requestId

bytes32

The Id initially returned by requestRandomness

_randomNumber

uint256

the VRF output //

getRequestInfo

function getRequestInfo(address user) external view returns (struct VrfRequestInfo)

getRequestInfoByRequestId

function getRequestInfoByRequestId(bytes32 requestId) external view returns (struct VrfRequestInfo)

claimWinnings

function claimWinnings() external

changeVrf

function changeVrf(uint256 _newFee, bytes32 _keyHash, address _vrfCoordinator, address _link) external

Allow the diamond owner or DAO to change the vrf details

removeLinkTokens

function removeLinkTokens(address _to, uint256 _value) external