tx · E8VFRasNbhfwbShahxjiiJpqdTJZTWdULzGrX1NLH7xW

3N5Sns8QYmySnDbSZWqMC869WJDRaxnDX19:  -0.01000000 Waves

2022.05.10 16:59 [2045665] smart account 3N5Sns8QYmySnDbSZWqMC869WJDRaxnDX19 > SELF 0.00000000 Waves

{ "type": 13, "id": "E8VFRasNbhfwbShahxjiiJpqdTJZTWdULzGrX1NLH7xW", "fee": 1000000, "feeAssetId": null, "timestamp": 1652191231383, "version": 2, "chainId": 84, "sender": "3N5Sns8QYmySnDbSZWqMC869WJDRaxnDX19", "senderPublicKey": "E9qCg8KrCfnpnZKmDXGtU2DZfAGHR2xnPnTqtwYjsjto", "proofs": [ "5htAicbtmxiQagNmMivf57fC3QT6pA3VDcyBg3xgcnQ6Led6487PN8UHRqwm7B86GevaCzJkYetTVLbS2rysoPiM" ], "script": "base64:AAIFAAAAAAAAAAgIAhIECgIICAAAAAwAAAAADVBBWU1FTlRfQVNTRVQBAAAAAAAAAAAMUkVXQVJEX0FTU0VUAQAAACAtNxOB0yQ3XZ/hb3bT0Q+T7yws9N2JrVxKVuh8yQFyGwAAAAAGcGl4ZWxzBQAAAAxSRVdBUkRfQVNTRVQAAAAABHhNSU4AAAAAAAAAAAAAAAAABHhNQVgAAAAAAAAABLEAAAAABHlNSU4AAAAAAAAAAAAAAAAABHlNQVgAAAAAAAAAAlkAAAAADVJFV0FSRF9BTU9VTlQAAAAAAAX14QAAAAAADFNUQVJUX0hFSUdIVAAAAAAAAB7x9AAAAAAKRU5EX0hFSUdIVAkAAGQAAAACBQAAAAxTVEFSVF9IRUlHSFQJAABoAAAAAgAAAAAAAAAFoAAAAAAAAAAAHgAAAAAGY29sb3JzCQAETAAAAAICAAAAAzAwMAkABEwAAAACAgAAAANmZmYJAARMAAAAAgIAAAAGMDAwMDAwCQAETAAAAAICAAAABmZmZmZmZgkABEwAAAACAgAAAAZGRjAyMDAJAARMAAAAAgIAAAAGODAwMDgwCQAETAAAAAICAAAABkZGMDBGRgkAB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scwUAAAADbmlsCQAAAgAAAAECAAAAHVdyb25nIHBheW1lbnQgYW1vdW50IG9yIGFzc2V0CQAAAgAAAAECAAAADm91dCBvZiBjb250ZXh0CQAAAgAAAAECAAAAC3dyb25nIGNvbG9yCQAAAgAAAAECAAAAHGdhbWUgaXMgbm90IGFjdGl2ZSByaWdodCBub3cAAAAACINO2Q==", "height": 2045665, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: B65xjb1WPMmoZCFUTdHjPdt2VB8TH7oqz9PvXTTgqmSh Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 5 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let PAYMENT_ASSET = base58''
5+
6+let REWARD_ASSET = base58'43W4FcqA1rEpSmUGHoGiXvpSLfhadws9LS5j3SJsKxxS'
7+
8+let pixels = REWARD_ASSET
9+
10+let xMIN = 0
11+
12+let xMAX = 1201
13+
14+let yMIN = 0
15+
16+let yMAX = 601
17+
18+let REWARD_AMOUNT = 100000000
19+
20+let START_HEIGHT = 2028020
21+
22+let END_HEIGHT = (START_HEIGHT + (1440 * 30))
23+
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+
26+func isPaymentOk (i) = {
27+ let acceptableAssetId = PAYMENT_ASSET
28+ if ((size(i.payments) == 0))
29+ then throw("Payment not attached")
30+ else {
31+ let p = i.payments[0]
32+ match p.assetId {
33+ case assetId: ByteVector =>
34+ if ((assetId == acceptableAssetId))
35+ then (p.amount == 1000000)
36+ else false
37+ case _ =>
38+ throw("Wrong payment asset")
39+ }
40+ }
41+ }
42+
43+
44+@Callable(i)
45+func coordinates (veri,xy) = if (if ((height > START_HEIGHT))
46+ then (END_HEIGHT > height)
47+ else false)
48+ then {
49+ let color = containsElement(colors, veri)
50+ if (color)
51+ then {
52+ let currentKey = toBase58String(i.caller.bytes)
53+ let splitter = split(xy, "_")
54+ let x = valueOrElse(parseInt(splitter[0]), 0)
55+ let y = valueOrElse(parseInt(splitter[1]), 0)
56+ if (if (((x % 8) != 0))
57+ then ((y % 8) != 0)
58+ else false)
59+ then throw("not cool.")
60+ else {
61+ let xy_new = ((toString(x) + "_") + toString(y))
62+ let wallet = (((currentKey + "_") + xy_new) + "_c")
63+ if (if (if (if ((x >= xMIN))
64+ then (xMAX > x)
65+ else false)
66+ then (y >= yMIN)
67+ else false)
68+ then (yMAX > y)
69+ else false)
70+ then if (isPaymentOk(i))
71+ then [StringEntry(wallet, veri), ScriptTransfer(i.caller, REWARD_AMOUNT, pixels)]
72+ else throw("Wrong payment amount or asset")
73+ else throw("out of context")
74+ }
75+ }
76+ else throw("wrong color")
77+ }
78+ else throw("game is not active right now")
79+
80+

github/deemru/w8io/169f3d6 
14.03 ms