MatheusDaros / chainlink-intro

MIT License
7 stars 0 forks source link

How to link fulfillRandomWords and heads/tails function ? #1

Open SpiralOutDotEu opened 1 year ago

SpiralOutDotEu commented 1 year ago

The example started with an user depositing and a random function deciding if it is head or tails. How can this example work together with Chainlink VRF?

MatheusDaros commented 1 year ago

Hello @SpiralOutDotEu Thanks for your question

When Chainlink VRF calls the fulfillRandomWords you can already determine the result of the random output from it, and then save in the contract for determining whether the coin toss resulted in heads or tails.