tx · Gt715AXgjyyUeq3fSX3czVf8VE4tjAac4vUHmiv6bmp5 3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep: -0.03600000 Waves 2023.08.01 02:17 [2690706] smart account 3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep > SELF 0.00000000 Waves
{ "type": 13, "id": "Gt715AXgjyyUeq3fSX3czVf8VE4tjAac4vUHmiv6bmp5", "fee": 3600000, "feeAssetId": null, "timestamp": 1690845454200, "version": 2, "chainId": 84, "sender": "3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep", "senderPublicKey": "7v5L7QkXxfkirALdyqmox38QCsa9jtfAtgUfHTh34eWq", "proofs": [ "4wQXvogrWUUirWrh8jZuXgS7cqDLuwbCsPz7yx3wezraeYFwxximWipf67DQn14KRYkrwTWaaoynVGETRgvVZwdp" ], "script": "base64:BgI7CAISBAoCCBgSAwoBCBIECgIRERIECgIRERIDCgEREgQKAgEBEgQKAggIEgUKAwgICBIDCgEREgMKAQhSAAd4cFRyYWRlAJBOAAd4cENyYWZ0AJBOAAp4cFNlbGxUb0VzAJBOAAZ4cFNob3AAkE4ACkxBTkRQUkVGSVgCBExBTkQABk5VTVJFUwAGAA9ERUZBVUxUTE9DQVRJT04CD0FmcmljYV9GX0FmcmljYQAQUkVTT1VSQ0VQUklDRU1JTgDVtQIADUVTTUFYUEFDS0FHRVMAAwAJRVNCVVlDT0VGAAQACHJlc1R5cGVzCQDMCAICA09pbAkAzAgCAgNPcmUJAMwIAgIEV29vZAkAzAgCAgRTYW5kCQDMCAICBENsYXkJAMwIAgIHT3JnYW5pYwUDbmlsAAhtYXRUeXBlcwkAzAgCAgRGdWVsCQDMCAICBU1ldGFsCQDMCAICBVBsYW5rCQDMCAICBUdsYXNzCQDMCAICB1BsYXN0aWMJAMwIAgIHUHJvdGVpbgUDbmlsAAlwcm9kVHlwZXMJAMwIAgIQRmlyc3QgQWlkIEtpdCBMMQkAzAgCAhBGaXJzdCBBaWQgS2l0IEwyCQDMC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GbWVyZ2VkAl8yBQt1c2R0QXNzZXRJZAUDbmlsCQCVCgMFBmJwU2F2ZQUMcHJvbG9nUmVzdWx0BQtzdGF0c1Jlc3VsdAFpAQ91cGRhdGVFc1N0b3JhZ2UBCm5ld1N0b3JhZ2UDCQECIT0CCAUBaQZjYWxsZXIFD3N0YWtpbmdDb250cmFjdAkAAgECEVBlcm1pc3Npb24gZGVuaWVkCQCUCgIJAMwIAgkBC1N0cmluZ0VudHJ5AgkBDmtleUVzV2FyZWhvdXNlAAUKbmV3U3RvcmFnZQUDbmlsBQpuZXdTdG9yYWdlAGiKr90=", "height": 2690706, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 61mWhTJ6ootfGoKXpB9Uq2bWGBdaDTRB5LBbUgs6P88a Next: 67Z7yg8MeaGFHDS5RG2KPGpGArrooViCzg5ihYD2geWB Diff:
Old | New | Differences | |
---|---|---|---|
176 | 176 | ||
177 | 177 | func az (aA,aB) = { | |
178 | 178 | let aC = pow(10, 0, aB, 0, 0, DOWN) | |
179 | - | ((toString((aA / aC)) + ".") + toString((aA % aC))) | |
179 | + | let aD = toString((aA % aC)) | |
180 | + | let aE = size(aD) | |
181 | + | let aF = take(toString(aC), aE) | |
182 | + | (((toString((aA / aC)) + ".") + aF) + aD) | |
180 | 183 | } | |
181 | 184 | ||
182 | 185 | ||
183 | - | let | |
186 | + | let aG = 10000000000 | |
184 | 187 | ||
185 | - | let | |
188 | + | let aH = 200 | |
186 | 189 | ||
187 | - | let | |
190 | + | let aI = 300 | |
188 | 191 | ||
189 | - | let | |
192 | + | let aJ = 10000 | |
190 | 193 | ||
191 | - | func | |
194 | + | func aK (aL,aM) = ((("factoryWhByContinentAndRes_" + aL) + "_") + toString(aM)) | |
192 | 195 | ||
193 | 196 | ||
194 | - | let | |
197 | + | let aN = 0 | |
195 | 198 | ||
196 | - | let | |
199 | + | let aO = 1 | |
197 | 200 | ||
198 | - | let | |
201 | + | let aP = 2 | |
199 | 202 | ||
200 | - | func | |
201 | - | let | |
202 | - | [if ((size(split( | |
203 | - | then | |
204 | - | else "0@0_0@0_0@0_0@0_0@0_0@0", if ((size(split( | |
205 | - | then | |
206 | - | else "0@0_0@0_0@0_0@0_0@0_0@0", aP | |
203 | + | func aQ (aR) = { | |
204 | + | let aS = split(valueOrElse(getString(aR), "0@0_0@0_0@0_0@0_0@0_0@0:0@0_0@0_0@0_0@0_0@0_0@0:"), ":") | |
205 | + | [if ((size(split(aS[aN], "_")) == f)) | |
206 | + | then aS[aN] | |
207 | + | else "0@0_0@0_0@0_0@0_0@0_0@0", if ((size(split(aS[aO], "_")) == f)) | |
208 | + | then aS[aO] | |
209 | + | else "0@0_0@0_0@0_0@0_0@0_0@0", aS[aP]] | |
207 | 210 | } | |
208 | 211 | ||
209 | 212 | ||
210 | - | func | |
213 | + | func aT (aU,aV,aW) = if (aW) | |
211 | 214 | then { | |
212 | - | let | |
213 | - | then ((( | |
214 | - | else -((((-( | |
215 | - | ( | |
215 | + | let aX = if ((aU >= 0)) | |
216 | + | then (((aU + aV) - 1) / aV) | |
217 | + | else -((((-(aU) + aV) - 1) / aV)) | |
218 | + | (aX * ae) | |
216 | 219 | } | |
217 | - | else | |
220 | + | else aU | |
218 | 221 | ||
219 | 222 | ||
220 | - | func | |
221 | - | let | |
222 | - | let | |
223 | - | let | |
223 | + | func aY (aZ,aM,aU,ba) = { | |
224 | + | let bb = aK(aZ, aM) | |
225 | + | let bc = valueOrElse(getInteger(bb), 0) | |
226 | + | let bd = if ((bc > aG)) | |
224 | 227 | then 0 | |
225 | - | else if ((( | |
226 | - | then ( | |
227 | - | else | |
228 | - | let | |
229 | - | let | |
230 | - | if ((( | |
231 | - | then throw((((((((((("Actual price = " + toString( | |
232 | - | else $Tuple2(IntegerEntry( | |
228 | + | else if (((bc + aU) > aG)) | |
229 | + | then (aG - bc) | |
230 | + | else aU | |
231 | + | let be = (fraction(bd, ((aH * h) - fraction(((100 * bc) + (50 * bd)), h, aG)), af) + fraction((aU - bd), h, ae)) | |
232 | + | let bf = (ba - (ba / 100)) | |
233 | + | if (((bf * aU) > (be * ae))) | |
234 | + | then throw((((((((((("Actual price = " + toString(be)) + " / ") + toString(aU)) + " < minPrice = ") + toString(ba)) + ", (") + aZ) + ", ") + k[aM]) + ")")) | |
235 | + | else $Tuple2(IntegerEntry(bb, (bc + aU)), be) | |
233 | 236 | } | |
234 | 237 | ||
235 | 238 | ||
236 | - | func | |
237 | - | let | |
238 | - | let | |
239 | - | let | |
240 | - | then min([ | |
239 | + | func bg (aZ,bh,aU,bi) = { | |
240 | + | let bb = aK(aZ, bh) | |
241 | + | let bc = valueOrElse(getInteger(bb), 0) | |
242 | + | let bj = if ((bc > aG)) | |
243 | + | then min([aU, (bc - aG)]) | |
241 | 244 | else 0 | |
242 | - | let | |
243 | - | let | |
244 | - | let | |
245 | - | let | |
246 | - | if ((( | |
247 | - | then throw((((((((((("Actual price = " + toString( | |
248 | - | else $Tuple3(IntegerEntry( | |
245 | + | let bk = min([bc, (aU - bj)]) | |
246 | + | let bl = (bk + bj) | |
247 | + | let bm = (fraction(bk, ((aI * h) - fraction(((100 * bc) - (50 * bk)), h, aG)), af) + fraction(bj, (2 * h), ae)) | |
248 | + | let bn = (bi + (bi / 100)) | |
249 | + | if (((bm * ae) > (bn * bl))) | |
250 | + | then throw((((((((((("Actual price = " + toString(bm)) + " / ") + toString(bl)) + " > maxPrice = ") + toString(bi)) + ", (") + aZ) + ", ") + l[bh]) + ")")) | |
251 | + | else $Tuple3(IntegerEntry(bb, (bc - bl)), bm, bl) | |
249 | 252 | } | |
250 | 253 | ||
251 | 254 | ||
252 | - | func | |
253 | - | let | |
254 | - | [toString(valueOrElse(parseInt( | |
255 | - | then | |
256 | - | else "0_0_0_0_0_0", if ((size(split( | |
257 | - | then | |
258 | - | else "0_0_0_0_0_0", | |
255 | + | func bo (bp) = { | |
256 | + | let aS = split(valueOrElse(getString(at, bp), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":") | |
257 | + | [toString(valueOrElse(parseInt(aS[B]), 0)), if ((size(split(aS[C], "_")) == f)) | |
258 | + | then aS[C] | |
259 | + | else "0_0_0_0_0_0", if ((size(split(aS[D], "_")) == f)) | |
260 | + | then aS[D] | |
261 | + | else "0_0_0_0_0_0", aS[E]] | |
259 | 262 | } | |
260 | 263 | ||
261 | 264 | ||
262 | - | func | |
265 | + | func bq () = if (valueOrElse(getBoolean(at, P()), false)) | |
263 | 266 | then throw("Contracts are under maintenance") | |
264 | 267 | else unit | |
265 | 268 | ||
266 | 269 | ||
267 | - | func | |
270 | + | func br () = ax(invoke(at, "saveLastTx", nil, nil)) | |
268 | 271 | ||
269 | 272 | ||
270 | - | func | |
271 | - | let | |
272 | - | let | |
273 | - | let | |
274 | - | if ((size( | |
273 | + | func bs (bt,bu) = { | |
274 | + | let bv = bt._1 | |
275 | + | let bw = bt._8 | |
276 | + | let bx = split(bu, "@") | |
277 | + | if ((size(bx) != 2)) | |
275 | 278 | then throw("Incorrect order format, should be amount@price") | |
276 | 279 | else { | |
277 | - | let | |
278 | - | let | |
279 | - | let | |
280 | - | let | |
281 | - | let | |
282 | - | then parseIntValue( | |
280 | + | let by = parseIntValue(bx[0]) | |
281 | + | let bz = parseIntValue(bx[1]) | |
282 | + | let bA = fraction(by, bz, ae) | |
283 | + | let bB = aT(by, t, bw) | |
284 | + | let bC = if ((size(bt._6) > bv)) | |
285 | + | then parseIntValue(bt._6[bv]) | |
283 | 286 | else 0 | |
284 | - | let | |
285 | - | then | |
287 | + | let bD = split(if ((size(bt._7) > bv)) | |
288 | + | then bt._7[bv] | |
286 | 289 | else "0@0", "@") | |
287 | - | let | |
288 | - | let | |
289 | - | if (if ((0 > | |
290 | + | let bE = parseIntValue(bD[0]) | |
291 | + | let bF = parseIntValue(bD[1]) | |
292 | + | if (if ((0 > bF)) | |
290 | 293 | then true | |
291 | - | else (0 > | |
294 | + | else (0 > bz)) | |
292 | 295 | then throw("Price can't be negative") | |
293 | 296 | else { | |
294 | - | let | |
295 | - | if (( | |
296 | - | then if (( | |
297 | - | then $Tuple9(( | |
298 | - | else $Tuple9(( | |
299 | - | else if (( | |
300 | - | then if ((0 > | |
301 | - | then $Tuple9(( | |
302 | - | else $Tuple9(( | |
303 | - | else if ((0 > | |
297 | + | let bG = fraction(bE, bF, ae) | |
298 | + | if ((by == 0)) | |
299 | + | then if ((bE > 0)) | |
300 | + | then $Tuple9((bv + 1), (bt._2 :+ toString(bC)), bt._3, bt._4, (bt._5 - bG), bt._6, bt._7, bw, (bt._9 + aT(bC, t, bw))) | |
301 | + | else $Tuple9((bv + 1), (bt._2 :+ toString((bC - bE))), bt._3, bt._4, bt._5, bt._6, bt._7, bw, (bt._9 + aT((bC - bE), t, bw))) | |
302 | + | else if ((by > 0)) | |
303 | + | then if ((0 > bE)) | |
304 | + | then $Tuple9((bv + 1), (bt._2 :+ toString((bC - bE))), (bt._3 + bB), bt._4, (bt._5 + bA), bt._6, bt._7, bw, aT((bC - bE), t, bw)) | |
305 | + | else $Tuple9((bv + 1), (bt._2 :+ toString(bC)), (bt._3 + bB), bt._4, ((bt._5 + bA) - bG), bt._6, bt._7, bw, aT(bC, t, bw)) | |
306 | + | else if ((0 > bE)) | |
304 | 307 | then { | |
305 | - | let | |
306 | - | if ((0 > ( | |
307 | - | then throw((((("Attempt to take " + toString( | |
308 | - | else $Tuple9(( | |
308 | + | let bH = (bE - by) | |
309 | + | if ((0 > (bC - bH))) | |
310 | + | then throw((((("Attempt to take " + toString(bH)) + " from warehouse, but only ") + toString(bC)) + " available")) | |
311 | + | else $Tuple9((bv + 1), (bt._2 :+ toString((bC - bH))), bt._3, (bt._4 - bB), bt._5, bt._6, bt._7, bw, aT((bC - bH), t, bw)) | |
309 | 312 | } | |
310 | - | else if ((0 > ( | |
311 | - | then throw((((("Attempt to take " + toString(-( | |
312 | - | else $Tuple9(( | |
313 | + | else if ((0 > (bC + by))) | |
314 | + | then throw((((("Attempt to take " + toString(-(by))) + " from warehouse, but only ") + toString(bC)) + " available")) | |
315 | + | else $Tuple9((bv + 1), (bt._2 :+ toString((bC + by))), bt._3, (bt._4 - bB), (bt._5 - bG), bt._6, bt._7, bw, aT((bC + by), t, bw)) | |
313 | 316 | } | |
314 | 317 | } | |
315 | 318 | } | |
316 | 319 | ||
317 | 320 | ||
318 | - | func | |
319 | - | let | |
320 | - | let | |
321 | - | let | |
321 | + | func bI (bJ,bK,bL) = { | |
322 | + | let bM = split(bJ[v], "_") | |
323 | + | let bN = split(bJ[w], "_") | |
324 | + | let bO = if ((bJ[x] == "")) | |
322 | 325 | then nil | |
323 | - | else split( | |
324 | - | let | |
325 | - | let | |
326 | - | let | |
326 | + | else split(bJ[x], "_") | |
327 | + | let bP = split(bK[aN], "_") | |
328 | + | let bQ = split(bK[aO], "_") | |
329 | + | let bR = if ((bK[aP] == "")) | |
327 | 330 | then nil | |
328 | - | else split( | |
329 | - | if ((size( | |
331 | + | else split(bK[aP], "_") | |
332 | + | if ((size(bL) != 3)) | |
330 | 333 | then throw("newOrderStr should contain exactly 2 ':' separators") | |
331 | 334 | else { | |
332 | - | let | |
333 | - | let | |
334 | - | let | |
335 | + | let bS = split(bL[0], "_") | |
336 | + | let bT = split(bL[1], "_") | |
337 | + | let bU = if ((bL[2] == "")) | |
335 | 338 | then nil | |
336 | - | else split( | |
337 | - | if ((size( | |
339 | + | else split(bL[2], "_") | |
340 | + | if ((size(bS) != f)) | |
338 | 341 | then throw("All 6 resources should be passed") | |
339 | - | else if ((size( | |
342 | + | else if ((size(bT) != f)) | |
340 | 343 | then throw("All 6 materials should be passed") | |
341 | 344 | else { | |
342 | - | let | |
343 | - | let | |
344 | - | let | |
345 | - | let | |
346 | - | func | |
347 | - | then | |
348 | - | else | |
345 | + | let bV = { | |
346 | + | let bW = bS | |
347 | + | let bX = size(bW) | |
348 | + | let bY = $Tuple9(0, nil, 0, 0, 0, bM, bP, false, 0) | |
349 | + | func bZ (ca,cb) = if ((cb >= bX)) | |
350 | + | then ca | |
351 | + | else bs(ca, bW[cb]) | |
349 | 352 | ||
350 | - | func | |
351 | - | then | |
353 | + | func cc (ca,cb) = if ((cb >= bX)) | |
354 | + | then ca | |
352 | 355 | else throw("List size exceeds 6") | |
353 | 356 | ||
354 | - | bZ( | |
357 | + | cc(bZ(bZ(bZ(bZ(bZ(bZ(bY, 0), 1), 2), 3), 4), 5), 6) | |
355 | 358 | } | |
356 | - | let | |
357 | - | let | |
358 | - | let | |
359 | - | let | |
360 | - | func | |
361 | - | then | |
362 | - | else | |
359 | + | let bl = { | |
360 | + | let bW = bT | |
361 | + | let bX = size(bW) | |
362 | + | let bY = $Tuple9(0, nil, bV._3, bV._4, bV._5, bN, bQ, false, bV._9) | |
363 | + | func cd (ca,cb) = if ((cb >= bX)) | |
364 | + | then ca | |
365 | + | else bs(ca, bW[cb]) | |
363 | 366 | ||
364 | - | func | |
365 | - | then | |
367 | + | func ce (ca,cb) = if ((cb >= bX)) | |
368 | + | then ca | |
366 | 369 | else throw("List size exceeds 6") | |
367 | 370 | ||
368 | - | | |
371 | + | ce(cd(cd(cd(cd(cd(cd(bY, 0), 1), 2), 3), 4), 5), 6) | |
369 | 372 | } | |
370 | - | let | |
373 | + | let aS = if ((size(bU) != 0)) | |
371 | 374 | then { | |
372 | - | let | |
373 | - | let | |
374 | - | let | |
375 | - | func | |
376 | - | then | |
377 | - | else | |
375 | + | let bW = bU | |
376 | + | let bX = size(bW) | |
377 | + | let bY = $Tuple9(0, nil, bl._3, bl._4, bl._5, bO, bR, true, bl._9) | |
378 | + | func cf (ca,cb) = if ((cb >= bX)) | |
379 | + | then ca | |
380 | + | else bs(ca, bW[cb]) | |
378 | 381 | ||
379 | - | func | |
380 | - | then | |
382 | + | func cg (ca,cb) = if ((cb >= bX)) | |
383 | + | then ca | |
381 | 384 | else throw("List size exceeds 50") | |
382 | 385 | ||
383 | - | | |
386 | + | cg(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(bY, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50) | |
384 | 387 | } | |
385 | - | else $Tuple9(0, | |
386 | - | $Tuple7( | |
388 | + | else $Tuple9(0, bO, bl._3, bl._4, bl._5, bO, bR, true, bl._9) | |
389 | + | $Tuple7(bV._2, bl._2, aS._2, aS._3, aS._4, aS._5, aS._9) | |
387 | 390 | } | |
388 | 391 | } | |
389 | 392 | } | |
390 | 393 | ||
391 | 394 | ||
392 | - | func | |
393 | - | let | |
394 | - | let | |
395 | - | let | |
396 | - | if ((size( | |
395 | + | func ch (bt,ci) = { | |
396 | + | let bv = bt._7 | |
397 | + | let bw = bt._12 | |
398 | + | let cj = split(ci, "@") | |
399 | + | if ((size(cj) != 2)) | |
397 | 400 | then throw("Incorrect order format, should be amount@price") | |
398 | 401 | else { | |
399 | - | let | |
400 | - | let | |
401 | - | if ((0 > | |
402 | + | let ck = parseIntValue(cj[0]) | |
403 | + | let cl = parseIntValue(cj[1]) | |
404 | + | if ((0 > cl)) | |
402 | 405 | then throw("Price can't be negative") | |
403 | 406 | else { | |
404 | - | let | |
405 | - | let | |
406 | - | then parseIntValue( | |
407 | + | let cm = fraction(ck, cl, ae) | |
408 | + | let cn = if ((size(bt._8) > bv)) | |
409 | + | then parseIntValue(bt._8[bv]) | |
407 | 410 | else 0 | |
408 | - | let | |
409 | - | then parseIntValue( | |
411 | + | let bC = if ((size(bt._9) > bv)) | |
412 | + | then parseIntValue(bt._9[bv]) | |
410 | 413 | else 0 | |
411 | - | let | |
412 | - | then | |
414 | + | let co = if ((size(bt._10) > bv)) | |
415 | + | then bt._10[bv] | |
413 | 416 | else "0@0" | |
414 | - | let | |
415 | - | let | |
416 | - | let | |
417 | - | if (if (( | |
418 | - | then ( | |
417 | + | let cp = split(co, "@") | |
418 | + | let cq = parseIntValue(cp[0]) | |
419 | + | let cr = parseIntValue(cp[1]) | |
420 | + | if (if ((ck != 0)) | |
421 | + | then (cl != cr) | |
419 | 422 | else false) | |
420 | - | then throw(((((("Prices of " + | |
423 | + | then throw(((((("Prices of " + bt._11[bv]) + " don't match! WH price=") + toString(cr)) + ", your price=") + toString(cl))) | |
421 | 424 | else { | |
422 | - | let | |
423 | - | let | |
424 | - | if (( | |
425 | - | then $Tuple13(( | |
426 | - | else if (( | |
427 | - | then if ((0 > | |
428 | - | then if (( | |
429 | - | then throw(((((("Attempt to buy " + toString( | |
430 | - | else $Tuple13(( | |
431 | - | then ( | |
432 | - | else | |
433 | - | else throw((("Attempt to buy " + | |
434 | - | else if (( | |
435 | - | then if ((-( | |
436 | - | then throw(((((("Attempt to sell " + toString(-( | |
437 | - | else if ((-( | |
438 | - | then throw(((((("Attempt to sell " + toString(-( | |
439 | - | else $Tuple13(( | |
440 | - | then ( | |
441 | - | else | |
442 | - | else throw((("Attempt to sell " + | |
425 | + | let cs = fraction(cq, cr, ae) | |
426 | + | let ct = aT(ck, t, bw) | |
427 | + | if ((ck == 0)) | |
428 | + | then $Tuple13((bt._1 :+ toString(bC)), (bt._2 :+ co), (bt._3 :+ toString(cn)), bt._4, bt._5, bt._6, (bt._7 + 1), bt._8, bt._9, bt._10, bt._11, bw, bt._13) | |
429 | + | else if ((ck > 0)) | |
430 | + | then if ((0 > cq)) | |
431 | + | then if ((ck > -(cq))) | |
432 | + | then throw(((((("Attempt to buy " + toString(ck)) + " of ") + bt._11[bv]) + ", but warehouse only sells ") + toString(-(cq)))) | |
433 | + | else $Tuple13((bt._1 :+ toString(bC)), (bt._2 :+ ((toString((cq + ck)) + "@") + toString(cr))), (bt._3 :+ toString((cn + ck))), (bt._4 + ct), bt._5, (bt._6 + cm), (bt._7 + 1), bt._8, bt._9, bt._10, bt._11, bw, (bt._13 + (if (bw) | |
434 | + | then (ck * ae) | |
435 | + | else ck))) | |
436 | + | else throw((("Attempt to buy " + bt._11[bv]) + " while warehouse doesn't sell it")) | |
437 | + | else if ((cq > 0)) | |
438 | + | then if ((-(ck) > cq)) | |
439 | + | then throw(((((("Attempt to sell " + toString(-(ck))) + " of ") + bt._11[bv]) + ", but warehouse only buys ") + toString(cq))) | |
440 | + | else if ((-(ck) > cn)) | |
441 | + | then throw(((((("Attempt to sell " + toString(-(ck))) + ", but you only have ") + toString(cn)) + " of ") + bt._11[bv])) | |
442 | + | else $Tuple13((bt._1 :+ toString((bC - ck))), (bt._2 :+ ((toString((cq + ck)) + "@") + toString(cr))), (bt._3 :+ toString((cn + ck))), (bt._4 - ct), (bt._5 - cm), bt._6, (bt._7 + 1), bt._8, bt._9, bt._10, bt._11, bw, (bt._13 - (if (bw) | |
443 | + | then (ck * ae) | |
444 | + | else ck))) | |
445 | + | else throw((("Attempt to sell " + bt._11[bv]) + " while warehouse doesn't buy it")) | |
443 | 446 | } | |
444 | 447 | } | |
445 | 448 | } | |
446 | 449 | } | |
447 | 450 | ||
448 | 451 | ||
449 | - | @Callable( | |
450 | - | func recalcLockedVolumeREADONLY (R, | |
451 | - | let | |
452 | - | let | |
453 | - | $Tuple2(nil, ( | |
452 | + | @Callable(cu) | |
453 | + | func recalcLockedVolumeREADONLY (R,cv) = { | |
454 | + | let bK = aQ(Q(R)) | |
455 | + | let cw = bI(cv, bK, bK) | |
456 | + | $Tuple2(nil, (cw._4 + cw._5)) | |
454 | 457 | } | |
455 | 458 | ||
456 | 459 | ||
457 | 460 | ||
458 | - | @Callable( | |
459 | - | func constructorV1 ( | |
461 | + | @Callable(cu) | |
462 | + | func constructorV1 (cx) = if ((cu.caller != this)) | |
460 | 463 | then throw("Permission denied") | |
461 | - | else [StringEntry(am(), | |
464 | + | else [StringEntry(am(), cx)] | |
462 | 465 | ||
463 | 466 | ||
464 | 467 | ||
465 | - | @Callable( | |
466 | - | func sellResources ( | |
467 | - | let | |
468 | - | let N = valueOrErrorMessage(getString(at, K(toString( | |
469 | - | if ((size( | |
468 | + | @Callable(cu) | |
469 | + | func sellResources (cy,cz) = { | |
470 | + | let cA = br() | |
471 | + | let N = valueOrErrorMessage(getString(at, K(toString(cu.caller))), "You don't have a duck staked") | |
472 | + | if ((size(cu.payments) != 0)) | |
470 | 473 | then throw("sellResources doesn't require any payments") | |
471 | 474 | else { | |
472 | - | let | |
473 | - | if (( | |
474 | - | then throw(("Duck location type should be Factory, but is " + | |
475 | + | let cB = split(valueOrElse(getString(at, O(N)), g), "_") | |
476 | + | if ((cB[U] != "F")) | |
477 | + | then throw(("Duck location type should be Factory, but is " + cB[U])) | |
475 | 478 | else { | |
476 | - | let | |
477 | - | let | |
478 | - | let | |
479 | - | func | |
480 | - | then throw(((((("You have " + | |
481 | - | else if ((0 > | |
482 | - | then throw(((("You tried to sell negative amount of " + k[ | |
483 | - | else if (( | |
479 | + | let aZ = cB[V] | |
480 | + | let cC = bo(M(N)) | |
481 | + | let cD = split(cC[C], "_") | |
482 | + | func cE (bt,bv) = if ((cy[bv] > parseIntValue(cD[bv]))) | |
483 | + | then throw(((((("You have " + cD[bv]) + " of ") + k[bv]) + ", but tried to sell ") + toString(cy[bv]))) | |
484 | + | else if ((0 > cy[bv])) | |
485 | + | then throw(((("You tried to sell negative amount of " + k[bv]) + ": ") + toString(cy[bv]))) | |
486 | + | else if ((cy[bv] > 0)) | |
484 | 487 | then { | |
485 | - | let | |
486 | - | $Tuple4(( | |
488 | + | let cF = aY(aZ, bv, cy[bv], cz[bv]) | |
489 | + | $Tuple4((bt._1 :+ cF._1), (bt._2 :+ toString((parseIntValue(cD[bv]) - cy[bv]))), (bt._3 + cF._2), (bt._4 + cy[bv])) | |
487 | 490 | } | |
488 | - | else $Tuple4( | |
491 | + | else $Tuple4(bt._1, (bt._2 :+ cD[bv]), bt._3, bt._4) | |
489 | 492 | ||
490 | - | let | |
491 | - | let | |
492 | - | let | |
493 | - | let | |
494 | - | func | |
495 | - | then | |
496 | - | else | |
493 | + | let cG = { | |
494 | + | let bW = [0, 1, 2, 3, 4, 5] | |
495 | + | let bX = size(bW) | |
496 | + | let bY = $Tuple4(nil, nil, 0, 0) | |
497 | + | func bZ (ca,cb) = if ((cb >= bX)) | |
498 | + | then ca | |
499 | + | else cE(ca, bW[cb]) | |
497 | 500 | ||
498 | - | func | |
499 | - | then | |
501 | + | func cc (ca,cb) = if ((cb >= bX)) | |
502 | + | then ca | |
500 | 503 | else throw("List size exceeds 6") | |
501 | 504 | ||
502 | - | bZ( | |
505 | + | cc(bZ(bZ(bZ(bZ(bZ(bZ(bY, 0), 1), 2), 3), 4), 5), 6) | |
503 | 506 | } | |
504 | - | let | |
505 | - | let | |
506 | - | let | |
507 | - | $Tuple2(( | |
507 | + | let cH = makeString([cC[B], makeString(cG._2, "_"), cC[D], cC[E]], ":") | |
508 | + | let cI = au(invoke(at, "updateBackpack", [N, cH], nil)) | |
509 | + | let cJ = ax(invoke(at, "updateDuckStats", [N, fraction(a, cG._4, ae)], nil)) | |
510 | + | $Tuple2((cG._1 :+ ScriptTransfer(cu.caller, cG._3, Z)), $Tuple3(cI, cA, cJ)) | |
508 | 511 | } | |
509 | 512 | } | |
510 | 513 | } | |
511 | 514 | ||
512 | 515 | ||
513 | 516 | ||
514 | - | @Callable( | |
515 | - | func buyMaterials ( | |
516 | - | let | |
517 | - | let N = valueOrErrorMessage(getString(at, K(toString( | |
518 | - | if ((size( | |
517 | + | @Callable(cu) | |
518 | + | func buyMaterials (cy,cK) = { | |
519 | + | let cA = br() | |
520 | + | let N = valueOrErrorMessage(getString(at, K(toString(cu.caller))), "You don't have a duck staked") | |
521 | + | if ((size(cu.payments) != 1)) | |
519 | 522 | then throw("exactly 1 payment must be attached") | |
520 | 523 | else { | |
521 | - | let | |
522 | - | let | |
523 | - | let | |
524 | - | if (( | |
524 | + | let cL = cu.payments[0] | |
525 | + | let cM = cL.amount | |
526 | + | let cN = valueOrErrorMessage(cL.assetId, "WAVES can't be used as payment") | |
527 | + | if ((cN != Z)) | |
525 | 528 | then throw("USDT payments only!") | |
526 | 529 | else { | |
527 | - | let | |
528 | - | if (( | |
529 | - | then throw(("Duck location type should be Factory, but is " + | |
530 | + | let cB = split(valueOrElse(getString(at, O(N)), g), "_") | |
531 | + | if ((cB[U] != "F")) | |
532 | + | then throw(("Duck location type should be Factory, but is " + cB[U])) | |
530 | 533 | else { | |
531 | - | let | |
532 | - | let | |
533 | - | let | |
534 | - | func | |
535 | - | then throw(((("You tried to buy negative amount of " + l[ | |
536 | - | else if (( | |
534 | + | let aZ = cB[V] | |
535 | + | let cC = bo(M(N)) | |
536 | + | let cO = split(cC[D], "_") | |
537 | + | func cP (bt,bv) = if ((0 > cy[bv])) | |
538 | + | then throw(((("You tried to buy negative amount of " + l[bv]) + ": ") + toString(cy[bv]))) | |
539 | + | else if ((cy[bv] > 0)) | |
537 | 540 | then { | |
538 | - | let | |
539 | - | $Tuple4(( | |
541 | + | let cF = bg(aZ, bv, cy[bv], cK[bv]) | |
542 | + | $Tuple4((bt._1 :+ cF._1), (bt._2 :+ toString((parseIntValue(cO[bv]) + cF._3))), (bt._3 + cF._2), (bt._4 + cy[bv])) | |
540 | 543 | } | |
541 | - | else $Tuple4( | |
544 | + | else $Tuple4(bt._1, (bt._2 :+ cO[bv]), bt._3, bt._4) | |
542 | 545 | ||
543 | - | let | |
544 | - | let | |
545 | - | let | |
546 | - | let | |
547 | - | func | |
548 | - | then | |
549 | - | else | |
546 | + | let cG = { | |
547 | + | let bW = [0, 1, 2, 3, 4, 5] | |
548 | + | let bX = size(bW) | |
549 | + | let bY = $Tuple4(nil, nil, 0, 0) | |
550 | + | func bZ (ca,cb) = if ((cb >= bX)) | |
551 | + | then ca | |
552 | + | else cP(ca, bW[cb]) | |
550 | 553 | ||
551 | - | func | |
552 | - | then | |
554 | + | func cc (ca,cb) = if ((cb >= bX)) | |
555 | + | then ca | |
553 | 556 | else throw("List size exceeds 6") | |
554 | 557 | ||
555 | - | bZ( | |
558 | + | cc(bZ(bZ(bZ(bZ(bZ(bZ(bY, 0), 1), 2), 3), 4), 5), 6) | |
556 | 559 | } | |
557 | - | if (( | |
558 | - | then throw(((("Insufficient payment! Attached=" + toString( | |
560 | + | if ((cG._3 > cM)) | |
561 | + | then throw(((("Insufficient payment! Attached=" + toString(cM)) + ", required=") + toString(cG._3))) | |
559 | 562 | else { | |
560 | - | let | |
561 | - | let | |
562 | - | let ao = if ((( | |
563 | - | then [ScriptTransfer( | |
563 | + | let cH = makeString([cC[B], cC[C], makeString(cG._2, "_"), cC[E]], ":") | |
564 | + | let cI = au(invoke(at, "updateBackpack", [N, cH], nil)) | |
565 | + | let ao = if (((cM - cG._3) > 0)) | |
566 | + | then [ScriptTransfer(cu.caller, (cM - cG._3), Z)] | |
564 | 567 | else nil | |
565 | - | let | |
566 | - | let | |
567 | - | $Tuple2((( | |
568 | + | let cQ = (cG._3 / 100) | |
569 | + | let cJ = ax(invoke(at, "updateDuckStats", [N, fraction(a, cG._4, ae)], nil)) | |
570 | + | $Tuple2(((cG._1 ++ ao) :+ ScriptTransfer(as, cQ, Z)), $Tuple3(cI, cA, cJ)) | |
568 | 571 | } | |
569 | 572 | } | |
570 | 573 | } | |
573 | 576 | ||
574 | 577 | ||
575 | 578 | ||
576 | - | @Callable( | |
577 | - | func exchangeResources ( | |
578 | - | let | |
579 | - | let N = valueOrErrorMessage(getString(at, K(toString( | |
580 | - | if ((size( | |
579 | + | @Callable(cu) | |
580 | + | func exchangeResources (cy) = { | |
581 | + | let cA = br() | |
582 | + | let N = valueOrErrorMessage(getString(at, K(toString(cu.caller))), "You don't have a duck staked") | |
583 | + | if ((size(cu.payments) != 1)) | |
581 | 584 | then throw("exactly 1 payment must be attached") | |
582 | 585 | else { | |
583 | - | let | |
584 | - | let | |
585 | - | let | |
586 | - | if (( | |
586 | + | let cL = cu.payments[0] | |
587 | + | let cM = cL.amount | |
588 | + | let cN = valueOrErrorMessage(cL.assetId, "WAVES can't be used as payment") | |
589 | + | if ((cN != Z)) | |
587 | 590 | then throw("USDT payments only!") | |
588 | 591 | else { | |
589 | - | let | |
590 | - | if (( | |
591 | - | then throw(("Duck location type should be Factory, but is " + | |
592 | + | let cB = split(valueOrElse(getString(at, O(N)), g), "_") | |
593 | + | if ((cB[U] != "F")) | |
594 | + | then throw(("Duck location type should be Factory, but is " + cB[U])) | |
592 | 595 | else { | |
593 | - | let | |
594 | - | let | |
595 | - | let | |
596 | - | let | |
597 | - | func | |
598 | - | let | |
599 | - | let | |
600 | - | let | |
601 | - | if (( | |
602 | - | then throw(((((("You have " + | |
603 | - | else if ((0 > | |
604 | - | then throw(((("You tried to exchange negative amount of " + k[ | |
605 | - | else if (( | |
606 | - | then $Tuple5(( | |
607 | - | else $Tuple5(( | |
596 | + | let aZ = cB[V] | |
597 | + | let cC = bo(M(N)) | |
598 | + | let cD = split(cC[C], "_") | |
599 | + | let cO = split(cC[D], "_") | |
600 | + | func cR (bt,bv) = { | |
601 | + | let bb = aK(aZ, bv) | |
602 | + | let bc = valueOrElse(getInteger(bb), 0) | |
603 | + | let cS = cy[bv] | |
604 | + | if ((cS > parseIntValue(cD[bv]))) | |
605 | + | then throw(((((("You have " + cD[bv]) + " of ") + k[bv]) + ", but tried to exchange ") + toString(cS))) | |
606 | + | else if ((0 > cS)) | |
607 | + | then throw(((("You tried to exchange negative amount of " + k[bv]) + ": ") + toString(cS))) | |
608 | + | else if ((cS > 0)) | |
609 | + | then $Tuple5((bt._1 :+ toString((parseIntValue(cD[bv]) - cS))), (bt._2 :+ toString((parseIntValue(cO[bv]) + cS))), (bt._3 + fraction(cS, h, ae)), (bt._4 :+ IntegerEntry(bb, bc)), (bt._5 + cS)) | |
610 | + | else $Tuple5((bt._1 :+ cD[bv]), (bt._2 :+ cO[bv]), bt._3, bt._4, bt._5) | |
608 | 611 | } | |
609 | 612 | ||
610 | - | let | |
611 | - | let | |
612 | - | let | |
613 | - | let | |
614 | - | func | |
615 | - | then | |
616 | - | else | |
613 | + | let cG = { | |
614 | + | let bW = [0, 1, 2, 3, 4, 5] | |
615 | + | let bX = size(bW) | |
616 | + | let bY = $Tuple5(nil, nil, 0, nil, 0) | |
617 | + | func bZ (ca,cb) = if ((cb >= bX)) | |
618 | + | then ca | |
619 | + | else cR(ca, bW[cb]) | |
617 | 620 | ||
618 | - | func | |
619 | - | then | |
621 | + | func cc (ca,cb) = if ((cb >= bX)) | |
622 | + | then ca | |
620 | 623 | else throw("List size exceeds 6") | |
621 | 624 | ||
622 | - | bZ( | |
625 | + | cc(bZ(bZ(bZ(bZ(bZ(bZ(bY, 0), 1), 2), 3), 4), 5), 6) | |
623 | 626 | } | |
624 | - | if (( | |
625 | - | then throw(((("Insufficient payment! Attached=" + toString( | |
627 | + | if ((cG._3 > cM)) | |
628 | + | then throw(((("Insufficient payment! Attached=" + toString(cM)) + ", required=") + toString(cG._3))) | |
626 | 629 | else { | |
627 | - | let | |
628 | - | let | |
629 | - | let ao = if ((( | |
630 | - | then [ScriptTransfer( | |
630 | + | let cH = makeString([cC[B], makeString(cG._1, "_"), makeString(cG._2, "_"), cC[E]], ":") | |
631 | + | let cI = au(invoke(at, "updateBackpack", [N, cH], nil)) | |
632 | + | let ao = if (((cM - cG._3) > 0)) | |
633 | + | then [ScriptTransfer(cu.caller, (cM - cG._3), Z)] | |
631 | 634 | else nil | |
632 | - | let | |
633 | - | let | |
634 | - | $Tuple2(((ao ++ | |
635 | + | let cQ = (cG._3 / 100) | |
636 | + | let cJ = ax(invoke(at, "updateDuckStats", [N, fraction(a, cG._5, ae)], nil)) | |
637 | + | $Tuple2(((ao ++ cG._4) :+ ScriptTransfer(as, cQ, Z)), $Tuple3(cI, cA, cJ)) | |
635 | 638 | } | |
636 | 639 | } | |
637 | 640 | } | |
640 | 643 | ||
641 | 644 | ||
642 | 645 | ||
643 | - | @Callable( | |
644 | - | func craftGoods ( | |
645 | - | let | |
646 | - | if ((size( | |
646 | + | @Callable(cu) | |
647 | + | func craftGoods (cT,cU) = { | |
648 | + | let cA = br() | |
649 | + | if ((size(cu.payments) != 1)) | |
647 | 650 | then throw("exactly 1 payment must be attached") | |
648 | 651 | else { | |
649 | - | let | |
650 | - | let | |
651 | - | let | |
652 | - | if (( | |
652 | + | let cL = cu.payments[0] | |
653 | + | let cM = cL.amount | |
654 | + | let cN = valueOrErrorMessage(cL.assetId, "WAVES can't be used as payment") | |
655 | + | if ((cN != Z)) | |
653 | 656 | then throw("USDT payments only!") | |
654 | - | else if (( | |
657 | + | else if ((cM != ad)) | |
655 | 658 | then throw("exactly 1 USDT must be attached as payment") | |
656 | - | else if ((0 >= | |
659 | + | else if ((0 >= cU)) | |
657 | 660 | then throw("Quantity should be positive") | |
658 | 661 | else { | |
659 | - | let N = valueOrErrorMessage(getString(at, K(toString( | |
660 | - | let | |
661 | - | if (( | |
662 | - | then throw(("Duck location type should be Manufactory, but is " + | |
662 | + | let N = valueOrErrorMessage(getString(at, K(toString(cu.caller))), "You don't have a duck staked") | |
663 | + | let cB = split(valueOrElse(getString(at, O(N)), g), "_") | |
664 | + | if ((cB[U] != "M")) | |
665 | + | then throw(("Duck location type should be Manufactory, but is " + cB[U])) | |
663 | 666 | else { | |
664 | - | let | |
665 | - | let | |
666 | - | let | |
667 | - | if (if ((0 > | |
667 | + | let cV = cB[T] | |
668 | + | let cC = bo(M(N)) | |
669 | + | let cO = split(cC[D], "_") | |
670 | + | if (if ((0 > cT)) | |
668 | 671 | then true | |
669 | - | else ( | |
670 | - | then throw(("Unknown product idx=" + toString( | |
672 | + | else (cT >= size(p))) | |
673 | + | then throw(("Unknown product idx=" + toString(cT))) | |
671 | 674 | else { | |
672 | - | let X = split(p[ | |
675 | + | let X = split(p[cT], "_") | |
673 | 676 | if ((size(X) != s)) | |
674 | - | then throw(("Fatal: unknown recipe: " + p[ | |
677 | + | then throw(("Fatal: unknown recipe: " + p[cT])) | |
675 | 678 | else { | |
676 | - | let | |
677 | - | if ((n[ | |
678 | - | then throw(((("This product is available in " + n[ | |
679 | + | let cW = parseIntValue(X[r]) | |
680 | + | if ((n[cW] != cV)) | |
681 | + | then throw(((("This product is available in " + n[cW]) + ", but you are in ") + cV)) | |
679 | 682 | else { | |
680 | - | let | |
683 | + | let cX = if ((cC[E] == "")) | |
681 | 684 | then nil | |
682 | - | else split( | |
683 | - | func | |
684 | - | let ay = | |
685 | - | let | |
686 | - | then | |
685 | + | else split(cC[E], "_") | |
686 | + | func cY (bt,cZ) = { | |
687 | + | let ay = bt._2 | |
688 | + | let da = if ((size(cX) > ay)) | |
689 | + | then cX[ay] | |
687 | 690 | else "0" | |
688 | - | let | |
689 | - | let | |
690 | - | let | |
691 | - | then toString(( | |
692 | - | else | |
693 | - | $Tuple2(( | |
691 | + | let db = parseIntValue(da) | |
692 | + | let aU = (cU * t) | |
693 | + | let dc = if ((ay == cT)) | |
694 | + | then toString((db + aU)) | |
695 | + | else da | |
696 | + | $Tuple2((bt._1 :+ dc), (ay + 1)) | |
694 | 697 | } | |
695 | 698 | ||
696 | - | let | |
697 | - | let | |
698 | - | let | |
699 | - | func | |
700 | - | then | |
701 | - | else | |
699 | + | let dd = ( let bW = p | |
700 | + | let bX = size(bW) | |
701 | + | let bY = $Tuple2(nil, 0) | |
702 | + | func bZ (ca,cb) = if ((cb >= bX)) | |
703 | + | then ca | |
704 | + | else cY(ca, bW[cb]) | |
702 | 705 | ||
703 | - | func | |
704 | - | then | |
706 | + | func cc (ca,cb) = if ((cb >= bX)) | |
707 | + | then ca | |
705 | 708 | else throw("List size exceeds 50") | |
706 | 709 | ||
707 | - | bZ( | |
708 | - | func | |
709 | - | let | |
710 | - | let | |
711 | - | if (( | |
712 | - | then throw(((((((("You have " + az( | |
713 | - | else if (( | |
714 | - | then $Tuple2(( | |
715 | - | else $Tuple2(( | |
710 | + | cc(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bY, 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 | |
711 | + | func de (bt,bv) = { | |
712 | + | let df = ((parseIntValue(X[bv]) * ad) * cU) | |
713 | + | let dg = parseIntValue(cO[bv]) | |
714 | + | if ((df > dg)) | |
715 | + | then throw(((((((("You have " + az(dg, 8)) + " of ") + l[bv]) + ", but recipe requires ") + az(df, 8)) + " for quantity ") + toString(cU))) | |
716 | + | else if ((df > 0)) | |
717 | + | then $Tuple2((bt._1 :+ toString((dg - df))), (bt._2 + df)) | |
718 | + | else $Tuple2((bt._1 :+ cO[bv]), bt._2) | |
716 | 719 | } | |
717 | 720 | ||
718 | - | let | |
719 | - | let | |
720 | - | let | |
721 | - | let | |
722 | - | func | |
723 | - | then | |
724 | - | else | |
721 | + | let cG = { | |
722 | + | let bW = [0, 1, 2, 3, 4, 5] | |
723 | + | let bX = size(bW) | |
724 | + | let bY = $Tuple2(nil, 0) | |
725 | + | func cd (ca,cb) = if ((cb >= bX)) | |
726 | + | then ca | |
727 | + | else de(ca, bW[cb]) | |
725 | 728 | ||
726 | - | func | |
727 | - | then | |
729 | + | func ce (ca,cb) = if ((cb >= bX)) | |
730 | + | then ca | |
728 | 731 | else throw("List size exceeds 6") | |
729 | 732 | ||
730 | - | | |
733 | + | ce(cd(cd(cd(cd(cd(cd(bY, 0), 1), 2), 3), 4), 5), 6) | |
731 | 734 | } | |
732 | - | let | |
733 | - | let | |
734 | - | let | |
735 | - | $Tuple2(nil, $Tuple3( | |
735 | + | let cH = makeString([cC[B], cC[C], makeString(cG._1, "_"), makeString(dd, "_")], ":") | |
736 | + | let cI = au(invoke(at, "updateBackpack", [N, cH], nil)) | |
737 | + | let cJ = ax(invoke(at, "updateDuckStats", [N, fraction(b, cG._2, ae)], nil)) | |
738 | + | $Tuple2(nil, $Tuple3(cI, cA, cJ)) | |
736 | 739 | } | |
737 | 740 | } | |
738 | 741 | } | |
743 | 746 | ||
744 | 747 | ||
745 | 748 | ||
746 | - | @Callable( | |
747 | - | func setWarehouseOrder ( | |
748 | - | let | |
749 | - | let J = toString( | |
750 | - | let | |
751 | - | then | |
749 | + | @Callable(cu) | |
750 | + | func setWarehouseOrder (dh,R) = { | |
751 | + | let di = cu.originCaller | |
752 | + | let J = toString(di) | |
753 | + | let cI = if ((di != as)) | |
754 | + | then bq() | |
752 | 755 | else false | |
753 | - | let | |
756 | + | let dj = value(assetInfo(fromBase58String(R))) | |
754 | 757 | if (!(isDefined(getInteger(at, H(R))))) | |
755 | - | then throw((("NFT " + | |
758 | + | then throw((("NFT " + dj.name) + " is not staked")) | |
756 | 759 | else { | |
757 | - | let | |
758 | - | if (if (( | |
759 | - | then ( | |
760 | + | let dk = valueOrErrorMessage(getString(at, F(R)), (("NFT " + dj.name) + " is orphaned")) | |
761 | + | if (if ((di != as)) | |
762 | + | then (dk != J) | |
760 | 763 | else false) | |
761 | 764 | then throw((e + " is not yours")) | |
762 | 765 | else { | |
763 | - | let | |
764 | - | let | |
765 | - | let | |
766 | - | let | |
767 | - | let | |
768 | - | let | |
769 | - | let | |
770 | - | let | |
771 | - | let | |
772 | - | let | |
773 | - | let | |
774 | - | let | |
775 | - | let | |
776 | - | if ((0 > | |
777 | - | then throw((((((("Attempt to reserve " + toString( | |
766 | + | let dl = split_4C(dh, ":") | |
767 | + | let cv = au(invoke(at, "getWarehouseREADONLY", [R], nil)) | |
768 | + | let bJ = split_4C(cv, ":") | |
769 | + | let dm = split(bJ[y], "_") | |
770 | + | let dn = parseIntValue(dm[A]) | |
771 | + | let aR = Q(R) | |
772 | + | let bK = aQ(aR) | |
773 | + | let cw = bI(bJ, bK, dl) | |
774 | + | let do = cw._4 | |
775 | + | let dp = cw._5 | |
776 | + | let dq = cw._7 | |
777 | + | let dr = (do + dp) | |
778 | + | let ds = ((dn - dq) - dr) | |
779 | + | if ((0 > ds)) | |
780 | + | then throw((((((("Attempt to reserve " + toString(do)) + " space for buy orders, and ") + toString(dp)) + " space for sell orders (and occupied=") + toString(dq)) + "), leads to negative free space")) | |
778 | 781 | else { | |
779 | - | let | |
780 | - | let | |
781 | - | let | |
782 | - | let | |
783 | - | then if ((size( | |
782 | + | let dt = makeString_2C([bJ[u], makeString(cw._1, "_"), makeString(cw._2, "_"), makeString(cw._3, "_"), toString(dr)], ":") | |
783 | + | let du = au(invoke(at, "saveWarehouse", [dt, R], nil)) | |
784 | + | let dv = cw._6 | |
785 | + | let dw = if ((dv > 0)) | |
786 | + | then if ((size(cu.payments) != 1)) | |
784 | 787 | then throw("exactly 1 payment must be attached") | |
785 | 788 | else { | |
786 | - | let | |
787 | - | let | |
788 | - | let | |
789 | - | if (( | |
789 | + | let cL = cu.payments[0] | |
790 | + | let cM = cL.amount | |
791 | + | let cN = valueOrErrorMessage(cL.assetId, "WAVES can't be used as payment") | |
792 | + | if ((cN != Z)) | |
790 | 793 | then throw("USDT payments only!") | |
791 | - | else if (( | |
792 | - | then throw(("Payment needed is " + toString( | |
793 | - | else [StringEntry( | |
794 | + | else if ((cM != dv)) | |
795 | + | then throw(("Payment needed is " + toString(dv))) | |
796 | + | else [StringEntry(aR, dh)] | |
794 | 797 | } | |
795 | - | else if (( | |
796 | - | then if ((size( | |
798 | + | else if ((dv == 0)) | |
799 | + | then if ((size(cu.payments) != 0)) | |
797 | 800 | then throw("No payments needed") | |
798 | - | else [StringEntry( | |
799 | - | else if ((size( | |
801 | + | else [StringEntry(aR, dh)] | |
802 | + | else if ((size(cu.payments) != 0)) | |
800 | 803 | then throw("No payments needed") | |
801 | - | else [ScriptTransfer(addressFromStringValue( | |
802 | - | $Tuple2( | |
804 | + | else [ScriptTransfer(addressFromStringValue(dk), -(dv), Z), StringEntry(aR, dh)] | |
805 | + | $Tuple2(dw, $Tuple2(cI, du)) | |
803 | 806 | } | |
804 | 807 | } | |
805 | 808 | } | |
807 | 810 | ||
808 | 811 | ||
809 | 812 | ||
810 | - | @Callable( | |
811 | - | func acceptWarehouseOrder ( | |
812 | - | let | |
813 | - | let | |
814 | - | let | |
815 | - | let | |
816 | - | let | |
817 | - | let | |
818 | - | if (( | |
819 | - | then throw((("Duck location type is " + | |
820 | - | else if (( | |
821 | - | then throw(((("Your staked duck is " + | |
813 | + | @Callable(cu) | |
814 | + | func acceptWarehouseOrder (dx,R,N) = { | |
815 | + | let cA = br() | |
816 | + | let dy = cu.originCaller | |
817 | + | let dz = toString(dy) | |
818 | + | let dA = valueOrErrorMessage(getString(at, K(dz)), "You don't have a duck staked") | |
819 | + | let cB = valueOrElse(getString(at, O(dA)), g) | |
820 | + | let dB = split(value(cB), "_") | |
821 | + | if ((dB[U] != "L")) | |
822 | + | then throw((("Duck location type is " + dB[U]) + ", but should be L")) | |
823 | + | else if ((dA != N)) | |
824 | + | then throw(((("Your staked duck is " + dA) + ", but passed ") + N)) | |
822 | 825 | else { | |
823 | - | let | |
826 | + | let dC = value(assetInfo(fromBase58String(R))) | |
824 | 827 | if (!(isDefined(getInteger(at, H(R))))) | |
825 | - | then throw((("NFT " + | |
828 | + | then throw((("NFT " + dC.name) + " is not staked")) | |
826 | 829 | else { | |
827 | - | let | |
828 | - | if (( | |
830 | + | let dD = valueOrErrorMessage(getString(at, F(R)), (("NFT " + dC.name) + " is orphaned")) | |
831 | + | if ((dD == dz)) | |
829 | 832 | then throw("You cannot trade with yourself") | |
830 | 833 | else { | |
831 | - | let | |
832 | - | if ((size( | |
834 | + | let dE = split_4C(dx, ":") | |
835 | + | if ((size(dE) != 3)) | |
833 | 836 | then throw("bpOrderStr should contain exactly 2 ':' separators") | |
834 | 837 | else { | |
835 | - | let | |
836 | - | let | |
837 | - | let | |
838 | + | let dF = split(dE[0], "_") | |
839 | + | let dG = split(dE[1], "_") | |
840 | + | let dH = if ((dE[2] == "")) | |
838 | 841 | then nil | |
839 | - | else split( | |
840 | - | if ((size( | |
842 | + | else split(dE[2], "_") | |
843 | + | if ((size(dF) != f)) | |
841 | 844 | then throw("All 6 resources should be passed") | |
842 | - | else if ((size( | |
845 | + | else if ((size(dG) != f)) | |
843 | 846 | then throw("All 6 materials should be passed") | |
844 | 847 | else { | |
845 | - | let | |
846 | - | let | |
847 | - | let | |
848 | - | let | |
849 | - | let | |
848 | + | let cv = au(invoke(at, "getWarehouseREADONLY", [R], nil)) | |
849 | + | let bJ = split_4C(cv, ":") | |
850 | + | let bM = split(bJ[v], "_") | |
851 | + | let bN = split(bJ[w], "_") | |
852 | + | let bO = if ((bJ[x] == "")) | |
850 | 853 | then nil | |
851 | - | else split( | |
852 | - | let | |
853 | - | let | |
854 | - | let | |
855 | - | let | |
856 | - | let | |
857 | - | let | |
854 | + | else split(bJ[x], "_") | |
855 | + | let dI = parseIntValue(split(bJ[y], "_")[z]) | |
856 | + | let bp = M(N) | |
857 | + | let cC = bo(bp) | |
858 | + | let dJ = split(cC[C], "_") | |
859 | + | let dK = split(cC[D], "_") | |
860 | + | let dL = if ((cC[E] == "")) | |
858 | 861 | then nil | |
859 | - | else split( | |
860 | - | let | |
861 | - | let | |
862 | - | let | |
863 | - | let | |
864 | - | let | |
862 | + | else split(cC[E], "_") | |
863 | + | let aR = Q(R) | |
864 | + | let dM = aQ(aR) | |
865 | + | let dN = split(dM[aN], "_") | |
866 | + | let dO = split(dM[aO], "_") | |
867 | + | let dP = if ((dM[aP] == "")) | |
865 | 868 | then nil | |
866 | - | else split( | |
867 | - | let | |
868 | - | let | |
869 | - | let | |
870 | - | let | |
871 | - | func | |
872 | - | then | |
873 | - | else | |
869 | + | else split(dM[aP], "_") | |
870 | + | let bV = { | |
871 | + | let bW = dF | |
872 | + | let bX = size(bW) | |
873 | + | let bY = $Tuple13(nil, nil, nil, 0, 0, 0, 0, dJ, bM, dN, k, false, 0) | |
874 | + | func bZ (ca,cb) = if ((cb >= bX)) | |
875 | + | then ca | |
876 | + | else ch(ca, bW[cb]) | |
874 | 877 | ||
875 | - | func | |
876 | - | then | |
878 | + | func cc (ca,cb) = if ((cb >= bX)) | |
879 | + | then ca | |
877 | 880 | else throw("List size exceeds 6") | |
878 | 881 | ||
879 | - | bZ( | |
882 | + | cc(bZ(bZ(bZ(bZ(bZ(bZ(bY, 0), 1), 2), 3), 4), 5), 6) | |
880 | 883 | } | |
881 | - | let | |
882 | - | let | |
883 | - | let | |
884 | - | let | |
885 | - | func | |
886 | - | then | |
887 | - | else | |
884 | + | let bl = { | |
885 | + | let bW = dG | |
886 | + | let bX = size(bW) | |
887 | + | let bY = $Tuple13(nil, nil, nil, bV._4, bV._5, bV._6, 0, dK, bN, dO, l, false, bV._13) | |
888 | + | func cd (ca,cb) = if ((cb >= bX)) | |
889 | + | then ca | |
890 | + | else ch(ca, bW[cb]) | |
888 | 891 | ||
889 | - | func | |
890 | - | then | |
892 | + | func ce (ca,cb) = if ((cb >= bX)) | |
893 | + | then ca | |
891 | 894 | else throw("List size exceeds 6") | |
892 | 895 | ||
893 | - | | |
896 | + | ce(cd(cd(cd(cd(cd(cd(bY, 0), 1), 2), 3), 4), 5), 6) | |
894 | 897 | } | |
895 | - | let | |
898 | + | let aS = if ((size(dH) != 0)) | |
896 | 899 | then { | |
897 | - | let | |
898 | - | let | |
899 | - | let | |
900 | - | func | |
901 | - | then | |
902 | - | else | |
900 | + | let bW = dH | |
901 | + | let bX = size(bW) | |
902 | + | let bY = $Tuple13(nil, nil, nil, bl._4, bl._5, bl._6, 0, dL, bO, dP, m, true, bl._13) | |
903 | + | func cf (ca,cb) = if ((cb >= bX)) | |
904 | + | then ca | |
905 | + | else ch(ca, bW[cb]) | |
903 | 906 | ||
904 | - | func | |
905 | - | then | |
907 | + | func cg (ca,cb) = if ((cb >= bX)) | |
908 | + | then ca | |
906 | 909 | else throw("List size exceeds 50") | |
907 | 910 | ||
908 | - | | |
911 | + | cg(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(bY, 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) | |
909 | 912 | } | |
910 | - | else $Tuple13( | |
911 | - | let | |
912 | - | let | |
913 | + | else $Tuple13(bO, dP, dL, bl._4, bl._5, bl._6, 0, dL, bO, dP, m, true, bl._13) | |
914 | + | let dQ = aS._4 | |
915 | + | let dR = if ((0 > (dI - dQ))) | |
913 | 916 | then 0 | |
914 | - | else ( | |
915 | - | let | |
916 | - | let | |
917 | - | let | |
918 | - | let | |
919 | - | let | |
920 | - | let | |
921 | - | let | |
922 | - | let | |
923 | - | let | |
924 | - | let | |
917 | + | else (dI - dQ) | |
918 | + | let dt = makeString_2C([bJ[u], makeString(bV._1, "_"), makeString(bl._1, "_"), makeString(aS._1, "_"), toString(dR)], ":") | |
919 | + | let dS = makeString_2C([makeString(bV._2, "_"), makeString(bl._2, "_"), makeString(aS._2, "_")], ":") | |
920 | + | let dT = makeString_2C([cC[B], makeString(bV._3, "_"), makeString(bl._3, "_"), makeString(aS._3, "_")], ":") | |
921 | + | let du = au(invoke(at, "saveWarehouse", [dt, R], nil)) | |
922 | + | let dU = au(invoke(at, "updateBackpack", [N, dT], nil)) | |
923 | + | let dV = ax(invoke(at, "updateDuckStats", [N, fraction(d, aS._13, ae)], nil)) | |
924 | + | let dW = ax(invoke(at, "updateAccStats", [dD, fraction(d, aS._13, ae)], nil)) | |
925 | + | let dw = [StringEntry(aR, dS)] | |
926 | + | let dX = aS._5 | |
927 | + | let dY = if ((dX > 0)) | |
925 | 928 | then { | |
926 | - | let | |
927 | - | let | |
928 | - | let | |
929 | - | if (isDefined( | |
930 | - | then ((( | |
931 | - | else (( | |
929 | + | let dZ = fraction(aS._5, aJ, ad) | |
930 | + | let ea = I(dz) | |
931 | + | let eb = getString(at, ea) | |
932 | + | if (isDefined(eb)) | |
933 | + | then (((dw :+ ScriptTransfer(dy, (aS._5 - (3 * dZ)), Z)) :+ ScriptTransfer(as, dZ, Z)) :+ ScriptTransfer(addressFromStringValue(value(eb)), dZ, Z)) | |
934 | + | else ((dw :+ ScriptTransfer(dy, (aS._5 - (3 * dZ)), Z)) :+ ScriptTransfer(as, dZ, Z)) | |
932 | 935 | } | |
933 | - | else | |
934 | - | let | |
935 | - | let | |
936 | - | then if ((size( | |
936 | + | else dw | |
937 | + | let ec = aS._6 | |
938 | + | let ed = if ((ec > 0)) | |
939 | + | then if ((size(cu.payments) != 1)) | |
937 | 940 | then throw("exactly 1 payment must be attached") | |
938 | 941 | else { | |
939 | - | let | |
940 | - | let | |
941 | - | let | |
942 | - | if (( | |
942 | + | let cL = cu.payments[0] | |
943 | + | let cM = cL.amount | |
944 | + | let cN = valueOrErrorMessage(cL.assetId, "WAVES can't be used as payment") | |
945 | + | if ((cN != Z)) | |
943 | 946 | then throw("USDT payments only!") | |
944 | - | else if (( | |
945 | - | then throw(("Payment needed is " + toString( | |
946 | - | else if ((ag > | |
947 | + | else if ((cM != ec)) | |
948 | + | then throw(("Payment needed is " + toString(ec))) | |
949 | + | else if ((ag > cM)) | |
947 | 950 | then throw(("Payment should be at least " + toString(ag))) | |
948 | 951 | else { | |
949 | - | let | |
950 | - | let | |
951 | - | let | |
952 | - | if (isDefined( | |
953 | - | then ((( | |
954 | - | else (( | |
952 | + | let ee = fraction(aS._6, aJ, ad) | |
953 | + | let ea = I(dD) | |
954 | + | let eb = getString(at, ea) | |
955 | + | if (isDefined(eb)) | |
956 | + | then (((dY :+ ScriptTransfer(addressFromStringValue(dD), (aS._6 - (3 * ee)), Z)) :+ ScriptTransfer(as, ee, Z)) :+ ScriptTransfer(addressFromStringValue(value(eb)), ee, Z)) | |
957 | + | else ((dY :+ ScriptTransfer(addressFromStringValue(dD), (aS._6 - (3 * ee)), Z)) :+ ScriptTransfer(as, ee, Z)) | |
955 | 958 | } | |
956 | 959 | } | |
957 | - | else if ((size( | |
960 | + | else if ((size(cu.payments) != 0)) | |
958 | 961 | then throw("No payments needed") | |
959 | - | else | |
960 | - | $Tuple2( | |
962 | + | else dY | |
963 | + | $Tuple2(ed, $Tuple5(cA, du, dU, dV, dW)) | |
961 | 964 | } | |
962 | 965 | } | |
963 | 966 | } | |
967 | 970 | ||
968 | 971 | ||
969 | 972 | ||
970 | - | @Callable( | |
971 | - | func sellProductsToES ( | |
972 | - | let | |
973 | - | if ((size( | |
973 | + | @Callable(cu) | |
974 | + | func sellProductsToES (cy) = { | |
975 | + | let cA = br() | |
976 | + | if ((size(cu.payments) != 0)) | |
974 | 977 | then throw("No payments needed") | |
975 | 978 | else { | |
976 | - | let N = valueOrErrorMessage(getString(at, K(toString( | |
977 | - | let | |
978 | - | if (( | |
979 | - | then throw(("Duck location type should be Airport, but is " + | |
979 | + | let N = valueOrErrorMessage(getString(at, K(toString(cu.caller))), "You don't have a duck staked") | |
980 | + | let cB = split(valueOrElse(getString(at, O(N)), g), "_") | |
981 | + | if ((cB[U] != "A")) | |
982 | + | then throw(("Duck location type should be Airport, but is " + cB[U])) | |
980 | 983 | else { | |
981 | - | let | |
982 | - | let | |
984 | + | let cC = bo(M(N)) | |
985 | + | let cX = if ((cC[E] == "")) | |
983 | 986 | then nil | |
984 | - | else split( | |
985 | - | let | |
986 | - | let | |
987 | - | let | |
988 | - | then split(value( | |
987 | + | else split(cC[E], "_") | |
988 | + | let ef = S() | |
989 | + | let eg = getString(ef) | |
990 | + | let eh = if (isDefined(eg)) | |
991 | + | then split(value(eg), "_") | |
989 | 992 | else nil | |
990 | - | func | |
991 | - | let | |
992 | - | let | |
993 | - | then | |
993 | + | func ei (bt,ej) = { | |
994 | + | let bv = bt._1 | |
995 | + | let cU = if ((size(cy) > bv)) | |
996 | + | then cy[bv] | |
994 | 997 | else 0 | |
995 | - | if ((0 > | |
998 | + | if ((0 > cU)) | |
996 | 999 | then throw("Quantity cannot be negative") | |
997 | 1000 | else { | |
998 | - | let X = split( | |
1001 | + | let X = split(ej, "_") | |
999 | 1002 | if ((size(X) != s)) | |
1000 | - | then throw(("Fatal: unknown recipe: " + | |
1003 | + | then throw(("Fatal: unknown recipe: " + ej)) | |
1001 | 1004 | else { | |
1002 | - | let | |
1003 | - | let | |
1004 | - | then parseIntValue( | |
1005 | + | let ek = (i * t) | |
1006 | + | let el = if ((size(eh) > bv)) | |
1007 | + | then parseIntValue(eh[bv]) | |
1005 | 1008 | else 0 | |
1006 | - | let | |
1007 | - | if (( | |
1008 | - | then throw(((("Warehouse can buy only " + toString( | |
1009 | + | let em = (ek - el) | |
1010 | + | if ((cU > em)) | |
1011 | + | then throw(((("Warehouse can buy only " + toString(em)) + " of ") + m[bv])) | |
1009 | 1012 | else { | |
1010 | - | let | |
1011 | - | let | |
1012 | - | let | |
1013 | - | then parseIntValue( | |
1013 | + | let en = W(X) | |
1014 | + | let eo = fraction((en * j), h, (ae * t)) | |
1015 | + | let ep = if ((size(cX) > bv)) | |
1016 | + | then parseIntValue(cX[bv]) | |
1014 | 1017 | else 0 | |
1015 | - | if (( | |
1016 | - | then throw(((("You have only " + toString( | |
1017 | - | else $Tuple5(( | |
1018 | + | if ((cU > ep)) | |
1019 | + | then throw(((("You have only " + toString(ep)) + " of ") + m[bv])) | |
1020 | + | else $Tuple5((bv + 1), (bt._2 + (eo * cU)), (bt._3 :+ toString((ep - cU))), (bt._4 :+ toString((el + cU))), (bt._5 + (en * cU))) | |
1018 | 1021 | } | |
1019 | 1022 | } | |
1020 | 1023 | } | |
1021 | 1024 | } | |
1022 | 1025 | ||
1023 | - | let | |
1024 | - | let | |
1025 | - | let | |
1026 | - | let | |
1027 | - | func | |
1028 | - | then | |
1029 | - | else | |
1026 | + | let cG = { | |
1027 | + | let bW = p | |
1028 | + | let bX = size(bW) | |
1029 | + | let bY = $Tuple5(0, 0, nil, nil, 0) | |
1030 | + | func bZ (ca,cb) = if ((cb >= bX)) | |
1031 | + | then ca | |
1032 | + | else ei(ca, bW[cb]) | |
1030 | 1033 | ||
1031 | - | func | |
1032 | - | then | |
1034 | + | func cc (ca,cb) = if ((cb >= bX)) | |
1035 | + | then ca | |
1033 | 1036 | else throw("List size exceeds 50") | |
1034 | 1037 | ||
1035 | - | bZ( | |
1038 | + | cc(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bY, 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) | |
1036 | 1039 | } | |
1037 | - | let | |
1038 | - | let | |
1039 | - | let | |
1040 | - | $Tuple2([StringEntry( | |
1040 | + | let dT = makeString_2C([cC[B], cC[C], cC[D], makeString(cG._3, "_")], ":") | |
1041 | + | let dU = au(invoke(at, "updateBackpack", [N, dT], nil)) | |
1042 | + | let cJ = ax(invoke(at, "updateDuckStats", [N, fraction(c, cG._5, (ae * 10))], nil)) | |
1043 | + | $Tuple2([StringEntry(ef, makeString(cG._4, "_")), ScriptTransfer(cu.caller, cG._2, Z)], $Tuple3(dU, cA, cJ)) | |
1041 | 1044 | } | |
1042 | 1045 | } | |
1043 | 1046 | } | |
1044 | 1047 | ||
1045 | 1048 | ||
1046 | 1049 | ||
1047 | - | @Callable( | |
1048 | - | func updateEsStorage ( | |
1050 | + | @Callable(cu) | |
1051 | + | func updateEsStorage (eq) = if ((cu.caller != at)) | |
1049 | 1052 | then throw("Permission denied") | |
1050 | - | else $Tuple2([StringEntry(S(), | |
1053 | + | else $Tuple2([StringEntry(S(), eq)], eq) | |
1051 | 1054 | ||
1052 | 1055 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 10000 | |
5 | 5 | ||
6 | 6 | let b = 10000 | |
7 | 7 | ||
8 | 8 | let c = 10000 | |
9 | 9 | ||
10 | 10 | let d = 10000 | |
11 | 11 | ||
12 | 12 | let e = "LAND" | |
13 | 13 | ||
14 | 14 | let f = 6 | |
15 | 15 | ||
16 | 16 | let g = "Africa_F_Africa" | |
17 | 17 | ||
18 | 18 | let h = 39637 | |
19 | 19 | ||
20 | 20 | let i = 3 | |
21 | 21 | ||
22 | 22 | let j = 4 | |
23 | 23 | ||
24 | 24 | let k = ["Oil", "Ore", "Wood", "Sand", "Clay", "Organic"] | |
25 | 25 | ||
26 | 26 | let l = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"] | |
27 | 27 | ||
28 | 28 | let m = ["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 n = ["Americas", "Europe", "Asia", "Africa", "Oceania"] | |
31 | 31 | ||
32 | 32 | let o = 10000000 | |
33 | 33 | ||
34 | 34 | let p = ["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 q = 6 | |
37 | 37 | ||
38 | 38 | let r = 7 | |
39 | 39 | ||
40 | 40 | let s = 11 | |
41 | 41 | ||
42 | 42 | let t = 10 | |
43 | 43 | ||
44 | 44 | let u = 0 | |
45 | 45 | ||
46 | 46 | let v = 1 | |
47 | 47 | ||
48 | 48 | let w = 2 | |
49 | 49 | ||
50 | 50 | let x = 3 | |
51 | 51 | ||
52 | 52 | let y = 4 | |
53 | 53 | ||
54 | 54 | let z = 0 | |
55 | 55 | ||
56 | 56 | let A = 3 | |
57 | 57 | ||
58 | 58 | let B = 0 | |
59 | 59 | ||
60 | 60 | let C = 1 | |
61 | 61 | ||
62 | 62 | let D = 2 | |
63 | 63 | ||
64 | 64 | let E = 3 | |
65 | 65 | ||
66 | 66 | func F (G) = ("nftOwner_" + G) | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func H (G) = ("stakedTime_" + G) | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func I (J) = ("accRefBy_" + J) | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func K (L) = ("stakedDuckByOwner_" + L) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func M (N) = ("backPack_" + N) | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func O (N) = ("duckLocation_" + N) | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func P () = "contractsBlocked" | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func Q (R) = ("landOrder_" + R) | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func S () = "emergencyWarehouseProducts" | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | let T = 0 | |
94 | 94 | ||
95 | 95 | let U = 1 | |
96 | 96 | ||
97 | 97 | let V = 2 | |
98 | 98 | ||
99 | 99 | func W (X) = (parseIntValue(X[q]) * o) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | let Y = take(drop(this.bytes, 1), 1) | |
103 | 103 | ||
104 | 104 | let Z = { | |
105 | 105 | let aa = Y | |
106 | 106 | if ((base58'2W' == aa)) | |
107 | 107 | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
108 | 108 | else if ((base58'2T' == aa)) | |
109 | 109 | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
110 | 110 | else throw("Unknown chain") | |
111 | 111 | } | |
112 | 112 | ||
113 | 113 | let ab = { | |
114 | 114 | let aa = Y | |
115 | 115 | if ((base58'2W' == aa)) | |
116 | 116 | then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv" | |
117 | 117 | else if ((base58'2T' == aa)) | |
118 | 118 | then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy" | |
119 | 119 | else throw("Unknown chain") | |
120 | 120 | } | |
121 | 121 | ||
122 | 122 | let ac = "__" | |
123 | 123 | ||
124 | 124 | let ad = 1000000 | |
125 | 125 | ||
126 | 126 | let ae = 100000000 | |
127 | 127 | ||
128 | 128 | let af = 10000000000 | |
129 | 129 | ||
130 | 130 | let ag = 100000 | |
131 | 131 | ||
132 | 132 | func ah (ai,aj) = valueOrErrorMessage(getString(ai, aj), makeString(["mandatory ", toString(ai), ".", aj, " is not defined"], "")) | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | let ak = 1 | |
136 | 136 | ||
137 | 137 | func al () = "%s__restConfig" | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | func am () = "%s__restAddr" | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | func an (ao) = split_4C(ah(ao, al()), ac) | |
144 | 144 | ||
145 | 145 | ||
146 | 146 | func ap (aq,ar) = valueOrErrorMessage(addressFromString(aq[ar]), ("Rest cfg doesn't contain address at index " + toString(ar))) | |
147 | 147 | ||
148 | 148 | ||
149 | 149 | let as = addressFromStringValue(valueOrElse(getString(this, am()), ab)) | |
150 | 150 | ||
151 | 151 | let aq = an(as) | |
152 | 152 | ||
153 | 153 | let at = ap(aq, ak) | |
154 | 154 | ||
155 | 155 | func au (av) = { | |
156 | 156 | let aa = av | |
157 | 157 | if ($isInstanceOf(aa, "String")) | |
158 | 158 | then { | |
159 | 159 | let aw = aa | |
160 | 160 | aw | |
161 | 161 | } | |
162 | 162 | else throw("fail to cast into String") | |
163 | 163 | } | |
164 | 164 | ||
165 | 165 | ||
166 | 166 | func ax (av) = { | |
167 | 167 | let aa = av | |
168 | 168 | if ($isInstanceOf(aa, "Int")) | |
169 | 169 | then { | |
170 | 170 | let ay = aa | |
171 | 171 | ay | |
172 | 172 | } | |
173 | 173 | else throw("fail to cast into Int") | |
174 | 174 | } | |
175 | 175 | ||
176 | 176 | ||
177 | 177 | func az (aA,aB) = { | |
178 | 178 | let aC = pow(10, 0, aB, 0, 0, DOWN) | |
179 | - | ((toString((aA / aC)) + ".") + toString((aA % aC))) | |
179 | + | let aD = toString((aA % aC)) | |
180 | + | let aE = size(aD) | |
181 | + | let aF = take(toString(aC), aE) | |
182 | + | (((toString((aA / aC)) + ".") + aF) + aD) | |
180 | 183 | } | |
181 | 184 | ||
182 | 185 | ||
183 | - | let | |
186 | + | let aG = 10000000000 | |
184 | 187 | ||
185 | - | let | |
188 | + | let aH = 200 | |
186 | 189 | ||
187 | - | let | |
190 | + | let aI = 300 | |
188 | 191 | ||
189 | - | let | |
192 | + | let aJ = 10000 | |
190 | 193 | ||
191 | - | func | |
194 | + | func aK (aL,aM) = ((("factoryWhByContinentAndRes_" + aL) + "_") + toString(aM)) | |
192 | 195 | ||
193 | 196 | ||
194 | - | let | |
197 | + | let aN = 0 | |
195 | 198 | ||
196 | - | let | |
199 | + | let aO = 1 | |
197 | 200 | ||
198 | - | let | |
201 | + | let aP = 2 | |
199 | 202 | ||
200 | - | func | |
201 | - | let | |
202 | - | [if ((size(split( | |
203 | - | then | |
204 | - | else "0@0_0@0_0@0_0@0_0@0_0@0", if ((size(split( | |
205 | - | then | |
206 | - | else "0@0_0@0_0@0_0@0_0@0_0@0", aP | |
203 | + | func aQ (aR) = { | |
204 | + | let aS = split(valueOrElse(getString(aR), "0@0_0@0_0@0_0@0_0@0_0@0:0@0_0@0_0@0_0@0_0@0_0@0:"), ":") | |
205 | + | [if ((size(split(aS[aN], "_")) == f)) | |
206 | + | then aS[aN] | |
207 | + | else "0@0_0@0_0@0_0@0_0@0_0@0", if ((size(split(aS[aO], "_")) == f)) | |
208 | + | then aS[aO] | |
209 | + | else "0@0_0@0_0@0_0@0_0@0_0@0", aS[aP]] | |
207 | 210 | } | |
208 | 211 | ||
209 | 212 | ||
210 | - | func | |
213 | + | func aT (aU,aV,aW) = if (aW) | |
211 | 214 | then { | |
212 | - | let | |
213 | - | then ((( | |
214 | - | else -((((-( | |
215 | - | ( | |
215 | + | let aX = if ((aU >= 0)) | |
216 | + | then (((aU + aV) - 1) / aV) | |
217 | + | else -((((-(aU) + aV) - 1) / aV)) | |
218 | + | (aX * ae) | |
216 | 219 | } | |
217 | - | else | |
220 | + | else aU | |
218 | 221 | ||
219 | 222 | ||
220 | - | func | |
221 | - | let | |
222 | - | let | |
223 | - | let | |
223 | + | func aY (aZ,aM,aU,ba) = { | |
224 | + | let bb = aK(aZ, aM) | |
225 | + | let bc = valueOrElse(getInteger(bb), 0) | |
226 | + | let bd = if ((bc > aG)) | |
224 | 227 | then 0 | |
225 | - | else if ((( | |
226 | - | then ( | |
227 | - | else | |
228 | - | let | |
229 | - | let | |
230 | - | if ((( | |
231 | - | then throw((((((((((("Actual price = " + toString( | |
232 | - | else $Tuple2(IntegerEntry( | |
228 | + | else if (((bc + aU) > aG)) | |
229 | + | then (aG - bc) | |
230 | + | else aU | |
231 | + | let be = (fraction(bd, ((aH * h) - fraction(((100 * bc) + (50 * bd)), h, aG)), af) + fraction((aU - bd), h, ae)) | |
232 | + | let bf = (ba - (ba / 100)) | |
233 | + | if (((bf * aU) > (be * ae))) | |
234 | + | then throw((((((((((("Actual price = " + toString(be)) + " / ") + toString(aU)) + " < minPrice = ") + toString(ba)) + ", (") + aZ) + ", ") + k[aM]) + ")")) | |
235 | + | else $Tuple2(IntegerEntry(bb, (bc + aU)), be) | |
233 | 236 | } | |
234 | 237 | ||
235 | 238 | ||
236 | - | func | |
237 | - | let | |
238 | - | let | |
239 | - | let | |
240 | - | then min([ | |
239 | + | func bg (aZ,bh,aU,bi) = { | |
240 | + | let bb = aK(aZ, bh) | |
241 | + | let bc = valueOrElse(getInteger(bb), 0) | |
242 | + | let bj = if ((bc > aG)) | |
243 | + | then min([aU, (bc - aG)]) | |
241 | 244 | else 0 | |
242 | - | let | |
243 | - | let | |
244 | - | let | |
245 | - | let | |
246 | - | if ((( | |
247 | - | then throw((((((((((("Actual price = " + toString( | |
248 | - | else $Tuple3(IntegerEntry( | |
245 | + | let bk = min([bc, (aU - bj)]) | |
246 | + | let bl = (bk + bj) | |
247 | + | let bm = (fraction(bk, ((aI * h) - fraction(((100 * bc) - (50 * bk)), h, aG)), af) + fraction(bj, (2 * h), ae)) | |
248 | + | let bn = (bi + (bi / 100)) | |
249 | + | if (((bm * ae) > (bn * bl))) | |
250 | + | then throw((((((((((("Actual price = " + toString(bm)) + " / ") + toString(bl)) + " > maxPrice = ") + toString(bi)) + ", (") + aZ) + ", ") + l[bh]) + ")")) | |
251 | + | else $Tuple3(IntegerEntry(bb, (bc - bl)), bm, bl) | |
249 | 252 | } | |
250 | 253 | ||
251 | 254 | ||
252 | - | func | |
253 | - | let | |
254 | - | [toString(valueOrElse(parseInt( | |
255 | - | then | |
256 | - | else "0_0_0_0_0_0", if ((size(split( | |
257 | - | then | |
258 | - | else "0_0_0_0_0_0", | |
255 | + | func bo (bp) = { | |
256 | + | let aS = split(valueOrElse(getString(at, bp), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":") | |
257 | + | [toString(valueOrElse(parseInt(aS[B]), 0)), if ((size(split(aS[C], "_")) == f)) | |
258 | + | then aS[C] | |
259 | + | else "0_0_0_0_0_0", if ((size(split(aS[D], "_")) == f)) | |
260 | + | then aS[D] | |
261 | + | else "0_0_0_0_0_0", aS[E]] | |
259 | 262 | } | |
260 | 263 | ||
261 | 264 | ||
262 | - | func | |
265 | + | func bq () = if (valueOrElse(getBoolean(at, P()), false)) | |
263 | 266 | then throw("Contracts are under maintenance") | |
264 | 267 | else unit | |
265 | 268 | ||
266 | 269 | ||
267 | - | func | |
270 | + | func br () = ax(invoke(at, "saveLastTx", nil, nil)) | |
268 | 271 | ||
269 | 272 | ||
270 | - | func | |
271 | - | let | |
272 | - | let | |
273 | - | let | |
274 | - | if ((size( | |
273 | + | func bs (bt,bu) = { | |
274 | + | let bv = bt._1 | |
275 | + | let bw = bt._8 | |
276 | + | let bx = split(bu, "@") | |
277 | + | if ((size(bx) != 2)) | |
275 | 278 | then throw("Incorrect order format, should be amount@price") | |
276 | 279 | else { | |
277 | - | let | |
278 | - | let | |
279 | - | let | |
280 | - | let | |
281 | - | let | |
282 | - | then parseIntValue( | |
280 | + | let by = parseIntValue(bx[0]) | |
281 | + | let bz = parseIntValue(bx[1]) | |
282 | + | let bA = fraction(by, bz, ae) | |
283 | + | let bB = aT(by, t, bw) | |
284 | + | let bC = if ((size(bt._6) > bv)) | |
285 | + | then parseIntValue(bt._6[bv]) | |
283 | 286 | else 0 | |
284 | - | let | |
285 | - | then | |
287 | + | let bD = split(if ((size(bt._7) > bv)) | |
288 | + | then bt._7[bv] | |
286 | 289 | else "0@0", "@") | |
287 | - | let | |
288 | - | let | |
289 | - | if (if ((0 > | |
290 | + | let bE = parseIntValue(bD[0]) | |
291 | + | let bF = parseIntValue(bD[1]) | |
292 | + | if (if ((0 > bF)) | |
290 | 293 | then true | |
291 | - | else (0 > | |
294 | + | else (0 > bz)) | |
292 | 295 | then throw("Price can't be negative") | |
293 | 296 | else { | |
294 | - | let | |
295 | - | if (( | |
296 | - | then if (( | |
297 | - | then $Tuple9(( | |
298 | - | else $Tuple9(( | |
299 | - | else if (( | |
300 | - | then if ((0 > | |
301 | - | then $Tuple9(( | |
302 | - | else $Tuple9(( | |
303 | - | else if ((0 > | |
297 | + | let bG = fraction(bE, bF, ae) | |
298 | + | if ((by == 0)) | |
299 | + | then if ((bE > 0)) | |
300 | + | then $Tuple9((bv + 1), (bt._2 :+ toString(bC)), bt._3, bt._4, (bt._5 - bG), bt._6, bt._7, bw, (bt._9 + aT(bC, t, bw))) | |
301 | + | else $Tuple9((bv + 1), (bt._2 :+ toString((bC - bE))), bt._3, bt._4, bt._5, bt._6, bt._7, bw, (bt._9 + aT((bC - bE), t, bw))) | |
302 | + | else if ((by > 0)) | |
303 | + | then if ((0 > bE)) | |
304 | + | then $Tuple9((bv + 1), (bt._2 :+ toString((bC - bE))), (bt._3 + bB), bt._4, (bt._5 + bA), bt._6, bt._7, bw, aT((bC - bE), t, bw)) | |
305 | + | else $Tuple9((bv + 1), (bt._2 :+ toString(bC)), (bt._3 + bB), bt._4, ((bt._5 + bA) - bG), bt._6, bt._7, bw, aT(bC, t, bw)) | |
306 | + | else if ((0 > bE)) | |
304 | 307 | then { | |
305 | - | let | |
306 | - | if ((0 > ( | |
307 | - | then throw((((("Attempt to take " + toString( | |
308 | - | else $Tuple9(( | |
308 | + | let bH = (bE - by) | |
309 | + | if ((0 > (bC - bH))) | |
310 | + | then throw((((("Attempt to take " + toString(bH)) + " from warehouse, but only ") + toString(bC)) + " available")) | |
311 | + | else $Tuple9((bv + 1), (bt._2 :+ toString((bC - bH))), bt._3, (bt._4 - bB), bt._5, bt._6, bt._7, bw, aT((bC - bH), t, bw)) | |
309 | 312 | } | |
310 | - | else if ((0 > ( | |
311 | - | then throw((((("Attempt to take " + toString(-( | |
312 | - | else $Tuple9(( | |
313 | + | else if ((0 > (bC + by))) | |
314 | + | then throw((((("Attempt to take " + toString(-(by))) + " from warehouse, but only ") + toString(bC)) + " available")) | |
315 | + | else $Tuple9((bv + 1), (bt._2 :+ toString((bC + by))), bt._3, (bt._4 - bB), (bt._5 - bG), bt._6, bt._7, bw, aT((bC + by), t, bw)) | |
313 | 316 | } | |
314 | 317 | } | |
315 | 318 | } | |
316 | 319 | ||
317 | 320 | ||
318 | - | func | |
319 | - | let | |
320 | - | let | |
321 | - | let | |
321 | + | func bI (bJ,bK,bL) = { | |
322 | + | let bM = split(bJ[v], "_") | |
323 | + | let bN = split(bJ[w], "_") | |
324 | + | let bO = if ((bJ[x] == "")) | |
322 | 325 | then nil | |
323 | - | else split( | |
324 | - | let | |
325 | - | let | |
326 | - | let | |
326 | + | else split(bJ[x], "_") | |
327 | + | let bP = split(bK[aN], "_") | |
328 | + | let bQ = split(bK[aO], "_") | |
329 | + | let bR = if ((bK[aP] == "")) | |
327 | 330 | then nil | |
328 | - | else split( | |
329 | - | if ((size( | |
331 | + | else split(bK[aP], "_") | |
332 | + | if ((size(bL) != 3)) | |
330 | 333 | then throw("newOrderStr should contain exactly 2 ':' separators") | |
331 | 334 | else { | |
332 | - | let | |
333 | - | let | |
334 | - | let | |
335 | + | let bS = split(bL[0], "_") | |
336 | + | let bT = split(bL[1], "_") | |
337 | + | let bU = if ((bL[2] == "")) | |
335 | 338 | then nil | |
336 | - | else split( | |
337 | - | if ((size( | |
339 | + | else split(bL[2], "_") | |
340 | + | if ((size(bS) != f)) | |
338 | 341 | then throw("All 6 resources should be passed") | |
339 | - | else if ((size( | |
342 | + | else if ((size(bT) != f)) | |
340 | 343 | then throw("All 6 materials should be passed") | |
341 | 344 | else { | |
342 | - | let | |
343 | - | let | |
344 | - | let | |
345 | - | let | |
346 | - | func | |
347 | - | then | |
348 | - | else | |
345 | + | let bV = { | |
346 | + | let bW = bS | |
347 | + | let bX = size(bW) | |
348 | + | let bY = $Tuple9(0, nil, 0, 0, 0, bM, bP, false, 0) | |
349 | + | func bZ (ca,cb) = if ((cb >= bX)) | |
350 | + | then ca | |
351 | + | else bs(ca, bW[cb]) | |
349 | 352 | ||
350 | - | func | |
351 | - | then | |
353 | + | func cc (ca,cb) = if ((cb >= bX)) | |
354 | + | then ca | |
352 | 355 | else throw("List size exceeds 6") | |
353 | 356 | ||
354 | - | bZ( | |
357 | + | cc(bZ(bZ(bZ(bZ(bZ(bZ(bY, 0), 1), 2), 3), 4), 5), 6) | |
355 | 358 | } | |
356 | - | let | |
357 | - | let | |
358 | - | let | |
359 | - | let | |
360 | - | func | |
361 | - | then | |
362 | - | else | |
359 | + | let bl = { | |
360 | + | let bW = bT | |
361 | + | let bX = size(bW) | |
362 | + | let bY = $Tuple9(0, nil, bV._3, bV._4, bV._5, bN, bQ, false, bV._9) | |
363 | + | func cd (ca,cb) = if ((cb >= bX)) | |
364 | + | then ca | |
365 | + | else bs(ca, bW[cb]) | |
363 | 366 | ||
364 | - | func | |
365 | - | then | |
367 | + | func ce (ca,cb) = if ((cb >= bX)) | |
368 | + | then ca | |
366 | 369 | else throw("List size exceeds 6") | |
367 | 370 | ||
368 | - | | |
371 | + | ce(cd(cd(cd(cd(cd(cd(bY, 0), 1), 2), 3), 4), 5), 6) | |
369 | 372 | } | |
370 | - | let | |
373 | + | let aS = if ((size(bU) != 0)) | |
371 | 374 | then { | |
372 | - | let | |
373 | - | let | |
374 | - | let | |
375 | - | func | |
376 | - | then | |
377 | - | else | |
375 | + | let bW = bU | |
376 | + | let bX = size(bW) | |
377 | + | let bY = $Tuple9(0, nil, bl._3, bl._4, bl._5, bO, bR, true, bl._9) | |
378 | + | func cf (ca,cb) = if ((cb >= bX)) | |
379 | + | then ca | |
380 | + | else bs(ca, bW[cb]) | |
378 | 381 | ||
379 | - | func | |
380 | - | then | |
382 | + | func cg (ca,cb) = if ((cb >= bX)) | |
383 | + | then ca | |
381 | 384 | else throw("List size exceeds 50") | |
382 | 385 | ||
383 | - | | |
386 | + | cg(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(bY, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50) | |
384 | 387 | } | |
385 | - | else $Tuple9(0, | |
386 | - | $Tuple7( | |
388 | + | else $Tuple9(0, bO, bl._3, bl._4, bl._5, bO, bR, true, bl._9) | |
389 | + | $Tuple7(bV._2, bl._2, aS._2, aS._3, aS._4, aS._5, aS._9) | |
387 | 390 | } | |
388 | 391 | } | |
389 | 392 | } | |
390 | 393 | ||
391 | 394 | ||
392 | - | func | |
393 | - | let | |
394 | - | let | |
395 | - | let | |
396 | - | if ((size( | |
395 | + | func ch (bt,ci) = { | |
396 | + | let bv = bt._7 | |
397 | + | let bw = bt._12 | |
398 | + | let cj = split(ci, "@") | |
399 | + | if ((size(cj) != 2)) | |
397 | 400 | then throw("Incorrect order format, should be amount@price") | |
398 | 401 | else { | |
399 | - | let | |
400 | - | let | |
401 | - | if ((0 > | |
402 | + | let ck = parseIntValue(cj[0]) | |
403 | + | let cl = parseIntValue(cj[1]) | |
404 | + | if ((0 > cl)) | |
402 | 405 | then throw("Price can't be negative") | |
403 | 406 | else { | |
404 | - | let | |
405 | - | let | |
406 | - | then parseIntValue( | |
407 | + | let cm = fraction(ck, cl, ae) | |
408 | + | let cn = if ((size(bt._8) > bv)) | |
409 | + | then parseIntValue(bt._8[bv]) | |
407 | 410 | else 0 | |
408 | - | let | |
409 | - | then parseIntValue( | |
411 | + | let bC = if ((size(bt._9) > bv)) | |
412 | + | then parseIntValue(bt._9[bv]) | |
410 | 413 | else 0 | |
411 | - | let | |
412 | - | then | |
414 | + | let co = if ((size(bt._10) > bv)) | |
415 | + | then bt._10[bv] | |
413 | 416 | else "0@0" | |
414 | - | let | |
415 | - | let | |
416 | - | let | |
417 | - | if (if (( | |
418 | - | then ( | |
417 | + | let cp = split(co, "@") | |
418 | + | let cq = parseIntValue(cp[0]) | |
419 | + | let cr = parseIntValue(cp[1]) | |
420 | + | if (if ((ck != 0)) | |
421 | + | then (cl != cr) | |
419 | 422 | else false) | |
420 | - | then throw(((((("Prices of " + | |
423 | + | then throw(((((("Prices of " + bt._11[bv]) + " don't match! WH price=") + toString(cr)) + ", your price=") + toString(cl))) | |
421 | 424 | else { | |
422 | - | let | |
423 | - | let | |
424 | - | if (( | |
425 | - | then $Tuple13(( | |
426 | - | else if (( | |
427 | - | then if ((0 > | |
428 | - | then if (( | |
429 | - | then throw(((((("Attempt to buy " + toString( | |
430 | - | else $Tuple13(( | |
431 | - | then ( | |
432 | - | else | |
433 | - | else throw((("Attempt to buy " + | |
434 | - | else if (( | |
435 | - | then if ((-( | |
436 | - | then throw(((((("Attempt to sell " + toString(-( | |
437 | - | else if ((-( | |
438 | - | then throw(((((("Attempt to sell " + toString(-( | |
439 | - | else $Tuple13(( | |
440 | - | then ( | |
441 | - | else | |
442 | - | else throw((("Attempt to sell " + | |
425 | + | let cs = fraction(cq, cr, ae) | |
426 | + | let ct = aT(ck, t, bw) | |
427 | + | if ((ck == 0)) | |
428 | + | then $Tuple13((bt._1 :+ toString(bC)), (bt._2 :+ co), (bt._3 :+ toString(cn)), bt._4, bt._5, bt._6, (bt._7 + 1), bt._8, bt._9, bt._10, bt._11, bw, bt._13) | |
429 | + | else if ((ck > 0)) | |
430 | + | then if ((0 > cq)) | |
431 | + | then if ((ck > -(cq))) | |
432 | + | then throw(((((("Attempt to buy " + toString(ck)) + " of ") + bt._11[bv]) + ", but warehouse only sells ") + toString(-(cq)))) | |
433 | + | else $Tuple13((bt._1 :+ toString(bC)), (bt._2 :+ ((toString((cq + ck)) + "@") + toString(cr))), (bt._3 :+ toString((cn + ck))), (bt._4 + ct), bt._5, (bt._6 + cm), (bt._7 + 1), bt._8, bt._9, bt._10, bt._11, bw, (bt._13 + (if (bw) | |
434 | + | then (ck * ae) | |
435 | + | else ck))) | |
436 | + | else throw((("Attempt to buy " + bt._11[bv]) + " while warehouse doesn't sell it")) | |
437 | + | else if ((cq > 0)) | |
438 | + | then if ((-(ck) > cq)) | |
439 | + | then throw(((((("Attempt to sell " + toString(-(ck))) + " of ") + bt._11[bv]) + ", but warehouse only buys ") + toString(cq))) | |
440 | + | else if ((-(ck) > cn)) | |
441 | + | then throw(((((("Attempt to sell " + toString(-(ck))) + ", but you only have ") + toString(cn)) + " of ") + bt._11[bv])) | |
442 | + | else $Tuple13((bt._1 :+ toString((bC - ck))), (bt._2 :+ ((toString((cq + ck)) + "@") + toString(cr))), (bt._3 :+ toString((cn + ck))), (bt._4 - ct), (bt._5 - cm), bt._6, (bt._7 + 1), bt._8, bt._9, bt._10, bt._11, bw, (bt._13 - (if (bw) | |
443 | + | then (ck * ae) | |
444 | + | else ck))) | |
445 | + | else throw((("Attempt to sell " + bt._11[bv]) + " while warehouse doesn't buy it")) | |
443 | 446 | } | |
444 | 447 | } | |
445 | 448 | } | |
446 | 449 | } | |
447 | 450 | ||
448 | 451 | ||
449 | - | @Callable( | |
450 | - | func recalcLockedVolumeREADONLY (R, | |
451 | - | let | |
452 | - | let | |
453 | - | $Tuple2(nil, ( | |
452 | + | @Callable(cu) | |
453 | + | func recalcLockedVolumeREADONLY (R,cv) = { | |
454 | + | let bK = aQ(Q(R)) | |
455 | + | let cw = bI(cv, bK, bK) | |
456 | + | $Tuple2(nil, (cw._4 + cw._5)) | |
454 | 457 | } | |
455 | 458 | ||
456 | 459 | ||
457 | 460 | ||
458 | - | @Callable( | |
459 | - | func constructorV1 ( | |
461 | + | @Callable(cu) | |
462 | + | func constructorV1 (cx) = if ((cu.caller != this)) | |
460 | 463 | then throw("Permission denied") | |
461 | - | else [StringEntry(am(), | |
464 | + | else [StringEntry(am(), cx)] | |
462 | 465 | ||
463 | 466 | ||
464 | 467 | ||
465 | - | @Callable( | |
466 | - | func sellResources ( | |
467 | - | let | |
468 | - | let N = valueOrErrorMessage(getString(at, K(toString( | |
469 | - | if ((size( | |
468 | + | @Callable(cu) | |
469 | + | func sellResources (cy,cz) = { | |
470 | + | let cA = br() | |
471 | + | let N = valueOrErrorMessage(getString(at, K(toString(cu.caller))), "You don't have a duck staked") | |
472 | + | if ((size(cu.payments) != 0)) | |
470 | 473 | then throw("sellResources doesn't require any payments") | |
471 | 474 | else { | |
472 | - | let | |
473 | - | if (( | |
474 | - | then throw(("Duck location type should be Factory, but is " + | |
475 | + | let cB = split(valueOrElse(getString(at, O(N)), g), "_") | |
476 | + | if ((cB[U] != "F")) | |
477 | + | then throw(("Duck location type should be Factory, but is " + cB[U])) | |
475 | 478 | else { | |
476 | - | let | |
477 | - | let | |
478 | - | let | |
479 | - | func | |
480 | - | then throw(((((("You have " + | |
481 | - | else if ((0 > | |
482 | - | then throw(((("You tried to sell negative amount of " + k[ | |
483 | - | else if (( | |
479 | + | let aZ = cB[V] | |
480 | + | let cC = bo(M(N)) | |
481 | + | let cD = split(cC[C], "_") | |
482 | + | func cE (bt,bv) = if ((cy[bv] > parseIntValue(cD[bv]))) | |
483 | + | then throw(((((("You have " + cD[bv]) + " of ") + k[bv]) + ", but tried to sell ") + toString(cy[bv]))) | |
484 | + | else if ((0 > cy[bv])) | |
485 | + | then throw(((("You tried to sell negative amount of " + k[bv]) + ": ") + toString(cy[bv]))) | |
486 | + | else if ((cy[bv] > 0)) | |
484 | 487 | then { | |
485 | - | let | |
486 | - | $Tuple4(( | |
488 | + | let cF = aY(aZ, bv, cy[bv], cz[bv]) | |
489 | + | $Tuple4((bt._1 :+ cF._1), (bt._2 :+ toString((parseIntValue(cD[bv]) - cy[bv]))), (bt._3 + cF._2), (bt._4 + cy[bv])) | |
487 | 490 | } | |
488 | - | else $Tuple4( | |
491 | + | else $Tuple4(bt._1, (bt._2 :+ cD[bv]), bt._3, bt._4) | |
489 | 492 | ||
490 | - | let | |
491 | - | let | |
492 | - | let | |
493 | - | let | |
494 | - | func | |
495 | - | then | |
496 | - | else | |
493 | + | let cG = { | |
494 | + | let bW = [0, 1, 2, 3, 4, 5] | |
495 | + | let bX = size(bW) | |
496 | + | let bY = $Tuple4(nil, nil, 0, 0) | |
497 | + | func bZ (ca,cb) = if ((cb >= bX)) | |
498 | + | then ca | |
499 | + | else cE(ca, bW[cb]) | |
497 | 500 | ||
498 | - | func | |
499 | - | then | |
501 | + | func cc (ca,cb) = if ((cb >= bX)) | |
502 | + | then ca | |
500 | 503 | else throw("List size exceeds 6") | |
501 | 504 | ||
502 | - | bZ( | |
505 | + | cc(bZ(bZ(bZ(bZ(bZ(bZ(bY, 0), 1), 2), 3), 4), 5), 6) | |
503 | 506 | } | |
504 | - | let | |
505 | - | let | |
506 | - | let | |
507 | - | $Tuple2(( | |
507 | + | let cH = makeString([cC[B], makeString(cG._2, "_"), cC[D], cC[E]], ":") | |
508 | + | let cI = au(invoke(at, "updateBackpack", [N, cH], nil)) | |
509 | + | let cJ = ax(invoke(at, "updateDuckStats", [N, fraction(a, cG._4, ae)], nil)) | |
510 | + | $Tuple2((cG._1 :+ ScriptTransfer(cu.caller, cG._3, Z)), $Tuple3(cI, cA, cJ)) | |
508 | 511 | } | |
509 | 512 | } | |
510 | 513 | } | |
511 | 514 | ||
512 | 515 | ||
513 | 516 | ||
514 | - | @Callable( | |
515 | - | func buyMaterials ( | |
516 | - | let | |
517 | - | let N = valueOrErrorMessage(getString(at, K(toString( | |
518 | - | if ((size( | |
517 | + | @Callable(cu) | |
518 | + | func buyMaterials (cy,cK) = { | |
519 | + | let cA = br() | |
520 | + | let N = valueOrErrorMessage(getString(at, K(toString(cu.caller))), "You don't have a duck staked") | |
521 | + | if ((size(cu.payments) != 1)) | |
519 | 522 | then throw("exactly 1 payment must be attached") | |
520 | 523 | else { | |
521 | - | let | |
522 | - | let | |
523 | - | let | |
524 | - | if (( | |
524 | + | let cL = cu.payments[0] | |
525 | + | let cM = cL.amount | |
526 | + | let cN = valueOrErrorMessage(cL.assetId, "WAVES can't be used as payment") | |
527 | + | if ((cN != Z)) | |
525 | 528 | then throw("USDT payments only!") | |
526 | 529 | else { | |
527 | - | let | |
528 | - | if (( | |
529 | - | then throw(("Duck location type should be Factory, but is " + | |
530 | + | let cB = split(valueOrElse(getString(at, O(N)), g), "_") | |
531 | + | if ((cB[U] != "F")) | |
532 | + | then throw(("Duck location type should be Factory, but is " + cB[U])) | |
530 | 533 | else { | |
531 | - | let | |
532 | - | let | |
533 | - | let | |
534 | - | func | |
535 | - | then throw(((("You tried to buy negative amount of " + l[ | |
536 | - | else if (( | |
534 | + | let aZ = cB[V] | |
535 | + | let cC = bo(M(N)) | |
536 | + | let cO = split(cC[D], "_") | |
537 | + | func cP (bt,bv) = if ((0 > cy[bv])) | |
538 | + | then throw(((("You tried to buy negative amount of " + l[bv]) + ": ") + toString(cy[bv]))) | |
539 | + | else if ((cy[bv] > 0)) | |
537 | 540 | then { | |
538 | - | let | |
539 | - | $Tuple4(( | |
541 | + | let cF = bg(aZ, bv, cy[bv], cK[bv]) | |
542 | + | $Tuple4((bt._1 :+ cF._1), (bt._2 :+ toString((parseIntValue(cO[bv]) + cF._3))), (bt._3 + cF._2), (bt._4 + cy[bv])) | |
540 | 543 | } | |
541 | - | else $Tuple4( | |
544 | + | else $Tuple4(bt._1, (bt._2 :+ cO[bv]), bt._3, bt._4) | |
542 | 545 | ||
543 | - | let | |
544 | - | let | |
545 | - | let | |
546 | - | let | |
547 | - | func | |
548 | - | then | |
549 | - | else | |
546 | + | let cG = { | |
547 | + | let bW = [0, 1, 2, 3, 4, 5] | |
548 | + | let bX = size(bW) | |
549 | + | let bY = $Tuple4(nil, nil, 0, 0) | |
550 | + | func bZ (ca,cb) = if ((cb >= bX)) | |
551 | + | then ca | |
552 | + | else cP(ca, bW[cb]) | |
550 | 553 | ||
551 | - | func | |
552 | - | then | |
554 | + | func cc (ca,cb) = if ((cb >= bX)) | |
555 | + | then ca | |
553 | 556 | else throw("List size exceeds 6") | |
554 | 557 | ||
555 | - | bZ( | |
558 | + | cc(bZ(bZ(bZ(bZ(bZ(bZ(bY, 0), 1), 2), 3), 4), 5), 6) | |
556 | 559 | } | |
557 | - | if (( | |
558 | - | then throw(((("Insufficient payment! Attached=" + toString( | |
560 | + | if ((cG._3 > cM)) | |
561 | + | then throw(((("Insufficient payment! Attached=" + toString(cM)) + ", required=") + toString(cG._3))) | |
559 | 562 | else { | |
560 | - | let | |
561 | - | let | |
562 | - | let ao = if ((( | |
563 | - | then [ScriptTransfer( | |
563 | + | let cH = makeString([cC[B], cC[C], makeString(cG._2, "_"), cC[E]], ":") | |
564 | + | let cI = au(invoke(at, "updateBackpack", [N, cH], nil)) | |
565 | + | let ao = if (((cM - cG._3) > 0)) | |
566 | + | then [ScriptTransfer(cu.caller, (cM - cG._3), Z)] | |
564 | 567 | else nil | |
565 | - | let | |
566 | - | let | |
567 | - | $Tuple2((( | |
568 | + | let cQ = (cG._3 / 100) | |
569 | + | let cJ = ax(invoke(at, "updateDuckStats", [N, fraction(a, cG._4, ae)], nil)) | |
570 | + | $Tuple2(((cG._1 ++ ao) :+ ScriptTransfer(as, cQ, Z)), $Tuple3(cI, cA, cJ)) | |
568 | 571 | } | |
569 | 572 | } | |
570 | 573 | } | |
571 | 574 | } | |
572 | 575 | } | |
573 | 576 | ||
574 | 577 | ||
575 | 578 | ||
576 | - | @Callable( | |
577 | - | func exchangeResources ( | |
578 | - | let | |
579 | - | let N = valueOrErrorMessage(getString(at, K(toString( | |
580 | - | if ((size( | |
579 | + | @Callable(cu) | |
580 | + | func exchangeResources (cy) = { | |
581 | + | let cA = br() | |
582 | + | let N = valueOrErrorMessage(getString(at, K(toString(cu.caller))), "You don't have a duck staked") | |
583 | + | if ((size(cu.payments) != 1)) | |
581 | 584 | then throw("exactly 1 payment must be attached") | |
582 | 585 | else { | |
583 | - | let | |
584 | - | let | |
585 | - | let | |
586 | - | if (( | |
586 | + | let cL = cu.payments[0] | |
587 | + | let cM = cL.amount | |
588 | + | let cN = valueOrErrorMessage(cL.assetId, "WAVES can't be used as payment") | |
589 | + | if ((cN != Z)) | |
587 | 590 | then throw("USDT payments only!") | |
588 | 591 | else { | |
589 | - | let | |
590 | - | if (( | |
591 | - | then throw(("Duck location type should be Factory, but is " + | |
592 | + | let cB = split(valueOrElse(getString(at, O(N)), g), "_") | |
593 | + | if ((cB[U] != "F")) | |
594 | + | then throw(("Duck location type should be Factory, but is " + cB[U])) | |
592 | 595 | else { | |
593 | - | let | |
594 | - | let | |
595 | - | let | |
596 | - | let | |
597 | - | func | |
598 | - | let | |
599 | - | let | |
600 | - | let | |
601 | - | if (( | |
602 | - | then throw(((((("You have " + | |
603 | - | else if ((0 > | |
604 | - | then throw(((("You tried to exchange negative amount of " + k[ | |
605 | - | else if (( | |
606 | - | then $Tuple5(( | |
607 | - | else $Tuple5(( | |
596 | + | let aZ = cB[V] | |
597 | + | let cC = bo(M(N)) | |
598 | + | let cD = split(cC[C], "_") | |
599 | + | let cO = split(cC[D], "_") | |
600 | + | func cR (bt,bv) = { | |
601 | + | let bb = aK(aZ, bv) | |
602 | + | let bc = valueOrElse(getInteger(bb), 0) | |
603 | + | let cS = cy[bv] | |
604 | + | if ((cS > parseIntValue(cD[bv]))) | |
605 | + | then throw(((((("You have " + cD[bv]) + " of ") + k[bv]) + ", but tried to exchange ") + toString(cS))) | |
606 | + | else if ((0 > cS)) | |
607 | + | then throw(((("You tried to exchange negative amount of " + k[bv]) + ": ") + toString(cS))) | |
608 | + | else if ((cS > 0)) | |
609 | + | then $Tuple5((bt._1 :+ toString((parseIntValue(cD[bv]) - cS))), (bt._2 :+ toString((parseIntValue(cO[bv]) + cS))), (bt._3 + fraction(cS, h, ae)), (bt._4 :+ IntegerEntry(bb, bc)), (bt._5 + cS)) | |
610 | + | else $Tuple5((bt._1 :+ cD[bv]), (bt._2 :+ cO[bv]), bt._3, bt._4, bt._5) | |
608 | 611 | } | |
609 | 612 | ||
610 | - | let | |
611 | - | let | |
612 | - | let | |
613 | - | let | |
614 | - | func | |
615 | - | then | |
616 | - | else | |
613 | + | let cG = { | |
614 | + | let bW = [0, 1, 2, 3, 4, 5] | |
615 | + | let bX = size(bW) | |
616 | + | let bY = $Tuple5(nil, nil, 0, nil, 0) | |
617 | + | func bZ (ca,cb) = if ((cb >= bX)) | |
618 | + | then ca | |
619 | + | else cR(ca, bW[cb]) | |
617 | 620 | ||
618 | - | func | |
619 | - | then | |
621 | + | func cc (ca,cb) = if ((cb >= bX)) | |
622 | + | then ca | |
620 | 623 | else throw("List size exceeds 6") | |
621 | 624 | ||
622 | - | bZ( | |
625 | + | cc(bZ(bZ(bZ(bZ(bZ(bZ(bY, 0), 1), 2), 3), 4), 5), 6) | |
623 | 626 | } | |
624 | - | if (( | |
625 | - | then throw(((("Insufficient payment! Attached=" + toString( | |
627 | + | if ((cG._3 > cM)) | |
628 | + | then throw(((("Insufficient payment! Attached=" + toString(cM)) + ", required=") + toString(cG._3))) | |
626 | 629 | else { | |
627 | - | let | |
628 | - | let | |
629 | - | let ao = if ((( | |
630 | - | then [ScriptTransfer( | |
630 | + | let cH = makeString([cC[B], makeString(cG._1, "_"), makeString(cG._2, "_"), cC[E]], ":") | |
631 | + | let cI = au(invoke(at, "updateBackpack", [N, cH], nil)) | |
632 | + | let ao = if (((cM - cG._3) > 0)) | |
633 | + | then [ScriptTransfer(cu.caller, (cM - cG._3), Z)] | |
631 | 634 | else nil | |
632 | - | let | |
633 | - | let | |
634 | - | $Tuple2(((ao ++ | |
635 | + | let cQ = (cG._3 / 100) | |
636 | + | let cJ = ax(invoke(at, "updateDuckStats", [N, fraction(a, cG._5, ae)], nil)) | |
637 | + | $Tuple2(((ao ++ cG._4) :+ ScriptTransfer(as, cQ, Z)), $Tuple3(cI, cA, cJ)) | |
635 | 638 | } | |
636 | 639 | } | |
637 | 640 | } | |
638 | 641 | } | |
639 | 642 | } | |
640 | 643 | ||
641 | 644 | ||
642 | 645 | ||
643 | - | @Callable( | |
644 | - | func craftGoods ( | |
645 | - | let | |
646 | - | if ((size( | |
646 | + | @Callable(cu) | |
647 | + | func craftGoods (cT,cU) = { | |
648 | + | let cA = br() | |
649 | + | if ((size(cu.payments) != 1)) | |
647 | 650 | then throw("exactly 1 payment must be attached") | |
648 | 651 | else { | |
649 | - | let | |
650 | - | let | |
651 | - | let | |
652 | - | if (( | |
652 | + | let cL = cu.payments[0] | |
653 | + | let cM = cL.amount | |
654 | + | let cN = valueOrErrorMessage(cL.assetId, "WAVES can't be used as payment") | |
655 | + | if ((cN != Z)) | |
653 | 656 | then throw("USDT payments only!") | |
654 | - | else if (( | |
657 | + | else if ((cM != ad)) | |
655 | 658 | then throw("exactly 1 USDT must be attached as payment") | |
656 | - | else if ((0 >= | |
659 | + | else if ((0 >= cU)) | |
657 | 660 | then throw("Quantity should be positive") | |
658 | 661 | else { | |
659 | - | let N = valueOrErrorMessage(getString(at, K(toString( | |
660 | - | let | |
661 | - | if (( | |
662 | - | then throw(("Duck location type should be Manufactory, but is " + | |
662 | + | let N = valueOrErrorMessage(getString(at, K(toString(cu.caller))), "You don't have a duck staked") | |
663 | + | let cB = split(valueOrElse(getString(at, O(N)), g), "_") | |
664 | + | if ((cB[U] != "M")) | |
665 | + | then throw(("Duck location type should be Manufactory, but is " + cB[U])) | |
663 | 666 | else { | |
664 | - | let | |
665 | - | let | |
666 | - | let | |
667 | - | if (if ((0 > | |
667 | + | let cV = cB[T] | |
668 | + | let cC = bo(M(N)) | |
669 | + | let cO = split(cC[D], "_") | |
670 | + | if (if ((0 > cT)) | |
668 | 671 | then true | |
669 | - | else ( | |
670 | - | then throw(("Unknown product idx=" + toString( | |
672 | + | else (cT >= size(p))) | |
673 | + | then throw(("Unknown product idx=" + toString(cT))) | |
671 | 674 | else { | |
672 | - | let X = split(p[ | |
675 | + | let X = split(p[cT], "_") | |
673 | 676 | if ((size(X) != s)) | |
674 | - | then throw(("Fatal: unknown recipe: " + p[ | |
677 | + | then throw(("Fatal: unknown recipe: " + p[cT])) | |
675 | 678 | else { | |
676 | - | let | |
677 | - | if ((n[ | |
678 | - | then throw(((("This product is available in " + n[ | |
679 | + | let cW = parseIntValue(X[r]) | |
680 | + | if ((n[cW] != cV)) | |
681 | + | then throw(((("This product is available in " + n[cW]) + ", but you are in ") + cV)) | |
679 | 682 | else { | |
680 | - | let | |
683 | + | let cX = if ((cC[E] == "")) | |
681 | 684 | then nil | |
682 | - | else split( | |
683 | - | func | |
684 | - | let ay = | |
685 | - | let | |
686 | - | then | |
685 | + | else split(cC[E], "_") | |
686 | + | func cY (bt,cZ) = { | |
687 | + | let ay = bt._2 | |
688 | + | let da = if ((size(cX) > ay)) | |
689 | + | then cX[ay] | |
687 | 690 | else "0" | |
688 | - | let | |
689 | - | let | |
690 | - | let | |
691 | - | then toString(( | |
692 | - | else | |
693 | - | $Tuple2(( | |
691 | + | let db = parseIntValue(da) | |
692 | + | let aU = (cU * t) | |
693 | + | let dc = if ((ay == cT)) | |
694 | + | then toString((db + aU)) | |
695 | + | else da | |
696 | + | $Tuple2((bt._1 :+ dc), (ay + 1)) | |
694 | 697 | } | |
695 | 698 | ||
696 | - | let | |
697 | - | let | |
698 | - | let | |
699 | - | func | |
700 | - | then | |
701 | - | else | |
699 | + | let dd = ( let bW = p | |
700 | + | let bX = size(bW) | |
701 | + | let bY = $Tuple2(nil, 0) | |
702 | + | func bZ (ca,cb) = if ((cb >= bX)) | |
703 | + | then ca | |
704 | + | else cY(ca, bW[cb]) | |
702 | 705 | ||
703 | - | func | |
704 | - | then | |
706 | + | func cc (ca,cb) = if ((cb >= bX)) | |
707 | + | then ca | |
705 | 708 | else throw("List size exceeds 50") | |
706 | 709 | ||
707 | - | bZ( | |
708 | - | func | |
709 | - | let | |
710 | - | let | |
711 | - | if (( | |
712 | - | then throw(((((((("You have " + az( | |
713 | - | else if (( | |
714 | - | then $Tuple2(( | |
715 | - | else $Tuple2(( | |
710 | + | cc(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bY, 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 | |
711 | + | func de (bt,bv) = { | |
712 | + | let df = ((parseIntValue(X[bv]) * ad) * cU) | |
713 | + | let dg = parseIntValue(cO[bv]) | |
714 | + | if ((df > dg)) | |
715 | + | then throw(((((((("You have " + az(dg, 8)) + " of ") + l[bv]) + ", but recipe requires ") + az(df, 8)) + " for quantity ") + toString(cU))) | |
716 | + | else if ((df > 0)) | |
717 | + | then $Tuple2((bt._1 :+ toString((dg - df))), (bt._2 + df)) | |
718 | + | else $Tuple2((bt._1 :+ cO[bv]), bt._2) | |
716 | 719 | } | |
717 | 720 | ||
718 | - | let | |
719 | - | let | |
720 | - | let | |
721 | - | let | |
722 | - | func | |
723 | - | then | |
724 | - | else | |
721 | + | let cG = { | |
722 | + | let bW = [0, 1, 2, 3, 4, 5] | |
723 | + | let bX = size(bW) | |
724 | + | let bY = $Tuple2(nil, 0) | |
725 | + | func cd (ca,cb) = if ((cb >= bX)) | |
726 | + | then ca | |
727 | + | else de(ca, bW[cb]) | |
725 | 728 | ||
726 | - | func | |
727 | - | then | |
729 | + | func ce (ca,cb) = if ((cb >= bX)) | |
730 | + | then ca | |
728 | 731 | else throw("List size exceeds 6") | |
729 | 732 | ||
730 | - | | |
733 | + | ce(cd(cd(cd(cd(cd(cd(bY, 0), 1), 2), 3), 4), 5), 6) | |
731 | 734 | } | |
732 | - | let | |
733 | - | let | |
734 | - | let | |
735 | - | $Tuple2(nil, $Tuple3( | |
735 | + | let cH = makeString([cC[B], cC[C], makeString(cG._1, "_"), makeString(dd, "_")], ":") | |
736 | + | let cI = au(invoke(at, "updateBackpack", [N, cH], nil)) | |
737 | + | let cJ = ax(invoke(at, "updateDuckStats", [N, fraction(b, cG._2, ae)], nil)) | |
738 | + | $Tuple2(nil, $Tuple3(cI, cA, cJ)) | |
736 | 739 | } | |
737 | 740 | } | |
738 | 741 | } | |
739 | 742 | } | |
740 | 743 | } | |
741 | 744 | } | |
742 | 745 | } | |
743 | 746 | ||
744 | 747 | ||
745 | 748 | ||
746 | - | @Callable( | |
747 | - | func setWarehouseOrder ( | |
748 | - | let | |
749 | - | let J = toString( | |
750 | - | let | |
751 | - | then | |
749 | + | @Callable(cu) | |
750 | + | func setWarehouseOrder (dh,R) = { | |
751 | + | let di = cu.originCaller | |
752 | + | let J = toString(di) | |
753 | + | let cI = if ((di != as)) | |
754 | + | then bq() | |
752 | 755 | else false | |
753 | - | let | |
756 | + | let dj = value(assetInfo(fromBase58String(R))) | |
754 | 757 | if (!(isDefined(getInteger(at, H(R))))) | |
755 | - | then throw((("NFT " + | |
758 | + | then throw((("NFT " + dj.name) + " is not staked")) | |
756 | 759 | else { | |
757 | - | let | |
758 | - | if (if (( | |
759 | - | then ( | |
760 | + | let dk = valueOrErrorMessage(getString(at, F(R)), (("NFT " + dj.name) + " is orphaned")) | |
761 | + | if (if ((di != as)) | |
762 | + | then (dk != J) | |
760 | 763 | else false) | |
761 | 764 | then throw((e + " is not yours")) | |
762 | 765 | else { | |
763 | - | let | |
764 | - | let | |
765 | - | let | |
766 | - | let | |
767 | - | let | |
768 | - | let | |
769 | - | let | |
770 | - | let | |
771 | - | let | |
772 | - | let | |
773 | - | let | |
774 | - | let | |
775 | - | let | |
776 | - | if ((0 > | |
777 | - | then throw((((((("Attempt to reserve " + toString( | |
766 | + | let dl = split_4C(dh, ":") | |
767 | + | let cv = au(invoke(at, "getWarehouseREADONLY", [R], nil)) | |
768 | + | let bJ = split_4C(cv, ":") | |
769 | + | let dm = split(bJ[y], "_") | |
770 | + | let dn = parseIntValue(dm[A]) | |
771 | + | let aR = Q(R) | |
772 | + | let bK = aQ(aR) | |
773 | + | let cw = bI(bJ, bK, dl) | |
774 | + | let do = cw._4 | |
775 | + | let dp = cw._5 | |
776 | + | let dq = cw._7 | |
777 | + | let dr = (do + dp) | |
778 | + | let ds = ((dn - dq) - dr) | |
779 | + | if ((0 > ds)) | |
780 | + | then throw((((((("Attempt to reserve " + toString(do)) + " space for buy orders, and ") + toString(dp)) + " space for sell orders (and occupied=") + toString(dq)) + "), leads to negative free space")) | |
778 | 781 | else { | |
779 | - | let | |
780 | - | let | |
781 | - | let | |
782 | - | let | |
783 | - | then if ((size( | |
782 | + | let dt = makeString_2C([bJ[u], makeString(cw._1, "_"), makeString(cw._2, "_"), makeString(cw._3, "_"), toString(dr)], ":") | |
783 | + | let du = au(invoke(at, "saveWarehouse", [dt, R], nil)) | |
784 | + | let dv = cw._6 | |
785 | + | let dw = if ((dv > 0)) | |
786 | + | then if ((size(cu.payments) != 1)) | |
784 | 787 | then throw("exactly 1 payment must be attached") | |
785 | 788 | else { | |
786 | - | let | |
787 | - | let | |
788 | - | let | |
789 | - | if (( | |
789 | + | let cL = cu.payments[0] | |
790 | + | let cM = cL.amount | |
791 | + | let cN = valueOrErrorMessage(cL.assetId, "WAVES can't be used as payment") | |
792 | + | if ((cN != Z)) | |
790 | 793 | then throw("USDT payments only!") | |
791 | - | else if (( | |
792 | - | then throw(("Payment needed is " + toString( | |
793 | - | else [StringEntry( | |
794 | + | else if ((cM != dv)) | |
795 | + | then throw(("Payment needed is " + toString(dv))) | |
796 | + | else [StringEntry(aR, dh)] | |
794 | 797 | } | |
795 | - | else if (( | |
796 | - | then if ((size( | |
798 | + | else if ((dv == 0)) | |
799 | + | then if ((size(cu.payments) != 0)) | |
797 | 800 | then throw("No payments needed") | |
798 | - | else [StringEntry( | |
799 | - | else if ((size( | |
801 | + | else [StringEntry(aR, dh)] | |
802 | + | else if ((size(cu.payments) != 0)) | |
800 | 803 | then throw("No payments needed") | |
801 | - | else [ScriptTransfer(addressFromStringValue( | |
802 | - | $Tuple2( | |
804 | + | else [ScriptTransfer(addressFromStringValue(dk), -(dv), Z), StringEntry(aR, dh)] | |
805 | + | $Tuple2(dw, $Tuple2(cI, du)) | |
803 | 806 | } | |
804 | 807 | } | |
805 | 808 | } | |
806 | 809 | } | |
807 | 810 | ||
808 | 811 | ||
809 | 812 | ||
810 | - | @Callable( | |
811 | - | func acceptWarehouseOrder ( | |
812 | - | let | |
813 | - | let | |
814 | - | let | |
815 | - | let | |
816 | - | let | |
817 | - | let | |
818 | - | if (( | |
819 | - | then throw((("Duck location type is " + | |
820 | - | else if (( | |
821 | - | then throw(((("Your staked duck is " + | |
813 | + | @Callable(cu) | |
814 | + | func acceptWarehouseOrder (dx,R,N) = { | |
815 | + | let cA = br() | |
816 | + | let dy = cu.originCaller | |
817 | + | let dz = toString(dy) | |
818 | + | let dA = valueOrErrorMessage(getString(at, K(dz)), "You don't have a duck staked") | |
819 | + | let cB = valueOrElse(getString(at, O(dA)), g) | |
820 | + | let dB = split(value(cB), "_") | |
821 | + | if ((dB[U] != "L")) | |
822 | + | then throw((("Duck location type is " + dB[U]) + ", but should be L")) | |
823 | + | else if ((dA != N)) | |
824 | + | then throw(((("Your staked duck is " + dA) + ", but passed ") + N)) | |
822 | 825 | else { | |
823 | - | let | |
826 | + | let dC = value(assetInfo(fromBase58String(R))) | |
824 | 827 | if (!(isDefined(getInteger(at, H(R))))) | |
825 | - | then throw((("NFT " + | |
828 | + | then throw((("NFT " + dC.name) + " is not staked")) | |
826 | 829 | else { | |
827 | - | let | |
828 | - | if (( | |
830 | + | let dD = valueOrErrorMessage(getString(at, F(R)), (("NFT " + dC.name) + " is orphaned")) | |
831 | + | if ((dD == dz)) | |
829 | 832 | then throw("You cannot trade with yourself") | |
830 | 833 | else { | |
831 | - | let | |
832 | - | if ((size( | |
834 | + | let dE = split_4C(dx, ":") | |
835 | + | if ((size(dE) != 3)) | |
833 | 836 | then throw("bpOrderStr should contain exactly 2 ':' separators") | |
834 | 837 | else { | |
835 | - | let | |
836 | - | let | |
837 | - | let | |
838 | + | let dF = split(dE[0], "_") | |
839 | + | let dG = split(dE[1], "_") | |
840 | + | let dH = if ((dE[2] == "")) | |
838 | 841 | then nil | |
839 | - | else split( | |
840 | - | if ((size( | |
842 | + | else split(dE[2], "_") | |
843 | + | if ((size(dF) != f)) | |
841 | 844 | then throw("All 6 resources should be passed") | |
842 | - | else if ((size( | |
845 | + | else if ((size(dG) != f)) | |
843 | 846 | then throw("All 6 materials should be passed") | |
844 | 847 | else { | |
845 | - | let | |
846 | - | let | |
847 | - | let | |
848 | - | let | |
849 | - | let | |
848 | + | let cv = au(invoke(at, "getWarehouseREADONLY", [R], nil)) | |
849 | + | let bJ = split_4C(cv, ":") | |
850 | + | let bM = split(bJ[v], "_") | |
851 | + | let bN = split(bJ[w], "_") | |
852 | + | let bO = if ((bJ[x] == "")) | |
850 | 853 | then nil | |
851 | - | else split( | |
852 | - | let | |
853 | - | let | |
854 | - | let | |
855 | - | let | |
856 | - | let | |
857 | - | let | |
854 | + | else split(bJ[x], "_") | |
855 | + | let dI = parseIntValue(split(bJ[y], "_")[z]) | |
856 | + | let bp = M(N) | |
857 | + | let cC = bo(bp) | |
858 | + | let dJ = split(cC[C], "_") | |
859 | + | let dK = split(cC[D], "_") | |
860 | + | let dL = if ((cC[E] == "")) | |
858 | 861 | then nil | |
859 | - | else split( | |
860 | - | let | |
861 | - | let | |
862 | - | let | |
863 | - | let | |
864 | - | let | |
862 | + | else split(cC[E], "_") | |
863 | + | let aR = Q(R) | |
864 | + | let dM = aQ(aR) | |
865 | + | let dN = split(dM[aN], "_") | |
866 | + | let dO = split(dM[aO], "_") | |
867 | + | let dP = if ((dM[aP] == "")) | |
865 | 868 | then nil | |
866 | - | else split( | |
867 | - | let | |
868 | - | let | |
869 | - | let | |
870 | - | let | |
871 | - | func | |
872 | - | then | |
873 | - | else | |
869 | + | else split(dM[aP], "_") | |
870 | + | let bV = { | |
871 | + | let bW = dF | |
872 | + | let bX = size(bW) | |
873 | + | let bY = $Tuple13(nil, nil, nil, 0, 0, 0, 0, dJ, bM, dN, k, false, 0) | |
874 | + | func bZ (ca,cb) = if ((cb >= bX)) | |
875 | + | then ca | |
876 | + | else ch(ca, bW[cb]) | |
874 | 877 | ||
875 | - | func | |
876 | - | then | |
878 | + | func cc (ca,cb) = if ((cb >= bX)) | |
879 | + | then ca | |
877 | 880 | else throw("List size exceeds 6") | |
878 | 881 | ||
879 | - | bZ( | |
882 | + | cc(bZ(bZ(bZ(bZ(bZ(bZ(bY, 0), 1), 2), 3), 4), 5), 6) | |
880 | 883 | } | |
881 | - | let | |
882 | - | let | |
883 | - | let | |
884 | - | let | |
885 | - | func | |
886 | - | then | |
887 | - | else | |
884 | + | let bl = { | |
885 | + | let bW = dG | |
886 | + | let bX = size(bW) | |
887 | + | let bY = $Tuple13(nil, nil, nil, bV._4, bV._5, bV._6, 0, dK, bN, dO, l, false, bV._13) | |
888 | + | func cd (ca,cb) = if ((cb >= bX)) | |
889 | + | then ca | |
890 | + | else ch(ca, bW[cb]) | |
888 | 891 | ||
889 | - | func | |
890 | - | then | |
892 | + | func ce (ca,cb) = if ((cb >= bX)) | |
893 | + | then ca | |
891 | 894 | else throw("List size exceeds 6") | |
892 | 895 | ||
893 | - | | |
896 | + | ce(cd(cd(cd(cd(cd(cd(bY, 0), 1), 2), 3), 4), 5), 6) | |
894 | 897 | } | |
895 | - | let | |
898 | + | let aS = if ((size(dH) != 0)) | |
896 | 899 | then { | |
897 | - | let | |
898 | - | let | |
899 | - | let | |
900 | - | func | |
901 | - | then | |
902 | - | else | |
900 | + | let bW = dH | |
901 | + | let bX = size(bW) | |
902 | + | let bY = $Tuple13(nil, nil, nil, bl._4, bl._5, bl._6, 0, dL, bO, dP, m, true, bl._13) | |
903 | + | func cf (ca,cb) = if ((cb >= bX)) | |
904 | + | then ca | |
905 | + | else ch(ca, bW[cb]) | |
903 | 906 | ||
904 | - | func | |
905 | - | then | |
907 | + | func cg (ca,cb) = if ((cb >= bX)) | |
908 | + | then ca | |
906 | 909 | else throw("List size exceeds 50") | |
907 | 910 | ||
908 | - | | |
911 | + | cg(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(cf(bY, 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) | |
909 | 912 | } | |
910 | - | else $Tuple13( | |
911 | - | let | |
912 | - | let | |
913 | + | else $Tuple13(bO, dP, dL, bl._4, bl._5, bl._6, 0, dL, bO, dP, m, true, bl._13) | |
914 | + | let dQ = aS._4 | |
915 | + | let dR = if ((0 > (dI - dQ))) | |
913 | 916 | then 0 | |
914 | - | else ( | |
915 | - | let | |
916 | - | let | |
917 | - | let | |
918 | - | let | |
919 | - | let | |
920 | - | let | |
921 | - | let | |
922 | - | let | |
923 | - | let | |
924 | - | let | |
917 | + | else (dI - dQ) | |
918 | + | let dt = makeString_2C([bJ[u], makeString(bV._1, "_"), makeString(bl._1, "_"), makeString(aS._1, "_"), toString(dR)], ":") | |
919 | + | let dS = makeString_2C([makeString(bV._2, "_"), makeString(bl._2, "_"), makeString(aS._2, "_")], ":") | |
920 | + | let dT = makeString_2C([cC[B], makeString(bV._3, "_"), makeString(bl._3, "_"), makeString(aS._3, "_")], ":") | |
921 | + | let du = au(invoke(at, "saveWarehouse", [dt, R], nil)) | |
922 | + | let dU = au(invoke(at, "updateBackpack", [N, dT], nil)) | |
923 | + | let dV = ax(invoke(at, "updateDuckStats", [N, fraction(d, aS._13, ae)], nil)) | |
924 | + | let dW = ax(invoke(at, "updateAccStats", [dD, fraction(d, aS._13, ae)], nil)) | |
925 | + | let dw = [StringEntry(aR, dS)] | |
926 | + | let dX = aS._5 | |
927 | + | let dY = if ((dX > 0)) | |
925 | 928 | then { | |
926 | - | let | |
927 | - | let | |
928 | - | let | |
929 | - | if (isDefined( | |
930 | - | then ((( | |
931 | - | else (( | |
929 | + | let dZ = fraction(aS._5, aJ, ad) | |
930 | + | let ea = I(dz) | |
931 | + | let eb = getString(at, ea) | |
932 | + | if (isDefined(eb)) | |
933 | + | then (((dw :+ ScriptTransfer(dy, (aS._5 - (3 * dZ)), Z)) :+ ScriptTransfer(as, dZ, Z)) :+ ScriptTransfer(addressFromStringValue(value(eb)), dZ, Z)) | |
934 | + | else ((dw :+ ScriptTransfer(dy, (aS._5 - (3 * dZ)), Z)) :+ ScriptTransfer(as, dZ, Z)) | |
932 | 935 | } | |
933 | - | else | |
934 | - | let | |
935 | - | let | |
936 | - | then if ((size( | |
936 | + | else dw | |
937 | + | let ec = aS._6 | |
938 | + | let ed = if ((ec > 0)) | |
939 | + | then if ((size(cu.payments) != 1)) | |
937 | 940 | then throw("exactly 1 payment must be attached") | |
938 | 941 | else { | |
939 | - | let | |
940 | - | let | |
941 | - | let | |
942 | - | if (( | |
942 | + | let cL = cu.payments[0] | |
943 | + | let cM = cL.amount | |
944 | + | let cN = valueOrErrorMessage(cL.assetId, "WAVES can't be used as payment") | |
945 | + | if ((cN != Z)) | |
943 | 946 | then throw("USDT payments only!") | |
944 | - | else if (( | |
945 | - | then throw(("Payment needed is " + toString( | |
946 | - | else if ((ag > | |
947 | + | else if ((cM != ec)) | |
948 | + | then throw(("Payment needed is " + toString(ec))) | |
949 | + | else if ((ag > cM)) | |
947 | 950 | then throw(("Payment should be at least " + toString(ag))) | |
948 | 951 | else { | |
949 | - | let | |
950 | - | let | |
951 | - | let | |
952 | - | if (isDefined( | |
953 | - | then ((( | |
954 | - | else (( | |
952 | + | let ee = fraction(aS._6, aJ, ad) | |
953 | + | let ea = I(dD) | |
954 | + | let eb = getString(at, ea) | |
955 | + | if (isDefined(eb)) | |
956 | + | then (((dY :+ ScriptTransfer(addressFromStringValue(dD), (aS._6 - (3 * ee)), Z)) :+ ScriptTransfer(as, ee, Z)) :+ ScriptTransfer(addressFromStringValue(value(eb)), ee, Z)) | |
957 | + | else ((dY :+ ScriptTransfer(addressFromStringValue(dD), (aS._6 - (3 * ee)), Z)) :+ ScriptTransfer(as, ee, Z)) | |
955 | 958 | } | |
956 | 959 | } | |
957 | - | else if ((size( | |
960 | + | else if ((size(cu.payments) != 0)) | |
958 | 961 | then throw("No payments needed") | |
959 | - | else | |
960 | - | $Tuple2( | |
962 | + | else dY | |
963 | + | $Tuple2(ed, $Tuple5(cA, du, dU, dV, dW)) | |
961 | 964 | } | |
962 | 965 | } | |
963 | 966 | } | |
964 | 967 | } | |
965 | 968 | } | |
966 | 969 | } | |
967 | 970 | ||
968 | 971 | ||
969 | 972 | ||
970 | - | @Callable( | |
971 | - | func sellProductsToES ( | |
972 | - | let | |
973 | - | if ((size( | |
973 | + | @Callable(cu) | |
974 | + | func sellProductsToES (cy) = { | |
975 | + | let cA = br() | |
976 | + | if ((size(cu.payments) != 0)) | |
974 | 977 | then throw("No payments needed") | |
975 | 978 | else { | |
976 | - | let N = valueOrErrorMessage(getString(at, K(toString( | |
977 | - | let | |
978 | - | if (( | |
979 | - | then throw(("Duck location type should be Airport, but is " + | |
979 | + | let N = valueOrErrorMessage(getString(at, K(toString(cu.caller))), "You don't have a duck staked") | |
980 | + | let cB = split(valueOrElse(getString(at, O(N)), g), "_") | |
981 | + | if ((cB[U] != "A")) | |
982 | + | then throw(("Duck location type should be Airport, but is " + cB[U])) | |
980 | 983 | else { | |
981 | - | let | |
982 | - | let | |
984 | + | let cC = bo(M(N)) | |
985 | + | let cX = if ((cC[E] == "")) | |
983 | 986 | then nil | |
984 | - | else split( | |
985 | - | let | |
986 | - | let | |
987 | - | let | |
988 | - | then split(value( | |
987 | + | else split(cC[E], "_") | |
988 | + | let ef = S() | |
989 | + | let eg = getString(ef) | |
990 | + | let eh = if (isDefined(eg)) | |
991 | + | then split(value(eg), "_") | |
989 | 992 | else nil | |
990 | - | func | |
991 | - | let | |
992 | - | let | |
993 | - | then | |
993 | + | func ei (bt,ej) = { | |
994 | + | let bv = bt._1 | |
995 | + | let cU = if ((size(cy) > bv)) | |
996 | + | then cy[bv] | |
994 | 997 | else 0 | |
995 | - | if ((0 > | |
998 | + | if ((0 > cU)) | |
996 | 999 | then throw("Quantity cannot be negative") | |
997 | 1000 | else { | |
998 | - | let X = split( | |
1001 | + | let X = split(ej, "_") | |
999 | 1002 | if ((size(X) != s)) | |
1000 | - | then throw(("Fatal: unknown recipe: " + | |
1003 | + | then throw(("Fatal: unknown recipe: " + ej)) | |
1001 | 1004 | else { | |
1002 | - | let | |
1003 | - | let | |
1004 | - | then parseIntValue( | |
1005 | + | let ek = (i * t) | |
1006 | + | let el = if ((size(eh) > bv)) | |
1007 | + | then parseIntValue(eh[bv]) | |
1005 | 1008 | else 0 | |
1006 | - | let | |
1007 | - | if (( | |
1008 | - | then throw(((("Warehouse can buy only " + toString( | |
1009 | + | let em = (ek - el) | |
1010 | + | if ((cU > em)) | |
1011 | + | then throw(((("Warehouse can buy only " + toString(em)) + " of ") + m[bv])) | |
1009 | 1012 | else { | |
1010 | - | let | |
1011 | - | let | |
1012 | - | let | |
1013 | - | then parseIntValue( | |
1013 | + | let en = W(X) | |
1014 | + | let eo = fraction((en * j), h, (ae * t)) | |
1015 | + | let ep = if ((size(cX) > bv)) | |
1016 | + | then parseIntValue(cX[bv]) | |
1014 | 1017 | else 0 | |
1015 | - | if (( | |
1016 | - | then throw(((("You have only " + toString( | |
1017 | - | else $Tuple5(( | |
1018 | + | if ((cU > ep)) | |
1019 | + | then throw(((("You have only " + toString(ep)) + " of ") + m[bv])) | |
1020 | + | else $Tuple5((bv + 1), (bt._2 + (eo * cU)), (bt._3 :+ toString((ep - cU))), (bt._4 :+ toString((el + cU))), (bt._5 + (en * cU))) | |
1018 | 1021 | } | |
1019 | 1022 | } | |
1020 | 1023 | } | |
1021 | 1024 | } | |
1022 | 1025 | ||
1023 | - | let | |
1024 | - | let | |
1025 | - | let | |
1026 | - | let | |
1027 | - | func | |
1028 | - | then | |
1029 | - | else | |
1026 | + | let cG = { | |
1027 | + | let bW = p | |
1028 | + | let bX = size(bW) | |
1029 | + | let bY = $Tuple5(0, 0, nil, nil, 0) | |
1030 | + | func bZ (ca,cb) = if ((cb >= bX)) | |
1031 | + | then ca | |
1032 | + | else ei(ca, bW[cb]) | |
1030 | 1033 | ||
1031 | - | func | |
1032 | - | then | |
1034 | + | func cc (ca,cb) = if ((cb >= bX)) | |
1035 | + | then ca | |
1033 | 1036 | else throw("List size exceeds 50") | |
1034 | 1037 | ||
1035 | - | bZ( | |
1038 | + | cc(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bY, 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) | |
1036 | 1039 | } | |
1037 | - | let | |
1038 | - | let | |
1039 | - | let | |
1040 | - | $Tuple2([StringEntry( | |
1040 | + | let dT = makeString_2C([cC[B], cC[C], cC[D], makeString(cG._3, "_")], ":") | |
1041 | + | let dU = au(invoke(at, "updateBackpack", [N, dT], nil)) | |
1042 | + | let cJ = ax(invoke(at, "updateDuckStats", [N, fraction(c, cG._5, (ae * 10))], nil)) | |
1043 | + | $Tuple2([StringEntry(ef, makeString(cG._4, "_")), ScriptTransfer(cu.caller, cG._2, Z)], $Tuple3(dU, cA, cJ)) | |
1041 | 1044 | } | |
1042 | 1045 | } | |
1043 | 1046 | } | |
1044 | 1047 | ||
1045 | 1048 | ||
1046 | 1049 | ||
1047 | - | @Callable( | |
1048 | - | func updateEsStorage ( | |
1050 | + | @Callable(cu) | |
1051 | + | func updateEsStorage (eq) = if ((cu.caller != at)) | |
1049 | 1052 | then throw("Permission denied") | |
1050 | - | else $Tuple2([StringEntry(S(), | |
1053 | + | else $Tuple2([StringEntry(S(), eq)], eq) | |
1051 | 1054 | ||
1052 | 1055 |
github/deemru/w8io/169f3d6 775.42 ms ◑