tx · HhKNyXaTEfB9NFUSwjYCwTkFkx1F9pTvVgiKFeQ6dYht

3N6HSS7Toat1RhyEsyqVGgVSRzH19W1FTbP:  -0.01900000 Waves

2023.06.22 12:30 [2633664] smart account 3N6HSS7Toat1RhyEsyqVGgVSRzH19W1FTbP > SELF 0.00000000 Waves

{ "type": 13, "id": "HhKNyXaTEfB9NFUSwjYCwTkFkx1F9pTvVgiKFeQ6dYht", "fee": 1900000, "feeAssetId": null, "timestamp": 1687426281608, "version": 2, "chainId": 84, "sender": "3N6HSS7Toat1RhyEsyqVGgVSRzH19W1FTbP", "senderPublicKey": "AoKo4segKHU4DeJnxXQYJj2u7J6XJeux6r8KLW52cd2Q", "proofs": [ "4CT3v2zqAS6ViczAr78Y7XNaHtka7ZZ1DJuRMWrh8MbxBpgSZGRQWEv6Z95NxcZGEq5w66bgfBygsUbuEiChaz6P" ], "script": "base64:BwIrCAISAwoBAhIHCgUCAQEBARIDCgECEgMKAQISBAoCAgISBAoCAgISAwoBAikAA1NFUAICX18ADUNPTlRSQUNUX05BTUUCD2NhbGN1bGF0b3IucmlkZQAGU0NBTEU4AIDC1y8AB1BFTkRJTkcCB1BFTkRJTkcACEZJTklTSEVEAghGSU5JU0hFRAAFV0FWRVMCBVdBVkVTAA13YXZlc0RlY2ltYWxzAAgAC3h0bkRlY2ltYWxzAAYBB3dyYXBFcnIBAXMJAKwCAgkArAICBQ1DT05UUkFDVF9OQU1FAgI6IAUBcwEIdGhyb3dFcnIBAXMJAAIBCQEHd3JhcEVycgEFAXMBD2Fzc2V0SWRUb1N0cmluZwEHYXNzZXRJZAQHJG1hdGNoMAUHYXNzZXRJZAMJAAECBQckbWF0Y2gwAgpCeXRlVmVjdG9yBAFiBQckbWF0Y2gwCQDYBAEFAWIDCQABAgUHJG1hdGNoMAIEVW5pdAUFV0FWRVMJAAIBAgtNYXRjaCBlcnJvcgEDYWJzAQFuAwkAZgIAAAUBbgkBAS0BBQFuBQFuARFrZXlGYWN0b3J5QWRkcm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ZWdlckVudHJ5CQDMCAIJARVrZXlOZXh0QmxvY2tUb1Byb2Nlc3MACQDMCAIJAGQCBRJuZXh0QmxvY2tUb1Byb2Nlc3MFGWJsb2Nrc1Byb2Nlc3NpbmdCYXRjaFNpemUFA25pbAUDbmlsBQNuaWwDCQAAAgUHYWN0aW9ucwUHYWN0aW9ucwkAlAoCBQNuaWwFBHVuaXQJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5GV7SCg==", "height": 2633664, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BrRNVGS6tk4V9Ri3MbwPXjBDSpewSt9dohMQPrcWqqvq Next: 7ZnmG9nsCR5qWzhQqeoZZSTe3kBgc8DbjD3uaYPyc9fA Diff:
OldNewDifferences
1313
1414 let f = "WAVES"
1515
16-func g (h) = ((b + ": ") + h)
16+let g = 8
17+
18+let h = 6
19+
20+func i (j) = ((b + ": ") + j)
1721
1822
19-func i (h) = throw(g(h))
23+func k (j) = throw(i(j))
2024
2125
22-func j (k) = {
23- let l = k
24- if ($isInstanceOf(l, "ByteVector"))
26+func l (m) = {
27+ let n = m
28+ if ($isInstanceOf(n, "ByteVector"))
2529 then {
26- let m = l
27- toBase58String(m)
30+ let o = n
31+ toBase58String(o)
2832 }
29- else if ($isInstanceOf(l, "Unit"))
33+ else if ($isInstanceOf(n, "Unit"))
3034 then f
3135 else throw("Match error")
3236 }
3337
3438
35-func n (o) = if ((0 > o))
36- then -(o)
37- else o
39+func p (q) = if ((0 > q))
40+ then -(q)
41+ else q
3842
3943
40-func p () = makeString(["%s", "factory"], a)
44+func r () = makeString(["%s", "factory"], a)
4145
4246
43-func q () = makeString(["%s", "lpAssetId"], a)
47+func s () = makeString(["%s", "lpAssetId"], a)
4448
4549
46-func r () = makeString(["%s", "xtnAssetId"], a)
50+func t () = makeString(["%s", "xtnAssetId"], a)
4751
4852
49-func s () = makeString(["%s", "treasury"], a)
53+func u () = makeString(["%s", "treasury"], a)
5054
5155
52-func t (k) = makeString(["%s%s", "invested", j(k)], a)
56+func v (m) = makeString(["%s%s", "invested", l(m)], a)
5357
5458
55-func u (v) = makeString(["%s%s", "available", toString(v)], a)
59+func w (x) = makeString(["%s%s", "available", toString(x)], a)
5660
5761
58-func w (v) = makeString(["%s%s", "claimed", toString(v)], a)
62+func y (x) = makeString(["%s%s", "claimed", toString(x)], a)
5963
6064
61-func x () = makeString(["%s", "currentPeriod"], a)
65+func z () = makeString(["%s", "currentPeriod"], a)
6266
6367
64-func y (z) = makeString(["%s%d", "price", toString(z)], a)
68+func A (B) = makeString(["%s%d", "price", toString(B)], a)
6569
6670
67-func A (z) = makeString(["%s%d", "startHeight", toString(z)], a)
71+func C (B) = makeString(["%s%d", "startHeight", toString(B)], a)
6872
6973
70-func B () = "%s__periodLength"
74+func D () = "%s__periodLength"
7175
7276
73-func C () = "%s__blockProcessingReward"
77+func E () = "%s__blockProcessingReward"
7478
7579
76-func D () = "%s__nextBlockToProcess"
80+func F () = "%s__nextBlockToProcess"
7781
7882
79-func E (F) = makeString(["%s%d", "blockProcessed", toString(F)], a)
83+func G (H) = makeString(["%s%d", "blockProcessed", toString(H)], a)
8084
8185
82-func G () = "%s__withdrawal"
86+func I () = "%s__withdrawal"
8387
8488
85-func H (v,I) = makeString(["%s%s%s", "withdrawal", toString(v), toBase58String(I)], a)
89+func J (x,K) = makeString(["%s%s%s", "withdrawal", toString(x), toBase58String(K)], a)
8690
8791
88-func J (K,L,M,N) = {
89- let O = {
90- let l = N
91- if ($isInstanceOf(l, "ByteVector"))
92+func L (M,N,O,P) = {
93+ let Q = {
94+ let n = P
95+ if ($isInstanceOf(n, "ByteVector"))
9296 then {
93- let m = l
94- toBase58String(m)
97+ let o = n
98+ toBase58String(o)
9599 }
96- else if ($isInstanceOf(l, "Unit"))
100+ else if ($isInstanceOf(n, "Unit"))
97101 then "SOON"
98102 else throw("Match error")
99103 }
100- makeString(["%s%d%d%s", K, toString(L), toString(M), O], a)
104+ makeString(["%s%d%d%s", M, toString(N), toString(O), Q], a)
101105 }
102106
103107
104-func P (h) = {
105- let Q = split(h, a)
106- if ((size(Q) == 5))
108+func R (j) = {
109+ let S = split(j, a)
110+ if ((size(S) == 5))
107111 then {
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)
112+ let M = S[1]
113+ let N = valueOrErrorMessage(parseInt(S[2]), i("invalid lpAssetAmount"))
114+ let O = valueOrErrorMessage(parseInt(S[3]), i("invalid targetPeriod"))
115+ let P = S[4]
116+ $Tuple4(M, N, O, P)
113117 }
114- else i("invalid withdrawal request value")
118+ else k("invalid withdrawal request value")
115119 }
116120
117121
118-let R = {
119- let l = getString(this, p())
120- if ($isInstanceOf(l, "String"))
122+let T = {
123+ let n = getString(this, r())
124+ if ($isInstanceOf(n, "String"))
121125 then {
122- let h = l
123- addressFromString(h)
126+ let j = n
127+ addressFromString(j)
124128 }
125- else if ($isInstanceOf(l, "Unit"))
129+ else if ($isInstanceOf(n, "Unit"))
126130 then unit
127131 else throw("Match error")
128132 }
129133
130-let S = valueOrErrorMessage(R, g("invalid factory address"))
134+let U = valueOrErrorMessage(T, i("invalid factory address"))
131135
132-let T = {
133- let l = R
134- if ($isInstanceOf(l, "Address"))
136+let V = {
137+ let n = T
138+ if ($isInstanceOf(n, "Address"))
135139 then {
136- let U = l
137- let V = getString(U, q())
138- if ($isInstanceOf(V, "String"))
140+ let W = n
141+ let X = getString(W, s())
142+ if ($isInstanceOf(X, "String"))
139143 then {
140- let h = V
141- fromBase58String(h)
144+ let j = X
145+ fromBase58String(j)
142146 }
143- else if ($isInstanceOf(V, "Unit"))
147+ else if ($isInstanceOf(X, "Unit"))
144148 then unit
145149 else throw("Match error")
146150 }
147- else if ($isInstanceOf(l, "Unit"))
151+ else if ($isInstanceOf(n, "Unit"))
148152 then unit
149153 else throw("Match error")
150154 }
151155
152-let W = valueOrErrorMessage(T, g("invalid lpAssetId"))
156+let Y = valueOrErrorMessage(V, i("invalid lpAssetId"))
153157
154-let X = {
155- let l = R
156- if ($isInstanceOf(l, "Address"))
158+let Z = {
159+ let n = T
160+ if ($isInstanceOf(n, "Address"))
157161 then {
158- let U = l
159- let V = getString(U, r())
160- if ($isInstanceOf(V, "String"))
162+ let W = n
163+ let X = getString(W, t())
164+ if ($isInstanceOf(X, "String"))
161165 then {
162- let h = V
163- fromBase58String(h)
166+ let j = X
167+ fromBase58String(j)
164168 }
165- else if ($isInstanceOf(V, "Unit"))
169+ else if ($isInstanceOf(X, "Unit"))
166170 then unit
167171 else throw("Match error")
168172 }
169- else if ($isInstanceOf(l, "Unit"))
173+ else if ($isInstanceOf(n, "Unit"))
170174 then unit
171175 else throw("Match error")
172176 }
173177
174-let Y = valueOrErrorMessage(X, g("invalid xtnAssetId"))
178+let aa = valueOrErrorMessage(Z, i("invalid xtnAssetId"))
175179
176-let Z = {
177- let l = R
178- if ($isInstanceOf(l, "Address"))
180+let ab = {
181+ let n = T
182+ if ($isInstanceOf(n, "Address"))
179183 then {
180- let U = l
181- let V = getString(U, s())
182- if ($isInstanceOf(V, "String"))
184+ let W = n
185+ let X = getString(W, u())
186+ if ($isInstanceOf(X, "String"))
183187 then {
184- let h = V
185- addressFromString(h)
188+ let j = X
189+ addressFromString(j)
186190 }
187- else if ($isInstanceOf(V, "Unit"))
191+ else if ($isInstanceOf(X, "Unit"))
188192 then unit
189193 else throw("Match error")
190194 }
191- else if ($isInstanceOf(l, "Unit"))
195+ else if ($isInstanceOf(n, "Unit"))
192196 then unit
193197 else throw("Match error")
194198 }
195199
196-let aa = valueOrErrorMessage(Z, g("invalid treasury address"))
200+let ac = valueOrErrorMessage(ab, i("invalid treasury address"))
197201
198-func ab (ac,ad) = if ((ac.caller == ad))
202+func ad (ae,af) = if ((ae.caller == af))
199203 then true
200- else i("permission denied")
204+ else k("permission denied")
201205
202206
203-func ae (ac) = ab(ac, S)
207+func ag (ae) = ad(ae, U)
204208
205209
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
217- if (if ((h > 0))
218- then (aj == ah)
210+func ah (ai,aj) = {
211+ let j = size(ai)
212+ let ak = ai[0]
213+ let al = ak._1
214+ let am = ak._2
215+ let an = ai[1]
216+ let ao = an._1
217+ let ap = an._2
218+ let aq = ai[2]
219+ let ar = aq._1
220+ let as = aq._2
221+ if (if ((j > 0))
222+ then (al == aj)
219223 else false)
220- then ak
221- else if (if ((h > 1))
222- then (am == ah)
224+ then am
225+ else if (if ((j > 1))
226+ then (ao == aj)
223227 else false)
224- then an
225- else if (if ((h > 2))
226- then (ap == ah)
228+ then ap
229+ else if (if ((j > 2))
230+ then (ar == aj)
227231 else false)
228- then aq
232+ then as
229233 else unit
230234 }
231235
232236
233-@Callable(ac)
234-func claimLP (ar) = {
235- let as = ae(ac)
236- if ((as == as))
237+@Callable(ae)
238+func claimLP (at) = {
239+ let au = ag(ae)
240+ if ((au == au))
237241 then {
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)]
243- else i("nothing to claim")
244- $Tuple2(nil, av)
242+ let x = Address(at)
243+ let av = valueOrElse(getInteger(U, w(x)), 0)
244+ let aw = valueOrElse(getInteger(U, y(x)), 0)
245+ let ax = if ((av > 0))
246+ then [invoke(U, "transferAsset", [at, av, Y], nil), invoke(U, "integerEntry", [w(x), 0], nil), invoke(U, "integerEntry", [y(x), (aw + av)], nil)]
247+ else k("nothing to claim")
248+ $Tuple2(nil, ax)
245249 }
246250 else throw("Strict value is not equal to itself.")
247251 }
248252
249253
250254
251-@Callable(ac)
252-func finalize (ar,aw,ax,ay,az) = {
253- let as = ae(ac)
254- if ((as == as))
255+@Callable(ae)
256+func finalize (at,ay,az,aA,aB) = {
257+ let au = ag(ae)
258+ if ((au == au))
255259 then {
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 ((ac.originCaller == aa))
260+ let aC = valueOrErrorMessage(getInteger(U, z()), i("invalid period"))
261+ let aD = valueOrErrorMessage(getInteger(U, D()), i("invalid period length"))
262+ let aE = valueOrErrorMessage(getInteger(U, C(aC)), i("invalid start height"))
263+ let aF = valueOrErrorMessage(getInteger(U, A(aC)), i("invalid price"))
264+ let aG = valueOrErrorMessage(getInteger(U, F()), i("invalid next block to process"))
265+ let aH = ((aE + aD) - 1)
266+ let aI = [if ((ae.originCaller == ac))
263267 then true
264- else i("permission denied"), if ((aE > aF))
268+ else k("permission denied"), if ((aG > aH))
265269 then true
266- else i("unprocessed blocks"), if ((aw >= 0))
270+ else k("unprocessed blocks"), if ((ay >= 0))
267271 then true
268- else i("invalid new treasury volume"), if ((ax >= 0))
272+ else k("invalid new treasury volume"), if ((az >= 0))
269273 then true
270- else i("invalid XTN price"), if (if ((ay >= 0))
271- then (c >= ay)
274+ else k("invalid XTN price"), if (if ((aA >= 0))
275+ then (c >= aA)
272276 else false)
273277 then true
274- else i("invalid PWR managers bonus"), if (if ((az >= -(c)))
275- then (c >= az)
278+ else k("invalid PWR managers bonus"), if (if ((aB >= -(c)))
279+ then (c >= aB)
276280 else false)
277281 then true
278- else i("invalid treasury volume diff allocation coefficient")]
279- if ((aG == aG))
282+ else k("invalid treasury volume diff allocation coefficient")]
283+ if ((aI == aI))
280284 then {
281- let aH = valueOrElse(getInteger(S, t(Y)), 0)
282- let aI = valueOrElse(getInteger(S, t(unit)), 0)
283- let aJ = fraction(aH, ax, c)
284- let aK = (aJ + aI)
285- let aL = (aw - aK)
286- let aM = if ((aL > 0))
287- then fraction(aL, ay, c)
285+ let aJ = valueOrElse(getInteger(U, v(aa)), 0)
286+ let aK = valueOrElse(getInteger(U, v(unit)), 0)
287+ let aL = fraction(aJ, (az * g), (c * h))
288+ let aM = (aL + aK)
289+ let aN = (ay - aM)
290+ let aO = if ((aN > 0))
291+ then fraction(aN, aA, c)
288292 else 0
289- let aN = (aL - aM)
290- let aO = if ((aK > 0))
291- then fraction(aJ, c, aK)
293+ let aP = (aN - aO)
294+ let aQ = if ((aM > 0))
295+ then fraction(aL, c, aM)
292296 else 0
293- let aP = fraction(aN, aO, c)
294- let aQ = (aN - aP)
295- let aR = n(az)
296- let aS = fraction(aQ, if ((0 > az))
297- then aR
297+ let aR = fraction(aP, aQ, c)
298+ let aS = (aP - aR)
299+ let aT = p(aB)
300+ let aU = fraction(aS, if ((0 > aB))
301+ then aT
298302 else 0, c)
299- let aT = fraction(aP, if ((az > 0))
300- then aR
303+ let aV = fraction(aR, if ((aB > 0))
304+ then aT
301305 else 0, c)
302- let aU = ((aP - aT) + aS)
303- let aV = ((aQ - aS) + aT)
304- let aW = (aI + aV)
305- let aX = fraction((aJ + aU), c, ax)
306- let aY = (aA + 1)
307- let aZ = valueOrErrorMessage(assetInfo(W), g("invalid lpAsset info")).quantity
308- let ba = fraction(aW, c, aZ)
309- let bb = valueOrElse(getInteger(S, G()), 0)
310- let bc = fraction(bb, ba, c)
311- let bd = if (if ((bc == 0))
306+ let aW = ((aR - aV) + aU)
307+ let aX = ((aS - aU) + aV)
308+ let aY = (aK + aX)
309+ let aZ = fraction((aL + aW), (c * h), (az * g))
310+ let ba = (aC + 1)
311+ let bb = valueOrErrorMessage(assetInfo(Y), i("invalid lpAsset info")).quantity
312+ let bc = fraction(aY, c, bb)
313+ let bd = valueOrElse(getInteger(U, I()), 0)
314+ let be = fraction(bd, bc, c)
315+ let bf = if (if ((be == 0))
312316 then true
313- else if (if ((size(ac.payments) == 1))
314- then (ac.payments[0].assetId == unit)
317+ else if (if ((size(ae.payments) == 1))
318+ then (ae.payments[0].assetId == unit)
315319 else false)
316- then (ac.payments[0].amount >= bc)
320+ then (ae.payments[0].amount >= be)
317321 else false)
318322 then true
319- else i(("invalid payments, payment amount min: " + toString(bc)))
320- if ((bd == bd))
323+ else k(("invalid payments, payment amount min: " + toString(be)))
324+ if ((bf == bf))
321325 then {
322- let av = [invoke(S, "integerEntry", [x(), aY], nil), invoke(S, "integerEntry", [y(aY), ba], nil), invoke(S, "integerEntry", [A(aY), (aF + 1)], nil), invoke(S, "burn", [bb], nil), invoke(S, "integerEntry", [G(), 0], nil)]
323- $Tuple2(nil, av)
326+ let ax = [invoke(U, "integerEntry", [z(), ba], nil), invoke(U, "integerEntry", [A(ba), bc], nil), invoke(U, "integerEntry", [C(ba), (aH + 1)], nil), invoke(U, "burn", [bd], nil), invoke(U, "integerEntry", [I(), 0], nil)]
327+ $Tuple2(nil, ax)
324328 }
325329 else throw("Strict value is not equal to itself.")
326330 }
331335
332336
333337
334-@Callable(ac)
335-func invest (ar) = {
336- let as = ae(ac)
337- if ((as == as))
338+@Callable(ae)
339+func invest (at) = {
340+ let au = ag(ae)
341+ if ((au == au))
338342 then {
339- let v = Address(ar)
340- let aA = valueOrErrorMessage(getInteger(S, x()), g("invalid period"))
341- let aD = valueOrErrorMessage(getInteger(S, y(aA)), g("invalid price"))
342- let be = if ((size(ac.payments) == 1))
343- then ac.payments[0]
344- else i("invalid payments")
345- let bf = if (if ((be.assetId == unit))
346- then (be.amount > 0)
343+ let x = Address(at)
344+ let aC = valueOrErrorMessage(getInteger(U, z()), i("invalid period"))
345+ let aF = valueOrErrorMessage(getInteger(U, A(aC)), i("invalid price"))
346+ let bg = if ((size(ae.payments) == 1))
347+ then ae.payments[0]
348+ else k("invalid payments")
349+ let bh = if (if ((bg.assetId == unit))
350+ then (bg.amount > 0)
347351 else false)
348- then be.amount
349- else i("invalid payment amount")
350- let L = if ((aD > 0))
351- then fraction(bf, c, aD)
352+ then bg.amount
353+ else k("invalid payment amount")
354+ let N = if ((aF > 0))
355+ then fraction(bh, c, aF)
352356 else 0
353- let bg = valueOrElse(getInteger(S, t(unit)), 0)
354- 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)])]
355- $Tuple2(nil, av)
357+ let bi = valueOrElse(getInteger(U, v(unit)), 0)
358+ let ax = [invoke(U, "integerEntry", [v(unit), (bi + bh)], nil), invoke(U, "reissue", [N], nil), invoke(U, "transferAsset", [at, N, Y], nil), invoke(U, "transferWaves", [ac.bytes, bh], [AttachedPayment(unit, bh)])]
359+ $Tuple2(nil, ax)
356360 }
357361 else throw("Strict value is not equal to itself.")
358362 }
359363
360364
361365
362-@Callable(ac)
363-func withdraw (ar) = {
364- let as = ae(ac)
365- if ((as == as))
366+@Callable(ae)
367+func withdraw (at) = {
368+ let au = ag(ae)
369+ if ((au == au))
366370 then {
367- let v = Address(ar)
368- let aA = valueOrErrorMessage(getInteger(S, x()), g("invalid period"))
369- let be = if ((size(ac.payments) == 1))
370- then ac.payments[0]
371- else i(g("invalid payments"))
372- let bh = if ((be.assetId == W))
373- then W
374- else i("invalid payment asset")
375- let bf = if ((be.amount > 0))
376- then be.amount
377- else i("invalid payment amount")
378- let bi = valueOrElse(getInteger(S, G()), 0)
379- let av = [invoke(S, "integerEntry", [G(), (bi + bf)], nil), invoke(S, "stringEntry", [H(v, ac.transactionId), J(d, bf, (aA + 1), unit)], nil)]
380- if ((av == av))
381- then $Tuple2([ScriptTransfer(S, bf, bh)], av)
371+ let x = Address(at)
372+ let aC = valueOrErrorMessage(getInteger(U, z()), i("invalid period"))
373+ let bg = if ((size(ae.payments) == 1))
374+ then ae.payments[0]
375+ else k(i("invalid payments"))
376+ let bj = if ((bg.assetId == Y))
377+ then Y
378+ else k("invalid payment asset")
379+ let bh = if ((bg.amount > 0))
380+ then bg.amount
381+ else k("invalid payment amount")
382+ let bk = valueOrElse(getInteger(U, I()), 0)
383+ let ax = [invoke(U, "integerEntry", [I(), (bk + bh)], nil), invoke(U, "stringEntry", [J(x, ae.transactionId), L(d, bh, (aC + 1), unit)], nil)]
384+ if ((ax == ax))
385+ then $Tuple2([ScriptTransfer(U, bh, bj)], ax)
382386 else throw("Strict value is not equal to itself.")
383387 }
384388 else throw("Strict value is not equal to itself.")
386390
387391
388392
389-@Callable(ac)
390-func cancelWithdraw (ar,I) = {
391- let as = ae(ac)
392- if ((as == as))
393+@Callable(ae)
394+func cancelWithdraw (at,K) = {
395+ let au = ag(ae)
396+ if ((au == au))
393397 then {
394- let v = Address(ar)
395- let bj = valueOrErrorMessage(getString(S, H(v, I)), g("invalid withdrawal request"))
396- let aA = valueOrErrorMessage(getInteger(S, x()), g("invalid period"))
397- let bk = P(bj)
398- let K = bk._1
399- let L = bk._2
400- let M = bk._3
401- let N = bk._4
402- let aG = [if ((K == d))
398+ let x = Address(at)
399+ let bl = valueOrErrorMessage(getString(U, J(x, K)), i("invalid withdrawal request"))
400+ let aC = valueOrErrorMessage(getInteger(U, z()), i("invalid period"))
401+ let bm = R(bl)
402+ let M = bm._1
403+ let N = bm._2
404+ let O = bm._3
405+ let P = bm._4
406+ let aI = [if ((M == d))
403407 then true
404- else i("invalid withdrawal request status"), if ((M > aA))
408+ else k("invalid withdrawal request status"), if ((O > aC))
405409 then true
406- else i("invalid withdrawal request period")]
407- if ((aG == aG))
410+ else k("invalid withdrawal request period")]
411+ if ((aI == aI))
408412 then {
409- let bi = valueOrErrorMessage(getInteger(S, G()), g("invalid total withdrawal amount"))
410- let av = [invoke(S, "integerEntry", [G(), if ((bi >= L))
411- then (bi - L)
412- else i("invalid withdrawal amount")], nil), invoke(S, "deleteEntry", [H(v, I)], nil), invoke(S, "transferAsset", [ar, L, W], nil)]
413- if ((av == av))
414- then $Tuple2(nil, av)
413+ let bk = valueOrErrorMessage(getInteger(U, I()), i("invalid total withdrawal amount"))
414+ let ax = [invoke(U, "integerEntry", [I(), if ((bk >= N))
415+ then (bk - N)
416+ else k("invalid withdrawal amount")], nil), invoke(U, "deleteEntry", [J(x, K)], nil), invoke(U, "transferAsset", [at, N, Y], nil)]
417+ if ((ax == ax))
418+ then $Tuple2(nil, ax)
415419 else throw("Strict value is not equal to itself.")
416420 }
417421 else throw("Strict value is not equal to itself.")
421425
422426
423427
424-@Callable(ac)
425-func claimWaves (ar,I) = {
426- let as = ae(ac)
427- if ((as == as))
428+@Callable(ae)
429+func claimWaves (at,K) = {
430+ let au = ag(ae)
431+ if ((au == au))
428432 then {
429- let v = Address(ar)
430- let aA = valueOrErrorMessage(getInteger(S, x()), g("invalid period"))
431- let bj = valueOrErrorMessage(getString(S, H(v, I)), g("invalid withdrawal request"))
432- let bl = P(bj)
433- let K = bl._1
434- let L = bl._2
435- let M = bl._3
436- let N = bl._4
437- if ((K == e))
438- then i("invalid withdrawal request status")
439- else if ((M > aA))
440- then i("invalid withdrawal request period")
433+ let x = Address(at)
434+ let aC = valueOrErrorMessage(getInteger(U, z()), i("invalid period"))
435+ let bl = valueOrErrorMessage(getString(U, J(x, K)), i("invalid withdrawal request"))
436+ let bn = R(bl)
437+ let M = bn._1
438+ let N = bn._2
439+ let O = bn._3
440+ let P = bn._4
441+ if ((M == e))
442+ then k("invalid withdrawal request status")
443+ else if ((O > aC))
444+ then k("invalid withdrawal request period")
441445 else {
442- let bm = valueOrErrorMessage(getInteger(S, y(M)), g("invalid price"))
443- let bn = if ((bm > 0))
444- then fraction(L, bm, c)
446+ let bo = valueOrErrorMessage(getInteger(U, A(O)), i("invalid price"))
447+ let bp = if ((bo > 0))
448+ then fraction(N, bo, c)
445449 else 0
446- 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)]
447- $Tuple2(nil, av)
450+ let ax = [invoke(U, "stringEntry", [J(x, K), L(e, N, O, ae.transactionId)], nil), invoke(U, "burn", [N], nil), invoke(U, "transferWaves", [at, bp], nil)]
451+ $Tuple2(nil, ax)
448452 }
449453 }
450454 else throw("Strict value is not equal to itself.")
452456
453457
454458
455-@Callable(ac)
456-func processBlocks (ar) = {
457- let as = ae(ac)
458- if ((as == as))
459+@Callable(ae)
460+func processBlocks (at) = {
461+ let au = ag(ae)
462+ if ((au == au))
459463 then {
460- let v = Address(ar)
461- let aA = valueOrErrorMessage(getInteger(S, x()), g("invalid period"))
462- let aB = valueOrErrorMessage(getInteger(S, B()), g("invalid period length"))
463- let aC = valueOrErrorMessage(getInteger(S, A(aA)), g("invalid start height"))
464- let aD = valueOrErrorMessage(getInteger(S, y(aA)), g("invalid price"))
465- let aE = valueOrErrorMessage(getInteger(S, D()), g("invalid next block to process"))
466- let aF = ((aC + aB) - 1)
467- let bo = 40
468- let bp = if (if (if ((height >= aE))
469- then if ((aE >= aC))
464+ let x = Address(at)
465+ let aC = valueOrErrorMessage(getInteger(U, z()), i("invalid period"))
466+ let aD = valueOrErrorMessage(getInteger(U, D()), i("invalid period length"))
467+ let aE = valueOrErrorMessage(getInteger(U, C(aC)), i("invalid start height"))
468+ let aF = valueOrErrorMessage(getInteger(U, A(aC)), i("invalid price"))
469+ let aG = valueOrErrorMessage(getInteger(U, F()), i("invalid next block to process"))
470+ let aH = ((aE + aD) - 1)
471+ let bq = 40
472+ let br = if (if (if ((height >= aG))
473+ then if ((aG >= aE))
470474 then true
471- else (aA == 0)
475+ else (aC == 0)
472476 else false)
473- then (aF >= aE)
477+ then (aH >= aG)
474478 else false)
475- then min([((aF - aE) + 1), bo])
476- else i(g("invalid target block"))
477- let bq = valueOrErrorMessage(getInteger(S, C()), g("invalid block processing reward"))
478- let br = (bq / bp)
479- let bs = (bq - (br * bp))
480- func bt (bu,bv) = if ((bv >= bp))
481- then bu
479+ then min([((aH - aG) + 1), bq])
480+ else k(i("invalid target block"))
481+ let bs = valueOrErrorMessage(getInteger(U, E()), i("invalid block processing reward"))
482+ let bt = (bs / br)
483+ let bu = (bs - (bt * br))
484+ func bv (bw,bx) = if ((bx >= br))
485+ then bw
482486 else {
483- let bw = (aE + bv)
484- let bx = valueOrErrorMessage(blockInfoByHeight(bw), g("invalid block info"))
485- let by = valueOrErrorMessage(af(bx.rewards, aa), g(("invalid treasury reward for height " + toString(bw))))
486- let bz = bx.generator
487- let at = valueOrElse(getInteger(S, u(bz)), 0)
488- let bA = if ((bv == (bp - 1)))
489- then (br + bs)
490- else br
491- let L = if ((aD > 0))
492- then fraction((by - bA), c, aD)
487+ let by = (aG + bx)
488+ let bz = valueOrErrorMessage(blockInfoByHeight(by), i("invalid block info"))
489+ let bA = valueOrErrorMessage(ah(bz.rewards, ac), i(("invalid treasury reward for height " + toString(by))))
490+ let bB = bz.generator
491+ let av = valueOrElse(getInteger(U, w(bB)), 0)
492+ let bC = if ((bx == (br - 1)))
493+ then (bt + bu)
494+ else bt
495+ let N = if ((aF > 0))
496+ then fraction((bA - bC), c, aF)
493497 else 0
494- 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)]
495- if ((bB == bB))
496- then (bu + L)
498+ let bD = [invoke(U, "stringEntry", [G(by), makeString([toBase58String(ae.transactionId), toBase58String(at), toString(bA), toString(bC), toString(N)], a)], nil), invoke(U, "integerEntry", [w(bB), (av + N)], nil)]
499+ if ((bD == bD))
500+ then (bw + N)
497501 else throw("Strict value is not equal to itself.")
498502 }
499503
500- 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]
501- let bD = {
502- let bE = bC
503- let bF = size(bE)
504- let bG = 0
505- func bH (bI,bJ) = if ((bJ >= bF))
506- then bI
507- else bt(bI, bE[bJ])
504+ let bE = [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]
505+ let bF = {
506+ let bG = bE
507+ let bH = size(bG)
508+ let bI = 0
509+ func bJ (bK,bL) = if ((bL >= bH))
510+ then bK
511+ else bv(bK, bG[bL])
508512
509- func bK (bI,bJ) = if ((bJ >= bF))
510- then bI
513+ func bM (bK,bL) = if ((bL >= bH))
514+ then bK
511515 else throw("List size exceeds 40")
512516
513- 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)
517+ bM(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bI, 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)
514518 }
515- if ((bD == bD))
519+ if ((bF == bF))
516520 then {
517- let bL = [invoke(S, "transferWaves", [ar, bq], nil), invoke(S, "reissue", [bD], nil), invoke(S, "integerEntry", [D(), (aE + bp)], nil)]
518- if ((bL == bL))
521+ let bN = [invoke(U, "transferWaves", [at, bs], nil), invoke(U, "reissue", [bF], nil), invoke(U, "integerEntry", [F(), (aG + br)], nil)]
522+ if ((bN == bN))
519523 then $Tuple2(nil, unit)
520524 else throw("Strict value is not equal to itself.")
521525 }
525529 }
526530
527531
528-@Verifier(bM)
529-func bN () = sigVerify(bM.bodyBytes, bM.proofs[0], bM.senderPublicKey)
532+@Verifier(bO)
533+func bP () = sigVerify(bO.bodyBytes, bO.proofs[0], bO.senderPublicKey)
530534
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
16-func g (h) = ((b + ": ") + h)
16+let g = 8
17+
18+let h = 6
19+
20+func i (j) = ((b + ": ") + j)
1721
1822
19-func i (h) = throw(g(h))
23+func k (j) = throw(i(j))
2024
2125
22-func j (k) = {
23- let l = k
24- if ($isInstanceOf(l, "ByteVector"))
26+func l (m) = {
27+ let n = m
28+ if ($isInstanceOf(n, "ByteVector"))
2529 then {
26- let m = l
27- toBase58String(m)
30+ let o = n
31+ toBase58String(o)
2832 }
29- else if ($isInstanceOf(l, "Unit"))
33+ else if ($isInstanceOf(n, "Unit"))
3034 then f
3135 else throw("Match error")
3236 }
3337
3438
35-func n (o) = if ((0 > o))
36- then -(o)
37- else o
39+func p (q) = if ((0 > q))
40+ then -(q)
41+ else q
3842
3943
40-func p () = makeString(["%s", "factory"], a)
44+func r () = makeString(["%s", "factory"], a)
4145
4246
43-func q () = makeString(["%s", "lpAssetId"], a)
47+func s () = makeString(["%s", "lpAssetId"], a)
4448
4549
46-func r () = makeString(["%s", "xtnAssetId"], a)
50+func t () = makeString(["%s", "xtnAssetId"], a)
4751
4852
49-func s () = makeString(["%s", "treasury"], a)
53+func u () = makeString(["%s", "treasury"], a)
5054
5155
52-func t (k) = makeString(["%s%s", "invested", j(k)], a)
56+func v (m) = makeString(["%s%s", "invested", l(m)], a)
5357
5458
55-func u (v) = makeString(["%s%s", "available", toString(v)], a)
59+func w (x) = makeString(["%s%s", "available", toString(x)], a)
5660
5761
58-func w (v) = makeString(["%s%s", "claimed", toString(v)], a)
62+func y (x) = makeString(["%s%s", "claimed", toString(x)], a)
5963
6064
61-func x () = makeString(["%s", "currentPeriod"], a)
65+func z () = makeString(["%s", "currentPeriod"], a)
6266
6367
64-func y (z) = makeString(["%s%d", "price", toString(z)], a)
68+func A (B) = makeString(["%s%d", "price", toString(B)], a)
6569
6670
67-func A (z) = makeString(["%s%d", "startHeight", toString(z)], a)
71+func C (B) = makeString(["%s%d", "startHeight", toString(B)], a)
6872
6973
70-func B () = "%s__periodLength"
74+func D () = "%s__periodLength"
7175
7276
73-func C () = "%s__blockProcessingReward"
77+func E () = "%s__blockProcessingReward"
7478
7579
76-func D () = "%s__nextBlockToProcess"
80+func F () = "%s__nextBlockToProcess"
7781
7882
79-func E (F) = makeString(["%s%d", "blockProcessed", toString(F)], a)
83+func G (H) = makeString(["%s%d", "blockProcessed", toString(H)], a)
8084
8185
82-func G () = "%s__withdrawal"
86+func I () = "%s__withdrawal"
8387
8488
85-func H (v,I) = makeString(["%s%s%s", "withdrawal", toString(v), toBase58String(I)], a)
89+func J (x,K) = makeString(["%s%s%s", "withdrawal", toString(x), toBase58String(K)], a)
8690
8791
88-func J (K,L,M,N) = {
89- let O = {
90- let l = N
91- if ($isInstanceOf(l, "ByteVector"))
92+func L (M,N,O,P) = {
93+ let Q = {
94+ let n = P
95+ if ($isInstanceOf(n, "ByteVector"))
9296 then {
93- let m = l
94- toBase58String(m)
97+ let o = n
98+ toBase58String(o)
9599 }
96- else if ($isInstanceOf(l, "Unit"))
100+ else if ($isInstanceOf(n, "Unit"))
97101 then "SOON"
98102 else throw("Match error")
99103 }
100- makeString(["%s%d%d%s", K, toString(L), toString(M), O], a)
104+ makeString(["%s%d%d%s", M, toString(N), toString(O), Q], a)
101105 }
102106
103107
104-func P (h) = {
105- let Q = split(h, a)
106- if ((size(Q) == 5))
108+func R (j) = {
109+ let S = split(j, a)
110+ if ((size(S) == 5))
107111 then {
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)
112+ let M = S[1]
113+ let N = valueOrErrorMessage(parseInt(S[2]), i("invalid lpAssetAmount"))
114+ let O = valueOrErrorMessage(parseInt(S[3]), i("invalid targetPeriod"))
115+ let P = S[4]
116+ $Tuple4(M, N, O, P)
113117 }
114- else i("invalid withdrawal request value")
118+ else k("invalid withdrawal request value")
115119 }
116120
117121
118-let R = {
119- let l = getString(this, p())
120- if ($isInstanceOf(l, "String"))
122+let T = {
123+ let n = getString(this, r())
124+ if ($isInstanceOf(n, "String"))
121125 then {
122- let h = l
123- addressFromString(h)
126+ let j = n
127+ addressFromString(j)
124128 }
125- else if ($isInstanceOf(l, "Unit"))
129+ else if ($isInstanceOf(n, "Unit"))
126130 then unit
127131 else throw("Match error")
128132 }
129133
130-let S = valueOrErrorMessage(R, g("invalid factory address"))
134+let U = valueOrErrorMessage(T, i("invalid factory address"))
131135
132-let T = {
133- let l = R
134- if ($isInstanceOf(l, "Address"))
136+let V = {
137+ let n = T
138+ if ($isInstanceOf(n, "Address"))
135139 then {
136- let U = l
137- let V = getString(U, q())
138- if ($isInstanceOf(V, "String"))
140+ let W = n
141+ let X = getString(W, s())
142+ if ($isInstanceOf(X, "String"))
139143 then {
140- let h = V
141- fromBase58String(h)
144+ let j = X
145+ fromBase58String(j)
142146 }
143- else if ($isInstanceOf(V, "Unit"))
147+ else if ($isInstanceOf(X, "Unit"))
144148 then unit
145149 else throw("Match error")
146150 }
147- else if ($isInstanceOf(l, "Unit"))
151+ else if ($isInstanceOf(n, "Unit"))
148152 then unit
149153 else throw("Match error")
150154 }
151155
152-let W = valueOrErrorMessage(T, g("invalid lpAssetId"))
156+let Y = valueOrErrorMessage(V, i("invalid lpAssetId"))
153157
154-let X = {
155- let l = R
156- if ($isInstanceOf(l, "Address"))
158+let Z = {
159+ let n = T
160+ if ($isInstanceOf(n, "Address"))
157161 then {
158- let U = l
159- let V = getString(U, r())
160- if ($isInstanceOf(V, "String"))
162+ let W = n
163+ let X = getString(W, t())
164+ if ($isInstanceOf(X, "String"))
161165 then {
162- let h = V
163- fromBase58String(h)
166+ let j = X
167+ fromBase58String(j)
164168 }
165- else if ($isInstanceOf(V, "Unit"))
169+ else if ($isInstanceOf(X, "Unit"))
166170 then unit
167171 else throw("Match error")
168172 }
169- else if ($isInstanceOf(l, "Unit"))
173+ else if ($isInstanceOf(n, "Unit"))
170174 then unit
171175 else throw("Match error")
172176 }
173177
174-let Y = valueOrErrorMessage(X, g("invalid xtnAssetId"))
178+let aa = valueOrErrorMessage(Z, i("invalid xtnAssetId"))
175179
176-let Z = {
177- let l = R
178- if ($isInstanceOf(l, "Address"))
180+let ab = {
181+ let n = T
182+ if ($isInstanceOf(n, "Address"))
179183 then {
180- let U = l
181- let V = getString(U, s())
182- if ($isInstanceOf(V, "String"))
184+ let W = n
185+ let X = getString(W, u())
186+ if ($isInstanceOf(X, "String"))
183187 then {
184- let h = V
185- addressFromString(h)
188+ let j = X
189+ addressFromString(j)
186190 }
187- else if ($isInstanceOf(V, "Unit"))
191+ else if ($isInstanceOf(X, "Unit"))
188192 then unit
189193 else throw("Match error")
190194 }
191- else if ($isInstanceOf(l, "Unit"))
195+ else if ($isInstanceOf(n, "Unit"))
192196 then unit
193197 else throw("Match error")
194198 }
195199
196-let aa = valueOrErrorMessage(Z, g("invalid treasury address"))
200+let ac = valueOrErrorMessage(ab, i("invalid treasury address"))
197201
198-func ab (ac,ad) = if ((ac.caller == ad))
202+func ad (ae,af) = if ((ae.caller == af))
199203 then true
200- else i("permission denied")
204+ else k("permission denied")
201205
202206
203-func ae (ac) = ab(ac, S)
207+func ag (ae) = ad(ae, U)
204208
205209
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
217- if (if ((h > 0))
218- then (aj == ah)
210+func ah (ai,aj) = {
211+ let j = size(ai)
212+ let ak = ai[0]
213+ let al = ak._1
214+ let am = ak._2
215+ let an = ai[1]
216+ let ao = an._1
217+ let ap = an._2
218+ let aq = ai[2]
219+ let ar = aq._1
220+ let as = aq._2
221+ if (if ((j > 0))
222+ then (al == aj)
219223 else false)
220- then ak
221- else if (if ((h > 1))
222- then (am == ah)
224+ then am
225+ else if (if ((j > 1))
226+ then (ao == aj)
223227 else false)
224- then an
225- else if (if ((h > 2))
226- then (ap == ah)
228+ then ap
229+ else if (if ((j > 2))
230+ then (ar == aj)
227231 else false)
228- then aq
232+ then as
229233 else unit
230234 }
231235
232236
233-@Callable(ac)
234-func claimLP (ar) = {
235- let as = ae(ac)
236- if ((as == as))
237+@Callable(ae)
238+func claimLP (at) = {
239+ let au = ag(ae)
240+ if ((au == au))
237241 then {
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)]
243- else i("nothing to claim")
244- $Tuple2(nil, av)
242+ let x = Address(at)
243+ let av = valueOrElse(getInteger(U, w(x)), 0)
244+ let aw = valueOrElse(getInteger(U, y(x)), 0)
245+ let ax = if ((av > 0))
246+ then [invoke(U, "transferAsset", [at, av, Y], nil), invoke(U, "integerEntry", [w(x), 0], nil), invoke(U, "integerEntry", [y(x), (aw + av)], nil)]
247+ else k("nothing to claim")
248+ $Tuple2(nil, ax)
245249 }
246250 else throw("Strict value is not equal to itself.")
247251 }
248252
249253
250254
251-@Callable(ac)
252-func finalize (ar,aw,ax,ay,az) = {
253- let as = ae(ac)
254- if ((as == as))
255+@Callable(ae)
256+func finalize (at,ay,az,aA,aB) = {
257+ let au = ag(ae)
258+ if ((au == au))
255259 then {
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 ((ac.originCaller == aa))
260+ let aC = valueOrErrorMessage(getInteger(U, z()), i("invalid period"))
261+ let aD = valueOrErrorMessage(getInteger(U, D()), i("invalid period length"))
262+ let aE = valueOrErrorMessage(getInteger(U, C(aC)), i("invalid start height"))
263+ let aF = valueOrErrorMessage(getInteger(U, A(aC)), i("invalid price"))
264+ let aG = valueOrErrorMessage(getInteger(U, F()), i("invalid next block to process"))
265+ let aH = ((aE + aD) - 1)
266+ let aI = [if ((ae.originCaller == ac))
263267 then true
264- else i("permission denied"), if ((aE > aF))
268+ else k("permission denied"), if ((aG > aH))
265269 then true
266- else i("unprocessed blocks"), if ((aw >= 0))
270+ else k("unprocessed blocks"), if ((ay >= 0))
267271 then true
268- else i("invalid new treasury volume"), if ((ax >= 0))
272+ else k("invalid new treasury volume"), if ((az >= 0))
269273 then true
270- else i("invalid XTN price"), if (if ((ay >= 0))
271- then (c >= ay)
274+ else k("invalid XTN price"), if (if ((aA >= 0))
275+ then (c >= aA)
272276 else false)
273277 then true
274- else i("invalid PWR managers bonus"), if (if ((az >= -(c)))
275- then (c >= az)
278+ else k("invalid PWR managers bonus"), if (if ((aB >= -(c)))
279+ then (c >= aB)
276280 else false)
277281 then true
278- else i("invalid treasury volume diff allocation coefficient")]
279- if ((aG == aG))
282+ else k("invalid treasury volume diff allocation coefficient")]
283+ if ((aI == aI))
280284 then {
281- let aH = valueOrElse(getInteger(S, t(Y)), 0)
282- let aI = valueOrElse(getInteger(S, t(unit)), 0)
283- let aJ = fraction(aH, ax, c)
284- let aK = (aJ + aI)
285- let aL = (aw - aK)
286- let aM = if ((aL > 0))
287- then fraction(aL, ay, c)
285+ let aJ = valueOrElse(getInteger(U, v(aa)), 0)
286+ let aK = valueOrElse(getInteger(U, v(unit)), 0)
287+ let aL = fraction(aJ, (az * g), (c * h))
288+ let aM = (aL + aK)
289+ let aN = (ay - aM)
290+ let aO = if ((aN > 0))
291+ then fraction(aN, aA, c)
288292 else 0
289- let aN = (aL - aM)
290- let aO = if ((aK > 0))
291- then fraction(aJ, c, aK)
293+ let aP = (aN - aO)
294+ let aQ = if ((aM > 0))
295+ then fraction(aL, c, aM)
292296 else 0
293- let aP = fraction(aN, aO, c)
294- let aQ = (aN - aP)
295- let aR = n(az)
296- let aS = fraction(aQ, if ((0 > az))
297- then aR
297+ let aR = fraction(aP, aQ, c)
298+ let aS = (aP - aR)
299+ let aT = p(aB)
300+ let aU = fraction(aS, if ((0 > aB))
301+ then aT
298302 else 0, c)
299- let aT = fraction(aP, if ((az > 0))
300- then aR
303+ let aV = fraction(aR, if ((aB > 0))
304+ then aT
301305 else 0, c)
302- let aU = ((aP - aT) + aS)
303- let aV = ((aQ - aS) + aT)
304- let aW = (aI + aV)
305- let aX = fraction((aJ + aU), c, ax)
306- let aY = (aA + 1)
307- let aZ = valueOrErrorMessage(assetInfo(W), g("invalid lpAsset info")).quantity
308- let ba = fraction(aW, c, aZ)
309- let bb = valueOrElse(getInteger(S, G()), 0)
310- let bc = fraction(bb, ba, c)
311- let bd = if (if ((bc == 0))
306+ let aW = ((aR - aV) + aU)
307+ let aX = ((aS - aU) + aV)
308+ let aY = (aK + aX)
309+ let aZ = fraction((aL + aW), (c * h), (az * g))
310+ let ba = (aC + 1)
311+ let bb = valueOrErrorMessage(assetInfo(Y), i("invalid lpAsset info")).quantity
312+ let bc = fraction(aY, c, bb)
313+ let bd = valueOrElse(getInteger(U, I()), 0)
314+ let be = fraction(bd, bc, c)
315+ let bf = if (if ((be == 0))
312316 then true
313- else if (if ((size(ac.payments) == 1))
314- then (ac.payments[0].assetId == unit)
317+ else if (if ((size(ae.payments) == 1))
318+ then (ae.payments[0].assetId == unit)
315319 else false)
316- then (ac.payments[0].amount >= bc)
320+ then (ae.payments[0].amount >= be)
317321 else false)
318322 then true
319- else i(("invalid payments, payment amount min: " + toString(bc)))
320- if ((bd == bd))
323+ else k(("invalid payments, payment amount min: " + toString(be)))
324+ if ((bf == bf))
321325 then {
322- let av = [invoke(S, "integerEntry", [x(), aY], nil), invoke(S, "integerEntry", [y(aY), ba], nil), invoke(S, "integerEntry", [A(aY), (aF + 1)], nil), invoke(S, "burn", [bb], nil), invoke(S, "integerEntry", [G(), 0], nil)]
323- $Tuple2(nil, av)
326+ let ax = [invoke(U, "integerEntry", [z(), ba], nil), invoke(U, "integerEntry", [A(ba), bc], nil), invoke(U, "integerEntry", [C(ba), (aH + 1)], nil), invoke(U, "burn", [bd], nil), invoke(U, "integerEntry", [I(), 0], nil)]
327+ $Tuple2(nil, ax)
324328 }
325329 else throw("Strict value is not equal to itself.")
326330 }
327331 else throw("Strict value is not equal to itself.")
328332 }
329333 else throw("Strict value is not equal to itself.")
330334 }
331335
332336
333337
334-@Callable(ac)
335-func invest (ar) = {
336- let as = ae(ac)
337- if ((as == as))
338+@Callable(ae)
339+func invest (at) = {
340+ let au = ag(ae)
341+ if ((au == au))
338342 then {
339- let v = Address(ar)
340- let aA = valueOrErrorMessage(getInteger(S, x()), g("invalid period"))
341- let aD = valueOrErrorMessage(getInteger(S, y(aA)), g("invalid price"))
342- let be = if ((size(ac.payments) == 1))
343- then ac.payments[0]
344- else i("invalid payments")
345- let bf = if (if ((be.assetId == unit))
346- then (be.amount > 0)
343+ let x = Address(at)
344+ let aC = valueOrErrorMessage(getInteger(U, z()), i("invalid period"))
345+ let aF = valueOrErrorMessage(getInteger(U, A(aC)), i("invalid price"))
346+ let bg = if ((size(ae.payments) == 1))
347+ then ae.payments[0]
348+ else k("invalid payments")
349+ let bh = if (if ((bg.assetId == unit))
350+ then (bg.amount > 0)
347351 else false)
348- then be.amount
349- else i("invalid payment amount")
350- let L = if ((aD > 0))
351- then fraction(bf, c, aD)
352+ then bg.amount
353+ else k("invalid payment amount")
354+ let N = if ((aF > 0))
355+ then fraction(bh, c, aF)
352356 else 0
353- let bg = valueOrElse(getInteger(S, t(unit)), 0)
354- 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)])]
355- $Tuple2(nil, av)
357+ let bi = valueOrElse(getInteger(U, v(unit)), 0)
358+ let ax = [invoke(U, "integerEntry", [v(unit), (bi + bh)], nil), invoke(U, "reissue", [N], nil), invoke(U, "transferAsset", [at, N, Y], nil), invoke(U, "transferWaves", [ac.bytes, bh], [AttachedPayment(unit, bh)])]
359+ $Tuple2(nil, ax)
356360 }
357361 else throw("Strict value is not equal to itself.")
358362 }
359363
360364
361365
362-@Callable(ac)
363-func withdraw (ar) = {
364- let as = ae(ac)
365- if ((as == as))
366+@Callable(ae)
367+func withdraw (at) = {
368+ let au = ag(ae)
369+ if ((au == au))
366370 then {
367- let v = Address(ar)
368- let aA = valueOrErrorMessage(getInteger(S, x()), g("invalid period"))
369- let be = if ((size(ac.payments) == 1))
370- then ac.payments[0]
371- else i(g("invalid payments"))
372- let bh = if ((be.assetId == W))
373- then W
374- else i("invalid payment asset")
375- let bf = if ((be.amount > 0))
376- then be.amount
377- else i("invalid payment amount")
378- let bi = valueOrElse(getInteger(S, G()), 0)
379- let av = [invoke(S, "integerEntry", [G(), (bi + bf)], nil), invoke(S, "stringEntry", [H(v, ac.transactionId), J(d, bf, (aA + 1), unit)], nil)]
380- if ((av == av))
381- then $Tuple2([ScriptTransfer(S, bf, bh)], av)
371+ let x = Address(at)
372+ let aC = valueOrErrorMessage(getInteger(U, z()), i("invalid period"))
373+ let bg = if ((size(ae.payments) == 1))
374+ then ae.payments[0]
375+ else k(i("invalid payments"))
376+ let bj = if ((bg.assetId == Y))
377+ then Y
378+ else k("invalid payment asset")
379+ let bh = if ((bg.amount > 0))
380+ then bg.amount
381+ else k("invalid payment amount")
382+ let bk = valueOrElse(getInteger(U, I()), 0)
383+ let ax = [invoke(U, "integerEntry", [I(), (bk + bh)], nil), invoke(U, "stringEntry", [J(x, ae.transactionId), L(d, bh, (aC + 1), unit)], nil)]
384+ if ((ax == ax))
385+ then $Tuple2([ScriptTransfer(U, bh, bj)], ax)
382386 else throw("Strict value is not equal to itself.")
383387 }
384388 else throw("Strict value is not equal to itself.")
385389 }
386390
387391
388392
389-@Callable(ac)
390-func cancelWithdraw (ar,I) = {
391- let as = ae(ac)
392- if ((as == as))
393+@Callable(ae)
394+func cancelWithdraw (at,K) = {
395+ let au = ag(ae)
396+ if ((au == au))
393397 then {
394- let v = Address(ar)
395- let bj = valueOrErrorMessage(getString(S, H(v, I)), g("invalid withdrawal request"))
396- let aA = valueOrErrorMessage(getInteger(S, x()), g("invalid period"))
397- let bk = P(bj)
398- let K = bk._1
399- let L = bk._2
400- let M = bk._3
401- let N = bk._4
402- let aG = [if ((K == d))
398+ let x = Address(at)
399+ let bl = valueOrErrorMessage(getString(U, J(x, K)), i("invalid withdrawal request"))
400+ let aC = valueOrErrorMessage(getInteger(U, z()), i("invalid period"))
401+ let bm = R(bl)
402+ let M = bm._1
403+ let N = bm._2
404+ let O = bm._3
405+ let P = bm._4
406+ let aI = [if ((M == d))
403407 then true
404- else i("invalid withdrawal request status"), if ((M > aA))
408+ else k("invalid withdrawal request status"), if ((O > aC))
405409 then true
406- else i("invalid withdrawal request period")]
407- if ((aG == aG))
410+ else k("invalid withdrawal request period")]
411+ if ((aI == aI))
408412 then {
409- let bi = valueOrErrorMessage(getInteger(S, G()), g("invalid total withdrawal amount"))
410- let av = [invoke(S, "integerEntry", [G(), if ((bi >= L))
411- then (bi - L)
412- else i("invalid withdrawal amount")], nil), invoke(S, "deleteEntry", [H(v, I)], nil), invoke(S, "transferAsset", [ar, L, W], nil)]
413- if ((av == av))
414- then $Tuple2(nil, av)
413+ let bk = valueOrErrorMessage(getInteger(U, I()), i("invalid total withdrawal amount"))
414+ let ax = [invoke(U, "integerEntry", [I(), if ((bk >= N))
415+ then (bk - N)
416+ else k("invalid withdrawal amount")], nil), invoke(U, "deleteEntry", [J(x, K)], nil), invoke(U, "transferAsset", [at, N, Y], nil)]
417+ if ((ax == ax))
418+ then $Tuple2(nil, ax)
415419 else throw("Strict value is not equal to itself.")
416420 }
417421 else throw("Strict value is not equal to itself.")
418422 }
419423 else throw("Strict value is not equal to itself.")
420424 }
421425
422426
423427
424-@Callable(ac)
425-func claimWaves (ar,I) = {
426- let as = ae(ac)
427- if ((as == as))
428+@Callable(ae)
429+func claimWaves (at,K) = {
430+ let au = ag(ae)
431+ if ((au == au))
428432 then {
429- let v = Address(ar)
430- let aA = valueOrErrorMessage(getInteger(S, x()), g("invalid period"))
431- let bj = valueOrErrorMessage(getString(S, H(v, I)), g("invalid withdrawal request"))
432- let bl = P(bj)
433- let K = bl._1
434- let L = bl._2
435- let M = bl._3
436- let N = bl._4
437- if ((K == e))
438- then i("invalid withdrawal request status")
439- else if ((M > aA))
440- then i("invalid withdrawal request period")
433+ let x = Address(at)
434+ let aC = valueOrErrorMessage(getInteger(U, z()), i("invalid period"))
435+ let bl = valueOrErrorMessage(getString(U, J(x, K)), i("invalid withdrawal request"))
436+ let bn = R(bl)
437+ let M = bn._1
438+ let N = bn._2
439+ let O = bn._3
440+ let P = bn._4
441+ if ((M == e))
442+ then k("invalid withdrawal request status")
443+ else if ((O > aC))
444+ then k("invalid withdrawal request period")
441445 else {
442- let bm = valueOrErrorMessage(getInteger(S, y(M)), g("invalid price"))
443- let bn = if ((bm > 0))
444- then fraction(L, bm, c)
446+ let bo = valueOrErrorMessage(getInteger(U, A(O)), i("invalid price"))
447+ let bp = if ((bo > 0))
448+ then fraction(N, bo, c)
445449 else 0
446- 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)]
447- $Tuple2(nil, av)
450+ let ax = [invoke(U, "stringEntry", [J(x, K), L(e, N, O, ae.transactionId)], nil), invoke(U, "burn", [N], nil), invoke(U, "transferWaves", [at, bp], nil)]
451+ $Tuple2(nil, ax)
448452 }
449453 }
450454 else throw("Strict value is not equal to itself.")
451455 }
452456
453457
454458
455-@Callable(ac)
456-func processBlocks (ar) = {
457- let as = ae(ac)
458- if ((as == as))
459+@Callable(ae)
460+func processBlocks (at) = {
461+ let au = ag(ae)
462+ if ((au == au))
459463 then {
460- let v = Address(ar)
461- let aA = valueOrErrorMessage(getInteger(S, x()), g("invalid period"))
462- let aB = valueOrErrorMessage(getInteger(S, B()), g("invalid period length"))
463- let aC = valueOrErrorMessage(getInteger(S, A(aA)), g("invalid start height"))
464- let aD = valueOrErrorMessage(getInteger(S, y(aA)), g("invalid price"))
465- let aE = valueOrErrorMessage(getInteger(S, D()), g("invalid next block to process"))
466- let aF = ((aC + aB) - 1)
467- let bo = 40
468- let bp = if (if (if ((height >= aE))
469- then if ((aE >= aC))
464+ let x = Address(at)
465+ let aC = valueOrErrorMessage(getInteger(U, z()), i("invalid period"))
466+ let aD = valueOrErrorMessage(getInteger(U, D()), i("invalid period length"))
467+ let aE = valueOrErrorMessage(getInteger(U, C(aC)), i("invalid start height"))
468+ let aF = valueOrErrorMessage(getInteger(U, A(aC)), i("invalid price"))
469+ let aG = valueOrErrorMessage(getInteger(U, F()), i("invalid next block to process"))
470+ let aH = ((aE + aD) - 1)
471+ let bq = 40
472+ let br = if (if (if ((height >= aG))
473+ then if ((aG >= aE))
470474 then true
471- else (aA == 0)
475+ else (aC == 0)
472476 else false)
473- then (aF >= aE)
477+ then (aH >= aG)
474478 else false)
475- then min([((aF - aE) + 1), bo])
476- else i(g("invalid target block"))
477- let bq = valueOrErrorMessage(getInteger(S, C()), g("invalid block processing reward"))
478- let br = (bq / bp)
479- let bs = (bq - (br * bp))
480- func bt (bu,bv) = if ((bv >= bp))
481- then bu
479+ then min([((aH - aG) + 1), bq])
480+ else k(i("invalid target block"))
481+ let bs = valueOrErrorMessage(getInteger(U, E()), i("invalid block processing reward"))
482+ let bt = (bs / br)
483+ let bu = (bs - (bt * br))
484+ func bv (bw,bx) = if ((bx >= br))
485+ then bw
482486 else {
483- let bw = (aE + bv)
484- let bx = valueOrErrorMessage(blockInfoByHeight(bw), g("invalid block info"))
485- let by = valueOrErrorMessage(af(bx.rewards, aa), g(("invalid treasury reward for height " + toString(bw))))
486- let bz = bx.generator
487- let at = valueOrElse(getInteger(S, u(bz)), 0)
488- let bA = if ((bv == (bp - 1)))
489- then (br + bs)
490- else br
491- let L = if ((aD > 0))
492- then fraction((by - bA), c, aD)
487+ let by = (aG + bx)
488+ let bz = valueOrErrorMessage(blockInfoByHeight(by), i("invalid block info"))
489+ let bA = valueOrErrorMessage(ah(bz.rewards, ac), i(("invalid treasury reward for height " + toString(by))))
490+ let bB = bz.generator
491+ let av = valueOrElse(getInteger(U, w(bB)), 0)
492+ let bC = if ((bx == (br - 1)))
493+ then (bt + bu)
494+ else bt
495+ let N = if ((aF > 0))
496+ then fraction((bA - bC), c, aF)
493497 else 0
494- 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)]
495- if ((bB == bB))
496- then (bu + L)
498+ let bD = [invoke(U, "stringEntry", [G(by), makeString([toBase58String(ae.transactionId), toBase58String(at), toString(bA), toString(bC), toString(N)], a)], nil), invoke(U, "integerEntry", [w(bB), (av + N)], nil)]
499+ if ((bD == bD))
500+ then (bw + N)
497501 else throw("Strict value is not equal to itself.")
498502 }
499503
500- 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]
501- let bD = {
502- let bE = bC
503- let bF = size(bE)
504- let bG = 0
505- func bH (bI,bJ) = if ((bJ >= bF))
506- then bI
507- else bt(bI, bE[bJ])
504+ let bE = [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]
505+ let bF = {
506+ let bG = bE
507+ let bH = size(bG)
508+ let bI = 0
509+ func bJ (bK,bL) = if ((bL >= bH))
510+ then bK
511+ else bv(bK, bG[bL])
508512
509- func bK (bI,bJ) = if ((bJ >= bF))
510- then bI
513+ func bM (bK,bL) = if ((bL >= bH))
514+ then bK
511515 else throw("List size exceeds 40")
512516
513- 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)
517+ bM(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bJ(bI, 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)
514518 }
515- if ((bD == bD))
519+ if ((bF == bF))
516520 then {
517- let bL = [invoke(S, "transferWaves", [ar, bq], nil), invoke(S, "reissue", [bD], nil), invoke(S, "integerEntry", [D(), (aE + bp)], nil)]
518- if ((bL == bL))
521+ let bN = [invoke(U, "transferWaves", [at, bs], nil), invoke(U, "reissue", [bF], nil), invoke(U, "integerEntry", [F(), (aG + br)], nil)]
522+ if ((bN == bN))
519523 then $Tuple2(nil, unit)
520524 else throw("Strict value is not equal to itself.")
521525 }
522526 else throw("Strict value is not equal to itself.")
523527 }
524528 else throw("Strict value is not equal to itself.")
525529 }
526530
527531
528-@Verifier(bM)
529-func bN () = sigVerify(bM.bodyBytes, bM.proofs[0], bM.senderPublicKey)
532+@Verifier(bO)
533+func bP () = sigVerify(bO.bodyBytes, bO.proofs[0], bO.senderPublicKey)
530534

github/deemru/w8io/169f3d6 
205.73 ms