You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should better explain how to use our random, randomInt, nativePrepareRandom and nativeRandomizeLt functions, list common pitfalls, explain how validators can attack contracts using randomness and how those attacks can be mitigated.
The text was updated successfully, but these errors were encountered:
there's no way to protect from a theoretical validator attack on random-dependent smart contract. but in order to protect from regular users you just can call random/randInt (they call nativePrepareRandom by default) or nativeRandomizeLt once before all cals.
It's mostly a stub now: https://docs.tact-lang.org/cookbook/random/
We should better explain how to use our
random
,randomInt
,nativePrepareRandom
andnativeRandomizeLt
functions, list common pitfalls, explain how validators can attack contracts using randomness and how those attacks can be mitigated.The text was updated successfully, but these errors were encountered: