tx · FefvJAdEMh7idFpWPKRmqSCtqkr9ZLVEvFqJ4qLoTdm6

3N1A95vbYuuE2ZFFUu6S1UubcE3eSpJNDE7:  -0.01000000 Waves

2022.11.07 14:20 [2306659] smart account 3N1A95vbYuuE2ZFFUu6S1UubcE3eSpJNDE7 > SELF 0.00000000 Waves

{ "type": 13, "id": "FefvJAdEMh7idFpWPKRmqSCtqkr9ZLVEvFqJ4qLoTdm6", "fee": 1000000, "feeAssetId": null, "timestamp": 1667820189760, "version": 2, "chainId": 84, "sender": "3N1A95vbYuuE2ZFFUu6S1UubcE3eSpJNDE7", "senderPublicKey": "DTmTTp6Rb9XUrniBAnWwdNc39UfdmzmtFCBgey4hsnE", "proofs": [ "jMw6h9TDFar6duhxZdX7afAWhGV4c45QVs3Nz6fYC3eJkkjuAQHAdeTw837FBdzc5PSiZxduq9EL5Vvo9aLHhEe" ], "script": "base64:AAIFAAAAAAAAABQIAhIDCgEBEgUKAwEBARIECgIICAAAABIAAAAADVBBWU1FTlRfQVNTRVQBAAAAIK2dSBaFkXln78NKeoaZ0d1Q6QVJPOT+QERHjOGDxML0AAAAAAxSRVdBUkRfQVNTRVQBAAAAICE5ROkpfF/Pivgzkjj1JL6vC/b6udUDj0UtxqhSv/q5AAAAAAZhZG1QdWIBAAAAIAMxPBN63F8xdTrjAM8zGlwpybXka9/dAmFyYk3oeMx3AAAAAAZwaXhlbHMFAAAADFJFV0FSRF9BU1NFVAAAAAAEeE1JTgAAAAAAAAAAAAAAAAAEeE1BWAAAAAAAAAAEsQAAAAAEeU1JTgAAAAAAAAAAAAAAAAAEeU1BWAAAAAAAAAACWQAAAAANUkVXQVJEX0FNT1VOVAAAAAAAAA9CQAAAAAAOUkVJU1NVRV9BTU9VTlQAAAAAAAAW42AAAAAADFNUQVJUX0hFSUdIVAAAAAAAACMPdQAAAAAKRU5EX0hFSUdIVAkAAGQAAAACBQAAAAxTVEFSVF9IRUlHSFQJAABoAAAAAgAAAAAAAAAFoAAAAAAAAAAABw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AIJAAEsAAAAAgkAASwAAAACAgAAAAZjb3VudF8JAAGkAAAAAQUAAAAHc2Vzc2lvbgIAAAABXwUAAAAKY3VycmVudEtleQkAAGQAAAACBQAAAAt3YWxsZXRDb3VudAAAAAAAAAAAAQkABEwAAAACCQEAAAAHUmVpc3N1ZQAAAAMFAAAADFJFV0FSRF9BU1NFVAUAAAAOUkVJU1NVRV9BTU9VTlQGCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAANUkVXQVJEX0FNT1VOVAUAAAAMUkVXQVJEX0FTU0VUBQAAAANuaWwJAAACAAAAAQIAAAAdV3JvbmcgcGF5bWVudCBhbW91bnQgb3IgYXNzZXQJAAACAAAAAQIAAAAOb3V0IG9mIGNvbnRleHQJAAACAAAAAQIAAAALd3JvbmcgY29sb3IJAAACAAAAAQIAAAAcZ2FtZSBpcyBub3QgYWN0aXZlIHJpZ2h0IG5vdwAAAACsMXal", "height": 2306659, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4MGQL72d2Hch3ryn1PJSynuTXwNxKLNZ5zs4vp1JRBnB Next: 77oJX8LLHtKAoXAqv1RRN8obxKJ7uRx6yfUxzBVPcSqV Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let PAYMENT_ASSET = base58'CgidgEMbCKXXErgJXVyZCFRaK8SBNA73Jg8mNXALtVKh'
55
66 let REWARD_ASSET = base58'3Eh6z6z6ouFpWxGKrPaPnZwmDnDjgYHV6tqCmZf2G7tk'
77
88 let admPub = base58'DTmTTp6Rb9XUrniBAnWwdNc39UfdmzmtFCBgey4hsnE'
99
1010 let pixels = REWARD_ASSET
1111
1212 let xMIN = 0
1313
1414 let xMAX = 1201
1515
1616 let yMIN = 0
1717
1818 let yMAX = 601
1919
2020 let REWARD_AMOUNT = 1000000
2121
2222 let REISSUE_AMOUNT = 1500000
2323
2424 let START_HEIGHT = 2297717
2525
2626 let END_HEIGHT = (START_HEIGHT + (1440 * 7))
2727
2828 let paymentFee = 100000
2929
3030 let activeSessionKey = "active_session"
3131
3232 let maxPixel = 22500
3333
3434 let maxWallet = 1000
3535
3636 let colors = ["7076E9", "5FD8F1", "D30831", "183937", "FFD345", "B04249", "FFB087", "360A90", "000000", "969696", "FF0200", "800080", "020080", "183937", "09FEFF", "7076E9", "C0C0C0", "C3103B", "9F7E69", "FFEEE2", "983C95"]
3737
3838 func isPaymentOk (i) = {
3939 let acceptableAssetId = PAYMENT_ASSET
4040 if ((size(i.payments) == 0))
4141 then throw("Payment not attached")
4242 else {
4343 let p = i.payments[0]
4444 match p.assetId {
4545 case assetId: ByteVector =>
4646 if ((assetId == acceptableAssetId))
4747 then (p.amount == paymentFee)
4848 else false
4949 case _ =>
5050 throw("Wrong payment asset")
5151 }
5252 }
5353 }
5454
5555
5656 @Callable(i)
5757 func activeSession (session) = if ((i.callerPublicKey == admPub))
5858 then [IntegerEntry(activeSessionKey, session)]
5959 else throw("you are not allowed")
6060
6161
6262
6363 @Callable(i)
6464 func settings (session,startHeight,duration) = if ((i.callerPublicKey == admPub))
6565 then {
6666 let endHeight = (startHeight + (1440 * duration))
6767 [IntegerEntry((("settings_" + toString(session)) + "_startHeight"), startHeight), IntegerEntry((("settings_" + toString(session)) + "_endHeight"), endHeight)]
6868 }
6969 else throw("you are not allowed")
7070
7171
7272
7373 @Callable(i)
7474 func coordinates (veri,xy) = {
7575 let session = valueOrElse(getInteger(this, activeSessionKey), 0)
7676 let currentKey = toBase58String(i.caller.bytes)
7777 let startHeight = valueOrElse(getInteger(this, (("settings_" + toString(session)) + "_startHeight")), START_HEIGHT)
7878 let endHeight = valueOrElse(getInteger(this, (("settings_" + toString(session)) + "_endHeight")), END_HEIGHT)
7979 let walletCount = valueOrElse(getInteger(this, ((("count_" + toString(session)) + "_") + currentKey)), 0)
8080 if (if ((height > startHeight))
8181 then (endHeight > height)
8282 else false)
8383 then {
8484 let color = containsElement(colors, veri)
8585 if (color)
8686 then {
8787 let splitter = split(xy, "_")
8888 let x = valueOrElse(parseInt(splitter[0]), 0)
8989 let y = valueOrElse(parseInt(splitter[1]), 0)
9090 if (if (((x % 8) != 0))
9191 then ((y % 8) != 0)
9292 else false)
9393 then throw("not cool.")
9494 else {
9595 let xy_new = ((toString(x) + "_") + toString(y))
9696 let veri_count = valueOrElse(getInteger(this, ("stats_" + toString(session))), 0)
9797 let wallet = (((((currentKey + "_") + xy_new) + "_") + toString(session)) + "_c")
9898 if (if (if (if (if (if ((x >= xMIN))
9999 then (xMAX > x)
100100 else false)
101101 then (y >= yMIN)
102102 else false)
103103 then (yMAX > y)
104104 else false)
105105 then (maxPixel >= veri_count)
106106 else false)
107107 then (maxWallet >= walletCount)
108108 else false)
109109 then if (isPaymentOk(i))
110110 then [StringEntry(wallet, veri), IntegerEntry(("stats_" + toString(session)), (veri_count + 1)), IntegerEntry(((("count_" + toString(session)) + "_") + currentKey), (walletCount + 1)), Reissue(REWARD_ASSET, REISSUE_AMOUNT, true), ScriptTransfer(i.caller, REWARD_AMOUNT, REWARD_ASSET)]
111111 else throw("Wrong payment amount or asset")
112112 else throw("out of context")
113113 }
114114 }
115115 else throw("wrong color")
116116 }
117117 else throw("game is not active right now")
118118 }
119119
120120

github/deemru/w8io/026f985 
54.99 ms