tx · 4bV5LY9LgHAEZJMd3CXeH8PHLq81Jow8McJCcpm7sa6x
3MvEkw2C78pz2dKAppkhh1mRH6HuJGwRCSk: -0.01000000 Waves
2023.05.29 20:01 [2599533] smart account 3MvEkw2C78pz2dKAppkhh1mRH6HuJGwRCSk > SELF 0.00000000 Waves
{
"type": 13,
"id": "4bV5LY9LgHAEZJMd3CXeH8PHLq81Jow8McJCcpm7sa6x",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1685379694214,
"version": 2,
"chainId": 84,
"sender": "3MvEkw2C78pz2dKAppkhh1mRH6HuJGwRCSk",
"senderPublicKey": "9s6e65tKERrhVTka26nUspCZX3GsFZJ6zko3rgnryQqg",
"proofs": [
"3BMcQ4huVVoK3mimNfu2rbhPLm5gCeHRLWJe4PGmDNkGFV8Yc23QQTTU8Qeh6R4XHe6Goye4juSbwh3xQfe3CcRo"
],
"script": "base64:AAIEAAAAAAAAAAcIAhIDCgEIAAAAAwEAAAAUZ2VuZXJhdGVSYW5kb21OdW1iZXIAAAADAAAAAWkAAAADbWluAAAAA21heAQAAAAKcmFuZG9tU2VlZAkABLEAAAABCQAB9QAAAAEIBQAAAAFpAAAADXRyYW5zYWN0aW9uSWQEAAAADHJhbmRvbU51bWJlcgkAAGQAAAACCQAAagAAAAIFAAAACnJhbmRvbVNlZWQJAABkAAAAAgkAAGUAAAACBQAAAANtYXgFAAAAA21pbgAAAAAAAAAAAQUAAAADbWluBQAAAAxyYW5kb21OdW1iZXIBAAAAC2lzUGF5bWVudE9rAAAAAQAAAAFpBAAAABFhY2NlcHRhYmxlQXNzZXRJZAEAAAAgIkSm54hUfVEormpXug9p+nbhDnc37ahHq1IfaU2UQkcDCQAAAAAAAAIJAAGQAAAAAQgFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAJAAACAAAAAQIAAAAUUGF5bWVudCBub3QgYXR0YWNoZWQEAAAAAXAJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAA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ABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAADXdpbm5pbmdBbW91bnQFAAAABHVuaXQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgIAAAAGIWdhbWVfBQAAAAJpZAUAAAANd2lubmluZ0Ftb3VudAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACAgAAABghdGVzdF9nYW1lX3JhbmRvbU51bWJlcl8FAAAAAmlkBQAAAAxyYW5kb21OdW1iZXIJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgIAAAAZIXRlc3RfZ2FtZV93aW5uaW5nQW1vdW50XwUAAAACaWQFAAAADXdpbm5pbmdBbW91bnQFAAAAA25pbAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACAgAAAAVnYW1lXwUAAAACaWQFAAAADXdpbm5pbmdBbW91bnQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgIAAAAXdGVzdF9nYW1lX3JhbmRvbU51bWJlcl8FAAAAAmlkBQAAAAxyYW5kb21OdW1iZXIJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgIAAAAYdGVzdF9nYW1lX3dpbm5pbmdBbW91bnRfBQAAAAJpZAUAAAANd2lubmluZ0Ftb3VudAUAAAADbmlsAAAAABdgLCQ=",
"height": 2599533,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: BiE1ZnrYataDZu31XvXQT1QDmi3wDULSqfaUgFzjnfJ2
Next: none
Diff:
Old | New | | Differences |
---|
52 | 52 | | let f = a(b, 1, 12) |
---|
53 | 53 | | let o = l(f) |
---|
54 | 54 | | if ((o > 0)) |
---|
55 | | - | then [ScriptTransfer(b.caller, o, unit), IntegerEntry(("game_" + n), o), IntegerEntry(("test_game_randomNumber_" + n), f), IntegerEntry(("test_game_winningAmount_" + n), o)] |
---|
| 55 | + | then [ScriptTransfer(b.caller, o, unit), IntegerEntry(("!game_" + n), o), IntegerEntry(("!test_game_randomNumber_" + n), f), IntegerEntry(("!test_game_winningAmount_" + n), o)] |
---|
56 | 56 | | else [IntegerEntry(("game_" + n), o), IntegerEntry(("test_game_randomNumber_" + n), f), IntegerEntry(("test_game_winningAmount_" + n), o)] |
---|
57 | 57 | | } |
---|
58 | 58 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 4 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | func a (b,c,d) = { |
---|
5 | 5 | | let e = toInt(keccak256(b.transactionId)) |
---|
6 | 6 | | let f = ((e % ((d - c) + 1)) + c) |
---|
7 | 7 | | f |
---|
8 | 8 | | } |
---|
9 | 9 | | |
---|
10 | 10 | | |
---|
11 | 11 | | func g (b) = { |
---|
12 | 12 | | let h = base58'3JmaWyFqWo8YSA8x3DXCBUW7veesxacvKx19dMv7wTMg' |
---|
13 | 13 | | if ((size(b.payments) == 0)) |
---|
14 | 14 | | then throw("Payment not attached") |
---|
15 | 15 | | else { |
---|
16 | 16 | | let i = b.payments[0] |
---|
17 | 17 | | let j = i.assetId |
---|
18 | 18 | | if ($isInstanceOf(j, "ByteVector")) |
---|
19 | 19 | | then { |
---|
20 | 20 | | let k = j |
---|
21 | 21 | | if ((k == h)) |
---|
22 | 22 | | then (i.amount >= 10000000) |
---|
23 | 23 | | else false |
---|
24 | 24 | | } |
---|
25 | 25 | | else (i.amount >= 10000000) |
---|
26 | 26 | | } |
---|
27 | 27 | | } |
---|
28 | 28 | | |
---|
29 | 29 | | |
---|
30 | 30 | | func l (m) = { |
---|
31 | 31 | | let j = m |
---|
32 | 32 | | if ((1 == j)) |
---|
33 | 33 | | then 20000000 |
---|
34 | 34 | | else if ((3 == j)) |
---|
35 | 35 | | then 10000000 |
---|
36 | 36 | | else if ((5 == j)) |
---|
37 | 37 | | then 10000000 |
---|
38 | 38 | | else if ((7 == j)) |
---|
39 | 39 | | then 30000000 |
---|
40 | 40 | | else if ((8 == j)) |
---|
41 | 41 | | then 10000000 |
---|
42 | 42 | | else if ((11 == j)) |
---|
43 | 43 | | then 10000000 |
---|
44 | 44 | | else 0 |
---|
45 | 45 | | } |
---|
46 | 46 | | |
---|
47 | 47 | | |
---|
48 | 48 | | @Callable(b) |
---|
49 | 49 | | func gameLuckyWheel (n) = if (!(g(b))) |
---|
50 | 50 | | then throw("Wrong payment amount or asset") |
---|
51 | 51 | | else { |
---|
52 | 52 | | let f = a(b, 1, 12) |
---|
53 | 53 | | let o = l(f) |
---|
54 | 54 | | if ((o > 0)) |
---|
55 | | - | then [ScriptTransfer(b.caller, o, unit), IntegerEntry(("game_" + n), o), IntegerEntry(("test_game_randomNumber_" + n), f), IntegerEntry(("test_game_winningAmount_" + n), o)] |
---|
| 55 | + | then [ScriptTransfer(b.caller, o, unit), IntegerEntry(("!game_" + n), o), IntegerEntry(("!test_game_randomNumber_" + n), f), IntegerEntry(("!test_game_winningAmount_" + n), o)] |
---|
56 | 56 | | else [IntegerEntry(("game_" + n), o), IntegerEntry(("test_game_randomNumber_" + n), f), IntegerEntry(("test_game_winningAmount_" + n), o)] |
---|
57 | 57 | | } |
---|
58 | 58 | | |
---|
59 | 59 | | |
---|