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/+5AwkAAAIBAVQFByRtYXRjaDABIFWx2J9yh4Lv5eNbjawFq2XemkOhLxa7BfMat4el8cUYCQACAQINVW5rbm93biBjaGFpbgAVZGVmYXVsdFJlc3RBZGRyZXNzU3RyBAckbWF0Y2gwBQVjaGFpbgMJAAACAQFXBQckbWF0Y2gwAiMzUFFDdXZGYnZoNExrUFVucm5VMXozam5iQTFwOW0zV05odgMJAAACAQFUBQckbWF0Y2gwAiMzTXVta0dHenRDS0FYcFdEcXhrZGRvZnFYU1VicVFrdlNKeQkAAgECDVVua25vd24gY2hhaW4BD2d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xdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4A9Z4Hvg==", "height": 2599919, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Fpuy5PgkmwqLJ9QXA5m2BBySV8TBEGSQEJhH2EFnvYXp Next: 3wQ8pjGoxB995d3EYL98dkcif5V53i2GoLKQSw62f6sH Diff:
OldNewDifferences
219219 else aV
220220
221221
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)
225235 }
226236
227237
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)
252251 }
253252
254253
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:"), ":")
289256 [toString(valueOrElse(parseInt(aT[ay]), 0)), if ((size(split(aT[az], "_")) == B))
290257 then aT[az]
291258 else "0_0_0_0_0_0", if ((size(split(aT[aA], "_")) == B))
294261 }
295262
296263
297-func bH () = if (valueOrElse(getBoolean(z, ap()), false))
264+func br () = if (valueOrElse(getBoolean(z, ap()), false))
298265 then throw("Contracts are under maintenance")
299266 else unit
300267
301268
302-func bI (bg,bh) = {
303- let bJ = bg._1
304- let bK = bg._8
305- let aW = if (bK)
306- then parseIntValue(split(Q[bJ], "_")[ad])
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])
307274 else 0
308- let bL = split(bh, "@")
309- if ((size(bL) != 2))
275+ let bx = split(bu, "@")
276+ if ((size(bx) != 2))
310277 then throw("Incorrect order format, should be amount@price")
311278 else {
312- let bM = parseIntValue(bL[0])
313- let bN = parseIntValue(bL[1])
314- let bO = fraction(bM, bN, d)
315- let bP = aU(bM, aW, bK)
316- let bQ = if ((size(bg._6) > bJ))
317- then parseIntValue(bg._6[bJ])
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])
318285 else 0
319- let bR = split(if ((size(bg._7) > bJ))
320- then bg._7[bJ]
286+ let bD = split(if ((size(bt._7) > bv))
287+ then bt._7[bv]
321288 else "0@0", "@")
322- let bS = parseIntValue(bR[0])
323- let bT = parseIntValue(bR[1])
324- if (if ((0 > bT))
289+ let bE = parseIntValue(bD[0])
290+ let bF = parseIntValue(bD[1])
291+ if (if ((0 > bF))
325292 then true
326- else (0 > bN))
293+ else (0 > bz))
327294 then throw("Price can't be negative")
328295 else {
329- let bU = fraction(bS, bT, d)
330- let bV = aU(bS, aW, bK)
331- if ((bM == 0))
332- then if ((bS > 0))
333- then $Tuple8((bJ + 1), (bg._2 :+ toString(bQ)), bg._3, bg._4, (bg._5 - bU), bg._6, bg._7, bK)
334- else $Tuple8((bJ + 1), (bg._2 :+ toString((bQ - bS))), bg._3, bg._4, bg._5, bg._6, bg._7, bK)
335- else if ((bM > 0))
336- then if ((0 > bS))
337- then $Tuple8((bJ + 1), (bg._2 :+ toString((bQ - bS))), (bg._3 + bP), bg._4, (bg._5 + bO), bg._6, bg._7, bK)
338- else $Tuple8((bJ + 1), (bg._2 :+ toString(bQ)), (bg._3 + bP), bg._4, ((bg._5 + bO) - bU), bg._6, bg._7, bK)
339- else if ((0 > bS))
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))
340307 then {
341- let bW = (bS - bM)
342- if ((0 > (bQ - bW)))
343- then throw((((("Attempt to take " + toString(bW)) + " from warehouse, but only ") + toString(bQ)) + " available"))
344- else $Tuple8((bJ + 1), (bg._2 :+ toString((bQ - bW))), bg._3, (bg._4 - bP), bg._5, bg._6, bg._7, bK)
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)
345312 }
346- else if ((0 > (bQ + bM)))
347- then throw((((("Attempt to take " + toString(-(bM))) + " from warehouse, but only ") + toString(bQ)) + " available"))
348- else $Tuple8((bJ + 1), (bg._2 :+ toString((bQ + bM))), bg._3, (bg._4 - bP), (bg._5 - bU), bg._6, bg._7, bK)
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)
349316 }
350317 }
351318 }
352319
353320
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])
359400 else 0
360- let bZ = split(bY, "@")
361- if ((size(bZ) != 2))
401+ let ck = split(cj, "@")
402+ if ((size(ck) != 2))
362403 then throw("Incorrect order format, should be amount@price")
363404 else {
364- let ca = parseIntValue(bZ[0])
365- let cb = parseIntValue(bZ[1])
366- if ((0 > cb))
405+ let cl = parseIntValue(ck[0])
406+ let cm = parseIntValue(ck[1])
407+ if ((0 > cm))
367408 then throw("Price can't be negative")
368409 else {
369- let cc = fraction(ca, cb, d)
370- let cd = if ((size(bg._8) > bJ))
371- then parseIntValue(bg._8[bJ])
410+ let cn = fraction(cl, cm, d)
411+ let co = if ((size(bt._8) > bv))
412+ then parseIntValue(bt._8[bv])
372413 else 0
373- let bQ = if ((size(bg._9) > bJ))
374- then parseIntValue(bg._9[bJ])
414+ let bC = if ((size(bt._9) > bv))
415+ then parseIntValue(bt._9[bv])
375416 else 0
376- let ce = split(bg._10[bJ], "@")
377- let cf = parseIntValue(ce[0])
378- let cg = parseIntValue(ce[1])
379- if (if ((ca != 0))
380- then (cb != cg)
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)
381422 else false)
382- then throw(((((("Prices of " + bg._11[bJ]) + " don't match! WH price=") + toString(cg)) + ", your price=") + toString(cb)))
423+ then throw(((((("Prices of " + bt._11[bv]) + " don't match! WH price=") + toString(cr)) + ", your price=") + toString(cm)))
383424 else {
384- let ch = fraction(cf, cg, d)
385- let ci = aU(ca, aW, bK)
386- if ((ca == 0))
387- then $Tuple12((bg._1 :+ toString(bQ)), (bg._2 :+ bg._10[bJ]), (bg._3 :+ toString(cd)), bg._4, bg._5, bg._6, (bg._7 + 1), bg._8, bg._9, bg._10, bg._11, bK)
388- else if ((ca > 0))
389- then if ((0 > cf))
390- then if ((ca > -(cf)))
391- then throw(((((("Attempt to buy " + toString(ca)) + " of ") + bg._11[bJ]) + ", but warehouse only sells ") + toString(-(cf))))
392- else $Tuple12((bg._1 :+ toString(bQ)), (bg._2 :+ ((toString((cf + ca)) + "@") + toString(cg))), (bg._3 :+ toString((cd + ca))), (bg._4 + ci), bg._5, (bg._6 + cc), (bg._7 + 1), bg._8, bg._9, bg._10, bg._11, bK)
393- else throw((("Attempt to buy " + bg._11[bJ]) + " while warehouse doesn't sell it"))
394- else if ((cf > 0))
395- then if ((-(ca) > cf))
396- then throw(((((("Attempt to sell " + toString(-(ca))) + " of ") + bg._11[bJ]) + ", but warehouse only buys ") + toString(cf)))
397- else if ((-(ca) > cd))
398- then throw(((((("Attempt to sell " + toString(-(ca))) + ", but you only have ") + toString(cd)) + " of ") + bg._11[bJ]))
399- else $Tuple12((bg._1 :+ toString((bQ - ca))), (bg._2 :+ ((toString((cf + ca)) + "@") + toString(cg))), (bg._3 :+ toString((cd + ca))), (bg._4 - ci), (bg._5 - cc), bg._6, (bg._7 + 1), bg._8, bg._9, bg._10, bg._11, bK)
400- else throw((("Attempt to sell " + bg._11[bJ]) + " while warehouse doesn't buy it"))
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"))
401442 }
402443 }
403444 }
404445 }
405446
406447
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+ }
411454
412455
413456
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))
418468 then {
419- let an = valueOrErrorMessage(getString(z, ak(toString(cj.caller))), "You don't have a duck staked")
420- if ((size(cj.payments) != 0))
469+ let an = valueOrErrorMessage(getString(z, ak(toString(cu.caller))), "You don't have a duck staked")
470+ if ((size(cu.payments) != 0))
421471 then throw("sellResources doesn't require any payments")
422472 else {
423- let co = split(valueOrElse(getString(z, ao(an)), A), "_")
424- if ((co[aw] != "F"))
425- then throw(("Duck location type should be Factory, but is " + co[aw]))
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]))
426476 else {
427- let bq = co[ax]
428- let cp = bF(am(an))
429- let cq = split(cp[az], "_")
430- func cr (bg,bJ) = if ((cl[bJ] > parseIntValue(cq[bJ])))
431- then throw(((((("You have " + cq[bJ]) + " of ") + M[bJ]) + ", but tried to sell ") + toString(cl[bJ])))
432- else if ((0 > cl[bJ]))
433- then throw(((("You tried to sell negative amount of " + M[bJ]) + ": ") + toString(cl[bJ])))
434- else if ((cl[bJ] > 0))
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))
435485 then {
436- let cs = bp(bq, bJ, cl[bJ], cm[bJ])
437- $Tuple3((bg._1 :+ cs._1), (bg._2 :+ toString((parseIntValue(cq[bJ]) - cl[bJ]))), (bg._3 + cs._2))
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))
438488 }
439- else $Tuple3(bg._1, (bg._2 :+ cq[bJ]), bg._3)
489+ else $Tuple3(bt._1, (bt._2 :+ cD[bv]), bt._3)
440490
441- let ct = {
442- let bi = [0, 1, 2, 3, 4, 5]
443- let bj = size(bi)
444- let bk = $Tuple3(nil, nil, 0)
445- func bl (bm,bn) = if ((bn >= bj))
446- then bm
447- else cr(bm, bi[bn])
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])
448498
449- func bo (bm,bn) = if ((bn >= bj))
450- then bm
499+ func cd (cb,cc) = if ((cc >= bY))
500+ then cb
451501 else throw("List size exceeds 6")
452502
453- bo(bl(bl(bl(bl(bl(bl(bk, 0), 1), 2), 3), 4), 5), 6)
503+ cd(ca(ca(ca(ca(ca(ca(bZ, 0), 1), 2), 3), 4), 5), 6)
454504 }
455- let cu = makeString([cp[ay], makeString(ct._2, "_"), cp[aA], cp[aB]], ":")
456- let cv = aO(invoke(z, "updateBackpack", [an, cu], nil))
457- $Tuple2((ct._1 :+ ScriptTransfer(cj.caller, ct._3, g)), cv)
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)
458508 }
459509 }
460510 }
463513
464514
465515
466-@Callable(cj)
467-func buyMaterials (cl,cw) = {
468- let cn = bH()
469- if ((cn == cn))
516+@Callable(cu)
517+func buyMaterials (cy,cJ) = {
518+ let cA = br()
519+ if ((cA == cA))
470520 then {
471- let an = valueOrErrorMessage(getString(z, ak(toString(cj.caller))), "You don't have a duck staked")
472- if ((size(cj.payments) != 1))
521+ let an = valueOrErrorMessage(getString(z, ak(toString(cu.caller))), "You don't have a duck staked")
522+ if ((size(cu.payments) != 1))
473523 then throw("exactly 1 payment must be attached")
474524 else {
475- let cx = cj.payments[0]
476- let cy = cx.amount
477- let cz = valueOrErrorMessage(cx.assetId, "WAVES can't be used as payment")
478- if ((cz != g))
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))
479529 then throw("USDT payments only!")
480530 else {
481- let co = split(valueOrElse(getString(z, ao(an)), A), "_")
482- if ((co[aw] != "F"))
483- then throw(("Duck location type should be Factory, but is " + co[aw]))
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]))
484534 else {
485- let bq = co[ax]
486- let cp = bF(am(an))
487- let cA = split(cp[aA], "_")
488- func cB (bg,bJ) = if ((0 > cl[bJ]))
489- then throw(((("You tried to buy negative amount of " + N[bJ]) + ": ") + toString(cl[bJ])))
490- else if ((cl[bJ] > 0))
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))
491541 then {
492- let cs = bx(bq, bJ, cl[bJ], cw[bJ])
493- $Tuple3((bg._1 :+ cs._1), (bg._2 :+ toString((parseIntValue(cA[bJ]) + cs._3))), (bg._3 + cs._2))
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))
494544 }
495- else $Tuple3(bg._1, (bg._2 :+ cA[bJ]), bg._3)
545+ else $Tuple3(bt._1, (bt._2 :+ cN[bv]), bt._3)
496546
497- let ct = {
498- let bi = [0, 1, 2, 3, 4, 5]
499- let bj = size(bi)
500- let bk = $Tuple3(nil, nil, 0)
501- func bl (bm,bn) = if ((bn >= bj))
502- then bm
503- else cB(bm, bi[bn])
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])
504554
505- func bo (bm,bn) = if ((bn >= bj))
506- then bm
555+ func cd (cb,cc) = if ((cc >= bY))
556+ then cb
507557 else throw("List size exceeds 6")
508558
509- bo(bl(bl(bl(bl(bl(bl(bk, 0), 1), 2), 3), 4), 5), 6)
559+ cd(ca(ca(ca(ca(ca(ca(bZ, 0), 1), 2), 3), 4), 5), 6)
510560 }
511- if ((ct._3 > cy))
512- then throw(((("Insufficient payment! Attached=" + toString(cy)) + ", required=") + toString(ct._3)))
561+ if ((cG._3 > cL))
562+ then throw(((("Insufficient payment! Attached=" + toString(cL)) + ", required=") + toString(cG._3)))
513563 else {
514- let cu = makeString([cp[ay], cp[az], makeString(ct._2, "_"), cp[aB]], ":")
515- let cv = aO(invoke(z, "updateBackpack", [an, cu], nil))
516- let u = if (((cy - ct._3) > 0))
517- then [ScriptTransfer(cj.caller, (cy - ct._3), g)]
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)]
518568 else nil
519- let cC = (ct._3 / 100)
520- $Tuple2(((ct._1 ++ u) :+ ScriptTransfer(y, cC, g)), cv)
569+ let cP = (cG._3 / 100)
570+ $Tuple2(((cG._1 ++ u) :+ ScriptTransfer(y, cP, g)), cI)
521571 }
522572 }
523573 }
528578
529579
530580
531-@Callable(cj)
532-func exchangeResources (cl) = {
533- let cn = bH()
534- if ((cn == cn))
581+@Callable(cu)
582+func exchangeResources (cy) = {
583+ let cA = br()
584+ if ((cA == cA))
535585 then {
536- let an = valueOrErrorMessage(getString(z, ak(toString(cj.caller))), "You don't have a duck staked")
537- if ((size(cj.payments) != 1))
586+ let an = valueOrErrorMessage(getString(z, ak(toString(cu.caller))), "You don't have a duck staked")
587+ if ((size(cu.payments) != 1))
538588 then throw("exactly 1 payment must be attached")
539589 else {
540- let cx = cj.payments[0]
541- let cy = cx.amount
542- let cz = valueOrErrorMessage(cx.assetId, "WAVES can't be used as payment")
543- if ((cz != g))
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))
544594 then throw("USDT payments only!")
545595 else {
546- let co = split(valueOrElse(getString(z, ao(an)), A), "_")
547- if ((co[aw] != "F"))
548- then throw(("Duck location type should be Factory, but is " + co[aw]))
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]))
549599 else {
550- let bq = co[ax]
551- let cp = bF(am(an))
552- let cq = split(cp[az], "_")
553- let cA = split(cp[aA], "_")
554- func cD (bg,bJ) = {
555- let bs = af(bq, bJ)
556- let bt = valueOrElse(getInteger(bs), 0)
557- let cE = cl[bJ]
558- if ((cE > parseIntValue(cq[bJ])))
559- then throw(((((("You have " + cq[bJ]) + " of ") + M[bJ]) + ", but tried to exchange ") + toString(cE)))
560- else if ((0 > cE))
561- then throw(((("You tried to exchange negative amount of " + M[bJ]) + ": ") + toString(cE)))
562- else if ((cE > 0))
563- then $Tuple4((bg._1 :+ toString((parseIntValue(cq[bJ]) - cE))), (bg._2 :+ toString((parseIntValue(cA[bJ]) + cE))), (bg._3 + fraction(cE, D, d)), (bg._4 :+ IntegerEntry(bs, bt)))
564- else $Tuple4((bg._1 :+ cq[bJ]), (bg._2 :+ cA[bJ]), bg._3, bg._4)
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)
565615 }
566616
567- let ct = {
568- let bi = [0, 1, 2, 3, 4, 5]
569- let bj = size(bi)
570- let bk = $Tuple4(nil, nil, 0, nil)
571- func bl (bm,bn) = if ((bn >= bj))
572- then bm
573- else cD(bm, bi[bn])
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])
574624
575- func bo (bm,bn) = if ((bn >= bj))
576- then bm
625+ func cd (cb,cc) = if ((cc >= bY))
626+ then cb
577627 else throw("List size exceeds 6")
578628
579- bo(bl(bl(bl(bl(bl(bl(bk, 0), 1), 2), 3), 4), 5), 6)
629+ cd(ca(ca(ca(ca(ca(ca(bZ, 0), 1), 2), 3), 4), 5), 6)
580630 }
581- if ((ct._3 > cy))
582- then throw(((("Insufficient payment! Attached=" + toString(cy)) + ", required=") + toString(ct._3)))
631+ if ((cG._3 > cL))
632+ then throw(((("Insufficient payment! Attached=" + toString(cL)) + ", required=") + toString(cG._3)))
583633 else {
584- let cu = makeString([cp[ay], makeString(ct._1, "_"), makeString(ct._2, "_"), cp[aB]], ":")
585- let cv = aO(invoke(z, "updateBackpack", [an, cu], nil))
586- let u = if (((cy - ct._3) > 0))
587- then [ScriptTransfer(cj.caller, (cy - ct._3), g)]
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)]
588638 else nil
589- let cC = (ct._3 / 100)
590- $Tuple2(((u ++ ct._4) :+ ScriptTransfer(y, cC, g)), cv)
639+ let cP = (cG._3 / 100)
640+ $Tuple2(((u ++ cG._4) :+ ScriptTransfer(y, cP, g)), cI)
591641 }
592642 }
593643 }
598648
599649
600650
601-@Callable(cj)
602-func craftGoods (cF,cG) = {
603- let cn = bH()
604- if ((cn == cn))
605- then if ((size(cj.payments) != 1))
651+@Callable(cu)
652+func craftGoods (cS,cT) = {
653+ let cA = br()
654+ if ((cA == cA))
655+ then if ((size(cu.payments) != 1))
606656 then throw("exactly 1 payment must be attached")
607657 else {
608- let cx = cj.payments[0]
609- let cy = cx.amount
610- let cz = valueOrErrorMessage(cx.assetId, "WAVES can't be used as payment")
611- if ((cz != g))
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))
612662 then throw("USDT payments only!")
613- else if ((cy != b))
663+ else if ((cL != b))
614664 then throw("exactly 1 USDT must be attached as payment")
615- else if ((0 >= cG))
665+ else if ((0 >= cT))
616666 then throw("Quantity should be positive")
617667 else {
618- let an = valueOrErrorMessage(getString(z, ak(toString(cj.caller))), "You don't have a duck staked")
619- let co = split(valueOrElse(getString(z, ao(an)), A), "_")
620- if ((co[aw] != "M"))
621- then throw(("Duck location type should be Manufactory, but is " + co[aw]))
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]))
622672 else {
623- let cH = co[av]
624- let cp = bF(am(an))
625- let cA = split(cp[aA], "_")
626- if (if ((0 > cF))
673+ let cU = cB[av]
674+ let cC = bp(am(an))
675+ let cN = split(cC[aA], "_")
676+ if (if ((0 > cS))
627677 then true
628- else (cF >= size(Q)))
629- then throw(("Unknown product idx=" + toString(cF)))
678+ else (cS >= size(Q)))
679+ then throw(("Unknown product idx=" + toString(cS)))
630680 else {
631- let cI = split(Q[cF], "_")
632- if ((size(cI) != (B + 3)))
633- then throw(("Fatal: unknown recipe: " + Q[cF]))
681+ let cV = split(Q[cS], "_")
682+ if ((size(cV) != (B + 3)))
683+ then throw(("Fatal: unknown recipe: " + Q[cS]))
634684 else {
635- let cJ = parseIntValue(cI[ae])
636- if ((P[cJ] != cH))
637- then throw(((("This product is available in " + P[cJ]) + ", but you are in ") + cH))
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))
638688 else {
639- let cK = if ((cp[aB] == ""))
689+ let cX = if ((cC[aB] == ""))
640690 then nil
641- else split(cp[aB], "_")
642- func cL (bg,cM) = {
643- let cN = bg._2
644- let cO = if ((size(cK) > cN))
645- then cK[cN]
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]
646696 else "0"
647- let cP = parseIntValue(cO)
648- let aV = (cG * parseIntValue(cI[ad]))
649- let cQ = if ((cN == cF))
650- then toString((cP + aV))
651- else cO
652- $Tuple2((bg._1 :+ cQ), (cN + 1))
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))
653703 }
654704
655- let cR = ( let bi = Q
656- let bj = size(bi)
657- let bk = $Tuple2(nil, 0)
658- func bl (bm,bn) = if ((bn >= bj))
659- then bm
660- else cL(bm, bi[bn])
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])
661711
662- func bo (bm,bn) = if ((bn >= bj))
663- then bm
712+ func cd (cb,cc) = if ((cc >= bY))
713+ then cb
664714 else throw("List size exceeds 50")
665715
666- bo(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bk, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50))._1
667- func cS (bg,bJ) = {
668- let cT = ((parseIntValue(cI[bJ]) * c) * cG)
669- let cU = parseIntValue(cA[bJ])
670- if ((cT > cU))
671- then throw(((((((("You have " + cA[bJ]) + " of ") + N[bJ]) + ", but recipe requires ") + toString(cT)) + " for quantity ") + toString(cG)))
672- else if ((cT > 0))
673- then (bg :+ toString((cU - cT)))
674- else (bg :+ cA[bJ])
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])
675725 }
676726
677- let ct = {
678- let bi = [0, 1, 2, 3, 4, 5]
679- let bj = size(bi)
680- let bk = nil
681- func cV (bm,bn) = if ((bn >= bj))
682- then bm
683- else cS(bm, bi[bn])
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])
684734
685- func cW (bm,bn) = if ((bn >= bj))
686- then bm
735+ func cf (cb,cc) = if ((cc >= bY))
736+ then cb
687737 else throw("List size exceeds 6")
688738
689- cW(cV(cV(cV(cV(cV(cV(bk, 0), 1), 2), 3), 4), 5), 6)
739+ cf(ce(ce(ce(ce(ce(ce(bZ, 0), 1), 2), 3), 4), 5), 6)
690740 }
691- let cu = makeString([cp[ay], cp[az], makeString(ct, "_"), makeString(cR, "_")], ":")
692- let cv = aO(invoke(z, "updateBackpack", [an, cu], nil))
693- $Tuple2(nil, cv)
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)
694744 }
695745 }
696746 }
702752
703753
704754
705-@Callable(cj)
706-func setWarehouseOrder (cX,aj) = {
707- let cY = cj.originCaller
708- let au = toString(cY)
709- let cv = if ((cY != y))
710- then bH()
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()
711761 else false
712- let cZ = value(assetInfo(fromBase58String(aj)))
762+ let dk = value(assetInfo(fromBase58String(aj)))
713763 if (!(isDefined(getInteger(z, as(aj)))))
714- then throw((("NFT " + cZ.name) + " is not staked"))
764+ then throw((("NFT " + dk.name) + " is not staked"))
715765 else {
716- let da = valueOrErrorMessage(getString(z, aq(aj)), (("NFT " + cZ.name) + " is orphaned"))
717- if (if ((cY != y))
718- then (da != au)
766+ let dl = valueOrErrorMessage(getString(z, aq(aj)), (("NFT " + dk.name) + " is orphaned"))
767+ if (if ((dj != y))
768+ then (dl != au)
719769 else false)
720770 then throw((H + " is not yours"))
721771 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")
804796 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)]
833805 }
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)
834814 }
835- }
815+ else throw("Strict value is not equal to itself.")
816+ }
836817 }
837818 }
838819 }
839820
840821
841822
842-@Callable(cj)
843-func acceptWarehouseOrder (dA,aj,an) = {
844- let cn = bH()
845- if ((cn == cn))
823+@Callable(cu)
824+func acceptWarehouseOrder (dw,aj,an) = {
825+ let cA = br()
826+ if ((cA == cA))
846827 then {
847- let dB = cj.originCaller
848- let dC = toString(dB)
849- let dD = valueOrErrorMessage(getString(z, ak(dC)), "You don't have a duck staked")
850- let co = valueOrElse(getString(z, ao(dD)), A)
851- let dE = split(value(co), "_")
852- if ((dE[aw] != "L"))
853- then throw((("Duck location type is " + dE[aw]) + ", but should be L"))
854- else if ((dD != an))
855- then throw(((("Your staked duck is " + dD) + ", but passed ") + an))
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))
856837 else {
857- let dF = value(assetInfo(fromBase58String(aj)))
838+ let dB = value(assetInfo(fromBase58String(aj)))
858839 if (!(isDefined(getInteger(z, as(aj)))))
859- then throw((("NFT " + dF.name) + " is not staked"))
840+ then throw((("NFT " + dB.name) + " is not staked"))
860841 else {
861- let dG = valueOrErrorMessage(getString(z, aq(aj)), (("NFT " + dF.name) + " is orphaned"))
862- if ((dG == dC))
842+ let dC = valueOrErrorMessage(getString(z, aq(aj)), (("NFT " + dB.name) + " is orphaned"))
843+ if ((dC == dy))
863844 then throw("You cannot trade with yourself")
864845 else {
865- let dH = split_4C(dA, ":")
866- if ((size(dH) != 3))
846+ let dD = split_4C(dw, ":")
847+ if ((size(dD) != 3))
867848 then throw("bpOrderStr should contain exactly 2 ':' separators")
868849 else {
869- let dI = split(dH[0], "_")
870- let dJ = split(dH[1], "_")
871- let dK = if ((dH[2] == ""))
850+ let dE = split(dD[0], "_")
851+ let dF = split(dD[1], "_")
852+ let dG = if ((dD[2] == ""))
872853 then nil
873- else split(dH[2], "_")
874- if ((size(dI) != B))
854+ else split(dD[2], "_")
855+ if ((size(dE) != B))
875856 then throw("All 6 resources should be passed")
876- else if ((size(dJ) != B))
857+ else if ((size(dF) != B))
877858 then throw("All 6 materials should be passed")
878859 else {
879- let df = aO(invoke(z, "getWarehouseREADONLY", [aj], nil))
880- let bd = split_4C(df, ":")
881- let dg = split(bd[aD], "_")
882- let dh = split(bd[aE], "_")
883- let di = if ((bd[aF] == ""))
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] == ""))
884865 then nil
885- else split(bd[aF], "_")
886- let dL = parseIntValue(split(bd[aG], "_")[aH])
887- let bG = am(an)
888- let cp = bF(bG)
889- let dM = split(cp[az], "_")
890- let dN = split(cp[aA], "_")
891- let dO = if ((cp[aB] == ""))
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] == ""))
892873 then nil
893- else split(cp[aB], "_")
874+ else split(cC[aB], "_")
894875 let aS = ai(aj)
895- let dP = aR(aS)
896- let dQ = split(dP[aL], "_")
897- let dR = split(dP[aM], "_")
898- let dS = if ((dP[aN] == ""))
876+ let dL = aR(aS)
877+ let dM = split(dL[aL], "_")
878+ let dN = split(dL[aM], "_")
879+ let dO = if ((dL[aN] == ""))
899880 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])
909889
910- func bo (bm,bn) = if ((bn >= bj))
911- then bm
890+ func cd (cb,cc) = if ((cc >= bY))
891+ then cb
912892 else throw("List size exceeds 6")
913893
914- bo(bl(bl(bl(bl(bl(bl(bk, 0), 1), 2), 3), 4), 5), 6)
894+ cd(ca(ca(ca(ca(ca(ca(bZ, 0), 1), 2), 3), 4), 5), 6)
915895 }
916- let bC = {
917- let bi = dJ
918- let bj = size(bi)
919- let bk = $Tuple12(nil, nil, nil, dr._4, dr._5, dr._6, 0, dN, dh, dR, N, false)
920- func cV (bm,bn) = if ((bn >= bj))
921- then bm
922- else bX(bm, bi[bn])
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])
923903
924- func cW (bm,bn) = if ((bn >= bj))
925- then bm
904+ func cf (cb,cc) = if ((cc >= bY))
905+ then cb
926906 else throw("List size exceeds 6")
927907
928- cW(cV(cV(cV(cV(cV(cV(bk, 0), 1), 2), 3), 4), 5), 6)
908+ cf(ce(ce(ce(ce(ce(ce(bZ, 0), 1), 2), 3), 4), 5), 6)
929909 }
930- let aT = if ((size(dK) != 0))
910+ let aT = if ((size(dG) != 0))
931911 then {
932- let bi = dK
933- let bj = size(bi)
934- let bk = $Tuple12(nil, nil, nil, bC._4, bC._5, bC._6, 0, dO, di, dS, O, true)
935- func ds (bm,bn) = if ((bn >= bj))
936- then bm
937- else bX(bm, bi[bn])
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])
938918
939- func dt (bm,bn) = if ((bn >= bj))
940- then bm
919+ func ch (cb,cc) = if ((cc >= bY))
920+ then cb
941921 else throw("List size exceeds 50")
942922
943- 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)
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)
944924 }
945- else $Tuple12(di, dS, dO, bC._4, bC._5, bC._6, 0, dO, di, dS, O, true)
946- let dT = aT._4
947- let dU = if ((0 > (dL - dT)))
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)))
948928 then 0
949- else (dL - dT)
950- let dw = makeString_2C([bd[aC], makeString(dr._1, "_"), makeString(bC._1, "_"), makeString(aT._1, "_"), toString(dU)], ":")
951- let dV = makeString_2C([makeString(dr._2, "_"), makeString(bC._2, "_"), makeString(aT._2, "_")], ":")
952- let dW = makeString_2C([cp[ay], makeString(dr._3, "_"), makeString(bC._3, "_"), makeString(aT._3, "_")], ":")
953- let dx = invoke(z, "saveWarehouse", [dw, aj], nil)
954- if ((dx == dx))
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))
955935 then {
956- let dX = invoke(z, "updateBackpack", [an, dW], nil)
957- if ((dX == dX))
936+ let dT = invoke(z, "updateBackpack", [an, dS], nil)
937+ if ((dT == dT))
958938 then {
959- let dz = [StringEntry(aS, dV)]
960- let dY = aT._5
961- let dZ = if ((dY > 0))
939+ let dv = [StringEntry(aS, dR)]
940+ let dU = aT._5
941+ let dV = if ((dU > 0))
962942 then {
963- let ea = fraction(aT._5, K, b)
964- let eb = at(dC)
965- let ec = getString(z, eb)
966- if (isDefined(ec))
967- then (((dz :+ ScriptTransfer(dB, (aT._5 - (3 * ea)), g)) :+ ScriptTransfer(y, ea, g)) :+ ScriptTransfer(addressFromStringValue(value(ec)), ea, g))
968- else ((dz :+ ScriptTransfer(dB, (aT._5 - (3 * ea)), g)) :+ ScriptTransfer(y, ea, g))
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))
969949 }
970- else dz
971- let ed = aT._6
972- if ((ed > 0))
973- then if ((size(cj.payments) != 1))
950+ else dv
951+ let dZ = aT._6
952+ if ((dZ > 0))
953+ then if ((size(cu.payments) != 1))
974954 then throw("exactly 1 payment must be attached")
975955 else {
976- let cx = cj.payments[0]
977- let cy = cx.amount
978- let cz = valueOrErrorMessage(cx.assetId, "WAVES can't be used as payment")
979- if ((cz != g))
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))
980960 then throw("USDT payments only!")
981- else if ((cy != ed))
982- then throw(("Payment needed is " + toString(ed)))
983- else if ((L > cy))
961+ else if ((cL != dZ))
962+ then throw(("Payment needed is " + toString(dZ)))
963+ else if ((L > cL))
984964 then throw(("Payment should be at least " + toString(L)))
985965 else {
986- let ee = fraction(aT._6, K, b)
987- let eb = at(dG)
988- let ec = getString(z, eb)
989- if (isDefined(ec))
990- then (((dZ :+ ScriptTransfer(addressFromStringValue(dG), (aT._6 - (3 * ee)), g)) :+ ScriptTransfer(y, ee, g)) :+ ScriptTransfer(addressFromStringValue(value(ec)), ee, g))
991- else ((dZ :+ ScriptTransfer(addressFromStringValue(dG), (aT._6 - (3 * ee)), g)) :+ ScriptTransfer(y, ee, g))
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))
992972 }
993973 }
994- else if ((size(cj.payments) != 0))
974+ else if ((size(cu.payments) != 0))
995975 then throw("No payments needed")
996- else dZ
976+ else dV
997977 }
998978 else throw("Strict value is not equal to itself.")
999979 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "__"
55
66 let b = 1000000
77
88 let c = 10000000
99
1010 let d = 100000000
1111
1212 let e = 10000000000
1313
1414 let f = take(drop(this.bytes, 1), 1)
1515
1616 let g = {
1717 let h = f
1818 if ((base58'2W' == h))
1919 then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi'
2020 else if ((base58'2T' == h))
2121 then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63'
2222 else throw("Unknown chain")
2323 }
2424
2525 let i = {
2626 let h = f
2727 if ((base58'2W' == h))
2828 then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv"
2929 else if ((base58'2T' == h))
3030 then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy"
3131 else throw("Unknown chain")
3232 }
3333
3434 func j (k,l) = valueOrErrorMessage(getString(k, l), makeString(["mandatory ", toString(k), ".", l, " is not defined"], ""))
3535
3636
3737 func m (l,n) = valueOrElse(getInteger(this, l), n)
3838
3939
4040 let o = 1
4141
4242 let p = 2
4343
4444 let q = 3
4545
4646 func r () = "%s__restConfig"
4747
4848
4949 func s () = "%s__restAddr"
5050
5151
5252 func t (u) = split_4C(j(u, r()), a)
5353
5454
5555 func v (w,x) = valueOrErrorMessage(addressFromString(w[x]), ("Rest cfg doesn't contain address at index " + toString(x)))
5656
5757
5858 let y = addressFromStringValue(valueOrElse(getString(this, s()), i))
5959
6060 let w = t(y)
6161
6262 let z = v(w, o)
6363
6464 let A = "Africa_F_Africa"
6565
6666 let B = 6
6767
6868 let C = 10000000000
6969
7070 let D = 39637
7171
7272 let E = 10000
7373
7474 let F = 200
7575
7676 let G = 300
7777
7878 let H = "LAND"
7979
8080 let I = "DUCK"
8181
8282 let J = 10000000000
8383
8484 let K = 10000
8585
8686 let L = 100000
8787
8888 let M = ["Oil", "Ore", "Wood", "Sand", "Clay", "Organic"]
8989
9090 let N = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"]
9191
9292 let O = ["First Aid Kit", "Backpack", "Food Ration", "Jet Pack", "Shield"]
9393
9494 let P = ["Americas", "Europe", "Asia", "Africa", "Oceania"]
9595
9696 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"]
9797
9898 let R = 0
9999
100100 let S = 1
101101
102102 let T = 2
103103
104104 let U = 3
105105
106106 let V = 4
107107
108108 let W = 0
109109
110110 let X = 1
111111
112112 let Y = 2
113113
114114 let Z = 3
115115
116116 let aa = 4
117117
118118 let ab = 5
119119
120120 let ac = 6
121121
122122 let ad = 7
123123
124124 let ae = 8
125125
126126 func af (ag,ah) = ((("factoryWhByContinentAndRes_" + ag) + "_") + toString(ah))
127127
128128
129129 func ai (aj) = ("landOrder_" + aj)
130130
131131
132132 func ak (al) = ("stakedDuckByOwner_" + al)
133133
134134
135135 func am (an) = ("backPack_" + an)
136136
137137
138138 func ao (an) = ("duckLocation_" + an)
139139
140140
141141 func ap () = "contractsBlocked"
142142
143143
144144 func aq (ar) = ("nftOwner_" + ar)
145145
146146
147147 func as (ar) = ("stakedTime_" + ar)
148148
149149
150150 func at (au) = ("accRefBy_" + au)
151151
152152
153153 let av = 0
154154
155155 let aw = 1
156156
157157 let ax = 2
158158
159159 let ay = 0
160160
161161 let az = 1
162162
163163 let aA = 2
164164
165165 let aB = 3
166166
167167 let aC = 0
168168
169169 let aD = 1
170170
171171 let aE = 2
172172
173173 let aF = 3
174174
175175 let aG = 4
176176
177177 let aH = 0
178178
179179 let aI = 1
180180
181181 let aJ = 2
182182
183183 let aK = 3
184184
185185 let aL = 0
186186
187187 let aM = 1
188188
189189 let aN = 2
190190
191191 func aO (aP) = {
192192 let h = aP
193193 if ($isInstanceOf(h, "String"))
194194 then {
195195 let aQ = h
196196 aQ
197197 }
198198 else throw("fail to cast into String")
199199 }
200200
201201
202202 func aR (aS) = {
203203 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:"), ":")
204204 [if ((size(split(aT[aL], "_")) == B))
205205 then aT[aL]
206206 else "0@0_0@0_0@0_0@0_0@0_0@0", if ((size(split(aT[aM], "_")) == B))
207207 then aT[aM]
208208 else "0@0_0@0_0@0_0@0_0@0_0@0", aT[aN]]
209209 }
210210
211211
212212 func aU (aV,aW,aX) = if (aX)
213213 then {
214214 let aY = if ((aV >= 0))
215215 then (((aV + aW) - 1) / aW)
216216 else -((((-(aV) + aW) - 1) / aW))
217217 (aY * d)
218218 }
219219 else aV
220220
221221
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)
225235 }
226236
227237
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)
252251 }
253252
254253
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:"), ":")
289256 [toString(valueOrElse(parseInt(aT[ay]), 0)), if ((size(split(aT[az], "_")) == B))
290257 then aT[az]
291258 else "0_0_0_0_0_0", if ((size(split(aT[aA], "_")) == B))
292259 then aT[aA]
293260 else "0_0_0_0_0_0", aT[aB]]
294261 }
295262
296263
297-func bH () = if (valueOrElse(getBoolean(z, ap()), false))
264+func br () = if (valueOrElse(getBoolean(z, ap()), false))
298265 then throw("Contracts are under maintenance")
299266 else unit
300267
301268
302-func bI (bg,bh) = {
303- let bJ = bg._1
304- let bK = bg._8
305- let aW = if (bK)
306- then parseIntValue(split(Q[bJ], "_")[ad])
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])
307274 else 0
308- let bL = split(bh, "@")
309- if ((size(bL) != 2))
275+ let bx = split(bu, "@")
276+ if ((size(bx) != 2))
310277 then throw("Incorrect order format, should be amount@price")
311278 else {
312- let bM = parseIntValue(bL[0])
313- let bN = parseIntValue(bL[1])
314- let bO = fraction(bM, bN, d)
315- let bP = aU(bM, aW, bK)
316- let bQ = if ((size(bg._6) > bJ))
317- then parseIntValue(bg._6[bJ])
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])
318285 else 0
319- let bR = split(if ((size(bg._7) > bJ))
320- then bg._7[bJ]
286+ let bD = split(if ((size(bt._7) > bv))
287+ then bt._7[bv]
321288 else "0@0", "@")
322- let bS = parseIntValue(bR[0])
323- let bT = parseIntValue(bR[1])
324- if (if ((0 > bT))
289+ let bE = parseIntValue(bD[0])
290+ let bF = parseIntValue(bD[1])
291+ if (if ((0 > bF))
325292 then true
326- else (0 > bN))
293+ else (0 > bz))
327294 then throw("Price can't be negative")
328295 else {
329- let bU = fraction(bS, bT, d)
330- let bV = aU(bS, aW, bK)
331- if ((bM == 0))
332- then if ((bS > 0))
333- then $Tuple8((bJ + 1), (bg._2 :+ toString(bQ)), bg._3, bg._4, (bg._5 - bU), bg._6, bg._7, bK)
334- else $Tuple8((bJ + 1), (bg._2 :+ toString((bQ - bS))), bg._3, bg._4, bg._5, bg._6, bg._7, bK)
335- else if ((bM > 0))
336- then if ((0 > bS))
337- then $Tuple8((bJ + 1), (bg._2 :+ toString((bQ - bS))), (bg._3 + bP), bg._4, (bg._5 + bO), bg._6, bg._7, bK)
338- else $Tuple8((bJ + 1), (bg._2 :+ toString(bQ)), (bg._3 + bP), bg._4, ((bg._5 + bO) - bU), bg._6, bg._7, bK)
339- else if ((0 > bS))
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))
340307 then {
341- let bW = (bS - bM)
342- if ((0 > (bQ - bW)))
343- then throw((((("Attempt to take " + toString(bW)) + " from warehouse, but only ") + toString(bQ)) + " available"))
344- else $Tuple8((bJ + 1), (bg._2 :+ toString((bQ - bW))), bg._3, (bg._4 - bP), bg._5, bg._6, bg._7, bK)
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)
345312 }
346- else if ((0 > (bQ + bM)))
347- then throw((((("Attempt to take " + toString(-(bM))) + " from warehouse, but only ") + toString(bQ)) + " available"))
348- else $Tuple8((bJ + 1), (bg._2 :+ toString((bQ + bM))), bg._3, (bg._4 - bP), (bg._5 - bU), bg._6, bg._7, bK)
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)
349316 }
350317 }
351318 }
352319
353320
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])
359400 else 0
360- let bZ = split(bY, "@")
361- if ((size(bZ) != 2))
401+ let ck = split(cj, "@")
402+ if ((size(ck) != 2))
362403 then throw("Incorrect order format, should be amount@price")
363404 else {
364- let ca = parseIntValue(bZ[0])
365- let cb = parseIntValue(bZ[1])
366- if ((0 > cb))
405+ let cl = parseIntValue(ck[0])
406+ let cm = parseIntValue(ck[1])
407+ if ((0 > cm))
367408 then throw("Price can't be negative")
368409 else {
369- let cc = fraction(ca, cb, d)
370- let cd = if ((size(bg._8) > bJ))
371- then parseIntValue(bg._8[bJ])
410+ let cn = fraction(cl, cm, d)
411+ let co = if ((size(bt._8) > bv))
412+ then parseIntValue(bt._8[bv])
372413 else 0
373- let bQ = if ((size(bg._9) > bJ))
374- then parseIntValue(bg._9[bJ])
414+ let bC = if ((size(bt._9) > bv))
415+ then parseIntValue(bt._9[bv])
375416 else 0
376- let ce = split(bg._10[bJ], "@")
377- let cf = parseIntValue(ce[0])
378- let cg = parseIntValue(ce[1])
379- if (if ((ca != 0))
380- then (cb != cg)
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)
381422 else false)
382- then throw(((((("Prices of " + bg._11[bJ]) + " don't match! WH price=") + toString(cg)) + ", your price=") + toString(cb)))
423+ then throw(((((("Prices of " + bt._11[bv]) + " don't match! WH price=") + toString(cr)) + ", your price=") + toString(cm)))
383424 else {
384- let ch = fraction(cf, cg, d)
385- let ci = aU(ca, aW, bK)
386- if ((ca == 0))
387- then $Tuple12((bg._1 :+ toString(bQ)), (bg._2 :+ bg._10[bJ]), (bg._3 :+ toString(cd)), bg._4, bg._5, bg._6, (bg._7 + 1), bg._8, bg._9, bg._10, bg._11, bK)
388- else if ((ca > 0))
389- then if ((0 > cf))
390- then if ((ca > -(cf)))
391- then throw(((((("Attempt to buy " + toString(ca)) + " of ") + bg._11[bJ]) + ", but warehouse only sells ") + toString(-(cf))))
392- else $Tuple12((bg._1 :+ toString(bQ)), (bg._2 :+ ((toString((cf + ca)) + "@") + toString(cg))), (bg._3 :+ toString((cd + ca))), (bg._4 + ci), bg._5, (bg._6 + cc), (bg._7 + 1), bg._8, bg._9, bg._10, bg._11, bK)
393- else throw((("Attempt to buy " + bg._11[bJ]) + " while warehouse doesn't sell it"))
394- else if ((cf > 0))
395- then if ((-(ca) > cf))
396- then throw(((((("Attempt to sell " + toString(-(ca))) + " of ") + bg._11[bJ]) + ", but warehouse only buys ") + toString(cf)))
397- else if ((-(ca) > cd))
398- then throw(((((("Attempt to sell " + toString(-(ca))) + ", but you only have ") + toString(cd)) + " of ") + bg._11[bJ]))
399- else $Tuple12((bg._1 :+ toString((bQ - ca))), (bg._2 :+ ((toString((cf + ca)) + "@") + toString(cg))), (bg._3 :+ toString((cd + ca))), (bg._4 - ci), (bg._5 - cc), bg._6, (bg._7 + 1), bg._8, bg._9, bg._10, bg._11, bK)
400- else throw((("Attempt to sell " + bg._11[bJ]) + " while warehouse doesn't buy it"))
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"))
401442 }
402443 }
403444 }
404445 }
405446
406447
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+ }
411454
412455
413456
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))
418468 then {
419- let an = valueOrErrorMessage(getString(z, ak(toString(cj.caller))), "You don't have a duck staked")
420- if ((size(cj.payments) != 0))
469+ let an = valueOrErrorMessage(getString(z, ak(toString(cu.caller))), "You don't have a duck staked")
470+ if ((size(cu.payments) != 0))
421471 then throw("sellResources doesn't require any payments")
422472 else {
423- let co = split(valueOrElse(getString(z, ao(an)), A), "_")
424- if ((co[aw] != "F"))
425- then throw(("Duck location type should be Factory, but is " + co[aw]))
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]))
426476 else {
427- let bq = co[ax]
428- let cp = bF(am(an))
429- let cq = split(cp[az], "_")
430- func cr (bg,bJ) = if ((cl[bJ] > parseIntValue(cq[bJ])))
431- then throw(((((("You have " + cq[bJ]) + " of ") + M[bJ]) + ", but tried to sell ") + toString(cl[bJ])))
432- else if ((0 > cl[bJ]))
433- then throw(((("You tried to sell negative amount of " + M[bJ]) + ": ") + toString(cl[bJ])))
434- else if ((cl[bJ] > 0))
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))
435485 then {
436- let cs = bp(bq, bJ, cl[bJ], cm[bJ])
437- $Tuple3((bg._1 :+ cs._1), (bg._2 :+ toString((parseIntValue(cq[bJ]) - cl[bJ]))), (bg._3 + cs._2))
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))
438488 }
439- else $Tuple3(bg._1, (bg._2 :+ cq[bJ]), bg._3)
489+ else $Tuple3(bt._1, (bt._2 :+ cD[bv]), bt._3)
440490
441- let ct = {
442- let bi = [0, 1, 2, 3, 4, 5]
443- let bj = size(bi)
444- let bk = $Tuple3(nil, nil, 0)
445- func bl (bm,bn) = if ((bn >= bj))
446- then bm
447- else cr(bm, bi[bn])
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])
448498
449- func bo (bm,bn) = if ((bn >= bj))
450- then bm
499+ func cd (cb,cc) = if ((cc >= bY))
500+ then cb
451501 else throw("List size exceeds 6")
452502
453- bo(bl(bl(bl(bl(bl(bl(bk, 0), 1), 2), 3), 4), 5), 6)
503+ cd(ca(ca(ca(ca(ca(ca(bZ, 0), 1), 2), 3), 4), 5), 6)
454504 }
455- let cu = makeString([cp[ay], makeString(ct._2, "_"), cp[aA], cp[aB]], ":")
456- let cv = aO(invoke(z, "updateBackpack", [an, cu], nil))
457- $Tuple2((ct._1 :+ ScriptTransfer(cj.caller, ct._3, g)), cv)
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)
458508 }
459509 }
460510 }
461511 else throw("Strict value is not equal to itself.")
462512 }
463513
464514
465515
466-@Callable(cj)
467-func buyMaterials (cl,cw) = {
468- let cn = bH()
469- if ((cn == cn))
516+@Callable(cu)
517+func buyMaterials (cy,cJ) = {
518+ let cA = br()
519+ if ((cA == cA))
470520 then {
471- let an = valueOrErrorMessage(getString(z, ak(toString(cj.caller))), "You don't have a duck staked")
472- if ((size(cj.payments) != 1))
521+ let an = valueOrErrorMessage(getString(z, ak(toString(cu.caller))), "You don't have a duck staked")
522+ if ((size(cu.payments) != 1))
473523 then throw("exactly 1 payment must be attached")
474524 else {
475- let cx = cj.payments[0]
476- let cy = cx.amount
477- let cz = valueOrErrorMessage(cx.assetId, "WAVES can't be used as payment")
478- if ((cz != g))
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))
479529 then throw("USDT payments only!")
480530 else {
481- let co = split(valueOrElse(getString(z, ao(an)), A), "_")
482- if ((co[aw] != "F"))
483- then throw(("Duck location type should be Factory, but is " + co[aw]))
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]))
484534 else {
485- let bq = co[ax]
486- let cp = bF(am(an))
487- let cA = split(cp[aA], "_")
488- func cB (bg,bJ) = if ((0 > cl[bJ]))
489- then throw(((("You tried to buy negative amount of " + N[bJ]) + ": ") + toString(cl[bJ])))
490- else if ((cl[bJ] > 0))
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))
491541 then {
492- let cs = bx(bq, bJ, cl[bJ], cw[bJ])
493- $Tuple3((bg._1 :+ cs._1), (bg._2 :+ toString((parseIntValue(cA[bJ]) + cs._3))), (bg._3 + cs._2))
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))
494544 }
495- else $Tuple3(bg._1, (bg._2 :+ cA[bJ]), bg._3)
545+ else $Tuple3(bt._1, (bt._2 :+ cN[bv]), bt._3)
496546
497- let ct = {
498- let bi = [0, 1, 2, 3, 4, 5]
499- let bj = size(bi)
500- let bk = $Tuple3(nil, nil, 0)
501- func bl (bm,bn) = if ((bn >= bj))
502- then bm
503- else cB(bm, bi[bn])
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])
504554
505- func bo (bm,bn) = if ((bn >= bj))
506- then bm
555+ func cd (cb,cc) = if ((cc >= bY))
556+ then cb
507557 else throw("List size exceeds 6")
508558
509- bo(bl(bl(bl(bl(bl(bl(bk, 0), 1), 2), 3), 4), 5), 6)
559+ cd(ca(ca(ca(ca(ca(ca(bZ, 0), 1), 2), 3), 4), 5), 6)
510560 }
511- if ((ct._3 > cy))
512- then throw(((("Insufficient payment! Attached=" + toString(cy)) + ", required=") + toString(ct._3)))
561+ if ((cG._3 > cL))
562+ then throw(((("Insufficient payment! Attached=" + toString(cL)) + ", required=") + toString(cG._3)))
513563 else {
514- let cu = makeString([cp[ay], cp[az], makeString(ct._2, "_"), cp[aB]], ":")
515- let cv = aO(invoke(z, "updateBackpack", [an, cu], nil))
516- let u = if (((cy - ct._3) > 0))
517- then [ScriptTransfer(cj.caller, (cy - ct._3), g)]
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)]
518568 else nil
519- let cC = (ct._3 / 100)
520- $Tuple2(((ct._1 ++ u) :+ ScriptTransfer(y, cC, g)), cv)
569+ let cP = (cG._3 / 100)
570+ $Tuple2(((cG._1 ++ u) :+ ScriptTransfer(y, cP, g)), cI)
521571 }
522572 }
523573 }
524574 }
525575 }
526576 else throw("Strict value is not equal to itself.")
527577 }
528578
529579
530580
531-@Callable(cj)
532-func exchangeResources (cl) = {
533- let cn = bH()
534- if ((cn == cn))
581+@Callable(cu)
582+func exchangeResources (cy) = {
583+ let cA = br()
584+ if ((cA == cA))
535585 then {
536- let an = valueOrErrorMessage(getString(z, ak(toString(cj.caller))), "You don't have a duck staked")
537- if ((size(cj.payments) != 1))
586+ let an = valueOrErrorMessage(getString(z, ak(toString(cu.caller))), "You don't have a duck staked")
587+ if ((size(cu.payments) != 1))
538588 then throw("exactly 1 payment must be attached")
539589 else {
540- let cx = cj.payments[0]
541- let cy = cx.amount
542- let cz = valueOrErrorMessage(cx.assetId, "WAVES can't be used as payment")
543- if ((cz != g))
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))
544594 then throw("USDT payments only!")
545595 else {
546- let co = split(valueOrElse(getString(z, ao(an)), A), "_")
547- if ((co[aw] != "F"))
548- then throw(("Duck location type should be Factory, but is " + co[aw]))
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]))
549599 else {
550- let bq = co[ax]
551- let cp = bF(am(an))
552- let cq = split(cp[az], "_")
553- let cA = split(cp[aA], "_")
554- func cD (bg,bJ) = {
555- let bs = af(bq, bJ)
556- let bt = valueOrElse(getInteger(bs), 0)
557- let cE = cl[bJ]
558- if ((cE > parseIntValue(cq[bJ])))
559- then throw(((((("You have " + cq[bJ]) + " of ") + M[bJ]) + ", but tried to exchange ") + toString(cE)))
560- else if ((0 > cE))
561- then throw(((("You tried to exchange negative amount of " + M[bJ]) + ": ") + toString(cE)))
562- else if ((cE > 0))
563- then $Tuple4((bg._1 :+ toString((parseIntValue(cq[bJ]) - cE))), (bg._2 :+ toString((parseIntValue(cA[bJ]) + cE))), (bg._3 + fraction(cE, D, d)), (bg._4 :+ IntegerEntry(bs, bt)))
564- else $Tuple4((bg._1 :+ cq[bJ]), (bg._2 :+ cA[bJ]), bg._3, bg._4)
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)
565615 }
566616
567- let ct = {
568- let bi = [0, 1, 2, 3, 4, 5]
569- let bj = size(bi)
570- let bk = $Tuple4(nil, nil, 0, nil)
571- func bl (bm,bn) = if ((bn >= bj))
572- then bm
573- else cD(bm, bi[bn])
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])
574624
575- func bo (bm,bn) = if ((bn >= bj))
576- then bm
625+ func cd (cb,cc) = if ((cc >= bY))
626+ then cb
577627 else throw("List size exceeds 6")
578628
579- bo(bl(bl(bl(bl(bl(bl(bk, 0), 1), 2), 3), 4), 5), 6)
629+ cd(ca(ca(ca(ca(ca(ca(bZ, 0), 1), 2), 3), 4), 5), 6)
580630 }
581- if ((ct._3 > cy))
582- then throw(((("Insufficient payment! Attached=" + toString(cy)) + ", required=") + toString(ct._3)))
631+ if ((cG._3 > cL))
632+ then throw(((("Insufficient payment! Attached=" + toString(cL)) + ", required=") + toString(cG._3)))
583633 else {
584- let cu = makeString([cp[ay], makeString(ct._1, "_"), makeString(ct._2, "_"), cp[aB]], ":")
585- let cv = aO(invoke(z, "updateBackpack", [an, cu], nil))
586- let u = if (((cy - ct._3) > 0))
587- then [ScriptTransfer(cj.caller, (cy - ct._3), g)]
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)]
588638 else nil
589- let cC = (ct._3 / 100)
590- $Tuple2(((u ++ ct._4) :+ ScriptTransfer(y, cC, g)), cv)
639+ let cP = (cG._3 / 100)
640+ $Tuple2(((u ++ cG._4) :+ ScriptTransfer(y, cP, g)), cI)
591641 }
592642 }
593643 }
594644 }
595645 }
596646 else throw("Strict value is not equal to itself.")
597647 }
598648
599649
600650
601-@Callable(cj)
602-func craftGoods (cF,cG) = {
603- let cn = bH()
604- if ((cn == cn))
605- then if ((size(cj.payments) != 1))
651+@Callable(cu)
652+func craftGoods (cS,cT) = {
653+ let cA = br()
654+ if ((cA == cA))
655+ then if ((size(cu.payments) != 1))
606656 then throw("exactly 1 payment must be attached")
607657 else {
608- let cx = cj.payments[0]
609- let cy = cx.amount
610- let cz = valueOrErrorMessage(cx.assetId, "WAVES can't be used as payment")
611- if ((cz != g))
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))
612662 then throw("USDT payments only!")
613- else if ((cy != b))
663+ else if ((cL != b))
614664 then throw("exactly 1 USDT must be attached as payment")
615- else if ((0 >= cG))
665+ else if ((0 >= cT))
616666 then throw("Quantity should be positive")
617667 else {
618- let an = valueOrErrorMessage(getString(z, ak(toString(cj.caller))), "You don't have a duck staked")
619- let co = split(valueOrElse(getString(z, ao(an)), A), "_")
620- if ((co[aw] != "M"))
621- then throw(("Duck location type should be Manufactory, but is " + co[aw]))
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]))
622672 else {
623- let cH = co[av]
624- let cp = bF(am(an))
625- let cA = split(cp[aA], "_")
626- if (if ((0 > cF))
673+ let cU = cB[av]
674+ let cC = bp(am(an))
675+ let cN = split(cC[aA], "_")
676+ if (if ((0 > cS))
627677 then true
628- else (cF >= size(Q)))
629- then throw(("Unknown product idx=" + toString(cF)))
678+ else (cS >= size(Q)))
679+ then throw(("Unknown product idx=" + toString(cS)))
630680 else {
631- let cI = split(Q[cF], "_")
632- if ((size(cI) != (B + 3)))
633- then throw(("Fatal: unknown recipe: " + Q[cF]))
681+ let cV = split(Q[cS], "_")
682+ if ((size(cV) != (B + 3)))
683+ then throw(("Fatal: unknown recipe: " + Q[cS]))
634684 else {
635- let cJ = parseIntValue(cI[ae])
636- if ((P[cJ] != cH))
637- then throw(((("This product is available in " + P[cJ]) + ", but you are in ") + cH))
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))
638688 else {
639- let cK = if ((cp[aB] == ""))
689+ let cX = if ((cC[aB] == ""))
640690 then nil
641- else split(cp[aB], "_")
642- func cL (bg,cM) = {
643- let cN = bg._2
644- let cO = if ((size(cK) > cN))
645- then cK[cN]
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]
646696 else "0"
647- let cP = parseIntValue(cO)
648- let aV = (cG * parseIntValue(cI[ad]))
649- let cQ = if ((cN == cF))
650- then toString((cP + aV))
651- else cO
652- $Tuple2((bg._1 :+ cQ), (cN + 1))
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))
653703 }
654704
655- let cR = ( let bi = Q
656- let bj = size(bi)
657- let bk = $Tuple2(nil, 0)
658- func bl (bm,bn) = if ((bn >= bj))
659- then bm
660- else cL(bm, bi[bn])
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])
661711
662- func bo (bm,bn) = if ((bn >= bj))
663- then bm
712+ func cd (cb,cc) = if ((cc >= bY))
713+ then cb
664714 else throw("List size exceeds 50")
665715
666- bo(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bk, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50))._1
667- func cS (bg,bJ) = {
668- let cT = ((parseIntValue(cI[bJ]) * c) * cG)
669- let cU = parseIntValue(cA[bJ])
670- if ((cT > cU))
671- then throw(((((((("You have " + cA[bJ]) + " of ") + N[bJ]) + ", but recipe requires ") + toString(cT)) + " for quantity ") + toString(cG)))
672- else if ((cT > 0))
673- then (bg :+ toString((cU - cT)))
674- else (bg :+ cA[bJ])
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])
675725 }
676726
677- let ct = {
678- let bi = [0, 1, 2, 3, 4, 5]
679- let bj = size(bi)
680- let bk = nil
681- func cV (bm,bn) = if ((bn >= bj))
682- then bm
683- else cS(bm, bi[bn])
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])
684734
685- func cW (bm,bn) = if ((bn >= bj))
686- then bm
735+ func cf (cb,cc) = if ((cc >= bY))
736+ then cb
687737 else throw("List size exceeds 6")
688738
689- cW(cV(cV(cV(cV(cV(cV(bk, 0), 1), 2), 3), 4), 5), 6)
739+ cf(ce(ce(ce(ce(ce(ce(bZ, 0), 1), 2), 3), 4), 5), 6)
690740 }
691- let cu = makeString([cp[ay], cp[az], makeString(ct, "_"), makeString(cR, "_")], ":")
692- let cv = aO(invoke(z, "updateBackpack", [an, cu], nil))
693- $Tuple2(nil, cv)
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)
694744 }
695745 }
696746 }
697747 }
698748 }
699749 }
700750 else throw("Strict value is not equal to itself.")
701751 }
702752
703753
704754
705-@Callable(cj)
706-func setWarehouseOrder (cX,aj) = {
707- let cY = cj.originCaller
708- let au = toString(cY)
709- let cv = if ((cY != y))
710- then bH()
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()
711761 else false
712- let cZ = value(assetInfo(fromBase58String(aj)))
762+ let dk = value(assetInfo(fromBase58String(aj)))
713763 if (!(isDefined(getInteger(z, as(aj)))))
714- then throw((("NFT " + cZ.name) + " is not staked"))
764+ then throw((("NFT " + dk.name) + " is not staked"))
715765 else {
716- let da = valueOrErrorMessage(getString(z, aq(aj)), (("NFT " + cZ.name) + " is orphaned"))
717- if (if ((cY != y))
718- then (da != au)
766+ let dl = valueOrErrorMessage(getString(z, aq(aj)), (("NFT " + dk.name) + " is orphaned"))
767+ if (if ((dj != y))
768+ then (dl != au)
719769 else false)
720770 then throw((H + " is not yours"))
721771 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")
804796 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)]
833805 }
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)
834814 }
835- }
815+ else throw("Strict value is not equal to itself.")
816+ }
836817 }
837818 }
838819 }
839820
840821
841822
842-@Callable(cj)
843-func acceptWarehouseOrder (dA,aj,an) = {
844- let cn = bH()
845- if ((cn == cn))
823+@Callable(cu)
824+func acceptWarehouseOrder (dw,aj,an) = {
825+ let cA = br()
826+ if ((cA == cA))
846827 then {
847- let dB = cj.originCaller
848- let dC = toString(dB)
849- let dD = valueOrErrorMessage(getString(z, ak(dC)), "You don't have a duck staked")
850- let co = valueOrElse(getString(z, ao(dD)), A)
851- let dE = split(value(co), "_")
852- if ((dE[aw] != "L"))
853- then throw((("Duck location type is " + dE[aw]) + ", but should be L"))
854- else if ((dD != an))
855- then throw(((("Your staked duck is " + dD) + ", but passed ") + an))
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))
856837 else {
857- let dF = value(assetInfo(fromBase58String(aj)))
838+ let dB = value(assetInfo(fromBase58String(aj)))
858839 if (!(isDefined(getInteger(z, as(aj)))))
859- then throw((("NFT " + dF.name) + " is not staked"))
840+ then throw((("NFT " + dB.name) + " is not staked"))
860841 else {
861- let dG = valueOrErrorMessage(getString(z, aq(aj)), (("NFT " + dF.name) + " is orphaned"))
862- if ((dG == dC))
842+ let dC = valueOrErrorMessage(getString(z, aq(aj)), (("NFT " + dB.name) + " is orphaned"))
843+ if ((dC == dy))
863844 then throw("You cannot trade with yourself")
864845 else {
865- let dH = split_4C(dA, ":")
866- if ((size(dH) != 3))
846+ let dD = split_4C(dw, ":")
847+ if ((size(dD) != 3))
867848 then throw("bpOrderStr should contain exactly 2 ':' separators")
868849 else {
869- let dI = split(dH[0], "_")
870- let dJ = split(dH[1], "_")
871- let dK = if ((dH[2] == ""))
850+ let dE = split(dD[0], "_")
851+ let dF = split(dD[1], "_")
852+ let dG = if ((dD[2] == ""))
872853 then nil
873- else split(dH[2], "_")
874- if ((size(dI) != B))
854+ else split(dD[2], "_")
855+ if ((size(dE) != B))
875856 then throw("All 6 resources should be passed")
876- else if ((size(dJ) != B))
857+ else if ((size(dF) != B))
877858 then throw("All 6 materials should be passed")
878859 else {
879- let df = aO(invoke(z, "getWarehouseREADONLY", [aj], nil))
880- let bd = split_4C(df, ":")
881- let dg = split(bd[aD], "_")
882- let dh = split(bd[aE], "_")
883- let di = if ((bd[aF] == ""))
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] == ""))
884865 then nil
885- else split(bd[aF], "_")
886- let dL = parseIntValue(split(bd[aG], "_")[aH])
887- let bG = am(an)
888- let cp = bF(bG)
889- let dM = split(cp[az], "_")
890- let dN = split(cp[aA], "_")
891- let dO = if ((cp[aB] == ""))
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] == ""))
892873 then nil
893- else split(cp[aB], "_")
874+ else split(cC[aB], "_")
894875 let aS = ai(aj)
895- let dP = aR(aS)
896- let dQ = split(dP[aL], "_")
897- let dR = split(dP[aM], "_")
898- let dS = if ((dP[aN] == ""))
876+ let dL = aR(aS)
877+ let dM = split(dL[aL], "_")
878+ let dN = split(dL[aM], "_")
879+ let dO = if ((dL[aN] == ""))
899880 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])
909889
910- func bo (bm,bn) = if ((bn >= bj))
911- then bm
890+ func cd (cb,cc) = if ((cc >= bY))
891+ then cb
912892 else throw("List size exceeds 6")
913893
914- bo(bl(bl(bl(bl(bl(bl(bk, 0), 1), 2), 3), 4), 5), 6)
894+ cd(ca(ca(ca(ca(ca(ca(bZ, 0), 1), 2), 3), 4), 5), 6)
915895 }
916- let bC = {
917- let bi = dJ
918- let bj = size(bi)
919- let bk = $Tuple12(nil, nil, nil, dr._4, dr._5, dr._6, 0, dN, dh, dR, N, false)
920- func cV (bm,bn) = if ((bn >= bj))
921- then bm
922- else bX(bm, bi[bn])
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])
923903
924- func cW (bm,bn) = if ((bn >= bj))
925- then bm
904+ func cf (cb,cc) = if ((cc >= bY))
905+ then cb
926906 else throw("List size exceeds 6")
927907
928- cW(cV(cV(cV(cV(cV(cV(bk, 0), 1), 2), 3), 4), 5), 6)
908+ cf(ce(ce(ce(ce(ce(ce(bZ, 0), 1), 2), 3), 4), 5), 6)
929909 }
930- let aT = if ((size(dK) != 0))
910+ let aT = if ((size(dG) != 0))
931911 then {
932- let bi = dK
933- let bj = size(bi)
934- let bk = $Tuple12(nil, nil, nil, bC._4, bC._5, bC._6, 0, dO, di, dS, O, true)
935- func ds (bm,bn) = if ((bn >= bj))
936- then bm
937- else bX(bm, bi[bn])
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])
938918
939- func dt (bm,bn) = if ((bn >= bj))
940- then bm
919+ func ch (cb,cc) = if ((cc >= bY))
920+ then cb
941921 else throw("List size exceeds 50")
942922
943- 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)
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)
944924 }
945- else $Tuple12(di, dS, dO, bC._4, bC._5, bC._6, 0, dO, di, dS, O, true)
946- let dT = aT._4
947- let dU = if ((0 > (dL - dT)))
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)))
948928 then 0
949- else (dL - dT)
950- let dw = makeString_2C([bd[aC], makeString(dr._1, "_"), makeString(bC._1, "_"), makeString(aT._1, "_"), toString(dU)], ":")
951- let dV = makeString_2C([makeString(dr._2, "_"), makeString(bC._2, "_"), makeString(aT._2, "_")], ":")
952- let dW = makeString_2C([cp[ay], makeString(dr._3, "_"), makeString(bC._3, "_"), makeString(aT._3, "_")], ":")
953- let dx = invoke(z, "saveWarehouse", [dw, aj], nil)
954- if ((dx == dx))
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))
955935 then {
956- let dX = invoke(z, "updateBackpack", [an, dW], nil)
957- if ((dX == dX))
936+ let dT = invoke(z, "updateBackpack", [an, dS], nil)
937+ if ((dT == dT))
958938 then {
959- let dz = [StringEntry(aS, dV)]
960- let dY = aT._5
961- let dZ = if ((dY > 0))
939+ let dv = [StringEntry(aS, dR)]
940+ let dU = aT._5
941+ let dV = if ((dU > 0))
962942 then {
963- let ea = fraction(aT._5, K, b)
964- let eb = at(dC)
965- let ec = getString(z, eb)
966- if (isDefined(ec))
967- then (((dz :+ ScriptTransfer(dB, (aT._5 - (3 * ea)), g)) :+ ScriptTransfer(y, ea, g)) :+ ScriptTransfer(addressFromStringValue(value(ec)), ea, g))
968- else ((dz :+ ScriptTransfer(dB, (aT._5 - (3 * ea)), g)) :+ ScriptTransfer(y, ea, g))
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))
969949 }
970- else dz
971- let ed = aT._6
972- if ((ed > 0))
973- then if ((size(cj.payments) != 1))
950+ else dv
951+ let dZ = aT._6
952+ if ((dZ > 0))
953+ then if ((size(cu.payments) != 1))
974954 then throw("exactly 1 payment must be attached")
975955 else {
976- let cx = cj.payments[0]
977- let cy = cx.amount
978- let cz = valueOrErrorMessage(cx.assetId, "WAVES can't be used as payment")
979- if ((cz != g))
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))
980960 then throw("USDT payments only!")
981- else if ((cy != ed))
982- then throw(("Payment needed is " + toString(ed)))
983- else if ((L > cy))
961+ else if ((cL != dZ))
962+ then throw(("Payment needed is " + toString(dZ)))
963+ else if ((L > cL))
984964 then throw(("Payment should be at least " + toString(L)))
985965 else {
986- let ee = fraction(aT._6, K, b)
987- let eb = at(dG)
988- let ec = getString(z, eb)
989- if (isDefined(ec))
990- then (((dZ :+ ScriptTransfer(addressFromStringValue(dG), (aT._6 - (3 * ee)), g)) :+ ScriptTransfer(y, ee, g)) :+ ScriptTransfer(addressFromStringValue(value(ec)), ee, g))
991- else ((dZ :+ ScriptTransfer(addressFromStringValue(dG), (aT._6 - (3 * ee)), g)) :+ ScriptTransfer(y, ee, g))
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))
992972 }
993973 }
994- else if ((size(cj.payments) != 0))
974+ else if ((size(cu.payments) != 0))
995975 then throw("No payments needed")
996- else dZ
976+ else dV
997977 }
998978 else throw("Strict value is not equal to itself.")
999979 }
1000980 else throw("Strict value is not equal to itself.")
1001981 }
1002982 }
1003983 }
1004984 }
1005985 }
1006986 }
1007987 else throw("Strict value is not equal to itself.")
1008988 }
1009989
1010990

github/deemru/w8io/026f985 
591.37 ms