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