tx · 9idqNa8EzcRooxoadRjadZNMYUuB1PMRVf8nvPdT6BgE

3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep:  -0.03100000 Waves

2023.06.02 19:45 [2605317] smart account 3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep > SELF 0.00000000 Waves

{ "type": 13, "id": "9idqNa8EzcRooxoadRjadZNMYUuB1PMRVf8nvPdT6BgE", "fee": 3100000, "feeAssetId": null, "timestamp": 1685724348335, "version": 2, "chainId": 84, "sender": "3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep", "senderPublicKey": "7v5L7QkXxfkirALdyqmox38QCsa9jtfAtgUfHTh34eWq", "proofs": [ "4uaWeUzSoSwNX6DvFaFPczWC1pe8T3RdNm2Q4xkH58myyUXHtjz7pd5ZDH91DVQMJDzRfL2q5wHBjrJawNDusmRW" ], "script": "base64:BgIxCAISBAoCCBgSAwoBCBIECgIRERIECgIRERIDCgEREgQKAgEBEgQKAggIEgUKAwgICEYABWNoYWluCQDJAQIJAMoBAggFBHRoaXMFYnl0ZXMAAQABAAt1c2R0QXNzZXRJZAQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMAEghNp6sggDP07Ru8qO7ouTvMmC3Qtd+geWqNQj+agP/7kDCQAAAgEBVAUHJG1hdGNoMAEgVbHYn3KHgu/l41uNrAWrZd6aQ6EvFrsF8xq3h6XxxRgJAAIBAg1Vbmtub3duIGNoYWluABVkZWZhdWx0UmVzdEFkZHJlc3NTdHIEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDACIzNQUUN1dkZidmg0TGtQVW5yblUxejNqbmJBMXA5bTNXTmh2AwkAAAIBAVQFByRtYXRjaDACIzNNdW1rR0d6dENLQVhwV0RxeGtkZG9mcVhTVWJxUWt2U0p5CQACAQINVW5rbm93biBjaGFpbgADU0VQAgJfXwAFTVVMVDYAwIQ9AAVNVUxUNwCAreIEAAVNVUxUOACAwtcvAAZNVUxUMTAAgMivoCU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N0BQt1c2RCcDJXaEZlZQULdXNkdEFzc2V0SWQJAQ5TY3JpcHRUcmFuc2ZlcgMJARFAZXh0ck5hdGl2ZSgxMDYyKQEJAQV2YWx1ZQEFBXJlZkJ5BQt1c2RCcDJXaEZlZQULdXNkdEFzc2V0SWQJAM0IAgkAzQgCBQhhY3Rpb25zMQkBDlNjcmlwdFRyYW5zZmVyAwkBEUBleHRyTmF0aXZlKDEwNjIpAQUJbGFuZE93bmVyCQBlAggFAXACXzYJAGgCAAMFC3VzZEJwMldoRmVlBQt1c2R0QXNzZXRJZAkBDlNjcmlwdFRyYW5zZmVyAwUMcmVzdENvbnRyYWN0BQt1c2RCcDJXaEZlZQULdXNkdEFzc2V0SWQDCQECIT0CCQCQAwEIBQFpCHBheW1lbnRzAAAJAAIBAhJObyBwYXltZW50cyBuZWVkZWQFCGFjdGlvbnMxCQCUCgIFCGFjdGlvbnMyCQCVCgMFB2Jsb2NrZWQFBndoU2F2ZQUGYnBTYXZlAJrvlgU=", "height": 2605317, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3wQ8pjGoxB995d3EYL98dkcif5V53i2GoLKQSw62f6sH Next: GfMbtyAJ2t8HJDNRvwkUTqV4jqgibj3i3Ac2NcW23GhP Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let SEP = "__"
5-
6-let MULT6 = 1000000
7-
8-let MULT7 = 10000000
9-
10-let MULT8 = 100000000
11-
12-let MULT10 = 10000000000
13-
144 let chain = take(drop(this.bytes, 1), 1)
155
166 let usdtAssetId = match chain {
3121 else throw("Unknown chain")
3222 }
3323
24+let SEP = "__"
25+
26+let MULT6 = 1000000
27+
28+let MULT7 = 10000000
29+
30+let MULT8 = 100000000
31+
32+let MULT10 = 10000000000
33+
34+let LANDPREFIX = "LAND"
35+
36+let NUMRES = 6
37+
38+let DEFAULTLOCATION = "Africa_F_Africa"
39+
40+let RESOURCEPRICEMIN = 39637
41+
42+let resTypes = ["Oil", "Ore", "Wood", "Sand", "Clay", "Organic"]
43+
44+let matTypes = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"]
45+
46+let prodTypes = ["First Aid Kit", "Backpack", "Food Ration", "Jet Pack", "Shield"]
47+
48+let continents = ["Asia", "Europe", "Americas", "Oceania", "Africa"]
49+
50+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"]
51+
52+let recipeIdxPacksize = 7
53+
54+let recipeIdxContinent = 8
55+
56+let whIdxLevels = 0
57+
58+let whIdxRes = 1
59+
60+let whIdxMat = 2
61+
62+let whIdxProd = 3
63+
64+let whIdxLOFT = 4
65+
66+let volLocked = 0
67+
68+let volOccupied = 1
69+
70+let volTotal = 3
71+
72+let bpIdxLevel = 0
73+
74+let bpIdxRes = 1
75+
76+let bpIdxMat = 2
77+
78+let bpIdxProd = 3
79+
3480 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
3581
3682
37-func getIntOrElse (key,defaultVal) = valueOrElse(getInteger(this, key), defaultVal)
38-
39-
4083 let IdxCfgStakingDapp = 1
41-
42-let IdxCfgEconomyDapp = 2
43-
44-let IdxCfgGovernanceDapp = 3
4584
4685 func keyRestCfg () = "%s__restConfig"
4786
61100
62101 let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp)
63102
64-let DEFAULTLOCATION = "Africa_F_Africa"
65-
66-let NUMRES = 6
67-
68103 let FACTORYMAXWAREHOUSE = 10000000000
69-
70-let RESOURCEPRICEMIN = 39637
71-
72-let MINPAYMENT = 10000
73104
74105 let SELLMULTIPLIER = 200
75106
76107 let BUYMULTIPLIER = 300
77108
78-let LANDPREFIX = "LAND"
79-
80-let DUCKPREFIX = "DUCK"
81-
82-let WHMULTIPLIER = 10000000000
83-
84109 let AUCTIONFEE = 10000
85110
86111 let MINSHOPPAYMENT = 100000
87-
88-let resTypes = ["Oil", "Ore", "Wood", "Sand", "Clay", "Organic"]
89-
90-let matTypes = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"]
91-
92-let prodTypes = ["First Aid Kit", "Backpack", "Food Ration", "Jet Pack", "Shield"]
93-
94-let continents = ["Americas", "Europe", "Asia", "Africa", "Oceania"]
95-
96-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"]
97-
98-let contIdxAmericas = 0
99-
100-let contIdxEurope = 1
101-
102-let contIdxAsia = 2
103-
104-let contIdxAfrica = 3
105-
106-let contIdxOceania = 4
107-
108-let recipeIdxFuel = 0
109-
110-let recipeIdxMetal = 1
111-
112-let recipeIdxPlank = 2
113-
114-let recipeIdxGlass = 3
115-
116-let recipeIdxPlastic = 4
117-
118-let recipeIdxProtein = 5
119-
120-let recipeIdxWeight = 6
121-
122-let recipeIdxPacksize = 7
123-
124-let recipeIdxContinent = 8
125112
126113 func keyFactoryWarehouseByIdAndType (factoryId,resType) = ((("factoryWhByContinentAndRes_" + factoryId) + "_") + toString(resType))
127114
155142 let locIdxType = 1
156143
157144 let locIdxId = 2
158-
159-let bpIdxLevel = 0
160-
161-let bpIdxRes = 1
162-
163-let bpIdxMat = 2
164-
165-let bpIdxProd = 3
166-
167-let whIdxLevels = 0
168-
169-let whIdxRes = 1
170-
171-let whIdxMat = 2
172-
173-let whIdxProd = 3
174-
175-let whIdxLOFT = 4
176-
177-let volLocked = 0
178-
179-let volOccupied = 1
180-
181-let volFree = 2
182-
183-let volTotal = 3
184145
185146 let ordIdxRes = 0
186147
327288 then nil
328289 else split(currentOrd[ordIdxProd], "_")
329290 if ((size(newOrd) != 3))
330- then throw("cargoListStr should contain exactly 2 ':' separators")
291+ then throw("newOrderStr should contain exactly 2 ':' separators")
331292 else {
332293 let resParts = split(newOrd[0], "_")
333294 let matParts = split(newOrd[1], "_")
411372 let whInit = if ((size(acc._9) > j))
412373 then parseIntValue(acc._9[j])
413374 else 0
414- let whOrdParts = split(acc._10[j], "@")
375+ let whOrdInit = if ((size(acc._10) > j))
376+ then acc._10[j]
377+ else "0@0"
378+ let whOrdParts = split(whOrdInit, "@")
415379 let whOrdAm = parseIntValue(whOrdParts[0])
416380 let whOrdPr = parseIntValue(whOrdParts[1])
417381 if (if ((bpOrdAm != 0))
422386 let whOrdUsd = fraction(whOrdAm, whOrdPr, MULT8)
423387 let deltaVol = toVolume(bpOrdAm, pkgSize, isProd)
424388 if ((bpOrdAm == 0))
425- 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)
389+ then $Tuple12((acc._1 :+ toString(whInit)), (acc._2 :+ whOrdInit), (acc._3 :+ toString(bpInit)), acc._4, acc._5, acc._6, (acc._7 + 1), acc._8, acc._9, acc._10, acc._11, isProd)
426390 else if ((bpOrdAm > 0))
427391 then if ((0 > whOrdAm))
428392 then if ((bpOrdAm > -(whOrdAm)))
750714
751715
752716 @Callable(i)
753-func setWarehouseOrder (cargoListStr,landAssetId) = {
717+func setWarehouseOrder (newOrderStr,landAssetId) = {
754718 let user = i.originCaller
755719 let addr = toString(user)
756720 let result = if ((user != restContract))
766730 else false)
767731 then throw((LANDPREFIX + " is not yours"))
768732 else {
769- let cargoParts = split_4C(cargoListStr, ":")
733+ let newOrder = split_4C(newOrderStr, ":")
770734 let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil))
771735 let currentWh = split_4C(wh, ":")
772736 let loft = split(currentWh[whIdxLOFT], "_")
774738 let whTotal = parseIntValue(loft[volTotal])
775739 let ordKey = keyOrderByLand(landAssetId)
776740 let currentOrd = getOrder(ordKey)
777- let z = setInternal(currentWh, currentOrd, cargoParts)
741+ let z = setInternal(currentWh, currentOrd, newOrder)
778742 let buyVolSaldo = z._4
779743 let sellVolSaldo = z._5
780744 let whLocked = (buyVolSaldo + sellVolSaldo)
781745 let whFree = ((whTotal - whOccupied) - whLocked)
782- if ((buyVolSaldo > whFree))
783- then throw((((("Attempt to reserve " + toString(buyVolSaldo)) + " space for buy orders, but only ") + toString(whFree)) + " warehouse empty space left"))
784- else if ((sellVolSaldo > whOccupied))
785- then throw((((("Attempt to lock " + toString(sellVolSaldo)) + " space for sell orders, but only ") + toString(whOccupied)) + " warehouse space occupied"))
786- else {
787- let whStr = makeString_2C([currentWh[whIdxLevels], makeString(z._1, "_"), makeString(z._2, "_"), makeString(z._3, "_"), toString(whLocked)], ":")
788- let whSave = invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil)
789- if ((whSave == whSave))
790- then {
791- let usdSaldo = z._6
792- let actions = if ((usdSaldo > 0))
793- then if ((size(i.payments) != 1))
794- then throw("exactly 1 payment must be attached")
795- else {
796- let pmt = i.payments[0]
797- let amt = pmt.amount
798- let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment")
799- if ((pmtAssetId != usdtAssetId))
800- then throw("USDT payments only!")
801- else if ((amt != usdSaldo))
802- then throw(("Payment needed is " + toString(usdSaldo)))
803- else [StringEntry(ordKey, cargoListStr)]
804- }
805- else if ((usdSaldo == 0))
806- then if ((size(i.payments) != 0))
807- then throw("No payments needed")
808- else [StringEntry(ordKey, cargoListStr)]
809- else if ((size(i.payments) != 0))
810- then throw("No payments needed")
811- else [ScriptTransfer(addressFromStringValue(owner), -(usdSaldo), usdtAssetId), StringEntry(ordKey, cargoListStr)]
812- $Tuple2(actions, result)
746+ if ((0 > whFree))
747+ then throw((((("Attempt to reserve " + toString(buyVolSaldo)) + " space for buy orders, and ") + toString(sellVolSaldo)) + " space for sell orders, leads to negative free space"))
748+ else {
749+ let whStr = makeString_2C([currentWh[whIdxLevels], makeString(z._1, "_"), makeString(z._2, "_"), makeString(z._3, "_"), toString(whLocked)], ":")
750+ let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil))
751+ let usdSaldo = z._6
752+ let actions = if ((usdSaldo > 0))
753+ then if ((size(i.payments) != 1))
754+ then throw("exactly 1 payment must be attached")
755+ else {
756+ let pmt = i.payments[0]
757+ let amt = pmt.amount
758+ let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment")
759+ if ((pmtAssetId != usdtAssetId))
760+ then throw("USDT payments only!")
761+ else if ((amt != usdSaldo))
762+ then throw(("Payment needed is " + toString(usdSaldo)))
763+ else [StringEntry(ordKey, newOrderStr)]
813764 }
814- else throw("Strict value is not equal to itself.")
815- }
765+ else if ((usdSaldo == 0))
766+ then if ((size(i.payments) != 0))
767+ then throw("No payments needed")
768+ else [StringEntry(ordKey, newOrderStr)]
769+ else if ((size(i.payments) != 0))
770+ then throw("No payments needed")
771+ else [ScriptTransfer(addressFromStringValue(owner), -(usdSaldo), usdtAssetId), StringEntry(ordKey, newOrderStr)]
772+ $Tuple2(actions, $Tuple2(result, whSave))
773+ }
816774 }
817775 }
818776 }
822780 @Callable(i)
823781 func acceptWarehouseOrder (bpOrderStr,landAssetId,duckAssetId) = {
824782 let blocked = checkBlocked()
825- if ((blocked == blocked))
826- then {
827- let caller = i.originCaller
828- let callerAddr = toString(caller)
829- let stakedDuckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(callerAddr)), "You don't have a duck staked")
830- let curLocation = valueOrElse(getString(stakingContract, keyDuckLocation(stakedDuckAssetId)), DEFAULTLOCATION)
831- let loc = split(value(curLocation), "_")
832- if ((loc[locIdxType] != "L"))
833- then throw((("Duck location type is " + loc[locIdxType]) + ", but should be L"))
834- else if ((stakedDuckAssetId != duckAssetId))
835- then throw(((("Your staked duck is " + stakedDuckAssetId) + ", but passed ") + duckAssetId))
783+ let caller = i.originCaller
784+ let callerAddr = toString(caller)
785+ let stakedDuckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(callerAddr)), "You don't have a duck staked")
786+ let curLocation = valueOrElse(getString(stakingContract, keyDuckLocation(stakedDuckAssetId)), DEFAULTLOCATION)
787+ let loc = split(value(curLocation), "_")
788+ if ((loc[locIdxType] != "L"))
789+ then throw((("Duck location type is " + loc[locIdxType]) + ", but should be L"))
790+ else if ((stakedDuckAssetId != duckAssetId))
791+ then throw(((("Your staked duck is " + stakedDuckAssetId) + ", but passed ") + duckAssetId))
792+ else {
793+ let landAsset = value(assetInfo(fromBase58String(landAssetId)))
794+ if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)))))
795+ then throw((("NFT " + landAsset.name) + " is not staked"))
836796 else {
837- let landAsset = value(assetInfo(fromBase58String(landAssetId)))
838- if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)))))
839- then throw((("NFT " + landAsset.name) + " is not staked"))
797+ let landOwner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(landAssetId)), (("NFT " + landAsset.name) + " is orphaned"))
798+ if ((landOwner == callerAddr))
799+ then throw("You cannot trade with yourself")
840800 else {
841- let landOwner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(landAssetId)), (("NFT " + landAsset.name) + " is orphaned"))
842- if ((landOwner == callerAddr))
843- then throw("You cannot trade with yourself")
801+ let bpOrderParts = split_4C(bpOrderStr, ":")
802+ if ((size(bpOrderParts) != 3))
803+ then throw("bpOrderStr should contain exactly 2 ':' separators")
844804 else {
845- let bpOrderParts = split_4C(bpOrderStr, ":")
846- if ((size(bpOrderParts) != 3))
847- then throw("bpOrderStr should contain exactly 2 ':' separators")
848- else {
849- let bpOrdRes = split(bpOrderParts[0], "_")
850- let bpOrdMat = split(bpOrderParts[1], "_")
851- let bpOrdProd = if ((bpOrderParts[2] == ""))
852- then nil
853- else split(bpOrderParts[2], "_")
854- if ((size(bpOrdRes) != NUMRES))
855- then throw("All 6 resources should be passed")
856- else if ((size(bpOrdMat) != NUMRES))
857- then throw("All 6 materials should be passed")
858- else {
859- let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil))
860- let currentWh = split_4C(wh, ":")
861- let currWhRes = split(currentWh[whIdxRes], "_")
862- let currWhMat = split(currentWh[whIdxMat], "_")
863- let currWhProd = if ((currentWh[whIdxProd] == ""))
864- then nil
865- else split(currentWh[whIdxProd], "_")
866- let currWhLockedVol = parseIntValue(split(currentWh[whIdxLOFT], "_")[volLocked])
867- let bpKey = keyBackpackByDuck(duckAssetId)
868- let currentPack = getBackpack(bpKey)
869- let bpResList = split(currentPack[bpIdxRes], "_")
870- let bpMatList = split(currentPack[bpIdxMat], "_")
871- let bpProdList = if ((currentPack[bpIdxProd] == ""))
872- then nil
873- else split(currentPack[bpIdxProd], "_")
874- let ordKey = keyOrderByLand(landAssetId)
875- let whOrd = getOrder(ordKey)
876- let whOrdRes = split(whOrd[ordIdxRes], "_")
877- let whOrdMat = split(whOrd[ordIdxMat], "_")
878- let whOrdProd = if ((whOrd[ordIdxProd] == ""))
879- then nil
880- else split(whOrd[ordIdxProd], "_")
881- let r = {
882- let $l = bpOrdRes
883- let $s = size($l)
884- let $acc0 = $Tuple12(nil, nil, nil, 0, 0, 0, 0, bpResList, currWhRes, whOrdRes, resTypes, false)
885- func $f0_1 ($a,$i) = if (($i >= $s))
886- then $a
887- else acceptCommon($a, $l[$i])
805+ let bpOrdRes = split(bpOrderParts[0], "_")
806+ let bpOrdMat = split(bpOrderParts[1], "_")
807+ let bpOrdProd = if ((bpOrderParts[2] == ""))
808+ then nil
809+ else split(bpOrderParts[2], "_")
810+ if ((size(bpOrdRes) != NUMRES))
811+ then throw("All 6 resources should be passed")
812+ else if ((size(bpOrdMat) != NUMRES))
813+ then throw("All 6 materials should be passed")
814+ else {
815+ let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil))
816+ let currentWh = split_4C(wh, ":")
817+ let currWhRes = split(currentWh[whIdxRes], "_")
818+ let currWhMat = split(currentWh[whIdxMat], "_")
819+ let currWhProd = if ((currentWh[whIdxProd] == ""))
820+ then nil
821+ else split(currentWh[whIdxProd], "_")
822+ let currWhLockedVol = parseIntValue(split(currentWh[whIdxLOFT], "_")[volLocked])
823+ let bpKey = keyBackpackByDuck(duckAssetId)
824+ let currentPack = getBackpack(bpKey)
825+ let bpResList = split(currentPack[bpIdxRes], "_")
826+ let bpMatList = split(currentPack[bpIdxMat], "_")
827+ let bpProdList = if ((currentPack[bpIdxProd] == ""))
828+ then nil
829+ else split(currentPack[bpIdxProd], "_")
830+ let ordKey = keyOrderByLand(landAssetId)
831+ let whOrd = getOrder(ordKey)
832+ let whOrdRes = split(whOrd[ordIdxRes], "_")
833+ let whOrdMat = split(whOrd[ordIdxMat], "_")
834+ let whOrdProd = if ((whOrd[ordIdxProd] == ""))
835+ then nil
836+ else split(whOrd[ordIdxProd], "_")
837+ let r = {
838+ let $l = bpOrdRes
839+ let $s = size($l)
840+ let $acc0 = $Tuple12(nil, nil, nil, 0, 0, 0, 0, bpResList, currWhRes, whOrdRes, resTypes, false)
841+ func $f0_1 ($a,$i) = if (($i >= $s))
842+ then $a
843+ else acceptCommon($a, $l[$i])
888844
889- func $f0_2 ($a,$i) = if (($i >= $s))
890- then $a
891- else throw("List size exceeds 6")
845+ func $f0_2 ($a,$i) = if (($i >= $s))
846+ then $a
847+ else throw("List size exceeds 6")
892848
893- $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
849+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
850+ }
851+ let m = {
852+ let $l = bpOrdMat
853+ let $s = size($l)
854+ let $acc0 = $Tuple12(nil, nil, nil, r._4, r._5, r._6, 0, bpMatList, currWhMat, whOrdMat, matTypes, false)
855+ func $f1_1 ($a,$i) = if (($i >= $s))
856+ then $a
857+ else acceptCommon($a, $l[$i])
858+
859+ func $f1_2 ($a,$i) = if (($i >= $s))
860+ then $a
861+ else throw("List size exceeds 6")
862+
863+ $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6)
864+ }
865+ let p = if ((size(bpOrdProd) != 0))
866+ then {
867+ let $l = bpOrdProd
868+ let $s = size($l)
869+ let $acc0 = $Tuple12(nil, nil, nil, m._4, m._5, m._6, 0, bpProdList, currWhProd, whOrdProd, prodTypes, true)
870+ func $f2_1 ($a,$i) = if (($i >= $s))
871+ then $a
872+ else acceptCommon($a, $l[$i])
873+
874+ func $f2_2 ($a,$i) = if (($i >= $s))
875+ then $a
876+ else throw("List size exceeds 50")
877+
878+ $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)
879+ }
880+ else $Tuple12(currWhProd, whOrdProd, bpProdList, m._4, m._5, m._6, 0, bpProdList, currWhProd, whOrdProd, prodTypes, true)
881+ let volSaldo = p._4
882+ let newLockedVol = if ((0 > (currWhLockedVol - volSaldo)))
883+ then 0
884+ else (currWhLockedVol - volSaldo)
885+ let whStr = makeString_2C([currentWh[whIdxLevels], makeString(r._1, "_"), makeString(m._1, "_"), makeString(p._1, "_"), toString(newLockedVol)], ":")
886+ let newWhOrdStr = makeString_2C([makeString(r._2, "_"), makeString(m._2, "_"), makeString(p._2, "_")], ":")
887+ let newBpStr = makeString_2C([currentPack[bpIdxLevel], makeString(r._3, "_"), makeString(m._3, "_"), makeString(p._3, "_")], ":")
888+ let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil))
889+ let bpSave = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newBpStr], nil))
890+ let actions = [StringEntry(ordKey, newWhOrdStr)]
891+ let usdWh2BpSaldo = p._5
892+ let actions1 = if ((usdWh2BpSaldo > 0))
893+ then {
894+ let usdWh2BpFee = fraction(p._5, AUCTIONFEE, MULT6)
895+ let refByKey = keyAddressRefBy(callerAddr)
896+ let refBy = getString(stakingContract, refByKey)
897+ if (isDefined(refBy))
898+ then (((actions :+ ScriptTransfer(caller, (p._5 - (3 * usdWh2BpFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdWh2BpFee, usdtAssetId)) :+ ScriptTransfer(addressFromStringValue(value(refBy)), usdWh2BpFee, usdtAssetId))
899+ else ((actions :+ ScriptTransfer(caller, (p._5 - (3 * usdWh2BpFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdWh2BpFee, usdtAssetId))
900+ }
901+ else actions
902+ let usdBp2WhSaldo = p._6
903+ let actions2 = if ((usdBp2WhSaldo > 0))
904+ then if ((size(i.payments) != 1))
905+ then throw("exactly 1 payment must be attached")
906+ else {
907+ let pmt = i.payments[0]
908+ let amt = pmt.amount
909+ let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment")
910+ if ((pmtAssetId != usdtAssetId))
911+ then throw("USDT payments only!")
912+ else if ((amt != usdBp2WhSaldo))
913+ then throw(("Payment needed is " + toString(usdBp2WhSaldo)))
914+ else if ((MINSHOPPAYMENT > amt))
915+ then throw(("Payment should be at least " + toString(MINSHOPPAYMENT)))
916+ else {
917+ let usdBp2WhFee = fraction(p._6, AUCTIONFEE, MULT6)
918+ let refByKey = keyAddressRefBy(landOwner)
919+ let refBy = getString(stakingContract, refByKey)
920+ if (isDefined(refBy))
921+ then (((actions1 :+ ScriptTransfer(addressFromStringValue(landOwner), (p._6 - (3 * usdBp2WhFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdBp2WhFee, usdtAssetId)) :+ ScriptTransfer(addressFromStringValue(value(refBy)), usdBp2WhFee, usdtAssetId))
922+ else ((actions1 :+ ScriptTransfer(addressFromStringValue(landOwner), (p._6 - (3 * usdBp2WhFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdBp2WhFee, usdtAssetId))
923+ }
894924 }
895- let m = {
896- let $l = bpOrdMat
897- let $s = size($l)
898- let $acc0 = $Tuple12(nil, nil, nil, r._4, r._5, r._6, 0, bpMatList, currWhMat, whOrdMat, matTypes, false)
899- func $f1_1 ($a,$i) = if (($i >= $s))
900- then $a
901- else acceptCommon($a, $l[$i])
902-
903- func $f1_2 ($a,$i) = if (($i >= $s))
904- then $a
905- else throw("List size exceeds 6")
906-
907- $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6)
908- }
909- let p = if ((size(bpOrdProd) != 0))
910- then {
911- let $l = bpOrdProd
912- let $s = size($l)
913- let $acc0 = $Tuple12(nil, nil, nil, m._4, m._5, m._6, 0, bpProdList, currWhProd, whOrdProd, prodTypes, true)
914- func $f2_1 ($a,$i) = if (($i >= $s))
915- then $a
916- else acceptCommon($a, $l[$i])
917-
918- func $f2_2 ($a,$i) = if (($i >= $s))
919- then $a
920- else throw("List size exceeds 50")
921-
922- $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)
923- }
924- else $Tuple12(currWhProd, whOrdProd, bpProdList, m._4, m._5, m._6, 0, bpProdList, currWhProd, whOrdProd, prodTypes, true)
925- let volSaldo = p._4
926- let newLockedVol = if ((0 > (currWhLockedVol - volSaldo)))
927- then 0
928- else (currWhLockedVol - volSaldo)
929- let whStr = makeString_2C([currentWh[whIdxLevels], makeString(r._1, "_"), makeString(m._1, "_"), makeString(p._1, "_"), toString(newLockedVol)], ":")
930- let newWhOrdStr = makeString_2C([makeString(r._2, "_"), makeString(m._2, "_"), makeString(p._2, "_")], ":")
931- let newBpStr = makeString_2C([currentPack[bpIdxLevel], makeString(r._3, "_"), makeString(m._3, "_"), makeString(p._3, "_")], ":")
932- let whSave = invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil)
933- if ((whSave == whSave))
934- then {
935- let bpSave = invoke(stakingContract, "updateBackpack", [duckAssetId, newBpStr], nil)
936- if ((bpSave == bpSave))
937- then {
938- let actions = [StringEntry(ordKey, newWhOrdStr)]
939- let usdWh2BpSaldo = p._5
940- let actions1 = if ((usdWh2BpSaldo > 0))
941- then {
942- let usdWh2BpFee = fraction(p._5, AUCTIONFEE, MULT6)
943- let refByKey = keyAddressRefBy(callerAddr)
944- let refBy = getString(stakingContract, refByKey)
945- if (isDefined(refBy))
946- then (((actions :+ ScriptTransfer(caller, (p._5 - (3 * usdWh2BpFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdWh2BpFee, usdtAssetId)) :+ ScriptTransfer(addressFromStringValue(value(refBy)), usdWh2BpFee, usdtAssetId))
947- else ((actions :+ ScriptTransfer(caller, (p._5 - (3 * usdWh2BpFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdWh2BpFee, usdtAssetId))
948- }
949- else actions
950- let usdBp2WhSaldo = p._6
951- if ((usdBp2WhSaldo > 0))
952- then if ((size(i.payments) != 1))
953- then throw("exactly 1 payment must be attached")
954- else {
955- let pmt = i.payments[0]
956- let amt = pmt.amount
957- let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment")
958- if ((pmtAssetId != usdtAssetId))
959- then throw("USDT payments only!")
960- else if ((amt != usdBp2WhSaldo))
961- then throw(("Payment needed is " + toString(usdBp2WhSaldo)))
962- else if ((MINSHOPPAYMENT > amt))
963- then throw(("Payment should be at least " + toString(MINSHOPPAYMENT)))
964- else {
965- let usdBp2WhFee = fraction(p._6, AUCTIONFEE, MULT6)
966- let refByKey = keyAddressRefBy(landOwner)
967- let refBy = getString(stakingContract, refByKey)
968- if (isDefined(refBy))
969- then (((actions1 :+ ScriptTransfer(addressFromStringValue(landOwner), (p._6 - (3 * usdBp2WhFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdBp2WhFee, usdtAssetId)) :+ ScriptTransfer(addressFromStringValue(value(refBy)), usdBp2WhFee, usdtAssetId))
970- else ((actions1 :+ ScriptTransfer(addressFromStringValue(landOwner), (p._6 - (3 * usdBp2WhFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdBp2WhFee, usdtAssetId))
971- }
972- }
973- else if ((size(i.payments) != 0))
974- then throw("No payments needed")
975- else actions1
976- }
977- else throw("Strict value is not equal to itself.")
978- }
979- else throw("Strict value is not equal to itself.")
980- }
981- }
925+ else if ((size(i.payments) != 0))
926+ then throw("No payments needed")
927+ else actions1
928+ $Tuple2(actions2, $Tuple3(blocked, whSave, bpSave))
929+ }
982930 }
983931 }
984932 }
985- }
986- else throw("Strict value is not equal to itself.")
933+ }
987934 }
988935
989936
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let SEP = "__"
5-
6-let MULT6 = 1000000
7-
8-let MULT7 = 10000000
9-
10-let MULT8 = 100000000
11-
12-let MULT10 = 10000000000
13-
144 let chain = take(drop(this.bytes, 1), 1)
155
166 let usdtAssetId = match chain {
177 case _ =>
188 if ((base58'2W' == $match0))
199 then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi'
2010 else if ((base58'2T' == $match0))
2111 then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63'
2212 else throw("Unknown chain")
2313 }
2414
2515 let defaultRestAddressStr = match chain {
2616 case _ =>
2717 if ((base58'2W' == $match0))
2818 then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv"
2919 else if ((base58'2T' == $match0))
3020 then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy"
3121 else throw("Unknown chain")
3222 }
3323
24+let SEP = "__"
25+
26+let MULT6 = 1000000
27+
28+let MULT7 = 10000000
29+
30+let MULT8 = 100000000
31+
32+let MULT10 = 10000000000
33+
34+let LANDPREFIX = "LAND"
35+
36+let NUMRES = 6
37+
38+let DEFAULTLOCATION = "Africa_F_Africa"
39+
40+let RESOURCEPRICEMIN = 39637
41+
42+let resTypes = ["Oil", "Ore", "Wood", "Sand", "Clay", "Organic"]
43+
44+let matTypes = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"]
45+
46+let prodTypes = ["First Aid Kit", "Backpack", "Food Ration", "Jet Pack", "Shield"]
47+
48+let continents = ["Asia", "Europe", "Americas", "Oceania", "Africa"]
49+
50+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"]
51+
52+let recipeIdxPacksize = 7
53+
54+let recipeIdxContinent = 8
55+
56+let whIdxLevels = 0
57+
58+let whIdxRes = 1
59+
60+let whIdxMat = 2
61+
62+let whIdxProd = 3
63+
64+let whIdxLOFT = 4
65+
66+let volLocked = 0
67+
68+let volOccupied = 1
69+
70+let volTotal = 3
71+
72+let bpIdxLevel = 0
73+
74+let bpIdxRes = 1
75+
76+let bpIdxMat = 2
77+
78+let bpIdxProd = 3
79+
3480 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
3581
3682
37-func getIntOrElse (key,defaultVal) = valueOrElse(getInteger(this, key), defaultVal)
38-
39-
4083 let IdxCfgStakingDapp = 1
41-
42-let IdxCfgEconomyDapp = 2
43-
44-let IdxCfgGovernanceDapp = 3
4584
4685 func keyRestCfg () = "%s__restConfig"
4786
4887
4988 func keyRestAddress () = "%s__restAddr"
5089
5190
5291 func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP)
5392
5493
5594 func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx)))
5695
5796
5897 let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr))
5998
6099 let restCfg = readRestCfgOrFail(restContract)
61100
62101 let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp)
63102
64-let DEFAULTLOCATION = "Africa_F_Africa"
65-
66-let NUMRES = 6
67-
68103 let FACTORYMAXWAREHOUSE = 10000000000
69-
70-let RESOURCEPRICEMIN = 39637
71-
72-let MINPAYMENT = 10000
73104
74105 let SELLMULTIPLIER = 200
75106
76107 let BUYMULTIPLIER = 300
77108
78-let LANDPREFIX = "LAND"
79-
80-let DUCKPREFIX = "DUCK"
81-
82-let WHMULTIPLIER = 10000000000
83-
84109 let AUCTIONFEE = 10000
85110
86111 let MINSHOPPAYMENT = 100000
87-
88-let resTypes = ["Oil", "Ore", "Wood", "Sand", "Clay", "Organic"]
89-
90-let matTypes = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"]
91-
92-let prodTypes = ["First Aid Kit", "Backpack", "Food Ration", "Jet Pack", "Shield"]
93-
94-let continents = ["Americas", "Europe", "Asia", "Africa", "Oceania"]
95-
96-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"]
97-
98-let contIdxAmericas = 0
99-
100-let contIdxEurope = 1
101-
102-let contIdxAsia = 2
103-
104-let contIdxAfrica = 3
105-
106-let contIdxOceania = 4
107-
108-let recipeIdxFuel = 0
109-
110-let recipeIdxMetal = 1
111-
112-let recipeIdxPlank = 2
113-
114-let recipeIdxGlass = 3
115-
116-let recipeIdxPlastic = 4
117-
118-let recipeIdxProtein = 5
119-
120-let recipeIdxWeight = 6
121-
122-let recipeIdxPacksize = 7
123-
124-let recipeIdxContinent = 8
125112
126113 func keyFactoryWarehouseByIdAndType (factoryId,resType) = ((("factoryWhByContinentAndRes_" + factoryId) + "_") + toString(resType))
127114
128115
129116 func keyOrderByLand (landAssetId) = ("landOrder_" + landAssetId)
130117
131118
132119 func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr)
133120
134121
135122 func keyBackpackByDuck (duckAssetId) = ("backPack_" + duckAssetId)
136123
137124
138125 func keyDuckLocation (duckAssetId) = ("duckLocation_" + duckAssetId)
139126
140127
141128 func keyBlocked () = "contractsBlocked"
142129
143130
144131 func keyLandAssetIdToOwner (assetId) = ("nftOwner_" + assetId)
145132
146133
147134 func keyStakedTimeByAssetId (assetId) = ("stakedTime_" + assetId)
148135
149136
150137 func keyAddressRefBy (addr) = ("accRefBy_" + addr)
151138
152139
153140 let locIdxContinent = 0
154141
155142 let locIdxType = 1
156143
157144 let locIdxId = 2
158-
159-let bpIdxLevel = 0
160-
161-let bpIdxRes = 1
162-
163-let bpIdxMat = 2
164-
165-let bpIdxProd = 3
166-
167-let whIdxLevels = 0
168-
169-let whIdxRes = 1
170-
171-let whIdxMat = 2
172-
173-let whIdxProd = 3
174-
175-let whIdxLOFT = 4
176-
177-let volLocked = 0
178-
179-let volOccupied = 1
180-
181-let volFree = 2
182-
183-let volTotal = 3
184145
185146 let ordIdxRes = 0
186147
187148 let ordIdxMat = 1
188149
189150 let ordIdxProd = 2
190151
191152 func asString (v) = match v {
192153 case s: String =>
193154 s
194155 case _ =>
195156 throw("fail to cast into String")
196157 }
197158
198159
199160 func getOrder (ordKey) = {
200161 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:"), ":")
201162 [if ((size(split(p[ordIdxRes], "_")) == NUMRES))
202163 then p[ordIdxRes]
203164 else "0@0_0@0_0@0_0@0_0@0_0@0", if ((size(split(p[ordIdxMat], "_")) == NUMRES))
204165 then p[ordIdxMat]
205166 else "0@0_0@0_0@0_0@0_0@0_0@0", p[ordIdxProd]]
206167 }
207168
208169
209170 func toVolume (amount,pkgSize,isProduct) = if (isProduct)
210171 then {
211172 let pkgs = if ((amount >= 0))
212173 then (((amount + pkgSize) - 1) / pkgSize)
213174 else -((((-(amount) + pkgSize) - 1) / pkgSize))
214175 (pkgs * MULT8)
215176 }
216177 else amount
217178
218179
219180 func sellInternal (locId,resType,amount,minPrice) = {
220181 let whKey = keyFactoryWarehouseByIdAndType(locId, resType)
221182 let w0 = valueOrElse(getInteger(whKey), 0)
222183 let r0 = if ((w0 > FACTORYMAXWAREHOUSE))
223184 then 0
224185 else if (((w0 + amount) > FACTORYMAXWAREHOUSE))
225186 then (FACTORYMAXWAREHOUSE - w0)
226187 else amount
227188 let usdtReceived = (fraction(r0, ((SELLMULTIPLIER * RESOURCEPRICEMIN) - fraction(((100 * w0) + (50 * r0)), RESOURCEPRICEMIN, FACTORYMAXWAREHOUSE)), MULT10) + fraction((amount - r0), RESOURCEPRICEMIN, MULT8))
228189 let min99 = (minPrice - (minPrice / 100))
229190 if (((min99 * amount) > (usdtReceived * MULT8)))
230191 then throw((((((((((("Actual price = " + toString(usdtReceived)) + " / ") + toString(amount)) + " < minPrice = ") + toString(minPrice)) + ", (") + locId) + ", ") + resTypes[resType]) + ")"))
231192 else $Tuple2(IntegerEntry(whKey, (w0 + amount)), usdtReceived)
232193 }
233194
234195
235196 func buyInternal (locId,matType,amount,maxPrice) = {
236197 let whKey = keyFactoryWarehouseByIdAndType(locId, matType)
237198 let w0 = valueOrElse(getInteger(whKey), 0)
238199 let m1 = if ((w0 > FACTORYMAXWAREHOUSE))
239200 then min([amount, (w0 - FACTORYMAXWAREHOUSE)])
240201 else 0
241202 let m0 = min([w0, (amount - m1)])
242203 let m = (m0 + m1)
243204 let usdtSpent = (fraction(m0, ((BUYMULTIPLIER * RESOURCEPRICEMIN) - fraction(((100 * w0) - (50 * m0)), RESOURCEPRICEMIN, FACTORYMAXWAREHOUSE)), MULT10) + fraction(m1, (2 * RESOURCEPRICEMIN), MULT8))
244205 let max101 = (maxPrice + (maxPrice / 100))
245206 if (((usdtSpent * MULT8) > (max101 * m)))
246207 then throw((((((((((("Actual price = " + toString(usdtSpent)) + " / ") + toString(m)) + " > maxPrice = ") + toString(maxPrice)) + ", (") + locId) + ", ") + matTypes[matType]) + ")"))
247208 else $Tuple3(IntegerEntry(whKey, (w0 - m)), usdtSpent, m)
248209 }
249210
250211
251212 func getBackpack (bpKey) = {
252213 let p = split(valueOrElse(getString(stakingContract, bpKey), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":")
253214 [toString(valueOrElse(parseInt(p[bpIdxLevel]), 0)), if ((size(split(p[bpIdxRes], "_")) == NUMRES))
254215 then p[bpIdxRes]
255216 else "0_0_0_0_0_0", if ((size(split(p[bpIdxMat], "_")) == NUMRES))
256217 then p[bpIdxMat]
257218 else "0_0_0_0_0_0", p[bpIdxProd]]
258219 }
259220
260221
261222 func checkBlocked () = if (valueOrElse(getBoolean(stakingContract, keyBlocked()), false))
262223 then throw("Contracts are under maintenance")
263224 else unit
264225
265226
266227 func setCommon (acc,item) = {
267228 let j = acc._1
268229 let isProd = acc._8
269230 let pkgSize = if (isProd)
270231 then parseIntValue(split(productionMatrix[j], "_")[recipeIdxPacksize])
271232 else 0
272233 let itemParts = split(item, "@")
273234 if ((size(itemParts) != 2))
274235 then throw("Incorrect order format, should be amount@price")
275236 else {
276237 let newOrdAm = parseIntValue(itemParts[0])
277238 let newOrdPr = parseIntValue(itemParts[1])
278239 let newOrdUsd = fraction(newOrdAm, newOrdPr, MULT8)
279240 let newOrdVol = toVolume(newOrdAm, pkgSize, isProd)
280241 let whInit = if ((size(acc._6) > j))
281242 then parseIntValue(acc._6[j])
282243 else 0
283244 let curOrdParts = split(if ((size(acc._7) > j))
284245 then acc._7[j]
285246 else "0@0", "@")
286247 let curOrdAm = parseIntValue(curOrdParts[0])
287248 let curOrdPr = parseIntValue(curOrdParts[1])
288249 if (if ((0 > curOrdPr))
289250 then true
290251 else (0 > newOrdPr))
291252 then throw("Price can't be negative")
292253 else {
293254 let curOrdUsd = fraction(curOrdAm, curOrdPr, MULT8)
294255 let curOrdVol = toVolume(curOrdAm, pkgSize, isProd)
295256 if ((newOrdAm == 0))
296257 then if ((curOrdAm > 0))
297258 then $Tuple8((j + 1), (acc._2 :+ toString(whInit)), acc._3, acc._4, (acc._5 - curOrdUsd), acc._6, acc._7, isProd)
298259 else $Tuple8((j + 1), (acc._2 :+ toString((whInit - curOrdAm))), acc._3, acc._4, acc._5, acc._6, acc._7, isProd)
299260 else if ((newOrdAm > 0))
300261 then if ((0 > curOrdAm))
301262 then $Tuple8((j + 1), (acc._2 :+ toString((whInit - curOrdAm))), (acc._3 + newOrdVol), acc._4, (acc._5 + newOrdUsd), acc._6, acc._7, isProd)
302263 else $Tuple8((j + 1), (acc._2 :+ toString(whInit)), (acc._3 + newOrdVol), acc._4, ((acc._5 + newOrdUsd) - curOrdUsd), acc._6, acc._7, isProd)
303264 else if ((0 > curOrdAm))
304265 then {
305266 let amDiff = (curOrdAm - newOrdAm)
306267 if ((0 > (whInit - amDiff)))
307268 then throw((((("Attempt to take " + toString(amDiff)) + " from warehouse, but only ") + toString(whInit)) + " available"))
308269 else $Tuple8((j + 1), (acc._2 :+ toString((whInit - amDiff))), acc._3, (acc._4 - newOrdVol), acc._5, acc._6, acc._7, isProd)
309270 }
310271 else if ((0 > (whInit + newOrdAm)))
311272 then throw((((("Attempt to take " + toString(-(newOrdAm))) + " from warehouse, but only ") + toString(whInit)) + " available"))
312273 else $Tuple8((j + 1), (acc._2 :+ toString((whInit + newOrdAm))), acc._3, (acc._4 - newOrdVol), (acc._5 - curOrdUsd), acc._6, acc._7, isProd)
313274 }
314275 }
315276 }
316277
317278
318279 func setInternal (currentWh,currentOrd,newOrd) = {
319280 let currWhRes = split(currentWh[whIdxRes], "_")
320281 let currWhMat = split(currentWh[whIdxMat], "_")
321282 let currWhProd = if ((currentWh[whIdxProd] == ""))
322283 then nil
323284 else split(currentWh[whIdxProd], "_")
324285 let currentOrdRes = split(currentOrd[ordIdxRes], "_")
325286 let currentOrdMat = split(currentOrd[ordIdxMat], "_")
326287 let currentOrdProd = if ((currentOrd[ordIdxProd] == ""))
327288 then nil
328289 else split(currentOrd[ordIdxProd], "_")
329290 if ((size(newOrd) != 3))
330- then throw("cargoListStr should contain exactly 2 ':' separators")
291+ then throw("newOrderStr should contain exactly 2 ':' separators")
331292 else {
332293 let resParts = split(newOrd[0], "_")
333294 let matParts = split(newOrd[1], "_")
334295 let prodParts = if ((newOrd[2] == ""))
335296 then nil
336297 else split(newOrd[2], "_")
337298 if ((size(resParts) != NUMRES))
338299 then throw("All 6 resources should be passed")
339300 else if ((size(matParts) != NUMRES))
340301 then throw("All 6 materials should be passed")
341302 else {
342303 let r = {
343304 let $l = resParts
344305 let $s = size($l)
345306 let $acc0 = $Tuple8(0, nil, 0, 0, 0, currWhRes, currentOrdRes, false)
346307 func $f0_1 ($a,$i) = if (($i >= $s))
347308 then $a
348309 else setCommon($a, $l[$i])
349310
350311 func $f0_2 ($a,$i) = if (($i >= $s))
351312 then $a
352313 else throw("List size exceeds 6")
353314
354315 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
355316 }
356317 let m = {
357318 let $l = matParts
358319 let $s = size($l)
359320 let $acc0 = $Tuple8(0, nil, r._3, r._4, r._5, currWhMat, currentOrdMat, false)
360321 func $f1_1 ($a,$i) = if (($i >= $s))
361322 then $a
362323 else setCommon($a, $l[$i])
363324
364325 func $f1_2 ($a,$i) = if (($i >= $s))
365326 then $a
366327 else throw("List size exceeds 6")
367328
368329 $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6)
369330 }
370331 let p = if ((size(prodParts) != 0))
371332 then {
372333 let $l = prodParts
373334 let $s = size($l)
374335 let $acc0 = $Tuple8(0, nil, m._3, m._4, m._5, currWhProd, currentOrdProd, true)
375336 func $f2_1 ($a,$i) = if (($i >= $s))
376337 then $a
377338 else setCommon($a, $l[$i])
378339
379340 func $f2_2 ($a,$i) = if (($i >= $s))
380341 then $a
381342 else throw("List size exceeds 50")
382343
383344 $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)
384345 }
385346 else $Tuple8(0, currWhProd, m._3, m._4, m._5, currWhProd, currentOrdProd, true)
386347 $Tuple6(r._2, m._2, p._2, p._3, p._4, p._5)
387348 }
388349 }
389350 }
390351
391352
392353 func acceptCommon (acc,bpOrdItem) = {
393354 let j = acc._7
394355 let isProd = acc._12
395356 let pkgSize = if (isProd)
396357 then parseIntValue(split(productionMatrix[j], "_")[recipeIdxPacksize])
397358 else 0
398359 let bpOrdParts = split(bpOrdItem, "@")
399360 if ((size(bpOrdParts) != 2))
400361 then throw("Incorrect order format, should be amount@price")
401362 else {
402363 let bpOrdAm = parseIntValue(bpOrdParts[0])
403364 let bpOrdPr = parseIntValue(bpOrdParts[1])
404365 if ((0 > bpOrdPr))
405366 then throw("Price can't be negative")
406367 else {
407368 let bpOrdUsd = fraction(bpOrdAm, bpOrdPr, MULT8)
408369 let bpInit = if ((size(acc._8) > j))
409370 then parseIntValue(acc._8[j])
410371 else 0
411372 let whInit = if ((size(acc._9) > j))
412373 then parseIntValue(acc._9[j])
413374 else 0
414- let whOrdParts = split(acc._10[j], "@")
375+ let whOrdInit = if ((size(acc._10) > j))
376+ then acc._10[j]
377+ else "0@0"
378+ let whOrdParts = split(whOrdInit, "@")
415379 let whOrdAm = parseIntValue(whOrdParts[0])
416380 let whOrdPr = parseIntValue(whOrdParts[1])
417381 if (if ((bpOrdAm != 0))
418382 then (bpOrdPr != whOrdPr)
419383 else false)
420384 then throw(((((("Prices of " + acc._11[j]) + " don't match! WH price=") + toString(whOrdPr)) + ", your price=") + toString(bpOrdPr)))
421385 else {
422386 let whOrdUsd = fraction(whOrdAm, whOrdPr, MULT8)
423387 let deltaVol = toVolume(bpOrdAm, pkgSize, isProd)
424388 if ((bpOrdAm == 0))
425- 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)
389+ then $Tuple12((acc._1 :+ toString(whInit)), (acc._2 :+ whOrdInit), (acc._3 :+ toString(bpInit)), acc._4, acc._5, acc._6, (acc._7 + 1), acc._8, acc._9, acc._10, acc._11, isProd)
426390 else if ((bpOrdAm > 0))
427391 then if ((0 > whOrdAm))
428392 then if ((bpOrdAm > -(whOrdAm)))
429393 then throw(((((("Attempt to buy " + toString(bpOrdAm)) + " of ") + acc._11[j]) + ", but warehouse only sells ") + toString(-(whOrdAm))))
430394 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)
431395 else throw((("Attempt to buy " + acc._11[j]) + " while warehouse doesn't sell it"))
432396 else if ((whOrdAm > 0))
433397 then if ((-(bpOrdAm) > whOrdAm))
434398 then throw(((((("Attempt to sell " + toString(-(bpOrdAm))) + " of ") + acc._11[j]) + ", but warehouse only buys ") + toString(whOrdAm)))
435399 else if ((-(bpOrdAm) > bpInit))
436400 then throw(((((("Attempt to sell " + toString(-(bpOrdAm))) + ", but you only have ") + toString(bpInit)) + " of ") + acc._11[j]))
437401 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)
438402 else throw((("Attempt to sell " + acc._11[j]) + " while warehouse doesn't buy it"))
439403 }
440404 }
441405 }
442406 }
443407
444408
445409 @Callable(i)
446410 func recalcLockedVolumeREADONLY (landAssetId,wh) = {
447411 let currentOrd = getOrder(keyOrderByLand(landAssetId))
448412 let z = setInternal(wh, currentOrd, currentOrd)
449413 $Tuple2(nil, (z._4 + z._5))
450414 }
451415
452416
453417
454418 @Callable(i)
455419 func constructorV1 (restAddr) = if ((i.caller != this))
456420 then throw("Permission denied")
457421 else [StringEntry(keyRestAddress(), restAddr)]
458422
459423
460424
461425 @Callable(i)
462426 func sellResources (amounts,minPrices) = {
463427 let blocked = checkBlocked()
464428 if ((blocked == blocked))
465429 then {
466430 let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
467431 if ((size(i.payments) != 0))
468432 then throw("sellResources doesn't require any payments")
469433 else {
470434 let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_")
471435 if ((curLocation[locIdxType] != "F"))
472436 then throw(("Duck location type should be Factory, but is " + curLocation[locIdxType]))
473437 else {
474438 let locId = curLocation[locIdxId]
475439 let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
476440 let resList = split(currentPack[bpIdxRes], "_")
477441 func adder (acc,j) = if ((amounts[j] > parseIntValue(resList[j])))
478442 then throw(((((("You have " + resList[j]) + " of ") + resTypes[j]) + ", but tried to sell ") + toString(amounts[j])))
479443 else if ((0 > amounts[j]))
480444 then throw(((("You tried to sell negative amount of " + resTypes[j]) + ": ") + toString(amounts[j])))
481445 else if ((amounts[j] > 0))
482446 then {
483447 let b = sellInternal(locId, j, amounts[j], minPrices[j])
484448 $Tuple3((acc._1 :+ b._1), (acc._2 :+ toString((parseIntValue(resList[j]) - amounts[j]))), (acc._3 + b._2))
485449 }
486450 else $Tuple3(acc._1, (acc._2 :+ resList[j]), acc._3)
487451
488452 let merged = {
489453 let $l = [0, 1, 2, 3, 4, 5]
490454 let $s = size($l)
491455 let $acc0 = $Tuple3(nil, nil, 0)
492456 func $f0_1 ($a,$i) = if (($i >= $s))
493457 then $a
494458 else adder($a, $l[$i])
495459
496460 func $f0_2 ($a,$i) = if (($i >= $s))
497461 then $a
498462 else throw("List size exceeds 6")
499463
500464 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
501465 }
502466 let newPack = makeString([currentPack[bpIdxLevel], makeString(merged._2, "_"), currentPack[bpIdxMat], currentPack[bpIdxProd]], ":")
503467 let result = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
504468 $Tuple2((merged._1 :+ ScriptTransfer(i.caller, merged._3, usdtAssetId)), result)
505469 }
506470 }
507471 }
508472 else throw("Strict value is not equal to itself.")
509473 }
510474
511475
512476
513477 @Callable(i)
514478 func buyMaterials (amounts,maxPrices) = {
515479 let blocked = checkBlocked()
516480 if ((blocked == blocked))
517481 then {
518482 let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
519483 if ((size(i.payments) != 1))
520484 then throw("exactly 1 payment must be attached")
521485 else {
522486 let pmt = i.payments[0]
523487 let amt = pmt.amount
524488 let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment")
525489 if ((pmtAssetId != usdtAssetId))
526490 then throw("USDT payments only!")
527491 else {
528492 let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_")
529493 if ((curLocation[locIdxType] != "F"))
530494 then throw(("Duck location type should be Factory, but is " + curLocation[locIdxType]))
531495 else {
532496 let locId = curLocation[locIdxId]
533497 let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
534498 let matList = split(currentPack[bpIdxMat], "_")
535499 func mUpdater (acc,j) = if ((0 > amounts[j]))
536500 then throw(((("You tried to buy negative amount of " + matTypes[j]) + ": ") + toString(amounts[j])))
537501 else if ((amounts[j] > 0))
538502 then {
539503 let b = buyInternal(locId, j, amounts[j], maxPrices[j])
540504 $Tuple3((acc._1 :+ b._1), (acc._2 :+ toString((parseIntValue(matList[j]) + b._3))), (acc._3 + b._2))
541505 }
542506 else $Tuple3(acc._1, (acc._2 :+ matList[j]), acc._3)
543507
544508 let merged = {
545509 let $l = [0, 1, 2, 3, 4, 5]
546510 let $s = size($l)
547511 let $acc0 = $Tuple3(nil, nil, 0)
548512 func $f0_1 ($a,$i) = if (($i >= $s))
549513 then $a
550514 else mUpdater($a, $l[$i])
551515
552516 func $f0_2 ($a,$i) = if (($i >= $s))
553517 then $a
554518 else throw("List size exceeds 6")
555519
556520 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
557521 }
558522 if ((merged._3 > amt))
559523 then throw(((("Insufficient payment! Attached=" + toString(amt)) + ", required=") + toString(merged._3)))
560524 else {
561525 let newPack = makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], makeString(merged._2, "_"), currentPack[bpIdxProd]], ":")
562526 let result = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
563527 let rest = if (((amt - merged._3) > 0))
564528 then [ScriptTransfer(i.caller, (amt - merged._3), usdtAssetId)]
565529 else nil
566530 let activitiesAmount = (merged._3 / 100)
567531 $Tuple2(((merged._1 ++ rest) :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)), result)
568532 }
569533 }
570534 }
571535 }
572536 }
573537 else throw("Strict value is not equal to itself.")
574538 }
575539
576540
577541
578542 @Callable(i)
579543 func exchangeResources (amounts) = {
580544 let blocked = checkBlocked()
581545 if ((blocked == blocked))
582546 then {
583547 let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
584548 if ((size(i.payments) != 1))
585549 then throw("exactly 1 payment must be attached")
586550 else {
587551 let pmt = i.payments[0]
588552 let amt = pmt.amount
589553 let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment")
590554 if ((pmtAssetId != usdtAssetId))
591555 then throw("USDT payments only!")
592556 else {
593557 let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_")
594558 if ((curLocation[locIdxType] != "F"))
595559 then throw(("Duck location type should be Factory, but is " + curLocation[locIdxType]))
596560 else {
597561 let locId = curLocation[locIdxId]
598562 let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
599563 let resList = split(currentPack[bpIdxRes], "_")
600564 let matList = split(currentPack[bpIdxMat], "_")
601565 func exchanger (acc,j) = {
602566 let whKey = keyFactoryWarehouseByIdAndType(locId, j)
603567 let w0 = valueOrElse(getInteger(whKey), 0)
604568 let amj = amounts[j]
605569 if ((amj > parseIntValue(resList[j])))
606570 then throw(((((("You have " + resList[j]) + " of ") + resTypes[j]) + ", but tried to exchange ") + toString(amj)))
607571 else if ((0 > amj))
608572 then throw(((("You tried to exchange negative amount of " + resTypes[j]) + ": ") + toString(amj)))
609573 else if ((amj > 0))
610574 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)))
611575 else $Tuple4((acc._1 :+ resList[j]), (acc._2 :+ matList[j]), acc._3, acc._4)
612576 }
613577
614578 let merged = {
615579 let $l = [0, 1, 2, 3, 4, 5]
616580 let $s = size($l)
617581 let $acc0 = $Tuple4(nil, nil, 0, nil)
618582 func $f0_1 ($a,$i) = if (($i >= $s))
619583 then $a
620584 else exchanger($a, $l[$i])
621585
622586 func $f0_2 ($a,$i) = if (($i >= $s))
623587 then $a
624588 else throw("List size exceeds 6")
625589
626590 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
627591 }
628592 if ((merged._3 > amt))
629593 then throw(((("Insufficient payment! Attached=" + toString(amt)) + ", required=") + toString(merged._3)))
630594 else {
631595 let newPack = makeString([currentPack[bpIdxLevel], makeString(merged._1, "_"), makeString(merged._2, "_"), currentPack[bpIdxProd]], ":")
632596 let result = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
633597 let rest = if (((amt - merged._3) > 0))
634598 then [ScriptTransfer(i.caller, (amt - merged._3), usdtAssetId)]
635599 else nil
636600 let activitiesAmount = (merged._3 / 100)
637601 $Tuple2(((rest ++ merged._4) :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)), result)
638602 }
639603 }
640604 }
641605 }
642606 }
643607 else throw("Strict value is not equal to itself.")
644608 }
645609
646610
647611
648612 @Callable(i)
649613 func craftGoods (productIdx,quantity) = {
650614 let blocked = checkBlocked()
651615 if ((blocked == blocked))
652616 then if ((size(i.payments) != 1))
653617 then throw("exactly 1 payment must be attached")
654618 else {
655619 let pmt = i.payments[0]
656620 let amt = pmt.amount
657621 let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment")
658622 if ((pmtAssetId != usdtAssetId))
659623 then throw("USDT payments only!")
660624 else if ((amt != MULT6))
661625 then throw("exactly 1 USDT must be attached as payment")
662626 else if ((0 >= quantity))
663627 then throw("Quantity should be positive")
664628 else {
665629 let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
666630 let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_")
667631 if ((curLocation[locIdxType] != "M"))
668632 then throw(("Duck location type should be Manufactory, but is " + curLocation[locIdxType]))
669633 else {
670634 let cont = curLocation[locIdxContinent]
671635 let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
672636 let matList = split(currentPack[bpIdxMat], "_")
673637 if (if ((0 > productIdx))
674638 then true
675639 else (productIdx >= size(productionMatrix)))
676640 then throw(("Unknown product idx=" + toString(productIdx)))
677641 else {
678642 let recipe = split(productionMatrix[productIdx], "_")
679643 if ((size(recipe) != (NUMRES + 3)))
680644 then throw(("Fatal: unknown recipe: " + productionMatrix[productIdx]))
681645 else {
682646 let productContIdx = parseIntValue(recipe[recipeIdxContinent])
683647 if ((continents[productContIdx] != cont))
684648 then throw(((("This product is available in " + continents[productContIdx]) + ", but you are in ") + cont))
685649 else {
686650 let prodList = if ((currentPack[bpIdxProd] == ""))
687651 then nil
688652 else split(currentPack[bpIdxProd], "_")
689653 func filler (acc,ignoredItem) = {
690654 let n = acc._2
691655 let xs = if ((size(prodList) > n))
692656 then prodList[n]
693657 else "0"
694658 let x = parseIntValue(xs)
695659 let amount = (quantity * parseIntValue(recipe[recipeIdxPacksize]))
696660 let y = if ((n == productIdx))
697661 then toString((x + amount))
698662 else xs
699663 $Tuple2((acc._1 :+ y), (n + 1))
700664 }
701665
702666 let bpProd = ( let $l = productionMatrix
703667 let $s = size($l)
704668 let $acc0 = $Tuple2(nil, 0)
705669 func $f0_1 ($a,$i) = if (($i >= $s))
706670 then $a
707671 else filler($a, $l[$i])
708672
709673 func $f0_2 ($a,$i) = if (($i >= $s))
710674 then $a
711675 else throw("List size exceeds 50")
712676
713677 $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
714678 func producer (acc,j) = {
715679 let needMat = ((parseIntValue(recipe[j]) * MULT7) * quantity)
716680 let haveMat = parseIntValue(matList[j])
717681 if ((needMat > haveMat))
718682 then throw(((((((("You have " + matList[j]) + " of ") + matTypes[j]) + ", but recipe requires ") + toString(needMat)) + " for quantity ") + toString(quantity)))
719683 else if ((needMat > 0))
720684 then (acc :+ toString((haveMat - needMat)))
721685 else (acc :+ matList[j])
722686 }
723687
724688 let merged = {
725689 let $l = [0, 1, 2, 3, 4, 5]
726690 let $s = size($l)
727691 let $acc0 = nil
728692 func $f1_1 ($a,$i) = if (($i >= $s))
729693 then $a
730694 else producer($a, $l[$i])
731695
732696 func $f1_2 ($a,$i) = if (($i >= $s))
733697 then $a
734698 else throw("List size exceeds 6")
735699
736700 $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6)
737701 }
738702 let newPack = makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], makeString(merged, "_"), makeString(bpProd, "_")], ":")
739703 let result = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
740704 $Tuple2(nil, result)
741705 }
742706 }
743707 }
744708 }
745709 }
746710 }
747711 else throw("Strict value is not equal to itself.")
748712 }
749713
750714
751715
752716 @Callable(i)
753-func setWarehouseOrder (cargoListStr,landAssetId) = {
717+func setWarehouseOrder (newOrderStr,landAssetId) = {
754718 let user = i.originCaller
755719 let addr = toString(user)
756720 let result = if ((user != restContract))
757721 then checkBlocked()
758722 else false
759723 let asset = value(assetInfo(fromBase58String(landAssetId)))
760724 if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)))))
761725 then throw((("NFT " + asset.name) + " is not staked"))
762726 else {
763727 let owner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned"))
764728 if (if ((user != restContract))
765729 then (owner != addr)
766730 else false)
767731 then throw((LANDPREFIX + " is not yours"))
768732 else {
769- let cargoParts = split_4C(cargoListStr, ":")
733+ let newOrder = split_4C(newOrderStr, ":")
770734 let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil))
771735 let currentWh = split_4C(wh, ":")
772736 let loft = split(currentWh[whIdxLOFT], "_")
773737 let whOccupied = parseIntValue(loft[volOccupied])
774738 let whTotal = parseIntValue(loft[volTotal])
775739 let ordKey = keyOrderByLand(landAssetId)
776740 let currentOrd = getOrder(ordKey)
777- let z = setInternal(currentWh, currentOrd, cargoParts)
741+ let z = setInternal(currentWh, currentOrd, newOrder)
778742 let buyVolSaldo = z._4
779743 let sellVolSaldo = z._5
780744 let whLocked = (buyVolSaldo + sellVolSaldo)
781745 let whFree = ((whTotal - whOccupied) - whLocked)
782- if ((buyVolSaldo > whFree))
783- then throw((((("Attempt to reserve " + toString(buyVolSaldo)) + " space for buy orders, but only ") + toString(whFree)) + " warehouse empty space left"))
784- else if ((sellVolSaldo > whOccupied))
785- then throw((((("Attempt to lock " + toString(sellVolSaldo)) + " space for sell orders, but only ") + toString(whOccupied)) + " warehouse space occupied"))
786- else {
787- let whStr = makeString_2C([currentWh[whIdxLevels], makeString(z._1, "_"), makeString(z._2, "_"), makeString(z._3, "_"), toString(whLocked)], ":")
788- let whSave = invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil)
789- if ((whSave == whSave))
790- then {
791- let usdSaldo = z._6
792- let actions = if ((usdSaldo > 0))
793- then if ((size(i.payments) != 1))
794- then throw("exactly 1 payment must be attached")
795- else {
796- let pmt = i.payments[0]
797- let amt = pmt.amount
798- let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment")
799- if ((pmtAssetId != usdtAssetId))
800- then throw("USDT payments only!")
801- else if ((amt != usdSaldo))
802- then throw(("Payment needed is " + toString(usdSaldo)))
803- else [StringEntry(ordKey, cargoListStr)]
804- }
805- else if ((usdSaldo == 0))
806- then if ((size(i.payments) != 0))
807- then throw("No payments needed")
808- else [StringEntry(ordKey, cargoListStr)]
809- else if ((size(i.payments) != 0))
810- then throw("No payments needed")
811- else [ScriptTransfer(addressFromStringValue(owner), -(usdSaldo), usdtAssetId), StringEntry(ordKey, cargoListStr)]
812- $Tuple2(actions, result)
746+ if ((0 > whFree))
747+ then throw((((("Attempt to reserve " + toString(buyVolSaldo)) + " space for buy orders, and ") + toString(sellVolSaldo)) + " space for sell orders, leads to negative free space"))
748+ else {
749+ let whStr = makeString_2C([currentWh[whIdxLevels], makeString(z._1, "_"), makeString(z._2, "_"), makeString(z._3, "_"), toString(whLocked)], ":")
750+ let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil))
751+ let usdSaldo = z._6
752+ let actions = if ((usdSaldo > 0))
753+ then if ((size(i.payments) != 1))
754+ then throw("exactly 1 payment must be attached")
755+ else {
756+ let pmt = i.payments[0]
757+ let amt = pmt.amount
758+ let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment")
759+ if ((pmtAssetId != usdtAssetId))
760+ then throw("USDT payments only!")
761+ else if ((amt != usdSaldo))
762+ then throw(("Payment needed is " + toString(usdSaldo)))
763+ else [StringEntry(ordKey, newOrderStr)]
813764 }
814- else throw("Strict value is not equal to itself.")
815- }
765+ else if ((usdSaldo == 0))
766+ then if ((size(i.payments) != 0))
767+ then throw("No payments needed")
768+ else [StringEntry(ordKey, newOrderStr)]
769+ else if ((size(i.payments) != 0))
770+ then throw("No payments needed")
771+ else [ScriptTransfer(addressFromStringValue(owner), -(usdSaldo), usdtAssetId), StringEntry(ordKey, newOrderStr)]
772+ $Tuple2(actions, $Tuple2(result, whSave))
773+ }
816774 }
817775 }
818776 }
819777
820778
821779
822780 @Callable(i)
823781 func acceptWarehouseOrder (bpOrderStr,landAssetId,duckAssetId) = {
824782 let blocked = checkBlocked()
825- if ((blocked == blocked))
826- then {
827- let caller = i.originCaller
828- let callerAddr = toString(caller)
829- let stakedDuckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(callerAddr)), "You don't have a duck staked")
830- let curLocation = valueOrElse(getString(stakingContract, keyDuckLocation(stakedDuckAssetId)), DEFAULTLOCATION)
831- let loc = split(value(curLocation), "_")
832- if ((loc[locIdxType] != "L"))
833- then throw((("Duck location type is " + loc[locIdxType]) + ", but should be L"))
834- else if ((stakedDuckAssetId != duckAssetId))
835- then throw(((("Your staked duck is " + stakedDuckAssetId) + ", but passed ") + duckAssetId))
783+ let caller = i.originCaller
784+ let callerAddr = toString(caller)
785+ let stakedDuckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(callerAddr)), "You don't have a duck staked")
786+ let curLocation = valueOrElse(getString(stakingContract, keyDuckLocation(stakedDuckAssetId)), DEFAULTLOCATION)
787+ let loc = split(value(curLocation), "_")
788+ if ((loc[locIdxType] != "L"))
789+ then throw((("Duck location type is " + loc[locIdxType]) + ", but should be L"))
790+ else if ((stakedDuckAssetId != duckAssetId))
791+ then throw(((("Your staked duck is " + stakedDuckAssetId) + ", but passed ") + duckAssetId))
792+ else {
793+ let landAsset = value(assetInfo(fromBase58String(landAssetId)))
794+ if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)))))
795+ then throw((("NFT " + landAsset.name) + " is not staked"))
836796 else {
837- let landAsset = value(assetInfo(fromBase58String(landAssetId)))
838- if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)))))
839- then throw((("NFT " + landAsset.name) + " is not staked"))
797+ let landOwner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(landAssetId)), (("NFT " + landAsset.name) + " is orphaned"))
798+ if ((landOwner == callerAddr))
799+ then throw("You cannot trade with yourself")
840800 else {
841- let landOwner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(landAssetId)), (("NFT " + landAsset.name) + " is orphaned"))
842- if ((landOwner == callerAddr))
843- then throw("You cannot trade with yourself")
801+ let bpOrderParts = split_4C(bpOrderStr, ":")
802+ if ((size(bpOrderParts) != 3))
803+ then throw("bpOrderStr should contain exactly 2 ':' separators")
844804 else {
845- let bpOrderParts = split_4C(bpOrderStr, ":")
846- if ((size(bpOrderParts) != 3))
847- then throw("bpOrderStr should contain exactly 2 ':' separators")
848- else {
849- let bpOrdRes = split(bpOrderParts[0], "_")
850- let bpOrdMat = split(bpOrderParts[1], "_")
851- let bpOrdProd = if ((bpOrderParts[2] == ""))
852- then nil
853- else split(bpOrderParts[2], "_")
854- if ((size(bpOrdRes) != NUMRES))
855- then throw("All 6 resources should be passed")
856- else if ((size(bpOrdMat) != NUMRES))
857- then throw("All 6 materials should be passed")
858- else {
859- let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil))
860- let currentWh = split_4C(wh, ":")
861- let currWhRes = split(currentWh[whIdxRes], "_")
862- let currWhMat = split(currentWh[whIdxMat], "_")
863- let currWhProd = if ((currentWh[whIdxProd] == ""))
864- then nil
865- else split(currentWh[whIdxProd], "_")
866- let currWhLockedVol = parseIntValue(split(currentWh[whIdxLOFT], "_")[volLocked])
867- let bpKey = keyBackpackByDuck(duckAssetId)
868- let currentPack = getBackpack(bpKey)
869- let bpResList = split(currentPack[bpIdxRes], "_")
870- let bpMatList = split(currentPack[bpIdxMat], "_")
871- let bpProdList = if ((currentPack[bpIdxProd] == ""))
872- then nil
873- else split(currentPack[bpIdxProd], "_")
874- let ordKey = keyOrderByLand(landAssetId)
875- let whOrd = getOrder(ordKey)
876- let whOrdRes = split(whOrd[ordIdxRes], "_")
877- let whOrdMat = split(whOrd[ordIdxMat], "_")
878- let whOrdProd = if ((whOrd[ordIdxProd] == ""))
879- then nil
880- else split(whOrd[ordIdxProd], "_")
881- let r = {
882- let $l = bpOrdRes
883- let $s = size($l)
884- let $acc0 = $Tuple12(nil, nil, nil, 0, 0, 0, 0, bpResList, currWhRes, whOrdRes, resTypes, false)
885- func $f0_1 ($a,$i) = if (($i >= $s))
886- then $a
887- else acceptCommon($a, $l[$i])
805+ let bpOrdRes = split(bpOrderParts[0], "_")
806+ let bpOrdMat = split(bpOrderParts[1], "_")
807+ let bpOrdProd = if ((bpOrderParts[2] == ""))
808+ then nil
809+ else split(bpOrderParts[2], "_")
810+ if ((size(bpOrdRes) != NUMRES))
811+ then throw("All 6 resources should be passed")
812+ else if ((size(bpOrdMat) != NUMRES))
813+ then throw("All 6 materials should be passed")
814+ else {
815+ let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil))
816+ let currentWh = split_4C(wh, ":")
817+ let currWhRes = split(currentWh[whIdxRes], "_")
818+ let currWhMat = split(currentWh[whIdxMat], "_")
819+ let currWhProd = if ((currentWh[whIdxProd] == ""))
820+ then nil
821+ else split(currentWh[whIdxProd], "_")
822+ let currWhLockedVol = parseIntValue(split(currentWh[whIdxLOFT], "_")[volLocked])
823+ let bpKey = keyBackpackByDuck(duckAssetId)
824+ let currentPack = getBackpack(bpKey)
825+ let bpResList = split(currentPack[bpIdxRes], "_")
826+ let bpMatList = split(currentPack[bpIdxMat], "_")
827+ let bpProdList = if ((currentPack[bpIdxProd] == ""))
828+ then nil
829+ else split(currentPack[bpIdxProd], "_")
830+ let ordKey = keyOrderByLand(landAssetId)
831+ let whOrd = getOrder(ordKey)
832+ let whOrdRes = split(whOrd[ordIdxRes], "_")
833+ let whOrdMat = split(whOrd[ordIdxMat], "_")
834+ let whOrdProd = if ((whOrd[ordIdxProd] == ""))
835+ then nil
836+ else split(whOrd[ordIdxProd], "_")
837+ let r = {
838+ let $l = bpOrdRes
839+ let $s = size($l)
840+ let $acc0 = $Tuple12(nil, nil, nil, 0, 0, 0, 0, bpResList, currWhRes, whOrdRes, resTypes, false)
841+ func $f0_1 ($a,$i) = if (($i >= $s))
842+ then $a
843+ else acceptCommon($a, $l[$i])
888844
889- func $f0_2 ($a,$i) = if (($i >= $s))
890- then $a
891- else throw("List size exceeds 6")
845+ func $f0_2 ($a,$i) = if (($i >= $s))
846+ then $a
847+ else throw("List size exceeds 6")
892848
893- $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
849+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
850+ }
851+ let m = {
852+ let $l = bpOrdMat
853+ let $s = size($l)
854+ let $acc0 = $Tuple12(nil, nil, nil, r._4, r._5, r._6, 0, bpMatList, currWhMat, whOrdMat, matTypes, false)
855+ func $f1_1 ($a,$i) = if (($i >= $s))
856+ then $a
857+ else acceptCommon($a, $l[$i])
858+
859+ func $f1_2 ($a,$i) = if (($i >= $s))
860+ then $a
861+ else throw("List size exceeds 6")
862+
863+ $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6)
864+ }
865+ let p = if ((size(bpOrdProd) != 0))
866+ then {
867+ let $l = bpOrdProd
868+ let $s = size($l)
869+ let $acc0 = $Tuple12(nil, nil, nil, m._4, m._5, m._6, 0, bpProdList, currWhProd, whOrdProd, prodTypes, true)
870+ func $f2_1 ($a,$i) = if (($i >= $s))
871+ then $a
872+ else acceptCommon($a, $l[$i])
873+
874+ func $f2_2 ($a,$i) = if (($i >= $s))
875+ then $a
876+ else throw("List size exceeds 50")
877+
878+ $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)
879+ }
880+ else $Tuple12(currWhProd, whOrdProd, bpProdList, m._4, m._5, m._6, 0, bpProdList, currWhProd, whOrdProd, prodTypes, true)
881+ let volSaldo = p._4
882+ let newLockedVol = if ((0 > (currWhLockedVol - volSaldo)))
883+ then 0
884+ else (currWhLockedVol - volSaldo)
885+ let whStr = makeString_2C([currentWh[whIdxLevels], makeString(r._1, "_"), makeString(m._1, "_"), makeString(p._1, "_"), toString(newLockedVol)], ":")
886+ let newWhOrdStr = makeString_2C([makeString(r._2, "_"), makeString(m._2, "_"), makeString(p._2, "_")], ":")
887+ let newBpStr = makeString_2C([currentPack[bpIdxLevel], makeString(r._3, "_"), makeString(m._3, "_"), makeString(p._3, "_")], ":")
888+ let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil))
889+ let bpSave = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newBpStr], nil))
890+ let actions = [StringEntry(ordKey, newWhOrdStr)]
891+ let usdWh2BpSaldo = p._5
892+ let actions1 = if ((usdWh2BpSaldo > 0))
893+ then {
894+ let usdWh2BpFee = fraction(p._5, AUCTIONFEE, MULT6)
895+ let refByKey = keyAddressRefBy(callerAddr)
896+ let refBy = getString(stakingContract, refByKey)
897+ if (isDefined(refBy))
898+ then (((actions :+ ScriptTransfer(caller, (p._5 - (3 * usdWh2BpFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdWh2BpFee, usdtAssetId)) :+ ScriptTransfer(addressFromStringValue(value(refBy)), usdWh2BpFee, usdtAssetId))
899+ else ((actions :+ ScriptTransfer(caller, (p._5 - (3 * usdWh2BpFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdWh2BpFee, usdtAssetId))
900+ }
901+ else actions
902+ let usdBp2WhSaldo = p._6
903+ let actions2 = if ((usdBp2WhSaldo > 0))
904+ then if ((size(i.payments) != 1))
905+ then throw("exactly 1 payment must be attached")
906+ else {
907+ let pmt = i.payments[0]
908+ let amt = pmt.amount
909+ let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment")
910+ if ((pmtAssetId != usdtAssetId))
911+ then throw("USDT payments only!")
912+ else if ((amt != usdBp2WhSaldo))
913+ then throw(("Payment needed is " + toString(usdBp2WhSaldo)))
914+ else if ((MINSHOPPAYMENT > amt))
915+ then throw(("Payment should be at least " + toString(MINSHOPPAYMENT)))
916+ else {
917+ let usdBp2WhFee = fraction(p._6, AUCTIONFEE, MULT6)
918+ let refByKey = keyAddressRefBy(landOwner)
919+ let refBy = getString(stakingContract, refByKey)
920+ if (isDefined(refBy))
921+ then (((actions1 :+ ScriptTransfer(addressFromStringValue(landOwner), (p._6 - (3 * usdBp2WhFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdBp2WhFee, usdtAssetId)) :+ ScriptTransfer(addressFromStringValue(value(refBy)), usdBp2WhFee, usdtAssetId))
922+ else ((actions1 :+ ScriptTransfer(addressFromStringValue(landOwner), (p._6 - (3 * usdBp2WhFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdBp2WhFee, usdtAssetId))
923+ }
894924 }
895- let m = {
896- let $l = bpOrdMat
897- let $s = size($l)
898- let $acc0 = $Tuple12(nil, nil, nil, r._4, r._5, r._6, 0, bpMatList, currWhMat, whOrdMat, matTypes, false)
899- func $f1_1 ($a,$i) = if (($i >= $s))
900- then $a
901- else acceptCommon($a, $l[$i])
902-
903- func $f1_2 ($a,$i) = if (($i >= $s))
904- then $a
905- else throw("List size exceeds 6")
906-
907- $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6)
908- }
909- let p = if ((size(bpOrdProd) != 0))
910- then {
911- let $l = bpOrdProd
912- let $s = size($l)
913- let $acc0 = $Tuple12(nil, nil, nil, m._4, m._5, m._6, 0, bpProdList, currWhProd, whOrdProd, prodTypes, true)
914- func $f2_1 ($a,$i) = if (($i >= $s))
915- then $a
916- else acceptCommon($a, $l[$i])
917-
918- func $f2_2 ($a,$i) = if (($i >= $s))
919- then $a
920- else throw("List size exceeds 50")
921-
922- $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)
923- }
924- else $Tuple12(currWhProd, whOrdProd, bpProdList, m._4, m._5, m._6, 0, bpProdList, currWhProd, whOrdProd, prodTypes, true)
925- let volSaldo = p._4
926- let newLockedVol = if ((0 > (currWhLockedVol - volSaldo)))
927- then 0
928- else (currWhLockedVol - volSaldo)
929- let whStr = makeString_2C([currentWh[whIdxLevels], makeString(r._1, "_"), makeString(m._1, "_"), makeString(p._1, "_"), toString(newLockedVol)], ":")
930- let newWhOrdStr = makeString_2C([makeString(r._2, "_"), makeString(m._2, "_"), makeString(p._2, "_")], ":")
931- let newBpStr = makeString_2C([currentPack[bpIdxLevel], makeString(r._3, "_"), makeString(m._3, "_"), makeString(p._3, "_")], ":")
932- let whSave = invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil)
933- if ((whSave == whSave))
934- then {
935- let bpSave = invoke(stakingContract, "updateBackpack", [duckAssetId, newBpStr], nil)
936- if ((bpSave == bpSave))
937- then {
938- let actions = [StringEntry(ordKey, newWhOrdStr)]
939- let usdWh2BpSaldo = p._5
940- let actions1 = if ((usdWh2BpSaldo > 0))
941- then {
942- let usdWh2BpFee = fraction(p._5, AUCTIONFEE, MULT6)
943- let refByKey = keyAddressRefBy(callerAddr)
944- let refBy = getString(stakingContract, refByKey)
945- if (isDefined(refBy))
946- then (((actions :+ ScriptTransfer(caller, (p._5 - (3 * usdWh2BpFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdWh2BpFee, usdtAssetId)) :+ ScriptTransfer(addressFromStringValue(value(refBy)), usdWh2BpFee, usdtAssetId))
947- else ((actions :+ ScriptTransfer(caller, (p._5 - (3 * usdWh2BpFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdWh2BpFee, usdtAssetId))
948- }
949- else actions
950- let usdBp2WhSaldo = p._6
951- if ((usdBp2WhSaldo > 0))
952- then if ((size(i.payments) != 1))
953- then throw("exactly 1 payment must be attached")
954- else {
955- let pmt = i.payments[0]
956- let amt = pmt.amount
957- let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment")
958- if ((pmtAssetId != usdtAssetId))
959- then throw("USDT payments only!")
960- else if ((amt != usdBp2WhSaldo))
961- then throw(("Payment needed is " + toString(usdBp2WhSaldo)))
962- else if ((MINSHOPPAYMENT > amt))
963- then throw(("Payment should be at least " + toString(MINSHOPPAYMENT)))
964- else {
965- let usdBp2WhFee = fraction(p._6, AUCTIONFEE, MULT6)
966- let refByKey = keyAddressRefBy(landOwner)
967- let refBy = getString(stakingContract, refByKey)
968- if (isDefined(refBy))
969- then (((actions1 :+ ScriptTransfer(addressFromStringValue(landOwner), (p._6 - (3 * usdBp2WhFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdBp2WhFee, usdtAssetId)) :+ ScriptTransfer(addressFromStringValue(value(refBy)), usdBp2WhFee, usdtAssetId))
970- else ((actions1 :+ ScriptTransfer(addressFromStringValue(landOwner), (p._6 - (3 * usdBp2WhFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdBp2WhFee, usdtAssetId))
971- }
972- }
973- else if ((size(i.payments) != 0))
974- then throw("No payments needed")
975- else actions1
976- }
977- else throw("Strict value is not equal to itself.")
978- }
979- else throw("Strict value is not equal to itself.")
980- }
981- }
925+ else if ((size(i.payments) != 0))
926+ then throw("No payments needed")
927+ else actions1
928+ $Tuple2(actions2, $Tuple3(blocked, whSave, bpSave))
929+ }
982930 }
983931 }
984932 }
985- }
986- else throw("Strict value is not equal to itself.")
933+ }
987934 }
988935
989936

github/deemru/w8io/026f985 
154.10 ms