How to obtain a random number in Solidity?

How do you get random numbers safe enough for things like casinos? Or it is impossible, without using an Offchain system , thanks again

1 Like

Hi @franco_villa_santana,

Anything onchain is going to be deterministic, so you would need to introduce randomness offchain.

For an example see: What can be the best way to introduce and implement Randomness in a contract? - #2 by abcoathup