Replies: 1 comment
-
Hello @n4n0b1t3 Somethings some coders are used to set up a requiere statement to prevent the further execution of the function if for some reason the randomness returns null, but is not likely. Also VRF V2 is just realized and the way we take that random number has changed a lot. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Does anyone understand the execution order of the following code? I understand that this has something to do with asynchronous execution order. However, is there not a chance, that the callback function will reach the line where it makes use of the address before it is actually set?
As I understand it, the "owner" address should not be available at the time it is used in fulfillRandomness.
A synchronous execution order would look like this:
address owner = requestIdToSenderMap[requestId]
requestIdToSenderMap[requestId] = msg.sender
has not yet been executed and the owner address should not be available at this time.here is the complete solidity file
Beta Was this translation helpful? Give feedback.
All reactions