tx · 7L2X6cEFBPWHmdncQoHzyT1DLNWebqc9YoU9TCWiuwVu

3N6HSS7Toat1RhyEsyqVGgVSRzH19W1FTbP:  -0.01900000 Waves

2023.06.21 14:00 [2632312] smart account 3N6HSS7Toat1RhyEsyqVGgVSRzH19W1FTbP > SELF 0.00000000 Waves

{ "type": 13, "id": "7L2X6cEFBPWHmdncQoHzyT1DLNWebqc9YoU9TCWiuwVu", "fee": 1900000, "feeAssetId": null, "timestamp": 1687345329386, "version": 2, "chainId": 84, "sender": "3N6HSS7Toat1RhyEsyqVGgVSRzH19W1FTbP", "senderPublicKey": "AoKo4segKHU4DeJnxXQYJj2u7J6XJeux6r8KLW52cd2Q", "proofs": [ "32BCAHjMGVjebAACYshtHMPUetXwtJj2M1D89GcPk64E7CuavBTnitkxwrMKaDC2vgxDTgSrhrKgX59NGntJV9ZR" ], "script": "base64:BwIrCAISAwoBAhIHCgUCAQEBARIDCgECEgMKAQISBAoCAgISBAoCAgISAwoBAicAA1NFUAICX18ADUNPTlRSQUNUX05BTUUCD2NhbGN1bGF0b3IucmlkZQAGU0NBTEU4AIDC1y8AB1BFTkRJTkcCB1BFTkRJTkcACEZJTklTSEVEAghGSU5JU0hFRAAFV0FWRVMCBVdBVkVTAQd3cmFwRXJyAQFzCQCsAgIJAKwCAgUNQ09OVFJBQ1RfTkFNRQICOiAFAXMBCHRocm93RXJyAQFzCQACAQkBB3dyYXBFcnIBBQFzAQ9hc3NldElkVG9TdHJpbmcBB2Fzc2V0SWQEByRtYXRjaDAFB2Fzc2V0SWQDCQABAgUHJG1hdGNoMAIKQnl0ZVZlY3RvcgQBYgUHJG1hdGNoMAkA2AQBBQFiAwkAAQIFByRtYXRjaDACBFVuaXQFBVdBVkVTCQACAQILTWF0Y2ggZXJyb3IBA2FicwEBbgMJAGYCAAAFAW4JAQEtAQUBbgUBbgERa2V5RmFjdG9yeUFkZHJlc3MACQC5CQIJAMwIAgICJXMJAMwIAgIHZmFjdG9yeQUDbmlsBQNTRVAB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EDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5uwdghQ==", "height": 2632312, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2gXw4zBaDWfMqYvJ3C8MSDrbNddPqjuU1aPjMc33sAAY Next: 2BKD6hYCQoca8zJa9hG3XpSTYCvUDbYtsubAg9ger5b3 Diff:
OldNewDifferences
3232 }
3333
3434
35-func n () = makeString(["%s", "factory"], a)
35+func n (o) = if ((0 > o))
36+ then -(o)
37+ else o
3638
3739
38-func o () = makeString(["%s", "lpAssetId"], a)
40+func p () = makeString(["%s", "factory"], a)
3941
4042
41-func p () = makeString(["%s", "treasury"], a)
43+func q () = makeString(["%s", "lpAssetId"], a)
4244
4345
44-func q (k) = makeString(["%s%s", "invested", j(k)], a)
46+func r () = makeString(["%s", "xtnAssetId"], a)
4547
4648
47-func r (s) = makeString(["%s%s", "available", toString(s)], a)
49+func s () = makeString(["%s", "treasury"], a)
4850
4951
50-func t (s) = makeString(["%s%s", "claimed", toString(s)], a)
52+func t (k) = makeString(["%s%s", "invested", j(k)], a)
5153
5254
53-func u () = makeString(["%s", "currentPeriod"], a)
55+func u (v) = makeString(["%s%s", "available", toString(v)], a)
5456
5557
56-func v (w) = makeString(["%s%d", "price", toString(w)], a)
58+func w (v) = makeString(["%s%s", "claimed", toString(v)], a)
5759
5860
59-func x (w) = makeString(["%s%d", "startHeight", toString(w)], a)
61+func x () = makeString(["%s", "currentPeriod"], a)
6062
6163
62-func y () = "%s__periodLength"
64+func y (z) = makeString(["%s%d", "price", toString(z)], a)
6365
6466
65-func z () = "%s__blockProcessingReward"
67+func A (z) = makeString(["%s%d", "startHeight", toString(z)], a)
6668
6769
68-func A () = "%s__nextBlockToProcess"
70+func B () = "%s__periodLength"
6971
7072
71-func B (C) = makeString(["%s%d", "blockProcessed", toString(C)], a)
73+func C () = "%s__blockProcessingReward"
7274
7375
74-func D () = "%s__withdrawal"
76+func D () = "%s__nextBlockToProcess"
7577
7678
77-func E (s,F) = makeString(["%s%s%s", "withdrawal", toString(s), toBase58String(F)], a)
79+func E (F) = makeString(["%s%d", "blockProcessed", toString(F)], a)
7880
7981
80-func G (H,I,J,K) = {
81- let L = {
82- let l = K
82+func G () = "%s__withdrawal"
83+
84+
85+func H (v,I) = makeString(["%s%s%s", "withdrawal", toString(v), toBase58String(I)], a)
86+
87+
88+func J (K,L,M,N) = {
89+ let O = {
90+ let l = N
8391 if ($isInstanceOf(l, "ByteVector"))
8492 then {
8593 let m = l
8997 then "SOON"
9098 else throw("Match error")
9199 }
92- makeString(["%s%d%d%s", H, toString(I), toString(J), L], a)
100+ makeString(["%s%d%d%s", K, toString(L), toString(M), O], a)
93101 }
94102
95103
96-func M (h) = {
97- let N = split(h, a)
98- if ((size(N) == 5))
104+func P (h) = {
105+ let Q = split(h, a)
106+ if ((size(Q) == 5))
99107 then {
100- let H = N[1]
101- let I = valueOrErrorMessage(parseInt(N[2]), g("invalid lpAssetAmount"))
102- let J = valueOrErrorMessage(parseInt(N[3]), g("invalid targetPeriod"))
103- let K = N[4]
104- $Tuple4(H, I, J, K)
108+ let K = Q[1]
109+ let L = valueOrErrorMessage(parseInt(Q[2]), g("invalid lpAssetAmount"))
110+ let M = valueOrErrorMessage(parseInt(Q[3]), g("invalid targetPeriod"))
111+ let N = Q[4]
112+ $Tuple4(K, L, M, N)
105113 }
106114 else i("invalid withdrawal request value")
107115 }
108116
109117
110-let O = {
111- let l = getString(this, n())
118+let R = {
119+ let l = getString(this, p())
112120 if ($isInstanceOf(l, "String"))
113121 then {
114122 let h = l
119127 else throw("Match error")
120128 }
121129
122-let P = valueOrErrorMessage(O, g("invalid factory address"))
130+let S = valueOrErrorMessage(R, g("invalid factory address"))
123131
124-let Q = {
125- let l = O
132+let T = {
133+ let l = R
126134 if ($isInstanceOf(l, "Address"))
127135 then {
128- let R = l
129- let S = getString(R, o())
130- if ($isInstanceOf(S, "String"))
136+ let U = l
137+ let V = getString(U, q())
138+ if ($isInstanceOf(V, "String"))
131139 then {
132- let h = S
140+ let h = V
133141 fromBase58String(h)
134142 }
135- else if ($isInstanceOf(S, "Unit"))
143+ else if ($isInstanceOf(V, "Unit"))
136144 then unit
137145 else throw("Match error")
138146 }
141149 else throw("Match error")
142150 }
143151
144-let T = valueOrErrorMessage(Q, g("invalid lpAssetId"))
152+let W = valueOrErrorMessage(T, g("invalid lpAssetId"))
145153
146-let U = {
147- let l = O
154+let X = {
155+ let l = R
148156 if ($isInstanceOf(l, "Address"))
149157 then {
150- let R = l
151- let S = getString(R, p())
152- if ($isInstanceOf(S, "String"))
158+ let U = l
159+ let V = getString(U, r())
160+ if ($isInstanceOf(V, "String"))
153161 then {
154- let h = S
155- addressFromString(h)
162+ let h = V
163+ fromBase58String(h)
156164 }
157- else if ($isInstanceOf(S, "Unit"))
165+ else if ($isInstanceOf(V, "Unit"))
158166 then unit
159167 else throw("Match error")
160168 }
163171 else throw("Match error")
164172 }
165173
166-let V = valueOrErrorMessage(U, g("invalid treasury address"))
174+let Y = valueOrErrorMessage(X, g("invalid xtnAssetId"))
167175
168-func W (X,Y) = if ((X.caller == Y))
176+let Z = {
177+ let l = R
178+ if ($isInstanceOf(l, "Address"))
179+ then {
180+ let U = l
181+ let V = getString(U, s())
182+ if ($isInstanceOf(V, "String"))
183+ then {
184+ let h = V
185+ addressFromString(h)
186+ }
187+ else if ($isInstanceOf(V, "Unit"))
188+ then unit
189+ else throw("Match error")
190+ }
191+ else if ($isInstanceOf(l, "Unit"))
192+ then unit
193+ else throw("Match error")
194+ }
195+
196+let aa = valueOrErrorMessage(Z, g("invalid treasury address"))
197+
198+func ab (ac,ad) = if ((ac.caller == ad))
169199 then true
170200 else i("permission denied")
171201
172202
173-func Z (X) = W(X, P)
203+func ae (ac) = ab(ac, S)
174204
175205
176-func aa (ab,ac) = {
177- let h = size(ab)
178- let ad = ab[0]
179- let ae = ad._1
180- let af = ad._2
181- let ag = ab[1]
182- let ah = ag._1
183- let ai = ag._2
184- let aj = ab[2]
185- let ak = aj._1
186- let al = aj._2
206+func af (ag,ah) = {
207+ let h = size(ag)
208+ let ai = ag[0]
209+ let aj = ai._1
210+ let ak = ai._2
211+ let al = ag[1]
212+ let am = al._1
213+ let an = al._2
214+ let ao = ag[2]
215+ let ap = ao._1
216+ let aq = ao._2
187217 if (if ((h > 0))
188- then (ae == ac)
218+ then (aj == ah)
189219 else false)
190- then af
220+ then ak
191221 else if (if ((h > 1))
192- then (ah == ac)
222+ then (am == ah)
193223 else false)
194- then ai
224+ then an
195225 else if (if ((h > 2))
196- then (ak == ac)
226+ then (ap == ah)
197227 else false)
198- then al
228+ then aq
199229 else unit
200230 }
201231
202232
203-@Callable(X)
204-func claimLP (am) = {
205- let an = Z(X)
206- if ((an == an))
233+@Callable(ac)
234+func claimLP (ar) = {
235+ let as = ae(ac)
236+ if ((as == as))
207237 then {
208- let s = Address(am)
209- let ao = valueOrElse(getInteger(P, r(s)), 0)
210- let ap = valueOrElse(getInteger(P, t(s)), 0)
211- let aq = if ((ao > 0))
212- then [invoke(P, "transferAsset", [am, ao, T], nil), invoke(P, "integerEntry", [r(s), 0], nil), invoke(P, "stringEntry", [t(s), (ap + ao)], nil)]
238+ let v = Address(ar)
239+ let at = valueOrElse(getInteger(S, u(v)), 0)
240+ let au = valueOrElse(getInteger(S, w(v)), 0)
241+ let av = if ((at > 0))
242+ then [invoke(S, "transferAsset", [ar, at, W], nil), invoke(S, "integerEntry", [u(v), 0], nil), invoke(S, "integerEntry", [w(v), (au + at)], nil)]
213243 else i("nothing to claim")
214- $Tuple2(nil, aq)
244+ $Tuple2(nil, av)
215245 }
216246 else throw("Strict value is not equal to itself.")
217247 }
218248
219249
220250
221-@Callable(X)
222-func finalize (ar,as,at,au) = {
223- let av = [if ((X.originCaller == P))
224- then true
225- else i("permission denied"), if ((ar >= 0))
226- then true
227- else i("invalid new treasury volume"), if ((as >= 0))
228- then true
229- else i("invalid XTN price"), if (if ((at >= 0))
230- then (c >= at)
231- else false)
232- then true
233- else i("invalid PWR managers bonus"), if (if ((au >= -(c)))
234- then (c >= au)
235- else false)
236- then true
237- else i("invalid treasury volume diff allocation coefficient")]
238- if ((av == av))
251+@Callable(ac)
252+func finalize (ar,aw,ax,ay,az) = {
253+ let as = ae(ac)
254+ if ((as == as))
239255 then {
240- let aw = valueOrErrorMessage(getInteger(P, u()), g("invalid period"))
241- let ax = (aw + 1)
242- let ay = c
243- let az = 0
244- let aq = [invoke(P, "integerEntry", [u(), ax], nil), invoke(P, "integerEntry", [v(ax), ay], nil), invoke(P, "burn", [az], nil)]
245- $Tuple2(nil, aq)
246- }
247- else throw("Strict value is not equal to itself.")
248- }
249-
250-
251-
252-@Callable(X)
253-func invest (am) = {
254- let an = Z(X)
255- if ((an == an))
256- then {
257- let s = Address(am)
258- let aw = valueOrErrorMessage(getInteger(P, u()), g("invalid period"))
259- let aA = valueOrErrorMessage(getInteger(P, v(aw)), g("invalid price"))
260- let aB = if ((size(X.payments) == 1))
261- then X.payments[0]
262- else i("invalid payments")
263- let aC = if (if ((aB.assetId == unit))
264- then (aB.amount > 0)
256+ let aA = valueOrErrorMessage(getInteger(S, x()), g("invalid period"))
257+ let aB = valueOrErrorMessage(getInteger(S, B()), g("invalid period length"))
258+ let aC = valueOrErrorMessage(getInteger(S, A(aA)), g("invalid start height"))
259+ let aD = valueOrErrorMessage(getInteger(S, y(aA)), g("invalid price"))
260+ let aE = valueOrErrorMessage(getInteger(S, D()), g("invalid next block to process"))
261+ let aF = ((aC + aB) - 1)
262+ let aG = [if ((aE > aF))
263+ then true
264+ else i("unprocessed blocks"), if ((aw >= 0))
265+ then true
266+ else i("invalid new treasury volume"), if ((ax >= 0))
267+ then true
268+ else i("invalid XTN price"), if (if ((ay >= 0))
269+ then (c >= ay)
265270 else false)
266- then aB.amount
267- else i("invalid payment amount")
268- let I = if ((aA > 0))
269- then fraction(aC, c, aA)
270- else 0
271- let aD = valueOrElse(getInteger(P, q(unit)), 0)
272- let aq = [invoke(P, "integerEntry", [q(unit), (aD + aC)], nil), invoke(P, "reissue", [I], nil), invoke(P, "transferAsset", [am, I, T], nil), invoke(P, "transferWaves", [V.bytes, aC], [AttachedPayment(unit, aC)])]
273- $Tuple2(nil, aq)
274- }
275- else throw("Strict value is not equal to itself.")
276- }
277-
278-
279-
280-@Callable(X)
281-func withdraw (am) = {
282- let an = Z(X)
283- if ((an == an))
284- then {
285- let s = Address(am)
286- let aw = valueOrErrorMessage(getInteger(P, u()), g("invalid period"))
287- let aB = if ((size(X.payments) == 1))
288- then X.payments[0]
289- else i(g("invalid payments"))
290- let aE = if ((aB.assetId == T))
291- then T
292- else i("invalid payment asset")
293- let aC = if ((aB.amount > 0))
294- then aB.amount
295- else i("invalid payment amount")
296- let aF = valueOrElse(getInteger(P, D()), 0)
297- let aq = [invoke(P, "integerEntry", [D(), (aF + aC)], nil), invoke(P, "stringEntry", [E(s, X.transactionId), G(d, aC, (aw + 1), unit)], nil)]
298- if ((aq == aq))
299- then $Tuple2([ScriptTransfer(P, aC, aE)], aq)
271+ then true
272+ else i("invalid PWR managers bonus"), if (if ((az >= -(c)))
273+ then (c >= az)
274+ else false)
275+ then true
276+ else i("invalid treasury volume diff allocation coefficient")]
277+ if ((aG == aG))
278+ then {
279+ let aH = valueOrElse(getInteger(S, t(Y)), 0)
280+ let aI = valueOrElse(getInteger(S, t(unit)), 0)
281+ let aJ = fraction(aH, ax, c)
282+ let aK = (aJ + aI)
283+ let aL = (aw - aK)
284+ let aM = if ((aL > 0))
285+ then fraction(aL, ay, c)
286+ else 0
287+ let aN = (aL - aM)
288+ let aO = if ((aK > 0))
289+ then fraction(aJ, c, aK)
290+ else 0
291+ let aP = fraction(aN, aO, c)
292+ let aQ = (aN - aP)
293+ let aR = n(az)
294+ let aS = fraction(aQ, if ((0 > az))
295+ then aR
296+ else 0, c)
297+ let aT = fraction(aP, if ((az > 0))
298+ then aR
299+ else 0, c)
300+ let aU = ((aP - aT) + aS)
301+ let aV = ((aQ - aS) + aT)
302+ let aW = (aI + aV)
303+ let aX = fraction((aJ + aU), c, ax)
304+ let aY = (aA + 1)
305+ let aZ = valueOrErrorMessage(assetInfo(W), g("invalid lpAsset info")).quantity
306+ let ba = fraction(aW, c, aZ)
307+ let bb = valueOrElse(getInteger(S, G()), 0)
308+ let bc = fraction(bb, ba, c)
309+ let bd = if (if (if ((size(ac.payments) == 1))
310+ then (ac.payments[0].assetId == unit)
311+ else false)
312+ then (ac.payments[0].amount >= bc)
313+ else false)
314+ then true
315+ else i(("invalid payments, payment amount min: " + toString(bc)))
316+ if ((bd == bd))
317+ then {
318+ let av = [invoke(S, "integerEntry", [x(), aY], nil), invoke(S, "integerEntry", [y(aY), ba], nil), invoke(S, "burn", [bb], nil), invoke(S, "integerEntry", [G(), 0], nil)]
319+ $Tuple2(nil, av)
320+ }
321+ else throw("Strict value is not equal to itself.")
322+ }
300323 else throw("Strict value is not equal to itself.")
301324 }
302325 else throw("Strict value is not equal to itself.")
304327
305328
306329
307-@Callable(X)
308-func cancelWithdraw (am,F) = {
309- let an = Z(X)
310- if ((an == an))
330+@Callable(ac)
331+func invest (ar) = {
332+ let as = ae(ac)
333+ if ((as == as))
311334 then {
312- let s = Address(am)
313- let aG = valueOrErrorMessage(getString(P, E(s, F)), g("invalid withdrawal request"))
314- let aH = M(aG)
315- let H = aH._1
316- let I = aH._2
317- let J = aH._3
318- let K = aH._4
319- if ((H == d))
320- then {
321- let aF = valueOrErrorMessage(getInteger(P, D()), g("invalid total withdrawal amount"))
322- let aq = [invoke(P, "integerEntry", [D(), if ((aF >= I))
323- then (aF - I)
324- else i("invalid withdrawal amount")], nil), invoke(P, "deleteEntry", [E(s, F)], nil), invoke(P, "transferAsset", [am, I, T], nil)]
325- if ((aq == aq))
326- then $Tuple2(nil, aq)
327- else throw("Strict value is not equal to itself.")
328- }
329- else i("invalid withdrawal request status")
335+ let v = Address(ar)
336+ let aA = valueOrErrorMessage(getInteger(S, x()), g("invalid period"))
337+ let aD = valueOrErrorMessage(getInteger(S, y(aA)), g("invalid price"))
338+ let be = if ((size(ac.payments) == 1))
339+ then ac.payments[0]
340+ else i("invalid payments")
341+ let bf = if (if ((be.assetId == unit))
342+ then (be.amount > 0)
343+ else false)
344+ then be.amount
345+ else i("invalid payment amount")
346+ let L = if ((aD > 0))
347+ then fraction(bf, c, aD)
348+ else 0
349+ let bg = valueOrElse(getInteger(S, t(unit)), 0)
350+ let av = [invoke(S, "integerEntry", [t(unit), (bg + bf)], nil), invoke(S, "reissue", [L], nil), invoke(S, "transferAsset", [ar, L, W], nil), invoke(S, "transferWaves", [aa.bytes, bf], [AttachedPayment(unit, bf)])]
351+ $Tuple2(nil, av)
330352 }
331353 else throw("Strict value is not equal to itself.")
332354 }
333355
334356
335357
336-@Callable(X)
337-func claimWaves (am,F) = {
338- let an = Z(X)
339- if ((an == an))
358+@Callable(ac)
359+func withdraw (ar) = {
360+ let as = ae(ac)
361+ if ((as == as))
340362 then {
341- let s = Address(am)
342- let aw = valueOrErrorMessage(getInteger(P, u()), g("invalid period"))
343- let aG = valueOrErrorMessage(getString(P, E(s, F)), g("invalid withdrawal request"))
344- let aI = M(aG)
345- let H = aI._1
346- let I = aI._2
347- let J = aI._3
348- let K = aI._4
349- if ((H == e))
363+ let v = Address(ar)
364+ let aA = valueOrErrorMessage(getInteger(S, x()), g("invalid period"))
365+ let be = if ((size(ac.payments) == 1))
366+ then ac.payments[0]
367+ else i(g("invalid payments"))
368+ let bh = if ((be.assetId == W))
369+ then W
370+ else i("invalid payment asset")
371+ let bf = if ((be.amount > 0))
372+ then be.amount
373+ else i("invalid payment amount")
374+ let bi = valueOrElse(getInteger(S, G()), 0)
375+ let av = [invoke(S, "integerEntry", [G(), (bi + bf)], nil), invoke(S, "stringEntry", [H(v, ac.transactionId), J(d, bf, (aA + 1), unit)], nil)]
376+ if ((av == av))
377+ then $Tuple2([ScriptTransfer(S, bf, bh)], av)
378+ else throw("Strict value is not equal to itself.")
379+ }
380+ else throw("Strict value is not equal to itself.")
381+ }
382+
383+
384+
385+@Callable(ac)
386+func cancelWithdraw (ar,I) = {
387+ let as = ae(ac)
388+ if ((as == as))
389+ then {
390+ let v = Address(ar)
391+ let bj = valueOrErrorMessage(getString(S, H(v, I)), g("invalid withdrawal request"))
392+ let aA = valueOrErrorMessage(getInteger(S, x()), g("invalid period"))
393+ let bk = P(bj)
394+ let K = bk._1
395+ let L = bk._2
396+ let M = bk._3
397+ let N = bk._4
398+ let aG = [if ((K == d))
399+ then true
400+ else i("invalid withdrawal request status"), if ((M > aA))
401+ then true
402+ else i("invalid withdrawal request period")]
403+ if ((aG == aG))
404+ then {
405+ let bi = valueOrErrorMessage(getInteger(S, G()), g("invalid total withdrawal amount"))
406+ let av = [invoke(S, "integerEntry", [G(), if ((bi >= L))
407+ then (bi - L)
408+ else i("invalid withdrawal amount")], nil), invoke(S, "deleteEntry", [H(v, I)], nil), invoke(S, "transferAsset", [ar, L, W], nil)]
409+ if ((av == av))
410+ then $Tuple2(nil, av)
411+ else throw("Strict value is not equal to itself.")
412+ }
413+ else throw("Strict value is not equal to itself.")
414+ }
415+ else throw("Strict value is not equal to itself.")
416+ }
417+
418+
419+
420+@Callable(ac)
421+func claimWaves (ar,I) = {
422+ let as = ae(ac)
423+ if ((as == as))
424+ then {
425+ let v = Address(ar)
426+ let aA = valueOrErrorMessage(getInteger(S, x()), g("invalid period"))
427+ let bj = valueOrErrorMessage(getString(S, H(v, I)), g("invalid withdrawal request"))
428+ let bl = P(bj)
429+ let K = bl._1
430+ let L = bl._2
431+ let M = bl._3
432+ let N = bl._4
433+ if ((K == e))
350434 then i("invalid withdrawal request status")
351- else if ((J > aw))
435+ else if ((M > aA))
352436 then i("invalid withdrawal request period")
353437 else {
354- let aA = valueOrErrorMessage(getInteger(P, v(aw)), g("invalid price"))
355- let aJ = if ((aA > 0))
356- then fraction(I, aA, c)
438+ let bm = valueOrErrorMessage(getInteger(S, y(M)), g("invalid price"))
439+ let bn = if ((bm > 0))
440+ then fraction(L, bm, c)
357441 else 0
358- let aq = [invoke(P, "stringEntry", [E(s, F), G(e, I, J, X.transactionId)], nil), invoke(P, "burn", [I], nil), invoke(P, "transferWaves", [am, aJ], nil)]
359- $Tuple2(nil, aq)
442+ let av = [invoke(S, "stringEntry", [H(v, I), J(e, L, M, ac.transactionId)], nil), invoke(S, "burn", [L], nil), invoke(S, "transferWaves", [ar, bn], nil)]
443+ $Tuple2(nil, av)
360444 }
361445 }
362446 else throw("Strict value is not equal to itself.")
364448
365449
366450
367-@Callable(X)
368-func processBlocks (am) = {
369- let an = Z(X)
370- if ((an == an))
451+@Callable(ac)
452+func processBlocks (ar) = {
453+ let as = ae(ac)
454+ if ((as == as))
371455 then {
372- let s = Address(am)
373- let aw = valueOrErrorMessage(getInteger(P, u()), g("invalid period"))
374- let aK = valueOrErrorMessage(getInteger(P, y()), g("invalid period length"))
375- let aL = valueOrErrorMessage(getInteger(P, x(aw)), g("invalid start height"))
376- let aA = valueOrErrorMessage(getInteger(P, v(aw)), g("invalid price"))
377- let aM = valueOrErrorMessage(getInteger(P, A()), g("invalid next block to process"))
378- let aN = ((aL + aK) - 1)
379- let aO = 40
380- let aP = if (if (if ((height >= aM))
381- then if ((aM >= aL))
456+ let v = Address(ar)
457+ let aA = valueOrErrorMessage(getInteger(S, x()), g("invalid period"))
458+ let aB = valueOrErrorMessage(getInteger(S, B()), g("invalid period length"))
459+ let aC = valueOrErrorMessage(getInteger(S, A(aA)), g("invalid start height"))
460+ let aD = valueOrErrorMessage(getInteger(S, y(aA)), g("invalid price"))
461+ let aE = valueOrErrorMessage(getInteger(S, D()), g("invalid next block to process"))
462+ let aF = ((aC + aB) - 1)
463+ let bo = 40
464+ let bp = if (if (if ((height >= aE))
465+ then if ((aE >= aC))
382466 then true
383- else (aw == 0)
467+ else (aA == 0)
384468 else false)
385- then (aN >= aM)
469+ then (aF >= aE)
386470 else false)
387- then min([((aN - aM) + 1), aO])
471+ then min([((aF - aE) + 1), bo])
388472 else i(g("invalid target block"))
389- let aQ = valueOrErrorMessage(getInteger(P, z()), g("invalid block processing reward"))
390- let aR = (aQ / aP)
391- let aS = (aQ - (aR * aP))
392- func aT (aU,aV) = if ((aV >= aP))
393- then aU
473+ let bq = valueOrErrorMessage(getInteger(S, C()), g("invalid block processing reward"))
474+ let br = (bq / bp)
475+ let bs = (bq - (br * bp))
476+ func bt (bu,bv) = if ((bv >= bp))
477+ then bu
394478 else {
395- let aW = (aM + aV)
396- let aX = valueOrErrorMessage(blockInfoByHeight(aW), g("invalid block info"))
397- let aY = valueOrErrorMessage(aa(aX.rewards, V), g(("invalid treasury reward for height " + toString(aW))))
398- let aZ = aX.generator
399- let ao = valueOrElse(getInteger(P, r(aZ)), 0)
400- let ba = if ((aV == (aP - 1)))
401- then (aR + aS)
402- else aR
403- let I = if ((aA > 0))
404- then fraction((aY - ba), c, aA)
479+ let bw = (aE + bv)
480+ let bx = valueOrErrorMessage(blockInfoByHeight(bw), g("invalid block info"))
481+ let by = valueOrErrorMessage(af(bx.rewards, aa), g(("invalid treasury reward for height " + toString(bw))))
482+ let bz = bx.generator
483+ let at = valueOrElse(getInteger(S, u(bz)), 0)
484+ let bA = if ((bv == (bp - 1)))
485+ then (br + bs)
486+ else br
487+ let L = if ((aD > 0))
488+ then fraction((by - bA), c, aD)
405489 else 0
406- let bb = [invoke(P, "stringEntry", [B(aW), makeString([toBase58String(X.transactionId), toBase58String(am), toString(aY), toString(ba), toString(I)], a)], nil), invoke(P, "integerEntry", [r(aZ), (ao + I)], nil)]
407- if ((bb == bb))
408- then (aU + I)
490+ let bB = [invoke(S, "stringEntry", [E(bw), makeString([toBase58String(ac.transactionId), toBase58String(ar), toString(by), toString(bA), toString(L)], a)], nil), invoke(S, "integerEntry", [u(bz), (at + L)], nil)]
491+ if ((bB == bB))
492+ then (bu + L)
409493 else throw("Strict value is not equal to itself.")
410494 }
411495
412- let bc = [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, 31, 32, 33, 34, 35, 36, 37, 38, 39]
413- let bd = {
414- let be = bc
415- let bf = size(be)
416- let bg = 0
417- func bh (bi,bj) = if ((bj >= bf))
418- then bi
419- else aT(bi, be[bj])
496+ let bC = [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, 31, 32, 33, 34, 35, 36, 37, 38, 39]
497+ let bD = {
498+ let bE = bC
499+ let bF = size(bE)
500+ let bG = 0
501+ func bH (bI,bJ) = if ((bJ >= bF))
502+ then bI
503+ else bt(bI, bE[bJ])
420504
421- func bk (bi,bj) = if ((bj >= bf))
422- then bi
505+ func bK (bI,bJ) = if ((bJ >= bF))
506+ then bI
423507 else throw("List size exceeds 40")
424508
425- bk(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bg, 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), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40)
509+ bK(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bG, 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), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40)
426510 }
427- if ((bd == bd))
511+ if ((bD == bD))
428512 then {
429- let bl = [invoke(P, "transferWaves", [am, aQ], nil), invoke(P, "reissue", [bd], nil), invoke(P, "integerEntry", [A(), (aM + aP)], nil)]
430- if ((bl == bl))
513+ let bL = [invoke(S, "transferWaves", [ar, bq], nil), invoke(S, "reissue", [bD], nil), invoke(S, "integerEntry", [D(), (aE + bp)], nil)]
514+ if ((bL == bL))
431515 then $Tuple2(nil, unit)
432516 else throw("Strict value is not equal to itself.")
433517 }
437521 }
438522
439523
440-@Verifier(bm)
441-func bn () = sigVerify(bm.bodyBytes, bm.proofs[0], bm.senderPublicKey)
524+@Verifier(bM)
525+func bN () = sigVerify(bM.bodyBytes, bM.proofs[0], bM.senderPublicKey)
442526
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 7 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "__"
55
66 let b = "calculator.ride"
77
88 let c = 100000000
99
1010 let d = "PENDING"
1111
1212 let e = "FINISHED"
1313
1414 let f = "WAVES"
1515
1616 func g (h) = ((b + ": ") + h)
1717
1818
1919 func i (h) = throw(g(h))
2020
2121
2222 func j (k) = {
2323 let l = k
2424 if ($isInstanceOf(l, "ByteVector"))
2525 then {
2626 let m = l
2727 toBase58String(m)
2828 }
2929 else if ($isInstanceOf(l, "Unit"))
3030 then f
3131 else throw("Match error")
3232 }
3333
3434
35-func n () = makeString(["%s", "factory"], a)
35+func n (o) = if ((0 > o))
36+ then -(o)
37+ else o
3638
3739
38-func o () = makeString(["%s", "lpAssetId"], a)
40+func p () = makeString(["%s", "factory"], a)
3941
4042
41-func p () = makeString(["%s", "treasury"], a)
43+func q () = makeString(["%s", "lpAssetId"], a)
4244
4345
44-func q (k) = makeString(["%s%s", "invested", j(k)], a)
46+func r () = makeString(["%s", "xtnAssetId"], a)
4547
4648
47-func r (s) = makeString(["%s%s", "available", toString(s)], a)
49+func s () = makeString(["%s", "treasury"], a)
4850
4951
50-func t (s) = makeString(["%s%s", "claimed", toString(s)], a)
52+func t (k) = makeString(["%s%s", "invested", j(k)], a)
5153
5254
53-func u () = makeString(["%s", "currentPeriod"], a)
55+func u (v) = makeString(["%s%s", "available", toString(v)], a)
5456
5557
56-func v (w) = makeString(["%s%d", "price", toString(w)], a)
58+func w (v) = makeString(["%s%s", "claimed", toString(v)], a)
5759
5860
59-func x (w) = makeString(["%s%d", "startHeight", toString(w)], a)
61+func x () = makeString(["%s", "currentPeriod"], a)
6062
6163
62-func y () = "%s__periodLength"
64+func y (z) = makeString(["%s%d", "price", toString(z)], a)
6365
6466
65-func z () = "%s__blockProcessingReward"
67+func A (z) = makeString(["%s%d", "startHeight", toString(z)], a)
6668
6769
68-func A () = "%s__nextBlockToProcess"
70+func B () = "%s__periodLength"
6971
7072
71-func B (C) = makeString(["%s%d", "blockProcessed", toString(C)], a)
73+func C () = "%s__blockProcessingReward"
7274
7375
74-func D () = "%s__withdrawal"
76+func D () = "%s__nextBlockToProcess"
7577
7678
77-func E (s,F) = makeString(["%s%s%s", "withdrawal", toString(s), toBase58String(F)], a)
79+func E (F) = makeString(["%s%d", "blockProcessed", toString(F)], a)
7880
7981
80-func G (H,I,J,K) = {
81- let L = {
82- let l = K
82+func G () = "%s__withdrawal"
83+
84+
85+func H (v,I) = makeString(["%s%s%s", "withdrawal", toString(v), toBase58String(I)], a)
86+
87+
88+func J (K,L,M,N) = {
89+ let O = {
90+ let l = N
8391 if ($isInstanceOf(l, "ByteVector"))
8492 then {
8593 let m = l
8694 toBase58String(m)
8795 }
8896 else if ($isInstanceOf(l, "Unit"))
8997 then "SOON"
9098 else throw("Match error")
9199 }
92- makeString(["%s%d%d%s", H, toString(I), toString(J), L], a)
100+ makeString(["%s%d%d%s", K, toString(L), toString(M), O], a)
93101 }
94102
95103
96-func M (h) = {
97- let N = split(h, a)
98- if ((size(N) == 5))
104+func P (h) = {
105+ let Q = split(h, a)
106+ if ((size(Q) == 5))
99107 then {
100- let H = N[1]
101- let I = valueOrErrorMessage(parseInt(N[2]), g("invalid lpAssetAmount"))
102- let J = valueOrErrorMessage(parseInt(N[3]), g("invalid targetPeriod"))
103- let K = N[4]
104- $Tuple4(H, I, J, K)
108+ let K = Q[1]
109+ let L = valueOrErrorMessage(parseInt(Q[2]), g("invalid lpAssetAmount"))
110+ let M = valueOrErrorMessage(parseInt(Q[3]), g("invalid targetPeriod"))
111+ let N = Q[4]
112+ $Tuple4(K, L, M, N)
105113 }
106114 else i("invalid withdrawal request value")
107115 }
108116
109117
110-let O = {
111- let l = getString(this, n())
118+let R = {
119+ let l = getString(this, p())
112120 if ($isInstanceOf(l, "String"))
113121 then {
114122 let h = l
115123 addressFromString(h)
116124 }
117125 else if ($isInstanceOf(l, "Unit"))
118126 then unit
119127 else throw("Match error")
120128 }
121129
122-let P = valueOrErrorMessage(O, g("invalid factory address"))
130+let S = valueOrErrorMessage(R, g("invalid factory address"))
123131
124-let Q = {
125- let l = O
132+let T = {
133+ let l = R
126134 if ($isInstanceOf(l, "Address"))
127135 then {
128- let R = l
129- let S = getString(R, o())
130- if ($isInstanceOf(S, "String"))
136+ let U = l
137+ let V = getString(U, q())
138+ if ($isInstanceOf(V, "String"))
131139 then {
132- let h = S
140+ let h = V
133141 fromBase58String(h)
134142 }
135- else if ($isInstanceOf(S, "Unit"))
143+ else if ($isInstanceOf(V, "Unit"))
136144 then unit
137145 else throw("Match error")
138146 }
139147 else if ($isInstanceOf(l, "Unit"))
140148 then unit
141149 else throw("Match error")
142150 }
143151
144-let T = valueOrErrorMessage(Q, g("invalid lpAssetId"))
152+let W = valueOrErrorMessage(T, g("invalid lpAssetId"))
145153
146-let U = {
147- let l = O
154+let X = {
155+ let l = R
148156 if ($isInstanceOf(l, "Address"))
149157 then {
150- let R = l
151- let S = getString(R, p())
152- if ($isInstanceOf(S, "String"))
158+ let U = l
159+ let V = getString(U, r())
160+ if ($isInstanceOf(V, "String"))
153161 then {
154- let h = S
155- addressFromString(h)
162+ let h = V
163+ fromBase58String(h)
156164 }
157- else if ($isInstanceOf(S, "Unit"))
165+ else if ($isInstanceOf(V, "Unit"))
158166 then unit
159167 else throw("Match error")
160168 }
161169 else if ($isInstanceOf(l, "Unit"))
162170 then unit
163171 else throw("Match error")
164172 }
165173
166-let V = valueOrErrorMessage(U, g("invalid treasury address"))
174+let Y = valueOrErrorMessage(X, g("invalid xtnAssetId"))
167175
168-func W (X,Y) = if ((X.caller == Y))
176+let Z = {
177+ let l = R
178+ if ($isInstanceOf(l, "Address"))
179+ then {
180+ let U = l
181+ let V = getString(U, s())
182+ if ($isInstanceOf(V, "String"))
183+ then {
184+ let h = V
185+ addressFromString(h)
186+ }
187+ else if ($isInstanceOf(V, "Unit"))
188+ then unit
189+ else throw("Match error")
190+ }
191+ else if ($isInstanceOf(l, "Unit"))
192+ then unit
193+ else throw("Match error")
194+ }
195+
196+let aa = valueOrErrorMessage(Z, g("invalid treasury address"))
197+
198+func ab (ac,ad) = if ((ac.caller == ad))
169199 then true
170200 else i("permission denied")
171201
172202
173-func Z (X) = W(X, P)
203+func ae (ac) = ab(ac, S)
174204
175205
176-func aa (ab,ac) = {
177- let h = size(ab)
178- let ad = ab[0]
179- let ae = ad._1
180- let af = ad._2
181- let ag = ab[1]
182- let ah = ag._1
183- let ai = ag._2
184- let aj = ab[2]
185- let ak = aj._1
186- let al = aj._2
206+func af (ag,ah) = {
207+ let h = size(ag)
208+ let ai = ag[0]
209+ let aj = ai._1
210+ let ak = ai._2
211+ let al = ag[1]
212+ let am = al._1
213+ let an = al._2
214+ let ao = ag[2]
215+ let ap = ao._1
216+ let aq = ao._2
187217 if (if ((h > 0))
188- then (ae == ac)
218+ then (aj == ah)
189219 else false)
190- then af
220+ then ak
191221 else if (if ((h > 1))
192- then (ah == ac)
222+ then (am == ah)
193223 else false)
194- then ai
224+ then an
195225 else if (if ((h > 2))
196- then (ak == ac)
226+ then (ap == ah)
197227 else false)
198- then al
228+ then aq
199229 else unit
200230 }
201231
202232
203-@Callable(X)
204-func claimLP (am) = {
205- let an = Z(X)
206- if ((an == an))
233+@Callable(ac)
234+func claimLP (ar) = {
235+ let as = ae(ac)
236+ if ((as == as))
207237 then {
208- let s = Address(am)
209- let ao = valueOrElse(getInteger(P, r(s)), 0)
210- let ap = valueOrElse(getInteger(P, t(s)), 0)
211- let aq = if ((ao > 0))
212- then [invoke(P, "transferAsset", [am, ao, T], nil), invoke(P, "integerEntry", [r(s), 0], nil), invoke(P, "stringEntry", [t(s), (ap + ao)], nil)]
238+ let v = Address(ar)
239+ let at = valueOrElse(getInteger(S, u(v)), 0)
240+ let au = valueOrElse(getInteger(S, w(v)), 0)
241+ let av = if ((at > 0))
242+ then [invoke(S, "transferAsset", [ar, at, W], nil), invoke(S, "integerEntry", [u(v), 0], nil), invoke(S, "integerEntry", [w(v), (au + at)], nil)]
213243 else i("nothing to claim")
214- $Tuple2(nil, aq)
244+ $Tuple2(nil, av)
215245 }
216246 else throw("Strict value is not equal to itself.")
217247 }
218248
219249
220250
221-@Callable(X)
222-func finalize (ar,as,at,au) = {
223- let av = [if ((X.originCaller == P))
224- then true
225- else i("permission denied"), if ((ar >= 0))
226- then true
227- else i("invalid new treasury volume"), if ((as >= 0))
228- then true
229- else i("invalid XTN price"), if (if ((at >= 0))
230- then (c >= at)
231- else false)
232- then true
233- else i("invalid PWR managers bonus"), if (if ((au >= -(c)))
234- then (c >= au)
235- else false)
236- then true
237- else i("invalid treasury volume diff allocation coefficient")]
238- if ((av == av))
251+@Callable(ac)
252+func finalize (ar,aw,ax,ay,az) = {
253+ let as = ae(ac)
254+ if ((as == as))
239255 then {
240- let aw = valueOrErrorMessage(getInteger(P, u()), g("invalid period"))
241- let ax = (aw + 1)
242- let ay = c
243- let az = 0
244- let aq = [invoke(P, "integerEntry", [u(), ax], nil), invoke(P, "integerEntry", [v(ax), ay], nil), invoke(P, "burn", [az], nil)]
245- $Tuple2(nil, aq)
246- }
247- else throw("Strict value is not equal to itself.")
248- }
249-
250-
251-
252-@Callable(X)
253-func invest (am) = {
254- let an = Z(X)
255- if ((an == an))
256- then {
257- let s = Address(am)
258- let aw = valueOrErrorMessage(getInteger(P, u()), g("invalid period"))
259- let aA = valueOrErrorMessage(getInteger(P, v(aw)), g("invalid price"))
260- let aB = if ((size(X.payments) == 1))
261- then X.payments[0]
262- else i("invalid payments")
263- let aC = if (if ((aB.assetId == unit))
264- then (aB.amount > 0)
256+ let aA = valueOrErrorMessage(getInteger(S, x()), g("invalid period"))
257+ let aB = valueOrErrorMessage(getInteger(S, B()), g("invalid period length"))
258+ let aC = valueOrErrorMessage(getInteger(S, A(aA)), g("invalid start height"))
259+ let aD = valueOrErrorMessage(getInteger(S, y(aA)), g("invalid price"))
260+ let aE = valueOrErrorMessage(getInteger(S, D()), g("invalid next block to process"))
261+ let aF = ((aC + aB) - 1)
262+ let aG = [if ((aE > aF))
263+ then true
264+ else i("unprocessed blocks"), if ((aw >= 0))
265+ then true
266+ else i("invalid new treasury volume"), if ((ax >= 0))
267+ then true
268+ else i("invalid XTN price"), if (if ((ay >= 0))
269+ then (c >= ay)
265270 else false)
266- then aB.amount
267- else i("invalid payment amount")
268- let I = if ((aA > 0))
269- then fraction(aC, c, aA)
270- else 0
271- let aD = valueOrElse(getInteger(P, q(unit)), 0)
272- let aq = [invoke(P, "integerEntry", [q(unit), (aD + aC)], nil), invoke(P, "reissue", [I], nil), invoke(P, "transferAsset", [am, I, T], nil), invoke(P, "transferWaves", [V.bytes, aC], [AttachedPayment(unit, aC)])]
273- $Tuple2(nil, aq)
274- }
275- else throw("Strict value is not equal to itself.")
276- }
277-
278-
279-
280-@Callable(X)
281-func withdraw (am) = {
282- let an = Z(X)
283- if ((an == an))
284- then {
285- let s = Address(am)
286- let aw = valueOrErrorMessage(getInteger(P, u()), g("invalid period"))
287- let aB = if ((size(X.payments) == 1))
288- then X.payments[0]
289- else i(g("invalid payments"))
290- let aE = if ((aB.assetId == T))
291- then T
292- else i("invalid payment asset")
293- let aC = if ((aB.amount > 0))
294- then aB.amount
295- else i("invalid payment amount")
296- let aF = valueOrElse(getInteger(P, D()), 0)
297- let aq = [invoke(P, "integerEntry", [D(), (aF + aC)], nil), invoke(P, "stringEntry", [E(s, X.transactionId), G(d, aC, (aw + 1), unit)], nil)]
298- if ((aq == aq))
299- then $Tuple2([ScriptTransfer(P, aC, aE)], aq)
271+ then true
272+ else i("invalid PWR managers bonus"), if (if ((az >= -(c)))
273+ then (c >= az)
274+ else false)
275+ then true
276+ else i("invalid treasury volume diff allocation coefficient")]
277+ if ((aG == aG))
278+ then {
279+ let aH = valueOrElse(getInteger(S, t(Y)), 0)
280+ let aI = valueOrElse(getInteger(S, t(unit)), 0)
281+ let aJ = fraction(aH, ax, c)
282+ let aK = (aJ + aI)
283+ let aL = (aw - aK)
284+ let aM = if ((aL > 0))
285+ then fraction(aL, ay, c)
286+ else 0
287+ let aN = (aL - aM)
288+ let aO = if ((aK > 0))
289+ then fraction(aJ, c, aK)
290+ else 0
291+ let aP = fraction(aN, aO, c)
292+ let aQ = (aN - aP)
293+ let aR = n(az)
294+ let aS = fraction(aQ, if ((0 > az))
295+ then aR
296+ else 0, c)
297+ let aT = fraction(aP, if ((az > 0))
298+ then aR
299+ else 0, c)
300+ let aU = ((aP - aT) + aS)
301+ let aV = ((aQ - aS) + aT)
302+ let aW = (aI + aV)
303+ let aX = fraction((aJ + aU), c, ax)
304+ let aY = (aA + 1)
305+ let aZ = valueOrErrorMessage(assetInfo(W), g("invalid lpAsset info")).quantity
306+ let ba = fraction(aW, c, aZ)
307+ let bb = valueOrElse(getInteger(S, G()), 0)
308+ let bc = fraction(bb, ba, c)
309+ let bd = if (if (if ((size(ac.payments) == 1))
310+ then (ac.payments[0].assetId == unit)
311+ else false)
312+ then (ac.payments[0].amount >= bc)
313+ else false)
314+ then true
315+ else i(("invalid payments, payment amount min: " + toString(bc)))
316+ if ((bd == bd))
317+ then {
318+ let av = [invoke(S, "integerEntry", [x(), aY], nil), invoke(S, "integerEntry", [y(aY), ba], nil), invoke(S, "burn", [bb], nil), invoke(S, "integerEntry", [G(), 0], nil)]
319+ $Tuple2(nil, av)
320+ }
321+ else throw("Strict value is not equal to itself.")
322+ }
300323 else throw("Strict value is not equal to itself.")
301324 }
302325 else throw("Strict value is not equal to itself.")
303326 }
304327
305328
306329
307-@Callable(X)
308-func cancelWithdraw (am,F) = {
309- let an = Z(X)
310- if ((an == an))
330+@Callable(ac)
331+func invest (ar) = {
332+ let as = ae(ac)
333+ if ((as == as))
311334 then {
312- let s = Address(am)
313- let aG = valueOrErrorMessage(getString(P, E(s, F)), g("invalid withdrawal request"))
314- let aH = M(aG)
315- let H = aH._1
316- let I = aH._2
317- let J = aH._3
318- let K = aH._4
319- if ((H == d))
320- then {
321- let aF = valueOrErrorMessage(getInteger(P, D()), g("invalid total withdrawal amount"))
322- let aq = [invoke(P, "integerEntry", [D(), if ((aF >= I))
323- then (aF - I)
324- else i("invalid withdrawal amount")], nil), invoke(P, "deleteEntry", [E(s, F)], nil), invoke(P, "transferAsset", [am, I, T], nil)]
325- if ((aq == aq))
326- then $Tuple2(nil, aq)
327- else throw("Strict value is not equal to itself.")
328- }
329- else i("invalid withdrawal request status")
335+ let v = Address(ar)
336+ let aA = valueOrErrorMessage(getInteger(S, x()), g("invalid period"))
337+ let aD = valueOrErrorMessage(getInteger(S, y(aA)), g("invalid price"))
338+ let be = if ((size(ac.payments) == 1))
339+ then ac.payments[0]
340+ else i("invalid payments")
341+ let bf = if (if ((be.assetId == unit))
342+ then (be.amount > 0)
343+ else false)
344+ then be.amount
345+ else i("invalid payment amount")
346+ let L = if ((aD > 0))
347+ then fraction(bf, c, aD)
348+ else 0
349+ let bg = valueOrElse(getInteger(S, t(unit)), 0)
350+ let av = [invoke(S, "integerEntry", [t(unit), (bg + bf)], nil), invoke(S, "reissue", [L], nil), invoke(S, "transferAsset", [ar, L, W], nil), invoke(S, "transferWaves", [aa.bytes, bf], [AttachedPayment(unit, bf)])]
351+ $Tuple2(nil, av)
330352 }
331353 else throw("Strict value is not equal to itself.")
332354 }
333355
334356
335357
336-@Callable(X)
337-func claimWaves (am,F) = {
338- let an = Z(X)
339- if ((an == an))
358+@Callable(ac)
359+func withdraw (ar) = {
360+ let as = ae(ac)
361+ if ((as == as))
340362 then {
341- let s = Address(am)
342- let aw = valueOrErrorMessage(getInteger(P, u()), g("invalid period"))
343- let aG = valueOrErrorMessage(getString(P, E(s, F)), g("invalid withdrawal request"))
344- let aI = M(aG)
345- let H = aI._1
346- let I = aI._2
347- let J = aI._3
348- let K = aI._4
349- if ((H == e))
363+ let v = Address(ar)
364+ let aA = valueOrErrorMessage(getInteger(S, x()), g("invalid period"))
365+ let be = if ((size(ac.payments) == 1))
366+ then ac.payments[0]
367+ else i(g("invalid payments"))
368+ let bh = if ((be.assetId == W))
369+ then W
370+ else i("invalid payment asset")
371+ let bf = if ((be.amount > 0))
372+ then be.amount
373+ else i("invalid payment amount")
374+ let bi = valueOrElse(getInteger(S, G()), 0)
375+ let av = [invoke(S, "integerEntry", [G(), (bi + bf)], nil), invoke(S, "stringEntry", [H(v, ac.transactionId), J(d, bf, (aA + 1), unit)], nil)]
376+ if ((av == av))
377+ then $Tuple2([ScriptTransfer(S, bf, bh)], av)
378+ else throw("Strict value is not equal to itself.")
379+ }
380+ else throw("Strict value is not equal to itself.")
381+ }
382+
383+
384+
385+@Callable(ac)
386+func cancelWithdraw (ar,I) = {
387+ let as = ae(ac)
388+ if ((as == as))
389+ then {
390+ let v = Address(ar)
391+ let bj = valueOrErrorMessage(getString(S, H(v, I)), g("invalid withdrawal request"))
392+ let aA = valueOrErrorMessage(getInteger(S, x()), g("invalid period"))
393+ let bk = P(bj)
394+ let K = bk._1
395+ let L = bk._2
396+ let M = bk._3
397+ let N = bk._4
398+ let aG = [if ((K == d))
399+ then true
400+ else i("invalid withdrawal request status"), if ((M > aA))
401+ then true
402+ else i("invalid withdrawal request period")]
403+ if ((aG == aG))
404+ then {
405+ let bi = valueOrErrorMessage(getInteger(S, G()), g("invalid total withdrawal amount"))
406+ let av = [invoke(S, "integerEntry", [G(), if ((bi >= L))
407+ then (bi - L)
408+ else i("invalid withdrawal amount")], nil), invoke(S, "deleteEntry", [H(v, I)], nil), invoke(S, "transferAsset", [ar, L, W], nil)]
409+ if ((av == av))
410+ then $Tuple2(nil, av)
411+ else throw("Strict value is not equal to itself.")
412+ }
413+ else throw("Strict value is not equal to itself.")
414+ }
415+ else throw("Strict value is not equal to itself.")
416+ }
417+
418+
419+
420+@Callable(ac)
421+func claimWaves (ar,I) = {
422+ let as = ae(ac)
423+ if ((as == as))
424+ then {
425+ let v = Address(ar)
426+ let aA = valueOrErrorMessage(getInteger(S, x()), g("invalid period"))
427+ let bj = valueOrErrorMessage(getString(S, H(v, I)), g("invalid withdrawal request"))
428+ let bl = P(bj)
429+ let K = bl._1
430+ let L = bl._2
431+ let M = bl._3
432+ let N = bl._4
433+ if ((K == e))
350434 then i("invalid withdrawal request status")
351- else if ((J > aw))
435+ else if ((M > aA))
352436 then i("invalid withdrawal request period")
353437 else {
354- let aA = valueOrErrorMessage(getInteger(P, v(aw)), g("invalid price"))
355- let aJ = if ((aA > 0))
356- then fraction(I, aA, c)
438+ let bm = valueOrErrorMessage(getInteger(S, y(M)), g("invalid price"))
439+ let bn = if ((bm > 0))
440+ then fraction(L, bm, c)
357441 else 0
358- let aq = [invoke(P, "stringEntry", [E(s, F), G(e, I, J, X.transactionId)], nil), invoke(P, "burn", [I], nil), invoke(P, "transferWaves", [am, aJ], nil)]
359- $Tuple2(nil, aq)
442+ let av = [invoke(S, "stringEntry", [H(v, I), J(e, L, M, ac.transactionId)], nil), invoke(S, "burn", [L], nil), invoke(S, "transferWaves", [ar, bn], nil)]
443+ $Tuple2(nil, av)
360444 }
361445 }
362446 else throw("Strict value is not equal to itself.")
363447 }
364448
365449
366450
367-@Callable(X)
368-func processBlocks (am) = {
369- let an = Z(X)
370- if ((an == an))
451+@Callable(ac)
452+func processBlocks (ar) = {
453+ let as = ae(ac)
454+ if ((as == as))
371455 then {
372- let s = Address(am)
373- let aw = valueOrErrorMessage(getInteger(P, u()), g("invalid period"))
374- let aK = valueOrErrorMessage(getInteger(P, y()), g("invalid period length"))
375- let aL = valueOrErrorMessage(getInteger(P, x(aw)), g("invalid start height"))
376- let aA = valueOrErrorMessage(getInteger(P, v(aw)), g("invalid price"))
377- let aM = valueOrErrorMessage(getInteger(P, A()), g("invalid next block to process"))
378- let aN = ((aL + aK) - 1)
379- let aO = 40
380- let aP = if (if (if ((height >= aM))
381- then if ((aM >= aL))
456+ let v = Address(ar)
457+ let aA = valueOrErrorMessage(getInteger(S, x()), g("invalid period"))
458+ let aB = valueOrErrorMessage(getInteger(S, B()), g("invalid period length"))
459+ let aC = valueOrErrorMessage(getInteger(S, A(aA)), g("invalid start height"))
460+ let aD = valueOrErrorMessage(getInteger(S, y(aA)), g("invalid price"))
461+ let aE = valueOrErrorMessage(getInteger(S, D()), g("invalid next block to process"))
462+ let aF = ((aC + aB) - 1)
463+ let bo = 40
464+ let bp = if (if (if ((height >= aE))
465+ then if ((aE >= aC))
382466 then true
383- else (aw == 0)
467+ else (aA == 0)
384468 else false)
385- then (aN >= aM)
469+ then (aF >= aE)
386470 else false)
387- then min([((aN - aM) + 1), aO])
471+ then min([((aF - aE) + 1), bo])
388472 else i(g("invalid target block"))
389- let aQ = valueOrErrorMessage(getInteger(P, z()), g("invalid block processing reward"))
390- let aR = (aQ / aP)
391- let aS = (aQ - (aR * aP))
392- func aT (aU,aV) = if ((aV >= aP))
393- then aU
473+ let bq = valueOrErrorMessage(getInteger(S, C()), g("invalid block processing reward"))
474+ let br = (bq / bp)
475+ let bs = (bq - (br * bp))
476+ func bt (bu,bv) = if ((bv >= bp))
477+ then bu
394478 else {
395- let aW = (aM + aV)
396- let aX = valueOrErrorMessage(blockInfoByHeight(aW), g("invalid block info"))
397- let aY = valueOrErrorMessage(aa(aX.rewards, V), g(("invalid treasury reward for height " + toString(aW))))
398- let aZ = aX.generator
399- let ao = valueOrElse(getInteger(P, r(aZ)), 0)
400- let ba = if ((aV == (aP - 1)))
401- then (aR + aS)
402- else aR
403- let I = if ((aA > 0))
404- then fraction((aY - ba), c, aA)
479+ let bw = (aE + bv)
480+ let bx = valueOrErrorMessage(blockInfoByHeight(bw), g("invalid block info"))
481+ let by = valueOrErrorMessage(af(bx.rewards, aa), g(("invalid treasury reward for height " + toString(bw))))
482+ let bz = bx.generator
483+ let at = valueOrElse(getInteger(S, u(bz)), 0)
484+ let bA = if ((bv == (bp - 1)))
485+ then (br + bs)
486+ else br
487+ let L = if ((aD > 0))
488+ then fraction((by - bA), c, aD)
405489 else 0
406- let bb = [invoke(P, "stringEntry", [B(aW), makeString([toBase58String(X.transactionId), toBase58String(am), toString(aY), toString(ba), toString(I)], a)], nil), invoke(P, "integerEntry", [r(aZ), (ao + I)], nil)]
407- if ((bb == bb))
408- then (aU + I)
490+ let bB = [invoke(S, "stringEntry", [E(bw), makeString([toBase58String(ac.transactionId), toBase58String(ar), toString(by), toString(bA), toString(L)], a)], nil), invoke(S, "integerEntry", [u(bz), (at + L)], nil)]
491+ if ((bB == bB))
492+ then (bu + L)
409493 else throw("Strict value is not equal to itself.")
410494 }
411495
412- let bc = [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, 31, 32, 33, 34, 35, 36, 37, 38, 39]
413- let bd = {
414- let be = bc
415- let bf = size(be)
416- let bg = 0
417- func bh (bi,bj) = if ((bj >= bf))
418- then bi
419- else aT(bi, be[bj])
496+ let bC = [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, 31, 32, 33, 34, 35, 36, 37, 38, 39]
497+ let bD = {
498+ let bE = bC
499+ let bF = size(bE)
500+ let bG = 0
501+ func bH (bI,bJ) = if ((bJ >= bF))
502+ then bI
503+ else bt(bI, bE[bJ])
420504
421- func bk (bi,bj) = if ((bj >= bf))
422- then bi
505+ func bK (bI,bJ) = if ((bJ >= bF))
506+ then bI
423507 else throw("List size exceeds 40")
424508
425- bk(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bh(bg, 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), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40)
509+ bK(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bH(bG, 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), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40)
426510 }
427- if ((bd == bd))
511+ if ((bD == bD))
428512 then {
429- let bl = [invoke(P, "transferWaves", [am, aQ], nil), invoke(P, "reissue", [bd], nil), invoke(P, "integerEntry", [A(), (aM + aP)], nil)]
430- if ((bl == bl))
513+ let bL = [invoke(S, "transferWaves", [ar, bq], nil), invoke(S, "reissue", [bD], nil), invoke(S, "integerEntry", [D(), (aE + bp)], nil)]
514+ if ((bL == bL))
431515 then $Tuple2(nil, unit)
432516 else throw("Strict value is not equal to itself.")
433517 }
434518 else throw("Strict value is not equal to itself.")
435519 }
436520 else throw("Strict value is not equal to itself.")
437521 }
438522
439523
440-@Verifier(bm)
441-func bn () = sigVerify(bm.bodyBytes, bm.proofs[0], bm.senderPublicKey)
524+@Verifier(bM)
525+func bN () = sigVerify(bM.bodyBytes, bM.proofs[0], bM.senderPublicKey)
442526

github/deemru/w8io/026f985 
177.02 ms