Request Randomness
Once you have the interface declared you can call the contract to request the random number. The only argument this function takes is a seed which you can generate. In this example, the seed is a hash of the previous block timestamp and the address of the caller.
You should store the requestId
in your contract if you want to match the response callback to the original request.
Last updated