tx · HtAsxNwuDdVkabmoNGMS9h26TvRaodhoxcM11FVNSyzR 3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy: -0.01100000 Waves 2023.06.15 22:36 [2624183] smart account 3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy > SELF 0.00000000 Waves
{ "type": 13, "id": "HtAsxNwuDdVkabmoNGMS9h26TvRaodhoxcM11FVNSyzR", "fee": 1100000, "feeAssetId": null, "timestamp": 1686857770104, "version": 2, "chainId": 84, "sender": "3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy", "senderPublicKey": "FsR18761ZAsUqsTd7TK3XmR6bhihs1UXVmpHYxz5JzQ1", "proofs": [ "bEGESj9vHqYBf9diWT1nhFEKRozXE3CYr9TiRTCHVD95MCtcpL19SUxw38Ud2Hgt9S5BzPAiiPPyoMSXwdspjp8" ], "script": "base64:BgIVCAISBQoDCAgIEgMKAQESAwoBARIAgQEABWNoYWluCQDJAQIJAMoBAggFBHRoaXMFYnl0ZXMAAQABAAt1c2R0QXNzZXRJZAQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMAEghNp6sggDP07Ru8qO7ouTvMmC3Qtd+geWqNQj+agP/7kDCQAAAgEBVAUHJG1hdGNoMAEgVbHYn3KHgu/l41uNrAWrZd6aQ6EvFrsF8xq3h6XxxRgJAAIBAg1Vbmtub3duIGNoYWluABVkZWZhdWx0UmVzdEFkZHJlc3NTdHIEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDACIzNQUUN1dkZidmg0TGtQVW5yblUxejNqbmJBMXA5bTNXTmh2AwkAAAIBAVQFByRtYXRjaDACIzNNdW1rR0d6dENLQVhwV0RxeGtkZG9mcVhTVWJxUWt2U0p5CQACAQINVW5rbm93biBjaGFpbgARSW5mcmFVcGdyYWRlQ29zdFMEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDAAgMivoCUDCQAAAgEBVAUHJG1hdG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UaW1lCQBoAgADBQpZRUFSTUlMTElTCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMFDW1hcmtldGluZ0FkZHIFD21hcmtldGluZ0Ftb3VudAUKd2xnQXNzZXRJZAkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDBQh0ZWFtQWRkcgUKdGVhbUFtb3VudAUKd2xnQXNzZXRJZAkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDBQxyZXN0Q29udHJhY3QFCWFjdEFtb3VudAUKd2xnQXNzZXRJZAkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDBQZjYWxsZXIFCnVzZXJBbW91bnQFCndsZ0Fzc2V0SWQJAMwIAgkBDEludGVnZXJFbnRyeQIFFGxhc3RNYXJrZXRpbmdUaW1lS2V5BQNub3cJAMwIAgkBDEludGVnZXJFbnRyeQIFD2xhc3RUZWFtVGltZUtleQUDbm93CQDMCAIJAQxJbnRlZ2VyRW50cnkCBRVsYXN0QWN0aXZpdGllc1RpbWVLZXkFA25vdwkAzAgCCQEMSW50ZWdlckVudHJ5AgULdXNlclRpbWVLZXkFA25vdwUDbmlsAMdfh44=", "height": 2624183, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: H5RbdsG7QRKzR6YpJ7yX4U5aoAJd7dndHaBGmXyvaJAZ Next: CdqR3XTDofvQ9yRXju6iewBEpyHWM6VUcn8jhg3Eb3Tq Full:
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 | 37 | let MULT7 = 10000000 | |
38 | 38 | ||
39 | 39 | let MULT8 = 100000000 | |
40 | 40 | ||
41 | 41 | let MULT10 = 10000000000 | |
42 | 42 | ||
43 | 43 | let LANDPREFIX = "LAND" | |
44 | 44 | ||
45 | 45 | let DUCKPREFIX = "DUCK" | |
46 | 46 | ||
47 | 47 | let ARTPRESALE = "PRESALE" | |
48 | 48 | ||
49 | 49 | let NUMRES = 6 | |
50 | 50 | ||
51 | 51 | let SSIZE = 25 | |
52 | 52 | ||
53 | 53 | let MSIZE = 100 | |
54 | 54 | ||
55 | 55 | let LSIZE = 225 | |
56 | 56 | ||
57 | 57 | let XLSIZE = 400 | |
58 | 58 | ||
59 | 59 | let XXLSIZE = 625 | |
60 | 60 | ||
61 | 61 | let DAILYRESBYPIECE = 3456000 | |
62 | 62 | ||
63 | 63 | let DAYMILLIS = 86400000 | |
64 | 64 | ||
65 | 65 | let WHMULTIPLIER = 10000000000 | |
66 | 66 | ||
67 | 67 | let DEFAULTLOCATION = "Africa_F_Africa" | |
68 | 68 | ||
69 | 69 | let RESOURCEPRICEMIN = 39637 | |
70 | 70 | ||
71 | 71 | let ESMAXPACKAGES = 3 | |
72 | 72 | ||
73 | 73 | let ESBUYCOEF = 4 | |
74 | 74 | ||
75 | 75 | let ESSELLCOEF = 10 | |
76 | 76 | ||
77 | 77 | let MAXHP = 100 | |
78 | 78 | ||
79 | 79 | let resTypes = ["Oil", "Ore", "Wood", "Sand", "Clay", "Organic"] | |
80 | 80 | ||
81 | 81 | let matTypes = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"] | |
82 | 82 | ||
83 | 83 | 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"] | |
84 | 84 | ||
85 | 85 | let continents = ["Americas", "Europe", "Asia", "Africa", "Oceania"] | |
86 | 86 | ||
87 | 87 | 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"] | |
88 | 88 | ||
89 | 89 | let contIdxAmericas = 0 | |
90 | 90 | ||
91 | 91 | let contIdxEurope = 1 | |
92 | 92 | ||
93 | 93 | let contIdxAsia = 2 | |
94 | 94 | ||
95 | 95 | let contIdxAfrica = 3 | |
96 | 96 | ||
97 | 97 | let contIdxOceania = 4 | |
98 | 98 | ||
99 | 99 | let recipeIdxFuel = 0 | |
100 | 100 | ||
101 | 101 | let recipeIdxMetal = 1 | |
102 | 102 | ||
103 | 103 | let recipeIdxPlank = 2 | |
104 | 104 | ||
105 | 105 | let recipeIdxGlass = 3 | |
106 | 106 | ||
107 | 107 | let recipeIdxPlastic = 4 | |
108 | 108 | ||
109 | 109 | let recipeIdxProtein = 5 | |
110 | 110 | ||
111 | 111 | let recipeIdxWeight = 6 | |
112 | 112 | ||
113 | 113 | let recipeIdxPacksize = 7 | |
114 | 114 | ||
115 | 115 | let recipeIdxContinent = 8 | |
116 | 116 | ||
117 | 117 | let recLandNum = 0 | |
118 | 118 | ||
119 | 119 | let recLandSize = 1 | |
120 | 120 | ||
121 | 121 | let recTerrains = 2 | |
122 | 122 | ||
123 | 123 | let recContinent = 3 | |
124 | 124 | ||
125 | 125 | let whIdxLevels = 0 | |
126 | 126 | ||
127 | 127 | let whIdxRes = 1 | |
128 | 128 | ||
129 | 129 | let whIdxMat = 2 | |
130 | 130 | ||
131 | 131 | let whIdxProd = 3 | |
132 | 132 | ||
133 | 133 | let whIdxLOFT = 4 | |
134 | 134 | ||
135 | 135 | let volLocked = 0 | |
136 | 136 | ||
137 | 137 | let volOccupied = 1 | |
138 | 138 | ||
139 | 139 | let volFree = 2 | |
140 | 140 | ||
141 | 141 | let volTotal = 3 | |
142 | 142 | ||
143 | 143 | let bpIdxLevel = 0 | |
144 | 144 | ||
145 | 145 | let bpIdxRes = 1 | |
146 | 146 | ||
147 | 147 | let bpIdxMat = 2 | |
148 | 148 | ||
149 | 149 | let bpIdxProd = 3 | |
150 | 150 | ||
151 | 151 | func getPkgSize (prodIdx) = parseIntValue(split(productionMatrix[prodIdx], "_")[recipeIdxPacksize]) | |
152 | 152 | ||
153 | 153 | ||
154 | 154 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | func getIntOrElse (key,defaultVal) = valueOrElse(getInteger(this, key), defaultVal) | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | let IdxCfgStakingDapp = 1 | |
161 | 161 | ||
162 | 162 | let IdxCfgEconomyDapp = 2 | |
163 | 163 | ||
164 | 164 | let IdxCfgGovernanceDapp = 3 | |
165 | 165 | ||
166 | 166 | let IdxCfgWlgDapp = 4 | |
167 | 167 | ||
168 | 168 | func keyRestCfg () = "%s__restConfig" | |
169 | 169 | ||
170 | 170 | ||
171 | 171 | func keyRestAddress () = "%s__restAddr" | |
172 | 172 | ||
173 | 173 | ||
174 | 174 | func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP) | |
175 | 175 | ||
176 | 176 | ||
177 | 177 | func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx))) | |
178 | 178 | ||
179 | 179 | ||
180 | 180 | let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr)) | |
181 | 181 | ||
182 | 182 | let restCfg = readRestCfgOrFail(restContract) | |
183 | 183 | ||
184 | 184 | let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp) | |
185 | 185 | ||
186 | 186 | let economyContract = getContractAddressOrFail(restCfg, IdxCfgEconomyDapp) | |
187 | 187 | ||
188 | 188 | let govContract = getContractAddressOrFail(restCfg, IdxCfgGovernanceDapp) | |
189 | 189 | ||
190 | 190 | let wlgContract = getContractAddressOrFail(restCfg, IdxCfgWlgDapp) | |
191 | 191 | ||
192 | 192 | func keyLastTxIdByUser (addr) = ("lastTxIdByUser_" + addr) | |
193 | 193 | ||
194 | 194 | ||
195 | 195 | func keyLandAssetIdToOwner (assetId) = ("nftOwner_" + assetId) | |
196 | 196 | ||
197 | 197 | ||
198 | 198 | func keyLandAssetIdToCustomName (assetId) = ("landCustomNameByAssetId_" + assetId) | |
199 | 199 | ||
200 | 200 | ||
201 | 201 | func keyStakedTimeByAssetId (assetId) = ("stakedTime_" + assetId) | |
202 | 202 | ||
203 | 203 | ||
204 | 204 | func keyInfraLevelByAssetId (assetId) = ("infraLevel_" + assetId) | |
205 | 205 | ||
206 | 206 | ||
207 | 207 | func keyLandArtStatusByTypeAndAssetId (type,assetId) = makeString(["landArtStatus", type, assetId], "_") | |
208 | 208 | ||
209 | 209 | ||
210 | 210 | func keyStakedTimeByTypeAssetIdAndOwner (nftType,assetId,ownerAddr) = ((((("stakedTimeByTypeAssetIdAndOwner_" + nftType) + "_") + assetId) + "_") + ownerAddr) | |
211 | 211 | ||
212 | 212 | ||
213 | 213 | func keyWarehouseByLand (landAssetId) = ("wareHouse_" + landAssetId) | |
214 | 214 | ||
215 | 215 | ||
216 | 216 | func keyStakedLandsByOwner (ownerAddr) = ("stakedLandsByOwner_" + ownerAddr) | |
217 | 217 | ||
218 | 218 | ||
219 | 219 | func keyDuckAssetIdToCustomName (assetId) = ("duckCustomNameByAssetId_" + assetId) | |
220 | 220 | ||
221 | 221 | ||
222 | 222 | func keyAddressToCustomName (addr) = ("accountCustomNameByAddr_" + addr) | |
223 | 223 | ||
224 | 224 | ||
225 | 225 | func keyAddressRefBy (addr) = ("accRefBy_" + addr) | |
226 | 226 | ||
227 | 227 | ||
228 | 228 | func keyAddressReferrals (addr) = ("accReferrals_" + addr) | |
229 | 229 | ||
230 | 230 | ||
231 | 231 | func keyDuckIdToOwner (assetId) = ("duckOwner_" + assetId) | |
232 | 232 | ||
233 | 233 | ||
234 | 234 | func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr) | |
235 | 235 | ||
236 | 236 | ||
237 | 237 | func keyBackpackByDuck (duckAssetId) = ("backPack_" + duckAssetId) | |
238 | 238 | ||
239 | 239 | ||
240 | 240 | func keyDuckLocation (duckAssetId) = ("duckLocation_" + duckAssetId) | |
241 | 241 | ||
242 | 242 | ||
243 | 243 | func keyDuckHealth (duckAssetId) = ("duckHealth_" + duckAssetId) | |
244 | 244 | ||
245 | 245 | ||
246 | 246 | func keyResProportions () = "resTypesProportions" | |
247 | 247 | ||
248 | 248 | ||
249 | 249 | func keyBlocked () = "contractsBlocked" | |
250 | 250 | ||
251 | 251 | ||
252 | 252 | func keyUserGwlReleaseTime (userAddr) = ("%s%s__userGwlReleaseTime__" + userAddr) | |
253 | 253 | ||
254 | 254 | ||
255 | 255 | func keyOrderByLand (landAssetId) = ("landOrder_" + landAssetId) | |
256 | 256 | ||
257 | 257 | ||
258 | 258 | func keyEsWarehouse () = "emergencyWarehouseProducts" | |
259 | 259 | ||
260 | 260 | ||
261 | 261 | let locIdxContinent = 0 | |
262 | 262 | ||
263 | 263 | let locIdxType = 1 | |
264 | 264 | ||
265 | 265 | let locIdxId = 2 | |
266 | 266 | ||
267 | 267 | func asString (v) = match v { | |
268 | 268 | case s: String => | |
269 | 269 | s | |
270 | 270 | case _ => | |
271 | 271 | throw("fail to cast into String") | |
272 | 272 | } | |
273 | 273 | ||
274 | 274 | ||
275 | 275 | func asInt (v) = match v { | |
276 | 276 | case n: Int => | |
277 | 277 | n | |
278 | 278 | case _ => | |
279 | 279 | throw("fail to cast into Int") | |
280 | 280 | } | |
281 | 281 | ||
282 | 282 | ||
283 | 283 | func asAnyList (v) = match v { | |
284 | 284 | case l: List[Any] => | |
285 | 285 | l | |
286 | 286 | case _ => | |
287 | 287 | throw("fail to cast into List[Any]") | |
288 | 288 | } | |
289 | 289 | ||
290 | 290 | ||
291 | 291 | func asBoolean (v) = match v { | |
292 | 292 | case s: Boolean => | |
293 | 293 | s | |
294 | 294 | case _ => | |
295 | 295 | throw("fail to cast into Boolean") | |
296 | 296 | } | |
297 | 297 | ||
298 | 298 | ||
299 | 299 | func numPiecesBySize (landSize) = match landSize { | |
300 | 300 | case _ => | |
301 | 301 | if (("S" == $match0)) | |
302 | 302 | then SSIZE | |
303 | 303 | else if (("M" == $match0)) | |
304 | 304 | then MSIZE | |
305 | 305 | else if (("L" == $match0)) | |
306 | 306 | then LSIZE | |
307 | 307 | else if (("XL" == $match0)) | |
308 | 308 | then XLSIZE | |
309 | 309 | else if (("XXL" == $match0)) | |
310 | 310 | then XXLSIZE | |
311 | 311 | else throw("Unknown land size") | |
312 | 312 | } | |
313 | 313 | ||
314 | 314 | ||
315 | 315 | let IdxEffTotal = 0 | |
316 | 316 | ||
317 | 317 | let IdxEffUser = 1 | |
318 | 318 | ||
319 | 319 | func getVotingPower (userAddrStrOrEmpty) = { | |
320 | 320 | let props = split(valueOrElse(getString(stakingContract, keyResProportions()), "0_0_0_0_0_0"), "_") | |
321 | 321 | func adder (acc,item) = (acc + parseIntValue(item)) | |
322 | 322 | ||
323 | 323 | let totalPower = { | |
324 | 324 | let $l = props | |
325 | 325 | let $s = size($l) | |
326 | 326 | let $acc0 = 0 | |
327 | 327 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
328 | 328 | then $a | |
329 | 329 | else adder($a, $l[$i]) | |
330 | 330 | ||
331 | 331 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
332 | 332 | then $a | |
333 | 333 | else throw("List size exceeds 6") | |
334 | 334 | ||
335 | 335 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
336 | 336 | } | |
337 | 337 | let usersPower = if ((userAddrStrOrEmpty == "")) | |
338 | 338 | then 0 | |
339 | 339 | else { | |
340 | 340 | let landsStr = getString(stakingContract, keyStakedLandsByOwner(userAddrStrOrEmpty)) | |
341 | 341 | let lands = if (isDefined(landsStr)) | |
342 | 342 | then split_51C(value(landsStr), "_") | |
343 | 343 | else nil | |
344 | 344 | func oneLand (acc,landAssetId) = { | |
345 | 345 | let asset = value(assetInfo(fromBase58String(landAssetId))) | |
346 | 346 | let landSize = split(asset.description, "_")[recLandSize] | |
347 | 347 | (acc + numPiecesBySize(landSize)) | |
348 | 348 | } | |
349 | 349 | ||
350 | 350 | let $l = lands | |
351 | 351 | let $s = size($l) | |
352 | 352 | let $acc0 = 0 | |
353 | 353 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
354 | 354 | then $a | |
355 | 355 | else oneLand($a, $l[$i]) | |
356 | 356 | ||
357 | 357 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
358 | 358 | then $a | |
359 | 359 | else throw("List size exceeds 100") | |
360 | 360 | ||
361 | 361 | $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) | |
362 | 362 | } | |
363 | 363 | [totalPower, usersPower] | |
364 | 364 | } | |
365 | 365 | ||
366 | 366 | ||
367 | 367 | func getRecipeMaterials (recipe) = { | |
368 | 368 | func addMat (ac,j) = (ac + parseIntValue(recipe[j])) | |
369 | 369 | ||
370 | 370 | let $l = [0, 1, 2, 3, 4, 5] | |
371 | 371 | let $s = size($l) | |
372 | 372 | let $acc0 = 0 | |
373 | 373 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
374 | 374 | then $a | |
375 | 375 | else addMat($a, $l[$i]) | |
376 | 376 | ||
377 | 377 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
378 | 378 | then $a | |
379 | 379 | else throw("List size exceeds 6") | |
380 | 380 | ||
381 | 381 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
382 | 382 | } | |
383 | 383 | ||
384 | 384 | ||
385 | 385 | let MULT14 = 100000000000000 | |
386 | 386 | ||
387 | 387 | let MARKETINGSHARE = 100000 | |
388 | 388 | ||
389 | 389 | let TEAMSHARE = 200000 | |
390 | 390 | ||
391 | 391 | let ACTIVITYSHARE = 100000 | |
392 | 392 | ||
393 | 393 | let PLAYERSHARE = 400000 | |
394 | 394 | ||
395 | 395 | let YEARMILLIS = 31557600000 | |
396 | 396 | ||
397 | 397 | let wlgAssetIdKey = "wlg_assetId" | |
398 | 398 | ||
399 | 399 | let wlgIssueTimeKey = "wlg_issueTime" | |
400 | 400 | ||
401 | 401 | let marketingAddrKey = "marketingAddr" | |
402 | 402 | ||
403 | 403 | let teamAddrKey = "teamAddr" | |
404 | 404 | ||
405 | 405 | let lastMarketingTimeKey = "lastClaimedTime_marketing" | |
406 | 406 | ||
407 | 407 | let lastTeamTimeKey = "lastClaimedTime_team" | |
408 | 408 | ||
409 | 409 | let lastActivitiesTimeKey = "lastClaimedTime_activities" | |
410 | 410 | ||
411 | 411 | func keyLastClaimedTimeByUser (addr) = "lastClaimedTimeUser_ + addr" | |
412 | 412 | ||
413 | 413 | ||
414 | 414 | @Callable(i) | |
415 | 415 | func constructorV1 (restAddr,marketingAddr,teamAddr) = if ((i.caller != this)) | |
416 | 416 | then throw("Permission denied") | |
417 | 417 | else if (isDefined(getString(wlgAssetIdKey))) | |
418 | 418 | then throw("Already initialized") | |
419 | 419 | else { | |
420 | 420 | let issue = Issue("WLGOLD", "WavesLands Gold investment token", MULT14, 8, true, unit, 0) | |
421 | 421 | let assetId = calculateAssetId(issue) | |
422 | 422 | [issue, IntegerEntry(wlgIssueTimeKey, lastBlock.timestamp), BinaryEntry(wlgAssetIdKey, assetId), StringEntry(keyRestAddress(), restAddr), StringEntry(marketingAddrKey, marketingAddr), StringEntry(teamAddrKey, teamAddr)] | |
423 | 423 | } | |
424 | 424 | ||
425 | 425 | ||
426 | 426 | ||
427 | 427 | @Callable(i) | |
428 | 428 | func buyWlg (amount) = nil | |
429 | 429 | ||
430 | 430 | ||
431 | 431 | ||
432 | 432 | @Callable(i) | |
433 | 433 | func sellWlg (amount) = nil | |
434 | 434 | ||
435 | 435 | ||
436 | 436 | ||
437 | 437 | @Callable(i) | |
438 | 438 | func claim () = { | |
439 | 439 | let caller = i.caller | |
440 | 440 | let callerAddr = toString(caller) | |
441 | 441 | let now = lastBlock.timestamp | |
442 | 442 | let issueTime = valueOrErrorMessage(getInteger(wlgIssueTimeKey), "Not initialized") | |
443 | 443 | let wlgAssetId = value(getBinary(wlgAssetIdKey)) | |
444 | 444 | let lastMarketingTime = valueOrElse(getInteger(lastMarketingTimeKey), issueTime) | |
445 | 445 | let marketingAddr = addressFromStringValue(value(getString(marketingAddrKey))) | |
446 | 446 | let marketingAmount = fraction(fraction(MULT14, MARKETINGSHARE, MULT6), (now - lastMarketingTime), YEARMILLIS) | |
447 | 447 | let lastTeamTime = valueOrElse(getInteger(lastTeamTimeKey), issueTime) | |
448 | 448 | let teamAddr = addressFromStringValue(value(getString(teamAddrKey))) | |
449 | 449 | let teamAmount = fraction(fraction(MULT14, TEAMSHARE, MULT6), (now - lastTeamTime), (3 * YEARMILLIS)) | |
450 | 450 | let lastActivitiesTime = valueOrElse(getInteger(lastActivitiesTimeKey), issueTime) | |
451 | 451 | let actAmount = fraction(fraction(MULT14, ACTIVITYSHARE, MULT6), (now - lastActivitiesTime), (3 * YEARMILLIS)) | |
452 | 452 | let userTimeKey = keyLastClaimedTimeByUser(callerAddr) | |
453 | 453 | let lastUserTime = valueOrElse(getInteger(userTimeKey), issueTime) | |
454 | 454 | let eff = getVotingPower(callerAddr) | |
455 | 455 | let userAmount = fraction(fraction(fraction(MULT14, PLAYERSHARE, MULT6), eff[IdxEffUser], eff[IdxEffTotal]), (now - lastUserTime), (3 * YEARMILLIS)) | |
456 | 456 | [ScriptTransfer(marketingAddr, marketingAmount, wlgAssetId), ScriptTransfer(teamAddr, teamAmount, wlgAssetId), ScriptTransfer(restContract, actAmount, wlgAssetId), ScriptTransfer(caller, userAmount, wlgAssetId), IntegerEntry(lastMarketingTimeKey, now), IntegerEntry(lastTeamTimeKey, now), IntegerEntry(lastActivitiesTimeKey, now), IntegerEntry(userTimeKey, now)] | |
457 | 457 | } | |
458 | 458 | ||
459 | 459 |
github/deemru/w8io/026f985 35.62 ms ◑