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
216216 else amount
217217
218218
219-func getWarehouseTotalVolume (volPrefix) = {
220- let parts = split(volPrefix, "_")
221- ((WHMULTIPLIER * (parseIntValue(parts[1]) + 1)) * parseIntValue(parts[0]))
222- }
223-
224-
225-func getWarehouseCurrGoodsVolume (currentWh) = {
226- let goods = currentWh[whIdxProd]
227- if ((goods == ""))
228- then 0
229- else {
230- func sum (acc,item) = {
231- let idx = acc._1
232- let pkgSize = parseIntValue(split(productionMatrix[idx], "_")[recipeIdxPacksize])
233- $Tuple2((idx + 1), (acc._2 + toVolume(parseIntValue(item), pkgSize, true)))
234- }
235-
236-( let $l = split_4C(goods, "_")
237- let $s = size($l)
238- let $acc0 = $Tuple2(0, 0)
239- func $f0_1 ($a,$i) = if (($i >= $s))
240- then $a
241- else sum($a, $l[$i])
242-
243- func $f0_2 ($a,$i) = if (($i >= $s))
244- then $a
245- else throw("List size exceeds 50")
246-
247- $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 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
248- }
249- }
250-
251-
252219 func sellInternal (locId,resType,amount,minPrice) = {
253220 let whKey = keyFactoryWarehouseByIdAndType(locId, resType)
254221 let w0 = valueOrElse(getInteger(whKey), 0)
348315 }
349316
350317
318+func setInternal (currentWh,currentOrd,newOrd) = {
319+ let currWhRes = split(currentWh[whIdxRes], "_")
320+ let currWhMat = split(currentWh[whIdxMat], "_")
321+ let currWhProd = if ((currentWh[whIdxProd] == ""))
322+ then nil
323+ else split(currentWh[whIdxProd], "_")
324+ let currentOrdRes = split(currentOrd[ordIdxRes], "_")
325+ let currentOrdMat = split(currentOrd[ordIdxMat], "_")
326+ let currentOrdProd = if ((currentOrd[ordIdxProd] == ""))
327+ then nil
328+ else split(currentOrd[ordIdxProd], "_")
329+ if ((size(newOrd) != 3))
330+ then throw("cargoListStr should contain exactly 2 ':' separators")
331+ else {
332+ let resParts = split(newOrd[0], "_")
333+ let matParts = split(newOrd[1], "_")
334+ let prodParts = if ((newOrd[2] == ""))
335+ then nil
336+ else split(newOrd[2], "_")
337+ if ((size(resParts) != NUMRES))
338+ then throw("All 6 resources should be passed")
339+ else if ((size(matParts) != NUMRES))
340+ then throw("All 6 materials should be passed")
341+ else {
342+ let r = {
343+ let $l = resParts
344+ let $s = size($l)
345+ let $acc0 = $Tuple8(0, nil, 0, 0, 0, currWhRes, currentOrdRes, false)
346+ func $f0_1 ($a,$i) = if (($i >= $s))
347+ then $a
348+ else setCommon($a, $l[$i])
349+
350+ func $f0_2 ($a,$i) = if (($i >= $s))
351+ then $a
352+ else throw("List size exceeds 6")
353+
354+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
355+ }
356+ let m = {
357+ let $l = matParts
358+ let $s = size($l)
359+ let $acc0 = $Tuple8(0, nil, r._3, r._4, r._5, currWhMat, currentOrdMat, false)
360+ func $f1_1 ($a,$i) = if (($i >= $s))
361+ then $a
362+ else setCommon($a, $l[$i])
363+
364+ func $f1_2 ($a,$i) = if (($i >= $s))
365+ then $a
366+ else throw("List size exceeds 6")
367+
368+ $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6)
369+ }
370+ let p = if ((size(prodParts) != 0))
371+ then {
372+ let $l = prodParts
373+ let $s = size($l)
374+ let $acc0 = $Tuple8(0, nil, m._3, m._4, m._5, currWhProd, currentOrdProd, true)
375+ func $f2_1 ($a,$i) = if (($i >= $s))
376+ then $a
377+ else setCommon($a, $l[$i])
378+
379+ func $f2_2 ($a,$i) = if (($i >= $s))
380+ then $a
381+ else throw("List size exceeds 50")
382+
383+ $f2_2($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($acc0, 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)
384+ }
385+ else $Tuple8(0, currWhProd, m._3, m._4, m._5, currWhProd, currentOrdProd, true)
386+ $Tuple6(r._2, m._2, p._2, p._3, p._4, p._5)
387+ }
388+ }
389+ }
390+
391+
351392 func acceptCommon (acc,bpOrdItem) = {
352393 let j = acc._7
353394 let isProd = acc._12
399440 }
400441 }
401442 }
443+
444+
445+@Callable(i)
446+func recalcLockedVolumeREADONLY (landAssetId,wh) = {
447+ let currentOrd = getOrder(keyOrderByLand(landAssetId))
448+ let z = setInternal(wh, currentOrd, currentOrd)
449+ $Tuple2(nil, (z._4 + z._5))
450+ }
451+
402452
403453
404454 @Callable(i)
717767 then throw((LANDPREFIX + " is not yours"))
718768 else {
719769 let cargoParts = split_4C(cargoListStr, ":")
720- if ((size(cargoParts) != 3))
721- then throw("cargoListStr should contain exactly 2 ':' separators")
722- else {
723- let resParts = split(cargoParts[0], "_")
724- let matParts = split(cargoParts[1], "_")
725- let prodParts = if ((cargoParts[2] == ""))
726- then nil
727- else split(cargoParts[2], "_")
728- if ((size(resParts) != NUMRES))
729- then throw("All 6 resources should be passed")
730- else if ((size(matParts) != NUMRES))
731- then throw("All 6 materials should be passed")
732- else {
733- let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil))
734- let currentWh = split_4C(wh, ":")
735- let currWhRes = split(currentWh[whIdxRes], "_")
736- let currWhMat = split(currentWh[whIdxMat], "_")
737- let currWhProd = if ((currentWh[whIdxProd] == ""))
738- then nil
739- else split(currentWh[whIdxProd], "_")
740- let loft = split(currentWh[whIdxLOFT], "_")
741- let whOccupied = parseIntValue(loft[volOccupied])
742- let whFree = parseIntValue(loft[volFree])
743- let ordKey = keyOrderByLand(landAssetId)
744- let currentOrd = getOrder(ordKey)
745- let currentOrdRes = split(currentOrd[ordIdxRes], "_")
746- let currentOrdMat = split(currentOrd[ordIdxMat], "_")
747- let currentOrdProd = if ((currentOrd[ordIdxProd] == ""))
748- then nil
749- else split(currentOrd[ordIdxProd], "_")
750- let usdtNeed2Lock = 0
751- let r = {
752- let $l = resParts
753- let $s = size($l)
754- let $acc0 = $Tuple8(0, nil, 0, 0, 0, currWhRes, currentOrdRes, false)
755- func $f0_1 ($a,$i) = if (($i >= $s))
756- then $a
757- else setCommon($a, $l[$i])
758-
759- func $f0_2 ($a,$i) = if (($i >= $s))
760- then $a
761- else throw("List size exceeds 6")
762-
763- $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
764- }
765- let m = {
766- let $l = matParts
767- let $s = size($l)
768- let $acc0 = $Tuple8(0, nil, r._3, r._4, r._5, currWhMat, currentOrdMat, false)
769- func $f1_1 ($a,$i) = if (($i >= $s))
770- then $a
771- else setCommon($a, $l[$i])
772-
773- func $f1_2 ($a,$i) = if (($i >= $s))
774- then $a
775- else throw("List size exceeds 6")
776-
777- $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6)
778- }
779- let p = if ((size(prodParts) != 0))
780- then {
781- let $l = prodParts
782- let $s = size($l)
783- let $acc0 = $Tuple8(0, nil, m._3, m._4, m._5, currWhProd, currentOrdProd, true)
784- func $f2_1 ($a,$i) = if (($i >= $s))
785- then $a
786- else setCommon($a, $l[$i])
787-
788- func $f2_2 ($a,$i) = if (($i >= $s))
789- then $a
790- else throw("List size exceeds 50")
791-
792- $f2_2($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($acc0, 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)
793- }
794- else $Tuple8(0, currWhProd, m._3, m._4, m._5, currWhProd, currentOrdProd, true)
795- let buyVolSaldo = p._3
796- let sellVolSaldo = p._4
797- if ((buyVolSaldo > whFree))
798- then throw((((("Attempt to reserve " + toString(buyVolSaldo)) + " space for buy orders, but only ") + toString(whFree)) + " warehouse empty space left"))
799- else if ((sellVolSaldo > whOccupied))
800- then throw((((("Attempt to lock " + toString(sellVolSaldo)) + " space for sell orders, but only ") + toString(whOccupied)) + " warehouse space occupied"))
770+ let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil))
771+ let currentWh = split_4C(wh, ":")
772+ let loft = split(currentWh[whIdxLOFT], "_")
773+ let whOccupied = parseIntValue(loft[volOccupied])
774+ let whFree = parseIntValue(loft[volFree])
775+ let ordKey = keyOrderByLand(landAssetId)
776+ let currentOrd = getOrder(ordKey)
777+ let z = setInternal(currentWh, currentOrd, cargoParts)
778+ let buyVolSaldo = z._4
779+ let sellVolSaldo = z._5
780+ if ((buyVolSaldo > whFree))
781+ then throw((((("Attempt to reserve " + toString(buyVolSaldo)) + " space for buy orders, but only ") + toString(whFree)) + " warehouse empty space left"))
782+ else if ((sellVolSaldo > whOccupied))
783+ then throw((((("Attempt to lock " + toString(sellVolSaldo)) + " space for sell orders, but only ") + toString(whOccupied)) + " warehouse space occupied"))
784+ else {
785+ let whStr = makeString_2C([currentWh[whIdxLevels], makeString(z._1, "_"), makeString(z._2, "_"), makeString(z._3, "_"), toString((buyVolSaldo + sellVolSaldo))], ":")
786+ let whSave = invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil)
787+ if ((whSave == whSave))
788+ then {
789+ let usdSaldo = z._6
790+ let actions = if ((usdSaldo > 0))
791+ then if ((size(i.payments) != 1))
792+ then throw("exactly 1 payment must be attached")
801793 else {
802- let whStr = makeString_2C([currentWh[whIdxLevels], makeString(r._2, "_"), makeString(m._2, "_"), makeString(p._2, "_"), toString((buyVolSaldo + sellVolSaldo))], ":")
803- let whSave = invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil)
804- if ((whSave == whSave))
805- then {
806- let usdSaldo = p._5
807- let actions = if ((usdSaldo > 0))
808- then if ((size(i.payments) != 1))
809- then throw("exactly 1 payment must be attached")
810- else {
811- let pmt = i.payments[0]
812- let amt = pmt.amount
813- let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment")
814- if ((pmtAssetId != usdtAssetId))
815- then throw("USDT payments only!")
816- else if ((amt != usdSaldo))
817- then throw(("Payment needed is " + toString(usdSaldo)))
818- else [StringEntry(ordKey, cargoListStr)]
819- }
820- else if ((usdSaldo == 0))
821- then if ((size(i.payments) != 0))
822- then throw("No payments needed")
823- else [StringEntry(ordKey, cargoListStr)]
824- else if ((size(i.payments) != 0))
825- then throw("No payments needed")
826- else [ScriptTransfer(addressFromStringValue(owner), -(usdSaldo), usdtAssetId), StringEntry(ordKey, cargoListStr)]
827- $Tuple2(actions, result)
828- }
829- else throw("Strict value is not equal to itself.")
794+ let pmt = i.payments[0]
795+ let amt = pmt.amount
796+ let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment")
797+ if ((pmtAssetId != usdtAssetId))
798+ then throw("USDT payments only!")
799+ else if ((amt != usdSaldo))
800+ then throw(("Payment needed is " + toString(usdSaldo)))
801+ else [StringEntry(ordKey, cargoListStr)]
830802 }
803+ else if ((usdSaldo == 0))
804+ then if ((size(i.payments) != 0))
805+ then throw("No payments needed")
806+ else [StringEntry(ordKey, cargoListStr)]
807+ else if ((size(i.payments) != 0))
808+ then throw("No payments needed")
809+ else [ScriptTransfer(addressFromStringValue(owner), -(usdSaldo), usdtAssetId), StringEntry(ordKey, cargoListStr)]
810+ $Tuple2(actions, result)
831811 }
832- }
812+ else throw("Strict value is not equal to itself.")
813+ }
833814 }
834815 }
835816 }
895876 let whOrdProd = if ((whOrd[ordIdxProd] == ""))
896877 then nil
897878 else split(whOrd[ordIdxProd], "_")
898- let usdtNeed2Lock = 0
899879 let r = {
900880 let $l = bpOrdRes
901881 let $s = size($l)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 let MULT6 = 1000000
77
88 let MULT7 = 10000000
99
1010 let MULT8 = 100000000
1111
1212 let MULT10 = 10000000000
1313
1414 let chain = take(drop(this.bytes, 1), 1)
1515
1616 let usdtAssetId = match chain {
1717 case _ =>
1818 if ((base58'2W' == $match0))
1919 then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi'
2020 else if ((base58'2T' == $match0))
2121 then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63'
2222 else throw("Unknown chain")
2323 }
2424
2525 let defaultRestAddressStr = match chain {
2626 case _ =>
2727 if ((base58'2W' == $match0))
2828 then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv"
2929 else if ((base58'2T' == $match0))
3030 then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy"
3131 else throw("Unknown chain")
3232 }
3333
3434 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
3535
3636
3737 func getIntOrElse (key,defaultVal) = valueOrElse(getInteger(this, key), defaultVal)
3838
3939
4040 let IdxCfgStakingDapp = 1
4141
4242 let IdxCfgEconomyDapp = 2
4343
4444 let IdxCfgGovernanceDapp = 3
4545
4646 func keyRestCfg () = "%s__restConfig"
4747
4848
4949 func keyRestAddress () = "%s__restAddr"
5050
5151
5252 func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP)
5353
5454
5555 func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx)))
5656
5757
5858 let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr))
5959
6060 let restCfg = readRestCfgOrFail(restContract)
6161
6262 let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp)
6363
6464 let DEFAULTLOCATION = "Africa_F_Africa"
6565
6666 let NUMRES = 6
6767
6868 let FACTORYMAXWAREHOUSE = 10000000000
6969
7070 let RESOURCEPRICEMIN = 39637
7171
7272 let MINPAYMENT = 10000
7373
7474 let SELLMULTIPLIER = 200
7575
7676 let BUYMULTIPLIER = 300
7777
7878 let LANDPREFIX = "LAND"
7979
8080 let DUCKPREFIX = "DUCK"
8181
8282 let WHMULTIPLIER = 10000000000
8383
8484 let AUCTIONFEE = 10000
8585
8686 let MINSHOPPAYMENT = 100000
8787
8888 let resTypes = ["Oil", "Ore", "Wood", "Sand", "Clay", "Organic"]
8989
9090 let matTypes = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"]
9191
9292 let prodTypes = ["First Aid Kit", "Backpack", "Food Ration", "Jet Pack", "Shield"]
9393
9494 let continents = ["Americas", "Europe", "Asia", "Africa", "Oceania"]
9595
9696 let productionMatrix = ["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 contIdxAmericas = 0
9999
100100 let contIdxEurope = 1
101101
102102 let contIdxAsia = 2
103103
104104 let contIdxAfrica = 3
105105
106106 let contIdxOceania = 4
107107
108108 let recipeIdxFuel = 0
109109
110110 let recipeIdxMetal = 1
111111
112112 let recipeIdxPlank = 2
113113
114114 let recipeIdxGlass = 3
115115
116116 let recipeIdxPlastic = 4
117117
118118 let recipeIdxProtein = 5
119119
120120 let recipeIdxWeight = 6
121121
122122 let recipeIdxPacksize = 7
123123
124124 let recipeIdxContinent = 8
125125
126126 func keyFactoryWarehouseByIdAndType (factoryId,resType) = ((("factoryWhByContinentAndRes_" + factoryId) + "_") + toString(resType))
127127
128128
129129 func keyOrderByLand (landAssetId) = ("landOrder_" + landAssetId)
130130
131131
132132 func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr)
133133
134134
135135 func keyBackpackByDuck (duckAssetId) = ("backPack_" + duckAssetId)
136136
137137
138138 func keyDuckLocation (duckAssetId) = ("duckLocation_" + duckAssetId)
139139
140140
141141 func keyBlocked () = "contractsBlocked"
142142
143143
144144 func keyLandAssetIdToOwner (assetId) = ("nftOwner_" + assetId)
145145
146146
147147 func keyStakedTimeByAssetId (assetId) = ("stakedTime_" + assetId)
148148
149149
150150 func keyAddressRefBy (addr) = ("accRefBy_" + addr)
151151
152152
153153 let locIdxContinent = 0
154154
155155 let locIdxType = 1
156156
157157 let locIdxId = 2
158158
159159 let bpIdxLevel = 0
160160
161161 let bpIdxRes = 1
162162
163163 let bpIdxMat = 2
164164
165165 let bpIdxProd = 3
166166
167167 let whIdxLevels = 0
168168
169169 let whIdxRes = 1
170170
171171 let whIdxMat = 2
172172
173173 let whIdxProd = 3
174174
175175 let whIdxLOFT = 4
176176
177177 let volLocked = 0
178178
179179 let volOccupied = 1
180180
181181 let volFree = 2
182182
183183 let volTotal = 3
184184
185185 let ordIdxRes = 0
186186
187187 let ordIdxMat = 1
188188
189189 let ordIdxProd = 2
190190
191191 func asString (v) = match v {
192192 case s: String =>
193193 s
194194 case _ =>
195195 throw("fail to cast into String")
196196 }
197197
198198
199199 func getOrder (ordKey) = {
200200 let p = split(valueOrElse(getString(ordKey), "0@0_0@0_0@0_0@0_0@0_0@0:0@0_0@0_0@0_0@0_0@0_0@0:"), ":")
201201 [if ((size(split(p[ordIdxRes], "_")) == NUMRES))
202202 then p[ordIdxRes]
203203 else "0@0_0@0_0@0_0@0_0@0_0@0", if ((size(split(p[ordIdxMat], "_")) == NUMRES))
204204 then p[ordIdxMat]
205205 else "0@0_0@0_0@0_0@0_0@0_0@0", p[ordIdxProd]]
206206 }
207207
208208
209209 func toVolume (amount,pkgSize,isProduct) = if (isProduct)
210210 then {
211211 let pkgs = if ((amount >= 0))
212212 then (((amount + pkgSize) - 1) / pkgSize)
213213 else -((((-(amount) + pkgSize) - 1) / pkgSize))
214214 (pkgs * MULT8)
215215 }
216216 else amount
217217
218218
219-func getWarehouseTotalVolume (volPrefix) = {
220- let parts = split(volPrefix, "_")
221- ((WHMULTIPLIER * (parseIntValue(parts[1]) + 1)) * parseIntValue(parts[0]))
222- }
223-
224-
225-func getWarehouseCurrGoodsVolume (currentWh) = {
226- let goods = currentWh[whIdxProd]
227- if ((goods == ""))
228- then 0
229- else {
230- func sum (acc,item) = {
231- let idx = acc._1
232- let pkgSize = parseIntValue(split(productionMatrix[idx], "_")[recipeIdxPacksize])
233- $Tuple2((idx + 1), (acc._2 + toVolume(parseIntValue(item), pkgSize, true)))
234- }
235-
236-( let $l = split_4C(goods, "_")
237- let $s = size($l)
238- let $acc0 = $Tuple2(0, 0)
239- func $f0_1 ($a,$i) = if (($i >= $s))
240- then $a
241- else sum($a, $l[$i])
242-
243- func $f0_2 ($a,$i) = if (($i >= $s))
244- then $a
245- else throw("List size exceeds 50")
246-
247- $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 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
248- }
249- }
250-
251-
252219 func sellInternal (locId,resType,amount,minPrice) = {
253220 let whKey = keyFactoryWarehouseByIdAndType(locId, resType)
254221 let w0 = valueOrElse(getInteger(whKey), 0)
255222 let r0 = if ((w0 > FACTORYMAXWAREHOUSE))
256223 then 0
257224 else if (((w0 + amount) > FACTORYMAXWAREHOUSE))
258225 then (FACTORYMAXWAREHOUSE - w0)
259226 else amount
260227 let usdtReceived = (fraction(r0, ((SELLMULTIPLIER * RESOURCEPRICEMIN) - fraction(((100 * w0) + (50 * r0)), RESOURCEPRICEMIN, FACTORYMAXWAREHOUSE)), MULT10) + fraction((amount - r0), RESOURCEPRICEMIN, MULT8))
261228 let min99 = (minPrice - (minPrice / 100))
262229 if (((min99 * amount) > (usdtReceived * MULT8)))
263230 then throw((((((((((("Actual price = " + toString(usdtReceived)) + " / ") + toString(amount)) + " < minPrice = ") + toString(minPrice)) + ", (") + locId) + ", ") + resTypes[resType]) + ")"))
264231 else $Tuple2(IntegerEntry(whKey, (w0 + amount)), usdtReceived)
265232 }
266233
267234
268235 func buyInternal (locId,matType,amount,maxPrice) = {
269236 let whKey = keyFactoryWarehouseByIdAndType(locId, matType)
270237 let w0 = valueOrElse(getInteger(whKey), 0)
271238 let m1 = if ((w0 > FACTORYMAXWAREHOUSE))
272239 then min([amount, (w0 - FACTORYMAXWAREHOUSE)])
273240 else 0
274241 let m0 = min([w0, (amount - m1)])
275242 let m = (m0 + m1)
276243 let usdtSpent = (fraction(m0, ((BUYMULTIPLIER * RESOURCEPRICEMIN) - fraction(((100 * w0) - (50 * m0)), RESOURCEPRICEMIN, FACTORYMAXWAREHOUSE)), MULT10) + fraction(m1, (2 * RESOURCEPRICEMIN), MULT8))
277244 let max101 = (maxPrice + (maxPrice / 100))
278245 if (((usdtSpent * MULT8) > (max101 * m)))
279246 then throw((((((((((("Actual price = " + toString(usdtSpent)) + " / ") + toString(m)) + " > maxPrice = ") + toString(maxPrice)) + ", (") + locId) + ", ") + matTypes[matType]) + ")"))
280247 else $Tuple3(IntegerEntry(whKey, (w0 - m)), usdtSpent, m)
281248 }
282249
283250
284251 func getBackpack (bpKey) = {
285252 let p = split(valueOrElse(getString(stakingContract, bpKey), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":")
286253 [toString(valueOrElse(parseInt(p[bpIdxLevel]), 0)), if ((size(split(p[bpIdxRes], "_")) == NUMRES))
287254 then p[bpIdxRes]
288255 else "0_0_0_0_0_0", if ((size(split(p[bpIdxMat], "_")) == NUMRES))
289256 then p[bpIdxMat]
290257 else "0_0_0_0_0_0", p[bpIdxProd]]
291258 }
292259
293260
294261 func checkBlocked () = if (valueOrElse(getBoolean(stakingContract, keyBlocked()), false))
295262 then throw("Contracts are under maintenance")
296263 else unit
297264
298265
299266 func setCommon (acc,item) = {
300267 let j = acc._1
301268 let isProd = acc._8
302269 let pkgSize = if (isProd)
303270 then parseIntValue(split(productionMatrix[j], "_")[recipeIdxPacksize])
304271 else 0
305272 let itemParts = split(item, "@")
306273 if ((size(itemParts) != 2))
307274 then throw("Incorrect order format, should be amount@price")
308275 else {
309276 let newOrdAm = parseIntValue(itemParts[0])
310277 let newOrdPr = parseIntValue(itemParts[1])
311278 let newOrdUsd = fraction(newOrdAm, newOrdPr, MULT8)
312279 let newOrdVol = toVolume(newOrdAm, pkgSize, isProd)
313280 let whInit = if ((size(acc._6) > j))
314281 then parseIntValue(acc._6[j])
315282 else 0
316283 let curOrdParts = split(if ((size(acc._7) > j))
317284 then acc._7[j]
318285 else "0@0", "@")
319286 let curOrdAm = parseIntValue(curOrdParts[0])
320287 let curOrdPr = parseIntValue(curOrdParts[1])
321288 if (if ((0 > curOrdPr))
322289 then true
323290 else (0 > newOrdPr))
324291 then throw("Price can't be negative")
325292 else {
326293 let curOrdUsd = fraction(curOrdAm, curOrdPr, MULT8)
327294 let curOrdVol = toVolume(curOrdAm, pkgSize, isProd)
328295 if ((newOrdAm == 0))
329296 then if ((curOrdAm > 0))
330297 then $Tuple8((j + 1), (acc._2 :+ toString(whInit)), acc._3, acc._4, (acc._5 - curOrdUsd), acc._6, acc._7, isProd)
331298 else $Tuple8((j + 1), (acc._2 :+ toString((whInit - curOrdAm))), acc._3, acc._4, acc._5, acc._6, acc._7, isProd)
332299 else if ((newOrdAm > 0))
333300 then if ((0 > curOrdAm))
334301 then $Tuple8((j + 1), (acc._2 :+ toString((whInit - curOrdAm))), (acc._3 + newOrdVol), acc._4, (acc._5 + newOrdUsd), acc._6, acc._7, isProd)
335302 else $Tuple8((j + 1), (acc._2 :+ toString(whInit)), (acc._3 + newOrdVol), acc._4, ((acc._5 + newOrdUsd) - curOrdUsd), acc._6, acc._7, isProd)
336303 else if ((0 > curOrdAm))
337304 then {
338305 let amDiff = (curOrdAm - newOrdAm)
339306 if ((0 > (whInit - amDiff)))
340307 then throw((((("Attempt to take " + toString(amDiff)) + " from warehouse, but only ") + toString(whInit)) + " available"))
341308 else $Tuple8((j + 1), (acc._2 :+ toString((whInit - amDiff))), acc._3, (acc._4 - newOrdVol), acc._5, acc._6, acc._7, isProd)
342309 }
343310 else if ((0 > (whInit + newOrdAm)))
344311 then throw((((("Attempt to take " + toString(-(newOrdAm))) + " from warehouse, but only ") + toString(whInit)) + " available"))
345312 else $Tuple8((j + 1), (acc._2 :+ toString((whInit + newOrdAm))), acc._3, (acc._4 - newOrdVol), (acc._5 - curOrdUsd), acc._6, acc._7, isProd)
346313 }
347314 }
348315 }
349316
350317
318+func setInternal (currentWh,currentOrd,newOrd) = {
319+ let currWhRes = split(currentWh[whIdxRes], "_")
320+ let currWhMat = split(currentWh[whIdxMat], "_")
321+ let currWhProd = if ((currentWh[whIdxProd] == ""))
322+ then nil
323+ else split(currentWh[whIdxProd], "_")
324+ let currentOrdRes = split(currentOrd[ordIdxRes], "_")
325+ let currentOrdMat = split(currentOrd[ordIdxMat], "_")
326+ let currentOrdProd = if ((currentOrd[ordIdxProd] == ""))
327+ then nil
328+ else split(currentOrd[ordIdxProd], "_")
329+ if ((size(newOrd) != 3))
330+ then throw("cargoListStr should contain exactly 2 ':' separators")
331+ else {
332+ let resParts = split(newOrd[0], "_")
333+ let matParts = split(newOrd[1], "_")
334+ let prodParts = if ((newOrd[2] == ""))
335+ then nil
336+ else split(newOrd[2], "_")
337+ if ((size(resParts) != NUMRES))
338+ then throw("All 6 resources should be passed")
339+ else if ((size(matParts) != NUMRES))
340+ then throw("All 6 materials should be passed")
341+ else {
342+ let r = {
343+ let $l = resParts
344+ let $s = size($l)
345+ let $acc0 = $Tuple8(0, nil, 0, 0, 0, currWhRes, currentOrdRes, false)
346+ func $f0_1 ($a,$i) = if (($i >= $s))
347+ then $a
348+ else setCommon($a, $l[$i])
349+
350+ func $f0_2 ($a,$i) = if (($i >= $s))
351+ then $a
352+ else throw("List size exceeds 6")
353+
354+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
355+ }
356+ let m = {
357+ let $l = matParts
358+ let $s = size($l)
359+ let $acc0 = $Tuple8(0, nil, r._3, r._4, r._5, currWhMat, currentOrdMat, false)
360+ func $f1_1 ($a,$i) = if (($i >= $s))
361+ then $a
362+ else setCommon($a, $l[$i])
363+
364+ func $f1_2 ($a,$i) = if (($i >= $s))
365+ then $a
366+ else throw("List size exceeds 6")
367+
368+ $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6)
369+ }
370+ let p = if ((size(prodParts) != 0))
371+ then {
372+ let $l = prodParts
373+ let $s = size($l)
374+ let $acc0 = $Tuple8(0, nil, m._3, m._4, m._5, currWhProd, currentOrdProd, true)
375+ func $f2_1 ($a,$i) = if (($i >= $s))
376+ then $a
377+ else setCommon($a, $l[$i])
378+
379+ func $f2_2 ($a,$i) = if (($i >= $s))
380+ then $a
381+ else throw("List size exceeds 50")
382+
383+ $f2_2($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($acc0, 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)
384+ }
385+ else $Tuple8(0, currWhProd, m._3, m._4, m._5, currWhProd, currentOrdProd, true)
386+ $Tuple6(r._2, m._2, p._2, p._3, p._4, p._5)
387+ }
388+ }
389+ }
390+
391+
351392 func acceptCommon (acc,bpOrdItem) = {
352393 let j = acc._7
353394 let isProd = acc._12
354395 let pkgSize = if (isProd)
355396 then parseIntValue(split(productionMatrix[j], "_")[recipeIdxPacksize])
356397 else 0
357398 let bpOrdParts = split(bpOrdItem, "@")
358399 if ((size(bpOrdParts) != 2))
359400 then throw("Incorrect order format, should be amount@price")
360401 else {
361402 let bpOrdAm = parseIntValue(bpOrdParts[0])
362403 let bpOrdPr = parseIntValue(bpOrdParts[1])
363404 if ((0 > bpOrdPr))
364405 then throw("Price can't be negative")
365406 else {
366407 let bpOrdUsd = fraction(bpOrdAm, bpOrdPr, MULT8)
367408 let bpInit = if ((size(acc._8) > j))
368409 then parseIntValue(acc._8[j])
369410 else 0
370411 let whInit = if ((size(acc._9) > j))
371412 then parseIntValue(acc._9[j])
372413 else 0
373414 let whOrdParts = split(acc._10[j], "@")
374415 let whOrdAm = parseIntValue(whOrdParts[0])
375416 let whOrdPr = parseIntValue(whOrdParts[1])
376417 if (if ((bpOrdAm != 0))
377418 then (bpOrdPr != whOrdPr)
378419 else false)
379420 then throw(((((("Prices of " + acc._11[j]) + " don't match! WH price=") + toString(whOrdPr)) + ", your price=") + toString(bpOrdPr)))
380421 else {
381422 let whOrdUsd = fraction(whOrdAm, whOrdPr, MULT8)
382423 let deltaVol = toVolume(bpOrdAm, pkgSize, isProd)
383424 if ((bpOrdAm == 0))
384425 then $Tuple12((acc._1 :+ toString(whInit)), (acc._2 :+ acc._10[j]), (acc._3 :+ toString(bpInit)), acc._4, acc._5, acc._6, (acc._7 + 1), acc._8, acc._9, acc._10, acc._11, isProd)
385426 else if ((bpOrdAm > 0))
386427 then if ((0 > whOrdAm))
387428 then if ((bpOrdAm > -(whOrdAm)))
388429 then throw(((((("Attempt to buy " + toString(bpOrdAm)) + " of ") + acc._11[j]) + ", but warehouse only sells ") + toString(-(whOrdAm))))
389430 else $Tuple12((acc._1 :+ toString(whInit)), (acc._2 :+ ((toString((whOrdAm + bpOrdAm)) + "@") + toString(whOrdPr))), (acc._3 :+ toString((bpInit + bpOrdAm))), (acc._4 + deltaVol), acc._5, (acc._6 + bpOrdUsd), (acc._7 + 1), acc._8, acc._9, acc._10, acc._11, isProd)
390431 else throw((("Attempt to buy " + acc._11[j]) + " while warehouse doesn't sell it"))
391432 else if ((whOrdAm > 0))
392433 then if ((-(bpOrdAm) > whOrdAm))
393434 then throw(((((("Attempt to sell " + toString(-(bpOrdAm))) + " of ") + acc._11[j]) + ", but warehouse only buys ") + toString(whOrdAm)))
394435 else if ((-(bpOrdAm) > bpInit))
395436 then throw(((((("Attempt to sell " + toString(-(bpOrdAm))) + ", but you only have ") + toString(bpInit)) + " of ") + acc._11[j]))
396437 else $Tuple12((acc._1 :+ toString((whInit - bpOrdAm))), (acc._2 :+ ((toString((whOrdAm + bpOrdAm)) + "@") + toString(whOrdPr))), (acc._3 :+ toString((bpInit + bpOrdAm))), (acc._4 - deltaVol), (acc._5 - bpOrdUsd), acc._6, (acc._7 + 1), acc._8, acc._9, acc._10, acc._11, isProd)
397438 else throw((("Attempt to sell " + acc._11[j]) + " while warehouse doesn't buy it"))
398439 }
399440 }
400441 }
401442 }
443+
444+
445+@Callable(i)
446+func recalcLockedVolumeREADONLY (landAssetId,wh) = {
447+ let currentOrd = getOrder(keyOrderByLand(landAssetId))
448+ let z = setInternal(wh, currentOrd, currentOrd)
449+ $Tuple2(nil, (z._4 + z._5))
450+ }
451+
402452
403453
404454 @Callable(i)
405455 func constructorV1 (restAddr) = if ((i.caller != this))
406456 then throw("Permission denied")
407457 else [StringEntry(keyRestAddress(), restAddr)]
408458
409459
410460
411461 @Callable(i)
412462 func sellResources (amounts,minPrices) = {
413463 let blocked = checkBlocked()
414464 if ((blocked == blocked))
415465 then {
416466 let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
417467 if ((size(i.payments) != 0))
418468 then throw("sellResources doesn't require any payments")
419469 else {
420470 let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_")
421471 if ((curLocation[locIdxType] != "F"))
422472 then throw(("Duck location type should be Factory, but is " + curLocation[locIdxType]))
423473 else {
424474 let locId = curLocation[locIdxId]
425475 let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
426476 let resList = split(currentPack[bpIdxRes], "_")
427477 func adder (acc,j) = if ((amounts[j] > parseIntValue(resList[j])))
428478 then throw(((((("You have " + resList[j]) + " of ") + resTypes[j]) + ", but tried to sell ") + toString(amounts[j])))
429479 else if ((0 > amounts[j]))
430480 then throw(((("You tried to sell negative amount of " + resTypes[j]) + ": ") + toString(amounts[j])))
431481 else if ((amounts[j] > 0))
432482 then {
433483 let b = sellInternal(locId, j, amounts[j], minPrices[j])
434484 $Tuple3((acc._1 :+ b._1), (acc._2 :+ toString((parseIntValue(resList[j]) - amounts[j]))), (acc._3 + b._2))
435485 }
436486 else $Tuple3(acc._1, (acc._2 :+ resList[j]), acc._3)
437487
438488 let merged = {
439489 let $l = [0, 1, 2, 3, 4, 5]
440490 let $s = size($l)
441491 let $acc0 = $Tuple3(nil, nil, 0)
442492 func $f0_1 ($a,$i) = if (($i >= $s))
443493 then $a
444494 else adder($a, $l[$i])
445495
446496 func $f0_2 ($a,$i) = if (($i >= $s))
447497 then $a
448498 else throw("List size exceeds 6")
449499
450500 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
451501 }
452502 let newPack = makeString([currentPack[bpIdxLevel], makeString(merged._2, "_"), currentPack[bpIdxMat], currentPack[bpIdxProd]], ":")
453503 let result = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
454504 $Tuple2((merged._1 :+ ScriptTransfer(i.caller, merged._3, usdtAssetId)), result)
455505 }
456506 }
457507 }
458508 else throw("Strict value is not equal to itself.")
459509 }
460510
461511
462512
463513 @Callable(i)
464514 func buyMaterials (amounts,maxPrices) = {
465515 let blocked = checkBlocked()
466516 if ((blocked == blocked))
467517 then {
468518 let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
469519 if ((size(i.payments) != 1))
470520 then throw("exactly 1 payment must be attached")
471521 else {
472522 let pmt = i.payments[0]
473523 let amt = pmt.amount
474524 let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment")
475525 if ((pmtAssetId != usdtAssetId))
476526 then throw("USDT payments only!")
477527 else {
478528 let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_")
479529 if ((curLocation[locIdxType] != "F"))
480530 then throw(("Duck location type should be Factory, but is " + curLocation[locIdxType]))
481531 else {
482532 let locId = curLocation[locIdxId]
483533 let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
484534 let matList = split(currentPack[bpIdxMat], "_")
485535 func mUpdater (acc,j) = if ((0 > amounts[j]))
486536 then throw(((("You tried to buy negative amount of " + matTypes[j]) + ": ") + toString(amounts[j])))
487537 else if ((amounts[j] > 0))
488538 then {
489539 let b = buyInternal(locId, j, amounts[j], maxPrices[j])
490540 $Tuple3((acc._1 :+ b._1), (acc._2 :+ toString((parseIntValue(matList[j]) + b._3))), (acc._3 + b._2))
491541 }
492542 else $Tuple3(acc._1, (acc._2 :+ matList[j]), acc._3)
493543
494544 let merged = {
495545 let $l = [0, 1, 2, 3, 4, 5]
496546 let $s = size($l)
497547 let $acc0 = $Tuple3(nil, nil, 0)
498548 func $f0_1 ($a,$i) = if (($i >= $s))
499549 then $a
500550 else mUpdater($a, $l[$i])
501551
502552 func $f0_2 ($a,$i) = if (($i >= $s))
503553 then $a
504554 else throw("List size exceeds 6")
505555
506556 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
507557 }
508558 if ((merged._3 > amt))
509559 then throw(((("Insufficient payment! Attached=" + toString(amt)) + ", required=") + toString(merged._3)))
510560 else {
511561 let newPack = makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], makeString(merged._2, "_"), currentPack[bpIdxProd]], ":")
512562 let result = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
513563 let rest = if (((amt - merged._3) > 0))
514564 then [ScriptTransfer(i.caller, (amt - merged._3), usdtAssetId)]
515565 else nil
516566 let activitiesAmount = (merged._3 / 100)
517567 $Tuple2(((merged._1 ++ rest) :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)), result)
518568 }
519569 }
520570 }
521571 }
522572 }
523573 else throw("Strict value is not equal to itself.")
524574 }
525575
526576
527577
528578 @Callable(i)
529579 func exchangeResources (amounts) = {
530580 let blocked = checkBlocked()
531581 if ((blocked == blocked))
532582 then {
533583 let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
534584 if ((size(i.payments) != 1))
535585 then throw("exactly 1 payment must be attached")
536586 else {
537587 let pmt = i.payments[0]
538588 let amt = pmt.amount
539589 let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment")
540590 if ((pmtAssetId != usdtAssetId))
541591 then throw("USDT payments only!")
542592 else {
543593 let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_")
544594 if ((curLocation[locIdxType] != "F"))
545595 then throw(("Duck location type should be Factory, but is " + curLocation[locIdxType]))
546596 else {
547597 let locId = curLocation[locIdxId]
548598 let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
549599 let resList = split(currentPack[bpIdxRes], "_")
550600 let matList = split(currentPack[bpIdxMat], "_")
551601 func exchanger (acc,j) = {
552602 let whKey = keyFactoryWarehouseByIdAndType(locId, j)
553603 let w0 = valueOrElse(getInteger(whKey), 0)
554604 let amj = amounts[j]
555605 if ((amj > parseIntValue(resList[j])))
556606 then throw(((((("You have " + resList[j]) + " of ") + resTypes[j]) + ", but tried to exchange ") + toString(amj)))
557607 else if ((0 > amj))
558608 then throw(((("You tried to exchange negative amount of " + resTypes[j]) + ": ") + toString(amj)))
559609 else if ((amj > 0))
560610 then $Tuple4((acc._1 :+ toString((parseIntValue(resList[j]) - amj))), (acc._2 :+ toString((parseIntValue(matList[j]) + amj))), (acc._3 + fraction(amj, RESOURCEPRICEMIN, MULT8)), (acc._4 :+ IntegerEntry(whKey, w0)))
561611 else $Tuple4((acc._1 :+ resList[j]), (acc._2 :+ matList[j]), acc._3, acc._4)
562612 }
563613
564614 let merged = {
565615 let $l = [0, 1, 2, 3, 4, 5]
566616 let $s = size($l)
567617 let $acc0 = $Tuple4(nil, nil, 0, nil)
568618 func $f0_1 ($a,$i) = if (($i >= $s))
569619 then $a
570620 else exchanger($a, $l[$i])
571621
572622 func $f0_2 ($a,$i) = if (($i >= $s))
573623 then $a
574624 else throw("List size exceeds 6")
575625
576626 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
577627 }
578628 if ((merged._3 > amt))
579629 then throw(((("Insufficient payment! Attached=" + toString(amt)) + ", required=") + toString(merged._3)))
580630 else {
581631 let newPack = makeString([currentPack[bpIdxLevel], makeString(merged._1, "_"), makeString(merged._2, "_"), currentPack[bpIdxProd]], ":")
582632 let result = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
583633 let rest = if (((amt - merged._3) > 0))
584634 then [ScriptTransfer(i.caller, (amt - merged._3), usdtAssetId)]
585635 else nil
586636 let activitiesAmount = (merged._3 / 100)
587637 $Tuple2(((rest ++ merged._4) :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)), result)
588638 }
589639 }
590640 }
591641 }
592642 }
593643 else throw("Strict value is not equal to itself.")
594644 }
595645
596646
597647
598648 @Callable(i)
599649 func craftGoods (productIdx,quantity) = {
600650 let blocked = checkBlocked()
601651 if ((blocked == blocked))
602652 then if ((size(i.payments) != 1))
603653 then throw("exactly 1 payment must be attached")
604654 else {
605655 let pmt = i.payments[0]
606656 let amt = pmt.amount
607657 let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment")
608658 if ((pmtAssetId != usdtAssetId))
609659 then throw("USDT payments only!")
610660 else if ((amt != MULT6))
611661 then throw("exactly 1 USDT must be attached as payment")
612662 else if ((0 >= quantity))
613663 then throw("Quantity should be positive")
614664 else {
615665 let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
616666 let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_")
617667 if ((curLocation[locIdxType] != "M"))
618668 then throw(("Duck location type should be Manufactory, but is " + curLocation[locIdxType]))
619669 else {
620670 let cont = curLocation[locIdxContinent]
621671 let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
622672 let matList = split(currentPack[bpIdxMat], "_")
623673 if (if ((0 > productIdx))
624674 then true
625675 else (productIdx >= size(productionMatrix)))
626676 then throw(("Unknown product idx=" + toString(productIdx)))
627677 else {
628678 let recipe = split(productionMatrix[productIdx], "_")
629679 if ((size(recipe) != (NUMRES + 3)))
630680 then throw(("Fatal: unknown recipe: " + productionMatrix[productIdx]))
631681 else {
632682 let productContIdx = parseIntValue(recipe[recipeIdxContinent])
633683 if ((continents[productContIdx] != cont))
634684 then throw(((("This product is available in " + continents[productContIdx]) + ", but you are in ") + cont))
635685 else {
636686 let prodList = if ((currentPack[bpIdxProd] == ""))
637687 then nil
638688 else split(currentPack[bpIdxProd], "_")
639689 func filler (acc,ignoredItem) = {
640690 let n = acc._2
641691 let xs = if ((size(prodList) > n))
642692 then prodList[n]
643693 else "0"
644694 let x = parseIntValue(xs)
645695 let amount = (quantity * parseIntValue(recipe[recipeIdxPacksize]))
646696 let y = if ((n == productIdx))
647697 then toString((x + amount))
648698 else xs
649699 $Tuple2((acc._1 :+ y), (n + 1))
650700 }
651701
652702 let bpProd = ( let $l = productionMatrix
653703 let $s = size($l)
654704 let $acc0 = $Tuple2(nil, 0)
655705 func $f0_1 ($a,$i) = if (($i >= $s))
656706 then $a
657707 else filler($a, $l[$i])
658708
659709 func $f0_2 ($a,$i) = if (($i >= $s))
660710 then $a
661711 else throw("List size exceeds 50")
662712
663713 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 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
664714 func producer (acc,j) = {
665715 let needMat = ((parseIntValue(recipe[j]) * MULT7) * quantity)
666716 let haveMat = parseIntValue(matList[j])
667717 if ((needMat > haveMat))
668718 then throw(((((((("You have " + matList[j]) + " of ") + matTypes[j]) + ", but recipe requires ") + toString(needMat)) + " for quantity ") + toString(quantity)))
669719 else if ((needMat > 0))
670720 then (acc :+ toString((haveMat - needMat)))
671721 else (acc :+ matList[j])
672722 }
673723
674724 let merged = {
675725 let $l = [0, 1, 2, 3, 4, 5]
676726 let $s = size($l)
677727 let $acc0 = nil
678728 func $f1_1 ($a,$i) = if (($i >= $s))
679729 then $a
680730 else producer($a, $l[$i])
681731
682732 func $f1_2 ($a,$i) = if (($i >= $s))
683733 then $a
684734 else throw("List size exceeds 6")
685735
686736 $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6)
687737 }
688738 let newPack = makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], makeString(merged, "_"), makeString(bpProd, "_")], ":")
689739 let result = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
690740 $Tuple2(nil, result)
691741 }
692742 }
693743 }
694744 }
695745 }
696746 }
697747 else throw("Strict value is not equal to itself.")
698748 }
699749
700750
701751
702752 @Callable(i)
703753 func setWarehouseOrder (cargoListStr,landAssetId) = {
704754 let user = i.originCaller
705755 let addr = toString(user)
706756 let result = if ((user != restContract))
707757 then checkBlocked()
708758 else false
709759 let asset = value(assetInfo(fromBase58String(landAssetId)))
710760 if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)))))
711761 then throw((("NFT " + asset.name) + " is not staked"))
712762 else {
713763 let owner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned"))
714764 if (if ((user != restContract))
715765 then (owner != addr)
716766 else false)
717767 then throw((LANDPREFIX + " is not yours"))
718768 else {
719769 let cargoParts = split_4C(cargoListStr, ":")
720- if ((size(cargoParts) != 3))
721- then throw("cargoListStr should contain exactly 2 ':' separators")
722- else {
723- let resParts = split(cargoParts[0], "_")
724- let matParts = split(cargoParts[1], "_")
725- let prodParts = if ((cargoParts[2] == ""))
726- then nil
727- else split(cargoParts[2], "_")
728- if ((size(resParts) != NUMRES))
729- then throw("All 6 resources should be passed")
730- else if ((size(matParts) != NUMRES))
731- then throw("All 6 materials should be passed")
732- else {
733- let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil))
734- let currentWh = split_4C(wh, ":")
735- let currWhRes = split(currentWh[whIdxRes], "_")
736- let currWhMat = split(currentWh[whIdxMat], "_")
737- let currWhProd = if ((currentWh[whIdxProd] == ""))
738- then nil
739- else split(currentWh[whIdxProd], "_")
740- let loft = split(currentWh[whIdxLOFT], "_")
741- let whOccupied = parseIntValue(loft[volOccupied])
742- let whFree = parseIntValue(loft[volFree])
743- let ordKey = keyOrderByLand(landAssetId)
744- let currentOrd = getOrder(ordKey)
745- let currentOrdRes = split(currentOrd[ordIdxRes], "_")
746- let currentOrdMat = split(currentOrd[ordIdxMat], "_")
747- let currentOrdProd = if ((currentOrd[ordIdxProd] == ""))
748- then nil
749- else split(currentOrd[ordIdxProd], "_")
750- let usdtNeed2Lock = 0
751- let r = {
752- let $l = resParts
753- let $s = size($l)
754- let $acc0 = $Tuple8(0, nil, 0, 0, 0, currWhRes, currentOrdRes, false)
755- func $f0_1 ($a,$i) = if (($i >= $s))
756- then $a
757- else setCommon($a, $l[$i])
758-
759- func $f0_2 ($a,$i) = if (($i >= $s))
760- then $a
761- else throw("List size exceeds 6")
762-
763- $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
764- }
765- let m = {
766- let $l = matParts
767- let $s = size($l)
768- let $acc0 = $Tuple8(0, nil, r._3, r._4, r._5, currWhMat, currentOrdMat, false)
769- func $f1_1 ($a,$i) = if (($i >= $s))
770- then $a
771- else setCommon($a, $l[$i])
772-
773- func $f1_2 ($a,$i) = if (($i >= $s))
774- then $a
775- else throw("List size exceeds 6")
776-
777- $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6)
778- }
779- let p = if ((size(prodParts) != 0))
780- then {
781- let $l = prodParts
782- let $s = size($l)
783- let $acc0 = $Tuple8(0, nil, m._3, m._4, m._5, currWhProd, currentOrdProd, true)
784- func $f2_1 ($a,$i) = if (($i >= $s))
785- then $a
786- else setCommon($a, $l[$i])
787-
788- func $f2_2 ($a,$i) = if (($i >= $s))
789- then $a
790- else throw("List size exceeds 50")
791-
792- $f2_2($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($acc0, 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)
793- }
794- else $Tuple8(0, currWhProd, m._3, m._4, m._5, currWhProd, currentOrdProd, true)
795- let buyVolSaldo = p._3
796- let sellVolSaldo = p._4
797- if ((buyVolSaldo > whFree))
798- then throw((((("Attempt to reserve " + toString(buyVolSaldo)) + " space for buy orders, but only ") + toString(whFree)) + " warehouse empty space left"))
799- else if ((sellVolSaldo > whOccupied))
800- then throw((((("Attempt to lock " + toString(sellVolSaldo)) + " space for sell orders, but only ") + toString(whOccupied)) + " warehouse space occupied"))
770+ let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil))
771+ let currentWh = split_4C(wh, ":")
772+ let loft = split(currentWh[whIdxLOFT], "_")
773+ let whOccupied = parseIntValue(loft[volOccupied])
774+ let whFree = parseIntValue(loft[volFree])
775+ let ordKey = keyOrderByLand(landAssetId)
776+ let currentOrd = getOrder(ordKey)
777+ let z = setInternal(currentWh, currentOrd, cargoParts)
778+ let buyVolSaldo = z._4
779+ let sellVolSaldo = z._5
780+ if ((buyVolSaldo > whFree))
781+ then throw((((("Attempt to reserve " + toString(buyVolSaldo)) + " space for buy orders, but only ") + toString(whFree)) + " warehouse empty space left"))
782+ else if ((sellVolSaldo > whOccupied))
783+ then throw((((("Attempt to lock " + toString(sellVolSaldo)) + " space for sell orders, but only ") + toString(whOccupied)) + " warehouse space occupied"))
784+ else {
785+ let whStr = makeString_2C([currentWh[whIdxLevels], makeString(z._1, "_"), makeString(z._2, "_"), makeString(z._3, "_"), toString((buyVolSaldo + sellVolSaldo))], ":")
786+ let whSave = invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil)
787+ if ((whSave == whSave))
788+ then {
789+ let usdSaldo = z._6
790+ let actions = if ((usdSaldo > 0))
791+ then if ((size(i.payments) != 1))
792+ then throw("exactly 1 payment must be attached")
801793 else {
802- let whStr = makeString_2C([currentWh[whIdxLevels], makeString(r._2, "_"), makeString(m._2, "_"), makeString(p._2, "_"), toString((buyVolSaldo + sellVolSaldo))], ":")
803- let whSave = invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil)
804- if ((whSave == whSave))
805- then {
806- let usdSaldo = p._5
807- let actions = if ((usdSaldo > 0))
808- then if ((size(i.payments) != 1))
809- then throw("exactly 1 payment must be attached")
810- else {
811- let pmt = i.payments[0]
812- let amt = pmt.amount
813- let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment")
814- if ((pmtAssetId != usdtAssetId))
815- then throw("USDT payments only!")
816- else if ((amt != usdSaldo))
817- then throw(("Payment needed is " + toString(usdSaldo)))
818- else [StringEntry(ordKey, cargoListStr)]
819- }
820- else if ((usdSaldo == 0))
821- then if ((size(i.payments) != 0))
822- then throw("No payments needed")
823- else [StringEntry(ordKey, cargoListStr)]
824- else if ((size(i.payments) != 0))
825- then throw("No payments needed")
826- else [ScriptTransfer(addressFromStringValue(owner), -(usdSaldo), usdtAssetId), StringEntry(ordKey, cargoListStr)]
827- $Tuple2(actions, result)
828- }
829- else throw("Strict value is not equal to itself.")
794+ let pmt = i.payments[0]
795+ let amt = pmt.amount
796+ let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment")
797+ if ((pmtAssetId != usdtAssetId))
798+ then throw("USDT payments only!")
799+ else if ((amt != usdSaldo))
800+ then throw(("Payment needed is " + toString(usdSaldo)))
801+ else [StringEntry(ordKey, cargoListStr)]
830802 }
803+ else if ((usdSaldo == 0))
804+ then if ((size(i.payments) != 0))
805+ then throw("No payments needed")
806+ else [StringEntry(ordKey, cargoListStr)]
807+ else if ((size(i.payments) != 0))
808+ then throw("No payments needed")
809+ else [ScriptTransfer(addressFromStringValue(owner), -(usdSaldo), usdtAssetId), StringEntry(ordKey, cargoListStr)]
810+ $Tuple2(actions, result)
831811 }
832- }
812+ else throw("Strict value is not equal to itself.")
813+ }
833814 }
834815 }
835816 }
836817
837818
838819
839820 @Callable(i)
840821 func acceptWarehouseOrder (bpOrderStr,landAssetId,duckAssetId) = {
841822 let blocked = checkBlocked()
842823 if ((blocked == blocked))
843824 then {
844825 let caller = i.originCaller
845826 let callerAddr = toString(caller)
846827 let stakedDuckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(callerAddr)), "You don't have a duck staked")
847828 let curLocation = valueOrElse(getString(stakingContract, keyDuckLocation(stakedDuckAssetId)), DEFAULTLOCATION)
848829 let loc = split(value(curLocation), "_")
849830 if ((loc[locIdxType] != "L"))
850831 then throw((("Duck location type is " + loc[locIdxType]) + ", but should be L"))
851832 else if ((stakedDuckAssetId != duckAssetId))
852833 then throw(((("Your staked duck is " + stakedDuckAssetId) + ", but passed ") + duckAssetId))
853834 else {
854835 let landAsset = value(assetInfo(fromBase58String(landAssetId)))
855836 if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)))))
856837 then throw((("NFT " + landAsset.name) + " is not staked"))
857838 else {
858839 let landOwner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(landAssetId)), (("NFT " + landAsset.name) + " is orphaned"))
859840 if ((landOwner == callerAddr))
860841 then throw("You cannot trade with yourself")
861842 else {
862843 let bpOrderParts = split_4C(bpOrderStr, ":")
863844 if ((size(bpOrderParts) != 3))
864845 then throw("bpOrderStr should contain exactly 2 ':' separators")
865846 else {
866847 let bpOrdRes = split(bpOrderParts[0], "_")
867848 let bpOrdMat = split(bpOrderParts[1], "_")
868849 let bpOrdProd = if ((bpOrderParts[2] == ""))
869850 then nil
870851 else split(bpOrderParts[2], "_")
871852 if ((size(bpOrdRes) != NUMRES))
872853 then throw("All 6 resources should be passed")
873854 else if ((size(bpOrdMat) != NUMRES))
874855 then throw("All 6 materials should be passed")
875856 else {
876857 let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil))
877858 let currentWh = split_4C(wh, ":")
878859 let currWhRes = split(currentWh[whIdxRes], "_")
879860 let currWhMat = split(currentWh[whIdxMat], "_")
880861 let currWhProd = if ((currentWh[whIdxProd] == ""))
881862 then nil
882863 else split(currentWh[whIdxProd], "_")
883864 let currWhLockedVol = parseIntValue(split(currentWh[whIdxLOFT], "_")[volLocked])
884865 let bpKey = keyBackpackByDuck(duckAssetId)
885866 let currentPack = getBackpack(bpKey)
886867 let bpResList = split(currentPack[bpIdxRes], "_")
887868 let bpMatList = split(currentPack[bpIdxMat], "_")
888869 let bpProdList = if ((currentPack[bpIdxProd] == ""))
889870 then nil
890871 else split(currentPack[bpIdxProd], "_")
891872 let ordKey = keyOrderByLand(landAssetId)
892873 let whOrd = getOrder(ordKey)
893874 let whOrdRes = split(whOrd[ordIdxRes], "_")
894875 let whOrdMat = split(whOrd[ordIdxMat], "_")
895876 let whOrdProd = if ((whOrd[ordIdxProd] == ""))
896877 then nil
897878 else split(whOrd[ordIdxProd], "_")
898- let usdtNeed2Lock = 0
899879 let r = {
900880 let $l = bpOrdRes
901881 let $s = size($l)
902882 let $acc0 = $Tuple12(nil, nil, nil, 0, 0, 0, 0, bpResList, currWhRes, whOrdRes, resTypes, false)
903883 func $f0_1 ($a,$i) = if (($i >= $s))
904884 then $a
905885 else acceptCommon($a, $l[$i])
906886
907887 func $f0_2 ($a,$i) = if (($i >= $s))
908888 then $a
909889 else throw("List size exceeds 6")
910890
911891 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
912892 }
913893 let m = {
914894 let $l = bpOrdMat
915895 let $s = size($l)
916896 let $acc0 = $Tuple12(nil, nil, nil, r._4, r._5, r._6, 0, bpMatList, currWhMat, whOrdMat, matTypes, false)
917897 func $f1_1 ($a,$i) = if (($i >= $s))
918898 then $a
919899 else acceptCommon($a, $l[$i])
920900
921901 func $f1_2 ($a,$i) = if (($i >= $s))
922902 then $a
923903 else throw("List size exceeds 6")
924904
925905 $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6)
926906 }
927907 let p = if ((size(bpOrdProd) != 0))
928908 then {
929909 let $l = bpOrdProd
930910 let $s = size($l)
931911 let $acc0 = $Tuple12(nil, nil, nil, m._4, m._5, m._6, 0, bpProdList, currWhProd, whOrdProd, prodTypes, true)
932912 func $f2_1 ($a,$i) = if (($i >= $s))
933913 then $a
934914 else acceptCommon($a, $l[$i])
935915
936916 func $f2_2 ($a,$i) = if (($i >= $s))
937917 then $a
938918 else throw("List size exceeds 50")
939919
940920 $f2_2($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($acc0, 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)
941921 }
942922 else $Tuple12(currWhProd, whOrdProd, bpProdList, m._4, m._5, m._6, 0, bpProdList, currWhProd, whOrdProd, prodTypes, true)
943923 let volSaldo = p._4
944924 let newLockedVol = if ((0 > (currWhLockedVol - volSaldo)))
945925 then 0
946926 else (currWhLockedVol - volSaldo)
947927 let whStr = makeString_2C([currentWh[whIdxLevels], makeString(r._1, "_"), makeString(m._1, "_"), makeString(p._1, "_"), toString(newLockedVol)], ":")
948928 let newWhOrdStr = makeString_2C([makeString(r._2, "_"), makeString(m._2, "_"), makeString(p._2, "_")], ":")
949929 let newBpStr = makeString_2C([currentPack[bpIdxLevel], makeString(r._3, "_"), makeString(m._3, "_"), makeString(p._3, "_")], ":")
950930 let whSave = invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil)
951931 if ((whSave == whSave))
952932 then {
953933 let bpSave = invoke(stakingContract, "updateBackpack", [duckAssetId, newBpStr], nil)
954934 if ((bpSave == bpSave))
955935 then {
956936 let actions = [StringEntry(ordKey, newWhOrdStr)]
957937 let usdWh2BpSaldo = p._5
958938 let actions1 = if ((usdWh2BpSaldo > 0))
959939 then {
960940 let usdWh2BpFee = fraction(p._5, AUCTIONFEE, MULT6)
961941 let refByKey = keyAddressRefBy(callerAddr)
962942 let refBy = getString(stakingContract, refByKey)
963943 if (isDefined(refBy))
964944 then (((actions :+ ScriptTransfer(caller, (p._5 - (3 * usdWh2BpFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdWh2BpFee, usdtAssetId)) :+ ScriptTransfer(addressFromStringValue(value(refBy)), usdWh2BpFee, usdtAssetId))
965945 else ((actions :+ ScriptTransfer(caller, (p._5 - (3 * usdWh2BpFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdWh2BpFee, usdtAssetId))
966946 }
967947 else actions
968948 let usdBp2WhSaldo = p._6
969949 if ((usdBp2WhSaldo > 0))
970950 then if ((size(i.payments) != 1))
971951 then throw("exactly 1 payment must be attached")
972952 else {
973953 let pmt = i.payments[0]
974954 let amt = pmt.amount
975955 let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment")
976956 if ((pmtAssetId != usdtAssetId))
977957 then throw("USDT payments only!")
978958 else if ((amt != usdBp2WhSaldo))
979959 then throw(("Payment needed is " + toString(usdBp2WhSaldo)))
980960 else if ((MINSHOPPAYMENT > amt))
981961 then throw(("Payment should be at least " + toString(MINSHOPPAYMENT)))
982962 else {
983963 let usdBp2WhFee = fraction(p._6, AUCTIONFEE, MULT6)
984964 let refByKey = keyAddressRefBy(landOwner)
985965 let refBy = getString(stakingContract, refByKey)
986966 if (isDefined(refBy))
987967 then (((actions1 :+ ScriptTransfer(addressFromStringValue(landOwner), (p._6 - (3 * usdBp2WhFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdBp2WhFee, usdtAssetId)) :+ ScriptTransfer(addressFromStringValue(value(refBy)), usdBp2WhFee, usdtAssetId))
988968 else ((actions1 :+ ScriptTransfer(addressFromStringValue(landOwner), (p._6 - (3 * usdBp2WhFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdBp2WhFee, usdtAssetId))
989969 }
990970 }
991971 else if ((size(i.payments) != 0))
992972 then throw("No payments needed")
993973 else actions1
994974 }
995975 else throw("Strict value is not equal to itself.")
996976 }
997977 else throw("Strict value is not equal to itself.")
998978 }
999979 }
1000980 }
1001981 }
1002982 }
1003983 }
1004984 else throw("Strict value is not equal to itself.")
1005985 }
1006986
1007987

github/deemru/w8io/026f985 
112.63 ms