tx · FmL5cQAV3bZMxYNPbfDPzbJGCiv9yQ9ktyTGvN34yqqc 3N9wLKKtDBphos7U3xzsPqgvJJ5zPQEU6pV: -0.01300000 Waves 2023.07.06 11:33 [2653816] smart account 3N9wLKKtDBphos7U3xzsPqgvJJ5zPQEU6pV > SELF 0.00000000 Waves
{ "type": 13, "id": "FmL5cQAV3bZMxYNPbfDPzbJGCiv9yQ9ktyTGvN34yqqc", "fee": 1300000, "feeAssetId": null, "timestamp": 1688632475379, "version": 1, "sender": "3N9wLKKtDBphos7U3xzsPqgvJJ5zPQEU6pV", "senderPublicKey": "GKX7DbVJVEtTB6ak3PXWHNPUhC3jym3ozbtZ7a36rGu6", "proofs": [ "MjVFUr9PVUxXubdME5V8nX71PFW6NJiQxBGpzXPTSDXNYicDbmN2S8K5UArd1jewG1zrr5xZRA4PaH4J1jp8jdo" ], "script": "base64:BgIKCAISBgoEAgEBASwAA1NFUAICX18ADUNPTlRSQUNUX05BTUUCD2NhbGN1bGF0b3IucmlkZQAGU0NBTEU4AIDC1y8AB1BFTkRJTkcCB1BFTkRJTkcACEZJTklTSEVEAghGSU5JU0hFRAAFV0FWRVMCBVdBVkVTAQd3cmFwRXJyAQFzCQCsAgIJAKwCAgUNQ09OVFJBQ1RfTkFNRQICOiAFAXMBCHRocm93RXJyAQFzCQACAQkBB3dyYXBFcnIBBQFzAQ9hc3NldElkVG9TdHJpbmcBB2Fzc2V0SWQEByRtYXRjaDAFB2Fzc2V0SWQDCQABAgUHJG1hdGNoMAIKQnl0ZVZlY3RvcgQBYgUHJG1hdGNoMAkA2AQBBQFiAwkAAQIFByRtYXRjaDACBFVuaXQFBVdBVkVTCQACAQILTWF0Y2ggZXJyb3IBA2FicwEBbgMJAGYCAAAFAW4JAQEtAQUBbgUBbgERa2V5RmFjdG9yeUFkZHJlc3MACQC5CQIJAMwIAgICJXMJAMwIAgIHZmFjdG9yeQUDbmlsBQNTRVABE2tleU1hbmFnZXJQdWJsaWNLZXkACQC5CQIJAMw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IGVxdWFsIHRvIGl0c2VsZi4AP8zHdw==", "chainId": 84, "height": 2653816, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5Zw1JHvQr7soHtAaHjxUzGsgXK43wpqmjjdvmAo6Yrwt Next: 8y5h7h4jri46Uv6RpTgxvj46iKWaEV7gEabD5pStNato Diff:
Old | New | Differences | |
---|---|---|---|
261 | 261 | let aC = valueOrElse(getInteger(V, u(unit)), 0) | |
262 | 262 | let aD = (aB + aC) | |
263 | 263 | let aE = (ay - aD) | |
264 | - | let aF = if ((aE >= az)) | |
264 | + | let aF = if (if ((aE >= az)) | |
265 | + | then true | |
266 | + | else (az == 0)) | |
265 | 267 | then az | |
266 | 268 | else i("power bonus is more than profit") | |
267 | 269 | let aG = (aE - aF) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
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 | 35 | func n (o) = if ((0 > o)) | |
36 | 36 | then -(o) | |
37 | 37 | else o | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func p () = makeString(["%s", "factory"], a) | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func q () = makeString(["%s", "managerPublicKey"], a) | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func r () = makeString(["%s", "lpAssetId"], a) | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func s () = makeString(["%s", "proxyTreasury"], a) | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func t () = makeString(["%s", "mainTreasury"], a) | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func u (k) = makeString(["%s%s", "invested", j(k)], a) | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func v (k) = makeString(["%s%s", "donated", j(k)], a) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func w (x) = makeString(["%s%s", "available", toString(x)], a) | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func y (x) = makeString(["%s%s", "claimed", toString(x)], a) | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func z () = makeString(["%s", "currentPeriod"], a) | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func A (B) = makeString(["%s%d", "price", toString(B)], a) | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func C (B) = makeString(["%s%d", "startHeight", toString(B)], a) | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func D (B) = makeString(["%s%d", "powerManagerBonus", toString(B)], a) | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func E () = "%s__periodLength" | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func F () = "%s__blockProcessingReward" | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func G () = "%s__nextBlockToProcess" | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func H (I) = makeString(["%s%d", "blockProcessed", toString(I)], a) | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func J () = "%s__withdrawal" | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func K (x,L) = makeString(["%s%s%s", "withdrawal", toString(x), toBase58String(L)], a) | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func M (N,O,P,Q) = { | |
98 | 98 | let R = { | |
99 | 99 | let l = Q | |
100 | 100 | if ($isInstanceOf(l, "ByteVector")) | |
101 | 101 | then { | |
102 | 102 | let m = l | |
103 | 103 | toBase58String(m) | |
104 | 104 | } | |
105 | 105 | else if ($isInstanceOf(l, "Unit")) | |
106 | 106 | then "SOON" | |
107 | 107 | else throw("Match error") | |
108 | 108 | } | |
109 | 109 | makeString(["%s%d%d%s", N, toString(O), toString(P), R], a) | |
110 | 110 | } | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func S (h) = { | |
114 | 114 | let T = split(h, a) | |
115 | 115 | if ((size(T) == 5)) | |
116 | 116 | then { | |
117 | 117 | let N = T[1] | |
118 | 118 | let O = valueOrErrorMessage(parseInt(T[2]), g("invalid lpAssetAmount")) | |
119 | 119 | let P = valueOrErrorMessage(parseInt(T[3]), g("invalid targetPeriod")) | |
120 | 120 | let Q = T[4] | |
121 | 121 | $Tuple4(N, O, P, Q) | |
122 | 122 | } | |
123 | 123 | else i("invalid withdrawal request value") | |
124 | 124 | } | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | let U = { | |
128 | 128 | let l = getString(this, p()) | |
129 | 129 | if ($isInstanceOf(l, "String")) | |
130 | 130 | then { | |
131 | 131 | let h = l | |
132 | 132 | addressFromString(h) | |
133 | 133 | } | |
134 | 134 | else if ($isInstanceOf(l, "Unit")) | |
135 | 135 | then unit | |
136 | 136 | else throw("Match error") | |
137 | 137 | } | |
138 | 138 | ||
139 | 139 | let V = valueOrErrorMessage(U, g("invalid factory address")) | |
140 | 140 | ||
141 | 141 | let W = { | |
142 | 142 | let l = U | |
143 | 143 | if ($isInstanceOf(l, "Address")) | |
144 | 144 | then { | |
145 | 145 | let X = l | |
146 | 146 | let Y = getString(X, r()) | |
147 | 147 | if ($isInstanceOf(Y, "String")) | |
148 | 148 | then { | |
149 | 149 | let h = Y | |
150 | 150 | fromBase58String(h) | |
151 | 151 | } | |
152 | 152 | else if ($isInstanceOf(Y, "Unit")) | |
153 | 153 | then unit | |
154 | 154 | else throw("Match error") | |
155 | 155 | } | |
156 | 156 | else if ($isInstanceOf(l, "Unit")) | |
157 | 157 | then unit | |
158 | 158 | else throw("Match error") | |
159 | 159 | } | |
160 | 160 | ||
161 | 161 | let Z = valueOrErrorMessage(W, g("invalid lpAssetId")) | |
162 | 162 | ||
163 | 163 | let aa = { | |
164 | 164 | let l = U | |
165 | 165 | if ($isInstanceOf(l, "Address")) | |
166 | 166 | then { | |
167 | 167 | let X = l | |
168 | 168 | let Y = getString(X, s()) | |
169 | 169 | if ($isInstanceOf(Y, "String")) | |
170 | 170 | then { | |
171 | 171 | let h = Y | |
172 | 172 | addressFromString(h) | |
173 | 173 | } | |
174 | 174 | else if ($isInstanceOf(Y, "Unit")) | |
175 | 175 | then unit | |
176 | 176 | else throw("Match error") | |
177 | 177 | } | |
178 | 178 | else if ($isInstanceOf(l, "Unit")) | |
179 | 179 | then unit | |
180 | 180 | else throw("Match error") | |
181 | 181 | } | |
182 | 182 | ||
183 | 183 | let ab = valueOrErrorMessage(aa, g("invalid proxy treasury address")) | |
184 | 184 | ||
185 | 185 | let ac = { | |
186 | 186 | let l = U | |
187 | 187 | if ($isInstanceOf(l, "Address")) | |
188 | 188 | then { | |
189 | 189 | let X = l | |
190 | 190 | let Y = getString(X, t()) | |
191 | 191 | if ($isInstanceOf(Y, "String")) | |
192 | 192 | then { | |
193 | 193 | let h = Y | |
194 | 194 | addressFromString(h) | |
195 | 195 | } | |
196 | 196 | else if ($isInstanceOf(Y, "Unit")) | |
197 | 197 | then unit | |
198 | 198 | else throw("Match error") | |
199 | 199 | } | |
200 | 200 | else if ($isInstanceOf(l, "Unit")) | |
201 | 201 | then unit | |
202 | 202 | else throw("Match error") | |
203 | 203 | } | |
204 | 204 | ||
205 | 205 | let ad = valueOrErrorMessage(ac, g("invalid main treasury address")) | |
206 | 206 | ||
207 | 207 | func ae () = { | |
208 | 208 | let l = U | |
209 | 209 | if ($isInstanceOf(l, "Address")) | |
210 | 210 | then { | |
211 | 211 | let af = l | |
212 | 212 | let Y = getString(af, q()) | |
213 | 213 | if ($isInstanceOf(Y, "String")) | |
214 | 214 | then { | |
215 | 215 | let ag = Y | |
216 | 216 | fromBase58String(ag) | |
217 | 217 | } | |
218 | 218 | else unit | |
219 | 219 | } | |
220 | 220 | else unit | |
221 | 221 | } | |
222 | 222 | ||
223 | 223 | ||
224 | 224 | func ah (ai,aj) = if ((ai.caller == aj)) | |
225 | 225 | then true | |
226 | 226 | else i("permission denied") | |
227 | 227 | ||
228 | 228 | ||
229 | 229 | func ak (ai) = ah(ai, V) | |
230 | 230 | ||
231 | 231 | ||
232 | 232 | func al (am,an) = { | |
233 | 233 | let h = size(am) | |
234 | 234 | let ao = am[0] | |
235 | 235 | let ap = ao._1 | |
236 | 236 | let aq = ao._2 | |
237 | 237 | let ar = am[1] | |
238 | 238 | let as = ar._1 | |
239 | 239 | let at = ar._2 | |
240 | 240 | let au = am[2] | |
241 | 241 | let av = au._1 | |
242 | 242 | let aw = au._2 | |
243 | 243 | if (if ((h > 0)) | |
244 | 244 | then (ap == an) | |
245 | 245 | else false) | |
246 | 246 | then aq | |
247 | 247 | else if (if ((h > 1)) | |
248 | 248 | then (as == an) | |
249 | 249 | else false) | |
250 | 250 | then at | |
251 | 251 | else if (if ((h > 2)) | |
252 | 252 | then (av == an) | |
253 | 253 | else false) | |
254 | 254 | then aw | |
255 | 255 | else unit | |
256 | 256 | } | |
257 | 257 | ||
258 | 258 | ||
259 | 259 | func ax (ay,az,aA) = { | |
260 | 260 | let aB = valueOrElse(getInteger(V, v(unit)), 0) | |
261 | 261 | let aC = valueOrElse(getInteger(V, u(unit)), 0) | |
262 | 262 | let aD = (aB + aC) | |
263 | 263 | let aE = (ay - aD) | |
264 | - | let aF = if ((aE >= az)) | |
264 | + | let aF = if (if ((aE >= az)) | |
265 | + | then true | |
266 | + | else (az == 0)) | |
265 | 267 | then az | |
266 | 268 | else i("power bonus is more than profit") | |
267 | 269 | let aG = (aE - aF) | |
268 | 270 | let aH = if ((aD > 0)) | |
269 | 271 | then fraction(aB, c, aD) | |
270 | 272 | else 0 | |
271 | 273 | let aI = fraction(aG, aH, c) | |
272 | 274 | let aJ = (aG - aI) | |
273 | 275 | let aK = n(aA) | |
274 | 276 | let aL = fraction(aJ, if ((0 > aA)) | |
275 | 277 | then aK | |
276 | 278 | else 0, c) | |
277 | 279 | let aM = fraction(aI, if ((aA > 0)) | |
278 | 280 | then aK | |
279 | 281 | else 0, c) | |
280 | 282 | let aN = ((aI - aM) + aL) | |
281 | 283 | let aO = ((aJ - aL) + aM) | |
282 | 284 | let aP = (aB + aN) | |
283 | 285 | let aQ = (aC + aO) | |
284 | 286 | let aR = min([0, aP]) | |
285 | 287 | let aS = min([0, aQ]) | |
286 | 288 | let aT = (max([0, aP]) + aS) | |
287 | 289 | let aU = (max([0, aQ]) + aR) | |
288 | 290 | let aV = valueOrErrorMessage(assetInfo(Z), g("invalid lpAsset info")).quantity | |
289 | 291 | let aW = fraction(aU, c, aV) | |
290 | 292 | let aX = if ((aW != 0)) | |
291 | 293 | then true | |
292 | 294 | else i("LP price cannot be 0") | |
293 | 295 | if ((aX == aX)) | |
294 | 296 | then { | |
295 | 297 | let aY = valueOrElse(getInteger(V, J()), 0) | |
296 | 298 | let aZ = max([0, fraction(aY, aW, c)]) | |
297 | 299 | let ba = (aU - aZ) | |
298 | 300 | let bb = (aV - aY) | |
299 | 301 | $Tuple6(aZ, ba, aT, aW, aY, bb) | |
300 | 302 | } | |
301 | 303 | else throw("Strict value is not equal to itself.") | |
302 | 304 | } | |
303 | 305 | ||
304 | 306 | ||
305 | 307 | @Callable(ai) | |
306 | 308 | func finalize (bc,ay,az,aA) = { | |
307 | 309 | let bd = ak(ai) | |
308 | 310 | if ((bd == bd)) | |
309 | 311 | then { | |
310 | 312 | let be = valueOrErrorMessage(getInteger(V, z()), g("invalid period")) | |
311 | 313 | let bf = valueOrErrorMessage(getInteger(V, E()), g("invalid period length")) | |
312 | 314 | let bg = valueOrErrorMessage(getInteger(V, C(be)), g("invalid start height")) | |
313 | 315 | let bh = valueOrErrorMessage(getInteger(V, A(be)), g("invalid price")) | |
314 | 316 | let bi = valueOrErrorMessage(getInteger(V, G()), g("invalid next block to process")) | |
315 | 317 | let bj = ((bg + bf) - 1) | |
316 | 318 | let bk = [if ((ai.originCaller == ad)) | |
317 | 319 | then true | |
318 | 320 | else i("permission denied"), if ((bi > bj)) | |
319 | 321 | then true | |
320 | 322 | else i("unprocessed blocks"), if ((ay >= 0)) | |
321 | 323 | then true | |
322 | 324 | else i("invalid new treasury volume"), if ((az >= 0)) | |
323 | 325 | then true | |
324 | 326 | else i("invalid PWR managers bonus"), if (if ((aA >= -(c))) | |
325 | 327 | then (c >= aA) | |
326 | 328 | else false) | |
327 | 329 | then true | |
328 | 330 | else i("invalid treasury volume diff allocation coefficient")] | |
329 | 331 | if ((bk == bk)) | |
330 | 332 | then { | |
331 | 333 | let aB = valueOrElse(getInteger(V, v(unit)), 0) | |
332 | 334 | let aC = valueOrElse(getInteger(V, u(unit)), 0) | |
333 | 335 | let aD = (aB + aC) | |
334 | 336 | let aE = (ay - aD) | |
335 | 337 | let aF = if (if ((aE > 0)) | |
336 | 338 | then (aE >= az) | |
337 | 339 | else false) | |
338 | 340 | then az | |
339 | 341 | else i("power bonus is more than profit") | |
340 | 342 | let aG = (aE - aF) | |
341 | 343 | let aH = if ((aD > 0)) | |
342 | 344 | then fraction(aB, c, aD) | |
343 | 345 | else 0 | |
344 | 346 | let aI = fraction(aG, aH, c) | |
345 | 347 | let aJ = (aG - aI) | |
346 | 348 | let aK = n(aA) | |
347 | 349 | let aL = fraction(aJ, if ((0 > aA)) | |
348 | 350 | then aK | |
349 | 351 | else 0, c) | |
350 | 352 | let aM = fraction(aI, if ((aA > 0)) | |
351 | 353 | then aK | |
352 | 354 | else 0, c) | |
353 | 355 | let aN = ((aI - aM) + aL) | |
354 | 356 | let aO = ((aJ - aL) + aM) | |
355 | 357 | let aP = (aB + aN) | |
356 | 358 | let aQ = (aC + aO) | |
357 | 359 | let aR = min([0, aP]) | |
358 | 360 | let aS = min([0, aQ]) | |
359 | 361 | let aT = (max([0, aP]) + aS) | |
360 | 362 | let aU = (max([0, aQ]) + aR) | |
361 | 363 | let bl = (be + 1) | |
362 | 364 | let aV = valueOrErrorMessage(assetInfo(Z), g("invalid lpAsset info")).quantity | |
363 | 365 | let aW = fraction(aU, c, aV) | |
364 | 366 | let aX = if ((aW != 0)) | |
365 | 367 | then true | |
366 | 368 | else i("LP price cannot be 0") | |
367 | 369 | if ((aX == aX)) | |
368 | 370 | then { | |
369 | 371 | let aY = valueOrElse(getInteger(V, J()), 0) | |
370 | 372 | let aZ = max([0, fraction(aY, aW, c)]) | |
371 | 373 | let bm = if ((size(ai.payments) > 0)) | |
372 | 374 | then ai.payments[0] | |
373 | 375 | else unit | |
374 | 376 | let bn = value(bm).amount | |
375 | 377 | let bo = value(bm).assetId | |
376 | 378 | let bp = if (if ((aZ == 0)) | |
377 | 379 | then true | |
378 | 380 | else if (if ((bm != unit)) | |
379 | 381 | then (bo == unit) | |
380 | 382 | else false) | |
381 | 383 | then (bn >= aZ) | |
382 | 384 | else false) | |
383 | 385 | then true | |
384 | 386 | else i(("invalid payments, payment amount min: " + toString(aZ))) | |
385 | 387 | if ((bp == bp)) | |
386 | 388 | then { | |
387 | 389 | let bq = if ((bm != unit)) | |
388 | 390 | then [ScriptTransfer(V, bn, bo)] | |
389 | 391 | else nil | |
390 | 392 | let br = [invoke(V, "integerEntry", [D(be), aF], nil), invoke(V, "integerEntry", [z(), bl], nil), invoke(V, "integerEntry", [A(bl), aW], nil), invoke(V, "integerEntry", [C(bl), (bj + 1)], nil), invoke(V, "burn", [aY], nil), invoke(V, "integerEntry", [J(), 0], nil), invoke(V, "integerEntry", [u(unit), (aU - aZ)], nil), invoke(V, "integerEntry", [v(unit), aT], nil)] | |
391 | 393 | $Tuple2(bq, br) | |
392 | 394 | } | |
393 | 395 | else throw("Strict value is not equal to itself.") | |
394 | 396 | } | |
395 | 397 | else throw("Strict value is not equal to itself.") | |
396 | 398 | } | |
397 | 399 | else throw("Strict value is not equal to itself.") | |
398 | 400 | } | |
399 | 401 | else throw("Strict value is not equal to itself.") | |
400 | 402 | } | |
401 | 403 | ||
402 | 404 |
github/deemru/w8io/026f985 43.16 ms ◑