tx · Cyb8hCxo8i4m7RVwPD9uzviw4WkWkshEPUimvLtD2Fmv 3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy: -0.01100000 Waves 2023.06.28 20:30 [2642805] smart account 3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy > SELF 0.00000000 Waves
{ "type": 13, "id": "Cyb8hCxo8i4m7RVwPD9uzviw4WkWkshEPUimvLtD2Fmv", "fee": 1100000, "feeAssetId": null, "timestamp": 1687973494058, "version": 2, "chainId": 84, "sender": "3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy", "senderPublicKey": "FsR18761ZAsUqsTd7TK3XmR6bhihs1UXVmpHYxz5JzQ1", "proofs": [ "64MLcuH2utNwq2af5HLZuv53G5KNqzQkWoeTDVQPrr2vagh7TbKA77D1Xd6Kzf6HgdzhFsJuMAwGk48AYXKwLWwb" ], "script": "base64:BgIZCAISBQoDCAgIEgASABIAEgMKAQgSAwoBCEIBCmtleUJsb2NrZWQAAhBjb250cmFjdHNCbG9ja2VkAAtJZHhFZmZUb3RhbAAAAApJZHhFZmZVc2VyAAEABWNoYWluCQDJAQIJAMoBAggFBHRoaXMFYnl0ZXMAAQABAAt1c2R0QXNzZXRJZAQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMAEghNp6sggDP07Ru8qO7ouTvMmC3Qtd+geWqNQj+agP/7kDCQAAAgEBVAUHJG1hdGNoMAEgVbHYn3KHgu/l41uNrAWrZd6aQ6EvFrsF8xq3h6XxxRgJAAIBAg1Vbmtub3duIGNoYWluABVkZWZhdWx0UmVzdEFkZHJlc3NTdHIEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDACIzNQUUN1dkZidmg0TGtQVW5yblUxejNqbmJBMXA5bTNXTmh2AwkAAAIBAVQFByRtYXRjaDACIzNNdW1rR0d6dENLQVhwV0RxeGtkZG9mcVhTVWJxUWt2U0p5CQACAQINVW5rbm93biBjaGFpbgADU0V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hPQIIBQFpBmNhbGxlcgUPc3Rha2luZ0NvbnRyYWN0CQACAQIRUGVybWlzc2lvbiBkZW5pZWQJAJQKAgkAzAgCCQELRGVsZXRlRW50cnkBCQEYa2V5TGFzdENsYWltZWRUaW1lQnlVc2VyAQUEYWRkcgUDbmlsAAAAfXyqMw==", "height": 2642805, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 466abnDDzXoaujQ9XYrdQ9f4BnXDSkkWyCUSpdmVPBGp Next: 3RGwQj4cUoEMVvJbuDmiiqREfYbdCAdSFUape7GHDtVY Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | ||
4 | + | func a () = "contractsBlocked" | |
5 | 5 | ||
6 | - | let b = { | |
7 | - | let c = a | |
8 | - | if ((base58'2W' == c)) | |
6 | + | ||
7 | + | let b = 0 | |
8 | + | ||
9 | + | let c = 1 | |
10 | + | ||
11 | + | let d = take(drop(this.bytes, 1), 1) | |
12 | + | ||
13 | + | let e = { | |
14 | + | let f = d | |
15 | + | if ((base58'2W' == f)) | |
9 | 16 | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
10 | - | else if ((base58'2T' == | |
17 | + | else if ((base58'2T' == f)) | |
11 | 18 | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
12 | 19 | else throw("Unknown chain") | |
13 | 20 | } | |
14 | 21 | ||
15 | - | let | |
16 | - | let | |
17 | - | if ((base58'2W' == | |
22 | + | let g = { | |
23 | + | let f = d | |
24 | + | if ((base58'2W' == f)) | |
18 | 25 | then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv" | |
19 | - | else if ((base58'2T' == | |
26 | + | else if ((base58'2T' == f)) | |
20 | 27 | then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy" | |
21 | 28 | else throw("Unknown chain") | |
22 | 29 | } | |
23 | 30 | ||
24 | - | let e = { | |
25 | - | let c = a | |
26 | - | if ((base58'2W' == c)) | |
27 | - | then 10000000000 | |
28 | - | else if ((base58'2T' == c)) | |
29 | - | then 100000000 | |
30 | - | else throw("Unknown chain") | |
31 | - | } | |
31 | + | let h = "__" | |
32 | 32 | ||
33 | - | let | |
33 | + | let i = 1000000 | |
34 | 34 | ||
35 | - | let | |
35 | + | let j = 100000000 | |
36 | 36 | ||
37 | - | let | |
37 | + | let k = 25 | |
38 | 38 | ||
39 | - | let | |
39 | + | let l = 100 | |
40 | 40 | ||
41 | - | let | |
41 | + | let m = 225 | |
42 | 42 | ||
43 | - | let | |
43 | + | let n = 400 | |
44 | 44 | ||
45 | - | let | |
45 | + | let o = 625 | |
46 | 46 | ||
47 | - | ||
47 | + | func p (q,r) = valueOrErrorMessage(getString(q, r), makeString(["mandatory ", toString(q), ".", r, " is not defined"], "")) | |
48 | 48 | ||
49 | - | let n = 6 | |
50 | 49 | ||
51 | - | let | |
50 | + | let s = 1 | |
52 | 51 | ||
53 | - | let | |
52 | + | let t = 2 | |
54 | 53 | ||
55 | - | let | |
54 | + | let u = 4 | |
56 | 55 | ||
57 | - | let | |
56 | + | let v = 5 | |
58 | 57 | ||
59 | - | ||
58 | + | func w () = "%s__restConfig" | |
60 | 59 | ||
61 | - | let t = 3456000 | |
62 | 60 | ||
63 | - | ||
61 | + | func x () = "%s__restAddr" | |
64 | 62 | ||
65 | - | let v = 10000000000 | |
66 | 63 | ||
67 | - | ||
64 | + | func y (z) = split_4C(p(z, w()), h) | |
68 | 65 | ||
69 | - | let x = 39637 | |
70 | 66 | ||
71 | - | ||
67 | + | func A (B,C) = valueOrErrorMessage(addressFromString(B[C]), ("Rest cfg doesn't contain address at index " + toString(C))) | |
72 | 68 | ||
73 | - | let z = 4 | |
74 | 69 | ||
75 | - | let | |
70 | + | let D = addressFromStringValue(valueOrElse(getString(this, x()), g)) | |
76 | 71 | ||
77 | - | let B = | |
72 | + | let B = y(D) | |
78 | 73 | ||
79 | - | let | |
74 | + | let E = A(B, s) | |
80 | 75 | ||
81 | - | let | |
76 | + | let F = A(B, t) | |
82 | 77 | ||
83 | - | let | |
78 | + | let G = A(B, u) | |
84 | 79 | ||
85 | - | let F = ["Americas", "Europe", "Asia", "Africa", "Oceania"] | |
86 | - | ||
87 | - | let G = ["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 | - | ||
89 | - | let H = 0 | |
80 | + | let H = A(B, v) | |
90 | 81 | ||
91 | 82 | let I = 1 | |
92 | 83 | ||
93 | - | let J = 2 | |
94 | - | ||
95 | - | let K = 3 | |
96 | - | ||
97 | - | let L = 4 | |
98 | - | ||
99 | - | let M = 0 | |
100 | - | ||
101 | - | let N = 1 | |
102 | - | ||
103 | - | let O = 2 | |
104 | - | ||
105 | - | let P = 3 | |
106 | - | ||
107 | - | let Q = 4 | |
108 | - | ||
109 | - | let R = 5 | |
110 | - | ||
111 | - | let S = 6 | |
112 | - | ||
113 | - | let T = 7 | |
114 | - | ||
115 | - | let U = 8 | |
116 | - | ||
117 | - | let V = 0 | |
118 | - | ||
119 | - | let W = 1 | |
120 | - | ||
121 | - | let X = 2 | |
122 | - | ||
123 | - | let Y = 3 | |
124 | - | ||
125 | - | let Z = 0 | |
126 | - | ||
127 | - | let aa = 1 | |
128 | - | ||
129 | - | let ab = 2 | |
130 | - | ||
131 | - | let ac = 3 | |
132 | - | ||
133 | - | let ad = 4 | |
134 | - | ||
135 | - | let ae = 0 | |
136 | - | ||
137 | - | let af = 1 | |
138 | - | ||
139 | - | let ag = 2 | |
140 | - | ||
141 | - | let ah = 3 | |
142 | - | ||
143 | - | let ai = 0 | |
144 | - | ||
145 | - | let aj = 1 | |
146 | - | ||
147 | - | let ak = 2 | |
148 | - | ||
149 | - | let al = 3 | |
150 | - | ||
151 | - | func am (an) = parseIntValue(split(G[an], "_")[T]) | |
84 | + | func J () = "resTypesProportions" | |
152 | 85 | ||
153 | 86 | ||
154 | - | func | |
87 | + | func K (L) = ("stakedLandsByOwner_" + L) | |
155 | 88 | ||
156 | 89 | ||
157 | - | ||
90 | + | let M = "wlg_issuedAmount" | |
158 | 91 | ||
92 | + | let N = 0 | |
159 | 93 | ||
160 | - | let | |
94 | + | let O = 1 | |
161 | 95 | ||
162 | - | let | |
96 | + | let P = 2 | |
163 | 97 | ||
164 | - | let av = 3 | |
165 | - | ||
166 | - | let aw = 4 | |
167 | - | ||
168 | - | func ax () = "%s__restConfig" | |
169 | - | ||
170 | - | ||
171 | - | func ay () = "%s__restAddr" | |
172 | - | ||
173 | - | ||
174 | - | func az (aA) = split_4C(ao(aA, ax()), f) | |
175 | - | ||
176 | - | ||
177 | - | func aB (aC,aD) = valueOrErrorMessage(addressFromString(aC[aD]), ("Rest cfg doesn't contain address at index " + toString(aD))) | |
178 | - | ||
179 | - | ||
180 | - | let aE = addressFromStringValue(valueOrElse(getString(this, ay()), d)) | |
181 | - | ||
182 | - | let aC = az(aE) | |
183 | - | ||
184 | - | let aF = aB(aC, at) | |
185 | - | ||
186 | - | let aG = aB(aC, au) | |
187 | - | ||
188 | - | let aH = aB(aC, av) | |
189 | - | ||
190 | - | let aI = aB(aC, aw) | |
191 | - | ||
192 | - | func aJ (aK) = ("lastTxIdByUser_" + aK) | |
193 | - | ||
194 | - | ||
195 | - | func aL (aM) = ("nftOwner_" + aM) | |
196 | - | ||
197 | - | ||
198 | - | func aN (aM) = ("landCustomNameByAssetId_" + aM) | |
199 | - | ||
200 | - | ||
201 | - | func aO (aM) = ("stakedTime_" + aM) | |
202 | - | ||
203 | - | ||
204 | - | func aP (aM) = ("infraLevel_" + aM) | |
205 | - | ||
206 | - | ||
207 | - | func aQ (aR,aM) = makeString(["landArtStatus", aR, aM], "_") | |
208 | - | ||
209 | - | ||
210 | - | func aS (aT,aM,aU) = ((((("stakedTimeByTypeAssetIdAndOwner_" + aT) + "_") + aM) + "_") + aU) | |
211 | - | ||
212 | - | ||
213 | - | func aV (aW) = ("wareHouse_" + aW) | |
214 | - | ||
215 | - | ||
216 | - | func aX (aU) = ("stakedLandsByOwner_" + aU) | |
217 | - | ||
218 | - | ||
219 | - | func aY (aU) = ("stakedPiecesByOwner_" + aU) | |
220 | - | ||
221 | - | ||
222 | - | func aZ (aM) = ("duckCustomNameByAssetId_" + aM) | |
223 | - | ||
224 | - | ||
225 | - | func ba (aK) = ("accountCustomNameByAddr_" + aK) | |
226 | - | ||
227 | - | ||
228 | - | func bb (aK) = ("accRefBy_" + aK) | |
229 | - | ||
230 | - | ||
231 | - | func bc (aK) = ("accReferrals_" + aK) | |
232 | - | ||
233 | - | ||
234 | - | func bd (aM) = ("duckOwner_" + aM) | |
235 | - | ||
236 | - | ||
237 | - | func be (aU) = ("stakedDuckByOwner_" + aU) | |
238 | - | ||
239 | - | ||
240 | - | func bf (bg) = ("backPack_" + bg) | |
241 | - | ||
242 | - | ||
243 | - | func bh (bg) = ("duckLocation_" + bg) | |
244 | - | ||
245 | - | ||
246 | - | func bi (bg) = ("duckHealth_" + bg) | |
247 | - | ||
248 | - | ||
249 | - | func bj () = "resTypesProportions" | |
250 | - | ||
251 | - | ||
252 | - | func bk () = "contractsBlocked" | |
253 | - | ||
254 | - | ||
255 | - | func bl (bm) = ("%s%s__userGwlReleaseTime__" + bm) | |
256 | - | ||
257 | - | ||
258 | - | func bn (aW) = ("landOrder_" + aW) | |
259 | - | ||
260 | - | ||
261 | - | func bo () = "emergencyWarehouseProducts" | |
262 | - | ||
263 | - | ||
264 | - | let bp = 0 | |
265 | - | ||
266 | - | let bq = 1 | |
267 | - | ||
268 | - | let br = 2 | |
269 | - | ||
270 | - | func bs (bt) = { | |
271 | - | let c = bt | |
272 | - | if ($isInstanceOf(c, "String")) | |
98 | + | func Q (R) = { | |
99 | + | let f = R | |
100 | + | if ($isInstanceOf(f, "Int")) | |
273 | 101 | then { | |
274 | - | let bu = c | |
275 | - | bu | |
276 | - | } | |
277 | - | else throw("fail to cast into String") | |
278 | - | } | |
279 | - | ||
280 | - | ||
281 | - | func bv (bt) = { | |
282 | - | let c = bt | |
283 | - | if ($isInstanceOf(c, "Int")) | |
284 | - | then { | |
285 | - | let bw = c | |
286 | - | bw | |
102 | + | let S = f | |
103 | + | S | |
287 | 104 | } | |
288 | 105 | else throw("fail to cast into Int") | |
289 | 106 | } | |
290 | 107 | ||
291 | 108 | ||
292 | - | func bx (bt) = { | |
293 | - | let c = bt | |
294 | - | if ($isInstanceOf(c, "List[Any]")) | |
295 | - | then { | |
296 | - | let by = c | |
297 | - | by | |
298 | - | } | |
299 | - | else throw("fail to cast into List[Any]") | |
300 | - | } | |
301 | - | ||
302 | - | ||
303 | - | func bz (bt) = { | |
304 | - | let c = bt | |
305 | - | if ($isInstanceOf(c, "Boolean")) | |
306 | - | then { | |
307 | - | let bu = c | |
308 | - | bu | |
309 | - | } | |
310 | - | else throw("fail to cast into Boolean") | |
311 | - | } | |
312 | - | ||
313 | - | ||
314 | - | func bA (bB) = { | |
315 | - | let c = bB | |
316 | - | if (("S" == c)) | |
317 | - | then o | |
318 | - | else if (("M" == c)) | |
319 | - | then p | |
320 | - | else if (("L" == c)) | |
321 | - | then q | |
322 | - | else if (("XL" == c)) | |
323 | - | then r | |
324 | - | else if (("XXL" == c)) | |
325 | - | then s | |
109 | + | func T (U) = { | |
110 | + | let f = U | |
111 | + | if (("S" == f)) | |
112 | + | then k | |
113 | + | else if (("M" == f)) | |
114 | + | then l | |
115 | + | else if (("L" == f)) | |
116 | + | then m | |
117 | + | else if (("XL" == f)) | |
118 | + | then n | |
119 | + | else if (("XXL" == f)) | |
120 | + | then o | |
326 | 121 | else throw("Unknown land size") | |
327 | 122 | } | |
328 | 123 | ||
329 | 124 | ||
330 | - | let bC = 0 | |
125 | + | func V (W) = { | |
126 | + | let X = split(valueOrElse(getString(E, J()), "0_0_0_0_0_0"), "_") | |
127 | + | func Y (Z,aa) = (Z + parseIntValue(aa)) | |
331 | 128 | ||
332 | - | let bD = 1 | |
129 | + | let ab = { | |
130 | + | let ac = X | |
131 | + | let ad = size(ac) | |
132 | + | let ae = 0 | |
133 | + | func af (ag,ah) = if ((ah >= ad)) | |
134 | + | then ag | |
135 | + | else Y(ag, ac[ah]) | |
333 | 136 | ||
334 | - | func bE (bF) = { | |
335 | - | let bG = split(valueOrElse(getString(aF, bj()), "0_0_0_0_0_0"), "_") | |
336 | - | func bH (bI,bJ) = (bI + parseIntValue(bJ)) | |
337 | - | ||
338 | - | let bK = { | |
339 | - | let bL = bG | |
340 | - | let bM = size(bL) | |
341 | - | let bN = 0 | |
342 | - | func bO (bP,bQ) = if ((bQ >= bM)) | |
343 | - | then bP | |
344 | - | else bH(bP, bL[bQ]) | |
345 | - | ||
346 | - | func bR (bP,bQ) = if ((bQ >= bM)) | |
347 | - | then bP | |
137 | + | func ai (ag,ah) = if ((ah >= ad)) | |
138 | + | then ag | |
348 | 139 | else throw("List size exceeds 6") | |
349 | 140 | ||
350 | - | | |
141 | + | ai(af(af(af(af(af(af(ae, 0), 1), 2), 3), 4), 5), 6) | |
351 | 142 | } | |
352 | - | let | |
143 | + | let aj = if ((W == "")) | |
353 | 144 | then 0 | |
354 | 145 | else { | |
355 | - | let | |
356 | - | let | |
357 | - | then split_51C(value( | |
146 | + | let ak = getString(E, K(W)) | |
147 | + | let al = if (isDefined(ak)) | |
148 | + | then split_51C(value(ak), "_") | |
358 | 149 | else nil | |
359 | - | func | |
360 | - | let | |
361 | - | let | |
362 | - | ( | |
150 | + | func am (Z,an) = { | |
151 | + | let ao = value(assetInfo(fromBase58String(an))) | |
152 | + | let U = split(ao.description, "_")[I] | |
153 | + | (Z + T(U)) | |
363 | 154 | } | |
364 | 155 | ||
365 | - | let | |
366 | - | let | |
367 | - | let | |
368 | - | func | |
369 | - | then | |
370 | - | else | |
156 | + | let ac = al | |
157 | + | let ad = size(ac) | |
158 | + | let ae = 0 | |
159 | + | func ap (ag,ah) = if ((ah >= ad)) | |
160 | + | then ag | |
161 | + | else am(ag, ac[ah]) | |
371 | 162 | ||
372 | - | func | |
373 | - | then | |
163 | + | func aq (ag,ah) = if ((ah >= ad)) | |
164 | + | then ag | |
374 | 165 | else throw("List size exceeds 100") | |
375 | 166 | ||
376 | - | | |
167 | + | aq(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ae, 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) | |
377 | 168 | } | |
378 | - | [ | |
169 | + | [ab, aj] | |
379 | 170 | } | |
380 | 171 | ||
381 | 172 | ||
382 | - | func bZ (ca) = { | |
383 | - | func cb (cc,cd) = (cc + parseIntValue(ca[cd])) | |
384 | - | ||
385 | - | let bL = [0, 1, 2, 3, 4, 5] | |
386 | - | let bM = size(bL) | |
387 | - | let bN = 0 | |
388 | - | func bO (bP,bQ) = if ((bQ >= bM)) | |
389 | - | then bP | |
390 | - | else cb(bP, bL[bQ]) | |
391 | - | ||
392 | - | func bR (bP,bQ) = if ((bQ >= bM)) | |
393 | - | then bP | |
394 | - | else throw("List size exceeds 6") | |
395 | - | ||
396 | - | bR(bO(bO(bO(bO(bO(bO(bN, 0), 1), 2), 3), 4), 5), 6) | |
173 | + | func ar () = { | |
174 | + | let as = valueOrErrorMessage(getInteger(G, M), "WLGOLD is not issued yet") | |
175 | + | let at = assetBalance(F, e) | |
176 | + | let au = assetBalance(D, e) | |
177 | + | let av = assetBalance(G, e) | |
178 | + | let aw = assetBalance(H, e) | |
179 | + | let ax = (((at + au) + av) + aw) | |
180 | + | [as, fraction(ax, j, as), ax, at, au, av, aw] | |
397 | 181 | } | |
398 | 182 | ||
399 | 183 | ||
400 | - | let | |
184 | + | let ay = 100000000000000 | |
401 | 185 | ||
402 | - | let | |
186 | + | let az = 100000 | |
403 | 187 | ||
404 | - | let | |
188 | + | let aA = 200000 | |
405 | 189 | ||
406 | - | let | |
190 | + | let aB = 100000 | |
407 | 191 | ||
408 | - | let | |
192 | + | let aC = 400000 | |
409 | 193 | ||
410 | - | let | |
194 | + | let aD = 31557600000 | |
411 | 195 | ||
412 | - | let | |
196 | + | let aE = 604800000 | |
413 | 197 | ||
414 | - | let | |
198 | + | let aF = 156 | |
415 | 199 | ||
416 | - | let | |
200 | + | let aG = 600000 | |
417 | 201 | ||
418 | - | let | |
202 | + | let aH = 100000000 | |
419 | 203 | ||
420 | - | let | |
204 | + | let aI = 50000000 | |
421 | 205 | ||
422 | - | let | |
206 | + | let aJ = "wlg_assetId" | |
423 | 207 | ||
424 | - | let | |
208 | + | let aK = "wlg_issueTime" | |
425 | 209 | ||
426 | - | let | |
210 | + | let aL = "marketingAddr" | |
427 | 211 | ||
428 | - | let | |
212 | + | let aM = "teamAddr" | |
429 | 213 | ||
430 | - | let | |
214 | + | let aN = "lastClaimedTime_marketing" | |
431 | 215 | ||
432 | - | let | |
216 | + | let aO = "lastClaimedTime_team" | |
433 | 217 | ||
434 | - | let | |
218 | + | let aP = "lastClaimedTime_activities" | |
435 | 219 | ||
436 | - | let cw = "lastClaimedTime_activities" | |
437 | - | ||
438 | - | func cx (aK) = ("lastClaimedTimeUser_" + aK) | |
220 | + | func aQ (aR) = ("lastClaimedTimeUser_" + aR) | |
439 | 221 | ||
440 | 222 | ||
441 | - | func | |
223 | + | func aS (aR) = ("lastArbTimeUser_" + aR) | |
442 | 224 | ||
443 | 225 | ||
444 | - | let | |
226 | + | let aT = "stakersAmountLeft" | |
445 | 227 | ||
446 | - | let | |
228 | + | let aU = "stakersAmountPaidTotal" | |
447 | 229 | ||
448 | - | func | |
230 | + | func aV (aR) = ("stakersAmountPaidUser_" + aR) | |
449 | 231 | ||
450 | 232 | ||
451 | - | let | |
233 | + | let aW = valueOrErrorMessage(getBinary(aJ), "Not initialized yet") | |
452 | 234 | ||
453 | - | let cD = 1 | |
454 | - | ||
455 | - | let cE = 2 | |
456 | - | ||
457 | - | let cF = valueOrErrorMessage(getBinary(cp), "Not initialized yet") | |
458 | - | ||
459 | - | func cG () = if (valueOrElse(getBoolean(aF, bk()), false)) | |
235 | + | func aX () = if (valueOrElse(getBoolean(E, a()), false)) | |
460 | 236 | then throw("Contracts are under maintenance") | |
461 | - | else | |
237 | + | else Q(invoke(E, "saveLastTx", nil, nil)) | |
462 | 238 | ||
463 | 239 | ||
464 | - | func cH () = { | |
465 | - | let cI = valueOrErrorMessage(getInteger(cr), "WLGOLD is not issued yet") | |
466 | - | let cJ = ((assetBalance(aG, b) + assetBalance(aE, b)) + assetBalance(aI, b)) | |
467 | - | [cI, fraction(cJ, i, cI), cJ] | |
468 | - | } | |
469 | - | ||
470 | - | ||
471 | - | func cK (aK) = { | |
472 | - | let cL = valueOrElse(getInteger(cy(aK)), 0) | |
473 | - | let cM = lastBlock.timestamp | |
474 | - | if ((cm > (cM - cL))) | |
240 | + | func aY (aR) = { | |
241 | + | let aZ = valueOrElse(getInteger(aS(aR)), 0) | |
242 | + | let ba = lastBlock.timestamp | |
243 | + | if ((aG > (ba - aZ))) | |
475 | 244 | then throw("Arbitrages are possible once a 10 minutes") | |
476 | 245 | else { | |
477 | - | let | |
478 | - | let | |
479 | - | fraction( | |
246 | + | let bb = V(aR)[c] | |
247 | + | let bc = pow(bb, 0, aI, 8, 8, CEILING) | |
248 | + | fraction(aH, bc, j) | |
480 | 249 | } | |
481 | 250 | } | |
482 | 251 | ||
483 | 252 | ||
484 | - | @Callable( | |
485 | - | func constructorV1 ( | |
253 | + | @Callable(bd) | |
254 | + | func constructorV1 (be,bf,bg) = if ((bd.caller != this)) | |
486 | 255 | then throw("Permission denied") | |
487 | - | else if (isDefined(getBinary( | |
256 | + | else if (isDefined(getBinary(aJ))) | |
488 | 257 | then throw("Already initialized") | |
489 | 258 | else { | |
490 | - | let | |
491 | - | let | |
492 | - | let | |
493 | - | [ | |
259 | + | let as = ay | |
260 | + | let bh = Issue("WLGOLD", "WavesLands Gold investment token", as, 8, true, unit, 0) | |
261 | + | let bi = calculateAssetId(bh) | |
262 | + | [bh, IntegerEntry(aK, lastBlock.timestamp), IntegerEntry(M, as), IntegerEntry(aU, 0), IntegerEntry(aT, fraction(ay, aC, i)), BinaryEntry(aJ, bi), StringEntry(x(), be), StringEntry(aL, bf), StringEntry(aM, bg)] | |
494 | 263 | } | |
495 | 264 | ||
496 | 265 | ||
497 | 266 | ||
498 | - | @Callable( | |
267 | + | @Callable(bd) | |
499 | 268 | func buyWlg () = { | |
500 | - | let | |
501 | - | if ((size( | |
269 | + | let bj = aX() | |
270 | + | if ((size(bd.payments) != 1)) | |
502 | 271 | then throw("exactly 1 payment must be attached") | |
503 | 272 | else { | |
504 | - | let | |
505 | - | let | |
506 | - | let | |
507 | - | if (( | |
273 | + | let bk = bd.payments[0] | |
274 | + | let bl = bk.amount | |
275 | + | let bm = valueOrErrorMessage(bk.assetId, "WAVES can't be used as payment") | |
276 | + | if ((bm != e)) | |
508 | 277 | then throw("USDT payments only!") | |
509 | 278 | else { | |
510 | - | let | |
511 | - | let | |
512 | - | let | |
513 | - | if (( | |
514 | - | then throw((("You can spend max " + toString( | |
279 | + | let bn = bd.caller | |
280 | + | let aR = toString(bn) | |
281 | + | let bo = aY(aR) | |
282 | + | if ((bl > bo)) | |
283 | + | then throw((("You can spend max " + toString(bo)) + " USDT")) | |
515 | 284 | else { | |
516 | - | let | |
517 | - | let | |
518 | - | let | |
519 | - | let | |
520 | - | let | |
521 | - | $Tuple2([Reissue( | |
285 | + | let bp = ar() | |
286 | + | let bq = bp[N] | |
287 | + | let br = fraction(bp[O], 6, 5) | |
288 | + | let bs = fraction(bl, j, br) | |
289 | + | let bt = fraction(bl, bq, (bp[P] - bl)) | |
290 | + | $Tuple2([Reissue(aW, bt, true), IntegerEntry(M, (bq + bt)), IntegerEntry(aS(aR), lastBlock.timestamp), ScriptTransfer(bn, bs, aW)], bj) | |
522 | 291 | } | |
523 | 292 | } | |
524 | 293 | } | |
526 | 295 | ||
527 | 296 | ||
528 | 297 | ||
529 | - | @Callable( | |
298 | + | @Callable(bd) | |
530 | 299 | func sellWlg () = { | |
531 | - | let | |
532 | - | if ((size( | |
300 | + | let bj = aX() | |
301 | + | if ((size(bd.payments) != 1)) | |
533 | 302 | then throw("exactly 1 payment must be attached") | |
534 | 303 | else { | |
535 | - | let | |
536 | - | let | |
537 | - | let | |
538 | - | if (( | |
304 | + | let bk = bd.payments[0] | |
305 | + | let bu = bk.amount | |
306 | + | let bm = valueOrErrorMessage(bk.assetId, "WAVES can't be used as payment") | |
307 | + | if ((bm != aW)) | |
539 | 308 | then throw("WLGOLD payments only!") | |
540 | 309 | else { | |
541 | - | let | |
542 | - | let | |
543 | - | let | |
544 | - | let | |
545 | - | let | |
546 | - | let | |
547 | - | let | |
548 | - | if (( | |
549 | - | then throw((("You can get max " + toString( | |
310 | + | let bn = bd.caller | |
311 | + | let aR = toString(bn) | |
312 | + | let bo = aY(aR) | |
313 | + | let bp = ar() | |
314 | + | let bq = (bp[N] - bu) | |
315 | + | let bv = fraction(bp[O], 4, 5) | |
316 | + | let bw = fraction(bu, bv, j) | |
317 | + | if ((bw > bo)) | |
318 | + | then throw((("You can get max " + toString(bo)) + " USDT")) | |
550 | 319 | else { | |
551 | - | let | |
552 | - | $Tuple2([Burn( | |
320 | + | let bx = fraction(bw, bq, bp[P]) | |
321 | + | $Tuple2([Burn(aW, bx), IntegerEntry(M, (bq - bx)), IntegerEntry(aS(aR), lastBlock.timestamp), ScriptTransfer(bn, bw, e)], bj) | |
553 | 322 | } | |
554 | 323 | } | |
555 | 324 | } | |
557 | 326 | ||
558 | 327 | ||
559 | 328 | ||
560 | - | @Callable( | |
329 | + | @Callable(bd) | |
561 | 330 | func claim () = { | |
562 | - | let | |
563 | - | let | |
564 | - | let | |
565 | - | let | |
566 | - | let | |
567 | - | let | |
568 | - | let | |
569 | - | let | |
570 | - | let | |
571 | - | let | |
572 | - | let | |
573 | - | let | |
574 | - | let | |
575 | - | let | |
576 | - | if (( | |
331 | + | let bj = aX() | |
332 | + | let bn = bd.caller | |
333 | + | let by = toString(bn) | |
334 | + | let ba = lastBlock.timestamp | |
335 | + | let bz = valueOrErrorMessage(getInteger(aK), "Not initialized") | |
336 | + | let bA = valueOrElse(getInteger(aN), bz) | |
337 | + | let bf = addressFromStringValue(value(getString(aL))) | |
338 | + | let bB = fraction(fraction(ay, az, i), (ba - bA), aD) | |
339 | + | let bC = valueOrElse(getInteger(aO), bz) | |
340 | + | let bg = addressFromStringValue(value(getString(aM))) | |
341 | + | let bD = fraction(fraction(ay, aA, i), (ba - bC), (3 * aD)) | |
342 | + | let bE = valueOrElse(getInteger(aP), bz) | |
343 | + | let bF = fraction(fraction(ay, aB, i), (ba - bE), (3 * aD)) | |
344 | + | let bG = ((ba - bz) / aE) | |
345 | + | if ((bG > (aF / 2))) | |
577 | 346 | then throw("Please modify contract for next 1.5 years, according to stats") | |
578 | 347 | else { | |
579 | - | let | |
580 | - | let | |
581 | - | let | |
582 | - | let | |
583 | - | let | |
584 | - | let | |
585 | - | let | |
586 | - | let | |
587 | - | $Tuple2([ScriptTransfer( | |
348 | + | let bH = V(by) | |
349 | + | let bI = bH[b] | |
350 | + | let bJ = valueOrElse(getInteger(aT), 0) | |
351 | + | let bK = fraction(bJ, (2 * bI), (bI + (max([100000, bI]) * (aF - bG)))) | |
352 | + | let bL = aQ(by) | |
353 | + | let bM = valueOrElse(getInteger(bL), bz) | |
354 | + | let bN = fraction(fraction(bK, bH[c], bI), (ba - bM), (3 * aD)) | |
355 | + | let bO = aV(by) | |
356 | + | $Tuple2([ScriptTransfer(bf, bB, aW), ScriptTransfer(bg, bD, aW), ScriptTransfer(D, bF, aW), ScriptTransfer(bn, bN, aW), IntegerEntry(bO, (valueOrElse(getInteger(bO), 0) + bN)), IntegerEntry(aU, (valueOrElse(getInteger(aU), 0) + bN)), IntegerEntry(aT, (bJ - bN)), IntegerEntry(aN, ba), IntegerEntry(aO, ba), IntegerEntry(aP, ba), IntegerEntry(bL, ba)], bj) | |
588 | 357 | } | |
589 | 358 | } | |
590 | 359 | ||
591 | 360 | ||
592 | 361 | ||
593 | - | @Callable( | |
594 | - | func onStakeLand ( | |
362 | + | @Callable(bd) | |
363 | + | func onStakeLand (aR) = if ((bd.caller != E)) | |
595 | 364 | then throw("Permission denied") | |
596 | - | else $Tuple2([IntegerEntry( | |
365 | + | else $Tuple2([IntegerEntry(aQ(aR), lastBlock.timestamp)], lastBlock.timestamp) | |
597 | 366 | ||
598 | 367 | ||
599 | 368 | ||
600 | - | @Callable( | |
601 | - | func onUnstakeLand ( | |
369 | + | @Callable(bd) | |
370 | + | func onUnstakeLand (aR) = if ((bd.caller != E)) | |
602 | 371 | then throw("Permission denied") | |
603 | - | else $Tuple2([DeleteEntry( | |
372 | + | else $Tuple2([DeleteEntry(aQ(aR))], 0) | |
604 | 373 | ||
605 | 374 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | ||
4 | + | func a () = "contractsBlocked" | |
5 | 5 | ||
6 | - | let b = { | |
7 | - | let c = a | |
8 | - | if ((base58'2W' == c)) | |
6 | + | ||
7 | + | let b = 0 | |
8 | + | ||
9 | + | let c = 1 | |
10 | + | ||
11 | + | let d = take(drop(this.bytes, 1), 1) | |
12 | + | ||
13 | + | let e = { | |
14 | + | let f = d | |
15 | + | if ((base58'2W' == f)) | |
9 | 16 | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
10 | - | else if ((base58'2T' == | |
17 | + | else if ((base58'2T' == f)) | |
11 | 18 | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
12 | 19 | else throw("Unknown chain") | |
13 | 20 | } | |
14 | 21 | ||
15 | - | let | |
16 | - | let | |
17 | - | if ((base58'2W' == | |
22 | + | let g = { | |
23 | + | let f = d | |
24 | + | if ((base58'2W' == f)) | |
18 | 25 | then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv" | |
19 | - | else if ((base58'2T' == | |
26 | + | else if ((base58'2T' == f)) | |
20 | 27 | then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy" | |
21 | 28 | else throw("Unknown chain") | |
22 | 29 | } | |
23 | 30 | ||
24 | - | let e = { | |
25 | - | let c = a | |
26 | - | if ((base58'2W' == c)) | |
27 | - | then 10000000000 | |
28 | - | else if ((base58'2T' == c)) | |
29 | - | then 100000000 | |
30 | - | else throw("Unknown chain") | |
31 | - | } | |
31 | + | let h = "__" | |
32 | 32 | ||
33 | - | let | |
33 | + | let i = 1000000 | |
34 | 34 | ||
35 | - | let | |
35 | + | let j = 100000000 | |
36 | 36 | ||
37 | - | let | |
37 | + | let k = 25 | |
38 | 38 | ||
39 | - | let | |
39 | + | let l = 100 | |
40 | 40 | ||
41 | - | let | |
41 | + | let m = 225 | |
42 | 42 | ||
43 | - | let | |
43 | + | let n = 400 | |
44 | 44 | ||
45 | - | let | |
45 | + | let o = 625 | |
46 | 46 | ||
47 | - | ||
47 | + | func p (q,r) = valueOrErrorMessage(getString(q, r), makeString(["mandatory ", toString(q), ".", r, " is not defined"], "")) | |
48 | 48 | ||
49 | - | let n = 6 | |
50 | 49 | ||
51 | - | let | |
50 | + | let s = 1 | |
52 | 51 | ||
53 | - | let | |
52 | + | let t = 2 | |
54 | 53 | ||
55 | - | let | |
54 | + | let u = 4 | |
56 | 55 | ||
57 | - | let | |
56 | + | let v = 5 | |
58 | 57 | ||
59 | - | ||
58 | + | func w () = "%s__restConfig" | |
60 | 59 | ||
61 | - | let t = 3456000 | |
62 | 60 | ||
63 | - | ||
61 | + | func x () = "%s__restAddr" | |
64 | 62 | ||
65 | - | let v = 10000000000 | |
66 | 63 | ||
67 | - | ||
64 | + | func y (z) = split_4C(p(z, w()), h) | |
68 | 65 | ||
69 | - | let x = 39637 | |
70 | 66 | ||
71 | - | ||
67 | + | func A (B,C) = valueOrErrorMessage(addressFromString(B[C]), ("Rest cfg doesn't contain address at index " + toString(C))) | |
72 | 68 | ||
73 | - | let z = 4 | |
74 | 69 | ||
75 | - | let | |
70 | + | let D = addressFromStringValue(valueOrElse(getString(this, x()), g)) | |
76 | 71 | ||
77 | - | let B = | |
72 | + | let B = y(D) | |
78 | 73 | ||
79 | - | let | |
74 | + | let E = A(B, s) | |
80 | 75 | ||
81 | - | let | |
76 | + | let F = A(B, t) | |
82 | 77 | ||
83 | - | let | |
78 | + | let G = A(B, u) | |
84 | 79 | ||
85 | - | let F = ["Americas", "Europe", "Asia", "Africa", "Oceania"] | |
86 | - | ||
87 | - | let G = ["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 | - | ||
89 | - | let H = 0 | |
80 | + | let H = A(B, v) | |
90 | 81 | ||
91 | 82 | let I = 1 | |
92 | 83 | ||
93 | - | let J = 2 | |
94 | - | ||
95 | - | let K = 3 | |
96 | - | ||
97 | - | let L = 4 | |
98 | - | ||
99 | - | let M = 0 | |
100 | - | ||
101 | - | let N = 1 | |
102 | - | ||
103 | - | let O = 2 | |
104 | - | ||
105 | - | let P = 3 | |
106 | - | ||
107 | - | let Q = 4 | |
108 | - | ||
109 | - | let R = 5 | |
110 | - | ||
111 | - | let S = 6 | |
112 | - | ||
113 | - | let T = 7 | |
114 | - | ||
115 | - | let U = 8 | |
116 | - | ||
117 | - | let V = 0 | |
118 | - | ||
119 | - | let W = 1 | |
120 | - | ||
121 | - | let X = 2 | |
122 | - | ||
123 | - | let Y = 3 | |
124 | - | ||
125 | - | let Z = 0 | |
126 | - | ||
127 | - | let aa = 1 | |
128 | - | ||
129 | - | let ab = 2 | |
130 | - | ||
131 | - | let ac = 3 | |
132 | - | ||
133 | - | let ad = 4 | |
134 | - | ||
135 | - | let ae = 0 | |
136 | - | ||
137 | - | let af = 1 | |
138 | - | ||
139 | - | let ag = 2 | |
140 | - | ||
141 | - | let ah = 3 | |
142 | - | ||
143 | - | let ai = 0 | |
144 | - | ||
145 | - | let aj = 1 | |
146 | - | ||
147 | - | let ak = 2 | |
148 | - | ||
149 | - | let al = 3 | |
150 | - | ||
151 | - | func am (an) = parseIntValue(split(G[an], "_")[T]) | |
84 | + | func J () = "resTypesProportions" | |
152 | 85 | ||
153 | 86 | ||
154 | - | func | |
87 | + | func K (L) = ("stakedLandsByOwner_" + L) | |
155 | 88 | ||
156 | 89 | ||
157 | - | ||
90 | + | let M = "wlg_issuedAmount" | |
158 | 91 | ||
92 | + | let N = 0 | |
159 | 93 | ||
160 | - | let | |
94 | + | let O = 1 | |
161 | 95 | ||
162 | - | let | |
96 | + | let P = 2 | |
163 | 97 | ||
164 | - | let av = 3 | |
165 | - | ||
166 | - | let aw = 4 | |
167 | - | ||
168 | - | func ax () = "%s__restConfig" | |
169 | - | ||
170 | - | ||
171 | - | func ay () = "%s__restAddr" | |
172 | - | ||
173 | - | ||
174 | - | func az (aA) = split_4C(ao(aA, ax()), f) | |
175 | - | ||
176 | - | ||
177 | - | func aB (aC,aD) = valueOrErrorMessage(addressFromString(aC[aD]), ("Rest cfg doesn't contain address at index " + toString(aD))) | |
178 | - | ||
179 | - | ||
180 | - | let aE = addressFromStringValue(valueOrElse(getString(this, ay()), d)) | |
181 | - | ||
182 | - | let aC = az(aE) | |
183 | - | ||
184 | - | let aF = aB(aC, at) | |
185 | - | ||
186 | - | let aG = aB(aC, au) | |
187 | - | ||
188 | - | let aH = aB(aC, av) | |
189 | - | ||
190 | - | let aI = aB(aC, aw) | |
191 | - | ||
192 | - | func aJ (aK) = ("lastTxIdByUser_" + aK) | |
193 | - | ||
194 | - | ||
195 | - | func aL (aM) = ("nftOwner_" + aM) | |
196 | - | ||
197 | - | ||
198 | - | func aN (aM) = ("landCustomNameByAssetId_" + aM) | |
199 | - | ||
200 | - | ||
201 | - | func aO (aM) = ("stakedTime_" + aM) | |
202 | - | ||
203 | - | ||
204 | - | func aP (aM) = ("infraLevel_" + aM) | |
205 | - | ||
206 | - | ||
207 | - | func aQ (aR,aM) = makeString(["landArtStatus", aR, aM], "_") | |
208 | - | ||
209 | - | ||
210 | - | func aS (aT,aM,aU) = ((((("stakedTimeByTypeAssetIdAndOwner_" + aT) + "_") + aM) + "_") + aU) | |
211 | - | ||
212 | - | ||
213 | - | func aV (aW) = ("wareHouse_" + aW) | |
214 | - | ||
215 | - | ||
216 | - | func aX (aU) = ("stakedLandsByOwner_" + aU) | |
217 | - | ||
218 | - | ||
219 | - | func aY (aU) = ("stakedPiecesByOwner_" + aU) | |
220 | - | ||
221 | - | ||
222 | - | func aZ (aM) = ("duckCustomNameByAssetId_" + aM) | |
223 | - | ||
224 | - | ||
225 | - | func ba (aK) = ("accountCustomNameByAddr_" + aK) | |
226 | - | ||
227 | - | ||
228 | - | func bb (aK) = ("accRefBy_" + aK) | |
229 | - | ||
230 | - | ||
231 | - | func bc (aK) = ("accReferrals_" + aK) | |
232 | - | ||
233 | - | ||
234 | - | func bd (aM) = ("duckOwner_" + aM) | |
235 | - | ||
236 | - | ||
237 | - | func be (aU) = ("stakedDuckByOwner_" + aU) | |
238 | - | ||
239 | - | ||
240 | - | func bf (bg) = ("backPack_" + bg) | |
241 | - | ||
242 | - | ||
243 | - | func bh (bg) = ("duckLocation_" + bg) | |
244 | - | ||
245 | - | ||
246 | - | func bi (bg) = ("duckHealth_" + bg) | |
247 | - | ||
248 | - | ||
249 | - | func bj () = "resTypesProportions" | |
250 | - | ||
251 | - | ||
252 | - | func bk () = "contractsBlocked" | |
253 | - | ||
254 | - | ||
255 | - | func bl (bm) = ("%s%s__userGwlReleaseTime__" + bm) | |
256 | - | ||
257 | - | ||
258 | - | func bn (aW) = ("landOrder_" + aW) | |
259 | - | ||
260 | - | ||
261 | - | func bo () = "emergencyWarehouseProducts" | |
262 | - | ||
263 | - | ||
264 | - | let bp = 0 | |
265 | - | ||
266 | - | let bq = 1 | |
267 | - | ||
268 | - | let br = 2 | |
269 | - | ||
270 | - | func bs (bt) = { | |
271 | - | let c = bt | |
272 | - | if ($isInstanceOf(c, "String")) | |
98 | + | func Q (R) = { | |
99 | + | let f = R | |
100 | + | if ($isInstanceOf(f, "Int")) | |
273 | 101 | then { | |
274 | - | let bu = c | |
275 | - | bu | |
276 | - | } | |
277 | - | else throw("fail to cast into String") | |
278 | - | } | |
279 | - | ||
280 | - | ||
281 | - | func bv (bt) = { | |
282 | - | let c = bt | |
283 | - | if ($isInstanceOf(c, "Int")) | |
284 | - | then { | |
285 | - | let bw = c | |
286 | - | bw | |
102 | + | let S = f | |
103 | + | S | |
287 | 104 | } | |
288 | 105 | else throw("fail to cast into Int") | |
289 | 106 | } | |
290 | 107 | ||
291 | 108 | ||
292 | - | func bx (bt) = { | |
293 | - | let c = bt | |
294 | - | if ($isInstanceOf(c, "List[Any]")) | |
295 | - | then { | |
296 | - | let by = c | |
297 | - | by | |
298 | - | } | |
299 | - | else throw("fail to cast into List[Any]") | |
300 | - | } | |
301 | - | ||
302 | - | ||
303 | - | func bz (bt) = { | |
304 | - | let c = bt | |
305 | - | if ($isInstanceOf(c, "Boolean")) | |
306 | - | then { | |
307 | - | let bu = c | |
308 | - | bu | |
309 | - | } | |
310 | - | else throw("fail to cast into Boolean") | |
311 | - | } | |
312 | - | ||
313 | - | ||
314 | - | func bA (bB) = { | |
315 | - | let c = bB | |
316 | - | if (("S" == c)) | |
317 | - | then o | |
318 | - | else if (("M" == c)) | |
319 | - | then p | |
320 | - | else if (("L" == c)) | |
321 | - | then q | |
322 | - | else if (("XL" == c)) | |
323 | - | then r | |
324 | - | else if (("XXL" == c)) | |
325 | - | then s | |
109 | + | func T (U) = { | |
110 | + | let f = U | |
111 | + | if (("S" == f)) | |
112 | + | then k | |
113 | + | else if (("M" == f)) | |
114 | + | then l | |
115 | + | else if (("L" == f)) | |
116 | + | then m | |
117 | + | else if (("XL" == f)) | |
118 | + | then n | |
119 | + | else if (("XXL" == f)) | |
120 | + | then o | |
326 | 121 | else throw("Unknown land size") | |
327 | 122 | } | |
328 | 123 | ||
329 | 124 | ||
330 | - | let bC = 0 | |
125 | + | func V (W) = { | |
126 | + | let X = split(valueOrElse(getString(E, J()), "0_0_0_0_0_0"), "_") | |
127 | + | func Y (Z,aa) = (Z + parseIntValue(aa)) | |
331 | 128 | ||
332 | - | let bD = 1 | |
129 | + | let ab = { | |
130 | + | let ac = X | |
131 | + | let ad = size(ac) | |
132 | + | let ae = 0 | |
133 | + | func af (ag,ah) = if ((ah >= ad)) | |
134 | + | then ag | |
135 | + | else Y(ag, ac[ah]) | |
333 | 136 | ||
334 | - | func bE (bF) = { | |
335 | - | let bG = split(valueOrElse(getString(aF, bj()), "0_0_0_0_0_0"), "_") | |
336 | - | func bH (bI,bJ) = (bI + parseIntValue(bJ)) | |
337 | - | ||
338 | - | let bK = { | |
339 | - | let bL = bG | |
340 | - | let bM = size(bL) | |
341 | - | let bN = 0 | |
342 | - | func bO (bP,bQ) = if ((bQ >= bM)) | |
343 | - | then bP | |
344 | - | else bH(bP, bL[bQ]) | |
345 | - | ||
346 | - | func bR (bP,bQ) = if ((bQ >= bM)) | |
347 | - | then bP | |
137 | + | func ai (ag,ah) = if ((ah >= ad)) | |
138 | + | then ag | |
348 | 139 | else throw("List size exceeds 6") | |
349 | 140 | ||
350 | - | | |
141 | + | ai(af(af(af(af(af(af(ae, 0), 1), 2), 3), 4), 5), 6) | |
351 | 142 | } | |
352 | - | let | |
143 | + | let aj = if ((W == "")) | |
353 | 144 | then 0 | |
354 | 145 | else { | |
355 | - | let | |
356 | - | let | |
357 | - | then split_51C(value( | |
146 | + | let ak = getString(E, K(W)) | |
147 | + | let al = if (isDefined(ak)) | |
148 | + | then split_51C(value(ak), "_") | |
358 | 149 | else nil | |
359 | - | func | |
360 | - | let | |
361 | - | let | |
362 | - | ( | |
150 | + | func am (Z,an) = { | |
151 | + | let ao = value(assetInfo(fromBase58String(an))) | |
152 | + | let U = split(ao.description, "_")[I] | |
153 | + | (Z + T(U)) | |
363 | 154 | } | |
364 | 155 | ||
365 | - | let | |
366 | - | let | |
367 | - | let | |
368 | - | func | |
369 | - | then | |
370 | - | else | |
156 | + | let ac = al | |
157 | + | let ad = size(ac) | |
158 | + | let ae = 0 | |
159 | + | func ap (ag,ah) = if ((ah >= ad)) | |
160 | + | then ag | |
161 | + | else am(ag, ac[ah]) | |
371 | 162 | ||
372 | - | func | |
373 | - | then | |
163 | + | func aq (ag,ah) = if ((ah >= ad)) | |
164 | + | then ag | |
374 | 165 | else throw("List size exceeds 100") | |
375 | 166 | ||
376 | - | | |
167 | + | aq(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ae, 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) | |
377 | 168 | } | |
378 | - | [ | |
169 | + | [ab, aj] | |
379 | 170 | } | |
380 | 171 | ||
381 | 172 | ||
382 | - | func bZ (ca) = { | |
383 | - | func cb (cc,cd) = (cc + parseIntValue(ca[cd])) | |
384 | - | ||
385 | - | let bL = [0, 1, 2, 3, 4, 5] | |
386 | - | let bM = size(bL) | |
387 | - | let bN = 0 | |
388 | - | func bO (bP,bQ) = if ((bQ >= bM)) | |
389 | - | then bP | |
390 | - | else cb(bP, bL[bQ]) | |
391 | - | ||
392 | - | func bR (bP,bQ) = if ((bQ >= bM)) | |
393 | - | then bP | |
394 | - | else throw("List size exceeds 6") | |
395 | - | ||
396 | - | bR(bO(bO(bO(bO(bO(bO(bN, 0), 1), 2), 3), 4), 5), 6) | |
173 | + | func ar () = { | |
174 | + | let as = valueOrErrorMessage(getInteger(G, M), "WLGOLD is not issued yet") | |
175 | + | let at = assetBalance(F, e) | |
176 | + | let au = assetBalance(D, e) | |
177 | + | let av = assetBalance(G, e) | |
178 | + | let aw = assetBalance(H, e) | |
179 | + | let ax = (((at + au) + av) + aw) | |
180 | + | [as, fraction(ax, j, as), ax, at, au, av, aw] | |
397 | 181 | } | |
398 | 182 | ||
399 | 183 | ||
400 | - | let | |
184 | + | let ay = 100000000000000 | |
401 | 185 | ||
402 | - | let | |
186 | + | let az = 100000 | |
403 | 187 | ||
404 | - | let | |
188 | + | let aA = 200000 | |
405 | 189 | ||
406 | - | let | |
190 | + | let aB = 100000 | |
407 | 191 | ||
408 | - | let | |
192 | + | let aC = 400000 | |
409 | 193 | ||
410 | - | let | |
194 | + | let aD = 31557600000 | |
411 | 195 | ||
412 | - | let | |
196 | + | let aE = 604800000 | |
413 | 197 | ||
414 | - | let | |
198 | + | let aF = 156 | |
415 | 199 | ||
416 | - | let | |
200 | + | let aG = 600000 | |
417 | 201 | ||
418 | - | let | |
202 | + | let aH = 100000000 | |
419 | 203 | ||
420 | - | let | |
204 | + | let aI = 50000000 | |
421 | 205 | ||
422 | - | let | |
206 | + | let aJ = "wlg_assetId" | |
423 | 207 | ||
424 | - | let | |
208 | + | let aK = "wlg_issueTime" | |
425 | 209 | ||
426 | - | let | |
210 | + | let aL = "marketingAddr" | |
427 | 211 | ||
428 | - | let | |
212 | + | let aM = "teamAddr" | |
429 | 213 | ||
430 | - | let | |
214 | + | let aN = "lastClaimedTime_marketing" | |
431 | 215 | ||
432 | - | let | |
216 | + | let aO = "lastClaimedTime_team" | |
433 | 217 | ||
434 | - | let | |
218 | + | let aP = "lastClaimedTime_activities" | |
435 | 219 | ||
436 | - | let cw = "lastClaimedTime_activities" | |
437 | - | ||
438 | - | func cx (aK) = ("lastClaimedTimeUser_" + aK) | |
220 | + | func aQ (aR) = ("lastClaimedTimeUser_" + aR) | |
439 | 221 | ||
440 | 222 | ||
441 | - | func | |
223 | + | func aS (aR) = ("lastArbTimeUser_" + aR) | |
442 | 224 | ||
443 | 225 | ||
444 | - | let | |
226 | + | let aT = "stakersAmountLeft" | |
445 | 227 | ||
446 | - | let | |
228 | + | let aU = "stakersAmountPaidTotal" | |
447 | 229 | ||
448 | - | func | |
230 | + | func aV (aR) = ("stakersAmountPaidUser_" + aR) | |
449 | 231 | ||
450 | 232 | ||
451 | - | let | |
233 | + | let aW = valueOrErrorMessage(getBinary(aJ), "Not initialized yet") | |
452 | 234 | ||
453 | - | let cD = 1 | |
454 | - | ||
455 | - | let cE = 2 | |
456 | - | ||
457 | - | let cF = valueOrErrorMessage(getBinary(cp), "Not initialized yet") | |
458 | - | ||
459 | - | func cG () = if (valueOrElse(getBoolean(aF, bk()), false)) | |
235 | + | func aX () = if (valueOrElse(getBoolean(E, a()), false)) | |
460 | 236 | then throw("Contracts are under maintenance") | |
461 | - | else | |
237 | + | else Q(invoke(E, "saveLastTx", nil, nil)) | |
462 | 238 | ||
463 | 239 | ||
464 | - | func cH () = { | |
465 | - | let cI = valueOrErrorMessage(getInteger(cr), "WLGOLD is not issued yet") | |
466 | - | let cJ = ((assetBalance(aG, b) + assetBalance(aE, b)) + assetBalance(aI, b)) | |
467 | - | [cI, fraction(cJ, i, cI), cJ] | |
468 | - | } | |
469 | - | ||
470 | - | ||
471 | - | func cK (aK) = { | |
472 | - | let cL = valueOrElse(getInteger(cy(aK)), 0) | |
473 | - | let cM = lastBlock.timestamp | |
474 | - | if ((cm > (cM - cL))) | |
240 | + | func aY (aR) = { | |
241 | + | let aZ = valueOrElse(getInteger(aS(aR)), 0) | |
242 | + | let ba = lastBlock.timestamp | |
243 | + | if ((aG > (ba - aZ))) | |
475 | 244 | then throw("Arbitrages are possible once a 10 minutes") | |
476 | 245 | else { | |
477 | - | let | |
478 | - | let | |
479 | - | fraction( | |
246 | + | let bb = V(aR)[c] | |
247 | + | let bc = pow(bb, 0, aI, 8, 8, CEILING) | |
248 | + | fraction(aH, bc, j) | |
480 | 249 | } | |
481 | 250 | } | |
482 | 251 | ||
483 | 252 | ||
484 | - | @Callable( | |
485 | - | func constructorV1 ( | |
253 | + | @Callable(bd) | |
254 | + | func constructorV1 (be,bf,bg) = if ((bd.caller != this)) | |
486 | 255 | then throw("Permission denied") | |
487 | - | else if (isDefined(getBinary( | |
256 | + | else if (isDefined(getBinary(aJ))) | |
488 | 257 | then throw("Already initialized") | |
489 | 258 | else { | |
490 | - | let | |
491 | - | let | |
492 | - | let | |
493 | - | [ | |
259 | + | let as = ay | |
260 | + | let bh = Issue("WLGOLD", "WavesLands Gold investment token", as, 8, true, unit, 0) | |
261 | + | let bi = calculateAssetId(bh) | |
262 | + | [bh, IntegerEntry(aK, lastBlock.timestamp), IntegerEntry(M, as), IntegerEntry(aU, 0), IntegerEntry(aT, fraction(ay, aC, i)), BinaryEntry(aJ, bi), StringEntry(x(), be), StringEntry(aL, bf), StringEntry(aM, bg)] | |
494 | 263 | } | |
495 | 264 | ||
496 | 265 | ||
497 | 266 | ||
498 | - | @Callable( | |
267 | + | @Callable(bd) | |
499 | 268 | func buyWlg () = { | |
500 | - | let | |
501 | - | if ((size( | |
269 | + | let bj = aX() | |
270 | + | if ((size(bd.payments) != 1)) | |
502 | 271 | then throw("exactly 1 payment must be attached") | |
503 | 272 | else { | |
504 | - | let | |
505 | - | let | |
506 | - | let | |
507 | - | if (( | |
273 | + | let bk = bd.payments[0] | |
274 | + | let bl = bk.amount | |
275 | + | let bm = valueOrErrorMessage(bk.assetId, "WAVES can't be used as payment") | |
276 | + | if ((bm != e)) | |
508 | 277 | then throw("USDT payments only!") | |
509 | 278 | else { | |
510 | - | let | |
511 | - | let | |
512 | - | let | |
513 | - | if (( | |
514 | - | then throw((("You can spend max " + toString( | |
279 | + | let bn = bd.caller | |
280 | + | let aR = toString(bn) | |
281 | + | let bo = aY(aR) | |
282 | + | if ((bl > bo)) | |
283 | + | then throw((("You can spend max " + toString(bo)) + " USDT")) | |
515 | 284 | else { | |
516 | - | let | |
517 | - | let | |
518 | - | let | |
519 | - | let | |
520 | - | let | |
521 | - | $Tuple2([Reissue( | |
285 | + | let bp = ar() | |
286 | + | let bq = bp[N] | |
287 | + | let br = fraction(bp[O], 6, 5) | |
288 | + | let bs = fraction(bl, j, br) | |
289 | + | let bt = fraction(bl, bq, (bp[P] - bl)) | |
290 | + | $Tuple2([Reissue(aW, bt, true), IntegerEntry(M, (bq + bt)), IntegerEntry(aS(aR), lastBlock.timestamp), ScriptTransfer(bn, bs, aW)], bj) | |
522 | 291 | } | |
523 | 292 | } | |
524 | 293 | } | |
525 | 294 | } | |
526 | 295 | ||
527 | 296 | ||
528 | 297 | ||
529 | - | @Callable( | |
298 | + | @Callable(bd) | |
530 | 299 | func sellWlg () = { | |
531 | - | let | |
532 | - | if ((size( | |
300 | + | let bj = aX() | |
301 | + | if ((size(bd.payments) != 1)) | |
533 | 302 | then throw("exactly 1 payment must be attached") | |
534 | 303 | else { | |
535 | - | let | |
536 | - | let | |
537 | - | let | |
538 | - | if (( | |
304 | + | let bk = bd.payments[0] | |
305 | + | let bu = bk.amount | |
306 | + | let bm = valueOrErrorMessage(bk.assetId, "WAVES can't be used as payment") | |
307 | + | if ((bm != aW)) | |
539 | 308 | then throw("WLGOLD payments only!") | |
540 | 309 | else { | |
541 | - | let | |
542 | - | let | |
543 | - | let | |
544 | - | let | |
545 | - | let | |
546 | - | let | |
547 | - | let | |
548 | - | if (( | |
549 | - | then throw((("You can get max " + toString( | |
310 | + | let bn = bd.caller | |
311 | + | let aR = toString(bn) | |
312 | + | let bo = aY(aR) | |
313 | + | let bp = ar() | |
314 | + | let bq = (bp[N] - bu) | |
315 | + | let bv = fraction(bp[O], 4, 5) | |
316 | + | let bw = fraction(bu, bv, j) | |
317 | + | if ((bw > bo)) | |
318 | + | then throw((("You can get max " + toString(bo)) + " USDT")) | |
550 | 319 | else { | |
551 | - | let | |
552 | - | $Tuple2([Burn( | |
320 | + | let bx = fraction(bw, bq, bp[P]) | |
321 | + | $Tuple2([Burn(aW, bx), IntegerEntry(M, (bq - bx)), IntegerEntry(aS(aR), lastBlock.timestamp), ScriptTransfer(bn, bw, e)], bj) | |
553 | 322 | } | |
554 | 323 | } | |
555 | 324 | } | |
556 | 325 | } | |
557 | 326 | ||
558 | 327 | ||
559 | 328 | ||
560 | - | @Callable( | |
329 | + | @Callable(bd) | |
561 | 330 | func claim () = { | |
562 | - | let | |
563 | - | let | |
564 | - | let | |
565 | - | let | |
566 | - | let | |
567 | - | let | |
568 | - | let | |
569 | - | let | |
570 | - | let | |
571 | - | let | |
572 | - | let | |
573 | - | let | |
574 | - | let | |
575 | - | let | |
576 | - | if (( | |
331 | + | let bj = aX() | |
332 | + | let bn = bd.caller | |
333 | + | let by = toString(bn) | |
334 | + | let ba = lastBlock.timestamp | |
335 | + | let bz = valueOrErrorMessage(getInteger(aK), "Not initialized") | |
336 | + | let bA = valueOrElse(getInteger(aN), bz) | |
337 | + | let bf = addressFromStringValue(value(getString(aL))) | |
338 | + | let bB = fraction(fraction(ay, az, i), (ba - bA), aD) | |
339 | + | let bC = valueOrElse(getInteger(aO), bz) | |
340 | + | let bg = addressFromStringValue(value(getString(aM))) | |
341 | + | let bD = fraction(fraction(ay, aA, i), (ba - bC), (3 * aD)) | |
342 | + | let bE = valueOrElse(getInteger(aP), bz) | |
343 | + | let bF = fraction(fraction(ay, aB, i), (ba - bE), (3 * aD)) | |
344 | + | let bG = ((ba - bz) / aE) | |
345 | + | if ((bG > (aF / 2))) | |
577 | 346 | then throw("Please modify contract for next 1.5 years, according to stats") | |
578 | 347 | else { | |
579 | - | let | |
580 | - | let | |
581 | - | let | |
582 | - | let | |
583 | - | let | |
584 | - | let | |
585 | - | let | |
586 | - | let | |
587 | - | $Tuple2([ScriptTransfer( | |
348 | + | let bH = V(by) | |
349 | + | let bI = bH[b] | |
350 | + | let bJ = valueOrElse(getInteger(aT), 0) | |
351 | + | let bK = fraction(bJ, (2 * bI), (bI + (max([100000, bI]) * (aF - bG)))) | |
352 | + | let bL = aQ(by) | |
353 | + | let bM = valueOrElse(getInteger(bL), bz) | |
354 | + | let bN = fraction(fraction(bK, bH[c], bI), (ba - bM), (3 * aD)) | |
355 | + | let bO = aV(by) | |
356 | + | $Tuple2([ScriptTransfer(bf, bB, aW), ScriptTransfer(bg, bD, aW), ScriptTransfer(D, bF, aW), ScriptTransfer(bn, bN, aW), IntegerEntry(bO, (valueOrElse(getInteger(bO), 0) + bN)), IntegerEntry(aU, (valueOrElse(getInteger(aU), 0) + bN)), IntegerEntry(aT, (bJ - bN)), IntegerEntry(aN, ba), IntegerEntry(aO, ba), IntegerEntry(aP, ba), IntegerEntry(bL, ba)], bj) | |
588 | 357 | } | |
589 | 358 | } | |
590 | 359 | ||
591 | 360 | ||
592 | 361 | ||
593 | - | @Callable( | |
594 | - | func onStakeLand ( | |
362 | + | @Callable(bd) | |
363 | + | func onStakeLand (aR) = if ((bd.caller != E)) | |
595 | 364 | then throw("Permission denied") | |
596 | - | else $Tuple2([IntegerEntry( | |
365 | + | else $Tuple2([IntegerEntry(aQ(aR), lastBlock.timestamp)], lastBlock.timestamp) | |
597 | 366 | ||
598 | 367 | ||
599 | 368 | ||
600 | - | @Callable( | |
601 | - | func onUnstakeLand ( | |
369 | + | @Callable(bd) | |
370 | + | func onUnstakeLand (aR) = if ((bd.caller != E)) | |
602 | 371 | then throw("Permission denied") | |
603 | - | else $Tuple2([DeleteEntry( | |
372 | + | else $Tuple2([DeleteEntry(aQ(aR))], 0) | |
604 | 373 | ||
605 | 374 |
github/deemru/w8io/169f3d6 232.27 ms ◑