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