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