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+8sLPTdia1cSlbofMkBchsAAAAADlBBWU1FTlRfQU1PVU5UAAAAAAAAD0JAAAAAAAZwaXhlbHMFAAAADFJFV0FSRF9BU1NFVAAAAAAEeE1JTgAAAAAAAAAAAAAAAAAEeE1BWAAAAAAAAAAEsQAAAAAEeU1JTgAAAAAAAAAAAAAAAAAEeU1BWAAAAAAAAAACWQAAAAANUkVXQVJEX0FNT1VOVAAAAAAABfXhAAAAAAAMU1RBUlRfSEVJR0hUAAAAAAAAINEjAAAAAApFTkRfSEVJR0hUCQAAZAAAAAIFAAAADFNUQVJUX0hFSUdIVAkAAGgAAAACAAAAAAAAAAWgAAAAAAAAAAAOAAAAAAdNQVhFQUNIAAAAAAAAAAPoAAAAAAdNQVhJTVVNAAAAAgvec2QAAAAAAA5BQ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AAxwaXhlbHNfY291bnQAAAAAAAAAAAEJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgUAAAAGd2FsbGV0BQAAAAR2ZXJpCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAANUkVXQVJEX0FNT1VOVAUAAAAGcGl4ZWxzBQAAAANuaWwJAAACAAAAAQIAAAAdd3JvbmcgcGF5bWVudCBhbW91bnQgb3IgYXNzZXQJAAACAAAAAQIAAAAOb3V0IG9mIGNvbnRleHQJAAACAAAAAQkAASwAAAACCQABLAAAAAICAAAABG1heCAJAAGkAAAAAQUAAAAHTUFYRUFDSAIAAAAYIHBpeGVscyBmb3IgZWFjaCB3YWxsZXQhCQAAAgAAAAECAAAAD2FsbCBzb2xkLiB0aGFueAkAAAIAAAABAgAAAAt3cm9uZyBjb2xvcgkAAAIAAAABAgAAABxnYW1lIGlzIG5vdCBhY3RpdmUgcmlnaHQgbm93AAAAADVr/yU=", "height": 2166748, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HSsEQsvThjfWCbMyPd74wr6yY4XGYvWRNv2v2URssNVC Next: none Diff:
Old | New | Differences | |
---|---|---|---|
31 | 31 | ||
32 | 32 | let adminPubKey = base58'CMa9TJH8JthRv8Uq8pZc4FSpgZ9bvpk6XRsZktUm2ivx' | |
33 | 33 | ||
34 | + | let isOpenKey = "isOpen" | |
35 | + | ||
34 | 36 | 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"] | |
35 | 37 | ||
36 | 38 | func isPaymentOk (i) = { | |
54 | 56 | @Callable(i) | |
55 | 57 | func shutdown (req) = if ((adminPubKey != i.callerPublicKey)) | |
56 | 58 | then throw("you can not") | |
57 | - | else [BooleanEntry( | |
59 | + | else [BooleanEntry(isOpenKey, req)] | |
58 | 60 | ||
59 | 61 | ||
60 | 62 | ||
61 | 63 | @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 | + | } | |
104 | 111 | ||
105 | 112 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let PAYMENT_ASSET = base58'CgidgEMbCKXXErgJXVyZCFRaK8SBNA73Jg8mNXALtVKh' | |
5 | 5 | ||
6 | 6 | let REWARD_ASSET = base58'43W4FcqA1rEpSmUGHoGiXvpSLfhadws9LS5j3SJsKxxS' | |
7 | 7 | ||
8 | 8 | let PAYMENT_AMOUNT = 1000000 | |
9 | 9 | ||
10 | 10 | let pixels = REWARD_ASSET | |
11 | 11 | ||
12 | 12 | let xMIN = 0 | |
13 | 13 | ||
14 | 14 | let xMAX = 1201 | |
15 | 15 | ||
16 | 16 | let yMIN = 0 | |
17 | 17 | ||
18 | 18 | let yMAX = 601 | |
19 | 19 | ||
20 | 20 | let REWARD_AMOUNT = 100000000 | |
21 | 21 | ||
22 | 22 | let START_HEIGHT = 2150691 | |
23 | 23 | ||
24 | 24 | let END_HEIGHT = (START_HEIGHT + (1440 * 14)) | |
25 | 25 | ||
26 | 26 | let MAXEACH = 1000 | |
27 | 27 | ||
28 | 28 | let MAXIMUM = 2250000000000 | |
29 | 29 | ||
30 | 30 | let ACTIVE_SESSION = 1 | |
31 | 31 | ||
32 | 32 | let adminPubKey = base58'CMa9TJH8JthRv8Uq8pZc4FSpgZ9bvpk6XRsZktUm2ivx' | |
33 | 33 | ||
34 | + | let isOpenKey = "isOpen" | |
35 | + | ||
34 | 36 | 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"] | |
35 | 37 | ||
36 | 38 | func isPaymentOk (i) = { | |
37 | 39 | let acceptableAssetId = PAYMENT_ASSET | |
38 | 40 | if ((size(i.payments) == 0)) | |
39 | 41 | then throw("Payment not attached") | |
40 | 42 | else { | |
41 | 43 | let p = i.payments[0] | |
42 | 44 | match p.assetId { | |
43 | 45 | case assetId: ByteVector => | |
44 | 46 | if ((assetId == acceptableAssetId)) | |
45 | 47 | then (p.amount == 1000000) | |
46 | 48 | else false | |
47 | 49 | case _ => | |
48 | 50 | throw("Wrong payment asset") | |
49 | 51 | } | |
50 | 52 | } | |
51 | 53 | } | |
52 | 54 | ||
53 | 55 | ||
54 | 56 | @Callable(i) | |
55 | 57 | func shutdown (req) = if ((adminPubKey != i.callerPublicKey)) | |
56 | 58 | then throw("you can not") | |
57 | - | else [BooleanEntry( | |
59 | + | else [BooleanEntry(isOpenKey, req)] | |
58 | 60 | ||
59 | 61 | ||
60 | 62 | ||
61 | 63 | @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 | + | } | |
104 | 111 | ||
105 | 112 |
github/deemru/w8io/169f3d6 28.52 ms ◑