tx · 5AocGxGUL8Cpu81wwo8QubDVwVVPzbDo2AJ8nao8KQwN

3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep:  -0.03600000 Waves

2023.07.12 16:54 [2662772] smart account 3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep > SELF 0.00000000 Waves

{ "type": 13, "id": "5AocGxGUL8Cpu81wwo8QubDVwVVPzbDo2AJ8nao8KQwN", "fee": 3600000, "feeAssetId": null, "timestamp": 1689170133797, "version": 2, "chainId": 84, "sender": "3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep", "senderPublicKey": "7v5L7QkXxfkirALdyqmox38QCsa9jtfAtgUfHTh34eWq", "proofs": [ "3NwgENcxC7yP1KhzpVjz4B7ggH6Dab9NsMHpLEHnuhnpuUsts876oEr8441RQUnFFAQtoDxTPpYkhcTuAjjMik84" ], "script": "base64:BgI7CAISBAoCCBgSAwoBCBIECgIRERIECgIRERIDCgEREgQKAgEBEgQKAggIEgUKAwgICBIDCgEREgMKAQhRAAd4cFRyYWRlAKCNBgAHeHBDcmFmdACgjQYACnhwU2VsbFRvRXMAoI0GAAZ4cFNob3AAoI0GAApMQU5EUFJFRklYAgRMQU5EAAZOVU1SRVMABgAPREVGQVVMVExPQ0FUSU9OAg9BZnJpY2FfRl9BZnJpY2EAEFJFU09VUkNFUFJJQ0VNSU4A1bUCAA1FU01BWFBBQ0tBR0VTAAMACUVTQlVZQ09FRgAEAAhyZXNUeXBlcwkAzAgCAgNPaWwJAMwIAgIDT3JlCQDMCAICBFdvb2QJAMwIAgIEU2FuZAkAzAgCAgRDbGF5CQDMCAICB09yZ2FuaWMFA25pbAAIbWF0VHlwZXMJAMwIAgIERnVlbAkAzAgCAgVNZXRhbAkAzAgCAgVQbGFuawkAzAgCAgVHbGFzcwkAzAgCAgdQbGFzdGljCQDMCAICB1Byb3RlaW4FA25pbAAJcHJvZFR5cGVzCQDMCAICEEZpcnN0IEFpZCBLaXQgTDEJAMwIAgIQRmlyc3QgQWlkIE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9n5T Diff:
OldNewDifferences
2929
3030 let continents = ["Americas", "Europe", "Asia", "Africa", "Oceania"]
3131
32-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_25_1", "4_10_10_4_14_10_2_25_1", "6_15_15_6_21_15_2_25_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_30_3", "18_18_2_10_10_2_5_30_3", "27_27_3_15_15_3_5_30_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"]
32+let productionMatrix = ["8_8_8_17_17_42_12_0", "8_8_8_17_17_42_24_0", "8_8_8_17_17_42_36_0", "8_19_19_8_27_19_26_1", "8_19_19_8_27_19_52_1", "8_19_19_8_27_19_78_1", "8_8_8_8_8_60_13_2", "8_8_8_8_8_60_26_2", "8_8_8_8_8_60_39_2", "30_30_3_17_17_3_30_3", "30_30_3_17_17_3_60_3", "30_30_3_17_17_3_90_3", "18_18_10_18_18_18_11_4", "18_18_10_18_18_18_22_4", "18_18_10_18_18_18_33_4"]
3333
34-let recipeIdxPacksize = 7
34+let rIdxCoeff = 6
3535
36-let recipeIdxContinent = 8
36+let rIdxContinent = 7
37+
38+let recipeSize = 8
39+
40+let productPkgSize = 10
3741
3842 let whIdxLevels = 0
3943
9094
9195 let locIdxId = 2
9296
93-func getRecipeMaterials (recipe) = {
94- func addMat (ac,j) = (ac + parseIntValue(recipe[j]))
95-
96- let $l = [0, 1, 2, 3, 4, 5]
97- let $s = size($l)
98- let $acc0 = 0
99- func $f0_1 ($a,$i) = if (($i >= $s))
100- then $a
101- else addMat($a, $l[$i])
102-
103- func $f0_2 ($a,$i) = if (($i >= $s))
104- then $a
105- else throw("List size exceeds 6")
106-
107- $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
108- }
97+func getRecipeMaterials (recipe) = parseIntValue(recipe[rIdxCoeff])
10998
11099
111100 let chain = take(drop(this.bytes, 1), 1)
131120 let SEP = "__"
132121
133122 let MULT6 = 1000000
134-
135-let MULT7 = 10000000
136123
137124 let MULT8 = 100000000
138125
177164 case _ =>
178165 throw("fail to cast into Int")
179166 }
167+
168+
169+func fixedPoint (val,decimals) = {
170+ let tenPow = pow(10, 0, decimals, 0, 0, DOWN)
171+ ((toString((val / tenPow)) + ".") + toString((val % tenPow)))
172+ }
180173
181174
182175 let FACTORYMAXWAREHOUSE = 10000000000
271264 func setCommon (acc,item) = {
272265 let j = acc._1
273266 let isProd = acc._8
274- let pkgSize = if (isProd)
275- then parseIntValue(split(productionMatrix[j], "_")[recipeIdxPacksize])
276- else 0
277267 let itemParts = split(item, "@")
278268 if ((size(itemParts) != 2))
279269 then throw("Incorrect order format, should be amount@price")
281271 let newOrdAm = parseIntValue(itemParts[0])
282272 let newOrdPr = parseIntValue(itemParts[1])
283273 let newOrdUsd = fraction(newOrdAm, newOrdPr, MULT8)
284- let newOrdVol = toVolume(newOrdAm, pkgSize, isProd)
274+ let newOrdVol = toVolume(newOrdAm, productPkgSize, isProd)
285275 let whInit = if ((size(acc._6) > j))
286276 then parseIntValue(acc._6[j])
287277 else 0
298288 let curOrdUsd = fraction(curOrdAm, curOrdPr, MULT8)
299289 if ((newOrdAm == 0))
300290 then if ((curOrdAm > 0))
301- then $Tuple9((j + 1), (acc._2 :+ toString(whInit)), acc._3, acc._4, (acc._5 - curOrdUsd), acc._6, acc._7, isProd, (acc._9 + toVolume(whInit, pkgSize, isProd)))
302- else $Tuple9((j + 1), (acc._2 :+ toString((whInit - curOrdAm))), acc._3, acc._4, acc._5, acc._6, acc._7, isProd, (acc._9 + toVolume((whInit - curOrdAm), pkgSize, isProd)))
291+ then $Tuple9((j + 1), (acc._2 :+ toString(whInit)), acc._3, acc._4, (acc._5 - curOrdUsd), acc._6, acc._7, isProd, (acc._9 + toVolume(whInit, productPkgSize, isProd)))
292+ else $Tuple9((j + 1), (acc._2 :+ toString((whInit - curOrdAm))), acc._3, acc._4, acc._5, acc._6, acc._7, isProd, (acc._9 + toVolume((whInit - curOrdAm), productPkgSize, isProd)))
303293 else if ((newOrdAm > 0))
304294 then if ((0 > curOrdAm))
305- then $Tuple9((j + 1), (acc._2 :+ toString((whInit - curOrdAm))), (acc._3 + newOrdVol), acc._4, (acc._5 + newOrdUsd), acc._6, acc._7, isProd, toVolume((whInit - curOrdAm), pkgSize, isProd))
306- else $Tuple9((j + 1), (acc._2 :+ toString(whInit)), (acc._3 + newOrdVol), acc._4, ((acc._5 + newOrdUsd) - curOrdUsd), acc._6, acc._7, isProd, toVolume(whInit, pkgSize, isProd))
295+ then $Tuple9((j + 1), (acc._2 :+ toString((whInit - curOrdAm))), (acc._3 + newOrdVol), acc._4, (acc._5 + newOrdUsd), acc._6, acc._7, isProd, toVolume((whInit - curOrdAm), productPkgSize, isProd))
296+ else $Tuple9((j + 1), (acc._2 :+ toString(whInit)), (acc._3 + newOrdVol), acc._4, ((acc._5 + newOrdUsd) - curOrdUsd), acc._6, acc._7, isProd, toVolume(whInit, productPkgSize, isProd))
307297 else if ((0 > curOrdAm))
308298 then {
309299 let amDiff = (curOrdAm - newOrdAm)
310300 if ((0 > (whInit - amDiff)))
311301 then throw((((("Attempt to take " + toString(amDiff)) + " from warehouse, but only ") + toString(whInit)) + " available"))
312- else $Tuple9((j + 1), (acc._2 :+ toString((whInit - amDiff))), acc._3, (acc._4 - newOrdVol), acc._5, acc._6, acc._7, isProd, toVolume((whInit - amDiff), pkgSize, isProd))
302+ else $Tuple9((j + 1), (acc._2 :+ toString((whInit - amDiff))), acc._3, (acc._4 - newOrdVol), acc._5, acc._6, acc._7, isProd, toVolume((whInit - amDiff), productPkgSize, isProd))
313303 }
314304 else if ((0 > (whInit + newOrdAm)))
315305 then throw((((("Attempt to take " + toString(-(newOrdAm))) + " from warehouse, but only ") + toString(whInit)) + " available"))
316- else $Tuple9((j + 1), (acc._2 :+ toString((whInit + newOrdAm))), acc._3, (acc._4 - newOrdVol), (acc._5 - curOrdUsd), acc._6, acc._7, isProd, toVolume((whInit + newOrdAm), pkgSize, isProd))
306+ else $Tuple9((j + 1), (acc._2 :+ toString((whInit + newOrdAm))), acc._3, (acc._4 - newOrdVol), (acc._5 - curOrdUsd), acc._6, acc._7, isProd, toVolume((whInit + newOrdAm), productPkgSize, isProd))
317307 }
318308 }
319309 }
396386 func acceptCommon (acc,bpOrdItem) = {
397387 let j = acc._7
398388 let isProd = acc._12
399- let pkgSize = if (isProd)
400- then parseIntValue(split(productionMatrix[j], "_")[recipeIdxPacksize])
401- else 0
402389 let bpOrdParts = split(bpOrdItem, "@")
403390 if ((size(bpOrdParts) != 2))
404391 then throw("Incorrect order format, should be amount@price")
427414 then throw(((((("Prices of " + acc._11[j]) + " don't match! WH price=") + toString(whOrdPr)) + ", your price=") + toString(bpOrdPr)))
428415 else {
429416 let whOrdUsd = fraction(whOrdAm, whOrdPr, MULT8)
430- let deltaVol = toVolume(bpOrdAm, pkgSize, isProd)
417+ let deltaVol = toVolume(bpOrdAm, productPkgSize, isProd)
431418 if ((bpOrdAm == 0))
432419 then $Tuple13((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, acc._13)
433420 else if ((bpOrdAm > 0))
677664 then throw(("Unknown product idx=" + toString(productIdx)))
678665 else {
679666 let recipe = split(productionMatrix[productIdx], "_")
680- if ((size(recipe) != (NUMRES + 3)))
667+ if ((size(recipe) != recipeSize))
681668 then throw(("Fatal: unknown recipe: " + productionMatrix[productIdx]))
682669 else {
683- let productContIdx = parseIntValue(recipe[recipeIdxContinent])
670+ let productContIdx = parseIntValue(recipe[rIdxContinent])
684671 if ((continents[productContIdx] != cont))
685672 then throw(((("This product is available in " + continents[productContIdx]) + ", but you are in ") + cont))
686673 else {
693680 then prodList[n]
694681 else "0"
695682 let x = parseIntValue(xs)
696- let amount = (quantity * parseIntValue(recipe[recipeIdxPacksize]))
683+ let amount = (quantity * productPkgSize)
697684 let y = if ((n == productIdx))
698685 then toString((x + amount))
699686 else xs
713700
714701 $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
715702 func producer (acc,j) = {
716- let needMat = ((parseIntValue(recipe[j]) * MULT7) * quantity)
703+ let needMat = ((parseIntValue(recipe[j]) * MULT6) * quantity)
717704 let haveMat = parseIntValue(matList[j])
718705 if ((needMat > haveMat))
719- then throw(((((((("You have " + matList[j]) + " of ") + matTypes[j]) + ", but recipe requires ") + toString(needMat)) + " for quantity ") + toString(quantity)))
706+ then throw(((((((("You have " + fixedPoint(haveMat, 8)) + " of ") + matTypes[j]) + ", but recipe requires ") + fixedPoint(needMat, 8)) + " for quantity ") + toString(quantity)))
720707 else if ((needMat > 0))
721708 then $Tuple2((acc._1 :+ toString((haveMat - needMat))), (acc._2 + needMat))
722709 else $Tuple2((acc._1 :+ matList[j]), acc._2)
1003990 then throw("Quantity cannot be negative")
1004991 else {
1005992 let recipe = split(recipeStr, "_")
1006- if ((size(recipe) != (NUMRES + 3)))
993+ if ((size(recipe) != recipeSize))
1007994 then throw(("Fatal: unknown recipe: " + recipeStr))
1008995 else {
1009- let packSize = parseIntValue(recipe[recipeIdxPacksize])
1010- let maxAmount = (ESMAXPACKAGES * packSize)
996+ let maxAmount = (ESMAXPACKAGES * productPkgSize)
1011997 let existAmount = if ((size(existAmounts) > j))
1012998 then parseIntValue(existAmounts[j])
1013999 else 0
10161002 then throw(((("Warehouse can buy only " + toString(canBuy)) + " of ") + prodTypes[j]))
10171003 else {
10181004 let totalMat = getRecipeMaterials(recipe)
1019- let unitPrice = fraction((totalMat * ESBUYCOEF), RESOURCEPRICEMIN, (10 * packSize))
1005+ let unitPrice = fraction((totalMat * ESBUYCOEF), RESOURCEPRICEMIN, (10 * productPkgSize))
10201006 let bpProdAmount = if ((size(prodList) > j))
10211007 then parseIntValue(prodList[j])
10221008 else 0
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let xpTrade = 100000
55
66 let xpCraft = 100000
77
88 let xpSellToEs = 100000
99
1010 let xpShop = 100000
1111
1212 let LANDPREFIX = "LAND"
1313
1414 let NUMRES = 6
1515
1616 let DEFAULTLOCATION = "Africa_F_Africa"
1717
1818 let RESOURCEPRICEMIN = 39637
1919
2020 let ESMAXPACKAGES = 3
2121
2222 let ESBUYCOEF = 4
2323
2424 let resTypes = ["Oil", "Ore", "Wood", "Sand", "Clay", "Organic"]
2525
2626 let matTypes = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"]
2727
2828 let prodTypes = ["First Aid Kit L1", "First Aid Kit L2", "First Aid Kit L3", "Backpack L1", "Backpack L2", "Backpack L3", "Food Ration L1", "Food Ration L2", "Food Ration L3", "Jet Pack L1", "Jet Pack L2", "Jet Pack L3", "Shield L1", "Shield L2", "Shield L3"]
2929
3030 let continents = ["Americas", "Europe", "Asia", "Africa", "Oceania"]
3131
32-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_25_1", "4_10_10_4_14_10_2_25_1", "6_15_15_6_21_15_2_25_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_30_3", "18_18_2_10_10_2_5_30_3", "27_27_3_15_15_3_5_30_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"]
32+let productionMatrix = ["8_8_8_17_17_42_12_0", "8_8_8_17_17_42_24_0", "8_8_8_17_17_42_36_0", "8_19_19_8_27_19_26_1", "8_19_19_8_27_19_52_1", "8_19_19_8_27_19_78_1", "8_8_8_8_8_60_13_2", "8_8_8_8_8_60_26_2", "8_8_8_8_8_60_39_2", "30_30_3_17_17_3_30_3", "30_30_3_17_17_3_60_3", "30_30_3_17_17_3_90_3", "18_18_10_18_18_18_11_4", "18_18_10_18_18_18_22_4", "18_18_10_18_18_18_33_4"]
3333
34-let recipeIdxPacksize = 7
34+let rIdxCoeff = 6
3535
36-let recipeIdxContinent = 8
36+let rIdxContinent = 7
37+
38+let recipeSize = 8
39+
40+let productPkgSize = 10
3741
3842 let whIdxLevels = 0
3943
4044 let whIdxRes = 1
4145
4246 let whIdxMat = 2
4347
4448 let whIdxProd = 3
4549
4650 let whIdxLOFT = 4
4751
4852 let volLocked = 0
4953
5054 let volTotal = 3
5155
5256 let bpIdxLevel = 0
5357
5458 let bpIdxRes = 1
5559
5660 let bpIdxMat = 2
5761
5862 let bpIdxProd = 3
5963
6064 func keyLandAssetIdToOwner (assetId) = ("nftOwner_" + assetId)
6165
6266
6367 func keyStakedTimeByAssetId (assetId) = ("stakedTime_" + assetId)
6468
6569
6670 func keyAddressRefBy (addr) = ("accRefBy_" + addr)
6771
6872
6973 func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr)
7074
7175
7276 func keyBackpackByDuck (duckAssetId) = ("backPack_" + duckAssetId)
7377
7478
7579 func keyDuckLocation (duckAssetId) = ("duckLocation_" + duckAssetId)
7680
7781
7882 func keyBlocked () = "contractsBlocked"
7983
8084
8185 func keyOrderByLand (landAssetId) = ("landOrder_" + landAssetId)
8286
8387
8488 func keyEsWarehouse () = "emergencyWarehouseProducts"
8589
8690
8791 let locIdxContinent = 0
8892
8993 let locIdxType = 1
9094
9195 let locIdxId = 2
9296
93-func getRecipeMaterials (recipe) = {
94- func addMat (ac,j) = (ac + parseIntValue(recipe[j]))
95-
96- let $l = [0, 1, 2, 3, 4, 5]
97- let $s = size($l)
98- let $acc0 = 0
99- func $f0_1 ($a,$i) = if (($i >= $s))
100- then $a
101- else addMat($a, $l[$i])
102-
103- func $f0_2 ($a,$i) = if (($i >= $s))
104- then $a
105- else throw("List size exceeds 6")
106-
107- $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
108- }
97+func getRecipeMaterials (recipe) = parseIntValue(recipe[rIdxCoeff])
10998
11099
111100 let chain = take(drop(this.bytes, 1), 1)
112101
113102 let usdtAssetId = match chain {
114103 case _ =>
115104 if ((base58'2W' == $match0))
116105 then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi'
117106 else if ((base58'2T' == $match0))
118107 then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63'
119108 else throw("Unknown chain")
120109 }
121110
122111 let defaultRestAddressStr = match chain {
123112 case _ =>
124113 if ((base58'2W' == $match0))
125114 then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv"
126115 else if ((base58'2T' == $match0))
127116 then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy"
128117 else throw("Unknown chain")
129118 }
130119
131120 let SEP = "__"
132121
133122 let MULT6 = 1000000
134-
135-let MULT7 = 10000000
136123
137124 let MULT8 = 100000000
138125
139126 let MULT10 = 10000000000
140127
141128 let MINSHOPPAYMENT = 100000
142129
143130 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
144131
145132
146133 let IdxCfgStakingDapp = 1
147134
148135 func keyRestCfg () = "%s__restConfig"
149136
150137
151138 func keyRestAddress () = "%s__restAddr"
152139
153140
154141 func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP)
155142
156143
157144 func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx)))
158145
159146
160147 let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr))
161148
162149 let restCfg = readRestCfgOrFail(restContract)
163150
164151 let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp)
165152
166153 func asString (v) = match v {
167154 case s: String =>
168155 s
169156 case _ =>
170157 throw("fail to cast into String")
171158 }
172159
173160
174161 func asInt (v) = match v {
175162 case n: Int =>
176163 n
177164 case _ =>
178165 throw("fail to cast into Int")
179166 }
167+
168+
169+func fixedPoint (val,decimals) = {
170+ let tenPow = pow(10, 0, decimals, 0, 0, DOWN)
171+ ((toString((val / tenPow)) + ".") + toString((val % tenPow)))
172+ }
180173
181174
182175 let FACTORYMAXWAREHOUSE = 10000000000
183176
184177 let SELLMULTIPLIER = 200
185178
186179 let BUYMULTIPLIER = 300
187180
188181 let AUCTIONFEE = 10000
189182
190183 func keyFactoryWarehouseByIdAndType (factoryId,resType) = ((("factoryWhByContinentAndRes_" + factoryId) + "_") + toString(resType))
191184
192185
193186 let ordIdxRes = 0
194187
195188 let ordIdxMat = 1
196189
197190 let ordIdxProd = 2
198191
199192 func getOrder (ordKey) = {
200193 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:"), ":")
201194 [if ((size(split(p[ordIdxRes], "_")) == NUMRES))
202195 then p[ordIdxRes]
203196 else "0@0_0@0_0@0_0@0_0@0_0@0", if ((size(split(p[ordIdxMat], "_")) == NUMRES))
204197 then p[ordIdxMat]
205198 else "0@0_0@0_0@0_0@0_0@0_0@0", p[ordIdxProd]]
206199 }
207200
208201
209202 func toVolume (amount,pkgSize,isProduct) = if (isProduct)
210203 then {
211204 let pkgs = if ((amount >= 0))
212205 then (((amount + pkgSize) - 1) / pkgSize)
213206 else -((((-(amount) + pkgSize) - 1) / pkgSize))
214207 (pkgs * MULT8)
215208 }
216209 else amount
217210
218211
219212 func sellInternal (locId,resType,amount,minPrice) = {
220213 let whKey = keyFactoryWarehouseByIdAndType(locId, resType)
221214 let w0 = valueOrElse(getInteger(whKey), 0)
222215 let r0 = if ((w0 > FACTORYMAXWAREHOUSE))
223216 then 0
224217 else if (((w0 + amount) > FACTORYMAXWAREHOUSE))
225218 then (FACTORYMAXWAREHOUSE - w0)
226219 else amount
227220 let usdtReceived = (fraction(r0, ((SELLMULTIPLIER * RESOURCEPRICEMIN) - fraction(((100 * w0) + (50 * r0)), RESOURCEPRICEMIN, FACTORYMAXWAREHOUSE)), MULT10) + fraction((amount - r0), RESOURCEPRICEMIN, MULT8))
228221 let min99 = (minPrice - (minPrice / 100))
229222 if (((min99 * amount) > (usdtReceived * MULT8)))
230223 then throw((((((((((("Actual price = " + toString(usdtReceived)) + " / ") + toString(amount)) + " < minPrice = ") + toString(minPrice)) + ", (") + locId) + ", ") + resTypes[resType]) + ")"))
231224 else $Tuple2(IntegerEntry(whKey, (w0 + amount)), usdtReceived)
232225 }
233226
234227
235228 func buyInternal (locId,matType,amount,maxPrice) = {
236229 let whKey = keyFactoryWarehouseByIdAndType(locId, matType)
237230 let w0 = valueOrElse(getInteger(whKey), 0)
238231 let m1 = if ((w0 > FACTORYMAXWAREHOUSE))
239232 then min([amount, (w0 - FACTORYMAXWAREHOUSE)])
240233 else 0
241234 let m0 = min([w0, (amount - m1)])
242235 let m = (m0 + m1)
243236 let usdtSpent = (fraction(m0, ((BUYMULTIPLIER * RESOURCEPRICEMIN) - fraction(((100 * w0) - (50 * m0)), RESOURCEPRICEMIN, FACTORYMAXWAREHOUSE)), MULT10) + fraction(m1, (2 * RESOURCEPRICEMIN), MULT8))
244237 let max101 = (maxPrice + (maxPrice / 100))
245238 if (((usdtSpent * MULT8) > (max101 * m)))
246239 then throw((((((((((("Actual price = " + toString(usdtSpent)) + " / ") + toString(m)) + " > maxPrice = ") + toString(maxPrice)) + ", (") + locId) + ", ") + matTypes[matType]) + ")"))
247240 else $Tuple3(IntegerEntry(whKey, (w0 - m)), usdtSpent, m)
248241 }
249242
250243
251244 func getBackpack (bpKey) = {
252245 let p = split(valueOrElse(getString(stakingContract, bpKey), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":")
253246 [toString(valueOrElse(parseInt(p[bpIdxLevel]), 0)), if ((size(split(p[bpIdxRes], "_")) == NUMRES))
254247 then p[bpIdxRes]
255248 else "0_0_0_0_0_0", if ((size(split(p[bpIdxMat], "_")) == NUMRES))
256249 then p[bpIdxMat]
257250 else "0_0_0_0_0_0", p[bpIdxProd]]
258251 }
259252
260253
261254 func checkBlocked () = if (valueOrElse(getBoolean(stakingContract, keyBlocked()), false))
262255 then throw("Contracts are under maintenance")
263256 else unit
264257
265258
266259 func prolog () = if (valueOrElse(getBoolean(stakingContract, keyBlocked()), false))
267260 then throw("Contracts are under maintenance")
268261 else asInt(invoke(stakingContract, "saveLastTx", nil, nil))
269262
270263
271264 func setCommon (acc,item) = {
272265 let j = acc._1
273266 let isProd = acc._8
274- let pkgSize = if (isProd)
275- then parseIntValue(split(productionMatrix[j], "_")[recipeIdxPacksize])
276- else 0
277267 let itemParts = split(item, "@")
278268 if ((size(itemParts) != 2))
279269 then throw("Incorrect order format, should be amount@price")
280270 else {
281271 let newOrdAm = parseIntValue(itemParts[0])
282272 let newOrdPr = parseIntValue(itemParts[1])
283273 let newOrdUsd = fraction(newOrdAm, newOrdPr, MULT8)
284- let newOrdVol = toVolume(newOrdAm, pkgSize, isProd)
274+ let newOrdVol = toVolume(newOrdAm, productPkgSize, isProd)
285275 let whInit = if ((size(acc._6) > j))
286276 then parseIntValue(acc._6[j])
287277 else 0
288278 let curOrdParts = split(if ((size(acc._7) > j))
289279 then acc._7[j]
290280 else "0@0", "@")
291281 let curOrdAm = parseIntValue(curOrdParts[0])
292282 let curOrdPr = parseIntValue(curOrdParts[1])
293283 if (if ((0 > curOrdPr))
294284 then true
295285 else (0 > newOrdPr))
296286 then throw("Price can't be negative")
297287 else {
298288 let curOrdUsd = fraction(curOrdAm, curOrdPr, MULT8)
299289 if ((newOrdAm == 0))
300290 then if ((curOrdAm > 0))
301- then $Tuple9((j + 1), (acc._2 :+ toString(whInit)), acc._3, acc._4, (acc._5 - curOrdUsd), acc._6, acc._7, isProd, (acc._9 + toVolume(whInit, pkgSize, isProd)))
302- else $Tuple9((j + 1), (acc._2 :+ toString((whInit - curOrdAm))), acc._3, acc._4, acc._5, acc._6, acc._7, isProd, (acc._9 + toVolume((whInit - curOrdAm), pkgSize, isProd)))
291+ then $Tuple9((j + 1), (acc._2 :+ toString(whInit)), acc._3, acc._4, (acc._5 - curOrdUsd), acc._6, acc._7, isProd, (acc._9 + toVolume(whInit, productPkgSize, isProd)))
292+ else $Tuple9((j + 1), (acc._2 :+ toString((whInit - curOrdAm))), acc._3, acc._4, acc._5, acc._6, acc._7, isProd, (acc._9 + toVolume((whInit - curOrdAm), productPkgSize, isProd)))
303293 else if ((newOrdAm > 0))
304294 then if ((0 > curOrdAm))
305- then $Tuple9((j + 1), (acc._2 :+ toString((whInit - curOrdAm))), (acc._3 + newOrdVol), acc._4, (acc._5 + newOrdUsd), acc._6, acc._7, isProd, toVolume((whInit - curOrdAm), pkgSize, isProd))
306- else $Tuple9((j + 1), (acc._2 :+ toString(whInit)), (acc._3 + newOrdVol), acc._4, ((acc._5 + newOrdUsd) - curOrdUsd), acc._6, acc._7, isProd, toVolume(whInit, pkgSize, isProd))
295+ then $Tuple9((j + 1), (acc._2 :+ toString((whInit - curOrdAm))), (acc._3 + newOrdVol), acc._4, (acc._5 + newOrdUsd), acc._6, acc._7, isProd, toVolume((whInit - curOrdAm), productPkgSize, isProd))
296+ else $Tuple9((j + 1), (acc._2 :+ toString(whInit)), (acc._3 + newOrdVol), acc._4, ((acc._5 + newOrdUsd) - curOrdUsd), acc._6, acc._7, isProd, toVolume(whInit, productPkgSize, isProd))
307297 else if ((0 > curOrdAm))
308298 then {
309299 let amDiff = (curOrdAm - newOrdAm)
310300 if ((0 > (whInit - amDiff)))
311301 then throw((((("Attempt to take " + toString(amDiff)) + " from warehouse, but only ") + toString(whInit)) + " available"))
312- else $Tuple9((j + 1), (acc._2 :+ toString((whInit - amDiff))), acc._3, (acc._4 - newOrdVol), acc._5, acc._6, acc._7, isProd, toVolume((whInit - amDiff), pkgSize, isProd))
302+ else $Tuple9((j + 1), (acc._2 :+ toString((whInit - amDiff))), acc._3, (acc._4 - newOrdVol), acc._5, acc._6, acc._7, isProd, toVolume((whInit - amDiff), productPkgSize, isProd))
313303 }
314304 else if ((0 > (whInit + newOrdAm)))
315305 then throw((((("Attempt to take " + toString(-(newOrdAm))) + " from warehouse, but only ") + toString(whInit)) + " available"))
316- else $Tuple9((j + 1), (acc._2 :+ toString((whInit + newOrdAm))), acc._3, (acc._4 - newOrdVol), (acc._5 - curOrdUsd), acc._6, acc._7, isProd, toVolume((whInit + newOrdAm), pkgSize, isProd))
306+ else $Tuple9((j + 1), (acc._2 :+ toString((whInit + newOrdAm))), acc._3, (acc._4 - newOrdVol), (acc._5 - curOrdUsd), acc._6, acc._7, isProd, toVolume((whInit + newOrdAm), productPkgSize, isProd))
317307 }
318308 }
319309 }
320310
321311
322312 func setInternal (currentWh,currentOrd,newOrd) = {
323313 let currWhRes = split(currentWh[whIdxRes], "_")
324314 let currWhMat = split(currentWh[whIdxMat], "_")
325315 let currWhProd = if ((currentWh[whIdxProd] == ""))
326316 then nil
327317 else split(currentWh[whIdxProd], "_")
328318 let currentOrdRes = split(currentOrd[ordIdxRes], "_")
329319 let currentOrdMat = split(currentOrd[ordIdxMat], "_")
330320 let currentOrdProd = if ((currentOrd[ordIdxProd] == ""))
331321 then nil
332322 else split(currentOrd[ordIdxProd], "_")
333323 if ((size(newOrd) != 3))
334324 then throw("newOrderStr should contain exactly 2 ':' separators")
335325 else {
336326 let resParts = split(newOrd[0], "_")
337327 let matParts = split(newOrd[1], "_")
338328 let prodParts = if ((newOrd[2] == ""))
339329 then nil
340330 else split(newOrd[2], "_")
341331 if ((size(resParts) != NUMRES))
342332 then throw("All 6 resources should be passed")
343333 else if ((size(matParts) != NUMRES))
344334 then throw("All 6 materials should be passed")
345335 else {
346336 let r = {
347337 let $l = resParts
348338 let $s = size($l)
349339 let $acc0 = $Tuple9(0, nil, 0, 0, 0, currWhRes, currentOrdRes, false, 0)
350340 func $f0_1 ($a,$i) = if (($i >= $s))
351341 then $a
352342 else setCommon($a, $l[$i])
353343
354344 func $f0_2 ($a,$i) = if (($i >= $s))
355345 then $a
356346 else throw("List size exceeds 6")
357347
358348 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
359349 }
360350 let m = {
361351 let $l = matParts
362352 let $s = size($l)
363353 let $acc0 = $Tuple9(0, nil, r._3, r._4, r._5, currWhMat, currentOrdMat, false, r._9)
364354 func $f1_1 ($a,$i) = if (($i >= $s))
365355 then $a
366356 else setCommon($a, $l[$i])
367357
368358 func $f1_2 ($a,$i) = if (($i >= $s))
369359 then $a
370360 else throw("List size exceeds 6")
371361
372362 $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6)
373363 }
374364 let p = if ((size(prodParts) != 0))
375365 then {
376366 let $l = prodParts
377367 let $s = size($l)
378368 let $acc0 = $Tuple9(0, nil, m._3, m._4, m._5, currWhProd, currentOrdProd, true, m._9)
379369 func $f2_1 ($a,$i) = if (($i >= $s))
380370 then $a
381371 else setCommon($a, $l[$i])
382372
383373 func $f2_2 ($a,$i) = if (($i >= $s))
384374 then $a
385375 else throw("List size exceeds 50")
386376
387377 $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)
388378 }
389379 else $Tuple9(0, currWhProd, m._3, m._4, m._5, currWhProd, currentOrdProd, true, m._9)
390380 $Tuple7(r._2, m._2, p._2, p._3, p._4, p._5, p._9)
391381 }
392382 }
393383 }
394384
395385
396386 func acceptCommon (acc,bpOrdItem) = {
397387 let j = acc._7
398388 let isProd = acc._12
399- let pkgSize = if (isProd)
400- then parseIntValue(split(productionMatrix[j], "_")[recipeIdxPacksize])
401- else 0
402389 let bpOrdParts = split(bpOrdItem, "@")
403390 if ((size(bpOrdParts) != 2))
404391 then throw("Incorrect order format, should be amount@price")
405392 else {
406393 let bpOrdAm = parseIntValue(bpOrdParts[0])
407394 let bpOrdPr = parseIntValue(bpOrdParts[1])
408395 if ((0 > bpOrdPr))
409396 then throw("Price can't be negative")
410397 else {
411398 let bpOrdUsd = fraction(bpOrdAm, bpOrdPr, MULT8)
412399 let bpInit = if ((size(acc._8) > j))
413400 then parseIntValue(acc._8[j])
414401 else 0
415402 let whInit = if ((size(acc._9) > j))
416403 then parseIntValue(acc._9[j])
417404 else 0
418405 let whOrdInit = if ((size(acc._10) > j))
419406 then acc._10[j]
420407 else "0@0"
421408 let whOrdParts = split(whOrdInit, "@")
422409 let whOrdAm = parseIntValue(whOrdParts[0])
423410 let whOrdPr = parseIntValue(whOrdParts[1])
424411 if (if ((bpOrdAm != 0))
425412 then (bpOrdPr != whOrdPr)
426413 else false)
427414 then throw(((((("Prices of " + acc._11[j]) + " don't match! WH price=") + toString(whOrdPr)) + ", your price=") + toString(bpOrdPr)))
428415 else {
429416 let whOrdUsd = fraction(whOrdAm, whOrdPr, MULT8)
430- let deltaVol = toVolume(bpOrdAm, pkgSize, isProd)
417+ let deltaVol = toVolume(bpOrdAm, productPkgSize, isProd)
431418 if ((bpOrdAm == 0))
432419 then $Tuple13((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, acc._13)
433420 else if ((bpOrdAm > 0))
434421 then if ((0 > whOrdAm))
435422 then if ((bpOrdAm > -(whOrdAm)))
436423 then throw(((((("Attempt to buy " + toString(bpOrdAm)) + " of ") + acc._11[j]) + ", but warehouse only sells ") + toString(-(whOrdAm))))
437424 else $Tuple13((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, (acc._13 + (if (isProd)
438425 then (bpOrdAm * MULT8)
439426 else bpOrdAm)))
440427 else throw((("Attempt to buy " + acc._11[j]) + " while warehouse doesn't sell it"))
441428 else if ((whOrdAm > 0))
442429 then if ((-(bpOrdAm) > whOrdAm))
443430 then throw(((((("Attempt to sell " + toString(-(bpOrdAm))) + " of ") + acc._11[j]) + ", but warehouse only buys ") + toString(whOrdAm)))
444431 else if ((-(bpOrdAm) > bpInit))
445432 then throw(((((("Attempt to sell " + toString(-(bpOrdAm))) + ", but you only have ") + toString(bpInit)) + " of ") + acc._11[j]))
446433 else $Tuple13((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, (acc._13 - (if (isProd)
447434 then (bpOrdAm * MULT8)
448435 else bpOrdAm)))
449436 else throw((("Attempt to sell " + acc._11[j]) + " while warehouse doesn't buy it"))
450437 }
451438 }
452439 }
453440 }
454441
455442
456443 @Callable(i)
457444 func recalcLockedVolumeREADONLY (landAssetId,wh) = {
458445 let currentOrd = getOrder(keyOrderByLand(landAssetId))
459446 let z = setInternal(wh, currentOrd, currentOrd)
460447 $Tuple2(nil, (z._4 + z._5))
461448 }
462449
463450
464451
465452 @Callable(i)
466453 func constructorV1 (restAddr) = if ((i.caller != this))
467454 then throw("Permission denied")
468455 else [StringEntry(keyRestAddress(), restAddr)]
469456
470457
471458
472459 @Callable(i)
473460 func sellResources (amounts,minPrices) = {
474461 let prologResult = prolog()
475462 let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
476463 if ((size(i.payments) != 0))
477464 then throw("sellResources doesn't require any payments")
478465 else {
479466 let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_")
480467 if ((curLocation[locIdxType] != "F"))
481468 then throw(("Duck location type should be Factory, but is " + curLocation[locIdxType]))
482469 else {
483470 let locId = curLocation[locIdxId]
484471 let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
485472 let resList = split(currentPack[bpIdxRes], "_")
486473 func adder (acc,j) = if ((amounts[j] > parseIntValue(resList[j])))
487474 then throw(((((("You have " + resList[j]) + " of ") + resTypes[j]) + ", but tried to sell ") + toString(amounts[j])))
488475 else if ((0 > amounts[j]))
489476 then throw(((("You tried to sell negative amount of " + resTypes[j]) + ": ") + toString(amounts[j])))
490477 else if ((amounts[j] > 0))
491478 then {
492479 let b = sellInternal(locId, j, amounts[j], minPrices[j])
493480 $Tuple4((acc._1 :+ b._1), (acc._2 :+ toString((parseIntValue(resList[j]) - amounts[j]))), (acc._3 + b._2), (acc._4 + amounts[j]))
494481 }
495482 else $Tuple4(acc._1, (acc._2 :+ resList[j]), acc._3, acc._4)
496483
497484 let merged = {
498485 let $l = [0, 1, 2, 3, 4, 5]
499486 let $s = size($l)
500487 let $acc0 = $Tuple4(nil, nil, 0, 0)
501488 func $f0_1 ($a,$i) = if (($i >= $s))
502489 then $a
503490 else adder($a, $l[$i])
504491
505492 func $f0_2 ($a,$i) = if (($i >= $s))
506493 then $a
507494 else throw("List size exceeds 6")
508495
509496 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
510497 }
511498 let newPack = makeString([currentPack[bpIdxLevel], makeString(merged._2, "_"), currentPack[bpIdxMat], currentPack[bpIdxProd]], ":")
512499 let result = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
513500 let statsResult = asInt(invoke(stakingContract, "updateDuckStats", [duckAssetId, fraction(xpTrade, merged._4, MULT8)], nil))
514501 $Tuple2((merged._1 :+ ScriptTransfer(i.caller, merged._3, usdtAssetId)), $Tuple3(result, prologResult, statsResult))
515502 }
516503 }
517504 }
518505
519506
520507
521508 @Callable(i)
522509 func buyMaterials (amounts,maxPrices) = {
523510 let prologResult = prolog()
524511 let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
525512 if ((size(i.payments) != 1))
526513 then throw("exactly 1 payment must be attached")
527514 else {
528515 let pmt = i.payments[0]
529516 let amt = pmt.amount
530517 let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment")
531518 if ((pmtAssetId != usdtAssetId))
532519 then throw("USDT payments only!")
533520 else {
534521 let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_")
535522 if ((curLocation[locIdxType] != "F"))
536523 then throw(("Duck location type should be Factory, but is " + curLocation[locIdxType]))
537524 else {
538525 let locId = curLocation[locIdxId]
539526 let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
540527 let matList = split(currentPack[bpIdxMat], "_")
541528 func mUpdater (acc,j) = if ((0 > amounts[j]))
542529 then throw(((("You tried to buy negative amount of " + matTypes[j]) + ": ") + toString(amounts[j])))
543530 else if ((amounts[j] > 0))
544531 then {
545532 let b = buyInternal(locId, j, amounts[j], maxPrices[j])
546533 $Tuple4((acc._1 :+ b._1), (acc._2 :+ toString((parseIntValue(matList[j]) + b._3))), (acc._3 + b._2), (acc._4 + amounts[j]))
547534 }
548535 else $Tuple4(acc._1, (acc._2 :+ matList[j]), acc._3, acc._4)
549536
550537 let merged = {
551538 let $l = [0, 1, 2, 3, 4, 5]
552539 let $s = size($l)
553540 let $acc0 = $Tuple4(nil, nil, 0, 0)
554541 func $f0_1 ($a,$i) = if (($i >= $s))
555542 then $a
556543 else mUpdater($a, $l[$i])
557544
558545 func $f0_2 ($a,$i) = if (($i >= $s))
559546 then $a
560547 else throw("List size exceeds 6")
561548
562549 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
563550 }
564551 if ((merged._3 > amt))
565552 then throw(((("Insufficient payment! Attached=" + toString(amt)) + ", required=") + toString(merged._3)))
566553 else {
567554 let newPack = makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], makeString(merged._2, "_"), currentPack[bpIdxProd]], ":")
568555 let result = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
569556 let rest = if (((amt - merged._3) > 0))
570557 then [ScriptTransfer(i.caller, (amt - merged._3), usdtAssetId)]
571558 else nil
572559 let activitiesAmount = (merged._3 / 100)
573560 let statsResult = asInt(invoke(stakingContract, "updateDuckStats", [duckAssetId, fraction(xpTrade, merged._4, MULT8)], nil))
574561 $Tuple2(((merged._1 ++ rest) :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)), $Tuple3(result, prologResult, statsResult))
575562 }
576563 }
577564 }
578565 }
579566 }
580567
581568
582569
583570 @Callable(i)
584571 func exchangeResources (amounts) = {
585572 let prologResult = prolog()
586573 let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
587574 if ((size(i.payments) != 1))
588575 then throw("exactly 1 payment must be attached")
589576 else {
590577 let pmt = i.payments[0]
591578 let amt = pmt.amount
592579 let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment")
593580 if ((pmtAssetId != usdtAssetId))
594581 then throw("USDT payments only!")
595582 else {
596583 let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_")
597584 if ((curLocation[locIdxType] != "F"))
598585 then throw(("Duck location type should be Factory, but is " + curLocation[locIdxType]))
599586 else {
600587 let locId = curLocation[locIdxId]
601588 let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
602589 let resList = split(currentPack[bpIdxRes], "_")
603590 let matList = split(currentPack[bpIdxMat], "_")
604591 func exchanger (acc,j) = {
605592 let whKey = keyFactoryWarehouseByIdAndType(locId, j)
606593 let w0 = valueOrElse(getInteger(whKey), 0)
607594 let amj = amounts[j]
608595 if ((amj > parseIntValue(resList[j])))
609596 then throw(((((("You have " + resList[j]) + " of ") + resTypes[j]) + ", but tried to exchange ") + toString(amj)))
610597 else if ((0 > amj))
611598 then throw(((("You tried to exchange negative amount of " + resTypes[j]) + ": ") + toString(amj)))
612599 else if ((amj > 0))
613600 then $Tuple5((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)), (acc._5 + amj))
614601 else $Tuple5((acc._1 :+ resList[j]), (acc._2 :+ matList[j]), acc._3, acc._4, acc._5)
615602 }
616603
617604 let merged = {
618605 let $l = [0, 1, 2, 3, 4, 5]
619606 let $s = size($l)
620607 let $acc0 = $Tuple5(nil, nil, 0, nil, 0)
621608 func $f0_1 ($a,$i) = if (($i >= $s))
622609 then $a
623610 else exchanger($a, $l[$i])
624611
625612 func $f0_2 ($a,$i) = if (($i >= $s))
626613 then $a
627614 else throw("List size exceeds 6")
628615
629616 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
630617 }
631618 if ((merged._3 > amt))
632619 then throw(((("Insufficient payment! Attached=" + toString(amt)) + ", required=") + toString(merged._3)))
633620 else {
634621 let newPack = makeString([currentPack[bpIdxLevel], makeString(merged._1, "_"), makeString(merged._2, "_"), currentPack[bpIdxProd]], ":")
635622 let result = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
636623 let rest = if (((amt - merged._3) > 0))
637624 then [ScriptTransfer(i.caller, (amt - merged._3), usdtAssetId)]
638625 else nil
639626 let activitiesAmount = (merged._3 / 100)
640627 let statsResult = asInt(invoke(stakingContract, "updateDuckStats", [duckAssetId, fraction(xpTrade, merged._5, MULT8)], nil))
641628 $Tuple2(((rest ++ merged._4) :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)), $Tuple3(result, prologResult, statsResult))
642629 }
643630 }
644631 }
645632 }
646633 }
647634
648635
649636
650637 @Callable(i)
651638 func craftGoods (productIdx,quantity) = {
652639 let prologResult = prolog()
653640 if ((size(i.payments) != 1))
654641 then throw("exactly 1 payment must be attached")
655642 else {
656643 let pmt = i.payments[0]
657644 let amt = pmt.amount
658645 let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment")
659646 if ((pmtAssetId != usdtAssetId))
660647 then throw("USDT payments only!")
661648 else if ((amt != MULT6))
662649 then throw("exactly 1 USDT must be attached as payment")
663650 else if ((0 >= quantity))
664651 then throw("Quantity should be positive")
665652 else {
666653 let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
667654 let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_")
668655 if ((curLocation[locIdxType] != "M"))
669656 then throw(("Duck location type should be Manufactory, but is " + curLocation[locIdxType]))
670657 else {
671658 let cont = curLocation[locIdxContinent]
672659 let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
673660 let matList = split(currentPack[bpIdxMat], "_")
674661 if (if ((0 > productIdx))
675662 then true
676663 else (productIdx >= size(productionMatrix)))
677664 then throw(("Unknown product idx=" + toString(productIdx)))
678665 else {
679666 let recipe = split(productionMatrix[productIdx], "_")
680- if ((size(recipe) != (NUMRES + 3)))
667+ if ((size(recipe) != recipeSize))
681668 then throw(("Fatal: unknown recipe: " + productionMatrix[productIdx]))
682669 else {
683- let productContIdx = parseIntValue(recipe[recipeIdxContinent])
670+ let productContIdx = parseIntValue(recipe[rIdxContinent])
684671 if ((continents[productContIdx] != cont))
685672 then throw(((("This product is available in " + continents[productContIdx]) + ", but you are in ") + cont))
686673 else {
687674 let prodList = if ((currentPack[bpIdxProd] == ""))
688675 then nil
689676 else split(currentPack[bpIdxProd], "_")
690677 func filler (acc,ignoredItem) = {
691678 let n = acc._2
692679 let xs = if ((size(prodList) > n))
693680 then prodList[n]
694681 else "0"
695682 let x = parseIntValue(xs)
696- let amount = (quantity * parseIntValue(recipe[recipeIdxPacksize]))
683+ let amount = (quantity * productPkgSize)
697684 let y = if ((n == productIdx))
698685 then toString((x + amount))
699686 else xs
700687 $Tuple2((acc._1 :+ y), (n + 1))
701688 }
702689
703690 let bpProd = ( let $l = productionMatrix
704691 let $s = size($l)
705692 let $acc0 = $Tuple2(nil, 0)
706693 func $f0_1 ($a,$i) = if (($i >= $s))
707694 then $a
708695 else filler($a, $l[$i])
709696
710697 func $f0_2 ($a,$i) = if (($i >= $s))
711698 then $a
712699 else throw("List size exceeds 50")
713700
714701 $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
715702 func producer (acc,j) = {
716- let needMat = ((parseIntValue(recipe[j]) * MULT7) * quantity)
703+ let needMat = ((parseIntValue(recipe[j]) * MULT6) * quantity)
717704 let haveMat = parseIntValue(matList[j])
718705 if ((needMat > haveMat))
719- then throw(((((((("You have " + matList[j]) + " of ") + matTypes[j]) + ", but recipe requires ") + toString(needMat)) + " for quantity ") + toString(quantity)))
706+ then throw(((((((("You have " + fixedPoint(haveMat, 8)) + " of ") + matTypes[j]) + ", but recipe requires ") + fixedPoint(needMat, 8)) + " for quantity ") + toString(quantity)))
720707 else if ((needMat > 0))
721708 then $Tuple2((acc._1 :+ toString((haveMat - needMat))), (acc._2 + needMat))
722709 else $Tuple2((acc._1 :+ matList[j]), acc._2)
723710 }
724711
725712 let merged = {
726713 let $l = [0, 1, 2, 3, 4, 5]
727714 let $s = size($l)
728715 let $acc0 = $Tuple2(nil, 0)
729716 func $f1_1 ($a,$i) = if (($i >= $s))
730717 then $a
731718 else producer($a, $l[$i])
732719
733720 func $f1_2 ($a,$i) = if (($i >= $s))
734721 then $a
735722 else throw("List size exceeds 6")
736723
737724 $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6)
738725 }
739726 let newPack = makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], makeString(merged._1, "_"), makeString(bpProd, "_")], ":")
740727 let result = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil))
741728 let statsResult = asInt(invoke(stakingContract, "updateDuckStats", [duckAssetId, fraction(xpCraft, merged._2, MULT8)], nil))
742729 $Tuple2(nil, $Tuple3(result, prologResult, statsResult))
743730 }
744731 }
745732 }
746733 }
747734 }
748735 }
749736 }
750737
751738
752739
753740 @Callable(i)
754741 func setWarehouseOrder (newOrderStr,landAssetId) = {
755742 let user = i.originCaller
756743 let addr = toString(user)
757744 let result = if ((user != restContract))
758745 then checkBlocked()
759746 else false
760747 let asset = value(assetInfo(fromBase58String(landAssetId)))
761748 if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)))))
762749 then throw((("NFT " + asset.name) + " is not staked"))
763750 else {
764751 let owner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned"))
765752 if (if ((user != restContract))
766753 then (owner != addr)
767754 else false)
768755 then throw((LANDPREFIX + " is not yours"))
769756 else {
770757 let newOrder = split_4C(newOrderStr, ":")
771758 let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil))
772759 let currentWh = split_4C(wh, ":")
773760 let loft = split(currentWh[whIdxLOFT], "_")
774761 let whTotal = parseIntValue(loft[volTotal])
775762 let ordKey = keyOrderByLand(landAssetId)
776763 let currentOrd = getOrder(ordKey)
777764 let z = setInternal(currentWh, currentOrd, newOrder)
778765 let buyVolSaldo = z._4
779766 let sellVolSaldo = z._5
780767 let whOccupied = z._7
781768 let whLocked = (buyVolSaldo + sellVolSaldo)
782769 let whFree = ((whTotal - whOccupied) - whLocked)
783770 if ((0 > whFree))
784771 then throw((((((("Attempt to reserve " + toString(buyVolSaldo)) + " space for buy orders, and ") + toString(sellVolSaldo)) + " space for sell orders (and occupied=") + toString(whOccupied)) + "), leads to negative free space"))
785772 else {
786773 let whStr = makeString_2C([currentWh[whIdxLevels], makeString(z._1, "_"), makeString(z._2, "_"), makeString(z._3, "_"), toString(whLocked)], ":")
787774 let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil))
788775 let usdSaldo = z._6
789776 let actions = if ((usdSaldo > 0))
790777 then if ((size(i.payments) != 1))
791778 then throw("exactly 1 payment must be attached")
792779 else {
793780 let pmt = i.payments[0]
794781 let amt = pmt.amount
795782 let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment")
796783 if ((pmtAssetId != usdtAssetId))
797784 then throw("USDT payments only!")
798785 else if ((amt != usdSaldo))
799786 then throw(("Payment needed is " + toString(usdSaldo)))
800787 else [StringEntry(ordKey, newOrderStr)]
801788 }
802789 else if ((usdSaldo == 0))
803790 then if ((size(i.payments) != 0))
804791 then throw("No payments needed")
805792 else [StringEntry(ordKey, newOrderStr)]
806793 else if ((size(i.payments) != 0))
807794 then throw("No payments needed")
808795 else [ScriptTransfer(addressFromStringValue(owner), -(usdSaldo), usdtAssetId), StringEntry(ordKey, newOrderStr)]
809796 $Tuple2(actions, $Tuple2(result, whSave))
810797 }
811798 }
812799 }
813800 }
814801
815802
816803
817804 @Callable(i)
818805 func acceptWarehouseOrder (bpOrderStr,landAssetId,duckAssetId) = {
819806 let prologResult = prolog()
820807 let caller = i.originCaller
821808 let callerAddr = toString(caller)
822809 let stakedDuckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(callerAddr)), "You don't have a duck staked")
823810 let curLocation = valueOrElse(getString(stakingContract, keyDuckLocation(stakedDuckAssetId)), DEFAULTLOCATION)
824811 let loc = split(value(curLocation), "_")
825812 if ((loc[locIdxType] != "L"))
826813 then throw((("Duck location type is " + loc[locIdxType]) + ", but should be L"))
827814 else if ((stakedDuckAssetId != duckAssetId))
828815 then throw(((("Your staked duck is " + stakedDuckAssetId) + ", but passed ") + duckAssetId))
829816 else {
830817 let landAsset = value(assetInfo(fromBase58String(landAssetId)))
831818 if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)))))
832819 then throw((("NFT " + landAsset.name) + " is not staked"))
833820 else {
834821 let landOwner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(landAssetId)), (("NFT " + landAsset.name) + " is orphaned"))
835822 if ((landOwner == callerAddr))
836823 then throw("You cannot trade with yourself")
837824 else {
838825 let bpOrderParts = split_4C(bpOrderStr, ":")
839826 if ((size(bpOrderParts) != 3))
840827 then throw("bpOrderStr should contain exactly 2 ':' separators")
841828 else {
842829 let bpOrdRes = split(bpOrderParts[0], "_")
843830 let bpOrdMat = split(bpOrderParts[1], "_")
844831 let bpOrdProd = if ((bpOrderParts[2] == ""))
845832 then nil
846833 else split(bpOrderParts[2], "_")
847834 if ((size(bpOrdRes) != NUMRES))
848835 then throw("All 6 resources should be passed")
849836 else if ((size(bpOrdMat) != NUMRES))
850837 then throw("All 6 materials should be passed")
851838 else {
852839 let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil))
853840 let currentWh = split_4C(wh, ":")
854841 let currWhRes = split(currentWh[whIdxRes], "_")
855842 let currWhMat = split(currentWh[whIdxMat], "_")
856843 let currWhProd = if ((currentWh[whIdxProd] == ""))
857844 then nil
858845 else split(currentWh[whIdxProd], "_")
859846 let currWhLockedVol = parseIntValue(split(currentWh[whIdxLOFT], "_")[volLocked])
860847 let bpKey = keyBackpackByDuck(duckAssetId)
861848 let currentPack = getBackpack(bpKey)
862849 let bpResList = split(currentPack[bpIdxRes], "_")
863850 let bpMatList = split(currentPack[bpIdxMat], "_")
864851 let bpProdList = if ((currentPack[bpIdxProd] == ""))
865852 then nil
866853 else split(currentPack[bpIdxProd], "_")
867854 let ordKey = keyOrderByLand(landAssetId)
868855 let whOrd = getOrder(ordKey)
869856 let whOrdRes = split(whOrd[ordIdxRes], "_")
870857 let whOrdMat = split(whOrd[ordIdxMat], "_")
871858 let whOrdProd = if ((whOrd[ordIdxProd] == ""))
872859 then nil
873860 else split(whOrd[ordIdxProd], "_")
874861 let r = {
875862 let $l = bpOrdRes
876863 let $s = size($l)
877864 let $acc0 = $Tuple13(nil, nil, nil, 0, 0, 0, 0, bpResList, currWhRes, whOrdRes, resTypes, false, 0)
878865 func $f0_1 ($a,$i) = if (($i >= $s))
879866 then $a
880867 else acceptCommon($a, $l[$i])
881868
882869 func $f0_2 ($a,$i) = if (($i >= $s))
883870 then $a
884871 else throw("List size exceeds 6")
885872
886873 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
887874 }
888875 let m = {
889876 let $l = bpOrdMat
890877 let $s = size($l)
891878 let $acc0 = $Tuple13(nil, nil, nil, r._4, r._5, r._6, 0, bpMatList, currWhMat, whOrdMat, matTypes, false, r._13)
892879 func $f1_1 ($a,$i) = if (($i >= $s))
893880 then $a
894881 else acceptCommon($a, $l[$i])
895882
896883 func $f1_2 ($a,$i) = if (($i >= $s))
897884 then $a
898885 else throw("List size exceeds 6")
899886
900887 $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6)
901888 }
902889 let p = if ((size(bpOrdProd) != 0))
903890 then {
904891 let $l = bpOrdProd
905892 let $s = size($l)
906893 let $acc0 = $Tuple13(nil, nil, nil, m._4, m._5, m._6, 0, bpProdList, currWhProd, whOrdProd, prodTypes, true, m._13)
907894 func $f2_1 ($a,$i) = if (($i >= $s))
908895 then $a
909896 else acceptCommon($a, $l[$i])
910897
911898 func $f2_2 ($a,$i) = if (($i >= $s))
912899 then $a
913900 else throw("List size exceeds 50")
914901
915902 $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)
916903 }
917904 else $Tuple13(currWhProd, whOrdProd, bpProdList, m._4, m._5, m._6, 0, bpProdList, currWhProd, whOrdProd, prodTypes, true, m._13)
918905 let volSaldo = p._4
919906 let newLockedVol = if ((0 > (currWhLockedVol - volSaldo)))
920907 then 0
921908 else (currWhLockedVol - volSaldo)
922909 let whStr = makeString_2C([currentWh[whIdxLevels], makeString(r._1, "_"), makeString(m._1, "_"), makeString(p._1, "_"), toString(newLockedVol)], ":")
923910 let newWhOrdStr = makeString_2C([makeString(r._2, "_"), makeString(m._2, "_"), makeString(p._2, "_")], ":")
924911 let newBpStr = makeString_2C([currentPack[bpIdxLevel], makeString(r._3, "_"), makeString(m._3, "_"), makeString(p._3, "_")], ":")
925912 let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil))
926913 let bpSave = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newBpStr], nil))
927914 let duckStatsResult = asInt(invoke(stakingContract, "updateDuckStats", [duckAssetId, fraction(xpShop, p._13, MULT8)], nil))
928915 let accStatsResult = asInt(invoke(stakingContract, "updateAccStats", [landOwner, fraction(xpShop, p._13, MULT8)], nil))
929916 let actions = [StringEntry(ordKey, newWhOrdStr)]
930917 let usdWh2BpSaldo = p._5
931918 let actions1 = if ((usdWh2BpSaldo > 0))
932919 then {
933920 let usdWh2BpFee = fraction(p._5, AUCTIONFEE, MULT6)
934921 let refByKey = keyAddressRefBy(callerAddr)
935922 let refBy = getString(stakingContract, refByKey)
936923 if (isDefined(refBy))
937924 then (((actions :+ ScriptTransfer(caller, (p._5 - (3 * usdWh2BpFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdWh2BpFee, usdtAssetId)) :+ ScriptTransfer(addressFromStringValue(value(refBy)), usdWh2BpFee, usdtAssetId))
938925 else ((actions :+ ScriptTransfer(caller, (p._5 - (3 * usdWh2BpFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdWh2BpFee, usdtAssetId))
939926 }
940927 else actions
941928 let usdBp2WhSaldo = p._6
942929 let actions2 = if ((usdBp2WhSaldo > 0))
943930 then if ((size(i.payments) != 1))
944931 then throw("exactly 1 payment must be attached")
945932 else {
946933 let pmt = i.payments[0]
947934 let amt = pmt.amount
948935 let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment")
949936 if ((pmtAssetId != usdtAssetId))
950937 then throw("USDT payments only!")
951938 else if ((amt != usdBp2WhSaldo))
952939 then throw(("Payment needed is " + toString(usdBp2WhSaldo)))
953940 else if ((MINSHOPPAYMENT > amt))
954941 then throw(("Payment should be at least " + toString(MINSHOPPAYMENT)))
955942 else {
956943 let usdBp2WhFee = fraction(p._6, AUCTIONFEE, MULT6)
957944 let refByKey = keyAddressRefBy(landOwner)
958945 let refBy = getString(stakingContract, refByKey)
959946 if (isDefined(refBy))
960947 then (((actions1 :+ ScriptTransfer(addressFromStringValue(landOwner), (p._6 - (3 * usdBp2WhFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdBp2WhFee, usdtAssetId)) :+ ScriptTransfer(addressFromStringValue(value(refBy)), usdBp2WhFee, usdtAssetId))
961948 else ((actions1 :+ ScriptTransfer(addressFromStringValue(landOwner), (p._6 - (3 * usdBp2WhFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdBp2WhFee, usdtAssetId))
962949 }
963950 }
964951 else if ((size(i.payments) != 0))
965952 then throw("No payments needed")
966953 else actions1
967954 $Tuple2(actions2, $Tuple5(prologResult, whSave, bpSave, duckStatsResult, accStatsResult))
968955 }
969956 }
970957 }
971958 }
972959 }
973960 }
974961
975962
976963
977964 @Callable(i)
978965 func sellProductsToES (amounts) = {
979966 let prologResult = prolog()
980967 if ((size(i.payments) != 0))
981968 then throw("No payments needed")
982969 else {
983970 let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
984971 let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_")
985972 if ((curLocation[locIdxType] != "A"))
986973 then throw(("Duck location type should be Airport, but is " + curLocation[locIdxType]))
987974 else {
988975 let currentPack = getBackpack(keyBackpackByDuck(duckAssetId))
989976 let prodList = if ((currentPack[bpIdxProd] == ""))
990977 then nil
991978 else split(currentPack[bpIdxProd], "_")
992979 let esKey = keyEsWarehouse()
993980 let existStr = getString(esKey)
994981 let existAmounts = if (isDefined(existStr))
995982 then split(value(existStr), "_")
996983 else nil
997984 func moveProd (acc,recipeStr) = {
998985 let j = acc._1
999986 let quantity = if ((size(amounts) > j))
1000987 then amounts[j]
1001988 else 0
1002989 if ((0 > quantity))
1003990 then throw("Quantity cannot be negative")
1004991 else {
1005992 let recipe = split(recipeStr, "_")
1006- if ((size(recipe) != (NUMRES + 3)))
993+ if ((size(recipe) != recipeSize))
1007994 then throw(("Fatal: unknown recipe: " + recipeStr))
1008995 else {
1009- let packSize = parseIntValue(recipe[recipeIdxPacksize])
1010- let maxAmount = (ESMAXPACKAGES * packSize)
996+ let maxAmount = (ESMAXPACKAGES * productPkgSize)
1011997 let existAmount = if ((size(existAmounts) > j))
1012998 then parseIntValue(existAmounts[j])
1013999 else 0
10141000 let canBuy = (maxAmount - existAmount)
10151001 if ((quantity > canBuy))
10161002 then throw(((("Warehouse can buy only " + toString(canBuy)) + " of ") + prodTypes[j]))
10171003 else {
10181004 let totalMat = getRecipeMaterials(recipe)
1019- let unitPrice = fraction((totalMat * ESBUYCOEF), RESOURCEPRICEMIN, (10 * packSize))
1005+ let unitPrice = fraction((totalMat * ESBUYCOEF), RESOURCEPRICEMIN, (10 * productPkgSize))
10201006 let bpProdAmount = if ((size(prodList) > j))
10211007 then parseIntValue(prodList[j])
10221008 else 0
10231009 if ((quantity > bpProdAmount))
10241010 then throw(((("You have only " + toString(bpProdAmount)) + " of ") + prodTypes[j]))
10251011 else $Tuple5((j + 1), (acc._2 + (unitPrice * quantity)), (acc._3 :+ toString((bpProdAmount - quantity))), (acc._4 :+ toString((existAmount + quantity))), (acc._5 + (totalMat * quantity)))
10261012 }
10271013 }
10281014 }
10291015 }
10301016
10311017 let merged = {
10321018 let $l = productionMatrix
10331019 let $s = size($l)
10341020 let $acc0 = $Tuple5(0, 0, nil, nil, 0)
10351021 func $f0_1 ($a,$i) = if (($i >= $s))
10361022 then $a
10371023 else moveProd($a, $l[$i])
10381024
10391025 func $f0_2 ($a,$i) = if (($i >= $s))
10401026 then $a
10411027 else throw("List size exceeds 50")
10421028
10431029 $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)
10441030 }
10451031 let newBpStr = makeString_2C([currentPack[bpIdxLevel], currentPack[bpIdxRes], currentPack[bpIdxMat], makeString(merged._3, "_")], ":")
10461032 let bpSave = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newBpStr], nil))
10471033 let statsResult = asInt(invoke(stakingContract, "updateDuckStats", [duckAssetId, fraction(xpSellToEs, merged._5, (MULT8 * 10))], nil))
10481034 $Tuple2([StringEntry(esKey, makeString(merged._4, "_")), ScriptTransfer(i.caller, merged._2, usdtAssetId)], $Tuple3(bpSave, prologResult, statsResult))
10491035 }
10501036 }
10511037 }
10521038
10531039
10541040
10551041 @Callable(i)
10561042 func updateEsStorage (newStorage) = if ((i.caller != stakingContract))
10571043 then throw("Permission denied")
10581044 else $Tuple2([StringEntry(keyEsWarehouse(), newStorage)], newStorage)
10591045
10601046

github/deemru/w8io/169f3d6 
201.13 ms