tx · 8inYyrQ7YNsXYVw5Y7roXdyqcdGDDtH9bfkWwg3tbToT 3N6HSS7Toat1RhyEsyqVGgVSRzH19W1FTbP: -0.01200000 Waves 2023.06.08 11:18 [2613442] smart account 3N6HSS7Toat1RhyEsyqVGgVSRzH19W1FTbP > SELF 0.00000000 Waves
{ "type": 13, "id": "8inYyrQ7YNsXYVw5Y7roXdyqcdGDDtH9bfkWwg3tbToT", "fee": 1200000, "feeAssetId": null, "timestamp": 1686212347212, "version": 2, "chainId": 84, "sender": "3N6HSS7Toat1RhyEsyqVGgVSRzH19W1FTbP", "senderPublicKey": "AoKo4segKHU4DeJnxXQYJj2u7J6XJeux6r8KLW52cd2Q", "proofs": [ "uv6TyjKqg2PLDn6Bv6s1udE3faFu6iEnP6DgYYn3YZhTUCnw8q68XFAwbLjZ5xBWxijJXa8xRUByRoFYDDaau9m" ], "script": "base64:BwIqCAISAwoBAhIGCgQBAQEBEgMKAQISAwoBAhIECgICAhIECgICAhIDCgECHgADU0VQAgJfXwANQ09OVFJBQ1RfTkFNRQIPY2FsY3VsYXRvci5yaWRlAAZTQ0FMRTgAgMLXLwAHUEVORElORwIHUEVORElORwAIRklOSVNIRUQCCEZJTklTSEVEAQd3cmFwRXJyAQFzCQCsAgIJAKwCAgUNQ09OVFJBQ1RfTkFNRQICOiAFAXMBCHRocm93RXJyAQFzCQACAQkBB3dyYXBFcnIBBQFzARFrZXlGYWN0b3J5QWRkcmVzcwAJALkJAgkAzAgCAgIlcwkAzAgCAgdmYWN0b3J5BQNuaWwFA1NFUAEMa2V5THBBc3NldElkAAkAuQkCCQDMCAICAiVzCQDMCAICCWxwQXNzZXRJZAUDbmlsBQNTRVABEmtleVRyZWFzdXJ5QWRkcmVzcwAJALkJAgkAzAgCAgIlcwkAzAgCAgh0cmVhc3VyeQUDbmlsBQNTRVABDGtleUF2YWlsYWJsZQELdXNlckFkZHJlc3MJALkJAgkAzAgCAgQlcyVzCQDMCAICCWF2YWlsYWJsZQkAzAgCCQCl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5QXZhaWxhYmxlAQULdXNlckFkZHJlc3MJAMwIAgUJYXZhaWxhYmxlBQNuaWwFA25pbAkAzAgCCQD8BwQFFGZhY3RvcnlBZGRyZXNzT3JGYWlsAg10cmFuc2ZlcldhdmVzCQDMCAIFEHVzZXJBZGRyZXNzQnl0ZXMJAMwIAgUbYmxvY2tQcm9jZXNzaW5nUmV3YXJkT3JGYWlsBQNuaWwFA25pbAUDbmlsCQCUCgIFA25pbAUOZmFjdG9yeUFjdGlvbnMJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5KkGWBg==", "height": 2613442, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 2PD7rtQ7L9ZWAiuZVytVyyhqVf9Msn4XDWYpG22fdctW Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 7 #-} | |
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 | + | func f (g) = ((b + ": ") + g) | |
15 | + | ||
16 | + | ||
17 | + | func h (g) = throw(f(g)) | |
18 | + | ||
19 | + | ||
20 | + | func i () = makeString(["%s", "factory"], a) | |
21 | + | ||
22 | + | ||
23 | + | func j () = makeString(["%s", "lpAssetId"], a) | |
24 | + | ||
25 | + | ||
26 | + | func k () = makeString(["%s", "treasury"], a) | |
27 | + | ||
28 | + | ||
29 | + | func l (m) = makeString(["%s%s", "available", toString(m)], a) | |
30 | + | ||
31 | + | ||
32 | + | func n (m) = makeString(["%s%s", "claimed", toString(m)], a) | |
33 | + | ||
34 | + | ||
35 | + | func o () = makeString(["%s", "currentPeriod"], a) | |
36 | + | ||
37 | + | ||
38 | + | func p (q) = makeString(["%s%d", "price", toString(q)], a) | |
39 | + | ||
40 | + | ||
41 | + | func r (q) = makeString(["%s%d", "startHeight", toString(q)], a) | |
42 | + | ||
43 | + | ||
44 | + | func s () = "%s__periodLength" | |
45 | + | ||
46 | + | ||
47 | + | func t () = "%s__blockProcessingReward" | |
48 | + | ||
49 | + | ||
50 | + | func u () = "%s__nextBlockToProcess" | |
51 | + | ||
52 | + | ||
53 | + | func v (m,w) = makeString(["%s%s%s", "withdrawal", toString(m), toBase58String(w)], a) | |
54 | + | ||
55 | + | ||
56 | + | func x (y,z,A,B) = { | |
57 | + | let C = { | |
58 | + | let D = B | |
59 | + | if ($isInstanceOf(D, "ByteVector")) | |
60 | + | then { | |
61 | + | let E = D | |
62 | + | toBase58String(E) | |
63 | + | } | |
64 | + | else if ($isInstanceOf(D, "Unit")) | |
65 | + | then "SOON" | |
66 | + | else throw("Match error") | |
67 | + | } | |
68 | + | makeString(["%s%d%d%s", y, toString(z), toString(A), C], a) | |
69 | + | } | |
70 | + | ||
71 | + | ||
72 | + | func F (g) = { | |
73 | + | let G = split(g, a) | |
74 | + | if ((size(G) == 5)) | |
75 | + | then { | |
76 | + | let y = G[1] | |
77 | + | let z = valueOrErrorMessage(parseInt(G[2]), f("invalid lpAssetAmount")) | |
78 | + | let A = valueOrErrorMessage(parseInt(G[3]), f("invalid targetPeriod")) | |
79 | + | let B = G[4] | |
80 | + | $Tuple4(y, z, A, B) | |
81 | + | } | |
82 | + | else h("invalid withdrawal request value") | |
83 | + | } | |
84 | + | ||
85 | + | ||
86 | + | let H = { | |
87 | + | let D = getString(this, i()) | |
88 | + | if ($isInstanceOf(D, "String")) | |
89 | + | then { | |
90 | + | let g = D | |
91 | + | addressFromString(g) | |
92 | + | } | |
93 | + | else if ($isInstanceOf(D, "Unit")) | |
94 | + | then unit | |
95 | + | else throw("Match error") | |
96 | + | } | |
97 | + | ||
98 | + | let I = valueOrErrorMessage(H, f("invalid factory address")) | |
99 | + | ||
100 | + | let J = { | |
101 | + | let D = H | |
102 | + | if ($isInstanceOf(D, "Address")) | |
103 | + | then { | |
104 | + | let K = D | |
105 | + | let L = getString(K, j()) | |
106 | + | if ($isInstanceOf(L, "String")) | |
107 | + | then { | |
108 | + | let g = L | |
109 | + | fromBase58String(g) | |
110 | + | } | |
111 | + | else if ($isInstanceOf(L, "Unit")) | |
112 | + | then unit | |
113 | + | else throw("Match error") | |
114 | + | } | |
115 | + | else if ($isInstanceOf(D, "Unit")) | |
116 | + | then unit | |
117 | + | else throw("Match error") | |
118 | + | } | |
119 | + | ||
120 | + | let M = valueOrErrorMessage(J, f("invalid lpAssetId")) | |
121 | + | ||
122 | + | let N = { | |
123 | + | let D = H | |
124 | + | if ($isInstanceOf(D, "Address")) | |
125 | + | then { | |
126 | + | let K = D | |
127 | + | let L = getString(K, k()) | |
128 | + | if ($isInstanceOf(L, "String")) | |
129 | + | then { | |
130 | + | let g = L | |
131 | + | addressFromString(g) | |
132 | + | } | |
133 | + | else if ($isInstanceOf(L, "Unit")) | |
134 | + | then unit | |
135 | + | else throw("Match error") | |
136 | + | } | |
137 | + | else if ($isInstanceOf(D, "Unit")) | |
138 | + | then unit | |
139 | + | else throw("Match error") | |
140 | + | } | |
141 | + | ||
142 | + | let O = valueOrErrorMessage(N, f("invalid treasury address")) | |
143 | + | ||
144 | + | func P (Q,R) = if ((Q.caller == R)) | |
145 | + | then true | |
146 | + | else h("permission denied") | |
147 | + | ||
148 | + | ||
149 | + | func S (Q) = P(Q, I) | |
150 | + | ||
151 | + | ||
152 | + | func T (U,V) = { | |
153 | + | let g = size(U) | |
154 | + | let W = U[0] | |
155 | + | let X = W._1 | |
156 | + | let Y = W._2 | |
157 | + | let Z = U[1] | |
158 | + | let aa = Z._1 | |
159 | + | let ab = Z._2 | |
160 | + | let ac = U[2] | |
161 | + | let ad = ac._1 | |
162 | + | let ae = ac._2 | |
163 | + | if (if ((g > 0)) | |
164 | + | then (X == V) | |
165 | + | else false) | |
166 | + | then Y | |
167 | + | else if (if ((g > 1)) | |
168 | + | then (aa == V) | |
169 | + | else false) | |
170 | + | then ab | |
171 | + | else if (if ((g > 2)) | |
172 | + | then (ad == V) | |
173 | + | else false) | |
174 | + | then ae | |
175 | + | else unit | |
176 | + | } | |
177 | + | ||
178 | + | ||
179 | + | @Callable(Q) | |
180 | + | func claimLP (af) = { | |
181 | + | let ag = S(Q) | |
182 | + | if ((ag == ag)) | |
183 | + | then { | |
184 | + | let m = Address(af) | |
185 | + | let ah = valueOrElse(getInteger(I, l(m)), 0) | |
186 | + | let ai = valueOrElse(getInteger(I, n(m)), 0) | |
187 | + | let aj = if ((ah > 0)) | |
188 | + | then [invoke(I, "transferAsset", [af, ah, M], nil), invoke(I, "integerEntry", [l(m), 0], nil), invoke(I, "stringEntry", [n(m), (ai + ah)], nil)] | |
189 | + | else nil | |
190 | + | $Tuple2(nil, aj) | |
191 | + | } | |
192 | + | else throw("Strict value is not equal to itself.") | |
193 | + | } | |
194 | + | ||
195 | + | ||
196 | + | ||
197 | + | @Callable(Q) | |
198 | + | func finalize (ak,al,am,an) = { | |
199 | + | let ao = [if ((Q.originCaller == I)) | |
200 | + | then true | |
201 | + | else h("permission denied"), if ((ak >= 0)) | |
202 | + | then true | |
203 | + | else h("invalid new treasury volume"), if ((al >= 0)) | |
204 | + | then true | |
205 | + | else h("invalid XTN price"), if (if ((am >= 0)) | |
206 | + | then (c >= am) | |
207 | + | else false) | |
208 | + | then true | |
209 | + | else h("invalid PWR managers bonus"), if (if ((an >= -(c))) | |
210 | + | then (c >= an) | |
211 | + | else false) | |
212 | + | then true | |
213 | + | else h("invalid treasury volume diff allocation coefficient")] | |
214 | + | if ((ao == ao)) | |
215 | + | then { | |
216 | + | let ap = valueOrErrorMessage(getInteger(I, o()), f("invalid period")) | |
217 | + | let aq = (ap + 1) | |
218 | + | let ar = c | |
219 | + | let as = 0 | |
220 | + | let aj = [invoke(I, "integerEntry", [o(), aq], nil), invoke(I, "integerEntry", [p(aq), ar], nil), invoke(I, "burn", [as], nil)] | |
221 | + | $Tuple2(nil, aj) | |
222 | + | } | |
223 | + | else throw("Strict value is not equal to itself.") | |
224 | + | } | |
225 | + | ||
226 | + | ||
227 | + | ||
228 | + | @Callable(Q) | |
229 | + | func invest (af) = { | |
230 | + | let ag = S(Q) | |
231 | + | if ((ag == ag)) | |
232 | + | then { | |
233 | + | let m = Address(af) | |
234 | + | let ap = valueOrErrorMessage(getInteger(I, o()), f("invalid period")) | |
235 | + | let at = valueOrErrorMessage(getInteger(I, p(ap)), f("invalid price")) | |
236 | + | let au = if ((size(Q.payments) == 1)) | |
237 | + | then Q.payments[0] | |
238 | + | else h("invalid payments") | |
239 | + | let av = if (if ((au.assetId == unit)) | |
240 | + | then (au.amount > 0) | |
241 | + | else false) | |
242 | + | then au.amount | |
243 | + | else h("invalid payment amount") | |
244 | + | let z = if ((at > 0)) | |
245 | + | then fraction(av, c, at) | |
246 | + | else 0 | |
247 | + | let aj = [invoke(I, "integerEntry", ["invested__WAVES", 0], nil), invoke(I, "reissue", [z], nil), invoke(I, "transferAsset", [af, z, M], nil), invoke(I, "transferWaves", [O.bytes, av], [AttachedPayment(unit, av)])] | |
248 | + | $Tuple2(nil, aj) | |
249 | + | } | |
250 | + | else throw("Strict value is not equal to itself.") | |
251 | + | } | |
252 | + | ||
253 | + | ||
254 | + | ||
255 | + | @Callable(Q) | |
256 | + | func withdraw (af) = { | |
257 | + | let ag = S(Q) | |
258 | + | if ((ag == ag)) | |
259 | + | then { | |
260 | + | let m = Address(af) | |
261 | + | let ap = valueOrErrorMessage(getInteger(I, o()), f("invalid period")) | |
262 | + | let au = if ((size(Q.payments) == 1)) | |
263 | + | then Q.payments[0] | |
264 | + | else h(f("invalid payments")) | |
265 | + | let aw = if ((au.assetId == M)) | |
266 | + | then M | |
267 | + | else h("invalid payment asset") | |
268 | + | let av = if ((au.amount > 0)) | |
269 | + | then au.amount | |
270 | + | else h("invalid payment amount") | |
271 | + | let aj = [invoke(I, "stringEntry", [v(m, Q.transactionId), x(d, av, (ap + 1), unit)], nil)] | |
272 | + | if ((aj == aj)) | |
273 | + | then $Tuple2([ScriptTransfer(I, av, aw)], aj) | |
274 | + | else throw("Strict value is not equal to itself.") | |
275 | + | } | |
276 | + | else throw("Strict value is not equal to itself.") | |
277 | + | } | |
278 | + | ||
279 | + | ||
280 | + | ||
281 | + | @Callable(Q) | |
282 | + | func cancelWithdraw (af,w) = { | |
283 | + | let ag = S(Q) | |
284 | + | if ((ag == ag)) | |
285 | + | then { | |
286 | + | let m = Address(af) | |
287 | + | let ax = valueOrErrorMessage(getString(I, v(m, w)), f("invalid withdrawal request")) | |
288 | + | let ay = F(ax) | |
289 | + | let y = ay._1 | |
290 | + | let z = ay._2 | |
291 | + | let A = ay._3 | |
292 | + | let B = ay._4 | |
293 | + | if ((y == d)) | |
294 | + | then { | |
295 | + | let aj = [invoke(I, "deleteEntry", [v(m, w)], nil), invoke(I, "transferAsset", [af, z, M], nil)] | |
296 | + | if ((aj == aj)) | |
297 | + | then $Tuple2(nil, aj) | |
298 | + | else throw("Strict value is not equal to itself.") | |
299 | + | } | |
300 | + | else h("invalid withdrawal request status") | |
301 | + | } | |
302 | + | else throw("Strict value is not equal to itself.") | |
303 | + | } | |
304 | + | ||
305 | + | ||
306 | + | ||
307 | + | @Callable(Q) | |
308 | + | func claimWaves (af,w) = { | |
309 | + | let ag = S(Q) | |
310 | + | if ((ag == ag)) | |
311 | + | then { | |
312 | + | let m = Address(af) | |
313 | + | let ap = valueOrErrorMessage(getInteger(I, o()), f("invalid period")) | |
314 | + | let ax = valueOrErrorMessage(getString(I, v(m, w)), f("invalid withdrawal request")) | |
315 | + | let az = F(ax) | |
316 | + | let y = az._1 | |
317 | + | let z = az._2 | |
318 | + | let A = az._3 | |
319 | + | let B = az._4 | |
320 | + | if ((y == e)) | |
321 | + | then h("invalid withdrawal request status") | |
322 | + | else if ((A > ap)) | |
323 | + | then h("invalid withdrawal request period") | |
324 | + | else { | |
325 | + | let at = valueOrErrorMessage(getInteger(I, p(ap)), f("invalid price")) | |
326 | + | let aA = if ((at > 0)) | |
327 | + | then fraction(z, at, c) | |
328 | + | else 0 | |
329 | + | let aj = [invoke(I, "stringEntry", [v(m, w), x(e, z, A, Q.transactionId)], nil), invoke(I, "burn", [z], nil), invoke(I, "transferWaves", [af, aA], nil)] | |
330 | + | $Tuple2(nil, aj) | |
331 | + | } | |
332 | + | } | |
333 | + | else throw("Strict value is not equal to itself.") | |
334 | + | } | |
335 | + | ||
336 | + | ||
337 | + | ||
338 | + | @Callable(Q) | |
339 | + | func processBlocks (af) = { | |
340 | + | let ag = S(Q) | |
341 | + | if ((ag == ag)) | |
342 | + | then { | |
343 | + | let m = Address(af) | |
344 | + | let ap = valueOrErrorMessage(getInteger(I, o()), f("invalid period")) | |
345 | + | let aB = valueOrErrorMessage(getInteger(I, s()), f("invalid period length")) | |
346 | + | let aC = valueOrErrorMessage(getInteger(I, r(ap)), f("invalid start height")) | |
347 | + | let at = valueOrErrorMessage(getInteger(I, p(ap)), f("invalid price")) | |
348 | + | let aD = valueOrErrorMessage(getInteger(I, u()), f("invalid next block to process")) | |
349 | + | let aE = if (if (if ((height >= aD)) | |
350 | + | then if ((aD >= aC)) | |
351 | + | then true | |
352 | + | else (ap == 0) | |
353 | + | else false) | |
354 | + | then ((aC + aB) > aD) | |
355 | + | else false) | |
356 | + | then valueOrErrorMessage(blockInfoByHeight(aD), f("invalid block info")) | |
357 | + | else h(f("invalid target block")) | |
358 | + | let aF = valueOrErrorMessage(T(aE.rewards, O), f("invalid treasury reward")) | |
359 | + | let aG = valueOrErrorMessage(getInteger(I, t()), f("invalid block processing reward")) | |
360 | + | let ah = valueOrElse(getInteger(I, l(m)), 0) | |
361 | + | let z = if ((at > 0)) | |
362 | + | then fraction((aF - aG), c, at) | |
363 | + | else 0 | |
364 | + | let aj = [invoke(I, "integerEntry", [u(), (aD + 1)], nil), invoke(I, "integerEntry", [l(m), ah], nil), invoke(I, "transferWaves", [af, aG], nil)] | |
365 | + | $Tuple2(nil, aj) | |
366 | + | } | |
367 | + | else throw("Strict value is not equal to itself.") | |
368 | + | } | |
369 | + | ||
370 | + | ||
371 | + | @Verifier(aH) | |
372 | + | func aI () = sigVerify(aH.bodyBytes, aH.proofs[0], aH.senderPublicKey) | |
373 | + |
github/deemru/w8io/026f985 72.40 ms ◑