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