tx · H1vN3gaTNtFoRFFQE8FCXBZhZsroz5URutGNLpVR8kHT 3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1: -0.01200000 Waves 2024.01.09 16:24 [2924005] smart account 3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1 > SELF 0.00000000 Waves
{ "type": 13, "id": "H1vN3gaTNtFoRFFQE8FCXBZhZsroz5URutGNLpVR8kHT", "fee": 1200000, "feeAssetId": null, "timestamp": 1704806673268, "version": 2, "chainId": 84, "sender": "3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1", "senderPublicKey": "7c3qLtcJ7EaPS2JDjXv8MBbd4kpyc6R27wcn5GgvZhur", "proofs": [ "jEUWBAgk35dcqA1wLv8JbvVXGh4bFqEFVDJ4R56y73y48zVw6SEXzDa2auhEqbPBiKB1WLsGyHRJhZQjaBtgEua" ], "script": "base64:BgIbCAISBgoECAEBARIDCgEIEgMKAQgSABIDCgEIHQAMY29udHJhY3RGaWxlAhB2ZXN0aW5nX25lby5yaWRlAANTRVACAl9fAAhJRFNfTElTVAkAzAgCAAAJAMwIAgABCQDMCAIAAgkAzAgCAAMJAMwIAgAECQDMCAIABQkAzAgCAAYJAMwIAgAHCQDMCAIACAkAzAgCAAkJAMwIAgAKCQDMCAIACwkAzAgCAAwJAMwIAgANCQDMCAIADgkAzAgCAA8JAMwIAgAQCQDMCAIAEQkAzAgCABIJAMwIAgATCQDMCAIAFAkAzAgCABUJAMwIAgAWCQDMCAIAFwkAzAgCABgJAMwIAgAZCQDMCAIAGgkAzAgCABsJAMwIAgAcCQDMCAIAHQUDbmlsABFNQVhfVkVTVElOR19DT1VOVAkAkAMBBQhJRFNfTElTVAEIdGhyb3dFcnIBA21zZwkAAgEJAKwCAgkArAICBQxjb250cmFjdEZpbGUCAjogBQNtc2cACmtleUFzc2V0SWQJALkJAgkAzAgCAgIlcwkAzAgCAgdhc3NldElkBQNuaWwFA1NFUAANYXNzZXRJZFN0cmluZwkBC3ZhbHV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AgFCyR0MDk3MDQ5NzY5Al8yBA5oaXN0b3J5QWN0aW9ucwkAzAgCCQEMSW50ZWdlckVudHJ5AgkBEWtleVZlc3RpbmdIaXN0b3J5AwIHY2xhaW1lZAULdXNlckFkZHJlc3MJANgEAQgFAWkNdHJhbnNhY3Rpb25JZAULdG90YWxBbW91bnQFA25pbAMJAGYCBQt0b3RhbEFtb3VudAAACQDOCAIFDGNsYWltQWN0aW9ucwUOaGlzdG9yeUFjdGlvbnMJAQh0aHJvd0VycgECEG5vdGhpbmcgdG8gY2xhaW0BaQEQY2xhaW1BbGxSRUFET05MWQELdXNlckFkZHJlc3MEDSR0MDEwMDgwMTAxMzUJARJnZXRDbGFpbUFsbEFjdGlvbnMBBQt1c2VyQWRkcmVzcwQCX2EIBQ0kdDAxMDA4MDEwMTM1Al8xBAt0b3RhbEFtb3VudAgFDSR0MDEwMDgwMTAxMzUCXzIJAJQKAgUDbmlsCQCUCgIFC3RvdGFsQW1vdW50CQESZ2V0VmVzdGluZ1VzZXJJbmZvAQULdXNlckFkZHJlc3MAlPDe0A==", "height": 2924005, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DWqrgmBr8MS9DmXUHuPDBtB5P6PbayEXpCsG6kEtXAZu Next: 2vZvNzE12untPy6REKjUMyssnbkAC7xu6CQRfD5FJJYK Diff:
Old | New | Differences | |
---|---|---|---|
249 | 249 | ||
250 | 250 | ||
251 | 251 | func aD (t) = { | |
252 | - | func aE (aF,u) = { | |
253 | - | let aG = B(t, u) | |
254 | - | let y = aG._1 | |
255 | - | let z = aG._2 | |
256 | - | let A = aG._3 | |
257 | - | if ((y > 0)) | |
258 | - | then aF | |
259 | - | else if ((aF == -1)) | |
260 | - | then u | |
261 | - | else min([aF, u]) | |
252 | + | func aE (Z,u) = { | |
253 | + | let aF = B(t, u) | |
254 | + | let y = aF._1 | |
255 | + | let z = aF._2 | |
256 | + | let A = aF._3 | |
257 | + | let aG = L(t, u) | |
258 | + | let K = aG._1 | |
259 | + | let O = aG._2 | |
260 | + | if (if ((y == 0)) | |
261 | + | then true | |
262 | + | else containsElement(o, t)) | |
263 | + | then Z | |
264 | + | else (Z :+ [y, (z + A), K, O]) | |
262 | 265 | } | |
263 | 266 | ||
264 | - | let aF = { | |
267 | + | let ag = c | |
268 | + | let ah = size(ag) | |
269 | + | let ai = nil | |
270 | + | func aj (ak,al) = if ((al >= ah)) | |
271 | + | then ak | |
272 | + | else aE(ak, ag[al]) | |
273 | + | ||
274 | + | func am (ak,al) = if ((al >= ah)) | |
275 | + | then ak | |
276 | + | else throw("List size exceeds 30") | |
277 | + | ||
278 | + | am(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(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) | |
279 | + | } | |
280 | + | ||
281 | + | ||
282 | + | func aH (t) = { | |
283 | + | func aE (aI,u) = { | |
284 | + | let aJ = B(t, u) | |
285 | + | let y = aJ._1 | |
286 | + | let z = aJ._2 | |
287 | + | let A = aJ._3 | |
288 | + | if ((y > 0)) | |
289 | + | then aI | |
290 | + | else if ((aI == -1)) | |
291 | + | then u | |
292 | + | else min([aI, u]) | |
293 | + | } | |
294 | + | ||
295 | + | let aI = { | |
265 | 296 | let ag = c | |
266 | 297 | let ah = size(ag) | |
267 | 298 | let ai = -1 | |
275 | 306 | ||
276 | 307 | am(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(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) | |
277 | 308 | } | |
278 | - | if (( | |
309 | + | if ((aI == -1)) | |
279 | 310 | then e(makeString(["user exceeded max active vesting count: ", t], " ")) | |
280 | - | else | |
311 | + | else aI | |
281 | 312 | } | |
282 | 313 | ||
283 | 314 | ||
284 | - | func | |
315 | + | func aK (t,u,y,z,A) = [StringEntry(s(t, u), x(y, z, A))] | |
285 | 316 | ||
286 | 317 | ||
287 | - | @Callable( | |
318 | + | @Callable(aL) | |
288 | 319 | func vestingForUser (t,y,z,A) = { | |
289 | - | let | |
320 | + | let aM = [if ((size(aL.payments) == 1)) | |
290 | 321 | then true | |
291 | - | else e("should be with exactly 1 payment"), if (( | |
322 | + | else e("should be with exactly 1 payment"), if ((aL.payments[0].assetId == i)) | |
292 | 323 | then true | |
293 | - | else e(makeString(["payment assetId should be: ", h], " ")), if (( | |
324 | + | else e(makeString(["payment assetId should be: ", h], " ")), if ((aL.payments[0].amount == y)) | |
294 | 325 | then true | |
295 | 326 | else e("payment amount should be equal to vestingAmount"), if (if ((l == nil)) | |
296 | 327 | then true | |
297 | - | else containsElement(l, toString( | |
328 | + | else containsElement(l, toString(aL.caller))) | |
298 | 329 | then true | |
299 | 330 | else e("you must be admin")] | |
300 | - | if (( | |
331 | + | if ((aM == aM)) | |
301 | 332 | then { | |
302 | - | let u = | |
303 | - | let | |
304 | - | ( | |
333 | + | let u = aH(t) | |
334 | + | let aN = [IntegerEntry(E("vested", t, toBase58String(aL.transactionId)), y)] | |
335 | + | (aK(t, u, y, z, A) ++ aN) | |
305 | 336 | } | |
306 | 337 | else throw("Strict value is not equal to itself.") | |
307 | 338 | } | |
308 | 339 | ||
309 | 340 | ||
310 | 341 | ||
311 | - | @Callable(aI) | |
312 | - | func claimAll () = { | |
313 | - | let t = toString(aI.caller) | |
314 | - | let aL = aw(t) | |
315 | - | let ay = aL._1 | |
316 | - | let aC = aL._2 | |
317 | - | let aK = [IntegerEntry(E("claimed", t, toBase58String(aI.transactionId)), aC)] | |
318 | - | if ((aC > 0)) | |
319 | - | then (ay ++ aK) | |
320 | - | else e("nothing to claim") | |
321 | - | } | |
322 | - | ||
323 | - | ||
324 | - | ||
325 | - | @Callable(aI) | |
342 | + | @Callable(aL) | |
326 | 343 | func ban (t) = { | |
327 | 344 | let v = [if (if ((l == nil)) | |
328 | 345 | then true | |
329 | - | else containsElement(l, toString( | |
346 | + | else containsElement(l, toString(aL.caller))) | |
330 | 347 | then true | |
331 | 348 | else e("you must be admin"), if (!(containsElement(o, t))) | |
332 | 349 | then true | |
333 | 350 | else e(makeString(["user already in a ban list:", t], " "))] | |
334 | 351 | if ((v == v)) | |
335 | 352 | then { | |
336 | - | let | |
337 | - | let | |
338 | - | let | |
339 | - | let | |
340 | - | ( | |
353 | + | let aO = an(t) | |
354 | + | let aP = aO._1 | |
355 | + | let aQ = aO._2 | |
356 | + | let aR = [StringEntry(k, makeString_11C((o :+ t), "__"))] | |
357 | + | (aP ++ aR) | |
341 | 358 | } | |
342 | 359 | else throw("Strict value is not equal to itself.") | |
343 | 360 | } | |
344 | 361 | ||
345 | 362 | ||
346 | 363 | ||
347 | - | @Callable( | |
364 | + | @Callable(aL) | |
348 | 365 | func unban (t) = { | |
349 | 366 | let v = [if (if ((l == nil)) | |
350 | 367 | then true | |
351 | - | else containsElement(l, toString( | |
368 | + | else containsElement(l, toString(aL.caller))) | |
352 | 369 | then true | |
353 | 370 | else e("you must be admin"), if (containsElement(o, t)) | |
354 | 371 | then true | |
355 | 372 | else e(makeString(["user not in a ban list:", t], " "))] | |
356 | 373 | if ((v == v)) | |
357 | 374 | then { | |
358 | - | let | |
375 | + | let aS = { | |
359 | 376 | let m = indexOf(o, t) | |
360 | 377 | if ($isInstanceOf(m, "Int")) | |
361 | 378 | then { | |
362 | - | let | |
363 | - | removeByIndex(o, | |
379 | + | let aT = m | |
380 | + | removeByIndex(o, aT) | |
364 | 381 | } | |
365 | 382 | else e("user address index in ban list is not found") | |
366 | 383 | } | |
367 | - | if (( | |
384 | + | if ((aS == nil)) | |
368 | 385 | then [DeleteEntry(k)] | |
369 | - | else [StringEntry(k, makeString_11C( | |
386 | + | else [StringEntry(k, makeString_11C(aS, "__"))] | |
370 | 387 | } | |
371 | 388 | else throw("Strict value is not equal to itself.") | |
389 | + | } | |
390 | + | ||
391 | + | ||
392 | + | ||
393 | + | @Callable(aL) | |
394 | + | func claimAll () = { | |
395 | + | let t = toString(aL.caller) | |
396 | + | let aU = aw(t) | |
397 | + | let ay = aU._1 | |
398 | + | let aC = aU._2 | |
399 | + | let aN = [IntegerEntry(E("claimed", t, toBase58String(aL.transactionId)), aC)] | |
400 | + | if ((aC > 0)) | |
401 | + | then (ay ++ aN) | |
402 | + | else e("nothing to claim") | |
403 | + | } | |
404 | + | ||
405 | + | ||
406 | + | ||
407 | + | @Callable(aL) | |
408 | + | func claimAllREADONLY (t) = { | |
409 | + | let aV = aw(t) | |
410 | + | let aQ = aV._1 | |
411 | + | let aC = aV._2 | |
412 | + | $Tuple2(nil, $Tuple2(aC, aD(t))) | |
372 | 413 | } | |
373 | 414 | ||
374 | 415 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "vesting_neo.ride" | |
5 | 5 | ||
6 | 6 | let b = "__" | |
7 | 7 | ||
8 | 8 | let c = [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] | |
9 | 9 | ||
10 | 10 | let d = size(c) | |
11 | 11 | ||
12 | 12 | func e (f) = throw(((a + ": ") + f)) | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | let g = makeString(["%s", "assetId"], b) | |
16 | 16 | ||
17 | 17 | let h = valueOrElse(getString(this, g), "WAVES") | |
18 | 18 | ||
19 | 19 | let i = if ((h == "WAVES")) | |
20 | 20 | then unit | |
21 | 21 | else fromBase58String(h) | |
22 | 22 | ||
23 | 23 | let j = makeString(["%s", "adminList"], b) | |
24 | 24 | ||
25 | 25 | let k = makeString(["%s", "banList"], b) | |
26 | 26 | ||
27 | 27 | let l = { | |
28 | 28 | let m = getString(this, j) | |
29 | 29 | if ($isInstanceOf(m, "String")) | |
30 | 30 | then { | |
31 | 31 | let n = m | |
32 | 32 | split(n, b) | |
33 | 33 | } | |
34 | 34 | else nil | |
35 | 35 | } | |
36 | 36 | ||
37 | 37 | let o = { | |
38 | 38 | let m = getString(this, k) | |
39 | 39 | if ($isInstanceOf(m, "String")) | |
40 | 40 | then { | |
41 | 41 | let n = m | |
42 | 42 | if ((n == "")) | |
43 | 43 | then nil | |
44 | 44 | else split_51C(n, b) | |
45 | 45 | } | |
46 | 46 | else nil | |
47 | 47 | } | |
48 | 48 | ||
49 | 49 | func p (q) = { | |
50 | 50 | let m = addressFromString(q) | |
51 | 51 | if ($isInstanceOf(m, "Address")) | |
52 | 52 | then { | |
53 | 53 | let r = m | |
54 | 54 | true | |
55 | 55 | } | |
56 | 56 | else false | |
57 | 57 | } | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func s (t,u) = { | |
61 | 61 | let v = [if (p(t)) | |
62 | 62 | then true | |
63 | 63 | else e(makeString(["address is not valid:", t], " ")), if (if ((u >= 0)) | |
64 | 64 | then (d > u) | |
65 | 65 | else false) | |
66 | 66 | then true | |
67 | 67 | else e(makeString(["id should be less than", toString(d), "got:", toString(u)], " "))] | |
68 | 68 | if ((v == v)) | |
69 | 69 | then makeString(["%s%s%d", "vesting", t, toString(u)], b) | |
70 | 70 | else throw("Strict value is not equal to itself.") | |
71 | 71 | } | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func w (t) = { | |
75 | 75 | let v = [if (p(t)) | |
76 | 76 | then true | |
77 | 77 | else e(makeString(["address is not valid:", t], " "))] | |
78 | 78 | if ((v == v)) | |
79 | 79 | then makeString(["%s%s", "accumulated", t], b) | |
80 | 80 | else throw("Strict value is not equal to itself.") | |
81 | 81 | } | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func x (y,z,A) = { | |
85 | 85 | let v = [if ((y >= 0)) | |
86 | 86 | then true | |
87 | 87 | else e("vesting amount cannot be negative"), if ((z >= 0)) | |
88 | 88 | then true | |
89 | 89 | else e("start block cannot be negative"), if ((A >= 0)) | |
90 | 90 | then true | |
91 | 91 | else e("lock length cannot be negative")] | |
92 | 92 | if ((v == v)) | |
93 | 93 | then makeString(["%d%d%d", toString(y), toString(z), toString(A)], b) | |
94 | 94 | else throw("Strict value is not equal to itself.") | |
95 | 95 | } | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func B (t,u) = { | |
99 | 99 | let m = getString(this, s(t, u)) | |
100 | 100 | if ($isInstanceOf(m, "String")) | |
101 | 101 | then { | |
102 | 102 | let C = m | |
103 | 103 | let D = split(C, b) | |
104 | 104 | let y = parseIntValue(D[1]) | |
105 | 105 | let z = parseIntValue(D[2]) | |
106 | 106 | let A = parseIntValue(D[3]) | |
107 | 107 | $Tuple3(y, z, A) | |
108 | 108 | } | |
109 | 109 | else $Tuple3(0, 0, 0) | |
110 | 110 | } | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func E (F,t,G) = makeString(["%s%s%s%s", "history", t, F, G], b) | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func H (I,z,A) = { | |
117 | 117 | let J = (height - z) | |
118 | 118 | let K = if (if ((A != 0)) | |
119 | 119 | then (J > 0) | |
120 | 120 | else false) | |
121 | 121 | then min([fraction(I, J, A), I]) | |
122 | 122 | else 0 | |
123 | 123 | $Tuple2(K, (I - K)) | |
124 | 124 | } | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | func L (t,u) = { | |
128 | 128 | let M = B(t, u) | |
129 | 129 | let y = M._1 | |
130 | 130 | let z = M._2 | |
131 | 131 | let A = M._3 | |
132 | 132 | let N = H(y, z, A) | |
133 | 133 | let K = N._1 | |
134 | 134 | let O = N._2 | |
135 | 135 | $Tuple2(K, O) | |
136 | 136 | } | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | func P (t,u) = { | |
140 | 140 | let Q = B(t, u) | |
141 | 141 | let y = Q._1 | |
142 | 142 | let z = Q._2 | |
143 | 143 | let A = Q._3 | |
144 | 144 | let R = L(t, u) | |
145 | 145 | let K = R._1 | |
146 | 146 | let O = R._2 | |
147 | 147 | let S = max([((z + A) - height), 0]) | |
148 | 148 | let T = if ((K != 0)) | |
149 | 149 | then if ((S != 0)) | |
150 | 150 | then [StringEntry(s(t, u), x(O, height, S))] | |
151 | 151 | else [DeleteEntry(s(t, u))] | |
152 | 152 | else nil | |
153 | 153 | $Tuple2(T, K) | |
154 | 154 | } | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | func U (t,u) = { | |
158 | 158 | let V = P(t, u) | |
159 | 159 | let T = V._1 | |
160 | 160 | let K = V._2 | |
161 | 161 | let W = if ((K != 0)) | |
162 | 162 | then [ScriptTransfer(addressFromStringValue(t), K, i)] | |
163 | 163 | else nil | |
164 | 164 | $Tuple2((T ++ W), K) | |
165 | 165 | } | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | func X (t) = { | |
169 | 169 | func Y (Z,r) = { | |
170 | 170 | let aa = Z | |
171 | 171 | let ab = aa._1 | |
172 | 172 | let ac = aa._2 | |
173 | 173 | let ad = U(t, r) | |
174 | 174 | let ae = ad._1 | |
175 | 175 | let af = ad._2 | |
176 | 176 | $Tuple2((ab ++ ae), (ac + af)) | |
177 | 177 | } | |
178 | 178 | ||
179 | 179 | let ag = c | |
180 | 180 | let ah = size(ag) | |
181 | 181 | let ai = $Tuple2(nil, 0) | |
182 | 182 | func aj (ak,al) = if ((al >= ah)) | |
183 | 183 | then ak | |
184 | 184 | else Y(ak, ag[al]) | |
185 | 185 | ||
186 | 186 | func am (ak,al) = if ((al >= ah)) | |
187 | 187 | then ak | |
188 | 188 | else throw("List size exceeds 30") | |
189 | 189 | ||
190 | 190 | am(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(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) | |
191 | 191 | } | |
192 | 192 | ||
193 | 193 | ||
194 | 194 | func an (t) = { | |
195 | 195 | func Y (Z,r) = { | |
196 | 196 | let ao = Z | |
197 | 197 | let ap = ao._1 | |
198 | 198 | let ac = ao._2 | |
199 | 199 | let aq = P(t, r) | |
200 | 200 | let T = aq._1 | |
201 | 201 | let K = aq._2 | |
202 | 202 | $Tuple2((ap ++ T), (ac + K)) | |
203 | 203 | } | |
204 | 204 | ||
205 | 205 | let ar = { | |
206 | 206 | let ag = c | |
207 | 207 | let ah = size(ag) | |
208 | 208 | let ai = $Tuple2(nil, 0) | |
209 | 209 | func aj (ak,al) = if ((al >= ah)) | |
210 | 210 | then ak | |
211 | 211 | else Y(ak, ag[al]) | |
212 | 212 | ||
213 | 213 | func am (ak,al) = if ((al >= ah)) | |
214 | 214 | then ak | |
215 | 215 | else throw("List size exceeds 30") | |
216 | 216 | ||
217 | 217 | am(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(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) | |
218 | 218 | } | |
219 | 219 | let ap = ar._1 | |
220 | 220 | let as = ar._2 | |
221 | 221 | let at = valueOrElse(getInteger(this, w(t)), 0) | |
222 | 222 | let au = if ((as != 0)) | |
223 | 223 | then [IntegerEntry(w(t), (at + as))] | |
224 | 224 | else nil | |
225 | 225 | $Tuple2((ap ++ au), as) | |
226 | 226 | } | |
227 | 227 | ||
228 | 228 | ||
229 | 229 | func av (t) = { | |
230 | 230 | let at = valueOrElse(getInteger(this, w(t)), 0) | |
231 | 231 | if ((at != 0)) | |
232 | 232 | then $Tuple2([ScriptTransfer(addressFromStringValue(t), at, i), DeleteEntry(w(t))], at) | |
233 | 233 | else $Tuple2(nil, 0) | |
234 | 234 | } | |
235 | 235 | ||
236 | 236 | ||
237 | 237 | func aw (t) = { | |
238 | 238 | let ax = if (!(containsElement(o, t))) | |
239 | 239 | then X(t) | |
240 | 240 | else $Tuple2(nil, 0) | |
241 | 241 | let ay = ax._1 | |
242 | 242 | let K = ax._2 | |
243 | 243 | let az = av(t) | |
244 | 244 | let aA = az._1 | |
245 | 245 | let aB = az._2 | |
246 | 246 | let aC = (K + aB) | |
247 | 247 | $Tuple2((ay ++ aA), aC) | |
248 | 248 | } | |
249 | 249 | ||
250 | 250 | ||
251 | 251 | func aD (t) = { | |
252 | - | func aE (aF,u) = { | |
253 | - | let aG = B(t, u) | |
254 | - | let y = aG._1 | |
255 | - | let z = aG._2 | |
256 | - | let A = aG._3 | |
257 | - | if ((y > 0)) | |
258 | - | then aF | |
259 | - | else if ((aF == -1)) | |
260 | - | then u | |
261 | - | else min([aF, u]) | |
252 | + | func aE (Z,u) = { | |
253 | + | let aF = B(t, u) | |
254 | + | let y = aF._1 | |
255 | + | let z = aF._2 | |
256 | + | let A = aF._3 | |
257 | + | let aG = L(t, u) | |
258 | + | let K = aG._1 | |
259 | + | let O = aG._2 | |
260 | + | if (if ((y == 0)) | |
261 | + | then true | |
262 | + | else containsElement(o, t)) | |
263 | + | then Z | |
264 | + | else (Z :+ [y, (z + A), K, O]) | |
262 | 265 | } | |
263 | 266 | ||
264 | - | let aF = { | |
267 | + | let ag = c | |
268 | + | let ah = size(ag) | |
269 | + | let ai = nil | |
270 | + | func aj (ak,al) = if ((al >= ah)) | |
271 | + | then ak | |
272 | + | else aE(ak, ag[al]) | |
273 | + | ||
274 | + | func am (ak,al) = if ((al >= ah)) | |
275 | + | then ak | |
276 | + | else throw("List size exceeds 30") | |
277 | + | ||
278 | + | am(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(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) | |
279 | + | } | |
280 | + | ||
281 | + | ||
282 | + | func aH (t) = { | |
283 | + | func aE (aI,u) = { | |
284 | + | let aJ = B(t, u) | |
285 | + | let y = aJ._1 | |
286 | + | let z = aJ._2 | |
287 | + | let A = aJ._3 | |
288 | + | if ((y > 0)) | |
289 | + | then aI | |
290 | + | else if ((aI == -1)) | |
291 | + | then u | |
292 | + | else min([aI, u]) | |
293 | + | } | |
294 | + | ||
295 | + | let aI = { | |
265 | 296 | let ag = c | |
266 | 297 | let ah = size(ag) | |
267 | 298 | let ai = -1 | |
268 | 299 | func aj (ak,al) = if ((al >= ah)) | |
269 | 300 | then ak | |
270 | 301 | else aE(ak, ag[al]) | |
271 | 302 | ||
272 | 303 | func am (ak,al) = if ((al >= ah)) | |
273 | 304 | then ak | |
274 | 305 | else throw("List size exceeds 30") | |
275 | 306 | ||
276 | 307 | am(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(aj(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) | |
277 | 308 | } | |
278 | - | if (( | |
309 | + | if ((aI == -1)) | |
279 | 310 | then e(makeString(["user exceeded max active vesting count: ", t], " ")) | |
280 | - | else | |
311 | + | else aI | |
281 | 312 | } | |
282 | 313 | ||
283 | 314 | ||
284 | - | func | |
315 | + | func aK (t,u,y,z,A) = [StringEntry(s(t, u), x(y, z, A))] | |
285 | 316 | ||
286 | 317 | ||
287 | - | @Callable( | |
318 | + | @Callable(aL) | |
288 | 319 | func vestingForUser (t,y,z,A) = { | |
289 | - | let | |
320 | + | let aM = [if ((size(aL.payments) == 1)) | |
290 | 321 | then true | |
291 | - | else e("should be with exactly 1 payment"), if (( | |
322 | + | else e("should be with exactly 1 payment"), if ((aL.payments[0].assetId == i)) | |
292 | 323 | then true | |
293 | - | else e(makeString(["payment assetId should be: ", h], " ")), if (( | |
324 | + | else e(makeString(["payment assetId should be: ", h], " ")), if ((aL.payments[0].amount == y)) | |
294 | 325 | then true | |
295 | 326 | else e("payment amount should be equal to vestingAmount"), if (if ((l == nil)) | |
296 | 327 | then true | |
297 | - | else containsElement(l, toString( | |
328 | + | else containsElement(l, toString(aL.caller))) | |
298 | 329 | then true | |
299 | 330 | else e("you must be admin")] | |
300 | - | if (( | |
331 | + | if ((aM == aM)) | |
301 | 332 | then { | |
302 | - | let u = | |
303 | - | let | |
304 | - | ( | |
333 | + | let u = aH(t) | |
334 | + | let aN = [IntegerEntry(E("vested", t, toBase58String(aL.transactionId)), y)] | |
335 | + | (aK(t, u, y, z, A) ++ aN) | |
305 | 336 | } | |
306 | 337 | else throw("Strict value is not equal to itself.") | |
307 | 338 | } | |
308 | 339 | ||
309 | 340 | ||
310 | 341 | ||
311 | - | @Callable(aI) | |
312 | - | func claimAll () = { | |
313 | - | let t = toString(aI.caller) | |
314 | - | let aL = aw(t) | |
315 | - | let ay = aL._1 | |
316 | - | let aC = aL._2 | |
317 | - | let aK = [IntegerEntry(E("claimed", t, toBase58String(aI.transactionId)), aC)] | |
318 | - | if ((aC > 0)) | |
319 | - | then (ay ++ aK) | |
320 | - | else e("nothing to claim") | |
321 | - | } | |
322 | - | ||
323 | - | ||
324 | - | ||
325 | - | @Callable(aI) | |
342 | + | @Callable(aL) | |
326 | 343 | func ban (t) = { | |
327 | 344 | let v = [if (if ((l == nil)) | |
328 | 345 | then true | |
329 | - | else containsElement(l, toString( | |
346 | + | else containsElement(l, toString(aL.caller))) | |
330 | 347 | then true | |
331 | 348 | else e("you must be admin"), if (!(containsElement(o, t))) | |
332 | 349 | then true | |
333 | 350 | else e(makeString(["user already in a ban list:", t], " "))] | |
334 | 351 | if ((v == v)) | |
335 | 352 | then { | |
336 | - | let | |
337 | - | let | |
338 | - | let | |
339 | - | let | |
340 | - | ( | |
353 | + | let aO = an(t) | |
354 | + | let aP = aO._1 | |
355 | + | let aQ = aO._2 | |
356 | + | let aR = [StringEntry(k, makeString_11C((o :+ t), "__"))] | |
357 | + | (aP ++ aR) | |
341 | 358 | } | |
342 | 359 | else throw("Strict value is not equal to itself.") | |
343 | 360 | } | |
344 | 361 | ||
345 | 362 | ||
346 | 363 | ||
347 | - | @Callable( | |
364 | + | @Callable(aL) | |
348 | 365 | func unban (t) = { | |
349 | 366 | let v = [if (if ((l == nil)) | |
350 | 367 | then true | |
351 | - | else containsElement(l, toString( | |
368 | + | else containsElement(l, toString(aL.caller))) | |
352 | 369 | then true | |
353 | 370 | else e("you must be admin"), if (containsElement(o, t)) | |
354 | 371 | then true | |
355 | 372 | else e(makeString(["user not in a ban list:", t], " "))] | |
356 | 373 | if ((v == v)) | |
357 | 374 | then { | |
358 | - | let | |
375 | + | let aS = { | |
359 | 376 | let m = indexOf(o, t) | |
360 | 377 | if ($isInstanceOf(m, "Int")) | |
361 | 378 | then { | |
362 | - | let | |
363 | - | removeByIndex(o, | |
379 | + | let aT = m | |
380 | + | removeByIndex(o, aT) | |
364 | 381 | } | |
365 | 382 | else e("user address index in ban list is not found") | |
366 | 383 | } | |
367 | - | if (( | |
384 | + | if ((aS == nil)) | |
368 | 385 | then [DeleteEntry(k)] | |
369 | - | else [StringEntry(k, makeString_11C( | |
386 | + | else [StringEntry(k, makeString_11C(aS, "__"))] | |
370 | 387 | } | |
371 | 388 | else throw("Strict value is not equal to itself.") | |
389 | + | } | |
390 | + | ||
391 | + | ||
392 | + | ||
393 | + | @Callable(aL) | |
394 | + | func claimAll () = { | |
395 | + | let t = toString(aL.caller) | |
396 | + | let aU = aw(t) | |
397 | + | let ay = aU._1 | |
398 | + | let aC = aU._2 | |
399 | + | let aN = [IntegerEntry(E("claimed", t, toBase58String(aL.transactionId)), aC)] | |
400 | + | if ((aC > 0)) | |
401 | + | then (ay ++ aN) | |
402 | + | else e("nothing to claim") | |
403 | + | } | |
404 | + | ||
405 | + | ||
406 | + | ||
407 | + | @Callable(aL) | |
408 | + | func claimAllREADONLY (t) = { | |
409 | + | let aV = aw(t) | |
410 | + | let aQ = aV._1 | |
411 | + | let aC = aV._2 | |
412 | + | $Tuple2(nil, $Tuple2(aC, aD(t))) | |
372 | 413 | } | |
373 | 414 | ||
374 | 415 |
github/deemru/w8io/169f3d6 53.90 ms ◑