tx · Euugy25SCgAQVfk4DoQMt5RF91vqSg7gxERj8kRXirrZ

3N7eEzkCtBoWaNRe4ZuTPrChbnjBLKDb9Bx:  -0.01000000 Waves

2023.05.20 15:04 [2586274] smart account 3N7eEzkCtBoWaNRe4ZuTPrChbnjBLKDb9Bx > SELF 0.00000000 Waves

{ "type": 13, "id": "Euugy25SCgAQVfk4DoQMt5RF91vqSg7gxERj8kRXirrZ", "fee": 1000000, "feeAssetId": null, "timestamp": 1684584272901, "version": 2, "chainId": 84, "sender": "3N7eEzkCtBoWaNRe4ZuTPrChbnjBLKDb9Bx", "senderPublicKey": "2NK7BrUZMvnHzAoHnJfz3FuDBP5zYUNoxshB49AH2kbc", "proofs": [ "4Lc9VLVwmjZqHM3TVpXaapstWVyod8GzGVMfidrSNN3unNketQpDPopKFLoxuKVsoAtCG4hpnwaiK7EkdeqKNnJz" ], "script": "base64:BgIECAISAAABAWkBCHJvdWxldHRlAAQDYmV0CAkAkQMCCAUBaQhwYXltZW50cwAABmFtb3VudAQHYXNzZXRJRAgJAJEDAggFAWkIcGF5bWVudHMAAAdhc3NldElkBAFjAgRSaWRlBAdjVG9CeXRlCQCgAwEJAJ4DAQkA3QQBBQFjBAlyYW5kb21OdW0JAGoCBQdjVG9CeXRlAGQEDndpblByb2JhYmlsaXR5ACgEC3dpblRyYW5zZmVyCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMIBQFpBmNhbGxlcgkAaAIFA2JldAACBQdhc3NldElEBQNuaWwEDXdyaXRlTGFzdFBsYXkJAMwIAgkBDEludGVnZXJFbnRyeQICCGxhc3RQbGF5BQlyYW5kb21OdW0FA25pbAMJAGYCBQ53aW5Qcm9iYWJpbGl0eQUJcmFuZG9tTnVtCQCUCgIFC3dpblRyYW5zZmVyBQ13cml0ZUxhc3RQbGF5CQCUCgIJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwgFAWkGY2FsbGVyAAAFB2Fzc2V0SUQFA25pbAUNd3JpdGVMYXN0UGxheQECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXmZ6Dj4", "height": 2586274, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BZ4uBfwT1GxUjouTrktfKH4WYWDBf81Pa9MsCRgLNbEN Next: 2FpunriByB1GDBLnzRiLhV14dAcwxKRrvyAgXYnJdWtF Diff:
OldNewDifferences
1212 let randomNum = (cToByte % 100)
1313 let winProbability = 40
1414 let winTransfer = [ScriptTransfer(i.caller, (bet * 2), assetID)]
15- let winAmount = if ((randomNum > winProbability))
16- then winTransfer
17- else 0
1815 let writeLastPlay = [IntegerEntry("lastPlay", randomNum)]
1916 if ((winProbability > randomNum))
2017 then $Tuple2(winTransfer, writeLastPlay)
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(fromBase16String(c)))
1212 let randomNum = (cToByte % 100)
1313 let winProbability = 40
1414 let winTransfer = [ScriptTransfer(i.caller, (bet * 2), assetID)]
15- let winAmount = if ((randomNum > winProbability))
16- then winTransfer
17- else 0
1815 let writeLastPlay = [IntegerEntry("lastPlay", randomNum)]
1916 if ((winProbability > randomNum))
2017 then $Tuple2(winTransfer, writeLastPlay)
2118 else $Tuple2([ScriptTransfer(i.caller, 0, assetID)], writeLastPlay)
2219 }
2320
2421
2522 @Verifier(tx)
2623 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
2724

github/deemru/w8io/169f3d6 
31.30 ms