tx · HfWA1qkGy3M7f9EkekCsFJRPjZPD3P6P3wVDAkygCXaJ 3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy: -0.01200000 Waves 2023.07.04 14:51 [2651119] smart account 3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy > SELF 0.00000000 Waves
{ "type": 13, "id": "HfWA1qkGy3M7f9EkekCsFJRPjZPD3P6P3wVDAkygCXaJ", "fee": 1200000, "feeAssetId": null, "timestamp": 1688471531715, "version": 2, "chainId": 84, "sender": "3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy", "senderPublicKey": "FsR18761ZAsUqsTd7TK3XmR6bhihs1UXVmpHYxz5JzQ1", "proofs": [ "4pjdPSZhFA5rrPyzxan5EFgKM2agPSmVTgwbRHaLqVXQxdZAdfZpzn9EkcJmbqqfuMv4xqnnaq4wX4ZtDssHvgRK" ], "script": "base64:BgIgCAISBgoECAgICBIDCgEBEgMKAQESABIDCgEIEgMKAQhGAQprZXlCbG9ja2VkAAIQY29udHJhY3RzQmxvY2tlZAALSWR4RWZmVG90YWwAAAAKSWR4RWZmVXNlcgABAAVjaGFpbgkAyQECCQDKAQIIBQR0aGlzBWJ5dGVzAAEAAQALdXNkdEFzc2V0SWQEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDABIITaerIIAz9O0bvKju6Lk7zJgt0LXfoHlqjUI/moD/+5AwkAAAIBAVQFByRtYXRjaDABIFWx2J9yh4Lv5eNbjawFq2XemkOhLxa7BfMat4el8cUYCQACAQINVW5rbm93biBjaGFpbgAVZGVmYXVsdFJlc3RBZGRyZXNzU3RyBAckbWF0Y2gwBQVjaGFpbgMJAAACAQFXBQckbWF0Y2gwAiMzUFFDdXZGYnZoNExrUFVucm5VMXozam5iQTFwOW0zV05odgMJAAACAQFUBQckbWF0Y2gwAiMzTXVta0dHenRDS0FYcFdEcXhrZGRvZnFYU1VicVFrdlNKeQkAAgECDVVua25vd24gY2hhaW4ADmFy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YWxsZXIFB3VzZHRBbXQFC3VzZHRBc3NldElkBQNuaWwFDHByb2xvZ1Jlc3VsdAFpAQVjbGFpbQAEDHByb2xvZ1Jlc3VsdAkBBnByb2xvZwAEB2FjdGlvbnMICQENY2xhaW1JbnRlcm5hbAEJAKUIAQgFAWkGY2FsbGVyAl8xCQCUCgIFB2FjdGlvbnMFDHByb2xvZ1Jlc3VsdAFpAQtvblN0YWtlTGFuZAEEYWRkcgMJAQIhPQIIBQFpBmNhbGxlcgUPc3Rha2luZ0NvbnRyYWN0CQACAQIRUGVybWlzc2lvbiBkZW5pZWQJAQ1jbGFpbUludGVybmFsAQUEYWRkcgFpAQ1vblVuc3Rha2VMYW5kAQRhZGRyAwkBAiE9AggFAWkGY2FsbGVyBQ9zdGFraW5nQ29udHJhY3QJAAIBAhFQZXJtaXNzaW9uIGRlbmllZAkBDWNsYWltSW50ZXJuYWwBBQRhZGRyAG09hp8=", "height": 2651119, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4pvsduSPPvkq6HsBcFiGA9Gzbw1pTbTHKadj2MupEw9c Next: 6csyRHykhTHwkEVvRH573VLHdhuuuFSQkC8wsP9bxiUv Diff:
Old | New | Differences | |
---|---|---|---|
267 | 267 | } | |
268 | 268 | ||
269 | 269 | ||
270 | - | func bj ( | |
271 | - | let | |
270 | + | func bj (aY) = { | |
271 | + | let bk = addressFromStringValue(aY) | |
272 | 272 | let bg = lastBlock.timestamp | |
273 | - | let | |
274 | - | let | |
275 | - | let | |
276 | - | let | |
277 | - | let | |
278 | - | let | |
279 | - | let | |
280 | - | let | |
281 | - | let | |
282 | - | let | |
283 | - | if (( | |
273 | + | let bl = valueOrErrorMessage(getInteger(aQ), "Not initialized") | |
274 | + | let bm = valueOrElse(getInteger(aU), bl) | |
275 | + | let bn = addressFromStringValue(value(getString(aR))) | |
276 | + | let bo = fraction(fraction(aG, aH, j), (bg - bm), aL) | |
277 | + | let bp = valueOrElse(getInteger(aV), bl) | |
278 | + | let bq = addressFromStringValue(value(getString(aS))) | |
279 | + | let br = fraction(fraction(aG, aI, j), (bg - bp), (3 * aL)) | |
280 | + | let bs = valueOrElse(getInteger(aW), bl) | |
281 | + | let bt = fraction(fraction(aG, aJ, j), (bg - bs), (3 * aL)) | |
282 | + | let bu = ((bg - bl) / aM) | |
283 | + | if ((bu > (aN / 2))) | |
284 | 284 | then throw("Please modify contract for next 1.5 years, according to stats") | |
285 | 285 | else { | |
286 | - | let | |
287 | - | let | |
288 | - | let | |
289 | - | let | |
290 | - | let | |
291 | - | let | |
292 | - | let | |
293 | - | let | |
294 | - | $Tuple2([ScriptTransfer( | |
286 | + | let bv = Z(aY) | |
287 | + | let bw = bv[b] | |
288 | + | let bx = valueOrElse(getInteger(ba), 0) | |
289 | + | let by = fraction(bx, (2 * bw), (bw + (max([100000, bw]) * (aN - bu)))) | |
290 | + | let bz = aX(aY) | |
291 | + | let bA = valueOrElse(getInteger(bz), bl) | |
292 | + | let bB = fraction(fraction(by, bv[c], bw), (bg - bA), (3 * aL)) | |
293 | + | let bC = bc(aY) | |
294 | + | $Tuple2([ScriptTransfer(bn, bo, Q), ScriptTransfer(bq, br, Q), ScriptTransfer(F, bt, Q), ScriptTransfer(bk, bB, Q), IntegerEntry(bC, (valueOrElse(getInteger(bC), 0) + bB)), IntegerEntry(bb, (valueOrElse(getInteger(bb), 0) + bB)), IntegerEntry(ba, (bx - bB)), IntegerEntry(aU, bg), IntegerEntry(aV, bg), IntegerEntry(aW, bg), IntegerEntry(bz, bg)], bB) | |
295 | 295 | } | |
296 | 296 | } | |
297 | 297 | ||
298 | 298 | ||
299 | - | @Callable( | |
300 | - | func constructorV1 (bF | |
299 | + | @Callable(bD) | |
300 | + | func constructorV1 (bE,bn,bq,bF) = if ((bD.caller != this)) | |
301 | 301 | then throw("Permission denied") | |
302 | 302 | else if (isDefined(getBinary(P))) | |
303 | 303 | then throw("Already initialized") | |
304 | 304 | else { | |
305 | 305 | let aw = aG | |
306 | - | let | |
307 | - | let | |
308 | - | [ | |
306 | + | let bG = Issue("WLGOLD", "WavesLands Gold investment token", aw, 8, true, unit, 0) | |
307 | + | let bH = calculateAssetId(bG) | |
308 | + | [bG, IntegerEntry(aQ, lastBlock.timestamp), IntegerEntry(O, aw), IntegerEntry(bb, 0), IntegerEntry(ba, fraction(aG, aK, j)), BinaryEntry(P, bH), StringEntry(z(), bE), StringEntry(aR, bn), StringEntry(aS, bq), StringEntry(aT, bF)] | |
309 | 309 | } | |
310 | 310 | ||
311 | 311 | ||
312 | 312 | ||
313 | - | @Callable( | |
314 | - | func buyWlg ( | |
315 | - | let | |
316 | - | if ((size( | |
313 | + | @Callable(bD) | |
314 | + | func buyWlg (bI) = { | |
315 | + | let bJ = bd() | |
316 | + | if ((size(bD.payments) != 1)) | |
317 | 317 | then throw("exactly 1 payment must be attached") | |
318 | 318 | else { | |
319 | - | let | |
320 | - | let | |
321 | - | let | |
322 | - | if (( | |
319 | + | let bK = bD.payments[0] | |
320 | + | let bL = bK.amount | |
321 | + | let bM = valueOrErrorMessage(bK.assetId, "WAVES can't be used as payment") | |
322 | + | if ((bM != e)) | |
323 | 323 | then throw("USDT payments only!") | |
324 | 324 | else { | |
325 | - | let bk = | |
325 | + | let bk = bD.caller | |
326 | 326 | let aY = toString(bk) | |
327 | - | let | |
328 | - | if (( | |
329 | - | then throw((("You can spend max " + aC( | |
330 | - | else if ((q > | |
327 | + | let bN = be(aY) | |
328 | + | if ((bL > bN)) | |
329 | + | then throw((("You can spend max " + aC(bN, 6)) + " USDT")) | |
330 | + | else if ((q > bL)) | |
331 | 331 | then throw((("You can trade min " + aC(q, 6)) + " USDT")) | |
332 | 332 | else { | |
333 | - | let | |
334 | - | let | |
335 | - | let | |
336 | - | let | |
337 | - | let | |
338 | - | let | |
339 | - | if (( | |
333 | + | let bO = av() | |
334 | + | let bP = bO[R] | |
335 | + | let bQ = (bO[T] - bL) | |
336 | + | let bR = fraction(bQ, k, bP) | |
337 | + | let bS = fraction(bR, 6, 5) | |
338 | + | let bT = fraction(bL, k, bS) | |
339 | + | if ((bI > bT)) | |
340 | 340 | then throw("Price changed during operation, please try again") | |
341 | 341 | else { | |
342 | - | let | |
343 | - | let | |
344 | - | let | |
345 | - | $Tuple2([Reissue(Q, | |
342 | + | let bU = (bL / 6) | |
343 | + | let bV = (bL - bU) | |
344 | + | let bW = fraction(bP, bV, bQ) | |
345 | + | $Tuple2([Reissue(Q, bW, true), IntegerEntry(O, (bP + bW)), IntegerEntry(aZ(aY), lastBlock.timestamp), ScriptTransfer(addressFromStringValue(value(getString(aT))), bU, e), ScriptTransfer(bk, bT, Q)], bJ) | |
346 | 346 | } | |
347 | 347 | } | |
348 | 348 | } | |
351 | 351 | ||
352 | 352 | ||
353 | 353 | ||
354 | - | @Callable( | |
355 | - | func sellWlg ( | |
356 | - | let | |
357 | - | if ((size( | |
354 | + | @Callable(bD) | |
355 | + | func sellWlg (bI) = { | |
356 | + | let bJ = bd() | |
357 | + | if ((size(bD.payments) != 1)) | |
358 | 358 | then throw("exactly 1 payment must be attached") | |
359 | 359 | else { | |
360 | - | let | |
361 | - | let | |
362 | - | let | |
363 | - | if (( | |
360 | + | let bK = bD.payments[0] | |
361 | + | let bX = bK.amount | |
362 | + | let bM = valueOrErrorMessage(bK.assetId, "WAVES can't be used as payment") | |
363 | + | if ((bM != Q)) | |
364 | 364 | then throw("WLGOLD payments only!") | |
365 | 365 | else { | |
366 | - | let bk = | |
366 | + | let bk = bD.caller | |
367 | 367 | let aY = toString(bk) | |
368 | - | let | |
369 | - | let | |
370 | - | let | |
371 | - | let | |
372 | - | let | |
373 | - | if (( | |
374 | - | then throw((("You can get max " + aC( | |
375 | - | else if ((q > | |
368 | + | let bN = be(aY) | |
369 | + | let bO = av() | |
370 | + | let bP = bO[R] | |
371 | + | let bY = fraction(bO[S], 4, 5) | |
372 | + | let bL = fraction(bX, bY, k) | |
373 | + | if ((bL > bN)) | |
374 | + | then throw((("You can get max " + aC(bN, 6)) + " USDT")) | |
375 | + | else if ((q > bL)) | |
376 | 376 | then throw((("You can trade min " + aC(q, 6)) + " USDT")) | |
377 | - | else if (( | |
377 | + | else if ((bI > bL)) | |
378 | 378 | then throw("Price changed during operation, please try again") | |
379 | 379 | else { | |
380 | - | let | |
381 | - | let | |
382 | - | $Tuple2([Burn(Q, | |
380 | + | let bU = (bL / 4) | |
381 | + | let bZ = fraction((bL + bU), bP, bO[T]) | |
382 | + | $Tuple2([Burn(Q, bZ), IntegerEntry(O, (bP - bZ)), IntegerEntry(aZ(aY), lastBlock.timestamp), ScriptTransfer(addressFromStringValue(value(getString(aT))), bU, e), ScriptTransfer(bk, bL, e)], bJ) | |
383 | 383 | } | |
384 | 384 | } | |
385 | 385 | } | |
387 | 387 | ||
388 | 388 | ||
389 | 389 | ||
390 | - | @Callable( | |
390 | + | @Callable(bD) | |
391 | 391 | func claim () = { | |
392 | - | let | |
393 | - | let | |
394 | - | $Tuple2( | |
392 | + | let bJ = bd() | |
393 | + | let ca = bj(toString(bD.caller))._1 | |
394 | + | $Tuple2(ca, bJ) | |
395 | 395 | } | |
396 | 396 | ||
397 | 397 | ||
398 | 398 | ||
399 | - | @Callable( | |
400 | - | func onStakeLand (aY) = if (( | |
399 | + | @Callable(bD) | |
400 | + | func onStakeLand (aY) = if ((bD.caller != G)) | |
401 | 401 | then throw("Permission denied") | |
402 | - | else bj( | |
402 | + | else bj(aY) | |
403 | 403 | ||
404 | 404 | ||
405 | 405 | ||
406 | - | @Callable( | |
407 | - | func onUnstakeLand (aY) = if (( | |
406 | + | @Callable(bD) | |
407 | + | func onUnstakeLand (aY) = if ((bD.caller != G)) | |
408 | 408 | then throw("Permission denied") | |
409 | - | else bj( | |
409 | + | else bj(aY) | |
410 | 410 | ||
411 | 411 |
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 | 6 | ||
7 | 7 | let b = 0 | |
8 | 8 | ||
9 | 9 | let c = 1 | |
10 | 10 | ||
11 | 11 | let d = take(drop(this.bytes, 1), 1) | |
12 | 12 | ||
13 | 13 | let e = { | |
14 | 14 | let f = d | |
15 | 15 | if ((base58'2W' == f)) | |
16 | 16 | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
17 | 17 | else if ((base58'2T' == f)) | |
18 | 18 | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
19 | 19 | else throw("Unknown chain") | |
20 | 20 | } | |
21 | 21 | ||
22 | 22 | let g = { | |
23 | 23 | let f = d | |
24 | 24 | if ((base58'2W' == f)) | |
25 | 25 | then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv" | |
26 | 26 | else if ((base58'2T' == f)) | |
27 | 27 | then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy" | |
28 | 28 | else throw("Unknown chain") | |
29 | 29 | } | |
30 | 30 | ||
31 | 31 | let h = { | |
32 | 32 | let f = d | |
33 | 33 | if ((base58'2W' == f)) | |
34 | 34 | then 600000 | |
35 | 35 | else if ((base58'2T' == f)) | |
36 | 36 | then 60000 | |
37 | 37 | else throw("Unknown chain") | |
38 | 38 | } | |
39 | 39 | ||
40 | 40 | let i = "__" | |
41 | 41 | ||
42 | 42 | let j = 1000000 | |
43 | 43 | ||
44 | 44 | let k = 100000000 | |
45 | 45 | ||
46 | 46 | let l = 25 | |
47 | 47 | ||
48 | 48 | let m = 100 | |
49 | 49 | ||
50 | 50 | let n = 225 | |
51 | 51 | ||
52 | 52 | let o = 400 | |
53 | 53 | ||
54 | 54 | let p = 625 | |
55 | 55 | ||
56 | 56 | let q = 100000 | |
57 | 57 | ||
58 | 58 | func r (s,t) = valueOrErrorMessage(getString(s, t), makeString(["mandatory ", toString(s), ".", t, " is not defined"], "")) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | let u = 1 | |
62 | 62 | ||
63 | 63 | let v = 2 | |
64 | 64 | ||
65 | 65 | let w = 4 | |
66 | 66 | ||
67 | 67 | let x = 5 | |
68 | 68 | ||
69 | 69 | func y () = "%s__restConfig" | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func z () = "%s__restAddr" | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func A (B) = split_4C(r(B, y()), i) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func C (D,E) = valueOrErrorMessage(addressFromString(D[E]), ("Rest cfg doesn't contain address at index " + toString(E))) | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | let F = addressFromStringValue(valueOrElse(getString(this, z()), g)) | |
82 | 82 | ||
83 | 83 | let D = A(F) | |
84 | 84 | ||
85 | 85 | let G = C(D, u) | |
86 | 86 | ||
87 | 87 | let H = C(D, v) | |
88 | 88 | ||
89 | 89 | let I = C(D, w) | |
90 | 90 | ||
91 | 91 | let J = C(D, x) | |
92 | 92 | ||
93 | 93 | let K = 1 | |
94 | 94 | ||
95 | 95 | func L () = "resTypesProportions" | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func M (N) = ("stakedLandsByOwner_" + N) | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | let O = "wlg_issuedAmount" | |
102 | 102 | ||
103 | 103 | let P = "wlg_assetId" | |
104 | 104 | ||
105 | 105 | let Q = valueOrErrorMessage(getBinary(I, P), "Not initialized yet") | |
106 | 106 | ||
107 | 107 | let R = 0 | |
108 | 108 | ||
109 | 109 | let S = 1 | |
110 | 110 | ||
111 | 111 | let T = 2 | |
112 | 112 | ||
113 | 113 | func U (V) = { | |
114 | 114 | let f = V | |
115 | 115 | if ($isInstanceOf(f, "Int")) | |
116 | 116 | then { | |
117 | 117 | let W = f | |
118 | 118 | W | |
119 | 119 | } | |
120 | 120 | else throw("fail to cast into Int") | |
121 | 121 | } | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | func X (Y) = { | |
125 | 125 | let f = Y | |
126 | 126 | if (("S" == f)) | |
127 | 127 | then l | |
128 | 128 | else if (("M" == f)) | |
129 | 129 | then m | |
130 | 130 | else if (("L" == f)) | |
131 | 131 | then n | |
132 | 132 | else if (("XL" == f)) | |
133 | 133 | then o | |
134 | 134 | else if (("XXL" == f)) | |
135 | 135 | then p | |
136 | 136 | else throw("Unknown land size") | |
137 | 137 | } | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | func Z (aa) = { | |
141 | 141 | let ab = split(valueOrElse(getString(G, L()), "0_0_0_0_0_0"), "_") | |
142 | 142 | func ac (ad,ae) = (ad + parseIntValue(ae)) | |
143 | 143 | ||
144 | 144 | let af = { | |
145 | 145 | let ag = ab | |
146 | 146 | let ah = size(ag) | |
147 | 147 | let ai = 0 | |
148 | 148 | func aj (ak,al) = if ((al >= ah)) | |
149 | 149 | then ak | |
150 | 150 | else ac(ak, ag[al]) | |
151 | 151 | ||
152 | 152 | func am (ak,al) = if ((al >= ah)) | |
153 | 153 | then ak | |
154 | 154 | else throw("List size exceeds 6") | |
155 | 155 | ||
156 | 156 | am(aj(aj(aj(aj(aj(aj(ai, 0), 1), 2), 3), 4), 5), 6) | |
157 | 157 | } | |
158 | 158 | let an = if ((aa == "")) | |
159 | 159 | then 0 | |
160 | 160 | else { | |
161 | 161 | let ao = getString(G, M(aa)) | |
162 | 162 | let ap = if (isDefined(ao)) | |
163 | 163 | then split_51C(value(ao), "_") | |
164 | 164 | else nil | |
165 | 165 | func aq (ad,ar) = { | |
166 | 166 | let as = value(assetInfo(fromBase58String(ar))) | |
167 | 167 | let Y = split(as.description, "_")[K] | |
168 | 168 | (ad + X(Y)) | |
169 | 169 | } | |
170 | 170 | ||
171 | 171 | let ag = ap | |
172 | 172 | let ah = size(ag) | |
173 | 173 | let ai = 0 | |
174 | 174 | func at (ak,al) = if ((al >= ah)) | |
175 | 175 | then ak | |
176 | 176 | else aq(ak, ag[al]) | |
177 | 177 | ||
178 | 178 | func au (ak,al) = if ((al >= ah)) | |
179 | 179 | then ak | |
180 | 180 | else throw("List size exceeds 100") | |
181 | 181 | ||
182 | 182 | au(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(at(ai, 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) | |
183 | 183 | } | |
184 | 184 | [af, an] | |
185 | 185 | } | |
186 | 186 | ||
187 | 187 | ||
188 | 188 | func av () = { | |
189 | 189 | let aw = valueOrErrorMessage(getInteger(I, O), "WLGOLD is not issued yet") | |
190 | 190 | let ax = assetBalance(H, e) | |
191 | 191 | let ay = assetBalance(F, e) | |
192 | 192 | let az = assetBalance(I, e) | |
193 | 193 | let aA = assetBalance(J, e) | |
194 | 194 | let aB = ((ax + ay) + az) | |
195 | 195 | [aw, fraction(aB, k, aw), aB, ax, ay, az, aA] | |
196 | 196 | } | |
197 | 197 | ||
198 | 198 | ||
199 | 199 | func aC (aD,aE) = { | |
200 | 200 | let aF = pow(10, 0, aE, 0, 0, DOWN) | |
201 | 201 | ((toString((aD / aF)) + ".") + toString((aD % aF))) | |
202 | 202 | } | |
203 | 203 | ||
204 | 204 | ||
205 | 205 | let aG = 100000000000000 | |
206 | 206 | ||
207 | 207 | let aH = 100000 | |
208 | 208 | ||
209 | 209 | let aI = 200000 | |
210 | 210 | ||
211 | 211 | let aJ = 100000 | |
212 | 212 | ||
213 | 213 | let aK = 400000 | |
214 | 214 | ||
215 | 215 | let aL = 31557600000 | |
216 | 216 | ||
217 | 217 | let aM = 604800000 | |
218 | 218 | ||
219 | 219 | let aN = 156 | |
220 | 220 | ||
221 | 221 | let aO = 100000000 | |
222 | 222 | ||
223 | 223 | let aP = 50000000 | |
224 | 224 | ||
225 | 225 | let aQ = "wlg_issueTime" | |
226 | 226 | ||
227 | 227 | let aR = "marketingAddr" | |
228 | 228 | ||
229 | 229 | let aS = "teamAddr" | |
230 | 230 | ||
231 | 231 | let aT = "profitAddr" | |
232 | 232 | ||
233 | 233 | let aU = "lastClaimedTime_marketing" | |
234 | 234 | ||
235 | 235 | let aV = "lastClaimedTime_team" | |
236 | 236 | ||
237 | 237 | let aW = "lastClaimedTime_activities" | |
238 | 238 | ||
239 | 239 | func aX (aY) = ("lastClaimedTimeUser_" + aY) | |
240 | 240 | ||
241 | 241 | ||
242 | 242 | func aZ (aY) = ("lastArbTimeUser_" + aY) | |
243 | 243 | ||
244 | 244 | ||
245 | 245 | let ba = "stakersAmountLeft" | |
246 | 246 | ||
247 | 247 | let bb = "stakersAmountPaidTotal" | |
248 | 248 | ||
249 | 249 | func bc (aY) = ("stakersAmountPaidUser_" + aY) | |
250 | 250 | ||
251 | 251 | ||
252 | 252 | func bd () = if (valueOrElse(getBoolean(G, a()), false)) | |
253 | 253 | then throw("Contracts are under maintenance") | |
254 | 254 | else U(invoke(G, "saveLastTx", nil, nil)) | |
255 | 255 | ||
256 | 256 | ||
257 | 257 | func be (aY) = { | |
258 | 258 | let bf = valueOrElse(getInteger(aZ(aY)), 0) | |
259 | 259 | let bg = lastBlock.timestamp | |
260 | 260 | if ((h > (bg - bf))) | |
261 | 261 | then throw((("Arbitrages are possible once a " + toString((h / 60000))) + "min")) | |
262 | 262 | else { | |
263 | 263 | let bh = Z(aY)[c] | |
264 | 264 | let bi = pow(bh, 0, aP, 8, 8, CEILING) | |
265 | 265 | fraction(aO, bi, k) | |
266 | 266 | } | |
267 | 267 | } | |
268 | 268 | ||
269 | 269 | ||
270 | - | func bj ( | |
271 | - | let | |
270 | + | func bj (aY) = { | |
271 | + | let bk = addressFromStringValue(aY) | |
272 | 272 | let bg = lastBlock.timestamp | |
273 | - | let | |
274 | - | let | |
275 | - | let | |
276 | - | let | |
277 | - | let | |
278 | - | let | |
279 | - | let | |
280 | - | let | |
281 | - | let | |
282 | - | let | |
283 | - | if (( | |
273 | + | let bl = valueOrErrorMessage(getInteger(aQ), "Not initialized") | |
274 | + | let bm = valueOrElse(getInteger(aU), bl) | |
275 | + | let bn = addressFromStringValue(value(getString(aR))) | |
276 | + | let bo = fraction(fraction(aG, aH, j), (bg - bm), aL) | |
277 | + | let bp = valueOrElse(getInteger(aV), bl) | |
278 | + | let bq = addressFromStringValue(value(getString(aS))) | |
279 | + | let br = fraction(fraction(aG, aI, j), (bg - bp), (3 * aL)) | |
280 | + | let bs = valueOrElse(getInteger(aW), bl) | |
281 | + | let bt = fraction(fraction(aG, aJ, j), (bg - bs), (3 * aL)) | |
282 | + | let bu = ((bg - bl) / aM) | |
283 | + | if ((bu > (aN / 2))) | |
284 | 284 | then throw("Please modify contract for next 1.5 years, according to stats") | |
285 | 285 | else { | |
286 | - | let | |
287 | - | let | |
288 | - | let | |
289 | - | let | |
290 | - | let | |
291 | - | let | |
292 | - | let | |
293 | - | let | |
294 | - | $Tuple2([ScriptTransfer( | |
286 | + | let bv = Z(aY) | |
287 | + | let bw = bv[b] | |
288 | + | let bx = valueOrElse(getInteger(ba), 0) | |
289 | + | let by = fraction(bx, (2 * bw), (bw + (max([100000, bw]) * (aN - bu)))) | |
290 | + | let bz = aX(aY) | |
291 | + | let bA = valueOrElse(getInteger(bz), bl) | |
292 | + | let bB = fraction(fraction(by, bv[c], bw), (bg - bA), (3 * aL)) | |
293 | + | let bC = bc(aY) | |
294 | + | $Tuple2([ScriptTransfer(bn, bo, Q), ScriptTransfer(bq, br, Q), ScriptTransfer(F, bt, Q), ScriptTransfer(bk, bB, Q), IntegerEntry(bC, (valueOrElse(getInteger(bC), 0) + bB)), IntegerEntry(bb, (valueOrElse(getInteger(bb), 0) + bB)), IntegerEntry(ba, (bx - bB)), IntegerEntry(aU, bg), IntegerEntry(aV, bg), IntegerEntry(aW, bg), IntegerEntry(bz, bg)], bB) | |
295 | 295 | } | |
296 | 296 | } | |
297 | 297 | ||
298 | 298 | ||
299 | - | @Callable( | |
300 | - | func constructorV1 (bF | |
299 | + | @Callable(bD) | |
300 | + | func constructorV1 (bE,bn,bq,bF) = if ((bD.caller != this)) | |
301 | 301 | then throw("Permission denied") | |
302 | 302 | else if (isDefined(getBinary(P))) | |
303 | 303 | then throw("Already initialized") | |
304 | 304 | else { | |
305 | 305 | let aw = aG | |
306 | - | let | |
307 | - | let | |
308 | - | [ | |
306 | + | let bG = Issue("WLGOLD", "WavesLands Gold investment token", aw, 8, true, unit, 0) | |
307 | + | let bH = calculateAssetId(bG) | |
308 | + | [bG, IntegerEntry(aQ, lastBlock.timestamp), IntegerEntry(O, aw), IntegerEntry(bb, 0), IntegerEntry(ba, fraction(aG, aK, j)), BinaryEntry(P, bH), StringEntry(z(), bE), StringEntry(aR, bn), StringEntry(aS, bq), StringEntry(aT, bF)] | |
309 | 309 | } | |
310 | 310 | ||
311 | 311 | ||
312 | 312 | ||
313 | - | @Callable( | |
314 | - | func buyWlg ( | |
315 | - | let | |
316 | - | if ((size( | |
313 | + | @Callable(bD) | |
314 | + | func buyWlg (bI) = { | |
315 | + | let bJ = bd() | |
316 | + | if ((size(bD.payments) != 1)) | |
317 | 317 | then throw("exactly 1 payment must be attached") | |
318 | 318 | else { | |
319 | - | let | |
320 | - | let | |
321 | - | let | |
322 | - | if (( | |
319 | + | let bK = bD.payments[0] | |
320 | + | let bL = bK.amount | |
321 | + | let bM = valueOrErrorMessage(bK.assetId, "WAVES can't be used as payment") | |
322 | + | if ((bM != e)) | |
323 | 323 | then throw("USDT payments only!") | |
324 | 324 | else { | |
325 | - | let bk = | |
325 | + | let bk = bD.caller | |
326 | 326 | let aY = toString(bk) | |
327 | - | let | |
328 | - | if (( | |
329 | - | then throw((("You can spend max " + aC( | |
330 | - | else if ((q > | |
327 | + | let bN = be(aY) | |
328 | + | if ((bL > bN)) | |
329 | + | then throw((("You can spend max " + aC(bN, 6)) + " USDT")) | |
330 | + | else if ((q > bL)) | |
331 | 331 | then throw((("You can trade min " + aC(q, 6)) + " USDT")) | |
332 | 332 | else { | |
333 | - | let | |
334 | - | let | |
335 | - | let | |
336 | - | let | |
337 | - | let | |
338 | - | let | |
339 | - | if (( | |
333 | + | let bO = av() | |
334 | + | let bP = bO[R] | |
335 | + | let bQ = (bO[T] - bL) | |
336 | + | let bR = fraction(bQ, k, bP) | |
337 | + | let bS = fraction(bR, 6, 5) | |
338 | + | let bT = fraction(bL, k, bS) | |
339 | + | if ((bI > bT)) | |
340 | 340 | then throw("Price changed during operation, please try again") | |
341 | 341 | else { | |
342 | - | let | |
343 | - | let | |
344 | - | let | |
345 | - | $Tuple2([Reissue(Q, | |
342 | + | let bU = (bL / 6) | |
343 | + | let bV = (bL - bU) | |
344 | + | let bW = fraction(bP, bV, bQ) | |
345 | + | $Tuple2([Reissue(Q, bW, true), IntegerEntry(O, (bP + bW)), IntegerEntry(aZ(aY), lastBlock.timestamp), ScriptTransfer(addressFromStringValue(value(getString(aT))), bU, e), ScriptTransfer(bk, bT, Q)], bJ) | |
346 | 346 | } | |
347 | 347 | } | |
348 | 348 | } | |
349 | 349 | } | |
350 | 350 | } | |
351 | 351 | ||
352 | 352 | ||
353 | 353 | ||
354 | - | @Callable( | |
355 | - | func sellWlg ( | |
356 | - | let | |
357 | - | if ((size( | |
354 | + | @Callable(bD) | |
355 | + | func sellWlg (bI) = { | |
356 | + | let bJ = bd() | |
357 | + | if ((size(bD.payments) != 1)) | |
358 | 358 | then throw("exactly 1 payment must be attached") | |
359 | 359 | else { | |
360 | - | let | |
361 | - | let | |
362 | - | let | |
363 | - | if (( | |
360 | + | let bK = bD.payments[0] | |
361 | + | let bX = bK.amount | |
362 | + | let bM = valueOrErrorMessage(bK.assetId, "WAVES can't be used as payment") | |
363 | + | if ((bM != Q)) | |
364 | 364 | then throw("WLGOLD payments only!") | |
365 | 365 | else { | |
366 | - | let bk = | |
366 | + | let bk = bD.caller | |
367 | 367 | let aY = toString(bk) | |
368 | - | let | |
369 | - | let | |
370 | - | let | |
371 | - | let | |
372 | - | let | |
373 | - | if (( | |
374 | - | then throw((("You can get max " + aC( | |
375 | - | else if ((q > | |
368 | + | let bN = be(aY) | |
369 | + | let bO = av() | |
370 | + | let bP = bO[R] | |
371 | + | let bY = fraction(bO[S], 4, 5) | |
372 | + | let bL = fraction(bX, bY, k) | |
373 | + | if ((bL > bN)) | |
374 | + | then throw((("You can get max " + aC(bN, 6)) + " USDT")) | |
375 | + | else if ((q > bL)) | |
376 | 376 | then throw((("You can trade min " + aC(q, 6)) + " USDT")) | |
377 | - | else if (( | |
377 | + | else if ((bI > bL)) | |
378 | 378 | then throw("Price changed during operation, please try again") | |
379 | 379 | else { | |
380 | - | let | |
381 | - | let | |
382 | - | $Tuple2([Burn(Q, | |
380 | + | let bU = (bL / 4) | |
381 | + | let bZ = fraction((bL + bU), bP, bO[T]) | |
382 | + | $Tuple2([Burn(Q, bZ), IntegerEntry(O, (bP - bZ)), IntegerEntry(aZ(aY), lastBlock.timestamp), ScriptTransfer(addressFromStringValue(value(getString(aT))), bU, e), ScriptTransfer(bk, bL, e)], bJ) | |
383 | 383 | } | |
384 | 384 | } | |
385 | 385 | } | |
386 | 386 | } | |
387 | 387 | ||
388 | 388 | ||
389 | 389 | ||
390 | - | @Callable( | |
390 | + | @Callable(bD) | |
391 | 391 | func claim () = { | |
392 | - | let | |
393 | - | let | |
394 | - | $Tuple2( | |
392 | + | let bJ = bd() | |
393 | + | let ca = bj(toString(bD.caller))._1 | |
394 | + | $Tuple2(ca, bJ) | |
395 | 395 | } | |
396 | 396 | ||
397 | 397 | ||
398 | 398 | ||
399 | - | @Callable( | |
400 | - | func onStakeLand (aY) = if (( | |
399 | + | @Callable(bD) | |
400 | + | func onStakeLand (aY) = if ((bD.caller != G)) | |
401 | 401 | then throw("Permission denied") | |
402 | - | else bj( | |
402 | + | else bj(aY) | |
403 | 403 | ||
404 | 404 | ||
405 | 405 | ||
406 | - | @Callable( | |
407 | - | func onUnstakeLand (aY) = if (( | |
406 | + | @Callable(bD) | |
407 | + | func onUnstakeLand (aY) = if ((bD.caller != G)) | |
408 | 408 | then throw("Permission denied") | |
409 | - | else bj( | |
409 | + | else bj(aY) | |
410 | 410 | ||
411 | 411 |
github/deemru/w8io/026f985 123.95 ms ◑