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:BgIKCAISBgoEAgEBASwAA1NFUAICX18ADUNPTlRSQUNUX05BTUUCD2NhbGN1bGF0b3IucmlkZQAGU0NBTEU4AIDC1y8AB1BFTkRJTkcCB1BFTkRJTkcACEZJTklTSEVEAghGSU5JU0hFRAAFV0FWRVMCBVdBVkVTAQd3cmFwRXJyAQFzCQCsAgIJAKwCAgUNQ09OVFJBQ1RfTkFNRQICOiAFAXMBCHRocm93RXJyAQFzCQACAQkBB3dyYXBFcnIBBQFzAQ9hc3NldElkVG9TdHJpbmcBB2Fzc2V0SWQEByRtYXRjaDAFB2Fzc2V0SWQDCQABAgUHJG1hdGNoMAIKQnl0ZVZlY3RvcgQBYgUHJG1hdGNoMAkA2AQBBQFiAwkAAQIFByRtYXRjaDACBFVuaXQFBVdBVkVTCQACAQILTWF0Y2ggZXJyb3IBA2FicwEBbgMJAGYCAAAFAW4JAQEtAQUBbgUBbgERa2V5RmFjdG9yeUFkZHJlc3MACQC5CQIJAMwIAgICJXMJAMwIAgIHZmFjdG9yeQUDbmlsBQNTRVABE2tleU1hbmFnZXJQdWJsaWNLZXkACQC5CQIJAM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90IGVxdWFsIHRvIGl0c2VsZi4AP8zHdw==", "chainId": 84, "height": 2653816, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5Zw1JHvQr7soHtAaHjxUzGsgXK43wpqmjjdvmAo6Yrwt Next: 8y5h7h4jri46Uv6RpTgxvj46iKWaEV7gEabD5pStNato Diff:
OldNewDifferences
261261 let aC = valueOrElse(getInteger(V, u(unit)), 0)
262262 let aD = (aB + aC)
263263 let aE = (ay - aD)
264- let aF = if ((aE >= az))
264+ let aF = if (if ((aE >= az))
265+ then true
266+ else (az == 0))
265267 then az
266268 else i("power bonus is more than profit")
267269 let aG = (aE - aF)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "__"
55
66 let b = "calculator.ride"
77
88 let c = 100000000
99
1010 let d = "PENDING"
1111
1212 let e = "FINISHED"
1313
1414 let f = "WAVES"
1515
1616 func g (h) = ((b + ": ") + h)
1717
1818
1919 func i (h) = throw(g(h))
2020
2121
2222 func j (k) = {
2323 let l = k
2424 if ($isInstanceOf(l, "ByteVector"))
2525 then {
2626 let m = l
2727 toBase58String(m)
2828 }
2929 else if ($isInstanceOf(l, "Unit"))
3030 then f
3131 else throw("Match error")
3232 }
3333
3434
3535 func n (o) = if ((0 > o))
3636 then -(o)
3737 else o
3838
3939
4040 func p () = makeString(["%s", "factory"], a)
4141
4242
4343 func q () = makeString(["%s", "managerPublicKey"], a)
4444
4545
4646 func r () = makeString(["%s", "lpAssetId"], a)
4747
4848
4949 func s () = makeString(["%s", "proxyTreasury"], a)
5050
5151
5252 func t () = makeString(["%s", "mainTreasury"], a)
5353
5454
5555 func u (k) = makeString(["%s%s", "invested", j(k)], a)
5656
5757
5858 func v (k) = makeString(["%s%s", "donated", j(k)], a)
5959
6060
6161 func w (x) = makeString(["%s%s", "available", toString(x)], a)
6262
6363
6464 func y (x) = makeString(["%s%s", "claimed", toString(x)], a)
6565
6666
6767 func z () = makeString(["%s", "currentPeriod"], a)
6868
6969
7070 func A (B) = makeString(["%s%d", "price", toString(B)], a)
7171
7272
7373 func C (B) = makeString(["%s%d", "startHeight", toString(B)], a)
7474
7575
7676 func D (B) = makeString(["%s%d", "powerManagerBonus", toString(B)], a)
7777
7878
7979 func E () = "%s__periodLength"
8080
8181
8282 func F () = "%s__blockProcessingReward"
8383
8484
8585 func G () = "%s__nextBlockToProcess"
8686
8787
8888 func H (I) = makeString(["%s%d", "blockProcessed", toString(I)], a)
8989
9090
9191 func J () = "%s__withdrawal"
9292
9393
9494 func K (x,L) = makeString(["%s%s%s", "withdrawal", toString(x), toBase58String(L)], a)
9595
9696
9797 func M (N,O,P,Q) = {
9898 let R = {
9999 let l = Q
100100 if ($isInstanceOf(l, "ByteVector"))
101101 then {
102102 let m = l
103103 toBase58String(m)
104104 }
105105 else if ($isInstanceOf(l, "Unit"))
106106 then "SOON"
107107 else throw("Match error")
108108 }
109109 makeString(["%s%d%d%s", N, toString(O), toString(P), R], a)
110110 }
111111
112112
113113 func S (h) = {
114114 let T = split(h, a)
115115 if ((size(T) == 5))
116116 then {
117117 let N = T[1]
118118 let O = valueOrErrorMessage(parseInt(T[2]), g("invalid lpAssetAmount"))
119119 let P = valueOrErrorMessage(parseInt(T[3]), g("invalid targetPeriod"))
120120 let Q = T[4]
121121 $Tuple4(N, O, P, Q)
122122 }
123123 else i("invalid withdrawal request value")
124124 }
125125
126126
127127 let U = {
128128 let l = getString(this, p())
129129 if ($isInstanceOf(l, "String"))
130130 then {
131131 let h = l
132132 addressFromString(h)
133133 }
134134 else if ($isInstanceOf(l, "Unit"))
135135 then unit
136136 else throw("Match error")
137137 }
138138
139139 let V = valueOrErrorMessage(U, g("invalid factory address"))
140140
141141 let W = {
142142 let l = U
143143 if ($isInstanceOf(l, "Address"))
144144 then {
145145 let X = l
146146 let Y = getString(X, r())
147147 if ($isInstanceOf(Y, "String"))
148148 then {
149149 let h = Y
150150 fromBase58String(h)
151151 }
152152 else if ($isInstanceOf(Y, "Unit"))
153153 then unit
154154 else throw("Match error")
155155 }
156156 else if ($isInstanceOf(l, "Unit"))
157157 then unit
158158 else throw("Match error")
159159 }
160160
161161 let Z = valueOrErrorMessage(W, g("invalid lpAssetId"))
162162
163163 let aa = {
164164 let l = U
165165 if ($isInstanceOf(l, "Address"))
166166 then {
167167 let X = l
168168 let Y = getString(X, s())
169169 if ($isInstanceOf(Y, "String"))
170170 then {
171171 let h = Y
172172 addressFromString(h)
173173 }
174174 else if ($isInstanceOf(Y, "Unit"))
175175 then unit
176176 else throw("Match error")
177177 }
178178 else if ($isInstanceOf(l, "Unit"))
179179 then unit
180180 else throw("Match error")
181181 }
182182
183183 let ab = valueOrErrorMessage(aa, g("invalid proxy treasury address"))
184184
185185 let ac = {
186186 let l = U
187187 if ($isInstanceOf(l, "Address"))
188188 then {
189189 let X = l
190190 let Y = getString(X, t())
191191 if ($isInstanceOf(Y, "String"))
192192 then {
193193 let h = Y
194194 addressFromString(h)
195195 }
196196 else if ($isInstanceOf(Y, "Unit"))
197197 then unit
198198 else throw("Match error")
199199 }
200200 else if ($isInstanceOf(l, "Unit"))
201201 then unit
202202 else throw("Match error")
203203 }
204204
205205 let ad = valueOrErrorMessage(ac, g("invalid main treasury address"))
206206
207207 func ae () = {
208208 let l = U
209209 if ($isInstanceOf(l, "Address"))
210210 then {
211211 let af = l
212212 let Y = getString(af, q())
213213 if ($isInstanceOf(Y, "String"))
214214 then {
215215 let ag = Y
216216 fromBase58String(ag)
217217 }
218218 else unit
219219 }
220220 else unit
221221 }
222222
223223
224224 func ah (ai,aj) = if ((ai.caller == aj))
225225 then true
226226 else i("permission denied")
227227
228228
229229 func ak (ai) = ah(ai, V)
230230
231231
232232 func al (am,an) = {
233233 let h = size(am)
234234 let ao = am[0]
235235 let ap = ao._1
236236 let aq = ao._2
237237 let ar = am[1]
238238 let as = ar._1
239239 let at = ar._2
240240 let au = am[2]
241241 let av = au._1
242242 let aw = au._2
243243 if (if ((h > 0))
244244 then (ap == an)
245245 else false)
246246 then aq
247247 else if (if ((h > 1))
248248 then (as == an)
249249 else false)
250250 then at
251251 else if (if ((h > 2))
252252 then (av == an)
253253 else false)
254254 then aw
255255 else unit
256256 }
257257
258258
259259 func ax (ay,az,aA) = {
260260 let aB = valueOrElse(getInteger(V, v(unit)), 0)
261261 let aC = valueOrElse(getInteger(V, u(unit)), 0)
262262 let aD = (aB + aC)
263263 let aE = (ay - aD)
264- let aF = if ((aE >= az))
264+ let aF = if (if ((aE >= az))
265+ then true
266+ else (az == 0))
265267 then az
266268 else i("power bonus is more than profit")
267269 let aG = (aE - aF)
268270 let aH = if ((aD > 0))
269271 then fraction(aB, c, aD)
270272 else 0
271273 let aI = fraction(aG, aH, c)
272274 let aJ = (aG - aI)
273275 let aK = n(aA)
274276 let aL = fraction(aJ, if ((0 > aA))
275277 then aK
276278 else 0, c)
277279 let aM = fraction(aI, if ((aA > 0))
278280 then aK
279281 else 0, c)
280282 let aN = ((aI - aM) + aL)
281283 let aO = ((aJ - aL) + aM)
282284 let aP = (aB + aN)
283285 let aQ = (aC + aO)
284286 let aR = min([0, aP])
285287 let aS = min([0, aQ])
286288 let aT = (max([0, aP]) + aS)
287289 let aU = (max([0, aQ]) + aR)
288290 let aV = valueOrErrorMessage(assetInfo(Z), g("invalid lpAsset info")).quantity
289291 let aW = fraction(aU, c, aV)
290292 let aX = if ((aW != 0))
291293 then true
292294 else i("LP price cannot be 0")
293295 if ((aX == aX))
294296 then {
295297 let aY = valueOrElse(getInteger(V, J()), 0)
296298 let aZ = max([0, fraction(aY, aW, c)])
297299 let ba = (aU - aZ)
298300 let bb = (aV - aY)
299301 $Tuple6(aZ, ba, aT, aW, aY, bb)
300302 }
301303 else throw("Strict value is not equal to itself.")
302304 }
303305
304306
305307 @Callable(ai)
306308 func finalize (bc,ay,az,aA) = {
307309 let bd = ak(ai)
308310 if ((bd == bd))
309311 then {
310312 let be = valueOrErrorMessage(getInteger(V, z()), g("invalid period"))
311313 let bf = valueOrErrorMessage(getInteger(V, E()), g("invalid period length"))
312314 let bg = valueOrErrorMessage(getInteger(V, C(be)), g("invalid start height"))
313315 let bh = valueOrErrorMessage(getInteger(V, A(be)), g("invalid price"))
314316 let bi = valueOrErrorMessage(getInteger(V, G()), g("invalid next block to process"))
315317 let bj = ((bg + bf) - 1)
316318 let bk = [if ((ai.originCaller == ad))
317319 then true
318320 else i("permission denied"), if ((bi > bj))
319321 then true
320322 else i("unprocessed blocks"), if ((ay >= 0))
321323 then true
322324 else i("invalid new treasury volume"), if ((az >= 0))
323325 then true
324326 else i("invalid PWR managers bonus"), if (if ((aA >= -(c)))
325327 then (c >= aA)
326328 else false)
327329 then true
328330 else i("invalid treasury volume diff allocation coefficient")]
329331 if ((bk == bk))
330332 then {
331333 let aB = valueOrElse(getInteger(V, v(unit)), 0)
332334 let aC = valueOrElse(getInteger(V, u(unit)), 0)
333335 let aD = (aB + aC)
334336 let aE = (ay - aD)
335337 let aF = if (if ((aE > 0))
336338 then (aE >= az)
337339 else false)
338340 then az
339341 else i("power bonus is more than profit")
340342 let aG = (aE - aF)
341343 let aH = if ((aD > 0))
342344 then fraction(aB, c, aD)
343345 else 0
344346 let aI = fraction(aG, aH, c)
345347 let aJ = (aG - aI)
346348 let aK = n(aA)
347349 let aL = fraction(aJ, if ((0 > aA))
348350 then aK
349351 else 0, c)
350352 let aM = fraction(aI, if ((aA > 0))
351353 then aK
352354 else 0, c)
353355 let aN = ((aI - aM) + aL)
354356 let aO = ((aJ - aL) + aM)
355357 let aP = (aB + aN)
356358 let aQ = (aC + aO)
357359 let aR = min([0, aP])
358360 let aS = min([0, aQ])
359361 let aT = (max([0, aP]) + aS)
360362 let aU = (max([0, aQ]) + aR)
361363 let bl = (be + 1)
362364 let aV = valueOrErrorMessage(assetInfo(Z), g("invalid lpAsset info")).quantity
363365 let aW = fraction(aU, c, aV)
364366 let aX = if ((aW != 0))
365367 then true
366368 else i("LP price cannot be 0")
367369 if ((aX == aX))
368370 then {
369371 let aY = valueOrElse(getInteger(V, J()), 0)
370372 let aZ = max([0, fraction(aY, aW, c)])
371373 let bm = if ((size(ai.payments) > 0))
372374 then ai.payments[0]
373375 else unit
374376 let bn = value(bm).amount
375377 let bo = value(bm).assetId
376378 let bp = if (if ((aZ == 0))
377379 then true
378380 else if (if ((bm != unit))
379381 then (bo == unit)
380382 else false)
381383 then (bn >= aZ)
382384 else false)
383385 then true
384386 else i(("invalid payments, payment amount min: " + toString(aZ)))
385387 if ((bp == bp))
386388 then {
387389 let bq = if ((bm != unit))
388390 then [ScriptTransfer(V, bn, bo)]
389391 else nil
390392 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)]
391393 $Tuple2(bq, br)
392394 }
393395 else throw("Strict value is not equal to itself.")
394396 }
395397 else throw("Strict value is not equal to itself.")
396398 }
397399 else throw("Strict value is not equal to itself.")
398400 }
399401 else throw("Strict value is not equal to itself.")
400402 }
401403
402404

github/deemru/w8io/026f985 
43.16 ms