tx · 2HNTzCbMmBfoSiWQfwFCkXqjKv7sR1rnmvE4dt6WbtMZ 3MpMuGN8rW9EpPwzETAQz88Pe9TQhSwiriq: -0.01600000 Waves 2023.07.31 18:08 [2690211] smart account 3MpMuGN8rW9EpPwzETAQz88Pe9TQhSwiriq > SELF 0.00000000 Waves
{ "type": 13, "id": "2HNTzCbMmBfoSiWQfwFCkXqjKv7sR1rnmvE4dt6WbtMZ", "fee": 1600000, "feeAssetId": null, "timestamp": 1690816088224, "version": 2, "chainId": 84, "sender": "3MpMuGN8rW9EpPwzETAQz88Pe9TQhSwiriq", "senderPublicKey": "57SkjQUEwC1ayCqLbXLuzBqifK6B6SR6rfxtGsbAo3zW", "proofs": [ "4RGPLbu8u9T3JvkgkgoZtdQvZwRjnReZ3Pbko87CiqbeJuNYFYoZCToS5xQQgQyBh3wcLDnStnLVi1wtvcFKosax" ], "script": "base64:BgIkCAISAwoBARIDCgEBEgASAwoBCBIDCgEBEgMKAQgSABIDCgEIMgAMY29udHJhY3RGaWxlAhFsMm1wX3N0YWtpbmcucmlkZQADU0VQAgJfXwAGc2NhbGU4AIDC1y8AB3NjYWxlMTgAgICQu7rWrfANAA1zY2FsZTE4QmlnSW50CQC2AgEFB3NjYWxlMTgAEkFERFJFU1NfQllURVNfU0laRQAaAA1CTE9DS1NfSU5fREFZAKALAQh0aHJvd0VycgEDbXNnCQACAQkArAICCQCsAgIFDGNvbnRyYWN0RmlsZQICOiAFA21zZwAKa2V5QXNzZXRJZAkAuQkCCQDMCAICAiVzCQDMCAICB2Fzc2V0SWQFA25pbAUDU0VQABNrZXlFbWlzc2lvblBlckJsb2NrCQC5CQIJAMwIAgICJXMJAMwIAgIQZW1pc3Npb25QZXJCbG9jawUDbmlsBQNTRVAAGWtleUVtaXNzaW9uUGVyaW9kSW5CbG9ja3MJALkJAgkAzAgCAgIlcwkAzAgCAhZlbWlzc2lvblBlcmlvZEluQmxvY2tzBQNuaWwFA1NFUAANa2V5U3RhcnRCbG9jawkAu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Jvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXkDBQhieUFkbWlucwYFB2J5T3duZXL43dw2", "height": 2690211, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BD2pjjSvvBKXnBRmASh3Fm8Z3w8SYor5yjN4cshkV7gB Next: none Diff:
Old | New | Differences | |
---|---|---|---|
42 | 42 | func t (u,q,v) = makeString(["%s%s%s", u, q, toBase58String(v)], b) | |
43 | 43 | ||
44 | 44 | ||
45 | - | func w (x,y,z,A) = makeString(["%d%d", toString(x), toString(y), toString(z), toString(A)], b) | |
45 | + | func w (x,y,z,A) = makeString(["%d%d%d%d", toString(x), toString(y), toString(z), toString(A)], b) | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | let A = valueOrElse(getInteger(this, n), 0) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "l2mp_staking.ride" | |
5 | 5 | ||
6 | 6 | let b = "__" | |
7 | 7 | ||
8 | 8 | let c = 100000000 | |
9 | 9 | ||
10 | 10 | let d = 1000000000000000000 | |
11 | 11 | ||
12 | 12 | let e = toBigInt(d) | |
13 | 13 | ||
14 | 14 | let f = 26 | |
15 | 15 | ||
16 | 16 | let g = 1440 | |
17 | 17 | ||
18 | 18 | func h (i) = throw(((a + ": ") + i)) | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | let j = makeString(["%s", "assetId"], b) | |
22 | 22 | ||
23 | 23 | let k = makeString(["%s", "emissionPerBlock"], b) | |
24 | 24 | ||
25 | 25 | let l = makeString(["%s", "emissionPeriodInBlocks"], b) | |
26 | 26 | ||
27 | 27 | let m = makeString(["%s", "startBlock"], b) | |
28 | 28 | ||
29 | 29 | let n = makeString(["%s", "totalLpAmount"], b) | |
30 | 30 | ||
31 | 31 | let o = makeString(["%s", "totalAssetAmount"], b) | |
32 | 32 | ||
33 | 33 | func p (q) = makeString(["%s%s", "userLpAmount", q], b) | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func r (q) = makeString(["%s%s", "totalAssetWithdrawn", q], b) | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func s (q) = makeString(["%s%s", "totalAssetStaked", q], b) | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func t (u,q,v) = makeString(["%s%s%s", u, q, toBase58String(v)], b) | |
43 | 43 | ||
44 | 44 | ||
45 | - | func w (x,y,z,A) = makeString(["%d%d", toString(x), toString(y), toString(z), toString(A)], b) | |
45 | + | func w (x,y,z,A) = makeString(["%d%d%d%d", toString(x), toString(y), toString(z), toString(A)], b) | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | let A = valueOrElse(getInteger(this, n), 0) | |
49 | 49 | ||
50 | 50 | let z = valueOrElse(getInteger(this, o), 0) | |
51 | 51 | ||
52 | 52 | let B = valueOrElse(getString(this, j), "WAVES") | |
53 | 53 | ||
54 | 54 | let C = if ((B == "WAVES")) | |
55 | 55 | then unit | |
56 | 56 | else fromBase58String(B) | |
57 | 57 | ||
58 | 58 | let D = valueOrElse(getInteger(this, l), g) | |
59 | 59 | ||
60 | 60 | let E = (valueOrElse(getInteger(this, k), 0) * D) | |
61 | 61 | ||
62 | 62 | let F = 5 | |
63 | 63 | ||
64 | 64 | let G = 3 | |
65 | 65 | ||
66 | 66 | let H = 32 | |
67 | 67 | ||
68 | 68 | func I (v) = makeString(["%s%s%s", "allowTxId", v], b) | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func J (K,L) = makeString([K, L], b) | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func M () = makeString(["%s", "adminAddressList"], b) | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func N () = makeString(["%s", "txId"], b) | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func O (K,P) = { | |
81 | 81 | let Q = J(K, P) | |
82 | 82 | valueOrElse(getInteger(Q), 0) | |
83 | 83 | } | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func R () = { | |
87 | 87 | let S = getString(this, M()) | |
88 | 88 | if ($isInstanceOf(S, "String")) | |
89 | 89 | then { | |
90 | 90 | let T = S | |
91 | 91 | split(T, b) | |
92 | 92 | } | |
93 | 93 | else nil | |
94 | 94 | } | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func U (V) = containsElement(R(), V) | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func W (X,L) = { | |
101 | 101 | let Y = X | |
102 | 102 | let Z = Y._1 | |
103 | 103 | let K = Y._2 | |
104 | 104 | $Tuple2((Z :+ J(K, L)), K) | |
105 | 105 | } | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func aa (ab) = { | |
109 | 109 | let ac = M() | |
110 | 110 | let ad = { | |
111 | 111 | let ae = R() | |
112 | 112 | let af = size(ae) | |
113 | 113 | let ag = $Tuple2(nil, ab) | |
114 | 114 | func ah (ai,aj) = if ((aj >= af)) | |
115 | 115 | then ai | |
116 | 116 | else W(ai, ae[aj]) | |
117 | 117 | ||
118 | 118 | func ak (ai,aj) = if ((aj >= af)) | |
119 | 119 | then ai | |
120 | 120 | else throw("List size exceeds 5") | |
121 | 121 | ||
122 | 122 | ak(ah(ah(ah(ah(ah(ag, 0), 1), 2), 3), 4), 5) | |
123 | 123 | } | |
124 | 124 | let Z = ad._1 | |
125 | 125 | let K = ad._2 | |
126 | 126 | Z | |
127 | 127 | } | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | func al (Z,Q) = (Z + valueOrElse(getInteger(Q), 0)) | |
131 | 131 | ||
132 | 132 | ||
133 | 133 | func am (K) = { | |
134 | 134 | let an = aa(K) | |
135 | 135 | let ae = an | |
136 | 136 | let af = size(ae) | |
137 | 137 | let ag = 0 | |
138 | 138 | func ah (ai,aj) = if ((aj >= af)) | |
139 | 139 | then ai | |
140 | 140 | else al(ai, ae[aj]) | |
141 | 141 | ||
142 | 142 | func ak (ai,aj) = if ((aj >= af)) | |
143 | 143 | then ai | |
144 | 144 | else throw("List size exceeds 5") | |
145 | 145 | ||
146 | 146 | ak(ah(ah(ah(ah(ah(ag, 0), 1), 2), 3), 4), 5) | |
147 | 147 | } | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | func ao (Z,ap) = (Z :+ DeleteEntry(ap)) | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func aq (K) = { | |
154 | 154 | let an = aa(K) | |
155 | 155 | let ae = an | |
156 | 156 | let af = size(ae) | |
157 | 157 | let ag = nil | |
158 | 158 | func ah (ai,aj) = if ((aj >= af)) | |
159 | 159 | then ai | |
160 | 160 | else ao(ai, ae[aj]) | |
161 | 161 | ||
162 | 162 | func ak (ai,aj) = if ((aj >= af)) | |
163 | 163 | then ai | |
164 | 164 | else throw("List size exceeds 5") | |
165 | 165 | ||
166 | 166 | ak(ah(ah(ah(ah(ah(ag, 0), 1), 2), 3), 4), 5) | |
167 | 167 | } | |
168 | 168 | ||
169 | 169 | ||
170 | 170 | func ar (as,ab,at,au) = { | |
171 | 171 | let Q = J(ab, as) | |
172 | 172 | let av = O(ab, as) | |
173 | 173 | let aw = if (!(U(as))) | |
174 | 174 | then h((("Address: " + as) + " not in Admin list")) | |
175 | 175 | else if ((av == 1)) | |
176 | 176 | then h((Q + " you already voted")) | |
177 | 177 | else unit | |
178 | 178 | if ((aw == aw)) | |
179 | 179 | then { | |
180 | 180 | let an = am(ab) | |
181 | 181 | if (((an + 1) >= at)) | |
182 | 182 | then { | |
183 | 183 | let ax = aq(ab) | |
184 | 184 | (ax ++ au) | |
185 | 185 | } | |
186 | 186 | else [IntegerEntry(Q, 1)] | |
187 | 187 | } | |
188 | 188 | else throw("Strict value is not equal to itself.") | |
189 | 189 | } | |
190 | 190 | ||
191 | 191 | ||
192 | 192 | func ay (az) = { | |
193 | 193 | let aA = valueOrElse(getInteger(this, m), 0) | |
194 | 194 | let aB = fraction(aA, 1, D) | |
195 | 195 | let aC = ((az / D) - aB) | |
196 | 196 | max([0, (E * aC)]) | |
197 | 197 | } | |
198 | 198 | ||
199 | 199 | ||
200 | 200 | func aD () = ay(height) | |
201 | 201 | ||
202 | 202 | ||
203 | 203 | func aE () = { | |
204 | 204 | let aF = (z + aD()) | |
205 | 205 | let aG = { | |
206 | 206 | let S = C | |
207 | 207 | if ($isInstanceOf(S, "Unit")) | |
208 | 208 | then { | |
209 | 209 | let aH = S | |
210 | 210 | min([aF, wavesBalance(this).available]) | |
211 | 211 | } | |
212 | 212 | else if ($isInstanceOf(S, "ByteVector")) | |
213 | 213 | then { | |
214 | 214 | let aI = S | |
215 | 215 | min([aF, assetBalance(this, aI)]) | |
216 | 216 | } | |
217 | 217 | else throw("Match error") | |
218 | 218 | } | |
219 | 219 | if ((A == 0)) | |
220 | 220 | then 0 | |
221 | 221 | else aG | |
222 | 222 | } | |
223 | 223 | ||
224 | 224 | ||
225 | 225 | func aJ () = if ((A != 0)) | |
226 | 226 | then fraction(toBigInt(aE()), e, toBigInt(A)) | |
227 | 227 | else e | |
228 | 228 | ||
229 | 229 | ||
230 | 230 | func aK (q) = valueOrElse(getInteger(this, p(q)), 0) | |
231 | 231 | ||
232 | 232 | ||
233 | 233 | func aL (q) = { | |
234 | 234 | let aM = aK(q) | |
235 | 235 | let aN = toInt(fraction(toBigInt(aM), aJ(), e)) | |
236 | 236 | if ((0 > aN)) | |
237 | 237 | then 0 | |
238 | 238 | else aN | |
239 | 239 | } | |
240 | 240 | ||
241 | 241 | ||
242 | 242 | func aO (aP,q) = { | |
243 | 243 | let aQ = [if ((size(aP.payments) == 1)) | |
244 | 244 | then true | |
245 | 245 | else h("should include 1 payment"), if ((aP.payments[0].assetId == C)) | |
246 | 246 | then true | |
247 | 247 | else h(("payment should be in " + B)), if ((aP.payments[0].amount > 0)) | |
248 | 248 | then true | |
249 | 249 | else "payment amount should be greater than 0"] | |
250 | 250 | if ((aQ == aQ)) | |
251 | 251 | then { | |
252 | 252 | let aR = aP.payments[0].amount | |
253 | 253 | let aS = toInt(fraction(toBigInt(aR), e, aJ())) | |
254 | 254 | let aM = aK(q) | |
255 | 255 | let aT = valueOrElse(getInteger(this, s(q)), 0) | |
256 | 256 | let aU = (A + aS) | |
257 | 257 | let aV = (z + aR) | |
258 | 258 | let aW = (aM + aS) | |
259 | 259 | let aX = (aT + aR) | |
260 | 260 | let aY = if ((A == 0)) | |
261 | 261 | then [IntegerEntry(m, height)] | |
262 | 262 | else nil | |
263 | 263 | ([StringEntry(t("stake", q, aP.transactionId), w(aD(), aJ(), A, z)), IntegerEntry(n, aU), IntegerEntry(o, aV), IntegerEntry(p(q), aW), IntegerEntry(s(q), aX)] ++ aY) | |
264 | 264 | } | |
265 | 265 | else throw("Strict value is not equal to itself.") | |
266 | 266 | } | |
267 | 267 | ||
268 | 268 | ||
269 | 269 | func aZ (aP,ba) = { | |
270 | 270 | let q = toString(aP.caller) | |
271 | 271 | let aM = aK(q) | |
272 | 272 | let bb = [if ((ba > 0)) | |
273 | 273 | then true | |
274 | 274 | else h("LP amount should be more than 0"), if ((aM >= ba)) | |
275 | 275 | then true | |
276 | 276 | else h((("cannot withdraw more than available LP (" + toString(aM)) + ")"))] | |
277 | 277 | if ((bb == bb)) | |
278 | 278 | then { | |
279 | 279 | let aW = (aM - ba) | |
280 | 280 | let bc = toInt(fraction(toBigInt(ba), aJ(), e)) | |
281 | 281 | let aU = (A - ba) | |
282 | 282 | let aV = toInt(fraction(toBigInt(aU), aJ(), e)) | |
283 | 283 | let bd = valueOrElse(getInteger(this, r(q)), 0) | |
284 | 284 | let be = (bd + bc) | |
285 | 285 | [StringEntry(t("withdraw", q, aP.transactionId), w(aD(), aJ(), A, z)), IntegerEntry(n, aU), IntegerEntry(o, aV), IntegerEntry(p(q), aW), IntegerEntry(r(q), be), IntegerEntry(m, height), ScriptTransfer(aP.caller, bc, C)] | |
286 | 286 | } | |
287 | 287 | else throw("Strict value is not equal to itself.") | |
288 | 288 | } | |
289 | 289 | ||
290 | 290 | ||
291 | 291 | @Callable(aP) | |
292 | 292 | func setEmissionPerBlock (bf) = { | |
293 | 293 | let bb = [if ((aP.caller == this)) | |
294 | 294 | then true | |
295 | 295 | else h("permission denied")] | |
296 | 296 | if ((bb == bb)) | |
297 | 297 | then [IntegerEntry(o, aE()), IntegerEntry(m, height), IntegerEntry(k, max([0, bf]))] | |
298 | 298 | else throw("Strict value is not equal to itself.") | |
299 | 299 | } | |
300 | 300 | ||
301 | 301 | ||
302 | 302 | ||
303 | 303 | @Callable(aP) | |
304 | 304 | func setEmissionPeriodInBlocks (bg) = { | |
305 | 305 | let bb = [if ((bg > 0)) | |
306 | 306 | then true | |
307 | 307 | else h("emission period should be greater than 0"), if ((aP.caller == this)) | |
308 | 308 | then true | |
309 | 309 | else h("permission denied")] | |
310 | 310 | if ((bb == bb)) | |
311 | 311 | then [IntegerEntry(o, aE()), IntegerEntry(m, height), IntegerEntry(l, bg)] | |
312 | 312 | else throw("Strict value is not equal to itself.") | |
313 | 313 | } | |
314 | 314 | ||
315 | 315 | ||
316 | 316 | ||
317 | 317 | @Callable(aP) | |
318 | 318 | func stake () = aO(aP, toString(aP.caller)) | |
319 | 319 | ||
320 | 320 | ||
321 | 321 | ||
322 | 322 | @Callable(aP) | |
323 | 323 | func stakeFor (q) = { | |
324 | 324 | let bb = [if ((size(fromBase58String(q)) == f)) | |
325 | 325 | then true | |
326 | 326 | else h("address is not valid")] | |
327 | 327 | if ((bb == bb)) | |
328 | 328 | then aO(aP, q) | |
329 | 329 | else throw("Strict value is not equal to itself.") | |
330 | 330 | } | |
331 | 331 | ||
332 | 332 | ||
333 | 333 | ||
334 | 334 | @Callable(aP) | |
335 | 335 | func withdraw (bc) = { | |
336 | 336 | let q = toString(aP.caller) | |
337 | 337 | let aM = aK(q) | |
338 | 338 | let bh = toInt(fraction(toBigInt(bc), e, aJ())) | |
339 | 339 | let aN = aL(q) | |
340 | 340 | let bi = toInt(fraction(aJ(), toBigInt(1), e, CEILING)) | |
341 | 341 | let bb = [if ((bc > 0)) | |
342 | 342 | then true | |
343 | 343 | else h("withdraw amount should be more than 0"), if ((aN >= bc)) | |
344 | 344 | then true | |
345 | 345 | else h((("cannot withdraw more than available (" + toString(aN)) + ")")), if ((bc >= bi)) | |
346 | 346 | then true | |
347 | 347 | else h((("withdraw amount is too small. Min: (" + toString(bi)) + ")"))] | |
348 | 348 | if ((bb == bb)) | |
349 | 349 | then aZ(aP, min([aM, (bh + 1)])) | |
350 | 350 | else throw("Strict value is not equal to itself.") | |
351 | 351 | } | |
352 | 352 | ||
353 | 353 | ||
354 | 354 | ||
355 | 355 | @Callable(aP) | |
356 | 356 | func getUserAssetsREADONLY (q) = { | |
357 | 357 | let aM = aK(q) | |
358 | 358 | let aN = aL(q) | |
359 | 359 | let aT = valueOrElse(getInteger(this, s(q)), 0) | |
360 | 360 | let bd = valueOrElse(getInteger(this, r(q)), 0) | |
361 | 361 | $Tuple2(nil, $Tuple5(aM, aN, aJ(), aT, bd)) | |
362 | 362 | } | |
363 | 363 | ||
364 | 364 | ||
365 | 365 | ||
366 | 366 | @Callable(aP) | |
367 | 367 | func getTotalAssetsREADONLY () = $Tuple2(nil, $Tuple3(A, aE(), aJ())) | |
368 | 368 | ||
369 | 369 | ||
370 | 370 | ||
371 | 371 | @Callable(aP) | |
372 | 372 | func voteForTxId (v) = { | |
373 | 373 | let as = toBase58String(aP.caller.bytes) | |
374 | 374 | let ab = I(v) | |
375 | 375 | let Z = [StringEntry(N(), v)] | |
376 | 376 | let bj = getString(this, N()) | |
377 | 377 | let aw = [if ((size(fromBase58String(v)) == H)) | |
378 | 378 | then true | |
379 | 379 | else h((v + " is not valid txId")), if (if ((bj == unit)) | |
380 | 380 | then true | |
381 | 381 | else (value(bj) != v)) | |
382 | 382 | then true | |
383 | 383 | else h((v + " is already allowed"))] | |
384 | 384 | if ((aw == aw)) | |
385 | 385 | then ar(as, ab, G, Z) | |
386 | 386 | else throw("Strict value is not equal to itself.") | |
387 | 387 | } | |
388 | 388 | ||
389 | 389 | ||
390 | 390 | @Verifier(bk) | |
391 | 391 | func bl () = { | |
392 | 392 | let bm = (bk.id == fromBase58String(valueOrElse(getString(this, N()), ""))) | |
393 | 393 | let bn = if ((size(R()) >= G)) | |
394 | 394 | then false | |
395 | 395 | else sigVerify(bk.bodyBytes, bk.proofs[0], bk.senderPublicKey) | |
396 | 396 | if (bm) | |
397 | 397 | then true | |
398 | 398 | else bn | |
399 | 399 | } | |
400 | 400 |
github/deemru/w8io/026f985 48.54 ms ◑