documentation for fulfillRandomness #27
-
Hi, I was looking nat chainlink documentation of
However in the code shown in the course, we use |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
This is an AMAZING question. You're right, the RNG could 100% return a random number of 0, however... the chance is very very very very low. We are initializing our random number to 0, so as a quick check to make sure we got a response, we check to see that the number we got isn't 0. The is a 1 in 2**256 chance that we get 0 back, so it's highly unlikely to happen. |
Beta Was this translation helpful? Give feedback.
This is an AMAZING question.
You're right, the RNG could 100% return a random number of 0, however... the chance is very very very very low. We are initializing our random number to 0, so as a quick check to make sure we got a response, we check to see that the number we got isn't 0.
The is a 1 in 2**256 chance that we get 0 back, so it's highly unlikely to happen.