tx · 4ck7p3RUc9FSwBFtJgfT47iZf8ca9zeEwBwnNYvWetGM 3MqQhA21mw1UHWmdGMV9M9xQL1cpC93LF8o: -0.01000000 Waves 2022.05.06 15:58 [2039865] smart account 3MqQhA21mw1UHWmdGMV9M9xQL1cpC93LF8o > SELF 0.00000000 Waves
{ "type": 13, "id": "4ck7p3RUc9FSwBFtJgfT47iZf8ca9zeEwBwnNYvWetGM", "fee": 1000000, "feeAssetId": null, "timestamp": 1651841912761, "version": 2, "chainId": 84, "sender": "3MqQhA21mw1UHWmdGMV9M9xQL1cpC93LF8o", "senderPublicKey": "E3TwKTkJRoqHq8mpKDYP1GvftP8ECfnCUT5atXuMXq53", "proofs": [ "5z7oGBEDckH1oRoLfJAfyYR5CAgrXavJkebyeCdgbCrC29iS5NwoE6qLbELYMLNwB3ZEVkQTHq7XC5q5punwdEVw" ], "script": "base64:AAIFAAAAAAAAAW0IAhIECgIICBoSCgFhEg1QQVlNRU5UX0FTU0VUGhEKAWISDFJFV0FSRF9BU1NFVBoLCgFjEgZwaXhlbHMaCQoBZBIEeE1JThoJCgFlEgR4TUFYGgkKAWYSBHlNSU4aCQoBZxIEeU1BWBoSCgFoEg1SRVdBUkRfQU1PVU5UGhEKAWkSDFNUQVJUX0hFSUdIVBoPCgFqEgpFTkRfSEVJR0hUGgsKAWsSBmNvbG9ycxoQCgFsEgtpc1BheW1lbnRPaxoGCgFtEgFpGhYKAW4SEWFjY2VwdGFibGVBc3NldElkGgYKAW8SAXAaDAoBcBIHJG1hdGNoMBoMCgFxEgdhc3NldElkGgkKAXISBHZlcmkaBwoBcxICeHkaCgoBdBIFY29sb3IaDwoBdRIKY3VycmVudEtleRoNCgF2EghzcGxpdHRlchoGCgF3EgF4GgYKAXgSAXkaCwoBeRIGeHlfbmV3GgsKAXoSBndhbGxldAAAAAwAAAAAAWEBAAAAIK2dSBaFkXln78NKeoaZ0d1Q6QVJPOT+QERHjOGDxML0AAAAAAFiAQAAACAtNxOB0yQ3XZ/hb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UAAAABcgkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABbQAAAAZjYWxsZXIFAAAAAWgFAAAAAWMFAAAAA25pbAkAAAIAAAABAgAAAB1Xcm9uZyBwYXltZW50IGFtb3VudCBvciBhc3NldAkAAAIAAAABAgAAAA5vdXQgb2YgY29udGV4dAkAAAIAAAABAgAAAAt3cm9uZyBjb2xvcgkAAAIAAAABAgAAABxnYW1lIGlzIG5vdCBhY3RpdmUgcmlnaHQgbm93AAAAAIm3lzQ=", "height": 2039865, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HbTeBFMrdinjqAQ3Bxg7AHLGEKW6qveynL8Ts3m45XAF Next: none Full:
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 pixels = REWARD_ASSET | |
9 | 9 | ||
10 | 10 | let xMIN = 0 | |
11 | 11 | ||
12 | 12 | let xMAX = 1201 | |
13 | 13 | ||
14 | 14 | let yMIN = 0 | |
15 | 15 | ||
16 | 16 | let yMAX = 601 | |
17 | 17 | ||
18 | 18 | let REWARD_AMOUNT = 100000000 | |
19 | 19 | ||
20 | 20 | let START_HEIGHT = 2028020 | |
21 | 21 | ||
22 | 22 | let END_HEIGHT = (START_HEIGHT + (1440 * 30)) | |
23 | 23 | ||
24 | 24 | 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"] | |
25 | 25 | ||
26 | 26 | func isPaymentOk (i) = { | |
27 | 27 | let acceptableAssetId = PAYMENT_ASSET | |
28 | 28 | if ((size(i.payments) == 0)) | |
29 | 29 | then throw("Payment not attached") | |
30 | 30 | else { | |
31 | 31 | let p = i.payments[0] | |
32 | 32 | match p.assetId { | |
33 | 33 | case assetId: ByteVector => | |
34 | 34 | if ((assetId == acceptableAssetId)) | |
35 | 35 | then (p.amount == 1000000) | |
36 | 36 | else false | |
37 | 37 | case _ => | |
38 | 38 | throw("Wrong payment asset") | |
39 | 39 | } | |
40 | 40 | } | |
41 | 41 | } | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | @Callable(i) | |
45 | 45 | func coordinates (veri,xy) = if (if ((height > START_HEIGHT)) | |
46 | 46 | then (END_HEIGHT > height) | |
47 | 47 | else false) | |
48 | 48 | then { | |
49 | 49 | let color = containsElement(colors, veri) | |
50 | 50 | if (color) | |
51 | 51 | then { | |
52 | 52 | let currentKey = toBase58String(i.caller.bytes) | |
53 | 53 | let splitter = split(xy, "_") | |
54 | 54 | let x = valueOrElse(parseInt(splitter[0]), 0) | |
55 | 55 | let y = valueOrElse(parseInt(splitter[1]), 0) | |
56 | 56 | if (if (((x % 8) != 0)) | |
57 | 57 | then ((y % 8) != 0) | |
58 | 58 | else false) | |
59 | 59 | then throw("not cool.") | |
60 | 60 | else { | |
61 | 61 | let xy_new = ((toString(x) + "_") + toString(y)) | |
62 | 62 | let wallet = (((currentKey + "_") + xy_new) + "_c") | |
63 | 63 | if (if (if (if ((x >= xMIN)) | |
64 | 64 | then (xMAX > x) | |
65 | 65 | else false) | |
66 | 66 | then (y >= yMIN) | |
67 | 67 | else false) | |
68 | 68 | then (yMAX > y) | |
69 | 69 | else false) | |
70 | 70 | then if (isPaymentOk(i)) | |
71 | 71 | then [StringEntry(wallet, veri), ScriptTransfer(i.caller, REWARD_AMOUNT, pixels)] | |
72 | 72 | else throw("Wrong payment amount or asset") | |
73 | 73 | else throw("out of context") | |
74 | 74 | } | |
75 | 75 | } | |
76 | 76 | else throw("wrong color") | |
77 | 77 | } | |
78 | 78 | else throw("game is not active right now") | |
79 | 79 | ||
80 | 80 |
github/deemru/w8io/169f3d6 61.23 ms ◑