tx · HEQyjUJVPPFWRXLLX7MVE3pTRJXBveH5ff7eXcMpX9wR

3MqBZQSfaCVFG3HXjE7Jaeq6Z4ztMU2miPz:  -0.00400000 Waves

2022.08.02 13:25 [2166748] smart account 3MqBZQSfaCVFG3HXjE7Jaeq6Z4ztMU2miPz > SELF 0.00000000 Waves

{ "type": 13, "id": "HEQyjUJVPPFWRXLLX7MVE3pTRJXBveH5ff7eXcMpX9wR", "fee": 400000, "feeAssetId": null, "timestamp": 1659435965161, "version": 2, "chainId": 84, "sender": "3MqBZQSfaCVFG3HXjE7Jaeq6Z4ztMU2miPz", "senderPublicKey": "HfEpHsKBiv2JxCkN63ubUCnTfKx6PqsjC6pYWHMwHXYp", "proofs": [ "3GCsZBBKaeUXNPP55Cjcd3gH6BCr5cLQVkHzzqJYsoBtKCUUhe87Vj7fvWunKCBNtSmcwF1K4LJPrbTRGBuCGf3r" ], "script": "base64:AAIFAAAAAAAAAA0IAhIDCgEEEgQKAggIAAAAEgAAAAANUEFZTUVOVF9BU1NFVAEAAAAgrZ1IFoWReWfvw0p6hpnR3VDpBUk85P5AREeM4YPEwvQAAAAADFJFV0FSRF9BU1NFVAEAAAAgLTcTgdMkN12f4W9209EPk+8sLPTdia1cSlbofMkBchsAAAAADlBBWU1FTlRfQU1PVU5UAAAAAAAAD0JAAAAAAAZwaXhlbHMFAAAADFJFV0FSRF9BU1NFVAAAAAAEeE1JTgAAAAAAAAAAAAAAAAAEeE1BWAAAAAAAAAAEsQAAAAAEeU1JTgAAAAAAAAAAAAAAAAAEeU1BWAAAAAAAAAACWQAAAAANUkVXQVJEX0FNT1VOVAAAAAAABfXhAAAAAAAMU1RBUlRfSEVJR0hUAAAAAAAAINEjAAAAAApFTkRfSEVJR0hUCQAAZAAAAAIFAAAADFNUQVJUX0hFSUdIVAkAAGgAAAACAAAAAAAAAAWgAAAAAAAAAAAOAAAAAAdNQVhFQUNIAAAAAAAAAAPoAAAAAAdNQVhJTVVNAAAAAgvec2QAAAAAAA5B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AAAxwaXhlbHNfY291bnQAAAAAAAAAAAEJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgUAAAAGd2FsbGV0BQAAAAR2ZXJpCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAANUkVXQVJEX0FNT1VOVAUAAAAGcGl4ZWxzBQAAAANuaWwJAAACAAAAAQIAAAAdd3JvbmcgcGF5bWVudCBhbW91bnQgb3IgYXNzZXQJAAACAAAAAQIAAAAOb3V0IG9mIGNvbnRleHQJAAACAAAAAQkAASwAAAACCQABLAAAAAICAAAABG1heCAJAAGkAAAAAQUAAAAHTUFYRUFDSAIAAAAYIHBpeGVscyBmb3IgZWFjaCB3YWxsZXQhCQAAAgAAAAECAAAAD2FsbCBzb2xkLiB0aGFueAkAAAIAAAABAgAAAAt3cm9uZyBjb2xvcgkAAAIAAAABAgAAABxnYW1lIGlzIG5vdCBhY3RpdmUgcmlnaHQgbm93AAAAADVr/yU=", "height": 2166748, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HSsEQsvThjfWCbMyPd74wr6yY4XGYvWRNv2v2URssNVC Next: none Diff:
OldNewDifferences
3131
3232 let adminPubKey = base58'CMa9TJH8JthRv8Uq8pZc4FSpgZ9bvpk6XRsZktUm2ivx'
3333
34+let isOpenKey = "isOpen"
35+
3436 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"]
3537
3638 func isPaymentOk (i) = {
5456 @Callable(i)
5557 func shutdown (req) = if ((adminPubKey != i.callerPublicKey))
5658 then throw("you can not")
57- else [BooleanEntry("isOpen", req)]
59+ else [BooleanEntry(isOpenKey, req)]
5860
5961
6062
6163 @Callable(i)
62-func coordinates (veri,xy) = if (if ((height > START_HEIGHT))
63- then (END_HEIGHT > height)
64- else false)
65- then {
66- let color = containsElement(colors, veri)
67- if (color)
68- then {
69- let currentKey = toBase58String(i.caller.bytes)
70- let splitter = split(xy, "_")
71- let x = valueOrElse(parseInt(splitter[0]), 0)
72- let y = valueOrElse(parseInt(splitter[1]), 0)
73- if (if (((x % 8) != 0))
74- then true
75- else ((y % 8) != 0))
76- then throw("not cool.")
77- else {
78- let xy_new = ((toString(x) + "_") + toString(y))
79- let wallet = (((currentKey + "_") + xy_new) + "_c")
80- let count_key = (currentKey + "_count")
81- let pixels_count_key = "pixels_count"
82- let count = valueOrElse(getInteger(this, count_key), 0)
83- let pixels_count = valueOrElse(getInteger(this, pixels_count_key), 0)
84- if ((MAXIMUM >= pixels_count))
85- then if ((MAXEACH >= count))
86- then if (if (if (if ((x >= xMIN))
87- then (xMAX > x)
88- else false)
89- then (y >= yMIN)
90- else false)
91- then (yMAX > y)
92- else false)
93- then if (isPaymentOk(i))
94- then [IntegerEntry(count_key, (count + 1)), IntegerEntry(pixels_count_key, (pixels_count + 1)), StringEntry(wallet, veri), ScriptTransfer(i.caller, REWARD_AMOUNT, pixels)]
95- else throw("wrong payment amount or asset")
96- else throw("out of context")
97- else throw((("max " + toString(MAXEACH)) + " pixels for each wallet!"))
98- else throw("all sold. thanx")
99- }
100- }
101- else throw("wrong color")
102- }
103- else throw("game is not active right now")
64+func coordinates (veri,xy) = {
65+ let isActive = valueOrElse(getBoolean(this, isOpenKey), true)
66+ if (if (if ((height > START_HEIGHT))
67+ then (END_HEIGHT > height)
68+ else false)
69+ then true
70+ else isActive)
71+ then {
72+ let color = containsElement(colors, veri)
73+ if (color)
74+ then {
75+ let currentKey = toBase58String(i.caller.bytes)
76+ let splitter = split(xy, "_")
77+ let x = valueOrElse(parseInt(splitter[0]), 0)
78+ let y = valueOrElse(parseInt(splitter[1]), 0)
79+ if (if (((x % 8) != 0))
80+ then true
81+ else ((y % 8) != 0))
82+ then throw("not cool.")
83+ else {
84+ let xy_new = ((toString(x) + "_") + toString(y))
85+ let wallet = (((currentKey + "_") + xy_new) + "_c")
86+ let count_key = (currentKey + "_count")
87+ let pixels_count_key = "pixels_count"
88+ let count = valueOrElse(getInteger(this, count_key), 0)
89+ let pixels_count = valueOrElse(getInteger(this, pixels_count_key), 0)
90+ if ((MAXIMUM >= pixels_count))
91+ then if ((MAXEACH >= count))
92+ then if (if (if (if ((x >= xMIN))
93+ then (xMAX > x)
94+ else false)
95+ then (y >= yMIN)
96+ else false)
97+ then (yMAX > y)
98+ else false)
99+ then if (isPaymentOk(i))
100+ then [IntegerEntry(count_key, (count + 1)), IntegerEntry(pixels_count_key, (pixels_count + 1)), StringEntry(wallet, veri), ScriptTransfer(i.caller, REWARD_AMOUNT, pixels)]
101+ else throw("wrong payment amount or asset")
102+ else throw("out of context")
103+ else throw((("max " + toString(MAXEACH)) + " pixels for each wallet!"))
104+ else throw("all sold. thanx")
105+ }
106+ }
107+ else throw("wrong color")
108+ }
109+ else throw("game is not active right now")
110+ }
104111
105112
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 PAYMENT_AMOUNT = 1000000
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 = 100000000
2121
2222 let START_HEIGHT = 2150691
2323
2424 let END_HEIGHT = (START_HEIGHT + (1440 * 14))
2525
2626 let MAXEACH = 1000
2727
2828 let MAXIMUM = 2250000000000
2929
3030 let ACTIVE_SESSION = 1
3131
3232 let adminPubKey = base58'CMa9TJH8JthRv8Uq8pZc4FSpgZ9bvpk6XRsZktUm2ivx'
3333
34+let isOpenKey = "isOpen"
35+
3436 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"]
3537
3638 func isPaymentOk (i) = {
3739 let acceptableAssetId = PAYMENT_ASSET
3840 if ((size(i.payments) == 0))
3941 then throw("Payment not attached")
4042 else {
4143 let p = i.payments[0]
4244 match p.assetId {
4345 case assetId: ByteVector =>
4446 if ((assetId == acceptableAssetId))
4547 then (p.amount == 1000000)
4648 else false
4749 case _ =>
4850 throw("Wrong payment asset")
4951 }
5052 }
5153 }
5254
5355
5456 @Callable(i)
5557 func shutdown (req) = if ((adminPubKey != i.callerPublicKey))
5658 then throw("you can not")
57- else [BooleanEntry("isOpen", req)]
59+ else [BooleanEntry(isOpenKey, req)]
5860
5961
6062
6163 @Callable(i)
62-func coordinates (veri,xy) = if (if ((height > START_HEIGHT))
63- then (END_HEIGHT > height)
64- else false)
65- then {
66- let color = containsElement(colors, veri)
67- if (color)
68- then {
69- let currentKey = toBase58String(i.caller.bytes)
70- let splitter = split(xy, "_")
71- let x = valueOrElse(parseInt(splitter[0]), 0)
72- let y = valueOrElse(parseInt(splitter[1]), 0)
73- if (if (((x % 8) != 0))
74- then true
75- else ((y % 8) != 0))
76- then throw("not cool.")
77- else {
78- let xy_new = ((toString(x) + "_") + toString(y))
79- let wallet = (((currentKey + "_") + xy_new) + "_c")
80- let count_key = (currentKey + "_count")
81- let pixels_count_key = "pixels_count"
82- let count = valueOrElse(getInteger(this, count_key), 0)
83- let pixels_count = valueOrElse(getInteger(this, pixels_count_key), 0)
84- if ((MAXIMUM >= pixels_count))
85- then if ((MAXEACH >= count))
86- then if (if (if (if ((x >= xMIN))
87- then (xMAX > x)
88- else false)
89- then (y >= yMIN)
90- else false)
91- then (yMAX > y)
92- else false)
93- then if (isPaymentOk(i))
94- then [IntegerEntry(count_key, (count + 1)), IntegerEntry(pixels_count_key, (pixels_count + 1)), StringEntry(wallet, veri), ScriptTransfer(i.caller, REWARD_AMOUNT, pixels)]
95- else throw("wrong payment amount or asset")
96- else throw("out of context")
97- else throw((("max " + toString(MAXEACH)) + " pixels for each wallet!"))
98- else throw("all sold. thanx")
99- }
100- }
101- else throw("wrong color")
102- }
103- else throw("game is not active right now")
64+func coordinates (veri,xy) = {
65+ let isActive = valueOrElse(getBoolean(this, isOpenKey), true)
66+ if (if (if ((height > START_HEIGHT))
67+ then (END_HEIGHT > height)
68+ else false)
69+ then true
70+ else isActive)
71+ then {
72+ let color = containsElement(colors, veri)
73+ if (color)
74+ then {
75+ let currentKey = toBase58String(i.caller.bytes)
76+ let splitter = split(xy, "_")
77+ let x = valueOrElse(parseInt(splitter[0]), 0)
78+ let y = valueOrElse(parseInt(splitter[1]), 0)
79+ if (if (((x % 8) != 0))
80+ then true
81+ else ((y % 8) != 0))
82+ then throw("not cool.")
83+ else {
84+ let xy_new = ((toString(x) + "_") + toString(y))
85+ let wallet = (((currentKey + "_") + xy_new) + "_c")
86+ let count_key = (currentKey + "_count")
87+ let pixels_count_key = "pixels_count"
88+ let count = valueOrElse(getInteger(this, count_key), 0)
89+ let pixels_count = valueOrElse(getInteger(this, pixels_count_key), 0)
90+ if ((MAXIMUM >= pixels_count))
91+ then if ((MAXEACH >= count))
92+ then if (if (if (if ((x >= xMIN))
93+ then (xMAX > x)
94+ else false)
95+ then (y >= yMIN)
96+ else false)
97+ then (yMAX > y)
98+ else false)
99+ then if (isPaymentOk(i))
100+ then [IntegerEntry(count_key, (count + 1)), IntegerEntry(pixels_count_key, (pixels_count + 1)), StringEntry(wallet, veri), ScriptTransfer(i.caller, REWARD_AMOUNT, pixels)]
101+ else throw("wrong payment amount or asset")
102+ else throw("out of context")
103+ else throw((("max " + toString(MAXEACH)) + " pixels for each wallet!"))
104+ else throw("all sold. thanx")
105+ }
106+ }
107+ else throw("wrong color")
108+ }
109+ else throw("game is not active right now")
110+ }
104111
105112

github/deemru/w8io/169f3d6 
28.52 ms