We don't have access to random number generator? if you have to pick somebody randomly we do it using pseudo random generator.
Asked
Active
Viewed 448 times
0
-
https://stackoverflow.com/questions/48848948/how-to-generate-a-random-number-in-solidity/67332959#67332959 – Yilmaz Feb 07 '22 at 18:27
1 Answers
0
You can't create truly random numbers 'cause Blockchain is a deterministic system, so we must ensure that every node must give the same random number to be sure that every node can mint the same block.
Determinism is important because no matter where the smart contract code executes, it is critical that it produces the same result every time.
you can find some pseudo random generator through chainlink's contract: https://chain.link/chainlink-vrf

Jacopo Mosconi
- 972
- 8
- 22