tx · FNoUAhR4Jd6Cws7YJJBDr7LWhpyYMhcU75PUQFudZJ6X 3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep: -0.03200000 Waves 2023.05.29 02:57 [2598507] smart account 3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep > SELF 0.00000000 Waves
{ "type": 13, "id": "FNoUAhR4Jd6Cws7YJJBDr7LWhpyYMhcU75PUQFudZJ6X", "fee": 3200000, "feeAssetId": null, "timestamp": 1685318253925, "version": 2, "chainId": 84, "sender": "3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep", "senderPublicKey": "7v5L7QkXxfkirALdyqmox38QCsa9jtfAtgUfHTh34eWq", "proofs": [ "21YTp34BH6MAp2AFefih32WRxCzukzCpk9saAfK6aMz2tU5huU2A1GLzXRXdmqQJwjV1jgVF9YWgjdG6hwxsuciz" ], "script": "base64:BgIrCAISAwoBCBIECgIRERIECgIRERIDCgEREgQKAgEBEgQKAggIEgUKAwgICFoAA1NFUAICX18ABU1VTFQ2AMCEPQAFTVVMVDcAgK3iBAAFTVVMVDgAgMLXLwAGTVVMVDEwAIDIr6AlAAVjaGFpbgkAyQECCQDKAQIIBQR0aGlzBWJ5dGVzAAEAAQALdXNkdEFzc2V0SWQEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDABIITaerIIAz9O0bvKju6Lk7zJgt0LXfoHlqjUI/moD/+5AwkAAAIBAVQFByRtYXRjaDABIFWx2J9yh4Lv5eNbjawFq2XemkOhLxa7BfMat4el8cUYCQACAQINVW5rbm93biBjaGFpbgAVZGVmYXVsdFJlc3RBZGRyZXNzU3RyBAckbWF0Y2gwBQVjaGFpbgMJAAACAQFXBQckbWF0Y2gwAiMzUFFDdXZGYnZoNExrUFVucm5VMXozam5iQTFwOW0zV05odgMJAAACAQFUBQckbWF0Y2gwAiMzTXVta0dHenRDS0FYcFdEcXhrZGRvZnFYU1VicVFrdlNKeQkAAgECDVVua25vd24gY2hhaW4BD2dldFN0cmluZ09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jW2 Next: 6Ht9SJk9iSqC6y2sMfiq1w1BV91zoHCUyvyzySfmaA3E Diff:
Old | New | Differences | |
---|---|---|---|
180 | 180 | ||
181 | 181 | let aJ = 2 | |
182 | 182 | ||
183 | - | func aK (aL) = { | |
184 | - | let h = aL | |
183 | + | let aK = 3 | |
184 | + | ||
185 | + | let aL = 0 | |
186 | + | ||
187 | + | let aM = 1 | |
188 | + | ||
189 | + | let aN = 2 | |
190 | + | ||
191 | + | func aO (aP) = { | |
192 | + | let h = aP | |
185 | 193 | if ($isInstanceOf(h, "String")) | |
186 | 194 | then { | |
187 | - | let | |
188 | - | | |
195 | + | let aQ = h | |
196 | + | aQ | |
189 | 197 | } | |
190 | 198 | else throw("fail to cast into String") | |
191 | 199 | } | |
192 | 200 | ||
193 | 201 | ||
194 | - | func | |
195 | - | let | |
196 | - | [if ((size(split( | |
197 | - | then | |
198 | - | else "0@0_0@0_0@0_0@0_0@0_0@0", if ((size(split( | |
199 | - | then | |
200 | - | else "0@0_0@0_0@0_0@0_0@0_0@0", | |
202 | + | func aR (aS) = { | |
203 | + | let aT = split(valueOrElse(getString(aS), "0@0_0@0_0@0_0@0_0@0_0@0:0@0_0@0_0@0_0@0_0@0_0@0:"), ":") | |
204 | + | [if ((size(split(aT[aL], "_")) == B)) | |
205 | + | then aT[aL] | |
206 | + | else "0@0_0@0_0@0_0@0_0@0_0@0", if ((size(split(aT[aM], "_")) == B)) | |
207 | + | then aT[aM] | |
208 | + | else "0@0_0@0_0@0_0@0_0@0_0@0", aT[aN]] | |
201 | 209 | } | |
202 | 210 | ||
203 | 211 | ||
204 | - | func | |
212 | + | func aU (aV,aW,aX) = if (aX) | |
205 | 213 | then { | |
206 | - | let | |
207 | - | then ((( | |
208 | - | else -((((-( | |
209 | - | ( | |
214 | + | let aY = if ((aV >= 0)) | |
215 | + | then (((aV + aW) - 1) / aW) | |
216 | + | else -((((-(aV) + aW) - 1) / aW)) | |
217 | + | (aY * d) | |
210 | 218 | } | |
211 | - | else | |
219 | + | else aV | |
212 | 220 | ||
213 | 221 | ||
214 | - | func | |
215 | - | let | |
216 | - | ((J * (parseIntValue( | |
222 | + | func aZ (ba) = { | |
223 | + | let bb = split(ba, "_") | |
224 | + | ((J * (parseIntValue(bb[1]) + 1)) * parseIntValue(bb[0])) | |
217 | 225 | } | |
218 | 226 | ||
219 | 227 | ||
220 | - | func | |
221 | - | let | |
222 | - | if (( | |
228 | + | func bc (bd) = { | |
229 | + | let be = bd[aF] | |
230 | + | if ((be == "")) | |
223 | 231 | then 0 | |
224 | 232 | else { | |
225 | - | func | |
226 | - | let x = | |
227 | - | let | |
228 | - | $Tuple2((x + 1), ( | |
233 | + | func bf (bg,bh) = { | |
234 | + | let x = bg._1 | |
235 | + | let aW = parseIntValue(split(Q[x], "_")[ad]) | |
236 | + | $Tuple2((x + 1), (bg._2 + aU(parseIntValue(bh), aW, true))) | |
229 | 237 | } | |
230 | 238 | ||
231 | - | ( let | |
232 | - | let | |
233 | - | let | |
234 | - | func | |
235 | - | then | |
236 | - | else | |
239 | + | ( let bi = split_4C(be, "_") | |
240 | + | let bj = size(bi) | |
241 | + | let bk = $Tuple2(0, 0) | |
242 | + | func bl (bm,bn) = if ((bn >= bj)) | |
243 | + | then bm | |
244 | + | else bf(bm, bi[bn]) | |
237 | 245 | ||
238 | - | func | |
239 | - | then | |
246 | + | func bo (bm,bn) = if ((bn >= bj)) | |
247 | + | then bm | |
240 | 248 | else throw("List size exceeds 50") | |
241 | 249 | ||
242 | - | bk | |
250 | + | bo(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bk, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50))._2 | |
243 | 251 | } | |
244 | 252 | } | |
245 | 253 | ||
246 | 254 | ||
247 | - | func | |
248 | - | let | |
249 | - | let | |
250 | - | let | |
255 | + | func bp (bq,ah,aV,br) = { | |
256 | + | let bs = af(bq, ah) | |
257 | + | let bt = valueOrElse(getInteger(bs), 0) | |
258 | + | let bu = if ((bt > C)) | |
251 | 259 | then 0 | |
252 | - | else if ((( | |
253 | - | then (C - | |
254 | - | else | |
255 | - | let | |
256 | - | let | |
257 | - | if ((( | |
258 | - | then throw((((((((((("Actual price = " + toString( | |
259 | - | else $Tuple2(IntegerEntry( | |
260 | + | else if (((bt + aV) > C)) | |
261 | + | then (C - bt) | |
262 | + | else aV | |
263 | + | let bv = (fraction(bu, ((F * D) - fraction(((100 * bt) + (50 * bu)), D, C)), e) + fraction((aV - bu), D, d)) | |
264 | + | let bw = (br - (br / 100)) | |
265 | + | if (((bw * aV) > (bv * d))) | |
266 | + | then throw((((((((((("Actual price = " + toString(bv)) + " / ") + toString(aV)) + " < minPrice = ") + toString(br)) + ", (") + bq) + ", ") + M[ah]) + ")")) | |
267 | + | else $Tuple2(IntegerEntry(bs, (bt + aV)), bv) | |
260 | 268 | } | |
261 | 269 | ||
262 | 270 | ||
263 | - | func | |
264 | - | let | |
265 | - | let | |
266 | - | let | |
267 | - | then min([ | |
271 | + | func bx (bq,by,aV,bz) = { | |
272 | + | let bs = af(bq, by) | |
273 | + | let bt = valueOrElse(getInteger(bs), 0) | |
274 | + | let bA = if ((bt > C)) | |
275 | + | then min([aV, (bt - C)]) | |
268 | 276 | else 0 | |
269 | - | let | |
270 | - | let | |
271 | - | let | |
272 | - | let | |
273 | - | if ((( | |
274 | - | then throw((((((((((("Actual price = " + toString( | |
275 | - | else $Tuple3(IntegerEntry( | |
277 | + | let bB = min([bt, (aV - bA)]) | |
278 | + | let bC = (bB + bA) | |
279 | + | let bD = (fraction(bB, ((G * D) - fraction(((100 * bt) - (50 * bB)), D, C)), e) + fraction(bA, (2 * D), d)) | |
280 | + | let bE = (bz + (bz / 100)) | |
281 | + | if (((bD * d) > (bE * bC))) | |
282 | + | then throw((((((((((("Actual price = " + toString(bD)) + " / ") + toString(bC)) + " > maxPrice = ") + toString(bz)) + ", (") + bq) + ", ") + N[by]) + ")")) | |
283 | + | else $Tuple3(IntegerEntry(bs, (bt - bC)), bD, bC) | |
276 | 284 | } | |
277 | 285 | ||
278 | 286 | ||
279 | - | func | |
280 | - | let | |
281 | - | [toString(valueOrElse(parseInt( | |
282 | - | then | |
283 | - | else "0_0_0_0_0_0", if ((size(split( | |
284 | - | then | |
285 | - | else "0_0_0_0_0_0", | |
287 | + | func bF (bG) = { | |
288 | + | let aT = split(valueOrElse(getString(z, bG), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":") | |
289 | + | [toString(valueOrElse(parseInt(aT[ay]), 0)), if ((size(split(aT[az], "_")) == B)) | |
290 | + | then aT[az] | |
291 | + | else "0_0_0_0_0_0", if ((size(split(aT[aA], "_")) == B)) | |
292 | + | then aT[aA] | |
293 | + | else "0_0_0_0_0_0", aT[aB]] | |
286 | 294 | } | |
287 | 295 | ||
288 | 296 | ||
289 | - | func | |
297 | + | func bH () = if (valueOrElse(getBoolean(z, ap()), false)) | |
290 | 298 | then throw("Contracts are under maintenance") | |
291 | 299 | else unit | |
292 | 300 | ||
293 | 301 | ||
294 | - | func | |
295 | - | let | |
296 | - | let | |
297 | - | let | |
298 | - | then parseIntValue(split(Q[ | |
302 | + | func bI (bg,bh) = { | |
303 | + | let bJ = bg._1 | |
304 | + | let bK = bg._7 | |
305 | + | let aW = if (bK) | |
306 | + | then parseIntValue(split(Q[bJ], "_")[ad]) | |
299 | 307 | else 0 | |
300 | - | let | |
301 | - | if ((size( | |
308 | + | let bL = split(bh, "@") | |
309 | + | if ((size(bL) != 2)) | |
302 | 310 | then throw("Incorrect order format, should be amount@price") | |
303 | 311 | else { | |
304 | - | let bI = parseIntValue(bH[0]) | |
305 | - | let bJ = parseIntValue(bH[1]) | |
306 | - | let bK = fraction(bI, bJ, d) | |
307 | - | let bL = aQ(bI, aS, bG) | |
308 | - | let bM = parseIntValue(bc._5[bF]) | |
309 | - | let bN = split(bc._6[bF], "@") | |
310 | - | let bO = parseIntValue(bN[0]) | |
311 | - | let bP = parseIntValue(bN[1]) | |
312 | - | if (if ((0 > bP)) | |
312 | + | let bM = parseIntValue(bL[0]) | |
313 | + | let bN = parseIntValue(bL[1]) | |
314 | + | let bO = fraction(bM, bN, d) | |
315 | + | let bP = aU(bM, aW, bK) | |
316 | + | let bQ = if ((size(bg._5) > bJ)) | |
317 | + | then parseIntValue(bg._5[bJ]) | |
318 | + | else 0 | |
319 | + | let bR = split(if ((size(bg._6) > bJ)) | |
320 | + | then bg._6[bJ] | |
321 | + | else "0@0", "@") | |
322 | + | let bS = parseIntValue(bR[0]) | |
323 | + | let bT = parseIntValue(bR[1]) | |
324 | + | if (if ((0 > bT)) | |
313 | 325 | then true | |
314 | - | else (0 > | |
326 | + | else (0 > bN)) | |
315 | 327 | then throw("Price can't be negative") | |
316 | 328 | else { | |
317 | - | let | |
318 | - | let | |
319 | - | if (( | |
320 | - | then if (( | |
321 | - | then $Tuple7(( | |
322 | - | else $Tuple7(( | |
323 | - | else if (( | |
324 | - | then if ((0 > | |
325 | - | then $Tuple7(( | |
326 | - | else $Tuple7(( | |
327 | - | else if ((0 > | |
329 | + | let bU = fraction(bS, bT, d) | |
330 | + | let bV = aU(bS, aW, bK) | |
331 | + | if ((bM == 0)) | |
332 | + | then if ((bS > 0)) | |
333 | + | then $Tuple7((bJ + 1), (bg._2 :+ toString(bQ)), (bg._3 - bV), (bg._4 - bU), bg._5, bg._6, bK) | |
334 | + | else $Tuple7((bJ + 1), (bg._2 :+ toString((bQ - bS))), (bg._3 + bV), bg._4, bg._5, bg._6, bK) | |
335 | + | else if ((bM > 0)) | |
336 | + | then if ((0 > bS)) | |
337 | + | then $Tuple7((bJ + 1), (bg._2 :+ toString((bQ - bS))), ((bg._3 + bP) + bV), (bg._4 + bO), bg._5, bg._6, bK) | |
338 | + | else $Tuple7((bJ + 1), (bg._2 :+ toString(bQ)), ((bg._3 + bP) - bV), ((bg._4 + bO) - bU), bg._5, bg._6, bK) | |
339 | + | else if ((0 > bS)) | |
328 | 340 | then { | |
329 | - | let | |
330 | - | if ((0 > ( | |
331 | - | then throw((((("Attempt to take " + toString( | |
332 | - | else $Tuple7(( | |
341 | + | let bW = (bS - bM) | |
342 | + | if ((0 > (bQ - bW))) | |
343 | + | then throw((((("Attempt to take " + toString(bW)) + " from warehouse, but only ") + toString(bQ)) + " available")) | |
344 | + | else $Tuple7((bJ + 1), (bg._2 :+ toString((bQ - bW))), ((bg._3 + bV) - bP), bg._4, bg._5, bg._6, bK) | |
333 | 345 | } | |
334 | - | else if ((0 > ( | |
335 | - | then throw((((("Attempt to take " + toString(-( | |
336 | - | else $Tuple7(( | |
346 | + | else if ((0 > (bQ + bM))) | |
347 | + | then throw((((("Attempt to take " + toString(-(bM))) + " from warehouse, but only ") + toString(bQ)) + " available")) | |
348 | + | else $Tuple7((bJ + 1), (bg._2 :+ toString((bQ + bM))), ((bg._3 - bP) - bV), (bg._4 - bU), bg._5, bg._6, bK) | |
337 | 349 | } | |
338 | 350 | } | |
339 | 351 | } | |
340 | 352 | ||
341 | 353 | ||
342 | - | func | |
343 | - | let | |
344 | - | let | |
345 | - | let | |
346 | - | then parseIntValue(split(Q[ | |
354 | + | func bX (bg,bY) = { | |
355 | + | let bJ = bg._7 | |
356 | + | let bK = bg._12 | |
357 | + | let aW = if (bK) | |
358 | + | then parseIntValue(split(Q[bJ], "_")[ad]) | |
347 | 359 | else 0 | |
348 | - | let | |
349 | - | if ((size( | |
360 | + | let bZ = split(bY, "@") | |
361 | + | if ((size(bZ) != 2)) | |
350 | 362 | then throw("Incorrect order format, should be amount@price") | |
351 | 363 | else { | |
352 | - | let | |
353 | - | let | |
354 | - | if ((0 > | |
364 | + | let ca = parseIntValue(bZ[0]) | |
365 | + | let cb = parseIntValue(bZ[1]) | |
366 | + | if ((0 > cb)) | |
355 | 367 | then throw("Price can't be negative") | |
356 | 368 | else { | |
357 | - | let | |
358 | - | let | |
359 | - | let | |
360 | - | let | |
361 | - | let | |
362 | - | let | |
363 | - | if (if (( | |
364 | - | then ( | |
369 | + | let cc = fraction(ca, cb, d) | |
370 | + | let cd = parseIntValue(bg._8[bJ]) | |
371 | + | let bQ = parseIntValue(bg._9[bJ]) | |
372 | + | let ce = split(bg._10[bJ], "@") | |
373 | + | let cf = parseIntValue(ce[0]) | |
374 | + | let cg = parseIntValue(ce[1]) | |
375 | + | if (if ((ca != 0)) | |
376 | + | then (cb != cg) | |
365 | 377 | else false) | |
366 | - | then throw(((((("Prices of " + | |
378 | + | then throw(((((("Prices of " + bg._11[bJ]) + " don't match! WH price=") + toString(cg)) + ", your price=") + toString(cb))) | |
367 | 379 | else { | |
368 | - | let | |
369 | - | let | |
370 | - | if (( | |
371 | - | then $Tuple11(( | |
372 | - | else if (( | |
373 | - | then if ((0 > | |
374 | - | then if (( | |
375 | - | then throw(((((("Attempt to buy " + toString( | |
376 | - | else $Tuple11(( | |
377 | - | else throw((("Attempt to buy " + | |
378 | - | else if (( | |
379 | - | then if ((-( | |
380 | - | then throw(((((("Attempt to sell " + toString(-( | |
381 | - | else if ((-( | |
382 | - | then throw(((((("Attempt to sell " + toString(-( | |
383 | - | else $Tuple11(( | |
384 | - | else throw((("Attempt to sell " + | |
380 | + | let ch = fraction(cf, cg, d) | |
381 | + | let ci = aU(ca, aW, bK) | |
382 | + | if ((ca == 0)) | |
383 | + | then $Tuple11((bg._1 :+ toString(bQ)), (bg._2 :+ bg._10[bJ]), (bg._3 :+ toString(cd)), bg._4, bg._5, bg._6, (bg._7 + 1), bg._8, bg._9, bg._10, bg._11) | |
384 | + | else if ((ca > 0)) | |
385 | + | then if ((0 > cf)) | |
386 | + | then if ((ca > -(cf))) | |
387 | + | then throw(((((("Attempt to buy " + toString(ca)) + " of ") + bg._11[bJ]) + ", but warehouse only sells ") + toString(-(cf)))) | |
388 | + | else $Tuple11((bg._1 :+ toString(bQ)), (bg._2 :+ ((toString((cf + ca)) + "@") + toString(cg))), (bg._3 :+ toString((cd + ca))), (bg._4 + ci), bg._5, (bg._6 + cc), (bg._7 + 1), bg._8, bg._9, bg._10, bg._11) | |
389 | + | else throw((("Attempt to buy " + bg._11[bJ]) + " while warehouse doesn't sell it")) | |
390 | + | else if ((cf > 0)) | |
391 | + | then if ((-(ca) > cf)) | |
392 | + | then throw(((((("Attempt to sell " + toString(-(ca))) + " of ") + bg._11[bJ]) + ", but warehouse only buys ") + toString(cf))) | |
393 | + | else if ((-(ca) > cd)) | |
394 | + | then throw(((((("Attempt to sell " + toString(-(ca))) + ", but you only have ") + toString(cd)) + " of ") + bg._11[bJ])) | |
395 | + | else $Tuple11((bg._1 :+ toString((bQ - ca))), (bg._2 :+ ((toString((cf + ca)) + "@") + toString(cg))), (bg._3 :+ toString((cd + ca))), (bg._4 - ci), (bg._5 - cc), bg._6, (bg._7 + 1), bg._8, bg._9, bg._10, bg._11) | |
396 | + | else throw((("Attempt to sell " + bg._11[bJ]) + " while warehouse doesn't buy it")) | |
385 | 397 | } | |
386 | 398 | } | |
387 | 399 | } | |
388 | 400 | } | |
389 | 401 | ||
390 | 402 | ||
391 | - | @Callable( | |
392 | - | func constructorV1 ( | |
403 | + | @Callable(cj) | |
404 | + | func constructorV1 (ck) = if ((cj.caller != this)) | |
393 | 405 | then throw("Permission denied") | |
394 | - | else [StringEntry(s(), | |
406 | + | else [StringEntry(s(), ck)] | |
395 | 407 | ||
396 | 408 | ||
397 | 409 | ||
398 | - | @Callable( | |
399 | - | func sellResources ( | |
400 | - | let | |
401 | - | if (( | |
410 | + | @Callable(cj) | |
411 | + | func sellResources (cl,cm) = { | |
412 | + | let cn = bH() | |
413 | + | if ((cn == cn)) | |
402 | 414 | then { | |
403 | - | let an = valueOrErrorMessage(getString(z, ak(toString( | |
404 | - | if ((size( | |
415 | + | let an = valueOrErrorMessage(getString(z, ak(toString(cj.caller))), "You don't have a duck staked") | |
416 | + | if ((size(cj.payments) != 0)) | |
405 | 417 | then throw("sellResources doesn't require any payments") | |
406 | 418 | else { | |
407 | - | let | |
408 | - | if (( | |
409 | - | then throw(("Duck location type should be Factory, but is " + | |
419 | + | let co = split(valueOrElse(getString(z, ao(an)), A), "_") | |
420 | + | if ((co[aw] != "F")) | |
421 | + | then throw(("Duck location type should be Factory, but is " + co[aw])) | |
410 | 422 | else { | |
411 | - | let | |
412 | - | let | |
413 | - | let | |
414 | - | func | |
415 | - | then throw(((((("You have " + | |
416 | - | else if ((0 > | |
417 | - | then throw(((("You tried to sell negative amount of " + M[ | |
418 | - | else if (( | |
423 | + | let bq = co[ax] | |
424 | + | let cp = bF(am(an)) | |
425 | + | let cq = split(cp[az], "_") | |
426 | + | func cr (bg,bJ) = if ((cl[bJ] > parseIntValue(cq[bJ]))) | |
427 | + | then throw(((((("You have " + cq[bJ]) + " of ") + M[bJ]) + ", but tried to sell ") + toString(cl[bJ]))) | |
428 | + | else if ((0 > cl[bJ])) | |
429 | + | then throw(((("You tried to sell negative amount of " + M[bJ]) + ": ") + toString(cl[bJ]))) | |
430 | + | else if ((cl[bJ] > 0)) | |
419 | 431 | then { | |
420 | - | let | |
421 | - | $Tuple3(( | |
432 | + | let cs = bp(bq, bJ, cl[bJ], cm[bJ]) | |
433 | + | $Tuple3((bg._1 :+ cs._1), (bg._2 :+ toString((parseIntValue(cq[bJ]) - cl[bJ]))), (bg._3 + cs._2)) | |
422 | 434 | } | |
423 | - | else $Tuple3( | |
435 | + | else $Tuple3(bg._1, (bg._2 :+ cq[bJ]), bg._3) | |
424 | 436 | ||
425 | - | let | |
426 | - | let | |
427 | - | let | |
428 | - | let | |
429 | - | func | |
430 | - | then | |
431 | - | else | |
437 | + | let ct = { | |
438 | + | let bi = [0, 1, 2, 3, 4, 5] | |
439 | + | let bj = size(bi) | |
440 | + | let bk = $Tuple3(nil, nil, 0) | |
441 | + | func bl (bm,bn) = if ((bn >= bj)) | |
442 | + | then bm | |
443 | + | else cr(bm, bi[bn]) | |
432 | 444 | ||
433 | - | func | |
434 | - | then | |
445 | + | func bo (bm,bn) = if ((bn >= bj)) | |
446 | + | then bm | |
435 | 447 | else throw("List size exceeds 6") | |
436 | 448 | ||
437 | - | bk | |
449 | + | bo(bl(bl(bl(bl(bl(bl(bk, 0), 1), 2), 3), 4), 5), 6) | |
438 | 450 | } | |
439 | - | let | |
440 | - | let | |
441 | - | $Tuple2(( | |
451 | + | let cu = makeString([cp[ay], makeString(ct._2, "_"), cp[aA], cp[aB]], ":") | |
452 | + | let cv = aO(invoke(z, "updateBackpack", [an, cu], nil)) | |
453 | + | $Tuple2((ct._1 :+ ScriptTransfer(cj.caller, ct._3, g)), cv) | |
442 | 454 | } | |
443 | 455 | } | |
444 | 456 | } | |
447 | 459 | ||
448 | 460 | ||
449 | 461 | ||
450 | - | @Callable( | |
451 | - | func buyMaterials ( | |
452 | - | let | |
453 | - | if (( | |
462 | + | @Callable(cj) | |
463 | + | func buyMaterials (cl,cw) = { | |
464 | + | let cn = bH() | |
465 | + | if ((cn == cn)) | |
454 | 466 | then { | |
455 | - | let an = valueOrErrorMessage(getString(z, ak(toString( | |
456 | - | if ((size( | |
467 | + | let an = valueOrErrorMessage(getString(z, ak(toString(cj.caller))), "You don't have a duck staked") | |
468 | + | if ((size(cj.payments) != 1)) | |
457 | 469 | then throw("exactly 1 payment must be attached") | |
458 | 470 | else { | |
459 | - | let | |
460 | - | let | |
461 | - | let | |
462 | - | if (( | |
471 | + | let cx = cj.payments[0] | |
472 | + | let cy = cx.amount | |
473 | + | let cz = valueOrErrorMessage(cx.assetId, "WAVES can't be used as payment") | |
474 | + | if ((cz != g)) | |
463 | 475 | then throw("USDT payments only!") | |
464 | 476 | else { | |
465 | - | let | |
466 | - | if (( | |
467 | - | then throw(("Duck location type should be Factory, but is " + | |
477 | + | let co = split(valueOrElse(getString(z, ao(an)), A), "_") | |
478 | + | if ((co[aw] != "F")) | |
479 | + | then throw(("Duck location type should be Factory, but is " + co[aw])) | |
468 | 480 | else { | |
469 | - | let | |
470 | - | let | |
471 | - | let | |
472 | - | func | |
473 | - | then throw(((("You tried to buy negative amount of " + N[ | |
474 | - | else if (( | |
481 | + | let bq = co[ax] | |
482 | + | let cp = bF(am(an)) | |
483 | + | let cA = split(cp[aA], "_") | |
484 | + | func cB (bg,bJ) = if ((0 > cl[bJ])) | |
485 | + | then throw(((("You tried to buy negative amount of " + N[bJ]) + ": ") + toString(cl[bJ]))) | |
486 | + | else if ((cl[bJ] > 0)) | |
475 | 487 | then { | |
476 | - | let | |
477 | - | $Tuple3(( | |
488 | + | let cs = bx(bq, bJ, cl[bJ], cw[bJ]) | |
489 | + | $Tuple3((bg._1 :+ cs._1), (bg._2 :+ toString((parseIntValue(cA[bJ]) + cs._3))), (bg._3 + cs._2)) | |
478 | 490 | } | |
479 | - | else $Tuple3( | |
491 | + | else $Tuple3(bg._1, (bg._2 :+ cA[bJ]), bg._3) | |
480 | 492 | ||
481 | - | let | |
482 | - | let | |
483 | - | let | |
484 | - | let | |
485 | - | func | |
486 | - | then | |
487 | - | else | |
493 | + | let ct = { | |
494 | + | let bi = [0, 1, 2, 3, 4, 5] | |
495 | + | let bj = size(bi) | |
496 | + | let bk = $Tuple3(nil, nil, 0) | |
497 | + | func bl (bm,bn) = if ((bn >= bj)) | |
498 | + | then bm | |
499 | + | else cB(bm, bi[bn]) | |
488 | 500 | ||
489 | - | func | |
490 | - | then | |
501 | + | func bo (bm,bn) = if ((bn >= bj)) | |
502 | + | then bm | |
491 | 503 | else throw("List size exceeds 6") | |
492 | 504 | ||
493 | - | bk | |
505 | + | bo(bl(bl(bl(bl(bl(bl(bk, 0), 1), 2), 3), 4), 5), 6) | |
494 | 506 | } | |
495 | - | if (( | |
496 | - | then throw(((("Insufficient payment! Attached=" + toString( | |
507 | + | if ((ct._3 > cy)) | |
508 | + | then throw(((("Insufficient payment! Attached=" + toString(cy)) + ", required=") + toString(ct._3))) | |
497 | 509 | else { | |
498 | - | let | |
499 | - | let | |
500 | - | let u = if ((( | |
501 | - | then [ScriptTransfer( | |
510 | + | let cu = makeString([cp[ay], cp[az], makeString(ct._2, "_"), cp[aB]], ":") | |
511 | + | let cv = aO(invoke(z, "updateBackpack", [an, cu], nil)) | |
512 | + | let u = if (((cy - ct._3) > 0)) | |
513 | + | then [ScriptTransfer(cj.caller, (cy - ct._3), g)] | |
502 | 514 | else nil | |
503 | - | let | |
504 | - | $Tuple2((( | |
515 | + | let cC = (ct._3 / 100) | |
516 | + | $Tuple2(((ct._1 ++ u) :+ ScriptTransfer(y, cC, g)), cv) | |
505 | 517 | } | |
506 | 518 | } | |
507 | 519 | } | |
512 | 524 | ||
513 | 525 | ||
514 | 526 | ||
515 | - | @Callable( | |
516 | - | func exchangeResources ( | |
517 | - | let | |
518 | - | if (( | |
527 | + | @Callable(cj) | |
528 | + | func exchangeResources (cl) = { | |
529 | + | let cn = bH() | |
530 | + | if ((cn == cn)) | |
519 | 531 | then { | |
520 | - | let an = valueOrErrorMessage(getString(z, ak(toString( | |
521 | - | if ((size( | |
532 | + | let an = valueOrErrorMessage(getString(z, ak(toString(cj.caller))), "You don't have a duck staked") | |
533 | + | if ((size(cj.payments) != 1)) | |
522 | 534 | then throw("exactly 1 payment must be attached") | |
523 | 535 | else { | |
524 | - | let | |
525 | - | let | |
526 | - | let | |
527 | - | if (( | |
536 | + | let cx = cj.payments[0] | |
537 | + | let cy = cx.amount | |
538 | + | let cz = valueOrErrorMessage(cx.assetId, "WAVES can't be used as payment") | |
539 | + | if ((cz != g)) | |
528 | 540 | then throw("USDT payments only!") | |
529 | 541 | else { | |
530 | - | let | |
531 | - | if (( | |
532 | - | then throw(("Duck location type should be Factory, but is " + | |
542 | + | let co = split(valueOrElse(getString(z, ao(an)), A), "_") | |
543 | + | if ((co[aw] != "F")) | |
544 | + | then throw(("Duck location type should be Factory, but is " + co[aw])) | |
533 | 545 | else { | |
534 | - | let | |
535 | - | let | |
536 | - | let | |
537 | - | let | |
538 | - | func | |
539 | - | let | |
540 | - | let | |
541 | - | let | |
542 | - | if (( | |
543 | - | then throw(((((("You have " + | |
544 | - | else if ((0 > | |
545 | - | then throw(((("You tried to exchange negative amount of " + M[ | |
546 | - | else if (( | |
547 | - | then $Tuple4(( | |
548 | - | else $Tuple4(( | |
546 | + | let bq = co[ax] | |
547 | + | let cp = bF(am(an)) | |
548 | + | let cq = split(cp[az], "_") | |
549 | + | let cA = split(cp[aA], "_") | |
550 | + | func cD (bg,bJ) = { | |
551 | + | let bs = af(bq, bJ) | |
552 | + | let bt = valueOrElse(getInteger(bs), 0) | |
553 | + | let cE = cl[bJ] | |
554 | + | if ((cE > parseIntValue(cq[bJ]))) | |
555 | + | then throw(((((("You have " + cq[bJ]) + " of ") + M[bJ]) + ", but tried to exchange ") + toString(cE))) | |
556 | + | else if ((0 > cE)) | |
557 | + | then throw(((("You tried to exchange negative amount of " + M[bJ]) + ": ") + toString(cE))) | |
558 | + | else if ((cE > 0)) | |
559 | + | then $Tuple4((bg._1 :+ toString((parseIntValue(cq[bJ]) - cE))), (bg._2 :+ toString((parseIntValue(cA[bJ]) + cE))), (bg._3 + fraction(cE, D, d)), (bg._4 :+ IntegerEntry(bs, bt))) | |
560 | + | else $Tuple4((bg._1 :+ cq[bJ]), (bg._2 :+ cA[bJ]), bg._3, bg._4) | |
549 | 561 | } | |
550 | 562 | ||
551 | - | let | |
552 | - | let | |
553 | - | let | |
554 | - | let | |
555 | - | func | |
556 | - | then | |
557 | - | else | |
563 | + | let ct = { | |
564 | + | let bi = [0, 1, 2, 3, 4, 5] | |
565 | + | let bj = size(bi) | |
566 | + | let bk = $Tuple4(nil, nil, 0, nil) | |
567 | + | func bl (bm,bn) = if ((bn >= bj)) | |
568 | + | then bm | |
569 | + | else cD(bm, bi[bn]) | |
558 | 570 | ||
559 | - | func | |
560 | - | then | |
571 | + | func bo (bm,bn) = if ((bn >= bj)) | |
572 | + | then bm | |
561 | 573 | else throw("List size exceeds 6") | |
562 | 574 | ||
563 | - | bk | |
575 | + | bo(bl(bl(bl(bl(bl(bl(bk, 0), 1), 2), 3), 4), 5), 6) | |
564 | 576 | } | |
565 | - | if (( | |
566 | - | then throw(((("Insufficient payment! Attached=" + toString( | |
577 | + | if ((ct._3 > cy)) | |
578 | + | then throw(((("Insufficient payment! Attached=" + toString(cy)) + ", required=") + toString(ct._3))) | |
567 | 579 | else { | |
568 | - | let | |
569 | - | let | |
570 | - | let u = if ((( | |
571 | - | then [ScriptTransfer( | |
580 | + | let cu = makeString([cp[ay], makeString(ct._1, "_"), makeString(ct._2, "_"), cp[aB]], ":") | |
581 | + | let cv = aO(invoke(z, "updateBackpack", [an, cu], nil)) | |
582 | + | let u = if (((cy - ct._3) > 0)) | |
583 | + | then [ScriptTransfer(cj.caller, (cy - ct._3), g)] | |
572 | 584 | else nil | |
573 | - | let | |
574 | - | $Tuple2(((u ++ | |
585 | + | let cC = (ct._3 / 100) | |
586 | + | $Tuple2(((u ++ ct._4) :+ ScriptTransfer(y, cC, g)), cv) | |
575 | 587 | } | |
576 | 588 | } | |
577 | 589 | } | |
582 | 594 | ||
583 | 595 | ||
584 | 596 | ||
585 | - | @Callable( | |
586 | - | func craftGoods ( | |
587 | - | let | |
588 | - | if (( | |
589 | - | then if ((size( | |
597 | + | @Callable(cj) | |
598 | + | func craftGoods (cF,cG) = { | |
599 | + | let cn = bH() | |
600 | + | if ((cn == cn)) | |
601 | + | then if ((size(cj.payments) != 1)) | |
590 | 602 | then throw("exactly 1 payment must be attached") | |
591 | 603 | else { | |
592 | - | let | |
593 | - | let | |
594 | - | let | |
595 | - | if (( | |
604 | + | let cx = cj.payments[0] | |
605 | + | let cy = cx.amount | |
606 | + | let cz = valueOrErrorMessage(cx.assetId, "WAVES can't be used as payment") | |
607 | + | if ((cz != g)) | |
596 | 608 | then throw("USDT payments only!") | |
597 | - | else if (( | |
609 | + | else if ((cy != b)) | |
598 | 610 | then throw("exactly 1 USDT must be attached as payment") | |
599 | - | else if ((0 >= | |
611 | + | else if ((0 >= cG)) | |
600 | 612 | then throw("Quantity should be positive") | |
601 | 613 | else { | |
602 | - | let an = valueOrErrorMessage(getString(z, ak(toString( | |
603 | - | let | |
604 | - | if (( | |
605 | - | then throw(("Duck location type should be Manufactory, but is " + | |
614 | + | let an = valueOrErrorMessage(getString(z, ak(toString(cj.caller))), "You don't have a duck staked") | |
615 | + | let co = split(valueOrElse(getString(z, ao(an)), A), "_") | |
616 | + | if ((co[aw] != "M")) | |
617 | + | then throw(("Duck location type should be Manufactory, but is " + co[aw])) | |
606 | 618 | else { | |
607 | - | let | |
608 | - | let | |
609 | - | let | |
610 | - | if (if ((0 > | |
619 | + | let cH = co[av] | |
620 | + | let cp = bF(am(an)) | |
621 | + | let cA = split(cp[aA], "_") | |
622 | + | if (if ((0 > cF)) | |
611 | 623 | then true | |
612 | - | else ( | |
613 | - | then throw(("Unknown product idx=" + toString( | |
624 | + | else (cF >= size(Q))) | |
625 | + | then throw(("Unknown product idx=" + toString(cF))) | |
614 | 626 | else { | |
615 | - | let | |
616 | - | if ((size( | |
617 | - | then throw(("Fatal: unknown recipe: " + Q[ | |
627 | + | let cI = split(Q[cF], "_") | |
628 | + | if ((size(cI) != (B + 3))) | |
629 | + | then throw(("Fatal: unknown recipe: " + Q[cF])) | |
618 | 630 | else { | |
619 | - | let | |
620 | - | if ((P[ | |
621 | - | then throw(((("This product is available in " + P[ | |
631 | + | let cJ = parseIntValue(cI[ae]) | |
632 | + | if ((P[cJ] != cH)) | |
633 | + | then throw(((("This product is available in " + P[cJ]) + ", but you are in ") + cH)) | |
622 | 634 | else { | |
623 | - | let | |
635 | + | let cK = if ((cp[aB] == "")) | |
624 | 636 | then nil | |
625 | - | else split( | |
626 | - | func | |
627 | - | let | |
628 | - | let | |
629 | - | then | |
637 | + | else split(cp[aB], "_") | |
638 | + | func cL (bg,cM) = { | |
639 | + | let cN = bg._2 | |
640 | + | let cO = if ((size(cK) > cN)) | |
641 | + | then cK[cN] | |
630 | 642 | else "0" | |
631 | - | let | |
632 | - | let | |
633 | - | let | |
634 | - | then toString(( | |
635 | - | else | |
636 | - | $Tuple2(( | |
643 | + | let cP = parseIntValue(cO) | |
644 | + | let aV = (cG * parseIntValue(cI[ad])) | |
645 | + | let cQ = if ((cN == cF)) | |
646 | + | then toString((cP + aV)) | |
647 | + | else cO | |
648 | + | $Tuple2((bg._1 :+ cQ), (cN + 1)) | |
637 | 649 | } | |
638 | 650 | ||
639 | - | let | |
640 | - | let | |
641 | - | let | |
642 | - | func | |
643 | - | then | |
644 | - | else | |
651 | + | let cR = ( let bi = Q | |
652 | + | let bj = size(bi) | |
653 | + | let bk = $Tuple2(nil, 0) | |
654 | + | func bl (bm,bn) = if ((bn >= bj)) | |
655 | + | then bm | |
656 | + | else cL(bm, bi[bn]) | |
645 | 657 | ||
646 | - | func | |
647 | - | then | |
658 | + | func bo (bm,bn) = if ((bn >= bj)) | |
659 | + | then bm | |
648 | 660 | else throw("List size exceeds 50") | |
649 | 661 | ||
650 | - | bk | |
651 | - | func | |
652 | - | let | |
653 | - | let | |
654 | - | if (( | |
655 | - | then throw(((((((("You have " + | |
656 | - | else if (( | |
657 | - | then ( | |
658 | - | else ( | |
662 | + | bo(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bk, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50))._1 | |
663 | + | func cS (bg,bJ) = { | |
664 | + | let cT = ((parseIntValue(cI[bJ]) * c) * cG) | |
665 | + | let cU = parseIntValue(cA[bJ]) | |
666 | + | if ((cT > cU)) | |
667 | + | then throw(((((((("You have " + cA[bJ]) + " of ") + N[bJ]) + ", but recipe requires ") + toString(cT)) + " for quantity ") + toString(cG))) | |
668 | + | else if ((cT > 0)) | |
669 | + | then (bg :+ toString((cU - cT))) | |
670 | + | else (bg :+ cA[bJ]) | |
659 | 671 | } | |
660 | 672 | ||
661 | - | let | |
662 | - | let | |
663 | - | let | |
664 | - | let | |
665 | - | func | |
666 | - | then | |
667 | - | else | |
673 | + | let ct = { | |
674 | + | let bi = [0, 1, 2, 3, 4, 5] | |
675 | + | let bj = size(bi) | |
676 | + | let bk = nil | |
677 | + | func cV (bm,bn) = if ((bn >= bj)) | |
678 | + | then bm | |
679 | + | else cS(bm, bi[bn]) | |
668 | 680 | ||
669 | - | func | |
670 | - | then | |
681 | + | func cW (bm,bn) = if ((bn >= bj)) | |
682 | + | then bm | |
671 | 683 | else throw("List size exceeds 6") | |
672 | 684 | ||
673 | - | | |
685 | + | cW(cV(cV(cV(cV(cV(cV(bk, 0), 1), 2), 3), 4), 5), 6) | |
674 | 686 | } | |
675 | - | let | |
676 | - | let | |
677 | - | $Tuple2(nil, | |
687 | + | let cu = makeString([cp[ay], cp[az], makeString(ct, "_"), makeString(cR, "_")], ":") | |
688 | + | let cv = aO(invoke(z, "updateBackpack", [an, cu], nil)) | |
689 | + | $Tuple2(nil, cv) | |
678 | 690 | } | |
679 | 691 | } | |
680 | 692 | } | |
686 | 698 | ||
687 | 699 | ||
688 | 700 | ||
689 | - | @Callable( | |
690 | - | func setWarehouseOrder ( | |
691 | - | let | |
692 | - | let au = toString( | |
693 | - | let | |
694 | - | then | |
701 | + | @Callable(cj) | |
702 | + | func setWarehouseOrder (cX,aj) = { | |
703 | + | let cY = cj.originCaller | |
704 | + | let au = toString(cY) | |
705 | + | let cv = if ((cY != y)) | |
706 | + | then bH() | |
695 | 707 | else false | |
696 | - | let | |
708 | + | let cZ = value(assetInfo(fromBase58String(aj))) | |
697 | 709 | if (!(isDefined(getInteger(z, as(aj))))) | |
698 | - | then throw((("NFT " + | |
710 | + | then throw((("NFT " + cZ.name) + " is not staked")) | |
699 | 711 | else { | |
700 | - | let | |
701 | - | if (if (( | |
702 | - | then ( | |
712 | + | let da = valueOrErrorMessage(getString(z, aq(aj)), (("NFT " + cZ.name) + " is orphaned")) | |
713 | + | if (if ((cY != y)) | |
714 | + | then (da != au) | |
703 | 715 | else false) | |
704 | 716 | then throw((H + " is not yours")) | |
705 | 717 | else { | |
706 | - | let | |
707 | - | if ((size( | |
718 | + | let db = split_4C(cX, ":") | |
719 | + | if ((size(db) != 3)) | |
708 | 720 | then throw("cargoListStr should contain exactly 2 ':' separators") | |
709 | 721 | else { | |
710 | - | let | |
711 | - | let | |
712 | - | let | |
722 | + | let dc = split(db[0], "_") | |
723 | + | let dd = split(db[1], "_") | |
724 | + | let de = if ((db[2] == "")) | |
713 | 725 | then nil | |
714 | - | else split( | |
715 | - | if ((size( | |
726 | + | else split(db[2], "_") | |
727 | + | if ((size(dc) != B)) | |
716 | 728 | then throw("All 6 resources should be passed") | |
717 | - | else if ((size( | |
729 | + | else if ((size(dd) != B)) | |
718 | 730 | then throw("All 6 materials should be passed") | |
719 | 731 | else { | |
720 | - | let | |
721 | - | let | |
722 | - | let | |
723 | - | let | |
724 | - | let | |
732 | + | let df = aO(invoke(z, "getWarehouseREADONLY", [aj], nil)) | |
733 | + | let bd = split_4C(df, ":") | |
734 | + | let dg = split(bd[aD], "_") | |
735 | + | let dh = split(bd[aE], "_") | |
736 | + | let di = if ((bd[aF] == "")) | |
725 | 737 | then nil | |
726 | - | else split( | |
727 | - | let | |
728 | - | let | |
729 | - | let | |
730 | - | let | |
731 | - | let | |
732 | - | let | |
738 | + | else split(bd[aF], "_") | |
739 | + | let dj = aZ(bd[aC]) | |
740 | + | let aS = ai(aj) | |
741 | + | let dk = aR(aS) | |
742 | + | let dl = split(dk[aL], "_") | |
743 | + | let dm = split(dk[aM], "_") | |
744 | + | let dn = if ((dk[aN] == "")) | |
733 | 745 | then nil | |
734 | - | else split( | |
735 | - | let | |
736 | - | let | |
737 | - | let | |
738 | - | let | |
739 | - | let | |
740 | - | func | |
741 | - | then | |
742 | - | else | |
746 | + | else split(dk[aN], "_") | |
747 | + | let do = 0 | |
748 | + | let dp = { | |
749 | + | let bi = dc | |
750 | + | let bj = size(bi) | |
751 | + | let bk = $Tuple7(0, nil, 0, 0, dg, dl, false) | |
752 | + | func bl (bm,bn) = if ((bn >= bj)) | |
753 | + | then bm | |
754 | + | else bI(bm, bi[bn]) | |
743 | 755 | ||
744 | - | func | |
745 | - | then | |
756 | + | func bo (bm,bn) = if ((bn >= bj)) | |
757 | + | then bm | |
746 | 758 | else throw("List size exceeds 6") | |
747 | 759 | ||
748 | - | bk | |
760 | + | bo(bl(bl(bl(bl(bl(bl(bk, 0), 1), 2), 3), 4), 5), 6) | |
749 | 761 | } | |
750 | - | let | |
751 | - | let | |
752 | - | let | |
753 | - | let | |
754 | - | func | |
755 | - | then | |
756 | - | else | |
762 | + | let bC = { | |
763 | + | let bi = dd | |
764 | + | let bj = size(bi) | |
765 | + | let bk = $Tuple7(0, nil, dp._3, dp._4, dh, dm, false) | |
766 | + | func cV (bm,bn) = if ((bn >= bj)) | |
767 | + | then bm | |
768 | + | else bI(bm, bi[bn]) | |
757 | 769 | ||
758 | - | func | |
759 | - | then | |
770 | + | func cW (bm,bn) = if ((bn >= bj)) | |
771 | + | then bm | |
760 | 772 | else throw("List size exceeds 6") | |
761 | 773 | ||
762 | - | | |
774 | + | cW(cV(cV(cV(cV(cV(cV(bk, 0), 1), 2), 3), 4), 5), 6) | |
763 | 775 | } | |
764 | - | let | |
776 | + | let aT = if ((size(de) != 0)) | |
765 | 777 | then { | |
766 | - | let | |
767 | - | let | |
768 | - | let | |
769 | - | func | |
770 | - | then | |
771 | - | else | |
778 | + | let bi = de | |
779 | + | let bj = size(bi) | |
780 | + | let bk = $Tuple7(0, nil, bC._3, bC._4, di, dn, true) | |
781 | + | func dq (bm,bn) = if ((bn >= bj)) | |
782 | + | then bm | |
783 | + | else bI(bm, bi[bn]) | |
772 | 784 | ||
773 | - | func | |
774 | - | then | |
785 | + | func dr (bm,bn) = if ((bn >= bj)) | |
786 | + | then bm | |
775 | 787 | else throw("List size exceeds 50") | |
776 | 788 | ||
777 | - | | |
789 | + | dr(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(bk, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50) | |
778 | 790 | } | |
779 | - | else $Tuple7(0, | |
780 | - | let | |
781 | - | if (( | |
782 | - | then throw((((("Attempt to reserve " + toString( | |
791 | + | else $Tuple7(0, di, bC._3, bC._4, di, dn, true) | |
792 | + | let ds = aT._3 | |
793 | + | if ((ds > dj)) | |
794 | + | then throw((((("Attempt to reserve " + toString(ds)) + " space, but only ") + toString(dj)) + " warehouse space left")) | |
783 | 795 | else { | |
784 | - | let | |
785 | - | let | |
786 | - | if (( | |
796 | + | let dt = makeString_2C([bd[aC], makeString(dp._2, "_"), makeString(bC._2, "_"), makeString(aT._2, "_"), toString(ds)], ":") | |
797 | + | let du = invoke(z, "saveWarehouse", [dt, aj], nil) | |
798 | + | if ((du == du)) | |
787 | 799 | then { | |
788 | - | let | |
789 | - | let | |
790 | - | then if ((size( | |
800 | + | let dv = aT._4 | |
801 | + | let dw = if ((dv > 0)) | |
802 | + | then if ((size(cj.payments) != 1)) | |
791 | 803 | then throw("exactly 1 payment must be attached") | |
792 | 804 | else { | |
793 | - | let | |
794 | - | let | |
795 | - | let | |
796 | - | if (( | |
805 | + | let cx = cj.payments[0] | |
806 | + | let cy = cx.amount | |
807 | + | let cz = valueOrErrorMessage(cx.assetId, "WAVES can't be used as payment") | |
808 | + | if ((cz != g)) | |
797 | 809 | then throw("USDT payments only!") | |
798 | - | else if (( | |
799 | - | then throw(("Payment needed is " + toString( | |
800 | - | else [StringEntry( | |
810 | + | else if ((cy != dv)) | |
811 | + | then throw(("Payment needed is " + toString(dv))) | |
812 | + | else [StringEntry(aS, cX)] | |
801 | 813 | } | |
802 | - | else if (( | |
803 | - | then if ((size( | |
814 | + | else if ((dv == 0)) | |
815 | + | then if ((size(cj.payments) != 0)) | |
804 | 816 | then throw("No payments needed") | |
805 | - | else [StringEntry( | |
806 | - | else if ((size( | |
817 | + | else [StringEntry(aS, cX)] | |
818 | + | else if ((size(cj.payments) != 0)) | |
807 | 819 | then throw("No payments needed") | |
808 | - | else [ScriptTransfer(addressFromStringValue( | |
809 | - | $Tuple2( | |
820 | + | else [ScriptTransfer(addressFromStringValue(da), -(dv), g), StringEntry(aS, cX)] | |
821 | + | $Tuple2(dw, cv) | |
810 | 822 | } | |
811 | 823 | else throw("Strict value is not equal to itself.") | |
812 | 824 | } | |
818 | 830 | ||
819 | 831 | ||
820 | 832 | ||
821 | - | @Callable( | |
822 | - | func acceptWarehouseOrder ( | |
823 | - | let | |
824 | - | if (( | |
833 | + | @Callable(cj) | |
834 | + | func acceptWarehouseOrder (dx,aj,an) = { | |
835 | + | let cn = bH() | |
836 | + | if ((cn == cn)) | |
825 | 837 | then { | |
826 | - | let | |
827 | - | let | |
828 | - | let | |
829 | - | let | |
830 | - | let | |
831 | - | if (( | |
832 | - | then throw((("Duck location type is " + | |
833 | - | else if (( | |
834 | - | then throw(((("Your staked duck is " + | |
838 | + | let dy = cj.originCaller | |
839 | + | let dz = toString(dy) | |
840 | + | let dA = valueOrErrorMessage(getString(z, ak(dz)), "You don't have a duck staked") | |
841 | + | let co = valueOrElse(getString(z, ao(dA)), A) | |
842 | + | let dB = split(value(co), "_") | |
843 | + | if ((dB[aw] != "L")) | |
844 | + | then throw((("Duck location type is " + dB[aw]) + ", but should be L")) | |
845 | + | else if ((dA != an)) | |
846 | + | then throw(((("Your staked duck is " + dA) + ", but passed ") + an)) | |
835 | 847 | else { | |
836 | - | let | |
848 | + | let dC = value(assetInfo(fromBase58String(aj))) | |
837 | 849 | if (!(isDefined(getInteger(z, as(aj))))) | |
838 | - | then throw((("NFT " + | |
850 | + | then throw((("NFT " + dC.name) + " is not staked")) | |
839 | 851 | else { | |
840 | - | let | |
841 | - | if (( | |
852 | + | let dD = valueOrErrorMessage(getString(z, aq(aj)), (("NFT " + dC.name) + " is orphaned")) | |
853 | + | if ((dD == dz)) | |
842 | 854 | then throw("You cannot trade with yourself") | |
843 | 855 | else { | |
844 | - | let | |
845 | - | if ((size( | |
856 | + | let dE = split_4C(dx, ":") | |
857 | + | if ((size(dE) != 3)) | |
846 | 858 | then throw("bpOrderStr should contain exactly 2 ':' separators") | |
847 | 859 | else { | |
848 | - | let | |
849 | - | let | |
850 | - | let | |
860 | + | let dF = split(dE[0], "_") | |
861 | + | let dG = split(dE[1], "_") | |
862 | + | let dH = if ((dE[2] == "")) | |
851 | 863 | then nil | |
852 | - | else split( | |
853 | - | if ((size( | |
864 | + | else split(dE[2], "_") | |
865 | + | if ((size(dF) != B)) | |
854 | 866 | then throw("All 6 resources should be passed") | |
855 | - | else if ((size( | |
867 | + | else if ((size(dG) != B)) | |
856 | 868 | then throw("All 6 materials should be passed") | |
857 | 869 | else { | |
858 | - | let | |
859 | - | let | |
860 | - | let | |
861 | - | let | |
862 | - | let | |
870 | + | let df = aO(invoke(z, "getWarehouseREADONLY", [aj], nil)) | |
871 | + | let bd = split_4C(df, ":") | |
872 | + | let dg = split(bd[aD], "_") | |
873 | + | let dh = split(bd[aE], "_") | |
874 | + | let di = if ((bd[aF] == "")) | |
863 | 875 | then nil | |
864 | - | else split( | |
865 | - | let | |
866 | - | let | |
867 | - | let | |
868 | - | let | |
869 | - | let | |
870 | - | let | |
876 | + | else split(bd[aF], "_") | |
877 | + | let dI = parseIntValue(split(bd[aG], "_")[aH]) | |
878 | + | let bG = am(an) | |
879 | + | let cp = bF(bG) | |
880 | + | let dJ = split(cp[az], "_") | |
881 | + | let dK = split(cp[aA], "_") | |
882 | + | let dL = if ((cp[aB] == "")) | |
871 | 883 | then nil | |
872 | - | else split( | |
873 | - | let | |
874 | - | let | |
875 | - | let | |
876 | - | let | |
877 | - | let | |
884 | + | else split(cp[aB], "_") | |
885 | + | let aS = ai(aj) | |
886 | + | let dM = aR(aS) | |
887 | + | let dN = split(dM[aL], "_") | |
888 | + | let dO = split(dM[aM], "_") | |
889 | + | let dP = if ((dM[aN] == "")) | |
878 | 890 | then nil | |
879 | - | else split( | |
880 | - | let | |
881 | - | let | |
882 | - | let | |
883 | - | let | |
884 | - | let | |
885 | - | func | |
886 | - | then | |
887 | - | else | |
891 | + | else split(dM[aN], "_") | |
892 | + | let do = 0 | |
893 | + | let dp = { | |
894 | + | let bi = dF | |
895 | + | let bj = size(bi) | |
896 | + | let bk = $Tuple12(nil, nil, nil, 0, 0, 0, 0, dJ, dg, dN, M, false) | |
897 | + | func bl (bm,bn) = if ((bn >= bj)) | |
898 | + | then bm | |
899 | + | else bX(bm, bi[bn]) | |
888 | 900 | ||
889 | - | func | |
890 | - | then | |
901 | + | func bo (bm,bn) = if ((bn >= bj)) | |
902 | + | then bm | |
891 | 903 | else throw("List size exceeds 6") | |
892 | 904 | ||
893 | - | bk | |
905 | + | bo(bl(bl(bl(bl(bl(bl(bk, 0), 1), 2), 3), 4), 5), 6) | |
894 | 906 | } | |
895 | - | let | |
896 | - | let | |
897 | - | let | |
898 | - | let | |
899 | - | func | |
900 | - | then | |
901 | - | else | |
907 | + | let bC = { | |
908 | + | let bi = dG | |
909 | + | let bj = size(bi) | |
910 | + | let bk = $Tuple12(nil, nil, nil, dp._4, dp._5, dp._6, 0, dK, dh, dO, N, false) | |
911 | + | func cV (bm,bn) = if ((bn >= bj)) | |
912 | + | then bm | |
913 | + | else bX(bm, bi[bn]) | |
902 | 914 | ||
903 | - | func | |
904 | - | then | |
915 | + | func cW (bm,bn) = if ((bn >= bj)) | |
916 | + | then bm | |
905 | 917 | else throw("List size exceeds 6") | |
906 | 918 | ||
907 | - | | |
919 | + | cW(cV(cV(cV(cV(cV(cV(bk, 0), 1), 2), 3), 4), 5), 6) | |
908 | 920 | } | |
909 | - | let | |
921 | + | let aT = if ((size(dH) != 0)) | |
910 | 922 | then { | |
911 | - | let | |
912 | - | let | |
913 | - | let | |
914 | - | func | |
915 | - | then | |
916 | - | else | |
923 | + | let bi = dH | |
924 | + | let bj = size(bi) | |
925 | + | let bk = $Tuple12(nil, nil, nil, bC._4, bC._5, bC._6, 0, dL, di, dP, O, true) | |
926 | + | func dq (bm,bn) = if ((bn >= bj)) | |
927 | + | then bm | |
928 | + | else bX(bm, bi[bn]) | |
917 | 929 | ||
918 | - | func | |
919 | - | then | |
930 | + | func dr (bm,bn) = if ((bn >= bj)) | |
931 | + | then bm | |
920 | 932 | else throw("List size exceeds 50") | |
921 | 933 | ||
922 | - | | |
934 | + | dr(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(bk, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50) | |
923 | 935 | } | |
924 | - | else $Tuple12( | |
925 | - | let | |
926 | - | let | |
936 | + | else $Tuple12(di, dP, dL, bC._4, bC._5, bC._6, 0, dL, di, dP, O, true) | |
937 | + | let ds = aT._4 | |
938 | + | let dQ = if ((0 > (dI - ds))) | |
927 | 939 | then 0 | |
928 | - | else ( | |
929 | - | let | |
930 | - | let | |
931 | - | let | |
932 | - | let | |
933 | - | if (( | |
940 | + | else (dI - ds) | |
941 | + | let dt = makeString_2C([bd[aC], makeString(dp._1, "_"), makeString(bC._1, "_"), makeString(aT._1, "_"), toString(dQ)], ":") | |
942 | + | let dR = makeString_2C([makeString(dp._2, "_"), makeString(bC._2, "_"), makeString(aT._2, "_")], ":") | |
943 | + | let dS = makeString_2C([cp[ay], makeString(dp._3, "_"), makeString(bC._3, "_"), makeString(aT._3, "_")], ":") | |
944 | + | let du = invoke(z, "saveWarehouse", [dt, aj], nil) | |
945 | + | if ((du == du)) | |
934 | 946 | then { | |
935 | - | let | |
936 | - | if (( | |
947 | + | let dT = invoke(z, "updateBackpack", [an, dS], nil) | |
948 | + | if ((dT == dT)) | |
937 | 949 | then { | |
938 | - | let | |
939 | - | let | |
940 | - | let | |
950 | + | let dw = [StringEntry(aS, dR)] | |
951 | + | let dU = aT._5 | |
952 | + | let dV = if ((dU > 0)) | |
941 | 953 | then { | |
942 | - | let | |
943 | - | let | |
944 | - | let | |
945 | - | if (isDefined( | |
946 | - | then ((( | |
947 | - | else (( | |
954 | + | let dW = fraction(aT._5, K, b) | |
955 | + | let dX = at(dz) | |
956 | + | let dY = getString(z, dX) | |
957 | + | if (isDefined(dY)) | |
958 | + | then (((dw :+ ScriptTransfer(dy, (aT._5 - (3 * dW)), g)) :+ ScriptTransfer(y, dW, g)) :+ ScriptTransfer(addressFromStringValue(value(dY)), dW, g)) | |
959 | + | else ((dw :+ ScriptTransfer(dy, (aT._5 - (3 * dW)), g)) :+ ScriptTransfer(y, dW, g)) | |
948 | 960 | } | |
949 | - | else | |
950 | - | let | |
951 | - | if (( | |
952 | - | then if ((size( | |
961 | + | else dw | |
962 | + | let dZ = aT._6 | |
963 | + | if ((dZ > 0)) | |
964 | + | then if ((size(cj.payments) != 1)) | |
953 | 965 | then throw("exactly 1 payment must be attached") | |
954 | 966 | else { | |
955 | - | let | |
956 | - | let | |
957 | - | let | |
958 | - | if (( | |
967 | + | let cx = cj.payments[0] | |
968 | + | let cy = cx.amount | |
969 | + | let cz = valueOrErrorMessage(cx.assetId, "WAVES can't be used as payment") | |
970 | + | if ((cz != g)) | |
959 | 971 | then throw("USDT payments only!") | |
960 | - | else if (( | |
961 | - | then throw(("Payment needed is " + toString( | |
962 | - | else if ((L > | |
972 | + | else if ((cy != dZ)) | |
973 | + | then throw(("Payment needed is " + toString(dZ))) | |
974 | + | else if ((L > cy)) | |
963 | 975 | then throw(("Payment should be at least " + toString(L))) | |
964 | 976 | else { | |
965 | - | let | |
966 | - | let | |
967 | - | let | |
968 | - | if (isDefined( | |
969 | - | then ((( | |
970 | - | else (( | |
977 | + | let ea = fraction(aT._6, K, b) | |
978 | + | let dX = at(dD) | |
979 | + | let dY = getString(z, dX) | |
980 | + | if (isDefined(dY)) | |
981 | + | then (((dV :+ ScriptTransfer(addressFromStringValue(dD), (aT._6 - (3 * ea)), g)) :+ ScriptTransfer(y, ea, g)) :+ ScriptTransfer(addressFromStringValue(value(dY)), ea, g)) | |
982 | + | else ((dV :+ ScriptTransfer(addressFromStringValue(dD), (aT._6 - (3 * ea)), g)) :+ ScriptTransfer(y, ea, g)) | |
971 | 983 | } | |
972 | 984 | } | |
973 | - | else if ((size( | |
985 | + | else if ((size(cj.payments) != 0)) | |
974 | 986 | then throw("No payments needed") | |
975 | - | else | |
987 | + | else dV | |
976 | 988 | } | |
977 | 989 | else throw("Strict value is not equal to itself.") | |
978 | 990 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | 6 | let b = 1000000 | |
7 | 7 | ||
8 | 8 | let c = 10000000 | |
9 | 9 | ||
10 | 10 | let d = 100000000 | |
11 | 11 | ||
12 | 12 | let e = 10000000000 | |
13 | 13 | ||
14 | 14 | let f = take(drop(this.bytes, 1), 1) | |
15 | 15 | ||
16 | 16 | let g = { | |
17 | 17 | let h = f | |
18 | 18 | if ((base58'2W' == h)) | |
19 | 19 | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
20 | 20 | else if ((base58'2T' == h)) | |
21 | 21 | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
22 | 22 | else throw("Unknown chain") | |
23 | 23 | } | |
24 | 24 | ||
25 | 25 | let i = { | |
26 | 26 | let h = f | |
27 | 27 | if ((base58'2W' == h)) | |
28 | 28 | then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv" | |
29 | 29 | else if ((base58'2T' == h)) | |
30 | 30 | then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy" | |
31 | 31 | else throw("Unknown chain") | |
32 | 32 | } | |
33 | 33 | ||
34 | 34 | func j (k,l) = valueOrErrorMessage(getString(k, l), makeString(["mandatory ", toString(k), ".", l, " is not defined"], "")) | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func m (l,n) = valueOrElse(getInteger(this, l), n) | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | let o = 1 | |
41 | 41 | ||
42 | 42 | let p = 2 | |
43 | 43 | ||
44 | 44 | let q = 3 | |
45 | 45 | ||
46 | 46 | func r () = "%s__restConfig" | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func s () = "%s__restAddr" | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func t (u) = split_4C(j(u, r()), a) | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func v (w,x) = valueOrErrorMessage(addressFromString(w[x]), ("Rest cfg doesn't contain address at index " + toString(x))) | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | let y = addressFromStringValue(valueOrElse(getString(this, s()), i)) | |
59 | 59 | ||
60 | 60 | let w = t(y) | |
61 | 61 | ||
62 | 62 | let z = v(w, o) | |
63 | 63 | ||
64 | 64 | let A = "Africa_F_Africa" | |
65 | 65 | ||
66 | 66 | let B = 6 | |
67 | 67 | ||
68 | 68 | let C = 10000000000 | |
69 | 69 | ||
70 | 70 | let D = 39637 | |
71 | 71 | ||
72 | 72 | let E = 10000 | |
73 | 73 | ||
74 | 74 | let F = 200 | |
75 | 75 | ||
76 | 76 | let G = 300 | |
77 | 77 | ||
78 | 78 | let H = "LAND" | |
79 | 79 | ||
80 | 80 | let I = "DUCK" | |
81 | 81 | ||
82 | 82 | let J = 10000000000 | |
83 | 83 | ||
84 | 84 | let K = 10000 | |
85 | 85 | ||
86 | 86 | let L = 100000 | |
87 | 87 | ||
88 | 88 | let M = ["Oil", "Ore", "Wood", "Sand", "Clay", "Organic"] | |
89 | 89 | ||
90 | 90 | let N = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"] | |
91 | 91 | ||
92 | 92 | let O = ["First Aid Kit", "Backpack", "Food Ration", "Jet Pack", "Shield"] | |
93 | 93 | ||
94 | 94 | let P = ["Americas", "Europe", "Asia", "Africa", "Oceania"] | |
95 | 95 | ||
96 | 96 | let Q = ["1_1_1_2_2_5_1_10_0", "2_2_2_4_4_10_1_10_0", "3_3_3_6_6_15_1_10_0", "2_5_5_2_7_5_2_100_1", "4_10_10_4_14_10_2_100_1", "6_15_15_6_21_15_2_100_1", "1_1_1_1_1_8_1_10_2", "2_2_2_2_2_16_1_10_2", "3_3_3_3_3_24_1_10_2", "9_9_1_5_5_1_5_100_3", "18_18_2_10_10_2_5_100_3", "27_27_3_15_15_3_5_100_3", "2_2_1_2_2_2_1_10_4", "4_4_2_4_4_4_1_10_4", "6_6_3_6_6_6_1_10_4"] | |
97 | 97 | ||
98 | 98 | let R = 0 | |
99 | 99 | ||
100 | 100 | let S = 1 | |
101 | 101 | ||
102 | 102 | let T = 2 | |
103 | 103 | ||
104 | 104 | let U = 3 | |
105 | 105 | ||
106 | 106 | let V = 4 | |
107 | 107 | ||
108 | 108 | let W = 0 | |
109 | 109 | ||
110 | 110 | let X = 1 | |
111 | 111 | ||
112 | 112 | let Y = 2 | |
113 | 113 | ||
114 | 114 | let Z = 3 | |
115 | 115 | ||
116 | 116 | let aa = 4 | |
117 | 117 | ||
118 | 118 | let ab = 5 | |
119 | 119 | ||
120 | 120 | let ac = 6 | |
121 | 121 | ||
122 | 122 | let ad = 7 | |
123 | 123 | ||
124 | 124 | let ae = 8 | |
125 | 125 | ||
126 | 126 | func af (ag,ah) = ((("factoryWhByContinentAndRes_" + ag) + "_") + toString(ah)) | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | func ai (aj) = ("landOrder_" + aj) | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | func ak (al) = ("stakedDuckByOwner_" + al) | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func am (an) = ("backPack_" + an) | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func ao (an) = ("duckLocation_" + an) | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func ap () = "contractsBlocked" | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func aq (ar) = ("nftOwner_" + ar) | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | func as (ar) = ("stakedTime_" + ar) | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | func at (au) = ("accRefBy_" + au) | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | let av = 0 | |
154 | 154 | ||
155 | 155 | let aw = 1 | |
156 | 156 | ||
157 | 157 | let ax = 2 | |
158 | 158 | ||
159 | 159 | let ay = 0 | |
160 | 160 | ||
161 | 161 | let az = 1 | |
162 | 162 | ||
163 | 163 | let aA = 2 | |
164 | 164 | ||
165 | 165 | let aB = 3 | |
166 | 166 | ||
167 | 167 | let aC = 0 | |
168 | 168 | ||
169 | 169 | let aD = 1 | |
170 | 170 | ||
171 | 171 | let aE = 2 | |
172 | 172 | ||
173 | 173 | let aF = 3 | |
174 | 174 | ||
175 | 175 | let aG = 4 | |
176 | 176 | ||
177 | 177 | let aH = 0 | |
178 | 178 | ||
179 | 179 | let aI = 1 | |
180 | 180 | ||
181 | 181 | let aJ = 2 | |
182 | 182 | ||
183 | - | func aK (aL) = { | |
184 | - | let h = aL | |
183 | + | let aK = 3 | |
184 | + | ||
185 | + | let aL = 0 | |
186 | + | ||
187 | + | let aM = 1 | |
188 | + | ||
189 | + | let aN = 2 | |
190 | + | ||
191 | + | func aO (aP) = { | |
192 | + | let h = aP | |
185 | 193 | if ($isInstanceOf(h, "String")) | |
186 | 194 | then { | |
187 | - | let | |
188 | - | | |
195 | + | let aQ = h | |
196 | + | aQ | |
189 | 197 | } | |
190 | 198 | else throw("fail to cast into String") | |
191 | 199 | } | |
192 | 200 | ||
193 | 201 | ||
194 | - | func | |
195 | - | let | |
196 | - | [if ((size(split( | |
197 | - | then | |
198 | - | else "0@0_0@0_0@0_0@0_0@0_0@0", if ((size(split( | |
199 | - | then | |
200 | - | else "0@0_0@0_0@0_0@0_0@0_0@0", | |
202 | + | func aR (aS) = { | |
203 | + | let aT = split(valueOrElse(getString(aS), "0@0_0@0_0@0_0@0_0@0_0@0:0@0_0@0_0@0_0@0_0@0_0@0:"), ":") | |
204 | + | [if ((size(split(aT[aL], "_")) == B)) | |
205 | + | then aT[aL] | |
206 | + | else "0@0_0@0_0@0_0@0_0@0_0@0", if ((size(split(aT[aM], "_")) == B)) | |
207 | + | then aT[aM] | |
208 | + | else "0@0_0@0_0@0_0@0_0@0_0@0", aT[aN]] | |
201 | 209 | } | |
202 | 210 | ||
203 | 211 | ||
204 | - | func | |
212 | + | func aU (aV,aW,aX) = if (aX) | |
205 | 213 | then { | |
206 | - | let | |
207 | - | then ((( | |
208 | - | else -((((-( | |
209 | - | ( | |
214 | + | let aY = if ((aV >= 0)) | |
215 | + | then (((aV + aW) - 1) / aW) | |
216 | + | else -((((-(aV) + aW) - 1) / aW)) | |
217 | + | (aY * d) | |
210 | 218 | } | |
211 | - | else | |
219 | + | else aV | |
212 | 220 | ||
213 | 221 | ||
214 | - | func | |
215 | - | let | |
216 | - | ((J * (parseIntValue( | |
222 | + | func aZ (ba) = { | |
223 | + | let bb = split(ba, "_") | |
224 | + | ((J * (parseIntValue(bb[1]) + 1)) * parseIntValue(bb[0])) | |
217 | 225 | } | |
218 | 226 | ||
219 | 227 | ||
220 | - | func | |
221 | - | let | |
222 | - | if (( | |
228 | + | func bc (bd) = { | |
229 | + | let be = bd[aF] | |
230 | + | if ((be == "")) | |
223 | 231 | then 0 | |
224 | 232 | else { | |
225 | - | func | |
226 | - | let x = | |
227 | - | let | |
228 | - | $Tuple2((x + 1), ( | |
233 | + | func bf (bg,bh) = { | |
234 | + | let x = bg._1 | |
235 | + | let aW = parseIntValue(split(Q[x], "_")[ad]) | |
236 | + | $Tuple2((x + 1), (bg._2 + aU(parseIntValue(bh), aW, true))) | |
229 | 237 | } | |
230 | 238 | ||
231 | - | ( let | |
232 | - | let | |
233 | - | let | |
234 | - | func | |
235 | - | then | |
236 | - | else | |
239 | + | ( let bi = split_4C(be, "_") | |
240 | + | let bj = size(bi) | |
241 | + | let bk = $Tuple2(0, 0) | |
242 | + | func bl (bm,bn) = if ((bn >= bj)) | |
243 | + | then bm | |
244 | + | else bf(bm, bi[bn]) | |
237 | 245 | ||
238 | - | func | |
239 | - | then | |
246 | + | func bo (bm,bn) = if ((bn >= bj)) | |
247 | + | then bm | |
240 | 248 | else throw("List size exceeds 50") | |
241 | 249 | ||
242 | - | bk | |
250 | + | bo(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bk, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50))._2 | |
243 | 251 | } | |
244 | 252 | } | |
245 | 253 | ||
246 | 254 | ||
247 | - | func | |
248 | - | let | |
249 | - | let | |
250 | - | let | |
255 | + | func bp (bq,ah,aV,br) = { | |
256 | + | let bs = af(bq, ah) | |
257 | + | let bt = valueOrElse(getInteger(bs), 0) | |
258 | + | let bu = if ((bt > C)) | |
251 | 259 | then 0 | |
252 | - | else if ((( | |
253 | - | then (C - | |
254 | - | else | |
255 | - | let | |
256 | - | let | |
257 | - | if ((( | |
258 | - | then throw((((((((((("Actual price = " + toString( | |
259 | - | else $Tuple2(IntegerEntry( | |
260 | + | else if (((bt + aV) > C)) | |
261 | + | then (C - bt) | |
262 | + | else aV | |
263 | + | let bv = (fraction(bu, ((F * D) - fraction(((100 * bt) + (50 * bu)), D, C)), e) + fraction((aV - bu), D, d)) | |
264 | + | let bw = (br - (br / 100)) | |
265 | + | if (((bw * aV) > (bv * d))) | |
266 | + | then throw((((((((((("Actual price = " + toString(bv)) + " / ") + toString(aV)) + " < minPrice = ") + toString(br)) + ", (") + bq) + ", ") + M[ah]) + ")")) | |
267 | + | else $Tuple2(IntegerEntry(bs, (bt + aV)), bv) | |
260 | 268 | } | |
261 | 269 | ||
262 | 270 | ||
263 | - | func | |
264 | - | let | |
265 | - | let | |
266 | - | let | |
267 | - | then min([ | |
271 | + | func bx (bq,by,aV,bz) = { | |
272 | + | let bs = af(bq, by) | |
273 | + | let bt = valueOrElse(getInteger(bs), 0) | |
274 | + | let bA = if ((bt > C)) | |
275 | + | then min([aV, (bt - C)]) | |
268 | 276 | else 0 | |
269 | - | let | |
270 | - | let | |
271 | - | let | |
272 | - | let | |
273 | - | if ((( | |
274 | - | then throw((((((((((("Actual price = " + toString( | |
275 | - | else $Tuple3(IntegerEntry( | |
277 | + | let bB = min([bt, (aV - bA)]) | |
278 | + | let bC = (bB + bA) | |
279 | + | let bD = (fraction(bB, ((G * D) - fraction(((100 * bt) - (50 * bB)), D, C)), e) + fraction(bA, (2 * D), d)) | |
280 | + | let bE = (bz + (bz / 100)) | |
281 | + | if (((bD * d) > (bE * bC))) | |
282 | + | then throw((((((((((("Actual price = " + toString(bD)) + " / ") + toString(bC)) + " > maxPrice = ") + toString(bz)) + ", (") + bq) + ", ") + N[by]) + ")")) | |
283 | + | else $Tuple3(IntegerEntry(bs, (bt - bC)), bD, bC) | |
276 | 284 | } | |
277 | 285 | ||
278 | 286 | ||
279 | - | func | |
280 | - | let | |
281 | - | [toString(valueOrElse(parseInt( | |
282 | - | then | |
283 | - | else "0_0_0_0_0_0", if ((size(split( | |
284 | - | then | |
285 | - | else "0_0_0_0_0_0", | |
287 | + | func bF (bG) = { | |
288 | + | let aT = split(valueOrElse(getString(z, bG), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":") | |
289 | + | [toString(valueOrElse(parseInt(aT[ay]), 0)), if ((size(split(aT[az], "_")) == B)) | |
290 | + | then aT[az] | |
291 | + | else "0_0_0_0_0_0", if ((size(split(aT[aA], "_")) == B)) | |
292 | + | then aT[aA] | |
293 | + | else "0_0_0_0_0_0", aT[aB]] | |
286 | 294 | } | |
287 | 295 | ||
288 | 296 | ||
289 | - | func | |
297 | + | func bH () = if (valueOrElse(getBoolean(z, ap()), false)) | |
290 | 298 | then throw("Contracts are under maintenance") | |
291 | 299 | else unit | |
292 | 300 | ||
293 | 301 | ||
294 | - | func | |
295 | - | let | |
296 | - | let | |
297 | - | let | |
298 | - | then parseIntValue(split(Q[ | |
302 | + | func bI (bg,bh) = { | |
303 | + | let bJ = bg._1 | |
304 | + | let bK = bg._7 | |
305 | + | let aW = if (bK) | |
306 | + | then parseIntValue(split(Q[bJ], "_")[ad]) | |
299 | 307 | else 0 | |
300 | - | let | |
301 | - | if ((size( | |
308 | + | let bL = split(bh, "@") | |
309 | + | if ((size(bL) != 2)) | |
302 | 310 | then throw("Incorrect order format, should be amount@price") | |
303 | 311 | else { | |
304 | - | let bI = parseIntValue(bH[0]) | |
305 | - | let bJ = parseIntValue(bH[1]) | |
306 | - | let bK = fraction(bI, bJ, d) | |
307 | - | let bL = aQ(bI, aS, bG) | |
308 | - | let bM = parseIntValue(bc._5[bF]) | |
309 | - | let bN = split(bc._6[bF], "@") | |
310 | - | let bO = parseIntValue(bN[0]) | |
311 | - | let bP = parseIntValue(bN[1]) | |
312 | - | if (if ((0 > bP)) | |
312 | + | let bM = parseIntValue(bL[0]) | |
313 | + | let bN = parseIntValue(bL[1]) | |
314 | + | let bO = fraction(bM, bN, d) | |
315 | + | let bP = aU(bM, aW, bK) | |
316 | + | let bQ = if ((size(bg._5) > bJ)) | |
317 | + | then parseIntValue(bg._5[bJ]) | |
318 | + | else 0 | |
319 | + | let bR = split(if ((size(bg._6) > bJ)) | |
320 | + | then bg._6[bJ] | |
321 | + | else "0@0", "@") | |
322 | + | let bS = parseIntValue(bR[0]) | |
323 | + | let bT = parseIntValue(bR[1]) | |
324 | + | if (if ((0 > bT)) | |
313 | 325 | then true | |
314 | - | else (0 > | |
326 | + | else (0 > bN)) | |
315 | 327 | then throw("Price can't be negative") | |
316 | 328 | else { | |
317 | - | let | |
318 | - | let | |
319 | - | if (( | |
320 | - | then if (( | |
321 | - | then $Tuple7(( | |
322 | - | else $Tuple7(( | |
323 | - | else if (( | |
324 | - | then if ((0 > | |
325 | - | then $Tuple7(( | |
326 | - | else $Tuple7(( | |
327 | - | else if ((0 > | |
329 | + | let bU = fraction(bS, bT, d) | |
330 | + | let bV = aU(bS, aW, bK) | |
331 | + | if ((bM == 0)) | |
332 | + | then if ((bS > 0)) | |
333 | + | then $Tuple7((bJ + 1), (bg._2 :+ toString(bQ)), (bg._3 - bV), (bg._4 - bU), bg._5, bg._6, bK) | |
334 | + | else $Tuple7((bJ + 1), (bg._2 :+ toString((bQ - bS))), (bg._3 + bV), bg._4, bg._5, bg._6, bK) | |
335 | + | else if ((bM > 0)) | |
336 | + | then if ((0 > bS)) | |
337 | + | then $Tuple7((bJ + 1), (bg._2 :+ toString((bQ - bS))), ((bg._3 + bP) + bV), (bg._4 + bO), bg._5, bg._6, bK) | |
338 | + | else $Tuple7((bJ + 1), (bg._2 :+ toString(bQ)), ((bg._3 + bP) - bV), ((bg._4 + bO) - bU), bg._5, bg._6, bK) | |
339 | + | else if ((0 > bS)) | |
328 | 340 | then { | |
329 | - | let | |
330 | - | if ((0 > ( | |
331 | - | then throw((((("Attempt to take " + toString( | |
332 | - | else $Tuple7(( | |
341 | + | let bW = (bS - bM) | |
342 | + | if ((0 > (bQ - bW))) | |
343 | + | then throw((((("Attempt to take " + toString(bW)) + " from warehouse, but only ") + toString(bQ)) + " available")) | |
344 | + | else $Tuple7((bJ + 1), (bg._2 :+ toString((bQ - bW))), ((bg._3 + bV) - bP), bg._4, bg._5, bg._6, bK) | |
333 | 345 | } | |
334 | - | else if ((0 > ( | |
335 | - | then throw((((("Attempt to take " + toString(-( | |
336 | - | else $Tuple7(( | |
346 | + | else if ((0 > (bQ + bM))) | |
347 | + | then throw((((("Attempt to take " + toString(-(bM))) + " from warehouse, but only ") + toString(bQ)) + " available")) | |
348 | + | else $Tuple7((bJ + 1), (bg._2 :+ toString((bQ + bM))), ((bg._3 - bP) - bV), (bg._4 - bU), bg._5, bg._6, bK) | |
337 | 349 | } | |
338 | 350 | } | |
339 | 351 | } | |
340 | 352 | ||
341 | 353 | ||
342 | - | func | |
343 | - | let | |
344 | - | let | |
345 | - | let | |
346 | - | then parseIntValue(split(Q[ | |
354 | + | func bX (bg,bY) = { | |
355 | + | let bJ = bg._7 | |
356 | + | let bK = bg._12 | |
357 | + | let aW = if (bK) | |
358 | + | then parseIntValue(split(Q[bJ], "_")[ad]) | |
347 | 359 | else 0 | |
348 | - | let | |
349 | - | if ((size( | |
360 | + | let bZ = split(bY, "@") | |
361 | + | if ((size(bZ) != 2)) | |
350 | 362 | then throw("Incorrect order format, should be amount@price") | |
351 | 363 | else { | |
352 | - | let | |
353 | - | let | |
354 | - | if ((0 > | |
364 | + | let ca = parseIntValue(bZ[0]) | |
365 | + | let cb = parseIntValue(bZ[1]) | |
366 | + | if ((0 > cb)) | |
355 | 367 | then throw("Price can't be negative") | |
356 | 368 | else { | |
357 | - | let | |
358 | - | let | |
359 | - | let | |
360 | - | let | |
361 | - | let | |
362 | - | let | |
363 | - | if (if (( | |
364 | - | then ( | |
369 | + | let cc = fraction(ca, cb, d) | |
370 | + | let cd = parseIntValue(bg._8[bJ]) | |
371 | + | let bQ = parseIntValue(bg._9[bJ]) | |
372 | + | let ce = split(bg._10[bJ], "@") | |
373 | + | let cf = parseIntValue(ce[0]) | |
374 | + | let cg = parseIntValue(ce[1]) | |
375 | + | if (if ((ca != 0)) | |
376 | + | then (cb != cg) | |
365 | 377 | else false) | |
366 | - | then throw(((((("Prices of " + | |
378 | + | then throw(((((("Prices of " + bg._11[bJ]) + " don't match! WH price=") + toString(cg)) + ", your price=") + toString(cb))) | |
367 | 379 | else { | |
368 | - | let | |
369 | - | let | |
370 | - | if (( | |
371 | - | then $Tuple11(( | |
372 | - | else if (( | |
373 | - | then if ((0 > | |
374 | - | then if (( | |
375 | - | then throw(((((("Attempt to buy " + toString( | |
376 | - | else $Tuple11(( | |
377 | - | else throw((("Attempt to buy " + | |
378 | - | else if (( | |
379 | - | then if ((-( | |
380 | - | then throw(((((("Attempt to sell " + toString(-( | |
381 | - | else if ((-( | |
382 | - | then throw(((((("Attempt to sell " + toString(-( | |
383 | - | else $Tuple11(( | |
384 | - | else throw((("Attempt to sell " + | |
380 | + | let ch = fraction(cf, cg, d) | |
381 | + | let ci = aU(ca, aW, bK) | |
382 | + | if ((ca == 0)) | |
383 | + | then $Tuple11((bg._1 :+ toString(bQ)), (bg._2 :+ bg._10[bJ]), (bg._3 :+ toString(cd)), bg._4, bg._5, bg._6, (bg._7 + 1), bg._8, bg._9, bg._10, bg._11) | |
384 | + | else if ((ca > 0)) | |
385 | + | then if ((0 > cf)) | |
386 | + | then if ((ca > -(cf))) | |
387 | + | then throw(((((("Attempt to buy " + toString(ca)) + " of ") + bg._11[bJ]) + ", but warehouse only sells ") + toString(-(cf)))) | |
388 | + | else $Tuple11((bg._1 :+ toString(bQ)), (bg._2 :+ ((toString((cf + ca)) + "@") + toString(cg))), (bg._3 :+ toString((cd + ca))), (bg._4 + ci), bg._5, (bg._6 + cc), (bg._7 + 1), bg._8, bg._9, bg._10, bg._11) | |
389 | + | else throw((("Attempt to buy " + bg._11[bJ]) + " while warehouse doesn't sell it")) | |
390 | + | else if ((cf > 0)) | |
391 | + | then if ((-(ca) > cf)) | |
392 | + | then throw(((((("Attempt to sell " + toString(-(ca))) + " of ") + bg._11[bJ]) + ", but warehouse only buys ") + toString(cf))) | |
393 | + | else if ((-(ca) > cd)) | |
394 | + | then throw(((((("Attempt to sell " + toString(-(ca))) + ", but you only have ") + toString(cd)) + " of ") + bg._11[bJ])) | |
395 | + | else $Tuple11((bg._1 :+ toString((bQ - ca))), (bg._2 :+ ((toString((cf + ca)) + "@") + toString(cg))), (bg._3 :+ toString((cd + ca))), (bg._4 - ci), (bg._5 - cc), bg._6, (bg._7 + 1), bg._8, bg._9, bg._10, bg._11) | |
396 | + | else throw((("Attempt to sell " + bg._11[bJ]) + " while warehouse doesn't buy it")) | |
385 | 397 | } | |
386 | 398 | } | |
387 | 399 | } | |
388 | 400 | } | |
389 | 401 | ||
390 | 402 | ||
391 | - | @Callable( | |
392 | - | func constructorV1 ( | |
403 | + | @Callable(cj) | |
404 | + | func constructorV1 (ck) = if ((cj.caller != this)) | |
393 | 405 | then throw("Permission denied") | |
394 | - | else [StringEntry(s(), | |
406 | + | else [StringEntry(s(), ck)] | |
395 | 407 | ||
396 | 408 | ||
397 | 409 | ||
398 | - | @Callable( | |
399 | - | func sellResources ( | |
400 | - | let | |
401 | - | if (( | |
410 | + | @Callable(cj) | |
411 | + | func sellResources (cl,cm) = { | |
412 | + | let cn = bH() | |
413 | + | if ((cn == cn)) | |
402 | 414 | then { | |
403 | - | let an = valueOrErrorMessage(getString(z, ak(toString( | |
404 | - | if ((size( | |
415 | + | let an = valueOrErrorMessage(getString(z, ak(toString(cj.caller))), "You don't have a duck staked") | |
416 | + | if ((size(cj.payments) != 0)) | |
405 | 417 | then throw("sellResources doesn't require any payments") | |
406 | 418 | else { | |
407 | - | let | |
408 | - | if (( | |
409 | - | then throw(("Duck location type should be Factory, but is " + | |
419 | + | let co = split(valueOrElse(getString(z, ao(an)), A), "_") | |
420 | + | if ((co[aw] != "F")) | |
421 | + | then throw(("Duck location type should be Factory, but is " + co[aw])) | |
410 | 422 | else { | |
411 | - | let | |
412 | - | let | |
413 | - | let | |
414 | - | func | |
415 | - | then throw(((((("You have " + | |
416 | - | else if ((0 > | |
417 | - | then throw(((("You tried to sell negative amount of " + M[ | |
418 | - | else if (( | |
423 | + | let bq = co[ax] | |
424 | + | let cp = bF(am(an)) | |
425 | + | let cq = split(cp[az], "_") | |
426 | + | func cr (bg,bJ) = if ((cl[bJ] > parseIntValue(cq[bJ]))) | |
427 | + | then throw(((((("You have " + cq[bJ]) + " of ") + M[bJ]) + ", but tried to sell ") + toString(cl[bJ]))) | |
428 | + | else if ((0 > cl[bJ])) | |
429 | + | then throw(((("You tried to sell negative amount of " + M[bJ]) + ": ") + toString(cl[bJ]))) | |
430 | + | else if ((cl[bJ] > 0)) | |
419 | 431 | then { | |
420 | - | let | |
421 | - | $Tuple3(( | |
432 | + | let cs = bp(bq, bJ, cl[bJ], cm[bJ]) | |
433 | + | $Tuple3((bg._1 :+ cs._1), (bg._2 :+ toString((parseIntValue(cq[bJ]) - cl[bJ]))), (bg._3 + cs._2)) | |
422 | 434 | } | |
423 | - | else $Tuple3( | |
435 | + | else $Tuple3(bg._1, (bg._2 :+ cq[bJ]), bg._3) | |
424 | 436 | ||
425 | - | let | |
426 | - | let | |
427 | - | let | |
428 | - | let | |
429 | - | func | |
430 | - | then | |
431 | - | else | |
437 | + | let ct = { | |
438 | + | let bi = [0, 1, 2, 3, 4, 5] | |
439 | + | let bj = size(bi) | |
440 | + | let bk = $Tuple3(nil, nil, 0) | |
441 | + | func bl (bm,bn) = if ((bn >= bj)) | |
442 | + | then bm | |
443 | + | else cr(bm, bi[bn]) | |
432 | 444 | ||
433 | - | func | |
434 | - | then | |
445 | + | func bo (bm,bn) = if ((bn >= bj)) | |
446 | + | then bm | |
435 | 447 | else throw("List size exceeds 6") | |
436 | 448 | ||
437 | - | bk | |
449 | + | bo(bl(bl(bl(bl(bl(bl(bk, 0), 1), 2), 3), 4), 5), 6) | |
438 | 450 | } | |
439 | - | let | |
440 | - | let | |
441 | - | $Tuple2(( | |
451 | + | let cu = makeString([cp[ay], makeString(ct._2, "_"), cp[aA], cp[aB]], ":") | |
452 | + | let cv = aO(invoke(z, "updateBackpack", [an, cu], nil)) | |
453 | + | $Tuple2((ct._1 :+ ScriptTransfer(cj.caller, ct._3, g)), cv) | |
442 | 454 | } | |
443 | 455 | } | |
444 | 456 | } | |
445 | 457 | else throw("Strict value is not equal to itself.") | |
446 | 458 | } | |
447 | 459 | ||
448 | 460 | ||
449 | 461 | ||
450 | - | @Callable( | |
451 | - | func buyMaterials ( | |
452 | - | let | |
453 | - | if (( | |
462 | + | @Callable(cj) | |
463 | + | func buyMaterials (cl,cw) = { | |
464 | + | let cn = bH() | |
465 | + | if ((cn == cn)) | |
454 | 466 | then { | |
455 | - | let an = valueOrErrorMessage(getString(z, ak(toString( | |
456 | - | if ((size( | |
467 | + | let an = valueOrErrorMessage(getString(z, ak(toString(cj.caller))), "You don't have a duck staked") | |
468 | + | if ((size(cj.payments) != 1)) | |
457 | 469 | then throw("exactly 1 payment must be attached") | |
458 | 470 | else { | |
459 | - | let | |
460 | - | let | |
461 | - | let | |
462 | - | if (( | |
471 | + | let cx = cj.payments[0] | |
472 | + | let cy = cx.amount | |
473 | + | let cz = valueOrErrorMessage(cx.assetId, "WAVES can't be used as payment") | |
474 | + | if ((cz != g)) | |
463 | 475 | then throw("USDT payments only!") | |
464 | 476 | else { | |
465 | - | let | |
466 | - | if (( | |
467 | - | then throw(("Duck location type should be Factory, but is " + | |
477 | + | let co = split(valueOrElse(getString(z, ao(an)), A), "_") | |
478 | + | if ((co[aw] != "F")) | |
479 | + | then throw(("Duck location type should be Factory, but is " + co[aw])) | |
468 | 480 | else { | |
469 | - | let | |
470 | - | let | |
471 | - | let | |
472 | - | func | |
473 | - | then throw(((("You tried to buy negative amount of " + N[ | |
474 | - | else if (( | |
481 | + | let bq = co[ax] | |
482 | + | let cp = bF(am(an)) | |
483 | + | let cA = split(cp[aA], "_") | |
484 | + | func cB (bg,bJ) = if ((0 > cl[bJ])) | |
485 | + | then throw(((("You tried to buy negative amount of " + N[bJ]) + ": ") + toString(cl[bJ]))) | |
486 | + | else if ((cl[bJ] > 0)) | |
475 | 487 | then { | |
476 | - | let | |
477 | - | $Tuple3(( | |
488 | + | let cs = bx(bq, bJ, cl[bJ], cw[bJ]) | |
489 | + | $Tuple3((bg._1 :+ cs._1), (bg._2 :+ toString((parseIntValue(cA[bJ]) + cs._3))), (bg._3 + cs._2)) | |
478 | 490 | } | |
479 | - | else $Tuple3( | |
491 | + | else $Tuple3(bg._1, (bg._2 :+ cA[bJ]), bg._3) | |
480 | 492 | ||
481 | - | let | |
482 | - | let | |
483 | - | let | |
484 | - | let | |
485 | - | func | |
486 | - | then | |
487 | - | else | |
493 | + | let ct = { | |
494 | + | let bi = [0, 1, 2, 3, 4, 5] | |
495 | + | let bj = size(bi) | |
496 | + | let bk = $Tuple3(nil, nil, 0) | |
497 | + | func bl (bm,bn) = if ((bn >= bj)) | |
498 | + | then bm | |
499 | + | else cB(bm, bi[bn]) | |
488 | 500 | ||
489 | - | func | |
490 | - | then | |
501 | + | func bo (bm,bn) = if ((bn >= bj)) | |
502 | + | then bm | |
491 | 503 | else throw("List size exceeds 6") | |
492 | 504 | ||
493 | - | bk | |
505 | + | bo(bl(bl(bl(bl(bl(bl(bk, 0), 1), 2), 3), 4), 5), 6) | |
494 | 506 | } | |
495 | - | if (( | |
496 | - | then throw(((("Insufficient payment! Attached=" + toString( | |
507 | + | if ((ct._3 > cy)) | |
508 | + | then throw(((("Insufficient payment! Attached=" + toString(cy)) + ", required=") + toString(ct._3))) | |
497 | 509 | else { | |
498 | - | let | |
499 | - | let | |
500 | - | let u = if ((( | |
501 | - | then [ScriptTransfer( | |
510 | + | let cu = makeString([cp[ay], cp[az], makeString(ct._2, "_"), cp[aB]], ":") | |
511 | + | let cv = aO(invoke(z, "updateBackpack", [an, cu], nil)) | |
512 | + | let u = if (((cy - ct._3) > 0)) | |
513 | + | then [ScriptTransfer(cj.caller, (cy - ct._3), g)] | |
502 | 514 | else nil | |
503 | - | let | |
504 | - | $Tuple2((( | |
515 | + | let cC = (ct._3 / 100) | |
516 | + | $Tuple2(((ct._1 ++ u) :+ ScriptTransfer(y, cC, g)), cv) | |
505 | 517 | } | |
506 | 518 | } | |
507 | 519 | } | |
508 | 520 | } | |
509 | 521 | } | |
510 | 522 | else throw("Strict value is not equal to itself.") | |
511 | 523 | } | |
512 | 524 | ||
513 | 525 | ||
514 | 526 | ||
515 | - | @Callable( | |
516 | - | func exchangeResources ( | |
517 | - | let | |
518 | - | if (( | |
527 | + | @Callable(cj) | |
528 | + | func exchangeResources (cl) = { | |
529 | + | let cn = bH() | |
530 | + | if ((cn == cn)) | |
519 | 531 | then { | |
520 | - | let an = valueOrErrorMessage(getString(z, ak(toString( | |
521 | - | if ((size( | |
532 | + | let an = valueOrErrorMessage(getString(z, ak(toString(cj.caller))), "You don't have a duck staked") | |
533 | + | if ((size(cj.payments) != 1)) | |
522 | 534 | then throw("exactly 1 payment must be attached") | |
523 | 535 | else { | |
524 | - | let | |
525 | - | let | |
526 | - | let | |
527 | - | if (( | |
536 | + | let cx = cj.payments[0] | |
537 | + | let cy = cx.amount | |
538 | + | let cz = valueOrErrorMessage(cx.assetId, "WAVES can't be used as payment") | |
539 | + | if ((cz != g)) | |
528 | 540 | then throw("USDT payments only!") | |
529 | 541 | else { | |
530 | - | let | |
531 | - | if (( | |
532 | - | then throw(("Duck location type should be Factory, but is " + | |
542 | + | let co = split(valueOrElse(getString(z, ao(an)), A), "_") | |
543 | + | if ((co[aw] != "F")) | |
544 | + | then throw(("Duck location type should be Factory, but is " + co[aw])) | |
533 | 545 | else { | |
534 | - | let | |
535 | - | let | |
536 | - | let | |
537 | - | let | |
538 | - | func | |
539 | - | let | |
540 | - | let | |
541 | - | let | |
542 | - | if (( | |
543 | - | then throw(((((("You have " + | |
544 | - | else if ((0 > | |
545 | - | then throw(((("You tried to exchange negative amount of " + M[ | |
546 | - | else if (( | |
547 | - | then $Tuple4(( | |
548 | - | else $Tuple4(( | |
546 | + | let bq = co[ax] | |
547 | + | let cp = bF(am(an)) | |
548 | + | let cq = split(cp[az], "_") | |
549 | + | let cA = split(cp[aA], "_") | |
550 | + | func cD (bg,bJ) = { | |
551 | + | let bs = af(bq, bJ) | |
552 | + | let bt = valueOrElse(getInteger(bs), 0) | |
553 | + | let cE = cl[bJ] | |
554 | + | if ((cE > parseIntValue(cq[bJ]))) | |
555 | + | then throw(((((("You have " + cq[bJ]) + " of ") + M[bJ]) + ", but tried to exchange ") + toString(cE))) | |
556 | + | else if ((0 > cE)) | |
557 | + | then throw(((("You tried to exchange negative amount of " + M[bJ]) + ": ") + toString(cE))) | |
558 | + | else if ((cE > 0)) | |
559 | + | then $Tuple4((bg._1 :+ toString((parseIntValue(cq[bJ]) - cE))), (bg._2 :+ toString((parseIntValue(cA[bJ]) + cE))), (bg._3 + fraction(cE, D, d)), (bg._4 :+ IntegerEntry(bs, bt))) | |
560 | + | else $Tuple4((bg._1 :+ cq[bJ]), (bg._2 :+ cA[bJ]), bg._3, bg._4) | |
549 | 561 | } | |
550 | 562 | ||
551 | - | let | |
552 | - | let | |
553 | - | let | |
554 | - | let | |
555 | - | func | |
556 | - | then | |
557 | - | else | |
563 | + | let ct = { | |
564 | + | let bi = [0, 1, 2, 3, 4, 5] | |
565 | + | let bj = size(bi) | |
566 | + | let bk = $Tuple4(nil, nil, 0, nil) | |
567 | + | func bl (bm,bn) = if ((bn >= bj)) | |
568 | + | then bm | |
569 | + | else cD(bm, bi[bn]) | |
558 | 570 | ||
559 | - | func | |
560 | - | then | |
571 | + | func bo (bm,bn) = if ((bn >= bj)) | |
572 | + | then bm | |
561 | 573 | else throw("List size exceeds 6") | |
562 | 574 | ||
563 | - | bk | |
575 | + | bo(bl(bl(bl(bl(bl(bl(bk, 0), 1), 2), 3), 4), 5), 6) | |
564 | 576 | } | |
565 | - | if (( | |
566 | - | then throw(((("Insufficient payment! Attached=" + toString( | |
577 | + | if ((ct._3 > cy)) | |
578 | + | then throw(((("Insufficient payment! Attached=" + toString(cy)) + ", required=") + toString(ct._3))) | |
567 | 579 | else { | |
568 | - | let | |
569 | - | let | |
570 | - | let u = if ((( | |
571 | - | then [ScriptTransfer( | |
580 | + | let cu = makeString([cp[ay], makeString(ct._1, "_"), makeString(ct._2, "_"), cp[aB]], ":") | |
581 | + | let cv = aO(invoke(z, "updateBackpack", [an, cu], nil)) | |
582 | + | let u = if (((cy - ct._3) > 0)) | |
583 | + | then [ScriptTransfer(cj.caller, (cy - ct._3), g)] | |
572 | 584 | else nil | |
573 | - | let | |
574 | - | $Tuple2(((u ++ | |
585 | + | let cC = (ct._3 / 100) | |
586 | + | $Tuple2(((u ++ ct._4) :+ ScriptTransfer(y, cC, g)), cv) | |
575 | 587 | } | |
576 | 588 | } | |
577 | 589 | } | |
578 | 590 | } | |
579 | 591 | } | |
580 | 592 | else throw("Strict value is not equal to itself.") | |
581 | 593 | } | |
582 | 594 | ||
583 | 595 | ||
584 | 596 | ||
585 | - | @Callable( | |
586 | - | func craftGoods ( | |
587 | - | let | |
588 | - | if (( | |
589 | - | then if ((size( | |
597 | + | @Callable(cj) | |
598 | + | func craftGoods (cF,cG) = { | |
599 | + | let cn = bH() | |
600 | + | if ((cn == cn)) | |
601 | + | then if ((size(cj.payments) != 1)) | |
590 | 602 | then throw("exactly 1 payment must be attached") | |
591 | 603 | else { | |
592 | - | let | |
593 | - | let | |
594 | - | let | |
595 | - | if (( | |
604 | + | let cx = cj.payments[0] | |
605 | + | let cy = cx.amount | |
606 | + | let cz = valueOrErrorMessage(cx.assetId, "WAVES can't be used as payment") | |
607 | + | if ((cz != g)) | |
596 | 608 | then throw("USDT payments only!") | |
597 | - | else if (( | |
609 | + | else if ((cy != b)) | |
598 | 610 | then throw("exactly 1 USDT must be attached as payment") | |
599 | - | else if ((0 >= | |
611 | + | else if ((0 >= cG)) | |
600 | 612 | then throw("Quantity should be positive") | |
601 | 613 | else { | |
602 | - | let an = valueOrErrorMessage(getString(z, ak(toString( | |
603 | - | let | |
604 | - | if (( | |
605 | - | then throw(("Duck location type should be Manufactory, but is " + | |
614 | + | let an = valueOrErrorMessage(getString(z, ak(toString(cj.caller))), "You don't have a duck staked") | |
615 | + | let co = split(valueOrElse(getString(z, ao(an)), A), "_") | |
616 | + | if ((co[aw] != "M")) | |
617 | + | then throw(("Duck location type should be Manufactory, but is " + co[aw])) | |
606 | 618 | else { | |
607 | - | let | |
608 | - | let | |
609 | - | let | |
610 | - | if (if ((0 > | |
619 | + | let cH = co[av] | |
620 | + | let cp = bF(am(an)) | |
621 | + | let cA = split(cp[aA], "_") | |
622 | + | if (if ((0 > cF)) | |
611 | 623 | then true | |
612 | - | else ( | |
613 | - | then throw(("Unknown product idx=" + toString( | |
624 | + | else (cF >= size(Q))) | |
625 | + | then throw(("Unknown product idx=" + toString(cF))) | |
614 | 626 | else { | |
615 | - | let | |
616 | - | if ((size( | |
617 | - | then throw(("Fatal: unknown recipe: " + Q[ | |
627 | + | let cI = split(Q[cF], "_") | |
628 | + | if ((size(cI) != (B + 3))) | |
629 | + | then throw(("Fatal: unknown recipe: " + Q[cF])) | |
618 | 630 | else { | |
619 | - | let | |
620 | - | if ((P[ | |
621 | - | then throw(((("This product is available in " + P[ | |
631 | + | let cJ = parseIntValue(cI[ae]) | |
632 | + | if ((P[cJ] != cH)) | |
633 | + | then throw(((("This product is available in " + P[cJ]) + ", but you are in ") + cH)) | |
622 | 634 | else { | |
623 | - | let | |
635 | + | let cK = if ((cp[aB] == "")) | |
624 | 636 | then nil | |
625 | - | else split( | |
626 | - | func | |
627 | - | let | |
628 | - | let | |
629 | - | then | |
637 | + | else split(cp[aB], "_") | |
638 | + | func cL (bg,cM) = { | |
639 | + | let cN = bg._2 | |
640 | + | let cO = if ((size(cK) > cN)) | |
641 | + | then cK[cN] | |
630 | 642 | else "0" | |
631 | - | let | |
632 | - | let | |
633 | - | let | |
634 | - | then toString(( | |
635 | - | else | |
636 | - | $Tuple2(( | |
643 | + | let cP = parseIntValue(cO) | |
644 | + | let aV = (cG * parseIntValue(cI[ad])) | |
645 | + | let cQ = if ((cN == cF)) | |
646 | + | then toString((cP + aV)) | |
647 | + | else cO | |
648 | + | $Tuple2((bg._1 :+ cQ), (cN + 1)) | |
637 | 649 | } | |
638 | 650 | ||
639 | - | let | |
640 | - | let | |
641 | - | let | |
642 | - | func | |
643 | - | then | |
644 | - | else | |
651 | + | let cR = ( let bi = Q | |
652 | + | let bj = size(bi) | |
653 | + | let bk = $Tuple2(nil, 0) | |
654 | + | func bl (bm,bn) = if ((bn >= bj)) | |
655 | + | then bm | |
656 | + | else cL(bm, bi[bn]) | |
645 | 657 | ||
646 | - | func | |
647 | - | then | |
658 | + | func bo (bm,bn) = if ((bn >= bj)) | |
659 | + | then bm | |
648 | 660 | else throw("List size exceeds 50") | |
649 | 661 | ||
650 | - | bk | |
651 | - | func | |
652 | - | let | |
653 | - | let | |
654 | - | if (( | |
655 | - | then throw(((((((("You have " + | |
656 | - | else if (( | |
657 | - | then ( | |
658 | - | else ( | |
662 | + | bo(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bk, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50))._1 | |
663 | + | func cS (bg,bJ) = { | |
664 | + | let cT = ((parseIntValue(cI[bJ]) * c) * cG) | |
665 | + | let cU = parseIntValue(cA[bJ]) | |
666 | + | if ((cT > cU)) | |
667 | + | then throw(((((((("You have " + cA[bJ]) + " of ") + N[bJ]) + ", but recipe requires ") + toString(cT)) + " for quantity ") + toString(cG))) | |
668 | + | else if ((cT > 0)) | |
669 | + | then (bg :+ toString((cU - cT))) | |
670 | + | else (bg :+ cA[bJ]) | |
659 | 671 | } | |
660 | 672 | ||
661 | - | let | |
662 | - | let | |
663 | - | let | |
664 | - | let | |
665 | - | func | |
666 | - | then | |
667 | - | else | |
673 | + | let ct = { | |
674 | + | let bi = [0, 1, 2, 3, 4, 5] | |
675 | + | let bj = size(bi) | |
676 | + | let bk = nil | |
677 | + | func cV (bm,bn) = if ((bn >= bj)) | |
678 | + | then bm | |
679 | + | else cS(bm, bi[bn]) | |
668 | 680 | ||
669 | - | func | |
670 | - | then | |
681 | + | func cW (bm,bn) = if ((bn >= bj)) | |
682 | + | then bm | |
671 | 683 | else throw("List size exceeds 6") | |
672 | 684 | ||
673 | - | | |
685 | + | cW(cV(cV(cV(cV(cV(cV(bk, 0), 1), 2), 3), 4), 5), 6) | |
674 | 686 | } | |
675 | - | let | |
676 | - | let | |
677 | - | $Tuple2(nil, | |
687 | + | let cu = makeString([cp[ay], cp[az], makeString(ct, "_"), makeString(cR, "_")], ":") | |
688 | + | let cv = aO(invoke(z, "updateBackpack", [an, cu], nil)) | |
689 | + | $Tuple2(nil, cv) | |
678 | 690 | } | |
679 | 691 | } | |
680 | 692 | } | |
681 | 693 | } | |
682 | 694 | } | |
683 | 695 | } | |
684 | 696 | else throw("Strict value is not equal to itself.") | |
685 | 697 | } | |
686 | 698 | ||
687 | 699 | ||
688 | 700 | ||
689 | - | @Callable( | |
690 | - | func setWarehouseOrder ( | |
691 | - | let | |
692 | - | let au = toString( | |
693 | - | let | |
694 | - | then | |
701 | + | @Callable(cj) | |
702 | + | func setWarehouseOrder (cX,aj) = { | |
703 | + | let cY = cj.originCaller | |
704 | + | let au = toString(cY) | |
705 | + | let cv = if ((cY != y)) | |
706 | + | then bH() | |
695 | 707 | else false | |
696 | - | let | |
708 | + | let cZ = value(assetInfo(fromBase58String(aj))) | |
697 | 709 | if (!(isDefined(getInteger(z, as(aj))))) | |
698 | - | then throw((("NFT " + | |
710 | + | then throw((("NFT " + cZ.name) + " is not staked")) | |
699 | 711 | else { | |
700 | - | let | |
701 | - | if (if (( | |
702 | - | then ( | |
712 | + | let da = valueOrErrorMessage(getString(z, aq(aj)), (("NFT " + cZ.name) + " is orphaned")) | |
713 | + | if (if ((cY != y)) | |
714 | + | then (da != au) | |
703 | 715 | else false) | |
704 | 716 | then throw((H + " is not yours")) | |
705 | 717 | else { | |
706 | - | let | |
707 | - | if ((size( | |
718 | + | let db = split_4C(cX, ":") | |
719 | + | if ((size(db) != 3)) | |
708 | 720 | then throw("cargoListStr should contain exactly 2 ':' separators") | |
709 | 721 | else { | |
710 | - | let | |
711 | - | let | |
712 | - | let | |
722 | + | let dc = split(db[0], "_") | |
723 | + | let dd = split(db[1], "_") | |
724 | + | let de = if ((db[2] == "")) | |
713 | 725 | then nil | |
714 | - | else split( | |
715 | - | if ((size( | |
726 | + | else split(db[2], "_") | |
727 | + | if ((size(dc) != B)) | |
716 | 728 | then throw("All 6 resources should be passed") | |
717 | - | else if ((size( | |
729 | + | else if ((size(dd) != B)) | |
718 | 730 | then throw("All 6 materials should be passed") | |
719 | 731 | else { | |
720 | - | let | |
721 | - | let | |
722 | - | let | |
723 | - | let | |
724 | - | let | |
732 | + | let df = aO(invoke(z, "getWarehouseREADONLY", [aj], nil)) | |
733 | + | let bd = split_4C(df, ":") | |
734 | + | let dg = split(bd[aD], "_") | |
735 | + | let dh = split(bd[aE], "_") | |
736 | + | let di = if ((bd[aF] == "")) | |
725 | 737 | then nil | |
726 | - | else split( | |
727 | - | let | |
728 | - | let | |
729 | - | let | |
730 | - | let | |
731 | - | let | |
732 | - | let | |
738 | + | else split(bd[aF], "_") | |
739 | + | let dj = aZ(bd[aC]) | |
740 | + | let aS = ai(aj) | |
741 | + | let dk = aR(aS) | |
742 | + | let dl = split(dk[aL], "_") | |
743 | + | let dm = split(dk[aM], "_") | |
744 | + | let dn = if ((dk[aN] == "")) | |
733 | 745 | then nil | |
734 | - | else split( | |
735 | - | let | |
736 | - | let | |
737 | - | let | |
738 | - | let | |
739 | - | let | |
740 | - | func | |
741 | - | then | |
742 | - | else | |
746 | + | else split(dk[aN], "_") | |
747 | + | let do = 0 | |
748 | + | let dp = { | |
749 | + | let bi = dc | |
750 | + | let bj = size(bi) | |
751 | + | let bk = $Tuple7(0, nil, 0, 0, dg, dl, false) | |
752 | + | func bl (bm,bn) = if ((bn >= bj)) | |
753 | + | then bm | |
754 | + | else bI(bm, bi[bn]) | |
743 | 755 | ||
744 | - | func | |
745 | - | then | |
756 | + | func bo (bm,bn) = if ((bn >= bj)) | |
757 | + | then bm | |
746 | 758 | else throw("List size exceeds 6") | |
747 | 759 | ||
748 | - | bk | |
760 | + | bo(bl(bl(bl(bl(bl(bl(bk, 0), 1), 2), 3), 4), 5), 6) | |
749 | 761 | } | |
750 | - | let | |
751 | - | let | |
752 | - | let | |
753 | - | let | |
754 | - | func | |
755 | - | then | |
756 | - | else | |
762 | + | let bC = { | |
763 | + | let bi = dd | |
764 | + | let bj = size(bi) | |
765 | + | let bk = $Tuple7(0, nil, dp._3, dp._4, dh, dm, false) | |
766 | + | func cV (bm,bn) = if ((bn >= bj)) | |
767 | + | then bm | |
768 | + | else bI(bm, bi[bn]) | |
757 | 769 | ||
758 | - | func | |
759 | - | then | |
770 | + | func cW (bm,bn) = if ((bn >= bj)) | |
771 | + | then bm | |
760 | 772 | else throw("List size exceeds 6") | |
761 | 773 | ||
762 | - | | |
774 | + | cW(cV(cV(cV(cV(cV(cV(bk, 0), 1), 2), 3), 4), 5), 6) | |
763 | 775 | } | |
764 | - | let | |
776 | + | let aT = if ((size(de) != 0)) | |
765 | 777 | then { | |
766 | - | let | |
767 | - | let | |
768 | - | let | |
769 | - | func | |
770 | - | then | |
771 | - | else | |
778 | + | let bi = de | |
779 | + | let bj = size(bi) | |
780 | + | let bk = $Tuple7(0, nil, bC._3, bC._4, di, dn, true) | |
781 | + | func dq (bm,bn) = if ((bn >= bj)) | |
782 | + | then bm | |
783 | + | else bI(bm, bi[bn]) | |
772 | 784 | ||
773 | - | func | |
774 | - | then | |
785 | + | func dr (bm,bn) = if ((bn >= bj)) | |
786 | + | then bm | |
775 | 787 | else throw("List size exceeds 50") | |
776 | 788 | ||
777 | - | | |
789 | + | dr(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(bk, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50) | |
778 | 790 | } | |
779 | - | else $Tuple7(0, | |
780 | - | let | |
781 | - | if (( | |
782 | - | then throw((((("Attempt to reserve " + toString( | |
791 | + | else $Tuple7(0, di, bC._3, bC._4, di, dn, true) | |
792 | + | let ds = aT._3 | |
793 | + | if ((ds > dj)) | |
794 | + | then throw((((("Attempt to reserve " + toString(ds)) + " space, but only ") + toString(dj)) + " warehouse space left")) | |
783 | 795 | else { | |
784 | - | let | |
785 | - | let | |
786 | - | if (( | |
796 | + | let dt = makeString_2C([bd[aC], makeString(dp._2, "_"), makeString(bC._2, "_"), makeString(aT._2, "_"), toString(ds)], ":") | |
797 | + | let du = invoke(z, "saveWarehouse", [dt, aj], nil) | |
798 | + | if ((du == du)) | |
787 | 799 | then { | |
788 | - | let | |
789 | - | let | |
790 | - | then if ((size( | |
800 | + | let dv = aT._4 | |
801 | + | let dw = if ((dv > 0)) | |
802 | + | then if ((size(cj.payments) != 1)) | |
791 | 803 | then throw("exactly 1 payment must be attached") | |
792 | 804 | else { | |
793 | - | let | |
794 | - | let | |
795 | - | let | |
796 | - | if (( | |
805 | + | let cx = cj.payments[0] | |
806 | + | let cy = cx.amount | |
807 | + | let cz = valueOrErrorMessage(cx.assetId, "WAVES can't be used as payment") | |
808 | + | if ((cz != g)) | |
797 | 809 | then throw("USDT payments only!") | |
798 | - | else if (( | |
799 | - | then throw(("Payment needed is " + toString( | |
800 | - | else [StringEntry( | |
810 | + | else if ((cy != dv)) | |
811 | + | then throw(("Payment needed is " + toString(dv))) | |
812 | + | else [StringEntry(aS, cX)] | |
801 | 813 | } | |
802 | - | else if (( | |
803 | - | then if ((size( | |
814 | + | else if ((dv == 0)) | |
815 | + | then if ((size(cj.payments) != 0)) | |
804 | 816 | then throw("No payments needed") | |
805 | - | else [StringEntry( | |
806 | - | else if ((size( | |
817 | + | else [StringEntry(aS, cX)] | |
818 | + | else if ((size(cj.payments) != 0)) | |
807 | 819 | then throw("No payments needed") | |
808 | - | else [ScriptTransfer(addressFromStringValue( | |
809 | - | $Tuple2( | |
820 | + | else [ScriptTransfer(addressFromStringValue(da), -(dv), g), StringEntry(aS, cX)] | |
821 | + | $Tuple2(dw, cv) | |
810 | 822 | } | |
811 | 823 | else throw("Strict value is not equal to itself.") | |
812 | 824 | } | |
813 | 825 | } | |
814 | 826 | } | |
815 | 827 | } | |
816 | 828 | } | |
817 | 829 | } | |
818 | 830 | ||
819 | 831 | ||
820 | 832 | ||
821 | - | @Callable( | |
822 | - | func acceptWarehouseOrder ( | |
823 | - | let | |
824 | - | if (( | |
833 | + | @Callable(cj) | |
834 | + | func acceptWarehouseOrder (dx,aj,an) = { | |
835 | + | let cn = bH() | |
836 | + | if ((cn == cn)) | |
825 | 837 | then { | |
826 | - | let | |
827 | - | let | |
828 | - | let | |
829 | - | let | |
830 | - | let | |
831 | - | if (( | |
832 | - | then throw((("Duck location type is " + | |
833 | - | else if (( | |
834 | - | then throw(((("Your staked duck is " + | |
838 | + | let dy = cj.originCaller | |
839 | + | let dz = toString(dy) | |
840 | + | let dA = valueOrErrorMessage(getString(z, ak(dz)), "You don't have a duck staked") | |
841 | + | let co = valueOrElse(getString(z, ao(dA)), A) | |
842 | + | let dB = split(value(co), "_") | |
843 | + | if ((dB[aw] != "L")) | |
844 | + | then throw((("Duck location type is " + dB[aw]) + ", but should be L")) | |
845 | + | else if ((dA != an)) | |
846 | + | then throw(((("Your staked duck is " + dA) + ", but passed ") + an)) | |
835 | 847 | else { | |
836 | - | let | |
848 | + | let dC = value(assetInfo(fromBase58String(aj))) | |
837 | 849 | if (!(isDefined(getInteger(z, as(aj))))) | |
838 | - | then throw((("NFT " + | |
850 | + | then throw((("NFT " + dC.name) + " is not staked")) | |
839 | 851 | else { | |
840 | - | let | |
841 | - | if (( | |
852 | + | let dD = valueOrErrorMessage(getString(z, aq(aj)), (("NFT " + dC.name) + " is orphaned")) | |
853 | + | if ((dD == dz)) | |
842 | 854 | then throw("You cannot trade with yourself") | |
843 | 855 | else { | |
844 | - | let | |
845 | - | if ((size( | |
856 | + | let dE = split_4C(dx, ":") | |
857 | + | if ((size(dE) != 3)) | |
846 | 858 | then throw("bpOrderStr should contain exactly 2 ':' separators") | |
847 | 859 | else { | |
848 | - | let | |
849 | - | let | |
850 | - | let | |
860 | + | let dF = split(dE[0], "_") | |
861 | + | let dG = split(dE[1], "_") | |
862 | + | let dH = if ((dE[2] == "")) | |
851 | 863 | then nil | |
852 | - | else split( | |
853 | - | if ((size( | |
864 | + | else split(dE[2], "_") | |
865 | + | if ((size(dF) != B)) | |
854 | 866 | then throw("All 6 resources should be passed") | |
855 | - | else if ((size( | |
867 | + | else if ((size(dG) != B)) | |
856 | 868 | then throw("All 6 materials should be passed") | |
857 | 869 | else { | |
858 | - | let | |
859 | - | let | |
860 | - | let | |
861 | - | let | |
862 | - | let | |
870 | + | let df = aO(invoke(z, "getWarehouseREADONLY", [aj], nil)) | |
871 | + | let bd = split_4C(df, ":") | |
872 | + | let dg = split(bd[aD], "_") | |
873 | + | let dh = split(bd[aE], "_") | |
874 | + | let di = if ((bd[aF] == "")) | |
863 | 875 | then nil | |
864 | - | else split( | |
865 | - | let | |
866 | - | let | |
867 | - | let | |
868 | - | let | |
869 | - | let | |
870 | - | let | |
876 | + | else split(bd[aF], "_") | |
877 | + | let dI = parseIntValue(split(bd[aG], "_")[aH]) | |
878 | + | let bG = am(an) | |
879 | + | let cp = bF(bG) | |
880 | + | let dJ = split(cp[az], "_") | |
881 | + | let dK = split(cp[aA], "_") | |
882 | + | let dL = if ((cp[aB] == "")) | |
871 | 883 | then nil | |
872 | - | else split( | |
873 | - | let | |
874 | - | let | |
875 | - | let | |
876 | - | let | |
877 | - | let | |
884 | + | else split(cp[aB], "_") | |
885 | + | let aS = ai(aj) | |
886 | + | let dM = aR(aS) | |
887 | + | let dN = split(dM[aL], "_") | |
888 | + | let dO = split(dM[aM], "_") | |
889 | + | let dP = if ((dM[aN] == "")) | |
878 | 890 | then nil | |
879 | - | else split( | |
880 | - | let | |
881 | - | let | |
882 | - | let | |
883 | - | let | |
884 | - | let | |
885 | - | func | |
886 | - | then | |
887 | - | else | |
891 | + | else split(dM[aN], "_") | |
892 | + | let do = 0 | |
893 | + | let dp = { | |
894 | + | let bi = dF | |
895 | + | let bj = size(bi) | |
896 | + | let bk = $Tuple12(nil, nil, nil, 0, 0, 0, 0, dJ, dg, dN, M, false) | |
897 | + | func bl (bm,bn) = if ((bn >= bj)) | |
898 | + | then bm | |
899 | + | else bX(bm, bi[bn]) | |
888 | 900 | ||
889 | - | func | |
890 | - | then | |
901 | + | func bo (bm,bn) = if ((bn >= bj)) | |
902 | + | then bm | |
891 | 903 | else throw("List size exceeds 6") | |
892 | 904 | ||
893 | - | bk | |
905 | + | bo(bl(bl(bl(bl(bl(bl(bk, 0), 1), 2), 3), 4), 5), 6) | |
894 | 906 | } | |
895 | - | let | |
896 | - | let | |
897 | - | let | |
898 | - | let | |
899 | - | func | |
900 | - | then | |
901 | - | else | |
907 | + | let bC = { | |
908 | + | let bi = dG | |
909 | + | let bj = size(bi) | |
910 | + | let bk = $Tuple12(nil, nil, nil, dp._4, dp._5, dp._6, 0, dK, dh, dO, N, false) | |
911 | + | func cV (bm,bn) = if ((bn >= bj)) | |
912 | + | then bm | |
913 | + | else bX(bm, bi[bn]) | |
902 | 914 | ||
903 | - | func | |
904 | - | then | |
915 | + | func cW (bm,bn) = if ((bn >= bj)) | |
916 | + | then bm | |
905 | 917 | else throw("List size exceeds 6") | |
906 | 918 | ||
907 | - | | |
919 | + | cW(cV(cV(cV(cV(cV(cV(bk, 0), 1), 2), 3), 4), 5), 6) | |
908 | 920 | } | |
909 | - | let | |
921 | + | let aT = if ((size(dH) != 0)) | |
910 | 922 | then { | |
911 | - | let | |
912 | - | let | |
913 | - | let | |
914 | - | func | |
915 | - | then | |
916 | - | else | |
923 | + | let bi = dH | |
924 | + | let bj = size(bi) | |
925 | + | let bk = $Tuple12(nil, nil, nil, bC._4, bC._5, bC._6, 0, dL, di, dP, O, true) | |
926 | + | func dq (bm,bn) = if ((bn >= bj)) | |
927 | + | then bm | |
928 | + | else bX(bm, bi[bn]) | |
917 | 929 | ||
918 | - | func | |
919 | - | then | |
930 | + | func dr (bm,bn) = if ((bn >= bj)) | |
931 | + | then bm | |
920 | 932 | else throw("List size exceeds 50") | |
921 | 933 | ||
922 | - | | |
934 | + | dr(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(dq(bk, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50) | |
923 | 935 | } | |
924 | - | else $Tuple12( | |
925 | - | let | |
926 | - | let | |
936 | + | else $Tuple12(di, dP, dL, bC._4, bC._5, bC._6, 0, dL, di, dP, O, true) | |
937 | + | let ds = aT._4 | |
938 | + | let dQ = if ((0 > (dI - ds))) | |
927 | 939 | then 0 | |
928 | - | else ( | |
929 | - | let | |
930 | - | let | |
931 | - | let | |
932 | - | let | |
933 | - | if (( | |
940 | + | else (dI - ds) | |
941 | + | let dt = makeString_2C([bd[aC], makeString(dp._1, "_"), makeString(bC._1, "_"), makeString(aT._1, "_"), toString(dQ)], ":") | |
942 | + | let dR = makeString_2C([makeString(dp._2, "_"), makeString(bC._2, "_"), makeString(aT._2, "_")], ":") | |
943 | + | let dS = makeString_2C([cp[ay], makeString(dp._3, "_"), makeString(bC._3, "_"), makeString(aT._3, "_")], ":") | |
944 | + | let du = invoke(z, "saveWarehouse", [dt, aj], nil) | |
945 | + | if ((du == du)) | |
934 | 946 | then { | |
935 | - | let | |
936 | - | if (( | |
947 | + | let dT = invoke(z, "updateBackpack", [an, dS], nil) | |
948 | + | if ((dT == dT)) | |
937 | 949 | then { | |
938 | - | let | |
939 | - | let | |
940 | - | let | |
950 | + | let dw = [StringEntry(aS, dR)] | |
951 | + | let dU = aT._5 | |
952 | + | let dV = if ((dU > 0)) | |
941 | 953 | then { | |
942 | - | let | |
943 | - | let | |
944 | - | let | |
945 | - | if (isDefined( | |
946 | - | then ((( | |
947 | - | else (( | |
954 | + | let dW = fraction(aT._5, K, b) | |
955 | + | let dX = at(dz) | |
956 | + | let dY = getString(z, dX) | |
957 | + | if (isDefined(dY)) | |
958 | + | then (((dw :+ ScriptTransfer(dy, (aT._5 - (3 * dW)), g)) :+ ScriptTransfer(y, dW, g)) :+ ScriptTransfer(addressFromStringValue(value(dY)), dW, g)) | |
959 | + | else ((dw :+ ScriptTransfer(dy, (aT._5 - (3 * dW)), g)) :+ ScriptTransfer(y, dW, g)) | |
948 | 960 | } | |
949 | - | else | |
950 | - | let | |
951 | - | if (( | |
952 | - | then if ((size( | |
961 | + | else dw | |
962 | + | let dZ = aT._6 | |
963 | + | if ((dZ > 0)) | |
964 | + | then if ((size(cj.payments) != 1)) | |
953 | 965 | then throw("exactly 1 payment must be attached") | |
954 | 966 | else { | |
955 | - | let | |
956 | - | let | |
957 | - | let | |
958 | - | if (( | |
967 | + | let cx = cj.payments[0] | |
968 | + | let cy = cx.amount | |
969 | + | let cz = valueOrErrorMessage(cx.assetId, "WAVES can't be used as payment") | |
970 | + | if ((cz != g)) | |
959 | 971 | then throw("USDT payments only!") | |
960 | - | else if (( | |
961 | - | then throw(("Payment needed is " + toString( | |
962 | - | else if ((L > | |
972 | + | else if ((cy != dZ)) | |
973 | + | then throw(("Payment needed is " + toString(dZ))) | |
974 | + | else if ((L > cy)) | |
963 | 975 | then throw(("Payment should be at least " + toString(L))) | |
964 | 976 | else { | |
965 | - | let | |
966 | - | let | |
967 | - | let | |
968 | - | if (isDefined( | |
969 | - | then ((( | |
970 | - | else (( | |
977 | + | let ea = fraction(aT._6, K, b) | |
978 | + | let dX = at(dD) | |
979 | + | let dY = getString(z, dX) | |
980 | + | if (isDefined(dY)) | |
981 | + | then (((dV :+ ScriptTransfer(addressFromStringValue(dD), (aT._6 - (3 * ea)), g)) :+ ScriptTransfer(y, ea, g)) :+ ScriptTransfer(addressFromStringValue(value(dY)), ea, g)) | |
982 | + | else ((dV :+ ScriptTransfer(addressFromStringValue(dD), (aT._6 - (3 * ea)), g)) :+ ScriptTransfer(y, ea, g)) | |
971 | 983 | } | |
972 | 984 | } | |
973 | - | else if ((size( | |
985 | + | else if ((size(cj.payments) != 0)) | |
974 | 986 | then throw("No payments needed") | |
975 | - | else | |
987 | + | else dV | |
976 | 988 | } | |
977 | 989 | else throw("Strict value is not equal to itself.") | |
978 | 990 | } | |
979 | 991 | else throw("Strict value is not equal to itself.") | |
980 | 992 | } | |
981 | 993 | } | |
982 | 994 | } | |
983 | 995 | } | |
984 | 996 | } | |
985 | 997 | } | |
986 | 998 | else throw("Strict value is not equal to itself.") | |
987 | 999 | } | |
988 | 1000 | ||
989 | 1001 |
github/deemru/w8io/026f985 794.97 ms ◑