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