tx · 9Q6St1LAtYkkGCzKkUt2DWLEAKETMbz8qimZYWeoJRqb

3MqQhA21mw1UHWmdGMV9M9xQL1cpC93LF8o:  -0.01000000 Waves

2022.04.29 15:22 [2029764] smart account 3MqQhA21mw1UHWmdGMV9M9xQL1cpC93LF8o > SELF 0.00000000 Waves

{ "type": 13, "id": "9Q6St1LAtYkkGCzKkUt2DWLEAKETMbz8qimZYWeoJRqb", "fee": 1000000, "feeAssetId": null, "timestamp": 1651234990414, "version": 2, "chainId": 84, "sender": "3MqQhA21mw1UHWmdGMV9M9xQL1cpC93LF8o", "senderPublicKey": "E3TwKTkJRoqHq8mpKDYP1GvftP8ECfnCUT5atXuMXq53", "proofs": [ "z3iXMZdW9CSMMNSsKrD7GLe3y9D1uuB2bNHD159vNN2r9KNkTKSsP4erSV6Cz4yZk6a4e39JiLTbH86teSAQrH1" ], "script": "base64:AAIFAAAAAAAAAAoIAhIECgIICBIAAAAADAAAAAANUEFZTUVOVF9BU1NFVAEAAAAgrZ1IFoWReWfvw0p6hpnR3VDpBUk85P5AREeM4YPEwvQAAAAADFJFV0FSRF9BU1NFVAEAAAAgLTcTgdMkN12f4W9209EPk+8sLPTdia1cSlbofMkBchsAAAAABnBpeGVscwUAAAAMUkVXQVJEX0FTU0VUAAAAAAR4TUlOAAAAAAAAAAAAAAAAAAR4TUFYAAAAAAAAAASxAAAAAAR5TUlOAAAAAAAAAAAAAAAAAAR5TUFYAAAAAAAAAAJZAAAAAA1SRVdBUkRfQU1PVU5UAAAAAAAF9eEAAAAAAAxTVEFSVF9IRUlHSFQAAAAAAAAe8fQAAAAACkVORF9IRUlHSFQJAABkAAAAAgUAAAAMU1RBUlRfSEVJR0hUCQAAaAAAAAIAAAAAAAAABaAAAAAAAAAAAB4AAAAABmNvbG9ycwkABEwAAAACAgAAAAMwMDAJAARMAAAAAgIAAAADZmZmCQAETAAAAAICAAAABjAwMDAwMAkABEwAAAACAgAAAAZmZmZmZmYJAARMAAAAAgIAAAAGRkYwMj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AAAGd2FsbGV0BQAAAAR2ZXJpCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAANUkVXQVJEX0FNT1VOVAUAAAAGcGl4ZWxzBQAAAANuaWwJAAACAAAAAQIAAAAdV3JvbmcgcGF5bWVudCBhbW91bnQgb3IgYXNzZXQJAAACAAAAAQIAAAAOb3V0IG9mIGNvbnRleHQJAAACAAAAAQIAAAALd3JvbmcgY29sb3IJAAACAAAAAQIAAAAcZ2FtZSBpcyBub3QgYWN0aXZlIHJpZ2h0IG5vdwAAAAFpAQAAAAhzaHV0ZG93bgAAAAAJAAACAAAAAQIAAAAEdGVzdAAAAADV/u+V", "height": 2029764, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7J6HDs7Vp3q4zCY6Fhqo8iDqtyQfEKUu74b3yRr5tLDD Next: 9m6czRYzjTGKxK2bnvcjJLyR4p5DEFVRvopgyWwojNGT Diff:
OldNewDifferences
5353 let splitter = split(xy, "_")
5454 let x = valueOrElse(parseInt(splitter[0]), 0)
5555 let y = valueOrElse(parseInt(splitter[1]), 0)
56- let diffX = (x % (xMAX - 1))
57- let diffY = (y % (yMAX - 1))
58- let coX = (x - diffX)
59- let coY = (y - diffY)
60- let xy_new = ((toString(coX) + "_") + toString(coY))
61- let wallet = (((currentKey + "_") + xy_new) + "_c")
62- if (if (if (if ((x >= xMIN))
63- then (xMAX > x)
56+ if (if (((x % 8) != 0))
57+ then ((y % 8) != 0)
6458 else false)
65- then (y >= yMIN)
66- else false)
67- then (yMAX > y)
68- else false)
69- then {
70- let isEmpty = getString(this, wallet)
71- if (isPaymentOk(i))
72- then [StringEntry(wallet, veri), ScriptTransfer(i.caller, REWARD_AMOUNT, pixels)]
73- else throw("Wrong payment amount or asset")
59+ then throw("not cool.")
60+ else {
61+ let xy_new = ((toString(x) + "_") + toString(y))
62+ let wallet = (((currentKey + "_") + xy_new) + "_c")
63+ if (if (if (if ((x >= xMIN))
64+ then (xMAX > x)
65+ else false)
66+ then (y >= yMIN)
67+ else false)
68+ then (yMAX > y)
69+ else false)
70+ then {
71+ let isEmpty = getString(this, wallet)
72+ if (isPaymentOk(i))
73+ then [StringEntry(wallet, veri), ScriptTransfer(i.caller, REWARD_AMOUNT, pixels)]
74+ else throw("Wrong payment amount or asset")
75+ }
76+ else throw("out of context")
7477 }
75- else throw("out of context")
7678 }
7779 else throw("wrong color")
7880 }
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'43W4FcqA1rEpSmUGHoGiXvpSLfhadws9LS5j3SJsKxxS'
77
88 let pixels = REWARD_ASSET
99
1010 let xMIN = 0
1111
1212 let xMAX = 1201
1313
1414 let yMIN = 0
1515
1616 let yMAX = 601
1717
1818 let REWARD_AMOUNT = 100000000
1919
2020 let START_HEIGHT = 2028020
2121
2222 let END_HEIGHT = (START_HEIGHT + (1440 * 30))
2323
2424 let colors = ["000", "fff", "000000", "ffffff", "FF0200", "800080", "FF00FF", "008001", "FEFF00", "020080", "0800FF", "183937", "09FEFF", "7076E9", "C0C0C0", "C3103B", "ff0200", "ff00ff", "feff00", "0800ff", "09feff", "7076e9", "c0c0c0", "c3103b"]
2525
2626 func isPaymentOk (i) = {
2727 let acceptableAssetId = PAYMENT_ASSET
2828 if ((size(i.payments) == 0))
2929 then throw("Payment not attached")
3030 else {
3131 let p = i.payments[0]
3232 match p.assetId {
3333 case assetId: ByteVector =>
3434 if ((assetId == acceptableAssetId))
3535 then (p.amount == 1000000)
3636 else false
3737 case _ =>
3838 throw("Wrong payment asset")
3939 }
4040 }
4141 }
4242
4343
4444 @Callable(i)
4545 func coordinates (veri,xy) = if (if ((height > START_HEIGHT))
4646 then (END_HEIGHT > height)
4747 else false)
4848 then {
4949 let color = containsElement(colors, veri)
5050 if (color)
5151 then {
5252 let currentKey = toBase58String(i.caller.bytes)
5353 let splitter = split(xy, "_")
5454 let x = valueOrElse(parseInt(splitter[0]), 0)
5555 let y = valueOrElse(parseInt(splitter[1]), 0)
56- let diffX = (x % (xMAX - 1))
57- let diffY = (y % (yMAX - 1))
58- let coX = (x - diffX)
59- let coY = (y - diffY)
60- let xy_new = ((toString(coX) + "_") + toString(coY))
61- let wallet = (((currentKey + "_") + xy_new) + "_c")
62- if (if (if (if ((x >= xMIN))
63- then (xMAX > x)
56+ if (if (((x % 8) != 0))
57+ then ((y % 8) != 0)
6458 else false)
65- then (y >= yMIN)
66- else false)
67- then (yMAX > y)
68- else false)
69- then {
70- let isEmpty = getString(this, wallet)
71- if (isPaymentOk(i))
72- then [StringEntry(wallet, veri), ScriptTransfer(i.caller, REWARD_AMOUNT, pixels)]
73- else throw("Wrong payment amount or asset")
59+ then throw("not cool.")
60+ else {
61+ let xy_new = ((toString(x) + "_") + toString(y))
62+ let wallet = (((currentKey + "_") + xy_new) + "_c")
63+ if (if (if (if ((x >= xMIN))
64+ then (xMAX > x)
65+ else false)
66+ then (y >= yMIN)
67+ else false)
68+ then (yMAX > y)
69+ else false)
70+ then {
71+ let isEmpty = getString(this, wallet)
72+ if (isPaymentOk(i))
73+ then [StringEntry(wallet, veri), ScriptTransfer(i.caller, REWARD_AMOUNT, pixels)]
74+ else throw("Wrong payment amount or asset")
75+ }
76+ else throw("out of context")
7477 }
75- else throw("out of context")
7678 }
7779 else throw("wrong color")
7880 }
7981 else throw("game is not active right now")
8082
8183
8284
8385 @Callable(i)
8486 func shutdown () = throw("test")
8587
8688

github/deemru/w8io/026f985 
25.78 ms