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