tx · XgZu6NETzQapkUN4K1aSBRNJqquh7mfBooixWEDVUC4 3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy: -0.01800000 Waves 2023.05.28 15:42 [2597837] smart account 3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy > SELF 0.00000000 Waves
{ "type": 13, "id": "XgZu6NETzQapkUN4K1aSBRNJqquh7mfBooixWEDVUC4", "fee": 1800000, "feeAssetId": null, "timestamp": 1685277825333, "version": 2, "chainId": 84, "sender": "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy", "senderPublicKey": "C3PaRKeL8AUKbwUqdniMQtThgcTh5DYHV1777Hkxy7rp", "proofs": [ "2gMTkV3eDgkVxSH4RDTJNPjWLsNRJmNsy8NpSXiyGzATe6cpsZFEfuJ1g5qyV1NjSCp3MSHUJyV3fE6JdpD4HUu8" ], "script": "base64:BgJACAISBQoDCAgIEgMKAQgSAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEYEgMKAQgSAwoBGBIDCgEYEgMKARgSAwoBCEwABWNoYWluCQDJAQIJAMoBAggFBHRoaXMFYnl0ZXMAAQABAAt1c2R0QXNzZXRJZAQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMAEghNp6sggDP07Ru8qO7ouTvMmC3Qtd+geWqNQj+agP/7kDCQAAAgEBVAUHJG1hdGNoMAEgVbHYn3KHgu/l41uNrAWrZd6aQ6EvFrsF8xq3h6XxxRgJAAIBAg1Vbmtub3duIGNoYWluABFJbmZyYVVwZ3JhZGVDb3N0UwQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMACAyK+gJQMJAAACAQFUBQckbWF0Y2gwAIDC1y8JAAIBAg1Vbmtub3duIGNoYWluAAVNVUxUNgDAhD0ABU1VTFQ4AIDC1y8ACkxBTkRQUkVGSVgCBExBTkQACkRVQ0tQUkVGSVgCBERVQ0sAA1NFUAICX18ACkFSVFBSRVNBTEUCB1BSRVNBTEUAD0RBSUxZUk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DYW10CQBrAwkA8AcCBQR0aGlzBQt1c2R0QXNzZXRJZAUNVVNEVFBSSVpFUEFSVAUFTVVMVDYJAJQKAgkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCQERQGV4dHJOYXRpdmUoMTA2MikBBQt1c2VyQWRkcmVzcwUDYW10BQt1c2R0QXNzZXRJZAUDbmlsBQNhbXQAIe298g==", "height": 2597837, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9ejo6Fwvk6UqY5noPizakPwhBV74X8wQy6j3xYDiwqvJ Next: 8XjkMUYB2VhFvU93P5cinz8cfv9jDU6wiaPzq35HqzoU Diff:
Old | New | Differences | |
---|---|---|---|
22 | 22 | } | |
23 | 23 | ||
24 | 24 | let MULT6 = 1000000 | |
25 | + | ||
26 | + | let MULT8 = 100000000 | |
25 | 27 | ||
26 | 28 | let LANDPREFIX = "LAND" | |
27 | 29 | ||
49 | 51 | ||
50 | 52 | let USDTPRIZEPART = 500000 | |
51 | 53 | ||
54 | + | let WHMULTIPLIER = 10000000000 | |
55 | + | ||
52 | 56 | let recLandNum = 0 | |
53 | 57 | ||
54 | 58 | let recLandSize = 1 | |
75 | 79 | let IdxCfgEconomyDapp = 2 | |
76 | 80 | ||
77 | 81 | let IdxCfgGovernanceDapp = 3 | |
82 | + | ||
83 | + | let productPackages = [10, 10, 10, 100, 100, 100, 10, 10, 10, 100, 100, 100, 10, 10, 10] | |
78 | 84 | ||
79 | 85 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
80 | 86 | ||
264 | 270 | } | |
265 | 271 | ||
266 | 272 | ||
267 | - | func getWarehouse (whKey,landIndex,infraLevel) = { | |
273 | + | func getWarehouseTotalVolume (volPrefix) = { | |
274 | + | let parts = split(volPrefix, "_") | |
275 | + | ((WHMULTIPLIER * (parseIntValue(parts[1]) + 1)) * parseIntValue(parts[0])) | |
276 | + | } | |
277 | + | ||
278 | + | ||
279 | + | func getWarehouseOccupiedVol (currentWh) = { | |
280 | + | let goods = currentWh[whIdxProd] | |
281 | + | func sumResMat (acc,item) = (acc + parseIntValue(item)) | |
282 | + | ||
283 | + | func sumProd (acc,item) = { | |
284 | + | let idx = acc._1 | |
285 | + | let pkgSize = productPackages[idx] | |
286 | + | let pkgs = (((parseIntValue(item) + pkgSize) - 1) / pkgSize) | |
287 | + | $Tuple2((idx + 1), (acc._2 + (pkgs * MULT8))) | |
288 | + | } | |
289 | + | ||
290 | + | let whResVol = { | |
291 | + | let $l = split(currentWh[whIdxRes], "_") | |
292 | + | let $s = size($l) | |
293 | + | let $acc0 = 0 | |
294 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
295 | + | then $a | |
296 | + | else sumResMat($a, $l[$i]) | |
297 | + | ||
298 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
299 | + | then $a | |
300 | + | else throw("List size exceeds 6") | |
301 | + | ||
302 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
303 | + | } | |
304 | + | let whMatVol = { | |
305 | + | let $l = split(currentWh[whIdxMat], "_") | |
306 | + | let $s = size($l) | |
307 | + | let $acc0 = 0 | |
308 | + | func $f1_1 ($a,$i) = if (($i >= $s)) | |
309 | + | then $a | |
310 | + | else sumResMat($a, $l[$i]) | |
311 | + | ||
312 | + | func $f1_2 ($a,$i) = if (($i >= $s)) | |
313 | + | then $a | |
314 | + | else throw("List size exceeds 6") | |
315 | + | ||
316 | + | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
317 | + | } | |
318 | + | let whGoodsVol = if ((goods == "")) | |
319 | + | then 0 | |
320 | + | else ( let $l = split_4C(goods, "_") | |
321 | + | let $s = size($l) | |
322 | + | let $acc0 = $Tuple2(0, 0) | |
323 | + | func $f2_1 ($a,$i) = if (($i >= $s)) | |
324 | + | then $a | |
325 | + | else sumProd($a, $l[$i]) | |
326 | + | ||
327 | + | func $f2_2 ($a,$i) = if (($i >= $s)) | |
328 | + | then $a | |
329 | + | else throw("List size exceeds 50") | |
330 | + | ||
331 | + | $f2_2($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50))._2 | |
332 | + | ((whResVol + whMatVol) + whGoodsVol) | |
333 | + | } | |
334 | + | ||
335 | + | ||
336 | + | func getWarehouseExt (whKey,landIndex,infraLevel) = { | |
268 | 337 | let volPrefix = ((toString(landIndex) + "_") + toString(infraLevel)) | |
269 | - | let p = split(valueOrElse(getString(stakingContract, whKey), (volPrefix + ":0_0_0_0_0_0:0_0_0_0_0_0::0")), ":") | |
270 | - | [p[whIdxVol], if ((size(split(p[whIdxRes], "_")) == NUMRES)) | |
271 | - | then p[whIdxRes] | |
272 | - | else "0_0_0_0_0_0", if ((size(split(p[whIdxMat], "_")) == NUMRES)) | |
273 | - | then p[whIdxMat] | |
274 | - | else "0_0_0_0_0_0", p[whIdxProd], if ((5 > size(p))) | |
275 | - | then "0" | |
276 | - | else p[whIdxLockedVol]] | |
338 | + | let whTotal = getWarehouseTotalVolume(volPrefix) | |
339 | + | let whStr = valueOrElse(getString(stakingContract, whKey), (volPrefix + ":0_0_0_0_0_0:0_0_0_0_0_0::0")) | |
340 | + | let wh = split(whStr, ":") | |
341 | + | let whLocked = if ((5 > size(wh))) | |
342 | + | then 0 | |
343 | + | else parseIntValue(wh[whIdxLockedVol]) | |
344 | + | let whOccupied = getWarehouseOccupiedVol(wh) | |
345 | + | [wh[whIdxVol], if ((size(split(wh[whIdxRes], "_")) == NUMRES)) | |
346 | + | then wh[whIdxRes] | |
347 | + | else "0_0_0_0_0_0", if ((size(split(wh[whIdxMat], "_")) == NUMRES)) | |
348 | + | then wh[whIdxMat] | |
349 | + | else "0_0_0_0_0_0", wh[whIdxProd], makeString([toString(whLocked), toString(whOccupied), toString(((whTotal - whLocked) - whOccupied)), toString(whTotal)], "_")] | |
277 | 350 | } | |
278 | 351 | ||
279 | 352 | ||
305 | 378 | then asSplitResult(invoke(stakingContract, "splitByGlobalAndLocalWeightsREADONLY", [needMat, availRes, d[recTerrains]], nil)) | |
306 | 379 | else $Tuple2(asListIntCompacted(invoke(stakingContract, "splitByGlobalWeightsREADONLY", [needMat], nil)), "") | |
307 | 380 | let customName = valueOrElse(getString(stakingContract, keyLandAssetIdToCustomName(landAssetId)), ((d[recContinent] + "-") + d[recLandNum])) | |
308 | - | [("%s%s__assetId__" + landAssetId), ("%s%s__owner__" + owner), ("%s%s__customName__" + customName), ("%s%d__stakedTime__" + toString(stakedTime)), ("%s%s__description__" + makeString([landNum, d[recLandSize], d[recTerrains], d[recContinent]], "_")), ("%s%d__infraLevel__" + toString(productivity._1)), ("%s%s__availResByType__" + globalAndLocal._2), ("%s%d__availResTotal__" + toString(availRes)), ("%s%s__needMaterial__" + globalAndLocal._1), makeString(["%s%s", "landArtefacts", ("PRESALE:" + toString(productivity._2))], SEP), ("%s%s__warehouse__" + makeString( | |
381 | + | [("%s%s__assetId__" + landAssetId), ("%s%s__owner__" + owner), ("%s%s__customName__" + customName), ("%s%d__stakedTime__" + toString(stakedTime)), ("%s%s__description__" + makeString([landNum, d[recLandSize], d[recTerrains], d[recContinent]], "_")), ("%s%d__infraLevel__" + toString(productivity._1)), ("%s%s__availResByType__" + globalAndLocal._2), ("%s%d__availResTotal__" + toString(availRes)), ("%s%s__needMaterial__" + globalAndLocal._1), makeString(["%s%s", "landArtefacts", ("PRESALE:" + toString(productivity._2))], SEP), ("%s%s__warehouse__" + makeString(getWarehouseExt(keyWarehouseByLand(landAssetId), (pieces / SSIZE), productivity._1), ":")), ("%s%s__landOrder__" + valueOrElse(getString(economyContract, keyOrderByLand(landAssetId)), "0@0_0@0_0@0_0@0_0@0_0@0:0@0_0@0_0@0_0@0_0@0_0@0:"))] | |
309 | 382 | } | |
310 | 383 | ||
311 | 384 | ||
316 | 389 | let d = split(a.description, "_") | |
317 | 390 | let pieces = numPiecesBySize(d[recLandSize]) | |
318 | 391 | let productivity = applyBonuses(landAssetId, pieces) | |
319 | - | [("%s%s__assetId__" + landAssetId), ("%s%s__owner__" + owner), ("%s%s__warehouse__" + makeString( | |
392 | + | [("%s%s__assetId__" + landAssetId), ("%s%s__owner__" + owner), ("%s%s__warehouse__" + makeString(getWarehouseExt(keyWarehouseByLand(landAssetId), (pieces / SSIZE), productivity._1), ":")), ("%s%s__landOrder__" + valueOrElse(getString(economyContract, keyOrderByLand(landAssetId)), "0@0_0@0_0@0_0@0_0@0_0@0:0@0_0@0_0@0_0@0_0@0_0@0:"))] | |
320 | 393 | } | |
321 | 394 | ||
322 | 395 | ||
396 | 469 | ||
397 | 470 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
398 | 471 | then $a | |
399 | - | else throw("List size exceeds | |
472 | + | else throw("List size exceeds 40") | |
400 | 473 | ||
401 | - | $f0_2 | |
474 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40) | |
402 | 475 | } | |
403 | 476 | $Tuple2(nil, r) | |
404 | 477 | } | |
427 | 500 | ||
428 | 501 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
429 | 502 | then $a | |
430 | - | else throw("List size exceeds | |
503 | + | else throw("List size exceeds 40") | |
431 | 504 | ||
432 | - | $f0_2 | |
505 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40) | |
433 | 506 | } | |
434 | 507 | $Tuple2(nil, r) | |
435 | 508 | } | |
471 | 544 | ||
472 | 545 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
473 | 546 | then $a | |
474 | - | else throw("List size exceeds | |
547 | + | else throw("List size exceeds 40") | |
475 | 548 | ||
476 | - | $f0_2 | |
549 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40) | |
477 | 550 | } | |
478 | 551 | $Tuple2(nil, r) | |
479 | 552 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let chain = take(drop(this.bytes, 1), 1) | |
5 | 5 | ||
6 | 6 | let usdtAssetId = match chain { | |
7 | 7 | case _ => | |
8 | 8 | if ((base58'2W' == $match0)) | |
9 | 9 | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
10 | 10 | else if ((base58'2T' == $match0)) | |
11 | 11 | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
12 | 12 | else throw("Unknown chain") | |
13 | 13 | } | |
14 | 14 | ||
15 | 15 | let InfraUpgradeCostS = match chain { | |
16 | 16 | case _ => | |
17 | 17 | if ((base58'2W' == $match0)) | |
18 | 18 | then 10000000000 | |
19 | 19 | else if ((base58'2T' == $match0)) | |
20 | 20 | then 100000000 | |
21 | 21 | else throw("Unknown chain") | |
22 | 22 | } | |
23 | 23 | ||
24 | 24 | let MULT6 = 1000000 | |
25 | + | ||
26 | + | let MULT8 = 100000000 | |
25 | 27 | ||
26 | 28 | let LANDPREFIX = "LAND" | |
27 | 29 | ||
28 | 30 | let DUCKPREFIX = "DUCK" | |
29 | 31 | ||
30 | 32 | let SEP = "__" | |
31 | 33 | ||
32 | 34 | let ARTPRESALE = "PRESALE" | |
33 | 35 | ||
34 | 36 | let DAILYRESBYPIECE = 3456000 | |
35 | 37 | ||
36 | 38 | let DAYMILLIS = 86400000 | |
37 | 39 | ||
38 | 40 | let NUMRES = 6 | |
39 | 41 | ||
40 | 42 | let SSIZE = 25 | |
41 | 43 | ||
42 | 44 | let MSIZE = 100 | |
43 | 45 | ||
44 | 46 | let LSIZE = 225 | |
45 | 47 | ||
46 | 48 | let XLSIZE = 400 | |
47 | 49 | ||
48 | 50 | let XXLSIZE = 625 | |
49 | 51 | ||
50 | 52 | let USDTPRIZEPART = 500000 | |
51 | 53 | ||
54 | + | let WHMULTIPLIER = 10000000000 | |
55 | + | ||
52 | 56 | let recLandNum = 0 | |
53 | 57 | ||
54 | 58 | let recLandSize = 1 | |
55 | 59 | ||
56 | 60 | let recTerrains = 2 | |
57 | 61 | ||
58 | 62 | let recContinent = 3 | |
59 | 63 | ||
60 | 64 | let whIdxVol = 0 | |
61 | 65 | ||
62 | 66 | let whIdxRes = 1 | |
63 | 67 | ||
64 | 68 | let whIdxMat = 2 | |
65 | 69 | ||
66 | 70 | let whIdxProd = 3 | |
67 | 71 | ||
68 | 72 | let whIdxLockedVol = 4 | |
69 | 73 | ||
70 | 74 | func keyRestCfg () = "%s__restConfig" | |
71 | 75 | ||
72 | 76 | ||
73 | 77 | let IdxCfgStakingDapp = 1 | |
74 | 78 | ||
75 | 79 | let IdxCfgEconomyDapp = 2 | |
76 | 80 | ||
77 | 81 | let IdxCfgGovernanceDapp = 3 | |
82 | + | ||
83 | + | let productPackages = [10, 10, 10, 100, 100, 100, 10, 10, 10, 100, 100, 100, 10, 10, 10] | |
78 | 84 | ||
79 | 85 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
80 | 86 | ||
81 | 87 | ||
82 | 88 | func readRestCfgOrFail () = split_4C(getStringOrFail(this, keyRestCfg()), SEP) | |
83 | 89 | ||
84 | 90 | ||
85 | 91 | func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx))) | |
86 | 92 | ||
87 | 93 | ||
88 | 94 | let restCfg = readRestCfgOrFail() | |
89 | 95 | ||
90 | 96 | let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp) | |
91 | 97 | ||
92 | 98 | let economyContract = getContractAddressOrFail(restCfg, IdxCfgEconomyDapp) | |
93 | 99 | ||
94 | 100 | let governanceContract = getContractAddressOrFail(restCfg, IdxCfgEconomyDapp) | |
95 | 101 | ||
96 | 102 | func keyBlocked () = "contractsBlocked" | |
97 | 103 | ||
98 | 104 | ||
99 | 105 | func keyDuckIdToOwner (assetId) = ("duckOwner_" + assetId) | |
100 | 106 | ||
101 | 107 | ||
102 | 108 | func keyStakedTimeByAssetId (assetId) = ("stakedTime_" + assetId) | |
103 | 109 | ||
104 | 110 | ||
105 | 111 | func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr) | |
106 | 112 | ||
107 | 113 | ||
108 | 114 | func keyStakedTimeByTypeAssetIdAndOwner (nftType,assetId,ownerAddr) = ((((("stakedTimeByTypeAssetIdAndOwner_" + nftType) + "_") + assetId) + "_") + ownerAddr) | |
109 | 115 | ||
110 | 116 | ||
111 | 117 | func keyBackpackByDuck (duckAssetId) = ("backPack_" + duckAssetId) | |
112 | 118 | ||
113 | 119 | ||
114 | 120 | func keyWarehouseByLand (landAssetId) = ("wareHouse_" + landAssetId) | |
115 | 121 | ||
116 | 122 | ||
117 | 123 | func keyDuckLocation (duckAssetId) = ("duckLocation_" + duckAssetId) | |
118 | 124 | ||
119 | 125 | ||
120 | 126 | func keyDuckHealth (duckAssetId) = ("duckHealth_" + duckAssetId) | |
121 | 127 | ||
122 | 128 | ||
123 | 129 | func keyLandAssetIdToOwner (assetId) = ("nftOwner_" + assetId) | |
124 | 130 | ||
125 | 131 | ||
126 | 132 | func keyLandAssetIdToCustomName (assetId) = ("landCustomNameByAssetId_" + assetId) | |
127 | 133 | ||
128 | 134 | ||
129 | 135 | func keyDuckAssetIdToCustomName (assetId) = ("duckCustomNameByAssetId_" + assetId) | |
130 | 136 | ||
131 | 137 | ||
132 | 138 | func keyAddressToCustomName (addr) = ("accountCustomNameByAddr_" + addr) | |
133 | 139 | ||
134 | 140 | ||
135 | 141 | func keyAddressRefBy (addr) = ("accRefBy_" + addr) | |
136 | 142 | ||
137 | 143 | ||
138 | 144 | func keyAddressReferrals (addr) = ("accReferrals_" + addr) | |
139 | 145 | ||
140 | 146 | ||
141 | 147 | func keyInfraLevelByAssetId (assetId) = ("infraLevel_" + assetId) | |
142 | 148 | ||
143 | 149 | ||
144 | 150 | func keyLandArtStatusByTypeAndAssetId (type,assetId) = makeString(["landArtStatus", type, assetId], "_") | |
145 | 151 | ||
146 | 152 | ||
147 | 153 | func keyPresaleArtActivatedByAssetId (assetId) = ("presaleArtActivated_" + assetId) | |
148 | 154 | ||
149 | 155 | ||
150 | 156 | func keyStakedLandsByOwner (ownerAddr) = ("stakedLandsByOwner_" + ownerAddr) | |
151 | 157 | ||
152 | 158 | ||
153 | 159 | func keyLastTxIdByUser (addr) = ("lastTxIdByUser_" + addr) | |
154 | 160 | ||
155 | 161 | ||
156 | 162 | func keyOrderByLand (landAssetId) = ("landOrder_" + landAssetId) | |
157 | 163 | ||
158 | 164 | ||
159 | 165 | func asString (v) = match v { | |
160 | 166 | case s: String => | |
161 | 167 | s | |
162 | 168 | case _ => | |
163 | 169 | throw("fail to cast into String") | |
164 | 170 | } | |
165 | 171 | ||
166 | 172 | ||
167 | 173 | func asInt (v) = match v { | |
168 | 174 | case n: Int => | |
169 | 175 | n | |
170 | 176 | case _ => | |
171 | 177 | throw("fail to cast into Int") | |
172 | 178 | } | |
173 | 179 | ||
174 | 180 | ||
175 | 181 | func asBoolean (v) = match v { | |
176 | 182 | case s: Boolean => | |
177 | 183 | s | |
178 | 184 | case _ => | |
179 | 185 | throw("fail to cast into Boolean") | |
180 | 186 | } | |
181 | 187 | ||
182 | 188 | ||
183 | 189 | func asListIntCompacted (val) = match val { | |
184 | 190 | case valAnyList: List[Any] => | |
185 | 191 | if ((size(valAnyList) != NUMRES)) | |
186 | 192 | then throw(("Array size is " + toString(size(valAnyList)))) | |
187 | 193 | else { | |
188 | 194 | func conv (acc,item) = match item { | |
189 | 195 | case it: Int => | |
190 | 196 | (acc :+ toString(it)) | |
191 | 197 | case _ => | |
192 | 198 | throw("List type is not Int") | |
193 | 199 | } | |
194 | 200 | ||
195 | 201 | let r = { | |
196 | 202 | let $l = valAnyList | |
197 | 203 | let $s = size($l) | |
198 | 204 | let $acc0 = nil | |
199 | 205 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
200 | 206 | then $a | |
201 | 207 | else conv($a, $l[$i]) | |
202 | 208 | ||
203 | 209 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
204 | 210 | then $a | |
205 | 211 | else throw("List size exceeds 6") | |
206 | 212 | ||
207 | 213 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
208 | 214 | } | |
209 | 215 | makeString(r, "_") | |
210 | 216 | } | |
211 | 217 | case _ => | |
212 | 218 | throw("fail to cast into List") | |
213 | 219 | } | |
214 | 220 | ||
215 | 221 | ||
216 | 222 | func asSplitResult (val) = match val { | |
217 | 223 | case t2: (List[Any], List[Any]) => | |
218 | 224 | $Tuple2(asListIntCompacted(t2._1), asListIntCompacted(t2._2)) | |
219 | 225 | case _ => | |
220 | 226 | throw("fail to cast into (List, List)") | |
221 | 227 | } | |
222 | 228 | ||
223 | 229 | ||
224 | 230 | func walletInternal (userAddressOpt) = { | |
225 | 231 | let addr = addressFromString(userAddressOpt) | |
226 | 232 | let balance = if (isDefined(addr)) | |
227 | 233 | then wavesBalance(value(addr)) | |
228 | 234 | else BalanceDetails(0, 0, 0, 0) | |
229 | 235 | let usdtBalance = if (isDefined(addr)) | |
230 | 236 | then assetBalance(value(addr), usdtAssetId) | |
231 | 237 | else 0 | |
232 | 238 | let customName = valueOrElse(getString(stakingContract, keyAddressToCustomName(userAddressOpt)), userAddressOpt) | |
233 | 239 | let refBy = valueOrElse(getString(stakingContract, keyAddressRefBy(userAddressOpt)), "") | |
234 | 240 | let refs = valueOrElse(getString(stakingContract, keyAddressReferrals(userAddressOpt)), "") | |
235 | 241 | let lastTxId = valueOrElse(getString(stakingContract, keyLastTxIdByUser(userAddressOpt)), "") | |
236 | 242 | [("%s%s__customName__" + customName), ("%s%s__referredBy__" + refBy), ("%s%s__referrals__" + refs), ("%s%s__lastTxId__" + lastTxId), ("%s%s%d__wavesBalance__" + toString(balance.available)), ("%s%s%d__usdtBalance__" + toString(usdtBalance))] | |
237 | 243 | } | |
238 | 244 | ||
239 | 245 | ||
240 | 246 | func applyBonuses (landAssetId,pieces) = { | |
241 | 247 | let infraLevel = valueOrElse(getInteger(stakingContract, keyInfraLevelByAssetId(landAssetId)), 0) | |
242 | 248 | let artPieces = valueOrElse(getInteger(stakingContract, keyLandArtStatusByTypeAndAssetId(ARTPRESALE, landAssetId)), if (valueOrElse(getBoolean(stakingContract, keyPresaleArtActivatedByAssetId(landAssetId)), false)) | |
243 | 249 | then pieces | |
244 | 250 | else 0) | |
245 | 251 | let add6 = (infraLevel / 6) | |
246 | 252 | let add7 = (infraLevel / 7) | |
247 | 253 | $Tuple3(infraLevel, artPieces, ((DAILYRESBYPIECE + fraction(DAILYRESBYPIECE, ((infraLevel + add6) + (2 * add7)), 5)) + fraction(DAILYRESBYPIECE, artPieces, (pieces * 5)))) | |
248 | 254 | } | |
249 | 255 | ||
250 | 256 | ||
251 | 257 | func numPiecesBySize (landSize) = match landSize { | |
252 | 258 | case _ => | |
253 | 259 | if (("S" == $match0)) | |
254 | 260 | then SSIZE | |
255 | 261 | else if (("M" == $match0)) | |
256 | 262 | then MSIZE | |
257 | 263 | else if (("L" == $match0)) | |
258 | 264 | then LSIZE | |
259 | 265 | else if (("XL" == $match0)) | |
260 | 266 | then XLSIZE | |
261 | 267 | else if (("XXL" == $match0)) | |
262 | 268 | then XXLSIZE | |
263 | 269 | else throw("Unknown land size") | |
264 | 270 | } | |
265 | 271 | ||
266 | 272 | ||
267 | - | func getWarehouse (whKey,landIndex,infraLevel) = { | |
273 | + | func getWarehouseTotalVolume (volPrefix) = { | |
274 | + | let parts = split(volPrefix, "_") | |
275 | + | ((WHMULTIPLIER * (parseIntValue(parts[1]) + 1)) * parseIntValue(parts[0])) | |
276 | + | } | |
277 | + | ||
278 | + | ||
279 | + | func getWarehouseOccupiedVol (currentWh) = { | |
280 | + | let goods = currentWh[whIdxProd] | |
281 | + | func sumResMat (acc,item) = (acc + parseIntValue(item)) | |
282 | + | ||
283 | + | func sumProd (acc,item) = { | |
284 | + | let idx = acc._1 | |
285 | + | let pkgSize = productPackages[idx] | |
286 | + | let pkgs = (((parseIntValue(item) + pkgSize) - 1) / pkgSize) | |
287 | + | $Tuple2((idx + 1), (acc._2 + (pkgs * MULT8))) | |
288 | + | } | |
289 | + | ||
290 | + | let whResVol = { | |
291 | + | let $l = split(currentWh[whIdxRes], "_") | |
292 | + | let $s = size($l) | |
293 | + | let $acc0 = 0 | |
294 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
295 | + | then $a | |
296 | + | else sumResMat($a, $l[$i]) | |
297 | + | ||
298 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
299 | + | then $a | |
300 | + | else throw("List size exceeds 6") | |
301 | + | ||
302 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
303 | + | } | |
304 | + | let whMatVol = { | |
305 | + | let $l = split(currentWh[whIdxMat], "_") | |
306 | + | let $s = size($l) | |
307 | + | let $acc0 = 0 | |
308 | + | func $f1_1 ($a,$i) = if (($i >= $s)) | |
309 | + | then $a | |
310 | + | else sumResMat($a, $l[$i]) | |
311 | + | ||
312 | + | func $f1_2 ($a,$i) = if (($i >= $s)) | |
313 | + | then $a | |
314 | + | else throw("List size exceeds 6") | |
315 | + | ||
316 | + | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
317 | + | } | |
318 | + | let whGoodsVol = if ((goods == "")) | |
319 | + | then 0 | |
320 | + | else ( let $l = split_4C(goods, "_") | |
321 | + | let $s = size($l) | |
322 | + | let $acc0 = $Tuple2(0, 0) | |
323 | + | func $f2_1 ($a,$i) = if (($i >= $s)) | |
324 | + | then $a | |
325 | + | else sumProd($a, $l[$i]) | |
326 | + | ||
327 | + | func $f2_2 ($a,$i) = if (($i >= $s)) | |
328 | + | then $a | |
329 | + | else throw("List size exceeds 50") | |
330 | + | ||
331 | + | $f2_2($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50))._2 | |
332 | + | ((whResVol + whMatVol) + whGoodsVol) | |
333 | + | } | |
334 | + | ||
335 | + | ||
336 | + | func getWarehouseExt (whKey,landIndex,infraLevel) = { | |
268 | 337 | let volPrefix = ((toString(landIndex) + "_") + toString(infraLevel)) | |
269 | - | let p = split(valueOrElse(getString(stakingContract, whKey), (volPrefix + ":0_0_0_0_0_0:0_0_0_0_0_0::0")), ":") | |
270 | - | [p[whIdxVol], if ((size(split(p[whIdxRes], "_")) == NUMRES)) | |
271 | - | then p[whIdxRes] | |
272 | - | else "0_0_0_0_0_0", if ((size(split(p[whIdxMat], "_")) == NUMRES)) | |
273 | - | then p[whIdxMat] | |
274 | - | else "0_0_0_0_0_0", p[whIdxProd], if ((5 > size(p))) | |
275 | - | then "0" | |
276 | - | else p[whIdxLockedVol]] | |
338 | + | let whTotal = getWarehouseTotalVolume(volPrefix) | |
339 | + | let whStr = valueOrElse(getString(stakingContract, whKey), (volPrefix + ":0_0_0_0_0_0:0_0_0_0_0_0::0")) | |
340 | + | let wh = split(whStr, ":") | |
341 | + | let whLocked = if ((5 > size(wh))) | |
342 | + | then 0 | |
343 | + | else parseIntValue(wh[whIdxLockedVol]) | |
344 | + | let whOccupied = getWarehouseOccupiedVol(wh) | |
345 | + | [wh[whIdxVol], if ((size(split(wh[whIdxRes], "_")) == NUMRES)) | |
346 | + | then wh[whIdxRes] | |
347 | + | else "0_0_0_0_0_0", if ((size(split(wh[whIdxMat], "_")) == NUMRES)) | |
348 | + | then wh[whIdxMat] | |
349 | + | else "0_0_0_0_0_0", wh[whIdxProd], makeString([toString(whLocked), toString(whOccupied), toString(((whTotal - whLocked) - whOccupied)), toString(whTotal)], "_")] | |
277 | 350 | } | |
278 | 351 | ||
279 | 352 | ||
280 | 353 | func duckInfoTuple (duckAssetId) = $Tuple5(valueOrElse(getInteger(stakingContract, keyStakedTimeByAssetId(duckAssetId)), -1), value(assetInfo(fromBase58String(duckAssetId))).name, valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), ""), valueOrElse(getInteger(stakingContract, keyDuckHealth(duckAssetId)), -1), asString(invoke(stakingContract, "getBackpackREADONLY", [duckAssetId], nil))) | |
281 | 354 | ||
282 | 355 | ||
283 | 356 | func duckInfoArray (duckAssetId,owner,duckInf) = { | |
284 | 357 | let customName = valueOrElse(getString(stakingContract, keyDuckAssetIdToCustomName(duckAssetId)), duckInf._2) | |
285 | 358 | [("%s%s__assetId__" + duckAssetId), ("%s%s__owner__" + owner), ("%s%s__customName__" + customName), ("%s%d__stakedTime__" + toString(duckInf._1)), ("%s%s__name__" + duckInf._2), ("%s%s__location__" + duckInf._3), ("%s%d__health__" + toString(duckInf._4)), ("%s%s__backPack__" + duckInf._5)] | |
286 | 359 | } | |
287 | 360 | ||
288 | 361 | ||
289 | 362 | func landInfoArray (landAssetId,owner,stakedTime) = if ((landAssetId == "")) | |
290 | 363 | then throw("landAssetId is required") | |
291 | 364 | else { | |
292 | 365 | let a = value(assetInfo(fromBase58String(landAssetId))) | |
293 | 366 | let d = split(a.description, "_") | |
294 | 367 | let landNum = if ((a.quantity > 0)) | |
295 | 368 | then d[recLandNum] | |
296 | 369 | else ("-" + d[recLandNum]) | |
297 | 370 | let pieces = numPiecesBySize(d[recLandSize]) | |
298 | 371 | let productivity = applyBonuses(landAssetId, pieces) | |
299 | 372 | let deltaTime = (lastBlock.timestamp - stakedTime) | |
300 | 373 | let availRes = if ((stakedTime > 0)) | |
301 | 374 | then fraction(deltaTime, (productivity._3 * pieces), DAYMILLIS) | |
302 | 375 | else 0 | |
303 | 376 | let needMat = fraction(InfraUpgradeCostS, (pieces * (productivity._1 + 1)), SSIZE) | |
304 | 377 | let globalAndLocal = if ((stakedTime > 0)) | |
305 | 378 | then asSplitResult(invoke(stakingContract, "splitByGlobalAndLocalWeightsREADONLY", [needMat, availRes, d[recTerrains]], nil)) | |
306 | 379 | else $Tuple2(asListIntCompacted(invoke(stakingContract, "splitByGlobalWeightsREADONLY", [needMat], nil)), "") | |
307 | 380 | let customName = valueOrElse(getString(stakingContract, keyLandAssetIdToCustomName(landAssetId)), ((d[recContinent] + "-") + d[recLandNum])) | |
308 | - | [("%s%s__assetId__" + landAssetId), ("%s%s__owner__" + owner), ("%s%s__customName__" + customName), ("%s%d__stakedTime__" + toString(stakedTime)), ("%s%s__description__" + makeString([landNum, d[recLandSize], d[recTerrains], d[recContinent]], "_")), ("%s%d__infraLevel__" + toString(productivity._1)), ("%s%s__availResByType__" + globalAndLocal._2), ("%s%d__availResTotal__" + toString(availRes)), ("%s%s__needMaterial__" + globalAndLocal._1), makeString(["%s%s", "landArtefacts", ("PRESALE:" + toString(productivity._2))], SEP), ("%s%s__warehouse__" + makeString( | |
381 | + | [("%s%s__assetId__" + landAssetId), ("%s%s__owner__" + owner), ("%s%s__customName__" + customName), ("%s%d__stakedTime__" + toString(stakedTime)), ("%s%s__description__" + makeString([landNum, d[recLandSize], d[recTerrains], d[recContinent]], "_")), ("%s%d__infraLevel__" + toString(productivity._1)), ("%s%s__availResByType__" + globalAndLocal._2), ("%s%d__availResTotal__" + toString(availRes)), ("%s%s__needMaterial__" + globalAndLocal._1), makeString(["%s%s", "landArtefacts", ("PRESALE:" + toString(productivity._2))], SEP), ("%s%s__warehouse__" + makeString(getWarehouseExt(keyWarehouseByLand(landAssetId), (pieces / SSIZE), productivity._1), ":")), ("%s%s__landOrder__" + valueOrElse(getString(economyContract, keyOrderByLand(landAssetId)), "0@0_0@0_0@0_0@0_0@0_0@0:0@0_0@0_0@0_0@0_0@0_0@0:"))] | |
309 | 382 | } | |
310 | 383 | ||
311 | 384 | ||
312 | 385 | func landOrderInfoArray (landAssetId,owner) = if ((landAssetId == "")) | |
313 | 386 | then throw("landAssetId is required") | |
314 | 387 | else { | |
315 | 388 | let a = value(assetInfo(fromBase58String(landAssetId))) | |
316 | 389 | let d = split(a.description, "_") | |
317 | 390 | let pieces = numPiecesBySize(d[recLandSize]) | |
318 | 391 | let productivity = applyBonuses(landAssetId, pieces) | |
319 | - | [("%s%s__assetId__" + landAssetId), ("%s%s__owner__" + owner), ("%s%s__warehouse__" + makeString( | |
392 | + | [("%s%s__assetId__" + landAssetId), ("%s%s__owner__" + owner), ("%s%s__warehouse__" + makeString(getWarehouseExt(keyWarehouseByLand(landAssetId), (pieces / SSIZE), productivity._1), ":")), ("%s%s__landOrder__" + valueOrElse(getString(economyContract, keyOrderByLand(landAssetId)), "0@0_0@0_0@0_0@0_0@0_0@0:0@0_0@0_0@0_0@0_0@0_0@0:"))] | |
320 | 393 | } | |
321 | 394 | ||
322 | 395 | ||
323 | 396 | @Callable(i) | |
324 | 397 | func constructorV1 (stakingContract,economyContract,governanceContract) = if ((i.caller != this)) | |
325 | 398 | then throw("permissions denied") | |
326 | 399 | else [StringEntry(keyRestCfg(), makeString(["%s%s%s", stakingContract, economyContract, governanceContract], SEP))] | |
327 | 400 | ||
328 | 401 | ||
329 | 402 | ||
330 | 403 | @Callable(i) | |
331 | 404 | func walletInfoREADONLY (userAddressOpt) = $Tuple2(nil, walletInternal(userAddressOpt)) | |
332 | 405 | ||
333 | 406 | ||
334 | 407 | ||
335 | 408 | @Callable(i) | |
336 | 409 | func duckByOwnerInfoREADONLY (userAddress) = { | |
337 | 410 | let stakedDuck = getString(stakingContract, keyStakedDuckByOwner(userAddress)) | |
338 | 411 | $Tuple2(nil, if (if (isDefined(addressFromString(userAddress))) | |
339 | 412 | then isDefined(stakedDuck) | |
340 | 413 | else false) | |
341 | 414 | then { | |
342 | 415 | let duckAssetId = value(stakedDuck) | |
343 | 416 | duckInfoArray(duckAssetId, userAddress, duckInfoTuple(duckAssetId)) | |
344 | 417 | } | |
345 | 418 | else duckInfoArray("", userAddress, $Tuple5(-1, "", "", -1, ""))) | |
346 | 419 | } | |
347 | 420 | ||
348 | 421 | ||
349 | 422 | ||
350 | 423 | @Callable(i) | |
351 | 424 | func duckByAssetIdInfoREADONLY (duckAssetId) = { | |
352 | 425 | let owner = getString(stakingContract, keyDuckIdToOwner(duckAssetId)) | |
353 | 426 | let duckInf = duckInfoTuple(duckAssetId) | |
354 | 427 | $Tuple2(nil, duckInfoArray(duckAssetId, if (isDefined(owner)) | |
355 | 428 | then value(owner) | |
356 | 429 | else "", duckInfoTuple(duckAssetId))) | |
357 | 430 | } | |
358 | 431 | ||
359 | 432 | ||
360 | 433 | ||
361 | 434 | @Callable(i) | |
362 | 435 | func landByAssetIdInfoREADONLY (landAssetId) = if ((landAssetId == "")) | |
363 | 436 | then throw("landAssetId is required") | |
364 | 437 | else { | |
365 | 438 | let stakedTime = valueOrElse(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)), -1) | |
366 | 439 | let owner = if ((stakedTime > 0)) | |
367 | 440 | then value(getString(stakingContract, keyLandAssetIdToOwner(landAssetId))) | |
368 | 441 | else "" | |
369 | 442 | $Tuple2(nil, landInfoArray(landAssetId, owner, stakedTime)) | |
370 | 443 | } | |
371 | 444 | ||
372 | 445 | ||
373 | 446 | ||
374 | 447 | @Callable(i) | |
375 | 448 | func stakedLandsByOwnerInfoREADONLY (landOwnerAddress) = if ((landOwnerAddress == "")) | |
376 | 449 | then throw("landOwnerAddress is required") | |
377 | 450 | else { | |
378 | 451 | let landsStr = getString(stakingContract, keyStakedLandsByOwner(landOwnerAddress)) | |
379 | 452 | let lands = if (isDefined(landsStr)) | |
380 | 453 | then split_51C(value(landsStr), "_") | |
381 | 454 | else nil | |
382 | 455 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
383 | 456 | then throw("landAssetId is required") | |
384 | 457 | else { | |
385 | 458 | let stakedTime = valueOrElse(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)), -1) | |
386 | 459 | (acc :+ landInfoArray(landAssetId, landOwnerAddress, stakedTime)) | |
387 | 460 | } | |
388 | 461 | ||
389 | 462 | let r = { | |
390 | 463 | let $l = lands | |
391 | 464 | let $s = size($l) | |
392 | 465 | let $acc0 = nil | |
393 | 466 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
394 | 467 | then $a | |
395 | 468 | else oneLand($a, $l[$i]) | |
396 | 469 | ||
397 | 470 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
398 | 471 | then $a | |
399 | - | else throw("List size exceeds | |
472 | + | else throw("List size exceeds 40") | |
400 | 473 | ||
401 | - | $f0_2 | |
474 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40) | |
402 | 475 | } | |
403 | 476 | $Tuple2(nil, r) | |
404 | 477 | } | |
405 | 478 | ||
406 | 479 | ||
407 | 480 | ||
408 | 481 | @Callable(i) | |
409 | 482 | func landsByIdsInfoREADONLY (landAssetIds) = { | |
410 | 483 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
411 | 484 | then throw("landAssetId is required") | |
412 | 485 | else { | |
413 | 486 | let stakedTime = valueOrElse(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)), -1) | |
414 | 487 | let owner = if ((stakedTime > 0)) | |
415 | 488 | then value(getString(stakingContract, keyLandAssetIdToOwner(landAssetId))) | |
416 | 489 | else "" | |
417 | 490 | (acc :+ landInfoArray(landAssetId, owner, stakedTime)) | |
418 | 491 | } | |
419 | 492 | ||
420 | 493 | let r = { | |
421 | 494 | let $l = landAssetIds | |
422 | 495 | let $s = size($l) | |
423 | 496 | let $acc0 = nil | |
424 | 497 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
425 | 498 | then $a | |
426 | 499 | else oneLand($a, $l[$i]) | |
427 | 500 | ||
428 | 501 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
429 | 502 | then $a | |
430 | - | else throw("List size exceeds | |
503 | + | else throw("List size exceeds 40") | |
431 | 504 | ||
432 | - | $f0_2 | |
505 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40) | |
433 | 506 | } | |
434 | 507 | $Tuple2(nil, r) | |
435 | 508 | } | |
436 | 509 | ||
437 | 510 | ||
438 | 511 | ||
439 | 512 | @Callable(i) | |
440 | 513 | func warehouseOrderByAssetIdInfoREADONLY (landAssetId) = if ((landAssetId == "")) | |
441 | 514 | then throw("landAssetId is required") | |
442 | 515 | else { | |
443 | 516 | let stakedTime = valueOrElse(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)), -1) | |
444 | 517 | let owner = if ((stakedTime > 0)) | |
445 | 518 | then value(getString(stakingContract, keyLandAssetIdToOwner(landAssetId))) | |
446 | 519 | else "" | |
447 | 520 | $Tuple2(nil, landOrderInfoArray(landAssetId, owner)) | |
448 | 521 | } | |
449 | 522 | ||
450 | 523 | ||
451 | 524 | ||
452 | 525 | @Callable(i) | |
453 | 526 | func ordersByLandIdsInfoREADONLY (landAssetIds) = { | |
454 | 527 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
455 | 528 | then throw("landAssetId is required") | |
456 | 529 | else { | |
457 | 530 | let stakedTime = valueOrElse(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)), -1) | |
458 | 531 | let owner = if ((stakedTime > 0)) | |
459 | 532 | then value(getString(stakingContract, keyLandAssetIdToOwner(landAssetId))) | |
460 | 533 | else "" | |
461 | 534 | (acc :+ landOrderInfoArray(landAssetId, owner)) | |
462 | 535 | } | |
463 | 536 | ||
464 | 537 | let r = { | |
465 | 538 | let $l = landAssetIds | |
466 | 539 | let $s = size($l) | |
467 | 540 | let $acc0 = nil | |
468 | 541 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
469 | 542 | then $a | |
470 | 543 | else oneLand($a, $l[$i]) | |
471 | 544 | ||
472 | 545 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
473 | 546 | then $a | |
474 | - | else throw("List size exceeds | |
547 | + | else throw("List size exceeds 40") | |
475 | 548 | ||
476 | - | $f0_2 | |
549 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40) | |
477 | 550 | } | |
478 | 551 | $Tuple2(nil, r) | |
479 | 552 | } | |
480 | 553 | ||
481 | 554 | ||
482 | 555 | ||
483 | 556 | @Callable(i) | |
484 | 557 | func cancelWarehouseOrders (landAssetIds) = if ((i.caller != this)) | |
485 | 558 | then throw("permission denied") | |
486 | 559 | else { | |
487 | 560 | let blocked = getBoolean(stakingContract, keyBlocked()) | |
488 | 561 | if (if (!(isDefined(blocked))) | |
489 | 562 | then true | |
490 | 563 | else (value(blocked) == false)) | |
491 | 564 | then throw("Contracts should be blocked before canceling orders") | |
492 | 565 | else { | |
493 | 566 | func oneLand (a,landAssetId) = if ((landAssetId == "")) | |
494 | 567 | then throw("landAssetId is required") | |
495 | 568 | else { | |
496 | 569 | let c = asBoolean(invoke(economyContract, "setWarehouseOrder", ["0@0_0@0_0@0_0@0_0@0_0@0:0@0_0@0_0@0_0@0_0@0_0@0:", landAssetId], nil)) | |
497 | 570 | if (if (a) | |
498 | 571 | then true | |
499 | 572 | else c) | |
500 | 573 | then !(if (a) | |
501 | 574 | then c | |
502 | 575 | else false) | |
503 | 576 | else false | |
504 | 577 | } | |
505 | 578 | ||
506 | 579 | let r = { | |
507 | 580 | let $l = landAssetIds | |
508 | 581 | let $s = size($l) | |
509 | 582 | let $acc0 = false | |
510 | 583 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
511 | 584 | then $a | |
512 | 585 | else oneLand($a, $l[$i]) | |
513 | 586 | ||
514 | 587 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
515 | 588 | then $a | |
516 | 589 | else throw("List size exceeds 30") | |
517 | 590 | ||
518 | 591 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30) | |
519 | 592 | } | |
520 | 593 | $Tuple2(nil, r) | |
521 | 594 | } | |
522 | 595 | } | |
523 | 596 | ||
524 | 597 | ||
525 | 598 | ||
526 | 599 | @Callable(i) | |
527 | 600 | func replaceBooleanArtifacts (landAssetIds) = if ((i.caller != this)) | |
528 | 601 | then throw("permission denied") | |
529 | 602 | else { | |
530 | 603 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
531 | 604 | then throw("landAssetId is required") | |
532 | 605 | else if (isDefined(getBoolean(stakingContract, keyPresaleArtActivatedByAssetId(landAssetId)))) | |
533 | 606 | then (acc + asInt(invoke(stakingContract, "replaceBooleanArtifact", [landAssetId], nil))) | |
534 | 607 | else acc | |
535 | 608 | ||
536 | 609 | let r = { | |
537 | 610 | let $l = landAssetIds | |
538 | 611 | let $s = size($l) | |
539 | 612 | let $acc0 = 0 | |
540 | 613 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
541 | 614 | then $a | |
542 | 615 | else oneLand($a, $l[$i]) | |
543 | 616 | ||
544 | 617 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
545 | 618 | then $a | |
546 | 619 | else throw("List size exceeds 25") | |
547 | 620 | ||
548 | 621 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25) | |
549 | 622 | } | |
550 | 623 | $Tuple2(nil, r) | |
551 | 624 | } | |
552 | 625 | ||
553 | 626 | ||
554 | 627 | ||
555 | 628 | @Callable(i) | |
556 | 629 | func sendUsdtPrize (userAddress) = if ((i.caller != stakingContract)) | |
557 | 630 | then throw("permission denied") | |
558 | 631 | else { | |
559 | 632 | let amt = fraction(assetBalance(this, usdtAssetId), USDTPRIZEPART, MULT6) | |
560 | 633 | $Tuple2([ScriptTransfer(addressFromStringValue(userAddress), amt, usdtAssetId)], amt) | |
561 | 634 | } | |
562 | 635 | ||
563 | 636 |
github/deemru/w8io/026f985 105.28 ms ◑