tx · 1W7obizLaGvWBdXZfEaubk2K6eiBT59GaidPXP8kUwC

3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm:  -0.02400000 Waves

2023.01.03 00:14 [2387871] smart account 3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm > SELF 0.00000000 Waves

{ "type": 13, "id": "1W7obizLaGvWBdXZfEaubk2K6eiBT59GaidPXP8kUwC", "fee": 2400000, "feeAssetId": null, "timestamp": 1672694052800, "version": 2, "chainId": 84, "sender": "3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm", "senderPublicKey": "EVooykMNV691Venwp1dHUTBd7KWequzUcda57Wd3LQEX", "proofs": [ "58qphyjcb7BQ946h8JKtf8PPdG1xgR9YtXaLWdYpSeHwyWz4XzQLFNyWcTsHYTbQawijBzBY6stATEhibsFMvDVx" ], "script": "base64:BgJECAISABIDCgEIEgASAwoBCBIECgIBCBIECgICAhIECgIBCBIECgIBARIECgIICBIECgICAhIECgICAhIDCgEIEgMKAQhGAAVjaGFpbgkAsAkBCQDJAQIJAMoBAggFBHRoaXMFYnl0ZXMAAQABAAt1c2RuQXNzZXRJZAQHJG1hdGNoMAUFY2hhaW4DCQAAAgIBVwUHJG1hdGNoMAEgtiYpwwT1zlORpA5LdSQvZIxRsfrfr1QpvUjSHSqyqtEDCQAAAgIBVAUHJG1hdGNoMAEg93bq9/eDymXbbhPuAjvPWCmVqcHRjfJL2mzYHWKAyN4JAAIBAg1Vbmtub3duIGNoYWluAA1pbmN1YmF0b3JBZGRyBAckbWF0Y2gwBQVjaGFpbgMJAAACAgFXBQckbWF0Y2gwCQERQGV4dHJOYXRpdmUoMTA2MikBAiMzUEVrdFZ1eDJSaGNoU042M0RzRG80YjRtejRRcXpLU2VEdgMJAAACAgFUBQckbWF0Y2gwBQR0aGlzCQACAQINVW5rbm93biBjaGFpbgALYnJlZWRlckFkZHIEByRtYXRjaDAFBWNoYWluAwkAAAICAVcFByRtYXRjaDAJARFAZXh0ck5hdGl2ZSgxMDY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aXplAQkAkQMCBQFkBQtyZWNMYW5kU2l6ZQUIbmV3TGV2ZWwAGQMJAQIhPQIIBQNwbXQGYW1vdW50BQRjb3N0CQACAQkArAICAhtQYXltZW50IGF0dGFjaGVkIHNob3VsZCBiZSAJAKQDAQUEY29zdAkBDXVwSW5mcmFDb21tb24DBwgFAWkGY2FsbGVyBQtsYW5kQXNzZXRJZACrEgUf", "height": 2387871, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: B2WvBBewuyAuWfpZ9GxoG5bjbm73RWJdx3SK5jMRJT9w Next: G9cZG4s1GLBifyWweMPkziN9RE5V324pQQMCntsectAE Diff:
OldNewDifferences
9595 else throw("Unknown chain")
9696 }
9797
98-let u = 1000000
98+let u = {
99+ let c = a
100+ if (("W" == c))
101+ then 1673136000000
102+ else if (("T" == c))
103+ then 1672790400000
104+ else throw("Unknown chain")
105+ }
99106
100-let v = toBigInt(5)
107+let v = 1000000
101108
102-let w = toBigInt(20)
109+let w = toBigInt(5)
103110
104-let x = toBigInt((20 * 20))
111+let x = toBigInt(20)
105112
106-let y = toBigInt(((20 * 20) * 20))
113+let y = toBigInt((20 * 20))
107114
108-let z = toBigInt((((20 * 20) * 20) * 20))
115+let z = toBigInt(((20 * 20) * 20))
109116
110-let A = toBigInt(((((20 * 20) * 20) * 20) * 20))
117+let A = toBigInt((((20 * 20) * 20) * 20))
111118
112-let B = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"]
119+let B = toBigInt(((((20 * 20) * 20) * 20) * 20))
113120
114-let C = ["Asia", "Europe", "Americas", "Oceania", "Africa"]
121+let C = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"]
115122
116-func D () = "nextLandNum"
123+let D = ["Asia", "Europe", "Americas", "Oceania", "Africa"]
124+
125+func E () = "nextLandNum"
117126
118127
119-func E (F) = ("landToAsset_" + F)
128+func F (G) = ("landToAsset_" + G)
120129
121130
122-func G (F,H) = ((i + F) + H)
131+func H (G,I) = ((i + G) + I)
123132
124133
125-func I (J) = ("nftOwner_" + J)
134+func J (K) = ("nftOwner_" + K)
126135
127136
128-func K (J) = ("duckOwner_" + J)
137+func L (K) = ("duckOwner_" + K)
129138
130139
131-func L (J) = ("stakedTime_" + J)
140+func M (K) = ("stakedTime_" + K)
132141
133142
134-func M (J) = ("infraLevel_" + J)
143+func N (K) = ("infraLevel_" + K)
135144
136145
137-func N (O) = ("stakedDuckByOwner_" + O)
146+func O (K) = ("presaleArtActivated_" + K)
138147
139148
140-func P (Q,J,O) = ((((("stakedTimeByTypeAssetIdAndOwner_" + Q) + "_") + J) + "_") + O)
149+func P (Q) = ("stakedDuckByOwner_" + Q)
141150
142151
143-func R (F) = ("landOwner_" + F)
152+func R (S,K,Q) = ((((("stakedTimeByTypeAssetIdAndOwner_" + S) + "_") + K) + "_") + Q)
144153
145154
146-func S (T) = ("backPack_" + T)
155+func T (G) = ("landOwner_" + G)
147156
148157
149-func U (T) = ("duckLocation_" + T)
158+func U (V) = ("backPack_" + V)
150159
151160
152-func V (T) = ("duckHealth_" + T)
161+func W (V) = ("duckLocation_" + V)
153162
154163
155-func W () = "resTypesProportions"
164+func X (V) = ("duckHealth_" + V)
156165
157166
158-let X = 0
167+func Y () = "resTypesProportions"
159168
160-let Y = 1
161169
162-let Z = 2
170+let Z = 0
163171
164-let aa = 3
172+let aa = 1
165173
166-let ab = 0
174+let ab = 2
167175
168-let ac = 1
176+let ac = 3
169177
170-let ad = 2
178+let ad = 0
171179
172-let ae = 0
180+let ae = 1
173181
174-let af = 1
182+let af = 2
175183
176-let ag = 2
184+let ag = 0
177185
178-let ah = 3
186+let ah = 1
179187
180-func ai (aj) = {
181- let c = aj
188+let ai = 2
189+
190+let aj = 3
191+
192+func ak (al) = {
193+ let c = al
182194 if ($isInstanceOf(c, "String"))
183195 then {
184- let ak = c
185- ak
196+ let am = c
197+ am
186198 }
187199 else throw("fail to cast into String")
188200 }
189201
190202
191-func al (am) = {
192- let an = split(value(getString(W())), "_")
193- if ((size(an) != l))
203+func an (ao) = {
204+ let ap = split(value(getString(Y())), "_")
205+ if ((size(ap) != l))
194206 then throw("Wrong proportions data")
195207 else {
196- let ao = [parseIntValue(an[0]), parseIntValue(an[1]), parseIntValue(an[2]), parseIntValue(an[3]), parseIntValue(an[4]), parseIntValue(an[5])]
197- let ap = (((((ao[0] + ao[1]) + ao[2]) + ao[3]) + ao[4]) + ao[5])
198- if ((0 >= ap))
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))
199211 then throw("No lands staked")
200212 else {
201- let aq = fraction(am, u, ap)
202- func ar (as,at) = (as :+ fraction(at, aq, u))
213+ let as = fraction(ao, v, ar)
214+ func at (au,av) = (au :+ fraction(av, as, v))
203215
204- let au = ao
205- let av = size(au)
206- let aw = nil
207- func ax (ay,az) = if ((az >= av))
208- then ay
209- else ar(ay, au[az])
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])
210222
211- func aA (ay,az) = if ((az >= av))
212- then ay
223+ func aC (aA,aB) = if ((aB >= ax))
224+ then aA
213225 else throw("List size exceeds 6")
214226
215- aA(ax(ax(ax(ax(ax(ax(aw, 0), 1), 2), 3), 4), 5), 6)
227+ aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6)
216228 }
217229 }
218230 }
219231
220232
221-func aB (aC,aD,aE) = {
222- let aF = al(aE)
223- func aG (as,aH) = {
224- let aI = (parseIntValue(aD[aH]) - aF[aH])
225- if ((0 > aI))
226- then throw(((((("Not enough material idx=" + toString(aH)) + ", you have ") + aD[aH]) + ", but need ") + toString(aF[aH])))
227- else (as :+ toString(aI))
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))
228240 }
229241
230- if (aC)
242+ if (aE)
231243 then {
232- let au = [0, 1, 2, 3, 4, 5]
233- let av = size(au)
234- let aw = nil
235- func ax (ay,az) = if ((az >= av))
236- then ay
237- else aG(ay, au[az])
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])
238250
239- func aA (ay,az) = if ((az >= av))
240- then ay
251+ func aC (aA,aB) = if ((aB >= ax))
252+ then aA
241253 else throw("List size exceeds 6")
242254
243- aA(ax(ax(ax(ax(ax(ax(aw, 0), 1), 2), 3), 4), 5), 6)
255+ aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6)
244256 }
245- else aD
257+ else aF
246258 }
247259
248260
249-func aJ (aK,aL,aM) = {
250- let an = split(valueOrElse(getString(W()), "0_0_0_0_0_0"), "_")
251- if ((size(an) != l))
261+func aL (aM,aN,aO) = {
262+ let ap = split(valueOrElse(getString(Y()), "0_0_0_0_0_0"), "_")
263+ if ((size(ap) != l))
252264 then throw("Wrong proportions data")
253265 else {
254- func aN (as,aO) = {
255- let aI = (parseIntValue(an[aO]) + ((aM * aK[aO]) * aL))
256- if ((0 > aI))
257- then throw(((((((("Panic! Pieces of type=" + toString(aO)) + ", sign=") + toString(aM)) + ", terrainCounts[i]=") + toString(aK[aO])) + ", landSizeIndex=") + toString(aL)))
258- else (as :+ toString(aI))
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))
259271 }
260272
261- let ao = {
262- let au = [0, 1, 2, 3, 4, 5]
263- let av = size(au)
264- let aw = nil
265- func ax (ay,az) = if ((az >= av))
266- then ay
267- else aN(ay, au[az])
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])
268280
269- func aA (ay,az) = if ((az >= av))
270- then ay
281+ func aC (aA,aB) = if ((aB >= ax))
282+ then aA
271283 else throw("List size exceeds 6")
272284
273- aA(ax(ax(ax(ax(ax(ax(aw, 0), 1), 2), 3), 4), 5), 6)
285+ aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6)
274286 }
275- makeString(ao, "_")
287+ makeString(aq, "_")
276288 }
277289 }
278290
279291
280-func aP (aQ) = [(size(split(aQ, "A")) - 1), (size(split(aQ, "B")) - 1), (size(split(aQ, "C")) - 1), (size(split(aQ, "D")) - 1), (size(split(aQ, "E")) - 1), (size(split(aQ, "F")) - 1)]
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)]
281293
282294
283-func aR (H) = {
284- let c = H
295+func aT (I) = {
296+ let c = I
285297 if (("S" == c))
286298 then 25
287299 else if (("M" == c))
296308 }
297309
298310
299-func aS (aT,aH,aU) = {
300- func aV (as,aO) = (as :+ (if ((aO == aH))
301- then toString((parseIntValue(aT[aO]) - aU))
302- else aT[aO]))
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]))
303315
304- let ao = {
305- let au = [0, 1, 2, 3, 4, 5]
306- let av = size(au)
307- let aw = nil
308- func ax (ay,az) = if ((az >= av))
309- then ay
310- else aV(ay, au[az])
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])
311323
312- func aA (ay,az) = if ((az >= av))
313- then ay
324+ func aC (aA,aB) = if ((aB >= ax))
325+ then aA
314326 else throw("List size exceeds 6")
315327
316- aA(ax(ax(ax(ax(ax(ax(aw, 0), 1), 2), 3), 4), 5), 6)
328+ aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6)
317329 }
318- makeString(ao, "_")
330+ makeString(aq, "_")
319331 }
320332
321333
322-func aW (aX,aK,aY,aL) = {
323- func aZ (as,aO) = {
324- let ba = ((fraction(aY, m, n) * aK[aO]) * aL)
325- (as :+ toString((parseIntValue(aX[aO]) + ba)))
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)))
326338 }
327339
328- let ao = {
329- let au = [0, 1, 2, 3, 4, 5]
330- let av = size(au)
331- let aw = nil
332- func ax (ay,az) = if ((az >= av))
333- then ay
334- else aZ(ay, au[az])
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])
335347
336- func aA (ay,az) = if ((az >= av))
337- then ay
348+ func aC (aA,aB) = if ((aB >= ax))
349+ then aA
338350 else throw("List size exceeds 6")
339351
340- aA(ax(ax(ax(ax(ax(ax(aw, 0), 1), 2), 3), 4), 5), 6)
352+ aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6)
341353 }
342- makeString(ao, "_")
354+ makeString(aq, "_")
343355 }
344356
345357
346-func bb (bc) = if ((bc >= toBigInt(0)))
347- then bc
348- else -(bc)
358+func be (bf) = if ((bf >= toBigInt(0)))
359+ then bf
360+ else -(bf)
349361
350362
351-let bd = [[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]]
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]]
352364
353-func be (bf,bg) = {
354- let bh = toInt((bf % w))
355- let bi = if ((bg[0] > bh))
365+func bh (bi,bj) = {
366+ let bk = toInt((bi % x))
367+ let bl = if ((bj[0] > bk))
356368 then "A"
357- else if ((bg[1] > bh))
369+ else if ((bj[1] > bk))
358370 then "B"
359- else if ((bg[2] > bh))
371+ else if ((bj[2] > bk))
360372 then "C"
361- else if ((bg[3] > bh))
373+ else if ((bj[3] > bk))
362374 then "D"
363- else if ((bg[4] > bh))
375+ else if ((bj[4] > bk))
364376 then "E"
365377 else "F"
366- bi
378+ bl
367379 }
368380
369381
370-func bj (bk) = {
371- let bl = split(valueOrElse(getString(bk), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":")
372-[toString(valueOrElse(parseInt(bl[ae]), 0)), if ((size(split(bl[af], "_")) == l))
373- then bl[af]
374- else "0_0_0_0_0_0", if ((size(split(bl[ag], "_")) == l))
375- then bl[ag]
376- else "0_0_0_0_0_0", bl[ah]]
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]]
377389 }
378390
379391
380-func bm (aC,bn,bo,bp,bq) = if (!(sigVerify_8Kb(bp, bq, g)))
392+func bp (aE,bq,br,bs,bt) = if (!(sigVerify_8Kb(bs, bt, g)))
381393 then throw("signature does not match")
382394 else {
383- let br = split(toUtf8String(bp), ";")
384- let bs = split(split(br[0], "|")[0], "_")
385- let bt = parseIntValue(bs[0])
386- let bu = parseIntValue(bs[1])
387- let bv = split(br[1], ":")
388- let bw = split(bv[0], "_")
389- if ((bw[1] != "E"))
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"))
390402 then throw("expedition target location type should be E")
391403 else {
392- let bx = parseIntValue(bv[1])
393- if (if ((bx > (lastBlock.timestamp + o)))
404+ let bA = parseIntValue(by[1])
405+ if (if ((bA > (lastBlock.timestamp + o)))
394406 then true
395- else ((lastBlock.timestamp - o) > bx))
407+ else ((lastBlock.timestamp - o) > bA))
396408 then throw("signature outdated")
397409 else {
398- let by = toString(bn)
399- let T = valueOrErrorMessage(getString(N(by)), "You don't have a duck staked")
400- let bz = V(T)
401- let bA = valueOrElse(getInteger(bz), 100)
402- if ((bA != bt))
403- then throw(((("oldHealth=" + toString(valueOrElse(getInteger(bz), 100))) + " from state does not match one from flight log=") + toString(bt)))
404- else if ((0 >= bt))
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))
405417 then throw("You can't fly with zero health")
406- else if ((0 >= bu))
418+ else if ((0 >= bx))
407419 then throw("Your duck health is zero, expedition failed")
408420 else {
409- let bk = S(T)
410- let bB = bj(bk)
411- let bC = split(bB[ag], "_")
412- let bD = makeString(aB(aC, bC, s), "_")
413- let bE = bb(toBigInt(bo))
414- let bF = valueOrElse(getInteger(D()), 501)
415- let F = toString(bF)
416- let bG = toInt((bE % v))
417- let bH = bd[bG]
418- func bI (as,at) = $Tuple2((((((as._1 + be(as._2, bH)) + be((as._2 / w), bH)) + be((as._2 / x), bH)) + be((as._2 / y), bH)) + be((as._2 / z), bH)), (as._2 / A))
421+ let bn = U(V)
422+ let bE = bm(bn)
423+ let bF = split(bE[ai], "_")
424+ let bG = makeString(aD(aE, bF, s), "_")
425+ let bH = be(toBigInt(br))
426+ let bI = valueOrElse(getInteger(E()), 501)
427+ let G = toString(bI)
428+ let bJ = toInt((bH % w))
429+ let bK = bg[bJ]
430+ 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))
419431
420- let bJ = {
421- let au = [1, 2, 3, 4, 5]
422- let av = size(au)
423- let aw = $Tuple2("", (bE / v))
424- func ax (ay,az) = if ((az >= av))
425- then ay
426- else bI(ay, au[az])
432+ let bM = {
433+ let aw = [1, 2, 3, 4, 5]
434+ let ax = size(aw)
435+ let ay = $Tuple2("", (bH / w))
436+ func az (aA,aB) = if ((aB >= ax))
437+ then aA
438+ else bL(aA, aw[aB])
427439
428- func aA (ay,az) = if ((az >= av))
429- then ay
440+ func aC (aA,aB) = if ((aB >= ax))
441+ then aA
430442 else throw("List size exceeds 5")
431443
432- aA(ax(ax(ax(ax(ax(aw, 0), 1), 2), 3), 4), 5)
444+ aC(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5)
433445 }
434- let bK = C[bG]
435- let bL = Issue(G(F, "S"), makeString([F, "S", bJ._1, bK], "_"), 1, 0, false)
436- let J = calculateAssetId(bL)
437- let bM = toBase58String(J)
438- $Tuple2([IntegerEntry(D(), (bF + 1)), bL, StringEntry(E(F), bM), StringEntry(I(bM), by), StringEntry(R(F), by), IntegerEntry(M(bM), 0), ScriptTransfer(bn, 1, J), StringEntry(U(T), makeString([bK, "L", bM], "_")), IntegerEntry(bz, bu), StringEntry(bk, makeString([bB[ae], bB[af], bD, bB[ah]], ":"))], unit)
446+ let bN = D[bJ]
447+ let bO = Issue(H(G, "S"), makeString([G, "S", bM._1, bN], "_"), 1, 0, false)
448+ let K = calculateAssetId(bO)
449+ let bP = toBase58String(K)
450+ $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]], ":"))], unit)
439451 }
440452 }
441453 }
442454 }
443455
444456
445-func bN (aC,bn,bO) = {
446- let bP = toString(bn)
447- let bQ = M(bO)
448- let bR = valueOrElse(getInteger(bQ), 0)
449- if ((bR >= 3))
457+func bQ (aE,bq,bR) = {
458+ let bS = toString(bq)
459+ let bT = N(bR)
460+ let bU = valueOrElse(getInteger(bT), 0)
461+ if ((bU >= 3))
450462 then throw("Currently max infrastructure level = 3")
451463 else {
452- let bS = (bR + 1)
453- let bT = value(assetInfo(fromBase58String(bO)))
454- if (!(contains(bT.name, i)))
464+ let bV = (bU + 1)
465+ let bW = value(assetInfo(fromBase58String(bR)))
466+ if (!(contains(bW.name, i)))
455467 then throw((("NFT " + i) + " token should be passed as param"))
456468 else {
457- let bU = L(bO)
458- let bV = getStringValue(I(bO))
459- if ((bV != bP))
469+ let bX = M(bR)
470+ let bY = getStringValue(J(bR))
471+ if ((bY != bS))
460472 then throw((i + " is not yours"))
461473 else {
462- let bW = split(bT.description, "_")
463- let H = bW[Y]
464- let bX = aR(H)
465- let T = valueOrErrorMessage(getString(N(bP)), "You don't have a duck staked")
466- let bY = valueOrElse(getString(U(T)), k)
467- let bZ = split(value(bY), "_")
468- if ((bZ[ac] != "L"))
469- then throw((("Duck location type is " + bZ[ac]) + ", but should be L"))
470- else if ((bZ[ad] != bO))
471- then throw(((("Duck location id is " + bZ[ad]) + ", but should be ") + bO))
474+ let bZ = split(bW.description, "_")
475+ let I = bZ[aa]
476+ let ca = aT(I)
477+ let V = valueOrErrorMessage(getString(P(bS)), "You don't have a duck staked")
478+ let cb = valueOrElse(getString(W(V)), k)
479+ let cc = split(value(cb), "_")
480+ if ((cc[ae] != "L"))
481+ then throw((("Duck location type is " + cc[ae]) + ", but should be L"))
482+ else if ((cc[af] != bR))
483+ then throw(((("Duck location id is " + cc[af]) + ", but should be ") + bR))
472484 else {
473- let bk = S(T)
474- let bB = bj(bk)
475- let bC = split(bB[ag], "_")
476- let bD = makeString(aB(aC, bC, fraction(q, (bX * bS), 25)), "_")
477- let ca = valueOrErrorMessage(getInteger(bU), (("NFT " + bT.name) + " is not staked"))
478- let aY = (lastBlock.timestamp - ca)
479- if ((0 > aY))
480- then throw(((("Saved timestamp is in future, saved = " + toString(ca)) + ", current = ") + toString(lastBlock.timestamp)))
485+ let bn = U(V)
486+ let bE = bm(bn)
487+ let bF = split(bE[ai], "_")
488+ let bG = makeString(aD(aE, bF, fraction(q, (ca * bV), 25)), "_")
489+ let cd = valueOrErrorMessage(getInteger(bX), (("NFT " + bW.name) + " is not staked"))
490+ let ba = (lastBlock.timestamp - cd)
491+ if ((0 > ba))
492+ then throw(((("Saved timestamp is in future, saved = " + toString(cd)) + ", current = ") + toString(lastBlock.timestamp)))
481493 else {
482- let cb = (fraction(aY, m, n) * bX)
483- let cc = ai(invoke(this, "claimRes", [cb, bO], nil))
484- $Tuple2([IntegerEntry(bQ, bS), StringEntry(bk, makeString([bB[ae], cc, bD, bB[ah]], ":"))], bS)
494+ let ce = (fraction(ba, m, n) * ca)
495+ let cf = ak(invoke(this, "claimRes", [ce, bR], nil))
496+ $Tuple2([IntegerEntry(bT, bV), StringEntry(bn, makeString([bE[ag], cf, bG, bE[aj]], ":"))], bV)
485497 }
486498 }
487499 }
490502 }
491503
492504
493-@Callable(aO)
505+func cg (bR) = {
506+ let ch = valueOrElse(getInteger(N(bR)), 0)
507+ let ci = if (valueOrElse(getBoolean(O(bR)), false))
508+ then 3
509+ else 0
510+ ((m + fraction(m, ch, 4)) + fraction(m, ci, 20))
511+ }
512+
513+
514+@Callable(aQ)
494515 func stakeLand () = {
495- let cd = value(aO.payments[0])
496- let J = value(cd.assetId)
497- let ce = toString(aO.caller)
498- if ((cd.amount != 1))
516+ let cj = value(aQ.payments[0])
517+ let K = value(cj.assetId)
518+ let ck = toString(aQ.caller)
519+ if ((cj.amount != 1))
499520 then throw((("NFT " + i) + " token should be attached as payment"))
500521 else {
501- let bT = value(assetInfo(J))
502- if ((bT.issuer != this))
522+ let bW = value(assetInfo(K))
523+ if ((bW.issuer != this))
503524 then throw("Unknown issuer of token")
504- else if (!(contains(bT.name, i)))
525+ else if (!(contains(bW.name, i)))
505526 then throw((("Only NFT " + i) + " tokens are accepted"))
506527 else {
507- let cf = drop(bT.name, 4)
508- let F = if (contains(cf, "XXL"))
509- then dropRight(cf, 3)
510- else if (contains(cf, "XL"))
511- then dropRight(cf, 2)
512- else dropRight(cf, 1)
513- if (!(isDefined(parseInt(F))))
514- then throw(("Cannot parse land number from " + bT.name))
528+ let cl = drop(bW.name, 4)
529+ let G = if (contains(cl, "XXL"))
530+ then dropRight(cl, 3)
531+ else if (contains(cl, "XL"))
532+ then dropRight(cl, 2)
533+ else dropRight(cl, 1)
534+ let cm = valueOrErrorMessage(parseInt(G), ("Cannot parse land number from " + bW.name))
535+ let bR = toBase58String(K)
536+ let bX = M(bR)
537+ if (isDefined(getInteger(bX)))
538+ then throw((("NFT " + bW.name) + " is already staked"))
515539 else {
516- let bU = L(toBase58String(J))
517- if (isDefined(getInteger(bU)))
518- then throw((("NFT " + bT.name) + " is already staked"))
519- else {
520- let bW = split(bT.description, "_")
521- let aK = aP(bW[Z])
522- let an = aJ(aK, (aR(bW[Y]) / 25), 1)
523-[IntegerEntry(bU, lastBlock.timestamp), IntegerEntry(P(i, toBase58String(J), ce), lastBlock.timestamp), StringEntry(I(toBase58String(J)), ce), StringEntry(R(F), ce), StringEntry(W(), an)]
524- }
540+ let bZ = split(bW.description, "_")
541+ let aM = aR(bZ[ab])
542+ let ap = aL(aM, (aT(bZ[aa]) / 25), 1)
543+ let cn = if ((500 >= cm))
544+ then (lastBlock.timestamp > u)
545+ else false
546+[IntegerEntry(bX, lastBlock.timestamp), BooleanEntry(O(bR), cn), IntegerEntry(R(i, bR, ck), lastBlock.timestamp), StringEntry(J(bR), ck), StringEntry(T(G), ck), StringEntry(Y(), ap)]
525547 }
526548 }
527549 }
529551
530552
531553
532-@Callable(aO)
533-func unstakeLand (bO) = if ((size(aO.payments) != 0))
554+@Callable(aQ)
555+func unstakeLand (bR) = if ((size(aQ.payments) != 0))
534556 then throw("unstake doesn't require any payments")
535557 else {
536- let J = fromBase58String(bO)
537- let ce = toString(aO.caller)
538- let bT = value(assetInfo(J))
539- if ((bT.issuer != this))
558+ let K = fromBase58String(bR)
559+ let ck = toString(aQ.caller)
560+ let bW = value(assetInfo(K))
561+ if ((bW.issuer != this))
540562 then throw("Unknown issuer of token")
541- else if (!(contains(bT.name, i)))
563+ else if (!(contains(bW.name, i)))
542564 then throw((("Only NFT " + i) + " tokens can be unstaked"))
543565 else {
544- let bU = L(bO)
545- if (!(isDefined(bU)))
546- then throw((("NFT " + bT.name) + " is not staked"))
566+ let bX = M(bR)
567+ if (!(isDefined(bX)))
568+ then throw((("NFT " + bW.name) + " is not staked"))
547569 else {
548- let bV = valueOrErrorMessage(getString(I(bO)), (("NFT " + bT.name) + " is orphaned"))
549- if ((bV != ce))
570+ let bY = valueOrErrorMessage(getString(J(bR)), (("NFT " + bW.name) + " is orphaned"))
571+ if ((bY != ck))
550572 then throw("Staked NFT is not yours")
551573 else {
552- let bW = split(bT.description, "_")
553- let aK = aP(bW[Z])
554- let an = aJ(aK, (aR(bW[Y]) / 25), -1)
555-[ScriptTransfer(aO.caller, 1, J), DeleteEntry(bU), DeleteEntry(P(i, bO, ce)), StringEntry(W(), an)]
574+ let bZ = split(bW.description, "_")
575+ let aM = aR(bZ[ab])
576+ let ap = aL(aM, (aT(bZ[aa]) / 25), -1)
577+[ScriptTransfer(aQ.caller, 1, K), DeleteEntry(bX), DeleteEntry(R(i, bR, ck)), StringEntry(Y(), ap)]
556578 }
557579 }
558580 }
560582
561583
562584
563-@Callable(aO)
585+@Callable(aQ)
564586 func stakeDuck () = {
565- let cd = value(aO.payments[0])
566- let J = value(cd.assetId)
567- let ce = toString(aO.caller)
568- if ((cd.amount != 1))
587+ let cj = value(aQ.payments[0])
588+ let K = value(cj.assetId)
589+ let ck = toString(aQ.caller)
590+ if ((cj.amount != 1))
569591 then throw((("NFT " + j) + " token should be attached as payment"))
570592 else {
571- let bT = value(assetInfo(J))
572- if (if ((bT.issuer != d))
573- then (bT.issuer != e)
593+ let bW = value(assetInfo(K))
594+ if (if ((bW.issuer != d))
595+ then (bW.issuer != e)
574596 else false)
575597 then throw((("Unknown issuer of " + j) + " token"))
576- else if (!(contains(bT.name, j)))
598+ else if (!(contains(bW.name, j)))
577599 then throw((("Only NFT " + j) + " tokens are accepted"))
578600 else {
579- let cg = toBase58String(J)
580- let bU = L(cg)
581- if (isDefined(getInteger(bU)))
582- then throw((("NFT " + bT.name) + " is already staked"))
583- else if (isDefined(getString(N(ce))))
584- then throw(("You already staked one duck: " + bT.name))
601+ let co = toBase58String(K)
602+ let bX = M(co)
603+ if (isDefined(getInteger(bX)))
604+ then throw((("NFT " + bW.name) + " is already staked"))
605+ else if (isDefined(getString(P(ck))))
606+ then throw(("You already staked one duck: " + bW.name))
585607 else {
586- let ch = U(cg)
587- let ci = getString(ch)
588- let bz = V(cg)
589- let cj = getInteger(bz)
590- let bk = S(cg)
591- let ck = getString(bk)
592- ([IntegerEntry(bU, lastBlock.timestamp), IntegerEntry(P(j, toBase58String(J), ce), lastBlock.timestamp), StringEntry(K(cg), ce), StringEntry(N(ce), cg)] ++ (if (isDefined(ci))
608+ let cp = W(co)
609+ let cq = getString(cp)
610+ let bC = X(co)
611+ let cr = getInteger(bC)
612+ let bn = U(co)
613+ let cs = getString(bn)
614+ ([IntegerEntry(bX, lastBlock.timestamp), IntegerEntry(R(j, toBase58String(K), ck), lastBlock.timestamp), StringEntry(L(co), ck), StringEntry(P(ck), co)] ++ (if (isDefined(cq))
593615 then nil
594- else ([StringEntry(ch, k)] ++ (if (isDefined(cj))
616+ else ([StringEntry(cp, k)] ++ (if (isDefined(cr))
595617 then nil
596- else ([IntegerEntry(bz, 100)] ++ (if (isDefined(ck))
618+ else ([IntegerEntry(bC, 100)] ++ (if (isDefined(cs))
597619 then nil
598- else [StringEntry(bk, "0:0_0_0_0_0_0:0_0_0_0_0_0:")]))))))
620+ else [StringEntry(bn, "0:0_0_0_0_0_0:0_0_0_0_0_0:")]))))))
599621 }
600622 }
601623 }
603625
604626
605627
606-@Callable(aO)
607-func unstakeDuck (cg) = if ((size(aO.payments) != 0))
628+@Callable(aQ)
629+func unstakeDuck (co) = if ((size(aQ.payments) != 0))
608630 then throw("unstake doesn't require any payments")
609631 else {
610- let J = fromBase58String(cg)
611- let ce = toString(aO.caller)
612- let bT = value(assetInfo(J))
613- if (if ((bT.issuer != d))
614- then (bT.issuer != e)
632+ let K = fromBase58String(co)
633+ let ck = toString(aQ.caller)
634+ let bW = value(assetInfo(K))
635+ if (if ((bW.issuer != d))
636+ then (bW.issuer != e)
615637 else false)
616638 then throw((("Unknown issuer of " + j) + " token"))
617- else if (!(contains(bT.name, j)))
639+ else if (!(contains(bW.name, j)))
618640 then throw((("Only NFT " + j) + " tokens can be unstaked"))
619641 else {
620- let bU = L(toBase58String(J))
621- if (!(isDefined(bU)))
622- then throw((("NFT " + bT.name) + " is not staked"))
623- else if (!(isDefined(N(ce))))
624- then throw((("The duck " + bT.name) + " is not staked"))
642+ let bX = M(toBase58String(K))
643+ if (!(isDefined(bX)))
644+ then throw((("NFT " + bW.name) + " is not staked"))
645+ else if (!(isDefined(P(ck))))
646+ then throw((("The duck " + bW.name) + " is not staked"))
625647 else {
626- let bV = valueOrErrorMessage(getString(K(toBase58String(J))), (("NFT " + bT.name) + " is orphaned"))
627- if ((bV != ce))
648+ let bY = valueOrErrorMessage(getString(L(toBase58String(K))), (("NFT " + bW.name) + " is orphaned"))
649+ if ((bY != ck))
628650 then throw("Staked NFT is not yours")
629- else [ScriptTransfer(aO.caller, 1, J), DeleteEntry(bU), DeleteEntry(U(cg)), DeleteEntry(P(j, cg, ce)), DeleteEntry(N(ce))]
651+ else [ScriptTransfer(aQ.caller, 1, K), DeleteEntry(bX), DeleteEntry(W(co)), DeleteEntry(R(j, co, ck)), DeleteEntry(P(ck))]
630652 }
631653 }
632654 }
633655
634656
635657
636-@Callable(aO)
637-func claimRes (aU,bO) = if ((size(aO.payments) != 0))
658+@Callable(aQ)
659+func claimRes (aW,bR) = if ((size(aQ.payments) != 0))
638660 then throw("claimRes doesn't require any payments")
639661 else {
640- let bP = toString(aO.originCaller)
641- let bT = value(assetInfo(fromBase58String(bO)))
642- if (!(contains(bT.name, i)))
662+ let bS = toString(aQ.originCaller)
663+ let bW = value(assetInfo(fromBase58String(bR)))
664+ if (!(contains(bW.name, i)))
643665 then throw((("NFT " + i) + " token should be passed as param"))
644666 else {
645- let bU = L(bO)
646- let bV = getStringValue(I(bO))
647- if ((bV != bP))
667+ let bX = M(bR)
668+ let bY = getStringValue(J(bR))
669+ if ((bY != bS))
648670 then throw((i + " is not yours"))
649671 else {
650- let bW = split(bT.description, "_")
651- let H = bW[Y]
652- let aK = aP(bW[Z])
653- let T = valueOrErrorMessage(getString(N(bP)), "You don't have a duck staked")
654- let bY = valueOrElse(getString(U(T)), k)
655- let bZ = split(value(bY), "_")
656- if ((bZ[ac] != "L"))
657- then throw((("Duck location type is " + bZ[ac]) + ", but should be L"))
658- else if ((bZ[ad] != bO))
659- then throw(((("Duck location id is " + bZ[ad]) + ", but should be ") + bO))
672+ let bZ = split(bW.description, "_")
673+ let I = bZ[aa]
674+ let aM = aR(bZ[ab])
675+ let V = valueOrErrorMessage(getString(P(bS)), "You don't have a duck staked")
676+ let cb = valueOrElse(getString(W(V)), k)
677+ let cc = split(value(cb), "_")
678+ if ((cc[ae] != "L"))
679+ then throw((("Duck location type is " + cc[ae]) + ", but should be L"))
680+ else if ((cc[af] != bR))
681+ then throw(((("Duck location id is " + cc[af]) + ", but should be ") + bR))
660682 else {
661- let ca = valueOrErrorMessage(getInteger(bU), (("NFT " + bT.name) + " is not staked"))
662- let aY = (lastBlock.timestamp - ca)
663- if ((0 > aY))
664- then throw(((("Saved timestamp is in future, saved = " + toString(ca)) + ", current = ") + toString(lastBlock.timestamp)))
683+ let cd = valueOrErrorMessage(getInteger(bX), (("NFT " + bW.name) + " is not staked"))
684+ let ba = (lastBlock.timestamp - cd)
685+ if ((0 > ba))
686+ then throw(((("Saved timestamp is in future, saved = " + toString(cd)) + ", current = ") + toString(lastBlock.timestamp)))
665687 else {
666- let bX = aR(H)
667- let cl = valueOrElse(getInteger(M(bO)), 0)
668- let cb = (fraction((aY + fraction(aY, cl, 4)), m, n) * bX)
669- if ((aU > cb))
670- then throw(((("Not enough resources, available = " + toString(cb)) + ", requested = ") + toString(aU)))
688+ let ca = aT(I)
689+ let ct = cg(bR)
690+ let ce = fraction(ba, (ct * ca), n)
691+ if ((aW > ce))
692+ then throw(((("Not enough resources, available = " + toString(ce)) + ", requested = ") + toString(aW)))
671693 else {
672- let cm = fraction((cb - aU), n, (bX * m))
673- let cn = (lastBlock.timestamp - cm)
674- let bk = S(T)
675- let bB = bj(bk)
676- let aX = split(bB[af], "_")
677- let co = aW(aX, aK, ((aY - cm) + fraction((aY - cm), cl, 4)), (bX / 25))
678- let cp = makeString([bB[ae], co, bB[ag], bB[ah]], ":")
679- $Tuple2([StringEntry(bk, cp), IntegerEntry(bU, cn), IntegerEntry(P(i, bO, bV), cn)], co)
694+ let cu = fraction((ce - aW), n, (ct * ca))
695+ let cv = (lastBlock.timestamp - cu)
696+ let bn = U(V)
697+ let bE = bm(bn)
698+ let aZ = split(bE[ah], "_")
699+ let cw = aY(aZ, aM, (ba - cu), (ca / 25), ct)
700+ let cx = makeString([bE[ag], cw, bE[ai], bE[aj]], ":")
701+ $Tuple2([StringEntry(bn, cx), IntegerEntry(bX, cv), IntegerEntry(R(i, bR, bY), cv)], cw)
680702 }
681703 }
682704 }
686708
687709
688710
689-@Callable(aO)
690-func flight (bp,bq) = if (!(sigVerify_8Kb(bp, bq, g)))
711+@Callable(aQ)
712+func flight (bs,bt) = if (!(sigVerify_8Kb(bs, bt, g)))
691713 then throw("signature does not match")
692- else if ((size(aO.payments) != 0))
714+ else if ((size(aQ.payments) != 0))
693715 then throw("flight doesn't require any payments")
694716 else {
695- let br = split(toUtf8String(bp), ";")
696- let bs = split(split(br[0], "|")[0], "_")
697- let bt = parseIntValue(bs[0])
698- let bu = parseIntValue(bs[1])
699- let cq = split(br[1], ":")
700- let cr = cq[0]
701- let bx = parseIntValue(cq[1])
702- if (if ((bx > (lastBlock.timestamp + o)))
717+ let bu = split(toUtf8String(bs), ";")
718+ let bv = split(split(bu[0], "|")[0], "_")
719+ let bw = parseIntValue(bv[0])
720+ let bx = parseIntValue(bv[1])
721+ let cy = split(bu[1], ":")
722+ let cz = cy[0]
723+ let bA = parseIntValue(cy[1])
724+ if (if ((bA > (lastBlock.timestamp + o)))
703725 then true
704- else ((lastBlock.timestamp - o) > bx))
726+ else ((lastBlock.timestamp - o) > bA))
705727 then throw("signature outdated")
706728 else {
707- let T = valueOrErrorMessage(getString(N(toString(aO.caller))), "You don't have a duck staked")
708- let bz = V(T)
709- let bA = valueOrElse(getInteger(bz), 100)
710- if ((bA != bt))
711- then throw(((("oldHealth=" + toString(valueOrElse(getInteger(bz), 100))) + " from state does not match one from flight log=") + toString(bt)))
712- else if ((0 >= bt))
729+ let V = valueOrErrorMessage(getString(P(toString(aQ.caller))), "You don't have a duck staked")
730+ let bC = X(V)
731+ let bD = valueOrElse(getInteger(bC), 100)
732+ if ((bD != bw))
733+ then throw(((("oldHealth=" + toString(valueOrElse(getInteger(bC), 100))) + " from state does not match one from flight log=") + toString(bw)))
734+ else if ((0 >= bw))
713735 then throw("You can't fly with zero health")
714736 else {
715- let ch = U(T)
716- let bY = valueOrElse(getString(ch), k)
717- if ((cr == bY))
737+ let cp = W(V)
738+ let cb = valueOrElse(getString(cp), k)
739+ if ((cz == cb))
718740 then throw("You can't fly to the same location")
719- else $Tuple2([StringEntry(ch, if ((bu > 0))
720- then cr
721- else bY), IntegerEntry(bz, bu)], unit)
741+ else $Tuple2([StringEntry(cp, if ((bx > 0))
742+ then cz
743+ else cb), IntegerEntry(bC, bx)], unit)
722744 }
723745 }
724746 }
725747
726748
727749
728-@Callable(aO)
729-func setHealth (cj,T) = if (if ((0 > cj))
750+@Callable(aQ)
751+func setHealth (cr,V) = if (if ((0 > cr))
730752 then true
731- else (cj > 100))
753+ else (cr > 100))
732754 then throw("HP should be within 0..100")
733- else [IntegerEntry(V(T), cj)]
755+ else [IntegerEntry(X(V), cr)]
734756
735757
736758
737-@Callable(aO)
738-func heal (cs,aU) = if (if ((0 > cs))
759+@Callable(aQ)
760+func heal (cA,aW) = if (if ((0 > cA))
739761 then true
740- else (cs >= l))
741- then throw(("Unknown material: " + toString(cs)))
742- else if ((0 >= aU))
743- then throw(("Amount should be positive! " + toString(aU)))
762+ else (cA >= l))
763+ then throw(("Unknown material: " + toString(cA)))
764+ else if ((0 >= aW))
765+ then throw(("Amount should be positive! " + toString(aW)))
744766 else {
745- let T = valueOrErrorMessage(getString(N(toString(aO.caller))), "You don't have a duck staked")
746- let bz = V(T)
747- let ct = valueOrElse(getInteger(bz), 100)
748- if ((ct >= 100))
767+ let V = valueOrErrorMessage(getString(P(toString(aQ.caller))), "You don't have a duck staked")
768+ let bC = X(V)
769+ let cB = valueOrElse(getInteger(bC), 100)
770+ if ((cB >= 100))
749771 then throw("HP should be < 100 to heal")
750772 else {
751- let bk = S(T)
752- let bB = bj(bk)
753- let bC = split(bB[ag], "_")
754- let cu = parseIntValue(bC[cs])
755- let cv = min([(aU / h), (100 - ct)])
756- let cw = (cv * h)
757- if ((cw > cu))
758- then throw(((((("You need " + toString(cw)) + " of ") + B[cs]) + " to heal, but you backpack contains ") + toString(cu)))
773+ let bn = U(V)
774+ let bE = bm(bn)
775+ let bF = split(bE[ai], "_")
776+ let cC = parseIntValue(bF[cA])
777+ let cD = min([(aW / h), (100 - cB)])
778+ let cE = (cD * h)
779+ if ((cE > cC))
780+ then throw(((((("You need " + toString(cE)) + " of ") + C[cA]) + " to heal, but you backpack contains ") + toString(cC)))
759781 else {
760- let bD = aS(bC, cs, cw)
761-[IntegerEntry(bz, (ct + cv)), StringEntry(bk, makeString([bB[ae], bB[af], bD, bB[ah]], ":"))]
782+ let bG = aU(bF, cA, cE)
783+[IntegerEntry(bC, (cB + cD)), StringEntry(bn, makeString([bE[ag], bE[ah], bG, bE[aj]], ":"))]
762784 }
763785 }
764786 }
765787
766788
767789
768-@Callable(aO)
769-func updateBackpack (T,cp) = if ((aO.caller != f))
790+@Callable(aQ)
791+func updateBackpack (V,cx) = if ((aQ.caller != f))
770792 then throw("permission denied")
771- else $Tuple2([StringEntry(S(T), cp)], cp)
793+ else $Tuple2([StringEntry(U(V), cx)], cx)
772794
773795
774796
775-@Callable(aO)
776-func expeditionBuy (bp,bq) = if ((size(aO.payments) != 1))
797+@Callable(aQ)
798+func expeditionBuy (bs,bt) = if ((size(aQ.payments) != 1))
777799 then throw("Exactly one payment required")
778800 else {
779- let cd = value(aO.payments[0])
780- if ((cd.assetId != b))
801+ let cj = value(aQ.payments[0])
802+ if ((cj.assetId != b))
781803 then throw("Allowed USDN payment only!")
782- else if ((cd.amount != t))
804+ else if ((cj.amount != t))
783805 then throw(("Payment attached should be " + toString(t)))
784- else bm(false, aO.caller, aO.transactionId, bp, bq)
806+ else bp(false, aQ.caller, aQ.transactionId, bs, bt)
785807 }
786808
787809
788810
789-@Callable(aO)
790-func expedition (bp,bq) = if ((size(aO.payments) != 0))
811+@Callable(aQ)
812+func expedition (bs,bt) = if ((size(aQ.payments) != 0))
791813 then throw("expedition doesn't require any payments")
792- else bm(true, aO.caller, aO.transactionId, bp, bq)
814+ else bp(true, aQ.caller, aQ.transactionId, bs, bt)
793815
794816
795817
796-@Callable(aO)
797-func upgradeInfra (bO) = if ((size(aO.payments) != 0))
818+@Callable(aQ)
819+func upgradeInfra (bR) = if ((size(aQ.payments) != 0))
798820 then throw("Infrastructure upgrade doesn't require any payments")
799- else bN(true, aO.caller, bO)
821+ else bQ(true, aQ.caller, bR)
800822
801823
802824
803-@Callable(aO)
804-func upgradeInfraUsdn (bO) = if ((size(aO.payments) != 1))
825+@Callable(aQ)
826+func upgradeInfraUsdn (bR) = if ((size(aQ.payments) != 1))
805827 then throw("Exactly one payment required")
806828 else {
807- let cd = value(aO.payments[0])
808- if ((cd.assetId != b))
829+ let cj = value(aQ.payments[0])
830+ if ((cj.assetId != b))
809831 then throw("Allowed USDN payment only!")
810832 else {
811- let bS = (valueOrElse(getInteger(M(bO)), 0) + 1)
812- let bT = value(assetInfo(fromBase58String(bO)))
813- let bW = split(bT.description, "_")
814- let cx = fraction(r, (aR(bW[Y]) * bS), 25)
815- if ((cd.amount != cx))
816- then throw(("Payment attached should be " + toString(cx)))
817- else bN(false, aO.caller, bO)
833+ let bV = (valueOrElse(getInteger(N(bR)), 0) + 1)
834+ let bW = value(assetInfo(fromBase58String(bR)))
835+ let bZ = split(bW.description, "_")
836+ let cF = fraction(r, (aT(bZ[aa]) * bV), 25)
837+ if ((cj.amount != cF))
838+ then throw(("Payment attached should be " + toString(cF)))
839+ else bQ(false, aQ.caller, bR)
818840 }
819841 }
820842
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
98-let u = 1000000
98+let u = {
99+ let c = a
100+ if (("W" == c))
101+ then 1673136000000
102+ else if (("T" == c))
103+ then 1672790400000
104+ else throw("Unknown chain")
105+ }
99106
100-let v = toBigInt(5)
107+let v = 1000000
101108
102-let w = toBigInt(20)
109+let w = toBigInt(5)
103110
104-let x = toBigInt((20 * 20))
111+let x = toBigInt(20)
105112
106-let y = toBigInt(((20 * 20) * 20))
113+let y = toBigInt((20 * 20))
107114
108-let z = toBigInt((((20 * 20) * 20) * 20))
115+let z = toBigInt(((20 * 20) * 20))
109116
110-let A = toBigInt(((((20 * 20) * 20) * 20) * 20))
117+let A = toBigInt((((20 * 20) * 20) * 20))
111118
112-let B = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"]
119+let B = toBigInt(((((20 * 20) * 20) * 20) * 20))
113120
114-let C = ["Asia", "Europe", "Americas", "Oceania", "Africa"]
121+let C = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"]
115122
116-func D () = "nextLandNum"
123+let D = ["Asia", "Europe", "Americas", "Oceania", "Africa"]
124+
125+func E () = "nextLandNum"
117126
118127
119-func E (F) = ("landToAsset_" + F)
128+func F (G) = ("landToAsset_" + G)
120129
121130
122-func G (F,H) = ((i + F) + H)
131+func H (G,I) = ((i + G) + I)
123132
124133
125-func I (J) = ("nftOwner_" + J)
134+func J (K) = ("nftOwner_" + K)
126135
127136
128-func K (J) = ("duckOwner_" + J)
137+func L (K) = ("duckOwner_" + K)
129138
130139
131-func L (J) = ("stakedTime_" + J)
140+func M (K) = ("stakedTime_" + K)
132141
133142
134-func M (J) = ("infraLevel_" + J)
143+func N (K) = ("infraLevel_" + K)
135144
136145
137-func N (O) = ("stakedDuckByOwner_" + O)
146+func O (K) = ("presaleArtActivated_" + K)
138147
139148
140-func P (Q,J,O) = ((((("stakedTimeByTypeAssetIdAndOwner_" + Q) + "_") + J) + "_") + O)
149+func P (Q) = ("stakedDuckByOwner_" + Q)
141150
142151
143-func R (F) = ("landOwner_" + F)
152+func R (S,K,Q) = ((((("stakedTimeByTypeAssetIdAndOwner_" + S) + "_") + K) + "_") + Q)
144153
145154
146-func S (T) = ("backPack_" + T)
155+func T (G) = ("landOwner_" + G)
147156
148157
149-func U (T) = ("duckLocation_" + T)
158+func U (V) = ("backPack_" + V)
150159
151160
152-func V (T) = ("duckHealth_" + T)
161+func W (V) = ("duckLocation_" + V)
153162
154163
155-func W () = "resTypesProportions"
164+func X (V) = ("duckHealth_" + V)
156165
157166
158-let X = 0
167+func Y () = "resTypesProportions"
159168
160-let Y = 1
161169
162-let Z = 2
170+let Z = 0
163171
164-let aa = 3
172+let aa = 1
165173
166-let ab = 0
174+let ab = 2
167175
168-let ac = 1
176+let ac = 3
169177
170-let ad = 2
178+let ad = 0
171179
172-let ae = 0
180+let ae = 1
173181
174-let af = 1
182+let af = 2
175183
176-let ag = 2
184+let ag = 0
177185
178-let ah = 3
186+let ah = 1
179187
180-func ai (aj) = {
181- let c = aj
188+let ai = 2
189+
190+let aj = 3
191+
192+func ak (al) = {
193+ let c = al
182194 if ($isInstanceOf(c, "String"))
183195 then {
184- let ak = c
185- ak
196+ let am = c
197+ am
186198 }
187199 else throw("fail to cast into String")
188200 }
189201
190202
191-func al (am) = {
192- let an = split(value(getString(W())), "_")
193- if ((size(an) != l))
203+func an (ao) = {
204+ let ap = split(value(getString(Y())), "_")
205+ if ((size(ap) != l))
194206 then throw("Wrong proportions data")
195207 else {
196- let ao = [parseIntValue(an[0]), parseIntValue(an[1]), parseIntValue(an[2]), parseIntValue(an[3]), parseIntValue(an[4]), parseIntValue(an[5])]
197- let ap = (((((ao[0] + ao[1]) + ao[2]) + ao[3]) + ao[4]) + ao[5])
198- if ((0 >= ap))
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))
199211 then throw("No lands staked")
200212 else {
201- let aq = fraction(am, u, ap)
202- func ar (as,at) = (as :+ fraction(at, aq, u))
213+ let as = fraction(ao, v, ar)
214+ func at (au,av) = (au :+ fraction(av, as, v))
203215
204- let au = ao
205- let av = size(au)
206- let aw = nil
207- func ax (ay,az) = if ((az >= av))
208- then ay
209- else ar(ay, au[az])
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])
210222
211- func aA (ay,az) = if ((az >= av))
212- then ay
223+ func aC (aA,aB) = if ((aB >= ax))
224+ then aA
213225 else throw("List size exceeds 6")
214226
215- aA(ax(ax(ax(ax(ax(ax(aw, 0), 1), 2), 3), 4), 5), 6)
227+ aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6)
216228 }
217229 }
218230 }
219231
220232
221-func aB (aC,aD,aE) = {
222- let aF = al(aE)
223- func aG (as,aH) = {
224- let aI = (parseIntValue(aD[aH]) - aF[aH])
225- if ((0 > aI))
226- then throw(((((("Not enough material idx=" + toString(aH)) + ", you have ") + aD[aH]) + ", but need ") + toString(aF[aH])))
227- else (as :+ toString(aI))
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))
228240 }
229241
230- if (aC)
242+ if (aE)
231243 then {
232- let au = [0, 1, 2, 3, 4, 5]
233- let av = size(au)
234- let aw = nil
235- func ax (ay,az) = if ((az >= av))
236- then ay
237- else aG(ay, au[az])
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])
238250
239- func aA (ay,az) = if ((az >= av))
240- then ay
251+ func aC (aA,aB) = if ((aB >= ax))
252+ then aA
241253 else throw("List size exceeds 6")
242254
243- aA(ax(ax(ax(ax(ax(ax(aw, 0), 1), 2), 3), 4), 5), 6)
255+ aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6)
244256 }
245- else aD
257+ else aF
246258 }
247259
248260
249-func aJ (aK,aL,aM) = {
250- let an = split(valueOrElse(getString(W()), "0_0_0_0_0_0"), "_")
251- if ((size(an) != l))
261+func aL (aM,aN,aO) = {
262+ let ap = split(valueOrElse(getString(Y()), "0_0_0_0_0_0"), "_")
263+ if ((size(ap) != l))
252264 then throw("Wrong proportions data")
253265 else {
254- func aN (as,aO) = {
255- let aI = (parseIntValue(an[aO]) + ((aM * aK[aO]) * aL))
256- if ((0 > aI))
257- then throw(((((((("Panic! Pieces of type=" + toString(aO)) + ", sign=") + toString(aM)) + ", terrainCounts[i]=") + toString(aK[aO])) + ", landSizeIndex=") + toString(aL)))
258- else (as :+ toString(aI))
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))
259271 }
260272
261- let ao = {
262- let au = [0, 1, 2, 3, 4, 5]
263- let av = size(au)
264- let aw = nil
265- func ax (ay,az) = if ((az >= av))
266- then ay
267- else aN(ay, au[az])
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])
268280
269- func aA (ay,az) = if ((az >= av))
270- then ay
281+ func aC (aA,aB) = if ((aB >= ax))
282+ then aA
271283 else throw("List size exceeds 6")
272284
273- aA(ax(ax(ax(ax(ax(ax(aw, 0), 1), 2), 3), 4), 5), 6)
285+ aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6)
274286 }
275- makeString(ao, "_")
287+ makeString(aq, "_")
276288 }
277289 }
278290
279291
280-func aP (aQ) = [(size(split(aQ, "A")) - 1), (size(split(aQ, "B")) - 1), (size(split(aQ, "C")) - 1), (size(split(aQ, "D")) - 1), (size(split(aQ, "E")) - 1), (size(split(aQ, "F")) - 1)]
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)]
281293
282294
283-func aR (H) = {
284- let c = H
295+func aT (I) = {
296+ let c = I
285297 if (("S" == c))
286298 then 25
287299 else if (("M" == c))
288300 then 100
289301 else if (("L" == c))
290302 then 225
291303 else if (("XL" == c))
292304 then 400
293305 else if (("XXL" == c))
294306 then 625
295307 else throw("Unknown land size")
296308 }
297309
298310
299-func aS (aT,aH,aU) = {
300- func aV (as,aO) = (as :+ (if ((aO == aH))
301- then toString((parseIntValue(aT[aO]) - aU))
302- else aT[aO]))
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]))
303315
304- let ao = {
305- let au = [0, 1, 2, 3, 4, 5]
306- let av = size(au)
307- let aw = nil
308- func ax (ay,az) = if ((az >= av))
309- then ay
310- else aV(ay, au[az])
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])
311323
312- func aA (ay,az) = if ((az >= av))
313- then ay
324+ func aC (aA,aB) = if ((aB >= ax))
325+ then aA
314326 else throw("List size exceeds 6")
315327
316- aA(ax(ax(ax(ax(ax(ax(aw, 0), 1), 2), 3), 4), 5), 6)
328+ aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6)
317329 }
318- makeString(ao, "_")
330+ makeString(aq, "_")
319331 }
320332
321333
322-func aW (aX,aK,aY,aL) = {
323- func aZ (as,aO) = {
324- let ba = ((fraction(aY, m, n) * aK[aO]) * aL)
325- (as :+ toString((parseIntValue(aX[aO]) + ba)))
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)))
326338 }
327339
328- let ao = {
329- let au = [0, 1, 2, 3, 4, 5]
330- let av = size(au)
331- let aw = nil
332- func ax (ay,az) = if ((az >= av))
333- then ay
334- else aZ(ay, au[az])
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])
335347
336- func aA (ay,az) = if ((az >= av))
337- then ay
348+ func aC (aA,aB) = if ((aB >= ax))
349+ then aA
338350 else throw("List size exceeds 6")
339351
340- aA(ax(ax(ax(ax(ax(ax(aw, 0), 1), 2), 3), 4), 5), 6)
352+ aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6)
341353 }
342- makeString(ao, "_")
354+ makeString(aq, "_")
343355 }
344356
345357
346-func bb (bc) = if ((bc >= toBigInt(0)))
347- then bc
348- else -(bc)
358+func be (bf) = if ((bf >= toBigInt(0)))
359+ then bf
360+ else -(bf)
349361
350362
351-let bd = [[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]]
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]]
352364
353-func be (bf,bg) = {
354- let bh = toInt((bf % w))
355- let bi = if ((bg[0] > bh))
365+func bh (bi,bj) = {
366+ let bk = toInt((bi % x))
367+ let bl = if ((bj[0] > bk))
356368 then "A"
357- else if ((bg[1] > bh))
369+ else if ((bj[1] > bk))
358370 then "B"
359- else if ((bg[2] > bh))
371+ else if ((bj[2] > bk))
360372 then "C"
361- else if ((bg[3] > bh))
373+ else if ((bj[3] > bk))
362374 then "D"
363- else if ((bg[4] > bh))
375+ else if ((bj[4] > bk))
364376 then "E"
365377 else "F"
366- bi
378+ bl
367379 }
368380
369381
370-func bj (bk) = {
371- let bl = split(valueOrElse(getString(bk), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":")
372-[toString(valueOrElse(parseInt(bl[ae]), 0)), if ((size(split(bl[af], "_")) == l))
373- then bl[af]
374- else "0_0_0_0_0_0", if ((size(split(bl[ag], "_")) == l))
375- then bl[ag]
376- else "0_0_0_0_0_0", bl[ah]]
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]]
377389 }
378390
379391
380-func bm (aC,bn,bo,bp,bq) = if (!(sigVerify_8Kb(bp, bq, g)))
392+func bp (aE,bq,br,bs,bt) = if (!(sigVerify_8Kb(bs, bt, g)))
381393 then throw("signature does not match")
382394 else {
383- let br = split(toUtf8String(bp), ";")
384- let bs = split(split(br[0], "|")[0], "_")
385- let bt = parseIntValue(bs[0])
386- let bu = parseIntValue(bs[1])
387- let bv = split(br[1], ":")
388- let bw = split(bv[0], "_")
389- if ((bw[1] != "E"))
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"))
390402 then throw("expedition target location type should be E")
391403 else {
392- let bx = parseIntValue(bv[1])
393- if (if ((bx > (lastBlock.timestamp + o)))
404+ let bA = parseIntValue(by[1])
405+ if (if ((bA > (lastBlock.timestamp + o)))
394406 then true
395- else ((lastBlock.timestamp - o) > bx))
407+ else ((lastBlock.timestamp - o) > bA))
396408 then throw("signature outdated")
397409 else {
398- let by = toString(bn)
399- let T = valueOrErrorMessage(getString(N(by)), "You don't have a duck staked")
400- let bz = V(T)
401- let bA = valueOrElse(getInteger(bz), 100)
402- if ((bA != bt))
403- then throw(((("oldHealth=" + toString(valueOrElse(getInteger(bz), 100))) + " from state does not match one from flight log=") + toString(bt)))
404- else if ((0 >= bt))
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))
405417 then throw("You can't fly with zero health")
406- else if ((0 >= bu))
418+ else if ((0 >= bx))
407419 then throw("Your duck health is zero, expedition failed")
408420 else {
409- let bk = S(T)
410- let bB = bj(bk)
411- let bC = split(bB[ag], "_")
412- let bD = makeString(aB(aC, bC, s), "_")
413- let bE = bb(toBigInt(bo))
414- let bF = valueOrElse(getInteger(D()), 501)
415- let F = toString(bF)
416- let bG = toInt((bE % v))
417- let bH = bd[bG]
418- func bI (as,at) = $Tuple2((((((as._1 + be(as._2, bH)) + be((as._2 / w), bH)) + be((as._2 / x), bH)) + be((as._2 / y), bH)) + be((as._2 / z), bH)), (as._2 / A))
421+ let bn = U(V)
422+ let bE = bm(bn)
423+ let bF = split(bE[ai], "_")
424+ let bG = makeString(aD(aE, bF, s), "_")
425+ let bH = be(toBigInt(br))
426+ let bI = valueOrElse(getInteger(E()), 501)
427+ let G = toString(bI)
428+ let bJ = toInt((bH % w))
429+ let bK = bg[bJ]
430+ 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))
419431
420- let bJ = {
421- let au = [1, 2, 3, 4, 5]
422- let av = size(au)
423- let aw = $Tuple2("", (bE / v))
424- func ax (ay,az) = if ((az >= av))
425- then ay
426- else bI(ay, au[az])
432+ let bM = {
433+ let aw = [1, 2, 3, 4, 5]
434+ let ax = size(aw)
435+ let ay = $Tuple2("", (bH / w))
436+ func az (aA,aB) = if ((aB >= ax))
437+ then aA
438+ else bL(aA, aw[aB])
427439
428- func aA (ay,az) = if ((az >= av))
429- then ay
440+ func aC (aA,aB) = if ((aB >= ax))
441+ then aA
430442 else throw("List size exceeds 5")
431443
432- aA(ax(ax(ax(ax(ax(aw, 0), 1), 2), 3), 4), 5)
444+ aC(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5)
433445 }
434- let bK = C[bG]
435- let bL = Issue(G(F, "S"), makeString([F, "S", bJ._1, bK], "_"), 1, 0, false)
436- let J = calculateAssetId(bL)
437- let bM = toBase58String(J)
438- $Tuple2([IntegerEntry(D(), (bF + 1)), bL, StringEntry(E(F), bM), StringEntry(I(bM), by), StringEntry(R(F), by), IntegerEntry(M(bM), 0), ScriptTransfer(bn, 1, J), StringEntry(U(T), makeString([bK, "L", bM], "_")), IntegerEntry(bz, bu), StringEntry(bk, makeString([bB[ae], bB[af], bD, bB[ah]], ":"))], unit)
446+ let bN = D[bJ]
447+ let bO = Issue(H(G, "S"), makeString([G, "S", bM._1, bN], "_"), 1, 0, false)
448+ let K = calculateAssetId(bO)
449+ let bP = toBase58String(K)
450+ $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]], ":"))], unit)
439451 }
440452 }
441453 }
442454 }
443455
444456
445-func bN (aC,bn,bO) = {
446- let bP = toString(bn)
447- let bQ = M(bO)
448- let bR = valueOrElse(getInteger(bQ), 0)
449- if ((bR >= 3))
457+func bQ (aE,bq,bR) = {
458+ let bS = toString(bq)
459+ let bT = N(bR)
460+ let bU = valueOrElse(getInteger(bT), 0)
461+ if ((bU >= 3))
450462 then throw("Currently max infrastructure level = 3")
451463 else {
452- let bS = (bR + 1)
453- let bT = value(assetInfo(fromBase58String(bO)))
454- if (!(contains(bT.name, i)))
464+ let bV = (bU + 1)
465+ let bW = value(assetInfo(fromBase58String(bR)))
466+ if (!(contains(bW.name, i)))
455467 then throw((("NFT " + i) + " token should be passed as param"))
456468 else {
457- let bU = L(bO)
458- let bV = getStringValue(I(bO))
459- if ((bV != bP))
469+ let bX = M(bR)
470+ let bY = getStringValue(J(bR))
471+ if ((bY != bS))
460472 then throw((i + " is not yours"))
461473 else {
462- let bW = split(bT.description, "_")
463- let H = bW[Y]
464- let bX = aR(H)
465- let T = valueOrErrorMessage(getString(N(bP)), "You don't have a duck staked")
466- let bY = valueOrElse(getString(U(T)), k)
467- let bZ = split(value(bY), "_")
468- if ((bZ[ac] != "L"))
469- then throw((("Duck location type is " + bZ[ac]) + ", but should be L"))
470- else if ((bZ[ad] != bO))
471- then throw(((("Duck location id is " + bZ[ad]) + ", but should be ") + bO))
474+ let bZ = split(bW.description, "_")
475+ let I = bZ[aa]
476+ let ca = aT(I)
477+ let V = valueOrErrorMessage(getString(P(bS)), "You don't have a duck staked")
478+ let cb = valueOrElse(getString(W(V)), k)
479+ let cc = split(value(cb), "_")
480+ if ((cc[ae] != "L"))
481+ then throw((("Duck location type is " + cc[ae]) + ", but should be L"))
482+ else if ((cc[af] != bR))
483+ then throw(((("Duck location id is " + cc[af]) + ", but should be ") + bR))
472484 else {
473- let bk = S(T)
474- let bB = bj(bk)
475- let bC = split(bB[ag], "_")
476- let bD = makeString(aB(aC, bC, fraction(q, (bX * bS), 25)), "_")
477- let ca = valueOrErrorMessage(getInteger(bU), (("NFT " + bT.name) + " is not staked"))
478- let aY = (lastBlock.timestamp - ca)
479- if ((0 > aY))
480- then throw(((("Saved timestamp is in future, saved = " + toString(ca)) + ", current = ") + toString(lastBlock.timestamp)))
485+ let bn = U(V)
486+ let bE = bm(bn)
487+ let bF = split(bE[ai], "_")
488+ let bG = makeString(aD(aE, bF, fraction(q, (ca * bV), 25)), "_")
489+ let cd = valueOrErrorMessage(getInteger(bX), (("NFT " + bW.name) + " is not staked"))
490+ let ba = (lastBlock.timestamp - cd)
491+ if ((0 > ba))
492+ then throw(((("Saved timestamp is in future, saved = " + toString(cd)) + ", current = ") + toString(lastBlock.timestamp)))
481493 else {
482- let cb = (fraction(aY, m, n) * bX)
483- let cc = ai(invoke(this, "claimRes", [cb, bO], nil))
484- $Tuple2([IntegerEntry(bQ, bS), StringEntry(bk, makeString([bB[ae], cc, bD, bB[ah]], ":"))], bS)
494+ let ce = (fraction(ba, m, n) * ca)
495+ let cf = ak(invoke(this, "claimRes", [ce, bR], nil))
496+ $Tuple2([IntegerEntry(bT, bV), StringEntry(bn, makeString([bE[ag], cf, bG, bE[aj]], ":"))], bV)
485497 }
486498 }
487499 }
488500 }
489501 }
490502 }
491503
492504
493-@Callable(aO)
505+func cg (bR) = {
506+ let ch = valueOrElse(getInteger(N(bR)), 0)
507+ let ci = if (valueOrElse(getBoolean(O(bR)), false))
508+ then 3
509+ else 0
510+ ((m + fraction(m, ch, 4)) + fraction(m, ci, 20))
511+ }
512+
513+
514+@Callable(aQ)
494515 func stakeLand () = {
495- let cd = value(aO.payments[0])
496- let J = value(cd.assetId)
497- let ce = toString(aO.caller)
498- if ((cd.amount != 1))
516+ let cj = value(aQ.payments[0])
517+ let K = value(cj.assetId)
518+ let ck = toString(aQ.caller)
519+ if ((cj.amount != 1))
499520 then throw((("NFT " + i) + " token should be attached as payment"))
500521 else {
501- let bT = value(assetInfo(J))
502- if ((bT.issuer != this))
522+ let bW = value(assetInfo(K))
523+ if ((bW.issuer != this))
503524 then throw("Unknown issuer of token")
504- else if (!(contains(bT.name, i)))
525+ else if (!(contains(bW.name, i)))
505526 then throw((("Only NFT " + i) + " tokens are accepted"))
506527 else {
507- let cf = drop(bT.name, 4)
508- let F = if (contains(cf, "XXL"))
509- then dropRight(cf, 3)
510- else if (contains(cf, "XL"))
511- then dropRight(cf, 2)
512- else dropRight(cf, 1)
513- if (!(isDefined(parseInt(F))))
514- then throw(("Cannot parse land number from " + bT.name))
528+ let cl = drop(bW.name, 4)
529+ let G = if (contains(cl, "XXL"))
530+ then dropRight(cl, 3)
531+ else if (contains(cl, "XL"))
532+ then dropRight(cl, 2)
533+ else dropRight(cl, 1)
534+ let cm = valueOrErrorMessage(parseInt(G), ("Cannot parse land number from " + bW.name))
535+ let bR = toBase58String(K)
536+ let bX = M(bR)
537+ if (isDefined(getInteger(bX)))
538+ then throw((("NFT " + bW.name) + " is already staked"))
515539 else {
516- let bU = L(toBase58String(J))
517- if (isDefined(getInteger(bU)))
518- then throw((("NFT " + bT.name) + " is already staked"))
519- else {
520- let bW = split(bT.description, "_")
521- let aK = aP(bW[Z])
522- let an = aJ(aK, (aR(bW[Y]) / 25), 1)
523-[IntegerEntry(bU, lastBlock.timestamp), IntegerEntry(P(i, toBase58String(J), ce), lastBlock.timestamp), StringEntry(I(toBase58String(J)), ce), StringEntry(R(F), ce), StringEntry(W(), an)]
524- }
540+ let bZ = split(bW.description, "_")
541+ let aM = aR(bZ[ab])
542+ let ap = aL(aM, (aT(bZ[aa]) / 25), 1)
543+ let cn = if ((500 >= cm))
544+ then (lastBlock.timestamp > u)
545+ else false
546+[IntegerEntry(bX, lastBlock.timestamp), BooleanEntry(O(bR), cn), IntegerEntry(R(i, bR, ck), lastBlock.timestamp), StringEntry(J(bR), ck), StringEntry(T(G), ck), StringEntry(Y(), ap)]
525547 }
526548 }
527549 }
528550 }
529551
530552
531553
532-@Callable(aO)
533-func unstakeLand (bO) = if ((size(aO.payments) != 0))
554+@Callable(aQ)
555+func unstakeLand (bR) = if ((size(aQ.payments) != 0))
534556 then throw("unstake doesn't require any payments")
535557 else {
536- let J = fromBase58String(bO)
537- let ce = toString(aO.caller)
538- let bT = value(assetInfo(J))
539- if ((bT.issuer != this))
558+ let K = fromBase58String(bR)
559+ let ck = toString(aQ.caller)
560+ let bW = value(assetInfo(K))
561+ if ((bW.issuer != this))
540562 then throw("Unknown issuer of token")
541- else if (!(contains(bT.name, i)))
563+ else if (!(contains(bW.name, i)))
542564 then throw((("Only NFT " + i) + " tokens can be unstaked"))
543565 else {
544- let bU = L(bO)
545- if (!(isDefined(bU)))
546- then throw((("NFT " + bT.name) + " is not staked"))
566+ let bX = M(bR)
567+ if (!(isDefined(bX)))
568+ then throw((("NFT " + bW.name) + " is not staked"))
547569 else {
548- let bV = valueOrErrorMessage(getString(I(bO)), (("NFT " + bT.name) + " is orphaned"))
549- if ((bV != ce))
570+ let bY = valueOrErrorMessage(getString(J(bR)), (("NFT " + bW.name) + " is orphaned"))
571+ if ((bY != ck))
550572 then throw("Staked NFT is not yours")
551573 else {
552- let bW = split(bT.description, "_")
553- let aK = aP(bW[Z])
554- let an = aJ(aK, (aR(bW[Y]) / 25), -1)
555-[ScriptTransfer(aO.caller, 1, J), DeleteEntry(bU), DeleteEntry(P(i, bO, ce)), StringEntry(W(), an)]
574+ let bZ = split(bW.description, "_")
575+ let aM = aR(bZ[ab])
576+ let ap = aL(aM, (aT(bZ[aa]) / 25), -1)
577+[ScriptTransfer(aQ.caller, 1, K), DeleteEntry(bX), DeleteEntry(R(i, bR, ck)), StringEntry(Y(), ap)]
556578 }
557579 }
558580 }
559581 }
560582
561583
562584
563-@Callable(aO)
585+@Callable(aQ)
564586 func stakeDuck () = {
565- let cd = value(aO.payments[0])
566- let J = value(cd.assetId)
567- let ce = toString(aO.caller)
568- if ((cd.amount != 1))
587+ let cj = value(aQ.payments[0])
588+ let K = value(cj.assetId)
589+ let ck = toString(aQ.caller)
590+ if ((cj.amount != 1))
569591 then throw((("NFT " + j) + " token should be attached as payment"))
570592 else {
571- let bT = value(assetInfo(J))
572- if (if ((bT.issuer != d))
573- then (bT.issuer != e)
593+ let bW = value(assetInfo(K))
594+ if (if ((bW.issuer != d))
595+ then (bW.issuer != e)
574596 else false)
575597 then throw((("Unknown issuer of " + j) + " token"))
576- else if (!(contains(bT.name, j)))
598+ else if (!(contains(bW.name, j)))
577599 then throw((("Only NFT " + j) + " tokens are accepted"))
578600 else {
579- let cg = toBase58String(J)
580- let bU = L(cg)
581- if (isDefined(getInteger(bU)))
582- then throw((("NFT " + bT.name) + " is already staked"))
583- else if (isDefined(getString(N(ce))))
584- then throw(("You already staked one duck: " + bT.name))
601+ let co = toBase58String(K)
602+ let bX = M(co)
603+ if (isDefined(getInteger(bX)))
604+ then throw((("NFT " + bW.name) + " is already staked"))
605+ else if (isDefined(getString(P(ck))))
606+ then throw(("You already staked one duck: " + bW.name))
585607 else {
586- let ch = U(cg)
587- let ci = getString(ch)
588- let bz = V(cg)
589- let cj = getInteger(bz)
590- let bk = S(cg)
591- let ck = getString(bk)
592- ([IntegerEntry(bU, lastBlock.timestamp), IntegerEntry(P(j, toBase58String(J), ce), lastBlock.timestamp), StringEntry(K(cg), ce), StringEntry(N(ce), cg)] ++ (if (isDefined(ci))
608+ let cp = W(co)
609+ let cq = getString(cp)
610+ let bC = X(co)
611+ let cr = getInteger(bC)
612+ let bn = U(co)
613+ let cs = getString(bn)
614+ ([IntegerEntry(bX, lastBlock.timestamp), IntegerEntry(R(j, toBase58String(K), ck), lastBlock.timestamp), StringEntry(L(co), ck), StringEntry(P(ck), co)] ++ (if (isDefined(cq))
593615 then nil
594- else ([StringEntry(ch, k)] ++ (if (isDefined(cj))
616+ else ([StringEntry(cp, k)] ++ (if (isDefined(cr))
595617 then nil
596- else ([IntegerEntry(bz, 100)] ++ (if (isDefined(ck))
618+ else ([IntegerEntry(bC, 100)] ++ (if (isDefined(cs))
597619 then nil
598- else [StringEntry(bk, "0:0_0_0_0_0_0:0_0_0_0_0_0:")]))))))
620+ else [StringEntry(bn, "0:0_0_0_0_0_0:0_0_0_0_0_0:")]))))))
599621 }
600622 }
601623 }
602624 }
603625
604626
605627
606-@Callable(aO)
607-func unstakeDuck (cg) = if ((size(aO.payments) != 0))
628+@Callable(aQ)
629+func unstakeDuck (co) = if ((size(aQ.payments) != 0))
608630 then throw("unstake doesn't require any payments")
609631 else {
610- let J = fromBase58String(cg)
611- let ce = toString(aO.caller)
612- let bT = value(assetInfo(J))
613- if (if ((bT.issuer != d))
614- then (bT.issuer != e)
632+ let K = fromBase58String(co)
633+ let ck = toString(aQ.caller)
634+ let bW = value(assetInfo(K))
635+ if (if ((bW.issuer != d))
636+ then (bW.issuer != e)
615637 else false)
616638 then throw((("Unknown issuer of " + j) + " token"))
617- else if (!(contains(bT.name, j)))
639+ else if (!(contains(bW.name, j)))
618640 then throw((("Only NFT " + j) + " tokens can be unstaked"))
619641 else {
620- let bU = L(toBase58String(J))
621- if (!(isDefined(bU)))
622- then throw((("NFT " + bT.name) + " is not staked"))
623- else if (!(isDefined(N(ce))))
624- then throw((("The duck " + bT.name) + " is not staked"))
642+ let bX = M(toBase58String(K))
643+ if (!(isDefined(bX)))
644+ then throw((("NFT " + bW.name) + " is not staked"))
645+ else if (!(isDefined(P(ck))))
646+ then throw((("The duck " + bW.name) + " is not staked"))
625647 else {
626- let bV = valueOrErrorMessage(getString(K(toBase58String(J))), (("NFT " + bT.name) + " is orphaned"))
627- if ((bV != ce))
648+ let bY = valueOrErrorMessage(getString(L(toBase58String(K))), (("NFT " + bW.name) + " is orphaned"))
649+ if ((bY != ck))
628650 then throw("Staked NFT is not yours")
629- else [ScriptTransfer(aO.caller, 1, J), DeleteEntry(bU), DeleteEntry(U(cg)), DeleteEntry(P(j, cg, ce)), DeleteEntry(N(ce))]
651+ else [ScriptTransfer(aQ.caller, 1, K), DeleteEntry(bX), DeleteEntry(W(co)), DeleteEntry(R(j, co, ck)), DeleteEntry(P(ck))]
630652 }
631653 }
632654 }
633655
634656
635657
636-@Callable(aO)
637-func claimRes (aU,bO) = if ((size(aO.payments) != 0))
658+@Callable(aQ)
659+func claimRes (aW,bR) = if ((size(aQ.payments) != 0))
638660 then throw("claimRes doesn't require any payments")
639661 else {
640- let bP = toString(aO.originCaller)
641- let bT = value(assetInfo(fromBase58String(bO)))
642- if (!(contains(bT.name, i)))
662+ let bS = toString(aQ.originCaller)
663+ let bW = value(assetInfo(fromBase58String(bR)))
664+ if (!(contains(bW.name, i)))
643665 then throw((("NFT " + i) + " token should be passed as param"))
644666 else {
645- let bU = L(bO)
646- let bV = getStringValue(I(bO))
647- if ((bV != bP))
667+ let bX = M(bR)
668+ let bY = getStringValue(J(bR))
669+ if ((bY != bS))
648670 then throw((i + " is not yours"))
649671 else {
650- let bW = split(bT.description, "_")
651- let H = bW[Y]
652- let aK = aP(bW[Z])
653- let T = valueOrErrorMessage(getString(N(bP)), "You don't have a duck staked")
654- let bY = valueOrElse(getString(U(T)), k)
655- let bZ = split(value(bY), "_")
656- if ((bZ[ac] != "L"))
657- then throw((("Duck location type is " + bZ[ac]) + ", but should be L"))
658- else if ((bZ[ad] != bO))
659- then throw(((("Duck location id is " + bZ[ad]) + ", but should be ") + bO))
672+ let bZ = split(bW.description, "_")
673+ let I = bZ[aa]
674+ let aM = aR(bZ[ab])
675+ let V = valueOrErrorMessage(getString(P(bS)), "You don't have a duck staked")
676+ let cb = valueOrElse(getString(W(V)), k)
677+ let cc = split(value(cb), "_")
678+ if ((cc[ae] != "L"))
679+ then throw((("Duck location type is " + cc[ae]) + ", but should be L"))
680+ else if ((cc[af] != bR))
681+ then throw(((("Duck location id is " + cc[af]) + ", but should be ") + bR))
660682 else {
661- let ca = valueOrErrorMessage(getInteger(bU), (("NFT " + bT.name) + " is not staked"))
662- let aY = (lastBlock.timestamp - ca)
663- if ((0 > aY))
664- then throw(((("Saved timestamp is in future, saved = " + toString(ca)) + ", current = ") + toString(lastBlock.timestamp)))
683+ let cd = valueOrErrorMessage(getInteger(bX), (("NFT " + bW.name) + " is not staked"))
684+ let ba = (lastBlock.timestamp - cd)
685+ if ((0 > ba))
686+ then throw(((("Saved timestamp is in future, saved = " + toString(cd)) + ", current = ") + toString(lastBlock.timestamp)))
665687 else {
666- let bX = aR(H)
667- let cl = valueOrElse(getInteger(M(bO)), 0)
668- let cb = (fraction((aY + fraction(aY, cl, 4)), m, n) * bX)
669- if ((aU > cb))
670- then throw(((("Not enough resources, available = " + toString(cb)) + ", requested = ") + toString(aU)))
688+ let ca = aT(I)
689+ let ct = cg(bR)
690+ let ce = fraction(ba, (ct * ca), n)
691+ if ((aW > ce))
692+ then throw(((("Not enough resources, available = " + toString(ce)) + ", requested = ") + toString(aW)))
671693 else {
672- let cm = fraction((cb - aU), n, (bX * m))
673- let cn = (lastBlock.timestamp - cm)
674- let bk = S(T)
675- let bB = bj(bk)
676- let aX = split(bB[af], "_")
677- let co = aW(aX, aK, ((aY - cm) + fraction((aY - cm), cl, 4)), (bX / 25))
678- let cp = makeString([bB[ae], co, bB[ag], bB[ah]], ":")
679- $Tuple2([StringEntry(bk, cp), IntegerEntry(bU, cn), IntegerEntry(P(i, bO, bV), cn)], co)
694+ let cu = fraction((ce - aW), n, (ct * ca))
695+ let cv = (lastBlock.timestamp - cu)
696+ let bn = U(V)
697+ let bE = bm(bn)
698+ let aZ = split(bE[ah], "_")
699+ let cw = aY(aZ, aM, (ba - cu), (ca / 25), ct)
700+ let cx = makeString([bE[ag], cw, bE[ai], bE[aj]], ":")
701+ $Tuple2([StringEntry(bn, cx), IntegerEntry(bX, cv), IntegerEntry(R(i, bR, bY), cv)], cw)
680702 }
681703 }
682704 }
683705 }
684706 }
685707 }
686708
687709
688710
689-@Callable(aO)
690-func flight (bp,bq) = if (!(sigVerify_8Kb(bp, bq, g)))
711+@Callable(aQ)
712+func flight (bs,bt) = if (!(sigVerify_8Kb(bs, bt, g)))
691713 then throw("signature does not match")
692- else if ((size(aO.payments) != 0))
714+ else if ((size(aQ.payments) != 0))
693715 then throw("flight doesn't require any payments")
694716 else {
695- let br = split(toUtf8String(bp), ";")
696- let bs = split(split(br[0], "|")[0], "_")
697- let bt = parseIntValue(bs[0])
698- let bu = parseIntValue(bs[1])
699- let cq = split(br[1], ":")
700- let cr = cq[0]
701- let bx = parseIntValue(cq[1])
702- if (if ((bx > (lastBlock.timestamp + o)))
717+ let bu = split(toUtf8String(bs), ";")
718+ let bv = split(split(bu[0], "|")[0], "_")
719+ let bw = parseIntValue(bv[0])
720+ let bx = parseIntValue(bv[1])
721+ let cy = split(bu[1], ":")
722+ let cz = cy[0]
723+ let bA = parseIntValue(cy[1])
724+ if (if ((bA > (lastBlock.timestamp + o)))
703725 then true
704- else ((lastBlock.timestamp - o) > bx))
726+ else ((lastBlock.timestamp - o) > bA))
705727 then throw("signature outdated")
706728 else {
707- let T = valueOrErrorMessage(getString(N(toString(aO.caller))), "You don't have a duck staked")
708- let bz = V(T)
709- let bA = valueOrElse(getInteger(bz), 100)
710- if ((bA != bt))
711- then throw(((("oldHealth=" + toString(valueOrElse(getInteger(bz), 100))) + " from state does not match one from flight log=") + toString(bt)))
712- else if ((0 >= bt))
729+ let V = valueOrErrorMessage(getString(P(toString(aQ.caller))), "You don't have a duck staked")
730+ let bC = X(V)
731+ let bD = valueOrElse(getInteger(bC), 100)
732+ if ((bD != bw))
733+ then throw(((("oldHealth=" + toString(valueOrElse(getInteger(bC), 100))) + " from state does not match one from flight log=") + toString(bw)))
734+ else if ((0 >= bw))
713735 then throw("You can't fly with zero health")
714736 else {
715- let ch = U(T)
716- let bY = valueOrElse(getString(ch), k)
717- if ((cr == bY))
737+ let cp = W(V)
738+ let cb = valueOrElse(getString(cp), k)
739+ if ((cz == cb))
718740 then throw("You can't fly to the same location")
719- else $Tuple2([StringEntry(ch, if ((bu > 0))
720- then cr
721- else bY), IntegerEntry(bz, bu)], unit)
741+ else $Tuple2([StringEntry(cp, if ((bx > 0))
742+ then cz
743+ else cb), IntegerEntry(bC, bx)], unit)
722744 }
723745 }
724746 }
725747
726748
727749
728-@Callable(aO)
729-func setHealth (cj,T) = if (if ((0 > cj))
750+@Callable(aQ)
751+func setHealth (cr,V) = if (if ((0 > cr))
730752 then true
731- else (cj > 100))
753+ else (cr > 100))
732754 then throw("HP should be within 0..100")
733- else [IntegerEntry(V(T), cj)]
755+ else [IntegerEntry(X(V), cr)]
734756
735757
736758
737-@Callable(aO)
738-func heal (cs,aU) = if (if ((0 > cs))
759+@Callable(aQ)
760+func heal (cA,aW) = if (if ((0 > cA))
739761 then true
740- else (cs >= l))
741- then throw(("Unknown material: " + toString(cs)))
742- else if ((0 >= aU))
743- then throw(("Amount should be positive! " + toString(aU)))
762+ else (cA >= l))
763+ then throw(("Unknown material: " + toString(cA)))
764+ else if ((0 >= aW))
765+ then throw(("Amount should be positive! " + toString(aW)))
744766 else {
745- let T = valueOrErrorMessage(getString(N(toString(aO.caller))), "You don't have a duck staked")
746- let bz = V(T)
747- let ct = valueOrElse(getInteger(bz), 100)
748- if ((ct >= 100))
767+ let V = valueOrErrorMessage(getString(P(toString(aQ.caller))), "You don't have a duck staked")
768+ let bC = X(V)
769+ let cB = valueOrElse(getInteger(bC), 100)
770+ if ((cB >= 100))
749771 then throw("HP should be < 100 to heal")
750772 else {
751- let bk = S(T)
752- let bB = bj(bk)
753- let bC = split(bB[ag], "_")
754- let cu = parseIntValue(bC[cs])
755- let cv = min([(aU / h), (100 - ct)])
756- let cw = (cv * h)
757- if ((cw > cu))
758- then throw(((((("You need " + toString(cw)) + " of ") + B[cs]) + " to heal, but you backpack contains ") + toString(cu)))
773+ let bn = U(V)
774+ let bE = bm(bn)
775+ let bF = split(bE[ai], "_")
776+ let cC = parseIntValue(bF[cA])
777+ let cD = min([(aW / h), (100 - cB)])
778+ let cE = (cD * h)
779+ if ((cE > cC))
780+ then throw(((((("You need " + toString(cE)) + " of ") + C[cA]) + " to heal, but you backpack contains ") + toString(cC)))
759781 else {
760- let bD = aS(bC, cs, cw)
761-[IntegerEntry(bz, (ct + cv)), StringEntry(bk, makeString([bB[ae], bB[af], bD, bB[ah]], ":"))]
782+ let bG = aU(bF, cA, cE)
783+[IntegerEntry(bC, (cB + cD)), StringEntry(bn, makeString([bE[ag], bE[ah], bG, bE[aj]], ":"))]
762784 }
763785 }
764786 }
765787
766788
767789
768-@Callable(aO)
769-func updateBackpack (T,cp) = if ((aO.caller != f))
790+@Callable(aQ)
791+func updateBackpack (V,cx) = if ((aQ.caller != f))
770792 then throw("permission denied")
771- else $Tuple2([StringEntry(S(T), cp)], cp)
793+ else $Tuple2([StringEntry(U(V), cx)], cx)
772794
773795
774796
775-@Callable(aO)
776-func expeditionBuy (bp,bq) = if ((size(aO.payments) != 1))
797+@Callable(aQ)
798+func expeditionBuy (bs,bt) = if ((size(aQ.payments) != 1))
777799 then throw("Exactly one payment required")
778800 else {
779- let cd = value(aO.payments[0])
780- if ((cd.assetId != b))
801+ let cj = value(aQ.payments[0])
802+ if ((cj.assetId != b))
781803 then throw("Allowed USDN payment only!")
782- else if ((cd.amount != t))
804+ else if ((cj.amount != t))
783805 then throw(("Payment attached should be " + toString(t)))
784- else bm(false, aO.caller, aO.transactionId, bp, bq)
806+ else bp(false, aQ.caller, aQ.transactionId, bs, bt)
785807 }
786808
787809
788810
789-@Callable(aO)
790-func expedition (bp,bq) = if ((size(aO.payments) != 0))
811+@Callable(aQ)
812+func expedition (bs,bt) = if ((size(aQ.payments) != 0))
791813 then throw("expedition doesn't require any payments")
792- else bm(true, aO.caller, aO.transactionId, bp, bq)
814+ else bp(true, aQ.caller, aQ.transactionId, bs, bt)
793815
794816
795817
796-@Callable(aO)
797-func upgradeInfra (bO) = if ((size(aO.payments) != 0))
818+@Callable(aQ)
819+func upgradeInfra (bR) = if ((size(aQ.payments) != 0))
798820 then throw("Infrastructure upgrade doesn't require any payments")
799- else bN(true, aO.caller, bO)
821+ else bQ(true, aQ.caller, bR)
800822
801823
802824
803-@Callable(aO)
804-func upgradeInfraUsdn (bO) = if ((size(aO.payments) != 1))
825+@Callable(aQ)
826+func upgradeInfraUsdn (bR) = if ((size(aQ.payments) != 1))
805827 then throw("Exactly one payment required")
806828 else {
807- let cd = value(aO.payments[0])
808- if ((cd.assetId != b))
829+ let cj = value(aQ.payments[0])
830+ if ((cj.assetId != b))
809831 then throw("Allowed USDN payment only!")
810832 else {
811- let bS = (valueOrElse(getInteger(M(bO)), 0) + 1)
812- let bT = value(assetInfo(fromBase58String(bO)))
813- let bW = split(bT.description, "_")
814- let cx = fraction(r, (aR(bW[Y]) * bS), 25)
815- if ((cd.amount != cx))
816- then throw(("Payment attached should be " + toString(cx)))
817- else bN(false, aO.caller, bO)
833+ let bV = (valueOrElse(getInteger(N(bR)), 0) + 1)
834+ let bW = value(assetInfo(fromBase58String(bR)))
835+ let bZ = split(bW.description, "_")
836+ let cF = fraction(r, (aT(bZ[aa]) * bV), 25)
837+ if ((cj.amount != cF))
838+ then throw(("Payment attached should be " + toString(cF)))
839+ else bQ(false, aQ.caller, bR)
818840 }
819841 }
820842
821843

github/deemru/w8io/169f3d6 
341.10 ms