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