tx · 6HvfrK4zKzbeDbUs2YWW3UUbLkNvk119UBkwhsfdi6HM 3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep: -0.03500000 Waves 2023.06.08 22:51 [2614133] smart account 3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep > SELF 0.00000000 Waves
{ "type": 13, "id": "6HvfrK4zKzbeDbUs2YWW3UUbLkNvk119UBkwhsfdi6HM", "fee": 3500000, "feeAssetId": null, "timestamp": 1686253956042, "version": 2, "chainId": 84, "sender": "3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep", "senderPublicKey": "7v5L7QkXxfkirALdyqmox38QCsa9jtfAtgUfHTh34eWq", "proofs": [ "2NLicY2sJboTjv1cpHtnvZjHPWXojHyMxWGmY3kC76bafR4K7BhVQBBGzm2WHRj7QFayjzkUAjz3Hc9ADtARHxZt" ], "script": "base64:BgI7CAISBAoCCBgSAwoBCBIECgIRERIECgIRERIDCgEREgQKAgEBEgQKAggIEgUKAwgICBIDCgEREgMKAQhKAAVjaGFpbgkAyQECCQDKAQIIBQR0aGlzBWJ5dGVzAAEAAQALdXNkdEFzc2V0SWQEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDABIITaerIIAz9O0bvKju6Lk7zJgt0LXfoHlqjUI/moD/+5AwkAAAIBAVQFByRtYXRjaDABIFWx2J9yh4Lv5eNbjawFq2XemkOhLxa7BfMat4el8cUYCQACAQINVW5rbm93biBjaGFpbgAVZGVmYXVsdFJlc3RBZGRyZXNzU3RyBAckbWF0Y2gwBQVjaGFpbgMJAAACAQFXBQckbWF0Y2gwAiMzUFFDdXZGYnZoNExrUFVucm5VMXozam5iQTFwOW0zV05odgMJAAACAQFUBQckbWF0Y2gwAiMzTXVta0dHenRDS0FYcFdEcXhrZGRvZnFYU1VicVFrdlNKeQkAAgECDVVua25vd24gY2hhaW4AA1NFUAICX18ABU1VTFQ2AMCEPQAFTVVMVDcAgK3iBAAFTVVMVDgAgMLXLwAGTVVMVDEwAI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GVxdWFsIHRvIGl0c2VsZi4BaQEPdXBkYXRlRXNTdG9yYWdlAQpuZXdTdG9yYWdlAwkBAiE9AggFAWkGY2FsbGVyBQ9zdGFraW5nQ29udHJhY3QJAAIBAhFQZXJtaXNzaW9uIGRlbmllZAkAlAoCCQDMCAIJAQtTdHJpbmdFbnRyeQIJAQ5rZXlFc1dhcmVob3VzZQAFCm5ld1N0b3JhZ2UFA25pbAUKbmV3U3RvcmFnZQB7Qkhi", "height": 2614133, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2Zb5UmkGfpDmPPVD58VB4Wd39UJFoG9ykqXginDhpetu Next: CPrDm4obDHeYaAhoYQV7sKzGXtLmw8BGVVwLz4Dpga33 Diff:
Old | New | Differences | |
---|---|---|---|
1003 | 1003 | then throw(((("Warehouse can buy only " + toString(canBuy)) + " of ") + prodTypes[j])) | |
1004 | 1004 | else { | |
1005 | 1005 | let totalMat = getRecipeMaterials(recipe) | |
1006 | - | let unitPrice = fraction((totalMat * ESBUYCOEF), RESOURCEPRICEMIN, 10) | |
1006 | + | let unitPrice = fraction((totalMat * ESBUYCOEF), RESOURCEPRICEMIN, (10 * packSize)) | |
1007 | 1007 | let bpProdAmount = if ((size(prodList) > j)) | |
1008 | 1008 | then parseIntValue(prodList[j]) | |
1009 | 1009 | else 0 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let chain = take(drop(this.bytes, 1), 1) | |
5 | 5 | ||
6 | 6 | let usdtAssetId = match chain { | |
7 | 7 | case _ => | |
8 | 8 | if ((base58'2W' == $match0)) | |
9 | 9 | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
10 | 10 | else if ((base58'2T' == $match0)) | |
11 | 11 | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
12 | 12 | else throw("Unknown chain") | |
13 | 13 | } | |
14 | 14 | ||
15 | 15 | let defaultRestAddressStr = match chain { | |
16 | 16 | case _ => | |
17 | 17 | if ((base58'2W' == $match0)) | |
18 | 18 | then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv" | |
19 | 19 | else if ((base58'2T' == $match0)) | |
20 | 20 | then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy" | |
21 | 21 | else throw("Unknown chain") | |
22 | 22 | } | |
23 | 23 | ||
24 | 24 | let SEP = "__" | |
25 | 25 | ||
26 | 26 | let MULT6 = 1000000 | |
27 | 27 | ||
28 | 28 | let MULT7 = 10000000 | |
29 | 29 | ||
30 | 30 | let MULT8 = 100000000 | |
31 | 31 | ||
32 | 32 | let MULT10 = 10000000000 | |
33 | 33 | ||
34 | 34 | let LANDPREFIX = "LAND" | |
35 | 35 | ||
36 | 36 | let NUMRES = 6 | |
37 | 37 | ||
38 | 38 | let DEFAULTLOCATION = "Africa_F_Africa" | |
39 | 39 | ||
40 | 40 | let RESOURCEPRICEMIN = 39637 | |
41 | 41 | ||
42 | 42 | let ESMAXPACKAGES = 3 | |
43 | 43 | ||
44 | 44 | let ESBUYCOEF = 4 | |
45 | 45 | ||
46 | 46 | let resTypes = ["Oil", "Ore", "Wood", "Sand", "Clay", "Organic"] | |
47 | 47 | ||
48 | 48 | let matTypes = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"] | |
49 | 49 | ||
50 | 50 | 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"] | |
51 | 51 | ||
52 | 52 | let continents = ["Americas", "Europe", "Asia", "Africa", "Oceania"] | |
53 | 53 | ||
54 | 54 | 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"] | |
55 | 55 | ||
56 | 56 | let recipeIdxPacksize = 7 | |
57 | 57 | ||
58 | 58 | let recipeIdxContinent = 8 | |
59 | 59 | ||
60 | 60 | let whIdxLevels = 0 | |
61 | 61 | ||
62 | 62 | let whIdxRes = 1 | |
63 | 63 | ||
64 | 64 | let whIdxMat = 2 | |
65 | 65 | ||
66 | 66 | let whIdxProd = 3 | |
67 | 67 | ||
68 | 68 | let whIdxLOFT = 4 | |
69 | 69 | ||
70 | 70 | let volLocked = 0 | |
71 | 71 | ||
72 | 72 | let volOccupied = 1 | |
73 | 73 | ||
74 | 74 | let volTotal = 3 | |
75 | 75 | ||
76 | 76 | let bpIdxLevel = 0 | |
77 | 77 | ||
78 | 78 | let bpIdxRes = 1 | |
79 | 79 | ||
80 | 80 | let bpIdxMat = 2 | |
81 | 81 | ||
82 | 82 | let bpIdxProd = 3 | |
83 | 83 | ||
84 | 84 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | let IdxCfgStakingDapp = 1 | |
88 | 88 | ||
89 | 89 | func keyRestCfg () = "%s__restConfig" | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func keyRestAddress () = "%s__restAddr" | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP) | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx))) | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr)) | |
102 | 102 | ||
103 | 103 | let restCfg = readRestCfgOrFail(restContract) | |
104 | 104 | ||
105 | 105 | let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp) | |
106 | 106 | ||
107 | 107 | func keyLandAssetIdToOwner (assetId) = ("nftOwner_" + assetId) | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func keyStakedTimeByAssetId (assetId) = ("stakedTime_" + assetId) | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func keyAddressRefBy (addr) = ("accRefBy_" + addr) | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr) | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func keyBackpackByDuck (duckAssetId) = ("backPack_" + duckAssetId) | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func keyDuckLocation (duckAssetId) = ("duckLocation_" + duckAssetId) | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func keyBlocked () = "contractsBlocked" | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func keyOrderByLand (landAssetId) = ("landOrder_" + landAssetId) | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func keyEsWarehouse () = "emergencyWarehouseProducts" | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | let locIdxContinent = 0 | |
135 | 135 | ||
136 | 136 | let locIdxType = 1 | |
137 | 137 | ||
138 | 138 | let locIdxId = 2 | |
139 | 139 | ||
140 | 140 | func asString (v) = match v { | |
141 | 141 | case s: String => | |
142 | 142 | s | |
143 | 143 | case _ => | |
144 | 144 | throw("fail to cast into String") | |
145 | 145 | } | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | func getRecipeMaterials (recipe) = { | |
149 | 149 | func addMat (ac,j) = (ac + parseIntValue(recipe[j])) | |
150 | 150 | ||
151 | 151 | let $l = [0, 1, 2, 3, 4, 5] | |
152 | 152 | let $s = size($l) | |
153 | 153 | let $acc0 = 0 | |
154 | 154 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
155 | 155 | then $a | |
156 | 156 | else addMat($a, $l[$i]) | |
157 | 157 | ||
158 | 158 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
159 | 159 | then $a | |
160 | 160 | else throw("List size exceeds 6") | |
161 | 161 | ||
162 | 162 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
163 | 163 | } | |
164 | 164 | ||
165 | 165 | ||
166 | 166 | let FACTORYMAXWAREHOUSE = 10000000000 | |
167 | 167 | ||
168 | 168 | let SELLMULTIPLIER = 200 | |
169 | 169 | ||
170 | 170 | let BUYMULTIPLIER = 300 | |
171 | 171 | ||
172 | 172 | let AUCTIONFEE = 10000 | |
173 | 173 | ||
174 | 174 | let MINSHOPPAYMENT = 100000 | |
175 | 175 | ||
176 | 176 | func keyFactoryWarehouseByIdAndType (factoryId,resType) = ((("factoryWhByContinentAndRes_" + factoryId) + "_") + toString(resType)) | |
177 | 177 | ||
178 | 178 | ||
179 | 179 | let ordIdxRes = 0 | |
180 | 180 | ||
181 | 181 | let ordIdxMat = 1 | |
182 | 182 | ||
183 | 183 | let ordIdxProd = 2 | |
184 | 184 | ||
185 | 185 | func getOrder (ordKey) = { | |
186 | 186 | 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:"), ":") | |
187 | 187 | [if ((size(split(p[ordIdxRes], "_")) == NUMRES)) | |
188 | 188 | then p[ordIdxRes] | |
189 | 189 | else "0@0_0@0_0@0_0@0_0@0_0@0", if ((size(split(p[ordIdxMat], "_")) == NUMRES)) | |
190 | 190 | then p[ordIdxMat] | |
191 | 191 | else "0@0_0@0_0@0_0@0_0@0_0@0", p[ordIdxProd]] | |
192 | 192 | } | |
193 | 193 | ||
194 | 194 | ||
195 | 195 | func toVolume (amount,pkgSize,isProduct) = if (isProduct) | |
196 | 196 | then { | |
197 | 197 | let pkgs = if ((amount >= 0)) | |
198 | 198 | then (((amount + pkgSize) - 1) / pkgSize) | |
199 | 199 | else -((((-(amount) + pkgSize) - 1) / pkgSize)) | |
200 | 200 | (pkgs * MULT8) | |
201 | 201 | } | |
202 | 202 | else amount | |
203 | 203 | ||
204 | 204 | ||
205 | 205 | func sellInternal (locId,resType,amount,minPrice) = { | |
206 | 206 | let whKey = keyFactoryWarehouseByIdAndType(locId, resType) | |
207 | 207 | let w0 = valueOrElse(getInteger(whKey), 0) | |
208 | 208 | let r0 = if ((w0 > FACTORYMAXWAREHOUSE)) | |
209 | 209 | then 0 | |
210 | 210 | else if (((w0 + amount) > FACTORYMAXWAREHOUSE)) | |
211 | 211 | then (FACTORYMAXWAREHOUSE - w0) | |
212 | 212 | else amount | |
213 | 213 | let usdtReceived = (fraction(r0, ((SELLMULTIPLIER * RESOURCEPRICEMIN) - fraction(((100 * w0) + (50 * r0)), RESOURCEPRICEMIN, FACTORYMAXWAREHOUSE)), MULT10) + fraction((amount - r0), RESOURCEPRICEMIN, MULT8)) | |
214 | 214 | let min99 = (minPrice - (minPrice / 100)) | |
215 | 215 | if (((min99 * amount) > (usdtReceived * MULT8))) | |
216 | 216 | then throw((((((((((("Actual price = " + toString(usdtReceived)) + " / ") + toString(amount)) + " < minPrice = ") + toString(minPrice)) + ", (") + locId) + ", ") + resTypes[resType]) + ")")) | |
217 | 217 | else $Tuple2(IntegerEntry(whKey, (w0 + amount)), usdtReceived) | |
218 | 218 | } | |
219 | 219 | ||
220 | 220 | ||
221 | 221 | func buyInternal (locId,matType,amount,maxPrice) = { | |
222 | 222 | let whKey = keyFactoryWarehouseByIdAndType(locId, matType) | |
223 | 223 | let w0 = valueOrElse(getInteger(whKey), 0) | |
224 | 224 | let m1 = if ((w0 > FACTORYMAXWAREHOUSE)) | |
225 | 225 | then min([amount, (w0 - FACTORYMAXWAREHOUSE)]) | |
226 | 226 | else 0 | |
227 | 227 | let m0 = min([w0, (amount - m1)]) | |
228 | 228 | let m = (m0 + m1) | |
229 | 229 | let usdtSpent = (fraction(m0, ((BUYMULTIPLIER * RESOURCEPRICEMIN) - fraction(((100 * w0) - (50 * m0)), RESOURCEPRICEMIN, FACTORYMAXWAREHOUSE)), MULT10) + fraction(m1, (2 * RESOURCEPRICEMIN), MULT8)) | |
230 | 230 | let max101 = (maxPrice + (maxPrice / 100)) | |
231 | 231 | if (((usdtSpent * MULT8) > (max101 * m))) | |
232 | 232 | then throw((((((((((("Actual price = " + toString(usdtSpent)) + " / ") + toString(m)) + " > maxPrice = ") + toString(maxPrice)) + ", (") + locId) + ", ") + matTypes[matType]) + ")")) | |
233 | 233 | else $Tuple3(IntegerEntry(whKey, (w0 - m)), usdtSpent, m) | |
234 | 234 | } | |
235 | 235 | ||
236 | 236 | ||
237 | 237 | func getBackpack (bpKey) = { | |
238 | 238 | let p = split(valueOrElse(getString(stakingContract, bpKey), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":") | |
239 | 239 | [toString(valueOrElse(parseInt(p[bpIdxLevel]), 0)), if ((size(split(p[bpIdxRes], "_")) == NUMRES)) | |
240 | 240 | then p[bpIdxRes] | |
241 | 241 | else "0_0_0_0_0_0", if ((size(split(p[bpIdxMat], "_")) == NUMRES)) | |
242 | 242 | then p[bpIdxMat] | |
243 | 243 | else "0_0_0_0_0_0", p[bpIdxProd]] | |
244 | 244 | } | |
245 | 245 | ||
246 | 246 | ||
247 | 247 | func checkBlocked () = if (valueOrElse(getBoolean(stakingContract, keyBlocked()), false)) | |
248 | 248 | then throw("Contracts are under maintenance") | |
249 | 249 | else unit | |
250 | 250 | ||
251 | 251 | ||
252 | 252 | func setCommon (acc,item) = { | |
253 | 253 | let j = acc._1 | |
254 | 254 | let isProd = acc._8 | |
255 | 255 | let pkgSize = if (isProd) | |
256 | 256 | then parseIntValue(split(productionMatrix[j], "_")[recipeIdxPacksize]) | |
257 | 257 | else 0 | |
258 | 258 | let itemParts = split(item, "@") | |
259 | 259 | if ((size(itemParts) != 2)) | |
260 | 260 | then throw("Incorrect order format, should be amount@price") | |
261 | 261 | else { | |
262 | 262 | let newOrdAm = parseIntValue(itemParts[0]) | |
263 | 263 | let newOrdPr = parseIntValue(itemParts[1]) | |
264 | 264 | let newOrdUsd = fraction(newOrdAm, newOrdPr, MULT8) | |
265 | 265 | let newOrdVol = toVolume(newOrdAm, pkgSize, isProd) | |
266 | 266 | let whInit = if ((size(acc._6) > j)) | |
267 | 267 | then parseIntValue(acc._6[j]) | |
268 | 268 | else 0 | |
269 | 269 | let curOrdParts = split(if ((size(acc._7) > j)) | |
270 | 270 | then acc._7[j] | |
271 | 271 | else "0@0", "@") | |
272 | 272 | let curOrdAm = parseIntValue(curOrdParts[0]) | |
273 | 273 | let curOrdPr = parseIntValue(curOrdParts[1]) | |
274 | 274 | if (if ((0 > curOrdPr)) | |
275 | 275 | then true | |
276 | 276 | else (0 > newOrdPr)) | |
277 | 277 | then throw("Price can't be negative") | |
278 | 278 | else { | |
279 | 279 | let curOrdUsd = fraction(curOrdAm, curOrdPr, MULT8) | |
280 | 280 | let curOrdVol = toVolume(curOrdAm, pkgSize, isProd) | |
281 | 281 | if ((newOrdAm == 0)) | |
282 | 282 | then if ((curOrdAm > 0)) | |
283 | 283 | then $Tuple8((j + 1), (acc._2 :+ toString(whInit)), acc._3, acc._4, (acc._5 - curOrdUsd), acc._6, acc._7, isProd) | |
284 | 284 | else $Tuple8((j + 1), (acc._2 :+ toString((whInit - curOrdAm))), acc._3, acc._4, acc._5, acc._6, acc._7, isProd) | |
285 | 285 | else if ((newOrdAm > 0)) | |
286 | 286 | then if ((0 > curOrdAm)) | |
287 | 287 | then $Tuple8((j + 1), (acc._2 :+ toString((whInit - curOrdAm))), (acc._3 + newOrdVol), acc._4, (acc._5 + newOrdUsd), acc._6, acc._7, isProd) | |
288 | 288 | else $Tuple8((j + 1), (acc._2 :+ toString(whInit)), (acc._3 + newOrdVol), acc._4, ((acc._5 + newOrdUsd) - curOrdUsd), acc._6, acc._7, isProd) | |
289 | 289 | else if ((0 > curOrdAm)) | |
290 | 290 | then { | |
291 | 291 | let amDiff = (curOrdAm - newOrdAm) | |
292 | 292 | if ((0 > (whInit - amDiff))) | |
293 | 293 | then throw((((("Attempt to take " + toString(amDiff)) + " from warehouse, but only ") + toString(whInit)) + " available")) | |
294 | 294 | else $Tuple8((j + 1), (acc._2 :+ toString((whInit - amDiff))), acc._3, (acc._4 - newOrdVol), acc._5, acc._6, acc._7, isProd) | |
295 | 295 | } | |
296 | 296 | else if ((0 > (whInit + newOrdAm))) | |
297 | 297 | then throw((((("Attempt to take " + toString(-(newOrdAm))) + " from warehouse, but only ") + toString(whInit)) + " available")) | |
298 | 298 | else $Tuple8((j + 1), (acc._2 :+ toString((whInit + newOrdAm))), acc._3, (acc._4 - newOrdVol), (acc._5 - curOrdUsd), acc._6, acc._7, isProd) | |
299 | 299 | } | |
300 | 300 | } | |
301 | 301 | } | |
302 | 302 | ||
303 | 303 | ||
304 | 304 | func setInternal (currentWh,currentOrd,newOrd) = { | |
305 | 305 | let currWhRes = split(currentWh[whIdxRes], "_") | |
306 | 306 | let currWhMat = split(currentWh[whIdxMat], "_") | |
307 | 307 | let currWhProd = if ((currentWh[whIdxProd] == "")) | |
308 | 308 | then nil | |
309 | 309 | else split(currentWh[whIdxProd], "_") | |
310 | 310 | let currentOrdRes = split(currentOrd[ordIdxRes], "_") | |
311 | 311 | let currentOrdMat = split(currentOrd[ordIdxMat], "_") | |
312 | 312 | let currentOrdProd = if ((currentOrd[ordIdxProd] == "")) | |
313 | 313 | then nil | |
314 | 314 | else split(currentOrd[ordIdxProd], "_") | |
315 | 315 | if ((size(newOrd) != 3)) | |
316 | 316 | then throw("newOrderStr should contain exactly 2 ':' separators") | |
317 | 317 | else { | |
318 | 318 | let resParts = split(newOrd[0], "_") | |
319 | 319 | let matParts = split(newOrd[1], "_") | |
320 | 320 | let prodParts = if ((newOrd[2] == "")) | |
321 | 321 | then nil | |
322 | 322 | else split(newOrd[2], "_") | |
323 | 323 | if ((size(resParts) != NUMRES)) | |
324 | 324 | then throw("All 6 resources should be passed") | |
325 | 325 | else if ((size(matParts) != NUMRES)) | |
326 | 326 | then throw("All 6 materials should be passed") | |
327 | 327 | else { | |
328 | 328 | let r = { | |
329 | 329 | let $l = resParts | |
330 | 330 | let $s = size($l) | |
331 | 331 | let $acc0 = $Tuple8(0, nil, 0, 0, 0, currWhRes, currentOrdRes, false) | |
332 | 332 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
333 | 333 | then $a | |
334 | 334 | else setCommon($a, $l[$i]) | |
335 | 335 | ||
336 | 336 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
337 | 337 | then $a | |
338 | 338 | else throw("List size exceeds 6") | |
339 | 339 | ||
340 | 340 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
341 | 341 | } | |
342 | 342 | let m = { | |
343 | 343 | let $l = matParts | |
344 | 344 | let $s = size($l) | |
345 | 345 | let $acc0 = $Tuple8(0, nil, r._3, r._4, r._5, currWhMat, currentOrdMat, false) | |
346 | 346 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
347 | 347 | then $a | |
348 | 348 | else setCommon($a, $l[$i]) | |
349 | 349 | ||
350 | 350 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
351 | 351 | then $a | |
352 | 352 | else throw("List size exceeds 6") | |
353 | 353 | ||
354 | 354 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
355 | 355 | } | |
356 | 356 | let p = if ((size(prodParts) != 0)) | |
357 | 357 | then { | |
358 | 358 | let $l = prodParts | |
359 | 359 | let $s = size($l) | |
360 | 360 | let $acc0 = $Tuple8(0, nil, m._3, m._4, m._5, currWhProd, currentOrdProd, true) | |
361 | 361 | func $f2_1 ($a,$i) = if (($i >= $s)) | |
362 | 362 | then $a | |
363 | 363 | else setCommon($a, $l[$i]) | |
364 | 364 | ||
365 | 365 | func $f2_2 ($a,$i) = if (($i >= $s)) | |
366 | 366 | then $a | |
367 | 367 | else throw("List size exceeds 50") | |
368 | 368 | ||
369 | 369 | $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) | |
370 | 370 | } | |
371 | 371 | else $Tuple8(0, currWhProd, m._3, m._4, m._5, currWhProd, currentOrdProd, true) | |
372 | 372 | $Tuple6(r._2, m._2, p._2, p._3, p._4, p._5) | |
373 | 373 | } | |
374 | 374 | } | |
375 | 375 | } | |
376 | 376 | ||
377 | 377 | ||
378 | 378 | func acceptCommon (acc,bpOrdItem) = { | |
379 | 379 | let j = acc._7 | |
380 | 380 | let isProd = acc._12 | |
381 | 381 | let pkgSize = if (isProd) | |
382 | 382 | then parseIntValue(split(productionMatrix[j], "_")[recipeIdxPacksize]) | |
383 | 383 | else 0 | |
384 | 384 | let bpOrdParts = split(bpOrdItem, "@") | |
385 | 385 | if ((size(bpOrdParts) != 2)) | |
386 | 386 | then throw("Incorrect order format, should be amount@price") | |
387 | 387 | else { | |
388 | 388 | let bpOrdAm = parseIntValue(bpOrdParts[0]) | |
389 | 389 | let bpOrdPr = parseIntValue(bpOrdParts[1]) | |
390 | 390 | if ((0 > bpOrdPr)) | |
391 | 391 | then throw("Price can't be negative") | |
392 | 392 | else { | |
393 | 393 | let bpOrdUsd = fraction(bpOrdAm, bpOrdPr, MULT8) | |
394 | 394 | let bpInit = if ((size(acc._8) > j)) | |
395 | 395 | then parseIntValue(acc._8[j]) | |
396 | 396 | else 0 | |
397 | 397 | let whInit = if ((size(acc._9) > j)) | |
398 | 398 | then parseIntValue(acc._9[j]) | |
399 | 399 | else 0 | |
400 | 400 | let whOrdInit = if ((size(acc._10) > j)) | |
401 | 401 | then acc._10[j] | |
402 | 402 | else "0@0" | |
403 | 403 | let whOrdParts = split(whOrdInit, "@") | |
404 | 404 | let whOrdAm = parseIntValue(whOrdParts[0]) | |
405 | 405 | let whOrdPr = parseIntValue(whOrdParts[1]) | |
406 | 406 | if (if ((bpOrdAm != 0)) | |
407 | 407 | then (bpOrdPr != whOrdPr) | |
408 | 408 | else false) | |
409 | 409 | then throw(((((("Prices of " + acc._11[j]) + " don't match! WH price=") + toString(whOrdPr)) + ", your price=") + toString(bpOrdPr))) | |
410 | 410 | else { | |
411 | 411 | let whOrdUsd = fraction(whOrdAm, whOrdPr, MULT8) | |
412 | 412 | let deltaVol = toVolume(bpOrdAm, pkgSize, isProd) | |
413 | 413 | if ((bpOrdAm == 0)) | |
414 | 414 | 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) | |
415 | 415 | else if ((bpOrdAm > 0)) | |
416 | 416 | then if ((0 > whOrdAm)) | |
417 | 417 | then if ((bpOrdAm > -(whOrdAm))) | |
418 | 418 | then throw(((((("Attempt to buy " + toString(bpOrdAm)) + " of ") + acc._11[j]) + ", but warehouse only sells ") + toString(-(whOrdAm)))) | |
419 | 419 | 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) | |
420 | 420 | else throw((("Attempt to buy " + acc._11[j]) + " while warehouse doesn't sell it")) | |
421 | 421 | else if ((whOrdAm > 0)) | |
422 | 422 | then if ((-(bpOrdAm) > whOrdAm)) | |
423 | 423 | then throw(((((("Attempt to sell " + toString(-(bpOrdAm))) + " of ") + acc._11[j]) + ", but warehouse only buys ") + toString(whOrdAm))) | |
424 | 424 | else if ((-(bpOrdAm) > bpInit)) | |
425 | 425 | then throw(((((("Attempt to sell " + toString(-(bpOrdAm))) + ", but you only have ") + toString(bpInit)) + " of ") + acc._11[j])) | |
426 | 426 | 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) | |
427 | 427 | else throw((("Attempt to sell " + acc._11[j]) + " while warehouse doesn't buy it")) | |
428 | 428 | } | |
429 | 429 | } | |
430 | 430 | } | |
431 | 431 | } | |
432 | 432 | ||
433 | 433 | ||
434 | 434 | @Callable(i) | |
435 | 435 | func recalcLockedVolumeREADONLY (landAssetId,wh) = { | |
436 | 436 | let currentOrd = getOrder(keyOrderByLand(landAssetId)) | |
437 | 437 | let z = setInternal(wh, currentOrd, currentOrd) | |
438 | 438 | $Tuple2(nil, (z._4 + z._5)) | |
439 | 439 | } | |
440 | 440 | ||
441 | 441 | ||
442 | 442 | ||
443 | 443 | @Callable(i) | |
444 | 444 | func constructorV1 (restAddr) = if ((i.caller != this)) | |
445 | 445 | then throw("Permission denied") | |
446 | 446 | else [StringEntry(keyRestAddress(), restAddr)] | |
447 | 447 | ||
448 | 448 | ||
449 | 449 | ||
450 | 450 | @Callable(i) | |
451 | 451 | func sellResources (amounts,minPrices) = { | |
452 | 452 | let blocked = checkBlocked() | |
453 | 453 | if ((blocked == blocked)) | |
454 | 454 | then { | |
455 | 455 | let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked") | |
456 | 456 | if ((size(i.payments) != 0)) | |
457 | 457 | then throw("sellResources doesn't require any payments") | |
458 | 458 | else { | |
459 | 459 | let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_") | |
460 | 460 | if ((curLocation[locIdxType] != "F")) | |
461 | 461 | then throw(("Duck location type should be Factory, but is " + curLocation[locIdxType])) | |
462 | 462 | else { | |
463 | 463 | let locId = curLocation[locIdxId] | |
464 | 464 | let currentPack = getBackpack(keyBackpackByDuck(duckAssetId)) | |
465 | 465 | let resList = split(currentPack[bpIdxRes], "_") | |
466 | 466 | func adder (acc,j) = if ((amounts[j] > parseIntValue(resList[j]))) | |
467 | 467 | then throw(((((("You have " + resList[j]) + " of ") + resTypes[j]) + ", but tried to sell ") + toString(amounts[j]))) | |
468 | 468 | else if ((0 > amounts[j])) | |
469 | 469 | then throw(((("You tried to sell negative amount of " + resTypes[j]) + ": ") + toString(amounts[j]))) | |
470 | 470 | else if ((amounts[j] > 0)) | |
471 | 471 | then { | |
472 | 472 | let b = sellInternal(locId, j, amounts[j], minPrices[j]) | |
473 | 473 | $Tuple3((acc._1 :+ b._1), (acc._2 :+ toString((parseIntValue(resList[j]) - amounts[j]))), (acc._3 + b._2)) | |
474 | 474 | } | |
475 | 475 | else $Tuple3(acc._1, (acc._2 :+ resList[j]), acc._3) | |
476 | 476 | ||
477 | 477 | let merged = { | |
478 | 478 | let $l = [0, 1, 2, 3, 4, 5] | |
479 | 479 | let $s = size($l) | |
480 | 480 | let $acc0 = $Tuple3(nil, nil, 0) | |
481 | 481 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
482 | 482 | then $a | |
483 | 483 | else adder($a, $l[$i]) | |
484 | 484 | ||
485 | 485 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
486 | 486 | then $a | |
487 | 487 | else throw("List size exceeds 6") | |
488 | 488 | ||
489 | 489 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
490 | 490 | } | |
491 | 491 | let newPack = makeString([currentPack[bpIdxLevel], makeString(merged._2, "_"), currentPack[bpIdxMat], currentPack[bpIdxProd]], ":") | |
492 | 492 | let result = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil)) | |
493 | 493 | $Tuple2((merged._1 :+ ScriptTransfer(i.caller, merged._3, usdtAssetId)), result) | |
494 | 494 | } | |
495 | 495 | } | |
496 | 496 | } | |
497 | 497 | else throw("Strict value is not equal to itself.") | |
498 | 498 | } | |
499 | 499 | ||
500 | 500 | ||
501 | 501 | ||
502 | 502 | @Callable(i) | |
503 | 503 | func buyMaterials (amounts,maxPrices) = { | |
504 | 504 | let blocked = checkBlocked() | |
505 | 505 | if ((blocked == blocked)) | |
506 | 506 | then { | |
507 | 507 | let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked") | |
508 | 508 | if ((size(i.payments) != 1)) | |
509 | 509 | then throw("exactly 1 payment must be attached") | |
510 | 510 | else { | |
511 | 511 | let pmt = i.payments[0] | |
512 | 512 | let amt = pmt.amount | |
513 | 513 | let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment") | |
514 | 514 | if ((pmtAssetId != usdtAssetId)) | |
515 | 515 | then throw("USDT payments only!") | |
516 | 516 | else { | |
517 | 517 | let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_") | |
518 | 518 | if ((curLocation[locIdxType] != "F")) | |
519 | 519 | then throw(("Duck location type should be Factory, but is " + curLocation[locIdxType])) | |
520 | 520 | else { | |
521 | 521 | let locId = curLocation[locIdxId] | |
522 | 522 | let currentPack = getBackpack(keyBackpackByDuck(duckAssetId)) | |
523 | 523 | let matList = split(currentPack[bpIdxMat], "_") | |
524 | 524 | func mUpdater (acc,j) = if ((0 > amounts[j])) | |
525 | 525 | then throw(((("You tried to buy negative amount of " + matTypes[j]) + ": ") + toString(amounts[j]))) | |
526 | 526 | else if ((amounts[j] > 0)) | |
527 | 527 | then { | |
528 | 528 | let b = buyInternal(locId, j, amounts[j], maxPrices[j]) | |
529 | 529 | $Tuple3((acc._1 :+ b._1), (acc._2 :+ toString((parseIntValue(matList[j]) + b._3))), (acc._3 + b._2)) | |
530 | 530 | } | |
531 | 531 | else $Tuple3(acc._1, (acc._2 :+ matList[j]), acc._3) | |
532 | 532 | ||
533 | 533 | let merged = { | |
534 | 534 | let $l = [0, 1, 2, 3, 4, 5] | |
535 | 535 | let $s = size($l) | |
536 | 536 | let $acc0 = $Tuple3(nil, nil, 0) | |
537 | 537 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
538 | 538 | then $a | |
539 | 539 | else mUpdater($a, $l[$i]) | |
540 | 540 | ||
541 | 541 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
542 | 542 | then $a | |
543 | 543 | else throw("List size exceeds 6") | |
544 | 544 | ||
545 | 545 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
546 | 546 | } | |
547 | 547 | if ((merged._3 > amt)) | |
548 | 548 | then throw(((("Insufficient payment! Attached=" + toString(amt)) + ", required=") + toString(merged._3))) | |
549 | 549 | else { | |
550 | 550 | let newPack = makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], makeString(merged._2, "_"), currentPack[bpIdxProd]], ":") | |
551 | 551 | let result = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil)) | |
552 | 552 | let rest = if (((amt - merged._3) > 0)) | |
553 | 553 | then [ScriptTransfer(i.caller, (amt - merged._3), usdtAssetId)] | |
554 | 554 | else nil | |
555 | 555 | let activitiesAmount = (merged._3 / 100) | |
556 | 556 | $Tuple2(((merged._1 ++ rest) :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)), result) | |
557 | 557 | } | |
558 | 558 | } | |
559 | 559 | } | |
560 | 560 | } | |
561 | 561 | } | |
562 | 562 | else throw("Strict value is not equal to itself.") | |
563 | 563 | } | |
564 | 564 | ||
565 | 565 | ||
566 | 566 | ||
567 | 567 | @Callable(i) | |
568 | 568 | func exchangeResources (amounts) = { | |
569 | 569 | let blocked = checkBlocked() | |
570 | 570 | if ((blocked == blocked)) | |
571 | 571 | then { | |
572 | 572 | let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked") | |
573 | 573 | if ((size(i.payments) != 1)) | |
574 | 574 | then throw("exactly 1 payment must be attached") | |
575 | 575 | else { | |
576 | 576 | let pmt = i.payments[0] | |
577 | 577 | let amt = pmt.amount | |
578 | 578 | let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment") | |
579 | 579 | if ((pmtAssetId != usdtAssetId)) | |
580 | 580 | then throw("USDT payments only!") | |
581 | 581 | else { | |
582 | 582 | let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_") | |
583 | 583 | if ((curLocation[locIdxType] != "F")) | |
584 | 584 | then throw(("Duck location type should be Factory, but is " + curLocation[locIdxType])) | |
585 | 585 | else { | |
586 | 586 | let locId = curLocation[locIdxId] | |
587 | 587 | let currentPack = getBackpack(keyBackpackByDuck(duckAssetId)) | |
588 | 588 | let resList = split(currentPack[bpIdxRes], "_") | |
589 | 589 | let matList = split(currentPack[bpIdxMat], "_") | |
590 | 590 | func exchanger (acc,j) = { | |
591 | 591 | let whKey = keyFactoryWarehouseByIdAndType(locId, j) | |
592 | 592 | let w0 = valueOrElse(getInteger(whKey), 0) | |
593 | 593 | let amj = amounts[j] | |
594 | 594 | if ((amj > parseIntValue(resList[j]))) | |
595 | 595 | then throw(((((("You have " + resList[j]) + " of ") + resTypes[j]) + ", but tried to exchange ") + toString(amj))) | |
596 | 596 | else if ((0 > amj)) | |
597 | 597 | then throw(((("You tried to exchange negative amount of " + resTypes[j]) + ": ") + toString(amj))) | |
598 | 598 | else if ((amj > 0)) | |
599 | 599 | 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))) | |
600 | 600 | else $Tuple4((acc._1 :+ resList[j]), (acc._2 :+ matList[j]), acc._3, acc._4) | |
601 | 601 | } | |
602 | 602 | ||
603 | 603 | let merged = { | |
604 | 604 | let $l = [0, 1, 2, 3, 4, 5] | |
605 | 605 | let $s = size($l) | |
606 | 606 | let $acc0 = $Tuple4(nil, nil, 0, nil) | |
607 | 607 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
608 | 608 | then $a | |
609 | 609 | else exchanger($a, $l[$i]) | |
610 | 610 | ||
611 | 611 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
612 | 612 | then $a | |
613 | 613 | else throw("List size exceeds 6") | |
614 | 614 | ||
615 | 615 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
616 | 616 | } | |
617 | 617 | if ((merged._3 > amt)) | |
618 | 618 | then throw(((("Insufficient payment! Attached=" + toString(amt)) + ", required=") + toString(merged._3))) | |
619 | 619 | else { | |
620 | 620 | let newPack = makeString([currentPack[bpIdxLevel], makeString(merged._1, "_"), makeString(merged._2, "_"), currentPack[bpIdxProd]], ":") | |
621 | 621 | let result = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil)) | |
622 | 622 | let rest = if (((amt - merged._3) > 0)) | |
623 | 623 | then [ScriptTransfer(i.caller, (amt - merged._3), usdtAssetId)] | |
624 | 624 | else nil | |
625 | 625 | let activitiesAmount = (merged._3 / 100) | |
626 | 626 | $Tuple2(((rest ++ merged._4) :+ ScriptTransfer(restContract, activitiesAmount, usdtAssetId)), result) | |
627 | 627 | } | |
628 | 628 | } | |
629 | 629 | } | |
630 | 630 | } | |
631 | 631 | } | |
632 | 632 | else throw("Strict value is not equal to itself.") | |
633 | 633 | } | |
634 | 634 | ||
635 | 635 | ||
636 | 636 | ||
637 | 637 | @Callable(i) | |
638 | 638 | func craftGoods (productIdx,quantity) = { | |
639 | 639 | let blocked = checkBlocked() | |
640 | 640 | if ((blocked == blocked)) | |
641 | 641 | then if ((size(i.payments) != 1)) | |
642 | 642 | then throw("exactly 1 payment must be attached") | |
643 | 643 | else { | |
644 | 644 | let pmt = i.payments[0] | |
645 | 645 | let amt = pmt.amount | |
646 | 646 | let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment") | |
647 | 647 | if ((pmtAssetId != usdtAssetId)) | |
648 | 648 | then throw("USDT payments only!") | |
649 | 649 | else if ((amt != MULT6)) | |
650 | 650 | then throw("exactly 1 USDT must be attached as payment") | |
651 | 651 | else if ((0 >= quantity)) | |
652 | 652 | then throw("Quantity should be positive") | |
653 | 653 | else { | |
654 | 654 | let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked") | |
655 | 655 | let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_") | |
656 | 656 | if ((curLocation[locIdxType] != "M")) | |
657 | 657 | then throw(("Duck location type should be Manufactory, but is " + curLocation[locIdxType])) | |
658 | 658 | else { | |
659 | 659 | let cont = curLocation[locIdxContinent] | |
660 | 660 | let currentPack = getBackpack(keyBackpackByDuck(duckAssetId)) | |
661 | 661 | let matList = split(currentPack[bpIdxMat], "_") | |
662 | 662 | if (if ((0 > productIdx)) | |
663 | 663 | then true | |
664 | 664 | else (productIdx >= size(productionMatrix))) | |
665 | 665 | then throw(("Unknown product idx=" + toString(productIdx))) | |
666 | 666 | else { | |
667 | 667 | let recipe = split(productionMatrix[productIdx], "_") | |
668 | 668 | if ((size(recipe) != (NUMRES + 3))) | |
669 | 669 | then throw(("Fatal: unknown recipe: " + productionMatrix[productIdx])) | |
670 | 670 | else { | |
671 | 671 | let productContIdx = parseIntValue(recipe[recipeIdxContinent]) | |
672 | 672 | if ((continents[productContIdx] != cont)) | |
673 | 673 | then throw(((("This product is available in " + continents[productContIdx]) + ", but you are in ") + cont)) | |
674 | 674 | else { | |
675 | 675 | let prodList = if ((currentPack[bpIdxProd] == "")) | |
676 | 676 | then nil | |
677 | 677 | else split(currentPack[bpIdxProd], "_") | |
678 | 678 | func filler (acc,ignoredItem) = { | |
679 | 679 | let n = acc._2 | |
680 | 680 | let xs = if ((size(prodList) > n)) | |
681 | 681 | then prodList[n] | |
682 | 682 | else "0" | |
683 | 683 | let x = parseIntValue(xs) | |
684 | 684 | let amount = (quantity * parseIntValue(recipe[recipeIdxPacksize])) | |
685 | 685 | let y = if ((n == productIdx)) | |
686 | 686 | then toString((x + amount)) | |
687 | 687 | else xs | |
688 | 688 | $Tuple2((acc._1 :+ y), (n + 1)) | |
689 | 689 | } | |
690 | 690 | ||
691 | 691 | let bpProd = ( let $l = productionMatrix | |
692 | 692 | let $s = size($l) | |
693 | 693 | let $acc0 = $Tuple2(nil, 0) | |
694 | 694 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
695 | 695 | then $a | |
696 | 696 | else filler($a, $l[$i]) | |
697 | 697 | ||
698 | 698 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
699 | 699 | then $a | |
700 | 700 | else throw("List size exceeds 50") | |
701 | 701 | ||
702 | 702 | $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 | |
703 | 703 | func producer (acc,j) = { | |
704 | 704 | let needMat = ((parseIntValue(recipe[j]) * MULT7) * quantity) | |
705 | 705 | let haveMat = parseIntValue(matList[j]) | |
706 | 706 | if ((needMat > haveMat)) | |
707 | 707 | then throw(((((((("You have " + matList[j]) + " of ") + matTypes[j]) + ", but recipe requires ") + toString(needMat)) + " for quantity ") + toString(quantity))) | |
708 | 708 | else if ((needMat > 0)) | |
709 | 709 | then (acc :+ toString((haveMat - needMat))) | |
710 | 710 | else (acc :+ matList[j]) | |
711 | 711 | } | |
712 | 712 | ||
713 | 713 | let merged = { | |
714 | 714 | let $l = [0, 1, 2, 3, 4, 5] | |
715 | 715 | let $s = size($l) | |
716 | 716 | let $acc0 = nil | |
717 | 717 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
718 | 718 | then $a | |
719 | 719 | else producer($a, $l[$i]) | |
720 | 720 | ||
721 | 721 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
722 | 722 | then $a | |
723 | 723 | else throw("List size exceeds 6") | |
724 | 724 | ||
725 | 725 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
726 | 726 | } | |
727 | 727 | let newPack = makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], makeString(merged, "_"), makeString(bpProd, "_")], ":") | |
728 | 728 | let result = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newPack], nil)) | |
729 | 729 | $Tuple2(nil, result) | |
730 | 730 | } | |
731 | 731 | } | |
732 | 732 | } | |
733 | 733 | } | |
734 | 734 | } | |
735 | 735 | } | |
736 | 736 | else throw("Strict value is not equal to itself.") | |
737 | 737 | } | |
738 | 738 | ||
739 | 739 | ||
740 | 740 | ||
741 | 741 | @Callable(i) | |
742 | 742 | func setWarehouseOrder (newOrderStr,landAssetId) = { | |
743 | 743 | let user = i.originCaller | |
744 | 744 | let addr = toString(user) | |
745 | 745 | let result = if ((user != restContract)) | |
746 | 746 | then checkBlocked() | |
747 | 747 | else false | |
748 | 748 | let asset = value(assetInfo(fromBase58String(landAssetId))) | |
749 | 749 | if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId))))) | |
750 | 750 | then throw((("NFT " + asset.name) + " is not staked")) | |
751 | 751 | else { | |
752 | 752 | let owner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned")) | |
753 | 753 | if (if ((user != restContract)) | |
754 | 754 | then (owner != addr) | |
755 | 755 | else false) | |
756 | 756 | then throw((LANDPREFIX + " is not yours")) | |
757 | 757 | else { | |
758 | 758 | let newOrder = split_4C(newOrderStr, ":") | |
759 | 759 | let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil)) | |
760 | 760 | let currentWh = split_4C(wh, ":") | |
761 | 761 | let loft = split(currentWh[whIdxLOFT], "_") | |
762 | 762 | let whOccupied = parseIntValue(loft[volOccupied]) | |
763 | 763 | let whTotal = parseIntValue(loft[volTotal]) | |
764 | 764 | let ordKey = keyOrderByLand(landAssetId) | |
765 | 765 | let currentOrd = getOrder(ordKey) | |
766 | 766 | let z = setInternal(currentWh, currentOrd, newOrder) | |
767 | 767 | let buyVolSaldo = z._4 | |
768 | 768 | let sellVolSaldo = z._5 | |
769 | 769 | let whLocked = (buyVolSaldo + sellVolSaldo) | |
770 | 770 | let whFree = ((whTotal - whOccupied) - whLocked) | |
771 | 771 | if ((0 > whFree)) | |
772 | 772 | then throw((((("Attempt to reserve " + toString(buyVolSaldo)) + " space for buy orders, and ") + toString(sellVolSaldo)) + " space for sell orders, leads to negative free space")) | |
773 | 773 | else { | |
774 | 774 | let whStr = makeString_2C([currentWh[whIdxLevels], makeString(z._1, "_"), makeString(z._2, "_"), makeString(z._3, "_"), toString(whLocked)], ":") | |
775 | 775 | let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil)) | |
776 | 776 | let usdSaldo = z._6 | |
777 | 777 | let actions = if ((usdSaldo > 0)) | |
778 | 778 | then if ((size(i.payments) != 1)) | |
779 | 779 | then throw("exactly 1 payment must be attached") | |
780 | 780 | else { | |
781 | 781 | let pmt = i.payments[0] | |
782 | 782 | let amt = pmt.amount | |
783 | 783 | let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment") | |
784 | 784 | if ((pmtAssetId != usdtAssetId)) | |
785 | 785 | then throw("USDT payments only!") | |
786 | 786 | else if ((amt != usdSaldo)) | |
787 | 787 | then throw(("Payment needed is " + toString(usdSaldo))) | |
788 | 788 | else [StringEntry(ordKey, newOrderStr)] | |
789 | 789 | } | |
790 | 790 | else if ((usdSaldo == 0)) | |
791 | 791 | then if ((size(i.payments) != 0)) | |
792 | 792 | then throw("No payments needed") | |
793 | 793 | else [StringEntry(ordKey, newOrderStr)] | |
794 | 794 | else if ((size(i.payments) != 0)) | |
795 | 795 | then throw("No payments needed") | |
796 | 796 | else [ScriptTransfer(addressFromStringValue(owner), -(usdSaldo), usdtAssetId), StringEntry(ordKey, newOrderStr)] | |
797 | 797 | $Tuple2(actions, $Tuple2(result, whSave)) | |
798 | 798 | } | |
799 | 799 | } | |
800 | 800 | } | |
801 | 801 | } | |
802 | 802 | ||
803 | 803 | ||
804 | 804 | ||
805 | 805 | @Callable(i) | |
806 | 806 | func acceptWarehouseOrder (bpOrderStr,landAssetId,duckAssetId) = { | |
807 | 807 | let blocked = checkBlocked() | |
808 | 808 | let caller = i.originCaller | |
809 | 809 | let callerAddr = toString(caller) | |
810 | 810 | let stakedDuckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(callerAddr)), "You don't have a duck staked") | |
811 | 811 | let curLocation = valueOrElse(getString(stakingContract, keyDuckLocation(stakedDuckAssetId)), DEFAULTLOCATION) | |
812 | 812 | let loc = split(value(curLocation), "_") | |
813 | 813 | if ((loc[locIdxType] != "L")) | |
814 | 814 | then throw((("Duck location type is " + loc[locIdxType]) + ", but should be L")) | |
815 | 815 | else if ((stakedDuckAssetId != duckAssetId)) | |
816 | 816 | then throw(((("Your staked duck is " + stakedDuckAssetId) + ", but passed ") + duckAssetId)) | |
817 | 817 | else { | |
818 | 818 | let landAsset = value(assetInfo(fromBase58String(landAssetId))) | |
819 | 819 | if (!(isDefined(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId))))) | |
820 | 820 | then throw((("NFT " + landAsset.name) + " is not staked")) | |
821 | 821 | else { | |
822 | 822 | let landOwner = valueOrErrorMessage(getString(stakingContract, keyLandAssetIdToOwner(landAssetId)), (("NFT " + landAsset.name) + " is orphaned")) | |
823 | 823 | if ((landOwner == callerAddr)) | |
824 | 824 | then throw("You cannot trade with yourself") | |
825 | 825 | else { | |
826 | 826 | let bpOrderParts = split_4C(bpOrderStr, ":") | |
827 | 827 | if ((size(bpOrderParts) != 3)) | |
828 | 828 | then throw("bpOrderStr should contain exactly 2 ':' separators") | |
829 | 829 | else { | |
830 | 830 | let bpOrdRes = split(bpOrderParts[0], "_") | |
831 | 831 | let bpOrdMat = split(bpOrderParts[1], "_") | |
832 | 832 | let bpOrdProd = if ((bpOrderParts[2] == "")) | |
833 | 833 | then nil | |
834 | 834 | else split(bpOrderParts[2], "_") | |
835 | 835 | if ((size(bpOrdRes) != NUMRES)) | |
836 | 836 | then throw("All 6 resources should be passed") | |
837 | 837 | else if ((size(bpOrdMat) != NUMRES)) | |
838 | 838 | then throw("All 6 materials should be passed") | |
839 | 839 | else { | |
840 | 840 | let wh = asString(invoke(stakingContract, "getWarehouseREADONLY", [landAssetId], nil)) | |
841 | 841 | let currentWh = split_4C(wh, ":") | |
842 | 842 | let currWhRes = split(currentWh[whIdxRes], "_") | |
843 | 843 | let currWhMat = split(currentWh[whIdxMat], "_") | |
844 | 844 | let currWhProd = if ((currentWh[whIdxProd] == "")) | |
845 | 845 | then nil | |
846 | 846 | else split(currentWh[whIdxProd], "_") | |
847 | 847 | let currWhLockedVol = parseIntValue(split(currentWh[whIdxLOFT], "_")[volLocked]) | |
848 | 848 | let bpKey = keyBackpackByDuck(duckAssetId) | |
849 | 849 | let currentPack = getBackpack(bpKey) | |
850 | 850 | let bpResList = split(currentPack[bpIdxRes], "_") | |
851 | 851 | let bpMatList = split(currentPack[bpIdxMat], "_") | |
852 | 852 | let bpProdList = if ((currentPack[bpIdxProd] == "")) | |
853 | 853 | then nil | |
854 | 854 | else split(currentPack[bpIdxProd], "_") | |
855 | 855 | let ordKey = keyOrderByLand(landAssetId) | |
856 | 856 | let whOrd = getOrder(ordKey) | |
857 | 857 | let whOrdRes = split(whOrd[ordIdxRes], "_") | |
858 | 858 | let whOrdMat = split(whOrd[ordIdxMat], "_") | |
859 | 859 | let whOrdProd = if ((whOrd[ordIdxProd] == "")) | |
860 | 860 | then nil | |
861 | 861 | else split(whOrd[ordIdxProd], "_") | |
862 | 862 | let r = { | |
863 | 863 | let $l = bpOrdRes | |
864 | 864 | let $s = size($l) | |
865 | 865 | let $acc0 = $Tuple12(nil, nil, nil, 0, 0, 0, 0, bpResList, currWhRes, whOrdRes, resTypes, false) | |
866 | 866 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
867 | 867 | then $a | |
868 | 868 | else acceptCommon($a, $l[$i]) | |
869 | 869 | ||
870 | 870 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
871 | 871 | then $a | |
872 | 872 | else throw("List size exceeds 6") | |
873 | 873 | ||
874 | 874 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
875 | 875 | } | |
876 | 876 | let m = { | |
877 | 877 | let $l = bpOrdMat | |
878 | 878 | let $s = size($l) | |
879 | 879 | let $acc0 = $Tuple12(nil, nil, nil, r._4, r._5, r._6, 0, bpMatList, currWhMat, whOrdMat, matTypes, false) | |
880 | 880 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
881 | 881 | then $a | |
882 | 882 | else acceptCommon($a, $l[$i]) | |
883 | 883 | ||
884 | 884 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
885 | 885 | then $a | |
886 | 886 | else throw("List size exceeds 6") | |
887 | 887 | ||
888 | 888 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
889 | 889 | } | |
890 | 890 | let p = if ((size(bpOrdProd) != 0)) | |
891 | 891 | then { | |
892 | 892 | let $l = bpOrdProd | |
893 | 893 | let $s = size($l) | |
894 | 894 | let $acc0 = $Tuple12(nil, nil, nil, m._4, m._5, m._6, 0, bpProdList, currWhProd, whOrdProd, prodTypes, true) | |
895 | 895 | func $f2_1 ($a,$i) = if (($i >= $s)) | |
896 | 896 | then $a | |
897 | 897 | else acceptCommon($a, $l[$i]) | |
898 | 898 | ||
899 | 899 | func $f2_2 ($a,$i) = if (($i >= $s)) | |
900 | 900 | then $a | |
901 | 901 | else throw("List size exceeds 50") | |
902 | 902 | ||
903 | 903 | $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) | |
904 | 904 | } | |
905 | 905 | else $Tuple12(currWhProd, whOrdProd, bpProdList, m._4, m._5, m._6, 0, bpProdList, currWhProd, whOrdProd, prodTypes, true) | |
906 | 906 | let volSaldo = p._4 | |
907 | 907 | let newLockedVol = if ((0 > (currWhLockedVol - volSaldo))) | |
908 | 908 | then 0 | |
909 | 909 | else (currWhLockedVol - volSaldo) | |
910 | 910 | let whStr = makeString_2C([currentWh[whIdxLevels], makeString(r._1, "_"), makeString(m._1, "_"), makeString(p._1, "_"), toString(newLockedVol)], ":") | |
911 | 911 | let newWhOrdStr = makeString_2C([makeString(r._2, "_"), makeString(m._2, "_"), makeString(p._2, "_")], ":") | |
912 | 912 | let newBpStr = makeString_2C([currentPack[bpIdxLevel], makeString(r._3, "_"), makeString(m._3, "_"), makeString(p._3, "_")], ":") | |
913 | 913 | let whSave = asString(invoke(stakingContract, "saveWarehouse", [whStr, landAssetId], nil)) | |
914 | 914 | let bpSave = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newBpStr], nil)) | |
915 | 915 | let actions = [StringEntry(ordKey, newWhOrdStr)] | |
916 | 916 | let usdWh2BpSaldo = p._5 | |
917 | 917 | let actions1 = if ((usdWh2BpSaldo > 0)) | |
918 | 918 | then { | |
919 | 919 | let usdWh2BpFee = fraction(p._5, AUCTIONFEE, MULT6) | |
920 | 920 | let refByKey = keyAddressRefBy(callerAddr) | |
921 | 921 | let refBy = getString(stakingContract, refByKey) | |
922 | 922 | if (isDefined(refBy)) | |
923 | 923 | then (((actions :+ ScriptTransfer(caller, (p._5 - (3 * usdWh2BpFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdWh2BpFee, usdtAssetId)) :+ ScriptTransfer(addressFromStringValue(value(refBy)), usdWh2BpFee, usdtAssetId)) | |
924 | 924 | else ((actions :+ ScriptTransfer(caller, (p._5 - (3 * usdWh2BpFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdWh2BpFee, usdtAssetId)) | |
925 | 925 | } | |
926 | 926 | else actions | |
927 | 927 | let usdBp2WhSaldo = p._6 | |
928 | 928 | let actions2 = if ((usdBp2WhSaldo > 0)) | |
929 | 929 | then if ((size(i.payments) != 1)) | |
930 | 930 | then throw("exactly 1 payment must be attached") | |
931 | 931 | else { | |
932 | 932 | let pmt = i.payments[0] | |
933 | 933 | let amt = pmt.amount | |
934 | 934 | let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment") | |
935 | 935 | if ((pmtAssetId != usdtAssetId)) | |
936 | 936 | then throw("USDT payments only!") | |
937 | 937 | else if ((amt != usdBp2WhSaldo)) | |
938 | 938 | then throw(("Payment needed is " + toString(usdBp2WhSaldo))) | |
939 | 939 | else if ((MINSHOPPAYMENT > amt)) | |
940 | 940 | then throw(("Payment should be at least " + toString(MINSHOPPAYMENT))) | |
941 | 941 | else { | |
942 | 942 | let usdBp2WhFee = fraction(p._6, AUCTIONFEE, MULT6) | |
943 | 943 | let refByKey = keyAddressRefBy(landOwner) | |
944 | 944 | let refBy = getString(stakingContract, refByKey) | |
945 | 945 | if (isDefined(refBy)) | |
946 | 946 | then (((actions1 :+ ScriptTransfer(addressFromStringValue(landOwner), (p._6 - (3 * usdBp2WhFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdBp2WhFee, usdtAssetId)) :+ ScriptTransfer(addressFromStringValue(value(refBy)), usdBp2WhFee, usdtAssetId)) | |
947 | 947 | else ((actions1 :+ ScriptTransfer(addressFromStringValue(landOwner), (p._6 - (3 * usdBp2WhFee)), usdtAssetId)) :+ ScriptTransfer(restContract, usdBp2WhFee, usdtAssetId)) | |
948 | 948 | } | |
949 | 949 | } | |
950 | 950 | else if ((size(i.payments) != 0)) | |
951 | 951 | then throw("No payments needed") | |
952 | 952 | else actions1 | |
953 | 953 | $Tuple2(actions2, $Tuple3(blocked, whSave, bpSave)) | |
954 | 954 | } | |
955 | 955 | } | |
956 | 956 | } | |
957 | 957 | } | |
958 | 958 | } | |
959 | 959 | } | |
960 | 960 | ||
961 | 961 | ||
962 | 962 | ||
963 | 963 | @Callable(i) | |
964 | 964 | func sellProductsToES (amounts) = { | |
965 | 965 | let blocked = checkBlocked() | |
966 | 966 | if ((blocked == blocked)) | |
967 | 967 | then if ((size(i.payments) != 0)) | |
968 | 968 | then throw("No payments needed") | |
969 | 969 | else { | |
970 | 970 | let duckAssetId = valueOrErrorMessage(getString(stakingContract, keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked") | |
971 | 971 | let curLocation = split(valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), DEFAULTLOCATION), "_") | |
972 | 972 | if ((curLocation[locIdxType] != "A")) | |
973 | 973 | then throw(("Duck location type should be Airport, but is " + curLocation[locIdxType])) | |
974 | 974 | else { | |
975 | 975 | let currentPack = getBackpack(keyBackpackByDuck(duckAssetId)) | |
976 | 976 | let prodList = if ((currentPack[bpIdxProd] == "")) | |
977 | 977 | then nil | |
978 | 978 | else split(currentPack[bpIdxProd], "_") | |
979 | 979 | let esKey = keyEsWarehouse() | |
980 | 980 | let existStr = getString(esKey) | |
981 | 981 | let existAmounts = if (isDefined(existStr)) | |
982 | 982 | then split(value(existStr), "_") | |
983 | 983 | else nil | |
984 | 984 | func moveProd (acc,recipeStr) = { | |
985 | 985 | let j = acc._1 | |
986 | 986 | let quantity = if ((size(amounts) > j)) | |
987 | 987 | then amounts[j] | |
988 | 988 | else 0 | |
989 | 989 | if ((0 > quantity)) | |
990 | 990 | then throw("Quantity cannot be negative") | |
991 | 991 | else { | |
992 | 992 | let recipe = split(recipeStr, "_") | |
993 | 993 | if ((size(recipe) != (NUMRES + 3))) | |
994 | 994 | then throw(("Fatal: unknown recipe: " + recipeStr)) | |
995 | 995 | else { | |
996 | 996 | let packSize = parseIntValue(recipe[recipeIdxPacksize]) | |
997 | 997 | let maxAmount = (ESMAXPACKAGES * packSize) | |
998 | 998 | let existAmount = if ((size(existAmounts) > j)) | |
999 | 999 | then parseIntValue(existAmounts[j]) | |
1000 | 1000 | else 0 | |
1001 | 1001 | let canBuy = (maxAmount - existAmount) | |
1002 | 1002 | if ((quantity > canBuy)) | |
1003 | 1003 | then throw(((("Warehouse can buy only " + toString(canBuy)) + " of ") + prodTypes[j])) | |
1004 | 1004 | else { | |
1005 | 1005 | let totalMat = getRecipeMaterials(recipe) | |
1006 | - | let unitPrice = fraction((totalMat * ESBUYCOEF), RESOURCEPRICEMIN, 10) | |
1006 | + | let unitPrice = fraction((totalMat * ESBUYCOEF), RESOURCEPRICEMIN, (10 * packSize)) | |
1007 | 1007 | let bpProdAmount = if ((size(prodList) > j)) | |
1008 | 1008 | then parseIntValue(prodList[j]) | |
1009 | 1009 | else 0 | |
1010 | 1010 | if ((quantity > bpProdAmount)) | |
1011 | 1011 | then throw(((("You have only " + toString(bpProdAmount)) + " of ") + prodTypes[j])) | |
1012 | 1012 | else $Tuple4((j + 1), (acc._2 + (unitPrice * quantity)), (acc._3 :+ toString((bpProdAmount - quantity))), (acc._4 :+ toString((existAmount + quantity)))) | |
1013 | 1013 | } | |
1014 | 1014 | } | |
1015 | 1015 | } | |
1016 | 1016 | } | |
1017 | 1017 | ||
1018 | 1018 | let merged = { | |
1019 | 1019 | let $l = productionMatrix | |
1020 | 1020 | let $s = size($l) | |
1021 | 1021 | let $acc0 = $Tuple4(0, 0, nil, nil) | |
1022 | 1022 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1023 | 1023 | then $a | |
1024 | 1024 | else moveProd($a, $l[$i]) | |
1025 | 1025 | ||
1026 | 1026 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1027 | 1027 | then $a | |
1028 | 1028 | else throw("List size exceeds 50") | |
1029 | 1029 | ||
1030 | 1030 | $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) | |
1031 | 1031 | } | |
1032 | 1032 | let newBpStr = makeString_2C([currentPack[bpIdxLevel], currentPack[bpIdxRes], currentPack[bpIdxMat], makeString(merged._3, "_")], ":") | |
1033 | 1033 | let bpSave = asString(invoke(stakingContract, "updateBackpack", [duckAssetId, newBpStr], nil)) | |
1034 | 1034 | $Tuple2([StringEntry(esKey, makeString(merged._4, "_")), ScriptTransfer(i.caller, merged._2, usdtAssetId)], bpSave) | |
1035 | 1035 | } | |
1036 | 1036 | } | |
1037 | 1037 | else throw("Strict value is not equal to itself.") | |
1038 | 1038 | } | |
1039 | 1039 | ||
1040 | 1040 | ||
1041 | 1041 | ||
1042 | 1042 | @Callable(i) | |
1043 | 1043 | func updateEsStorage (newStorage) = if ((i.caller != stakingContract)) | |
1044 | 1044 | then throw("Permission denied") | |
1045 | 1045 | else $Tuple2([StringEntry(keyEsWarehouse(), newStorage)], newStorage) | |
1046 | 1046 | ||
1047 | 1047 |
github/deemru/w8io/169f3d6 155.57 ms ◑