Skip to content
Discussion options

You must be logged in to vote

Hello @fordicus how a interesting question

should we really use this require statement inside the callback?

The callback could also fail (really not likely, but not imposible) may be the transaction get reverted on the blockchain, so this require is just to verify the actual random number was gotten and also (read bellow)

does this line impose that this overridden method can actually be called several times before the random number arrives?

Yes, the fulfill randomness is an asynchronous call so you must continue with that function just once the callback was successfully made. Otherwise you will spend a lot of gas on a transaction which isn't already completed.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by fordicus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants