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