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