tx · Ahxab9SswMdm24fP1JLXCADFUEhd2onMK7XvzAHYEoaZ 3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy: -0.01800000 Waves 2023.06.07 22:03 [2612642] smart account 3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy > SELF 0.00000000 Waves
{ "type": 13, "id": "Ahxab9SswMdm24fP1JLXCADFUEhd2onMK7XvzAHYEoaZ", "fee": 1800000, "feeAssetId": null, "timestamp": 1686164619286, "version": 2, "chainId": 84, "sender": "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy", "senderPublicKey": "C3PaRKeL8AUKbwUqdniMQtThgcTh5DYHV1777Hkxy7rp", "proofs": [ "4xcXPpH47BM6EZzMrXHc5Yzp67nzR7HvUtTFGNPrF5ePijFEYpufKjGarcTTd79TWjck2Huk4egaS33qr6cRZYEM" ], "script": "base64:BgJACAISAwoBGBIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSAwoBGBIDCgEIEgMKARgSAwoBGBIDCgEYEgMKAQgSAEYABWNoYWluCQDJAQIJAMoBAggFBHRoaXMFYnl0ZXMAAQABAAt1c2R0QXNzZXRJZAQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMAEghNp6sggDP07Ru8qO7ouTvMmC3Qtd+geWqNQj+agP/7kDCQAAAgEBVAUHJG1hdGNoMAEgVbHYn3KHgu/l41uNrAWrZd6aQ6EvFrsF8xq3h6XxxRgJAAIBAg1Vbmtub3duIGNoYWluABVkZWZhdWx0UmVzdEFkZHJlc3NTdHIEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDACIzNQUUN1dkZidmg0TGtQVW5yblUxejNqbmJBMXA5bTNXTmh2AwkAAAIBAVQFByRtYXRjaDACIzNNdW1rR0d6dENLQVhwV0RxeGtkZG9mcVhTVWJxUWt2U0p5CQACAQINVW5rbm93biBjaGFpbgARSW5mcmFVcGdyYWRlQ29zdFMEByRtYXRjaDAFBWNoYWluAwkAAAIB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AZyZXN1bHQJAKwCAgIcJXMlc19fZW1lcmdlbmN5U2VydmljZURhdGFfXwUBcwkAlAoCBQNuaWwFBnJlc3VsdADpx0Tx", "height": 2612642, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Do714kwTAiETwg575wS3t5gWByraDb8Q49SbXbUpmkvM Next: 6S3RgLgoCvibn8UKxg6X6SJkDLiwMZtVxMR7Syk46prF Diff:
Old | New | Differences | |
---|---|---|---|
34 | 34 | ||
35 | 35 | let MULT6 = 1000000 | |
36 | 36 | ||
37 | - | let MULT7 = 10000000 | |
38 | - | ||
39 | - | let MULT8 = 100000000 | |
40 | - | ||
41 | - | let MULT10 = 10000000000 | |
42 | - | ||
43 | - | let LANDPREFIX = "LAND" | |
44 | - | ||
45 | - | let DUCKPREFIX = "DUCK" | |
46 | - | ||
47 | 37 | let ARTPRESALE = "PRESALE" | |
48 | 38 | ||
49 | 39 | let NUMRES = 6 | |
64 | 54 | ||
65 | 55 | let WHMULTIPLIER = 10000000000 | |
66 | 56 | ||
67 | - | let DEFAULTLOCATION = "Africa_F_Africa" | |
68 | - | ||
69 | 57 | let RESOURCEPRICEMIN = 39637 | |
70 | 58 | ||
71 | 59 | let DUTYMAXPACKAGES = 3 | |
74 | 62 | ||
75 | 63 | let EMERGENCYSELLCOEF = 10 | |
76 | 64 | ||
77 | - | let resTypes = ["Oil", "Ore", "Wood", "Sand", "Clay", "Organic"] | |
78 | - | ||
79 | - | let matTypes = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"] | |
80 | - | ||
81 | - | let prodTypes = ["First Aid Kit L1", "First Aid Kit L2", "First Aid Kit L3", "Backpack L1", "Backpack L2", "Backpack L3", "Food Ration L1", "Food Ration L2", "Food Ration L3", "Jet Pack L1", "Jet Pack L2", "Jet Pack L3", "Shield L1", "Shield L2", "Shield L3"] | |
82 | - | ||
83 | - | let continents = ["Asia", "Europe", "Americas", "Oceania", "Africa"] | |
84 | - | ||
85 | 65 | let productionMatrix = ["1_1_1_2_2_5_1_10_0", "2_2_2_4_4_10_1_10_0", "3_3_3_6_6_15_1_10_0", "2_5_5_2_7_5_2_100_1", "4_10_10_4_14_10_2_100_1", "6_15_15_6_21_15_2_100_1", "1_1_1_1_1_8_1_10_2", "2_2_2_2_2_16_1_10_2", "3_3_3_3_3_24_1_10_2", "9_9_1_5_5_1_5_100_3", "18_18_2_10_10_2_5_100_3", "27_27_3_15_15_3_5_100_3", "2_2_1_2_2_2_1_10_4", "4_4_2_4_4_4_1_10_4", "6_6_3_6_6_6_1_10_4"] | |
86 | 66 | ||
87 | - | let contIdxAmericas = 0 | |
88 | - | ||
89 | - | let contIdxEurope = 1 | |
90 | - | ||
91 | - | let contIdxAsia = 2 | |
92 | - | ||
93 | - | let contIdxAfrica = 3 | |
94 | - | ||
95 | - | let contIdxOceania = 4 | |
96 | - | ||
97 | - | let recipeIdxFuel = 0 | |
98 | - | ||
99 | - | let recipeIdxMetal = 1 | |
100 | - | ||
101 | - | let recipeIdxPlank = 2 | |
102 | - | ||
103 | - | let recipeIdxGlass = 3 | |
104 | - | ||
105 | - | let recipeIdxPlastic = 4 | |
106 | - | ||
107 | - | let recipeIdxProtein = 5 | |
108 | - | ||
109 | - | let recipeIdxWeight = 6 | |
110 | - | ||
111 | 67 | let recipeIdxPacksize = 7 | |
112 | - | ||
113 | - | let recipeIdxContinent = 8 | |
114 | 68 | ||
115 | 69 | let recLandNum = 0 | |
116 | 70 | ||
120 | 74 | ||
121 | 75 | let recContinent = 3 | |
122 | 76 | ||
123 | - | let whIdxLevels = 0 | |
124 | - | ||
125 | - | let whIdxRes = 1 | |
126 | - | ||
127 | - | let whIdxMat = 2 | |
128 | - | ||
129 | - | let whIdxProd = 3 | |
130 | - | ||
131 | - | let whIdxLOFT = 4 | |
132 | - | ||
133 | - | let volLocked = 0 | |
134 | - | ||
135 | - | let volOccupied = 1 | |
136 | - | ||
137 | - | let volFree = 2 | |
138 | - | ||
139 | - | let volTotal = 3 | |
140 | - | ||
141 | - | let bpIdxLevel = 0 | |
142 | - | ||
143 | - | let bpIdxRes = 1 | |
144 | - | ||
145 | - | let bpIdxMat = 2 | |
146 | - | ||
147 | - | let bpIdxProd = 3 | |
148 | - | ||
149 | - | func getPkgSize (prodIdx) = parseIntValue(split(productionMatrix[prodIdx], "_")[recipeIdxPacksize]) | |
150 | - | ||
151 | - | ||
152 | 77 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
153 | - | ||
154 | - | ||
155 | - | func getIntOrElse (key,defaultVal) = valueOrElse(getInteger(this, key), defaultVal) | |
156 | 78 | ||
157 | 79 | ||
158 | 80 | let IdxCfgStakingDapp = 1 | |
159 | 81 | ||
160 | 82 | let IdxCfgEconomyDapp = 2 | |
161 | - | ||
162 | - | let IdxCfgGovernanceDapp = 3 | |
163 | - | ||
164 | - | let IdxCfgWlgDapp = 4 | |
165 | 83 | ||
166 | 84 | func keyRestCfg () = "%s__restConfig" | |
167 | 85 | ||
183 | 101 | ||
184 | 102 | let economyContract = getContractAddressOrFail(restCfg, IdxCfgEconomyDapp) | |
185 | 103 | ||
186 | - | let govContract = getContractAddressOrFail(restCfg, IdxCfgGovernanceDapp) | |
187 | - | ||
188 | - | let wlgContract = getContractAddressOrFail(restCfg, IdxCfgWlgDapp) | |
189 | - | ||
190 | 104 | func keyLastTxIdByUser (addr) = ("lastTxIdByUser_" + addr) | |
191 | 105 | ||
192 | 106 | ||
203 | 117 | ||
204 | 118 | ||
205 | 119 | func keyLandArtStatusByTypeAndAssetId (type,assetId) = makeString(["landArtStatus", type, assetId], "_") | |
206 | - | ||
207 | - | ||
208 | - | func keyStakedTimeByTypeAssetIdAndOwner (nftType,assetId,ownerAddr) = ((((("stakedTimeByTypeAssetIdAndOwner_" + nftType) + "_") + assetId) + "_") + ownerAddr) | |
209 | 120 | ||
210 | 121 | ||
211 | 122 | func keyWarehouseByLand (landAssetId) = ("wareHouse_" + landAssetId) | |
232 | 143 | func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr) | |
233 | 144 | ||
234 | 145 | ||
235 | - | func keyBackpackByDuck (duckAssetId) = ("backPack_" + duckAssetId) | |
236 | - | ||
237 | - | ||
238 | 146 | func keyDuckLocation (duckAssetId) = ("duckLocation_" + duckAssetId) | |
239 | 147 | ||
240 | 148 | ||
241 | 149 | func keyDuckHealth (duckAssetId) = ("duckHealth_" + duckAssetId) | |
242 | 150 | ||
243 | 151 | ||
244 | - | func keyResProportions () = "resTypesProportions" | |
245 | - | ||
246 | - | ||
247 | 152 | func keyBlocked () = "contractsBlocked" | |
248 | - | ||
249 | - | ||
250 | - | func keyUserGwlReleaseTime (userAddr) = ("%s%s__userGwlReleaseTime__" + userAddr) | |
251 | 153 | ||
252 | 154 | ||
253 | 155 | func keyOrderByLand (landAssetId) = ("landOrder_" + landAssetId) | |
256 | 158 | func keyDutyWarehouseByType (prodType) = ("dutyWhByProd_" + toString(prodType)) | |
257 | 159 | ||
258 | 160 | ||
259 | - | let locIdxContinent = 0 | |
260 | - | ||
261 | - | let locIdxType = 1 | |
262 | - | ||
263 | - | let locIdxId = 2 | |
264 | - | ||
265 | 161 | func asString (v) = match v { | |
266 | 162 | case s: String => | |
267 | 163 | s | |
268 | 164 | case _ => | |
269 | 165 | throw("fail to cast into String") | |
270 | - | } | |
271 | - | ||
272 | - | ||
273 | - | func asInt (v) = match v { | |
274 | - | case n: Int => | |
275 | - | n | |
276 | - | case _ => | |
277 | - | throw("fail to cast into Int") | |
278 | - | } | |
279 | - | ||
280 | - | ||
281 | - | func asAnyList (v) = match v { | |
282 | - | case l: List[Any] => | |
283 | - | l | |
284 | - | case _ => | |
285 | - | throw("fail to cast into List[Any]") | |
286 | 166 | } | |
287 | 167 | ||
288 | 168 | ||
308 | 188 | then XXLSIZE | |
309 | 189 | else throw("Unknown land size") | |
310 | 190 | } | |
311 | - | ||
312 | - | ||
313 | - | let IdxEffTotal = 0 | |
314 | - | ||
315 | - | let IdxEffUser = 1 | |
316 | - | ||
317 | - | func getVotingPower (userAddrStrOrEmpty) = { | |
318 | - | let props = split(valueOrElse(getString(stakingContract, keyResProportions()), "0_0_0_0_0_0"), "_") | |
319 | - | func adder (acc,item) = (acc + parseIntValue(item)) | |
320 | - | ||
321 | - | let totalPower = { | |
322 | - | let $l = props | |
323 | - | let $s = size($l) | |
324 | - | let $acc0 = 0 | |
325 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
326 | - | then $a | |
327 | - | else adder($a, $l[$i]) | |
328 | - | ||
329 | - | func $f0_2 ($a,$i) = if (($i >= $s)) | |
330 | - | then $a | |
331 | - | else throw("List size exceeds 6") | |
332 | - | ||
333 | - | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
334 | - | } | |
335 | - | let usersPower = if ((userAddrStrOrEmpty == "")) | |
336 | - | then 0 | |
337 | - | else { | |
338 | - | let landsStr = getString(stakingContract, keyStakedLandsByOwner(userAddrStrOrEmpty)) | |
339 | - | let lands = if (isDefined(landsStr)) | |
340 | - | then split_51C(value(landsStr), "_") | |
341 | - | else nil | |
342 | - | func oneLand (acc,landAssetId) = { | |
343 | - | let asset = value(assetInfo(fromBase58String(landAssetId))) | |
344 | - | let landSize = split(asset.description, "_")[recLandSize] | |
345 | - | (acc + numPiecesBySize(landSize)) | |
346 | - | } | |
347 | - | ||
348 | - | let $l = lands | |
349 | - | let $s = size($l) | |
350 | - | let $acc0 = 0 | |
351 | - | func $f1_1 ($a,$i) = if (($i >= $s)) | |
352 | - | then $a | |
353 | - | else oneLand($a, $l[$i]) | |
354 | - | ||
355 | - | func $f1_2 ($a,$i) = if (($i >= $s)) | |
356 | - | then $a | |
357 | - | else throw("List size exceeds 100") | |
358 | - | ||
359 | - | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_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), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
360 | - | } | |
361 | - | [totalPower, usersPower] | |
362 | - | } | |
363 | 191 | ||
364 | 192 | ||
365 | 193 | let USDTPRIZEPART = 500000 |
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 defaultRestAddressStr = match chain { | |
16 | 16 | case _ => | |
17 | 17 | if ((base58'2W' == $match0)) | |
18 | 18 | then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv" | |
19 | 19 | else if ((base58'2T' == $match0)) | |
20 | 20 | then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy" | |
21 | 21 | else throw("Unknown chain") | |
22 | 22 | } | |
23 | 23 | ||
24 | 24 | let InfraUpgradeCostS = match chain { | |
25 | 25 | case _ => | |
26 | 26 | if ((base58'2W' == $match0)) | |
27 | 27 | then 10000000000 | |
28 | 28 | else if ((base58'2T' == $match0)) | |
29 | 29 | then 100000000 | |
30 | 30 | else throw("Unknown chain") | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | let SEP = "__" | |
34 | 34 | ||
35 | 35 | let MULT6 = 1000000 | |
36 | 36 | ||
37 | - | let MULT7 = 10000000 | |
38 | - | ||
39 | - | let MULT8 = 100000000 | |
40 | - | ||
41 | - | let MULT10 = 10000000000 | |
42 | - | ||
43 | - | let LANDPREFIX = "LAND" | |
44 | - | ||
45 | - | let DUCKPREFIX = "DUCK" | |
46 | - | ||
47 | 37 | let ARTPRESALE = "PRESALE" | |
48 | 38 | ||
49 | 39 | let NUMRES = 6 | |
50 | 40 | ||
51 | 41 | let SSIZE = 25 | |
52 | 42 | ||
53 | 43 | let MSIZE = 100 | |
54 | 44 | ||
55 | 45 | let LSIZE = 225 | |
56 | 46 | ||
57 | 47 | let XLSIZE = 400 | |
58 | 48 | ||
59 | 49 | let XXLSIZE = 625 | |
60 | 50 | ||
61 | 51 | let DAILYRESBYPIECE = 3456000 | |
62 | 52 | ||
63 | 53 | let DAYMILLIS = 86400000 | |
64 | 54 | ||
65 | 55 | let WHMULTIPLIER = 10000000000 | |
66 | 56 | ||
67 | - | let DEFAULTLOCATION = "Africa_F_Africa" | |
68 | - | ||
69 | 57 | let RESOURCEPRICEMIN = 39637 | |
70 | 58 | ||
71 | 59 | let DUTYMAXPACKAGES = 3 | |
72 | 60 | ||
73 | 61 | let DUTYBUYCOEF = 4 | |
74 | 62 | ||
75 | 63 | let EMERGENCYSELLCOEF = 10 | |
76 | 64 | ||
77 | - | let resTypes = ["Oil", "Ore", "Wood", "Sand", "Clay", "Organic"] | |
78 | - | ||
79 | - | let matTypes = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"] | |
80 | - | ||
81 | - | let prodTypes = ["First Aid Kit L1", "First Aid Kit L2", "First Aid Kit L3", "Backpack L1", "Backpack L2", "Backpack L3", "Food Ration L1", "Food Ration L2", "Food Ration L3", "Jet Pack L1", "Jet Pack L2", "Jet Pack L3", "Shield L1", "Shield L2", "Shield L3"] | |
82 | - | ||
83 | - | let continents = ["Asia", "Europe", "Americas", "Oceania", "Africa"] | |
84 | - | ||
85 | 65 | let productionMatrix = ["1_1_1_2_2_5_1_10_0", "2_2_2_4_4_10_1_10_0", "3_3_3_6_6_15_1_10_0", "2_5_5_2_7_5_2_100_1", "4_10_10_4_14_10_2_100_1", "6_15_15_6_21_15_2_100_1", "1_1_1_1_1_8_1_10_2", "2_2_2_2_2_16_1_10_2", "3_3_3_3_3_24_1_10_2", "9_9_1_5_5_1_5_100_3", "18_18_2_10_10_2_5_100_3", "27_27_3_15_15_3_5_100_3", "2_2_1_2_2_2_1_10_4", "4_4_2_4_4_4_1_10_4", "6_6_3_6_6_6_1_10_4"] | |
86 | 66 | ||
87 | - | let contIdxAmericas = 0 | |
88 | - | ||
89 | - | let contIdxEurope = 1 | |
90 | - | ||
91 | - | let contIdxAsia = 2 | |
92 | - | ||
93 | - | let contIdxAfrica = 3 | |
94 | - | ||
95 | - | let contIdxOceania = 4 | |
96 | - | ||
97 | - | let recipeIdxFuel = 0 | |
98 | - | ||
99 | - | let recipeIdxMetal = 1 | |
100 | - | ||
101 | - | let recipeIdxPlank = 2 | |
102 | - | ||
103 | - | let recipeIdxGlass = 3 | |
104 | - | ||
105 | - | let recipeIdxPlastic = 4 | |
106 | - | ||
107 | - | let recipeIdxProtein = 5 | |
108 | - | ||
109 | - | let recipeIdxWeight = 6 | |
110 | - | ||
111 | 67 | let recipeIdxPacksize = 7 | |
112 | - | ||
113 | - | let recipeIdxContinent = 8 | |
114 | 68 | ||
115 | 69 | let recLandNum = 0 | |
116 | 70 | ||
117 | 71 | let recLandSize = 1 | |
118 | 72 | ||
119 | 73 | let recTerrains = 2 | |
120 | 74 | ||
121 | 75 | let recContinent = 3 | |
122 | 76 | ||
123 | - | let whIdxLevels = 0 | |
124 | - | ||
125 | - | let whIdxRes = 1 | |
126 | - | ||
127 | - | let whIdxMat = 2 | |
128 | - | ||
129 | - | let whIdxProd = 3 | |
130 | - | ||
131 | - | let whIdxLOFT = 4 | |
132 | - | ||
133 | - | let volLocked = 0 | |
134 | - | ||
135 | - | let volOccupied = 1 | |
136 | - | ||
137 | - | let volFree = 2 | |
138 | - | ||
139 | - | let volTotal = 3 | |
140 | - | ||
141 | - | let bpIdxLevel = 0 | |
142 | - | ||
143 | - | let bpIdxRes = 1 | |
144 | - | ||
145 | - | let bpIdxMat = 2 | |
146 | - | ||
147 | - | let bpIdxProd = 3 | |
148 | - | ||
149 | - | func getPkgSize (prodIdx) = parseIntValue(split(productionMatrix[prodIdx], "_")[recipeIdxPacksize]) | |
150 | - | ||
151 | - | ||
152 | 77 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
153 | - | ||
154 | - | ||
155 | - | func getIntOrElse (key,defaultVal) = valueOrElse(getInteger(this, key), defaultVal) | |
156 | 78 | ||
157 | 79 | ||
158 | 80 | let IdxCfgStakingDapp = 1 | |
159 | 81 | ||
160 | 82 | let IdxCfgEconomyDapp = 2 | |
161 | - | ||
162 | - | let IdxCfgGovernanceDapp = 3 | |
163 | - | ||
164 | - | let IdxCfgWlgDapp = 4 | |
165 | 83 | ||
166 | 84 | func keyRestCfg () = "%s__restConfig" | |
167 | 85 | ||
168 | 86 | ||
169 | 87 | func keyRestAddress () = "%s__restAddr" | |
170 | 88 | ||
171 | 89 | ||
172 | 90 | func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP) | |
173 | 91 | ||
174 | 92 | ||
175 | 93 | func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx))) | |
176 | 94 | ||
177 | 95 | ||
178 | 96 | let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr)) | |
179 | 97 | ||
180 | 98 | let restCfg = readRestCfgOrFail(restContract) | |
181 | 99 | ||
182 | 100 | let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp) | |
183 | 101 | ||
184 | 102 | let economyContract = getContractAddressOrFail(restCfg, IdxCfgEconomyDapp) | |
185 | 103 | ||
186 | - | let govContract = getContractAddressOrFail(restCfg, IdxCfgGovernanceDapp) | |
187 | - | ||
188 | - | let wlgContract = getContractAddressOrFail(restCfg, IdxCfgWlgDapp) | |
189 | - | ||
190 | 104 | func keyLastTxIdByUser (addr) = ("lastTxIdByUser_" + addr) | |
191 | 105 | ||
192 | 106 | ||
193 | 107 | func keyLandAssetIdToOwner (assetId) = ("nftOwner_" + assetId) | |
194 | 108 | ||
195 | 109 | ||
196 | 110 | func keyLandAssetIdToCustomName (assetId) = ("landCustomNameByAssetId_" + assetId) | |
197 | 111 | ||
198 | 112 | ||
199 | 113 | func keyStakedTimeByAssetId (assetId) = ("stakedTime_" + assetId) | |
200 | 114 | ||
201 | 115 | ||
202 | 116 | func keyInfraLevelByAssetId (assetId) = ("infraLevel_" + assetId) | |
203 | 117 | ||
204 | 118 | ||
205 | 119 | func keyLandArtStatusByTypeAndAssetId (type,assetId) = makeString(["landArtStatus", type, assetId], "_") | |
206 | - | ||
207 | - | ||
208 | - | func keyStakedTimeByTypeAssetIdAndOwner (nftType,assetId,ownerAddr) = ((((("stakedTimeByTypeAssetIdAndOwner_" + nftType) + "_") + assetId) + "_") + ownerAddr) | |
209 | 120 | ||
210 | 121 | ||
211 | 122 | func keyWarehouseByLand (landAssetId) = ("wareHouse_" + landAssetId) | |
212 | 123 | ||
213 | 124 | ||
214 | 125 | func keyStakedLandsByOwner (ownerAddr) = ("stakedLandsByOwner_" + ownerAddr) | |
215 | 126 | ||
216 | 127 | ||
217 | 128 | func keyDuckAssetIdToCustomName (assetId) = ("duckCustomNameByAssetId_" + assetId) | |
218 | 129 | ||
219 | 130 | ||
220 | 131 | func keyAddressToCustomName (addr) = ("accountCustomNameByAddr_" + addr) | |
221 | 132 | ||
222 | 133 | ||
223 | 134 | func keyAddressRefBy (addr) = ("accRefBy_" + addr) | |
224 | 135 | ||
225 | 136 | ||
226 | 137 | func keyAddressReferrals (addr) = ("accReferrals_" + addr) | |
227 | 138 | ||
228 | 139 | ||
229 | 140 | func keyDuckIdToOwner (assetId) = ("duckOwner_" + assetId) | |
230 | 141 | ||
231 | 142 | ||
232 | 143 | func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr) | |
233 | 144 | ||
234 | 145 | ||
235 | - | func keyBackpackByDuck (duckAssetId) = ("backPack_" + duckAssetId) | |
236 | - | ||
237 | - | ||
238 | 146 | func keyDuckLocation (duckAssetId) = ("duckLocation_" + duckAssetId) | |
239 | 147 | ||
240 | 148 | ||
241 | 149 | func keyDuckHealth (duckAssetId) = ("duckHealth_" + duckAssetId) | |
242 | 150 | ||
243 | 151 | ||
244 | - | func keyResProportions () = "resTypesProportions" | |
245 | - | ||
246 | - | ||
247 | 152 | func keyBlocked () = "contractsBlocked" | |
248 | - | ||
249 | - | ||
250 | - | func keyUserGwlReleaseTime (userAddr) = ("%s%s__userGwlReleaseTime__" + userAddr) | |
251 | 153 | ||
252 | 154 | ||
253 | 155 | func keyOrderByLand (landAssetId) = ("landOrder_" + landAssetId) | |
254 | 156 | ||
255 | 157 | ||
256 | 158 | func keyDutyWarehouseByType (prodType) = ("dutyWhByProd_" + toString(prodType)) | |
257 | 159 | ||
258 | 160 | ||
259 | - | let locIdxContinent = 0 | |
260 | - | ||
261 | - | let locIdxType = 1 | |
262 | - | ||
263 | - | let locIdxId = 2 | |
264 | - | ||
265 | 161 | func asString (v) = match v { | |
266 | 162 | case s: String => | |
267 | 163 | s | |
268 | 164 | case _ => | |
269 | 165 | throw("fail to cast into String") | |
270 | - | } | |
271 | - | ||
272 | - | ||
273 | - | func asInt (v) = match v { | |
274 | - | case n: Int => | |
275 | - | n | |
276 | - | case _ => | |
277 | - | throw("fail to cast into Int") | |
278 | - | } | |
279 | - | ||
280 | - | ||
281 | - | func asAnyList (v) = match v { | |
282 | - | case l: List[Any] => | |
283 | - | l | |
284 | - | case _ => | |
285 | - | throw("fail to cast into List[Any]") | |
286 | 166 | } | |
287 | 167 | ||
288 | 168 | ||
289 | 169 | func asBoolean (v) = match v { | |
290 | 170 | case s: Boolean => | |
291 | 171 | s | |
292 | 172 | case _ => | |
293 | 173 | throw("fail to cast into Boolean") | |
294 | 174 | } | |
295 | 175 | ||
296 | 176 | ||
297 | 177 | func numPiecesBySize (landSize) = match landSize { | |
298 | 178 | case _ => | |
299 | 179 | if (("S" == $match0)) | |
300 | 180 | then SSIZE | |
301 | 181 | else if (("M" == $match0)) | |
302 | 182 | then MSIZE | |
303 | 183 | else if (("L" == $match0)) | |
304 | 184 | then LSIZE | |
305 | 185 | else if (("XL" == $match0)) | |
306 | 186 | then XLSIZE | |
307 | 187 | else if (("XXL" == $match0)) | |
308 | 188 | then XXLSIZE | |
309 | 189 | else throw("Unknown land size") | |
310 | 190 | } | |
311 | - | ||
312 | - | ||
313 | - | let IdxEffTotal = 0 | |
314 | - | ||
315 | - | let IdxEffUser = 1 | |
316 | - | ||
317 | - | func getVotingPower (userAddrStrOrEmpty) = { | |
318 | - | let props = split(valueOrElse(getString(stakingContract, keyResProportions()), "0_0_0_0_0_0"), "_") | |
319 | - | func adder (acc,item) = (acc + parseIntValue(item)) | |
320 | - | ||
321 | - | let totalPower = { | |
322 | - | let $l = props | |
323 | - | let $s = size($l) | |
324 | - | let $acc0 = 0 | |
325 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
326 | - | then $a | |
327 | - | else adder($a, $l[$i]) | |
328 | - | ||
329 | - | func $f0_2 ($a,$i) = if (($i >= $s)) | |
330 | - | then $a | |
331 | - | else throw("List size exceeds 6") | |
332 | - | ||
333 | - | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
334 | - | } | |
335 | - | let usersPower = if ((userAddrStrOrEmpty == "")) | |
336 | - | then 0 | |
337 | - | else { | |
338 | - | let landsStr = getString(stakingContract, keyStakedLandsByOwner(userAddrStrOrEmpty)) | |
339 | - | let lands = if (isDefined(landsStr)) | |
340 | - | then split_51C(value(landsStr), "_") | |
341 | - | else nil | |
342 | - | func oneLand (acc,landAssetId) = { | |
343 | - | let asset = value(assetInfo(fromBase58String(landAssetId))) | |
344 | - | let landSize = split(asset.description, "_")[recLandSize] | |
345 | - | (acc + numPiecesBySize(landSize)) | |
346 | - | } | |
347 | - | ||
348 | - | let $l = lands | |
349 | - | let $s = size($l) | |
350 | - | let $acc0 = 0 | |
351 | - | func $f1_1 ($a,$i) = if (($i >= $s)) | |
352 | - | then $a | |
353 | - | else oneLand($a, $l[$i]) | |
354 | - | ||
355 | - | func $f1_2 ($a,$i) = if (($i >= $s)) | |
356 | - | then $a | |
357 | - | else throw("List size exceeds 100") | |
358 | - | ||
359 | - | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_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), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
360 | - | } | |
361 | - | [totalPower, usersPower] | |
362 | - | } | |
363 | 191 | ||
364 | 192 | ||
365 | 193 | let USDTPRIZEPART = 500000 | |
366 | 194 | ||
367 | 195 | func asListIntCompacted (val) = match val { | |
368 | 196 | case valAnyList: List[Any] => | |
369 | 197 | if ((size(valAnyList) != NUMRES)) | |
370 | 198 | then throw(("Array size is " + toString(size(valAnyList)))) | |
371 | 199 | else { | |
372 | 200 | func conv (acc,item) = match item { | |
373 | 201 | case it: Int => | |
374 | 202 | (acc :+ toString(it)) | |
375 | 203 | case _ => | |
376 | 204 | throw("List type is not Int") | |
377 | 205 | } | |
378 | 206 | ||
379 | 207 | let r = { | |
380 | 208 | let $l = valAnyList | |
381 | 209 | let $s = size($l) | |
382 | 210 | let $acc0 = nil | |
383 | 211 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
384 | 212 | then $a | |
385 | 213 | else conv($a, $l[$i]) | |
386 | 214 | ||
387 | 215 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
388 | 216 | then $a | |
389 | 217 | else throw("List size exceeds 6") | |
390 | 218 | ||
391 | 219 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
392 | 220 | } | |
393 | 221 | makeString(r, "_") | |
394 | 222 | } | |
395 | 223 | case _ => | |
396 | 224 | throw("fail to cast into List") | |
397 | 225 | } | |
398 | 226 | ||
399 | 227 | ||
400 | 228 | func asSplitResult (val) = match val { | |
401 | 229 | case t2: (List[Any], List[Any]) => | |
402 | 230 | $Tuple2(asListIntCompacted(t2._1), asListIntCompacted(t2._2)) | |
403 | 231 | case _ => | |
404 | 232 | throw("fail to cast into (List, List)") | |
405 | 233 | } | |
406 | 234 | ||
407 | 235 | ||
408 | 236 | func walletInternal (userAddressOpt) = { | |
409 | 237 | let addr = addressFromString(userAddressOpt) | |
410 | 238 | let balance = if (isDefined(addr)) | |
411 | 239 | then wavesBalance(value(addr)) | |
412 | 240 | else BalanceDetails(0, 0, 0, 0) | |
413 | 241 | let usdtBalance = if (isDefined(addr)) | |
414 | 242 | then assetBalance(value(addr), usdtAssetId) | |
415 | 243 | else 0 | |
416 | 244 | let customName = valueOrElse(getString(stakingContract, keyAddressToCustomName(userAddressOpt)), userAddressOpt) | |
417 | 245 | let refBy = valueOrElse(getString(stakingContract, keyAddressRefBy(userAddressOpt)), "") | |
418 | 246 | let refs = valueOrElse(getString(stakingContract, keyAddressReferrals(userAddressOpt)), "") | |
419 | 247 | let lastTxId = valueOrElse(getString(stakingContract, keyLastTxIdByUser(userAddressOpt)), "") | |
420 | 248 | [("%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))] | |
421 | 249 | } | |
422 | 250 | ||
423 | 251 | ||
424 | 252 | func applyBonuses (landAssetId,pieces) = { | |
425 | 253 | let infraLevel = valueOrElse(getInteger(stakingContract, keyInfraLevelByAssetId(landAssetId)), 0) | |
426 | 254 | let artPieces = valueOrElse(getInteger(stakingContract, keyLandArtStatusByTypeAndAssetId(ARTPRESALE, landAssetId)), 0) | |
427 | 255 | let add6 = (infraLevel / 6) | |
428 | 256 | let add7 = (infraLevel / 7) | |
429 | 257 | $Tuple3(infraLevel, artPieces, ((DAILYRESBYPIECE + fraction(DAILYRESBYPIECE, ((infraLevel + add6) + (2 * add7)), 5)) + fraction(DAILYRESBYPIECE, artPieces, (pieces * 5)))) | |
430 | 258 | } | |
431 | 259 | ||
432 | 260 | ||
433 | 261 | func getWarehouseTotalVolume (volPrefix) = { | |
434 | 262 | let parts = split(volPrefix, "_") | |
435 | 263 | ((WHMULTIPLIER * (parseIntValue(parts[1]) + 1)) * parseIntValue(parts[0])) | |
436 | 264 | } | |
437 | 265 | ||
438 | 266 | ||
439 | 267 | func getWarehouse (whKey,landIndex,infraLevel) = { | |
440 | 268 | let volPrefix = ((toString(landIndex) + "_") + toString(infraLevel)) | |
441 | 269 | let totS = toString(getWarehouseTotalVolume(volPrefix)) | |
442 | 270 | let whStr = valueOrElse(getString(stakingContract, whKey), ((((volPrefix + ":0_0_0_0_0_0:0_0_0_0_0_0::0_0_") + totS) + "_") + totS)) | |
443 | 271 | split(whStr, ":") | |
444 | 272 | } | |
445 | 273 | ||
446 | 274 | ||
447 | 275 | 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))) | |
448 | 276 | ||
449 | 277 | ||
450 | 278 | func duckInfoArray (duckAssetId,owner,duckInf) = { | |
451 | 279 | let customName = valueOrElse(getString(stakingContract, keyDuckAssetIdToCustomName(duckAssetId)), duckInf._2) | |
452 | 280 | [("%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)] | |
453 | 281 | } | |
454 | 282 | ||
455 | 283 | ||
456 | 284 | func landInfoArray (landAssetId,owner,stakedTime) = if ((landAssetId == "")) | |
457 | 285 | then throw("landAssetId is required") | |
458 | 286 | else { | |
459 | 287 | let a = value(assetInfo(fromBase58String(landAssetId))) | |
460 | 288 | let d = split(a.description, "_") | |
461 | 289 | let landNum = if ((a.quantity > 0)) | |
462 | 290 | then d[recLandNum] | |
463 | 291 | else ("-" + d[recLandNum]) | |
464 | 292 | let pieces = numPiecesBySize(d[recLandSize]) | |
465 | 293 | let productivity = applyBonuses(landAssetId, pieces) | |
466 | 294 | let deltaTime = (lastBlock.timestamp - stakedTime) | |
467 | 295 | let availRes = if ((stakedTime > 0)) | |
468 | 296 | then fraction(deltaTime, (productivity._3 * pieces), DAYMILLIS) | |
469 | 297 | else 0 | |
470 | 298 | let needMat = fraction(InfraUpgradeCostS, (pieces * (productivity._1 + 1)), SSIZE) | |
471 | 299 | let globalAndLocal = if ((stakedTime > 0)) | |
472 | 300 | then asSplitResult(invoke(stakingContract, "splitByGlobalAndLocalWeightsREADONLY", [needMat, availRes, d[recTerrains]], nil)) | |
473 | 301 | else $Tuple2(asListIntCompacted(invoke(stakingContract, "splitByGlobalWeightsREADONLY", [needMat], nil)), "") | |
474 | 302 | let customName = valueOrElse(getString(stakingContract, keyLandAssetIdToCustomName(landAssetId)), ((d[recContinent] + "-") + d[recLandNum])) | |
475 | 303 | [("%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:"))] | |
476 | 304 | } | |
477 | 305 | ||
478 | 306 | ||
479 | 307 | func landOrderInfoArray (landAssetId,owner) = if ((landAssetId == "")) | |
480 | 308 | then throw("landAssetId is required") | |
481 | 309 | else { | |
482 | 310 | let a = value(assetInfo(fromBase58String(landAssetId))) | |
483 | 311 | let d = split(a.description, "_") | |
484 | 312 | let pieces = numPiecesBySize(d[recLandSize]) | |
485 | 313 | let productivity = applyBonuses(landAssetId, pieces) | |
486 | 314 | [("%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:"))] | |
487 | 315 | } | |
488 | 316 | ||
489 | 317 | ||
490 | 318 | @Callable(i) | |
491 | 319 | func constructorV1 (contracts) = if ((i.caller != this)) | |
492 | 320 | then throw("permissions denied") | |
493 | 321 | else { | |
494 | 322 | func descriptor (acc,ignoredItem) = (acc + "%s") | |
495 | 323 | ||
496 | 324 | let descr = { | |
497 | 325 | let $l = contracts | |
498 | 326 | let $s = size($l) | |
499 | 327 | let $acc0 = "" | |
500 | 328 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
501 | 329 | then $a | |
502 | 330 | else descriptor($a, $l[$i]) | |
503 | 331 | ||
504 | 332 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
505 | 333 | then $a | |
506 | 334 | else throw("List size exceeds 10") | |
507 | 335 | ||
508 | 336 | $f0_2($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) | |
509 | 337 | } | |
510 | 338 | [StringEntry(keyRestCfg(), makeString(descr :: contracts, SEP)), StringEntry(keyRestAddress(), toString(this))] | |
511 | 339 | } | |
512 | 340 | ||
513 | 341 | ||
514 | 342 | ||
515 | 343 | @Callable(i) | |
516 | 344 | func walletInfoREADONLY (userAddressOpt) = $Tuple2(nil, walletInternal(userAddressOpt)) | |
517 | 345 | ||
518 | 346 | ||
519 | 347 | ||
520 | 348 | @Callable(i) | |
521 | 349 | func duckByOwnerInfoREADONLY (userAddress) = { | |
522 | 350 | let stakedDuck = getString(stakingContract, keyStakedDuckByOwner(userAddress)) | |
523 | 351 | $Tuple2(nil, if (if (isDefined(addressFromString(userAddress))) | |
524 | 352 | then isDefined(stakedDuck) | |
525 | 353 | else false) | |
526 | 354 | then { | |
527 | 355 | let duckAssetId = value(stakedDuck) | |
528 | 356 | duckInfoArray(duckAssetId, userAddress, duckInfoTuple(duckAssetId)) | |
529 | 357 | } | |
530 | 358 | else duckInfoArray("", userAddress, $Tuple5(-1, "", "", -1, ""))) | |
531 | 359 | } | |
532 | 360 | ||
533 | 361 | ||
534 | 362 | ||
535 | 363 | @Callable(i) | |
536 | 364 | func duckByAssetIdInfoREADONLY (duckAssetId) = { | |
537 | 365 | let owner = getString(stakingContract, keyDuckIdToOwner(duckAssetId)) | |
538 | 366 | let duckInf = duckInfoTuple(duckAssetId) | |
539 | 367 | $Tuple2(nil, duckInfoArray(duckAssetId, if (isDefined(owner)) | |
540 | 368 | then value(owner) | |
541 | 369 | else "", duckInfoTuple(duckAssetId))) | |
542 | 370 | } | |
543 | 371 | ||
544 | 372 | ||
545 | 373 | ||
546 | 374 | @Callable(i) | |
547 | 375 | func landByAssetIdInfoREADONLY (landAssetId) = if ((landAssetId == "")) | |
548 | 376 | then throw("landAssetId is required") | |
549 | 377 | else { | |
550 | 378 | let stakedTime = valueOrElse(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)), -1) | |
551 | 379 | let owner = if ((stakedTime > 0)) | |
552 | 380 | then value(getString(stakingContract, keyLandAssetIdToOwner(landAssetId))) | |
553 | 381 | else "" | |
554 | 382 | $Tuple2(nil, landInfoArray(landAssetId, owner, stakedTime)) | |
555 | 383 | } | |
556 | 384 | ||
557 | 385 | ||
558 | 386 | ||
559 | 387 | @Callable(i) | |
560 | 388 | func stakedLandsByOwnerInfoREADONLY (landOwnerAddress) = if ((landOwnerAddress == "")) | |
561 | 389 | then throw("landOwnerAddress is required") | |
562 | 390 | else { | |
563 | 391 | let landsStr = getString(stakingContract, keyStakedLandsByOwner(landOwnerAddress)) | |
564 | 392 | let lands = if (isDefined(landsStr)) | |
565 | 393 | then split_51C(value(landsStr), "_") | |
566 | 394 | else nil | |
567 | 395 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
568 | 396 | then throw("landAssetId is required") | |
569 | 397 | else { | |
570 | 398 | let stakedTime = valueOrElse(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)), -1) | |
571 | 399 | (acc :+ landInfoArray(landAssetId, landOwnerAddress, stakedTime)) | |
572 | 400 | } | |
573 | 401 | ||
574 | 402 | let r = { | |
575 | 403 | let $l = lands | |
576 | 404 | let $s = size($l) | |
577 | 405 | let $acc0 = nil | |
578 | 406 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
579 | 407 | then $a | |
580 | 408 | else oneLand($a, $l[$i]) | |
581 | 409 | ||
582 | 410 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
583 | 411 | then $a | |
584 | 412 | else throw("List size exceeds 40") | |
585 | 413 | ||
586 | 414 | $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) | |
587 | 415 | } | |
588 | 416 | $Tuple2(nil, r) | |
589 | 417 | } | |
590 | 418 | ||
591 | 419 | ||
592 | 420 | ||
593 | 421 | @Callable(i) | |
594 | 422 | func landsByIdsInfoREADONLY (landAssetIds) = { | |
595 | 423 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
596 | 424 | then throw("landAssetId is required") | |
597 | 425 | else { | |
598 | 426 | let stakedTime = valueOrElse(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)), -1) | |
599 | 427 | let owner = if ((stakedTime > 0)) | |
600 | 428 | then value(getString(stakingContract, keyLandAssetIdToOwner(landAssetId))) | |
601 | 429 | else "" | |
602 | 430 | (acc :+ landInfoArray(landAssetId, owner, stakedTime)) | |
603 | 431 | } | |
604 | 432 | ||
605 | 433 | let r = { | |
606 | 434 | let $l = landAssetIds | |
607 | 435 | let $s = size($l) | |
608 | 436 | let $acc0 = nil | |
609 | 437 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
610 | 438 | then $a | |
611 | 439 | else oneLand($a, $l[$i]) | |
612 | 440 | ||
613 | 441 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
614 | 442 | then $a | |
615 | 443 | else throw("List size exceeds 40") | |
616 | 444 | ||
617 | 445 | $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) | |
618 | 446 | } | |
619 | 447 | $Tuple2(nil, r) | |
620 | 448 | } | |
621 | 449 | ||
622 | 450 | ||
623 | 451 | ||
624 | 452 | @Callable(i) | |
625 | 453 | func warehouseOrderByAssetIdInfoREADONLY (landAssetId) = if ((landAssetId == "")) | |
626 | 454 | then throw("landAssetId is required") | |
627 | 455 | else { | |
628 | 456 | let stakedTime = valueOrElse(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)), -1) | |
629 | 457 | let owner = if ((stakedTime > 0)) | |
630 | 458 | then value(getString(stakingContract, keyLandAssetIdToOwner(landAssetId))) | |
631 | 459 | else "" | |
632 | 460 | $Tuple2(nil, landOrderInfoArray(landAssetId, owner)) | |
633 | 461 | } | |
634 | 462 | ||
635 | 463 | ||
636 | 464 | ||
637 | 465 | @Callable(i) | |
638 | 466 | func ordersByLandIdsInfoREADONLY (landAssetIds) = { | |
639 | 467 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
640 | 468 | then throw("landAssetId is required") | |
641 | 469 | else { | |
642 | 470 | let stakedTime = valueOrElse(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)), -1) | |
643 | 471 | let owner = if ((stakedTime > 0)) | |
644 | 472 | then value(getString(stakingContract, keyLandAssetIdToOwner(landAssetId))) | |
645 | 473 | else "" | |
646 | 474 | (acc :+ landOrderInfoArray(landAssetId, owner)) | |
647 | 475 | } | |
648 | 476 | ||
649 | 477 | let r = { | |
650 | 478 | let $l = landAssetIds | |
651 | 479 | let $s = size($l) | |
652 | 480 | let $acc0 = nil | |
653 | 481 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
654 | 482 | then $a | |
655 | 483 | else oneLand($a, $l[$i]) | |
656 | 484 | ||
657 | 485 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
658 | 486 | then $a | |
659 | 487 | else throw("List size exceeds 40") | |
660 | 488 | ||
661 | 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) | |
662 | 490 | } | |
663 | 491 | $Tuple2(nil, r) | |
664 | 492 | } | |
665 | 493 | ||
666 | 494 | ||
667 | 495 | ||
668 | 496 | @Callable(i) | |
669 | 497 | func cancelWarehouseOrders (landAssetIds) = if ((i.caller != this)) | |
670 | 498 | then throw("permission denied") | |
671 | 499 | else { | |
672 | 500 | let blocked = getBoolean(stakingContract, keyBlocked()) | |
673 | 501 | if (if (!(isDefined(blocked))) | |
674 | 502 | then true | |
675 | 503 | else (value(blocked) == false)) | |
676 | 504 | then throw("Contracts should be blocked before canceling orders") | |
677 | 505 | else { | |
678 | 506 | func oneLand (a,landAssetId) = if ((landAssetId == "")) | |
679 | 507 | then throw("landAssetId is required") | |
680 | 508 | else { | |
681 | 509 | 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)) | |
682 | 510 | if (if (a) | |
683 | 511 | then true | |
684 | 512 | else c) | |
685 | 513 | then !(if (a) | |
686 | 514 | then c | |
687 | 515 | else false) | |
688 | 516 | else false | |
689 | 517 | } | |
690 | 518 | ||
691 | 519 | let r = { | |
692 | 520 | let $l = landAssetIds | |
693 | 521 | let $s = size($l) | |
694 | 522 | let $acc0 = false | |
695 | 523 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
696 | 524 | then $a | |
697 | 525 | else oneLand($a, $l[$i]) | |
698 | 526 | ||
699 | 527 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
700 | 528 | then $a | |
701 | 529 | else throw("List size exceeds 30") | |
702 | 530 | ||
703 | 531 | $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) | |
704 | 532 | } | |
705 | 533 | $Tuple2(nil, r) | |
706 | 534 | } | |
707 | 535 | } | |
708 | 536 | ||
709 | 537 | ||
710 | 538 | ||
711 | 539 | @Callable(i) | |
712 | 540 | func fixWarehouseFormats (landAssetIds) = if ((i.caller != this)) | |
713 | 541 | then throw("permission denied") | |
714 | 542 | else { | |
715 | 543 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
716 | 544 | then throw("landAssetId is required") | |
717 | 545 | else (acc + size(asString(invoke(stakingContract, "fixWarehouseFormat", [landAssetId], nil)))) | |
718 | 546 | ||
719 | 547 | let r = { | |
720 | 548 | let $l = landAssetIds | |
721 | 549 | let $s = size($l) | |
722 | 550 | let $acc0 = 0 | |
723 | 551 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
724 | 552 | then $a | |
725 | 553 | else oneLand($a, $l[$i]) | |
726 | 554 | ||
727 | 555 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
728 | 556 | then $a | |
729 | 557 | else throw("List size exceeds 25") | |
730 | 558 | ||
731 | 559 | $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) | |
732 | 560 | } | |
733 | 561 | $Tuple2(nil, r) | |
734 | 562 | } | |
735 | 563 | ||
736 | 564 | ||
737 | 565 | ||
738 | 566 | @Callable(i) | |
739 | 567 | func sendUsdtPrize (userAddress) = if ((i.caller != stakingContract)) | |
740 | 568 | then throw("permission denied") | |
741 | 569 | else { | |
742 | 570 | let amt = fraction(assetBalance(this, usdtAssetId), USDTPRIZEPART, MULT6) | |
743 | 571 | $Tuple2([ScriptTransfer(addressFromStringValue(userAddress), amt, usdtAssetId)], amt) | |
744 | 572 | } | |
745 | 573 | ||
746 | 574 | ||
747 | 575 | ||
748 | 576 | @Callable(i) | |
749 | 577 | func getEmergencyServiceDataREADONLY () = { | |
750 | 578 | func singleProd (acc,recipeStr) = { | |
751 | 579 | let n = acc._2 | |
752 | 580 | let recipe = split(recipeStr, "_") | |
753 | 581 | let packSize = parseIntValue(recipe[recipeIdxPacksize]) | |
754 | 582 | let maxAmount = if ((n == 0)) | |
755 | 583 | then (DUTYMAXPACKAGES * packSize) | |
756 | 584 | else 0 | |
757 | 585 | let existAmount = valueOrElse(getInteger(economyContract, keyDutyWarehouseByType(n)), 0) | |
758 | 586 | func addMat (ac,j) = (ac + parseIntValue(recipe[j])) | |
759 | 587 | ||
760 | 588 | let totalMat = { | |
761 | 589 | let $l = [0, 1, 2, 3, 4, 5] | |
762 | 590 | let $s = size($l) | |
763 | 591 | let $acc0 = 0 | |
764 | 592 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
765 | 593 | then $a | |
766 | 594 | else addMat($a, $l[$i]) | |
767 | 595 | ||
768 | 596 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
769 | 597 | then $a | |
770 | 598 | else throw("List size exceeds 6") | |
771 | 599 | ||
772 | 600 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
773 | 601 | } | |
774 | 602 | let buyPrice = fraction((totalMat * DUTYBUYCOEF), RESOURCEPRICEMIN, (packSize * 10)) | |
775 | 603 | let sellPrice = fraction((totalMat * EMERGENCYSELLCOEF), RESOURCEPRICEMIN, (packSize * 10)) | |
776 | 604 | let y = makeString([toString(maxAmount), toString(existAmount), toString(buyPrice), toString(sellPrice)], "_") | |
777 | 605 | $Tuple2((acc._1 :+ y), (n + 1)) | |
778 | 606 | } | |
779 | 607 | ||
780 | 608 | let s = makeString_2C(( let $l = productionMatrix | |
781 | 609 | let $s = size($l) | |
782 | 610 | let $acc0 = $Tuple2(nil, 0) | |
783 | 611 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
784 | 612 | then $a | |
785 | 613 | else singleProd($a, $l[$i]) | |
786 | 614 | ||
787 | 615 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
788 | 616 | then $a | |
789 | 617 | else throw("List size exceeds 50") | |
790 | 618 | ||
791 | 619 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50))._1, ":") | |
792 | 620 | let result = ("%s%s__emergencyServiceData__" + s) | |
793 | 621 | $Tuple2(nil, result) | |
794 | 622 | } | |
795 | 623 | ||
796 | 624 |
github/deemru/w8io/169f3d6 101.28 ms ◑