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/eDymXbbhPuAjvPWCmVqcHRjfJL2mzYHWKAyN4JAAIBAg1Vbmtub3duIGNoYWluAA1pbmN1YmF0b3JBZGRyBAckbWF0Y2gwBQVjaGFpbgMJAAACAgFXBQckbWF0Y2gwCQERQGV4dHJOYXRpdmUoMTA2MikBAiMzUEVrdFZ1eDJSaGNoU042M0RzRG80YjRtejRRcXpLU2VEdgMJAAACAgFUBQckbWF0Y2gwBQR0aGlzCQACAQINVW5rbm93biBjaGFpbgALYnJlZWRlckFkZHIEByRtYXRjaDAFBWNoYWluAwkAAAICAVcFByRtYXRjaDAJARFAZXh0ck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F5bWVudHMJAQ11cEluZnJhQ29tbW9uAwYIBQFpBmNhbGxlcgULbGFuZEFzc2V0SWQBaQEQdXBncmFkZUluZnJhVXNkbgELbGFuZEFzc2V0SWQDCQECIT0CCQCQAwEIBQFpCHBheW1lbnRzAAEJAAIBAhxFeGFjdGx5IG9uZSBwYXltZW50IHJlcXVpcmVkBANwbXQJAQV2YWx1ZQEJAJEDAggFAWkIcGF5bWVudHMAAAMJAQIhPQIIBQNwbXQHYXNzZXRJZAULdXNkbkFzc2V0SWQJAAIBAhpBbGxvd2VkIFVTRE4gcGF5bWVudCBvbmx5IQQIbmV3TGV2ZWwJAGQCCQELdmFsdWVPckVsc2UCCQCfCAEJARZrZXlJbmZyYUxldmVsQnlBc3NldElkAQULbGFuZEFzc2V0SWQAAAABBAVhc3NldAkBBXZhbHVlAQkA7AcBCQDZBAEFC2xhbmRBc3NldElkBAFkCQC1CQIIBQVhc3NldAtkZXNjcmlwdGlvbgIBXwQEY29zdAkAawMFFUluZnJhVXBncmFkZUNvc3RTVXNkbgkAaAIJAQ9udW1QaWVjZXNCeVNpemUBCQCRAwIFAWQFC3JlY0xhbmRTaXplBQhuZXdMZXZlbAAZAwkBAiE9AggFA3BtdAZhbW91bnQFBGNvc3QJAAIBCQCsAgICG1BheW1lbnQgYXR0YWNoZWQgc2hvdWxkIGJlIAkApAMBBQRjb3N0CQENdXBJbmZyYUNvbW1vbgMHCAUBaQZjYWxsZXIFC2xhbmRBc3NldElkAP5yLgo=", "height": 2392231, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AcVVsBoj3WReYh1Y9Sx18LhYGwSeu28Pud4tdCcg5fbA Next: Co5a3aRFimWPciBA5gBEqF9P9fbhnNUF93MbCW77BodK Diff:
OldNewDifferences
143143 func N (K) = ("infraLevel_" + K)
144144
145145
146-func O (K) = ("presaleArtActivated_" + K)
146+func O (K,P) = ((("infraLevelByAssetIdAndOwner_" + K) + "_") + P)
147147
148148
149-func P (Q) = ("stakedDuckByOwner_" + Q)
149+func Q (K) = ("presaleArtActivated_" + K)
150150
151151
152-func R (S,K,Q) = ((((("stakedTimeByTypeAssetIdAndOwner_" + S) + "_") + K) + "_") + Q)
152+func R (P) = ("stakedDuckByOwner_" + P)
153153
154154
155-func T (G) = ("landOwner_" + G)
155+func S (T,K,P) = ((((("stakedTimeByTypeAssetIdAndOwner_" + T) + "_") + K) + "_") + P)
156156
157157
158-func U (V) = ("backPack_" + V)
158+func U (G) = ("landOwner_" + G)
159159
160160
161-func W (V) = ("duckLocation_" + V)
161+func V (W) = ("backPack_" + W)
162162
163163
164-func X (V) = ("duckHealth_" + V)
164+func X (W) = ("duckLocation_" + W)
165165
166166
167-func Y () = "resTypesProportions"
167+func Y (W) = ("duckHealth_" + W)
168168
169169
170-let Z = 0
170+func Z () = "resTypesProportions"
171171
172-let aa = 1
173172
174-let ab = 2
173+let aa = 0
175174
176-let ac = 3
175+let ab = 1
177176
178-let ad = 0
177+let ac = 2
179178
180-let ae = 1
179+let ad = 3
181180
182-let af = 2
181+let ae = 0
183182
184-let ag = 0
183+let af = 1
185184
186-let ah = 1
185+let ag = 2
187186
188-let ai = 2
187+let ah = 0
189188
190-let aj = 3
189+let ai = 1
191190
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
194197 if ($isInstanceOf(c, "String"))
195198 then {
196- let am = c
197- am
199+ let an = c
200+ an
198201 }
199202 else throw("fail to cast into String")
200203 }
201204
202205
203-func an (ao) = {
204- let ap = split(value(getString(Y())), "_")
205- if ((size(ap) != l))
206+func ao (ap) = {
207+ let aq = split(value(getString(Z())), "_")
208+ if ((size(aq) != l))
206209 then throw("Wrong proportions data")
207210 else {
208- let aq = [parseIntValue(ap[0]), parseIntValue(ap[1]), parseIntValue(ap[2]), parseIntValue(ap[3]), parseIntValue(ap[4]), parseIntValue(ap[5])]
209- let ar = (((((aq[0] + aq[1]) + aq[2]) + aq[3]) + aq[4]) + aq[5])
210- if ((0 >= ar))
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))
211214 then throw("No lands staked")
212215 else {
213- let as = fraction(ao, v, ar)
214- func at (au,av) = (au :+ fraction(av, as, v))
216+ let at = fraction(ap, v, as)
217+ func au (av,aw) = (av :+ fraction(aw, at, v))
215218
216- let aw = aq
217- let ax = size(aw)
218- let ay = nil
219- func az (aA,aB) = if ((aB >= ax))
220- then aA
221- else at(aA, aw[aB])
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])
222225
223- func aC (aA,aB) = if ((aB >= ax))
224- then aA
226+ func aD (aB,aC) = if ((aC >= ay))
227+ then aB
225228 else throw("List size exceeds 6")
226229
227- aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6)
230+ aD(aA(aA(aA(aA(aA(aA(az, 0), 1), 2), 3), 4), 5), 6)
228231 }
229232 }
230233 }
231234
232235
233-func aD (aE,aF,aG) = {
234- let aH = an(aG)
235- func aI (au,aJ) = {
236- let aK = (parseIntValue(aF[aJ]) - aH[aJ])
237- if ((0 > aK))
238- then throw(((((("Not enough material idx=" + toString(aJ)) + ", you have ") + aF[aJ]) + ", but need ") + toString(aH[aJ])))
239- else (au :+ toString(aK))
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))
240243 }
241244
242- if (aE)
245+ if (aF)
243246 then {
244- let aw = [0, 1, 2, 3, 4, 5]
245- let ax = size(aw)
246- let ay = nil
247- func az (aA,aB) = if ((aB >= ax))
248- then aA
249- else aI(aA, aw[aB])
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])
250253
251- func aC (aA,aB) = if ((aB >= ax))
252- then aA
254+ func aD (aB,aC) = if ((aC >= ay))
255+ then aB
253256 else throw("List size exceeds 6")
254257
255- aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6)
258+ aD(aA(aA(aA(aA(aA(aA(az, 0), 1), 2), 3), 4), 5), 6)
256259 }
257- else aF
260+ else aG
258261 }
259262
260263
261-func aL (aM,aN,aO) = {
262- let ap = split(valueOrElse(getString(Y()), "0_0_0_0_0_0"), "_")
263- if ((size(ap) != l))
264+func aM (aN,aO,aP) = {
265+ let aq = split(valueOrElse(getString(Z()), "0_0_0_0_0_0"), "_")
266+ if ((size(aq) != l))
264267 then throw("Wrong proportions data")
265268 else {
266- func aP (au,aQ) = {
267- let aK = (parseIntValue(ap[aQ]) + ((aO * aM[aQ]) * aN))
268- if ((0 > aK))
269- then throw(((((((("Panic! Pieces of type=" + toString(aQ)) + ", sign=") + toString(aO)) + ", terrainCounts[i]=") + toString(aM[aQ])) + ", landSizeIndex=") + toString(aN)))
270- else (au :+ toString(aK))
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))
271274 }
272275
273- let aq = {
274- let aw = [0, 1, 2, 3, 4, 5]
275- let ax = size(aw)
276- let ay = nil
277- func az (aA,aB) = if ((aB >= ax))
278- then aA
279- else aP(aA, aw[aB])
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])
280283
281- func aC (aA,aB) = if ((aB >= ax))
282- then aA
284+ func aD (aB,aC) = if ((aC >= ay))
285+ then aB
283286 else throw("List size exceeds 6")
284287
285- aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6)
288+ aD(aA(aA(aA(aA(aA(aA(az, 0), 1), 2), 3), 4), 5), 6)
286289 }
287- makeString(aq, "_")
290+ makeString(ar, "_")
288291 }
289292 }
290293
291294
292-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)]
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)]
293296
294297
295-func aT (I) = {
298+func aU (I) = {
296299 let c = I
297300 if (("S" == c))
298301 then 25
308311 }
309312
310313
311-func aU (aV,aJ,aW) = {
312- func aX (au,aQ) = (au :+ (if ((aQ == aJ))
313- then toString((parseIntValue(aV[aQ]) - aW))
314- else aV[aQ]))
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]))
315318
316- let aq = {
317- let aw = [0, 1, 2, 3, 4, 5]
318- let ax = size(aw)
319- let ay = nil
320- func az (aA,aB) = if ((aB >= ax))
321- then aA
322- else aX(aA, aw[aB])
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])
323326
324- func aC (aA,aB) = if ((aB >= ax))
325- then aA
327+ func aD (aB,aC) = if ((aC >= ay))
328+ then aB
326329 else throw("List size exceeds 6")
327330
328- aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6)
331+ aD(aA(aA(aA(aA(aA(aA(az, 0), 1), 2), 3), 4), 5), 6)
329332 }
330- makeString(aq, "_")
333+ makeString(ar, "_")
331334 }
332335
333336
334-func aY (aZ,aM,ba,aN,bb) = {
335- func bc (au,aQ) = {
336- let bd = ((fraction(ba, bb, n) * aM[aQ]) * aN)
337- (au :+ toString((parseIntValue(aZ[aQ]) + bd)))
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)))
338341 }
339342
340- let aq = {
341- let aw = [0, 1, 2, 3, 4, 5]
342- let ax = size(aw)
343- let ay = nil
344- func az (aA,aB) = if ((aB >= ax))
345- then aA
346- else bc(aA, aw[aB])
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])
347350
348- func aC (aA,aB) = if ((aB >= ax))
349- then aA
351+ func aD (aB,aC) = if ((aC >= ay))
352+ then aB
350353 else throw("List size exceeds 6")
351354
352- aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6)
355+ aD(aA(aA(aA(aA(aA(aA(az, 0), 1), 2), 3), 4), 5), 6)
353356 }
354- makeString(aq, "_")
357+ makeString(ar, "_")
355358 }
356359
357360
358-func be (bf) = if ((bf >= toBigInt(0)))
359- then bf
360- else -(bf)
361+func bf (bg) = if ((bg >= toBigInt(0)))
362+ then bg
363+ else -(bg)
361364
362365
363-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]]
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]]
364367
365-func bh (bi,bj) = {
366- let bk = toInt((bi % x))
367- let bl = if ((bj[0] > bk))
368+func bi (bj,bk) = {
369+ let bl = toInt((bj % x))
370+ let bm = if ((bk[0] > bl))
368371 then "A"
369- else if ((bj[1] > bk))
372+ else if ((bk[1] > bl))
370373 then "B"
371- else if ((bj[2] > bk))
374+ else if ((bk[2] > bl))
372375 then "C"
373- else if ((bj[3] > bk))
376+ else if ((bk[3] > bl))
374377 then "D"
375- else if ((bj[4] > bk))
378+ else if ((bk[4] > bl))
376379 then "E"
377380 else "F"
378- bl
381+ bm
379382 }
380383
381384
382-func bm (bn) = {
383- let bo = split(valueOrElse(getString(bn), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":")
384-[toString(valueOrElse(parseInt(bo[ag]), 0)), if ((size(split(bo[ah], "_")) == l))
385- then bo[ah]
386- else "0_0_0_0_0_0", if ((size(split(bo[ai], "_")) == l))
387- then bo[ai]
388- else "0_0_0_0_0_0", bo[aj]]
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]]
389392 }
390393
391394
392-func bp (aE,bq,br,bs,bt) = if (!(sigVerify_8Kb(bs, bt, g)))
395+func bq (aF,br,bs,bt,bu) = if (!(sigVerify_8Kb(bt, bu, g)))
393396 then throw("signature does not match")
394397 else {
395- let bu = split(toUtf8String(bs), ";")
396- let bv = split(split(bu[0], "|")[0], "_")
397- let bw = parseIntValue(bv[0])
398- let bx = parseIntValue(bv[1])
399- let by = split(bu[1], ":")
400- let bz = split(by[0], "_")
401- if ((bz[1] != "E"))
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"))
402405 then throw("expedition target location type should be E")
403406 else {
404- let bA = parseIntValue(by[1])
405- if (if ((bA > (lastBlock.timestamp + o)))
407+ let bB = parseIntValue(bz[1])
408+ if (if ((bB > (lastBlock.timestamp + o)))
406409 then true
407- else ((lastBlock.timestamp - o) > bA))
410+ else ((lastBlock.timestamp - o) > bB))
408411 then throw("signature outdated")
409412 else {
410- let bB = toString(bq)
411- let V = valueOrErrorMessage(getString(P(bB)), "You don't have a duck staked")
412- let bC = X(V)
413- let bD = valueOrElse(getInteger(bC), 100)
414- if ((bD != bw))
415- then throw(((("oldHealth=" + toString(valueOrElse(getInteger(bC), 100))) + " from state does not match one from flight log=") + toString(bw)))
416- else if ((0 >= bw))
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))
417420 then throw("You can't fly with zero health")
418- else if ((0 >= bx))
419- then $Tuple2(((if (!(aE))
420- then [ScriptTransfer(bq, t, b)]
421- else nil) :+ IntegerEntry(bC, 0)), "")
421+ else if ((0 >= by))
422+ then $Tuple2(((if (!(aF))
423+ then [ScriptTransfer(br, t, b)]
424+ else nil) :+ IntegerEntry(bD, 0)), "")
422425 else {
423- let bn = U(V)
424- let bE = bm(bn)
425- let bF = split(bE[ai], "_")
426- let bG = makeString(aD(aE, bF, s), "_")
427- let bH = be(toBigInt(br))
428- let bI = valueOrElse(getInteger(E()), 501)
429- let G = toString(bI)
430- let bJ = toInt((bH % w))
431- let bK = bg[bJ]
432- func bL (au,av) = $Tuple2((((((au._1 + bh(au._2, bK)) + bh((au._2 / x), bK)) + bh((au._2 / y), bK)) + bh((au._2 / z), bK)) + bh((au._2 / A), bK)), (au._2 / B))
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))
433436
434- let bM = {
435- let aw = [1, 2, 3, 4, 5]
436- let ax = size(aw)
437- let ay = $Tuple2("", (bH / w))
438- func az (aA,aB) = if ((aB >= ax))
439- then aA
440- else bL(aA, aw[aB])
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])
441444
442- func aC (aA,aB) = if ((aB >= ax))
443- then aA
445+ func aD (aB,aC) = if ((aC >= ay))
446+ then aB
444447 else throw("List size exceeds 5")
445448
446- aC(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5)
449+ aD(aA(aA(aA(aA(aA(az, 0), 1), 2), 3), 4), 5)
447450 }
448- let bN = D[bJ]
449- let bO = Issue(H(G, "S"), makeString([G, "S", bM._1, bN], "_"), 1, 0, false)
450- let K = calculateAssetId(bO)
451- let bP = toBase58String(K)
452- $Tuple2([IntegerEntry(E(), (bI + 1)), bO, StringEntry(F(G), bP), StringEntry(J(bP), bB), StringEntry(T(G), bB), IntegerEntry(N(bP), 0), ScriptTransfer(bq, 1, K), StringEntry(W(V), makeString([bN, "L", bP], "_")), IntegerEntry(bC, bx), StringEntry(bn, makeString([bE[ag], bE[ah], bG, bE[aj]], ":"))], bP)
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)
453456 }
454457 }
455458 }
456459 }
457460
458461
459-func bQ (bR) = {
460- let bS = valueOrElse(getInteger(N(bR)), 0)
461- let bT = if (valueOrElse(getBoolean(O(bR)), false))
462+func bR (bS) = {
463+ let bT = valueOrElse(getInteger(N(bS)), 0)
464+ let bU = if (valueOrElse(getBoolean(Q(bS)), false))
462465 then 3
463466 else 0
464- (m + fraction(m, bS, 4))
467+ (m + fraction(m, bT, 4))
465468 }
466469
467470
468-func bU (bR,bV) = {
469- let bW = M(bR)
470- let bX = valueOrErrorMessage(getInteger(bW), (((i + " ") + bR) + " is not staked"))
471- let ba = (lastBlock.timestamp - bX)
472- if ((0 > ba))
473- then throw(((("Saved timestamp is in future, saved = " + toString(bX)) + ", current = ") + toString(lastBlock.timestamp)))
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)))
474477 else {
475- let bY = bQ(bR)
476- let bZ = (fraction(ba, bY, n) * bV)
477- ak(invoke(this, "claimRes", [bZ, bR], nil))
478+ let bZ = bR(bS)
479+ let ca = (fraction(bb, bZ, n) * bW)
480+ al(invoke(this, "claimRes", [ca, bS], nil))
478481 }
479482 }
480483
481484
482-func ca (aE,bq,bR) = {
483- let cb = toString(bq)
484- let cc = N(bR)
485- let cd = valueOrElse(getInteger(cc), 0)
486- if ((cd >= 3))
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))
487490 then throw("Currently max infrastructure level = 3")
488491 else {
489- let ce = (cd + 1)
490- let cf = value(assetInfo(fromBase58String(bR)))
491- if (!(contains(cf.name, i)))
492+ let cf = (ce + 1)
493+ let cg = value(assetInfo(fromBase58String(bS)))
494+ if (!(contains(cg.name, i)))
492495 then throw((("NFT " + i) + " token should be passed as param"))
493496 else {
494- let cg = getStringValue(J(bR))
495- if ((cg != cb))
497+ let ch = getStringValue(J(bS))
498+ if ((ch != cc))
496499 then throw((i + " is not yours"))
497500 else {
498- let ch = split(cf.description, "_")
499- let I = ch[aa]
500- let bV = aT(I)
501- let V = valueOrErrorMessage(getString(P(cb)), "You don't have a duck staked")
502- let ci = valueOrElse(getString(W(V)), k)
503- let cj = split(value(ci), "_")
504- if ((cj[ae] != "L"))
505- then throw((("Duck location type is " + cj[ae]) + ", but should be L"))
506- else if ((cj[af] != bR))
507- then throw(((("Duck location id is " + cj[af]) + ", but should be ") + bR))
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))
508511 else {
509- let bn = U(V)
510- let bE = bm(bn)
511- let bF = split(bE[ai], "_")
512- let bG = makeString(aD(aE, bF, fraction(q, (bV * ce), 25)), "_")
513- let ck = bU(bR, bV)
514- $Tuple2([IntegerEntry(cc, ce), StringEntry(bn, makeString([bE[ag], ck, bG, bE[aj]], ":"))], ce)
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)
515518 }
516519 }
517520 }
519522 }
520523
521524
522-@Callable(aQ)
525+@Callable(aR)
523526 func stakeLand () = {
524- let cl = value(aQ.payments[0])
525- let K = value(cl.assetId)
526- let cm = toString(aQ.caller)
527- if ((cl.amount != 1))
527+ let cm = value(aR.payments[0])
528+ let K = value(cm.assetId)
529+ let cn = toString(aR.caller)
530+ if ((cm.amount != 1))
528531 then throw((("NFT " + i) + " token should be attached as payment"))
529532 else {
530- let cf = value(assetInfo(K))
531- if ((cf.issuer != this))
533+ let cg = value(assetInfo(K))
534+ if ((cg.issuer != this))
532535 then throw("Unknown issuer of token")
533- else if (!(contains(cf.name, i)))
536+ else if (!(contains(cg.name, i)))
534537 then throw((("Only NFT " + i) + " tokens are accepted"))
535538 else {
536- let cn = drop(cf.name, 4)
537- let G = if (contains(cn, "XXL"))
538- then dropRight(cn, 3)
539- else if (contains(cn, "XL"))
540- then dropRight(cn, 2)
541- else dropRight(cn, 1)
542- let co = valueOrErrorMessage(parseInt(G), ("Cannot parse land number from " + cf.name))
543- let bR = toBase58String(K)
544- let bW = M(bR)
545- if (isDefined(getInteger(bW)))
546- then throw((("NFT " + cf.name) + " is already staked"))
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"))
547550 else {
548- let ch = split(cf.description, "_")
549- let aM = aR(ch[ab])
550- let ap = aL(aM, (aT(ch[aa]) / 25), 1)
551- let cp = if ((500 >= co))
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))
552555 then (lastBlock.timestamp > u)
553556 else false
554-[IntegerEntry(bW, lastBlock.timestamp), IntegerEntry(R(i, bR, cm), lastBlock.timestamp), StringEntry(J(bR), cm), StringEntry(T(G), cm), StringEntry(Y(), ap)]
557+[IntegerEntry(bX, lastBlock.timestamp), IntegerEntry(S(i, bS, cn), lastBlock.timestamp), StringEntry(J(bS), cn), StringEntry(U(G), cn), StringEntry(Z(), aq)]
555558 }
556559 }
557560 }
559562
560563
561564
562-@Callable(aQ)
563-func unstakeLand (bR) = if ((size(aQ.payments) != 0))
565+@Callable(aR)
566+func unstakeLand (bS) = if ((size(aR.payments) != 0))
564567 then throw("unstake doesn't require any payments")
565568 else {
566- let K = fromBase58String(bR)
567- let cm = toString(aQ.caller)
568- let cf = value(assetInfo(K))
569- if ((cf.issuer != this))
569+ let K = fromBase58String(bS)
570+ let cn = toString(aR.caller)
571+ let cg = value(assetInfo(K))
572+ if ((cg.issuer != this))
570573 then throw("Unknown issuer of token")
571- else if (!(contains(cf.name, i)))
574+ else if (!(contains(cg.name, i)))
572575 then throw((("Only NFT " + i) + " tokens can be unstaked"))
573576 else {
574- let bW = M(bR)
575- if (!(isDefined(bW)))
576- then throw((("NFT " + cf.name) + " is not staked"))
577+ let bX = M(bS)
578+ if (!(isDefined(bX)))
579+ then throw((("NFT " + cg.name) + " is not staked"))
577580 else {
578- let cg = valueOrErrorMessage(getString(J(bR)), (("NFT " + cf.name) + " is orphaned"))
579- if ((cg != cm))
581+ let ch = valueOrErrorMessage(getString(J(bS)), (("NFT " + cg.name) + " is orphaned"))
582+ if ((ch != cn))
580583 then throw((("Staked " + i) + " is not yours"))
581584 else {
582- let ch = split(cf.description, "_")
583- let aM = aR(ch[ab])
584- let bV = aT(ch[aa])
585- let ap = aL(aM, (bV / 25), -1)
586- let ck = bU(bR, bV)
587- let V = valueOrErrorMessage(getString(P(cm)), (("You can't unstake " + i) + " without a duck staked"))
588- let ci = valueOrElse(getString(W(V)), k)
589- let cj = split(value(ci), "_")
590- if ((cj[ae] != "L"))
591- then throw((("Duck location type is " + cj[ae]) + ", but should be L"))
592- else if ((cj[af] != bR))
593- then throw(((("Duck location id is " + cj[af]) + ", but should be ") + bR))
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))
594597 else {
595- let bn = U(V)
596- let bE = bm(bn)
597-[ScriptTransfer(aQ.caller, 1, K), DeleteEntry(bW), DeleteEntry(R(i, bR, cm)), StringEntry(Y(), ap), StringEntry(bn, makeString([bE[ag], ck, bE[ai], bE[aj]], ":"))]
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]], ":"))]
598601 }
599602 }
600603 }
603606
604607
605608
606-@Callable(aQ)
609+@Callable(aR)
607610 func stakeDuck () = {
608- let cl = value(aQ.payments[0])
609- let K = value(cl.assetId)
610- let cm = toString(aQ.caller)
611- if ((cl.amount != 1))
611+ let cm = value(aR.payments[0])
612+ let K = value(cm.assetId)
613+ let cn = toString(aR.caller)
614+ if ((cm.amount != 1))
612615 then throw((("NFT " + j) + " token should be attached as payment"))
613616 else {
614- let cf = value(assetInfo(K))
615- if (if ((cf.issuer != d))
616- then (cf.issuer != e)
617+ let cg = value(assetInfo(K))
618+ if (if ((cg.issuer != d))
619+ then (cg.issuer != e)
617620 else false)
618621 then throw((("Unknown issuer of " + j) + " token"))
619- else if (!(contains(cf.name, j)))
622+ else if (!(contains(cg.name, j)))
620623 then throw((("Only NFT " + j) + " tokens are accepted"))
621624 else {
622- let cq = toBase58String(K)
623- let bW = M(cq)
624- if (isDefined(getInteger(bW)))
625- then throw((("NFT " + cf.name) + " is already staked"))
626- else if (isDefined(getString(P(cm))))
627- then throw(("You already staked one duck: " + cf.name))
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))
628631 else {
629- let cr = W(cq)
630- let cs = getString(cr)
631- let bC = X(cq)
632- let ct = getInteger(bC)
633- let bn = U(cq)
634- let cu = getString(bn)
635- ([IntegerEntry(bW, lastBlock.timestamp), IntegerEntry(R(j, toBase58String(K), cm), lastBlock.timestamp), StringEntry(L(cq), cm), StringEntry(P(cm), cq)] ++ (if (isDefined(cs))
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))
636639 then nil
637- else ([StringEntry(cr, k)] ++ (if (isDefined(ct))
640+ else ([StringEntry(cs, k)] ++ (if (isDefined(cu))
638641 then nil
639- else ([IntegerEntry(bC, 100)] ++ (if (isDefined(cu))
642+ else ([IntegerEntry(bD, 100)] ++ (if (isDefined(cv))
640643 then nil
641- else [StringEntry(bn, "0:0_0_0_0_0_0:0_0_0_0_0_0:")]))))))
644+ else [StringEntry(bo, "0:0_0_0_0_0_0:0_0_0_0_0_0:")]))))))
642645 }
643646 }
644647 }
646649
647650
648651
649-@Callable(aQ)
650-func unstakeDuck (cq) = if ((size(aQ.payments) != 0))
652+@Callable(aR)
653+func unstakeDuck (cr) = if ((size(aR.payments) != 0))
651654 then throw("unstake doesn't require any payments")
652655 else {
653- let K = fromBase58String(cq)
654- let cm = toString(aQ.caller)
655- let cf = value(assetInfo(K))
656- if (if ((cf.issuer != d))
657- then (cf.issuer != e)
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)
658661 else false)
659662 then throw((("Unknown issuer of " + j) + " token"))
660- else if (!(contains(cf.name, j)))
663+ else if (!(contains(cg.name, j)))
661664 then throw((("Only NFT " + j) + " tokens can be unstaked"))
662665 else {
663- let bW = M(toBase58String(K))
664- if (!(isDefined(bW)))
665- then throw((("NFT " + cf.name) + " is not staked"))
666- else if (!(isDefined(P(cm))))
667- then throw((("The duck " + cf.name) + " is not staked"))
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"))
668671 else {
669- let cg = valueOrErrorMessage(getString(L(toBase58String(K))), (("NFT " + cf.name) + " is orphaned"))
670- if ((cg != cm))
672+ let ch = valueOrErrorMessage(getString(L(toBase58String(K))), (("NFT " + cg.name) + " is orphaned"))
673+ if ((ch != cn))
671674 then throw("Staked NFT is not yours")
672- else [ScriptTransfer(aQ.caller, 1, K), DeleteEntry(bW), DeleteEntry(W(cq)), DeleteEntry(L(cq)), DeleteEntry(R(j, cq, cm)), DeleteEntry(P(cm))]
675+ else [ScriptTransfer(aR.caller, 1, K), DeleteEntry(bX), DeleteEntry(X(cr)), DeleteEntry(L(cr)), DeleteEntry(S(j, cr, cn)), DeleteEntry(R(cn))]
673676 }
674677 }
675678 }
676679
677680
678681
679-@Callable(aQ)
680-func claimRes (aW,bR) = if ((size(aQ.payments) != 0))
682+@Callable(aR)
683+func claimRes (aX,bS) = if ((size(aR.payments) != 0))
681684 then throw("claimRes doesn't require any payments")
682685 else {
683- let cb = toString(aQ.originCaller)
684- let cf = value(assetInfo(fromBase58String(bR)))
685- if (!(contains(cf.name, i)))
686+ let cc = toString(aR.originCaller)
687+ let cg = value(assetInfo(fromBase58String(bS)))
688+ if (!(contains(cg.name, i)))
686689 then throw((("NFT " + i) + " token should be passed as param"))
687690 else {
688- let bW = M(bR)
689- let cg = getStringValue(J(bR))
690- if ((cg != cb))
691+ let bX = M(bS)
692+ let ch = getStringValue(J(bS))
693+ if ((ch != cc))
691694 then throw((i + " is not yours"))
692695 else {
693- let ch = split(cf.description, "_")
694- let I = ch[aa]
695- let aM = aR(ch[ab])
696- let V = valueOrErrorMessage(getString(P(cb)), "You don't have a duck staked")
697- let ci = valueOrElse(getString(W(V)), k)
698- let cj = split(value(ci), "_")
699- if ((cj[ae] != "L"))
700- then throw((("Duck location type is " + cj[ae]) + ", but should be L"))
701- else if ((cj[af] != bR))
702- then throw(((("Duck location id is " + cj[af]) + ", but should be ") + bR))
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))
703706 else {
704- let bX = valueOrErrorMessage(getInteger(bW), (("NFT " + cf.name) + " is not staked"))
705- let ba = (lastBlock.timestamp - bX)
706- if ((0 > ba))
707- then throw(((("Saved timestamp is in future, saved = " + toString(bX)) + ", current = ") + toString(lastBlock.timestamp)))
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)))
708711 else {
709- let bV = aT(I)
710- let bY = bQ(bR)
711- let bZ = fraction(ba, (bY * bV), n)
712- if ((aW > bZ))
713- then throw(((("Not enough resources, available = " + toString(bZ)) + ", requested = ") + toString(aW)))
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)))
714717 else {
715- let cv = fraction((bZ - aW), n, (bY * bV))
716- let cw = (lastBlock.timestamp - cv)
717- let bn = U(V)
718- let bE = bm(bn)
719- let aZ = split(bE[ah], "_")
720- let cx = aY(aZ, aM, (ba - cv), (bV / 25), bY)
721- let cy = makeString([bE[ag], cx, bE[ai], bE[aj]], ":")
722- $Tuple2([StringEntry(bn, cy), IntegerEntry(bW, cw), IntegerEntry(R(i, bR, cg), cw)], cx)
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)
723726 }
724727 }
725728 }
729732
730733
731734
732-@Callable(aQ)
733-func flight (bs,bt) = if (!(sigVerify_8Kb(bs, bt, g)))
735+@Callable(aR)
736+func flight (bt,bu) = if (!(sigVerify_8Kb(bt, bu, g)))
734737 then throw("signature does not match")
735- else if ((size(aQ.payments) != 0))
738+ else if ((size(aR.payments) != 0))
736739 then throw("flight doesn't require any payments")
737740 else {
738- let bu = split(toUtf8String(bs), ";")
739- let bv = split(split(bu[0], "|")[0], "_")
740- let bw = parseIntValue(bv[0])
741- let bx = parseIntValue(bv[1])
742- let cz = split(bu[1], ":")
743- let cA = cz[0]
744- let bA = parseIntValue(cz[1])
745- if (if ((bA > (lastBlock.timestamp + o)))
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)))
746749 then true
747- else ((lastBlock.timestamp - o) > bA))
750+ else ((lastBlock.timestamp - o) > bB))
748751 then throw("signature outdated")
749752 else {
750- let V = valueOrErrorMessage(getString(P(toString(aQ.caller))), "You don't have a duck staked")
751- let bC = X(V)
752- let bD = valueOrElse(getInteger(bC), 100)
753- if ((bD != bw))
754- then throw(((("oldHealth=" + toString(valueOrElse(getInteger(bC), 100))) + " from state does not match one from flight log=") + toString(bw)))
755- else if ((0 >= bw))
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))
756759 then throw("You can't fly with zero health")
757760 else {
758- let cr = W(V)
759- let ci = valueOrElse(getString(cr), k)
760- if ((cA == ci))
761+ let cs = X(W)
762+ let cj = valueOrElse(getString(cs), k)
763+ if ((cB == cj))
761764 then throw("You can't fly to the same location")
762- else $Tuple2([StringEntry(cr, if ((bx > 0))
763- then cA
764- else ci), IntegerEntry(bC, bx)], unit)
765+ else $Tuple2([StringEntry(cs, if ((by > 0))
766+ then cB
767+ else cj), IntegerEntry(bD, by)], unit)
765768 }
766769 }
767770 }
768771
769772
770773
771-@Callable(aQ)
772-func setHealth (ct,V) = if (if ((0 > ct))
774+@Callable(aR)
775+func setHealth (cu,W) = if (if ((0 > cu))
773776 then true
774- else (ct > 100))
777+ else (cu > 100))
775778 then throw("HP should be within 0..100")
776- else [IntegerEntry(X(V), ct)]
779+ else [IntegerEntry(Y(W), cu)]
777780
778781
779782
780-@Callable(aQ)
781-func heal (cB,aW) = if (if ((0 > cB))
783+@Callable(aR)
784+func heal (cC,aX) = if (if ((0 > cC))
782785 then true
783- else (cB >= l))
784- then throw(("Unknown material: " + toString(cB)))
785- else if ((0 >= aW))
786- then throw(("Amount should be positive! " + toString(aW)))
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)))
787790 else {
788- let V = valueOrErrorMessage(getString(P(toString(aQ.caller))), "You don't have a duck staked")
789- let bC = X(V)
790- let cC = valueOrElse(getInteger(bC), 100)
791- if ((cC >= 100))
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))
792795 then throw("HP should be < 100 to heal")
793796 else {
794- let bn = U(V)
795- let bE = bm(bn)
796- let bF = split(bE[ai], "_")
797- let cD = parseIntValue(bF[cB])
798- let cE = min([(aW / h), (100 - cC)])
799- let cF = (cE * h)
800- if ((cF > cD))
801- then throw(((((("You need " + toString(cF)) + " of ") + C[cB]) + " to heal, but you backpack contains ") + toString(cD)))
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)))
802805 else {
803- let bG = aU(bF, cB, cF)
804-[IntegerEntry(bC, (cC + cE)), StringEntry(bn, makeString([bE[ag], bE[ah], bG, bE[aj]], ":"))]
806+ let bH = aV(bG, cC, cG)
807+[IntegerEntry(bD, (cD + cF)), StringEntry(bo, makeString([bF[ah], bF[ai], bH, bF[ak]], ":"))]
805808 }
806809 }
807810 }
808811
809812
810813
811-@Callable(aQ)
812-func updateBackpack (V,cy) = if ((aQ.caller != f))
814+@Callable(aR)
815+func updateBackpack (W,cz) = if ((aR.caller != f))
813816 then throw("permission denied")
814- else $Tuple2([StringEntry(U(V), cy)], cy)
817+ else $Tuple2([StringEntry(V(W), cz)], cz)
815818
816819
817820
818-@Callable(aQ)
819-func expeditionBuy (bs,bt) = if ((size(aQ.payments) != 1))
821+@Callable(aR)
822+func expeditionBuy (bt,bu) = if ((size(aR.payments) != 1))
820823 then throw("Exactly one payment required")
821824 else {
822- let cl = value(aQ.payments[0])
823- if ((cl.assetId != b))
825+ let cm = value(aR.payments[0])
826+ if ((cm.assetId != b))
824827 then throw("Allowed USDN payment only!")
825- else if ((cl.amount != t))
828+ else if ((cm.amount != t))
826829 then throw(("Payment attached should be " + toString(t)))
827- else bp(false, aQ.caller, aQ.transactionId, bs, bt)
830+ else bq(false, aR.caller, aR.transactionId, bt, bu)
828831 }
829832
830833
831834
832-@Callable(aQ)
833-func expedition (bs,bt) = if ((size(aQ.payments) != 0))
835+@Callable(aR)
836+func expedition (bt,bu) = if ((size(aR.payments) != 0))
834837 then throw("expedition doesn't require any payments")
835- else bp(true, aQ.caller, aQ.transactionId, bs, bt)
838+ else bq(true, aR.caller, aR.transactionId, bt, bu)
836839
837840
838841
839-@Callable(aQ)
840-func upgradeInfra (bR) = if ((size(aQ.payments) != 0))
842+@Callable(aR)
843+func upgradeInfra (bS) = if ((size(aR.payments) != 0))
841844 then throw("Infrastructure upgrade doesn't require any payments")
842- else ca(true, aQ.caller, bR)
845+ else cb(true, aR.caller, bS)
843846
844847
845848
846-@Callable(aQ)
847-func upgradeInfraUsdn (bR) = if ((size(aQ.payments) != 1))
849+@Callable(aR)
850+func upgradeInfraUsdn (bS) = if ((size(aR.payments) != 1))
848851 then throw("Exactly one payment required")
849852 else {
850- let cl = value(aQ.payments[0])
851- if ((cl.assetId != b))
853+ let cm = value(aR.payments[0])
854+ if ((cm.assetId != b))
852855 then throw("Allowed USDN payment only!")
853856 else {
854- let ce = (valueOrElse(getInteger(N(bR)), 0) + 1)
855- let cf = value(assetInfo(fromBase58String(bR)))
856- let ch = split(cf.description, "_")
857- let cG = fraction(r, (aT(ch[aa]) * ce), 25)
858- if ((cl.amount != cG))
859- then throw(("Payment attached should be " + toString(cG)))
860- else ca(false, aQ.caller, bR)
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)
861864 }
862865 }
863866
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = toUtf8String(take(drop(this.bytes, 1), 1))
55
66 let b = {
77 let c = a
88 if (("W" == c))
99 then base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p'
1010 else if (("T" == c))
1111 then base58'HezsdQuRDtzksAYUy97gfhKy7Z1NW2uXYSHA3bgqenNZ'
1212 else throw("Unknown chain")
1313 }
1414
1515 let d = {
1616 let c = a
1717 if (("W" == c))
1818 then addressFromStringValue("3PEktVux2RhchSN63DsDo4b4mz4QqzKSeDv")
1919 else if (("T" == c))
2020 then this
2121 else throw("Unknown chain")
2222 }
2323
2424 let e = {
2525 let c = a
2626 if (("W" == c))
2727 then addressFromStringValue("3PDVuU45H7Eh5dmtNbnRNRStGwULA7NY6Hb")
2828 else if (("T" == c))
2929 then this
3030 else throw("Unknown chain")
3131 }
3232
3333 let f = {
3434 let c = a
3535 if (("W" == c))
3636 then addressFromStringValue("3P2sk1KncSxRaZs8b4CWGPw2jkvvav74u4D")
3737 else if (("T" == c))
3838 then addressFromStringValue("3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep")
3939 else throw("Unknown chain")
4040 }
4141
4242 let g = base58'6LfPuKJjLgekmncBhMg2LZyMTNVzZBccXR28ySXm9uXD'
4343
4444 let h = 10000
4545
4646 let i = "LAND"
4747
4848 let j = "DUCK"
4949
5050 let k = "Africa_F_Africa"
5151
5252 let l = 6
5353
5454 let m = 3456000
5555
5656 let n = 86400000
5757
5858 let o = 300000
5959
6060 let p = 158549
6161
6262 let q = {
6363 let c = a
6464 if (("W" == c))
6565 then 18921595217
6666 else if (("T" == c))
6767 then 189215952
6868 else throw("Unknown chain")
6969 }
7070
7171 let r = {
7272 let c = a
7373 if (("W" == c))
7474 then 120000000
7575 else if (("T" == c))
7676 then 1200000
7777 else throw("Unknown chain")
7878 }
7979
8080 let s = {
8181 let c = a
8282 if (("W" == c))
8383 then 157679960139
8484 else if (("T" == c))
8585 then 1576799601
8686 else throw("Unknown chain")
8787 }
8888
8989 let t = {
9090 let c = a
9191 if (("W" == c))
9292 then 1000000000
9393 else if (("T" == c))
9494 then 10000000
9595 else throw("Unknown chain")
9696 }
9797
9898 let u = {
9999 let c = a
100100 if (("W" == c))
101101 then 1673136000000
102102 else if (("T" == c))
103103 then 1672790400000
104104 else throw("Unknown chain")
105105 }
106106
107107 let v = 1000000
108108
109109 let w = toBigInt(5)
110110
111111 let x = toBigInt(20)
112112
113113 let y = toBigInt((20 * 20))
114114
115115 let z = toBigInt(((20 * 20) * 20))
116116
117117 let A = toBigInt((((20 * 20) * 20) * 20))
118118
119119 let B = toBigInt(((((20 * 20) * 20) * 20) * 20))
120120
121121 let C = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"]
122122
123123 let D = ["Asia", "Europe", "Americas", "Oceania", "Africa"]
124124
125125 func E () = "nextLandNum"
126126
127127
128128 func F (G) = ("landToAsset_" + G)
129129
130130
131131 func H (G,I) = ((i + G) + I)
132132
133133
134134 func J (K) = ("nftOwner_" + K)
135135
136136
137137 func L (K) = ("duckOwner_" + K)
138138
139139
140140 func M (K) = ("stakedTime_" + K)
141141
142142
143143 func N (K) = ("infraLevel_" + K)
144144
145145
146-func O (K) = ("presaleArtActivated_" + K)
146+func O (K,P) = ((("infraLevelByAssetIdAndOwner_" + K) + "_") + P)
147147
148148
149-func P (Q) = ("stakedDuckByOwner_" + Q)
149+func Q (K) = ("presaleArtActivated_" + K)
150150
151151
152-func R (S,K,Q) = ((((("stakedTimeByTypeAssetIdAndOwner_" + S) + "_") + K) + "_") + Q)
152+func R (P) = ("stakedDuckByOwner_" + P)
153153
154154
155-func T (G) = ("landOwner_" + G)
155+func S (T,K,P) = ((((("stakedTimeByTypeAssetIdAndOwner_" + T) + "_") + K) + "_") + P)
156156
157157
158-func U (V) = ("backPack_" + V)
158+func U (G) = ("landOwner_" + G)
159159
160160
161-func W (V) = ("duckLocation_" + V)
161+func V (W) = ("backPack_" + W)
162162
163163
164-func X (V) = ("duckHealth_" + V)
164+func X (W) = ("duckLocation_" + W)
165165
166166
167-func Y () = "resTypesProportions"
167+func Y (W) = ("duckHealth_" + W)
168168
169169
170-let Z = 0
170+func Z () = "resTypesProportions"
171171
172-let aa = 1
173172
174-let ab = 2
173+let aa = 0
175174
176-let ac = 3
175+let ab = 1
177176
178-let ad = 0
177+let ac = 2
179178
180-let ae = 1
179+let ad = 3
181180
182-let af = 2
181+let ae = 0
183182
184-let ag = 0
183+let af = 1
185184
186-let ah = 1
185+let ag = 2
187186
188-let ai = 2
187+let ah = 0
189188
190-let aj = 3
189+let ai = 1
191190
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
194197 if ($isInstanceOf(c, "String"))
195198 then {
196- let am = c
197- am
199+ let an = c
200+ an
198201 }
199202 else throw("fail to cast into String")
200203 }
201204
202205
203-func an (ao) = {
204- let ap = split(value(getString(Y())), "_")
205- if ((size(ap) != l))
206+func ao (ap) = {
207+ let aq = split(value(getString(Z())), "_")
208+ if ((size(aq) != l))
206209 then throw("Wrong proportions data")
207210 else {
208- let aq = [parseIntValue(ap[0]), parseIntValue(ap[1]), parseIntValue(ap[2]), parseIntValue(ap[3]), parseIntValue(ap[4]), parseIntValue(ap[5])]
209- let ar = (((((aq[0] + aq[1]) + aq[2]) + aq[3]) + aq[4]) + aq[5])
210- if ((0 >= ar))
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))
211214 then throw("No lands staked")
212215 else {
213- let as = fraction(ao, v, ar)
214- func at (au,av) = (au :+ fraction(av, as, v))
216+ let at = fraction(ap, v, as)
217+ func au (av,aw) = (av :+ fraction(aw, at, v))
215218
216- let aw = aq
217- let ax = size(aw)
218- let ay = nil
219- func az (aA,aB) = if ((aB >= ax))
220- then aA
221- else at(aA, aw[aB])
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])
222225
223- func aC (aA,aB) = if ((aB >= ax))
224- then aA
226+ func aD (aB,aC) = if ((aC >= ay))
227+ then aB
225228 else throw("List size exceeds 6")
226229
227- aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6)
230+ aD(aA(aA(aA(aA(aA(aA(az, 0), 1), 2), 3), 4), 5), 6)
228231 }
229232 }
230233 }
231234
232235
233-func aD (aE,aF,aG) = {
234- let aH = an(aG)
235- func aI (au,aJ) = {
236- let aK = (parseIntValue(aF[aJ]) - aH[aJ])
237- if ((0 > aK))
238- then throw(((((("Not enough material idx=" + toString(aJ)) + ", you have ") + aF[aJ]) + ", but need ") + toString(aH[aJ])))
239- else (au :+ toString(aK))
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))
240243 }
241244
242- if (aE)
245+ if (aF)
243246 then {
244- let aw = [0, 1, 2, 3, 4, 5]
245- let ax = size(aw)
246- let ay = nil
247- func az (aA,aB) = if ((aB >= ax))
248- then aA
249- else aI(aA, aw[aB])
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])
250253
251- func aC (aA,aB) = if ((aB >= ax))
252- then aA
254+ func aD (aB,aC) = if ((aC >= ay))
255+ then aB
253256 else throw("List size exceeds 6")
254257
255- aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6)
258+ aD(aA(aA(aA(aA(aA(aA(az, 0), 1), 2), 3), 4), 5), 6)
256259 }
257- else aF
260+ else aG
258261 }
259262
260263
261-func aL (aM,aN,aO) = {
262- let ap = split(valueOrElse(getString(Y()), "0_0_0_0_0_0"), "_")
263- if ((size(ap) != l))
264+func aM (aN,aO,aP) = {
265+ let aq = split(valueOrElse(getString(Z()), "0_0_0_0_0_0"), "_")
266+ if ((size(aq) != l))
264267 then throw("Wrong proportions data")
265268 else {
266- func aP (au,aQ) = {
267- let aK = (parseIntValue(ap[aQ]) + ((aO * aM[aQ]) * aN))
268- if ((0 > aK))
269- then throw(((((((("Panic! Pieces of type=" + toString(aQ)) + ", sign=") + toString(aO)) + ", terrainCounts[i]=") + toString(aM[aQ])) + ", landSizeIndex=") + toString(aN)))
270- else (au :+ toString(aK))
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))
271274 }
272275
273- let aq = {
274- let aw = [0, 1, 2, 3, 4, 5]
275- let ax = size(aw)
276- let ay = nil
277- func az (aA,aB) = if ((aB >= ax))
278- then aA
279- else aP(aA, aw[aB])
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])
280283
281- func aC (aA,aB) = if ((aB >= ax))
282- then aA
284+ func aD (aB,aC) = if ((aC >= ay))
285+ then aB
283286 else throw("List size exceeds 6")
284287
285- aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6)
288+ aD(aA(aA(aA(aA(aA(aA(az, 0), 1), 2), 3), 4), 5), 6)
286289 }
287- makeString(aq, "_")
290+ makeString(ar, "_")
288291 }
289292 }
290293
291294
292-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)]
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)]
293296
294297
295-func aT (I) = {
298+func aU (I) = {
296299 let c = I
297300 if (("S" == c))
298301 then 25
299302 else if (("M" == c))
300303 then 100
301304 else if (("L" == c))
302305 then 225
303306 else if (("XL" == c))
304307 then 400
305308 else if (("XXL" == c))
306309 then 625
307310 else throw("Unknown land size")
308311 }
309312
310313
311-func aU (aV,aJ,aW) = {
312- func aX (au,aQ) = (au :+ (if ((aQ == aJ))
313- then toString((parseIntValue(aV[aQ]) - aW))
314- else aV[aQ]))
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]))
315318
316- let aq = {
317- let aw = [0, 1, 2, 3, 4, 5]
318- let ax = size(aw)
319- let ay = nil
320- func az (aA,aB) = if ((aB >= ax))
321- then aA
322- else aX(aA, aw[aB])
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])
323326
324- func aC (aA,aB) = if ((aB >= ax))
325- then aA
327+ func aD (aB,aC) = if ((aC >= ay))
328+ then aB
326329 else throw("List size exceeds 6")
327330
328- aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6)
331+ aD(aA(aA(aA(aA(aA(aA(az, 0), 1), 2), 3), 4), 5), 6)
329332 }
330- makeString(aq, "_")
333+ makeString(ar, "_")
331334 }
332335
333336
334-func aY (aZ,aM,ba,aN,bb) = {
335- func bc (au,aQ) = {
336- let bd = ((fraction(ba, bb, n) * aM[aQ]) * aN)
337- (au :+ toString((parseIntValue(aZ[aQ]) + bd)))
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)))
338341 }
339342
340- let aq = {
341- let aw = [0, 1, 2, 3, 4, 5]
342- let ax = size(aw)
343- let ay = nil
344- func az (aA,aB) = if ((aB >= ax))
345- then aA
346- else bc(aA, aw[aB])
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])
347350
348- func aC (aA,aB) = if ((aB >= ax))
349- then aA
351+ func aD (aB,aC) = if ((aC >= ay))
352+ then aB
350353 else throw("List size exceeds 6")
351354
352- aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6)
355+ aD(aA(aA(aA(aA(aA(aA(az, 0), 1), 2), 3), 4), 5), 6)
353356 }
354- makeString(aq, "_")
357+ makeString(ar, "_")
355358 }
356359
357360
358-func be (bf) = if ((bf >= toBigInt(0)))
359- then bf
360- else -(bf)
361+func bf (bg) = if ((bg >= toBigInt(0)))
362+ then bg
363+ else -(bg)
361364
362365
363-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]]
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]]
364367
365-func bh (bi,bj) = {
366- let bk = toInt((bi % x))
367- let bl = if ((bj[0] > bk))
368+func bi (bj,bk) = {
369+ let bl = toInt((bj % x))
370+ let bm = if ((bk[0] > bl))
368371 then "A"
369- else if ((bj[1] > bk))
372+ else if ((bk[1] > bl))
370373 then "B"
371- else if ((bj[2] > bk))
374+ else if ((bk[2] > bl))
372375 then "C"
373- else if ((bj[3] > bk))
376+ else if ((bk[3] > bl))
374377 then "D"
375- else if ((bj[4] > bk))
378+ else if ((bk[4] > bl))
376379 then "E"
377380 else "F"
378- bl
381+ bm
379382 }
380383
381384
382-func bm (bn) = {
383- let bo = split(valueOrElse(getString(bn), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":")
384-[toString(valueOrElse(parseInt(bo[ag]), 0)), if ((size(split(bo[ah], "_")) == l))
385- then bo[ah]
386- else "0_0_0_0_0_0", if ((size(split(bo[ai], "_")) == l))
387- then bo[ai]
388- else "0_0_0_0_0_0", bo[aj]]
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]]
389392 }
390393
391394
392-func bp (aE,bq,br,bs,bt) = if (!(sigVerify_8Kb(bs, bt, g)))
395+func bq (aF,br,bs,bt,bu) = if (!(sigVerify_8Kb(bt, bu, g)))
393396 then throw("signature does not match")
394397 else {
395- let bu = split(toUtf8String(bs), ";")
396- let bv = split(split(bu[0], "|")[0], "_")
397- let bw = parseIntValue(bv[0])
398- let bx = parseIntValue(bv[1])
399- let by = split(bu[1], ":")
400- let bz = split(by[0], "_")
401- if ((bz[1] != "E"))
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"))
402405 then throw("expedition target location type should be E")
403406 else {
404- let bA = parseIntValue(by[1])
405- if (if ((bA > (lastBlock.timestamp + o)))
407+ let bB = parseIntValue(bz[1])
408+ if (if ((bB > (lastBlock.timestamp + o)))
406409 then true
407- else ((lastBlock.timestamp - o) > bA))
410+ else ((lastBlock.timestamp - o) > bB))
408411 then throw("signature outdated")
409412 else {
410- let bB = toString(bq)
411- let V = valueOrErrorMessage(getString(P(bB)), "You don't have a duck staked")
412- let bC = X(V)
413- let bD = valueOrElse(getInteger(bC), 100)
414- if ((bD != bw))
415- then throw(((("oldHealth=" + toString(valueOrElse(getInteger(bC), 100))) + " from state does not match one from flight log=") + toString(bw)))
416- else if ((0 >= bw))
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))
417420 then throw("You can't fly with zero health")
418- else if ((0 >= bx))
419- then $Tuple2(((if (!(aE))
420- then [ScriptTransfer(bq, t, b)]
421- else nil) :+ IntegerEntry(bC, 0)), "")
421+ else if ((0 >= by))
422+ then $Tuple2(((if (!(aF))
423+ then [ScriptTransfer(br, t, b)]
424+ else nil) :+ IntegerEntry(bD, 0)), "")
422425 else {
423- let bn = U(V)
424- let bE = bm(bn)
425- let bF = split(bE[ai], "_")
426- let bG = makeString(aD(aE, bF, s), "_")
427- let bH = be(toBigInt(br))
428- let bI = valueOrElse(getInteger(E()), 501)
429- let G = toString(bI)
430- let bJ = toInt((bH % w))
431- let bK = bg[bJ]
432- func bL (au,av) = $Tuple2((((((au._1 + bh(au._2, bK)) + bh((au._2 / x), bK)) + bh((au._2 / y), bK)) + bh((au._2 / z), bK)) + bh((au._2 / A), bK)), (au._2 / B))
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))
433436
434- let bM = {
435- let aw = [1, 2, 3, 4, 5]
436- let ax = size(aw)
437- let ay = $Tuple2("", (bH / w))
438- func az (aA,aB) = if ((aB >= ax))
439- then aA
440- else bL(aA, aw[aB])
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])
441444
442- func aC (aA,aB) = if ((aB >= ax))
443- then aA
445+ func aD (aB,aC) = if ((aC >= ay))
446+ then aB
444447 else throw("List size exceeds 5")
445448
446- aC(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5)
449+ aD(aA(aA(aA(aA(aA(az, 0), 1), 2), 3), 4), 5)
447450 }
448- let bN = D[bJ]
449- let bO = Issue(H(G, "S"), makeString([G, "S", bM._1, bN], "_"), 1, 0, false)
450- let K = calculateAssetId(bO)
451- let bP = toBase58String(K)
452- $Tuple2([IntegerEntry(E(), (bI + 1)), bO, StringEntry(F(G), bP), StringEntry(J(bP), bB), StringEntry(T(G), bB), IntegerEntry(N(bP), 0), ScriptTransfer(bq, 1, K), StringEntry(W(V), makeString([bN, "L", bP], "_")), IntegerEntry(bC, bx), StringEntry(bn, makeString([bE[ag], bE[ah], bG, bE[aj]], ":"))], bP)
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)
453456 }
454457 }
455458 }
456459 }
457460
458461
459-func bQ (bR) = {
460- let bS = valueOrElse(getInteger(N(bR)), 0)
461- let bT = if (valueOrElse(getBoolean(O(bR)), false))
462+func bR (bS) = {
463+ let bT = valueOrElse(getInteger(N(bS)), 0)
464+ let bU = if (valueOrElse(getBoolean(Q(bS)), false))
462465 then 3
463466 else 0
464- (m + fraction(m, bS, 4))
467+ (m + fraction(m, bT, 4))
465468 }
466469
467470
468-func bU (bR,bV) = {
469- let bW = M(bR)
470- let bX = valueOrErrorMessage(getInteger(bW), (((i + " ") + bR) + " is not staked"))
471- let ba = (lastBlock.timestamp - bX)
472- if ((0 > ba))
473- then throw(((("Saved timestamp is in future, saved = " + toString(bX)) + ", current = ") + toString(lastBlock.timestamp)))
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)))
474477 else {
475- let bY = bQ(bR)
476- let bZ = (fraction(ba, bY, n) * bV)
477- ak(invoke(this, "claimRes", [bZ, bR], nil))
478+ let bZ = bR(bS)
479+ let ca = (fraction(bb, bZ, n) * bW)
480+ al(invoke(this, "claimRes", [ca, bS], nil))
478481 }
479482 }
480483
481484
482-func ca (aE,bq,bR) = {
483- let cb = toString(bq)
484- let cc = N(bR)
485- let cd = valueOrElse(getInteger(cc), 0)
486- if ((cd >= 3))
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))
487490 then throw("Currently max infrastructure level = 3")
488491 else {
489- let ce = (cd + 1)
490- let cf = value(assetInfo(fromBase58String(bR)))
491- if (!(contains(cf.name, i)))
492+ let cf = (ce + 1)
493+ let cg = value(assetInfo(fromBase58String(bS)))
494+ if (!(contains(cg.name, i)))
492495 then throw((("NFT " + i) + " token should be passed as param"))
493496 else {
494- let cg = getStringValue(J(bR))
495- if ((cg != cb))
497+ let ch = getStringValue(J(bS))
498+ if ((ch != cc))
496499 then throw((i + " is not yours"))
497500 else {
498- let ch = split(cf.description, "_")
499- let I = ch[aa]
500- let bV = aT(I)
501- let V = valueOrErrorMessage(getString(P(cb)), "You don't have a duck staked")
502- let ci = valueOrElse(getString(W(V)), k)
503- let cj = split(value(ci), "_")
504- if ((cj[ae] != "L"))
505- then throw((("Duck location type is " + cj[ae]) + ", but should be L"))
506- else if ((cj[af] != bR))
507- then throw(((("Duck location id is " + cj[af]) + ", but should be ") + bR))
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))
508511 else {
509- let bn = U(V)
510- let bE = bm(bn)
511- let bF = split(bE[ai], "_")
512- let bG = makeString(aD(aE, bF, fraction(q, (bV * ce), 25)), "_")
513- let ck = bU(bR, bV)
514- $Tuple2([IntegerEntry(cc, ce), StringEntry(bn, makeString([bE[ag], ck, bG, bE[aj]], ":"))], ce)
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)
515518 }
516519 }
517520 }
518521 }
519522 }
520523
521524
522-@Callable(aQ)
525+@Callable(aR)
523526 func stakeLand () = {
524- let cl = value(aQ.payments[0])
525- let K = value(cl.assetId)
526- let cm = toString(aQ.caller)
527- if ((cl.amount != 1))
527+ let cm = value(aR.payments[0])
528+ let K = value(cm.assetId)
529+ let cn = toString(aR.caller)
530+ if ((cm.amount != 1))
528531 then throw((("NFT " + i) + " token should be attached as payment"))
529532 else {
530- let cf = value(assetInfo(K))
531- if ((cf.issuer != this))
533+ let cg = value(assetInfo(K))
534+ if ((cg.issuer != this))
532535 then throw("Unknown issuer of token")
533- else if (!(contains(cf.name, i)))
536+ else if (!(contains(cg.name, i)))
534537 then throw((("Only NFT " + i) + " tokens are accepted"))
535538 else {
536- let cn = drop(cf.name, 4)
537- let G = if (contains(cn, "XXL"))
538- then dropRight(cn, 3)
539- else if (contains(cn, "XL"))
540- then dropRight(cn, 2)
541- else dropRight(cn, 1)
542- let co = valueOrErrorMessage(parseInt(G), ("Cannot parse land number from " + cf.name))
543- let bR = toBase58String(K)
544- let bW = M(bR)
545- if (isDefined(getInteger(bW)))
546- then throw((("NFT " + cf.name) + " is already staked"))
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"))
547550 else {
548- let ch = split(cf.description, "_")
549- let aM = aR(ch[ab])
550- let ap = aL(aM, (aT(ch[aa]) / 25), 1)
551- let cp = if ((500 >= co))
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))
552555 then (lastBlock.timestamp > u)
553556 else false
554-[IntegerEntry(bW, lastBlock.timestamp), IntegerEntry(R(i, bR, cm), lastBlock.timestamp), StringEntry(J(bR), cm), StringEntry(T(G), cm), StringEntry(Y(), ap)]
557+[IntegerEntry(bX, lastBlock.timestamp), IntegerEntry(S(i, bS, cn), lastBlock.timestamp), StringEntry(J(bS), cn), StringEntry(U(G), cn), StringEntry(Z(), aq)]
555558 }
556559 }
557560 }
558561 }
559562
560563
561564
562-@Callable(aQ)
563-func unstakeLand (bR) = if ((size(aQ.payments) != 0))
565+@Callable(aR)
566+func unstakeLand (bS) = if ((size(aR.payments) != 0))
564567 then throw("unstake doesn't require any payments")
565568 else {
566- let K = fromBase58String(bR)
567- let cm = toString(aQ.caller)
568- let cf = value(assetInfo(K))
569- if ((cf.issuer != this))
569+ let K = fromBase58String(bS)
570+ let cn = toString(aR.caller)
571+ let cg = value(assetInfo(K))
572+ if ((cg.issuer != this))
570573 then throw("Unknown issuer of token")
571- else if (!(contains(cf.name, i)))
574+ else if (!(contains(cg.name, i)))
572575 then throw((("Only NFT " + i) + " tokens can be unstaked"))
573576 else {
574- let bW = M(bR)
575- if (!(isDefined(bW)))
576- then throw((("NFT " + cf.name) + " is not staked"))
577+ let bX = M(bS)
578+ if (!(isDefined(bX)))
579+ then throw((("NFT " + cg.name) + " is not staked"))
577580 else {
578- let cg = valueOrErrorMessage(getString(J(bR)), (("NFT " + cf.name) + " is orphaned"))
579- if ((cg != cm))
581+ let ch = valueOrErrorMessage(getString(J(bS)), (("NFT " + cg.name) + " is orphaned"))
582+ if ((ch != cn))
580583 then throw((("Staked " + i) + " is not yours"))
581584 else {
582- let ch = split(cf.description, "_")
583- let aM = aR(ch[ab])
584- let bV = aT(ch[aa])
585- let ap = aL(aM, (bV / 25), -1)
586- let ck = bU(bR, bV)
587- let V = valueOrErrorMessage(getString(P(cm)), (("You can't unstake " + i) + " without a duck staked"))
588- let ci = valueOrElse(getString(W(V)), k)
589- let cj = split(value(ci), "_")
590- if ((cj[ae] != "L"))
591- then throw((("Duck location type is " + cj[ae]) + ", but should be L"))
592- else if ((cj[af] != bR))
593- then throw(((("Duck location id is " + cj[af]) + ", but should be ") + bR))
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))
594597 else {
595- let bn = U(V)
596- let bE = bm(bn)
597-[ScriptTransfer(aQ.caller, 1, K), DeleteEntry(bW), DeleteEntry(R(i, bR, cm)), StringEntry(Y(), ap), StringEntry(bn, makeString([bE[ag], ck, bE[ai], bE[aj]], ":"))]
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]], ":"))]
598601 }
599602 }
600603 }
601604 }
602605 }
603606
604607
605608
606-@Callable(aQ)
609+@Callable(aR)
607610 func stakeDuck () = {
608- let cl = value(aQ.payments[0])
609- let K = value(cl.assetId)
610- let cm = toString(aQ.caller)
611- if ((cl.amount != 1))
611+ let cm = value(aR.payments[0])
612+ let K = value(cm.assetId)
613+ let cn = toString(aR.caller)
614+ if ((cm.amount != 1))
612615 then throw((("NFT " + j) + " token should be attached as payment"))
613616 else {
614- let cf = value(assetInfo(K))
615- if (if ((cf.issuer != d))
616- then (cf.issuer != e)
617+ let cg = value(assetInfo(K))
618+ if (if ((cg.issuer != d))
619+ then (cg.issuer != e)
617620 else false)
618621 then throw((("Unknown issuer of " + j) + " token"))
619- else if (!(contains(cf.name, j)))
622+ else if (!(contains(cg.name, j)))
620623 then throw((("Only NFT " + j) + " tokens are accepted"))
621624 else {
622- let cq = toBase58String(K)
623- let bW = M(cq)
624- if (isDefined(getInteger(bW)))
625- then throw((("NFT " + cf.name) + " is already staked"))
626- else if (isDefined(getString(P(cm))))
627- then throw(("You already staked one duck: " + cf.name))
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))
628631 else {
629- let cr = W(cq)
630- let cs = getString(cr)
631- let bC = X(cq)
632- let ct = getInteger(bC)
633- let bn = U(cq)
634- let cu = getString(bn)
635- ([IntegerEntry(bW, lastBlock.timestamp), IntegerEntry(R(j, toBase58String(K), cm), lastBlock.timestamp), StringEntry(L(cq), cm), StringEntry(P(cm), cq)] ++ (if (isDefined(cs))
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))
636639 then nil
637- else ([StringEntry(cr, k)] ++ (if (isDefined(ct))
640+ else ([StringEntry(cs, k)] ++ (if (isDefined(cu))
638641 then nil
639- else ([IntegerEntry(bC, 100)] ++ (if (isDefined(cu))
642+ else ([IntegerEntry(bD, 100)] ++ (if (isDefined(cv))
640643 then nil
641- else [StringEntry(bn, "0:0_0_0_0_0_0:0_0_0_0_0_0:")]))))))
644+ else [StringEntry(bo, "0:0_0_0_0_0_0:0_0_0_0_0_0:")]))))))
642645 }
643646 }
644647 }
645648 }
646649
647650
648651
649-@Callable(aQ)
650-func unstakeDuck (cq) = if ((size(aQ.payments) != 0))
652+@Callable(aR)
653+func unstakeDuck (cr) = if ((size(aR.payments) != 0))
651654 then throw("unstake doesn't require any payments")
652655 else {
653- let K = fromBase58String(cq)
654- let cm = toString(aQ.caller)
655- let cf = value(assetInfo(K))
656- if (if ((cf.issuer != d))
657- then (cf.issuer != e)
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)
658661 else false)
659662 then throw((("Unknown issuer of " + j) + " token"))
660- else if (!(contains(cf.name, j)))
663+ else if (!(contains(cg.name, j)))
661664 then throw((("Only NFT " + j) + " tokens can be unstaked"))
662665 else {
663- let bW = M(toBase58String(K))
664- if (!(isDefined(bW)))
665- then throw((("NFT " + cf.name) + " is not staked"))
666- else if (!(isDefined(P(cm))))
667- then throw((("The duck " + cf.name) + " is not staked"))
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"))
668671 else {
669- let cg = valueOrErrorMessage(getString(L(toBase58String(K))), (("NFT " + cf.name) + " is orphaned"))
670- if ((cg != cm))
672+ let ch = valueOrErrorMessage(getString(L(toBase58String(K))), (("NFT " + cg.name) + " is orphaned"))
673+ if ((ch != cn))
671674 then throw("Staked NFT is not yours")
672- else [ScriptTransfer(aQ.caller, 1, K), DeleteEntry(bW), DeleteEntry(W(cq)), DeleteEntry(L(cq)), DeleteEntry(R(j, cq, cm)), DeleteEntry(P(cm))]
675+ else [ScriptTransfer(aR.caller, 1, K), DeleteEntry(bX), DeleteEntry(X(cr)), DeleteEntry(L(cr)), DeleteEntry(S(j, cr, cn)), DeleteEntry(R(cn))]
673676 }
674677 }
675678 }
676679
677680
678681
679-@Callable(aQ)
680-func claimRes (aW,bR) = if ((size(aQ.payments) != 0))
682+@Callable(aR)
683+func claimRes (aX,bS) = if ((size(aR.payments) != 0))
681684 then throw("claimRes doesn't require any payments")
682685 else {
683- let cb = toString(aQ.originCaller)
684- let cf = value(assetInfo(fromBase58String(bR)))
685- if (!(contains(cf.name, i)))
686+ let cc = toString(aR.originCaller)
687+ let cg = value(assetInfo(fromBase58String(bS)))
688+ if (!(contains(cg.name, i)))
686689 then throw((("NFT " + i) + " token should be passed as param"))
687690 else {
688- let bW = M(bR)
689- let cg = getStringValue(J(bR))
690- if ((cg != cb))
691+ let bX = M(bS)
692+ let ch = getStringValue(J(bS))
693+ if ((ch != cc))
691694 then throw((i + " is not yours"))
692695 else {
693- let ch = split(cf.description, "_")
694- let I = ch[aa]
695- let aM = aR(ch[ab])
696- let V = valueOrErrorMessage(getString(P(cb)), "You don't have a duck staked")
697- let ci = valueOrElse(getString(W(V)), k)
698- let cj = split(value(ci), "_")
699- if ((cj[ae] != "L"))
700- then throw((("Duck location type is " + cj[ae]) + ", but should be L"))
701- else if ((cj[af] != bR))
702- then throw(((("Duck location id is " + cj[af]) + ", but should be ") + bR))
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))
703706 else {
704- let bX = valueOrErrorMessage(getInteger(bW), (("NFT " + cf.name) + " is not staked"))
705- let ba = (lastBlock.timestamp - bX)
706- if ((0 > ba))
707- then throw(((("Saved timestamp is in future, saved = " + toString(bX)) + ", current = ") + toString(lastBlock.timestamp)))
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)))
708711 else {
709- let bV = aT(I)
710- let bY = bQ(bR)
711- let bZ = fraction(ba, (bY * bV), n)
712- if ((aW > bZ))
713- then throw(((("Not enough resources, available = " + toString(bZ)) + ", requested = ") + toString(aW)))
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)))
714717 else {
715- let cv = fraction((bZ - aW), n, (bY * bV))
716- let cw = (lastBlock.timestamp - cv)
717- let bn = U(V)
718- let bE = bm(bn)
719- let aZ = split(bE[ah], "_")
720- let cx = aY(aZ, aM, (ba - cv), (bV / 25), bY)
721- let cy = makeString([bE[ag], cx, bE[ai], bE[aj]], ":")
722- $Tuple2([StringEntry(bn, cy), IntegerEntry(bW, cw), IntegerEntry(R(i, bR, cg), cw)], cx)
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)
723726 }
724727 }
725728 }
726729 }
727730 }
728731 }
729732
730733
731734
732-@Callable(aQ)
733-func flight (bs,bt) = if (!(sigVerify_8Kb(bs, bt, g)))
735+@Callable(aR)
736+func flight (bt,bu) = if (!(sigVerify_8Kb(bt, bu, g)))
734737 then throw("signature does not match")
735- else if ((size(aQ.payments) != 0))
738+ else if ((size(aR.payments) != 0))
736739 then throw("flight doesn't require any payments")
737740 else {
738- let bu = split(toUtf8String(bs), ";")
739- let bv = split(split(bu[0], "|")[0], "_")
740- let bw = parseIntValue(bv[0])
741- let bx = parseIntValue(bv[1])
742- let cz = split(bu[1], ":")
743- let cA = cz[0]
744- let bA = parseIntValue(cz[1])
745- if (if ((bA > (lastBlock.timestamp + o)))
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)))
746749 then true
747- else ((lastBlock.timestamp - o) > bA))
750+ else ((lastBlock.timestamp - o) > bB))
748751 then throw("signature outdated")
749752 else {
750- let V = valueOrErrorMessage(getString(P(toString(aQ.caller))), "You don't have a duck staked")
751- let bC = X(V)
752- let bD = valueOrElse(getInteger(bC), 100)
753- if ((bD != bw))
754- then throw(((("oldHealth=" + toString(valueOrElse(getInteger(bC), 100))) + " from state does not match one from flight log=") + toString(bw)))
755- else if ((0 >= bw))
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))
756759 then throw("You can't fly with zero health")
757760 else {
758- let cr = W(V)
759- let ci = valueOrElse(getString(cr), k)
760- if ((cA == ci))
761+ let cs = X(W)
762+ let cj = valueOrElse(getString(cs), k)
763+ if ((cB == cj))
761764 then throw("You can't fly to the same location")
762- else $Tuple2([StringEntry(cr, if ((bx > 0))
763- then cA
764- else ci), IntegerEntry(bC, bx)], unit)
765+ else $Tuple2([StringEntry(cs, if ((by > 0))
766+ then cB
767+ else cj), IntegerEntry(bD, by)], unit)
765768 }
766769 }
767770 }
768771
769772
770773
771-@Callable(aQ)
772-func setHealth (ct,V) = if (if ((0 > ct))
774+@Callable(aR)
775+func setHealth (cu,W) = if (if ((0 > cu))
773776 then true
774- else (ct > 100))
777+ else (cu > 100))
775778 then throw("HP should be within 0..100")
776- else [IntegerEntry(X(V), ct)]
779+ else [IntegerEntry(Y(W), cu)]
777780
778781
779782
780-@Callable(aQ)
781-func heal (cB,aW) = if (if ((0 > cB))
783+@Callable(aR)
784+func heal (cC,aX) = if (if ((0 > cC))
782785 then true
783- else (cB >= l))
784- then throw(("Unknown material: " + toString(cB)))
785- else if ((0 >= aW))
786- then throw(("Amount should be positive! " + toString(aW)))
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)))
787790 else {
788- let V = valueOrErrorMessage(getString(P(toString(aQ.caller))), "You don't have a duck staked")
789- let bC = X(V)
790- let cC = valueOrElse(getInteger(bC), 100)
791- if ((cC >= 100))
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))
792795 then throw("HP should be < 100 to heal")
793796 else {
794- let bn = U(V)
795- let bE = bm(bn)
796- let bF = split(bE[ai], "_")
797- let cD = parseIntValue(bF[cB])
798- let cE = min([(aW / h), (100 - cC)])
799- let cF = (cE * h)
800- if ((cF > cD))
801- then throw(((((("You need " + toString(cF)) + " of ") + C[cB]) + " to heal, but you backpack contains ") + toString(cD)))
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)))
802805 else {
803- let bG = aU(bF, cB, cF)
804-[IntegerEntry(bC, (cC + cE)), StringEntry(bn, makeString([bE[ag], bE[ah], bG, bE[aj]], ":"))]
806+ let bH = aV(bG, cC, cG)
807+[IntegerEntry(bD, (cD + cF)), StringEntry(bo, makeString([bF[ah], bF[ai], bH, bF[ak]], ":"))]
805808 }
806809 }
807810 }
808811
809812
810813
811-@Callable(aQ)
812-func updateBackpack (V,cy) = if ((aQ.caller != f))
814+@Callable(aR)
815+func updateBackpack (W,cz) = if ((aR.caller != f))
813816 then throw("permission denied")
814- else $Tuple2([StringEntry(U(V), cy)], cy)
817+ else $Tuple2([StringEntry(V(W), cz)], cz)
815818
816819
817820
818-@Callable(aQ)
819-func expeditionBuy (bs,bt) = if ((size(aQ.payments) != 1))
821+@Callable(aR)
822+func expeditionBuy (bt,bu) = if ((size(aR.payments) != 1))
820823 then throw("Exactly one payment required")
821824 else {
822- let cl = value(aQ.payments[0])
823- if ((cl.assetId != b))
825+ let cm = value(aR.payments[0])
826+ if ((cm.assetId != b))
824827 then throw("Allowed USDN payment only!")
825- else if ((cl.amount != t))
828+ else if ((cm.amount != t))
826829 then throw(("Payment attached should be " + toString(t)))
827- else bp(false, aQ.caller, aQ.transactionId, bs, bt)
830+ else bq(false, aR.caller, aR.transactionId, bt, bu)
828831 }
829832
830833
831834
832-@Callable(aQ)
833-func expedition (bs,bt) = if ((size(aQ.payments) != 0))
835+@Callable(aR)
836+func expedition (bt,bu) = if ((size(aR.payments) != 0))
834837 then throw("expedition doesn't require any payments")
835- else bp(true, aQ.caller, aQ.transactionId, bs, bt)
838+ else bq(true, aR.caller, aR.transactionId, bt, bu)
836839
837840
838841
839-@Callable(aQ)
840-func upgradeInfra (bR) = if ((size(aQ.payments) != 0))
842+@Callable(aR)
843+func upgradeInfra (bS) = if ((size(aR.payments) != 0))
841844 then throw("Infrastructure upgrade doesn't require any payments")
842- else ca(true, aQ.caller, bR)
845+ else cb(true, aR.caller, bS)
843846
844847
845848
846-@Callable(aQ)
847-func upgradeInfraUsdn (bR) = if ((size(aQ.payments) != 1))
849+@Callable(aR)
850+func upgradeInfraUsdn (bS) = if ((size(aR.payments) != 1))
848851 then throw("Exactly one payment required")
849852 else {
850- let cl = value(aQ.payments[0])
851- if ((cl.assetId != b))
853+ let cm = value(aR.payments[0])
854+ if ((cm.assetId != b))
852855 then throw("Allowed USDN payment only!")
853856 else {
854- let ce = (valueOrElse(getInteger(N(bR)), 0) + 1)
855- let cf = value(assetInfo(fromBase58String(bR)))
856- let ch = split(cf.description, "_")
857- let cG = fraction(r, (aT(ch[aa]) * ce), 25)
858- if ((cl.amount != cG))
859- then throw(("Payment attached should be " + toString(cG)))
860- else ca(false, aQ.caller, bR)
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)
861864 }
862865 }
863866
864867

github/deemru/w8io/026f985 
330.50 ms