tx · BZ4uBfwT1GxUjouTrktfKH4WYWDBf81Pa9MsCRgLNbEN

3N7eEzkCtBoWaNRe4ZuTPrChbnjBLKDb9Bx:  -0.01000000 Waves

2023.05.20 15:01 [2586271] smart account 3N7eEzkCtBoWaNRe4ZuTPrChbnjBLKDb9Bx > SELF 0.00000000 Waves

{ "type": 13, "id": "BZ4uBfwT1GxUjouTrktfKH4WYWDBf81Pa9MsCRgLNbEN", "fee": 1000000, "feeAssetId": null, "timestamp": 1684584084851, "version": 2, "chainId": 84, "sender": "3N7eEzkCtBoWaNRe4ZuTPrChbnjBLKDb9Bx", "senderPublicKey": "2NK7BrUZMvnHzAoHnJfz3FuDBP5zYUNoxshB49AH2kbc", "proofs": [ "5ENXFaEENnZWhS43FCJHL4iyjDJ4S1ZZ8wvCisoP1Upiqvs51VW44f639xmuPvgs8pNd3qR3VwxZvPDDByTLntZZ" ], "script": "base64:BgIECAISAAABAWkBCHJvdWxldHRlAAQDYmV0CAkAkQMCCAUBaQhwYXltZW50cwAABmFtb3VudAQHYXNzZXRJRAgJAJEDAggFAWkIcGF5bWVudHMAAAdhc3NldElkBAFjAgRSaWRlBAdjVG9CeXRlCQCgAwEJAJ4DAQkA3QQBBQFjBAlyYW5kb21OdW0JAGoCBQdjVG9CeXRlAGQEDndpblByb2JhYmlsaXR5ACgEC3dpblRyYW5zZmVyCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMIBQFpBmNhbGxlcgkAaAIFA2JldAACBQdhc3NldElEBQNuaWwECXdpbkFtb3VudAMJAGYCBQlyYW5kb21OdW0FDndpblByb2JhYmlsaXR5BQt3aW5UcmFuc2ZlcgAABA13cml0ZUxhc3RQbGF5CQDMCAIJAQxJbnRlZ2VyRW50cnkCAghsYXN0UGxheQUJcmFuZG9tTnVtBQNuaWwDCQBmAgUOd2luUHJvYmFiaWxpdHkFCXJhbmRvbU51bQkAlAoCBQt3aW5UcmFuc2ZlcgUNd3JpdGVMYXN0UGxheQkAlAoCCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMIBQFpBmNhbGxlcgAABQdhc3NldElEBQNuaWwFDXdyaXRlTGFzdFBsYXkBAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5Mx6k7g==", "height": 2586271, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: F2QYekQkKhncyXz8SKqjfGa6SvG7NhV4S3QHGDh3e4aG Next: Euugy25SCgAQVfk4DoQMt5RF91vqSg7gxERj8kRXirrZ 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)]
1515 let winAmount = if ((randomNum > winProbability))
1616 then winTransfer
1717 else 0
1818 let writeLastPlay = [IntegerEntry("lastPlay", randomNum)]
1919 if ((winProbability > randomNum))
2020 then $Tuple2(winTransfer, writeLastPlay)
2121 else $Tuple2([ScriptTransfer(i.caller, 0, assetID)], writeLastPlay)
2222 }
2323
2424
2525 @Verifier(tx)
2626 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
2727

github/deemru/w8io/169f3d6 
35.72 ms