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:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | 7 | func roulette () = { | |
8 | 8 | let bet = i.payments[0].amount | |
9 | 9 | let assetID = i.payments[0].assetId | |
10 | 10 | let c = "Ride" | |
11 | 11 | let cToByte = toInt(toBigInt(fromBase16String(c))) | |
12 | 12 | let randomNum = (cToByte % 100) | |
13 | 13 | let winProbability = 40 | |
14 | 14 | let winTransfer = [ScriptTransfer(i.caller, (bet * 2), assetID)] | |
15 | 15 | let winAmount = if ((randomNum > winProbability)) | |
16 | 16 | then winTransfer | |
17 | 17 | else 0 | |
18 | 18 | let writeLastPlay = [IntegerEntry("lastPlay", randomNum)] | |
19 | 19 | if ((winProbability > randomNum)) | |
20 | 20 | then $Tuple2(winTransfer, writeLastPlay) | |
21 | 21 | else $Tuple2([ScriptTransfer(i.caller, 0, assetID)], writeLastPlay) | |
22 | 22 | } | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | @Verifier(tx) | |
26 | 26 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
27 | 27 |
github/deemru/w8io/169f3d6 35.72 ms ◑