tx · Co5a3aRFimWPciBA5gBEqF9P9fbhnNUF93MbCW77BodK

3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm:  -0.02300000 Waves

2023.01.06 18:24 [2393274] smart account 3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm > SELF 0.00000000 Waves

{ "type": 13, "id": "Co5a3aRFimWPciBA5gBEqF9P9fbhnNUF93MbCW77BodK", "fee": 2300000, "feeAssetId": null, "timestamp": 1673018638357, "version": 2, "chainId": 84, "sender": "3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm", "senderPublicKey": "EVooykMNV691Venwp1dHUTBd7KWequzUcda57Wd3LQEX", "proofs": [ "5zJYRkApPrKpzNkRmERnECtXYk7Mee7ZP1dsAchbveSZejszCFM2kDn5AUTa8z6cYjHkaWBX36Mn3aKtX74Cicxg" ], "script": "base64:BgJJCAISABIDCgEIEgASAwoBCBIECgIBCBIECgICAhIECgIBCBIECgIBARIECgIICBIECgICAhIECgICAhIDCgEIEgMKAQgSAwoBCEoABWNoYWluCQCwCQEJAMkBAgkAygECCAUEdGhpcwVieXRlcwABAAEAC3VzZG5Bc3NldElkBAckbWF0Y2gwBQVjaGFpbgMJAAACAgFXBQckbWF0Y2gwASC2JinDBPXOU5GkDkt1JC9kjFGx+t+vVCm9SNIdKrKq0QMJAAACAgFUBQckbWF0Y2gwASD3dur394PKZdtuE+4CO89YKZWpwdGN8kvabNgdYoDI3gkAAgECDVVua25vd24gY2hhaW4ADWluY3ViYXRvckFkZHIEByRtYXRjaDAFBWNoYWluAwkAAAICAVcFByRtYXRjaDAJARFAZXh0ck5hdGl2ZSgxMDYyKQECIzNQRWt0VnV4MlJoY2hTTjYzRHNEbzRiNG16NFFxektTZUR2AwkAAAICAVQFByRtYXRjaDAFBHRoaXMJAAIBAg1Vbmtub3duIGNoYWluAAticmVlZGVyQWRkcgQHJG1hdGNoMAUFY2hhaW4DCQAAAgIBVwUHJG1hdGNoMAkBEUBleHRyTmF0aXZlKDEwNjIpAQI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YWx1ZQEJAJEDAggFAWkIcGF5bWVudHMAAAMJAQIhPQIIBQNwbXQHYXNzZXRJZAULdXNkbkFzc2V0SWQJAAIBAhpBbGxvd2VkIFVTRE4gcGF5bWVudCBvbmx5IQkBDXVwSW5mcmFDb21tb24DBwgFAWkGY2FsbGVyCAUDcG10BmFtb3VudAFpARBhY3RpdmF0ZUFydGlmYWN0AQdhcnROYW1lAwkBAiE9AgkAkAMBCAUBaQhwYXltZW50cwAACQACAQIwQXJ0aWZhY3QgYWN0aXZhdGlvbiBkb2Vzbid0IHJlcXVpcmUgYW55IHBheW1lbnRzBAZyZXN1bHQEByRtYXRjaDAFB2FydE5hbWUDCQAAAgIHUFJFU0FMRQUHJG1hdGNoMAkBEmFjdGl2YXRlUHJlc2FsZUFydAEJAKUIAQgFAWkGY2FsbGVyCQACAQIQVW5rbm93biBhcnRpZmFjdAUGcmVzdWx0AA3u1ac=", "height": 2393274, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3DsgrbRAncKXuvTep9mgjJa5z9TvSmVoeUkZBPKj5fKN Next: CAKs3kgsQ12fqrxwYjQd7LqqT65S5TtXMtm8Wq5bCs3N Diff:
OldNewDifferences
9595 else throw("Unknown chain")
9696 }
9797
98-let u = {
99- let c = a
100- if (("W" == c))
101- then 1673136000000
102- else if (("T" == c))
103- then 1672790400000
104- else throw("Unknown chain")
105- }
98+let u = 1000000
10699
107-let v = 1000000
100+let v = toBigInt(5)
108101
109-let w = toBigInt(5)
102+let w = toBigInt(20)
110103
111-let x = toBigInt(20)
104+let x = toBigInt((20 * 20))
112105
113-let y = toBigInt((20 * 20))
106+let y = toBigInt(((20 * 20) * 20))
114107
115-let z = toBigInt(((20 * 20) * 20))
108+let z = toBigInt((((20 * 20) * 20) * 20))
116109
117-let A = toBigInt((((20 * 20) * 20) * 20))
110+let A = toBigInt(((((20 * 20) * 20) * 20) * 20))
118111
119-let B = toBigInt(((((20 * 20) * 20) * 20) * 20))
112+let B = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"]
120113
121-let C = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"]
114+let C = ["Asia", "Europe", "Americas", "Oceania", "Africa"]
122115
123-let D = ["Asia", "Europe", "Americas", "Oceania", "Africa"]
124-
125-func E () = "nextLandNum"
116+func D () = "nextLandNum"
126117
127118
128-func F (G) = ("landToAsset_" + G)
119+func E (F) = ("landToAsset_" + F)
129120
130121
131-func H (G,I) = ((i + G) + I)
122+func G (F,H) = ((i + F) + H)
132123
133124
134-func J (K) = ("nftOwner_" + K)
125+func I (J) = ("nftOwner_" + J)
135126
136127
137-func L (K) = ("duckOwner_" + K)
128+func K (J) = ("duckOwner_" + J)
138129
139130
140-func M (K) = ("stakedTime_" + K)
131+func L (J) = ("stakedTime_" + J)
141132
142133
143-func N (K) = ("infraLevel_" + K)
134+func M (J) = ("infraLevel_" + J)
144135
145136
146-func O (K,P) = ((("infraLevelByAssetIdAndOwner_" + K) + "_") + P)
137+func N (J,O) = ((("infraLevelByAssetIdAndOwner_" + J) + "_") + O)
147138
148139
149-func Q (K) = ("presaleArtActivated_" + K)
140+func P (J) = ("presaleArtActivated_" + J)
150141
151142
152-func R (P) = ("stakedDuckByOwner_" + P)
143+func Q (O) = ("stakedDuckByOwner_" + O)
153144
154145
155-func S (T,K,P) = ((((("stakedTimeByTypeAssetIdAndOwner_" + T) + "_") + K) + "_") + P)
146+func R (S,J,O) = ((((("stakedTimeByTypeAssetIdAndOwner_" + S) + "_") + J) + "_") + O)
156147
157148
158-func U (G) = ("landOwner_" + G)
149+func T (F) = ("landOwner_" + F)
159150
160151
161-func V (W) = ("backPack_" + W)
152+func U (V) = ("backPack_" + V)
162153
163154
164-func X (W) = ("duckLocation_" + W)
155+func W (V) = ("duckLocation_" + V)
165156
166157
167-func Y (W) = ("duckHealth_" + W)
158+func X (V) = ("duckHealth_" + V)
168159
169160
170-func Z () = "resTypesProportions"
161+func Y () = "resTypesProportions"
171162
172163
173-let aa = 0
164+let Z = 0
174165
175-let ab = 1
166+let aa = 1
176167
177-let ac = 2
168+let ab = 2
178169
179-let ad = 3
170+let ac = 3
180171
181-let ae = 0
172+let ad = 0
182173
183-let af = 1
174+let ae = 1
184175
185-let ag = 2
176+let af = 2
186177
187-let ah = 0
178+let ag = 0
188179
189-let ai = 1
180+let ah = 1
190181
191-let aj = 2
182+let ai = 2
192183
193-let ak = 3
184+let aj = 3
194185
195-func al (am) = {
196- let c = am
186+func ak (al) = {
187+ let c = al
197188 if ($isInstanceOf(c, "String"))
198189 then {
199- let an = c
200- an
190+ let am = c
191+ am
201192 }
202193 else throw("fail to cast into String")
203194 }
204195
205196
206-func ao (ap) = {
207- let aq = split(value(getString(Z())), "_")
208- if ((size(aq) != l))
197+func an (ao) = {
198+ let ap = split(value(getString(Y())), "_")
199+ if ((size(ap) != l))
209200 then throw("Wrong proportions data")
210201 else {
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))
202+ let aq = [parseIntValue(ap[0]), parseIntValue(ap[1]), parseIntValue(ap[2]), parseIntValue(ap[3]), parseIntValue(ap[4]), parseIntValue(ap[5])]
203+ let ar = (((((aq[0] + aq[1]) + aq[2]) + aq[3]) + aq[4]) + aq[5])
204+ if ((0 >= ar))
214205 then throw("No lands staked")
215206 else {
216- let at = fraction(ap, v, as)
217- func au (av,aw) = (av :+ fraction(aw, at, v))
207+ let as = fraction(ao, u, ar)
208+ func at (au,av) = (au :+ fraction(av, as, u))
218209
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])
210+ let aw = aq
211+ let ax = size(aw)
212+ let ay = nil
213+ func az (aA,aB) = if ((aB >= ax))
214+ then aA
215+ else at(aA, aw[aB])
225216
226- func aD (aB,aC) = if ((aC >= ay))
227- then aB
217+ func aC (aA,aB) = if ((aB >= ax))
218+ then aA
228219 else throw("List size exceeds 6")
229220
230- aD(aA(aA(aA(aA(aA(aA(az, 0), 1), 2), 3), 4), 5), 6)
221+ aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6)
231222 }
232223 }
233224 }
234225
235226
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))
227+func aD (aE,aF,aG) = {
228+ let aH = an(aG)
229+ func aI (au,aJ) = {
230+ let aK = (parseIntValue(aF[aJ]) - aH[aJ])
231+ if ((0 > aK))
232+ then throw(((((("Not enough material idx=" + toString(aJ)) + ", you have ") + aF[aJ]) + ", but need ") + toString(aH[aJ])))
233+ else (au :+ toString(aK))
243234 }
244235
245- if (aF)
236+ if (aE)
246237 then {
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])
238+ let aw = [0, 1, 2, 3, 4, 5]
239+ let ax = size(aw)
240+ let ay = nil
241+ func az (aA,aB) = if ((aB >= ax))
242+ then aA
243+ else aI(aA, aw[aB])
253244
254- func aD (aB,aC) = if ((aC >= ay))
255- then aB
245+ func aC (aA,aB) = if ((aB >= ax))
246+ then aA
256247 else throw("List size exceeds 6")
257248
258- aD(aA(aA(aA(aA(aA(aA(az, 0), 1), 2), 3), 4), 5), 6)
249+ aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6)
259250 }
260- else aG
251+ else aF
261252 }
262253
263254
264-func aM (aN,aO,aP) = {
265- let aq = split(valueOrElse(getString(Z()), "0_0_0_0_0_0"), "_")
266- if ((size(aq) != l))
255+func aL (aM,aN,aO) = {
256+ let ap = split(valueOrElse(getString(Y()), "0_0_0_0_0_0"), "_")
257+ if ((size(ap) != l))
267258 then throw("Wrong proportions data")
268259 else {
269- func aQ (av,aR) = {
270- let aL = (parseIntValue(aq[aR]) + ((aP * aN[aR]) * aO))
271- if ((0 > aL))
272- then throw(((((((("Panic! Pieces of type=" + toString(aR)) + ", sign=") + toString(aP)) + ", terrainCounts[i]=") + toString(aN[aR])) + ", landSizeIndex=") + toString(aO)))
273- else (av :+ toString(aL))
260+ func aP (au,aQ) = {
261+ let aK = (parseIntValue(ap[aQ]) + ((aO * aM[aQ]) * aN))
262+ if ((0 > aK))
263+ then throw(((((((("Panic! Pieces of type=" + toString(aQ)) + ", sign=") + toString(aO)) + ", terrainCounts[i]=") + toString(aM[aQ])) + ", landSizeIndex=") + toString(aN)))
264+ else (au :+ toString(aK))
274265 }
275266
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])
267+ let aq = {
268+ let aw = [0, 1, 2, 3, 4, 5]
269+ let ax = size(aw)
270+ let ay = nil
271+ func az (aA,aB) = if ((aB >= ax))
272+ then aA
273+ else aP(aA, aw[aB])
283274
284- func aD (aB,aC) = if ((aC >= ay))
285- then aB
275+ func aC (aA,aB) = if ((aB >= ax))
276+ then aA
286277 else throw("List size exceeds 6")
287278
288- aD(aA(aA(aA(aA(aA(aA(az, 0), 1), 2), 3), 4), 5), 6)
279+ aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6)
289280 }
290- makeString(ar, "_")
281+ makeString(aq, "_")
291282 }
292283 }
293284
294285
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)]
286+func aR (aS) = [(size(split(aS, "A")) - 1), (size(split(aS, "B")) - 1), (size(split(aS, "C")) - 1), (size(split(aS, "D")) - 1), (size(split(aS, "E")) - 1), (size(split(aS, "F")) - 1)]
296287
297288
298-func aU (I) = {
299- let c = I
289+func aT (H) = {
290+ let c = H
300291 if (("S" == c))
301292 then 25
302293 else if (("M" == c))
311302 }
312303
313304
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]))
305+func aU (aV,aJ,aW) = {
306+ func aX (au,aQ) = (au :+ (if ((aQ == aJ))
307+ then toString((parseIntValue(aV[aQ]) - aW))
308+ else aV[aQ]))
318309
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])
310+ let aq = {
311+ let aw = [0, 1, 2, 3, 4, 5]
312+ let ax = size(aw)
313+ let ay = nil
314+ func az (aA,aB) = if ((aB >= ax))
315+ then aA
316+ else aX(aA, aw[aB])
326317
327- func aD (aB,aC) = if ((aC >= ay))
328- then aB
318+ func aC (aA,aB) = if ((aB >= ax))
319+ then aA
329320 else throw("List size exceeds 6")
330321
331- aD(aA(aA(aA(aA(aA(aA(az, 0), 1), 2), 3), 4), 5), 6)
322+ aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6)
332323 }
333- makeString(ar, "_")
324+ makeString(aq, "_")
334325 }
335326
336327
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)))
328+func aY (aZ,aM,ba,aN,bb) = {
329+ func bc (au,aQ) = {
330+ let bd = ((fraction(ba, bb, n) * aM[aQ]) * aN)
331+ (au :+ toString((parseIntValue(aZ[aQ]) + bd)))
341332 }
342333
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])
334+ let aq = {
335+ let aw = [0, 1, 2, 3, 4, 5]
336+ let ax = size(aw)
337+ let ay = nil
338+ func az (aA,aB) = if ((aB >= ax))
339+ then aA
340+ else bc(aA, aw[aB])
350341
351- func aD (aB,aC) = if ((aC >= ay))
352- then aB
342+ func aC (aA,aB) = if ((aB >= ax))
343+ then aA
353344 else throw("List size exceeds 6")
354345
355- aD(aA(aA(aA(aA(aA(aA(az, 0), 1), 2), 3), 4), 5), 6)
346+ aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6)
356347 }
357- makeString(ar, "_")
348+ makeString(aq, "_")
358349 }
359350
360351
361-func bf (bg) = if ((bg >= toBigInt(0)))
362- then bg
363- else -(bg)
352+func be (bf) = if ((bf >= toBigInt(0)))
353+ then bf
354+ else -(bf)
364355
365356
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]]
357+let bg = [[1, 4, 9, 10, 15], [5, 8, 13, 14, 15], [6, 9, 14, 15, 16], [4, 7, 8, 13, 18], [1, 6, 7, 15, 19]]
367358
368-func bi (bj,bk) = {
369- let bl = toInt((bj % x))
370- let bm = if ((bk[0] > bl))
359+func bh (bi,bj) = {
360+ let bk = toInt((bi % w))
361+ let bl = if ((bj[0] > bk))
371362 then "A"
372- else if ((bk[1] > bl))
363+ else if ((bj[1] > bk))
373364 then "B"
374- else if ((bk[2] > bl))
365+ else if ((bj[2] > bk))
375366 then "C"
376- else if ((bk[3] > bl))
367+ else if ((bj[3] > bk))
377368 then "D"
378- else if ((bk[4] > bl))
369+ else if ((bj[4] > bk))
379370 then "E"
380371 else "F"
381- bm
372+ bl
382373 }
383374
384375
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]]
376+func bm (bn) = {
377+ let bo = split(valueOrElse(getString(bn), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":")
378+[toString(valueOrElse(parseInt(bo[ag]), 0)), if ((size(split(bo[ah], "_")) == l))
379+ then bo[ah]
380+ else "0_0_0_0_0_0", if ((size(split(bo[ai], "_")) == l))
381+ then bo[ai]
382+ else "0_0_0_0_0_0", bo[aj]]
392383 }
393384
394385
395-func bq (aF,br,bs,bt,bu) = if (!(sigVerify_8Kb(bt, bu, g)))
386+func bp (aE,bq,br,bs,bt) = if (!(sigVerify_8Kb(bs, bt, g)))
396387 then throw("signature does not match")
397388 else {
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"))
389+ let bu = split(toUtf8String(bs), ";")
390+ let bv = split(split(bu[0], "|")[0], "_")
391+ let bw = parseIntValue(bv[0])
392+ let bx = parseIntValue(bv[1])
393+ let by = split(bu[1], ":")
394+ let bz = split(by[0], "_")
395+ if ((bz[1] != "E"))
405396 then throw("expedition target location type should be E")
406397 else {
407- let bB = parseIntValue(bz[1])
408- if (if ((bB > (lastBlock.timestamp + o)))
398+ let bA = parseIntValue(by[1])
399+ if (if ((bA > (lastBlock.timestamp + o)))
409400 then true
410- else ((lastBlock.timestamp - o) > bB))
401+ else ((lastBlock.timestamp - o) > bA))
411402 then throw("signature outdated")
412403 else {
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))
404+ let bB = toString(bq)
405+ let V = valueOrErrorMessage(getString(Q(bB)), "You don't have a duck staked")
406+ let bC = X(V)
407+ let bD = valueOrElse(getInteger(bC), 100)
408+ if ((bD != bw))
409+ then throw(((("oldHealth=" + toString(valueOrElse(getInteger(bC), 100))) + " from state does not match one from flight log=") + toString(bw)))
410+ else if ((0 >= bw))
420411 then throw("You can't fly with zero health")
421- else if ((0 >= by))
422- then $Tuple2(((if (!(aF))
423- then [ScriptTransfer(br, t, b)]
424- else nil) :+ IntegerEntry(bD, 0)), "")
412+ else if ((0 >= bx))
413+ then $Tuple2(((if (!(aE))
414+ then [ScriptTransfer(bq, t, b)]
415+ else nil) :+ IntegerEntry(bC, 0)), "")
425416 else {
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))
417+ let bn = U(V)
418+ let bE = bm(bn)
419+ let bF = split(bE[ai], "_")
420+ let bG = makeString(aD(aE, bF, s), "_")
421+ let bH = be(toBigInt(br))
422+ let bI = valueOrElse(getInteger(D()), 501)
423+ let F = toString(bI)
424+ let bJ = toInt((bH % v))
425+ let bK = bg[bJ]
426+ func bL (au,av) = $Tuple2((((((au._1 + bh(au._2, bK)) + bh((au._2 / w), bK)) + bh((au._2 / x), bK)) + bh((au._2 / y), bK)) + bh((au._2 / z), bK)), (au._2 / A))
436427
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])
428+ let bM = {
429+ let aw = [1, 2, 3, 4, 5]
430+ let ax = size(aw)
431+ let ay = $Tuple2("", (bH / v))
432+ func az (aA,aB) = if ((aB >= ax))
433+ then aA
434+ else bL(aA, aw[aB])
444435
445- func aD (aB,aC) = if ((aC >= ay))
446- then aB
436+ func aC (aA,aB) = if ((aB >= ax))
437+ then aA
447438 else throw("List size exceeds 5")
448439
449- aD(aA(aA(aA(aA(aA(az, 0), 1), 2), 3), 4), 5)
440+ aC(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5)
450441 }
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)
442+ let bN = C[bJ]
443+ let bO = Issue(G(F, "S"), makeString([F, "S", bM._1, bN], "_"), 1, 0, false)
444+ let J = calculateAssetId(bO)
445+ let bP = toBase58String(J)
446+ $Tuple2([IntegerEntry(D(), (bI + 1)), bO, StringEntry(E(F), bP), StringEntry(I(bP), bB), StringEntry(T(F), bB), IntegerEntry(M(bP), 0), IntegerEntry(N(bP, bB), 0), ScriptTransfer(bq, 1, J), StringEntry(W(V), makeString([bN, "L", bP], "_")), IntegerEntry(bC, bx), StringEntry(bn, makeString([bE[ag], bE[ah], bG, bE[aj]], ":"))], bP)
456447 }
457448 }
458449 }
459450 }
460451
461452
462-func bR (bS) = {
463- let bT = valueOrElse(getInteger(N(bS)), 0)
464- let bU = if (valueOrElse(getBoolean(Q(bS)), false))
453+func bQ (bR) = {
454+ let bS = valueOrElse(getInteger(M(bR)), 0)
455+ let bT = if (valueOrElse(getBoolean(P(bR)), false))
465456 then 3
466457 else 0
467- (m + fraction(m, bT, 4))
458+ ((m + fraction(m, bS, 4)) + fraction(m, bT, 20))
468459 }
469460
470461
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)))
462+func bU (bV) = {
463+ let V = valueOrErrorMessage(getString(Q(bV)), "You don't have a duck staked")
464+ let bW = valueOrElse(getString(W(V)), k)
465+ let bX = split(value(bW), "_")
466+ if ((bX[ae] != "L"))
467+ then throw((("Duck location type is " + bX[ae]) + ", but should be L"))
477468 else {
478- let bZ = bR(bS)
479- let ca = (fraction(bb, bZ, n) * bW)
480- al(invoke(this, "claimRes", [ca, bS], nil))
481- }
482- }
483-
484-
485-func cb (aF,br,bS) = {
486- let cc = toString(br)
487- let cd = N(bS)
488- let ce = valueOrElse(getInteger(cd), 0)
489- if ((ce >= 3))
490- then throw("Currently max infrastructure level = 3")
491- else {
492- let cf = (ce + 1)
493- let cg = value(assetInfo(fromBase58String(bS)))
494- if (!(contains(cg.name, i)))
495- then throw((("NFT " + i) + " token should be passed as param"))
469+ let bR = bX[af]
470+ let bY = value(assetInfo(fromBase58String(bR)))
471+ let bZ = L(bR)
472+ let ca = valueOrErrorMessage(getInteger(bZ), (("NFT " + bY.name) + " is not staked"))
473+ let cb = valueOrErrorMessage(getString(I(bR)), (("NFT " + bY.name) + " is orphaned"))
474+ if ((cb != bV))
475+ then throw((i + " is not yours"))
496476 else {
497- let ch = getStringValue(J(bS))
498- if ((ch != cc))
499- then throw((i + " is not yours"))
500- else {
501- let ci = split(cg.description, "_")
502- let I = ci[ab]
503- let bW = aU(I)
504- let W = valueOrErrorMessage(getString(R(cc)), "You don't have a duck staked")
505- let cj = valueOrElse(getString(X(W)), k)
506- let ck = split(value(cj), "_")
507- if ((ck[af] != "L"))
508- then throw((("Duck location type is " + ck[af]) + ", but should be L"))
509- else if ((ck[ag] != bS))
510- then throw(((("Duck location id is " + ck[ag]) + ", but should be ") + bS))
511- else {
512- let bo = V(W)
513- let bF = bn(bo)
514- let bG = split(bF[aj], "_")
515- let bH = makeString(aE(aF, bG, fraction(q, (bW * cf), 25)), "_")
516- let cl = bV(bS, bW)
517- $Tuple2([IntegerEntry(cd, cf), IntegerEntry(O(bS, cc), cf), StringEntry(bo, makeString([bF[ah], cl, bH, bF[ak]], ":"))], cf)
518- }
519- }
477+ let cc = split(bY.description, "_")
478+ $Tuple4(V, bR, cc, ca)
520479 }
521480 }
522481 }
523482
524483
525-@Callable(aR)
484+func cd (bV,aW) = {
485+ let ce = bU(bV)
486+ let H = ce._3[aa]
487+ let aM = aR(ce._3[ab])
488+ let ba = (lastBlock.timestamp - ce._4)
489+ if ((0 > ba))
490+ then throw(((("Saved timestamp is in future, saved = " + toString(ce._4)) + ", current = ") + toString(lastBlock.timestamp)))
491+ else {
492+ let cf = aT(H)
493+ let cg = bQ(ce._2)
494+ let ch = fraction(ba, (cg * cf), n)
495+ if ((aW > ch))
496+ then throw(((("Not enough resources, available = " + toString(ch)) + ", requested = ") + toString(aW)))
497+ else {
498+ let ci = fraction((ch - aW), n, (cg * cf))
499+ let cj = (lastBlock.timestamp - ci)
500+ let bn = U(ce._1)
501+ let bE = bm(bn)
502+ let aZ = split(bE[ah], "_")
503+ let ck = aY(aZ, aM, (ba - ci), (cf / 25), cg)
504+ $Tuple3([IntegerEntry(L(ce._2), cj), IntegerEntry(R(i, ce._2, bV), cj)], bn, [bE[ag], ck, bE[ai], bE[aj]])
505+ }
506+ }
507+ }
508+
509+
510+func cl (bV,bR,cf) = {
511+ let bZ = L(bR)
512+ let ca = value(getInteger(bZ))
513+ let ch = (fraction((lastBlock.timestamp - ca), bQ(bR), n) * cf)
514+ cd(bV, ch)
515+ }
516+
517+
518+func cm (aE,bq,cn) = {
519+ let bV = toString(bq)
520+ let ce = bU(bV)
521+ let cf = aT(ce._3[aa])
522+ let co = M(ce._2)
523+ let cp = valueOrElse(getInteger(co), 0)
524+ if ((cp >= 3))
525+ then throw("Currently max infrastructure level = 3")
526+ else {
527+ let cq = (cp + 1)
528+ let cr = fraction(r, (cf * cq), 25)
529+ if (if (!(aE))
530+ then (cn != cr)
531+ else false)
532+ then throw(("Payment attached should be " + toString(cr)))
533+ else {
534+ let bn = U(ce._1)
535+ let bE = bm(bn)
536+ let bF = split(bE[ai], "_")
537+ let bG = makeString(aD(aE, bF, fraction(q, (cf * cq), 25)), "_")
538+ let cs = cl(bV, ce._2, cf)
539+ $Tuple2(([IntegerEntry(co, cq), IntegerEntry(N(ce._2, bV), cq), StringEntry(bn, makeString([bE[ag], cs._3[ah], bG, bE[aj]], ":"))] ++ cs._1), cq)
540+ }
541+ }
542+ }
543+
544+
545+func ct (bV) = {
546+ let ce = bU(bV)
547+ let cu = P(ce._2)
548+ if (valueOrElse(getBoolean(cu), false))
549+ then throw("Presale artifact is already activated")
550+ else if ((parseIntValue(ce._3[Z]) > 500))
551+ then throw((((i + " ") + ce._2) + " is not eligible for presale artifact"))
552+ else [BooleanEntry(P(ce._2), true)]
553+ }
554+
555+
556+@Callable(aQ)
526557 func stakeLand () = {
527- let cm = value(aR.payments[0])
528- let K = value(cm.assetId)
529- let cn = toString(aR.caller)
530- if ((cm.amount != 1))
558+ let cv = value(aQ.payments[0])
559+ let J = value(cv.assetId)
560+ let cw = toString(aQ.caller)
561+ if ((cv.amount != 1))
531562 then throw((("NFT " + i) + " token should be attached as payment"))
532563 else {
533- let cg = value(assetInfo(K))
534- if ((cg.issuer != this))
564+ let bY = value(assetInfo(J))
565+ if ((bY.issuer != this))
535566 then throw("Unknown issuer of token")
536- else if (!(contains(cg.name, i)))
567+ else if (!(contains(bY.name, i)))
537568 then throw((("Only NFT " + i) + " tokens are accepted"))
538569 else {
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"))
570+ let cx = drop(bY.name, 4)
571+ let F = if (contains(cx, "XXL"))
572+ then dropRight(cx, 3)
573+ else if (contains(cx, "XL"))
574+ then dropRight(cx, 2)
575+ else dropRight(cx, 1)
576+ let cy = valueOrErrorMessage(parseInt(F), ("Cannot parse land number from " + bY.name))
577+ let bR = toBase58String(J)
578+ let bZ = L(bR)
579+ if (isDefined(getInteger(bZ)))
580+ then throw((("NFT " + bY.name) + " is already staked"))
550581 else {
551- let ci = split(cg.description, "_")
552- let aN = aS(ci[ac])
553- let aq = aM(aN, (aU(ci[ab]) / 25), 1)
554- let cq = if ((500 >= cp))
555- then (lastBlock.timestamp > u)
556- else false
557-[IntegerEntry(bX, lastBlock.timestamp), IntegerEntry(S(i, bS, cn), lastBlock.timestamp), StringEntry(J(bS), cn), StringEntry(U(G), cn), StringEntry(Z(), aq)]
582+ let cc = split(bY.description, "_")
583+ let aM = aR(cc[ab])
584+ let ap = aL(aM, (aT(cc[aa]) / 25), 1)
585+[IntegerEntry(bZ, lastBlock.timestamp), IntegerEntry(R(i, bR, cw), lastBlock.timestamp), StringEntry(I(bR), cw), StringEntry(T(F), cw), StringEntry(Y(), ap)]
558586 }
559587 }
560588 }
562590
563591
564592
565-@Callable(aR)
566-func unstakeLand (bS) = if ((size(aR.payments) != 0))
593+@Callable(aQ)
594+func unstakeLand (cz) = if ((size(aQ.payments) != 0))
567595 then throw("unstake doesn't require any payments")
568596 else {
569- let K = fromBase58String(bS)
570- let cn = toString(aR.caller)
571- let cg = value(assetInfo(K))
572- if ((cg.issuer != this))
573- then throw("Unknown issuer of token")
574- else if (!(contains(cg.name, i)))
575- then throw((("Only NFT " + i) + " tokens can be unstaked"))
576- else {
577- let bX = M(bS)
578- if (!(isDefined(bX)))
579- then throw((("NFT " + cg.name) + " is not staked"))
580- else {
581- let ch = valueOrErrorMessage(getString(J(bS)), (("NFT " + cg.name) + " is orphaned"))
582- if ((ch != cn))
583- then throw((("Staked " + i) + " is not yours"))
584- else {
585- let ci = split(cg.description, "_")
586- let aN = aS(ci[ac])
587- let bW = aU(ci[ab])
588- let aq = aM(aN, (bW / 25), -1)
589- let cl = bV(bS, bW)
590- let W = valueOrErrorMessage(getString(R(cn)), (("You can't unstake " + i) + " without a duck staked"))
591- let cj = valueOrElse(getString(X(W)), k)
592- let ck = split(value(cj), "_")
593- if ((ck[af] != "L"))
594- then throw((("Duck location type is " + ck[af]) + ", but should be L"))
595- else if ((ck[ag] != bS))
596- then throw(((("Duck location id is " + ck[ag]) + ", but should be ") + bS))
597- else {
598- let bo = V(W)
599- let bF = bn(bo)
600-[ScriptTransfer(aR.caller, 1, K), DeleteEntry(bX), DeleteEntry(S(i, bS, cn)), StringEntry(Z(), aq), StringEntry(bo, makeString([bF[ah], cl, bF[aj], bF[ak]], ":"))]
601- }
602- }
603- }
604- }
597+ let bV = toString(aQ.caller)
598+ let ce = bU(bV)
599+ let aM = aR(ce._3[ab])
600+ let cf = aT(ce._3[aa])
601+ let ap = aL(aM, (cf / 25), -1)
602+ let cs = cl(bV, ce._2, cf)
603+[ScriptTransfer(aQ.caller, 1, fromBase58String(ce._2)), DeleteEntry(L(ce._2)), DeleteEntry(R(i, ce._2, bV)), StringEntry(Y(), ap), StringEntry(cs._2, makeString(cs._3, ":"))]
605604 }
606605
607606
608607
609-@Callable(aR)
608+@Callable(aQ)
610609 func stakeDuck () = {
611- let cm = value(aR.payments[0])
612- let K = value(cm.assetId)
613- let cn = toString(aR.caller)
614- if ((cm.amount != 1))
610+ let cv = value(aQ.payments[0])
611+ let J = value(cv.assetId)
612+ let cw = toString(aQ.caller)
613+ if ((cv.amount != 1))
615614 then throw((("NFT " + j) + " token should be attached as payment"))
616615 else {
617- let cg = value(assetInfo(K))
618- if (if ((cg.issuer != d))
619- then (cg.issuer != e)
616+ let bY = value(assetInfo(J))
617+ if (if ((bY.issuer != d))
618+ then (bY.issuer != e)
620619 else false)
621620 then throw((("Unknown issuer of " + j) + " token"))
622- else if (!(contains(cg.name, j)))
621+ else if (!(contains(bY.name, j)))
623622 then throw((("Only NFT " + j) + " tokens are accepted"))
624623 else {
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))
624+ let cA = toBase58String(J)
625+ let bZ = L(cA)
626+ if (isDefined(getInteger(bZ)))
627+ then throw((("NFT " + bY.name) + " is already staked"))
628+ else if (isDefined(getString(Q(cw))))
629+ then throw(("You already staked one duck: " + bY.name))
631630 else {
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))
631+ let cB = W(cA)
632+ let cC = getString(cB)
633+ let bC = X(cA)
634+ let cD = getInteger(bC)
635+ let bn = U(cA)
636+ let cE = getString(bn)
637+ ([IntegerEntry(bZ, lastBlock.timestamp), IntegerEntry(R(j, toBase58String(J), cw), lastBlock.timestamp), StringEntry(K(cA), cw), StringEntry(Q(cw), cA)] ++ (if (isDefined(cC))
639638 then nil
640- else ([StringEntry(cs, k)] ++ (if (isDefined(cu))
639+ else ([StringEntry(cB, k)] ++ (if (isDefined(cD))
641640 then nil
642- else ([IntegerEntry(bD, 100)] ++ (if (isDefined(cv))
641+ else ([IntegerEntry(bC, 100)] ++ (if (isDefined(cE))
643642 then nil
644- else [StringEntry(bo, "0:0_0_0_0_0_0:0_0_0_0_0_0:")]))))))
643+ else [StringEntry(bn, "0:0_0_0_0_0_0:0_0_0_0_0_0:")]))))))
645644 }
646645 }
647646 }
649648
650649
651650
652-@Callable(aR)
653-func unstakeDuck (cr) = if ((size(aR.payments) != 0))
651+@Callable(aQ)
652+func unstakeDuck (cA) = if ((size(aQ.payments) != 0))
654653 then throw("unstake doesn't require any payments")
655654 else {
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)
655+ let J = fromBase58String(cA)
656+ let cw = toString(aQ.caller)
657+ let bY = value(assetInfo(J))
658+ if (if ((bY.issuer != d))
659+ then (bY.issuer != e)
661660 else false)
662661 then throw((("Unknown issuer of " + j) + " token"))
663- else if (!(contains(cg.name, j)))
662+ else if (!(contains(bY.name, j)))
664663 then throw((("Only NFT " + j) + " tokens can be unstaked"))
665664 else {
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"))
665+ let bZ = L(toBase58String(J))
666+ if (!(isDefined(bZ)))
667+ then throw((("NFT " + bY.name) + " is not staked"))
668+ else if (!(isDefined(Q(cw))))
669+ then throw((("The duck " + bY.name) + " is not staked"))
671670 else {
672- let ch = valueOrErrorMessage(getString(L(toBase58String(K))), (("NFT " + cg.name) + " is orphaned"))
673- if ((ch != cn))
671+ let cb = valueOrErrorMessage(getString(K(toBase58String(J))), (("NFT " + bY.name) + " is orphaned"))
672+ if ((cb != cw))
674673 then throw("Staked NFT is not yours")
675- else [ScriptTransfer(aR.caller, 1, K), DeleteEntry(bX), DeleteEntry(X(cr)), DeleteEntry(L(cr)), DeleteEntry(S(j, cr, cn)), DeleteEntry(R(cn))]
674+ else [ScriptTransfer(aQ.caller, 1, J), DeleteEntry(bZ), DeleteEntry(W(cA)), DeleteEntry(K(cA)), DeleteEntry(R(j, cA, cw)), DeleteEntry(Q(cw))]
676675 }
677676 }
678677 }
679678
680679
681680
682-@Callable(aR)
683-func claimRes (aX,bS) = if ((size(aR.payments) != 0))
681+@Callable(aQ)
682+func claimRes (aW,cz) = if ((size(aQ.payments) != 0))
684683 then throw("claimRes doesn't require any payments")
685684 else {
686- let cc = toString(aR.originCaller)
687- let cg = value(assetInfo(fromBase58String(bS)))
688- if (!(contains(cg.name, i)))
689- then throw((("NFT " + i) + " token should be passed as param"))
690- else {
691- let bX = M(bS)
692- let ch = getStringValue(J(bS))
693- if ((ch != cc))
694- then throw((i + " is not yours"))
695- else {
696- let ci = split(cg.description, "_")
697- let I = ci[ab]
698- let aN = aS(ci[ac])
699- let W = valueOrErrorMessage(getString(R(cc)), "You don't have a duck staked")
700- let cj = valueOrElse(getString(X(W)), k)
701- let ck = split(value(cj), "_")
702- if ((ck[af] != "L"))
703- then throw((("Duck location type is " + ck[af]) + ", but should be L"))
704- else if ((ck[ag] != bS))
705- then throw(((("Duck location id is " + ck[ag]) + ", but should be ") + bS))
706- else {
707- let bY = valueOrErrorMessage(getInteger(bX), (("NFT " + cg.name) + " is not staked"))
708- let bb = (lastBlock.timestamp - bY)
709- if ((0 > bb))
710- then throw(((("Saved timestamp is in future, saved = " + toString(bY)) + ", current = ") + toString(lastBlock.timestamp)))
711- else {
712- let bW = aU(I)
713- let bZ = bR(bS)
714- let ca = fraction(bb, (bZ * bW), n)
715- if ((aX > ca))
716- then throw(((("Not enough resources, available = " + toString(ca)) + ", requested = ") + toString(aX)))
717- else {
718- let cw = fraction((ca - aX), n, (bZ * bW))
719- let cx = (lastBlock.timestamp - cw)
720- let bo = V(W)
721- let bF = bn(bo)
722- let ba = split(bF[ai], "_")
723- let cy = aZ(ba, aN, (bb - cw), (bW / 25), bZ)
724- let cz = makeString([bF[ah], cy, bF[aj], bF[ak]], ":")
725- $Tuple2([StringEntry(bo, cz), IntegerEntry(bX, cx), IntegerEntry(S(i, bS, ch), cx)], cy)
726- }
727- }
728- }
729- }
730- }
685+ let bV = toString(aQ.originCaller)
686+ let aK = cd(bV, aW)
687+ $Tuple2((aK._1 :+ StringEntry(aK._2, makeString(aK._3, ":"))), aK._3[ah])
731688 }
732689
733690
734691
735-@Callable(aR)
736-func flight (bt,bu) = if (!(sigVerify_8Kb(bt, bu, g)))
692+@Callable(aQ)
693+func flight (bs,bt) = if (!(sigVerify_8Kb(bs, bt, g)))
737694 then throw("signature does not match")
738- else if ((size(aR.payments) != 0))
695+ else if ((size(aQ.payments) != 0))
739696 then throw("flight doesn't require any payments")
740697 else {
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)))
698+ let bu = split(toUtf8String(bs), ";")
699+ let bv = split(split(bu[0], "|")[0], "_")
700+ let bw = parseIntValue(bv[0])
701+ let bx = parseIntValue(bv[1])
702+ let cF = split(bu[1], ":")
703+ let cG = cF[0]
704+ let bA = parseIntValue(cF[1])
705+ if (if ((bA > (lastBlock.timestamp + o)))
749706 then true
750- else ((lastBlock.timestamp - o) > bB))
707+ else ((lastBlock.timestamp - o) > bA))
751708 then throw("signature outdated")
752709 else {
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))
710+ let V = valueOrErrorMessage(getString(Q(toString(aQ.caller))), "You don't have a duck staked")
711+ let bC = X(V)
712+ let bD = valueOrElse(getInteger(bC), 100)
713+ if ((bD != bw))
714+ then throw(((("oldHealth=" + toString(valueOrElse(getInteger(bC), 100))) + " from state does not match one from flight log=") + toString(bw)))
715+ else if ((0 >= bw))
759716 then throw("You can't fly with zero health")
760717 else {
761- let cs = X(W)
762- let cj = valueOrElse(getString(cs), k)
763- if ((cB == cj))
718+ let cB = W(V)
719+ let bW = valueOrElse(getString(cB), k)
720+ if ((cG == bW))
764721 then throw("You can't fly to the same location")
765- else $Tuple2([StringEntry(cs, if ((by > 0))
766- then cB
767- else cj), IntegerEntry(bD, by)], unit)
722+ else $Tuple2([StringEntry(cB, if ((bx > 0))
723+ then cG
724+ else bW), IntegerEntry(bC, bx)], unit)
768725 }
769726 }
770727 }
771728
772729
773730
774-@Callable(aR)
775-func setHealth (cu,W) = if (if ((0 > cu))
731+@Callable(aQ)
732+func setHealth (cD,V) = if (if ((0 > cD))
776733 then true
777- else (cu > 100))
734+ else (cD > 100))
778735 then throw("HP should be within 0..100")
779- else [IntegerEntry(Y(W), cu)]
736+ else [IntegerEntry(X(V), cD)]
780737
781738
782739
783-@Callable(aR)
784-func heal (cC,aX) = if (if ((0 > cC))
740+@Callable(aQ)
741+func heal (cH,aW) = if (if ((0 > cH))
785742 then true
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)))
743+ else (cH >= l))
744+ then throw(("Unknown material: " + toString(cH)))
745+ else if ((0 >= aW))
746+ then throw(("Amount should be positive! " + toString(aW)))
790747 else {
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))
748+ let V = valueOrErrorMessage(getString(Q(toString(aQ.caller))), "You don't have a duck staked")
749+ let bC = X(V)
750+ let cI = valueOrElse(getInteger(bC), 100)
751+ if ((cI >= 100))
795752 then throw("HP should be < 100 to heal")
796753 else {
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)))
754+ let bn = U(V)
755+ let bE = bm(bn)
756+ let bF = split(bE[ai], "_")
757+ let cJ = parseIntValue(bF[cH])
758+ let cK = min([(aW / h), (100 - cI)])
759+ let cL = (cK * h)
760+ if ((cL > cJ))
761+ then throw(((((("You need " + toString(cL)) + " of ") + B[cH]) + " to heal, but you backpack contains ") + toString(cJ)))
805762 else {
806- let bH = aV(bG, cC, cG)
807-[IntegerEntry(bD, (cD + cF)), StringEntry(bo, makeString([bF[ah], bF[ai], bH, bF[ak]], ":"))]
763+ let bG = aU(bF, cH, cL)
764+[IntegerEntry(bC, (cI + cK)), StringEntry(bn, makeString([bE[ag], bE[ah], bG, bE[aj]], ":"))]
808765 }
809766 }
810767 }
811768
812769
813770
814-@Callable(aR)
815-func updateBackpack (W,cz) = if ((aR.caller != f))
771+@Callable(aQ)
772+func updateBackpack (V,cM) = if ((aQ.caller != f))
816773 then throw("permission denied")
817- else $Tuple2([StringEntry(V(W), cz)], cz)
774+ else $Tuple2([StringEntry(U(V), cM)], cM)
818775
819776
820777
821-@Callable(aR)
822-func expeditionBuy (bt,bu) = if ((size(aR.payments) != 1))
778+@Callable(aQ)
779+func expeditionBuy (bs,bt) = if ((size(aQ.payments) != 1))
823780 then throw("Exactly one payment required")
824781 else {
825- let cm = value(aR.payments[0])
826- if ((cm.assetId != b))
782+ let cv = value(aQ.payments[0])
783+ if ((cv.assetId != b))
827784 then throw("Allowed USDN payment only!")
828- else if ((cm.amount != t))
785+ else if ((cv.amount != t))
829786 then throw(("Payment attached should be " + toString(t)))
830- else bq(false, aR.caller, aR.transactionId, bt, bu)
787+ else bp(false, aQ.caller, aQ.transactionId, bs, bt)
831788 }
832789
833790
834791
835-@Callable(aR)
836-func expedition (bt,bu) = if ((size(aR.payments) != 0))
792+@Callable(aQ)
793+func expedition (bs,bt) = if ((size(aQ.payments) != 0))
837794 then throw("expedition doesn't require any payments")
838- else bq(true, aR.caller, aR.transactionId, bt, bu)
795+ else bp(true, aQ.caller, aQ.transactionId, bs, bt)
839796
840797
841798
842-@Callable(aR)
843-func upgradeInfra (bS) = if ((size(aR.payments) != 0))
799+@Callable(aQ)
800+func upgradeInfra (cN) = if ((size(aQ.payments) != 0))
844801 then throw("Infrastructure upgrade doesn't require any payments")
845- else cb(true, aR.caller, bS)
802+ else cm(true, aQ.caller, 0)
846803
847804
848805
849-@Callable(aR)
850-func upgradeInfraUsdn (bS) = if ((size(aR.payments) != 1))
806+@Callable(aQ)
807+func upgradeInfraUsdn (cN) = if ((size(aQ.payments) != 1))
851808 then throw("Exactly one payment required")
852809 else {
853- let cm = value(aR.payments[0])
854- if ((cm.assetId != b))
810+ let cv = value(aQ.payments[0])
811+ if ((cv.assetId != b))
855812 then throw("Allowed USDN payment only!")
856- else {
857- let cf = (valueOrElse(getInteger(N(bS)), 0) + 1)
858- let cg = value(assetInfo(fromBase58String(bS)))
859- let ci = split(cg.description, "_")
860- let cH = fraction(r, (aU(ci[ab]) * cf), 25)
861- if ((cm.amount != cH))
862- then throw(("Payment attached should be " + toString(cH)))
863- else cb(false, aR.caller, bS)
864- }
813+ else cm(false, aQ.caller, cv.amount)
814+ }
815+
816+
817+
818+@Callable(aQ)
819+func activateArtifact (cO) = if ((size(aQ.payments) != 0))
820+ then throw("Artifact activation doesn't require any payments")
821+ else {
822+ let aK = {
823+ let c = cO
824+ if (("PRESALE" == c))
825+ then ct(toString(aQ.caller))
826+ else throw("Unknown artifact")
827+ }
828+ aK
865829 }
866830
867831
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 = {
99- let c = a
100- if (("W" == c))
101- then 1673136000000
102- else if (("T" == c))
103- then 1672790400000
104- else throw("Unknown chain")
105- }
98+let u = 1000000
10699
107-let v = 1000000
100+let v = toBigInt(5)
108101
109-let w = toBigInt(5)
102+let w = toBigInt(20)
110103
111-let x = toBigInt(20)
104+let x = toBigInt((20 * 20))
112105
113-let y = toBigInt((20 * 20))
106+let y = toBigInt(((20 * 20) * 20))
114107
115-let z = toBigInt(((20 * 20) * 20))
108+let z = toBigInt((((20 * 20) * 20) * 20))
116109
117-let A = toBigInt((((20 * 20) * 20) * 20))
110+let A = toBigInt(((((20 * 20) * 20) * 20) * 20))
118111
119-let B = toBigInt(((((20 * 20) * 20) * 20) * 20))
112+let B = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"]
120113
121-let C = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"]
114+let C = ["Asia", "Europe", "Americas", "Oceania", "Africa"]
122115
123-let D = ["Asia", "Europe", "Americas", "Oceania", "Africa"]
124-
125-func E () = "nextLandNum"
116+func D () = "nextLandNum"
126117
127118
128-func F (G) = ("landToAsset_" + G)
119+func E (F) = ("landToAsset_" + F)
129120
130121
131-func H (G,I) = ((i + G) + I)
122+func G (F,H) = ((i + F) + H)
132123
133124
134-func J (K) = ("nftOwner_" + K)
125+func I (J) = ("nftOwner_" + J)
135126
136127
137-func L (K) = ("duckOwner_" + K)
128+func K (J) = ("duckOwner_" + J)
138129
139130
140-func M (K) = ("stakedTime_" + K)
131+func L (J) = ("stakedTime_" + J)
141132
142133
143-func N (K) = ("infraLevel_" + K)
134+func M (J) = ("infraLevel_" + J)
144135
145136
146-func O (K,P) = ((("infraLevelByAssetIdAndOwner_" + K) + "_") + P)
137+func N (J,O) = ((("infraLevelByAssetIdAndOwner_" + J) + "_") + O)
147138
148139
149-func Q (K) = ("presaleArtActivated_" + K)
140+func P (J) = ("presaleArtActivated_" + J)
150141
151142
152-func R (P) = ("stakedDuckByOwner_" + P)
143+func Q (O) = ("stakedDuckByOwner_" + O)
153144
154145
155-func S (T,K,P) = ((((("stakedTimeByTypeAssetIdAndOwner_" + T) + "_") + K) + "_") + P)
146+func R (S,J,O) = ((((("stakedTimeByTypeAssetIdAndOwner_" + S) + "_") + J) + "_") + O)
156147
157148
158-func U (G) = ("landOwner_" + G)
149+func T (F) = ("landOwner_" + F)
159150
160151
161-func V (W) = ("backPack_" + W)
152+func U (V) = ("backPack_" + V)
162153
163154
164-func X (W) = ("duckLocation_" + W)
155+func W (V) = ("duckLocation_" + V)
165156
166157
167-func Y (W) = ("duckHealth_" + W)
158+func X (V) = ("duckHealth_" + V)
168159
169160
170-func Z () = "resTypesProportions"
161+func Y () = "resTypesProportions"
171162
172163
173-let aa = 0
164+let Z = 0
174165
175-let ab = 1
166+let aa = 1
176167
177-let ac = 2
168+let ab = 2
178169
179-let ad = 3
170+let ac = 3
180171
181-let ae = 0
172+let ad = 0
182173
183-let af = 1
174+let ae = 1
184175
185-let ag = 2
176+let af = 2
186177
187-let ah = 0
178+let ag = 0
188179
189-let ai = 1
180+let ah = 1
190181
191-let aj = 2
182+let ai = 2
192183
193-let ak = 3
184+let aj = 3
194185
195-func al (am) = {
196- let c = am
186+func ak (al) = {
187+ let c = al
197188 if ($isInstanceOf(c, "String"))
198189 then {
199- let an = c
200- an
190+ let am = c
191+ am
201192 }
202193 else throw("fail to cast into String")
203194 }
204195
205196
206-func ao (ap) = {
207- let aq = split(value(getString(Z())), "_")
208- if ((size(aq) != l))
197+func an (ao) = {
198+ let ap = split(value(getString(Y())), "_")
199+ if ((size(ap) != l))
209200 then throw("Wrong proportions data")
210201 else {
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))
202+ let aq = [parseIntValue(ap[0]), parseIntValue(ap[1]), parseIntValue(ap[2]), parseIntValue(ap[3]), parseIntValue(ap[4]), parseIntValue(ap[5])]
203+ let ar = (((((aq[0] + aq[1]) + aq[2]) + aq[3]) + aq[4]) + aq[5])
204+ if ((0 >= ar))
214205 then throw("No lands staked")
215206 else {
216- let at = fraction(ap, v, as)
217- func au (av,aw) = (av :+ fraction(aw, at, v))
207+ let as = fraction(ao, u, ar)
208+ func at (au,av) = (au :+ fraction(av, as, u))
218209
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])
210+ let aw = aq
211+ let ax = size(aw)
212+ let ay = nil
213+ func az (aA,aB) = if ((aB >= ax))
214+ then aA
215+ else at(aA, aw[aB])
225216
226- func aD (aB,aC) = if ((aC >= ay))
227- then aB
217+ func aC (aA,aB) = if ((aB >= ax))
218+ then aA
228219 else throw("List size exceeds 6")
229220
230- aD(aA(aA(aA(aA(aA(aA(az, 0), 1), 2), 3), 4), 5), 6)
221+ aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6)
231222 }
232223 }
233224 }
234225
235226
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))
227+func aD (aE,aF,aG) = {
228+ let aH = an(aG)
229+ func aI (au,aJ) = {
230+ let aK = (parseIntValue(aF[aJ]) - aH[aJ])
231+ if ((0 > aK))
232+ then throw(((((("Not enough material idx=" + toString(aJ)) + ", you have ") + aF[aJ]) + ", but need ") + toString(aH[aJ])))
233+ else (au :+ toString(aK))
243234 }
244235
245- if (aF)
236+ if (aE)
246237 then {
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])
238+ let aw = [0, 1, 2, 3, 4, 5]
239+ let ax = size(aw)
240+ let ay = nil
241+ func az (aA,aB) = if ((aB >= ax))
242+ then aA
243+ else aI(aA, aw[aB])
253244
254- func aD (aB,aC) = if ((aC >= ay))
255- then aB
245+ func aC (aA,aB) = if ((aB >= ax))
246+ then aA
256247 else throw("List size exceeds 6")
257248
258- aD(aA(aA(aA(aA(aA(aA(az, 0), 1), 2), 3), 4), 5), 6)
249+ aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6)
259250 }
260- else aG
251+ else aF
261252 }
262253
263254
264-func aM (aN,aO,aP) = {
265- let aq = split(valueOrElse(getString(Z()), "0_0_0_0_0_0"), "_")
266- if ((size(aq) != l))
255+func aL (aM,aN,aO) = {
256+ let ap = split(valueOrElse(getString(Y()), "0_0_0_0_0_0"), "_")
257+ if ((size(ap) != l))
267258 then throw("Wrong proportions data")
268259 else {
269- func aQ (av,aR) = {
270- let aL = (parseIntValue(aq[aR]) + ((aP * aN[aR]) * aO))
271- if ((0 > aL))
272- then throw(((((((("Panic! Pieces of type=" + toString(aR)) + ", sign=") + toString(aP)) + ", terrainCounts[i]=") + toString(aN[aR])) + ", landSizeIndex=") + toString(aO)))
273- else (av :+ toString(aL))
260+ func aP (au,aQ) = {
261+ let aK = (parseIntValue(ap[aQ]) + ((aO * aM[aQ]) * aN))
262+ if ((0 > aK))
263+ then throw(((((((("Panic! Pieces of type=" + toString(aQ)) + ", sign=") + toString(aO)) + ", terrainCounts[i]=") + toString(aM[aQ])) + ", landSizeIndex=") + toString(aN)))
264+ else (au :+ toString(aK))
274265 }
275266
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])
267+ let aq = {
268+ let aw = [0, 1, 2, 3, 4, 5]
269+ let ax = size(aw)
270+ let ay = nil
271+ func az (aA,aB) = if ((aB >= ax))
272+ then aA
273+ else aP(aA, aw[aB])
283274
284- func aD (aB,aC) = if ((aC >= ay))
285- then aB
275+ func aC (aA,aB) = if ((aB >= ax))
276+ then aA
286277 else throw("List size exceeds 6")
287278
288- aD(aA(aA(aA(aA(aA(aA(az, 0), 1), 2), 3), 4), 5), 6)
279+ aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6)
289280 }
290- makeString(ar, "_")
281+ makeString(aq, "_")
291282 }
292283 }
293284
294285
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)]
286+func aR (aS) = [(size(split(aS, "A")) - 1), (size(split(aS, "B")) - 1), (size(split(aS, "C")) - 1), (size(split(aS, "D")) - 1), (size(split(aS, "E")) - 1), (size(split(aS, "F")) - 1)]
296287
297288
298-func aU (I) = {
299- let c = I
289+func aT (H) = {
290+ let c = H
300291 if (("S" == c))
301292 then 25
302293 else if (("M" == c))
303294 then 100
304295 else if (("L" == c))
305296 then 225
306297 else if (("XL" == c))
307298 then 400
308299 else if (("XXL" == c))
309300 then 625
310301 else throw("Unknown land size")
311302 }
312303
313304
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]))
305+func aU (aV,aJ,aW) = {
306+ func aX (au,aQ) = (au :+ (if ((aQ == aJ))
307+ then toString((parseIntValue(aV[aQ]) - aW))
308+ else aV[aQ]))
318309
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])
310+ let aq = {
311+ let aw = [0, 1, 2, 3, 4, 5]
312+ let ax = size(aw)
313+ let ay = nil
314+ func az (aA,aB) = if ((aB >= ax))
315+ then aA
316+ else aX(aA, aw[aB])
326317
327- func aD (aB,aC) = if ((aC >= ay))
328- then aB
318+ func aC (aA,aB) = if ((aB >= ax))
319+ then aA
329320 else throw("List size exceeds 6")
330321
331- aD(aA(aA(aA(aA(aA(aA(az, 0), 1), 2), 3), 4), 5), 6)
322+ aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6)
332323 }
333- makeString(ar, "_")
324+ makeString(aq, "_")
334325 }
335326
336327
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)))
328+func aY (aZ,aM,ba,aN,bb) = {
329+ func bc (au,aQ) = {
330+ let bd = ((fraction(ba, bb, n) * aM[aQ]) * aN)
331+ (au :+ toString((parseIntValue(aZ[aQ]) + bd)))
341332 }
342333
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])
334+ let aq = {
335+ let aw = [0, 1, 2, 3, 4, 5]
336+ let ax = size(aw)
337+ let ay = nil
338+ func az (aA,aB) = if ((aB >= ax))
339+ then aA
340+ else bc(aA, aw[aB])
350341
351- func aD (aB,aC) = if ((aC >= ay))
352- then aB
342+ func aC (aA,aB) = if ((aB >= ax))
343+ then aA
353344 else throw("List size exceeds 6")
354345
355- aD(aA(aA(aA(aA(aA(aA(az, 0), 1), 2), 3), 4), 5), 6)
346+ aC(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6)
356347 }
357- makeString(ar, "_")
348+ makeString(aq, "_")
358349 }
359350
360351
361-func bf (bg) = if ((bg >= toBigInt(0)))
362- then bg
363- else -(bg)
352+func be (bf) = if ((bf >= toBigInt(0)))
353+ then bf
354+ else -(bf)
364355
365356
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]]
357+let bg = [[1, 4, 9, 10, 15], [5, 8, 13, 14, 15], [6, 9, 14, 15, 16], [4, 7, 8, 13, 18], [1, 6, 7, 15, 19]]
367358
368-func bi (bj,bk) = {
369- let bl = toInt((bj % x))
370- let bm = if ((bk[0] > bl))
359+func bh (bi,bj) = {
360+ let bk = toInt((bi % w))
361+ let bl = if ((bj[0] > bk))
371362 then "A"
372- else if ((bk[1] > bl))
363+ else if ((bj[1] > bk))
373364 then "B"
374- else if ((bk[2] > bl))
365+ else if ((bj[2] > bk))
375366 then "C"
376- else if ((bk[3] > bl))
367+ else if ((bj[3] > bk))
377368 then "D"
378- else if ((bk[4] > bl))
369+ else if ((bj[4] > bk))
379370 then "E"
380371 else "F"
381- bm
372+ bl
382373 }
383374
384375
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]]
376+func bm (bn) = {
377+ let bo = split(valueOrElse(getString(bn), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":")
378+[toString(valueOrElse(parseInt(bo[ag]), 0)), if ((size(split(bo[ah], "_")) == l))
379+ then bo[ah]
380+ else "0_0_0_0_0_0", if ((size(split(bo[ai], "_")) == l))
381+ then bo[ai]
382+ else "0_0_0_0_0_0", bo[aj]]
392383 }
393384
394385
395-func bq (aF,br,bs,bt,bu) = if (!(sigVerify_8Kb(bt, bu, g)))
386+func bp (aE,bq,br,bs,bt) = if (!(sigVerify_8Kb(bs, bt, g)))
396387 then throw("signature does not match")
397388 else {
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"))
389+ let bu = split(toUtf8String(bs), ";")
390+ let bv = split(split(bu[0], "|")[0], "_")
391+ let bw = parseIntValue(bv[0])
392+ let bx = parseIntValue(bv[1])
393+ let by = split(bu[1], ":")
394+ let bz = split(by[0], "_")
395+ if ((bz[1] != "E"))
405396 then throw("expedition target location type should be E")
406397 else {
407- let bB = parseIntValue(bz[1])
408- if (if ((bB > (lastBlock.timestamp + o)))
398+ let bA = parseIntValue(by[1])
399+ if (if ((bA > (lastBlock.timestamp + o)))
409400 then true
410- else ((lastBlock.timestamp - o) > bB))
401+ else ((lastBlock.timestamp - o) > bA))
411402 then throw("signature outdated")
412403 else {
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))
404+ let bB = toString(bq)
405+ let V = valueOrErrorMessage(getString(Q(bB)), "You don't have a duck staked")
406+ let bC = X(V)
407+ let bD = valueOrElse(getInteger(bC), 100)
408+ if ((bD != bw))
409+ then throw(((("oldHealth=" + toString(valueOrElse(getInteger(bC), 100))) + " from state does not match one from flight log=") + toString(bw)))
410+ else if ((0 >= bw))
420411 then throw("You can't fly with zero health")
421- else if ((0 >= by))
422- then $Tuple2(((if (!(aF))
423- then [ScriptTransfer(br, t, b)]
424- else nil) :+ IntegerEntry(bD, 0)), "")
412+ else if ((0 >= bx))
413+ then $Tuple2(((if (!(aE))
414+ then [ScriptTransfer(bq, t, b)]
415+ else nil) :+ IntegerEntry(bC, 0)), "")
425416 else {
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))
417+ let bn = U(V)
418+ let bE = bm(bn)
419+ let bF = split(bE[ai], "_")
420+ let bG = makeString(aD(aE, bF, s), "_")
421+ let bH = be(toBigInt(br))
422+ let bI = valueOrElse(getInteger(D()), 501)
423+ let F = toString(bI)
424+ let bJ = toInt((bH % v))
425+ let bK = bg[bJ]
426+ func bL (au,av) = $Tuple2((((((au._1 + bh(au._2, bK)) + bh((au._2 / w), bK)) + bh((au._2 / x), bK)) + bh((au._2 / y), bK)) + bh((au._2 / z), bK)), (au._2 / A))
436427
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])
428+ let bM = {
429+ let aw = [1, 2, 3, 4, 5]
430+ let ax = size(aw)
431+ let ay = $Tuple2("", (bH / v))
432+ func az (aA,aB) = if ((aB >= ax))
433+ then aA
434+ else bL(aA, aw[aB])
444435
445- func aD (aB,aC) = if ((aC >= ay))
446- then aB
436+ func aC (aA,aB) = if ((aB >= ax))
437+ then aA
447438 else throw("List size exceeds 5")
448439
449- aD(aA(aA(aA(aA(aA(az, 0), 1), 2), 3), 4), 5)
440+ aC(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5)
450441 }
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)
442+ let bN = C[bJ]
443+ let bO = Issue(G(F, "S"), makeString([F, "S", bM._1, bN], "_"), 1, 0, false)
444+ let J = calculateAssetId(bO)
445+ let bP = toBase58String(J)
446+ $Tuple2([IntegerEntry(D(), (bI + 1)), bO, StringEntry(E(F), bP), StringEntry(I(bP), bB), StringEntry(T(F), bB), IntegerEntry(M(bP), 0), IntegerEntry(N(bP, bB), 0), ScriptTransfer(bq, 1, J), StringEntry(W(V), makeString([bN, "L", bP], "_")), IntegerEntry(bC, bx), StringEntry(bn, makeString([bE[ag], bE[ah], bG, bE[aj]], ":"))], bP)
456447 }
457448 }
458449 }
459450 }
460451
461452
462-func bR (bS) = {
463- let bT = valueOrElse(getInteger(N(bS)), 0)
464- let bU = if (valueOrElse(getBoolean(Q(bS)), false))
453+func bQ (bR) = {
454+ let bS = valueOrElse(getInteger(M(bR)), 0)
455+ let bT = if (valueOrElse(getBoolean(P(bR)), false))
465456 then 3
466457 else 0
467- (m + fraction(m, bT, 4))
458+ ((m + fraction(m, bS, 4)) + fraction(m, bT, 20))
468459 }
469460
470461
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)))
462+func bU (bV) = {
463+ let V = valueOrErrorMessage(getString(Q(bV)), "You don't have a duck staked")
464+ let bW = valueOrElse(getString(W(V)), k)
465+ let bX = split(value(bW), "_")
466+ if ((bX[ae] != "L"))
467+ then throw((("Duck location type is " + bX[ae]) + ", but should be L"))
477468 else {
478- let bZ = bR(bS)
479- let ca = (fraction(bb, bZ, n) * bW)
480- al(invoke(this, "claimRes", [ca, bS], nil))
481- }
482- }
483-
484-
485-func cb (aF,br,bS) = {
486- let cc = toString(br)
487- let cd = N(bS)
488- let ce = valueOrElse(getInteger(cd), 0)
489- if ((ce >= 3))
490- then throw("Currently max infrastructure level = 3")
491- else {
492- let cf = (ce + 1)
493- let cg = value(assetInfo(fromBase58String(bS)))
494- if (!(contains(cg.name, i)))
495- then throw((("NFT " + i) + " token should be passed as param"))
469+ let bR = bX[af]
470+ let bY = value(assetInfo(fromBase58String(bR)))
471+ let bZ = L(bR)
472+ let ca = valueOrErrorMessage(getInteger(bZ), (("NFT " + bY.name) + " is not staked"))
473+ let cb = valueOrErrorMessage(getString(I(bR)), (("NFT " + bY.name) + " is orphaned"))
474+ if ((cb != bV))
475+ then throw((i + " is not yours"))
496476 else {
497- let ch = getStringValue(J(bS))
498- if ((ch != cc))
499- then throw((i + " is not yours"))
500- else {
501- let ci = split(cg.description, "_")
502- let I = ci[ab]
503- let bW = aU(I)
504- let W = valueOrErrorMessage(getString(R(cc)), "You don't have a duck staked")
505- let cj = valueOrElse(getString(X(W)), k)
506- let ck = split(value(cj), "_")
507- if ((ck[af] != "L"))
508- then throw((("Duck location type is " + ck[af]) + ", but should be L"))
509- else if ((ck[ag] != bS))
510- then throw(((("Duck location id is " + ck[ag]) + ", but should be ") + bS))
511- else {
512- let bo = V(W)
513- let bF = bn(bo)
514- let bG = split(bF[aj], "_")
515- let bH = makeString(aE(aF, bG, fraction(q, (bW * cf), 25)), "_")
516- let cl = bV(bS, bW)
517- $Tuple2([IntegerEntry(cd, cf), IntegerEntry(O(bS, cc), cf), StringEntry(bo, makeString([bF[ah], cl, bH, bF[ak]], ":"))], cf)
518- }
519- }
477+ let cc = split(bY.description, "_")
478+ $Tuple4(V, bR, cc, ca)
520479 }
521480 }
522481 }
523482
524483
525-@Callable(aR)
484+func cd (bV,aW) = {
485+ let ce = bU(bV)
486+ let H = ce._3[aa]
487+ let aM = aR(ce._3[ab])
488+ let ba = (lastBlock.timestamp - ce._4)
489+ if ((0 > ba))
490+ then throw(((("Saved timestamp is in future, saved = " + toString(ce._4)) + ", current = ") + toString(lastBlock.timestamp)))
491+ else {
492+ let cf = aT(H)
493+ let cg = bQ(ce._2)
494+ let ch = fraction(ba, (cg * cf), n)
495+ if ((aW > ch))
496+ then throw(((("Not enough resources, available = " + toString(ch)) + ", requested = ") + toString(aW)))
497+ else {
498+ let ci = fraction((ch - aW), n, (cg * cf))
499+ let cj = (lastBlock.timestamp - ci)
500+ let bn = U(ce._1)
501+ let bE = bm(bn)
502+ let aZ = split(bE[ah], "_")
503+ let ck = aY(aZ, aM, (ba - ci), (cf / 25), cg)
504+ $Tuple3([IntegerEntry(L(ce._2), cj), IntegerEntry(R(i, ce._2, bV), cj)], bn, [bE[ag], ck, bE[ai], bE[aj]])
505+ }
506+ }
507+ }
508+
509+
510+func cl (bV,bR,cf) = {
511+ let bZ = L(bR)
512+ let ca = value(getInteger(bZ))
513+ let ch = (fraction((lastBlock.timestamp - ca), bQ(bR), n) * cf)
514+ cd(bV, ch)
515+ }
516+
517+
518+func cm (aE,bq,cn) = {
519+ let bV = toString(bq)
520+ let ce = bU(bV)
521+ let cf = aT(ce._3[aa])
522+ let co = M(ce._2)
523+ let cp = valueOrElse(getInteger(co), 0)
524+ if ((cp >= 3))
525+ then throw("Currently max infrastructure level = 3")
526+ else {
527+ let cq = (cp + 1)
528+ let cr = fraction(r, (cf * cq), 25)
529+ if (if (!(aE))
530+ then (cn != cr)
531+ else false)
532+ then throw(("Payment attached should be " + toString(cr)))
533+ else {
534+ let bn = U(ce._1)
535+ let bE = bm(bn)
536+ let bF = split(bE[ai], "_")
537+ let bG = makeString(aD(aE, bF, fraction(q, (cf * cq), 25)), "_")
538+ let cs = cl(bV, ce._2, cf)
539+ $Tuple2(([IntegerEntry(co, cq), IntegerEntry(N(ce._2, bV), cq), StringEntry(bn, makeString([bE[ag], cs._3[ah], bG, bE[aj]], ":"))] ++ cs._1), cq)
540+ }
541+ }
542+ }
543+
544+
545+func ct (bV) = {
546+ let ce = bU(bV)
547+ let cu = P(ce._2)
548+ if (valueOrElse(getBoolean(cu), false))
549+ then throw("Presale artifact is already activated")
550+ else if ((parseIntValue(ce._3[Z]) > 500))
551+ then throw((((i + " ") + ce._2) + " is not eligible for presale artifact"))
552+ else [BooleanEntry(P(ce._2), true)]
553+ }
554+
555+
556+@Callable(aQ)
526557 func stakeLand () = {
527- let cm = value(aR.payments[0])
528- let K = value(cm.assetId)
529- let cn = toString(aR.caller)
530- if ((cm.amount != 1))
558+ let cv = value(aQ.payments[0])
559+ let J = value(cv.assetId)
560+ let cw = toString(aQ.caller)
561+ if ((cv.amount != 1))
531562 then throw((("NFT " + i) + " token should be attached as payment"))
532563 else {
533- let cg = value(assetInfo(K))
534- if ((cg.issuer != this))
564+ let bY = value(assetInfo(J))
565+ if ((bY.issuer != this))
535566 then throw("Unknown issuer of token")
536- else if (!(contains(cg.name, i)))
567+ else if (!(contains(bY.name, i)))
537568 then throw((("Only NFT " + i) + " tokens are accepted"))
538569 else {
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"))
570+ let cx = drop(bY.name, 4)
571+ let F = if (contains(cx, "XXL"))
572+ then dropRight(cx, 3)
573+ else if (contains(cx, "XL"))
574+ then dropRight(cx, 2)
575+ else dropRight(cx, 1)
576+ let cy = valueOrErrorMessage(parseInt(F), ("Cannot parse land number from " + bY.name))
577+ let bR = toBase58String(J)
578+ let bZ = L(bR)
579+ if (isDefined(getInteger(bZ)))
580+ then throw((("NFT " + bY.name) + " is already staked"))
550581 else {
551- let ci = split(cg.description, "_")
552- let aN = aS(ci[ac])
553- let aq = aM(aN, (aU(ci[ab]) / 25), 1)
554- let cq = if ((500 >= cp))
555- then (lastBlock.timestamp > u)
556- else false
557-[IntegerEntry(bX, lastBlock.timestamp), IntegerEntry(S(i, bS, cn), lastBlock.timestamp), StringEntry(J(bS), cn), StringEntry(U(G), cn), StringEntry(Z(), aq)]
582+ let cc = split(bY.description, "_")
583+ let aM = aR(cc[ab])
584+ let ap = aL(aM, (aT(cc[aa]) / 25), 1)
585+[IntegerEntry(bZ, lastBlock.timestamp), IntegerEntry(R(i, bR, cw), lastBlock.timestamp), StringEntry(I(bR), cw), StringEntry(T(F), cw), StringEntry(Y(), ap)]
558586 }
559587 }
560588 }
561589 }
562590
563591
564592
565-@Callable(aR)
566-func unstakeLand (bS) = if ((size(aR.payments) != 0))
593+@Callable(aQ)
594+func unstakeLand (cz) = if ((size(aQ.payments) != 0))
567595 then throw("unstake doesn't require any payments")
568596 else {
569- let K = fromBase58String(bS)
570- let cn = toString(aR.caller)
571- let cg = value(assetInfo(K))
572- if ((cg.issuer != this))
573- then throw("Unknown issuer of token")
574- else if (!(contains(cg.name, i)))
575- then throw((("Only NFT " + i) + " tokens can be unstaked"))
576- else {
577- let bX = M(bS)
578- if (!(isDefined(bX)))
579- then throw((("NFT " + cg.name) + " is not staked"))
580- else {
581- let ch = valueOrErrorMessage(getString(J(bS)), (("NFT " + cg.name) + " is orphaned"))
582- if ((ch != cn))
583- then throw((("Staked " + i) + " is not yours"))
584- else {
585- let ci = split(cg.description, "_")
586- let aN = aS(ci[ac])
587- let bW = aU(ci[ab])
588- let aq = aM(aN, (bW / 25), -1)
589- let cl = bV(bS, bW)
590- let W = valueOrErrorMessage(getString(R(cn)), (("You can't unstake " + i) + " without a duck staked"))
591- let cj = valueOrElse(getString(X(W)), k)
592- let ck = split(value(cj), "_")
593- if ((ck[af] != "L"))
594- then throw((("Duck location type is " + ck[af]) + ", but should be L"))
595- else if ((ck[ag] != bS))
596- then throw(((("Duck location id is " + ck[ag]) + ", but should be ") + bS))
597- else {
598- let bo = V(W)
599- let bF = bn(bo)
600-[ScriptTransfer(aR.caller, 1, K), DeleteEntry(bX), DeleteEntry(S(i, bS, cn)), StringEntry(Z(), aq), StringEntry(bo, makeString([bF[ah], cl, bF[aj], bF[ak]], ":"))]
601- }
602- }
603- }
604- }
597+ let bV = toString(aQ.caller)
598+ let ce = bU(bV)
599+ let aM = aR(ce._3[ab])
600+ let cf = aT(ce._3[aa])
601+ let ap = aL(aM, (cf / 25), -1)
602+ let cs = cl(bV, ce._2, cf)
603+[ScriptTransfer(aQ.caller, 1, fromBase58String(ce._2)), DeleteEntry(L(ce._2)), DeleteEntry(R(i, ce._2, bV)), StringEntry(Y(), ap), StringEntry(cs._2, makeString(cs._3, ":"))]
605604 }
606605
607606
608607
609-@Callable(aR)
608+@Callable(aQ)
610609 func stakeDuck () = {
611- let cm = value(aR.payments[0])
612- let K = value(cm.assetId)
613- let cn = toString(aR.caller)
614- if ((cm.amount != 1))
610+ let cv = value(aQ.payments[0])
611+ let J = value(cv.assetId)
612+ let cw = toString(aQ.caller)
613+ if ((cv.amount != 1))
615614 then throw((("NFT " + j) + " token should be attached as payment"))
616615 else {
617- let cg = value(assetInfo(K))
618- if (if ((cg.issuer != d))
619- then (cg.issuer != e)
616+ let bY = value(assetInfo(J))
617+ if (if ((bY.issuer != d))
618+ then (bY.issuer != e)
620619 else false)
621620 then throw((("Unknown issuer of " + j) + " token"))
622- else if (!(contains(cg.name, j)))
621+ else if (!(contains(bY.name, j)))
623622 then throw((("Only NFT " + j) + " tokens are accepted"))
624623 else {
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))
624+ let cA = toBase58String(J)
625+ let bZ = L(cA)
626+ if (isDefined(getInteger(bZ)))
627+ then throw((("NFT " + bY.name) + " is already staked"))
628+ else if (isDefined(getString(Q(cw))))
629+ then throw(("You already staked one duck: " + bY.name))
631630 else {
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))
631+ let cB = W(cA)
632+ let cC = getString(cB)
633+ let bC = X(cA)
634+ let cD = getInteger(bC)
635+ let bn = U(cA)
636+ let cE = getString(bn)
637+ ([IntegerEntry(bZ, lastBlock.timestamp), IntegerEntry(R(j, toBase58String(J), cw), lastBlock.timestamp), StringEntry(K(cA), cw), StringEntry(Q(cw), cA)] ++ (if (isDefined(cC))
639638 then nil
640- else ([StringEntry(cs, k)] ++ (if (isDefined(cu))
639+ else ([StringEntry(cB, k)] ++ (if (isDefined(cD))
641640 then nil
642- else ([IntegerEntry(bD, 100)] ++ (if (isDefined(cv))
641+ else ([IntegerEntry(bC, 100)] ++ (if (isDefined(cE))
643642 then nil
644- else [StringEntry(bo, "0:0_0_0_0_0_0:0_0_0_0_0_0:")]))))))
643+ else [StringEntry(bn, "0:0_0_0_0_0_0:0_0_0_0_0_0:")]))))))
645644 }
646645 }
647646 }
648647 }
649648
650649
651650
652-@Callable(aR)
653-func unstakeDuck (cr) = if ((size(aR.payments) != 0))
651+@Callable(aQ)
652+func unstakeDuck (cA) = if ((size(aQ.payments) != 0))
654653 then throw("unstake doesn't require any payments")
655654 else {
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)
655+ let J = fromBase58String(cA)
656+ let cw = toString(aQ.caller)
657+ let bY = value(assetInfo(J))
658+ if (if ((bY.issuer != d))
659+ then (bY.issuer != e)
661660 else false)
662661 then throw((("Unknown issuer of " + j) + " token"))
663- else if (!(contains(cg.name, j)))
662+ else if (!(contains(bY.name, j)))
664663 then throw((("Only NFT " + j) + " tokens can be unstaked"))
665664 else {
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"))
665+ let bZ = L(toBase58String(J))
666+ if (!(isDefined(bZ)))
667+ then throw((("NFT " + bY.name) + " is not staked"))
668+ else if (!(isDefined(Q(cw))))
669+ then throw((("The duck " + bY.name) + " is not staked"))
671670 else {
672- let ch = valueOrErrorMessage(getString(L(toBase58String(K))), (("NFT " + cg.name) + " is orphaned"))
673- if ((ch != cn))
671+ let cb = valueOrErrorMessage(getString(K(toBase58String(J))), (("NFT " + bY.name) + " is orphaned"))
672+ if ((cb != cw))
674673 then throw("Staked NFT is not yours")
675- else [ScriptTransfer(aR.caller, 1, K), DeleteEntry(bX), DeleteEntry(X(cr)), DeleteEntry(L(cr)), DeleteEntry(S(j, cr, cn)), DeleteEntry(R(cn))]
674+ else [ScriptTransfer(aQ.caller, 1, J), DeleteEntry(bZ), DeleteEntry(W(cA)), DeleteEntry(K(cA)), DeleteEntry(R(j, cA, cw)), DeleteEntry(Q(cw))]
676675 }
677676 }
678677 }
679678
680679
681680
682-@Callable(aR)
683-func claimRes (aX,bS) = if ((size(aR.payments) != 0))
681+@Callable(aQ)
682+func claimRes (aW,cz) = if ((size(aQ.payments) != 0))
684683 then throw("claimRes doesn't require any payments")
685684 else {
686- let cc = toString(aR.originCaller)
687- let cg = value(assetInfo(fromBase58String(bS)))
688- if (!(contains(cg.name, i)))
689- then throw((("NFT " + i) + " token should be passed as param"))
690- else {
691- let bX = M(bS)
692- let ch = getStringValue(J(bS))
693- if ((ch != cc))
694- then throw((i + " is not yours"))
695- else {
696- let ci = split(cg.description, "_")
697- let I = ci[ab]
698- let aN = aS(ci[ac])
699- let W = valueOrErrorMessage(getString(R(cc)), "You don't have a duck staked")
700- let cj = valueOrElse(getString(X(W)), k)
701- let ck = split(value(cj), "_")
702- if ((ck[af] != "L"))
703- then throw((("Duck location type is " + ck[af]) + ", but should be L"))
704- else if ((ck[ag] != bS))
705- then throw(((("Duck location id is " + ck[ag]) + ", but should be ") + bS))
706- else {
707- let bY = valueOrErrorMessage(getInteger(bX), (("NFT " + cg.name) + " is not staked"))
708- let bb = (lastBlock.timestamp - bY)
709- if ((0 > bb))
710- then throw(((("Saved timestamp is in future, saved = " + toString(bY)) + ", current = ") + toString(lastBlock.timestamp)))
711- else {
712- let bW = aU(I)
713- let bZ = bR(bS)
714- let ca = fraction(bb, (bZ * bW), n)
715- if ((aX > ca))
716- then throw(((("Not enough resources, available = " + toString(ca)) + ", requested = ") + toString(aX)))
717- else {
718- let cw = fraction((ca - aX), n, (bZ * bW))
719- let cx = (lastBlock.timestamp - cw)
720- let bo = V(W)
721- let bF = bn(bo)
722- let ba = split(bF[ai], "_")
723- let cy = aZ(ba, aN, (bb - cw), (bW / 25), bZ)
724- let cz = makeString([bF[ah], cy, bF[aj], bF[ak]], ":")
725- $Tuple2([StringEntry(bo, cz), IntegerEntry(bX, cx), IntegerEntry(S(i, bS, ch), cx)], cy)
726- }
727- }
728- }
729- }
730- }
685+ let bV = toString(aQ.originCaller)
686+ let aK = cd(bV, aW)
687+ $Tuple2((aK._1 :+ StringEntry(aK._2, makeString(aK._3, ":"))), aK._3[ah])
731688 }
732689
733690
734691
735-@Callable(aR)
736-func flight (bt,bu) = if (!(sigVerify_8Kb(bt, bu, g)))
692+@Callable(aQ)
693+func flight (bs,bt) = if (!(sigVerify_8Kb(bs, bt, g)))
737694 then throw("signature does not match")
738- else if ((size(aR.payments) != 0))
695+ else if ((size(aQ.payments) != 0))
739696 then throw("flight doesn't require any payments")
740697 else {
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)))
698+ let bu = split(toUtf8String(bs), ";")
699+ let bv = split(split(bu[0], "|")[0], "_")
700+ let bw = parseIntValue(bv[0])
701+ let bx = parseIntValue(bv[1])
702+ let cF = split(bu[1], ":")
703+ let cG = cF[0]
704+ let bA = parseIntValue(cF[1])
705+ if (if ((bA > (lastBlock.timestamp + o)))
749706 then true
750- else ((lastBlock.timestamp - o) > bB))
707+ else ((lastBlock.timestamp - o) > bA))
751708 then throw("signature outdated")
752709 else {
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))
710+ let V = valueOrErrorMessage(getString(Q(toString(aQ.caller))), "You don't have a duck staked")
711+ let bC = X(V)
712+ let bD = valueOrElse(getInteger(bC), 100)
713+ if ((bD != bw))
714+ then throw(((("oldHealth=" + toString(valueOrElse(getInteger(bC), 100))) + " from state does not match one from flight log=") + toString(bw)))
715+ else if ((0 >= bw))
759716 then throw("You can't fly with zero health")
760717 else {
761- let cs = X(W)
762- let cj = valueOrElse(getString(cs), k)
763- if ((cB == cj))
718+ let cB = W(V)
719+ let bW = valueOrElse(getString(cB), k)
720+ if ((cG == bW))
764721 then throw("You can't fly to the same location")
765- else $Tuple2([StringEntry(cs, if ((by > 0))
766- then cB
767- else cj), IntegerEntry(bD, by)], unit)
722+ else $Tuple2([StringEntry(cB, if ((bx > 0))
723+ then cG
724+ else bW), IntegerEntry(bC, bx)], unit)
768725 }
769726 }
770727 }
771728
772729
773730
774-@Callable(aR)
775-func setHealth (cu,W) = if (if ((0 > cu))
731+@Callable(aQ)
732+func setHealth (cD,V) = if (if ((0 > cD))
776733 then true
777- else (cu > 100))
734+ else (cD > 100))
778735 then throw("HP should be within 0..100")
779- else [IntegerEntry(Y(W), cu)]
736+ else [IntegerEntry(X(V), cD)]
780737
781738
782739
783-@Callable(aR)
784-func heal (cC,aX) = if (if ((0 > cC))
740+@Callable(aQ)
741+func heal (cH,aW) = if (if ((0 > cH))
785742 then true
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)))
743+ else (cH >= l))
744+ then throw(("Unknown material: " + toString(cH)))
745+ else if ((0 >= aW))
746+ then throw(("Amount should be positive! " + toString(aW)))
790747 else {
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))
748+ let V = valueOrErrorMessage(getString(Q(toString(aQ.caller))), "You don't have a duck staked")
749+ let bC = X(V)
750+ let cI = valueOrElse(getInteger(bC), 100)
751+ if ((cI >= 100))
795752 then throw("HP should be < 100 to heal")
796753 else {
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)))
754+ let bn = U(V)
755+ let bE = bm(bn)
756+ let bF = split(bE[ai], "_")
757+ let cJ = parseIntValue(bF[cH])
758+ let cK = min([(aW / h), (100 - cI)])
759+ let cL = (cK * h)
760+ if ((cL > cJ))
761+ then throw(((((("You need " + toString(cL)) + " of ") + B[cH]) + " to heal, but you backpack contains ") + toString(cJ)))
805762 else {
806- let bH = aV(bG, cC, cG)
807-[IntegerEntry(bD, (cD + cF)), StringEntry(bo, makeString([bF[ah], bF[ai], bH, bF[ak]], ":"))]
763+ let bG = aU(bF, cH, cL)
764+[IntegerEntry(bC, (cI + cK)), StringEntry(bn, makeString([bE[ag], bE[ah], bG, bE[aj]], ":"))]
808765 }
809766 }
810767 }
811768
812769
813770
814-@Callable(aR)
815-func updateBackpack (W,cz) = if ((aR.caller != f))
771+@Callable(aQ)
772+func updateBackpack (V,cM) = if ((aQ.caller != f))
816773 then throw("permission denied")
817- else $Tuple2([StringEntry(V(W), cz)], cz)
774+ else $Tuple2([StringEntry(U(V), cM)], cM)
818775
819776
820777
821-@Callable(aR)
822-func expeditionBuy (bt,bu) = if ((size(aR.payments) != 1))
778+@Callable(aQ)
779+func expeditionBuy (bs,bt) = if ((size(aQ.payments) != 1))
823780 then throw("Exactly one payment required")
824781 else {
825- let cm = value(aR.payments[0])
826- if ((cm.assetId != b))
782+ let cv = value(aQ.payments[0])
783+ if ((cv.assetId != b))
827784 then throw("Allowed USDN payment only!")
828- else if ((cm.amount != t))
785+ else if ((cv.amount != t))
829786 then throw(("Payment attached should be " + toString(t)))
830- else bq(false, aR.caller, aR.transactionId, bt, bu)
787+ else bp(false, aQ.caller, aQ.transactionId, bs, bt)
831788 }
832789
833790
834791
835-@Callable(aR)
836-func expedition (bt,bu) = if ((size(aR.payments) != 0))
792+@Callable(aQ)
793+func expedition (bs,bt) = if ((size(aQ.payments) != 0))
837794 then throw("expedition doesn't require any payments")
838- else bq(true, aR.caller, aR.transactionId, bt, bu)
795+ else bp(true, aQ.caller, aQ.transactionId, bs, bt)
839796
840797
841798
842-@Callable(aR)
843-func upgradeInfra (bS) = if ((size(aR.payments) != 0))
799+@Callable(aQ)
800+func upgradeInfra (cN) = if ((size(aQ.payments) != 0))
844801 then throw("Infrastructure upgrade doesn't require any payments")
845- else cb(true, aR.caller, bS)
802+ else cm(true, aQ.caller, 0)
846803
847804
848805
849-@Callable(aR)
850-func upgradeInfraUsdn (bS) = if ((size(aR.payments) != 1))
806+@Callable(aQ)
807+func upgradeInfraUsdn (cN) = if ((size(aQ.payments) != 1))
851808 then throw("Exactly one payment required")
852809 else {
853- let cm = value(aR.payments[0])
854- if ((cm.assetId != b))
810+ let cv = value(aQ.payments[0])
811+ if ((cv.assetId != b))
855812 then throw("Allowed USDN payment only!")
856- else {
857- let cf = (valueOrElse(getInteger(N(bS)), 0) + 1)
858- let cg = value(assetInfo(fromBase58String(bS)))
859- let ci = split(cg.description, "_")
860- let cH = fraction(r, (aU(ci[ab]) * cf), 25)
861- if ((cm.amount != cH))
862- then throw(("Payment attached should be " + toString(cH)))
863- else cb(false, aR.caller, bS)
864- }
813+ else cm(false, aQ.caller, cv.amount)
814+ }
815+
816+
817+
818+@Callable(aQ)
819+func activateArtifact (cO) = if ((size(aQ.payments) != 0))
820+ then throw("Artifact activation doesn't require any payments")
821+ else {
822+ let aK = {
823+ let c = cO
824+ if (("PRESALE" == c))
825+ then ct(toString(aQ.caller))
826+ else throw("Unknown artifact")
827+ }
828+ aK
865829 }
866830
867831

github/deemru/w8io/026f985 
282.57 ms