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