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:BgIbCAISBgoECAEBARIDCgEIEgMKAQgSABIDCgEIHQAMY29udHJhY3RGaWxlAhB2ZXN0aW5nX25lby5yaWRlAANTRVACAl9fAAhJRFNfTElTVAkAzAgCAAAJAMwIAgABCQDMCAIAAgkAzAgCAAMJAMwIAgAECQDMCAIABQkAzAgCAAYJAMwIAgAHCQDMCAIACAkAzAgCAAkJAMwIAgAKCQDMCAIACwkAzAgCAAwJAMwIAgANCQDMCAIADgkAzAgCAA8JAMwIAgAQCQDMCAIAEQkAzAgCABIJAMwIAgATCQDMCAIAFAkAzAgCABUJAMwIAgAWCQDMCAIAFwkAzAgCABgJAMwIAgAZCQDMCAIAGgkAzAgCABsJAMwIAgAcCQDMCAIAHQUDbmlsABFNQVhfVkVTVElOR19DT1VOVAkAkAMBBQhJRFNfTElTVAEIdGhyb3dFcnIBA21zZwkAAgEJAKwCAgkArAICBQxjb250cmFjdEZpbGUCAjogBQNtc2cACmtleUFzc2V0SWQJALkJAgkAzAgCAgIlcwkAzAgCAgdhc3NldElkBQNuaWwFA1NFUAANYXNzZXRJZFN0cmluZwkBC3ZhbH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udAgFCyR0MDk3MDQ5NzY5Al8yBA5oaXN0b3J5QWN0aW9ucwkAzAgCCQEMSW50ZWdlckVudHJ5AgkBEWtleVZlc3RpbmdIaXN0b3J5AwIHY2xhaW1lZAULdXNlckFkZHJlc3MJANgEAQgFAWkNdHJhbnNhY3Rpb25JZAULdG90YWxBbW91bnQFA25pbAMJAGYCBQt0b3RhbEFtb3VudAAACQDOCAIFDGNsYWltQWN0aW9ucwUOaGlzdG9yeUFjdGlvbnMJAQh0aHJvd0VycgECEG5vdGhpbmcgdG8gY2xhaW0BaQEQY2xhaW1BbGxSRUFET05MWQELdXNlckFkZHJlc3MEDSR0MDEwMDgwMTAxMzUJARJnZXRDbGFpbUFsbEFjdGlvbnMBBQt1c2VyQWRkcmVzcwQCX2EIBQ0kdDAxMDA4MDEwMTM1Al8xBAt0b3RhbEFtb3VudAgFDSR0MDEwMDgwMTAxMzUCXzIJAJQKAgUDbmlsCQCUCgIFC3RvdGFsQW1vdW50CQESZ2V0VmVzdGluZ1VzZXJJbmZvAQULdXNlckFkZHJlc3MAlPDe0A==", "height": 2924005, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DWqrgmBr8MS9DmXUHuPDBtB5P6PbayEXpCsG6kEtXAZu Next: 2vZvNzE12untPy6REKjUMyssnbkAC7xu6CQRfD5FJJYK Diff:
OldNewDifferences
249249
250250
251251 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])
262265 }
263266
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 = {
265296 let ag = c
266297 let ah = size(ag)
267298 let ai = -1
275306
276307 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)
277308 }
278- if ((aF == -1))
309+ if ((aI == -1))
279310 then e(makeString(["user exceeded max active vesting count: ", t], " "))
280- else aF
311+ else aI
281312 }
282313
283314
284-func aH (t,u,y,z,A) = [StringEntry(s(t, u), x(y, z, A))]
315+func aK (t,u,y,z,A) = [StringEntry(s(t, u), x(y, z, A))]
285316
286317
287-@Callable(aI)
318+@Callable(aL)
288319 func vestingForUser (t,y,z,A) = {
289- let aJ = [if ((size(aI.payments) == 1))
320+ let aM = [if ((size(aL.payments) == 1))
290321 then true
291- else e("should be with exactly 1 payment"), if ((aI.payments[0].assetId == i))
322+ else e("should be with exactly 1 payment"), if ((aL.payments[0].assetId == i))
292323 then true
293- else e(makeString(["payment assetId should be: ", h], " ")), if ((aI.payments[0].amount == y))
324+ else e(makeString(["payment assetId should be: ", h], " ")), if ((aL.payments[0].amount == y))
294325 then true
295326 else e("payment amount should be equal to vestingAmount"), if (if ((l == nil))
296327 then true
297- else containsElement(l, toString(aI.caller)))
328+ else containsElement(l, toString(aL.caller)))
298329 then true
299330 else e("you must be admin")]
300- if ((aJ == aJ))
331+ if ((aM == aM))
301332 then {
302- let u = aD(t)
303- let aK = [IntegerEntry(E("vested", t, toBase58String(aI.transactionId)), y)]
304- (aH(t, u, y, z, A) ++ aK)
333+ let u = aH(t)
334+ let aN = [IntegerEntry(E("vested", t, toBase58String(aL.transactionId)), y)]
335+ (aK(t, u, y, z, A) ++ aN)
305336 }
306337 else throw("Strict value is not equal to itself.")
307338 }
308339
309340
310341
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)
326343 func ban (t) = {
327344 let v = [if (if ((l == nil))
328345 then true
329- else containsElement(l, toString(aI.caller)))
346+ else containsElement(l, toString(aL.caller)))
330347 then true
331348 else e("you must be admin"), if (!(containsElement(o, t)))
332349 then true
333350 else e(makeString(["user already in a ban list:", t], " "))]
334351 if ((v == v))
335352 then {
336- let aM = an(t)
337- let aN = aM._1
338- let aO = aM._2
339- let aP = [StringEntry(k, makeString_11C((o :+ t), "__"))]
340- (aN ++ aP)
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)
341358 }
342359 else throw("Strict value is not equal to itself.")
343360 }
344361
345362
346363
347-@Callable(aI)
364+@Callable(aL)
348365 func unban (t) = {
349366 let v = [if (if ((l == nil))
350367 then true
351- else containsElement(l, toString(aI.caller)))
368+ else containsElement(l, toString(aL.caller)))
352369 then true
353370 else e("you must be admin"), if (containsElement(o, t))
354371 then true
355372 else e(makeString(["user not in a ban list:", t], " "))]
356373 if ((v == v))
357374 then {
358- let aQ = {
375+ let aS = {
359376 let m = indexOf(o, t)
360377 if ($isInstanceOf(m, "Int"))
361378 then {
362- let aR = m
363- removeByIndex(o, aR)
379+ let aT = m
380+ removeByIndex(o, aT)
364381 }
365382 else e("user address index in ban list is not found")
366383 }
367- if ((aQ == nil))
384+ if ((aS == nil))
368385 then [DeleteEntry(k)]
369- else [StringEntry(k, makeString_11C(aQ, "__"))]
386+ else [StringEntry(k, makeString_11C(aS, "__"))]
370387 }
371388 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)))
372413 }
373414
374415
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "vesting_neo.ride"
55
66 let b = "__"
77
88 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]
99
1010 let d = size(c)
1111
1212 func e (f) = throw(((a + ": ") + f))
1313
1414
1515 let g = makeString(["%s", "assetId"], b)
1616
1717 let h = valueOrElse(getString(this, g), "WAVES")
1818
1919 let i = if ((h == "WAVES"))
2020 then unit
2121 else fromBase58String(h)
2222
2323 let j = makeString(["%s", "adminList"], b)
2424
2525 let k = makeString(["%s", "banList"], b)
2626
2727 let l = {
2828 let m = getString(this, j)
2929 if ($isInstanceOf(m, "String"))
3030 then {
3131 let n = m
3232 split(n, b)
3333 }
3434 else nil
3535 }
3636
3737 let o = {
3838 let m = getString(this, k)
3939 if ($isInstanceOf(m, "String"))
4040 then {
4141 let n = m
4242 if ((n == ""))
4343 then nil
4444 else split_51C(n, b)
4545 }
4646 else nil
4747 }
4848
4949 func p (q) = {
5050 let m = addressFromString(q)
5151 if ($isInstanceOf(m, "Address"))
5252 then {
5353 let r = m
5454 true
5555 }
5656 else false
5757 }
5858
5959
6060 func s (t,u) = {
6161 let v = [if (p(t))
6262 then true
6363 else e(makeString(["address is not valid:", t], " ")), if (if ((u >= 0))
6464 then (d > u)
6565 else false)
6666 then true
6767 else e(makeString(["id should be less than", toString(d), "got:", toString(u)], " "))]
6868 if ((v == v))
6969 then makeString(["%s%s%d", "vesting", t, toString(u)], b)
7070 else throw("Strict value is not equal to itself.")
7171 }
7272
7373
7474 func w (t) = {
7575 let v = [if (p(t))
7676 then true
7777 else e(makeString(["address is not valid:", t], " "))]
7878 if ((v == v))
7979 then makeString(["%s%s", "accumulated", t], b)
8080 else throw("Strict value is not equal to itself.")
8181 }
8282
8383
8484 func x (y,z,A) = {
8585 let v = [if ((y >= 0))
8686 then true
8787 else e("vesting amount cannot be negative"), if ((z >= 0))
8888 then true
8989 else e("start block cannot be negative"), if ((A >= 0))
9090 then true
9191 else e("lock length cannot be negative")]
9292 if ((v == v))
9393 then makeString(["%d%d%d", toString(y), toString(z), toString(A)], b)
9494 else throw("Strict value is not equal to itself.")
9595 }
9696
9797
9898 func B (t,u) = {
9999 let m = getString(this, s(t, u))
100100 if ($isInstanceOf(m, "String"))
101101 then {
102102 let C = m
103103 let D = split(C, b)
104104 let y = parseIntValue(D[1])
105105 let z = parseIntValue(D[2])
106106 let A = parseIntValue(D[3])
107107 $Tuple3(y, z, A)
108108 }
109109 else $Tuple3(0, 0, 0)
110110 }
111111
112112
113113 func E (F,t,G) = makeString(["%s%s%s%s", "history", t, F, G], b)
114114
115115
116116 func H (I,z,A) = {
117117 let J = (height - z)
118118 let K = if (if ((A != 0))
119119 then (J > 0)
120120 else false)
121121 then min([fraction(I, J, A), I])
122122 else 0
123123 $Tuple2(K, (I - K))
124124 }
125125
126126
127127 func L (t,u) = {
128128 let M = B(t, u)
129129 let y = M._1
130130 let z = M._2
131131 let A = M._3
132132 let N = H(y, z, A)
133133 let K = N._1
134134 let O = N._2
135135 $Tuple2(K, O)
136136 }
137137
138138
139139 func P (t,u) = {
140140 let Q = B(t, u)
141141 let y = Q._1
142142 let z = Q._2
143143 let A = Q._3
144144 let R = L(t, u)
145145 let K = R._1
146146 let O = R._2
147147 let S = max([((z + A) - height), 0])
148148 let T = if ((K != 0))
149149 then if ((S != 0))
150150 then [StringEntry(s(t, u), x(O, height, S))]
151151 else [DeleteEntry(s(t, u))]
152152 else nil
153153 $Tuple2(T, K)
154154 }
155155
156156
157157 func U (t,u) = {
158158 let V = P(t, u)
159159 let T = V._1
160160 let K = V._2
161161 let W = if ((K != 0))
162162 then [ScriptTransfer(addressFromStringValue(t), K, i)]
163163 else nil
164164 $Tuple2((T ++ W), K)
165165 }
166166
167167
168168 func X (t) = {
169169 func Y (Z,r) = {
170170 let aa = Z
171171 let ab = aa._1
172172 let ac = aa._2
173173 let ad = U(t, r)
174174 let ae = ad._1
175175 let af = ad._2
176176 $Tuple2((ab ++ ae), (ac + af))
177177 }
178178
179179 let ag = c
180180 let ah = size(ag)
181181 let ai = $Tuple2(nil, 0)
182182 func aj (ak,al) = if ((al >= ah))
183183 then ak
184184 else Y(ak, ag[al])
185185
186186 func am (ak,al) = if ((al >= ah))
187187 then ak
188188 else throw("List size exceeds 30")
189189
190190 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)
191191 }
192192
193193
194194 func an (t) = {
195195 func Y (Z,r) = {
196196 let ao = Z
197197 let ap = ao._1
198198 let ac = ao._2
199199 let aq = P(t, r)
200200 let T = aq._1
201201 let K = aq._2
202202 $Tuple2((ap ++ T), (ac + K))
203203 }
204204
205205 let ar = {
206206 let ag = c
207207 let ah = size(ag)
208208 let ai = $Tuple2(nil, 0)
209209 func aj (ak,al) = if ((al >= ah))
210210 then ak
211211 else Y(ak, ag[al])
212212
213213 func am (ak,al) = if ((al >= ah))
214214 then ak
215215 else throw("List size exceeds 30")
216216
217217 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)
218218 }
219219 let ap = ar._1
220220 let as = ar._2
221221 let at = valueOrElse(getInteger(this, w(t)), 0)
222222 let au = if ((as != 0))
223223 then [IntegerEntry(w(t), (at + as))]
224224 else nil
225225 $Tuple2((ap ++ au), as)
226226 }
227227
228228
229229 func av (t) = {
230230 let at = valueOrElse(getInteger(this, w(t)), 0)
231231 if ((at != 0))
232232 then $Tuple2([ScriptTransfer(addressFromStringValue(t), at, i), DeleteEntry(w(t))], at)
233233 else $Tuple2(nil, 0)
234234 }
235235
236236
237237 func aw (t) = {
238238 let ax = if (!(containsElement(o, t)))
239239 then X(t)
240240 else $Tuple2(nil, 0)
241241 let ay = ax._1
242242 let K = ax._2
243243 let az = av(t)
244244 let aA = az._1
245245 let aB = az._2
246246 let aC = (K + aB)
247247 $Tuple2((ay ++ aA), aC)
248248 }
249249
250250
251251 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])
262265 }
263266
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 = {
265296 let ag = c
266297 let ah = size(ag)
267298 let ai = -1
268299 func aj (ak,al) = if ((al >= ah))
269300 then ak
270301 else aE(ak, ag[al])
271302
272303 func am (ak,al) = if ((al >= ah))
273304 then ak
274305 else throw("List size exceeds 30")
275306
276307 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)
277308 }
278- if ((aF == -1))
309+ if ((aI == -1))
279310 then e(makeString(["user exceeded max active vesting count: ", t], " "))
280- else aF
311+ else aI
281312 }
282313
283314
284-func aH (t,u,y,z,A) = [StringEntry(s(t, u), x(y, z, A))]
315+func aK (t,u,y,z,A) = [StringEntry(s(t, u), x(y, z, A))]
285316
286317
287-@Callable(aI)
318+@Callable(aL)
288319 func vestingForUser (t,y,z,A) = {
289- let aJ = [if ((size(aI.payments) == 1))
320+ let aM = [if ((size(aL.payments) == 1))
290321 then true
291- else e("should be with exactly 1 payment"), if ((aI.payments[0].assetId == i))
322+ else e("should be with exactly 1 payment"), if ((aL.payments[0].assetId == i))
292323 then true
293- else e(makeString(["payment assetId should be: ", h], " ")), if ((aI.payments[0].amount == y))
324+ else e(makeString(["payment assetId should be: ", h], " ")), if ((aL.payments[0].amount == y))
294325 then true
295326 else e("payment amount should be equal to vestingAmount"), if (if ((l == nil))
296327 then true
297- else containsElement(l, toString(aI.caller)))
328+ else containsElement(l, toString(aL.caller)))
298329 then true
299330 else e("you must be admin")]
300- if ((aJ == aJ))
331+ if ((aM == aM))
301332 then {
302- let u = aD(t)
303- let aK = [IntegerEntry(E("vested", t, toBase58String(aI.transactionId)), y)]
304- (aH(t, u, y, z, A) ++ aK)
333+ let u = aH(t)
334+ let aN = [IntegerEntry(E("vested", t, toBase58String(aL.transactionId)), y)]
335+ (aK(t, u, y, z, A) ++ aN)
305336 }
306337 else throw("Strict value is not equal to itself.")
307338 }
308339
309340
310341
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)
326343 func ban (t) = {
327344 let v = [if (if ((l == nil))
328345 then true
329- else containsElement(l, toString(aI.caller)))
346+ else containsElement(l, toString(aL.caller)))
330347 then true
331348 else e("you must be admin"), if (!(containsElement(o, t)))
332349 then true
333350 else e(makeString(["user already in a ban list:", t], " "))]
334351 if ((v == v))
335352 then {
336- let aM = an(t)
337- let aN = aM._1
338- let aO = aM._2
339- let aP = [StringEntry(k, makeString_11C((o :+ t), "__"))]
340- (aN ++ aP)
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)
341358 }
342359 else throw("Strict value is not equal to itself.")
343360 }
344361
345362
346363
347-@Callable(aI)
364+@Callable(aL)
348365 func unban (t) = {
349366 let v = [if (if ((l == nil))
350367 then true
351- else containsElement(l, toString(aI.caller)))
368+ else containsElement(l, toString(aL.caller)))
352369 then true
353370 else e("you must be admin"), if (containsElement(o, t))
354371 then true
355372 else e(makeString(["user not in a ban list:", t], " "))]
356373 if ((v == v))
357374 then {
358- let aQ = {
375+ let aS = {
359376 let m = indexOf(o, t)
360377 if ($isInstanceOf(m, "Int"))
361378 then {
362- let aR = m
363- removeByIndex(o, aR)
379+ let aT = m
380+ removeByIndex(o, aT)
364381 }
365382 else e("user address index in ban list is not found")
366383 }
367- if ((aQ == nil))
384+ if ((aS == nil))
368385 then [DeleteEntry(k)]
369- else [StringEntry(k, makeString_11C(aQ, "__"))]
386+ else [StringEntry(k, makeString_11C(aS, "__"))]
370387 }
371388 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)))
372413 }
373414
374415

github/deemru/w8io/169f3d6 
53.90 ms