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