tx · Axr5u4y3SjX2LPTTvYK5ahqLJhiYexJ88AgQwCyUu5b1

3N7eEzkCtBoWaNRe4ZuTPrChbnjBLKDb9Bx:  -0.01000000 Waves

2023.05.20 16:35 [2586357] smart account 3N7eEzkCtBoWaNRe4ZuTPrChbnjBLKDb9Bx > SELF 0.00000000 Waves

{ "type": 13, "id": "Axr5u4y3SjX2LPTTvYK5ahqLJhiYexJ88AgQwCyUu5b1", "fee": 1000000, "feeAssetId": null, "timestamp": 1684589800891, "version": 2, "chainId": 84, "sender": "3N7eEzkCtBoWaNRe4ZuTPrChbnjBLKDb9Bx", "senderPublicKey": "2NK7BrUZMvnHzAoHnJfz3FuDBP5zYUNoxshB49AH2kbc", "proofs": [ "2EBRTYC36mgrQcek3YvdWzs2Pr8VwnkocqTMXwSfzFcgfRcMwXFHqfBdRRfg72UZYwfEd1FBEGzb3N4CnyhsgN73" ], "script": "base64:BgIECAISAAABAWkBCHJvdWxldHRlAAQDYmV0CAkAkQMCCAUBaQhwYXltZW50cwAABmFtb3VudAQHYXNzZXRJRAgJAJEDAggFAWkIcGF5bWVudHMAAAdhc3NldElkBAFjAgRSaWRlBAdjVG9CeXRlCQCgAwEJAJ4DAQkA2QQBBQFjBAlyYW5kb21OdW0JAGoCBQdjVG9CeXRlAGQECnJhbmRvbU51bTIABAQOd2luUHJvYmFiaWxpdHkAKAQLd2luVHJhbnNmZXIJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwgFAWkGY2FsbGVyCQBoAgUDYmV0AAIFB2Fzc2V0SUQFA25pbAQNd3JpdGVMYXN0UGxheQkAzAgCCQEMSW50ZWdlckVudHJ5AgIIbGFzdFBsYXkFCXJhbmRvbU51bQUDbmlsAwkAZgIFDndpblByb2JhYmlsaXR5BQpyYW5kb21OdW0yCQCUCgIFC3dpblRyYW5zZmVyBQ13cml0ZUxhc3RQbGF5CQCUCgIJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwgFAWkGY2FsbGVyAAAFB2Fzc2V0SUQFA25pbAUNd3JpdGVMYXN0UGxheQECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXks+NK3", "height": 2586357, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2mJS9xRua3moE1zZYacuswp6BQST9A3zB7AgttBeGmcD Next: 6KihG74AYXmedUyGSkJRzgT3qoVhc2fWFWiHNPjoid2o Diff:
OldNewDifferences
1414 let winProbability = 40
1515 let winTransfer = [ScriptTransfer(i.caller, (bet * 2), assetID)]
1616 let writeLastPlay = [IntegerEntry("lastPlay", randomNum)]
17- if ((randomNum2 > winProbability))
17+ if ((winProbability > randomNum2))
1818 then $Tuple2(winTransfer, writeLastPlay)
1919 else $Tuple2([ScriptTransfer(i.caller, 0, assetID)], writeLastPlay)
2020 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
77 func roulette () = {
88 let bet = i.payments[0].amount
99 let assetID = i.payments[0].assetId
1010 let c = "Ride"
1111 let cToByte = toInt(toBigInt(fromBase58String(c)))
1212 let randomNum = (cToByte % 100)
1313 let randomNum2 = 4
1414 let winProbability = 40
1515 let winTransfer = [ScriptTransfer(i.caller, (bet * 2), assetID)]
1616 let writeLastPlay = [IntegerEntry("lastPlay", randomNum)]
17- if ((randomNum2 > winProbability))
17+ if ((winProbability > randomNum2))
1818 then $Tuple2(winTransfer, writeLastPlay)
1919 else $Tuple2([ScriptTransfer(i.caller, 0, assetID)], writeLastPlay)
2020 }
2121
2222
2323 @Verifier(tx)
2424 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
2525

github/deemru/w8io/026f985 
36.43 ms