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:
Old | New | | Differences |
---|
14 | 14 | | let winProbability = 40 |
---|
15 | 15 | | let winTransfer = [ScriptTransfer(i.caller, (bet * 2), assetID)] |
---|
16 | 16 | | let writeLastPlay = [IntegerEntry("lastPlay", randomNum)] |
---|
17 | | - | if ((randomNum2 > winProbability)) |
---|
| 17 | + | if ((winProbability > randomNum2)) |
---|
18 | 18 | | then $Tuple2(winTransfer, writeLastPlay) |
---|
19 | 19 | | else $Tuple2([ScriptTransfer(i.caller, 0, assetID)], writeLastPlay) |
---|
20 | 20 | | } |
---|
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(fromBase58String(c))) |
---|
12 | 12 | | let randomNum = (cToByte % 100) |
---|
13 | 13 | | let randomNum2 = 4 |
---|
14 | 14 | | let winProbability = 40 |
---|
15 | 15 | | let winTransfer = [ScriptTransfer(i.caller, (bet * 2), assetID)] |
---|
16 | 16 | | let writeLastPlay = [IntegerEntry("lastPlay", randomNum)] |
---|
17 | | - | if ((randomNum2 > winProbability)) |
---|
| 17 | + | if ((winProbability > randomNum2)) |
---|
18 | 18 | | then $Tuple2(winTransfer, writeLastPlay) |
---|
19 | 19 | | else $Tuple2([ScriptTransfer(i.caller, 0, assetID)], writeLastPlay) |
---|
20 | 20 | | } |
---|
21 | 21 | | |
---|
22 | 22 | | |
---|
23 | 23 | | @Verifier(tx) |
---|
24 | 24 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
25 | 25 | | |
---|