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+nbhDnc37ahHq1IfaU2UQkcDCQAAAAAAAAIJAAGQAAAAAQgFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAJAAACAAAAAQIAAAAUUGF5bWVudCBub3QgYXR0YWNoZWQEAAAAAXAJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAAByRtYXRj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EAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAADXdpbm5pbmdBbW91bnQFAAAABHVuaXQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgIAAAAGIWdhbWVfBQAAAAJpZAUAAAANd2lubmluZ0Ftb3VudAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACAgAAABghdGVzdF9nYW1lX3JhbmRvbU51bWJlcl8FAAAAAmlkBQAAAAxyYW5kb21OdW1iZXIJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgIAAAAZIXRlc3RfZ2FtZV93aW5uaW5nQW1vdW50XwUAAAACaWQFAAAADXdpbm5pbmdBbW91bnQFAAAAA25pbAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACAgAAAAVnYW1lXwUAAAACaWQFAAAADXdpbm5pbmdBbW91bnQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgIAAAAXdGVzdF9nYW1lX3JhbmRvbU51bWJlcl8FAAAAAmlkBQAAAAxyYW5kb21OdW1iZXIJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgIAAAAYdGVzdF9nYW1lX3dpbm5pbmdBbW91bnRfBQAAAAJpZAUAAAANd2lubmluZ0Ftb3VudAUAAAADbmlsAAAAABdgLCQ=", "height": 2599533, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BiE1ZnrYataDZu31XvXQT1QDmi3wDULSqfaUgFzjnfJ2 Next: none Diff:
OldNewDifferences
5252 let f = a(b, 1, 12)
5353 let o = l(f)
5454 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)]
5656 else [IntegerEntry(("game_" + n), o), IntegerEntry(("test_game_randomNumber_" + n), f), IntegerEntry(("test_game_winningAmount_" + n), o)]
5757 }
5858
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func a (b,c,d) = {
55 let e = toInt(keccak256(b.transactionId))
66 let f = ((e % ((d - c) + 1)) + c)
77 f
88 }
99
1010
1111 func g (b) = {
1212 let h = base58'3JmaWyFqWo8YSA8x3DXCBUW7veesxacvKx19dMv7wTMg'
1313 if ((size(b.payments) == 0))
1414 then throw("Payment not attached")
1515 else {
1616 let i = b.payments[0]
1717 let j = i.assetId
1818 if ($isInstanceOf(j, "ByteVector"))
1919 then {
2020 let k = j
2121 if ((k == h))
2222 then (i.amount >= 10000000)
2323 else false
2424 }
2525 else (i.amount >= 10000000)
2626 }
2727 }
2828
2929
3030 func l (m) = {
3131 let j = m
3232 if ((1 == j))
3333 then 20000000
3434 else if ((3 == j))
3535 then 10000000
3636 else if ((5 == j))
3737 then 10000000
3838 else if ((7 == j))
3939 then 30000000
4040 else if ((8 == j))
4141 then 10000000
4242 else if ((11 == j))
4343 then 10000000
4444 else 0
4545 }
4646
4747
4848 @Callable(b)
4949 func gameLuckyWheel (n) = if (!(g(b)))
5050 then throw("Wrong payment amount or asset")
5151 else {
5252 let f = a(b, 1, 12)
5353 let o = l(f)
5454 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)]
5656 else [IntegerEntry(("game_" + n), o), IntegerEntry(("test_game_randomNumber_" + n), f), IntegerEntry(("test_game_winningAmount_" + n), o)]
5757 }
5858
5959

github/deemru/w8io/169f3d6 
37.10 ms