How to use chainlink VRF v1 in my smart contract?

229 Views Asked by At

I am trying to use getRandomNumber() function from my VRFConsumer smart contract to get random numbers. Will I get the random number immediately after I call this or do I also have to call the fulfillRandomness() function? If yes, how to do that?

1

There are 1 best solutions below

0
On BEST ANSWER

After you call the getRandomNumber() function you will need to wait until the fulfillRandomness() is called by the coordinator. You don't need to do anything, just check the storage variable where you store the number (if you used a storage variable) after a minute or two.