You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @dev For SECURITY CONSIDERATIONS, you might also have look to: https://github.com/smartcontractkit/chainlink/blob/master/evm-contracts/src/v0.6/VRFConsumerBase.sol
22
+
*/
23
+
contractChainlinkRNGisRNG, VRFConsumerBase {
24
+
25
+
/* Storage */
26
+
27
+
bytes32internal keyHash; // The key hash to use for Chainlink's VRFCoordinator.
28
+
uint256internal fee; // The fee to pay to Chainlink.
29
+
addresspublic owner; // The owner of the contract.
30
+
31
+
mapping (bytes32=>uint256) public randomNumber; // randomNumber[requestId] is the random number for the requestId, 0 otherwise.
32
+
33
+
modifier onlyOwner() {
34
+
require(msg.sender== owner, "Not the owner");
35
+
}
36
+
37
+
/* Constructor */
38
+
39
+
/**
40
+
* @dev Constructs the ChainlinkRNG contract.
41
+
* @param _vrfCoordinator Address of VRFCoordinator contract.
42
+
* @param _link Address of LINK token contract.
43
+
* @param _keyHash The _keyHash for the VRF Coordinator.
44
+
* @param _fee The amount of LINK to send with a request.
0 commit comments