tx · qaoHenXzr9fycLDPswEYqkT7sKZdamv14Gv6b8Fgfa2

3MwSJhsm3YngKUPgEMsjBNuq5JaETsywtcD:  -0.00500000 Waves

2022.08.02 14:52 [2166833] smart account 3MwSJhsm3YngKUPgEMsjBNuq5JaETsywtcD > SELF 0.00000000 Waves

{ "type": 13, "id": "qaoHenXzr9fycLDPswEYqkT7sKZdamv14Gv6b8Fgfa2", "fee": 500000, "feeAssetId": null, "timestamp": 1659441255647, "version": 2, "chainId": 84, "sender": "3MwSJhsm3YngKUPgEMsjBNuq5JaETsywtcD", "senderPublicKey": "DuG16HmDLNnqp4eX1MeM1DX5DuWxFCARi1TAXvrekhGb", "proofs": [ "2bswFyKaCN5bt3b8nm6Fy1UHDkfpmAyhw1TCwz1tV6qTPfTkNXhBBDWq3kwJdwUHea4iW9Z7rgEzLDyvbEiuA8Jn" ], "script": "base64:AAIFAAAAAAAAABkIAhIECgIBARIECgIECBIDCgEIEgQKAggIAAAAFwAAAAANUEFZTUVOVF9BU1NFVAEAAAAgrZ1IFoWReWfvw0p6hpnR3VDpBUk85P5AREeM4YPEwvQAAAAADFJFV0FSRF9BU1NFVAEAAAAgLTcTgdMkN12f4W9209EPk+8sLPTdia1cSlbofMkBchsAAAAAC2FkbWluUHViS2V5AQAAACDYz6eBJvJ1RiSMeo4NPcTC0Yo6om4BKm0t2ElqTOI3bAAAAAAOUEFZTUVOVF9BTU9VTlQAAAAAAAAPQkAAAAAABnBpeGVscwUAAAAMUkVXQVJEX0FTU0VUAAAAAAR4TUlOAAAAAAAAAAAAAAAAAAR4TUFYAAAAAAAAAASxAAAAAAR5TUlOAAAAAAAAAAAAAAAAAAR5TUFYAAAAAAAAAAJZAAAAAA1SRVdBUkRfQU1PVU5UAAAAAAAF9eEAAAAAAAxTVEFSVF9IRUlHSFQAAAAAAAAg0SMAAAAACkVORF9IRUlHSFQJAABkAAAAAgUAAAAMU1RBUlRfSEVJR0hUCQAAaAAAAAIAAAAAAAAABaAAAAAAAAAAAA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lbHMFAAAAA25pbAkAAAIAAAABAgAAAB13cm9uZyBwYXltZW50IGFtb3VudCBvciBhc3NldAkAAAIAAAABAgAAAA5vdXQgb2YgY29udGV4dAkAAAIAAAABCQABLAAAAAIJAAEsAAAAAgIAAAAEbWF4IAkAAaQAAAABBQAAAAdNQVhFQUNIAgAAABggcGl4ZWxzIGZvciBlYWNoIHdhbGxldCEJAAACAAAAAQIAAAAQYWxsIHNvbGQuIHRoYW54LgkAAAIAAAABAgAAAAt3cm9uZyBjb2xvcgkAAAIAAAABAgAAABxnYW1lIGlzIG5vdCBhY3RpdmUgcmlnaHQgbm93AAAAAL0RVtw=", "height": 2166833, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5dWYzYhiQLYzh6hU8GN3JpLsLppYR1ABAiFM4Go2Domm Next: 9t2xuw3zr1fXwfn8VEpqN5s8PA1iN5ut1AaJf7qUcNWT Diff:
OldNewDifferences
9494 let start_height = valueOrErrorMessage(parseInt(splitBlock[0]), "int_str err")
9595 let end_height = valueOrErrorMessage(parseInt(splitBlock[1]), "int_str err")
9696 let session = valueOrErrorMessage(parseInt(splitBlock[2]), "int_str err")
97- if (if (if ((height > start_height))
97+ if (if (if ((height >= start_height))
9898 then (end_height > height)
9999 else false)
100100 then isOpen
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let PAYMENT_ASSET = base58'CgidgEMbCKXXErgJXVyZCFRaK8SBNA73Jg8mNXALtVKh'
55
66 let REWARD_ASSET = base58'43W4FcqA1rEpSmUGHoGiXvpSLfhadws9LS5j3SJsKxxS'
77
88 let adminPubKey = base58'FbLiNMd4sSrhepz5fcTNF7nk4vpxStYMuoHb1HbYq88j'
99
1010 let PAYMENT_AMOUNT = 1000000
1111
1212 let pixels = REWARD_ASSET
1313
1414 let xMIN = 0
1515
1616 let xMAX = 1201
1717
1818 let yMIN = 0
1919
2020 let yMAX = 601
2121
2222 let REWARD_AMOUNT = 100000000
2323
2424 let START_HEIGHT = 2150691
2525
2626 let END_HEIGHT = (START_HEIGHT + (1440 * 14))
2727
2828 let MAXEACH = 1000
2929
3030 let MAXIMUM = 2250000000000
3131
3232 let activeSessionKey = "activeSession"
3333
3434 let activeBlockKey = "activeBlock"
3535
3636 let isOpenKey = "isOpen"
3737
3838 let shutDownReasonKey = "shutDownReason"
3939
4040 let firstBlock = 2166753
4141
4242 let period = (1440 * 7)
4343
4444 let ACTIVE_SESSION = 1
4545
4646 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"]
4747
4848 func isPaymentOk (i) = {
4949 let acceptableAssetId = PAYMENT_ASSET
5050 if ((size(i.payments) == 0))
5151 then throw("Payment not attached")
5252 else {
5353 let p = i.payments[0]
5454 match p.assetId {
5555 case assetId: ByteVector =>
5656 if ((assetId == acceptableAssetId))
5757 then (p.amount == 1000000)
5858 else false
5959 case _ =>
6060 throw("Wrong payment asset")
6161 }
6262 }
6363 }
6464
6565
6666 @Callable(i)
6767 func activeSession (session,block) = if ((adminPubKey != i.callerPublicKey))
6868 then throw("you can not")
6969 else [IntegerEntry(activeSessionKey, session), StringEntry(activeBlockKey, ((((toString(block) + "_") + toString((block + period))) + "_") + toString(session)))]
7070
7171
7272
7373 @Callable(i)
7474 func shutdown (isOpen,reason) = if ((adminPubKey != i.callerPublicKey))
7575 then throw("you can not")
7676 else [BooleanEntry(isOpenKey, isOpen), StringEntry(shutDownReasonKey, reason)]
7777
7878
7979
8080 @Callable(i)
8181 func delete (key) = if ((adminPubKey != i.callerPublicKey))
8282 then throw("you can not")
8383 else [DeleteEntry(key)]
8484
8585
8686
8787 @Callable(i)
8888 func coordinates (veri,xy) = {
8989 let isOpen = valueOrElse(getBoolean(this, isOpenKey), true)
9090 let endBlock = (firstBlock + period)
9191 let activeElseValue = ((((toString(firstBlock) + "_") + toString(endBlock)) + "_") + toString(ACTIVE_SESSION))
9292 let activeBlock = valueOrElse(getString(this, activeBlockKey), activeElseValue)
9393 let splitBlock = split(activeBlock, "_")
9494 let start_height = valueOrErrorMessage(parseInt(splitBlock[0]), "int_str err")
9595 let end_height = valueOrErrorMessage(parseInt(splitBlock[1]), "int_str err")
9696 let session = valueOrErrorMessage(parseInt(splitBlock[2]), "int_str err")
97- if (if (if ((height > start_height))
97+ if (if (if ((height >= start_height))
9898 then (end_height > height)
9999 else false)
100100 then isOpen
101101 else false)
102102 then {
103103 let color = containsElement(colors, veri)
104104 if (color)
105105 then {
106106 let currentKey = toBase58String(i.caller.bytes)
107107 let splitter = split(xy, "_")
108108 let x = valueOrElse(parseInt(splitter[0]), 0)
109109 let y = valueOrElse(parseInt(splitter[1]), 0)
110110 if (if (((x % 8) != 0))
111111 then true
112112 else ((y % 8) != 0))
113113 then throw("not cool.")
114114 else {
115115 let xy_new = ((toString(x) + "_") + toString(y))
116116 let wallet = (((((currentKey + "_") + xy_new) + "_c") + "_") + toString(session))
117117 let count_key = ((currentKey + "_count_") + toString(session))
118118 let pixels_count_key = ("pixels_count_" + toString(session))
119119 let count = valueOrElse(getInteger(this, count_key), 0)
120120 let pixels_count = valueOrElse(getInteger(this, pixels_count_key), 0)
121121 if ((MAXIMUM >= pixels_count))
122122 then if ((MAXEACH >= count))
123123 then if (if (if (if ((x >= xMIN))
124124 then (xMAX > x)
125125 else false)
126126 then (y >= yMIN)
127127 else false)
128128 then (yMAX > y)
129129 else false)
130130 then if (isPaymentOk(i))
131131 then [IntegerEntry(count_key, (count + 1)), IntegerEntry(pixels_count_key, (pixels_count + 1)), StringEntry(wallet, veri), ScriptTransfer(i.caller, REWARD_AMOUNT, pixels)]
132132 else throw("wrong payment amount or asset")
133133 else throw("out of context")
134134 else throw((("max " + toString(MAXEACH)) + " pixels for each wallet!"))
135135 else throw("all sold. thanx.")
136136 }
137137 }
138138 else throw("wrong color")
139139 }
140140 else throw("game is not active right now")
141141 }
142142
143143

github/deemru/w8io/169f3d6 
78.31 ms