tx · B8vJvYsJ28VXeNALv6AxiAaYbAdG7YL6RNst99G9qEAY 3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep: -0.03200000 Waves 2023.05.30 02:16 [2599919] smart account 3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep > SELF 0.00000000 Waves
{ "type": 13, "id": "B8vJvYsJ28VXeNALv6AxiAaYbAdG7YL6RNst99G9qEAY", "fee": 3200000, "feeAssetId": null, "timestamp": 1685402188271, "version": 2, "chainId": 84, "sender": "3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep", "senderPublicKey": "7v5L7QkXxfkirALdyqmox38QCsa9jtfAtgUfHTh34eWq", "proofs": [ "58sYAjY5o2vb6sLXV8VYt66CKkaZeR6gNBBjxvGtvRd3xm79fJ4Vy9diPgRVyLkMqdRPd7WKH6LoF4cH4qmwaSLh" ], "script": "base64:BgIxCAISBAoCCBgSAwoBCBIECgIRERIECgIRERIDCgEREgQKAgEBEgQKAggIEgUKAwgICFkAA1NFUAICX18ABU1VTFQ2AMCEPQAFTVVMVDcAgK3iBAAFTVVMVDgAgMLXLwAGTVVMVDEwAIDIr6AlAAVjaGFpbgkAyQECCQDKAQIIBQR0aGlzBWJ5dGVzAAEAAQALdXNkdEFzc2V0SWQEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDABIITaerIIAz9O0bvKju6Lk7zJgt0LXfoHlqjUI/moD/+5AwkAAAIBAVQFByRtYXRjaDABIFWx2J9yh4Lv5eNbjawFq2XemkOhLxa7BfMat4el8cUYCQACAQINVW5rbm93biBjaGFpbgAVZGVmYXVsdFJlc3RBZGRyZXNzU3RyBAckbWF0Y2gwBQVjaGFpbgMJAAACAQFXBQckbWF0Y2gwAiMzUFFDdXZGYnZoNExrUFVucm5VMXozam5iQTFwOW0zV05odgMJAAACAQFUBQckbWF0Y2gwAiMzTXVta0dHenRDS0FYcFdEcXhrZGRvZnFYU1VicVFrdlNKeQkAAgECDVVua25vd24gY2hhaW4BD2dld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dWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4A9Z4Hvg==", "height": 2599919, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Fpuy5PgkmwqLJ9QXA5m2BBySV8TBEGSQEJhH2EFnvYXp Next: 3wQ8pjGoxB995d3EYL98dkcif5V53i2GoLKQSw62f6sH Diff:
Old | New | Differences | |
---|---|---|---|
219 | 219 | else aV | |
220 | 220 | ||
221 | 221 | ||
222 | - | func aZ (ba) = { | |
223 | - | let bb = split(ba, "_") | |
224 | - | ((J * (parseIntValue(bb[1]) + 1)) * parseIntValue(bb[0])) | |
222 | + | func aZ (ba,ah,aV,bb) = { | |
223 | + | let bc = af(ba, ah) | |
224 | + | let bd = valueOrElse(getInteger(bc), 0) | |
225 | + | let be = if ((bd > C)) | |
226 | + | then 0 | |
227 | + | else if (((bd + aV) > C)) | |
228 | + | then (C - bd) | |
229 | + | else aV | |
230 | + | let bf = (fraction(be, ((F * D) - fraction(((100 * bd) + (50 * be)), D, C)), e) + fraction((aV - be), D, d)) | |
231 | + | let bg = (bb - (bb / 100)) | |
232 | + | if (((bg * aV) > (bf * d))) | |
233 | + | then throw((((((((((("Actual price = " + toString(bf)) + " / ") + toString(aV)) + " < minPrice = ") + toString(bb)) + ", (") + ba) + ", ") + M[ah]) + ")")) | |
234 | + | else $Tuple2(IntegerEntry(bc, (bd + aV)), bf) | |
225 | 235 | } | |
226 | 236 | ||
227 | 237 | ||
228 | - | func bc (bd) = { | |
229 | - | let be = bd[aF] | |
230 | - | if ((be == "")) | |
231 | - | then 0 | |
232 | - | else { | |
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))) | |
237 | - | } | |
238 | - | ||
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]) | |
245 | - | ||
246 | - | func bo (bm,bn) = if ((bn >= bj)) | |
247 | - | then bm | |
248 | - | else throw("List size exceeds 50") | |
249 | - | ||
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 | |
251 | - | } | |
238 | + | func bh (ba,bi,aV,bj) = { | |
239 | + | let bc = af(ba, bi) | |
240 | + | let bd = valueOrElse(getInteger(bc), 0) | |
241 | + | let bk = if ((bd > C)) | |
242 | + | then min([aV, (bd - C)]) | |
243 | + | else 0 | |
244 | + | let bl = min([bd, (aV - bk)]) | |
245 | + | let bm = (bl + bk) | |
246 | + | let bn = (fraction(bl, ((G * D) - fraction(((100 * bd) - (50 * bl)), D, C)), e) + fraction(bk, (2 * D), d)) | |
247 | + | let bo = (bj + (bj / 100)) | |
248 | + | if (((bn * d) > (bo * bm))) | |
249 | + | then throw((((((((((("Actual price = " + toString(bn)) + " / ") + toString(bm)) + " > maxPrice = ") + toString(bj)) + ", (") + ba) + ", ") + N[bi]) + ")")) | |
250 | + | else $Tuple3(IntegerEntry(bc, (bd - bm)), bn, bm) | |
252 | 251 | } | |
253 | 252 | ||
254 | 253 | ||
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)) | |
259 | - | then 0 | |
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) | |
268 | - | } | |
269 | - | ||
270 | - | ||
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)]) | |
276 | - | else 0 | |
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) | |
284 | - | } | |
285 | - | ||
286 | - | ||
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:"), ":") | |
254 | + | func bp (bq) = { | |
255 | + | let aT = split(valueOrElse(getString(z, bq), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":") | |
289 | 256 | [toString(valueOrElse(parseInt(aT[ay]), 0)), if ((size(split(aT[az], "_")) == B)) | |
290 | 257 | then aT[az] | |
291 | 258 | else "0_0_0_0_0_0", if ((size(split(aT[aA], "_")) == B)) | |
294 | 261 | } | |
295 | 262 | ||
296 | 263 | ||
297 | - | func | |
264 | + | func br () = if (valueOrElse(getBoolean(z, ap()), false)) | |
298 | 265 | then throw("Contracts are under maintenance") | |
299 | 266 | else unit | |
300 | 267 | ||
301 | 268 | ||
302 | - | func | |
303 | - | let | |
304 | - | let | |
305 | - | let aW = if ( | |
306 | - | then parseIntValue(split(Q[ | |
269 | + | func bs (bt,bu) = { | |
270 | + | let bv = bt._1 | |
271 | + | let bw = bt._8 | |
272 | + | let aW = if (bw) | |
273 | + | then parseIntValue(split(Q[bv], "_")[ad]) | |
307 | 274 | else 0 | |
308 | - | let | |
309 | - | if ((size( | |
275 | + | let bx = split(bu, "@") | |
276 | + | if ((size(bx) != 2)) | |
310 | 277 | then throw("Incorrect order format, should be amount@price") | |
311 | 278 | else { | |
312 | - | let | |
313 | - | let | |
314 | - | let | |
315 | - | let | |
316 | - | let | |
317 | - | then parseIntValue( | |
279 | + | let by = parseIntValue(bx[0]) | |
280 | + | let bz = parseIntValue(bx[1]) | |
281 | + | let bA = fraction(by, bz, d) | |
282 | + | let bB = aU(by, aW, bw) | |
283 | + | let bC = if ((size(bt._6) > bv)) | |
284 | + | then parseIntValue(bt._6[bv]) | |
318 | 285 | else 0 | |
319 | - | let | |
320 | - | then | |
286 | + | let bD = split(if ((size(bt._7) > bv)) | |
287 | + | then bt._7[bv] | |
321 | 288 | else "0@0", "@") | |
322 | - | let | |
323 | - | let | |
324 | - | if (if ((0 > | |
289 | + | let bE = parseIntValue(bD[0]) | |
290 | + | let bF = parseIntValue(bD[1]) | |
291 | + | if (if ((0 > bF)) | |
325 | 292 | then true | |
326 | - | else (0 > | |
293 | + | else (0 > bz)) | |
327 | 294 | then throw("Price can't be negative") | |
328 | 295 | else { | |
329 | - | let | |
330 | - | let | |
331 | - | if (( | |
332 | - | then if (( | |
333 | - | then $Tuple8(( | |
334 | - | else $Tuple8(( | |
335 | - | else if (( | |
336 | - | then if ((0 > | |
337 | - | then $Tuple8(( | |
338 | - | else $Tuple8(( | |
339 | - | else if ((0 > | |
296 | + | let bG = fraction(bE, bF, d) | |
297 | + | let bH = aU(bE, aW, bw) | |
298 | + | if ((by == 0)) | |
299 | + | then if ((bE > 0)) | |
300 | + | then $Tuple8((bv + 1), (bt._2 :+ toString(bC)), bt._3, bt._4, (bt._5 - bG), bt._6, bt._7, bw) | |
301 | + | else $Tuple8((bv + 1), (bt._2 :+ toString((bC - bE))), bt._3, bt._4, bt._5, bt._6, bt._7, bw) | |
302 | + | else if ((by > 0)) | |
303 | + | then if ((0 > bE)) | |
304 | + | then $Tuple8((bv + 1), (bt._2 :+ toString((bC - bE))), (bt._3 + bB), bt._4, (bt._5 + bA), bt._6, bt._7, bw) | |
305 | + | else $Tuple8((bv + 1), (bt._2 :+ toString(bC)), (bt._3 + bB), bt._4, ((bt._5 + bA) - bG), bt._6, bt._7, bw) | |
306 | + | else if ((0 > bE)) | |
340 | 307 | then { | |
341 | - | let | |
342 | - | if ((0 > ( | |
343 | - | then throw((((("Attempt to take " + toString( | |
344 | - | else $Tuple8(( | |
308 | + | let bI = (bE - by) | |
309 | + | if ((0 > (bC - bI))) | |
310 | + | then throw((((("Attempt to take " + toString(bI)) + " from warehouse, but only ") + toString(bC)) + " available")) | |
311 | + | else $Tuple8((bv + 1), (bt._2 :+ toString((bC - bI))), bt._3, (bt._4 - bB), bt._5, bt._6, bt._7, bw) | |
345 | 312 | } | |
346 | - | else if ((0 > ( | |
347 | - | then throw((((("Attempt to take " + toString(-( | |
348 | - | else $Tuple8(( | |
313 | + | else if ((0 > (bC + by))) | |
314 | + | then throw((((("Attempt to take " + toString(-(by))) + " from warehouse, but only ") + toString(bC)) + " available")) | |
315 | + | else $Tuple8((bv + 1), (bt._2 :+ toString((bC + by))), bt._3, (bt._4 - bB), (bt._5 - bG), bt._6, bt._7, bw) | |
349 | 316 | } | |
350 | 317 | } | |
351 | 318 | } | |
352 | 319 | ||
353 | 320 | ||
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]) | |
321 | + | func bJ (bK,bL,bM) = { | |
322 | + | let bN = split(bK[aD], "_") | |
323 | + | let bO = split(bK[aE], "_") | |
324 | + | let bP = if ((bK[aF] == "")) | |
325 | + | then nil | |
326 | + | else split(bK[aF], "_") | |
327 | + | let bQ = split(bL[aL], "_") | |
328 | + | let bR = split(bL[aM], "_") | |
329 | + | let bS = if ((bL[aN] == "")) | |
330 | + | then nil | |
331 | + | else split(bL[aN], "_") | |
332 | + | if ((size(bM) != 3)) | |
333 | + | then throw("cargoListStr should contain exactly 2 ':' separators") | |
334 | + | else { | |
335 | + | let bT = split(bM[0], "_") | |
336 | + | let bU = split(bM[1], "_") | |
337 | + | let bV = if ((bM[2] == "")) | |
338 | + | then nil | |
339 | + | else split(bM[2], "_") | |
340 | + | if ((size(bT) != B)) | |
341 | + | then throw("All 6 resources should be passed") | |
342 | + | else if ((size(bU) != B)) | |
343 | + | then throw("All 6 materials should be passed") | |
344 | + | else { | |
345 | + | let bW = { | |
346 | + | let bX = bT | |
347 | + | let bY = size(bX) | |
348 | + | let bZ = $Tuple8(0, nil, 0, 0, 0, bN, bQ, false) | |
349 | + | func ca (cb,cc) = if ((cc >= bY)) | |
350 | + | then cb | |
351 | + | else bs(cb, bX[cc]) | |
352 | + | ||
353 | + | func cd (cb,cc) = if ((cc >= bY)) | |
354 | + | then cb | |
355 | + | else throw("List size exceeds 6") | |
356 | + | ||
357 | + | cd(ca(ca(ca(ca(ca(ca(bZ, 0), 1), 2), 3), 4), 5), 6) | |
358 | + | } | |
359 | + | let bm = { | |
360 | + | let bX = bU | |
361 | + | let bY = size(bX) | |
362 | + | let bZ = $Tuple8(0, nil, bW._3, bW._4, bW._5, bO, bR, false) | |
363 | + | func ce (cb,cc) = if ((cc >= bY)) | |
364 | + | then cb | |
365 | + | else bs(cb, bX[cc]) | |
366 | + | ||
367 | + | func cf (cb,cc) = if ((cc >= bY)) | |
368 | + | then cb | |
369 | + | else throw("List size exceeds 6") | |
370 | + | ||
371 | + | cf(ce(ce(ce(ce(ce(ce(bZ, 0), 1), 2), 3), 4), 5), 6) | |
372 | + | } | |
373 | + | let aT = if ((size(bV) != 0)) | |
374 | + | then { | |
375 | + | let bX = bV | |
376 | + | let bY = size(bX) | |
377 | + | let bZ = $Tuple8(0, nil, bm._3, bm._4, bm._5, bP, bS, true) | |
378 | + | func cg (cb,cc) = if ((cc >= bY)) | |
379 | + | then cb | |
380 | + | else bs(cb, bX[cc]) | |
381 | + | ||
382 | + | func ch (cb,cc) = if ((cc >= bY)) | |
383 | + | then cb | |
384 | + | else throw("List size exceeds 50") | |
385 | + | ||
386 | + | ch(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(bZ, 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) | |
387 | + | } | |
388 | + | else $Tuple8(0, bP, bm._3, bm._4, bm._5, bP, bS, true) | |
389 | + | $Tuple6(bW._2, bm._2, aT._2, aT._3, aT._4, aT._5) | |
390 | + | } | |
391 | + | } | |
392 | + | } | |
393 | + | ||
394 | + | ||
395 | + | func ci (bt,cj) = { | |
396 | + | let bv = bt._7 | |
397 | + | let bw = bt._12 | |
398 | + | let aW = if (bw) | |
399 | + | then parseIntValue(split(Q[bv], "_")[ad]) | |
359 | 400 | else 0 | |
360 | - | let | |
361 | - | if ((size( | |
401 | + | let ck = split(cj, "@") | |
402 | + | if ((size(ck) != 2)) | |
362 | 403 | then throw("Incorrect order format, should be amount@price") | |
363 | 404 | else { | |
364 | - | let | |
365 | - | let | |
366 | - | if ((0 > | |
405 | + | let cl = parseIntValue(ck[0]) | |
406 | + | let cm = parseIntValue(ck[1]) | |
407 | + | if ((0 > cm)) | |
367 | 408 | then throw("Price can't be negative") | |
368 | 409 | else { | |
369 | - | let | |
370 | - | let | |
371 | - | then parseIntValue( | |
410 | + | let cn = fraction(cl, cm, d) | |
411 | + | let co = if ((size(bt._8) > bv)) | |
412 | + | then parseIntValue(bt._8[bv]) | |
372 | 413 | else 0 | |
373 | - | let | |
374 | - | then parseIntValue( | |
414 | + | let bC = if ((size(bt._9) > bv)) | |
415 | + | then parseIntValue(bt._9[bv]) | |
375 | 416 | else 0 | |
376 | - | let | |
377 | - | let | |
378 | - | let | |
379 | - | if (if (( | |
380 | - | then ( | |
417 | + | let cp = split(bt._10[bv], "@") | |
418 | + | let cq = parseIntValue(cp[0]) | |
419 | + | let cr = parseIntValue(cp[1]) | |
420 | + | if (if ((cl != 0)) | |
421 | + | then (cm != cr) | |
381 | 422 | else false) | |
382 | - | then throw(((((("Prices of " + | |
423 | + | then throw(((((("Prices of " + bt._11[bv]) + " don't match! WH price=") + toString(cr)) + ", your price=") + toString(cm))) | |
383 | 424 | else { | |
384 | - | let | |
385 | - | let | |
386 | - | if (( | |
387 | - | then $Tuple12(( | |
388 | - | else if (( | |
389 | - | then if ((0 > | |
390 | - | then if (( | |
391 | - | then throw(((((("Attempt to buy " + toString( | |
392 | - | else $Tuple12(( | |
393 | - | else throw((("Attempt to buy " + | |
394 | - | else if (( | |
395 | - | then if ((-( | |
396 | - | then throw(((((("Attempt to sell " + toString(-( | |
397 | - | else if ((-( | |
398 | - | then throw(((((("Attempt to sell " + toString(-( | |
399 | - | else $Tuple12(( | |
400 | - | else throw((("Attempt to sell " + | |
425 | + | let cs = fraction(cq, cr, d) | |
426 | + | let ct = aU(cl, aW, bw) | |
427 | + | if ((cl == 0)) | |
428 | + | then $Tuple12((bt._1 :+ toString(bC)), (bt._2 :+ bt._10[bv]), (bt._3 :+ toString(co)), bt._4, bt._5, bt._6, (bt._7 + 1), bt._8, bt._9, bt._10, bt._11, bw) | |
429 | + | else if ((cl > 0)) | |
430 | + | then if ((0 > cq)) | |
431 | + | then if ((cl > -(cq))) | |
432 | + | then throw(((((("Attempt to buy " + toString(cl)) + " of ") + bt._11[bv]) + ", but warehouse only sells ") + toString(-(cq)))) | |
433 | + | else $Tuple12((bt._1 :+ toString(bC)), (bt._2 :+ ((toString((cq + cl)) + "@") + toString(cr))), (bt._3 :+ toString((co + cl))), (bt._4 + ct), bt._5, (bt._6 + cn), (bt._7 + 1), bt._8, bt._9, bt._10, bt._11, bw) | |
434 | + | else throw((("Attempt to buy " + bt._11[bv]) + " while warehouse doesn't sell it")) | |
435 | + | else if ((cq > 0)) | |
436 | + | then if ((-(cl) > cq)) | |
437 | + | then throw(((((("Attempt to sell " + toString(-(cl))) + " of ") + bt._11[bv]) + ", but warehouse only buys ") + toString(cq))) | |
438 | + | else if ((-(cl) > co)) | |
439 | + | then throw(((((("Attempt to sell " + toString(-(cl))) + ", but you only have ") + toString(co)) + " of ") + bt._11[bv])) | |
440 | + | else $Tuple12((bt._1 :+ toString((bC - cl))), (bt._2 :+ ((toString((cq + cl)) + "@") + toString(cr))), (bt._3 :+ toString((co + cl))), (bt._4 - ct), (bt._5 - cn), bt._6, (bt._7 + 1), bt._8, bt._9, bt._10, bt._11, bw) | |
441 | + | else throw((("Attempt to sell " + bt._11[bv]) + " while warehouse doesn't buy it")) | |
401 | 442 | } | |
402 | 443 | } | |
403 | 444 | } | |
404 | 445 | } | |
405 | 446 | ||
406 | 447 | ||
407 | - | @Callable(cj) | |
408 | - | func constructorV1 (ck) = if ((cj.caller != this)) | |
409 | - | then throw("Permission denied") | |
410 | - | else [StringEntry(s(), ck)] | |
448 | + | @Callable(cu) | |
449 | + | func recalcLockedVolumeREADONLY (aj,cv) = { | |
450 | + | let bL = aR(ai(aj)) | |
451 | + | let cw = bJ(cv, bL, bL) | |
452 | + | $Tuple2(nil, (cw._4 + cw._5)) | |
453 | + | } | |
411 | 454 | ||
412 | 455 | ||
413 | 456 | ||
414 | - | @Callable(cj) | |
415 | - | func sellResources (cl,cm) = { | |
416 | - | let cn = bH() | |
417 | - | if ((cn == cn)) | |
457 | + | @Callable(cu) | |
458 | + | func constructorV1 (cx) = if ((cu.caller != this)) | |
459 | + | then throw("Permission denied") | |
460 | + | else [StringEntry(s(), cx)] | |
461 | + | ||
462 | + | ||
463 | + | ||
464 | + | @Callable(cu) | |
465 | + | func sellResources (cy,cz) = { | |
466 | + | let cA = br() | |
467 | + | if ((cA == cA)) | |
418 | 468 | then { | |
419 | - | let an = valueOrErrorMessage(getString(z, ak(toString( | |
420 | - | if ((size( | |
469 | + | let an = valueOrErrorMessage(getString(z, ak(toString(cu.caller))), "You don't have a duck staked") | |
470 | + | if ((size(cu.payments) != 0)) | |
421 | 471 | then throw("sellResources doesn't require any payments") | |
422 | 472 | else { | |
423 | - | let | |
424 | - | if (( | |
425 | - | then throw(("Duck location type should be Factory, but is " + | |
473 | + | let cB = split(valueOrElse(getString(z, ao(an)), A), "_") | |
474 | + | if ((cB[aw] != "F")) | |
475 | + | then throw(("Duck location type should be Factory, but is " + cB[aw])) | |
426 | 476 | else { | |
427 | - | let | |
428 | - | let | |
429 | - | let | |
430 | - | func | |
431 | - | then throw(((((("You have " + | |
432 | - | else if ((0 > | |
433 | - | then throw(((("You tried to sell negative amount of " + M[ | |
434 | - | else if (( | |
477 | + | let ba = cB[ax] | |
478 | + | let cC = bp(am(an)) | |
479 | + | let cD = split(cC[az], "_") | |
480 | + | func cE (bt,bv) = if ((cy[bv] > parseIntValue(cD[bv]))) | |
481 | + | then throw(((((("You have " + cD[bv]) + " of ") + M[bv]) + ", but tried to sell ") + toString(cy[bv]))) | |
482 | + | else if ((0 > cy[bv])) | |
483 | + | then throw(((("You tried to sell negative amount of " + M[bv]) + ": ") + toString(cy[bv]))) | |
484 | + | else if ((cy[bv] > 0)) | |
435 | 485 | then { | |
436 | - | let | |
437 | - | $Tuple3(( | |
486 | + | let cF = aZ(ba, bv, cy[bv], cz[bv]) | |
487 | + | $Tuple3((bt._1 :+ cF._1), (bt._2 :+ toString((parseIntValue(cD[bv]) - cy[bv]))), (bt._3 + cF._2)) | |
438 | 488 | } | |
439 | - | else $Tuple3( | |
489 | + | else $Tuple3(bt._1, (bt._2 :+ cD[bv]), bt._3) | |
440 | 490 | ||
441 | - | let | |
442 | - | let | |
443 | - | let | |
444 | - | let | |
445 | - | func | |
446 | - | then | |
447 | - | else | |
491 | + | let cG = { | |
492 | + | let bX = [0, 1, 2, 3, 4, 5] | |
493 | + | let bY = size(bX) | |
494 | + | let bZ = $Tuple3(nil, nil, 0) | |
495 | + | func ca (cb,cc) = if ((cc >= bY)) | |
496 | + | then cb | |
497 | + | else cE(cb, bX[cc]) | |
448 | 498 | ||
449 | - | func | |
450 | - | then | |
499 | + | func cd (cb,cc) = if ((cc >= bY)) | |
500 | + | then cb | |
451 | 501 | else throw("List size exceeds 6") | |
452 | 502 | ||
453 | - | | |
503 | + | cd(ca(ca(ca(ca(ca(ca(bZ, 0), 1), 2), 3), 4), 5), 6) | |
454 | 504 | } | |
455 | - | let | |
456 | - | let | |
457 | - | $Tuple2(( | |
505 | + | let cH = makeString([cC[ay], makeString(cG._2, "_"), cC[aA], cC[aB]], ":") | |
506 | + | let cI = aO(invoke(z, "updateBackpack", [an, cH], nil)) | |
507 | + | $Tuple2((cG._1 :+ ScriptTransfer(cu.caller, cG._3, g)), cI) | |
458 | 508 | } | |
459 | 509 | } | |
460 | 510 | } | |
463 | 513 | ||
464 | 514 | ||
465 | 515 | ||
466 | - | @Callable( | |
467 | - | func buyMaterials ( | |
468 | - | let | |
469 | - | if (( | |
516 | + | @Callable(cu) | |
517 | + | func buyMaterials (cy,cJ) = { | |
518 | + | let cA = br() | |
519 | + | if ((cA == cA)) | |
470 | 520 | then { | |
471 | - | let an = valueOrErrorMessage(getString(z, ak(toString( | |
472 | - | if ((size( | |
521 | + | let an = valueOrErrorMessage(getString(z, ak(toString(cu.caller))), "You don't have a duck staked") | |
522 | + | if ((size(cu.payments) != 1)) | |
473 | 523 | then throw("exactly 1 payment must be attached") | |
474 | 524 | else { | |
475 | - | let | |
476 | - | let | |
477 | - | let | |
478 | - | if (( | |
525 | + | let cK = cu.payments[0] | |
526 | + | let cL = cK.amount | |
527 | + | let cM = valueOrErrorMessage(cK.assetId, "WAVES can't be used as payment") | |
528 | + | if ((cM != g)) | |
479 | 529 | then throw("USDT payments only!") | |
480 | 530 | else { | |
481 | - | let | |
482 | - | if (( | |
483 | - | then throw(("Duck location type should be Factory, but is " + | |
531 | + | let cB = split(valueOrElse(getString(z, ao(an)), A), "_") | |
532 | + | if ((cB[aw] != "F")) | |
533 | + | then throw(("Duck location type should be Factory, but is " + cB[aw])) | |
484 | 534 | else { | |
485 | - | let | |
486 | - | let | |
487 | - | let | |
488 | - | func | |
489 | - | then throw(((("You tried to buy negative amount of " + N[ | |
490 | - | else if (( | |
535 | + | let ba = cB[ax] | |
536 | + | let cC = bp(am(an)) | |
537 | + | let cN = split(cC[aA], "_") | |
538 | + | func cO (bt,bv) = if ((0 > cy[bv])) | |
539 | + | then throw(((("You tried to buy negative amount of " + N[bv]) + ": ") + toString(cy[bv]))) | |
540 | + | else if ((cy[bv] > 0)) | |
491 | 541 | then { | |
492 | - | let | |
493 | - | $Tuple3(( | |
542 | + | let cF = bh(ba, bv, cy[bv], cJ[bv]) | |
543 | + | $Tuple3((bt._1 :+ cF._1), (bt._2 :+ toString((parseIntValue(cN[bv]) + cF._3))), (bt._3 + cF._2)) | |
494 | 544 | } | |
495 | - | else $Tuple3( | |
545 | + | else $Tuple3(bt._1, (bt._2 :+ cN[bv]), bt._3) | |
496 | 546 | ||
497 | - | let | |
498 | - | let | |
499 | - | let | |
500 | - | let | |
501 | - | func | |
502 | - | then | |
503 | - | else | |
547 | + | let cG = { | |
548 | + | let bX = [0, 1, 2, 3, 4, 5] | |
549 | + | let bY = size(bX) | |
550 | + | let bZ = $Tuple3(nil, nil, 0) | |
551 | + | func ca (cb,cc) = if ((cc >= bY)) | |
552 | + | then cb | |
553 | + | else cO(cb, bX[cc]) | |
504 | 554 | ||
505 | - | func | |
506 | - | then | |
555 | + | func cd (cb,cc) = if ((cc >= bY)) | |
556 | + | then cb | |
507 | 557 | else throw("List size exceeds 6") | |
508 | 558 | ||
509 | - | | |
559 | + | cd(ca(ca(ca(ca(ca(ca(bZ, 0), 1), 2), 3), 4), 5), 6) | |
510 | 560 | } | |
511 | - | if (( | |
512 | - | then throw(((("Insufficient payment! Attached=" + toString( | |
561 | + | if ((cG._3 > cL)) | |
562 | + | then throw(((("Insufficient payment! Attached=" + toString(cL)) + ", required=") + toString(cG._3))) | |
513 | 563 | else { | |
514 | - | let | |
515 | - | let | |
516 | - | let u = if ((( | |
517 | - | then [ScriptTransfer( | |
564 | + | let cH = makeString([cC[ay], cC[az], makeString(cG._2, "_"), cC[aB]], ":") | |
565 | + | let cI = aO(invoke(z, "updateBackpack", [an, cH], nil)) | |
566 | + | let u = if (((cL - cG._3) > 0)) | |
567 | + | then [ScriptTransfer(cu.caller, (cL - cG._3), g)] | |
518 | 568 | else nil | |
519 | - | let | |
520 | - | $Tuple2((( | |
569 | + | let cP = (cG._3 / 100) | |
570 | + | $Tuple2(((cG._1 ++ u) :+ ScriptTransfer(y, cP, g)), cI) | |
521 | 571 | } | |
522 | 572 | } | |
523 | 573 | } | |
528 | 578 | ||
529 | 579 | ||
530 | 580 | ||
531 | - | @Callable( | |
532 | - | func exchangeResources ( | |
533 | - | let | |
534 | - | if (( | |
581 | + | @Callable(cu) | |
582 | + | func exchangeResources (cy) = { | |
583 | + | let cA = br() | |
584 | + | if ((cA == cA)) | |
535 | 585 | then { | |
536 | - | let an = valueOrErrorMessage(getString(z, ak(toString( | |
537 | - | if ((size( | |
586 | + | let an = valueOrErrorMessage(getString(z, ak(toString(cu.caller))), "You don't have a duck staked") | |
587 | + | if ((size(cu.payments) != 1)) | |
538 | 588 | then throw("exactly 1 payment must be attached") | |
539 | 589 | else { | |
540 | - | let | |
541 | - | let | |
542 | - | let | |
543 | - | if (( | |
590 | + | let cK = cu.payments[0] | |
591 | + | let cL = cK.amount | |
592 | + | let cM = valueOrErrorMessage(cK.assetId, "WAVES can't be used as payment") | |
593 | + | if ((cM != g)) | |
544 | 594 | then throw("USDT payments only!") | |
545 | 595 | else { | |
546 | - | let | |
547 | - | if (( | |
548 | - | then throw(("Duck location type should be Factory, but is " + | |
596 | + | let cB = split(valueOrElse(getString(z, ao(an)), A), "_") | |
597 | + | if ((cB[aw] != "F")) | |
598 | + | then throw(("Duck location type should be Factory, but is " + cB[aw])) | |
549 | 599 | else { | |
550 | - | let | |
551 | - | let | |
552 | - | let | |
553 | - | let | |
554 | - | func | |
555 | - | let | |
556 | - | let | |
557 | - | let | |
558 | - | if (( | |
559 | - | then throw(((((("You have " + | |
560 | - | else if ((0 > | |
561 | - | then throw(((("You tried to exchange negative amount of " + M[ | |
562 | - | else if (( | |
563 | - | then $Tuple4(( | |
564 | - | else $Tuple4(( | |
600 | + | let ba = cB[ax] | |
601 | + | let cC = bp(am(an)) | |
602 | + | let cD = split(cC[az], "_") | |
603 | + | let cN = split(cC[aA], "_") | |
604 | + | func cQ (bt,bv) = { | |
605 | + | let bc = af(ba, bv) | |
606 | + | let bd = valueOrElse(getInteger(bc), 0) | |
607 | + | let cR = cy[bv] | |
608 | + | if ((cR > parseIntValue(cD[bv]))) | |
609 | + | then throw(((((("You have " + cD[bv]) + " of ") + M[bv]) + ", but tried to exchange ") + toString(cR))) | |
610 | + | else if ((0 > cR)) | |
611 | + | then throw(((("You tried to exchange negative amount of " + M[bv]) + ": ") + toString(cR))) | |
612 | + | else if ((cR > 0)) | |
613 | + | then $Tuple4((bt._1 :+ toString((parseIntValue(cD[bv]) - cR))), (bt._2 :+ toString((parseIntValue(cN[bv]) + cR))), (bt._3 + fraction(cR, D, d)), (bt._4 :+ IntegerEntry(bc, bd))) | |
614 | + | else $Tuple4((bt._1 :+ cD[bv]), (bt._2 :+ cN[bv]), bt._3, bt._4) | |
565 | 615 | } | |
566 | 616 | ||
567 | - | let | |
568 | - | let | |
569 | - | let | |
570 | - | let | |
571 | - | func | |
572 | - | then | |
573 | - | else | |
617 | + | let cG = { | |
618 | + | let bX = [0, 1, 2, 3, 4, 5] | |
619 | + | let bY = size(bX) | |
620 | + | let bZ = $Tuple4(nil, nil, 0, nil) | |
621 | + | func ca (cb,cc) = if ((cc >= bY)) | |
622 | + | then cb | |
623 | + | else cQ(cb, bX[cc]) | |
574 | 624 | ||
575 | - | func | |
576 | - | then | |
625 | + | func cd (cb,cc) = if ((cc >= bY)) | |
626 | + | then cb | |
577 | 627 | else throw("List size exceeds 6") | |
578 | 628 | ||
579 | - | | |
629 | + | cd(ca(ca(ca(ca(ca(ca(bZ, 0), 1), 2), 3), 4), 5), 6) | |
580 | 630 | } | |
581 | - | if (( | |
582 | - | then throw(((("Insufficient payment! Attached=" + toString( | |
631 | + | if ((cG._3 > cL)) | |
632 | + | then throw(((("Insufficient payment! Attached=" + toString(cL)) + ", required=") + toString(cG._3))) | |
583 | 633 | else { | |
584 | - | let | |
585 | - | let | |
586 | - | let u = if ((( | |
587 | - | then [ScriptTransfer( | |
634 | + | let cH = makeString([cC[ay], makeString(cG._1, "_"), makeString(cG._2, "_"), cC[aB]], ":") | |
635 | + | let cI = aO(invoke(z, "updateBackpack", [an, cH], nil)) | |
636 | + | let u = if (((cL - cG._3) > 0)) | |
637 | + | then [ScriptTransfer(cu.caller, (cL - cG._3), g)] | |
588 | 638 | else nil | |
589 | - | let | |
590 | - | $Tuple2(((u ++ | |
639 | + | let cP = (cG._3 / 100) | |
640 | + | $Tuple2(((u ++ cG._4) :+ ScriptTransfer(y, cP, g)), cI) | |
591 | 641 | } | |
592 | 642 | } | |
593 | 643 | } | |
598 | 648 | ||
599 | 649 | ||
600 | 650 | ||
601 | - | @Callable( | |
602 | - | func craftGoods ( | |
603 | - | let | |
604 | - | if (( | |
605 | - | then if ((size( | |
651 | + | @Callable(cu) | |
652 | + | func craftGoods (cS,cT) = { | |
653 | + | let cA = br() | |
654 | + | if ((cA == cA)) | |
655 | + | then if ((size(cu.payments) != 1)) | |
606 | 656 | then throw("exactly 1 payment must be attached") | |
607 | 657 | else { | |
608 | - | let | |
609 | - | let | |
610 | - | let | |
611 | - | if (( | |
658 | + | let cK = cu.payments[0] | |
659 | + | let cL = cK.amount | |
660 | + | let cM = valueOrErrorMessage(cK.assetId, "WAVES can't be used as payment") | |
661 | + | if ((cM != g)) | |
612 | 662 | then throw("USDT payments only!") | |
613 | - | else if (( | |
663 | + | else if ((cL != b)) | |
614 | 664 | then throw("exactly 1 USDT must be attached as payment") | |
615 | - | else if ((0 >= | |
665 | + | else if ((0 >= cT)) | |
616 | 666 | then throw("Quantity should be positive") | |
617 | 667 | else { | |
618 | - | let an = valueOrErrorMessage(getString(z, ak(toString( | |
619 | - | let | |
620 | - | if (( | |
621 | - | then throw(("Duck location type should be Manufactory, but is " + | |
668 | + | let an = valueOrErrorMessage(getString(z, ak(toString(cu.caller))), "You don't have a duck staked") | |
669 | + | let cB = split(valueOrElse(getString(z, ao(an)), A), "_") | |
670 | + | if ((cB[aw] != "M")) | |
671 | + | then throw(("Duck location type should be Manufactory, but is " + cB[aw])) | |
622 | 672 | else { | |
623 | - | let | |
624 | - | let | |
625 | - | let | |
626 | - | if (if ((0 > | |
673 | + | let cU = cB[av] | |
674 | + | let cC = bp(am(an)) | |
675 | + | let cN = split(cC[aA], "_") | |
676 | + | if (if ((0 > cS)) | |
627 | 677 | then true | |
628 | - | else ( | |
629 | - | then throw(("Unknown product idx=" + toString( | |
678 | + | else (cS >= size(Q))) | |
679 | + | then throw(("Unknown product idx=" + toString(cS))) | |
630 | 680 | else { | |
631 | - | let | |
632 | - | if ((size( | |
633 | - | then throw(("Fatal: unknown recipe: " + Q[ | |
681 | + | let cV = split(Q[cS], "_") | |
682 | + | if ((size(cV) != (B + 3))) | |
683 | + | then throw(("Fatal: unknown recipe: " + Q[cS])) | |
634 | 684 | else { | |
635 | - | let | |
636 | - | if ((P[ | |
637 | - | then throw(((("This product is available in " + P[ | |
685 | + | let cW = parseIntValue(cV[ae]) | |
686 | + | if ((P[cW] != cU)) | |
687 | + | then throw(((("This product is available in " + P[cW]) + ", but you are in ") + cU)) | |
638 | 688 | else { | |
639 | - | let | |
689 | + | let cX = if ((cC[aB] == "")) | |
640 | 690 | then nil | |
641 | - | else split( | |
642 | - | func | |
643 | - | let | |
644 | - | let | |
645 | - | then | |
691 | + | else split(cC[aB], "_") | |
692 | + | func cY (bt,cZ) = { | |
693 | + | let da = bt._2 | |
694 | + | let db = if ((size(cX) > da)) | |
695 | + | then cX[da] | |
646 | 696 | else "0" | |
647 | - | let | |
648 | - | let aV = ( | |
649 | - | let | |
650 | - | then toString(( | |
651 | - | else | |
652 | - | $Tuple2(( | |
697 | + | let dc = parseIntValue(db) | |
698 | + | let aV = (cT * parseIntValue(cV[ad])) | |
699 | + | let dd = if ((da == cS)) | |
700 | + | then toString((dc + aV)) | |
701 | + | else db | |
702 | + | $Tuple2((bt._1 :+ dd), (da + 1)) | |
653 | 703 | } | |
654 | 704 | ||
655 | - | let | |
656 | - | let | |
657 | - | let | |
658 | - | func | |
659 | - | then | |
660 | - | else | |
705 | + | let de = ( let bX = Q | |
706 | + | let bY = size(bX) | |
707 | + | let bZ = $Tuple2(nil, 0) | |
708 | + | func ca (cb,cc) = if ((cc >= bY)) | |
709 | + | then cb | |
710 | + | else cY(cb, bX[cc]) | |
661 | 711 | ||
662 | - | func | |
663 | - | then | |
712 | + | func cd (cb,cc) = if ((cc >= bY)) | |
713 | + | then cb | |
664 | 714 | else throw("List size exceeds 50") | |
665 | 715 | ||
666 | - | | |
667 | - | func | |
668 | - | let | |
669 | - | let | |
670 | - | if (( | |
671 | - | then throw(((((((("You have " + | |
672 | - | else if (( | |
673 | - | then ( | |
674 | - | else ( | |
716 | + | cd(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(bZ, 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 | |
717 | + | func df (bt,bv) = { | |
718 | + | let dg = ((parseIntValue(cV[bv]) * c) * cT) | |
719 | + | let dh = parseIntValue(cN[bv]) | |
720 | + | if ((dg > dh)) | |
721 | + | then throw(((((((("You have " + cN[bv]) + " of ") + N[bv]) + ", but recipe requires ") + toString(dg)) + " for quantity ") + toString(cT))) | |
722 | + | else if ((dg > 0)) | |
723 | + | then (bt :+ toString((dh - dg))) | |
724 | + | else (bt :+ cN[bv]) | |
675 | 725 | } | |
676 | 726 | ||
677 | - | let | |
678 | - | let | |
679 | - | let | |
680 | - | let | |
681 | - | func | |
682 | - | then | |
683 | - | else | |
727 | + | let cG = { | |
728 | + | let bX = [0, 1, 2, 3, 4, 5] | |
729 | + | let bY = size(bX) | |
730 | + | let bZ = nil | |
731 | + | func ce (cb,cc) = if ((cc >= bY)) | |
732 | + | then cb | |
733 | + | else df(cb, bX[cc]) | |
684 | 734 | ||
685 | - | func | |
686 | - | then | |
735 | + | func cf (cb,cc) = if ((cc >= bY)) | |
736 | + | then cb | |
687 | 737 | else throw("List size exceeds 6") | |
688 | 738 | ||
689 | - | | |
739 | + | cf(ce(ce(ce(ce(ce(ce(bZ, 0), 1), 2), 3), 4), 5), 6) | |
690 | 740 | } | |
691 | - | let | |
692 | - | let | |
693 | - | $Tuple2(nil, | |
741 | + | let cH = makeString([cC[ay], cC[az], makeString(cG, "_"), makeString(de, "_")], ":") | |
742 | + | let cI = aO(invoke(z, "updateBackpack", [an, cH], nil)) | |
743 | + | $Tuple2(nil, cI) | |
694 | 744 | } | |
695 | 745 | } | |
696 | 746 | } | |
702 | 752 | ||
703 | 753 | ||
704 | 754 | ||
705 | - | @Callable( | |
706 | - | func setWarehouseOrder ( | |
707 | - | let | |
708 | - | let au = toString( | |
709 | - | let | |
710 | - | then | |
755 | + | @Callable(cu) | |
756 | + | func setWarehouseOrder (di,aj) = { | |
757 | + | let dj = cu.originCaller | |
758 | + | let au = toString(dj) | |
759 | + | let cI = if ((dj != y)) | |
760 | + | then br() | |
711 | 761 | else false | |
712 | - | let | |
762 | + | let dk = value(assetInfo(fromBase58String(aj))) | |
713 | 763 | if (!(isDefined(getInteger(z, as(aj))))) | |
714 | - | then throw((("NFT " + | |
764 | + | then throw((("NFT " + dk.name) + " is not staked")) | |
715 | 765 | else { | |
716 | - | let | |
717 | - | if (if (( | |
718 | - | then ( | |
766 | + | let dl = valueOrErrorMessage(getString(z, aq(aj)), (("NFT " + dk.name) + " is orphaned")) | |
767 | + | if (if ((dj != y)) | |
768 | + | then (dl != au) | |
719 | 769 | else false) | |
720 | 770 | then throw((H + " is not yours")) | |
721 | 771 | else { | |
722 | - | let db = split_4C(cX, ":") | |
723 | - | if ((size(db) != 3)) | |
724 | - | then throw("cargoListStr should contain exactly 2 ':' separators") | |
725 | - | else { | |
726 | - | let dc = split(db[0], "_") | |
727 | - | let dd = split(db[1], "_") | |
728 | - | let de = if ((db[2] == "")) | |
729 | - | then nil | |
730 | - | else split(db[2], "_") | |
731 | - | if ((size(dc) != B)) | |
732 | - | then throw("All 6 resources should be passed") | |
733 | - | else if ((size(dd) != B)) | |
734 | - | then throw("All 6 materials should be passed") | |
735 | - | else { | |
736 | - | let df = aO(invoke(z, "getWarehouseREADONLY", [aj], nil)) | |
737 | - | let bd = split_4C(df, ":") | |
738 | - | let dg = split(bd[aD], "_") | |
739 | - | let dh = split(bd[aE], "_") | |
740 | - | let di = if ((bd[aF] == "")) | |
741 | - | then nil | |
742 | - | else split(bd[aF], "_") | |
743 | - | let dj = split(bd[aG], "_") | |
744 | - | let dk = parseIntValue(dj[aI]) | |
745 | - | let dl = parseIntValue(dj[aJ]) | |
746 | - | let aS = ai(aj) | |
747 | - | let dm = aR(aS) | |
748 | - | let dn = split(dm[aL], "_") | |
749 | - | let do = split(dm[aM], "_") | |
750 | - | let dp = if ((dm[aN] == "")) | |
751 | - | then nil | |
752 | - | else split(dm[aN], "_") | |
753 | - | let dq = 0 | |
754 | - | let dr = { | |
755 | - | let bi = dc | |
756 | - | let bj = size(bi) | |
757 | - | let bk = $Tuple8(0, nil, 0, 0, 0, dg, dn, false) | |
758 | - | func bl (bm,bn) = if ((bn >= bj)) | |
759 | - | then bm | |
760 | - | else bI(bm, bi[bn]) | |
761 | - | ||
762 | - | func bo (bm,bn) = if ((bn >= bj)) | |
763 | - | then bm | |
764 | - | else throw("List size exceeds 6") | |
765 | - | ||
766 | - | bo(bl(bl(bl(bl(bl(bl(bk, 0), 1), 2), 3), 4), 5), 6) | |
767 | - | } | |
768 | - | let bC = { | |
769 | - | let bi = dd | |
770 | - | let bj = size(bi) | |
771 | - | let bk = $Tuple8(0, nil, dr._3, dr._4, dr._5, dh, do, false) | |
772 | - | func cV (bm,bn) = if ((bn >= bj)) | |
773 | - | then bm | |
774 | - | else bI(bm, bi[bn]) | |
775 | - | ||
776 | - | func cW (bm,bn) = if ((bn >= bj)) | |
777 | - | then bm | |
778 | - | else throw("List size exceeds 6") | |
779 | - | ||
780 | - | cW(cV(cV(cV(cV(cV(cV(bk, 0), 1), 2), 3), 4), 5), 6) | |
781 | - | } | |
782 | - | let aT = if ((size(de) != 0)) | |
783 | - | then { | |
784 | - | let bi = de | |
785 | - | let bj = size(bi) | |
786 | - | let bk = $Tuple8(0, nil, bC._3, bC._4, bC._5, di, dp, true) | |
787 | - | func ds (bm,bn) = if ((bn >= bj)) | |
788 | - | then bm | |
789 | - | else bI(bm, bi[bn]) | |
790 | - | ||
791 | - | func dt (bm,bn) = if ((bn >= bj)) | |
792 | - | then bm | |
793 | - | else throw("List size exceeds 50") | |
794 | - | ||
795 | - | dt(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(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) | |
796 | - | } | |
797 | - | else $Tuple8(0, di, bC._3, bC._4, bC._5, di, dp, true) | |
798 | - | let du = aT._3 | |
799 | - | let dv = aT._4 | |
800 | - | if ((du > dl)) | |
801 | - | then throw((((("Attempt to reserve " + toString(du)) + " space for buy orders, but only ") + toString(dl)) + " warehouse empty space left")) | |
802 | - | else if ((dv > dk)) | |
803 | - | then throw((((("Attempt to lock " + toString(dv)) + " space for sell orders, but only ") + toString(dk)) + " warehouse space occupied")) | |
772 | + | let dm = split_4C(di, ":") | |
773 | + | let cv = aO(invoke(z, "getWarehouseREADONLY", [aj], nil)) | |
774 | + | let bK = split_4C(cv, ":") | |
775 | + | let dn = split(bK[aG], "_") | |
776 | + | let do = parseIntValue(dn[aI]) | |
777 | + | let dp = parseIntValue(dn[aJ]) | |
778 | + | let aS = ai(aj) | |
779 | + | let bL = aR(aS) | |
780 | + | let cw = bJ(bK, bL, dm) | |
781 | + | let dq = cw._4 | |
782 | + | let dr = cw._5 | |
783 | + | if ((dq > dp)) | |
784 | + | then throw((((("Attempt to reserve " + toString(dq)) + " space for buy orders, but only ") + toString(dp)) + " warehouse empty space left")) | |
785 | + | else if ((dr > do)) | |
786 | + | then throw((((("Attempt to lock " + toString(dr)) + " space for sell orders, but only ") + toString(do)) + " warehouse space occupied")) | |
787 | + | else { | |
788 | + | let ds = makeString_2C([bK[aC], makeString(cw._1, "_"), makeString(cw._2, "_"), makeString(cw._3, "_"), toString((dq + dr))], ":") | |
789 | + | let dt = invoke(z, "saveWarehouse", [ds, aj], nil) | |
790 | + | if ((dt == dt)) | |
791 | + | then { | |
792 | + | let du = cw._6 | |
793 | + | let dv = if ((du > 0)) | |
794 | + | then if ((size(cu.payments) != 1)) | |
795 | + | then throw("exactly 1 payment must be attached") | |
804 | 796 | else { | |
805 | - | let dw = makeString_2C([bd[aC], makeString(dr._2, "_"), makeString(bC._2, "_"), makeString(aT._2, "_"), toString((du + dv))], ":") | |
806 | - | let dx = invoke(z, "saveWarehouse", [dw, aj], nil) | |
807 | - | if ((dx == dx)) | |
808 | - | then { | |
809 | - | let dy = aT._5 | |
810 | - | let dz = if ((dy > 0)) | |
811 | - | then if ((size(cj.payments) != 1)) | |
812 | - | then throw("exactly 1 payment must be attached") | |
813 | - | else { | |
814 | - | let cx = cj.payments[0] | |
815 | - | let cy = cx.amount | |
816 | - | let cz = valueOrErrorMessage(cx.assetId, "WAVES can't be used as payment") | |
817 | - | if ((cz != g)) | |
818 | - | then throw("USDT payments only!") | |
819 | - | else if ((cy != dy)) | |
820 | - | then throw(("Payment needed is " + toString(dy))) | |
821 | - | else [StringEntry(aS, cX)] | |
822 | - | } | |
823 | - | else if ((dy == 0)) | |
824 | - | then if ((size(cj.payments) != 0)) | |
825 | - | then throw("No payments needed") | |
826 | - | else [StringEntry(aS, cX)] | |
827 | - | else if ((size(cj.payments) != 0)) | |
828 | - | then throw("No payments needed") | |
829 | - | else [ScriptTransfer(addressFromStringValue(da), -(dy), g), StringEntry(aS, cX)] | |
830 | - | $Tuple2(dz, cv) | |
831 | - | } | |
832 | - | else throw("Strict value is not equal to itself.") | |
797 | + | let cK = cu.payments[0] | |
798 | + | let cL = cK.amount | |
799 | + | let cM = valueOrErrorMessage(cK.assetId, "WAVES can't be used as payment") | |
800 | + | if ((cM != g)) | |
801 | + | then throw("USDT payments only!") | |
802 | + | else if ((cL != du)) | |
803 | + | then throw(("Payment needed is " + toString(du))) | |
804 | + | else [StringEntry(aS, di)] | |
833 | 805 | } | |
806 | + | else if ((du == 0)) | |
807 | + | then if ((size(cu.payments) != 0)) | |
808 | + | then throw("No payments needed") | |
809 | + | else [StringEntry(aS, di)] | |
810 | + | else if ((size(cu.payments) != 0)) | |
811 | + | then throw("No payments needed") | |
812 | + | else [ScriptTransfer(addressFromStringValue(dl), -(du), g), StringEntry(aS, di)] | |
813 | + | $Tuple2(dv, cI) | |
834 | 814 | } | |
835 | - | } | |
815 | + | else throw("Strict value is not equal to itself.") | |
816 | + | } | |
836 | 817 | } | |
837 | 818 | } | |
838 | 819 | } | |
839 | 820 | ||
840 | 821 | ||
841 | 822 | ||
842 | - | @Callable( | |
843 | - | func acceptWarehouseOrder ( | |
844 | - | let | |
845 | - | if (( | |
823 | + | @Callable(cu) | |
824 | + | func acceptWarehouseOrder (dw,aj,an) = { | |
825 | + | let cA = br() | |
826 | + | if ((cA == cA)) | |
846 | 827 | then { | |
847 | - | let | |
848 | - | let | |
849 | - | let | |
850 | - | let | |
851 | - | let | |
852 | - | if (( | |
853 | - | then throw((("Duck location type is " + | |
854 | - | else if (( | |
855 | - | then throw(((("Your staked duck is " + | |
828 | + | let dx = cu.originCaller | |
829 | + | let dy = toString(dx) | |
830 | + | let dz = valueOrErrorMessage(getString(z, ak(dy)), "You don't have a duck staked") | |
831 | + | let cB = valueOrElse(getString(z, ao(dz)), A) | |
832 | + | let dA = split(value(cB), "_") | |
833 | + | if ((dA[aw] != "L")) | |
834 | + | then throw((("Duck location type is " + dA[aw]) + ", but should be L")) | |
835 | + | else if ((dz != an)) | |
836 | + | then throw(((("Your staked duck is " + dz) + ", but passed ") + an)) | |
856 | 837 | else { | |
857 | - | let | |
838 | + | let dB = value(assetInfo(fromBase58String(aj))) | |
858 | 839 | if (!(isDefined(getInteger(z, as(aj))))) | |
859 | - | then throw((("NFT " + | |
840 | + | then throw((("NFT " + dB.name) + " is not staked")) | |
860 | 841 | else { | |
861 | - | let | |
862 | - | if (( | |
842 | + | let dC = valueOrErrorMessage(getString(z, aq(aj)), (("NFT " + dB.name) + " is orphaned")) | |
843 | + | if ((dC == dy)) | |
863 | 844 | then throw("You cannot trade with yourself") | |
864 | 845 | else { | |
865 | - | let | |
866 | - | if ((size( | |
846 | + | let dD = split_4C(dw, ":") | |
847 | + | if ((size(dD) != 3)) | |
867 | 848 | then throw("bpOrderStr should contain exactly 2 ':' separators") | |
868 | 849 | else { | |
869 | - | let | |
870 | - | let | |
871 | - | let | |
850 | + | let dE = split(dD[0], "_") | |
851 | + | let dF = split(dD[1], "_") | |
852 | + | let dG = if ((dD[2] == "")) | |
872 | 853 | then nil | |
873 | - | else split( | |
874 | - | if ((size( | |
854 | + | else split(dD[2], "_") | |
855 | + | if ((size(dE) != B)) | |
875 | 856 | then throw("All 6 resources should be passed") | |
876 | - | else if ((size( | |
857 | + | else if ((size(dF) != B)) | |
877 | 858 | then throw("All 6 materials should be passed") | |
878 | 859 | else { | |
879 | - | let | |
880 | - | let | |
881 | - | let | |
882 | - | let | |
883 | - | let | |
860 | + | let cv = aO(invoke(z, "getWarehouseREADONLY", [aj], nil)) | |
861 | + | let bK = split_4C(cv, ":") | |
862 | + | let bN = split(bK[aD], "_") | |
863 | + | let bO = split(bK[aE], "_") | |
864 | + | let bP = if ((bK[aF] == "")) | |
884 | 865 | then nil | |
885 | - | else split( | |
886 | - | let | |
887 | - | let | |
888 | - | let | |
889 | - | let | |
890 | - | let | |
891 | - | let | |
866 | + | else split(bK[aF], "_") | |
867 | + | let dH = parseIntValue(split(bK[aG], "_")[aH]) | |
868 | + | let bq = am(an) | |
869 | + | let cC = bp(bq) | |
870 | + | let dI = split(cC[az], "_") | |
871 | + | let dJ = split(cC[aA], "_") | |
872 | + | let dK = if ((cC[aB] == "")) | |
892 | 873 | then nil | |
893 | - | else split( | |
874 | + | else split(cC[aB], "_") | |
894 | 875 | let aS = ai(aj) | |
895 | - | let | |
896 | - | let | |
897 | - | let | |
898 | - | let | |
876 | + | let dL = aR(aS) | |
877 | + | let dM = split(dL[aL], "_") | |
878 | + | let dN = split(dL[aM], "_") | |
879 | + | let dO = if ((dL[aN] == "")) | |
899 | 880 | then nil | |
900 | - | else split(dP[aN], "_") | |
901 | - | let dq = 0 | |
902 | - | let dr = { | |
903 | - | let bi = dI | |
904 | - | let bj = size(bi) | |
905 | - | let bk = $Tuple12(nil, nil, nil, 0, 0, 0, 0, dM, dg, dQ, M, false) | |
906 | - | func bl (bm,bn) = if ((bn >= bj)) | |
907 | - | then bm | |
908 | - | else bX(bm, bi[bn]) | |
881 | + | else split(dL[aN], "_") | |
882 | + | let bW = { | |
883 | + | let bX = dE | |
884 | + | let bY = size(bX) | |
885 | + | let bZ = $Tuple12(nil, nil, nil, 0, 0, 0, 0, dI, bN, dM, M, false) | |
886 | + | func ca (cb,cc) = if ((cc >= bY)) | |
887 | + | then cb | |
888 | + | else ci(cb, bX[cc]) | |
909 | 889 | ||
910 | - | func | |
911 | - | then | |
890 | + | func cd (cb,cc) = if ((cc >= bY)) | |
891 | + | then cb | |
912 | 892 | else throw("List size exceeds 6") | |
913 | 893 | ||
914 | - | | |
894 | + | cd(ca(ca(ca(ca(ca(ca(bZ, 0), 1), 2), 3), 4), 5), 6) | |
915 | 895 | } | |
916 | - | let | |
917 | - | let | |
918 | - | let | |
919 | - | let | |
920 | - | func | |
921 | - | then | |
922 | - | else | |
896 | + | let bm = { | |
897 | + | let bX = dF | |
898 | + | let bY = size(bX) | |
899 | + | let bZ = $Tuple12(nil, nil, nil, bW._4, bW._5, bW._6, 0, dJ, bO, dN, N, false) | |
900 | + | func ce (cb,cc) = if ((cc >= bY)) | |
901 | + | then cb | |
902 | + | else ci(cb, bX[cc]) | |
923 | 903 | ||
924 | - | func | |
925 | - | then | |
904 | + | func cf (cb,cc) = if ((cc >= bY)) | |
905 | + | then cb | |
926 | 906 | else throw("List size exceeds 6") | |
927 | 907 | ||
928 | - | | |
908 | + | cf(ce(ce(ce(ce(ce(ce(bZ, 0), 1), 2), 3), 4), 5), 6) | |
929 | 909 | } | |
930 | - | let aT = if ((size( | |
910 | + | let aT = if ((size(dG) != 0)) | |
931 | 911 | then { | |
932 | - | let | |
933 | - | let | |
934 | - | let | |
935 | - | func | |
936 | - | then | |
937 | - | else | |
912 | + | let bX = dG | |
913 | + | let bY = size(bX) | |
914 | + | let bZ = $Tuple12(nil, nil, nil, bm._4, bm._5, bm._6, 0, dK, bP, dO, O, true) | |
915 | + | func cg (cb,cc) = if ((cc >= bY)) | |
916 | + | then cb | |
917 | + | else ci(cb, bX[cc]) | |
938 | 918 | ||
939 | - | func | |
940 | - | then | |
919 | + | func ch (cb,cc) = if ((cc >= bY)) | |
920 | + | then cb | |
941 | 921 | else throw("List size exceeds 50") | |
942 | 922 | ||
943 | - | | |
923 | + | ch(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(bZ, 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) | |
944 | 924 | } | |
945 | - | else $Tuple12( | |
946 | - | let | |
947 | - | let | |
925 | + | else $Tuple12(bP, dO, dK, bm._4, bm._5, bm._6, 0, dK, bP, dO, O, true) | |
926 | + | let dP = aT._4 | |
927 | + | let dQ = if ((0 > (dH - dP))) | |
948 | 928 | then 0 | |
949 | - | else ( | |
950 | - | let | |
951 | - | let | |
952 | - | let | |
953 | - | let | |
954 | - | if (( | |
929 | + | else (dH - dP) | |
930 | + | let ds = makeString_2C([bK[aC], makeString(bW._1, "_"), makeString(bm._1, "_"), makeString(aT._1, "_"), toString(dQ)], ":") | |
931 | + | let dR = makeString_2C([makeString(bW._2, "_"), makeString(bm._2, "_"), makeString(aT._2, "_")], ":") | |
932 | + | let dS = makeString_2C([cC[ay], makeString(bW._3, "_"), makeString(bm._3, "_"), makeString(aT._3, "_")], ":") | |
933 | + | let dt = invoke(z, "saveWarehouse", [ds, aj], nil) | |
934 | + | if ((dt == dt)) | |
955 | 935 | then { | |
956 | - | let | |
957 | - | if (( | |
936 | + | let dT = invoke(z, "updateBackpack", [an, dS], nil) | |
937 | + | if ((dT == dT)) | |
958 | 938 | then { | |
959 | - | let | |
960 | - | let | |
961 | - | let | |
939 | + | let dv = [StringEntry(aS, dR)] | |
940 | + | let dU = aT._5 | |
941 | + | let dV = if ((dU > 0)) | |
962 | 942 | then { | |
963 | - | let | |
964 | - | let | |
965 | - | let | |
966 | - | if (isDefined( | |
967 | - | then ((( | |
968 | - | else (( | |
943 | + | let dW = fraction(aT._5, K, b) | |
944 | + | let dX = at(dy) | |
945 | + | let dY = getString(z, dX) | |
946 | + | if (isDefined(dY)) | |
947 | + | then (((dv :+ ScriptTransfer(dx, (aT._5 - (3 * dW)), g)) :+ ScriptTransfer(y, dW, g)) :+ ScriptTransfer(addressFromStringValue(value(dY)), dW, g)) | |
948 | + | else ((dv :+ ScriptTransfer(dx, (aT._5 - (3 * dW)), g)) :+ ScriptTransfer(y, dW, g)) | |
969 | 949 | } | |
970 | - | else | |
971 | - | let | |
972 | - | if (( | |
973 | - | then if ((size( | |
950 | + | else dv | |
951 | + | let dZ = aT._6 | |
952 | + | if ((dZ > 0)) | |
953 | + | then if ((size(cu.payments) != 1)) | |
974 | 954 | then throw("exactly 1 payment must be attached") | |
975 | 955 | else { | |
976 | - | let | |
977 | - | let | |
978 | - | let | |
979 | - | if (( | |
956 | + | let cK = cu.payments[0] | |
957 | + | let cL = cK.amount | |
958 | + | let cM = valueOrErrorMessage(cK.assetId, "WAVES can't be used as payment") | |
959 | + | if ((cM != g)) | |
980 | 960 | then throw("USDT payments only!") | |
981 | - | else if (( | |
982 | - | then throw(("Payment needed is " + toString( | |
983 | - | else if ((L > | |
961 | + | else if ((cL != dZ)) | |
962 | + | then throw(("Payment needed is " + toString(dZ))) | |
963 | + | else if ((L > cL)) | |
984 | 964 | then throw(("Payment should be at least " + toString(L))) | |
985 | 965 | else { | |
986 | - | let | |
987 | - | let | |
988 | - | let | |
989 | - | if (isDefined( | |
990 | - | then ((( | |
991 | - | else (( | |
966 | + | let ea = fraction(aT._6, K, b) | |
967 | + | let dX = at(dC) | |
968 | + | let dY = getString(z, dX) | |
969 | + | if (isDefined(dY)) | |
970 | + | then (((dV :+ ScriptTransfer(addressFromStringValue(dC), (aT._6 - (3 * ea)), g)) :+ ScriptTransfer(y, ea, g)) :+ ScriptTransfer(addressFromStringValue(value(dY)), ea, g)) | |
971 | + | else ((dV :+ ScriptTransfer(addressFromStringValue(dC), (aT._6 - (3 * ea)), g)) :+ ScriptTransfer(y, ea, g)) | |
992 | 972 | } | |
993 | 973 | } | |
994 | - | else if ((size( | |
974 | + | else if ((size(cu.payments) != 0)) | |
995 | 975 | then throw("No payments needed") | |
996 | - | else | |
976 | + | else dV | |
997 | 977 | } | |
998 | 978 | else throw("Strict value is not equal to itself.") | |
999 | 979 | } |
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 | 183 | let aK = 3 | |
184 | 184 | ||
185 | 185 | let aL = 0 | |
186 | 186 | ||
187 | 187 | let aM = 1 | |
188 | 188 | ||
189 | 189 | let aN = 2 | |
190 | 190 | ||
191 | 191 | func aO (aP) = { | |
192 | 192 | let h = aP | |
193 | 193 | if ($isInstanceOf(h, "String")) | |
194 | 194 | then { | |
195 | 195 | let aQ = h | |
196 | 196 | aQ | |
197 | 197 | } | |
198 | 198 | else throw("fail to cast into String") | |
199 | 199 | } | |
200 | 200 | ||
201 | 201 | ||
202 | 202 | func aR (aS) = { | |
203 | 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 | 204 | [if ((size(split(aT[aL], "_")) == B)) | |
205 | 205 | then aT[aL] | |
206 | 206 | else "0@0_0@0_0@0_0@0_0@0_0@0", if ((size(split(aT[aM], "_")) == B)) | |
207 | 207 | then aT[aM] | |
208 | 208 | else "0@0_0@0_0@0_0@0_0@0_0@0", aT[aN]] | |
209 | 209 | } | |
210 | 210 | ||
211 | 211 | ||
212 | 212 | func aU (aV,aW,aX) = if (aX) | |
213 | 213 | then { | |
214 | 214 | let aY = if ((aV >= 0)) | |
215 | 215 | then (((aV + aW) - 1) / aW) | |
216 | 216 | else -((((-(aV) + aW) - 1) / aW)) | |
217 | 217 | (aY * d) | |
218 | 218 | } | |
219 | 219 | else aV | |
220 | 220 | ||
221 | 221 | ||
222 | - | func aZ (ba) = { | |
223 | - | let bb = split(ba, "_") | |
224 | - | ((J * (parseIntValue(bb[1]) + 1)) * parseIntValue(bb[0])) | |
222 | + | func aZ (ba,ah,aV,bb) = { | |
223 | + | let bc = af(ba, ah) | |
224 | + | let bd = valueOrElse(getInteger(bc), 0) | |
225 | + | let be = if ((bd > C)) | |
226 | + | then 0 | |
227 | + | else if (((bd + aV) > C)) | |
228 | + | then (C - bd) | |
229 | + | else aV | |
230 | + | let bf = (fraction(be, ((F * D) - fraction(((100 * bd) + (50 * be)), D, C)), e) + fraction((aV - be), D, d)) | |
231 | + | let bg = (bb - (bb / 100)) | |
232 | + | if (((bg * aV) > (bf * d))) | |
233 | + | then throw((((((((((("Actual price = " + toString(bf)) + " / ") + toString(aV)) + " < minPrice = ") + toString(bb)) + ", (") + ba) + ", ") + M[ah]) + ")")) | |
234 | + | else $Tuple2(IntegerEntry(bc, (bd + aV)), bf) | |
225 | 235 | } | |
226 | 236 | ||
227 | 237 | ||
228 | - | func bc (bd) = { | |
229 | - | let be = bd[aF] | |
230 | - | if ((be == "")) | |
231 | - | then 0 | |
232 | - | else { | |
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))) | |
237 | - | } | |
238 | - | ||
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]) | |
245 | - | ||
246 | - | func bo (bm,bn) = if ((bn >= bj)) | |
247 | - | then bm | |
248 | - | else throw("List size exceeds 50") | |
249 | - | ||
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 | |
251 | - | } | |
238 | + | func bh (ba,bi,aV,bj) = { | |
239 | + | let bc = af(ba, bi) | |
240 | + | let bd = valueOrElse(getInteger(bc), 0) | |
241 | + | let bk = if ((bd > C)) | |
242 | + | then min([aV, (bd - C)]) | |
243 | + | else 0 | |
244 | + | let bl = min([bd, (aV - bk)]) | |
245 | + | let bm = (bl + bk) | |
246 | + | let bn = (fraction(bl, ((G * D) - fraction(((100 * bd) - (50 * bl)), D, C)), e) + fraction(bk, (2 * D), d)) | |
247 | + | let bo = (bj + (bj / 100)) | |
248 | + | if (((bn * d) > (bo * bm))) | |
249 | + | then throw((((((((((("Actual price = " + toString(bn)) + " / ") + toString(bm)) + " > maxPrice = ") + toString(bj)) + ", (") + ba) + ", ") + N[bi]) + ")")) | |
250 | + | else $Tuple3(IntegerEntry(bc, (bd - bm)), bn, bm) | |
252 | 251 | } | |
253 | 252 | ||
254 | 253 | ||
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)) | |
259 | - | then 0 | |
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) | |
268 | - | } | |
269 | - | ||
270 | - | ||
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)]) | |
276 | - | else 0 | |
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) | |
284 | - | } | |
285 | - | ||
286 | - | ||
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:"), ":") | |
254 | + | func bp (bq) = { | |
255 | + | let aT = split(valueOrElse(getString(z, bq), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":") | |
289 | 256 | [toString(valueOrElse(parseInt(aT[ay]), 0)), if ((size(split(aT[az], "_")) == B)) | |
290 | 257 | then aT[az] | |
291 | 258 | else "0_0_0_0_0_0", if ((size(split(aT[aA], "_")) == B)) | |
292 | 259 | then aT[aA] | |
293 | 260 | else "0_0_0_0_0_0", aT[aB]] | |
294 | 261 | } | |
295 | 262 | ||
296 | 263 | ||
297 | - | func | |
264 | + | func br () = if (valueOrElse(getBoolean(z, ap()), false)) | |
298 | 265 | then throw("Contracts are under maintenance") | |
299 | 266 | else unit | |
300 | 267 | ||
301 | 268 | ||
302 | - | func | |
303 | - | let | |
304 | - | let | |
305 | - | let aW = if ( | |
306 | - | then parseIntValue(split(Q[ | |
269 | + | func bs (bt,bu) = { | |
270 | + | let bv = bt._1 | |
271 | + | let bw = bt._8 | |
272 | + | let aW = if (bw) | |
273 | + | then parseIntValue(split(Q[bv], "_")[ad]) | |
307 | 274 | else 0 | |
308 | - | let | |
309 | - | if ((size( | |
275 | + | let bx = split(bu, "@") | |
276 | + | if ((size(bx) != 2)) | |
310 | 277 | then throw("Incorrect order format, should be amount@price") | |
311 | 278 | else { | |
312 | - | let | |
313 | - | let | |
314 | - | let | |
315 | - | let | |
316 | - | let | |
317 | - | then parseIntValue( | |
279 | + | let by = parseIntValue(bx[0]) | |
280 | + | let bz = parseIntValue(bx[1]) | |
281 | + | let bA = fraction(by, bz, d) | |
282 | + | let bB = aU(by, aW, bw) | |
283 | + | let bC = if ((size(bt._6) > bv)) | |
284 | + | then parseIntValue(bt._6[bv]) | |
318 | 285 | else 0 | |
319 | - | let | |
320 | - | then | |
286 | + | let bD = split(if ((size(bt._7) > bv)) | |
287 | + | then bt._7[bv] | |
321 | 288 | else "0@0", "@") | |
322 | - | let | |
323 | - | let | |
324 | - | if (if ((0 > | |
289 | + | let bE = parseIntValue(bD[0]) | |
290 | + | let bF = parseIntValue(bD[1]) | |
291 | + | if (if ((0 > bF)) | |
325 | 292 | then true | |
326 | - | else (0 > | |
293 | + | else (0 > bz)) | |
327 | 294 | then throw("Price can't be negative") | |
328 | 295 | else { | |
329 | - | let | |
330 | - | let | |
331 | - | if (( | |
332 | - | then if (( | |
333 | - | then $Tuple8(( | |
334 | - | else $Tuple8(( | |
335 | - | else if (( | |
336 | - | then if ((0 > | |
337 | - | then $Tuple8(( | |
338 | - | else $Tuple8(( | |
339 | - | else if ((0 > | |
296 | + | let bG = fraction(bE, bF, d) | |
297 | + | let bH = aU(bE, aW, bw) | |
298 | + | if ((by == 0)) | |
299 | + | then if ((bE > 0)) | |
300 | + | then $Tuple8((bv + 1), (bt._2 :+ toString(bC)), bt._3, bt._4, (bt._5 - bG), bt._6, bt._7, bw) | |
301 | + | else $Tuple8((bv + 1), (bt._2 :+ toString((bC - bE))), bt._3, bt._4, bt._5, bt._6, bt._7, bw) | |
302 | + | else if ((by > 0)) | |
303 | + | then if ((0 > bE)) | |
304 | + | then $Tuple8((bv + 1), (bt._2 :+ toString((bC - bE))), (bt._3 + bB), bt._4, (bt._5 + bA), bt._6, bt._7, bw) | |
305 | + | else $Tuple8((bv + 1), (bt._2 :+ toString(bC)), (bt._3 + bB), bt._4, ((bt._5 + bA) - bG), bt._6, bt._7, bw) | |
306 | + | else if ((0 > bE)) | |
340 | 307 | then { | |
341 | - | let | |
342 | - | if ((0 > ( | |
343 | - | then throw((((("Attempt to take " + toString( | |
344 | - | else $Tuple8(( | |
308 | + | let bI = (bE - by) | |
309 | + | if ((0 > (bC - bI))) | |
310 | + | then throw((((("Attempt to take " + toString(bI)) + " from warehouse, but only ") + toString(bC)) + " available")) | |
311 | + | else $Tuple8((bv + 1), (bt._2 :+ toString((bC - bI))), bt._3, (bt._4 - bB), bt._5, bt._6, bt._7, bw) | |
345 | 312 | } | |
346 | - | else if ((0 > ( | |
347 | - | then throw((((("Attempt to take " + toString(-( | |
348 | - | else $Tuple8(( | |
313 | + | else if ((0 > (bC + by))) | |
314 | + | then throw((((("Attempt to take " + toString(-(by))) + " from warehouse, but only ") + toString(bC)) + " available")) | |
315 | + | else $Tuple8((bv + 1), (bt._2 :+ toString((bC + by))), bt._3, (bt._4 - bB), (bt._5 - bG), bt._6, bt._7, bw) | |
349 | 316 | } | |
350 | 317 | } | |
351 | 318 | } | |
352 | 319 | ||
353 | 320 | ||
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]) | |
321 | + | func bJ (bK,bL,bM) = { | |
322 | + | let bN = split(bK[aD], "_") | |
323 | + | let bO = split(bK[aE], "_") | |
324 | + | let bP = if ((bK[aF] == "")) | |
325 | + | then nil | |
326 | + | else split(bK[aF], "_") | |
327 | + | let bQ = split(bL[aL], "_") | |
328 | + | let bR = split(bL[aM], "_") | |
329 | + | let bS = if ((bL[aN] == "")) | |
330 | + | then nil | |
331 | + | else split(bL[aN], "_") | |
332 | + | if ((size(bM) != 3)) | |
333 | + | then throw("cargoListStr should contain exactly 2 ':' separators") | |
334 | + | else { | |
335 | + | let bT = split(bM[0], "_") | |
336 | + | let bU = split(bM[1], "_") | |
337 | + | let bV = if ((bM[2] == "")) | |
338 | + | then nil | |
339 | + | else split(bM[2], "_") | |
340 | + | if ((size(bT) != B)) | |
341 | + | then throw("All 6 resources should be passed") | |
342 | + | else if ((size(bU) != B)) | |
343 | + | then throw("All 6 materials should be passed") | |
344 | + | else { | |
345 | + | let bW = { | |
346 | + | let bX = bT | |
347 | + | let bY = size(bX) | |
348 | + | let bZ = $Tuple8(0, nil, 0, 0, 0, bN, bQ, false) | |
349 | + | func ca (cb,cc) = if ((cc >= bY)) | |
350 | + | then cb | |
351 | + | else bs(cb, bX[cc]) | |
352 | + | ||
353 | + | func cd (cb,cc) = if ((cc >= bY)) | |
354 | + | then cb | |
355 | + | else throw("List size exceeds 6") | |
356 | + | ||
357 | + | cd(ca(ca(ca(ca(ca(ca(bZ, 0), 1), 2), 3), 4), 5), 6) | |
358 | + | } | |
359 | + | let bm = { | |
360 | + | let bX = bU | |
361 | + | let bY = size(bX) | |
362 | + | let bZ = $Tuple8(0, nil, bW._3, bW._4, bW._5, bO, bR, false) | |
363 | + | func ce (cb,cc) = if ((cc >= bY)) | |
364 | + | then cb | |
365 | + | else bs(cb, bX[cc]) | |
366 | + | ||
367 | + | func cf (cb,cc) = if ((cc >= bY)) | |
368 | + | then cb | |
369 | + | else throw("List size exceeds 6") | |
370 | + | ||
371 | + | cf(ce(ce(ce(ce(ce(ce(bZ, 0), 1), 2), 3), 4), 5), 6) | |
372 | + | } | |
373 | + | let aT = if ((size(bV) != 0)) | |
374 | + | then { | |
375 | + | let bX = bV | |
376 | + | let bY = size(bX) | |
377 | + | let bZ = $Tuple8(0, nil, bm._3, bm._4, bm._5, bP, bS, true) | |
378 | + | func cg (cb,cc) = if ((cc >= bY)) | |
379 | + | then cb | |
380 | + | else bs(cb, bX[cc]) | |
381 | + | ||
382 | + | func ch (cb,cc) = if ((cc >= bY)) | |
383 | + | then cb | |
384 | + | else throw("List size exceeds 50") | |
385 | + | ||
386 | + | ch(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(bZ, 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) | |
387 | + | } | |
388 | + | else $Tuple8(0, bP, bm._3, bm._4, bm._5, bP, bS, true) | |
389 | + | $Tuple6(bW._2, bm._2, aT._2, aT._3, aT._4, aT._5) | |
390 | + | } | |
391 | + | } | |
392 | + | } | |
393 | + | ||
394 | + | ||
395 | + | func ci (bt,cj) = { | |
396 | + | let bv = bt._7 | |
397 | + | let bw = bt._12 | |
398 | + | let aW = if (bw) | |
399 | + | then parseIntValue(split(Q[bv], "_")[ad]) | |
359 | 400 | else 0 | |
360 | - | let | |
361 | - | if ((size( | |
401 | + | let ck = split(cj, "@") | |
402 | + | if ((size(ck) != 2)) | |
362 | 403 | then throw("Incorrect order format, should be amount@price") | |
363 | 404 | else { | |
364 | - | let | |
365 | - | let | |
366 | - | if ((0 > | |
405 | + | let cl = parseIntValue(ck[0]) | |
406 | + | let cm = parseIntValue(ck[1]) | |
407 | + | if ((0 > cm)) | |
367 | 408 | then throw("Price can't be negative") | |
368 | 409 | else { | |
369 | - | let | |
370 | - | let | |
371 | - | then parseIntValue( | |
410 | + | let cn = fraction(cl, cm, d) | |
411 | + | let co = if ((size(bt._8) > bv)) | |
412 | + | then parseIntValue(bt._8[bv]) | |
372 | 413 | else 0 | |
373 | - | let | |
374 | - | then parseIntValue( | |
414 | + | let bC = if ((size(bt._9) > bv)) | |
415 | + | then parseIntValue(bt._9[bv]) | |
375 | 416 | else 0 | |
376 | - | let | |
377 | - | let | |
378 | - | let | |
379 | - | if (if (( | |
380 | - | then ( | |
417 | + | let cp = split(bt._10[bv], "@") | |
418 | + | let cq = parseIntValue(cp[0]) | |
419 | + | let cr = parseIntValue(cp[1]) | |
420 | + | if (if ((cl != 0)) | |
421 | + | then (cm != cr) | |
381 | 422 | else false) | |
382 | - | then throw(((((("Prices of " + | |
423 | + | then throw(((((("Prices of " + bt._11[bv]) + " don't match! WH price=") + toString(cr)) + ", your price=") + toString(cm))) | |
383 | 424 | else { | |
384 | - | let | |
385 | - | let | |
386 | - | if (( | |
387 | - | then $Tuple12(( | |
388 | - | else if (( | |
389 | - | then if ((0 > | |
390 | - | then if (( | |
391 | - | then throw(((((("Attempt to buy " + toString( | |
392 | - | else $Tuple12(( | |
393 | - | else throw((("Attempt to buy " + | |
394 | - | else if (( | |
395 | - | then if ((-( | |
396 | - | then throw(((((("Attempt to sell " + toString(-( | |
397 | - | else if ((-( | |
398 | - | then throw(((((("Attempt to sell " + toString(-( | |
399 | - | else $Tuple12(( | |
400 | - | else throw((("Attempt to sell " + | |
425 | + | let cs = fraction(cq, cr, d) | |
426 | + | let ct = aU(cl, aW, bw) | |
427 | + | if ((cl == 0)) | |
428 | + | then $Tuple12((bt._1 :+ toString(bC)), (bt._2 :+ bt._10[bv]), (bt._3 :+ toString(co)), bt._4, bt._5, bt._6, (bt._7 + 1), bt._8, bt._9, bt._10, bt._11, bw) | |
429 | + | else if ((cl > 0)) | |
430 | + | then if ((0 > cq)) | |
431 | + | then if ((cl > -(cq))) | |
432 | + | then throw(((((("Attempt to buy " + toString(cl)) + " of ") + bt._11[bv]) + ", but warehouse only sells ") + toString(-(cq)))) | |
433 | + | else $Tuple12((bt._1 :+ toString(bC)), (bt._2 :+ ((toString((cq + cl)) + "@") + toString(cr))), (bt._3 :+ toString((co + cl))), (bt._4 + ct), bt._5, (bt._6 + cn), (bt._7 + 1), bt._8, bt._9, bt._10, bt._11, bw) | |
434 | + | else throw((("Attempt to buy " + bt._11[bv]) + " while warehouse doesn't sell it")) | |
435 | + | else if ((cq > 0)) | |
436 | + | then if ((-(cl) > cq)) | |
437 | + | then throw(((((("Attempt to sell " + toString(-(cl))) + " of ") + bt._11[bv]) + ", but warehouse only buys ") + toString(cq))) | |
438 | + | else if ((-(cl) > co)) | |
439 | + | then throw(((((("Attempt to sell " + toString(-(cl))) + ", but you only have ") + toString(co)) + " of ") + bt._11[bv])) | |
440 | + | else $Tuple12((bt._1 :+ toString((bC - cl))), (bt._2 :+ ((toString((cq + cl)) + "@") + toString(cr))), (bt._3 :+ toString((co + cl))), (bt._4 - ct), (bt._5 - cn), bt._6, (bt._7 + 1), bt._8, bt._9, bt._10, bt._11, bw) | |
441 | + | else throw((("Attempt to sell " + bt._11[bv]) + " while warehouse doesn't buy it")) | |
401 | 442 | } | |
402 | 443 | } | |
403 | 444 | } | |
404 | 445 | } | |
405 | 446 | ||
406 | 447 | ||
407 | - | @Callable(cj) | |
408 | - | func constructorV1 (ck) = if ((cj.caller != this)) | |
409 | - | then throw("Permission denied") | |
410 | - | else [StringEntry(s(), ck)] | |
448 | + | @Callable(cu) | |
449 | + | func recalcLockedVolumeREADONLY (aj,cv) = { | |
450 | + | let bL = aR(ai(aj)) | |
451 | + | let cw = bJ(cv, bL, bL) | |
452 | + | $Tuple2(nil, (cw._4 + cw._5)) | |
453 | + | } | |
411 | 454 | ||
412 | 455 | ||
413 | 456 | ||
414 | - | @Callable(cj) | |
415 | - | func sellResources (cl,cm) = { | |
416 | - | let cn = bH() | |
417 | - | if ((cn == cn)) | |
457 | + | @Callable(cu) | |
458 | + | func constructorV1 (cx) = if ((cu.caller != this)) | |
459 | + | then throw("Permission denied") | |
460 | + | else [StringEntry(s(), cx)] | |
461 | + | ||
462 | + | ||
463 | + | ||
464 | + | @Callable(cu) | |
465 | + | func sellResources (cy,cz) = { | |
466 | + | let cA = br() | |
467 | + | if ((cA == cA)) | |
418 | 468 | then { | |
419 | - | let an = valueOrErrorMessage(getString(z, ak(toString( | |
420 | - | if ((size( | |
469 | + | let an = valueOrErrorMessage(getString(z, ak(toString(cu.caller))), "You don't have a duck staked") | |
470 | + | if ((size(cu.payments) != 0)) | |
421 | 471 | then throw("sellResources doesn't require any payments") | |
422 | 472 | else { | |
423 | - | let | |
424 | - | if (( | |
425 | - | then throw(("Duck location type should be Factory, but is " + | |
473 | + | let cB = split(valueOrElse(getString(z, ao(an)), A), "_") | |
474 | + | if ((cB[aw] != "F")) | |
475 | + | then throw(("Duck location type should be Factory, but is " + cB[aw])) | |
426 | 476 | else { | |
427 | - | let | |
428 | - | let | |
429 | - | let | |
430 | - | func | |
431 | - | then throw(((((("You have " + | |
432 | - | else if ((0 > | |
433 | - | then throw(((("You tried to sell negative amount of " + M[ | |
434 | - | else if (( | |
477 | + | let ba = cB[ax] | |
478 | + | let cC = bp(am(an)) | |
479 | + | let cD = split(cC[az], "_") | |
480 | + | func cE (bt,bv) = if ((cy[bv] > parseIntValue(cD[bv]))) | |
481 | + | then throw(((((("You have " + cD[bv]) + " of ") + M[bv]) + ", but tried to sell ") + toString(cy[bv]))) | |
482 | + | else if ((0 > cy[bv])) | |
483 | + | then throw(((("You tried to sell negative amount of " + M[bv]) + ": ") + toString(cy[bv]))) | |
484 | + | else if ((cy[bv] > 0)) | |
435 | 485 | then { | |
436 | - | let | |
437 | - | $Tuple3(( | |
486 | + | let cF = aZ(ba, bv, cy[bv], cz[bv]) | |
487 | + | $Tuple3((bt._1 :+ cF._1), (bt._2 :+ toString((parseIntValue(cD[bv]) - cy[bv]))), (bt._3 + cF._2)) | |
438 | 488 | } | |
439 | - | else $Tuple3( | |
489 | + | else $Tuple3(bt._1, (bt._2 :+ cD[bv]), bt._3) | |
440 | 490 | ||
441 | - | let | |
442 | - | let | |
443 | - | let | |
444 | - | let | |
445 | - | func | |
446 | - | then | |
447 | - | else | |
491 | + | let cG = { | |
492 | + | let bX = [0, 1, 2, 3, 4, 5] | |
493 | + | let bY = size(bX) | |
494 | + | let bZ = $Tuple3(nil, nil, 0) | |
495 | + | func ca (cb,cc) = if ((cc >= bY)) | |
496 | + | then cb | |
497 | + | else cE(cb, bX[cc]) | |
448 | 498 | ||
449 | - | func | |
450 | - | then | |
499 | + | func cd (cb,cc) = if ((cc >= bY)) | |
500 | + | then cb | |
451 | 501 | else throw("List size exceeds 6") | |
452 | 502 | ||
453 | - | | |
503 | + | cd(ca(ca(ca(ca(ca(ca(bZ, 0), 1), 2), 3), 4), 5), 6) | |
454 | 504 | } | |
455 | - | let | |
456 | - | let | |
457 | - | $Tuple2(( | |
505 | + | let cH = makeString([cC[ay], makeString(cG._2, "_"), cC[aA], cC[aB]], ":") | |
506 | + | let cI = aO(invoke(z, "updateBackpack", [an, cH], nil)) | |
507 | + | $Tuple2((cG._1 :+ ScriptTransfer(cu.caller, cG._3, g)), cI) | |
458 | 508 | } | |
459 | 509 | } | |
460 | 510 | } | |
461 | 511 | else throw("Strict value is not equal to itself.") | |
462 | 512 | } | |
463 | 513 | ||
464 | 514 | ||
465 | 515 | ||
466 | - | @Callable( | |
467 | - | func buyMaterials ( | |
468 | - | let | |
469 | - | if (( | |
516 | + | @Callable(cu) | |
517 | + | func buyMaterials (cy,cJ) = { | |
518 | + | let cA = br() | |
519 | + | if ((cA == cA)) | |
470 | 520 | then { | |
471 | - | let an = valueOrErrorMessage(getString(z, ak(toString( | |
472 | - | if ((size( | |
521 | + | let an = valueOrErrorMessage(getString(z, ak(toString(cu.caller))), "You don't have a duck staked") | |
522 | + | if ((size(cu.payments) != 1)) | |
473 | 523 | then throw("exactly 1 payment must be attached") | |
474 | 524 | else { | |
475 | - | let | |
476 | - | let | |
477 | - | let | |
478 | - | if (( | |
525 | + | let cK = cu.payments[0] | |
526 | + | let cL = cK.amount | |
527 | + | let cM = valueOrErrorMessage(cK.assetId, "WAVES can't be used as payment") | |
528 | + | if ((cM != g)) | |
479 | 529 | then throw("USDT payments only!") | |
480 | 530 | else { | |
481 | - | let | |
482 | - | if (( | |
483 | - | then throw(("Duck location type should be Factory, but is " + | |
531 | + | let cB = split(valueOrElse(getString(z, ao(an)), A), "_") | |
532 | + | if ((cB[aw] != "F")) | |
533 | + | then throw(("Duck location type should be Factory, but is " + cB[aw])) | |
484 | 534 | else { | |
485 | - | let | |
486 | - | let | |
487 | - | let | |
488 | - | func | |
489 | - | then throw(((("You tried to buy negative amount of " + N[ | |
490 | - | else if (( | |
535 | + | let ba = cB[ax] | |
536 | + | let cC = bp(am(an)) | |
537 | + | let cN = split(cC[aA], "_") | |
538 | + | func cO (bt,bv) = if ((0 > cy[bv])) | |
539 | + | then throw(((("You tried to buy negative amount of " + N[bv]) + ": ") + toString(cy[bv]))) | |
540 | + | else if ((cy[bv] > 0)) | |
491 | 541 | then { | |
492 | - | let | |
493 | - | $Tuple3(( | |
542 | + | let cF = bh(ba, bv, cy[bv], cJ[bv]) | |
543 | + | $Tuple3((bt._1 :+ cF._1), (bt._2 :+ toString((parseIntValue(cN[bv]) + cF._3))), (bt._3 + cF._2)) | |
494 | 544 | } | |
495 | - | else $Tuple3( | |
545 | + | else $Tuple3(bt._1, (bt._2 :+ cN[bv]), bt._3) | |
496 | 546 | ||
497 | - | let | |
498 | - | let | |
499 | - | let | |
500 | - | let | |
501 | - | func | |
502 | - | then | |
503 | - | else | |
547 | + | let cG = { | |
548 | + | let bX = [0, 1, 2, 3, 4, 5] | |
549 | + | let bY = size(bX) | |
550 | + | let bZ = $Tuple3(nil, nil, 0) | |
551 | + | func ca (cb,cc) = if ((cc >= bY)) | |
552 | + | then cb | |
553 | + | else cO(cb, bX[cc]) | |
504 | 554 | ||
505 | - | func | |
506 | - | then | |
555 | + | func cd (cb,cc) = if ((cc >= bY)) | |
556 | + | then cb | |
507 | 557 | else throw("List size exceeds 6") | |
508 | 558 | ||
509 | - | | |
559 | + | cd(ca(ca(ca(ca(ca(ca(bZ, 0), 1), 2), 3), 4), 5), 6) | |
510 | 560 | } | |
511 | - | if (( | |
512 | - | then throw(((("Insufficient payment! Attached=" + toString( | |
561 | + | if ((cG._3 > cL)) | |
562 | + | then throw(((("Insufficient payment! Attached=" + toString(cL)) + ", required=") + toString(cG._3))) | |
513 | 563 | else { | |
514 | - | let | |
515 | - | let | |
516 | - | let u = if ((( | |
517 | - | then [ScriptTransfer( | |
564 | + | let cH = makeString([cC[ay], cC[az], makeString(cG._2, "_"), cC[aB]], ":") | |
565 | + | let cI = aO(invoke(z, "updateBackpack", [an, cH], nil)) | |
566 | + | let u = if (((cL - cG._3) > 0)) | |
567 | + | then [ScriptTransfer(cu.caller, (cL - cG._3), g)] | |
518 | 568 | else nil | |
519 | - | let | |
520 | - | $Tuple2((( | |
569 | + | let cP = (cG._3 / 100) | |
570 | + | $Tuple2(((cG._1 ++ u) :+ ScriptTransfer(y, cP, g)), cI) | |
521 | 571 | } | |
522 | 572 | } | |
523 | 573 | } | |
524 | 574 | } | |
525 | 575 | } | |
526 | 576 | else throw("Strict value is not equal to itself.") | |
527 | 577 | } | |
528 | 578 | ||
529 | 579 | ||
530 | 580 | ||
531 | - | @Callable( | |
532 | - | func exchangeResources ( | |
533 | - | let | |
534 | - | if (( | |
581 | + | @Callable(cu) | |
582 | + | func exchangeResources (cy) = { | |
583 | + | let cA = br() | |
584 | + | if ((cA == cA)) | |
535 | 585 | then { | |
536 | - | let an = valueOrErrorMessage(getString(z, ak(toString( | |
537 | - | if ((size( | |
586 | + | let an = valueOrErrorMessage(getString(z, ak(toString(cu.caller))), "You don't have a duck staked") | |
587 | + | if ((size(cu.payments) != 1)) | |
538 | 588 | then throw("exactly 1 payment must be attached") | |
539 | 589 | else { | |
540 | - | let | |
541 | - | let | |
542 | - | let | |
543 | - | if (( | |
590 | + | let cK = cu.payments[0] | |
591 | + | let cL = cK.amount | |
592 | + | let cM = valueOrErrorMessage(cK.assetId, "WAVES can't be used as payment") | |
593 | + | if ((cM != g)) | |
544 | 594 | then throw("USDT payments only!") | |
545 | 595 | else { | |
546 | - | let | |
547 | - | if (( | |
548 | - | then throw(("Duck location type should be Factory, but is " + | |
596 | + | let cB = split(valueOrElse(getString(z, ao(an)), A), "_") | |
597 | + | if ((cB[aw] != "F")) | |
598 | + | then throw(("Duck location type should be Factory, but is " + cB[aw])) | |
549 | 599 | else { | |
550 | - | let | |
551 | - | let | |
552 | - | let | |
553 | - | let | |
554 | - | func | |
555 | - | let | |
556 | - | let | |
557 | - | let | |
558 | - | if (( | |
559 | - | then throw(((((("You have " + | |
560 | - | else if ((0 > | |
561 | - | then throw(((("You tried to exchange negative amount of " + M[ | |
562 | - | else if (( | |
563 | - | then $Tuple4(( | |
564 | - | else $Tuple4(( | |
600 | + | let ba = cB[ax] | |
601 | + | let cC = bp(am(an)) | |
602 | + | let cD = split(cC[az], "_") | |
603 | + | let cN = split(cC[aA], "_") | |
604 | + | func cQ (bt,bv) = { | |
605 | + | let bc = af(ba, bv) | |
606 | + | let bd = valueOrElse(getInteger(bc), 0) | |
607 | + | let cR = cy[bv] | |
608 | + | if ((cR > parseIntValue(cD[bv]))) | |
609 | + | then throw(((((("You have " + cD[bv]) + " of ") + M[bv]) + ", but tried to exchange ") + toString(cR))) | |
610 | + | else if ((0 > cR)) | |
611 | + | then throw(((("You tried to exchange negative amount of " + M[bv]) + ": ") + toString(cR))) | |
612 | + | else if ((cR > 0)) | |
613 | + | then $Tuple4((bt._1 :+ toString((parseIntValue(cD[bv]) - cR))), (bt._2 :+ toString((parseIntValue(cN[bv]) + cR))), (bt._3 + fraction(cR, D, d)), (bt._4 :+ IntegerEntry(bc, bd))) | |
614 | + | else $Tuple4((bt._1 :+ cD[bv]), (bt._2 :+ cN[bv]), bt._3, bt._4) | |
565 | 615 | } | |
566 | 616 | ||
567 | - | let | |
568 | - | let | |
569 | - | let | |
570 | - | let | |
571 | - | func | |
572 | - | then | |
573 | - | else | |
617 | + | let cG = { | |
618 | + | let bX = [0, 1, 2, 3, 4, 5] | |
619 | + | let bY = size(bX) | |
620 | + | let bZ = $Tuple4(nil, nil, 0, nil) | |
621 | + | func ca (cb,cc) = if ((cc >= bY)) | |
622 | + | then cb | |
623 | + | else cQ(cb, bX[cc]) | |
574 | 624 | ||
575 | - | func | |
576 | - | then | |
625 | + | func cd (cb,cc) = if ((cc >= bY)) | |
626 | + | then cb | |
577 | 627 | else throw("List size exceeds 6") | |
578 | 628 | ||
579 | - | | |
629 | + | cd(ca(ca(ca(ca(ca(ca(bZ, 0), 1), 2), 3), 4), 5), 6) | |
580 | 630 | } | |
581 | - | if (( | |
582 | - | then throw(((("Insufficient payment! Attached=" + toString( | |
631 | + | if ((cG._3 > cL)) | |
632 | + | then throw(((("Insufficient payment! Attached=" + toString(cL)) + ", required=") + toString(cG._3))) | |
583 | 633 | else { | |
584 | - | let | |
585 | - | let | |
586 | - | let u = if ((( | |
587 | - | then [ScriptTransfer( | |
634 | + | let cH = makeString([cC[ay], makeString(cG._1, "_"), makeString(cG._2, "_"), cC[aB]], ":") | |
635 | + | let cI = aO(invoke(z, "updateBackpack", [an, cH], nil)) | |
636 | + | let u = if (((cL - cG._3) > 0)) | |
637 | + | then [ScriptTransfer(cu.caller, (cL - cG._3), g)] | |
588 | 638 | else nil | |
589 | - | let | |
590 | - | $Tuple2(((u ++ | |
639 | + | let cP = (cG._3 / 100) | |
640 | + | $Tuple2(((u ++ cG._4) :+ ScriptTransfer(y, cP, g)), cI) | |
591 | 641 | } | |
592 | 642 | } | |
593 | 643 | } | |
594 | 644 | } | |
595 | 645 | } | |
596 | 646 | else throw("Strict value is not equal to itself.") | |
597 | 647 | } | |
598 | 648 | ||
599 | 649 | ||
600 | 650 | ||
601 | - | @Callable( | |
602 | - | func craftGoods ( | |
603 | - | let | |
604 | - | if (( | |
605 | - | then if ((size( | |
651 | + | @Callable(cu) | |
652 | + | func craftGoods (cS,cT) = { | |
653 | + | let cA = br() | |
654 | + | if ((cA == cA)) | |
655 | + | then if ((size(cu.payments) != 1)) | |
606 | 656 | then throw("exactly 1 payment must be attached") | |
607 | 657 | else { | |
608 | - | let | |
609 | - | let | |
610 | - | let | |
611 | - | if (( | |
658 | + | let cK = cu.payments[0] | |
659 | + | let cL = cK.amount | |
660 | + | let cM = valueOrErrorMessage(cK.assetId, "WAVES can't be used as payment") | |
661 | + | if ((cM != g)) | |
612 | 662 | then throw("USDT payments only!") | |
613 | - | else if (( | |
663 | + | else if ((cL != b)) | |
614 | 664 | then throw("exactly 1 USDT must be attached as payment") | |
615 | - | else if ((0 >= | |
665 | + | else if ((0 >= cT)) | |
616 | 666 | then throw("Quantity should be positive") | |
617 | 667 | else { | |
618 | - | let an = valueOrErrorMessage(getString(z, ak(toString( | |
619 | - | let | |
620 | - | if (( | |
621 | - | then throw(("Duck location type should be Manufactory, but is " + | |
668 | + | let an = valueOrErrorMessage(getString(z, ak(toString(cu.caller))), "You don't have a duck staked") | |
669 | + | let cB = split(valueOrElse(getString(z, ao(an)), A), "_") | |
670 | + | if ((cB[aw] != "M")) | |
671 | + | then throw(("Duck location type should be Manufactory, but is " + cB[aw])) | |
622 | 672 | else { | |
623 | - | let | |
624 | - | let | |
625 | - | let | |
626 | - | if (if ((0 > | |
673 | + | let cU = cB[av] | |
674 | + | let cC = bp(am(an)) | |
675 | + | let cN = split(cC[aA], "_") | |
676 | + | if (if ((0 > cS)) | |
627 | 677 | then true | |
628 | - | else ( | |
629 | - | then throw(("Unknown product idx=" + toString( | |
678 | + | else (cS >= size(Q))) | |
679 | + | then throw(("Unknown product idx=" + toString(cS))) | |
630 | 680 | else { | |
631 | - | let | |
632 | - | if ((size( | |
633 | - | then throw(("Fatal: unknown recipe: " + Q[ | |
681 | + | let cV = split(Q[cS], "_") | |
682 | + | if ((size(cV) != (B + 3))) | |
683 | + | then throw(("Fatal: unknown recipe: " + Q[cS])) | |
634 | 684 | else { | |
635 | - | let | |
636 | - | if ((P[ | |
637 | - | then throw(((("This product is available in " + P[ | |
685 | + | let cW = parseIntValue(cV[ae]) | |
686 | + | if ((P[cW] != cU)) | |
687 | + | then throw(((("This product is available in " + P[cW]) + ", but you are in ") + cU)) | |
638 | 688 | else { | |
639 | - | let | |
689 | + | let cX = if ((cC[aB] == "")) | |
640 | 690 | then nil | |
641 | - | else split( | |
642 | - | func | |
643 | - | let | |
644 | - | let | |
645 | - | then | |
691 | + | else split(cC[aB], "_") | |
692 | + | func cY (bt,cZ) = { | |
693 | + | let da = bt._2 | |
694 | + | let db = if ((size(cX) > da)) | |
695 | + | then cX[da] | |
646 | 696 | else "0" | |
647 | - | let | |
648 | - | let aV = ( | |
649 | - | let | |
650 | - | then toString(( | |
651 | - | else | |
652 | - | $Tuple2(( | |
697 | + | let dc = parseIntValue(db) | |
698 | + | let aV = (cT * parseIntValue(cV[ad])) | |
699 | + | let dd = if ((da == cS)) | |
700 | + | then toString((dc + aV)) | |
701 | + | else db | |
702 | + | $Tuple2((bt._1 :+ dd), (da + 1)) | |
653 | 703 | } | |
654 | 704 | ||
655 | - | let | |
656 | - | let | |
657 | - | let | |
658 | - | func | |
659 | - | then | |
660 | - | else | |
705 | + | let de = ( let bX = Q | |
706 | + | let bY = size(bX) | |
707 | + | let bZ = $Tuple2(nil, 0) | |
708 | + | func ca (cb,cc) = if ((cc >= bY)) | |
709 | + | then cb | |
710 | + | else cY(cb, bX[cc]) | |
661 | 711 | ||
662 | - | func | |
663 | - | then | |
712 | + | func cd (cb,cc) = if ((cc >= bY)) | |
713 | + | then cb | |
664 | 714 | else throw("List size exceeds 50") | |
665 | 715 | ||
666 | - | | |
667 | - | func | |
668 | - | let | |
669 | - | let | |
670 | - | if (( | |
671 | - | then throw(((((((("You have " + | |
672 | - | else if (( | |
673 | - | then ( | |
674 | - | else ( | |
716 | + | cd(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(ca(bZ, 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 | |
717 | + | func df (bt,bv) = { | |
718 | + | let dg = ((parseIntValue(cV[bv]) * c) * cT) | |
719 | + | let dh = parseIntValue(cN[bv]) | |
720 | + | if ((dg > dh)) | |
721 | + | then throw(((((((("You have " + cN[bv]) + " of ") + N[bv]) + ", but recipe requires ") + toString(dg)) + " for quantity ") + toString(cT))) | |
722 | + | else if ((dg > 0)) | |
723 | + | then (bt :+ toString((dh - dg))) | |
724 | + | else (bt :+ cN[bv]) | |
675 | 725 | } | |
676 | 726 | ||
677 | - | let | |
678 | - | let | |
679 | - | let | |
680 | - | let | |
681 | - | func | |
682 | - | then | |
683 | - | else | |
727 | + | let cG = { | |
728 | + | let bX = [0, 1, 2, 3, 4, 5] | |
729 | + | let bY = size(bX) | |
730 | + | let bZ = nil | |
731 | + | func ce (cb,cc) = if ((cc >= bY)) | |
732 | + | then cb | |
733 | + | else df(cb, bX[cc]) | |
684 | 734 | ||
685 | - | func | |
686 | - | then | |
735 | + | func cf (cb,cc) = if ((cc >= bY)) | |
736 | + | then cb | |
687 | 737 | else throw("List size exceeds 6") | |
688 | 738 | ||
689 | - | | |
739 | + | cf(ce(ce(ce(ce(ce(ce(bZ, 0), 1), 2), 3), 4), 5), 6) | |
690 | 740 | } | |
691 | - | let | |
692 | - | let | |
693 | - | $Tuple2(nil, | |
741 | + | let cH = makeString([cC[ay], cC[az], makeString(cG, "_"), makeString(de, "_")], ":") | |
742 | + | let cI = aO(invoke(z, "updateBackpack", [an, cH], nil)) | |
743 | + | $Tuple2(nil, cI) | |
694 | 744 | } | |
695 | 745 | } | |
696 | 746 | } | |
697 | 747 | } | |
698 | 748 | } | |
699 | 749 | } | |
700 | 750 | else throw("Strict value is not equal to itself.") | |
701 | 751 | } | |
702 | 752 | ||
703 | 753 | ||
704 | 754 | ||
705 | - | @Callable( | |
706 | - | func setWarehouseOrder ( | |
707 | - | let | |
708 | - | let au = toString( | |
709 | - | let | |
710 | - | then | |
755 | + | @Callable(cu) | |
756 | + | func setWarehouseOrder (di,aj) = { | |
757 | + | let dj = cu.originCaller | |
758 | + | let au = toString(dj) | |
759 | + | let cI = if ((dj != y)) | |
760 | + | then br() | |
711 | 761 | else false | |
712 | - | let | |
762 | + | let dk = value(assetInfo(fromBase58String(aj))) | |
713 | 763 | if (!(isDefined(getInteger(z, as(aj))))) | |
714 | - | then throw((("NFT " + | |
764 | + | then throw((("NFT " + dk.name) + " is not staked")) | |
715 | 765 | else { | |
716 | - | let | |
717 | - | if (if (( | |
718 | - | then ( | |
766 | + | let dl = valueOrErrorMessage(getString(z, aq(aj)), (("NFT " + dk.name) + " is orphaned")) | |
767 | + | if (if ((dj != y)) | |
768 | + | then (dl != au) | |
719 | 769 | else false) | |
720 | 770 | then throw((H + " is not yours")) | |
721 | 771 | else { | |
722 | - | let db = split_4C(cX, ":") | |
723 | - | if ((size(db) != 3)) | |
724 | - | then throw("cargoListStr should contain exactly 2 ':' separators") | |
725 | - | else { | |
726 | - | let dc = split(db[0], "_") | |
727 | - | let dd = split(db[1], "_") | |
728 | - | let de = if ((db[2] == "")) | |
729 | - | then nil | |
730 | - | else split(db[2], "_") | |
731 | - | if ((size(dc) != B)) | |
732 | - | then throw("All 6 resources should be passed") | |
733 | - | else if ((size(dd) != B)) | |
734 | - | then throw("All 6 materials should be passed") | |
735 | - | else { | |
736 | - | let df = aO(invoke(z, "getWarehouseREADONLY", [aj], nil)) | |
737 | - | let bd = split_4C(df, ":") | |
738 | - | let dg = split(bd[aD], "_") | |
739 | - | let dh = split(bd[aE], "_") | |
740 | - | let di = if ((bd[aF] == "")) | |
741 | - | then nil | |
742 | - | else split(bd[aF], "_") | |
743 | - | let dj = split(bd[aG], "_") | |
744 | - | let dk = parseIntValue(dj[aI]) | |
745 | - | let dl = parseIntValue(dj[aJ]) | |
746 | - | let aS = ai(aj) | |
747 | - | let dm = aR(aS) | |
748 | - | let dn = split(dm[aL], "_") | |
749 | - | let do = split(dm[aM], "_") | |
750 | - | let dp = if ((dm[aN] == "")) | |
751 | - | then nil | |
752 | - | else split(dm[aN], "_") | |
753 | - | let dq = 0 | |
754 | - | let dr = { | |
755 | - | let bi = dc | |
756 | - | let bj = size(bi) | |
757 | - | let bk = $Tuple8(0, nil, 0, 0, 0, dg, dn, false) | |
758 | - | func bl (bm,bn) = if ((bn >= bj)) | |
759 | - | then bm | |
760 | - | else bI(bm, bi[bn]) | |
761 | - | ||
762 | - | func bo (bm,bn) = if ((bn >= bj)) | |
763 | - | then bm | |
764 | - | else throw("List size exceeds 6") | |
765 | - | ||
766 | - | bo(bl(bl(bl(bl(bl(bl(bk, 0), 1), 2), 3), 4), 5), 6) | |
767 | - | } | |
768 | - | let bC = { | |
769 | - | let bi = dd | |
770 | - | let bj = size(bi) | |
771 | - | let bk = $Tuple8(0, nil, dr._3, dr._4, dr._5, dh, do, false) | |
772 | - | func cV (bm,bn) = if ((bn >= bj)) | |
773 | - | then bm | |
774 | - | else bI(bm, bi[bn]) | |
775 | - | ||
776 | - | func cW (bm,bn) = if ((bn >= bj)) | |
777 | - | then bm | |
778 | - | else throw("List size exceeds 6") | |
779 | - | ||
780 | - | cW(cV(cV(cV(cV(cV(cV(bk, 0), 1), 2), 3), 4), 5), 6) | |
781 | - | } | |
782 | - | let aT = if ((size(de) != 0)) | |
783 | - | then { | |
784 | - | let bi = de | |
785 | - | let bj = size(bi) | |
786 | - | let bk = $Tuple8(0, nil, bC._3, bC._4, bC._5, di, dp, true) | |
787 | - | func ds (bm,bn) = if ((bn >= bj)) | |
788 | - | then bm | |
789 | - | else bI(bm, bi[bn]) | |
790 | - | ||
791 | - | func dt (bm,bn) = if ((bn >= bj)) | |
792 | - | then bm | |
793 | - | else throw("List size exceeds 50") | |
794 | - | ||
795 | - | dt(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(ds(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) | |
796 | - | } | |
797 | - | else $Tuple8(0, di, bC._3, bC._4, bC._5, di, dp, true) | |
798 | - | let du = aT._3 | |
799 | - | let dv = aT._4 | |
800 | - | if ((du > dl)) | |
801 | - | then throw((((("Attempt to reserve " + toString(du)) + " space for buy orders, but only ") + toString(dl)) + " warehouse empty space left")) | |
802 | - | else if ((dv > dk)) | |
803 | - | then throw((((("Attempt to lock " + toString(dv)) + " space for sell orders, but only ") + toString(dk)) + " warehouse space occupied")) | |
772 | + | let dm = split_4C(di, ":") | |
773 | + | let cv = aO(invoke(z, "getWarehouseREADONLY", [aj], nil)) | |
774 | + | let bK = split_4C(cv, ":") | |
775 | + | let dn = split(bK[aG], "_") | |
776 | + | let do = parseIntValue(dn[aI]) | |
777 | + | let dp = parseIntValue(dn[aJ]) | |
778 | + | let aS = ai(aj) | |
779 | + | let bL = aR(aS) | |
780 | + | let cw = bJ(bK, bL, dm) | |
781 | + | let dq = cw._4 | |
782 | + | let dr = cw._5 | |
783 | + | if ((dq > dp)) | |
784 | + | then throw((((("Attempt to reserve " + toString(dq)) + " space for buy orders, but only ") + toString(dp)) + " warehouse empty space left")) | |
785 | + | else if ((dr > do)) | |
786 | + | then throw((((("Attempt to lock " + toString(dr)) + " space for sell orders, but only ") + toString(do)) + " warehouse space occupied")) | |
787 | + | else { | |
788 | + | let ds = makeString_2C([bK[aC], makeString(cw._1, "_"), makeString(cw._2, "_"), makeString(cw._3, "_"), toString((dq + dr))], ":") | |
789 | + | let dt = invoke(z, "saveWarehouse", [ds, aj], nil) | |
790 | + | if ((dt == dt)) | |
791 | + | then { | |
792 | + | let du = cw._6 | |
793 | + | let dv = if ((du > 0)) | |
794 | + | then if ((size(cu.payments) != 1)) | |
795 | + | then throw("exactly 1 payment must be attached") | |
804 | 796 | else { | |
805 | - | let dw = makeString_2C([bd[aC], makeString(dr._2, "_"), makeString(bC._2, "_"), makeString(aT._2, "_"), toString((du + dv))], ":") | |
806 | - | let dx = invoke(z, "saveWarehouse", [dw, aj], nil) | |
807 | - | if ((dx == dx)) | |
808 | - | then { | |
809 | - | let dy = aT._5 | |
810 | - | let dz = if ((dy > 0)) | |
811 | - | then if ((size(cj.payments) != 1)) | |
812 | - | then throw("exactly 1 payment must be attached") | |
813 | - | else { | |
814 | - | let cx = cj.payments[0] | |
815 | - | let cy = cx.amount | |
816 | - | let cz = valueOrErrorMessage(cx.assetId, "WAVES can't be used as payment") | |
817 | - | if ((cz != g)) | |
818 | - | then throw("USDT payments only!") | |
819 | - | else if ((cy != dy)) | |
820 | - | then throw(("Payment needed is " + toString(dy))) | |
821 | - | else [StringEntry(aS, cX)] | |
822 | - | } | |
823 | - | else if ((dy == 0)) | |
824 | - | then if ((size(cj.payments) != 0)) | |
825 | - | then throw("No payments needed") | |
826 | - | else [StringEntry(aS, cX)] | |
827 | - | else if ((size(cj.payments) != 0)) | |
828 | - | then throw("No payments needed") | |
829 | - | else [ScriptTransfer(addressFromStringValue(da), -(dy), g), StringEntry(aS, cX)] | |
830 | - | $Tuple2(dz, cv) | |
831 | - | } | |
832 | - | else throw("Strict value is not equal to itself.") | |
797 | + | let cK = cu.payments[0] | |
798 | + | let cL = cK.amount | |
799 | + | let cM = valueOrErrorMessage(cK.assetId, "WAVES can't be used as payment") | |
800 | + | if ((cM != g)) | |
801 | + | then throw("USDT payments only!") | |
802 | + | else if ((cL != du)) | |
803 | + | then throw(("Payment needed is " + toString(du))) | |
804 | + | else [StringEntry(aS, di)] | |
833 | 805 | } | |
806 | + | else if ((du == 0)) | |
807 | + | then if ((size(cu.payments) != 0)) | |
808 | + | then throw("No payments needed") | |
809 | + | else [StringEntry(aS, di)] | |
810 | + | else if ((size(cu.payments) != 0)) | |
811 | + | then throw("No payments needed") | |
812 | + | else [ScriptTransfer(addressFromStringValue(dl), -(du), g), StringEntry(aS, di)] | |
813 | + | $Tuple2(dv, cI) | |
834 | 814 | } | |
835 | - | } | |
815 | + | else throw("Strict value is not equal to itself.") | |
816 | + | } | |
836 | 817 | } | |
837 | 818 | } | |
838 | 819 | } | |
839 | 820 | ||
840 | 821 | ||
841 | 822 | ||
842 | - | @Callable( | |
843 | - | func acceptWarehouseOrder ( | |
844 | - | let | |
845 | - | if (( | |
823 | + | @Callable(cu) | |
824 | + | func acceptWarehouseOrder (dw,aj,an) = { | |
825 | + | let cA = br() | |
826 | + | if ((cA == cA)) | |
846 | 827 | then { | |
847 | - | let | |
848 | - | let | |
849 | - | let | |
850 | - | let | |
851 | - | let | |
852 | - | if (( | |
853 | - | then throw((("Duck location type is " + | |
854 | - | else if (( | |
855 | - | then throw(((("Your staked duck is " + | |
828 | + | let dx = cu.originCaller | |
829 | + | let dy = toString(dx) | |
830 | + | let dz = valueOrErrorMessage(getString(z, ak(dy)), "You don't have a duck staked") | |
831 | + | let cB = valueOrElse(getString(z, ao(dz)), A) | |
832 | + | let dA = split(value(cB), "_") | |
833 | + | if ((dA[aw] != "L")) | |
834 | + | then throw((("Duck location type is " + dA[aw]) + ", but should be L")) | |
835 | + | else if ((dz != an)) | |
836 | + | then throw(((("Your staked duck is " + dz) + ", but passed ") + an)) | |
856 | 837 | else { | |
857 | - | let | |
838 | + | let dB = value(assetInfo(fromBase58String(aj))) | |
858 | 839 | if (!(isDefined(getInteger(z, as(aj))))) | |
859 | - | then throw((("NFT " + | |
840 | + | then throw((("NFT " + dB.name) + " is not staked")) | |
860 | 841 | else { | |
861 | - | let | |
862 | - | if (( | |
842 | + | let dC = valueOrErrorMessage(getString(z, aq(aj)), (("NFT " + dB.name) + " is orphaned")) | |
843 | + | if ((dC == dy)) | |
863 | 844 | then throw("You cannot trade with yourself") | |
864 | 845 | else { | |
865 | - | let | |
866 | - | if ((size( | |
846 | + | let dD = split_4C(dw, ":") | |
847 | + | if ((size(dD) != 3)) | |
867 | 848 | then throw("bpOrderStr should contain exactly 2 ':' separators") | |
868 | 849 | else { | |
869 | - | let | |
870 | - | let | |
871 | - | let | |
850 | + | let dE = split(dD[0], "_") | |
851 | + | let dF = split(dD[1], "_") | |
852 | + | let dG = if ((dD[2] == "")) | |
872 | 853 | then nil | |
873 | - | else split( | |
874 | - | if ((size( | |
854 | + | else split(dD[2], "_") | |
855 | + | if ((size(dE) != B)) | |
875 | 856 | then throw("All 6 resources should be passed") | |
876 | - | else if ((size( | |
857 | + | else if ((size(dF) != B)) | |
877 | 858 | then throw("All 6 materials should be passed") | |
878 | 859 | else { | |
879 | - | let | |
880 | - | let | |
881 | - | let | |
882 | - | let | |
883 | - | let | |
860 | + | let cv = aO(invoke(z, "getWarehouseREADONLY", [aj], nil)) | |
861 | + | let bK = split_4C(cv, ":") | |
862 | + | let bN = split(bK[aD], "_") | |
863 | + | let bO = split(bK[aE], "_") | |
864 | + | let bP = if ((bK[aF] == "")) | |
884 | 865 | then nil | |
885 | - | else split( | |
886 | - | let | |
887 | - | let | |
888 | - | let | |
889 | - | let | |
890 | - | let | |
891 | - | let | |
866 | + | else split(bK[aF], "_") | |
867 | + | let dH = parseIntValue(split(bK[aG], "_")[aH]) | |
868 | + | let bq = am(an) | |
869 | + | let cC = bp(bq) | |
870 | + | let dI = split(cC[az], "_") | |
871 | + | let dJ = split(cC[aA], "_") | |
872 | + | let dK = if ((cC[aB] == "")) | |
892 | 873 | then nil | |
893 | - | else split( | |
874 | + | else split(cC[aB], "_") | |
894 | 875 | let aS = ai(aj) | |
895 | - | let | |
896 | - | let | |
897 | - | let | |
898 | - | let | |
876 | + | let dL = aR(aS) | |
877 | + | let dM = split(dL[aL], "_") | |
878 | + | let dN = split(dL[aM], "_") | |
879 | + | let dO = if ((dL[aN] == "")) | |
899 | 880 | then nil | |
900 | - | else split(dP[aN], "_") | |
901 | - | let dq = 0 | |
902 | - | let dr = { | |
903 | - | let bi = dI | |
904 | - | let bj = size(bi) | |
905 | - | let bk = $Tuple12(nil, nil, nil, 0, 0, 0, 0, dM, dg, dQ, M, false) | |
906 | - | func bl (bm,bn) = if ((bn >= bj)) | |
907 | - | then bm | |
908 | - | else bX(bm, bi[bn]) | |
881 | + | else split(dL[aN], "_") | |
882 | + | let bW = { | |
883 | + | let bX = dE | |
884 | + | let bY = size(bX) | |
885 | + | let bZ = $Tuple12(nil, nil, nil, 0, 0, 0, 0, dI, bN, dM, M, false) | |
886 | + | func ca (cb,cc) = if ((cc >= bY)) | |
887 | + | then cb | |
888 | + | else ci(cb, bX[cc]) | |
909 | 889 | ||
910 | - | func | |
911 | - | then | |
890 | + | func cd (cb,cc) = if ((cc >= bY)) | |
891 | + | then cb | |
912 | 892 | else throw("List size exceeds 6") | |
913 | 893 | ||
914 | - | | |
894 | + | cd(ca(ca(ca(ca(ca(ca(bZ, 0), 1), 2), 3), 4), 5), 6) | |
915 | 895 | } | |
916 | - | let | |
917 | - | let | |
918 | - | let | |
919 | - | let | |
920 | - | func | |
921 | - | then | |
922 | - | else | |
896 | + | let bm = { | |
897 | + | let bX = dF | |
898 | + | let bY = size(bX) | |
899 | + | let bZ = $Tuple12(nil, nil, nil, bW._4, bW._5, bW._6, 0, dJ, bO, dN, N, false) | |
900 | + | func ce (cb,cc) = if ((cc >= bY)) | |
901 | + | then cb | |
902 | + | else ci(cb, bX[cc]) | |
923 | 903 | ||
924 | - | func | |
925 | - | then | |
904 | + | func cf (cb,cc) = if ((cc >= bY)) | |
905 | + | then cb | |
926 | 906 | else throw("List size exceeds 6") | |
927 | 907 | ||
928 | - | | |
908 | + | cf(ce(ce(ce(ce(ce(ce(bZ, 0), 1), 2), 3), 4), 5), 6) | |
929 | 909 | } | |
930 | - | let aT = if ((size( | |
910 | + | let aT = if ((size(dG) != 0)) | |
931 | 911 | then { | |
932 | - | let | |
933 | - | let | |
934 | - | let | |
935 | - | func | |
936 | - | then | |
937 | - | else | |
912 | + | let bX = dG | |
913 | + | let bY = size(bX) | |
914 | + | let bZ = $Tuple12(nil, nil, nil, bm._4, bm._5, bm._6, 0, dK, bP, dO, O, true) | |
915 | + | func cg (cb,cc) = if ((cc >= bY)) | |
916 | + | then cb | |
917 | + | else ci(cb, bX[cc]) | |
938 | 918 | ||
939 | - | func | |
940 | - | then | |
919 | + | func ch (cb,cc) = if ((cc >= bY)) | |
920 | + | then cb | |
941 | 921 | else throw("List size exceeds 50") | |
942 | 922 | ||
943 | - | | |
923 | + | ch(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(cg(bZ, 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) | |
944 | 924 | } | |
945 | - | else $Tuple12( | |
946 | - | let | |
947 | - | let | |
925 | + | else $Tuple12(bP, dO, dK, bm._4, bm._5, bm._6, 0, dK, bP, dO, O, true) | |
926 | + | let dP = aT._4 | |
927 | + | let dQ = if ((0 > (dH - dP))) | |
948 | 928 | then 0 | |
949 | - | else ( | |
950 | - | let | |
951 | - | let | |
952 | - | let | |
953 | - | let | |
954 | - | if (( | |
929 | + | else (dH - dP) | |
930 | + | let ds = makeString_2C([bK[aC], makeString(bW._1, "_"), makeString(bm._1, "_"), makeString(aT._1, "_"), toString(dQ)], ":") | |
931 | + | let dR = makeString_2C([makeString(bW._2, "_"), makeString(bm._2, "_"), makeString(aT._2, "_")], ":") | |
932 | + | let dS = makeString_2C([cC[ay], makeString(bW._3, "_"), makeString(bm._3, "_"), makeString(aT._3, "_")], ":") | |
933 | + | let dt = invoke(z, "saveWarehouse", [ds, aj], nil) | |
934 | + | if ((dt == dt)) | |
955 | 935 | then { | |
956 | - | let | |
957 | - | if (( | |
936 | + | let dT = invoke(z, "updateBackpack", [an, dS], nil) | |
937 | + | if ((dT == dT)) | |
958 | 938 | then { | |
959 | - | let | |
960 | - | let | |
961 | - | let | |
939 | + | let dv = [StringEntry(aS, dR)] | |
940 | + | let dU = aT._5 | |
941 | + | let dV = if ((dU > 0)) | |
962 | 942 | then { | |
963 | - | let | |
964 | - | let | |
965 | - | let | |
966 | - | if (isDefined( | |
967 | - | then ((( | |
968 | - | else (( | |
943 | + | let dW = fraction(aT._5, K, b) | |
944 | + | let dX = at(dy) | |
945 | + | let dY = getString(z, dX) | |
946 | + | if (isDefined(dY)) | |
947 | + | then (((dv :+ ScriptTransfer(dx, (aT._5 - (3 * dW)), g)) :+ ScriptTransfer(y, dW, g)) :+ ScriptTransfer(addressFromStringValue(value(dY)), dW, g)) | |
948 | + | else ((dv :+ ScriptTransfer(dx, (aT._5 - (3 * dW)), g)) :+ ScriptTransfer(y, dW, g)) | |
969 | 949 | } | |
970 | - | else | |
971 | - | let | |
972 | - | if (( | |
973 | - | then if ((size( | |
950 | + | else dv | |
951 | + | let dZ = aT._6 | |
952 | + | if ((dZ > 0)) | |
953 | + | then if ((size(cu.payments) != 1)) | |
974 | 954 | then throw("exactly 1 payment must be attached") | |
975 | 955 | else { | |
976 | - | let | |
977 | - | let | |
978 | - | let | |
979 | - | if (( | |
956 | + | let cK = cu.payments[0] | |
957 | + | let cL = cK.amount | |
958 | + | let cM = valueOrErrorMessage(cK.assetId, "WAVES can't be used as payment") | |
959 | + | if ((cM != g)) | |
980 | 960 | then throw("USDT payments only!") | |
981 | - | else if (( | |
982 | - | then throw(("Payment needed is " + toString( | |
983 | - | else if ((L > | |
961 | + | else if ((cL != dZ)) | |
962 | + | then throw(("Payment needed is " + toString(dZ))) | |
963 | + | else if ((L > cL)) | |
984 | 964 | then throw(("Payment should be at least " + toString(L))) | |
985 | 965 | else { | |
986 | - | let | |
987 | - | let | |
988 | - | let | |
989 | - | if (isDefined( | |
990 | - | then ((( | |
991 | - | else (( | |
966 | + | let ea = fraction(aT._6, K, b) | |
967 | + | let dX = at(dC) | |
968 | + | let dY = getString(z, dX) | |
969 | + | if (isDefined(dY)) | |
970 | + | then (((dV :+ ScriptTransfer(addressFromStringValue(dC), (aT._6 - (3 * ea)), g)) :+ ScriptTransfer(y, ea, g)) :+ ScriptTransfer(addressFromStringValue(value(dY)), ea, g)) | |
971 | + | else ((dV :+ ScriptTransfer(addressFromStringValue(dC), (aT._6 - (3 * ea)), g)) :+ ScriptTransfer(y, ea, g)) | |
992 | 972 | } | |
993 | 973 | } | |
994 | - | else if ((size( | |
974 | + | else if ((size(cu.payments) != 0)) | |
995 | 975 | then throw("No payments needed") | |
996 | - | else | |
976 | + | else dV | |
997 | 977 | } | |
998 | 978 | else throw("Strict value is not equal to itself.") | |
999 | 979 | } | |
1000 | 980 | else throw("Strict value is not equal to itself.") | |
1001 | 981 | } | |
1002 | 982 | } | |
1003 | 983 | } | |
1004 | 984 | } | |
1005 | 985 | } | |
1006 | 986 | } | |
1007 | 987 | else throw("Strict value is not equal to itself.") | |
1008 | 988 | } | |
1009 | 989 | ||
1010 | 990 |
github/deemru/w8io/026f985 591.37 ms ◑