Closed paulayo93 closed 2 years ago
We are in the process of updating the starter kit to include VRF V2.
In the meantime, you can find a sample contract for generating random numbers via VRF V2 here https://docs.chain.link/docs/chainlink-vrf/ Once you have the contract deployed and working, interacting with it via ethers should be similar to other contracts.
something similar to this will request the random number from the front end.
async function randomNumber() {
randomNumberContract = new ethers.Contract(randomNumber, VRFConsumerBaseV2.abi, signer);
txn = await randomNumberContract.requestRandomWords();
txn.wait();
console.log(txn);
}
Please I need help with generating a ChainLink VRFConsumerBaseV2 and testing it out on my local development
How to call the contract from frontend to generate randomness
The guide out there only covers for Chainlink V1
Sincerely appreciate your help