tx · 9DDuVeQziAigRBqvqnqF7vjoE9RaaJTSLsrsvNCz2GXY 3N9hEyaLi6KMvCTPffrSzFLHer5QRM6UXmg: -0.05000000 Waves 2023.04.26 11:48 [2551290] smart account 3N9hEyaLi6KMvCTPffrSzFLHer5QRM6UXmg > SELF 0.00000000 Waves
{ "type": 13, "id": "9DDuVeQziAigRBqvqnqF7vjoE9RaaJTSLsrsvNCz2GXY", "fee": 5000000, "feeAssetId": null, "timestamp": 1682498942087, "version": 2, "chainId": 84, "sender": "3N9hEyaLi6KMvCTPffrSzFLHer5QRM6UXmg", "senderPublicKey": "3JAaWBumwEJ3jcDFxjzYTLc7h15ruXWTNH1vWehmWqRA", "proofs": [ "5LJ1djWT3obJNx9HiBFiESmeUaZYYEkvZGhq3rzGmgszQJZ8bNkR6QctXiHzkvjMqg32cTxh8eEbuvaoouxhN8Df" ], "script": "base64:BgIOCAISBAoCCAgSBAoCCAhuAANTRVACAl9fAAVFTVBUWQIAAAlQUkVDSVNJT04AgKCUpY0dAAhERUNJTUFMUwCAwtcvABRERUZBVUxUX01BWF9TTElQUEFHRQkAaAIJAGkCBQlQUkVDSVNJT04AFAATAANEQVkJAGgCCQBoAgA8ADwAGAAEWUVBUgkAaAIFA0RBWQDtAgAPT1JBQ0xFX0RFQ0lNQUxTAMCEPQAISU5GSU5JVFkA//////////9/ABBNSU5fQU1PVU5UX0RFTFRBAOgHABVNQVhfUkFURV9IRUlHSFRfREVMVEEABQARTElRVUlEQVRJT05fQk9OVVMJAGgCCQBpAgUJUFJFQ0lTSU9OAGQABQAYTElRVUlEQVRJT05fUFJPVE9DT0xfRkVFCQBoAgkAaQIFCVBSRUNJU0lPTgBkAAIAFE1BWF9MSVFVSURBVElPTl9QQVJUCQBoAgkAaQIFCVBSRUNJU0lPTgBkADIADVNUQUJJTElUWV9GRUUJAGkCBQlQUkVDSVNJT04AZAAHRU5BQkxFRAIHRU5BQkxFRAAIRElTQUJMRUQCCERJU0FCTEVEABJJZHhWYXVsdE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ZXh0ck5hdGl2ZSgxMDYyKQEFB2FkZHJlc3MJAQlrZXlTaWduZWQCCQClCAEFBHRoaXMJANgEAQgFAnR4AmlkBwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleb5MGA4=", "height": 2551290, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none 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 = "" | |
7 | + | ||
8 | + | let c = 1000000000000 | |
9 | + | ||
10 | + | let d = 100000000 | |
11 | + | ||
12 | + | let e = ((c / 20) * 19) | |
13 | + | ||
14 | + | let f = ((60 * 60) * 24) | |
15 | + | ||
16 | + | let g = (f * 365) | |
17 | + | ||
18 | + | let h = 1000000 | |
19 | + | ||
20 | + | let i = 9223372036854775807 | |
21 | + | ||
22 | + | let j = 1000 | |
23 | + | ||
24 | + | let k = 5 | |
25 | + | ||
26 | + | let l = ((c / 100) * 5) | |
27 | + | ||
28 | + | let m = ((c / 100) * 2) | |
29 | + | ||
30 | + | let n = ((c / 100) * 50) | |
31 | + | ||
32 | + | let o = (c / 100) | |
33 | + | ||
34 | + | let p = "ENABLED" | |
35 | + | ||
36 | + | let q = "DISABLED" | |
37 | + | ||
38 | + | let r = 1 | |
39 | + | ||
40 | + | let s = 2 | |
41 | + | ||
42 | + | let t = 3 | |
43 | + | ||
44 | + | let u = 1 | |
45 | + | ||
46 | + | let v = 2 | |
47 | + | ||
48 | + | let w = 3 | |
49 | + | ||
50 | + | let x = 4 | |
51 | + | ||
52 | + | let y = 5 | |
53 | + | ||
54 | + | let z = "Invocation error" | |
55 | + | ||
56 | + | func A (B,C) = fraction(B, d, C, HALFEVEN) | |
57 | + | ||
58 | + | ||
59 | + | func D (B,C) = fraction(B, C, d, HALFEVEN) | |
60 | + | ||
61 | + | ||
62 | + | func E (B,C) = fraction(B, c, C, HALFEVEN) | |
63 | + | ||
64 | + | ||
65 | + | func F (B,C) = fraction(B, C, c, HALFEVEN) | |
66 | + | ||
67 | + | ||
68 | + | func G (H) = makeString(H, a) | |
69 | + | ||
70 | + | ||
71 | + | func I () = G(["%s", "initialized"]) | |
72 | + | ||
73 | + | ||
74 | + | func J () = G(["%s", "coordinatorAddress"]) | |
75 | + | ||
76 | + | ||
77 | + | func K () = G(["%s", "verifierAddress"]) | |
78 | + | ||
79 | + | ||
80 | + | func L () = G(["%s", "serviceAddress"]) | |
81 | + | ||
82 | + | ||
83 | + | func M () = G(["%s", "frontendAddress"]) | |
84 | + | ||
85 | + | ||
86 | + | func N () = G(["%s", "minterAddress"]) | |
87 | + | ||
88 | + | ||
89 | + | func O () = G(["%s", "treasuryAddress"]) | |
90 | + | ||
91 | + | ||
92 | + | func P () = G(["%s", "backendAddress"]) | |
93 | + | ||
94 | + | ||
95 | + | func Q () = G(["%s", "eastStakingAddress"]) | |
96 | + | ||
97 | + | ||
98 | + | func R () = G(["%s", "oracleAddress"]) | |
99 | + | ||
100 | + | ||
101 | + | func S () = G(["%s", "exchangeAddress"]) | |
102 | + | ||
103 | + | ||
104 | + | func T () = G(["%s", "eastAsset"]) | |
105 | + | ||
106 | + | ||
107 | + | func U () = G(["%s", "stEastAsset"]) | |
108 | + | ||
109 | + | ||
110 | + | func V () = "A_asset_balance" | |
111 | + | ||
112 | + | ||
113 | + | func W () = "B_asset_balance" | |
114 | + | ||
115 | + | ||
116 | + | func X (Y,Z) = G(["%s%s%s", "vault", Y, Z]) | |
117 | + | ||
118 | + | ||
119 | + | func aa (Y) = G(["%s%s", "vault", Y]) | |
120 | + | ||
121 | + | ||
122 | + | func ab () = G(["%s", "precision"]) | |
123 | + | ||
124 | + | ||
125 | + | func ac () = G(["%s", "backingRatio"]) | |
126 | + | ||
127 | + | ||
128 | + | func ad () = G(["%s", "liquidationRatio"]) | |
129 | + | ||
130 | + | ||
131 | + | func ae () = G(["%s", "liquidationBonus"]) | |
132 | + | ||
133 | + | ||
134 | + | func af () = G(["%s", "liquidationProtocolFee"]) | |
135 | + | ||
136 | + | ||
137 | + | func ag () = G(["%s", "stabilityFee"]) | |
138 | + | ||
139 | + | ||
140 | + | func ah () = G(["%s", "minAmountDelta"]) | |
141 | + | ||
142 | + | ||
143 | + | func ai () = G(["%s", "ticker"]) | |
144 | + | ||
145 | + | ||
146 | + | func aj () = G(["%s", "maxRateHeightDelta"]) | |
147 | + | ||
148 | + | ||
149 | + | func ak () = G(["%s", "contractAssetId"]) | |
150 | + | ||
151 | + | ||
152 | + | func al (am) = G(["%s%s", "price", am]) | |
153 | + | ||
154 | + | ||
155 | + | func an (am) = G(["%s%s", "lastHeight", am]) | |
156 | + | ||
157 | + | ||
158 | + | func ao (ap,aq) = G(["%s%s%s", "signed", ap, aq]) | |
159 | + | ||
160 | + | ||
161 | + | func ar () = G(["%s", "protocolActive"]) | |
162 | + | ||
163 | + | ||
164 | + | func as () = valueOrElse(getBoolean(this, I()), false) | |
165 | + | ||
166 | + | ||
167 | + | func at () = if (!(as())) | |
168 | + | then throw("Not initialized") | |
169 | + | else unit | |
170 | + | ||
171 | + | ||
172 | + | func au () = if (as()) | |
173 | + | then throw("Already initialized") | |
174 | + | else unit | |
175 | + | ||
176 | + | ||
177 | + | func av (aw) = if ((aw.caller != this)) | |
178 | + | then throw("Only self invocation allowed.") | |
179 | + | else unit | |
180 | + | ||
181 | + | ||
182 | + | func ax () = addressFromStringValue(valueOrErrorMessage(getString(J()), "Coordinator is not set")) | |
183 | + | ||
184 | + | ||
185 | + | func ay () = { | |
186 | + | let az = getString(J()) | |
187 | + | if ($isInstanceOf(az, "String")) | |
188 | + | then { | |
189 | + | let aA = az | |
190 | + | getString(addressFromStringValue(aA), K()) | |
191 | + | } | |
192 | + | else if ($isInstanceOf(az, "Unit")) | |
193 | + | then unit | |
194 | + | else throw("Match error") | |
195 | + | } | |
196 | + | ||
197 | + | ||
198 | + | func aB (aC,aD) = addressFromStringValue(valueOrErrorMessage(getString(ax(), aC), aD)) | |
199 | + | ||
200 | + | ||
201 | + | func aE () = aB(N(), "Minter is not set") | |
202 | + | ||
203 | + | ||
204 | + | func aF () = aB(M(), "Frontend is not set") | |
205 | + | ||
206 | + | ||
207 | + | func aG () = aB(O(), "Treasury is not set") | |
208 | + | ||
209 | + | ||
210 | + | func aH () = aB(P(), "Backend is not set") | |
211 | + | ||
212 | + | ||
213 | + | func aI () = aB(R(), "Oracle is not set") | |
214 | + | ||
215 | + | ||
216 | + | func aJ () = aB(Q(), "East staking is not set") | |
217 | + | ||
218 | + | ||
219 | + | func aK (aw) = (aw.caller != aG()) | |
220 | + | ||
221 | + | ||
222 | + | func aL () = valueOrElse(getInteger(ax(), ah()), j) | |
223 | + | ||
224 | + | ||
225 | + | func aM () = valueOrElse(getInteger(ax(), aj()), k) | |
226 | + | ||
227 | + | ||
228 | + | func aN () = valueOrElse(getInteger(ax(), ae()), l) | |
229 | + | ||
230 | + | ||
231 | + | func aO () = valueOrElse(getInteger(ax(), af()), m) | |
232 | + | ||
233 | + | ||
234 | + | func aP () = valueOrElse(getInteger(ax(), ag()), o) | |
235 | + | ||
236 | + | ||
237 | + | func aQ () = getStringValue(ak()) | |
238 | + | ||
239 | + | ||
240 | + | func aR () = valueOrErrorMessage(getString(ax(), T()), "East asset is not set") | |
241 | + | ||
242 | + | ||
243 | + | func aS () = fromBase58String(aR()) | |
244 | + | ||
245 | + | ||
246 | + | func aT () = valueOrElse(getBoolean(ax(), ar()), false) | |
247 | + | ||
248 | + | ||
249 | + | func aU () = if (if (!(aT())) | |
250 | + | then true | |
251 | + | else !(as())) | |
252 | + | then throw("Protocol is disabled. Please contact support.") | |
253 | + | else unit | |
254 | + | ||
255 | + | ||
256 | + | func aV (aw) = if ((aw.caller != aF())) | |
257 | + | then throw("Not allowed") | |
258 | + | else unit | |
259 | + | ||
260 | + | ||
261 | + | func aW (aw) = if ((aw.caller != aH())) | |
262 | + | then throw("Not allowed") | |
263 | + | else unit | |
264 | + | ||
265 | + | ||
266 | + | func aX (aw,Y) = if ((toBase58String(aw.caller.bytes) == Y)) | |
267 | + | then throw("Self invocation not allowed.") | |
268 | + | else unit | |
269 | + | ||
270 | + | ||
271 | + | func aY (aw) = if ((size(aw.payments) != 1)) | |
272 | + | then throw("Only one payment allowed.") | |
273 | + | else unit | |
274 | + | ||
275 | + | ||
276 | + | func aZ (aw) = if ((size(aw.payments) != 0)) | |
277 | + | then throw("No payment allowed.") | |
278 | + | else unit | |
279 | + | ||
280 | + | ||
281 | + | func ba (aw) = (size(aw.payments) == 1) | |
282 | + | ||
283 | + | ||
284 | + | func bb (bc) = if ((0 >= bc)) | |
285 | + | then throw("Attribute should be positive or zero.") | |
286 | + | else unit | |
287 | + | ||
288 | + | ||
289 | + | func bd (bc) = if ((0 > bc)) | |
290 | + | then throw("Attribute should be positive.") | |
291 | + | else unit | |
292 | + | ||
293 | + | ||
294 | + | func be (Y,Z) = getString(X(Y, Z)) | |
295 | + | ||
296 | + | ||
297 | + | func bf (Y,Z) = valueOrErrorMessage(be(Y, Z), "Vault not exists") | |
298 | + | ||
299 | + | ||
300 | + | func bg (bh) = { | |
301 | + | let az = bh.assetId | |
302 | + | if ($isInstanceOf(az, "ByteVector")) | |
303 | + | then { | |
304 | + | let bi = az | |
305 | + | toBase58String(bi) | |
306 | + | } | |
307 | + | else if ($isInstanceOf(az, "Unit")) | |
308 | + | then "WAVES" | |
309 | + | else throw("Match error") | |
310 | + | } | |
311 | + | ||
312 | + | ||
313 | + | func bj (bi) = if ((bi == "WAVES")) | |
314 | + | then unit | |
315 | + | else fromBase58String(bi) | |
316 | + | ||
317 | + | ||
318 | + | func bk (bh,bl) = { | |
319 | + | let bi = { | |
320 | + | let az = bl | |
321 | + | if ($isInstanceOf(az, "ByteVector")) | |
322 | + | then { | |
323 | + | let bm = az | |
324 | + | bm | |
325 | + | } | |
326 | + | else if ($isInstanceOf(az, "String")) | |
327 | + | then { | |
328 | + | let aA = az | |
329 | + | bj(aA) | |
330 | + | } | |
331 | + | else if ($isInstanceOf(az, "Unit")) | |
332 | + | then unit | |
333 | + | else throw("Match error") | |
334 | + | } | |
335 | + | let az = bi | |
336 | + | if ($isInstanceOf(az, "ByteVector")) | |
337 | + | then { | |
338 | + | let bm = az | |
339 | + | let bn = { | |
340 | + | let bo = assetInfo(bm) | |
341 | + | if ($isInstanceOf(bo, "Asset")) | |
342 | + | then { | |
343 | + | let Z = bo | |
344 | + | Z.name | |
345 | + | } | |
346 | + | else if ($isInstanceOf(bo, "Unit")) | |
347 | + | then throw(("Can't find asset " + toBase58String(bm))) | |
348 | + | else throw("Match error") | |
349 | + | } | |
350 | + | let aD = throw(("Attached payment asset is not " + bn)) | |
351 | + | let bo = bh.assetId | |
352 | + | if ($isInstanceOf(bo, "ByteVector")) | |
353 | + | then { | |
354 | + | let bp = bo | |
355 | + | if ((bp != bi)) | |
356 | + | then aD | |
357 | + | else unit | |
358 | + | } | |
359 | + | else if ($isInstanceOf(bo, "Unit")) | |
360 | + | then aD | |
361 | + | else throw("Match error") | |
362 | + | } | |
363 | + | else if ($isInstanceOf(az, "Unit")) | |
364 | + | then if ((bh.assetId != unit)) | |
365 | + | then throw("Attached payment asset is not WAVES") | |
366 | + | else unit | |
367 | + | else throw("Match error") | |
368 | + | } | |
369 | + | ||
370 | + | ||
371 | + | func bq () = valueOrErrorMessage(getInteger(ac()), "Backing ratio is not set") | |
372 | + | ||
373 | + | ||
374 | + | func br () = valueOrErrorMessage(getInteger(ad()), "Liquidation ratio is not set") | |
375 | + | ||
376 | + | ||
377 | + | func bs (ap) = { | |
378 | + | let az = addressFromString(ap) | |
379 | + | if ($isInstanceOf(az, "Address")) | |
380 | + | then { | |
381 | + | let Y = az | |
382 | + | true | |
383 | + | } | |
384 | + | else if ($isInstanceOf(az, "Unit")) | |
385 | + | then throw("Invalid address") | |
386 | + | else throw("Match error") | |
387 | + | } | |
388 | + | ||
389 | + | ||
390 | + | func bt (bu) = (size(fromBase58String(bu)) == 32) | |
391 | + | ||
392 | + | ||
393 | + | func bv () = (lastBlock.timestamp / 1000) | |
394 | + | ||
395 | + | ||
396 | + | func bw (aw) = { | |
397 | + | let bx = aY(aw) | |
398 | + | if ((bx == bx)) | |
399 | + | then { | |
400 | + | let by = aw.payments[0].assetId | |
401 | + | let az = by | |
402 | + | if ($isInstanceOf(az, "Unit")) | |
403 | + | then { | |
404 | + | let bz = az | |
405 | + | unit | |
406 | + | } | |
407 | + | else throw("Only WAVES accepted") | |
408 | + | } | |
409 | + | else throw("Strict value is not equal to itself.") | |
410 | + | } | |
411 | + | ||
412 | + | ||
413 | + | func bA (bi) = { | |
414 | + | let az = bi | |
415 | + | if ($isInstanceOf(az, "ByteVector")) | |
416 | + | then { | |
417 | + | let bB = az | |
418 | + | let bC = toBase58String(bB) | |
419 | + | let bD = valueOrErrorMessage(assetInfo(bB), (("Asset " + bC) + " doesn't exist")) | |
420 | + | $Tuple3(bC, bD.name, bD.decimals) | |
421 | + | } | |
422 | + | else if ($isInstanceOf(az, "Unit")) | |
423 | + | then { | |
424 | + | let bE = az | |
425 | + | $Tuple3("WAVES", "WAVES", 8) | |
426 | + | } | |
427 | + | else throw("Match error") | |
428 | + | } | |
429 | + | ||
430 | + | ||
431 | + | func bF (bG) = { | |
432 | + | let bH = aM() | |
433 | + | let bI = (lastBlock.height - bG) | |
434 | + | if ((bH >= bI)) | |
435 | + | then unit | |
436 | + | else throw("Large price delta.") | |
437 | + | } | |
438 | + | ||
439 | + | ||
440 | + | func bJ () = { | |
441 | + | let am = getStringValue(this, ai()) | |
442 | + | let bK = aI() | |
443 | + | let bG = getIntegerValue(bK, an(am)) | |
444 | + | let bL = bF(bG) | |
445 | + | if ((bL == bL)) | |
446 | + | then { | |
447 | + | let bM = getIntegerValue(bK, al(am)) | |
448 | + | fraction(bM, c, h) | |
449 | + | } | |
450 | + | else throw("Strict value is not equal to itself.") | |
451 | + | } | |
452 | + | ||
453 | + | ||
454 | + | func bN () = G(["%s", "admins"]) | |
455 | + | ||
456 | + | ||
457 | + | func bO (ap,aq) = G(["%s%s%s", "approve", ap, aq]) | |
458 | + | ||
459 | + | ||
460 | + | @Callable(aw) | |
461 | + | func initialize (bP,bQ) = { | |
462 | + | let bR = [au(), av(aw)] | |
463 | + | if ((bR == bR)) | |
464 | + | then { | |
465 | + | let bS = split(bQ, ",") | |
466 | + | if ((size(bS) > 10)) | |
467 | + | then throw("Too many admins") | |
468 | + | else if ((1 > size(bS))) | |
469 | + | then throw("At least 1 admin needed") | |
470 | + | else { | |
471 | + | func bT (bU,bV) = if (!(bU)) | |
472 | + | then bU | |
473 | + | else if (bs(bV)) | |
474 | + | then (bV != toString(this)) | |
475 | + | else false | |
476 | + | ||
477 | + | if (({ | |
478 | + | let bW = bS | |
479 | + | let bX = size(bW) | |
480 | + | let bY = true | |
481 | + | func bZ (ca,cb) = if ((cb >= bX)) | |
482 | + | then ca | |
483 | + | else bT(ca, bW[cb]) | |
484 | + | ||
485 | + | func cc (ca,cb) = if ((cb >= bX)) | |
486 | + | then ca | |
487 | + | else throw("List size exceeds 10") | |
488 | + | ||
489 | + | cc(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bZ(bY, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
490 | + | } == false)) | |
491 | + | then throw(("Admin cannot be this dapp " + toString(this))) | |
492 | + | else [StringEntry(K(), toString(this)), StringEntry(bN(), G(bS)), BooleanEntry(I(), true)] | |
493 | + | } | |
494 | + | } | |
495 | + | else throw("Strict value is not equal to itself.") | |
496 | + | } | |
497 | + | ||
498 | + | ||
499 | + | ||
500 | + | @Callable(aw) | |
501 | + | func approve (ap,aq) = { | |
502 | + | let bV = toString(aw.caller) | |
503 | + | let bS = getStringValue(bN()) | |
504 | + | let cd = split(bS, a) | |
505 | + | if (!(contains(bS, bV))) | |
506 | + | then throw("Not allowed") | |
507 | + | else { | |
508 | + | let bR = [bs(ap), bt(aq)] | |
509 | + | if ((bR == bR)) | |
510 | + | then { | |
511 | + | let ce = valueOrElse(getString(bO(ap, aq)), "") | |
512 | + | if (contains(ce, bV)) | |
513 | + | then throw(("Already approved by " + bV)) | |
514 | + | else { | |
515 | + | let cf = (1 + (if ((ce == "")) | |
516 | + | then 0 | |
517 | + | else size(split(ce, a)))) | |
518 | + | let cg = if ((ce == "")) | |
519 | + | then bV | |
520 | + | else ((ce + a) + bV) | |
521 | + | let ch = if ((cf > (size(cd) / 2))) | |
522 | + | then true | |
523 | + | else false | |
524 | + | [StringEntry(bO(ap, aq), cg), BooleanEntry(ao(ap, aq), ch)] | |
525 | + | } | |
526 | + | } | |
527 | + | else throw("Strict value is not equal to itself.") | |
528 | + | } | |
529 | + | } | |
530 | + | ||
531 | + | ||
532 | + | @Verifier(ci) | |
533 | + | func cj () = { | |
534 | + | let az = ay() | |
535 | + | if ($isInstanceOf(az, "String")) | |
536 | + | then { | |
537 | + | let Y = az | |
538 | + | valueOrElse(getBoolean(addressFromStringValue(Y), ao(toString(this), toBase58String(ci.id))), false) | |
539 | + | } | |
540 | + | else sigVerify(ci.bodyBytes, ci.proofs[0], ci.senderPublicKey) | |
541 | + | } | |
542 | + |
github/deemru/w8io/026f985 39.82 ms ◑