tx · 4YwDHCgA7J1iEed1RnAuZ2QED9gvi4g14ycuQJMivEgE

3N7eEzkCtBoWaNRe4ZuTPrChbnjBLKDb9Bx:  -0.01000000 Waves

2023.05.20 16:12 [2586334] smart account 3N7eEzkCtBoWaNRe4ZuTPrChbnjBLKDb9Bx > SELF 0.00000000 Waves

{ "type": 13, "id": "4YwDHCgA7J1iEed1RnAuZ2QED9gvi4g14ycuQJMivEgE", "fee": 1000000, "feeAssetId": null, "timestamp": 1684588363130, "version": 2, "chainId": 84, "sender": "3N7eEzkCtBoWaNRe4ZuTPrChbnjBLKDb9Bx", "senderPublicKey": "2NK7BrUZMvnHzAoHnJfz3FuDBP5zYUNoxshB49AH2kbc", "proofs": [ "3vZ6NxUsXaQCErDi93VyVBpZcRUZWyKGjjbZyskLgtBCCWaURtuReBFaXzruDRKXP3E2HwWfVnbatJBykJWd9cMq" ], "script": "base64:BgIECAISAAABAWkBCHJvdWxldHRlAAQDYmV0CAkAkQMCCAUBaQhwYXltZW50cwAABmFtb3VudAQHYXNzZXRJRAgJAJEDAggFAWkIcGF5bWVudHMAAAdhc3NldElkBAFjAgRSaWRlBAdjVG9CeXRlCQCgAwEJAJ4DAQkA2QQBBQFjBAlyYW5kb21OdW0JAGoCBQdjVG9CeXRlAGQEDndpblByb2JhYmlsaXR5ACgEC3dpblRyYW5zZmVyCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMIBQFpBmNhbGxlcgkAaAIFA2JldAACBQdhc3NldElEBQNuaWwEDXdyaXRlTGFzdFBsYXkJAMwIAgkBDEludGVnZXJFbnRyeQICCGxhc3RQbGF5BQlyYW5kb21OdW0FA25pbAMDCQBmAgUOd2luUHJvYmFiaWxpdHkFCXJhbmRvbU51bQkAZgIFCXJhbmRvbU51bQUOd2luUHJvYmFiaWxpdHkHCQCUCgIFC3dpblRyYW5zZmVyBQ13cml0ZUxhc3RQbGF5CQCUCgIJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwgFAWkGY2FsbGVyAAAFB2Fzc2V0SUQFA25pbAUNd3JpdGVMYXN0UGxheQECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXlWnb8N", "height": 2586334, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9w7piK4LBfFh7aDhT5VYRBNzvBEJAScCEhCLDVAyK6kh Next: 9CUVnwTyTnKq3JvNvv5ZdhSvAvTjk8kWybPWzAzC3daa Diff:
OldNewDifferences
1717 then (randomNum > winProbability)
1818 else false)
1919 then $Tuple2(winTransfer, writeLastPlay)
20- else $Tuple2(winTransfer, writeLastPlay)
20+ else $Tuple2([ScriptTransfer(i.caller, 0, assetID)], writeLastPlay)
2121 }
2222
2323
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 winProbability = 40
1414 let winTransfer = [ScriptTransfer(i.caller, (bet * 2), assetID)]
1515 let writeLastPlay = [IntegerEntry("lastPlay", randomNum)]
1616 if (if ((winProbability > randomNum))
1717 then (randomNum > winProbability)
1818 else false)
1919 then $Tuple2(winTransfer, writeLastPlay)
20- else $Tuple2(winTransfer, writeLastPlay)
20+ else $Tuple2([ScriptTransfer(i.caller, 0, assetID)], writeLastPlay)
2121 }
2222
2323
2424 @Verifier(tx)
2525 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
2626

github/deemru/w8io/169f3d6 
23.40 ms