tx · 5DuSwdMY1kQs56ZuCHXcsognf8kVwEM9GgLj1uWvg7TR

3N9wLKKtDBphos7U3xzsPqgvJJ5zPQEU6pV:  -0.01300000 Waves

2023.07.05 10:13 [2652303] smart account 3N9wLKKtDBphos7U3xzsPqgvJJ5zPQEU6pV > SELF 0.00000000 Waves

{ "type": 13, "id": "5DuSwdMY1kQs56ZuCHXcsognf8kVwEM9GgLj1uWvg7TR", "fee": 1300000, "feeAssetId": null, "timestamp": 1688541222239, "version": 1, "sender": "3N9wLKKtDBphos7U3xzsPqgvJJ5zPQEU6pV", "senderPublicKey": "GKX7DbVJVEtTB6ak3PXWHNPUhC3jym3ozbtZ7a36rGu6", "proofs": [ "4qSmW2U5qA3rtSjRCG4Qqnemrc6yES5eAj1jjkUQeDQseUuG541x3A4WiRwP93LC4htvtyRuNjiYvcT413QPhJvf" ], "script": "base64:BwJaCAISBAoCCAgSBAoCCAESBAoCCAQSBAoCCAISAwoBCBIDCgEBEgMKAQESBQoDAgECEgQKAgIBEgQKAgIBEgUKAwEBARIAEgMKAQgSABIAEgMKAQgSABIDCgEILwADU0VQAgJfXwAQY29udHJhY3RGaWxlbmFtZQIMZmFjdG9yeS5yaWRlAQd3cmFwRXJyAQFzCQCsAgIJAKwCAgUQY29udHJhY3RGaWxlbmFtZQICOiAFAXMBCHRocm93RXJyAQFzCQACAQkBB3dyYXBFcnIBBQFzAA9BRE1JTl9MSVNUX1NJWkUABQAGUVVPUlVNAAMAEVRYSURfQllURVNfTEVOR1RIACABGGtleUFsbG93ZWRUeElkVm90ZVByZWZpeAEEdHhJZAkAuQkCCQDMCAICBiVzJXMlcwkAzAgCAglhbGxvd1R4SWQJAMwIAgUEdHhJZAUDbmlsBQNTRVABEGtleUZ1bGxBZG1pblZvdGUCBnByZWZpeAxhZG1pbkFkZHJlc3MJALkJAgkAzAgCBQZwcmVmaXgJAMwIAgUMYWRtaW5BZGRyZXNzBQNuaWwFA1NFUAETa2V5QWRtaW5BZGRyZXNzTGlzdA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2J5T3duZXIDCQBnAgkAkAMBCQENZ2V0QWRtaW5zTGlzdAAFBlFVT1JVTQcJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXkDAwUKYnlQcm9wb3NhbAYFCGJ5QWRtaW5zBgUHYnlPd25lcsGySmY=", "chainId": 84, "height": 2652303, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3J844DxTN85g5x4pS4GGiLe9GDJxn2MXCNpPs45BeoMq Next: B2K7kQfptcWhnEpbWULCVwZbwkveix5Pb3yeVoQyCgc2 Diff:
OldNewDifferences
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "__"
55
6-let b = "calculator.ride"
6+let b = "factory.ride"
77
8-let c = 100000000
9-
10-let d = "PENDING"
11-
12-let e = "FINISHED"
13-
14-let f = "WAVES"
15-
16-func g (h) = ((b + ": ") + h)
8+func c (d) = ((b + ": ") + d)
179
1810
19-func i (h) = throw(g(h))
11+func e (d) = throw(c(d))
2012
2113
22-func j (k) = {
23- let l = k
24- if ($isInstanceOf(l, "ByteVector"))
25- then {
26- let m = l
27- toBase58String(m)
28- }
29- else if ($isInstanceOf(l, "Unit"))
30- then f
31- else throw("Match error")
14+let f = 5
15+
16+let g = 3
17+
18+let h = 32
19+
20+func i (j) = makeString(["%s%s%s", "allowTxId", j], a)
21+
22+
23+func k (l,m) = makeString([l, m], a)
24+
25+
26+func n () = makeString(["%s", "adminAddressList"], a)
27+
28+
29+func o () = makeString(["%s", "txId"], a)
30+
31+
32+func p (l,q) = {
33+ let r = k(l, q)
34+ valueOrElse(getInteger(r), 0)
3235 }
3336
3437
35-func n (o) = if ((0 > o))
36- then -(o)
37- else o
38-
39-
40-func p () = makeString(["%s", "factory"], a)
41-
42-
43-func q () = makeString(["%s", "managerPublicKey"], a)
44-
45-
46-func r () = makeString(["%s", "lpAssetId"], a)
47-
48-
49-func s () = makeString(["%s", "proxyTreasury"], a)
50-
51-
52-func t () = makeString(["%s", "mainTreasury"], a)
53-
54-
55-func u (k) = makeString(["%s%s", "invested", j(k)], a)
56-
57-
58-func v (k) = makeString(["%s%s", "donated", j(k)], a)
59-
60-
61-func w (x) = makeString(["%s%s", "available", toString(x)], a)
62-
63-
64-func y (x) = makeString(["%s%s", "claimed", toString(x)], a)
65-
66-
67-func z () = makeString(["%s", "currentPeriod"], a)
68-
69-
70-func A (B) = makeString(["%s%d", "price", toString(B)], a)
71-
72-
73-func C (B) = makeString(["%s%d", "startHeight", toString(B)], a)
74-
75-
76-func D () = "%s__periodLength"
77-
78-
79-func E () = "%s__blockProcessingReward"
80-
81-
82-func F () = "%s__nextBlockToProcess"
83-
84-
85-func G (H) = makeString(["%s%d", "blockProcessed", toString(H)], a)
86-
87-
88-func I () = "%s__withdrawal"
89-
90-
91-func J (x,K) = makeString(["%s%s%s", "withdrawal", toString(x), toBase58String(K)], a)
92-
93-
94-func L (M,N,O,P) = {
95- let Q = {
96- let l = P
97- if ($isInstanceOf(l, "ByteVector"))
98- then {
99- let m = l
100- toBase58String(m)
101- }
102- else if ($isInstanceOf(l, "Unit"))
103- then "SOON"
104- else throw("Match error")
105- }
106- makeString(["%s%d%d%s", M, toString(N), toString(O), Q], a)
38+func s () = {
39+ let t = getString(this, n())
40+ if ($isInstanceOf(t, "String"))
41+ then {
42+ let d = t
43+ split(d, a)
44+ }
45+ else nil
10746 }
10847
10948
110-func R (h) = {
111- let S = split(h, a)
112- if ((size(S) == 5))
113- then {
114- let M = S[1]
115- let N = valueOrErrorMessage(parseInt(S[2]), g("invalid lpAssetAmount"))
116- let O = valueOrErrorMessage(parseInt(S[3]), g("invalid targetPeriod"))
117- let P = S[4]
118- $Tuple4(M, N, O, P)
119- }
120- else i("invalid withdrawal request value")
49+func u (v) = containsElement(s(), v)
50+
51+
52+func w (x,m) = {
53+ let y = x
54+ let z = y._1
55+ let l = y._2
56+ $Tuple2((z :+ k(l, m)), l)
12157 }
12258
12359
124-let T = {
125- let l = getString(this, p())
126- if ($isInstanceOf(l, "String"))
127- then {
128- let h = l
129- addressFromString(h)
130- }
131- else if ($isInstanceOf(l, "Unit"))
132- then unit
133- else throw("Match error")
134- }
60+func A (B) = {
61+ let C = n()
62+ let D = {
63+ let E = s()
64+ let F = size(E)
65+ let G = $Tuple2(nil, B)
66+ func H (I,J) = if ((J >= F))
67+ then I
68+ else w(I, E[J])
13569
136-let U = valueOrErrorMessage(T, g("invalid factory address"))
70+ func K (I,J) = if ((J >= F))
71+ then I
72+ else throw("List size exceeds 5")
13773
138-let V = {
139- let l = T
140- if ($isInstanceOf(l, "Address"))
141- then {
142- let W = l
143- let X = getString(W, r())
144- if ($isInstanceOf(X, "String"))
145- then {
146- let h = X
147- fromBase58String(h)
148- }
149- else if ($isInstanceOf(X, "Unit"))
150- then unit
151- else throw("Match error")
152- }
153- else if ($isInstanceOf(l, "Unit"))
154- then unit
155- else throw("Match error")
156- }
157-
158-let Y = valueOrErrorMessage(V, g("invalid lpAssetId"))
159-
160-let Z = {
161- let l = T
162- if ($isInstanceOf(l, "Address"))
163- then {
164- let W = l
165- let X = getString(W, s())
166- if ($isInstanceOf(X, "String"))
167- then {
168- let h = X
169- addressFromString(h)
170- }
171- else if ($isInstanceOf(X, "Unit"))
172- then unit
173- else throw("Match error")
174- }
175- else if ($isInstanceOf(l, "Unit"))
176- then unit
177- else throw("Match error")
178- }
179-
180-let aa = valueOrErrorMessage(Z, g("invalid proxy treasury address"))
181-
182-let ab = {
183- let l = T
184- if ($isInstanceOf(l, "Address"))
185- then {
186- let W = l
187- let X = getString(W, t())
188- if ($isInstanceOf(X, "String"))
189- then {
190- let h = X
191- addressFromString(h)
192- }
193- else if ($isInstanceOf(X, "Unit"))
194- then unit
195- else throw("Match error")
196- }
197- else if ($isInstanceOf(l, "Unit"))
198- then unit
199- else throw("Match error")
200- }
201-
202-let ac = valueOrErrorMessage(ab, g("invalid feature treasury address"))
203-
204-func ad () = {
205- let l = T
206- if ($isInstanceOf(l, "Address"))
207- then {
208- let ae = l
209- let X = getString(ae, q())
210- if ($isInstanceOf(X, "String"))
211- then {
212- let af = X
213- fromBase58String(af)
214- }
215- else unit
216- }
217- else unit
74+ K(H(H(H(H(H(G, 0), 1), 2), 3), 4), 5)
75+ }
76+ let z = D._1
77+ let l = D._2
78+ z
21879 }
21980
22081
221-func ag (ah,ai) = if ((ah.caller == ai))
222- then true
223- else i("permission denied")
82+func L (z,r) = (z + valueOrElse(getInteger(r), 0))
22483
22584
226-func aj (ah) = ag(ah, U)
85+func M (l) = {
86+ let N = A(l)
87+ let E = N
88+ let F = size(E)
89+ let G = 0
90+ func H (I,J) = if ((J >= F))
91+ then I
92+ else L(I, E[J])
22793
94+ func K (I,J) = if ((J >= F))
95+ then I
96+ else throw("List size exceeds 5")
22897
229-func ak (al,am) = {
230- let h = size(al)
231- let an = al[0]
232- let ao = an._1
233- let ap = an._2
234- let aq = al[1]
235- let ar = aq._1
236- let as = aq._2
237- let at = al[2]
238- let au = at._1
239- let av = at._2
240- if (if ((h > 0))
241- then (ao == am)
242- else false)
243- then ap
244- else if (if ((h > 1))
245- then (ar == am)
246- else false)
247- then as
248- else if (if ((h > 2))
249- then (au == am)
250- else false)
251- then av
252- else unit
98+ K(H(H(H(H(H(G, 0), 1), 2), 3), 4), 5)
25399 }
254100
255101
256-@Callable(ah)
257-func claimLP (aw) = {
258- let ax = aj(ah)
259- if ((ax == ax))
102+func O (z,P) = (z :+ DeleteEntry(P))
103+
104+
105+func Q (l) = {
106+ let N = A(l)
107+ let E = N
108+ let F = size(E)
109+ let G = nil
110+ func H (I,J) = if ((J >= F))
111+ then I
112+ else O(I, E[J])
113+
114+ func K (I,J) = if ((J >= F))
115+ then I
116+ else throw("List size exceeds 5")
117+
118+ K(H(H(H(H(H(G, 0), 1), 2), 3), 4), 5)
119+ }
120+
121+
122+func R (S,B,T,U) = {
123+ let r = k(B, S)
124+ let V = p(B, S)
125+ let W = if (!(u(S)))
126+ then e((("Address: " + S) + " not in Admin list"))
127+ else if ((V == 1))
128+ then e((r + " you already voted"))
129+ else unit
130+ if ((W == W))
260131 then {
261- let x = Address(aw)
262- let ay = valueOrElse(getInteger(U, w(x)), 0)
263- let az = valueOrElse(getInteger(U, y(x)), 0)
264- let aA = if ((ay > 0))
265- then [invoke(U, "transferAsset", [aw, ay, Y], nil), invoke(U, "integerEntry", [w(x), 0], nil), invoke(U, "integerEntry", [y(x), (az + ay)], nil)]
266- else i("nothing to claim")
267- $Tuple2(nil, aA)
132+ let N = M(B)
133+ if (((N + 1) >= T))
134+ then {
135+ let X = Q(B)
136+ (X ++ U)
137+ }
138+ else [IntegerEntry(r, 1)]
268139 }
269140 else throw("Strict value is not equal to itself.")
270141 }
271142
272143
144+func Y () = "%s__calculator"
273145
274-@Callable(ah)
275-func finalize (aw,aB,aC,aD) = {
276- let ax = aj(ah)
277- if ((ax == ax))
146+
147+func Z () = "%s__proxyTreasury"
148+
149+
150+func aa () = "%s__child"
151+
152+
153+func ab () = "%s__blockProcessingReward"
154+
155+
156+func ac () = "%s__nextBlockToProcess"
157+
158+
159+func ad () = "%s__lpAssetId"
160+
161+
162+let ae = {
163+ let t = getString(this, Y())
164+ if ($isInstanceOf(t, "String"))
278165 then {
279- let aE = valueOrErrorMessage(getInteger(U, z()), g("invalid period"))
280- let aF = valueOrErrorMessage(getInteger(U, D()), g("invalid period length"))
281- let aG = valueOrErrorMessage(getInteger(U, C(aE)), g("invalid start height"))
282- let aH = valueOrErrorMessage(getInteger(U, A(aE)), g("invalid price"))
283- let aI = valueOrErrorMessage(getInteger(U, F()), g("invalid next block to process"))
284- let aJ = ((aG + aF) - 1)
285- let aK = [if ((ah.originCaller == ac))
286- then true
287- else i("permission denied"), if ((aI > aJ))
288- then true
289- else i("unprocessed blocks"), if ((aB >= 0))
290- then true
291- else i("invalid new treasury volume"), if ((aC >= 0))
292- then true
293- else i("invalid PWR managers bonus"), if (if ((aD >= -(c)))
294- then (c >= aD)
295- else false)
296- then true
297- else i("invalid treasury volume diff allocation coefficient")]
298- if ((aK == aK))
166+ let d = t
167+ addressFromString(d)
168+ }
169+ else if ($isInstanceOf(t, "Unit"))
170+ then unit
171+ else throw("Match error")
172+ }
173+
174+let af = valueOrErrorMessage(ae, c("invalid calculator address"))
175+
176+let ag = {
177+ let t = getString(this, Z())
178+ if ($isInstanceOf(t, "String"))
179+ then {
180+ let d = t
181+ addressFromString(d)
182+ }
183+ else if ($isInstanceOf(t, "Unit"))
184+ then unit
185+ else throw("Match error")
186+ }
187+
188+let ah = valueOrErrorMessage(ag, c("invalid proxy treasury address"))
189+
190+func ai () = "%s__config"
191+
192+
193+func aj () = "contract_children"
194+
195+
196+func ak () = "contract_voting_result"
197+
198+
199+func al (v,j) = ((("proposal_allow_broadcast_" + toString(v)) + "_") + toBase58String(j))
200+
201+
202+func am (an,ao) = makeString(["investor", toString(an), toString(ao)], "_")
203+
204+
205+let ap = {
206+ let t = getString(this, ai())
207+ if ($isInstanceOf(t, "String"))
208+ then {
209+ let d = t
210+ addressFromString(d)
211+ }
212+ else if ($isInstanceOf(t, "Unit"))
213+ then unit
214+ else throw("Match error")
215+ }
216+
217+let aq = valueOrErrorMessage(ap, c("invalid config address"))
218+
219+let ar = {
220+ let t = ap
221+ if ($isInstanceOf(t, "Address"))
222+ then {
223+ let x = t
224+ let as = getString(x, ak())
225+ if ($isInstanceOf(as, "String"))
299226 then {
300- let aL = valueOrElse(getInteger(U, v(unit)), 0)
301- let aM = valueOrElse(getInteger(U, u(unit)), 0)
302- let aN = (aL + aM)
303- let aO = (aB - aN)
304- let aP = if (if ((aO > 0))
305- then (aO >= aC)
306- else false)
307- then aC
308- else 0
309- let aQ = (aO - aP)
310- let aR = if ((aN > 0))
311- then fraction(aL, c, aN)
312- else 0
313- let aS = fraction(aQ, aR, c)
314- let aT = (aQ - aS)
315- let aU = n(aD)
316- let aV = fraction(aT, if ((0 > aD))
317- then aU
318- else 0, c)
319- let aW = fraction(aS, if ((aD > 0))
320- then aU
321- else 0, c)
322- let aX = ((aS - aW) + aV)
323- let aY = ((aT - aV) + aW)
324- let aZ = (aM + aY)
325- let ba = (aE + 1)
326- let bb = valueOrErrorMessage(assetInfo(Y), g("invalid lpAsset info")).quantity
327- let bc = fraction(aZ, c, bb)
328- let bd = valueOrElse(getInteger(U, I()), 0)
329- let be = (bb - bd)
330- let bf = max([0, fraction(be, bc, c)])
331- let bg = max([0, fraction(bd, bc, c)])
332- let bh = if ((size(ah.payments) > 0))
333- then ah.payments[0]
334- else unit
335- let bi = value(bh).amount
336- let bj = value(bh).assetId
337- let bk = if (if ((bg == 0))
338- then true
339- else if (if ((bh != unit))
340- then (bj == unit)
341- else false)
342- then (bi >= bg)
343- else false)
344- then true
345- else i(("invalid payments, payment amount min: " + toString(bg)))
346- if ((bk == bk))
347- then {
348- let bl = if ((bh != unit))
349- then [ScriptTransfer(U, bi, bj)]
350- else nil
351- let aA = [invoke(U, "integerEntry", [z(), ba], nil), invoke(U, "integerEntry", [A(ba), bc], nil), invoke(U, "integerEntry", [C(ba), (aJ + 1)], nil), invoke(U, "burn", [bd], nil), invoke(U, "integerEntry", [I(), 0], nil), invoke(U, "integerEntry", [u(unit), bf], nil)]
352- $Tuple2(bl, aA)
353- }
354- else throw("Strict value is not equal to itself.")
227+ let d = as
228+ addressFromString(d)
355229 }
356- else throw("Strict value is not equal to itself.")
230+ else if ($isInstanceOf(as, "Unit"))
231+ then unit
232+ else throw("Match error")
357233 }
234+ else if ($isInstanceOf(t, "Unit"))
235+ then unit
236+ else throw("Match error")
237+ }
238+
239+let at = valueOrErrorMessage(ar, c("invalid voting result address"))
240+
241+let au = {
242+ let t = ap
243+ if ($isInstanceOf(t, "Address"))
244+ then {
245+ let x = t
246+ let as = getString(x, aj())
247+ if ($isInstanceOf(as, "String"))
248+ then {
249+ let d = as
250+ addressFromString(d)
251+ }
252+ else if ($isInstanceOf(as, "Unit"))
253+ then unit
254+ else throw("Match error")
255+ }
256+ else if ($isInstanceOf(t, "Unit"))
257+ then unit
258+ else throw("Match error")
259+ }
260+
261+let av = valueOrErrorMessage(au, c("invalid children address"))
262+
263+let aw = {
264+ let t = getString(this, ad())
265+ if ($isInstanceOf(t, "String"))
266+ then {
267+ let d = t
268+ fromBase58String(d)
269+ }
270+ else if ($isInstanceOf(t, "Unit"))
271+ then unit
272+ else throw("Match error")
273+ }
274+
275+let ax = valueOrErrorMessage(aw, c("invalid lpAssetId"))
276+
277+func ay (az,v) = if ((az.caller == v))
278+ then true
279+ else e("permission denied")
280+
281+
282+func aA (az) = ay(az, this)
283+
284+
285+func aB (az) = ay(az, af)
286+
287+
288+@Callable(az)
289+func stringEntry (P,aC) = if (aB(az))
290+ then $Tuple2([StringEntry(P, aC)], P)
291+ else $Tuple2(nil, unit)
292+
293+
294+
295+@Callable(az)
296+func integerEntry (P,aC) = if (aB(az))
297+ then $Tuple2([IntegerEntry(P, aC)], P)
298+ else $Tuple2(nil, unit)
299+
300+
301+
302+@Callable(az)
303+func booleanEntry (P,aC) = if (aB(az))
304+ then $Tuple2([BooleanEntry(P, aC)], P)
305+ else $Tuple2(nil, unit)
306+
307+
308+
309+@Callable(az)
310+func binaryEntry (P,aC) = if (aB(az))
311+ then $Tuple2([BinaryEntry(P, aC)], P)
312+ else $Tuple2(nil, unit)
313+
314+
315+
316+@Callable(az)
317+func deleteEntry (P) = if (aB(az))
318+ then $Tuple2([DeleteEntry(P)], P)
319+ else $Tuple2(nil, unit)
320+
321+
322+
323+@Callable(az)
324+func reissue (aD) = if (aB(az))
325+ then $Tuple2([Reissue(ax, aD, true)], aD)
326+ else $Tuple2(nil, unit)
327+
328+
329+
330+@Callable(az)
331+func burn (aD) = if (aB(az))
332+ then $Tuple2([Burn(ax, aD)], aD)
333+ else $Tuple2(nil, unit)
334+
335+
336+
337+@Callable(az)
338+func transferAsset (aE,aD,aF) = if (aB(az))
339+ then $Tuple2([ScriptTransfer(Address(aE), aD, aF)], aD)
340+ else $Tuple2(nil, unit)
341+
342+
343+
344+@Callable(az)
345+func transferWaves (aE,aD) = if (aB(az))
346+ then $Tuple2([ScriptTransfer(Address(aE), aD, unit)], aD)
347+ else $Tuple2(nil, unit)
348+
349+
350+
351+@Callable(az)
352+func transferFromProxyTreasury (aG,aH) = if (aB(az))
353+ then $Tuple2(nil, invoke(ah, "transferWaves", [aG, aH], nil))
354+ else $Tuple2(nil, unit)
355+
356+
357+
358+@Callable(az)
359+func finalize (aI,aJ,aK) = $Tuple2(nil, reentrantInvoke(af, "finalize", [az.caller.bytes, aI, aJ, aK], az.payments))
360+
361+
362+
363+@Callable(az)
364+func claimLP () = $Tuple2(nil, reentrantInvoke(af, "claimLP", [az.caller.bytes], az.payments))
365+
366+
367+
368+@Callable(az)
369+func claimWaves (aL) = $Tuple2(nil, reentrantInvoke(af, "claimWaves", [az.caller.bytes, fromBase58String(aL)], az.payments))
370+
371+
372+
373+@Callable(az)
374+func invest () = $Tuple2(nil, reentrantInvoke(af, "invest", [az.caller.bytes], az.payments))
375+
376+
377+
378+@Callable(az)
379+func withdraw () = $Tuple2(nil, reentrantInvoke(af, "withdraw", [az.caller.bytes], az.payments))
380+
381+
382+
383+@Callable(az)
384+func cancelWithdraw (aL) = $Tuple2(nil, reentrantInvoke(af, "cancelWithdraw", [az.caller.bytes, fromBase58String(aL)], az.payments))
385+
386+
387+
388+@Callable(az)
389+func processBlocks () = $Tuple2(nil, reentrantInvoke(af, "processBlocks", [az.caller.bytes], az.payments))
390+
391+
392+
393+@Callable(az)
394+func voteForTxId (j) = {
395+ let S = toBase58String(az.caller.bytes)
396+ let B = i(j)
397+ let z = [StringEntry(o(), j)]
398+ let aM = getString(this, o())
399+ let W = [if ((size(fromBase58String(j)) == h))
400+ then true
401+ else e((j + " is not valid txId")), if (if ((aM == unit))
402+ then true
403+ else (value(aM) != j))
404+ then true
405+ else e((j + " is already allowed"))]
406+ if ((W == W))
407+ then R(S, B, g, z)
358408 else throw("Strict value is not equal to itself.")
359409 }
360410
361411
362-
363-@Callable(ah)
364-func invest (aw) = {
365- let ax = aj(ah)
366- if ((ax == ax))
367- then {
368- let x = Address(aw)
369- let aE = valueOrErrorMessage(getInteger(U, z()), g("invalid period"))
370- let aH = valueOrErrorMessage(getInteger(U, A(aE)), g("invalid price"))
371- let bm = if ((size(ah.payments) == 1))
372- then ah.payments[0]
373- else i("invalid payments")
374- let bn = if (if ((bm.assetId == unit))
375- then (bm.amount > 0)
376- else false)
377- then $Tuple2(bm.amount, bm.assetId)
378- else i("invalid payment amount")
379- let bi = bn._1
380- let bj = bn._2
381- let N = if ((aH > 0))
382- then fraction(bi, c, aH)
383- else 0
384- let bo = valueOrElse(getInteger(U, u(unit)), 0)
385- let bl = [ScriptTransfer(ac, bi, bj)]
386- let aA = [invoke(U, "integerEntry", [u(unit), (bo + bi)], nil), invoke(U, "reissue", [N], nil), invoke(U, "transferAsset", [aw, N, Y], nil)]
387- $Tuple2(bl, aA)
388- }
389- else throw("Strict value is not equal to itself.")
390- }
391-
392-
393-
394-@Callable(ah)
395-func withdraw (aw) = {
396- let ax = aj(ah)
397- if ((ax == ax))
398- then {
399- let x = Address(aw)
400- let aE = valueOrErrorMessage(getInteger(U, z()), g("invalid period"))
401- let bm = if ((size(ah.payments) == 1))
402- then ah.payments[0]
403- else i(g("invalid payments"))
404- let bj = if ((bm.assetId == Y))
405- then Y
406- else i("invalid payment asset")
407- let bi = if ((bm.amount > 0))
408- then bm.amount
409- else i("invalid payment amount")
410- let bp = valueOrElse(getInteger(U, I()), 0)
411- let bl = [ScriptTransfer(U, bi, bj)]
412- let aA = [invoke(U, "integerEntry", [I(), (bp + bi)], nil), invoke(U, "stringEntry", [J(x, ah.transactionId), L(d, bi, (aE + 1), unit)], nil)]
413- if ((aA == aA))
414- then $Tuple2(bl, aA)
415- else throw("Strict value is not equal to itself.")
416- }
417- else throw("Strict value is not equal to itself.")
418- }
419-
420-
421-
422-@Callable(ah)
423-func cancelWithdraw (aw,K) = {
424- let ax = aj(ah)
425- if ((ax == ax))
426- then {
427- let x = Address(aw)
428- let bq = valueOrErrorMessage(getString(U, J(x, K)), g("invalid withdrawal request"))
429- let aE = valueOrErrorMessage(getInteger(U, z()), g("invalid period"))
430- let br = R(bq)
431- let M = br._1
432- let N = br._2
433- let O = br._3
434- let P = br._4
435- let aK = [if ((M == d))
436- then true
437- else i("invalid withdrawal request status"), if ((O > aE))
438- then true
439- else i("invalid withdrawal request period")]
440- if ((aK == aK))
441- then {
442- let bp = valueOrErrorMessage(getInteger(U, I()), g("invalid total withdrawal amount"))
443- let aA = [invoke(U, "integerEntry", [I(), if ((bp >= N))
444- then (bp - N)
445- else i("invalid withdrawal amount")], nil), invoke(U, "deleteEntry", [J(x, K)], nil), invoke(U, "transferAsset", [aw, N, Y], nil)]
446- if ((aA == aA))
447- then $Tuple2(nil, aA)
448- else throw("Strict value is not equal to itself.")
449- }
450- else throw("Strict value is not equal to itself.")
451- }
452- else throw("Strict value is not equal to itself.")
453- }
454-
455-
456-
457-@Callable(ah)
458-func claimWaves (aw,K) = {
459- let ax = aj(ah)
460- if ((ax == ax))
461- then {
462- let x = Address(aw)
463- let aE = valueOrErrorMessage(getInteger(U, z()), g("invalid period"))
464- let bq = valueOrErrorMessage(getString(U, J(x, K)), g("invalid withdrawal request"))
465- let bs = R(bq)
466- let M = bs._1
467- let N = bs._2
468- let O = bs._3
469- let P = bs._4
470- if ((M == e))
471- then i("invalid withdrawal request status")
472- else if ((O > aE))
473- then i("invalid withdrawal request period")
474- else {
475- let bt = valueOrErrorMessage(getInteger(U, A(O)), g("invalid price"))
476- let bu = if ((bt > 0))
477- then fraction(N, bt, c)
478- else 0
479- let aA = [invoke(U, "stringEntry", [J(x, K), L(e, N, O, ah.transactionId)], nil), invoke(U, "transferWaves", [aw, bu], nil)]
480- $Tuple2(nil, aA)
481- }
482- }
483- else throw("Strict value is not equal to itself.")
484- }
485-
486-
487-
488-@Callable(ah)
489-func processBlocks (aw) = {
490- let ax = aj(ah)
491- if ((ax == ax))
492- then {
493- let x = Address(aw)
494- let aE = valueOrErrorMessage(getInteger(U, z()), g("invalid period"))
495- let aF = valueOrErrorMessage(getInteger(U, D()), g("invalid period length"))
496- let aG = valueOrErrorMessage(getInteger(U, C(aE)), g("invalid start height"))
497- let aH = valueOrErrorMessage(getInteger(U, A(aE)), g("invalid price"))
498- let aI = valueOrErrorMessage(getInteger(U, F()), g("invalid next block to process"))
499- let aJ = ((aG + aF) - 1)
500- let bv = 40
501- let bw = if (if (if ((height >= aI))
502- then if ((aI >= aG))
503- then true
504- else (aE == 0)
505- else false)
506- then (aJ >= aI)
507- else false)
508- then min([((aJ - aI) + 1), bv])
509- else i(g("invalid target block"))
510- let bx = valueOrErrorMessage(getInteger(U, E()), g("invalid block processing reward"))
511- let by = (bx / bw)
512- let bz = (bx - (by * bw))
513- func bA (bB,bC) = if ((bC >= bw))
514- then bB
515- else {
516- let bD = (aI + bC)
517- let bE = valueOrErrorMessage(blockInfoByHeight(bD), g("invalid block info"))
518- let bF = valueOrErrorMessage(ak(bE.rewards, aa), g(("invalid treasury reward for height " + toString(bD))))
519- let bG = bE.generator
520- let ay = valueOrElse(getInteger(U, w(bG)), 0)
521- let bH = if ((bC == (bw - 1)))
522- then (by + bz)
523- else by
524- let N = if ((aH > 0))
525- then fraction((bF - bH), c, aH)
526- else 0
527- let bI = [invoke(U, "stringEntry", [G(bD), makeString([toBase58String(ah.transactionId), toString(aE), toString(bG), toBase58String(aw), toString(bF), toString(bH), toString(N)], a)], nil), invoke(U, "integerEntry", [w(bG), (ay + N)], nil)]
528- if ((bI == bI))
529- then {
530- let bJ = bB
531- let bK = bJ._1
532- let bL = bJ._2
533- $Tuple2((bK + N), (bL + bF))
534- }
535- else throw("Strict value is not equal to itself.")
536- }
537-
538- let bM = [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]
539- let bN = {
540- let bO = bM
541- let bP = size(bO)
542- let bQ = $Tuple2(0, 0)
543- func bR (bS,bT) = if ((bT >= bP))
544- then bS
545- else bA(bS, bO[bT])
546-
547- func bU (bS,bT) = if ((bT >= bP))
548- then bS
549- else throw("List size exceeds 40")
550-
551- bU(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bQ, 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)
412+@Verifier(aN)
413+func aO () = {
414+ let aP = {
415+ let t = ar
416+ if ($isInstanceOf(t, "Address"))
417+ then {
418+ let aQ = t
419+ valueOrElse(getBoolean(aQ, al(this, aN.id)), false)
552420 }
553- if ((bN == bN))
554- then {
555- let bV = bN._2
556- let bW = bN._1
557- let bX = (bV - bx)
558- let bo = valueOrElse(getInteger(U, u(unit)), 0)
559- let bl = [invoke(U, "reissue", [bW], nil), invoke(U, "integerEntry", [F(), (aI + bw)], nil), invoke(U, "transferFromProxyTreasury", [ac.bytes, bX], nil), invoke(U, "transferFromProxyTreasury", [aw, bx], nil), invoke(U, "integerEntry", [u(unit), (bo + bX)], nil)]
560- if ((bl == bl))
561- then $Tuple2(nil, unit)
562- else throw("Strict value is not equal to itself.")
563- }
564- else throw("Strict value is not equal to itself.")
565- }
566- else throw("Strict value is not equal to itself.")
567- }
568-
569-
570-@Verifier(bY)
571-func bZ () = {
572- let ca = {
573- let l = ad()
574- if ($isInstanceOf(l, "ByteVector"))
575- then {
576- let af = l
577- af
578- }
579- else bY.senderPublicKey
421+ else false
580422 }
581- sigVerify(bY.bodyBytes, bY.proofs[0], ca)
423+ let aR = (aN.id == fromBase58String(valueOrElse(getString(this, o()), "")))
424+ let aS = if ((size(s()) >= g))
425+ then false
426+ else sigVerify(aN.bodyBytes, aN.proofs[0], aN.senderPublicKey)
427+ if (if (aP)
428+ then true
429+ else aR)
430+ then true
431+ else aS
582432 }
583433
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 7 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "__"
55
6-let b = "calculator.ride"
6+let b = "factory.ride"
77
8-let c = 100000000
9-
10-let d = "PENDING"
11-
12-let e = "FINISHED"
13-
14-let f = "WAVES"
15-
16-func g (h) = ((b + ": ") + h)
8+func c (d) = ((b + ": ") + d)
179
1810
19-func i (h) = throw(g(h))
11+func e (d) = throw(c(d))
2012
2113
22-func j (k) = {
23- let l = k
24- if ($isInstanceOf(l, "ByteVector"))
25- then {
26- let m = l
27- toBase58String(m)
28- }
29- else if ($isInstanceOf(l, "Unit"))
30- then f
31- else throw("Match error")
14+let f = 5
15+
16+let g = 3
17+
18+let h = 32
19+
20+func i (j) = makeString(["%s%s%s", "allowTxId", j], a)
21+
22+
23+func k (l,m) = makeString([l, m], a)
24+
25+
26+func n () = makeString(["%s", "adminAddressList"], a)
27+
28+
29+func o () = makeString(["%s", "txId"], a)
30+
31+
32+func p (l,q) = {
33+ let r = k(l, q)
34+ valueOrElse(getInteger(r), 0)
3235 }
3336
3437
35-func n (o) = if ((0 > o))
36- then -(o)
37- else o
38-
39-
40-func p () = makeString(["%s", "factory"], a)
41-
42-
43-func q () = makeString(["%s", "managerPublicKey"], a)
44-
45-
46-func r () = makeString(["%s", "lpAssetId"], a)
47-
48-
49-func s () = makeString(["%s", "proxyTreasury"], a)
50-
51-
52-func t () = makeString(["%s", "mainTreasury"], a)
53-
54-
55-func u (k) = makeString(["%s%s", "invested", j(k)], a)
56-
57-
58-func v (k) = makeString(["%s%s", "donated", j(k)], a)
59-
60-
61-func w (x) = makeString(["%s%s", "available", toString(x)], a)
62-
63-
64-func y (x) = makeString(["%s%s", "claimed", toString(x)], a)
65-
66-
67-func z () = makeString(["%s", "currentPeriod"], a)
68-
69-
70-func A (B) = makeString(["%s%d", "price", toString(B)], a)
71-
72-
73-func C (B) = makeString(["%s%d", "startHeight", toString(B)], a)
74-
75-
76-func D () = "%s__periodLength"
77-
78-
79-func E () = "%s__blockProcessingReward"
80-
81-
82-func F () = "%s__nextBlockToProcess"
83-
84-
85-func G (H) = makeString(["%s%d", "blockProcessed", toString(H)], a)
86-
87-
88-func I () = "%s__withdrawal"
89-
90-
91-func J (x,K) = makeString(["%s%s%s", "withdrawal", toString(x), toBase58String(K)], a)
92-
93-
94-func L (M,N,O,P) = {
95- let Q = {
96- let l = P
97- if ($isInstanceOf(l, "ByteVector"))
98- then {
99- let m = l
100- toBase58String(m)
101- }
102- else if ($isInstanceOf(l, "Unit"))
103- then "SOON"
104- else throw("Match error")
105- }
106- makeString(["%s%d%d%s", M, toString(N), toString(O), Q], a)
38+func s () = {
39+ let t = getString(this, n())
40+ if ($isInstanceOf(t, "String"))
41+ then {
42+ let d = t
43+ split(d, a)
44+ }
45+ else nil
10746 }
10847
10948
110-func R (h) = {
111- let S = split(h, a)
112- if ((size(S) == 5))
113- then {
114- let M = S[1]
115- let N = valueOrErrorMessage(parseInt(S[2]), g("invalid lpAssetAmount"))
116- let O = valueOrErrorMessage(parseInt(S[3]), g("invalid targetPeriod"))
117- let P = S[4]
118- $Tuple4(M, N, O, P)
119- }
120- else i("invalid withdrawal request value")
49+func u (v) = containsElement(s(), v)
50+
51+
52+func w (x,m) = {
53+ let y = x
54+ let z = y._1
55+ let l = y._2
56+ $Tuple2((z :+ k(l, m)), l)
12157 }
12258
12359
124-let T = {
125- let l = getString(this, p())
126- if ($isInstanceOf(l, "String"))
127- then {
128- let h = l
129- addressFromString(h)
130- }
131- else if ($isInstanceOf(l, "Unit"))
132- then unit
133- else throw("Match error")
134- }
60+func A (B) = {
61+ let C = n()
62+ let D = {
63+ let E = s()
64+ let F = size(E)
65+ let G = $Tuple2(nil, B)
66+ func H (I,J) = if ((J >= F))
67+ then I
68+ else w(I, E[J])
13569
136-let U = valueOrErrorMessage(T, g("invalid factory address"))
70+ func K (I,J) = if ((J >= F))
71+ then I
72+ else throw("List size exceeds 5")
13773
138-let V = {
139- let l = T
140- if ($isInstanceOf(l, "Address"))
141- then {
142- let W = l
143- let X = getString(W, r())
144- if ($isInstanceOf(X, "String"))
145- then {
146- let h = X
147- fromBase58String(h)
148- }
149- else if ($isInstanceOf(X, "Unit"))
150- then unit
151- else throw("Match error")
152- }
153- else if ($isInstanceOf(l, "Unit"))
154- then unit
155- else throw("Match error")
156- }
157-
158-let Y = valueOrErrorMessage(V, g("invalid lpAssetId"))
159-
160-let Z = {
161- let l = T
162- if ($isInstanceOf(l, "Address"))
163- then {
164- let W = l
165- let X = getString(W, s())
166- if ($isInstanceOf(X, "String"))
167- then {
168- let h = X
169- addressFromString(h)
170- }
171- else if ($isInstanceOf(X, "Unit"))
172- then unit
173- else throw("Match error")
174- }
175- else if ($isInstanceOf(l, "Unit"))
176- then unit
177- else throw("Match error")
178- }
179-
180-let aa = valueOrErrorMessage(Z, g("invalid proxy treasury address"))
181-
182-let ab = {
183- let l = T
184- if ($isInstanceOf(l, "Address"))
185- then {
186- let W = l
187- let X = getString(W, t())
188- if ($isInstanceOf(X, "String"))
189- then {
190- let h = X
191- addressFromString(h)
192- }
193- else if ($isInstanceOf(X, "Unit"))
194- then unit
195- else throw("Match error")
196- }
197- else if ($isInstanceOf(l, "Unit"))
198- then unit
199- else throw("Match error")
200- }
201-
202-let ac = valueOrErrorMessage(ab, g("invalid feature treasury address"))
203-
204-func ad () = {
205- let l = T
206- if ($isInstanceOf(l, "Address"))
207- then {
208- let ae = l
209- let X = getString(ae, q())
210- if ($isInstanceOf(X, "String"))
211- then {
212- let af = X
213- fromBase58String(af)
214- }
215- else unit
216- }
217- else unit
74+ K(H(H(H(H(H(G, 0), 1), 2), 3), 4), 5)
75+ }
76+ let z = D._1
77+ let l = D._2
78+ z
21879 }
21980
22081
221-func ag (ah,ai) = if ((ah.caller == ai))
222- then true
223- else i("permission denied")
82+func L (z,r) = (z + valueOrElse(getInteger(r), 0))
22483
22584
226-func aj (ah) = ag(ah, U)
85+func M (l) = {
86+ let N = A(l)
87+ let E = N
88+ let F = size(E)
89+ let G = 0
90+ func H (I,J) = if ((J >= F))
91+ then I
92+ else L(I, E[J])
22793
94+ func K (I,J) = if ((J >= F))
95+ then I
96+ else throw("List size exceeds 5")
22897
229-func ak (al,am) = {
230- let h = size(al)
231- let an = al[0]
232- let ao = an._1
233- let ap = an._2
234- let aq = al[1]
235- let ar = aq._1
236- let as = aq._2
237- let at = al[2]
238- let au = at._1
239- let av = at._2
240- if (if ((h > 0))
241- then (ao == am)
242- else false)
243- then ap
244- else if (if ((h > 1))
245- then (ar == am)
246- else false)
247- then as
248- else if (if ((h > 2))
249- then (au == am)
250- else false)
251- then av
252- else unit
98+ K(H(H(H(H(H(G, 0), 1), 2), 3), 4), 5)
25399 }
254100
255101
256-@Callable(ah)
257-func claimLP (aw) = {
258- let ax = aj(ah)
259- if ((ax == ax))
102+func O (z,P) = (z :+ DeleteEntry(P))
103+
104+
105+func Q (l) = {
106+ let N = A(l)
107+ let E = N
108+ let F = size(E)
109+ let G = nil
110+ func H (I,J) = if ((J >= F))
111+ then I
112+ else O(I, E[J])
113+
114+ func K (I,J) = if ((J >= F))
115+ then I
116+ else throw("List size exceeds 5")
117+
118+ K(H(H(H(H(H(G, 0), 1), 2), 3), 4), 5)
119+ }
120+
121+
122+func R (S,B,T,U) = {
123+ let r = k(B, S)
124+ let V = p(B, S)
125+ let W = if (!(u(S)))
126+ then e((("Address: " + S) + " not in Admin list"))
127+ else if ((V == 1))
128+ then e((r + " you already voted"))
129+ else unit
130+ if ((W == W))
260131 then {
261- let x = Address(aw)
262- let ay = valueOrElse(getInteger(U, w(x)), 0)
263- let az = valueOrElse(getInteger(U, y(x)), 0)
264- let aA = if ((ay > 0))
265- then [invoke(U, "transferAsset", [aw, ay, Y], nil), invoke(U, "integerEntry", [w(x), 0], nil), invoke(U, "integerEntry", [y(x), (az + ay)], nil)]
266- else i("nothing to claim")
267- $Tuple2(nil, aA)
132+ let N = M(B)
133+ if (((N + 1) >= T))
134+ then {
135+ let X = Q(B)
136+ (X ++ U)
137+ }
138+ else [IntegerEntry(r, 1)]
268139 }
269140 else throw("Strict value is not equal to itself.")
270141 }
271142
272143
144+func Y () = "%s__calculator"
273145
274-@Callable(ah)
275-func finalize (aw,aB,aC,aD) = {
276- let ax = aj(ah)
277- if ((ax == ax))
146+
147+func Z () = "%s__proxyTreasury"
148+
149+
150+func aa () = "%s__child"
151+
152+
153+func ab () = "%s__blockProcessingReward"
154+
155+
156+func ac () = "%s__nextBlockToProcess"
157+
158+
159+func ad () = "%s__lpAssetId"
160+
161+
162+let ae = {
163+ let t = getString(this, Y())
164+ if ($isInstanceOf(t, "String"))
278165 then {
279- let aE = valueOrErrorMessage(getInteger(U, z()), g("invalid period"))
280- let aF = valueOrErrorMessage(getInteger(U, D()), g("invalid period length"))
281- let aG = valueOrErrorMessage(getInteger(U, C(aE)), g("invalid start height"))
282- let aH = valueOrErrorMessage(getInteger(U, A(aE)), g("invalid price"))
283- let aI = valueOrErrorMessage(getInteger(U, F()), g("invalid next block to process"))
284- let aJ = ((aG + aF) - 1)
285- let aK = [if ((ah.originCaller == ac))
286- then true
287- else i("permission denied"), if ((aI > aJ))
288- then true
289- else i("unprocessed blocks"), if ((aB >= 0))
290- then true
291- else i("invalid new treasury volume"), if ((aC >= 0))
292- then true
293- else i("invalid PWR managers bonus"), if (if ((aD >= -(c)))
294- then (c >= aD)
295- else false)
296- then true
297- else i("invalid treasury volume diff allocation coefficient")]
298- if ((aK == aK))
166+ let d = t
167+ addressFromString(d)
168+ }
169+ else if ($isInstanceOf(t, "Unit"))
170+ then unit
171+ else throw("Match error")
172+ }
173+
174+let af = valueOrErrorMessage(ae, c("invalid calculator address"))
175+
176+let ag = {
177+ let t = getString(this, Z())
178+ if ($isInstanceOf(t, "String"))
179+ then {
180+ let d = t
181+ addressFromString(d)
182+ }
183+ else if ($isInstanceOf(t, "Unit"))
184+ then unit
185+ else throw("Match error")
186+ }
187+
188+let ah = valueOrErrorMessage(ag, c("invalid proxy treasury address"))
189+
190+func ai () = "%s__config"
191+
192+
193+func aj () = "contract_children"
194+
195+
196+func ak () = "contract_voting_result"
197+
198+
199+func al (v,j) = ((("proposal_allow_broadcast_" + toString(v)) + "_") + toBase58String(j))
200+
201+
202+func am (an,ao) = makeString(["investor", toString(an), toString(ao)], "_")
203+
204+
205+let ap = {
206+ let t = getString(this, ai())
207+ if ($isInstanceOf(t, "String"))
208+ then {
209+ let d = t
210+ addressFromString(d)
211+ }
212+ else if ($isInstanceOf(t, "Unit"))
213+ then unit
214+ else throw("Match error")
215+ }
216+
217+let aq = valueOrErrorMessage(ap, c("invalid config address"))
218+
219+let ar = {
220+ let t = ap
221+ if ($isInstanceOf(t, "Address"))
222+ then {
223+ let x = t
224+ let as = getString(x, ak())
225+ if ($isInstanceOf(as, "String"))
299226 then {
300- let aL = valueOrElse(getInteger(U, v(unit)), 0)
301- let aM = valueOrElse(getInteger(U, u(unit)), 0)
302- let aN = (aL + aM)
303- let aO = (aB - aN)
304- let aP = if (if ((aO > 0))
305- then (aO >= aC)
306- else false)
307- then aC
308- else 0
309- let aQ = (aO - aP)
310- let aR = if ((aN > 0))
311- then fraction(aL, c, aN)
312- else 0
313- let aS = fraction(aQ, aR, c)
314- let aT = (aQ - aS)
315- let aU = n(aD)
316- let aV = fraction(aT, if ((0 > aD))
317- then aU
318- else 0, c)
319- let aW = fraction(aS, if ((aD > 0))
320- then aU
321- else 0, c)
322- let aX = ((aS - aW) + aV)
323- let aY = ((aT - aV) + aW)
324- let aZ = (aM + aY)
325- let ba = (aE + 1)
326- let bb = valueOrErrorMessage(assetInfo(Y), g("invalid lpAsset info")).quantity
327- let bc = fraction(aZ, c, bb)
328- let bd = valueOrElse(getInteger(U, I()), 0)
329- let be = (bb - bd)
330- let bf = max([0, fraction(be, bc, c)])
331- let bg = max([0, fraction(bd, bc, c)])
332- let bh = if ((size(ah.payments) > 0))
333- then ah.payments[0]
334- else unit
335- let bi = value(bh).amount
336- let bj = value(bh).assetId
337- let bk = if (if ((bg == 0))
338- then true
339- else if (if ((bh != unit))
340- then (bj == unit)
341- else false)
342- then (bi >= bg)
343- else false)
344- then true
345- else i(("invalid payments, payment amount min: " + toString(bg)))
346- if ((bk == bk))
347- then {
348- let bl = if ((bh != unit))
349- then [ScriptTransfer(U, bi, bj)]
350- else nil
351- let aA = [invoke(U, "integerEntry", [z(), ba], nil), invoke(U, "integerEntry", [A(ba), bc], nil), invoke(U, "integerEntry", [C(ba), (aJ + 1)], nil), invoke(U, "burn", [bd], nil), invoke(U, "integerEntry", [I(), 0], nil), invoke(U, "integerEntry", [u(unit), bf], nil)]
352- $Tuple2(bl, aA)
353- }
354- else throw("Strict value is not equal to itself.")
227+ let d = as
228+ addressFromString(d)
355229 }
356- else throw("Strict value is not equal to itself.")
230+ else if ($isInstanceOf(as, "Unit"))
231+ then unit
232+ else throw("Match error")
357233 }
234+ else if ($isInstanceOf(t, "Unit"))
235+ then unit
236+ else throw("Match error")
237+ }
238+
239+let at = valueOrErrorMessage(ar, c("invalid voting result address"))
240+
241+let au = {
242+ let t = ap
243+ if ($isInstanceOf(t, "Address"))
244+ then {
245+ let x = t
246+ let as = getString(x, aj())
247+ if ($isInstanceOf(as, "String"))
248+ then {
249+ let d = as
250+ addressFromString(d)
251+ }
252+ else if ($isInstanceOf(as, "Unit"))
253+ then unit
254+ else throw("Match error")
255+ }
256+ else if ($isInstanceOf(t, "Unit"))
257+ then unit
258+ else throw("Match error")
259+ }
260+
261+let av = valueOrErrorMessage(au, c("invalid children address"))
262+
263+let aw = {
264+ let t = getString(this, ad())
265+ if ($isInstanceOf(t, "String"))
266+ then {
267+ let d = t
268+ fromBase58String(d)
269+ }
270+ else if ($isInstanceOf(t, "Unit"))
271+ then unit
272+ else throw("Match error")
273+ }
274+
275+let ax = valueOrErrorMessage(aw, c("invalid lpAssetId"))
276+
277+func ay (az,v) = if ((az.caller == v))
278+ then true
279+ else e("permission denied")
280+
281+
282+func aA (az) = ay(az, this)
283+
284+
285+func aB (az) = ay(az, af)
286+
287+
288+@Callable(az)
289+func stringEntry (P,aC) = if (aB(az))
290+ then $Tuple2([StringEntry(P, aC)], P)
291+ else $Tuple2(nil, unit)
292+
293+
294+
295+@Callable(az)
296+func integerEntry (P,aC) = if (aB(az))
297+ then $Tuple2([IntegerEntry(P, aC)], P)
298+ else $Tuple2(nil, unit)
299+
300+
301+
302+@Callable(az)
303+func booleanEntry (P,aC) = if (aB(az))
304+ then $Tuple2([BooleanEntry(P, aC)], P)
305+ else $Tuple2(nil, unit)
306+
307+
308+
309+@Callable(az)
310+func binaryEntry (P,aC) = if (aB(az))
311+ then $Tuple2([BinaryEntry(P, aC)], P)
312+ else $Tuple2(nil, unit)
313+
314+
315+
316+@Callable(az)
317+func deleteEntry (P) = if (aB(az))
318+ then $Tuple2([DeleteEntry(P)], P)
319+ else $Tuple2(nil, unit)
320+
321+
322+
323+@Callable(az)
324+func reissue (aD) = if (aB(az))
325+ then $Tuple2([Reissue(ax, aD, true)], aD)
326+ else $Tuple2(nil, unit)
327+
328+
329+
330+@Callable(az)
331+func burn (aD) = if (aB(az))
332+ then $Tuple2([Burn(ax, aD)], aD)
333+ else $Tuple2(nil, unit)
334+
335+
336+
337+@Callable(az)
338+func transferAsset (aE,aD,aF) = if (aB(az))
339+ then $Tuple2([ScriptTransfer(Address(aE), aD, aF)], aD)
340+ else $Tuple2(nil, unit)
341+
342+
343+
344+@Callable(az)
345+func transferWaves (aE,aD) = if (aB(az))
346+ then $Tuple2([ScriptTransfer(Address(aE), aD, unit)], aD)
347+ else $Tuple2(nil, unit)
348+
349+
350+
351+@Callable(az)
352+func transferFromProxyTreasury (aG,aH) = if (aB(az))
353+ then $Tuple2(nil, invoke(ah, "transferWaves", [aG, aH], nil))
354+ else $Tuple2(nil, unit)
355+
356+
357+
358+@Callable(az)
359+func finalize (aI,aJ,aK) = $Tuple2(nil, reentrantInvoke(af, "finalize", [az.caller.bytes, aI, aJ, aK], az.payments))
360+
361+
362+
363+@Callable(az)
364+func claimLP () = $Tuple2(nil, reentrantInvoke(af, "claimLP", [az.caller.bytes], az.payments))
365+
366+
367+
368+@Callable(az)
369+func claimWaves (aL) = $Tuple2(nil, reentrantInvoke(af, "claimWaves", [az.caller.bytes, fromBase58String(aL)], az.payments))
370+
371+
372+
373+@Callable(az)
374+func invest () = $Tuple2(nil, reentrantInvoke(af, "invest", [az.caller.bytes], az.payments))
375+
376+
377+
378+@Callable(az)
379+func withdraw () = $Tuple2(nil, reentrantInvoke(af, "withdraw", [az.caller.bytes], az.payments))
380+
381+
382+
383+@Callable(az)
384+func cancelWithdraw (aL) = $Tuple2(nil, reentrantInvoke(af, "cancelWithdraw", [az.caller.bytes, fromBase58String(aL)], az.payments))
385+
386+
387+
388+@Callable(az)
389+func processBlocks () = $Tuple2(nil, reentrantInvoke(af, "processBlocks", [az.caller.bytes], az.payments))
390+
391+
392+
393+@Callable(az)
394+func voteForTxId (j) = {
395+ let S = toBase58String(az.caller.bytes)
396+ let B = i(j)
397+ let z = [StringEntry(o(), j)]
398+ let aM = getString(this, o())
399+ let W = [if ((size(fromBase58String(j)) == h))
400+ then true
401+ else e((j + " is not valid txId")), if (if ((aM == unit))
402+ then true
403+ else (value(aM) != j))
404+ then true
405+ else e((j + " is already allowed"))]
406+ if ((W == W))
407+ then R(S, B, g, z)
358408 else throw("Strict value is not equal to itself.")
359409 }
360410
361411
362-
363-@Callable(ah)
364-func invest (aw) = {
365- let ax = aj(ah)
366- if ((ax == ax))
367- then {
368- let x = Address(aw)
369- let aE = valueOrErrorMessage(getInteger(U, z()), g("invalid period"))
370- let aH = valueOrErrorMessage(getInteger(U, A(aE)), g("invalid price"))
371- let bm = if ((size(ah.payments) == 1))
372- then ah.payments[0]
373- else i("invalid payments")
374- let bn = if (if ((bm.assetId == unit))
375- then (bm.amount > 0)
376- else false)
377- then $Tuple2(bm.amount, bm.assetId)
378- else i("invalid payment amount")
379- let bi = bn._1
380- let bj = bn._2
381- let N = if ((aH > 0))
382- then fraction(bi, c, aH)
383- else 0
384- let bo = valueOrElse(getInteger(U, u(unit)), 0)
385- let bl = [ScriptTransfer(ac, bi, bj)]
386- let aA = [invoke(U, "integerEntry", [u(unit), (bo + bi)], nil), invoke(U, "reissue", [N], nil), invoke(U, "transferAsset", [aw, N, Y], nil)]
387- $Tuple2(bl, aA)
388- }
389- else throw("Strict value is not equal to itself.")
390- }
391-
392-
393-
394-@Callable(ah)
395-func withdraw (aw) = {
396- let ax = aj(ah)
397- if ((ax == ax))
398- then {
399- let x = Address(aw)
400- let aE = valueOrErrorMessage(getInteger(U, z()), g("invalid period"))
401- let bm = if ((size(ah.payments) == 1))
402- then ah.payments[0]
403- else i(g("invalid payments"))
404- let bj = if ((bm.assetId == Y))
405- then Y
406- else i("invalid payment asset")
407- let bi = if ((bm.amount > 0))
408- then bm.amount
409- else i("invalid payment amount")
410- let bp = valueOrElse(getInteger(U, I()), 0)
411- let bl = [ScriptTransfer(U, bi, bj)]
412- let aA = [invoke(U, "integerEntry", [I(), (bp + bi)], nil), invoke(U, "stringEntry", [J(x, ah.transactionId), L(d, bi, (aE + 1), unit)], nil)]
413- if ((aA == aA))
414- then $Tuple2(bl, aA)
415- else throw("Strict value is not equal to itself.")
416- }
417- else throw("Strict value is not equal to itself.")
418- }
419-
420-
421-
422-@Callable(ah)
423-func cancelWithdraw (aw,K) = {
424- let ax = aj(ah)
425- if ((ax == ax))
426- then {
427- let x = Address(aw)
428- let bq = valueOrErrorMessage(getString(U, J(x, K)), g("invalid withdrawal request"))
429- let aE = valueOrErrorMessage(getInteger(U, z()), g("invalid period"))
430- let br = R(bq)
431- let M = br._1
432- let N = br._2
433- let O = br._3
434- let P = br._4
435- let aK = [if ((M == d))
436- then true
437- else i("invalid withdrawal request status"), if ((O > aE))
438- then true
439- else i("invalid withdrawal request period")]
440- if ((aK == aK))
441- then {
442- let bp = valueOrErrorMessage(getInteger(U, I()), g("invalid total withdrawal amount"))
443- let aA = [invoke(U, "integerEntry", [I(), if ((bp >= N))
444- then (bp - N)
445- else i("invalid withdrawal amount")], nil), invoke(U, "deleteEntry", [J(x, K)], nil), invoke(U, "transferAsset", [aw, N, Y], nil)]
446- if ((aA == aA))
447- then $Tuple2(nil, aA)
448- else throw("Strict value is not equal to itself.")
449- }
450- else throw("Strict value is not equal to itself.")
451- }
452- else throw("Strict value is not equal to itself.")
453- }
454-
455-
456-
457-@Callable(ah)
458-func claimWaves (aw,K) = {
459- let ax = aj(ah)
460- if ((ax == ax))
461- then {
462- let x = Address(aw)
463- let aE = valueOrErrorMessage(getInteger(U, z()), g("invalid period"))
464- let bq = valueOrErrorMessage(getString(U, J(x, K)), g("invalid withdrawal request"))
465- let bs = R(bq)
466- let M = bs._1
467- let N = bs._2
468- let O = bs._3
469- let P = bs._4
470- if ((M == e))
471- then i("invalid withdrawal request status")
472- else if ((O > aE))
473- then i("invalid withdrawal request period")
474- else {
475- let bt = valueOrErrorMessage(getInteger(U, A(O)), g("invalid price"))
476- let bu = if ((bt > 0))
477- then fraction(N, bt, c)
478- else 0
479- let aA = [invoke(U, "stringEntry", [J(x, K), L(e, N, O, ah.transactionId)], nil), invoke(U, "transferWaves", [aw, bu], nil)]
480- $Tuple2(nil, aA)
481- }
482- }
483- else throw("Strict value is not equal to itself.")
484- }
485-
486-
487-
488-@Callable(ah)
489-func processBlocks (aw) = {
490- let ax = aj(ah)
491- if ((ax == ax))
492- then {
493- let x = Address(aw)
494- let aE = valueOrErrorMessage(getInteger(U, z()), g("invalid period"))
495- let aF = valueOrErrorMessage(getInteger(U, D()), g("invalid period length"))
496- let aG = valueOrErrorMessage(getInteger(U, C(aE)), g("invalid start height"))
497- let aH = valueOrErrorMessage(getInteger(U, A(aE)), g("invalid price"))
498- let aI = valueOrErrorMessage(getInteger(U, F()), g("invalid next block to process"))
499- let aJ = ((aG + aF) - 1)
500- let bv = 40
501- let bw = if (if (if ((height >= aI))
502- then if ((aI >= aG))
503- then true
504- else (aE == 0)
505- else false)
506- then (aJ >= aI)
507- else false)
508- then min([((aJ - aI) + 1), bv])
509- else i(g("invalid target block"))
510- let bx = valueOrErrorMessage(getInteger(U, E()), g("invalid block processing reward"))
511- let by = (bx / bw)
512- let bz = (bx - (by * bw))
513- func bA (bB,bC) = if ((bC >= bw))
514- then bB
515- else {
516- let bD = (aI + bC)
517- let bE = valueOrErrorMessage(blockInfoByHeight(bD), g("invalid block info"))
518- let bF = valueOrErrorMessage(ak(bE.rewards, aa), g(("invalid treasury reward for height " + toString(bD))))
519- let bG = bE.generator
520- let ay = valueOrElse(getInteger(U, w(bG)), 0)
521- let bH = if ((bC == (bw - 1)))
522- then (by + bz)
523- else by
524- let N = if ((aH > 0))
525- then fraction((bF - bH), c, aH)
526- else 0
527- let bI = [invoke(U, "stringEntry", [G(bD), makeString([toBase58String(ah.transactionId), toString(aE), toString(bG), toBase58String(aw), toString(bF), toString(bH), toString(N)], a)], nil), invoke(U, "integerEntry", [w(bG), (ay + N)], nil)]
528- if ((bI == bI))
529- then {
530- let bJ = bB
531- let bK = bJ._1
532- let bL = bJ._2
533- $Tuple2((bK + N), (bL + bF))
534- }
535- else throw("Strict value is not equal to itself.")
536- }
537-
538- let bM = [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]
539- let bN = {
540- let bO = bM
541- let bP = size(bO)
542- let bQ = $Tuple2(0, 0)
543- func bR (bS,bT) = if ((bT >= bP))
544- then bS
545- else bA(bS, bO[bT])
546-
547- func bU (bS,bT) = if ((bT >= bP))
548- then bS
549- else throw("List size exceeds 40")
550-
551- bU(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bR(bQ, 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)
412+@Verifier(aN)
413+func aO () = {
414+ let aP = {
415+ let t = ar
416+ if ($isInstanceOf(t, "Address"))
417+ then {
418+ let aQ = t
419+ valueOrElse(getBoolean(aQ, al(this, aN.id)), false)
552420 }
553- if ((bN == bN))
554- then {
555- let bV = bN._2
556- let bW = bN._1
557- let bX = (bV - bx)
558- let bo = valueOrElse(getInteger(U, u(unit)), 0)
559- let bl = [invoke(U, "reissue", [bW], nil), invoke(U, "integerEntry", [F(), (aI + bw)], nil), invoke(U, "transferFromProxyTreasury", [ac.bytes, bX], nil), invoke(U, "transferFromProxyTreasury", [aw, bx], nil), invoke(U, "integerEntry", [u(unit), (bo + bX)], nil)]
560- if ((bl == bl))
561- then $Tuple2(nil, unit)
562- else throw("Strict value is not equal to itself.")
563- }
564- else throw("Strict value is not equal to itself.")
565- }
566- else throw("Strict value is not equal to itself.")
567- }
568-
569-
570-@Verifier(bY)
571-func bZ () = {
572- let ca = {
573- let l = ad()
574- if ($isInstanceOf(l, "ByteVector"))
575- then {
576- let af = l
577- af
578- }
579- else bY.senderPublicKey
421+ else false
580422 }
581- sigVerify(bY.bodyBytes, bY.proofs[0], ca)
423+ let aR = (aN.id == fromBase58String(valueOrElse(getString(this, o()), "")))
424+ let aS = if ((size(s()) >= g))
425+ then false
426+ else sigVerify(aN.bodyBytes, aN.proofs[0], aN.senderPublicKey)
427+ if (if (aP)
428+ then true
429+ else aR)
430+ then true
431+ else aS
582432 }
583433

github/deemru/w8io/169f3d6 
79.43 ms