tx · Co5a3aRFimWPciBA5gBEqF9P9fbhnNUF93MbCW77BodK 3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm: -0.02300000 Waves 2023.01.06 18:24 [2393274] smart account 3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm > SELF 0.00000000 Waves
{ "type": 13, "id": "Co5a3aRFimWPciBA5gBEqF9P9fbhnNUF93MbCW77BodK", "fee": 2300000, "feeAssetId": null, "timestamp": 1673018638357, "version": 2, "chainId": 84, "sender": "3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm", "senderPublicKey": "EVooykMNV691Venwp1dHUTBd7KWequzUcda57Wd3LQEX", "proofs": [ "5zJYRkApPrKpzNkRmERnECtXYk7Mee7ZP1dsAchbveSZejszCFM2kDn5AUTa8z6cYjHkaWBX36Mn3aKtX74Cicxg" ], "script": "base64:BgJJCAISABIDCgEIEgASAwoBCBIECgIBCBIECgICAhIECgIBCBIECgIBARIECgIICBIECgICAhIECgICAhIDCgEIEgMKAQgSAwoBCEoABWNoYWluCQCwCQEJAMkBAgkAygECCAUEdGhpcwVieXRlcwABAAEAC3VzZG5Bc3NldElkBAckbWF0Y2gwBQVjaGFpbgMJAAACAgFXBQckbWF0Y2gwASC2JinDBPXOU5GkDkt1JC9kjFGx+t+vVCm9SNIdKrKq0QMJAAACAgFUBQckbWF0Y2gwASD3dur394PKZdtuE+4CO89YKZWpwdGN8kvabNgdYoDI3gkAAgECDVVua25vd24gY2hhaW4ADWluY3ViYXRvckFkZHIEByRtYXRjaDAFBWNoYWluAwkAAAICAVcFByRtYXRjaDAJARFAZXh0ck5hdGl2ZSgxMDYyKQECIzNQRWt0VnV4MlJoY2hTTjYzRHNEbzRiNG16NFFxektTZUR2AwkAAAICAVQFByRtYXRjaDAFBHRoaXMJAAIBAg1Vbmtub3duIGNoYWluAAticmVlZGVyQWRkcgQHJG1hdGNoMAUFY2hhaW4DCQAAAgIBVwUHJG1hdGNoMAkBEUBleHRyTmF0aXZlKDEwNjIpAQIj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Wx1ZQEJAJEDAggFAWkIcGF5bWVudHMAAAMJAQIhPQIIBQNwbXQHYXNzZXRJZAULdXNkbkFzc2V0SWQJAAIBAhpBbGxvd2VkIFVTRE4gcGF5bWVudCBvbmx5IQkBDXVwSW5mcmFDb21tb24DBwgFAWkGY2FsbGVyCAUDcG10BmFtb3VudAFpARBhY3RpdmF0ZUFydGlmYWN0AQdhcnROYW1lAwkBAiE9AgkAkAMBCAUBaQhwYXltZW50cwAACQACAQIwQXJ0aWZhY3QgYWN0aXZhdGlvbiBkb2Vzbid0IHJlcXVpcmUgYW55IHBheW1lbnRzBAZyZXN1bHQEByRtYXRjaDAFB2FydE5hbWUDCQAAAgIHUFJFU0FMRQUHJG1hdGNoMAkBEmFjdGl2YXRlUHJlc2FsZUFydAEJAKUIAQgFAWkGY2FsbGVyCQACAQIQVW5rbm93biBhcnRpZmFjdAUGcmVzdWx0AA3u1ac=", "height": 2393274, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3DsgrbRAncKXuvTep9mgjJa5z9TvSmVoeUkZBPKj5fKN Next: CAKs3kgsQ12fqrxwYjQd7LqqT65S5TtXMtm8Wq5bCs3N Diff:
Old | New | Differences | |
---|---|---|---|
95 | 95 | else throw("Unknown chain") | |
96 | 96 | } | |
97 | 97 | ||
98 | - | let u = { | |
99 | - | let c = a | |
100 | - | if (("W" == c)) | |
101 | - | then 1673136000000 | |
102 | - | else if (("T" == c)) | |
103 | - | then 1672790400000 | |
104 | - | else throw("Unknown chain") | |
105 | - | } | |
98 | + | let u = 1000000 | |
106 | 99 | ||
107 | - | let v = | |
100 | + | let v = toBigInt(5) | |
108 | 101 | ||
109 | - | let w = toBigInt( | |
102 | + | let w = toBigInt(20) | |
110 | 103 | ||
111 | - | let x = toBigInt(20) | |
104 | + | let x = toBigInt((20 * 20)) | |
112 | 105 | ||
113 | - | let y = toBigInt((20 * 20)) | |
106 | + | let y = toBigInt(((20 * 20) * 20)) | |
114 | 107 | ||
115 | - | let z = toBigInt(((20 * 20) * 20)) | |
108 | + | let z = toBigInt((((20 * 20) * 20) * 20)) | |
116 | 109 | ||
117 | - | let A = toBigInt((((20 * 20) * 20) * 20)) | |
110 | + | let A = toBigInt(((((20 * 20) * 20) * 20) * 20)) | |
118 | 111 | ||
119 | - | let B = | |
112 | + | let B = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"] | |
120 | 113 | ||
121 | - | let C = [" | |
114 | + | let C = ["Asia", "Europe", "Americas", "Oceania", "Africa"] | |
122 | 115 | ||
123 | - | let D = ["Asia", "Europe", "Americas", "Oceania", "Africa"] | |
124 | - | ||
125 | - | func E () = "nextLandNum" | |
116 | + | func D () = "nextLandNum" | |
126 | 117 | ||
127 | 118 | ||
128 | - | func | |
119 | + | func E (F) = ("landToAsset_" + F) | |
129 | 120 | ||
130 | 121 | ||
131 | - | func | |
122 | + | func G (F,H) = ((i + F) + H) | |
132 | 123 | ||
133 | 124 | ||
134 | - | func | |
125 | + | func I (J) = ("nftOwner_" + J) | |
135 | 126 | ||
136 | 127 | ||
137 | - | func | |
128 | + | func K (J) = ("duckOwner_" + J) | |
138 | 129 | ||
139 | 130 | ||
140 | - | func | |
131 | + | func L (J) = ("stakedTime_" + J) | |
141 | 132 | ||
142 | 133 | ||
143 | - | func | |
134 | + | func M (J) = ("infraLevel_" + J) | |
144 | 135 | ||
145 | 136 | ||
146 | - | func | |
137 | + | func N (J,O) = ((("infraLevelByAssetIdAndOwner_" + J) + "_") + O) | |
147 | 138 | ||
148 | 139 | ||
149 | - | func | |
140 | + | func P (J) = ("presaleArtActivated_" + J) | |
150 | 141 | ||
151 | 142 | ||
152 | - | func | |
143 | + | func Q (O) = ("stakedDuckByOwner_" + O) | |
153 | 144 | ||
154 | 145 | ||
155 | - | func | |
146 | + | func R (S,J,O) = ((((("stakedTimeByTypeAssetIdAndOwner_" + S) + "_") + J) + "_") + O) | |
156 | 147 | ||
157 | 148 | ||
158 | - | func | |
149 | + | func T (F) = ("landOwner_" + F) | |
159 | 150 | ||
160 | 151 | ||
161 | - | func | |
152 | + | func U (V) = ("backPack_" + V) | |
162 | 153 | ||
163 | 154 | ||
164 | - | func | |
155 | + | func W (V) = ("duckLocation_" + V) | |
165 | 156 | ||
166 | 157 | ||
167 | - | func | |
158 | + | func X (V) = ("duckHealth_" + V) | |
168 | 159 | ||
169 | 160 | ||
170 | - | func | |
161 | + | func Y () = "resTypesProportions" | |
171 | 162 | ||
172 | 163 | ||
173 | - | let | |
164 | + | let Z = 0 | |
174 | 165 | ||
175 | - | let | |
166 | + | let aa = 1 | |
176 | 167 | ||
177 | - | let | |
168 | + | let ab = 2 | |
178 | 169 | ||
179 | - | let | |
170 | + | let ac = 3 | |
180 | 171 | ||
181 | - | let | |
172 | + | let ad = 0 | |
182 | 173 | ||
183 | - | let | |
174 | + | let ae = 1 | |
184 | 175 | ||
185 | - | let | |
176 | + | let af = 2 | |
186 | 177 | ||
187 | - | let | |
178 | + | let ag = 0 | |
188 | 179 | ||
189 | - | let | |
180 | + | let ah = 1 | |
190 | 181 | ||
191 | - | let | |
182 | + | let ai = 2 | |
192 | 183 | ||
193 | - | let | |
184 | + | let aj = 3 | |
194 | 185 | ||
195 | - | func | |
196 | - | let c = | |
186 | + | func ak (al) = { | |
187 | + | let c = al | |
197 | 188 | if ($isInstanceOf(c, "String")) | |
198 | 189 | then { | |
199 | - | let | |
200 | - | | |
190 | + | let am = c | |
191 | + | am | |
201 | 192 | } | |
202 | 193 | else throw("fail to cast into String") | |
203 | 194 | } | |
204 | 195 | ||
205 | 196 | ||
206 | - | func | |
207 | - | let | |
208 | - | if ((size( | |
197 | + | func an (ao) = { | |
198 | + | let ap = split(value(getString(Y())), "_") | |
199 | + | if ((size(ap) != l)) | |
209 | 200 | then throw("Wrong proportions data") | |
210 | 201 | else { | |
211 | - | let | |
212 | - | let | |
213 | - | if ((0 >= | |
202 | + | let aq = [parseIntValue(ap[0]), parseIntValue(ap[1]), parseIntValue(ap[2]), parseIntValue(ap[3]), parseIntValue(ap[4]), parseIntValue(ap[5])] | |
203 | + | let ar = (((((aq[0] + aq[1]) + aq[2]) + aq[3]) + aq[4]) + aq[5]) | |
204 | + | if ((0 >= ar)) | |
214 | 205 | then throw("No lands staked") | |
215 | 206 | else { | |
216 | - | let | |
217 | - | func | |
207 | + | let as = fraction(ao, u, ar) | |
208 | + | func at (au,av) = (au :+ fraction(av, as, u)) | |
218 | 209 | ||
219 | - | let | |
220 | - | let | |
221 | - | let | |
222 | - | func | |
223 | - | then | |
224 | - | else | |
210 | + | let aw = aq | |
211 | + | let ax = size(aw) | |
212 | + | let ay = nil | |
213 | + | func az (aA,aB) = if ((aB >= ax)) | |
214 | + | then aA | |
215 | + | else at(aA, aw[aB]) | |
225 | 216 | ||
226 | - | func | |
227 | - | then | |
217 | + | func aC (aA,aB) = if ((aB >= ax)) | |
218 | + | then aA | |
228 | 219 | else throw("List size exceeds 6") | |
229 | 220 | ||
230 | - | | |
221 | + | aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6) | |
231 | 222 | } | |
232 | 223 | } | |
233 | 224 | } | |
234 | 225 | ||
235 | 226 | ||
236 | - | func | |
237 | - | let | |
238 | - | func | |
239 | - | let | |
240 | - | if ((0 > | |
241 | - | then throw(((((("Not enough material idx=" + toString( | |
242 | - | else ( | |
227 | + | func aD (aE,aF,aG) = { | |
228 | + | let aH = an(aG) | |
229 | + | func aI (au,aJ) = { | |
230 | + | let aK = (parseIntValue(aF[aJ]) - aH[aJ]) | |
231 | + | if ((0 > aK)) | |
232 | + | then throw(((((("Not enough material idx=" + toString(aJ)) + ", you have ") + aF[aJ]) + ", but need ") + toString(aH[aJ]))) | |
233 | + | else (au :+ toString(aK)) | |
243 | 234 | } | |
244 | 235 | ||
245 | - | if ( | |
236 | + | if (aE) | |
246 | 237 | then { | |
247 | - | let | |
248 | - | let | |
249 | - | let | |
250 | - | func | |
251 | - | then | |
252 | - | else | |
238 | + | let aw = [0, 1, 2, 3, 4, 5] | |
239 | + | let ax = size(aw) | |
240 | + | let ay = nil | |
241 | + | func az (aA,aB) = if ((aB >= ax)) | |
242 | + | then aA | |
243 | + | else aI(aA, aw[aB]) | |
253 | 244 | ||
254 | - | func | |
255 | - | then | |
245 | + | func aC (aA,aB) = if ((aB >= ax)) | |
246 | + | then aA | |
256 | 247 | else throw("List size exceeds 6") | |
257 | 248 | ||
258 | - | | |
249 | + | aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6) | |
259 | 250 | } | |
260 | - | else | |
251 | + | else aF | |
261 | 252 | } | |
262 | 253 | ||
263 | 254 | ||
264 | - | func | |
265 | - | let | |
266 | - | if ((size( | |
255 | + | func aL (aM,aN,aO) = { | |
256 | + | let ap = split(valueOrElse(getString(Y()), "0_0_0_0_0_0"), "_") | |
257 | + | if ((size(ap) != l)) | |
267 | 258 | then throw("Wrong proportions data") | |
268 | 259 | else { | |
269 | - | func | |
270 | - | let | |
271 | - | if ((0 > | |
272 | - | then throw(((((((("Panic! Pieces of type=" + toString( | |
273 | - | else ( | |
260 | + | func aP (au,aQ) = { | |
261 | + | let aK = (parseIntValue(ap[aQ]) + ((aO * aM[aQ]) * aN)) | |
262 | + | if ((0 > aK)) | |
263 | + | then throw(((((((("Panic! Pieces of type=" + toString(aQ)) + ", sign=") + toString(aO)) + ", terrainCounts[i]=") + toString(aM[aQ])) + ", landSizeIndex=") + toString(aN))) | |
264 | + | else (au :+ toString(aK)) | |
274 | 265 | } | |
275 | 266 | ||
276 | - | let | |
277 | - | let | |
278 | - | let | |
279 | - | let | |
280 | - | func | |
281 | - | then | |
282 | - | else | |
267 | + | let aq = { | |
268 | + | let aw = [0, 1, 2, 3, 4, 5] | |
269 | + | let ax = size(aw) | |
270 | + | let ay = nil | |
271 | + | func az (aA,aB) = if ((aB >= ax)) | |
272 | + | then aA | |
273 | + | else aP(aA, aw[aB]) | |
283 | 274 | ||
284 | - | func | |
285 | - | then | |
275 | + | func aC (aA,aB) = if ((aB >= ax)) | |
276 | + | then aA | |
286 | 277 | else throw("List size exceeds 6") | |
287 | 278 | ||
288 | - | | |
279 | + | aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6) | |
289 | 280 | } | |
290 | - | makeString( | |
281 | + | makeString(aq, "_") | |
291 | 282 | } | |
292 | 283 | } | |
293 | 284 | ||
294 | 285 | ||
295 | - | func | |
286 | + | func aR (aS) = [(size(split(aS, "A")) - 1), (size(split(aS, "B")) - 1), (size(split(aS, "C")) - 1), (size(split(aS, "D")) - 1), (size(split(aS, "E")) - 1), (size(split(aS, "F")) - 1)] | |
296 | 287 | ||
297 | 288 | ||
298 | - | func | |
299 | - | let c = | |
289 | + | func aT (H) = { | |
290 | + | let c = H | |
300 | 291 | if (("S" == c)) | |
301 | 292 | then 25 | |
302 | 293 | else if (("M" == c)) | |
311 | 302 | } | |
312 | 303 | ||
313 | 304 | ||
314 | - | func | |
315 | - | func | |
316 | - | then toString((parseIntValue( | |
317 | - | else | |
305 | + | func aU (aV,aJ,aW) = { | |
306 | + | func aX (au,aQ) = (au :+ (if ((aQ == aJ)) | |
307 | + | then toString((parseIntValue(aV[aQ]) - aW)) | |
308 | + | else aV[aQ])) | |
318 | 309 | ||
319 | - | let | |
320 | - | let | |
321 | - | let | |
322 | - | let | |
323 | - | func | |
324 | - | then | |
325 | - | else | |
310 | + | let aq = { | |
311 | + | let aw = [0, 1, 2, 3, 4, 5] | |
312 | + | let ax = size(aw) | |
313 | + | let ay = nil | |
314 | + | func az (aA,aB) = if ((aB >= ax)) | |
315 | + | then aA | |
316 | + | else aX(aA, aw[aB]) | |
326 | 317 | ||
327 | - | func | |
328 | - | then | |
318 | + | func aC (aA,aB) = if ((aB >= ax)) | |
319 | + | then aA | |
329 | 320 | else throw("List size exceeds 6") | |
330 | 321 | ||
331 | - | | |
322 | + | aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6) | |
332 | 323 | } | |
333 | - | makeString( | |
324 | + | makeString(aq, "_") | |
334 | 325 | } | |
335 | 326 | ||
336 | 327 | ||
337 | - | func | |
338 | - | func | |
339 | - | let | |
340 | - | ( | |
328 | + | func aY (aZ,aM,ba,aN,bb) = { | |
329 | + | func bc (au,aQ) = { | |
330 | + | let bd = ((fraction(ba, bb, n) * aM[aQ]) * aN) | |
331 | + | (au :+ toString((parseIntValue(aZ[aQ]) + bd))) | |
341 | 332 | } | |
342 | 333 | ||
343 | - | let | |
344 | - | let | |
345 | - | let | |
346 | - | let | |
347 | - | func | |
348 | - | then | |
349 | - | else | |
334 | + | let aq = { | |
335 | + | let aw = [0, 1, 2, 3, 4, 5] | |
336 | + | let ax = size(aw) | |
337 | + | let ay = nil | |
338 | + | func az (aA,aB) = if ((aB >= ax)) | |
339 | + | then aA | |
340 | + | else bc(aA, aw[aB]) | |
350 | 341 | ||
351 | - | func | |
352 | - | then | |
342 | + | func aC (aA,aB) = if ((aB >= ax)) | |
343 | + | then aA | |
353 | 344 | else throw("List size exceeds 6") | |
354 | 345 | ||
355 | - | | |
346 | + | aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6) | |
356 | 347 | } | |
357 | - | makeString( | |
348 | + | makeString(aq, "_") | |
358 | 349 | } | |
359 | 350 | ||
360 | 351 | ||
361 | - | func | |
362 | - | then | |
363 | - | else -( | |
352 | + | func be (bf) = if ((bf >= toBigInt(0))) | |
353 | + | then bf | |
354 | + | else -(bf) | |
364 | 355 | ||
365 | 356 | ||
366 | - | let | |
357 | + | let bg = [[1, 4, 9, 10, 15], [5, 8, 13, 14, 15], [6, 9, 14, 15, 16], [4, 7, 8, 13, 18], [1, 6, 7, 15, 19]] | |
367 | 358 | ||
368 | - | func | |
369 | - | let | |
370 | - | let | |
359 | + | func bh (bi,bj) = { | |
360 | + | let bk = toInt((bi % w)) | |
361 | + | let bl = if ((bj[0] > bk)) | |
371 | 362 | then "A" | |
372 | - | else if (( | |
363 | + | else if ((bj[1] > bk)) | |
373 | 364 | then "B" | |
374 | - | else if (( | |
365 | + | else if ((bj[2] > bk)) | |
375 | 366 | then "C" | |
376 | - | else if (( | |
367 | + | else if ((bj[3] > bk)) | |
377 | 368 | then "D" | |
378 | - | else if (( | |
369 | + | else if ((bj[4] > bk)) | |
379 | 370 | then "E" | |
380 | 371 | else "F" | |
381 | - | | |
372 | + | bl | |
382 | 373 | } | |
383 | 374 | ||
384 | 375 | ||
385 | - | func | |
386 | - | let | |
387 | - | [toString(valueOrElse(parseInt( | |
388 | - | then | |
389 | - | else "0_0_0_0_0_0", if ((size(split( | |
390 | - | then | |
391 | - | else "0_0_0_0_0_0", | |
376 | + | func bm (bn) = { | |
377 | + | let bo = split(valueOrElse(getString(bn), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":") | |
378 | + | [toString(valueOrElse(parseInt(bo[ag]), 0)), if ((size(split(bo[ah], "_")) == l)) | |
379 | + | then bo[ah] | |
380 | + | else "0_0_0_0_0_0", if ((size(split(bo[ai], "_")) == l)) | |
381 | + | then bo[ai] | |
382 | + | else "0_0_0_0_0_0", bo[aj]] | |
392 | 383 | } | |
393 | 384 | ||
394 | 385 | ||
395 | - | func | |
386 | + | func bp (aE,bq,br,bs,bt) = if (!(sigVerify_8Kb(bs, bt, g))) | |
396 | 387 | then throw("signature does not match") | |
397 | 388 | else { | |
398 | - | let | |
399 | - | let | |
400 | - | let | |
401 | - | let | |
402 | - | let | |
403 | - | let | |
404 | - | if (( | |
389 | + | let bu = split(toUtf8String(bs), ";") | |
390 | + | let bv = split(split(bu[0], "|")[0], "_") | |
391 | + | let bw = parseIntValue(bv[0]) | |
392 | + | let bx = parseIntValue(bv[1]) | |
393 | + | let by = split(bu[1], ":") | |
394 | + | let bz = split(by[0], "_") | |
395 | + | if ((bz[1] != "E")) | |
405 | 396 | then throw("expedition target location type should be E") | |
406 | 397 | else { | |
407 | - | let | |
408 | - | if (if (( | |
398 | + | let bA = parseIntValue(by[1]) | |
399 | + | if (if ((bA > (lastBlock.timestamp + o))) | |
409 | 400 | then true | |
410 | - | else ((lastBlock.timestamp - o) > | |
401 | + | else ((lastBlock.timestamp - o) > bA)) | |
411 | 402 | then throw("signature outdated") | |
412 | 403 | else { | |
413 | - | let | |
414 | - | let | |
415 | - | let | |
416 | - | let | |
417 | - | if (( | |
418 | - | then throw(((("oldHealth=" + toString(valueOrElse(getInteger( | |
419 | - | else if ((0 >= | |
404 | + | let bB = toString(bq) | |
405 | + | let V = valueOrErrorMessage(getString(Q(bB)), "You don't have a duck staked") | |
406 | + | let bC = X(V) | |
407 | + | let bD = valueOrElse(getInteger(bC), 100) | |
408 | + | if ((bD != bw)) | |
409 | + | then throw(((("oldHealth=" + toString(valueOrElse(getInteger(bC), 100))) + " from state does not match one from flight log=") + toString(bw))) | |
410 | + | else if ((0 >= bw)) | |
420 | 411 | then throw("You can't fly with zero health") | |
421 | - | else if ((0 >= | |
422 | - | then $Tuple2(((if (!( | |
423 | - | then [ScriptTransfer( | |
424 | - | else nil) :+ IntegerEntry( | |
412 | + | else if ((0 >= bx)) | |
413 | + | then $Tuple2(((if (!(aE)) | |
414 | + | then [ScriptTransfer(bq, t, b)] | |
415 | + | else nil) :+ IntegerEntry(bC, 0)), "") | |
425 | 416 | else { | |
426 | - | let | |
427 | - | let | |
428 | - | let | |
429 | - | let | |
430 | - | let | |
431 | - | let | |
432 | - | let | |
433 | - | let | |
434 | - | let | |
435 | - | func | |
417 | + | let bn = U(V) | |
418 | + | let bE = bm(bn) | |
419 | + | let bF = split(bE[ai], "_") | |
420 | + | let bG = makeString(aD(aE, bF, s), "_") | |
421 | + | let bH = be(toBigInt(br)) | |
422 | + | let bI = valueOrElse(getInteger(D()), 501) | |
423 | + | let F = toString(bI) | |
424 | + | let bJ = toInt((bH % v)) | |
425 | + | let bK = bg[bJ] | |
426 | + | func bL (au,av) = $Tuple2((((((au._1 + bh(au._2, bK)) + bh((au._2 / w), bK)) + bh((au._2 / x), bK)) + bh((au._2 / y), bK)) + bh((au._2 / z), bK)), (au._2 / A)) | |
436 | 427 | ||
437 | - | let | |
438 | - | let | |
439 | - | let | |
440 | - | let | |
441 | - | func | |
442 | - | then | |
443 | - | else | |
428 | + | let bM = { | |
429 | + | let aw = [1, 2, 3, 4, 5] | |
430 | + | let ax = size(aw) | |
431 | + | let ay = $Tuple2("", (bH / v)) | |
432 | + | func az (aA,aB) = if ((aB >= ax)) | |
433 | + | then aA | |
434 | + | else bL(aA, aw[aB]) | |
444 | 435 | ||
445 | - | func | |
446 | - | then | |
436 | + | func aC (aA,aB) = if ((aB >= ax)) | |
437 | + | then aA | |
447 | 438 | else throw("List size exceeds 5") | |
448 | 439 | ||
449 | - | | |
440 | + | aC(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5) | |
450 | 441 | } | |
451 | - | let | |
452 | - | let | |
453 | - | let | |
454 | - | let | |
455 | - | $Tuple2([IntegerEntry( | |
442 | + | let bN = C[bJ] | |
443 | + | let bO = Issue(G(F, "S"), makeString([F, "S", bM._1, bN], "_"), 1, 0, false) | |
444 | + | let J = calculateAssetId(bO) | |
445 | + | let bP = toBase58String(J) | |
446 | + | $Tuple2([IntegerEntry(D(), (bI + 1)), bO, StringEntry(E(F), bP), StringEntry(I(bP), bB), StringEntry(T(F), bB), IntegerEntry(M(bP), 0), IntegerEntry(N(bP, bB), 0), ScriptTransfer(bq, 1, J), StringEntry(W(V), makeString([bN, "L", bP], "_")), IntegerEntry(bC, bx), StringEntry(bn, makeString([bE[ag], bE[ah], bG, bE[aj]], ":"))], bP) | |
456 | 447 | } | |
457 | 448 | } | |
458 | 449 | } | |
459 | 450 | } | |
460 | 451 | ||
461 | 452 | ||
462 | - | func | |
463 | - | let | |
464 | - | let | |
453 | + | func bQ (bR) = { | |
454 | + | let bS = valueOrElse(getInteger(M(bR)), 0) | |
455 | + | let bT = if (valueOrElse(getBoolean(P(bR)), false)) | |
465 | 456 | then 3 | |
466 | 457 | else 0 | |
467 | - | (m + fraction(m, bT, | |
458 | + | ((m + fraction(m, bS, 4)) + fraction(m, bT, 20)) | |
468 | 459 | } | |
469 | 460 | ||
470 | 461 | ||
471 | - | func | |
472 | - | let | |
473 | - | let | |
474 | - | let | |
475 | - | if (( | |
476 | - | then throw((( | |
462 | + | func bU (bV) = { | |
463 | + | let V = valueOrErrorMessage(getString(Q(bV)), "You don't have a duck staked") | |
464 | + | let bW = valueOrElse(getString(W(V)), k) | |
465 | + | let bX = split(value(bW), "_") | |
466 | + | if ((bX[ae] != "L")) | |
467 | + | then throw((("Duck location type is " + bX[ae]) + ", but should be L")) | |
477 | 468 | else { | |
478 | - | let bZ = bR(bS) | |
479 | - | let ca = (fraction(bb, bZ, n) * bW) | |
480 | - | al(invoke(this, "claimRes", [ca, bS], nil)) | |
481 | - | } | |
482 | - | } | |
483 | - | ||
484 | - | ||
485 | - | func cb (aF,br,bS) = { | |
486 | - | let cc = toString(br) | |
487 | - | let cd = N(bS) | |
488 | - | let ce = valueOrElse(getInteger(cd), 0) | |
489 | - | if ((ce >= 3)) | |
490 | - | then throw("Currently max infrastructure level = 3") | |
491 | - | else { | |
492 | - | let cf = (ce + 1) | |
493 | - | let cg = value(assetInfo(fromBase58String(bS))) | |
494 | - | if (!(contains(cg.name, i))) | |
495 | - | then throw((("NFT " + i) + " token should be passed as param")) | |
469 | + | let bR = bX[af] | |
470 | + | let bY = value(assetInfo(fromBase58String(bR))) | |
471 | + | let bZ = L(bR) | |
472 | + | let ca = valueOrErrorMessage(getInteger(bZ), (("NFT " + bY.name) + " is not staked")) | |
473 | + | let cb = valueOrErrorMessage(getString(I(bR)), (("NFT " + bY.name) + " is orphaned")) | |
474 | + | if ((cb != bV)) | |
475 | + | then throw((i + " is not yours")) | |
496 | 476 | else { | |
497 | - | let ch = getStringValue(J(bS)) | |
498 | - | if ((ch != cc)) | |
499 | - | then throw((i + " is not yours")) | |
500 | - | else { | |
501 | - | let ci = split(cg.description, "_") | |
502 | - | let I = ci[ab] | |
503 | - | let bW = aU(I) | |
504 | - | let W = valueOrErrorMessage(getString(R(cc)), "You don't have a duck staked") | |
505 | - | let cj = valueOrElse(getString(X(W)), k) | |
506 | - | let ck = split(value(cj), "_") | |
507 | - | if ((ck[af] != "L")) | |
508 | - | then throw((("Duck location type is " + ck[af]) + ", but should be L")) | |
509 | - | else if ((ck[ag] != bS)) | |
510 | - | then throw(((("Duck location id is " + ck[ag]) + ", but should be ") + bS)) | |
511 | - | else { | |
512 | - | let bo = V(W) | |
513 | - | let bF = bn(bo) | |
514 | - | let bG = split(bF[aj], "_") | |
515 | - | let bH = makeString(aE(aF, bG, fraction(q, (bW * cf), 25)), "_") | |
516 | - | let cl = bV(bS, bW) | |
517 | - | $Tuple2([IntegerEntry(cd, cf), IntegerEntry(O(bS, cc), cf), StringEntry(bo, makeString([bF[ah], cl, bH, bF[ak]], ":"))], cf) | |
518 | - | } | |
519 | - | } | |
477 | + | let cc = split(bY.description, "_") | |
478 | + | $Tuple4(V, bR, cc, ca) | |
520 | 479 | } | |
521 | 480 | } | |
522 | 481 | } | |
523 | 482 | ||
524 | 483 | ||
525 | - | @Callable(aR) | |
484 | + | func cd (bV,aW) = { | |
485 | + | let ce = bU(bV) | |
486 | + | let H = ce._3[aa] | |
487 | + | let aM = aR(ce._3[ab]) | |
488 | + | let ba = (lastBlock.timestamp - ce._4) | |
489 | + | if ((0 > ba)) | |
490 | + | then throw(((("Saved timestamp is in future, saved = " + toString(ce._4)) + ", current = ") + toString(lastBlock.timestamp))) | |
491 | + | else { | |
492 | + | let cf = aT(H) | |
493 | + | let cg = bQ(ce._2) | |
494 | + | let ch = fraction(ba, (cg * cf), n) | |
495 | + | if ((aW > ch)) | |
496 | + | then throw(((("Not enough resources, available = " + toString(ch)) + ", requested = ") + toString(aW))) | |
497 | + | else { | |
498 | + | let ci = fraction((ch - aW), n, (cg * cf)) | |
499 | + | let cj = (lastBlock.timestamp - ci) | |
500 | + | let bn = U(ce._1) | |
501 | + | let bE = bm(bn) | |
502 | + | let aZ = split(bE[ah], "_") | |
503 | + | let ck = aY(aZ, aM, (ba - ci), (cf / 25), cg) | |
504 | + | $Tuple3([IntegerEntry(L(ce._2), cj), IntegerEntry(R(i, ce._2, bV), cj)], bn, [bE[ag], ck, bE[ai], bE[aj]]) | |
505 | + | } | |
506 | + | } | |
507 | + | } | |
508 | + | ||
509 | + | ||
510 | + | func cl (bV,bR,cf) = { | |
511 | + | let bZ = L(bR) | |
512 | + | let ca = value(getInteger(bZ)) | |
513 | + | let ch = (fraction((lastBlock.timestamp - ca), bQ(bR), n) * cf) | |
514 | + | cd(bV, ch) | |
515 | + | } | |
516 | + | ||
517 | + | ||
518 | + | func cm (aE,bq,cn) = { | |
519 | + | let bV = toString(bq) | |
520 | + | let ce = bU(bV) | |
521 | + | let cf = aT(ce._3[aa]) | |
522 | + | let co = M(ce._2) | |
523 | + | let cp = valueOrElse(getInteger(co), 0) | |
524 | + | if ((cp >= 3)) | |
525 | + | then throw("Currently max infrastructure level = 3") | |
526 | + | else { | |
527 | + | let cq = (cp + 1) | |
528 | + | let cr = fraction(r, (cf * cq), 25) | |
529 | + | if (if (!(aE)) | |
530 | + | then (cn != cr) | |
531 | + | else false) | |
532 | + | then throw(("Payment attached should be " + toString(cr))) | |
533 | + | else { | |
534 | + | let bn = U(ce._1) | |
535 | + | let bE = bm(bn) | |
536 | + | let bF = split(bE[ai], "_") | |
537 | + | let bG = makeString(aD(aE, bF, fraction(q, (cf * cq), 25)), "_") | |
538 | + | let cs = cl(bV, ce._2, cf) | |
539 | + | $Tuple2(([IntegerEntry(co, cq), IntegerEntry(N(ce._2, bV), cq), StringEntry(bn, makeString([bE[ag], cs._3[ah], bG, bE[aj]], ":"))] ++ cs._1), cq) | |
540 | + | } | |
541 | + | } | |
542 | + | } | |
543 | + | ||
544 | + | ||
545 | + | func ct (bV) = { | |
546 | + | let ce = bU(bV) | |
547 | + | let cu = P(ce._2) | |
548 | + | if (valueOrElse(getBoolean(cu), false)) | |
549 | + | then throw("Presale artifact is already activated") | |
550 | + | else if ((parseIntValue(ce._3[Z]) > 500)) | |
551 | + | then throw((((i + " ") + ce._2) + " is not eligible for presale artifact")) | |
552 | + | else [BooleanEntry(P(ce._2), true)] | |
553 | + | } | |
554 | + | ||
555 | + | ||
556 | + | @Callable(aQ) | |
526 | 557 | func stakeLand () = { | |
527 | - | let | |
528 | - | let | |
529 | - | let | |
530 | - | if (( | |
558 | + | let cv = value(aQ.payments[0]) | |
559 | + | let J = value(cv.assetId) | |
560 | + | let cw = toString(aQ.caller) | |
561 | + | if ((cv.amount != 1)) | |
531 | 562 | then throw((("NFT " + i) + " token should be attached as payment")) | |
532 | 563 | else { | |
533 | - | let | |
534 | - | if (( | |
564 | + | let bY = value(assetInfo(J)) | |
565 | + | if ((bY.issuer != this)) | |
535 | 566 | then throw("Unknown issuer of token") | |
536 | - | else if (!(contains( | |
567 | + | else if (!(contains(bY.name, i))) | |
537 | 568 | then throw((("Only NFT " + i) + " tokens are accepted")) | |
538 | 569 | else { | |
539 | - | let | |
540 | - | let | |
541 | - | then dropRight( | |
542 | - | else if (contains( | |
543 | - | then dropRight( | |
544 | - | else dropRight( | |
545 | - | let | |
546 | - | let | |
547 | - | let | |
548 | - | if (isDefined(getInteger( | |
549 | - | then throw((("NFT " + | |
570 | + | let cx = drop(bY.name, 4) | |
571 | + | let F = if (contains(cx, "XXL")) | |
572 | + | then dropRight(cx, 3) | |
573 | + | else if (contains(cx, "XL")) | |
574 | + | then dropRight(cx, 2) | |
575 | + | else dropRight(cx, 1) | |
576 | + | let cy = valueOrErrorMessage(parseInt(F), ("Cannot parse land number from " + bY.name)) | |
577 | + | let bR = toBase58String(J) | |
578 | + | let bZ = L(bR) | |
579 | + | if (isDefined(getInteger(bZ))) | |
580 | + | then throw((("NFT " + bY.name) + " is already staked")) | |
550 | 581 | else { | |
551 | - | let ci = split(cg.description, "_") | |
552 | - | let aN = aS(ci[ac]) | |
553 | - | let aq = aM(aN, (aU(ci[ab]) / 25), 1) | |
554 | - | let cq = if ((500 >= cp)) | |
555 | - | then (lastBlock.timestamp > u) | |
556 | - | else false | |
557 | - | [IntegerEntry(bX, lastBlock.timestamp), IntegerEntry(S(i, bS, cn), lastBlock.timestamp), StringEntry(J(bS), cn), StringEntry(U(G), cn), StringEntry(Z(), aq)] | |
582 | + | let cc = split(bY.description, "_") | |
583 | + | let aM = aR(cc[ab]) | |
584 | + | let ap = aL(aM, (aT(cc[aa]) / 25), 1) | |
585 | + | [IntegerEntry(bZ, lastBlock.timestamp), IntegerEntry(R(i, bR, cw), lastBlock.timestamp), StringEntry(I(bR), cw), StringEntry(T(F), cw), StringEntry(Y(), ap)] | |
558 | 586 | } | |
559 | 587 | } | |
560 | 588 | } | |
562 | 590 | ||
563 | 591 | ||
564 | 592 | ||
565 | - | @Callable( | |
566 | - | func unstakeLand ( | |
593 | + | @Callable(aQ) | |
594 | + | func unstakeLand (cz) = if ((size(aQ.payments) != 0)) | |
567 | 595 | then throw("unstake doesn't require any payments") | |
568 | 596 | else { | |
569 | - | let K = fromBase58String(bS) | |
570 | - | let cn = toString(aR.caller) | |
571 | - | let cg = value(assetInfo(K)) | |
572 | - | if ((cg.issuer != this)) | |
573 | - | then throw("Unknown issuer of token") | |
574 | - | else if (!(contains(cg.name, i))) | |
575 | - | then throw((("Only NFT " + i) + " tokens can be unstaked")) | |
576 | - | else { | |
577 | - | let bX = M(bS) | |
578 | - | if (!(isDefined(bX))) | |
579 | - | then throw((("NFT " + cg.name) + " is not staked")) | |
580 | - | else { | |
581 | - | let ch = valueOrErrorMessage(getString(J(bS)), (("NFT " + cg.name) + " is orphaned")) | |
582 | - | if ((ch != cn)) | |
583 | - | then throw((("Staked " + i) + " is not yours")) | |
584 | - | else { | |
585 | - | let ci = split(cg.description, "_") | |
586 | - | let aN = aS(ci[ac]) | |
587 | - | let bW = aU(ci[ab]) | |
588 | - | let aq = aM(aN, (bW / 25), -1) | |
589 | - | let cl = bV(bS, bW) | |
590 | - | let W = valueOrErrorMessage(getString(R(cn)), (("You can't unstake " + i) + " without a duck staked")) | |
591 | - | let cj = valueOrElse(getString(X(W)), k) | |
592 | - | let ck = split(value(cj), "_") | |
593 | - | if ((ck[af] != "L")) | |
594 | - | then throw((("Duck location type is " + ck[af]) + ", but should be L")) | |
595 | - | else if ((ck[ag] != bS)) | |
596 | - | then throw(((("Duck location id is " + ck[ag]) + ", but should be ") + bS)) | |
597 | - | else { | |
598 | - | let bo = V(W) | |
599 | - | let bF = bn(bo) | |
600 | - | [ScriptTransfer(aR.caller, 1, K), DeleteEntry(bX), DeleteEntry(S(i, bS, cn)), StringEntry(Z(), aq), StringEntry(bo, makeString([bF[ah], cl, bF[aj], bF[ak]], ":"))] | |
601 | - | } | |
602 | - | } | |
603 | - | } | |
604 | - | } | |
597 | + | let bV = toString(aQ.caller) | |
598 | + | let ce = bU(bV) | |
599 | + | let aM = aR(ce._3[ab]) | |
600 | + | let cf = aT(ce._3[aa]) | |
601 | + | let ap = aL(aM, (cf / 25), -1) | |
602 | + | let cs = cl(bV, ce._2, cf) | |
603 | + | [ScriptTransfer(aQ.caller, 1, fromBase58String(ce._2)), DeleteEntry(L(ce._2)), DeleteEntry(R(i, ce._2, bV)), StringEntry(Y(), ap), StringEntry(cs._2, makeString(cs._3, ":"))] | |
605 | 604 | } | |
606 | 605 | ||
607 | 606 | ||
608 | 607 | ||
609 | - | @Callable( | |
608 | + | @Callable(aQ) | |
610 | 609 | func stakeDuck () = { | |
611 | - | let | |
612 | - | let | |
613 | - | let | |
614 | - | if (( | |
610 | + | let cv = value(aQ.payments[0]) | |
611 | + | let J = value(cv.assetId) | |
612 | + | let cw = toString(aQ.caller) | |
613 | + | if ((cv.amount != 1)) | |
615 | 614 | then throw((("NFT " + j) + " token should be attached as payment")) | |
616 | 615 | else { | |
617 | - | let | |
618 | - | if (if (( | |
619 | - | then ( | |
616 | + | let bY = value(assetInfo(J)) | |
617 | + | if (if ((bY.issuer != d)) | |
618 | + | then (bY.issuer != e) | |
620 | 619 | else false) | |
621 | 620 | then throw((("Unknown issuer of " + j) + " token")) | |
622 | - | else if (!(contains( | |
621 | + | else if (!(contains(bY.name, j))) | |
623 | 622 | then throw((("Only NFT " + j) + " tokens are accepted")) | |
624 | 623 | else { | |
625 | - | let | |
626 | - | let | |
627 | - | if (isDefined(getInteger( | |
628 | - | then throw((("NFT " + | |
629 | - | else if (isDefined(getString( | |
630 | - | then throw(("You already staked one duck: " + | |
624 | + | let cA = toBase58String(J) | |
625 | + | let bZ = L(cA) | |
626 | + | if (isDefined(getInteger(bZ))) | |
627 | + | then throw((("NFT " + bY.name) + " is already staked")) | |
628 | + | else if (isDefined(getString(Q(cw)))) | |
629 | + | then throw(("You already staked one duck: " + bY.name)) | |
631 | 630 | else { | |
632 | - | let | |
633 | - | let | |
634 | - | let | |
635 | - | let | |
636 | - | let | |
637 | - | let | |
638 | - | ([IntegerEntry( | |
631 | + | let cB = W(cA) | |
632 | + | let cC = getString(cB) | |
633 | + | let bC = X(cA) | |
634 | + | let cD = getInteger(bC) | |
635 | + | let bn = U(cA) | |
636 | + | let cE = getString(bn) | |
637 | + | ([IntegerEntry(bZ, lastBlock.timestamp), IntegerEntry(R(j, toBase58String(J), cw), lastBlock.timestamp), StringEntry(K(cA), cw), StringEntry(Q(cw), cA)] ++ (if (isDefined(cC)) | |
639 | 638 | then nil | |
640 | - | else ([StringEntry( | |
639 | + | else ([StringEntry(cB, k)] ++ (if (isDefined(cD)) | |
641 | 640 | then nil | |
642 | - | else ([IntegerEntry( | |
641 | + | else ([IntegerEntry(bC, 100)] ++ (if (isDefined(cE)) | |
643 | 642 | then nil | |
644 | - | else [StringEntry( | |
643 | + | else [StringEntry(bn, "0:0_0_0_0_0_0:0_0_0_0_0_0:")])))))) | |
645 | 644 | } | |
646 | 645 | } | |
647 | 646 | } | |
649 | 648 | ||
650 | 649 | ||
651 | 650 | ||
652 | - | @Callable( | |
653 | - | func unstakeDuck ( | |
651 | + | @Callable(aQ) | |
652 | + | func unstakeDuck (cA) = if ((size(aQ.payments) != 0)) | |
654 | 653 | then throw("unstake doesn't require any payments") | |
655 | 654 | else { | |
656 | - | let | |
657 | - | let | |
658 | - | let | |
659 | - | if (if (( | |
660 | - | then ( | |
655 | + | let J = fromBase58String(cA) | |
656 | + | let cw = toString(aQ.caller) | |
657 | + | let bY = value(assetInfo(J)) | |
658 | + | if (if ((bY.issuer != d)) | |
659 | + | then (bY.issuer != e) | |
661 | 660 | else false) | |
662 | 661 | then throw((("Unknown issuer of " + j) + " token")) | |
663 | - | else if (!(contains( | |
662 | + | else if (!(contains(bY.name, j))) | |
664 | 663 | then throw((("Only NFT " + j) + " tokens can be unstaked")) | |
665 | 664 | else { | |
666 | - | let | |
667 | - | if (!(isDefined( | |
668 | - | then throw((("NFT " + | |
669 | - | else if (!(isDefined( | |
670 | - | then throw((("The duck " + | |
665 | + | let bZ = L(toBase58String(J)) | |
666 | + | if (!(isDefined(bZ))) | |
667 | + | then throw((("NFT " + bY.name) + " is not staked")) | |
668 | + | else if (!(isDefined(Q(cw)))) | |
669 | + | then throw((("The duck " + bY.name) + " is not staked")) | |
671 | 670 | else { | |
672 | - | let | |
673 | - | if (( | |
671 | + | let cb = valueOrErrorMessage(getString(K(toBase58String(J))), (("NFT " + bY.name) + " is orphaned")) | |
672 | + | if ((cb != cw)) | |
674 | 673 | then throw("Staked NFT is not yours") | |
675 | - | else [ScriptTransfer( | |
674 | + | else [ScriptTransfer(aQ.caller, 1, J), DeleteEntry(bZ), DeleteEntry(W(cA)), DeleteEntry(K(cA)), DeleteEntry(R(j, cA, cw)), DeleteEntry(Q(cw))] | |
676 | 675 | } | |
677 | 676 | } | |
678 | 677 | } | |
679 | 678 | ||
680 | 679 | ||
681 | 680 | ||
682 | - | @Callable( | |
683 | - | func claimRes ( | |
681 | + | @Callable(aQ) | |
682 | + | func claimRes (aW,cz) = if ((size(aQ.payments) != 0)) | |
684 | 683 | then throw("claimRes doesn't require any payments") | |
685 | 684 | else { | |
686 | - | let cc = toString(aR.originCaller) | |
687 | - | let cg = value(assetInfo(fromBase58String(bS))) | |
688 | - | if (!(contains(cg.name, i))) | |
689 | - | then throw((("NFT " + i) + " token should be passed as param")) | |
690 | - | else { | |
691 | - | let bX = M(bS) | |
692 | - | let ch = getStringValue(J(bS)) | |
693 | - | if ((ch != cc)) | |
694 | - | then throw((i + " is not yours")) | |
695 | - | else { | |
696 | - | let ci = split(cg.description, "_") | |
697 | - | let I = ci[ab] | |
698 | - | let aN = aS(ci[ac]) | |
699 | - | let W = valueOrErrorMessage(getString(R(cc)), "You don't have a duck staked") | |
700 | - | let cj = valueOrElse(getString(X(W)), k) | |
701 | - | let ck = split(value(cj), "_") | |
702 | - | if ((ck[af] != "L")) | |
703 | - | then throw((("Duck location type is " + ck[af]) + ", but should be L")) | |
704 | - | else if ((ck[ag] != bS)) | |
705 | - | then throw(((("Duck location id is " + ck[ag]) + ", but should be ") + bS)) | |
706 | - | else { | |
707 | - | let bY = valueOrErrorMessage(getInteger(bX), (("NFT " + cg.name) + " is not staked")) | |
708 | - | let bb = (lastBlock.timestamp - bY) | |
709 | - | if ((0 > bb)) | |
710 | - | then throw(((("Saved timestamp is in future, saved = " + toString(bY)) + ", current = ") + toString(lastBlock.timestamp))) | |
711 | - | else { | |
712 | - | let bW = aU(I) | |
713 | - | let bZ = bR(bS) | |
714 | - | let ca = fraction(bb, (bZ * bW), n) | |
715 | - | if ((aX > ca)) | |
716 | - | then throw(((("Not enough resources, available = " + toString(ca)) + ", requested = ") + toString(aX))) | |
717 | - | else { | |
718 | - | let cw = fraction((ca - aX), n, (bZ * bW)) | |
719 | - | let cx = (lastBlock.timestamp - cw) | |
720 | - | let bo = V(W) | |
721 | - | let bF = bn(bo) | |
722 | - | let ba = split(bF[ai], "_") | |
723 | - | let cy = aZ(ba, aN, (bb - cw), (bW / 25), bZ) | |
724 | - | let cz = makeString([bF[ah], cy, bF[aj], bF[ak]], ":") | |
725 | - | $Tuple2([StringEntry(bo, cz), IntegerEntry(bX, cx), IntegerEntry(S(i, bS, ch), cx)], cy) | |
726 | - | } | |
727 | - | } | |
728 | - | } | |
729 | - | } | |
730 | - | } | |
685 | + | let bV = toString(aQ.originCaller) | |
686 | + | let aK = cd(bV, aW) | |
687 | + | $Tuple2((aK._1 :+ StringEntry(aK._2, makeString(aK._3, ":"))), aK._3[ah]) | |
731 | 688 | } | |
732 | 689 | ||
733 | 690 | ||
734 | 691 | ||
735 | - | @Callable( | |
736 | - | func flight (bt | |
692 | + | @Callable(aQ) | |
693 | + | func flight (bs,bt) = if (!(sigVerify_8Kb(bs, bt, g))) | |
737 | 694 | then throw("signature does not match") | |
738 | - | else if ((size( | |
695 | + | else if ((size(aQ.payments) != 0)) | |
739 | 696 | then throw("flight doesn't require any payments") | |
740 | 697 | else { | |
741 | - | let | |
742 | - | let | |
743 | - | let | |
744 | - | let | |
745 | - | let | |
746 | - | let | |
747 | - | let | |
748 | - | if (if (( | |
698 | + | let bu = split(toUtf8String(bs), ";") | |
699 | + | let bv = split(split(bu[0], "|")[0], "_") | |
700 | + | let bw = parseIntValue(bv[0]) | |
701 | + | let bx = parseIntValue(bv[1]) | |
702 | + | let cF = split(bu[1], ":") | |
703 | + | let cG = cF[0] | |
704 | + | let bA = parseIntValue(cF[1]) | |
705 | + | if (if ((bA > (lastBlock.timestamp + o))) | |
749 | 706 | then true | |
750 | - | else ((lastBlock.timestamp - o) > | |
707 | + | else ((lastBlock.timestamp - o) > bA)) | |
751 | 708 | then throw("signature outdated") | |
752 | 709 | else { | |
753 | - | let | |
754 | - | let | |
755 | - | let | |
756 | - | if (( | |
757 | - | then throw(((("oldHealth=" + toString(valueOrElse(getInteger( | |
758 | - | else if ((0 >= | |
710 | + | let V = valueOrErrorMessage(getString(Q(toString(aQ.caller))), "You don't have a duck staked") | |
711 | + | let bC = X(V) | |
712 | + | let bD = valueOrElse(getInteger(bC), 100) | |
713 | + | if ((bD != bw)) | |
714 | + | then throw(((("oldHealth=" + toString(valueOrElse(getInteger(bC), 100))) + " from state does not match one from flight log=") + toString(bw))) | |
715 | + | else if ((0 >= bw)) | |
759 | 716 | then throw("You can't fly with zero health") | |
760 | 717 | else { | |
761 | - | let | |
762 | - | let | |
763 | - | if (( | |
718 | + | let cB = W(V) | |
719 | + | let bW = valueOrElse(getString(cB), k) | |
720 | + | if ((cG == bW)) | |
764 | 721 | then throw("You can't fly to the same location") | |
765 | - | else $Tuple2([StringEntry( | |
766 | - | then | |
767 | - | else | |
722 | + | else $Tuple2([StringEntry(cB, if ((bx > 0)) | |
723 | + | then cG | |
724 | + | else bW), IntegerEntry(bC, bx)], unit) | |
768 | 725 | } | |
769 | 726 | } | |
770 | 727 | } | |
771 | 728 | ||
772 | 729 | ||
773 | 730 | ||
774 | - | @Callable( | |
775 | - | func setHealth ( | |
731 | + | @Callable(aQ) | |
732 | + | func setHealth (cD,V) = if (if ((0 > cD)) | |
776 | 733 | then true | |
777 | - | else ( | |
734 | + | else (cD > 100)) | |
778 | 735 | then throw("HP should be within 0..100") | |
779 | - | else [IntegerEntry( | |
736 | + | else [IntegerEntry(X(V), cD)] | |
780 | 737 | ||
781 | 738 | ||
782 | 739 | ||
783 | - | @Callable( | |
784 | - | func heal ( | |
740 | + | @Callable(aQ) | |
741 | + | func heal (cH,aW) = if (if ((0 > cH)) | |
785 | 742 | then true | |
786 | - | else ( | |
787 | - | then throw(("Unknown material: " + toString( | |
788 | - | else if ((0 >= | |
789 | - | then throw(("Amount should be positive! " + toString( | |
743 | + | else (cH >= l)) | |
744 | + | then throw(("Unknown material: " + toString(cH))) | |
745 | + | else if ((0 >= aW)) | |
746 | + | then throw(("Amount should be positive! " + toString(aW))) | |
790 | 747 | else { | |
791 | - | let | |
792 | - | let | |
793 | - | let | |
794 | - | if (( | |
748 | + | let V = valueOrErrorMessage(getString(Q(toString(aQ.caller))), "You don't have a duck staked") | |
749 | + | let bC = X(V) | |
750 | + | let cI = valueOrElse(getInteger(bC), 100) | |
751 | + | if ((cI >= 100)) | |
795 | 752 | then throw("HP should be < 100 to heal") | |
796 | 753 | else { | |
797 | - | let | |
798 | - | let | |
799 | - | let | |
800 | - | let | |
801 | - | let | |
802 | - | let | |
803 | - | if (( | |
804 | - | then throw(((((("You need " + toString( | |
754 | + | let bn = U(V) | |
755 | + | let bE = bm(bn) | |
756 | + | let bF = split(bE[ai], "_") | |
757 | + | let cJ = parseIntValue(bF[cH]) | |
758 | + | let cK = min([(aW / h), (100 - cI)]) | |
759 | + | let cL = (cK * h) | |
760 | + | if ((cL > cJ)) | |
761 | + | then throw(((((("You need " + toString(cL)) + " of ") + B[cH]) + " to heal, but you backpack contains ") + toString(cJ))) | |
805 | 762 | else { | |
806 | - | let | |
807 | - | [IntegerEntry( | |
763 | + | let bG = aU(bF, cH, cL) | |
764 | + | [IntegerEntry(bC, (cI + cK)), StringEntry(bn, makeString([bE[ag], bE[ah], bG, bE[aj]], ":"))] | |
808 | 765 | } | |
809 | 766 | } | |
810 | 767 | } | |
811 | 768 | ||
812 | 769 | ||
813 | 770 | ||
814 | - | @Callable( | |
815 | - | func updateBackpack ( | |
771 | + | @Callable(aQ) | |
772 | + | func updateBackpack (V,cM) = if ((aQ.caller != f)) | |
816 | 773 | then throw("permission denied") | |
817 | - | else $Tuple2([StringEntry(V | |
774 | + | else $Tuple2([StringEntry(U(V), cM)], cM) | |
818 | 775 | ||
819 | 776 | ||
820 | 777 | ||
821 | - | @Callable( | |
822 | - | func expeditionBuy (bt | |
778 | + | @Callable(aQ) | |
779 | + | func expeditionBuy (bs,bt) = if ((size(aQ.payments) != 1)) | |
823 | 780 | then throw("Exactly one payment required") | |
824 | 781 | else { | |
825 | - | let | |
826 | - | if (( | |
782 | + | let cv = value(aQ.payments[0]) | |
783 | + | if ((cv.assetId != b)) | |
827 | 784 | then throw("Allowed USDN payment only!") | |
828 | - | else if (( | |
785 | + | else if ((cv.amount != t)) | |
829 | 786 | then throw(("Payment attached should be " + toString(t))) | |
830 | - | else | |
787 | + | else bp(false, aQ.caller, aQ.transactionId, bs, bt) | |
831 | 788 | } | |
832 | 789 | ||
833 | 790 | ||
834 | 791 | ||
835 | - | @Callable( | |
836 | - | func expedition (bt | |
792 | + | @Callable(aQ) | |
793 | + | func expedition (bs,bt) = if ((size(aQ.payments) != 0)) | |
837 | 794 | then throw("expedition doesn't require any payments") | |
838 | - | else | |
795 | + | else bp(true, aQ.caller, aQ.transactionId, bs, bt) | |
839 | 796 | ||
840 | 797 | ||
841 | 798 | ||
842 | - | @Callable( | |
843 | - | func upgradeInfra ( | |
799 | + | @Callable(aQ) | |
800 | + | func upgradeInfra (cN) = if ((size(aQ.payments) != 0)) | |
844 | 801 | then throw("Infrastructure upgrade doesn't require any payments") | |
845 | - | else | |
802 | + | else cm(true, aQ.caller, 0) | |
846 | 803 | ||
847 | 804 | ||
848 | 805 | ||
849 | - | @Callable( | |
850 | - | func upgradeInfraUsdn ( | |
806 | + | @Callable(aQ) | |
807 | + | func upgradeInfraUsdn (cN) = if ((size(aQ.payments) != 1)) | |
851 | 808 | then throw("Exactly one payment required") | |
852 | 809 | else { | |
853 | - | let | |
854 | - | if (( | |
810 | + | let cv = value(aQ.payments[0]) | |
811 | + | if ((cv.assetId != b)) | |
855 | 812 | then throw("Allowed USDN payment only!") | |
856 | - | else { | |
857 | - | let cf = (valueOrElse(getInteger(N(bS)), 0) + 1) | |
858 | - | let cg = value(assetInfo(fromBase58String(bS))) | |
859 | - | let ci = split(cg.description, "_") | |
860 | - | let cH = fraction(r, (aU(ci[ab]) * cf), 25) | |
861 | - | if ((cm.amount != cH)) | |
862 | - | then throw(("Payment attached should be " + toString(cH))) | |
863 | - | else cb(false, aR.caller, bS) | |
864 | - | } | |
813 | + | else cm(false, aQ.caller, cv.amount) | |
814 | + | } | |
815 | + | ||
816 | + | ||
817 | + | ||
818 | + | @Callable(aQ) | |
819 | + | func activateArtifact (cO) = if ((size(aQ.payments) != 0)) | |
820 | + | then throw("Artifact activation doesn't require any payments") | |
821 | + | else { | |
822 | + | let aK = { | |
823 | + | let c = cO | |
824 | + | if (("PRESALE" == c)) | |
825 | + | then ct(toString(aQ.caller)) | |
826 | + | else throw("Unknown artifact") | |
827 | + | } | |
828 | + | aK | |
865 | 829 | } | |
866 | 830 | ||
867 | 831 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = toUtf8String(take(drop(this.bytes, 1), 1)) | |
5 | 5 | ||
6 | 6 | let b = { | |
7 | 7 | let c = a | |
8 | 8 | if (("W" == c)) | |
9 | 9 | then base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p' | |
10 | 10 | else if (("T" == c)) | |
11 | 11 | then base58'HezsdQuRDtzksAYUy97gfhKy7Z1NW2uXYSHA3bgqenNZ' | |
12 | 12 | else throw("Unknown chain") | |
13 | 13 | } | |
14 | 14 | ||
15 | 15 | let d = { | |
16 | 16 | let c = a | |
17 | 17 | if (("W" == c)) | |
18 | 18 | then addressFromStringValue("3PEktVux2RhchSN63DsDo4b4mz4QqzKSeDv") | |
19 | 19 | else if (("T" == c)) | |
20 | 20 | then this | |
21 | 21 | else throw("Unknown chain") | |
22 | 22 | } | |
23 | 23 | ||
24 | 24 | let e = { | |
25 | 25 | let c = a | |
26 | 26 | if (("W" == c)) | |
27 | 27 | then addressFromStringValue("3PDVuU45H7Eh5dmtNbnRNRStGwULA7NY6Hb") | |
28 | 28 | else if (("T" == c)) | |
29 | 29 | then this | |
30 | 30 | else throw("Unknown chain") | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | let f = { | |
34 | 34 | let c = a | |
35 | 35 | if (("W" == c)) | |
36 | 36 | then addressFromStringValue("3P2sk1KncSxRaZs8b4CWGPw2jkvvav74u4D") | |
37 | 37 | else if (("T" == c)) | |
38 | 38 | then addressFromStringValue("3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep") | |
39 | 39 | else throw("Unknown chain") | |
40 | 40 | } | |
41 | 41 | ||
42 | 42 | let g = base58'6LfPuKJjLgekmncBhMg2LZyMTNVzZBccXR28ySXm9uXD' | |
43 | 43 | ||
44 | 44 | let h = 10000 | |
45 | 45 | ||
46 | 46 | let i = "LAND" | |
47 | 47 | ||
48 | 48 | let j = "DUCK" | |
49 | 49 | ||
50 | 50 | let k = "Africa_F_Africa" | |
51 | 51 | ||
52 | 52 | let l = 6 | |
53 | 53 | ||
54 | 54 | let m = 3456000 | |
55 | 55 | ||
56 | 56 | let n = 86400000 | |
57 | 57 | ||
58 | 58 | let o = 300000 | |
59 | 59 | ||
60 | 60 | let p = 158549 | |
61 | 61 | ||
62 | 62 | let q = { | |
63 | 63 | let c = a | |
64 | 64 | if (("W" == c)) | |
65 | 65 | then 18921595217 | |
66 | 66 | else if (("T" == c)) | |
67 | 67 | then 189215952 | |
68 | 68 | else throw("Unknown chain") | |
69 | 69 | } | |
70 | 70 | ||
71 | 71 | let r = { | |
72 | 72 | let c = a | |
73 | 73 | if (("W" == c)) | |
74 | 74 | then 120000000 | |
75 | 75 | else if (("T" == c)) | |
76 | 76 | then 1200000 | |
77 | 77 | else throw("Unknown chain") | |
78 | 78 | } | |
79 | 79 | ||
80 | 80 | let s = { | |
81 | 81 | let c = a | |
82 | 82 | if (("W" == c)) | |
83 | 83 | then 157679960139 | |
84 | 84 | else if (("T" == c)) | |
85 | 85 | then 1576799601 | |
86 | 86 | else throw("Unknown chain") | |
87 | 87 | } | |
88 | 88 | ||
89 | 89 | let t = { | |
90 | 90 | let c = a | |
91 | 91 | if (("W" == c)) | |
92 | 92 | then 1000000000 | |
93 | 93 | else if (("T" == c)) | |
94 | 94 | then 10000000 | |
95 | 95 | else throw("Unknown chain") | |
96 | 96 | } | |
97 | 97 | ||
98 | - | let u = { | |
99 | - | let c = a | |
100 | - | if (("W" == c)) | |
101 | - | then 1673136000000 | |
102 | - | else if (("T" == c)) | |
103 | - | then 1672790400000 | |
104 | - | else throw("Unknown chain") | |
105 | - | } | |
98 | + | let u = 1000000 | |
106 | 99 | ||
107 | - | let v = | |
100 | + | let v = toBigInt(5) | |
108 | 101 | ||
109 | - | let w = toBigInt( | |
102 | + | let w = toBigInt(20) | |
110 | 103 | ||
111 | - | let x = toBigInt(20) | |
104 | + | let x = toBigInt((20 * 20)) | |
112 | 105 | ||
113 | - | let y = toBigInt((20 * 20)) | |
106 | + | let y = toBigInt(((20 * 20) * 20)) | |
114 | 107 | ||
115 | - | let z = toBigInt(((20 * 20) * 20)) | |
108 | + | let z = toBigInt((((20 * 20) * 20) * 20)) | |
116 | 109 | ||
117 | - | let A = toBigInt((((20 * 20) * 20) * 20)) | |
110 | + | let A = toBigInt(((((20 * 20) * 20) * 20) * 20)) | |
118 | 111 | ||
119 | - | let B = | |
112 | + | let B = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"] | |
120 | 113 | ||
121 | - | let C = [" | |
114 | + | let C = ["Asia", "Europe", "Americas", "Oceania", "Africa"] | |
122 | 115 | ||
123 | - | let D = ["Asia", "Europe", "Americas", "Oceania", "Africa"] | |
124 | - | ||
125 | - | func E () = "nextLandNum" | |
116 | + | func D () = "nextLandNum" | |
126 | 117 | ||
127 | 118 | ||
128 | - | func | |
119 | + | func E (F) = ("landToAsset_" + F) | |
129 | 120 | ||
130 | 121 | ||
131 | - | func | |
122 | + | func G (F,H) = ((i + F) + H) | |
132 | 123 | ||
133 | 124 | ||
134 | - | func | |
125 | + | func I (J) = ("nftOwner_" + J) | |
135 | 126 | ||
136 | 127 | ||
137 | - | func | |
128 | + | func K (J) = ("duckOwner_" + J) | |
138 | 129 | ||
139 | 130 | ||
140 | - | func | |
131 | + | func L (J) = ("stakedTime_" + J) | |
141 | 132 | ||
142 | 133 | ||
143 | - | func | |
134 | + | func M (J) = ("infraLevel_" + J) | |
144 | 135 | ||
145 | 136 | ||
146 | - | func | |
137 | + | func N (J,O) = ((("infraLevelByAssetIdAndOwner_" + J) + "_") + O) | |
147 | 138 | ||
148 | 139 | ||
149 | - | func | |
140 | + | func P (J) = ("presaleArtActivated_" + J) | |
150 | 141 | ||
151 | 142 | ||
152 | - | func | |
143 | + | func Q (O) = ("stakedDuckByOwner_" + O) | |
153 | 144 | ||
154 | 145 | ||
155 | - | func | |
146 | + | func R (S,J,O) = ((((("stakedTimeByTypeAssetIdAndOwner_" + S) + "_") + J) + "_") + O) | |
156 | 147 | ||
157 | 148 | ||
158 | - | func | |
149 | + | func T (F) = ("landOwner_" + F) | |
159 | 150 | ||
160 | 151 | ||
161 | - | func | |
152 | + | func U (V) = ("backPack_" + V) | |
162 | 153 | ||
163 | 154 | ||
164 | - | func | |
155 | + | func W (V) = ("duckLocation_" + V) | |
165 | 156 | ||
166 | 157 | ||
167 | - | func | |
158 | + | func X (V) = ("duckHealth_" + V) | |
168 | 159 | ||
169 | 160 | ||
170 | - | func | |
161 | + | func Y () = "resTypesProportions" | |
171 | 162 | ||
172 | 163 | ||
173 | - | let | |
164 | + | let Z = 0 | |
174 | 165 | ||
175 | - | let | |
166 | + | let aa = 1 | |
176 | 167 | ||
177 | - | let | |
168 | + | let ab = 2 | |
178 | 169 | ||
179 | - | let | |
170 | + | let ac = 3 | |
180 | 171 | ||
181 | - | let | |
172 | + | let ad = 0 | |
182 | 173 | ||
183 | - | let | |
174 | + | let ae = 1 | |
184 | 175 | ||
185 | - | let | |
176 | + | let af = 2 | |
186 | 177 | ||
187 | - | let | |
178 | + | let ag = 0 | |
188 | 179 | ||
189 | - | let | |
180 | + | let ah = 1 | |
190 | 181 | ||
191 | - | let | |
182 | + | let ai = 2 | |
192 | 183 | ||
193 | - | let | |
184 | + | let aj = 3 | |
194 | 185 | ||
195 | - | func | |
196 | - | let c = | |
186 | + | func ak (al) = { | |
187 | + | let c = al | |
197 | 188 | if ($isInstanceOf(c, "String")) | |
198 | 189 | then { | |
199 | - | let | |
200 | - | | |
190 | + | let am = c | |
191 | + | am | |
201 | 192 | } | |
202 | 193 | else throw("fail to cast into String") | |
203 | 194 | } | |
204 | 195 | ||
205 | 196 | ||
206 | - | func | |
207 | - | let | |
208 | - | if ((size( | |
197 | + | func an (ao) = { | |
198 | + | let ap = split(value(getString(Y())), "_") | |
199 | + | if ((size(ap) != l)) | |
209 | 200 | then throw("Wrong proportions data") | |
210 | 201 | else { | |
211 | - | let | |
212 | - | let | |
213 | - | if ((0 >= | |
202 | + | let aq = [parseIntValue(ap[0]), parseIntValue(ap[1]), parseIntValue(ap[2]), parseIntValue(ap[3]), parseIntValue(ap[4]), parseIntValue(ap[5])] | |
203 | + | let ar = (((((aq[0] + aq[1]) + aq[2]) + aq[3]) + aq[4]) + aq[5]) | |
204 | + | if ((0 >= ar)) | |
214 | 205 | then throw("No lands staked") | |
215 | 206 | else { | |
216 | - | let | |
217 | - | func | |
207 | + | let as = fraction(ao, u, ar) | |
208 | + | func at (au,av) = (au :+ fraction(av, as, u)) | |
218 | 209 | ||
219 | - | let | |
220 | - | let | |
221 | - | let | |
222 | - | func | |
223 | - | then | |
224 | - | else | |
210 | + | let aw = aq | |
211 | + | let ax = size(aw) | |
212 | + | let ay = nil | |
213 | + | func az (aA,aB) = if ((aB >= ax)) | |
214 | + | then aA | |
215 | + | else at(aA, aw[aB]) | |
225 | 216 | ||
226 | - | func | |
227 | - | then | |
217 | + | func aC (aA,aB) = if ((aB >= ax)) | |
218 | + | then aA | |
228 | 219 | else throw("List size exceeds 6") | |
229 | 220 | ||
230 | - | | |
221 | + | aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6) | |
231 | 222 | } | |
232 | 223 | } | |
233 | 224 | } | |
234 | 225 | ||
235 | 226 | ||
236 | - | func | |
237 | - | let | |
238 | - | func | |
239 | - | let | |
240 | - | if ((0 > | |
241 | - | then throw(((((("Not enough material idx=" + toString( | |
242 | - | else ( | |
227 | + | func aD (aE,aF,aG) = { | |
228 | + | let aH = an(aG) | |
229 | + | func aI (au,aJ) = { | |
230 | + | let aK = (parseIntValue(aF[aJ]) - aH[aJ]) | |
231 | + | if ((0 > aK)) | |
232 | + | then throw(((((("Not enough material idx=" + toString(aJ)) + ", you have ") + aF[aJ]) + ", but need ") + toString(aH[aJ]))) | |
233 | + | else (au :+ toString(aK)) | |
243 | 234 | } | |
244 | 235 | ||
245 | - | if ( | |
236 | + | if (aE) | |
246 | 237 | then { | |
247 | - | let | |
248 | - | let | |
249 | - | let | |
250 | - | func | |
251 | - | then | |
252 | - | else | |
238 | + | let aw = [0, 1, 2, 3, 4, 5] | |
239 | + | let ax = size(aw) | |
240 | + | let ay = nil | |
241 | + | func az (aA,aB) = if ((aB >= ax)) | |
242 | + | then aA | |
243 | + | else aI(aA, aw[aB]) | |
253 | 244 | ||
254 | - | func | |
255 | - | then | |
245 | + | func aC (aA,aB) = if ((aB >= ax)) | |
246 | + | then aA | |
256 | 247 | else throw("List size exceeds 6") | |
257 | 248 | ||
258 | - | | |
249 | + | aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6) | |
259 | 250 | } | |
260 | - | else | |
251 | + | else aF | |
261 | 252 | } | |
262 | 253 | ||
263 | 254 | ||
264 | - | func | |
265 | - | let | |
266 | - | if ((size( | |
255 | + | func aL (aM,aN,aO) = { | |
256 | + | let ap = split(valueOrElse(getString(Y()), "0_0_0_0_0_0"), "_") | |
257 | + | if ((size(ap) != l)) | |
267 | 258 | then throw("Wrong proportions data") | |
268 | 259 | else { | |
269 | - | func | |
270 | - | let | |
271 | - | if ((0 > | |
272 | - | then throw(((((((("Panic! Pieces of type=" + toString( | |
273 | - | else ( | |
260 | + | func aP (au,aQ) = { | |
261 | + | let aK = (parseIntValue(ap[aQ]) + ((aO * aM[aQ]) * aN)) | |
262 | + | if ((0 > aK)) | |
263 | + | then throw(((((((("Panic! Pieces of type=" + toString(aQ)) + ", sign=") + toString(aO)) + ", terrainCounts[i]=") + toString(aM[aQ])) + ", landSizeIndex=") + toString(aN))) | |
264 | + | else (au :+ toString(aK)) | |
274 | 265 | } | |
275 | 266 | ||
276 | - | let | |
277 | - | let | |
278 | - | let | |
279 | - | let | |
280 | - | func | |
281 | - | then | |
282 | - | else | |
267 | + | let aq = { | |
268 | + | let aw = [0, 1, 2, 3, 4, 5] | |
269 | + | let ax = size(aw) | |
270 | + | let ay = nil | |
271 | + | func az (aA,aB) = if ((aB >= ax)) | |
272 | + | then aA | |
273 | + | else aP(aA, aw[aB]) | |
283 | 274 | ||
284 | - | func | |
285 | - | then | |
275 | + | func aC (aA,aB) = if ((aB >= ax)) | |
276 | + | then aA | |
286 | 277 | else throw("List size exceeds 6") | |
287 | 278 | ||
288 | - | | |
279 | + | aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6) | |
289 | 280 | } | |
290 | - | makeString( | |
281 | + | makeString(aq, "_") | |
291 | 282 | } | |
292 | 283 | } | |
293 | 284 | ||
294 | 285 | ||
295 | - | func | |
286 | + | func aR (aS) = [(size(split(aS, "A")) - 1), (size(split(aS, "B")) - 1), (size(split(aS, "C")) - 1), (size(split(aS, "D")) - 1), (size(split(aS, "E")) - 1), (size(split(aS, "F")) - 1)] | |
296 | 287 | ||
297 | 288 | ||
298 | - | func | |
299 | - | let c = | |
289 | + | func aT (H) = { | |
290 | + | let c = H | |
300 | 291 | if (("S" == c)) | |
301 | 292 | then 25 | |
302 | 293 | else if (("M" == c)) | |
303 | 294 | then 100 | |
304 | 295 | else if (("L" == c)) | |
305 | 296 | then 225 | |
306 | 297 | else if (("XL" == c)) | |
307 | 298 | then 400 | |
308 | 299 | else if (("XXL" == c)) | |
309 | 300 | then 625 | |
310 | 301 | else throw("Unknown land size") | |
311 | 302 | } | |
312 | 303 | ||
313 | 304 | ||
314 | - | func | |
315 | - | func | |
316 | - | then toString((parseIntValue( | |
317 | - | else | |
305 | + | func aU (aV,aJ,aW) = { | |
306 | + | func aX (au,aQ) = (au :+ (if ((aQ == aJ)) | |
307 | + | then toString((parseIntValue(aV[aQ]) - aW)) | |
308 | + | else aV[aQ])) | |
318 | 309 | ||
319 | - | let | |
320 | - | let | |
321 | - | let | |
322 | - | let | |
323 | - | func | |
324 | - | then | |
325 | - | else | |
310 | + | let aq = { | |
311 | + | let aw = [0, 1, 2, 3, 4, 5] | |
312 | + | let ax = size(aw) | |
313 | + | let ay = nil | |
314 | + | func az (aA,aB) = if ((aB >= ax)) | |
315 | + | then aA | |
316 | + | else aX(aA, aw[aB]) | |
326 | 317 | ||
327 | - | func | |
328 | - | then | |
318 | + | func aC (aA,aB) = if ((aB >= ax)) | |
319 | + | then aA | |
329 | 320 | else throw("List size exceeds 6") | |
330 | 321 | ||
331 | - | | |
322 | + | aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6) | |
332 | 323 | } | |
333 | - | makeString( | |
324 | + | makeString(aq, "_") | |
334 | 325 | } | |
335 | 326 | ||
336 | 327 | ||
337 | - | func | |
338 | - | func | |
339 | - | let | |
340 | - | ( | |
328 | + | func aY (aZ,aM,ba,aN,bb) = { | |
329 | + | func bc (au,aQ) = { | |
330 | + | let bd = ((fraction(ba, bb, n) * aM[aQ]) * aN) | |
331 | + | (au :+ toString((parseIntValue(aZ[aQ]) + bd))) | |
341 | 332 | } | |
342 | 333 | ||
343 | - | let | |
344 | - | let | |
345 | - | let | |
346 | - | let | |
347 | - | func | |
348 | - | then | |
349 | - | else | |
334 | + | let aq = { | |
335 | + | let aw = [0, 1, 2, 3, 4, 5] | |
336 | + | let ax = size(aw) | |
337 | + | let ay = nil | |
338 | + | func az (aA,aB) = if ((aB >= ax)) | |
339 | + | then aA | |
340 | + | else bc(aA, aw[aB]) | |
350 | 341 | ||
351 | - | func | |
352 | - | then | |
342 | + | func aC (aA,aB) = if ((aB >= ax)) | |
343 | + | then aA | |
353 | 344 | else throw("List size exceeds 6") | |
354 | 345 | ||
355 | - | | |
346 | + | aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6) | |
356 | 347 | } | |
357 | - | makeString( | |
348 | + | makeString(aq, "_") | |
358 | 349 | } | |
359 | 350 | ||
360 | 351 | ||
361 | - | func | |
362 | - | then | |
363 | - | else -( | |
352 | + | func be (bf) = if ((bf >= toBigInt(0))) | |
353 | + | then bf | |
354 | + | else -(bf) | |
364 | 355 | ||
365 | 356 | ||
366 | - | let | |
357 | + | let bg = [[1, 4, 9, 10, 15], [5, 8, 13, 14, 15], [6, 9, 14, 15, 16], [4, 7, 8, 13, 18], [1, 6, 7, 15, 19]] | |
367 | 358 | ||
368 | - | func | |
369 | - | let | |
370 | - | let | |
359 | + | func bh (bi,bj) = { | |
360 | + | let bk = toInt((bi % w)) | |
361 | + | let bl = if ((bj[0] > bk)) | |
371 | 362 | then "A" | |
372 | - | else if (( | |
363 | + | else if ((bj[1] > bk)) | |
373 | 364 | then "B" | |
374 | - | else if (( | |
365 | + | else if ((bj[2] > bk)) | |
375 | 366 | then "C" | |
376 | - | else if (( | |
367 | + | else if ((bj[3] > bk)) | |
377 | 368 | then "D" | |
378 | - | else if (( | |
369 | + | else if ((bj[4] > bk)) | |
379 | 370 | then "E" | |
380 | 371 | else "F" | |
381 | - | | |
372 | + | bl | |
382 | 373 | } | |
383 | 374 | ||
384 | 375 | ||
385 | - | func | |
386 | - | let | |
387 | - | [toString(valueOrElse(parseInt( | |
388 | - | then | |
389 | - | else "0_0_0_0_0_0", if ((size(split( | |
390 | - | then | |
391 | - | else "0_0_0_0_0_0", | |
376 | + | func bm (bn) = { | |
377 | + | let bo = split(valueOrElse(getString(bn), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":") | |
378 | + | [toString(valueOrElse(parseInt(bo[ag]), 0)), if ((size(split(bo[ah], "_")) == l)) | |
379 | + | then bo[ah] | |
380 | + | else "0_0_0_0_0_0", if ((size(split(bo[ai], "_")) == l)) | |
381 | + | then bo[ai] | |
382 | + | else "0_0_0_0_0_0", bo[aj]] | |
392 | 383 | } | |
393 | 384 | ||
394 | 385 | ||
395 | - | func | |
386 | + | func bp (aE,bq,br,bs,bt) = if (!(sigVerify_8Kb(bs, bt, g))) | |
396 | 387 | then throw("signature does not match") | |
397 | 388 | else { | |
398 | - | let | |
399 | - | let | |
400 | - | let | |
401 | - | let | |
402 | - | let | |
403 | - | let | |
404 | - | if (( | |
389 | + | let bu = split(toUtf8String(bs), ";") | |
390 | + | let bv = split(split(bu[0], "|")[0], "_") | |
391 | + | let bw = parseIntValue(bv[0]) | |
392 | + | let bx = parseIntValue(bv[1]) | |
393 | + | let by = split(bu[1], ":") | |
394 | + | let bz = split(by[0], "_") | |
395 | + | if ((bz[1] != "E")) | |
405 | 396 | then throw("expedition target location type should be E") | |
406 | 397 | else { | |
407 | - | let | |
408 | - | if (if (( | |
398 | + | let bA = parseIntValue(by[1]) | |
399 | + | if (if ((bA > (lastBlock.timestamp + o))) | |
409 | 400 | then true | |
410 | - | else ((lastBlock.timestamp - o) > | |
401 | + | else ((lastBlock.timestamp - o) > bA)) | |
411 | 402 | then throw("signature outdated") | |
412 | 403 | else { | |
413 | - | let | |
414 | - | let | |
415 | - | let | |
416 | - | let | |
417 | - | if (( | |
418 | - | then throw(((("oldHealth=" + toString(valueOrElse(getInteger( | |
419 | - | else if ((0 >= | |
404 | + | let bB = toString(bq) | |
405 | + | let V = valueOrErrorMessage(getString(Q(bB)), "You don't have a duck staked") | |
406 | + | let bC = X(V) | |
407 | + | let bD = valueOrElse(getInteger(bC), 100) | |
408 | + | if ((bD != bw)) | |
409 | + | then throw(((("oldHealth=" + toString(valueOrElse(getInteger(bC), 100))) + " from state does not match one from flight log=") + toString(bw))) | |
410 | + | else if ((0 >= bw)) | |
420 | 411 | then throw("You can't fly with zero health") | |
421 | - | else if ((0 >= | |
422 | - | then $Tuple2(((if (!( | |
423 | - | then [ScriptTransfer( | |
424 | - | else nil) :+ IntegerEntry( | |
412 | + | else if ((0 >= bx)) | |
413 | + | then $Tuple2(((if (!(aE)) | |
414 | + | then [ScriptTransfer(bq, t, b)] | |
415 | + | else nil) :+ IntegerEntry(bC, 0)), "") | |
425 | 416 | else { | |
426 | - | let | |
427 | - | let | |
428 | - | let | |
429 | - | let | |
430 | - | let | |
431 | - | let | |
432 | - | let | |
433 | - | let | |
434 | - | let | |
435 | - | func | |
417 | + | let bn = U(V) | |
418 | + | let bE = bm(bn) | |
419 | + | let bF = split(bE[ai], "_") | |
420 | + | let bG = makeString(aD(aE, bF, s), "_") | |
421 | + | let bH = be(toBigInt(br)) | |
422 | + | let bI = valueOrElse(getInteger(D()), 501) | |
423 | + | let F = toString(bI) | |
424 | + | let bJ = toInt((bH % v)) | |
425 | + | let bK = bg[bJ] | |
426 | + | func bL (au,av) = $Tuple2((((((au._1 + bh(au._2, bK)) + bh((au._2 / w), bK)) + bh((au._2 / x), bK)) + bh((au._2 / y), bK)) + bh((au._2 / z), bK)), (au._2 / A)) | |
436 | 427 | ||
437 | - | let | |
438 | - | let | |
439 | - | let | |
440 | - | let | |
441 | - | func | |
442 | - | then | |
443 | - | else | |
428 | + | let bM = { | |
429 | + | let aw = [1, 2, 3, 4, 5] | |
430 | + | let ax = size(aw) | |
431 | + | let ay = $Tuple2("", (bH / v)) | |
432 | + | func az (aA,aB) = if ((aB >= ax)) | |
433 | + | then aA | |
434 | + | else bL(aA, aw[aB]) | |
444 | 435 | ||
445 | - | func | |
446 | - | then | |
436 | + | func aC (aA,aB) = if ((aB >= ax)) | |
437 | + | then aA | |
447 | 438 | else throw("List size exceeds 5") | |
448 | 439 | ||
449 | - | | |
440 | + | aC(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5) | |
450 | 441 | } | |
451 | - | let | |
452 | - | let | |
453 | - | let | |
454 | - | let | |
455 | - | $Tuple2([IntegerEntry( | |
442 | + | let bN = C[bJ] | |
443 | + | let bO = Issue(G(F, "S"), makeString([F, "S", bM._1, bN], "_"), 1, 0, false) | |
444 | + | let J = calculateAssetId(bO) | |
445 | + | let bP = toBase58String(J) | |
446 | + | $Tuple2([IntegerEntry(D(), (bI + 1)), bO, StringEntry(E(F), bP), StringEntry(I(bP), bB), StringEntry(T(F), bB), IntegerEntry(M(bP), 0), IntegerEntry(N(bP, bB), 0), ScriptTransfer(bq, 1, J), StringEntry(W(V), makeString([bN, "L", bP], "_")), IntegerEntry(bC, bx), StringEntry(bn, makeString([bE[ag], bE[ah], bG, bE[aj]], ":"))], bP) | |
456 | 447 | } | |
457 | 448 | } | |
458 | 449 | } | |
459 | 450 | } | |
460 | 451 | ||
461 | 452 | ||
462 | - | func | |
463 | - | let | |
464 | - | let | |
453 | + | func bQ (bR) = { | |
454 | + | let bS = valueOrElse(getInteger(M(bR)), 0) | |
455 | + | let bT = if (valueOrElse(getBoolean(P(bR)), false)) | |
465 | 456 | then 3 | |
466 | 457 | else 0 | |
467 | - | (m + fraction(m, bT, | |
458 | + | ((m + fraction(m, bS, 4)) + fraction(m, bT, 20)) | |
468 | 459 | } | |
469 | 460 | ||
470 | 461 | ||
471 | - | func | |
472 | - | let | |
473 | - | let | |
474 | - | let | |
475 | - | if (( | |
476 | - | then throw((( | |
462 | + | func bU (bV) = { | |
463 | + | let V = valueOrErrorMessage(getString(Q(bV)), "You don't have a duck staked") | |
464 | + | let bW = valueOrElse(getString(W(V)), k) | |
465 | + | let bX = split(value(bW), "_") | |
466 | + | if ((bX[ae] != "L")) | |
467 | + | then throw((("Duck location type is " + bX[ae]) + ", but should be L")) | |
477 | 468 | else { | |
478 | - | let bZ = bR(bS) | |
479 | - | let ca = (fraction(bb, bZ, n) * bW) | |
480 | - | al(invoke(this, "claimRes", [ca, bS], nil)) | |
481 | - | } | |
482 | - | } | |
483 | - | ||
484 | - | ||
485 | - | func cb (aF,br,bS) = { | |
486 | - | let cc = toString(br) | |
487 | - | let cd = N(bS) | |
488 | - | let ce = valueOrElse(getInteger(cd), 0) | |
489 | - | if ((ce >= 3)) | |
490 | - | then throw("Currently max infrastructure level = 3") | |
491 | - | else { | |
492 | - | let cf = (ce + 1) | |
493 | - | let cg = value(assetInfo(fromBase58String(bS))) | |
494 | - | if (!(contains(cg.name, i))) | |
495 | - | then throw((("NFT " + i) + " token should be passed as param")) | |
469 | + | let bR = bX[af] | |
470 | + | let bY = value(assetInfo(fromBase58String(bR))) | |
471 | + | let bZ = L(bR) | |
472 | + | let ca = valueOrErrorMessage(getInteger(bZ), (("NFT " + bY.name) + " is not staked")) | |
473 | + | let cb = valueOrErrorMessage(getString(I(bR)), (("NFT " + bY.name) + " is orphaned")) | |
474 | + | if ((cb != bV)) | |
475 | + | then throw((i + " is not yours")) | |
496 | 476 | else { | |
497 | - | let ch = getStringValue(J(bS)) | |
498 | - | if ((ch != cc)) | |
499 | - | then throw((i + " is not yours")) | |
500 | - | else { | |
501 | - | let ci = split(cg.description, "_") | |
502 | - | let I = ci[ab] | |
503 | - | let bW = aU(I) | |
504 | - | let W = valueOrErrorMessage(getString(R(cc)), "You don't have a duck staked") | |
505 | - | let cj = valueOrElse(getString(X(W)), k) | |
506 | - | let ck = split(value(cj), "_") | |
507 | - | if ((ck[af] != "L")) | |
508 | - | then throw((("Duck location type is " + ck[af]) + ", but should be L")) | |
509 | - | else if ((ck[ag] != bS)) | |
510 | - | then throw(((("Duck location id is " + ck[ag]) + ", but should be ") + bS)) | |
511 | - | else { | |
512 | - | let bo = V(W) | |
513 | - | let bF = bn(bo) | |
514 | - | let bG = split(bF[aj], "_") | |
515 | - | let bH = makeString(aE(aF, bG, fraction(q, (bW * cf), 25)), "_") | |
516 | - | let cl = bV(bS, bW) | |
517 | - | $Tuple2([IntegerEntry(cd, cf), IntegerEntry(O(bS, cc), cf), StringEntry(bo, makeString([bF[ah], cl, bH, bF[ak]], ":"))], cf) | |
518 | - | } | |
519 | - | } | |
477 | + | let cc = split(bY.description, "_") | |
478 | + | $Tuple4(V, bR, cc, ca) | |
520 | 479 | } | |
521 | 480 | } | |
522 | 481 | } | |
523 | 482 | ||
524 | 483 | ||
525 | - | @Callable(aR) | |
484 | + | func cd (bV,aW) = { | |
485 | + | let ce = bU(bV) | |
486 | + | let H = ce._3[aa] | |
487 | + | let aM = aR(ce._3[ab]) | |
488 | + | let ba = (lastBlock.timestamp - ce._4) | |
489 | + | if ((0 > ba)) | |
490 | + | then throw(((("Saved timestamp is in future, saved = " + toString(ce._4)) + ", current = ") + toString(lastBlock.timestamp))) | |
491 | + | else { | |
492 | + | let cf = aT(H) | |
493 | + | let cg = bQ(ce._2) | |
494 | + | let ch = fraction(ba, (cg * cf), n) | |
495 | + | if ((aW > ch)) | |
496 | + | then throw(((("Not enough resources, available = " + toString(ch)) + ", requested = ") + toString(aW))) | |
497 | + | else { | |
498 | + | let ci = fraction((ch - aW), n, (cg * cf)) | |
499 | + | let cj = (lastBlock.timestamp - ci) | |
500 | + | let bn = U(ce._1) | |
501 | + | let bE = bm(bn) | |
502 | + | let aZ = split(bE[ah], "_") | |
503 | + | let ck = aY(aZ, aM, (ba - ci), (cf / 25), cg) | |
504 | + | $Tuple3([IntegerEntry(L(ce._2), cj), IntegerEntry(R(i, ce._2, bV), cj)], bn, [bE[ag], ck, bE[ai], bE[aj]]) | |
505 | + | } | |
506 | + | } | |
507 | + | } | |
508 | + | ||
509 | + | ||
510 | + | func cl (bV,bR,cf) = { | |
511 | + | let bZ = L(bR) | |
512 | + | let ca = value(getInteger(bZ)) | |
513 | + | let ch = (fraction((lastBlock.timestamp - ca), bQ(bR), n) * cf) | |
514 | + | cd(bV, ch) | |
515 | + | } | |
516 | + | ||
517 | + | ||
518 | + | func cm (aE,bq,cn) = { | |
519 | + | let bV = toString(bq) | |
520 | + | let ce = bU(bV) | |
521 | + | let cf = aT(ce._3[aa]) | |
522 | + | let co = M(ce._2) | |
523 | + | let cp = valueOrElse(getInteger(co), 0) | |
524 | + | if ((cp >= 3)) | |
525 | + | then throw("Currently max infrastructure level = 3") | |
526 | + | else { | |
527 | + | let cq = (cp + 1) | |
528 | + | let cr = fraction(r, (cf * cq), 25) | |
529 | + | if (if (!(aE)) | |
530 | + | then (cn != cr) | |
531 | + | else false) | |
532 | + | then throw(("Payment attached should be " + toString(cr))) | |
533 | + | else { | |
534 | + | let bn = U(ce._1) | |
535 | + | let bE = bm(bn) | |
536 | + | let bF = split(bE[ai], "_") | |
537 | + | let bG = makeString(aD(aE, bF, fraction(q, (cf * cq), 25)), "_") | |
538 | + | let cs = cl(bV, ce._2, cf) | |
539 | + | $Tuple2(([IntegerEntry(co, cq), IntegerEntry(N(ce._2, bV), cq), StringEntry(bn, makeString([bE[ag], cs._3[ah], bG, bE[aj]], ":"))] ++ cs._1), cq) | |
540 | + | } | |
541 | + | } | |
542 | + | } | |
543 | + | ||
544 | + | ||
545 | + | func ct (bV) = { | |
546 | + | let ce = bU(bV) | |
547 | + | let cu = P(ce._2) | |
548 | + | if (valueOrElse(getBoolean(cu), false)) | |
549 | + | then throw("Presale artifact is already activated") | |
550 | + | else if ((parseIntValue(ce._3[Z]) > 500)) | |
551 | + | then throw((((i + " ") + ce._2) + " is not eligible for presale artifact")) | |
552 | + | else [BooleanEntry(P(ce._2), true)] | |
553 | + | } | |
554 | + | ||
555 | + | ||
556 | + | @Callable(aQ) | |
526 | 557 | func stakeLand () = { | |
527 | - | let | |
528 | - | let | |
529 | - | let | |
530 | - | if (( | |
558 | + | let cv = value(aQ.payments[0]) | |
559 | + | let J = value(cv.assetId) | |
560 | + | let cw = toString(aQ.caller) | |
561 | + | if ((cv.amount != 1)) | |
531 | 562 | then throw((("NFT " + i) + " token should be attached as payment")) | |
532 | 563 | else { | |
533 | - | let | |
534 | - | if (( | |
564 | + | let bY = value(assetInfo(J)) | |
565 | + | if ((bY.issuer != this)) | |
535 | 566 | then throw("Unknown issuer of token") | |
536 | - | else if (!(contains( | |
567 | + | else if (!(contains(bY.name, i))) | |
537 | 568 | then throw((("Only NFT " + i) + " tokens are accepted")) | |
538 | 569 | else { | |
539 | - | let | |
540 | - | let | |
541 | - | then dropRight( | |
542 | - | else if (contains( | |
543 | - | then dropRight( | |
544 | - | else dropRight( | |
545 | - | let | |
546 | - | let | |
547 | - | let | |
548 | - | if (isDefined(getInteger( | |
549 | - | then throw((("NFT " + | |
570 | + | let cx = drop(bY.name, 4) | |
571 | + | let F = if (contains(cx, "XXL")) | |
572 | + | then dropRight(cx, 3) | |
573 | + | else if (contains(cx, "XL")) | |
574 | + | then dropRight(cx, 2) | |
575 | + | else dropRight(cx, 1) | |
576 | + | let cy = valueOrErrorMessage(parseInt(F), ("Cannot parse land number from " + bY.name)) | |
577 | + | let bR = toBase58String(J) | |
578 | + | let bZ = L(bR) | |
579 | + | if (isDefined(getInteger(bZ))) | |
580 | + | then throw((("NFT " + bY.name) + " is already staked")) | |
550 | 581 | else { | |
551 | - | let ci = split(cg.description, "_") | |
552 | - | let aN = aS(ci[ac]) | |
553 | - | let aq = aM(aN, (aU(ci[ab]) / 25), 1) | |
554 | - | let cq = if ((500 >= cp)) | |
555 | - | then (lastBlock.timestamp > u) | |
556 | - | else false | |
557 | - | [IntegerEntry(bX, lastBlock.timestamp), IntegerEntry(S(i, bS, cn), lastBlock.timestamp), StringEntry(J(bS), cn), StringEntry(U(G), cn), StringEntry(Z(), aq)] | |
582 | + | let cc = split(bY.description, "_") | |
583 | + | let aM = aR(cc[ab]) | |
584 | + | let ap = aL(aM, (aT(cc[aa]) / 25), 1) | |
585 | + | [IntegerEntry(bZ, lastBlock.timestamp), IntegerEntry(R(i, bR, cw), lastBlock.timestamp), StringEntry(I(bR), cw), StringEntry(T(F), cw), StringEntry(Y(), ap)] | |
558 | 586 | } | |
559 | 587 | } | |
560 | 588 | } | |
561 | 589 | } | |
562 | 590 | ||
563 | 591 | ||
564 | 592 | ||
565 | - | @Callable( | |
566 | - | func unstakeLand ( | |
593 | + | @Callable(aQ) | |
594 | + | func unstakeLand (cz) = if ((size(aQ.payments) != 0)) | |
567 | 595 | then throw("unstake doesn't require any payments") | |
568 | 596 | else { | |
569 | - | let K = fromBase58String(bS) | |
570 | - | let cn = toString(aR.caller) | |
571 | - | let cg = value(assetInfo(K)) | |
572 | - | if ((cg.issuer != this)) | |
573 | - | then throw("Unknown issuer of token") | |
574 | - | else if (!(contains(cg.name, i))) | |
575 | - | then throw((("Only NFT " + i) + " tokens can be unstaked")) | |
576 | - | else { | |
577 | - | let bX = M(bS) | |
578 | - | if (!(isDefined(bX))) | |
579 | - | then throw((("NFT " + cg.name) + " is not staked")) | |
580 | - | else { | |
581 | - | let ch = valueOrErrorMessage(getString(J(bS)), (("NFT " + cg.name) + " is orphaned")) | |
582 | - | if ((ch != cn)) | |
583 | - | then throw((("Staked " + i) + " is not yours")) | |
584 | - | else { | |
585 | - | let ci = split(cg.description, "_") | |
586 | - | let aN = aS(ci[ac]) | |
587 | - | let bW = aU(ci[ab]) | |
588 | - | let aq = aM(aN, (bW / 25), -1) | |
589 | - | let cl = bV(bS, bW) | |
590 | - | let W = valueOrErrorMessage(getString(R(cn)), (("You can't unstake " + i) + " without a duck staked")) | |
591 | - | let cj = valueOrElse(getString(X(W)), k) | |
592 | - | let ck = split(value(cj), "_") | |
593 | - | if ((ck[af] != "L")) | |
594 | - | then throw((("Duck location type is " + ck[af]) + ", but should be L")) | |
595 | - | else if ((ck[ag] != bS)) | |
596 | - | then throw(((("Duck location id is " + ck[ag]) + ", but should be ") + bS)) | |
597 | - | else { | |
598 | - | let bo = V(W) | |
599 | - | let bF = bn(bo) | |
600 | - | [ScriptTransfer(aR.caller, 1, K), DeleteEntry(bX), DeleteEntry(S(i, bS, cn)), StringEntry(Z(), aq), StringEntry(bo, makeString([bF[ah], cl, bF[aj], bF[ak]], ":"))] | |
601 | - | } | |
602 | - | } | |
603 | - | } | |
604 | - | } | |
597 | + | let bV = toString(aQ.caller) | |
598 | + | let ce = bU(bV) | |
599 | + | let aM = aR(ce._3[ab]) | |
600 | + | let cf = aT(ce._3[aa]) | |
601 | + | let ap = aL(aM, (cf / 25), -1) | |
602 | + | let cs = cl(bV, ce._2, cf) | |
603 | + | [ScriptTransfer(aQ.caller, 1, fromBase58String(ce._2)), DeleteEntry(L(ce._2)), DeleteEntry(R(i, ce._2, bV)), StringEntry(Y(), ap), StringEntry(cs._2, makeString(cs._3, ":"))] | |
605 | 604 | } | |
606 | 605 | ||
607 | 606 | ||
608 | 607 | ||
609 | - | @Callable( | |
608 | + | @Callable(aQ) | |
610 | 609 | func stakeDuck () = { | |
611 | - | let | |
612 | - | let | |
613 | - | let | |
614 | - | if (( | |
610 | + | let cv = value(aQ.payments[0]) | |
611 | + | let J = value(cv.assetId) | |
612 | + | let cw = toString(aQ.caller) | |
613 | + | if ((cv.amount != 1)) | |
615 | 614 | then throw((("NFT " + j) + " token should be attached as payment")) | |
616 | 615 | else { | |
617 | - | let | |
618 | - | if (if (( | |
619 | - | then ( | |
616 | + | let bY = value(assetInfo(J)) | |
617 | + | if (if ((bY.issuer != d)) | |
618 | + | then (bY.issuer != e) | |
620 | 619 | else false) | |
621 | 620 | then throw((("Unknown issuer of " + j) + " token")) | |
622 | - | else if (!(contains( | |
621 | + | else if (!(contains(bY.name, j))) | |
623 | 622 | then throw((("Only NFT " + j) + " tokens are accepted")) | |
624 | 623 | else { | |
625 | - | let | |
626 | - | let | |
627 | - | if (isDefined(getInteger( | |
628 | - | then throw((("NFT " + | |
629 | - | else if (isDefined(getString( | |
630 | - | then throw(("You already staked one duck: " + | |
624 | + | let cA = toBase58String(J) | |
625 | + | let bZ = L(cA) | |
626 | + | if (isDefined(getInteger(bZ))) | |
627 | + | then throw((("NFT " + bY.name) + " is already staked")) | |
628 | + | else if (isDefined(getString(Q(cw)))) | |
629 | + | then throw(("You already staked one duck: " + bY.name)) | |
631 | 630 | else { | |
632 | - | let | |
633 | - | let | |
634 | - | let | |
635 | - | let | |
636 | - | let | |
637 | - | let | |
638 | - | ([IntegerEntry( | |
631 | + | let cB = W(cA) | |
632 | + | let cC = getString(cB) | |
633 | + | let bC = X(cA) | |
634 | + | let cD = getInteger(bC) | |
635 | + | let bn = U(cA) | |
636 | + | let cE = getString(bn) | |
637 | + | ([IntegerEntry(bZ, lastBlock.timestamp), IntegerEntry(R(j, toBase58String(J), cw), lastBlock.timestamp), StringEntry(K(cA), cw), StringEntry(Q(cw), cA)] ++ (if (isDefined(cC)) | |
639 | 638 | then nil | |
640 | - | else ([StringEntry( | |
639 | + | else ([StringEntry(cB, k)] ++ (if (isDefined(cD)) | |
641 | 640 | then nil | |
642 | - | else ([IntegerEntry( | |
641 | + | else ([IntegerEntry(bC, 100)] ++ (if (isDefined(cE)) | |
643 | 642 | then nil | |
644 | - | else [StringEntry( | |
643 | + | else [StringEntry(bn, "0:0_0_0_0_0_0:0_0_0_0_0_0:")])))))) | |
645 | 644 | } | |
646 | 645 | } | |
647 | 646 | } | |
648 | 647 | } | |
649 | 648 | ||
650 | 649 | ||
651 | 650 | ||
652 | - | @Callable( | |
653 | - | func unstakeDuck ( | |
651 | + | @Callable(aQ) | |
652 | + | func unstakeDuck (cA) = if ((size(aQ.payments) != 0)) | |
654 | 653 | then throw("unstake doesn't require any payments") | |
655 | 654 | else { | |
656 | - | let | |
657 | - | let | |
658 | - | let | |
659 | - | if (if (( | |
660 | - | then ( | |
655 | + | let J = fromBase58String(cA) | |
656 | + | let cw = toString(aQ.caller) | |
657 | + | let bY = value(assetInfo(J)) | |
658 | + | if (if ((bY.issuer != d)) | |
659 | + | then (bY.issuer != e) | |
661 | 660 | else false) | |
662 | 661 | then throw((("Unknown issuer of " + j) + " token")) | |
663 | - | else if (!(contains( | |
662 | + | else if (!(contains(bY.name, j))) | |
664 | 663 | then throw((("Only NFT " + j) + " tokens can be unstaked")) | |
665 | 664 | else { | |
666 | - | let | |
667 | - | if (!(isDefined( | |
668 | - | then throw((("NFT " + | |
669 | - | else if (!(isDefined( | |
670 | - | then throw((("The duck " + | |
665 | + | let bZ = L(toBase58String(J)) | |
666 | + | if (!(isDefined(bZ))) | |
667 | + | then throw((("NFT " + bY.name) + " is not staked")) | |
668 | + | else if (!(isDefined(Q(cw)))) | |
669 | + | then throw((("The duck " + bY.name) + " is not staked")) | |
671 | 670 | else { | |
672 | - | let | |
673 | - | if (( | |
671 | + | let cb = valueOrErrorMessage(getString(K(toBase58String(J))), (("NFT " + bY.name) + " is orphaned")) | |
672 | + | if ((cb != cw)) | |
674 | 673 | then throw("Staked NFT is not yours") | |
675 | - | else [ScriptTransfer( | |
674 | + | else [ScriptTransfer(aQ.caller, 1, J), DeleteEntry(bZ), DeleteEntry(W(cA)), DeleteEntry(K(cA)), DeleteEntry(R(j, cA, cw)), DeleteEntry(Q(cw))] | |
676 | 675 | } | |
677 | 676 | } | |
678 | 677 | } | |
679 | 678 | ||
680 | 679 | ||
681 | 680 | ||
682 | - | @Callable( | |
683 | - | func claimRes ( | |
681 | + | @Callable(aQ) | |
682 | + | func claimRes (aW,cz) = if ((size(aQ.payments) != 0)) | |
684 | 683 | then throw("claimRes doesn't require any payments") | |
685 | 684 | else { | |
686 | - | let cc = toString(aR.originCaller) | |
687 | - | let cg = value(assetInfo(fromBase58String(bS))) | |
688 | - | if (!(contains(cg.name, i))) | |
689 | - | then throw((("NFT " + i) + " token should be passed as param")) | |
690 | - | else { | |
691 | - | let bX = M(bS) | |
692 | - | let ch = getStringValue(J(bS)) | |
693 | - | if ((ch != cc)) | |
694 | - | then throw((i + " is not yours")) | |
695 | - | else { | |
696 | - | let ci = split(cg.description, "_") | |
697 | - | let I = ci[ab] | |
698 | - | let aN = aS(ci[ac]) | |
699 | - | let W = valueOrErrorMessage(getString(R(cc)), "You don't have a duck staked") | |
700 | - | let cj = valueOrElse(getString(X(W)), k) | |
701 | - | let ck = split(value(cj), "_") | |
702 | - | if ((ck[af] != "L")) | |
703 | - | then throw((("Duck location type is " + ck[af]) + ", but should be L")) | |
704 | - | else if ((ck[ag] != bS)) | |
705 | - | then throw(((("Duck location id is " + ck[ag]) + ", but should be ") + bS)) | |
706 | - | else { | |
707 | - | let bY = valueOrErrorMessage(getInteger(bX), (("NFT " + cg.name) + " is not staked")) | |
708 | - | let bb = (lastBlock.timestamp - bY) | |
709 | - | if ((0 > bb)) | |
710 | - | then throw(((("Saved timestamp is in future, saved = " + toString(bY)) + ", current = ") + toString(lastBlock.timestamp))) | |
711 | - | else { | |
712 | - | let bW = aU(I) | |
713 | - | let bZ = bR(bS) | |
714 | - | let ca = fraction(bb, (bZ * bW), n) | |
715 | - | if ((aX > ca)) | |
716 | - | then throw(((("Not enough resources, available = " + toString(ca)) + ", requested = ") + toString(aX))) | |
717 | - | else { | |
718 | - | let cw = fraction((ca - aX), n, (bZ * bW)) | |
719 | - | let cx = (lastBlock.timestamp - cw) | |
720 | - | let bo = V(W) | |
721 | - | let bF = bn(bo) | |
722 | - | let ba = split(bF[ai], "_") | |
723 | - | let cy = aZ(ba, aN, (bb - cw), (bW / 25), bZ) | |
724 | - | let cz = makeString([bF[ah], cy, bF[aj], bF[ak]], ":") | |
725 | - | $Tuple2([StringEntry(bo, cz), IntegerEntry(bX, cx), IntegerEntry(S(i, bS, ch), cx)], cy) | |
726 | - | } | |
727 | - | } | |
728 | - | } | |
729 | - | } | |
730 | - | } | |
685 | + | let bV = toString(aQ.originCaller) | |
686 | + | let aK = cd(bV, aW) | |
687 | + | $Tuple2((aK._1 :+ StringEntry(aK._2, makeString(aK._3, ":"))), aK._3[ah]) | |
731 | 688 | } | |
732 | 689 | ||
733 | 690 | ||
734 | 691 | ||
735 | - | @Callable( | |
736 | - | func flight (bt | |
692 | + | @Callable(aQ) | |
693 | + | func flight (bs,bt) = if (!(sigVerify_8Kb(bs, bt, g))) | |
737 | 694 | then throw("signature does not match") | |
738 | - | else if ((size( | |
695 | + | else if ((size(aQ.payments) != 0)) | |
739 | 696 | then throw("flight doesn't require any payments") | |
740 | 697 | else { | |
741 | - | let | |
742 | - | let | |
743 | - | let | |
744 | - | let | |
745 | - | let | |
746 | - | let | |
747 | - | let | |
748 | - | if (if (( | |
698 | + | let bu = split(toUtf8String(bs), ";") | |
699 | + | let bv = split(split(bu[0], "|")[0], "_") | |
700 | + | let bw = parseIntValue(bv[0]) | |
701 | + | let bx = parseIntValue(bv[1]) | |
702 | + | let cF = split(bu[1], ":") | |
703 | + | let cG = cF[0] | |
704 | + | let bA = parseIntValue(cF[1]) | |
705 | + | if (if ((bA > (lastBlock.timestamp + o))) | |
749 | 706 | then true | |
750 | - | else ((lastBlock.timestamp - o) > | |
707 | + | else ((lastBlock.timestamp - o) > bA)) | |
751 | 708 | then throw("signature outdated") | |
752 | 709 | else { | |
753 | - | let | |
754 | - | let | |
755 | - | let | |
756 | - | if (( | |
757 | - | then throw(((("oldHealth=" + toString(valueOrElse(getInteger( | |
758 | - | else if ((0 >= | |
710 | + | let V = valueOrErrorMessage(getString(Q(toString(aQ.caller))), "You don't have a duck staked") | |
711 | + | let bC = X(V) | |
712 | + | let bD = valueOrElse(getInteger(bC), 100) | |
713 | + | if ((bD != bw)) | |
714 | + | then throw(((("oldHealth=" + toString(valueOrElse(getInteger(bC), 100))) + " from state does not match one from flight log=") + toString(bw))) | |
715 | + | else if ((0 >= bw)) | |
759 | 716 | then throw("You can't fly with zero health") | |
760 | 717 | else { | |
761 | - | let | |
762 | - | let | |
763 | - | if (( | |
718 | + | let cB = W(V) | |
719 | + | let bW = valueOrElse(getString(cB), k) | |
720 | + | if ((cG == bW)) | |
764 | 721 | then throw("You can't fly to the same location") | |
765 | - | else $Tuple2([StringEntry( | |
766 | - | then | |
767 | - | else | |
722 | + | else $Tuple2([StringEntry(cB, if ((bx > 0)) | |
723 | + | then cG | |
724 | + | else bW), IntegerEntry(bC, bx)], unit) | |
768 | 725 | } | |
769 | 726 | } | |
770 | 727 | } | |
771 | 728 | ||
772 | 729 | ||
773 | 730 | ||
774 | - | @Callable( | |
775 | - | func setHealth ( | |
731 | + | @Callable(aQ) | |
732 | + | func setHealth (cD,V) = if (if ((0 > cD)) | |
776 | 733 | then true | |
777 | - | else ( | |
734 | + | else (cD > 100)) | |
778 | 735 | then throw("HP should be within 0..100") | |
779 | - | else [IntegerEntry( | |
736 | + | else [IntegerEntry(X(V), cD)] | |
780 | 737 | ||
781 | 738 | ||
782 | 739 | ||
783 | - | @Callable( | |
784 | - | func heal ( | |
740 | + | @Callable(aQ) | |
741 | + | func heal (cH,aW) = if (if ((0 > cH)) | |
785 | 742 | then true | |
786 | - | else ( | |
787 | - | then throw(("Unknown material: " + toString( | |
788 | - | else if ((0 >= | |
789 | - | then throw(("Amount should be positive! " + toString( | |
743 | + | else (cH >= l)) | |
744 | + | then throw(("Unknown material: " + toString(cH))) | |
745 | + | else if ((0 >= aW)) | |
746 | + | then throw(("Amount should be positive! " + toString(aW))) | |
790 | 747 | else { | |
791 | - | let | |
792 | - | let | |
793 | - | let | |
794 | - | if (( | |
748 | + | let V = valueOrErrorMessage(getString(Q(toString(aQ.caller))), "You don't have a duck staked") | |
749 | + | let bC = X(V) | |
750 | + | let cI = valueOrElse(getInteger(bC), 100) | |
751 | + | if ((cI >= 100)) | |
795 | 752 | then throw("HP should be < 100 to heal") | |
796 | 753 | else { | |
797 | - | let | |
798 | - | let | |
799 | - | let | |
800 | - | let | |
801 | - | let | |
802 | - | let | |
803 | - | if (( | |
804 | - | then throw(((((("You need " + toString( | |
754 | + | let bn = U(V) | |
755 | + | let bE = bm(bn) | |
756 | + | let bF = split(bE[ai], "_") | |
757 | + | let cJ = parseIntValue(bF[cH]) | |
758 | + | let cK = min([(aW / h), (100 - cI)]) | |
759 | + | let cL = (cK * h) | |
760 | + | if ((cL > cJ)) | |
761 | + | then throw(((((("You need " + toString(cL)) + " of ") + B[cH]) + " to heal, but you backpack contains ") + toString(cJ))) | |
805 | 762 | else { | |
806 | - | let | |
807 | - | [IntegerEntry( | |
763 | + | let bG = aU(bF, cH, cL) | |
764 | + | [IntegerEntry(bC, (cI + cK)), StringEntry(bn, makeString([bE[ag], bE[ah], bG, bE[aj]], ":"))] | |
808 | 765 | } | |
809 | 766 | } | |
810 | 767 | } | |
811 | 768 | ||
812 | 769 | ||
813 | 770 | ||
814 | - | @Callable( | |
815 | - | func updateBackpack ( | |
771 | + | @Callable(aQ) | |
772 | + | func updateBackpack (V,cM) = if ((aQ.caller != f)) | |
816 | 773 | then throw("permission denied") | |
817 | - | else $Tuple2([StringEntry(V | |
774 | + | else $Tuple2([StringEntry(U(V), cM)], cM) | |
818 | 775 | ||
819 | 776 | ||
820 | 777 | ||
821 | - | @Callable( | |
822 | - | func expeditionBuy (bt | |
778 | + | @Callable(aQ) | |
779 | + | func expeditionBuy (bs,bt) = if ((size(aQ.payments) != 1)) | |
823 | 780 | then throw("Exactly one payment required") | |
824 | 781 | else { | |
825 | - | let | |
826 | - | if (( | |
782 | + | let cv = value(aQ.payments[0]) | |
783 | + | if ((cv.assetId != b)) | |
827 | 784 | then throw("Allowed USDN payment only!") | |
828 | - | else if (( | |
785 | + | else if ((cv.amount != t)) | |
829 | 786 | then throw(("Payment attached should be " + toString(t))) | |
830 | - | else | |
787 | + | else bp(false, aQ.caller, aQ.transactionId, bs, bt) | |
831 | 788 | } | |
832 | 789 | ||
833 | 790 | ||
834 | 791 | ||
835 | - | @Callable( | |
836 | - | func expedition (bt | |
792 | + | @Callable(aQ) | |
793 | + | func expedition (bs,bt) = if ((size(aQ.payments) != 0)) | |
837 | 794 | then throw("expedition doesn't require any payments") | |
838 | - | else | |
795 | + | else bp(true, aQ.caller, aQ.transactionId, bs, bt) | |
839 | 796 | ||
840 | 797 | ||
841 | 798 | ||
842 | - | @Callable( | |
843 | - | func upgradeInfra ( | |
799 | + | @Callable(aQ) | |
800 | + | func upgradeInfra (cN) = if ((size(aQ.payments) != 0)) | |
844 | 801 | then throw("Infrastructure upgrade doesn't require any payments") | |
845 | - | else | |
802 | + | else cm(true, aQ.caller, 0) | |
846 | 803 | ||
847 | 804 | ||
848 | 805 | ||
849 | - | @Callable( | |
850 | - | func upgradeInfraUsdn ( | |
806 | + | @Callable(aQ) | |
807 | + | func upgradeInfraUsdn (cN) = if ((size(aQ.payments) != 1)) | |
851 | 808 | then throw("Exactly one payment required") | |
852 | 809 | else { | |
853 | - | let | |
854 | - | if (( | |
810 | + | let cv = value(aQ.payments[0]) | |
811 | + | if ((cv.assetId != b)) | |
855 | 812 | then throw("Allowed USDN payment only!") | |
856 | - | else { | |
857 | - | let cf = (valueOrElse(getInteger(N(bS)), 0) + 1) | |
858 | - | let cg = value(assetInfo(fromBase58String(bS))) | |
859 | - | let ci = split(cg.description, "_") | |
860 | - | let cH = fraction(r, (aU(ci[ab]) * cf), 25) | |
861 | - | if ((cm.amount != cH)) | |
862 | - | then throw(("Payment attached should be " + toString(cH))) | |
863 | - | else cb(false, aR.caller, bS) | |
864 | - | } | |
813 | + | else cm(false, aQ.caller, cv.amount) | |
814 | + | } | |
815 | + | ||
816 | + | ||
817 | + | ||
818 | + | @Callable(aQ) | |
819 | + | func activateArtifact (cO) = if ((size(aQ.payments) != 0)) | |
820 | + | then throw("Artifact activation doesn't require any payments") | |
821 | + | else { | |
822 | + | let aK = { | |
823 | + | let c = cO | |
824 | + | if (("PRESALE" == c)) | |
825 | + | then ct(toString(aQ.caller)) | |
826 | + | else throw("Unknown artifact") | |
827 | + | } | |
828 | + | aK | |
865 | 829 | } | |
866 | 830 | ||
867 | 831 |
github/deemru/w8io/026f985 282.57 ms ◑