tx · 3qhiik8RjGySZNAUBimQWsjSpbAuahDiSV6wp8VQfSYs 3MpoumY9aSx5J9uRNYMuunsunnXfVvAjxGe: -0.00300000 Waves 2022.07.22 11:08 [2150715] smart account 3MpoumY9aSx5J9uRNYMuunsunnXfVvAjxGe > SELF 0.00000000 Waves
{ "type": 13, "id": "3qhiik8RjGySZNAUBimQWsjSpbAuahDiSV6wp8VQfSYs", "fee": 300000, "feeAssetId": null, "timestamp": 1658477373891, "version": 2, "chainId": 84, "sender": "3MpoumY9aSx5J9uRNYMuunsunnXfVvAjxGe", "senderPublicKey": "8WNkiyghkNDXTborypvinQYZDjXroHZf1XkDLLmmiKuE", "proofs": [ "26Qeo88aBcacemQKeXwuTjFafyys38DGkK9HsWnHwKSAGqcGdt1yB8wLZV7GktNKXBzPQJZVhnwNamswcQPq1aBb" ], "script": "base64:AAIFAAAAAAAAAAgIAhIECgIICAAAAA8AAAAADVBBWU1FTlRfQVNTRVQBAAAAIK2dSBaFkXln78NKeoaZ0d1Q6QVJPOT+QERHjOGDxML0AAAAAAxSRVdBUkRfQVNTRVQBAAAAIC03E4HTJDddn+FvdtPRD5PvLCz03YmtXEpW6HzJAXIbAAAAAA9TVEFLSU5HX0FDQ09VTlQJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVSj9n5m9ycP2zvtkCELF/VNfkeDSHwQHTgAAAAADlBBWU1FTlRfQU1PVU5UAAAAAAAAD0JAAAAAAAZwaXhlbHMFAAAADFJFV0FSRF9BU1NFVAAAAAAEeE1JTgAAAAAAAAAAAAAAAAAEeE1BWAAAAAAAAAAEsQAAAAAEeU1JTgAAAAAAAAAAAAAAAAAEeU1BWAAAAAAAAAACWQAAAAANUkVXQVJEX0FNT1VOVAAAAAAABfXhAAAAAAAMU1RBUlRfSEVJR0hUAAAAAAAAINEjAAAAAApFTkRfSEVJR0hUCQAAZAAAAAIFAAAADFNUQVJUX0hFSUdIVAkAAGgAAAACAAAAAAAAAAWgAAAAAAAAAAAOAAAAAAdN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fa2V5AAAAAAAAAAAAAwkAAGcAAAACBQAAAAdNQVhFQUNIBQAAAAVjb3VudAMDAwMJAABnAAAAAgUAAAABeAUAAAAEeE1JTgkAAGYAAAACBQAAAAR4TUFYBQAAAAF4BwkAAGcAAAACBQAAAAF5BQAAAAR5TUlOBwkAAGYAAAACBQAAAAR5TUFYBQAAAAF5BwMJAQAAAAtpc1BheW1lbnRPawAAAAEFAAAAAWkJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIFAAAACWNvdW50X2tleQkAAGQAAAACBQAAAAVjb3VudAAAAAAAAAAAAQkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACBQAAAAZ3YWxsZXQFAAAABHZlcmkJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAA1SRVdBUkRfQU1PVU5UBQAAAAZwaXhlbHMJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAAPU1RBS0lOR19BQ0NPVU5UAAAAAAAAA9CQBQAAAA1QQVlNRU5UX0FTU0VUBQAAAANuaWwJAAACAAAAAQIAAAAdV3JvbmcgcGF5bWVudCBhbW91bnQgb3IgYXNzZXQJAAACAAAAAQIAAAAOb3V0IG9mIGNvbnRleHQJAAACAAAAAQIAAAAgbWF4IDEwMDAgcGl4ZWxzIGZvciBlYWNoIHdhbGxldCEJAAACAAAAAQIAAAALd3JvbmcgY29sb3IJAAACAAAAAQIAAAAcZ2FtZSBpcyBub3QgYWN0aXZlIHJpZ2h0IG5vdwAAAADnWrcB", "height": 2150715, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7n1B41SFo7yP31C6uSa799wXAvqds2TvS6svTWiGmRg3 Next: none Diff:
Old | New | Differences | |
---|---|---|---|
23 | 23 | ||
24 | 24 | let START_HEIGHT = 2150691 | |
25 | 25 | ||
26 | - | let END_HEIGHT = (START_HEIGHT + (1440 * | |
26 | + | let END_HEIGHT = (START_HEIGHT + (1440 * 14)) | |
27 | 27 | ||
28 | 28 | let MAXEACH = 1000 | |
29 | 29 |
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 STAKING_ACCOUNT = Address(base58'3N4s3CsjSLPaiV5ZsMHNMbPN6YNxYePkD5h') | |
9 | 9 | ||
10 | 10 | let PAYMENT_AMOUNT = 1000000 | |
11 | 11 | ||
12 | 12 | let pixels = REWARD_ASSET | |
13 | 13 | ||
14 | 14 | let xMIN = 0 | |
15 | 15 | ||
16 | 16 | let xMAX = 1201 | |
17 | 17 | ||
18 | 18 | let yMIN = 0 | |
19 | 19 | ||
20 | 20 | let yMAX = 601 | |
21 | 21 | ||
22 | 22 | let REWARD_AMOUNT = 100000000 | |
23 | 23 | ||
24 | 24 | let START_HEIGHT = 2150691 | |
25 | 25 | ||
26 | - | let END_HEIGHT = (START_HEIGHT + (1440 * | |
26 | + | let END_HEIGHT = (START_HEIGHT + (1440 * 14)) | |
27 | 27 | ||
28 | 28 | let MAXEACH = 1000 | |
29 | 29 | ||
30 | 30 | 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"] | |
31 | 31 | ||
32 | 32 | func isPaymentOk (i) = { | |
33 | 33 | let acceptableAssetId = PAYMENT_ASSET | |
34 | 34 | if ((size(i.payments) == 0)) | |
35 | 35 | then throw("Payment not attached") | |
36 | 36 | else { | |
37 | 37 | let p = i.payments[0] | |
38 | 38 | match p.assetId { | |
39 | 39 | case assetId: ByteVector => | |
40 | 40 | if ((assetId == acceptableAssetId)) | |
41 | 41 | then (p.amount == 1000000) | |
42 | 42 | else false | |
43 | 43 | case _ => | |
44 | 44 | throw("Wrong payment asset") | |
45 | 45 | } | |
46 | 46 | } | |
47 | 47 | } | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | @Callable(i) | |
51 | 51 | func coordinates (veri,xy) = if (if ((height > START_HEIGHT)) | |
52 | 52 | then (END_HEIGHT > height) | |
53 | 53 | else false) | |
54 | 54 | then { | |
55 | 55 | let color = containsElement(colors, veri) | |
56 | 56 | if (color) | |
57 | 57 | then { | |
58 | 58 | let currentKey = toBase58String(i.caller.bytes) | |
59 | 59 | let splitter = split(xy, "_") | |
60 | 60 | let x = valueOrElse(parseInt(splitter[0]), 0) | |
61 | 61 | let y = valueOrElse(parseInt(splitter[1]), 0) | |
62 | 62 | if (if (((x % 8) != 0)) | |
63 | 63 | then true | |
64 | 64 | else ((y % 8) != 0)) | |
65 | 65 | then throw("not cool.") | |
66 | 66 | else { | |
67 | 67 | let xy_new = ((toString(x) + "_") + toString(y)) | |
68 | 68 | let wallet = (((currentKey + "_") + xy_new) + "_c") | |
69 | 69 | let count_key = (currentKey + "_count") | |
70 | 70 | let count = valueOrElse(getInteger(this, count_key), 0) | |
71 | 71 | if ((MAXEACH >= count)) | |
72 | 72 | then if (if (if (if ((x >= xMIN)) | |
73 | 73 | then (xMAX > x) | |
74 | 74 | else false) | |
75 | 75 | then (y >= yMIN) | |
76 | 76 | else false) | |
77 | 77 | then (yMAX > y) | |
78 | 78 | else false) | |
79 | 79 | then if (isPaymentOk(i)) | |
80 | 80 | then [IntegerEntry(count_key, (count + 1)), StringEntry(wallet, veri), ScriptTransfer(i.caller, REWARD_AMOUNT, pixels), ScriptTransfer(STAKING_ACCOUNT, 250000, PAYMENT_ASSET)] | |
81 | 81 | else throw("Wrong payment amount or asset") | |
82 | 82 | else throw("out of context") | |
83 | 83 | else throw("max 1000 pixels for each wallet!") | |
84 | 84 | } | |
85 | 85 | } | |
86 | 86 | else throw("wrong color") | |
87 | 87 | } | |
88 | 88 | else throw("game is not active right now") | |
89 | 89 | ||
90 | 90 |
github/deemru/w8io/169f3d6 27.35 ms ◑