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