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:BgI0CAISAwoBARIDCgEEEgMKAQgSAwoBCBIECgIICBIDCgEIEgQKAggBEgQKAggBEgMKAQESACgADGNvbnRyYWN0RmlsZQIRbDJtcF9sZWFzaW5nLnJpZGUAA1NFUAICX18BCHRocm93RXJyAQNtc2cJAAIBCQCsAgIJAKwCAgUMY29udHJhY3RGaWxlAgI6IAUDbXNnAAprZXlBc3NldElkCQC5CQIJAMwIAgICJXMJAMwIAgIHYXNzZXRJZAUDbmlsBQNTRVAADGtleUFkbWluTGlzdAkAuQkCCQDMCAICAiVzCQDMCAICCWFkbWluTGlzdAUDbmlsBQNTRVAADGtleUZvcmNlU3RvcAkAuQkCCQDMCAICAiVzCQDMCAICCWZvcmNlU3RvcAUDbmlsBQNTRVAAEWtleVBlcmlvZE9mZnNldElkCQC5CQIJAMwIAgICJXMJAMwIAgIIb2Zmc2V0SWQFA25pbAUDU0VQABVrZXlQZXJpb2RPZmZzZXRIZWlnaHQJALkJAgkAzAgCAgIlcwkAzAgCAgxvZmZzZXRIZWlnaHQFA25pbAUDU0VQAA9rZXlQZXJpb2RMZW5ndGg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zAgULdXNlckFkZHJlc3MFBmFtb3VudAFpAQhjbGFpbUFsbAAEC3VzZXJBZGRyZXNzCQClCAEIBQFpBmNhbGxlcgQNJHQwMTUxMjMxNTE4MwkBFWdldFVzZXJUb0NsYWltQmFsYW5jZQEFC3VzZXJBZGRyZXNzBAd0b0NsYWltCAUNJHQwMTUxMjMxNTE4MwJfMQQIdG9VbmxvY2sIBQ0kdDAxNTEyMzE1MTgzAl8yBAZjaGVja3MJAMwIAgMJAGYCBQd0b0NsYWltAAAGCQEIdGhyb3dFcnIBAhBub3RoaW5nIHRvIGNsYWltBQNuaWwDCQAAAgUGY2hlY2tzBQZjaGVja3MJARdnZXRDbGFpbVVubG9ja2VkQWN0aW9ucwIFC3VzZXJBZGRyZXNzBQd0b0NsYWltCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAFeoGik=", "height": 2978461, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Eh4JLzabPA8AzVPjEcfj9V8sMt8xCEzA8fRbiiqmRfY8 Next: 4NdZVT5TqqUqQVVYoF2PB4hRrXjeTdxvhchn2KA1WptP Diff:
OldNewDifferences
248248 }
249249
250250
251-func aD (r,t,an) = {
251+func aD (r,t,an,al) = {
252252 let aE = ad(t)
253253 let ab = aE._1
254254 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)
256259 let am = [if (!(B))
257260 then true
258- else c("contract is temporary stopped"), if ((an > 0))
261+ else c("contract is temporary stopped"), if ((1 >= size(al.payments)))
259262 then true
260- else c("amount should be greater than 0"), if ((aF >= an))
263+ else c("maximum 1 payment"), if (if ((size(al.payments) == 0))
261264 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))
263274 then true
264275 else c(makeString(["node address is not valid:", r], " ")), if (E(t))
265276 then true
266277 else c(makeString(["user address is not valid:", t], " "))]
267278 if ((am == am))
268279 then {
269- let aG = L(r)
270- let Q = aG._1
271- let S = aG._2
280+ let aH = L(r)
281+ let Q = aH._1
282+ let S = aH._2
272283 let ap = (S + an)
273- let aH = W(r, t)
274- let U = aH._1
275- let V = aH._2
284+ let aI = W(r, t)
285+ let U = aI._1
286+ let V = aI._2
276287 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))])
279291 let ai = aj(t)
280292 let as = (ai + an)
281293 [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)]
284296 }
285297
286298
287-func aI (aJ) = {
288- let aK = [if ((aJ > 0))
299+func aK (aL) = {
300+ let aM = [if ((aL > 0))
289301 then true
290302 else c("period length should be greater than 0")]
291- if ((aK == aK))
303+ if ((aM == aM))
292304 then if ((m == -1))
293- then [IntegerEntry(j, aJ), IntegerEntry(i, height)]
294- else [IntegerEntry(h, (n + 1)), IntegerEntry(i, p), IntegerEntry(j, aJ)]
305+ then [IntegerEntry(j, aL), IntegerEntry(i, height)]
306+ else [IntegerEntry(h, (n + 1)), IntegerEntry(i, p), IntegerEntry(j, aL)]
295307 else throw("Strict value is not equal to itself.")
296308 }
297309
298310
299311 @Callable(al)
300-func setNewPeriodLength (aJ) = {
312+func setNewPeriodLength (aL) = {
301313 let am = [if (C(toString(al.caller)))
302314 then true
303315 else c("caller is not in adminList")]
304316 if ((am == am))
305- then aI(aJ)
317+ then aK(aL)
306318 else throw("Strict value is not equal to itself.")
307319 }
308320
309321
310322
311323 @Callable(al)
312-func setForceStopFlag (aL) = {
313- let aK = [if (C(toString(al.caller)))
324+func setForceStopFlag (aN) = {
325+ let aM = [if (C(toString(al.caller)))
314326 then true
315327 else c("caller is not an admin")]
316- if ((aK == aK))
317- then [BooleanEntry(g, aL)]
328+ if ((aM == aM))
329+ then [BooleanEntry(g, aN)]
318330 else throw("Strict value is not equal to itself.")
319331 }
320332
322334
323335 @Callable(al)
324336 func getNodeDataREADONLY (r) = {
325- let aM = L(r)
326- let aN = aM._1
327- let J = aM._2
328- $Tuple2(nil, $Tuple5(o, aN, p, J, height))
337+ let aO = L(r)
338+ let aP = aO._1
339+ let J = aO._2
340+ $Tuple2(nil, $Tuple5(o, aP, p, J, height))
329341 }
330342
331343
332344
333345 @Callable(al)
334346 func getUserDataREADONLY (t) = {
335- let aO = ad(t)
336- let ab = aO._1
337- let ac = aO._2
347+ let aQ = ad(t)
348+ let ab = aQ._1
349+ let ac = aQ._2
338350 let ai = aj(t)
339351 $Tuple2(nil, $Tuple6(o, ab, p, ac, ai, height))
340352 }
355367
356368
357369 @Callable(al)
358-func leaseFromLocked (r,aP) = {
370+func leaseFromLocked (r,aR) = {
359371 let t = toString(al.caller)
360- aD(r, t, aP)
372+ aD(r, t, aR, al)
361373 }
362374
363375
364376
365377 @Callable(al)
366-func cancelLease (r,aP) = {
378+func cancelLease (r,aR) = {
367379 let t = toString(al.caller)
368- at(r, t, aP)
380+ at(r, t, aR)
369381 }
370382
371383
372384
373385 @Callable(al)
374-func claim (aP) = {
386+func claim (aR) = {
375387 let t = toString(al.caller)
376- az(t, aP)
388+ az(t, aR)
377389 }
378390
379391
381393 @Callable(al)
382394 func claimAll () = {
383395 let t = toString(al.caller)
384- let aQ = ad(t)
385- let ab = aQ._1
386- let ac = aQ._2
396+ let aS = ad(t)
397+ let ab = aS._1
398+ let ac = aS._2
387399 let am = [if ((ab > 0))
388400 then true
389401 else c("nothing to claim")]
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "l2mp_leasing.ride"
55
66 let b = "__"
77
88 func c (d) = throw(((a + ": ") + d))
99
1010
1111 let e = makeString(["%s", "assetId"], b)
1212
1313 let f = makeString(["%s", "adminList"], b)
1414
1515 let g = makeString(["%s", "forceStop"], b)
1616
1717 let h = makeString(["%s", "offsetId"], b)
1818
1919 let i = makeString(["%s", "offsetHeight"], b)
2020
2121 let j = makeString(["%s", "periodLength"], b)
2222
2323 let k = valueOrElse(getInteger(this, h), 0)
2424
2525 let l = valueOrElse(getInteger(this, j), 10000)
2626
2727 let m = valueOrElse(getInteger(this, i), -1)
2828
2929 let n = if (if ((height > m))
3030 then (m != -1)
3131 else false)
3232 then (((height - m) / l) + k)
3333 else max([0, (k - 1)])
3434
3535 let o = (m + ((n - k) * l))
3636
3737 let p = (o + l)
3838
3939 func q (r) = makeString(["%s", r], b)
4040
4141
4242 func s (t,r) = makeString(["%s%s", r, t], b)
4343
4444
4545 func u (t) = makeString(["%s%s", "toClaim", t], b)
4646
4747
4848 func v (t) = makeString(["%s%s", "userTotalLocked", t], b)
4949
5050
5151 func w (r) = makeString(["%s%d", r, toString(height)], b)
5252
5353
5454 func x (r,t) = makeString(["%s%s%d", r, t, toString(height)], b)
5555
5656
5757 let y = valueOrElse(getString(this, e), "WAVES")
5858
5959 let z = if ((y == "WAVES"))
6060 then unit
6161 else fromBase58String(y)
6262
6363 let A = split(valueOrElse(getString(this, f), ""), b)
6464
6565 let B = valueOrElse(getBoolean(this, g), false)
6666
6767 func C (D) = containsElement(A, D)
6868
6969
7070 func E (D) = {
7171 let F = addressFromString(D)
7272 if ($isInstanceOf(F, "Address"))
7373 then {
7474 let G = F
7575 true
7676 }
7777 else false
7878 }
7979
8080
8181 func H (r,I,J) = {
8282 let K = makeString(["%d%d%d%d", toString(o), toString(I), toString(p), toString(J)], b)
8383 StringEntry(q(r), K)
8484 }
8585
8686
8787 func L (r) = {
8888 let M = getString(this, q(r))
8989 let F = M
9090 if ($isInstanceOf(F, "String"))
9191 then {
9292 let N = F
9393 let O = split(N, b)
9494 let P = parseIntValue(O[1])
9595 let Q = parseIntValue(O[2])
9696 let R = parseIntValue(O[3])
9797 let S = parseIntValue(O[4])
9898 if ((R > height))
9999 then $Tuple2(Q, S)
100100 else $Tuple2(S, S)
101101 }
102102 else $Tuple2(0, 0)
103103 }
104104
105105
106106 func T (r,t,U,V) = {
107107 let K = makeString(["%d%d%d%d", toString(o), toString(U), toString(p), toString(V)], b)
108108 StringEntry(s(t, r), K)
109109 }
110110
111111
112112 func W (r,t) = {
113113 let X = getString(this, s(t, r))
114114 let F = X
115115 if ($isInstanceOf(F, "String"))
116116 then {
117117 let N = F
118118 let O = split(N, b)
119119 let Y = parseIntValue(O[1])
120120 let U = parseIntValue(O[2])
121121 let Z = parseIntValue(O[3])
122122 let V = parseIntValue(O[4])
123123 if ((Z > height))
124124 then $Tuple2(U, V)
125125 else $Tuple2(V, V)
126126 }
127127 else $Tuple2(0, 0)
128128 }
129129
130130
131131 func aa (t,ab,ac) = {
132132 let K = makeString(["%d%d%d%d", toString(o), toString(ab), toString(p), toString(ac)], b)
133133 StringEntry(u(t), K)
134134 }
135135
136136
137137 func ad (t) = {
138138 let ae = getString(this, u(t))
139139 let F = ae
140140 if ($isInstanceOf(F, "String"))
141141 then {
142142 let N = F
143143 let O = split(N, b)
144144 let af = parseIntValue(O[1])
145145 let ab = parseIntValue(O[2])
146146 let ag = parseIntValue(O[3])
147147 let ac = parseIntValue(O[4])
148148 if ((ag > height))
149149 then $Tuple2(ab, ac)
150150 else $Tuple2((ab + ac), 0)
151151 }
152152 else $Tuple2(0, 0)
153153 }
154154
155155
156156 func ah (t,ai) = IntegerEntry(v(t), ai)
157157
158158
159159 func aj (t) = valueOrElse(getInteger(this, v(t)), 0)
160160
161161
162162 func ak (r,t,al) = {
163163 let am = [if (!(B))
164164 then true
165165 else c("contract is temporary stopped"), if ((size(al.payments) == 1))
166166 then true
167167 else c("payment size should be exactly 1"), if ((al.payments[0].assetId == z))
168168 then true
169169 else c(makeString(["payment assetId should be:", y], " ")), if (E(r))
170170 then true
171171 else c(makeString(["node address is not valid:", r], " ")), if (E(t))
172172 then true
173173 else c(makeString(["user address is not valid:", t], " "))]
174174 if ((am == am))
175175 then {
176176 let an = al.payments[0].amount
177177 let ao = L(r)
178178 let Q = ao._1
179179 let S = ao._2
180180 let ap = (S + an)
181181 let aq = W(r, t)
182182 let U = aq._1
183183 let V = aq._2
184184 let ar = (V + an)
185185 let ai = aj(t)
186186 let as = (ai + an)
187187 [H(r, Q, ap), T(r, t, U, ar), ah(t, as), IntegerEntry(w(r), ap), IntegerEntry(x(r, t), ar)]
188188 }
189189 else throw("Strict value is not equal to itself.")
190190 }
191191
192192
193193 func at (r,t,au) = {
194194 let av = L(r)
195195 let Q = av._1
196196 let S = av._2
197197 let aw = W(r, t)
198198 let U = aw._1
199199 let V = aw._2
200200 let am = [if (!(B))
201201 then true
202202 else c("contract is temporary stopped"), if ((au > 0))
203203 then true
204204 else c("unstake amount should be greater than 0"), if ((V >= au))
205205 then true
206206 else c("unstake amount should be less or equal user staked amount"), if ((S >= au))
207207 then true
208208 else c("unstake amount should be less or equal node staked amount"), if (E(r))
209209 then true
210210 else c(makeString(["node address is not valid:", r], " ")), if (E(t))
211211 then true
212212 else c(makeString(["user address is not valid:", t], " "))]
213213 if ((am == am))
214214 then {
215215 let ap = (S - au)
216216 let ar = (V - au)
217217 let ax = ad(t)
218218 let ab = ax._1
219219 let ac = ax._2
220220 let ay = (ac + au)
221221 let ai = aj(t)
222222 let as = (ai - au)
223223 [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)]
224224 }
225225 else throw("Strict value is not equal to itself.")
226226 }
227227
228228
229229 func az (t,aA) = {
230230 let aB = ad(t)
231231 let ab = aB._1
232232 let ac = aB._2
233233 let am = [if (!(B))
234234 then true
235235 else c("contract is temporary stopped"), if ((aA > 0))
236236 then true
237237 else c("claim amount should be greater than 0"), if ((ab >= aA))
238238 then true
239239 else c("claim amount should be less or equal unlocked amount"), if (E(t))
240240 then true
241241 else c(makeString(["user address is not valid:", t], " "))]
242242 if ((am == am))
243243 then {
244244 let aC = (ab - aA)
245245 [aa(t, aC, ac), ScriptTransfer(addressFromStringValue(t), aA, z)]
246246 }
247247 else throw("Strict value is not equal to itself.")
248248 }
249249
250250
251-func aD (r,t,an) = {
251+func aD (r,t,an,al) = {
252252 let aE = ad(t)
253253 let ab = aE._1
254254 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)
256259 let am = [if (!(B))
257260 then true
258- else c("contract is temporary stopped"), if ((an > 0))
261+ else c("contract is temporary stopped"), if ((1 >= size(al.payments)))
259262 then true
260- else c("amount should be greater than 0"), if ((aF >= an))
263+ else c("maximum 1 payment"), if (if ((size(al.payments) == 0))
261264 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))
263274 then true
264275 else c(makeString(["node address is not valid:", r], " ")), if (E(t))
265276 then true
266277 else c(makeString(["user address is not valid:", t], " "))]
267278 if ((am == am))
268279 then {
269- let aG = L(r)
270- let Q = aG._1
271- let S = aG._2
280+ let aH = L(r)
281+ let Q = aH._1
282+ let S = aH._2
272283 let ap = (S + an)
273- let aH = W(r, t)
274- let U = aH._1
275- let V = aH._2
284+ let aI = W(r, t)
285+ let U = aI._1
286+ let V = aI._2
276287 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))])
279291 let ai = aj(t)
280292 let as = (ai + an)
281293 [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)]
282294 }
283295 else throw("Strict value is not equal to itself.")
284296 }
285297
286298
287-func aI (aJ) = {
288- let aK = [if ((aJ > 0))
299+func aK (aL) = {
300+ let aM = [if ((aL > 0))
289301 then true
290302 else c("period length should be greater than 0")]
291- if ((aK == aK))
303+ if ((aM == aM))
292304 then if ((m == -1))
293- then [IntegerEntry(j, aJ), IntegerEntry(i, height)]
294- else [IntegerEntry(h, (n + 1)), IntegerEntry(i, p), IntegerEntry(j, aJ)]
305+ then [IntegerEntry(j, aL), IntegerEntry(i, height)]
306+ else [IntegerEntry(h, (n + 1)), IntegerEntry(i, p), IntegerEntry(j, aL)]
295307 else throw("Strict value is not equal to itself.")
296308 }
297309
298310
299311 @Callable(al)
300-func setNewPeriodLength (aJ) = {
312+func setNewPeriodLength (aL) = {
301313 let am = [if (C(toString(al.caller)))
302314 then true
303315 else c("caller is not in adminList")]
304316 if ((am == am))
305- then aI(aJ)
317+ then aK(aL)
306318 else throw("Strict value is not equal to itself.")
307319 }
308320
309321
310322
311323 @Callable(al)
312-func setForceStopFlag (aL) = {
313- let aK = [if (C(toString(al.caller)))
324+func setForceStopFlag (aN) = {
325+ let aM = [if (C(toString(al.caller)))
314326 then true
315327 else c("caller is not an admin")]
316- if ((aK == aK))
317- then [BooleanEntry(g, aL)]
328+ if ((aM == aM))
329+ then [BooleanEntry(g, aN)]
318330 else throw("Strict value is not equal to itself.")
319331 }
320332
321333
322334
323335 @Callable(al)
324336 func getNodeDataREADONLY (r) = {
325- let aM = L(r)
326- let aN = aM._1
327- let J = aM._2
328- $Tuple2(nil, $Tuple5(o, aN, p, J, height))
337+ let aO = L(r)
338+ let aP = aO._1
339+ let J = aO._2
340+ $Tuple2(nil, $Tuple5(o, aP, p, J, height))
329341 }
330342
331343
332344
333345 @Callable(al)
334346 func getUserDataREADONLY (t) = {
335- let aO = ad(t)
336- let ab = aO._1
337- let ac = aO._2
347+ let aQ = ad(t)
348+ let ab = aQ._1
349+ let ac = aQ._2
338350 let ai = aj(t)
339351 $Tuple2(nil, $Tuple6(o, ab, p, ac, ai, height))
340352 }
341353
342354
343355
344356 @Callable(al)
345357 func leaseByAddress (r,t) = ak(r, t, al)
346358
347359
348360
349361 @Callable(al)
350362 func lease (r) = {
351363 let t = toString(al.caller)
352364 ak(r, t, al)
353365 }
354366
355367
356368
357369 @Callable(al)
358-func leaseFromLocked (r,aP) = {
370+func leaseFromLocked (r,aR) = {
359371 let t = toString(al.caller)
360- aD(r, t, aP)
372+ aD(r, t, aR, al)
361373 }
362374
363375
364376
365377 @Callable(al)
366-func cancelLease (r,aP) = {
378+func cancelLease (r,aR) = {
367379 let t = toString(al.caller)
368- at(r, t, aP)
380+ at(r, t, aR)
369381 }
370382
371383
372384
373385 @Callable(al)
374-func claim (aP) = {
386+func claim (aR) = {
375387 let t = toString(al.caller)
376- az(t, aP)
388+ az(t, aR)
377389 }
378390
379391
380392
381393 @Callable(al)
382394 func claimAll () = {
383395 let t = toString(al.caller)
384- let aQ = ad(t)
385- let ab = aQ._1
386- let ac = aQ._2
396+ let aS = ad(t)
397+ let ab = aS._1
398+ let ac = aS._2
387399 let am = [if ((ab > 0))
388400 then true
389401 else c("nothing to claim")]
390402 if ((am == am))
391403 then az(t, ab)
392404 else throw("Strict value is not equal to itself.")
393405 }
394406
395407

github/deemru/w8io/169f3d6 
86.07 ms