From e8288d12d4453afbc215a247621d9057f43f9369 Mon Sep 17 00:00:00 2001 From: Crystal Gomes Date: Fri, 13 Oct 2023 13:38:11 -0400 Subject: [PATCH] Add missing contract variables (#1581) * Add missing contract variables * Update src/content/vrf/v2/getting-started.mdx Co-authored-by: yacine-benichou <78235417+yacine-benichou@users.noreply.github.com> --------- Co-authored-by: yacine-benichou <78235417+yacine-benichou@users.noreply.github.com> --- src/content/vrf/v2/getting-started.mdx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/content/vrf/v2/getting-started.mdx b/src/content/vrf/v2/getting-started.mdx index 25128fc9cf8..ba5165f457d 100644 --- a/src/content/vrf/v2/getting-started.mdx +++ b/src/content/vrf/v2/getting-started.mdx @@ -95,14 +95,17 @@ This example is adapted for [Sepolia testnet](/vrf/v2/subscription/supported-net {/* prettier-ignore */} ```solidity uint64 s_subscriptionId; +address s_owner; +VRFCoordinatorV2Interface COORDINATOR; address vrfCoordinator = 0x8103B0A8A00be2DDC778e6e7eaa21791Cd364625; bytes32 s_keyHash = 0x474e34a077df58807dbe9c96d3c009b23b3c6d0cce433e59bbf5b34f823bc56c; uint32 callbackGasLimit = 40000; uint16 requestConfirmations = 3; uint32 numWords = 1; ``` - - `uint64 s_subscriptionId`: The subscription ID that this contract uses for funding requests. Initialized in the `constructor`. +- `address s_owner`: The address of the owner of the contract that you will deploy. This is initialized in the `constructor`, and it will be the address you use when deploying the contract. +- `VRFCoordinatorV2Interface COORDINATOR`: The address of the Chainlink VRF Coordinator contract that this contract will use. Initialized in the `constructor`. - `address vrfCoordinator`: The address of the Chainlink VRF Coordinator contract. - `bytes32 s_keyHash`: The gas lane key hash value, which is the maximum gas price you are willing to pay for a request in wei. It functions as an ID of the off-chain VRF job that runs in response to requests. - `uint32 callbackGasLimit`: The limit for how much gas to use for the callback request to your contract's `fulfillRandomWords` function. It must be less than the `maxGasLimit` on the coordinator contract. Adjust this value for larger requests depending on how your `fulfillRandomWords` function processes and stores the received random values. If your `callbackGasLimit` is not sufficient, the callback will fail and your subscription is still charged for the work done to generate your requested random values.