tx · 5JE51Zc4doJt5YWDrbBSgp2RNEmawbNRXgYPERDfncJK 3N9K49ZpyQLL9gJjVdxQhu37f8YZdAzakR1: -0.01000000 Waves 2022.06.09 12:56 [2088676] smart account 3N9K49ZpyQLL9gJjVdxQhu37f8YZdAzakR1 > SELF 0.00000000 Waves
{ "type": 13, "id": "5JE51Zc4doJt5YWDrbBSgp2RNEmawbNRXgYPERDfncJK", "fee": 1000000, "feeAssetId": null, "timestamp": 1654768615116, "version": 2, "chainId": 84, "sender": "3N9K49ZpyQLL9gJjVdxQhu37f8YZdAzakR1", "senderPublicKey": "8rTCUHVm1p6iEchTjpJ1a7SbCaayaRrp4FegpAsirYag", "proofs": [ "43U9wM1eQNRvbX46PK7E9StrijZoaX2xKvNK2YGvcDiLfxMDvMpBKYYvSh8MW86mLC995GvkJT7js4fXBi4k8Ehx" ], "script": "base64:AAIFAAAAAAAAAAgIAhIECgIICAAAAAwAAAAADVBBWU1FTlRfQVNTRVQBAAAAIK2dSBaFkXln78NKeoaZ0d1Q6QVJPOT+QERHjOGDxML0AAAAAAxSRVdBUkRfQVNTRVQBAAAAIC03E4HTJDddn+FvdtPRD5PvLCz03YmtXEpW6HzJAXIbAAAAAAZwaXhlbHMFAAAADFJFV0FSRF9BU1NFVAAAAAAEeE1JTgAAAAAAAAAAAAAAAAAEeE1BWAAAAAAAAAAEsQAAAAAEeU1JTgAAAAAAAAAAAAAAAAAEeU1BWAAAAAAAAAACWQAAAAANUkVXQVJEX0FNT1VOVAAAAAAABfXhAAAAAAAMU1RBUlRfSEVJR0hUAAAAAAAAH9PqAAAAAApFTkRfSEVJR0hUCQAAZAAAAAIFAAAADFNUQVJUX0hFSUdIVAkAAGgAAAACAAAAAAAAAAWgAAAAAAAAAAAeAAAAAAZjb2xvcnMJAARMAAAAAgIAAAADMDAwCQAETAAAAAICAAAAA2ZmZgkABEwAAAACAgAAAAYwMDAwMDAJAARMAAAAAgIAAAAGZmZmZmZmCQAETAAAAAICAAAABkZGMDIwM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AFpAAAABmNhbGxlcgUAAAANUkVXQVJEX0FNT1VOVAUAAAAGcGl4ZWxzBQAAAANuaWwJAAACAAAAAQIAAAAdV3JvbmcgcGF5bWVudCBhbW91bnQgb3IgYXNzZXQJAAACAAAAAQIAAAAOb3V0IG9mIGNvbnRleHQJAAACAAAAAQIAAAALd3JvbmcgY29sb3IJAAACAAAAAQIAAAAcZ2FtZSBpcyBub3QgYWN0aXZlIHJpZ2h0IG5vdwAAAACOX/KY", "height": 2088676, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5W7wZ1hAFWTxZ8APKBrZKZFwTXEF8pMWaEk1qEy1yRpo Next: 3W1naMtpMXrkPfLRqnz6zMjK4t1W14W1mPmgEk3ydFFG Diff:
Old | New | Differences | |
---|---|---|---|
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 | - | then | |
58 | - | else | |
57 | + | then true | |
58 | + | else ((y % 8) != 0)) | |
59 | 59 | then throw("not cool.") | |
60 | 60 | else { | |
61 | 61 | let xy_new = ((toString(x) + "_") + toString(y)) |
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 = 2085866 | |
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 | - | then | |
58 | - | else | |
57 | + | then true | |
58 | + | else ((y % 8) != 0)) | |
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/026f985 33.15 ms ◑