Beitrag
Teile dein Wissen.
farshad180
Mar 15, 2025
Experten Q&A
How to handle randomness restriction in PTB?
I came across an issue where I can't execute multiple commands following a random command in the PTB. It seems that the commands following a Random
command can only be TransferObjects
or MergeCoins
. Is there a workaround like an UnsafeRandom
, or is the only option to develop our own PRNG
?
- Move CLI
1
1
Teilen
Kommentare
Antworten
1Aliabee59
Mar 16 2025, 15:17Diese Einschränkung wird bewusst durchgesetzt, um sich vor PTB-basierten Kompositionsangriffen zu schützen. Weitere Informationen finden Sie in der Dokumentation hier: https://docs.sui.io/guides/developer/advanced/randomness-onchain#programmable-transaction-block-ptb-restrictions. Leider ist kein 'UnsafeRandom'-Objekt verfügbar, mit dem Sie diese Einschränkung umgehen könnten.
1
Kommentare
Weißt du die Antwort?
Bitte melde dich an und teile sie.