tx · H3JvzL9JwfmUNm7yqWx4xt75vTDfpUbX2g1p94P6Qvrx 3N6wAa7PMFZJu4Zrmp3avXmMnRTrRpMM9Lh: -0.04300000 Waves 2023.04.04 14:20 [2519750] smart account 3N6wAa7PMFZJu4Zrmp3avXmMnRTrRpMM9Lh > SELF 0.00000000 Waves
{ "type": 13, "id": "H3JvzL9JwfmUNm7yqWx4xt75vTDfpUbX2g1p94P6Qvrx", "fee": 4300000, "feeAssetId": null, "timestamp": 1680607191190, "version": 2, "chainId": 84, "sender": "3N6wAa7PMFZJu4Zrmp3avXmMnRTrRpMM9Lh", "senderPublicKey": "Cr8D7eozSzJh7XHsYTjBinPpo3SS83BrCGiBAJsjGxBo", "proofs": [ "StVDbQNdvqaDTLBqy7VTTWX7P7NZzkc65yyjMfr2k9nGhPexV8wmDZq961N2mbZMwXm1SGGDdQRNxny7ipB3m6f" ], "script": "base64:BgLGNwgCEgASBQoDAQQBEgcKBQEEAQgBEgMKAQgSABIECgIBBBIDCgEBEgQKAgEEEgQKAggBEgQKAggBEgQKAggBEgUKAwEIARIAEgQKAgEBEgMKAQESBQoDAQEBEgQKAggIEgASABIDCgEIEgUKAwEBARIECgIBARIECgIIARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAEgMKAQESAwoBARIECgIIASIKbFBkZWNpbWFscyIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiC3dhdmVzU3RyaW5nIgNTRVAiClBvb2xBY3RpdmUiD1Bvb2xQdXREaXNhYmxlZCITUG9vbE1hdGNoZXJEaXNhYmxlZCIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyINaWR4UG9vbFN0YXR1cyIQaWR4UG9vbExQQXNzZXRJZCINaWR4QW10QXNzZXRJZCIPaWR4UHJpY2VBc3NldElkIg5pZHhBbXRBc3NldERjbSIQaWR4UHJpY2VBc3NldERjbSIOaWR4SUFtdEFzc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QJAPEHAQUEdGhpcwMJAAACBQJpcwUCaXIJAQIhPQIFAml0BQJpcgcJAPQDAwgFAmltCWJvZHlCeXRlcwkAkQMCCAUCaW0GcHJvb2ZzAAAFAmlvvVn3RA==", "height": 2519750, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DmTF4tKBU57njZFnYSdkLxM7TWRLGN6DEoQPBn3R2cw4 Next: AA9S2DSnnMfn914syNFyppNj1dSKJVVXW1L3YdHishVJ Diff:
Old | New | Differences | |
---|---|---|---|
272 | 272 | func bJ (bK,bL,bM,bC,bF,bG) = makeString(["%d%d%d%d%d%d", toString(bK), toString(bL), toString(bM), toString(bC), toString(bF), toString(bG)], j) | |
273 | 273 | ||
274 | 274 | ||
275 | - | func bN (ar) = if ((ar == "WAVES")) | |
276 | - | then (wavesBalance(this).available + at(ar)) | |
277 | - | else if ((ar == ba())) | |
278 | - | then { | |
279 | - | let bf = aO(this, ae()) | |
280 | - | let bg = aO(this, af()) | |
281 | - | if (if (if ((bf == "WAVES")) | |
282 | - | then (bg == ba()) | |
283 | - | else false) | |
284 | - | then true | |
285 | - | else if ((bg == "WAVES")) | |
286 | - | then (bf == ba()) | |
287 | - | else false) | |
288 | - | then assetBalance(this, fromBase58String(ar)) | |
289 | - | else (assetBalance(this, fromBase58String(ar)) + au(ar)) | |
290 | - | } | |
275 | + | func bN (ar) = { | |
276 | + | let bO = if ((ar == "WAVES")) | |
277 | + | then wavesBalance(this).available | |
291 | 278 | else assetBalance(this, fromBase58String(ar)) | |
279 | + | let bP = ((bO + at(ar)) - au(ar)) | |
280 | + | max([0, bP]) | |
281 | + | } | |
292 | 282 | ||
293 | 283 | ||
294 | - | func | |
284 | + | func bQ (bR,bS) = fraction(bR, d, bS) | |
295 | 285 | ||
296 | 286 | ||
297 | - | func | |
287 | + | func bT (bR,bS,L) = fraction(bR, d, bS, L) | |
298 | 288 | ||
299 | 289 | ||
300 | - | func | |
301 | - | let | |
302 | - | if (( | |
290 | + | func bU (bV) = { | |
291 | + | let bW = invoke(bV, "getRate", nil, nil) | |
292 | + | if ((bW == bW)) | |
303 | 293 | then { | |
304 | - | let | |
305 | - | if ($isInstanceOf( | |
294 | + | let bX = bW | |
295 | + | if ($isInstanceOf(bX, "Int")) | |
306 | 296 | then { | |
307 | - | let | |
308 | - | | |
297 | + | let bY = bX | |
298 | + | bY | |
309 | 299 | } | |
310 | 300 | else aS("proxy.getRate() unexpected value") | |
311 | 301 | } | |
313 | 303 | } | |
314 | 304 | ||
315 | 305 | ||
316 | - | func | |
317 | - | let | |
318 | - | if (( | |
306 | + | func bZ (ar,ca,cb,bV) = { | |
307 | + | let cc = at(ar) | |
308 | + | if ((cc == cc)) | |
319 | 309 | then { | |
320 | - | let | |
321 | - | if (( | |
310 | + | let cd = au(cb) | |
311 | + | if ((cd == cd)) | |
322 | 312 | then { | |
323 | - | let | |
324 | - | if (( | |
313 | + | let ce = bh(ar) | |
314 | + | if ((ca > 0)) | |
325 | 315 | then { | |
326 | - | let | |
327 | - | if (( | |
316 | + | let cf = invoke(bV, "deposit", nil, [AttachedPayment(ce, ca)]) | |
317 | + | if ((cf == cf)) | |
328 | 318 | then { | |
329 | - | let | |
330 | - | if ($isInstanceOf( | |
319 | + | let bX = cf | |
320 | + | if ($isInstanceOf(bX, "Int")) | |
331 | 321 | then { | |
332 | - | let | |
333 | - | let | |
334 | - | let | |
335 | - | [IntegerEntry(aq(ar), | |
322 | + | let cg = bX | |
323 | + | let ch = (cc + ca) | |
324 | + | let ci = (cd + cg) | |
325 | + | [IntegerEntry(aq(ar), ch), IntegerEntry(as(cb), ci)] | |
336 | 326 | } | |
337 | 327 | else nil | |
338 | 328 | } | |
346 | 336 | } | |
347 | 337 | ||
348 | 338 | ||
349 | - | func | |
350 | - | let | |
351 | - | if (( | |
339 | + | func cj (ar,ca,cb,bV,ck,cl) = { | |
340 | + | let cc = at(ar) | |
341 | + | if ((cc == cc)) | |
352 | 342 | then { | |
353 | - | let | |
354 | - | if (( | |
343 | + | let cd = au(cb) | |
344 | + | if ((cd == cd)) | |
355 | 345 | then { | |
356 | - | let | |
357 | - | if (( | |
346 | + | let cm = bU(bV) | |
347 | + | if ((cm == cm)) | |
358 | 348 | then { | |
359 | - | let | |
360 | - | let | |
361 | - | let | |
362 | - | let | |
363 | - | let | |
364 | - | if (( | |
349 | + | let cn = fraction(ck, cc, cd) | |
350 | + | let co = bh(cb) | |
351 | + | let cp = fraction(ck, ca, cn) | |
352 | + | let cq = fraction(ck, ca, cm) | |
353 | + | let cr = max([0, (cp - cq)]) | |
354 | + | if ((cq > 0)) | |
365 | 355 | then { | |
366 | - | let | |
367 | - | if (( | |
356 | + | let cs = invoke(bV, "withdraw", nil, [AttachedPayment(co, cq)]) | |
357 | + | if ((cs == cs)) | |
368 | 358 | then { | |
369 | - | let | |
370 | - | if ($isInstanceOf( | |
359 | + | let bX = cs | |
360 | + | if ($isInstanceOf(bX, "Int")) | |
371 | 361 | then { | |
372 | - | let | |
373 | - | let | |
374 | - | let | |
375 | - | [IntegerEntry(aq(ar), | |
362 | + | let ct = bX | |
363 | + | let ch = (cc - ct) | |
364 | + | let ci = ((cd - cq) - cr) | |
365 | + | [IntegerEntry(aq(ar), ch), IntegerEntry(as(cb), ci), ScriptTransfer(cl, cr, bh(cb))] | |
376 | 366 | } | |
377 | 367 | else nil | |
378 | 368 | } | |
388 | 378 | } | |
389 | 379 | ||
390 | 380 | ||
391 | - | func | |
381 | + | func cu (ar) = invoke(aV, "getPoolLeaseConfigREADONLY", [toString(this), ar], nil) | |
392 | 382 | ||
393 | 383 | ||
394 | - | func | |
395 | - | let | |
396 | - | if (( | |
384 | + | func cv (cw,ar,cb,cx,bV,ck,cl) = { | |
385 | + | let cc = at(ar) | |
386 | + | if ((cc == cc)) | |
397 | 387 | then { | |
398 | - | let | |
399 | - | if (( | |
388 | + | let cd = au(cb) | |
389 | + | if ((cd == cd)) | |
400 | 390 | then { | |
401 | - | let | |
402 | - | let | |
403 | - | if ($isInstanceOf( | |
391 | + | let cy = { | |
392 | + | let bX = bh(ar) | |
393 | + | if ($isInstanceOf(bX, "ByteVector")) | |
404 | 394 | then { | |
405 | - | let | |
406 | - | assetBalance(this, | |
395 | + | let cz = bX | |
396 | + | assetBalance(this, cz) | |
407 | 397 | } | |
408 | - | else if ($isInstanceOf( | |
398 | + | else if ($isInstanceOf(bX, "Unit")) | |
409 | 399 | then { | |
410 | - | let | |
400 | + | let cA = bX | |
411 | 401 | wavesBalance(this).available | |
412 | 402 | } | |
413 | 403 | else throw("Match error") | |
414 | 404 | } | |
415 | - | if (( | |
405 | + | if ((cy == cy)) | |
416 | 406 | then { | |
417 | - | let | |
418 | - | let | |
419 | - | let | |
420 | - | if (( | |
407 | + | let cB = max([0, ((cy + cc) - cx)]) | |
408 | + | let cC = fraction(cw, cB, 100) | |
409 | + | let cD = (cc - cC) | |
410 | + | if ((cD == 0)) | |
421 | 411 | then nil | |
422 | - | else if ((0 > | |
412 | + | else if ((0 > cD)) | |
423 | 413 | then { | |
424 | - | let | |
425 | - | | |
414 | + | let cE = -(cD) | |
415 | + | bZ(ar, cE, cb, bV) | |
426 | 416 | } | |
427 | 417 | else { | |
428 | - | let | |
429 | - | | |
418 | + | let cF = cD | |
419 | + | cj(ar, cF, cb, bV, ck, cl) | |
430 | 420 | } | |
431 | 421 | } | |
432 | 422 | else throw("Strict value is not equal to itself.") | |
437 | 427 | } | |
438 | 428 | ||
439 | 429 | ||
440 | - | func | |
441 | - | let | |
442 | - | if ($isInstanceOf( | |
430 | + | func cG (ar) = { | |
431 | + | let bX = cu(ar) | |
432 | + | if ($isInstanceOf(bX, "(Boolean, Int, Int, String, String, Int, String)")) | |
443 | 433 | then { | |
444 | - | let | |
445 | - | let | |
446 | - | let | |
447 | - | let | |
448 | - | let | |
449 | - | let | |
450 | - | let | |
451 | - | let | |
452 | - | let | |
453 | - | if ( | |
454 | - | then | |
434 | + | let cH = bX | |
435 | + | let cI = cH | |
436 | + | let cJ = cI._1 | |
437 | + | let cK = cI._2 | |
438 | + | let cx = cI._3 | |
439 | + | let cL = cI._4 | |
440 | + | let cM = cI._5 | |
441 | + | let ck = cI._6 | |
442 | + | let cN = cI._7 | |
443 | + | if (cJ) | |
444 | + | then cv(cK, ar, cM, cx, addressFromStringValue(cL), ck, addressFromStringValue(cN)) | |
455 | 445 | else nil | |
456 | 446 | } | |
457 | 447 | else aS((("[" + ar) + "] Rebalance error")) | |
458 | 448 | } | |
459 | 449 | ||
460 | 450 | ||
461 | - | func | |
462 | - | let | |
463 | - | if ($isInstanceOf( | |
451 | + | func cO (ar,ca) = { | |
452 | + | let bX = cu(ar) | |
453 | + | if ($isInstanceOf(bX, "(Boolean, Int, Int, String, String, Int, String)")) | |
464 | 454 | then { | |
465 | - | let | |
466 | - | let | |
467 | - | let | |
468 | - | let | |
469 | - | let | |
470 | - | let | |
471 | - | let | |
472 | - | let | |
473 | - | let | |
474 | - | if ( | |
475 | - | then | |
455 | + | let cH = bX | |
456 | + | let cP = cH | |
457 | + | let cJ = cP._1 | |
458 | + | let cK = cP._2 | |
459 | + | let cx = cP._3 | |
460 | + | let cL = cP._4 | |
461 | + | let cM = cP._5 | |
462 | + | let ck = cP._6 | |
463 | + | let cN = cP._7 | |
464 | + | if (cJ) | |
465 | + | then cj(ar, ca, cM, addressFromStringValue(cL), ck, addressFromStringValue(cN)) | |
476 | 466 | else nil | |
477 | 467 | } | |
478 | 468 | else aS((("[" + ar) + "] withdrawAssetWrapper() error")) | |
479 | 469 | } | |
480 | 470 | ||
481 | 471 | ||
482 | - | func | |
483 | - | let | |
484 | - | let | |
485 | - | if ($isInstanceOf( | |
472 | + | func cQ (ar,ca) = { | |
473 | + | let cR = { | |
474 | + | let bX = bh(ar) | |
475 | + | if ($isInstanceOf(bX, "ByteVector")) | |
486 | 476 | then { | |
487 | - | let | |
488 | - | assetBalance(this, | |
477 | + | let cz = bX | |
478 | + | assetBalance(this, cz) | |
489 | 479 | } | |
490 | - | else if ($isInstanceOf( | |
480 | + | else if ($isInstanceOf(bX, "Unit")) | |
491 | 481 | then { | |
492 | - | let | |
482 | + | let cS = bX | |
493 | 483 | wavesBalance(this).available | |
494 | 484 | } | |
495 | 485 | else throw("Match error") | |
496 | 486 | } | |
497 | - | if (( | |
487 | + | if ((ca > cR)) | |
498 | 488 | then { | |
499 | - | let | |
500 | - | | |
489 | + | let cT = (ca - cR) | |
490 | + | cO(ar, cT) | |
501 | 491 | } | |
502 | 492 | else nil | |
503 | 493 | } | |
504 | 494 | ||
505 | 495 | ||
506 | - | func | |
507 | - | let | |
508 | - | let | |
509 | - | | |
496 | + | func cU (cV,cW,cX,cY) = { | |
497 | + | let cZ = D(cX, cV) | |
498 | + | let da = D(cY, cW) | |
499 | + | bQ(da, cZ) | |
510 | 500 | } | |
511 | 501 | ||
512 | 502 | ||
513 | - | func | |
514 | - | let | |
515 | - | let | |
516 | - | let | |
517 | - | let | |
518 | - | let | |
519 | - | let | |
520 | - | let | |
521 | - | let | |
522 | - | let | |
523 | - | [ | |
503 | + | func db (cX,cY,dc) = { | |
504 | + | let dd = be() | |
505 | + | let de = parseIntValue(dd[t]) | |
506 | + | let df = parseIntValue(dd[u]) | |
507 | + | let dg = cU(de, df, cX, cY) | |
508 | + | let bS = D(cX, de) | |
509 | + | let bR = D(cY, df) | |
510 | + | let dh = D(dc, b) | |
511 | + | let di = bQ(bS, dh) | |
512 | + | let dj = bQ(bR, dh) | |
513 | + | [dg, di, dj] | |
524 | 514 | } | |
525 | 515 | ||
526 | 516 | ||
527 | - | func | |
528 | - | let | |
529 | - | [H( | |
517 | + | func dk (cX,cY,dc) = { | |
518 | + | let dl = db(cX, cY, dc) | |
519 | + | [H(dl[0], b), H(dl[1], b), H(dl[2], b)] | |
530 | 520 | } | |
531 | 521 | ||
532 | 522 | ||
533 | - | func | |
534 | - | let | |
535 | - | let | |
536 | - | let | |
537 | - | let | |
538 | - | let | |
539 | - | let | |
540 | - | let | |
541 | - | let | |
542 | - | if (( | |
523 | + | func dm (dn,do,dp,ab) = { | |
524 | + | let dd = be() | |
525 | + | let dq = dd[q] | |
526 | + | let dr = dd[r] | |
527 | + | let ds = dd[s] | |
528 | + | let cV = parseIntValue(dd[t]) | |
529 | + | let cW = parseIntValue(dd[u]) | |
530 | + | let dt = dd[p] | |
531 | + | let du = valueOrErrorMessage(assetInfo(fromBase58String(dq)), (("Asset " + dq) + " doesn't exist")).quantity | |
532 | + | if ((dq != do)) | |
543 | 533 | then throw("Invalid asset passed.") | |
544 | 534 | else { | |
545 | - | let | |
546 | - | let | |
547 | - | let | |
548 | - | let | |
549 | - | let | |
550 | - | let | |
551 | - | let | |
552 | - | let | |
553 | - | let | |
554 | - | let | |
555 | - | let | |
556 | - | let | |
557 | - | let | |
558 | - | if (( | |
535 | + | let dv = bN(dr) | |
536 | + | let dw = D(dv, cV) | |
537 | + | let dx = bN(ds) | |
538 | + | let dy = D(dx, cW) | |
539 | + | let dz = bQ(dy, dw) | |
540 | + | let dA = H(dz, b) | |
541 | + | let dB = D(dp, b) | |
542 | + | let dC = D(du, b) | |
543 | + | let dD = fraction(dw, dB, dC) | |
544 | + | let dE = fraction(dy, dB, dC) | |
545 | + | let dF = K(dD, cV, FLOOR) | |
546 | + | let dG = K(dE, cW, FLOOR) | |
547 | + | let dH = cQ(dr, dF) | |
548 | + | if ((dH == dH)) | |
559 | 549 | then { | |
560 | - | let | |
561 | - | if (( | |
550 | + | let dI = cQ(ds, dG) | |
551 | + | if ((dI == dI)) | |
562 | 552 | then { | |
563 | - | let | |
564 | - | if (( | |
553 | + | let dJ = invoke(this, "rebalance", nil, nil) | |
554 | + | if ((dJ == dJ)) | |
565 | 555 | then { | |
566 | - | let | |
556 | + | let dK = if ((dn == "")) | |
567 | 557 | then nil | |
568 | - | else (( | |
558 | + | else ((dH ++ dI) ++ [ScriptTransfer(ab, dF, if ((dr == "WAVES")) | |
569 | 559 | then unit | |
570 | - | else fromBase58String( | |
560 | + | else fromBase58String(dr)), ScriptTransfer(ab, dG, if ((ds == "WAVES")) | |
571 | 561 | then unit | |
572 | - | else fromBase58String( | |
573 | - | $Tuple10( | |
562 | + | else fromBase58String(ds)), StringEntry(ad(toString(ab), dn), bJ(dF, dG, dp, dA, height, lastBlock.timestamp)), IntegerEntry(W(), dA), IntegerEntry(X(height, lastBlock.timestamp), dA)]) | |
563 | + | $Tuple10(dF, dG, dr, ds, dv, dx, du, dz, dt, dK) | |
574 | 564 | } | |
575 | 565 | else throw("Strict value is not equal to itself.") | |
576 | 566 | } | |
581 | 571 | } | |
582 | 572 | ||
583 | 573 | ||
584 | - | func | |
585 | - | let | |
586 | - | let | |
587 | - | let | |
588 | - | let | |
589 | - | let | |
590 | - | let | |
591 | - | let | |
592 | - | let | |
593 | - | let | |
594 | - | let | |
595 | - | let | |
596 | - | let | |
597 | - | if (if (( | |
574 | + | func dL (dn,dM,dN,dO,dP,dQ,ab,dR,dS) = { | |
575 | + | let dd = be() | |
576 | + | let dq = fromBase58String(dd[q]) | |
577 | + | let dT = dd[r] | |
578 | + | let dU = dd[s] | |
579 | + | let dV = dd[v] | |
580 | + | let dW = dd[w] | |
581 | + | let de = parseIntValue(dd[t]) | |
582 | + | let df = parseIntValue(dd[u]) | |
583 | + | let dt = dd[p] | |
584 | + | let du = valueOrErrorMessage(assetInfo(dq), (("Asset " + toBase58String(dq)) + " doesn't exist")).quantity | |
585 | + | let dX = toBase58String(valueOrElse(dO, fromBase58String("WAVES"))) | |
586 | + | let dY = toBase58String(valueOrElse(dQ, fromBase58String("WAVES"))) | |
587 | + | if (if ((dT != dX)) | |
598 | 588 | then true | |
599 | - | else ( | |
589 | + | else (dU != dY)) | |
600 | 590 | then throw("Invalid amt or price asset passed.") | |
601 | 591 | else { | |
602 | - | let | |
603 | - | then bN( | |
604 | - | else (bN( | |
605 | - | let | |
606 | - | then bN( | |
607 | - | else (bN( | |
608 | - | let | |
609 | - | let | |
610 | - | let | |
611 | - | let | |
612 | - | let | |
613 | - | let | |
592 | + | let dv = if (dR) | |
593 | + | then bN(dT) | |
594 | + | else (bN(dT) - dN) | |
595 | + | let dx = if (dR) | |
596 | + | then bN(dU) | |
597 | + | else (bN(dU) - dP) | |
598 | + | let dZ = D(dN, de) | |
599 | + | let ea = D(dP, df) | |
600 | + | let eb = bQ(ea, dZ) | |
601 | + | let dw = D(dv, de) | |
602 | + | let dy = D(dx, df) | |
603 | + | let ec = if ((du == 0)) | |
614 | 604 | then { | |
615 | - | let | |
616 | - | let | |
617 | - | let | |
618 | - | $Tuple5(H( | |
605 | + | let dz = e | |
606 | + | let ed = e | |
607 | + | let dh = pow((dZ * ea), 0, toBigInt(5), 1, 0, DOWN) | |
608 | + | $Tuple5(H(dh, b), H(dZ, de), H(ea, df), bQ((dy + ea), (dw + dZ)), ed) | |
619 | 609 | } | |
620 | 610 | else { | |
621 | - | let | |
622 | - | let | |
623 | - | let | |
624 | - | if (if (( | |
625 | - | then ( | |
611 | + | let dz = bQ(dy, dw) | |
612 | + | let ed = fraction(R((dz - eb)), d, dz) | |
613 | + | let ee = D(dM, b) | |
614 | + | if (if ((dz != e)) | |
615 | + | then (ed > ee) | |
626 | 616 | else false) | |
627 | - | then throw(((("Price slippage " + toString( | |
617 | + | then throw(((("Price slippage " + toString(ed)) + " exceeded the passed limit of ") + toString(ee))) | |
628 | 618 | else { | |
629 | - | let | |
630 | - | let | |
631 | - | let | |
632 | - | let | |
633 | - | then $Tuple2( | |
634 | - | else $Tuple2( | |
635 | - | let | |
636 | - | let | |
637 | - | let | |
638 | - | $Tuple5(K( | |
619 | + | let dC = D(du, b) | |
620 | + | let ef = fraction(dZ, bT(dy, dw, CEILING), d, CEILING) | |
621 | + | let eg = fraction(ea, d, bT(dy, dw, FLOOR), CEILING) | |
622 | + | let eh = if ((ef > ea)) | |
623 | + | then $Tuple2(eg, ea) | |
624 | + | else $Tuple2(dZ, ef) | |
625 | + | let ei = eh._1 | |
626 | + | let ej = eh._2 | |
627 | + | let dh = fraction(dC, ej, dy, FLOOR) | |
628 | + | $Tuple5(K(dh, b, FLOOR), K(ei, de, CEILING), K(ej, df, CEILING), dz, ed) | |
639 | 629 | } | |
640 | 630 | } | |
641 | - | let | |
642 | - | let | |
643 | - | let | |
644 | - | let | |
645 | - | let | |
646 | - | if ((0 >= | |
631 | + | let ek = ec._1 | |
632 | + | let el = ec._2 | |
633 | + | let em = ec._3 | |
634 | + | let dA = H(ec._4, b) | |
635 | + | let en = H(ec._5, b) | |
636 | + | if ((0 >= ek)) | |
647 | 637 | then throw("Invalid calculations. LP calculated is less than zero.") | |
648 | 638 | else { | |
649 | - | let | |
639 | + | let eo = if (!(dS)) | |
650 | 640 | then 0 | |
651 | - | else | |
652 | - | let | |
653 | - | let | |
654 | - | let | |
655 | - | $Tuple13( | |
641 | + | else ek | |
642 | + | let ep = (dN - el) | |
643 | + | let eq = (dP - em) | |
644 | + | let er = [IntegerEntry(W(), dA), IntegerEntry(X(height, lastBlock.timestamp), dA), StringEntry(aa(ab, dn), by(el, em, eo, dA, dM, en, height, lastBlock.timestamp, ep, eq))] | |
645 | + | $Tuple13(ek, eo, dA, dv, dx, du, dq, dt, er, ep, eq, dO, dQ) | |
656 | 646 | } | |
657 | 647 | } | |
658 | 648 | } | |
659 | 649 | ||
660 | 650 | ||
661 | - | func | |
662 | - | let | |
663 | - | let | |
664 | - | let | |
665 | - | if (( | |
651 | + | func es (et,eu,du) = { | |
652 | + | let ev = G(et, toBigInt(bt)) | |
653 | + | let ew = G(eu, toBigInt(bu)) | |
654 | + | let ex = fraction(pow((ev * ew), 0, toBigInt(5), 1, 18, DOWN), g, du) | |
655 | + | if ((du == f)) | |
666 | 656 | then f | |
667 | - | else | |
657 | + | else ex | |
668 | 658 | } | |
669 | 659 | ||
670 | 660 | ||
671 | - | func | |
672 | - | let | |
673 | - | let | |
674 | - | let | |
675 | - | let | |
676 | - | | |
661 | + | func ey (ez,eA,eB) = { | |
662 | + | let eC = (toBigInt(bN(bj(br))) - ez) | |
663 | + | let eD = (toBigInt(bN(bj(bs))) - eA) | |
664 | + | let eE = (toBigInt(value(assetInfo(bq)).quantity) - eB) | |
665 | + | let eF = es(eC, eD, eE) | |
666 | + | eF | |
677 | 667 | } | |
678 | 668 | ||
679 | 669 | ||
680 | - | func | |
681 | - | let | |
682 | - | let | |
683 | - | let | |
684 | - | let | |
685 | - | let | |
686 | - | $Tuple2( | |
670 | + | func eG (eH,eI,eB) = { | |
671 | + | let eC = (bN(bj(br)) + eH) | |
672 | + | let eD = (bN(bj(bs)) + eI) | |
673 | + | let eE = (value(assetInfo(bq)).quantity + eB) | |
674 | + | let ex = es(toBigInt(eC), toBigInt(eD), toBigInt(eE)) | |
675 | + | let eJ = [IntegerEntry(ak, height), StringEntry(aj, toString(ex))] | |
676 | + | $Tuple2(eJ, ex) | |
687 | 677 | } | |
688 | 678 | ||
689 | 679 | ||
690 | - | func | |
680 | + | func eK (eL,ex) = if ((ex >= eL)) | |
691 | 681 | then true | |
692 | - | else aS(makeString(["updated KLp lower than current KLp", toString( | |
682 | + | else aS(makeString(["updated KLp lower than current KLp", toString(eL), toString(ex)], " ")) | |
693 | 683 | ||
694 | 684 | ||
695 | - | func | |
696 | - | let | |
697 | - | let | |
698 | - | let | |
699 | - | let | |
700 | - | let | |
701 | - | then $Tuple2( | |
702 | - | else $Tuple2(-( | |
703 | - | let | |
704 | - | let | |
685 | + | func eM (eN) = { | |
686 | + | let eC = bN(bj(br)) | |
687 | + | let eD = bN(bj(bs)) | |
688 | + | let eO = eN.amount | |
689 | + | let eP = fraction(eN.amount, eN.price, b, FLOOR) | |
690 | + | let eQ = if ((eN.orderType == Buy)) | |
691 | + | then $Tuple2(eO, -(eP)) | |
692 | + | else $Tuple2(-(eO), eP) | |
693 | + | let eH = eQ._1 | |
694 | + | let eI = eQ._2 | |
705 | 695 | if (if (if (bc()) | |
706 | 696 | then true | |
707 | 697 | else (bp == m)) | |
708 | 698 | then true | |
709 | 699 | else (bp == n)) | |
710 | 700 | then throw("Exchange operations disabled") | |
711 | - | else if (if (( | |
701 | + | else if (if ((eN.assetPair.amountAsset != br)) | |
712 | 702 | then true | |
713 | - | else ( | |
703 | + | else (eN.assetPair.priceAsset != bs)) | |
714 | 704 | then throw("Wrong order assets.") | |
715 | 705 | else { | |
716 | - | let | |
717 | - | let | |
718 | - | let | |
719 | - | let | |
720 | - | let | |
721 | - | let | |
722 | - | $Tuple2( | |
706 | + | let eR = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aj), "0")), aU("invalid kLp")) | |
707 | + | let eS = eG(eH, eI, 0) | |
708 | + | let eT = eS._1 | |
709 | + | let eU = eS._2 | |
710 | + | let eV = (eU >= eR) | |
711 | + | let eW = makeString(["kLp=", toString(eR), " kLpNew=", toString(eU), " amountAssetBalance=", toString(eC), " priceAssetBalance=", toString(eD), " amountAssetBalanceDelta=", toString(eH), " priceAssetBalanceDelta=", toString(eI), " height=", toString(height)], "") | |
712 | + | $Tuple2(eV, eW) | |
723 | 713 | } | |
724 | 714 | } | |
725 | 715 | ||
726 | 716 | ||
727 | - | func | |
717 | + | func eX (eY) = if ((size(eY.payments) != 1)) | |
728 | 718 | then throw("exactly 1 payment is expected") | |
729 | 719 | else { | |
730 | - | let | |
731 | - | let | |
732 | - | let | |
733 | - | let | |
734 | - | let | |
735 | - | let | |
736 | - | let | |
737 | - | let | |
720 | + | let eZ = value(eY.payments[0]) | |
721 | + | let do = value(eZ.assetId) | |
722 | + | let fa = eZ.amount | |
723 | + | let ec = dm(toBase58String(eY.transactionId), toBase58String(do), fa, eY.caller) | |
724 | + | let dF = ec._1 | |
725 | + | let dG = ec._2 | |
726 | + | let dt = parseIntValue(ec._9) | |
727 | + | let dK = ec._10 | |
738 | 728 | if (if (bc()) | |
739 | 729 | then true | |
740 | - | else ( | |
741 | - | then throw(("Get operation is blocked by admin. Status = " + toString( | |
742 | - | else $Tuple5( | |
730 | + | else (dt == n)) | |
731 | + | then throw(("Get operation is blocked by admin. Status = " + toString(dt))) | |
732 | + | else $Tuple5(dF, dG, fa, do, dK) | |
743 | 733 | } | |
744 | 734 | ||
745 | 735 | ||
746 | - | func | |
736 | + | func fb (eY,dM,dS) = if ((size(eY.payments) != 2)) | |
747 | 737 | then throw("exactly 2 payments are expected") | |
748 | 738 | else { | |
749 | - | let | |
750 | - | let | |
751 | - | let | |
752 | - | let | |
739 | + | let fc = value(eY.payments[0]) | |
740 | + | let fd = value(eY.payments[1]) | |
741 | + | let fe = dL(toBase58String(eY.transactionId), dM, fc.amount, fc.assetId, fd.amount, fd.assetId, toString(eY.caller), false, dS) | |
742 | + | let dt = parseIntValue(fe._8) | |
753 | 743 | if (if (if (bc()) | |
754 | 744 | then true | |
755 | - | else ( | |
745 | + | else (dt == l)) | |
756 | 746 | then true | |
757 | - | else ( | |
758 | - | then throw(("Put operation is blocked by admin. Status = " + toString( | |
759 | - | else | |
747 | + | else (dt == n)) | |
748 | + | then throw(("Put operation is blocked by admin. Status = " + toString(dt))) | |
749 | + | else fe | |
760 | 750 | } | |
761 | 751 | ||
762 | 752 | ||
763 | - | func | |
764 | - | let | |
765 | - | if (( | |
753 | + | func ff (ca) = { | |
754 | + | let fg = invoke(aV, "emit", [ca], nil) | |
755 | + | if ((fg == fg)) | |
766 | 756 | then { | |
767 | - | let | |
768 | - | let | |
769 | - | if ($isInstanceOf( | |
757 | + | let fh = { | |
758 | + | let bX = fg | |
759 | + | if ($isInstanceOf(bX, "Address")) | |
770 | 760 | then { | |
771 | - | let | |
772 | - | invoke( | |
761 | + | let fi = bX | |
762 | + | invoke(fi, "emit", [ca], nil) | |
773 | 763 | } | |
774 | 764 | else unit | |
775 | 765 | } | |
776 | - | if (( | |
777 | - | then | |
766 | + | if ((fh == fh)) | |
767 | + | then ca | |
778 | 768 | else throw("Strict value is not equal to itself.") | |
779 | 769 | } | |
780 | 770 | else throw("Strict value is not equal to itself.") | |
781 | 771 | } | |
782 | 772 | ||
783 | 773 | ||
784 | - | func | |
785 | - | let | |
774 | + | func fj (ca,ai) = { | |
775 | + | let fk = if ((ai == 0)) | |
786 | 776 | then 0 | |
787 | - | else fraction( | |
788 | - | $Tuple2(( | |
777 | + | else fraction(ca, ai, b) | |
778 | + | $Tuple2((ca - fk), fk) | |
789 | 779 | } | |
790 | 780 | ||
791 | 781 | ||
792 | - | func | |
793 | - | let | |
794 | - | let | |
795 | - | let | |
796 | - | let | |
782 | + | func fl (fm,fn,ab,ac) = { | |
783 | + | let fo = (ac == unit) | |
784 | + | let fp = bN(bj(br)) | |
785 | + | let fq = bN(bj(bs)) | |
786 | + | let fr = if ((fn == br)) | |
797 | 787 | then true | |
798 | - | else if (( | |
788 | + | else if ((fn == bs)) | |
799 | 789 | then false | |
800 | 790 | else aS("invalid asset") | |
801 | - | let | |
802 | - | then $Tuple2( | |
803 | - | else if ( | |
804 | - | then $Tuple2(( | |
805 | - | else $Tuple2( | |
806 | - | let | |
807 | - | let | |
808 | - | let | |
809 | - | then $Tuple2( | |
810 | - | else $Tuple2(0, | |
811 | - | let | |
812 | - | let | |
813 | - | let | |
814 | - | let | |
815 | - | let | |
816 | - | let | |
817 | - | let | |
818 | - | let | |
819 | - | let | |
820 | - | let | |
821 | - | let | |
822 | - | let | |
823 | - | then | |
824 | - | else | |
825 | - | let | |
826 | - | let | |
827 | - | let | |
791 | + | let fs = if (fo) | |
792 | + | then $Tuple2(fp, fq) | |
793 | + | else if (fr) | |
794 | + | then $Tuple2((fp - fm), fq) | |
795 | + | else $Tuple2(fp, (fq - fm)) | |
796 | + | let ft = fs._1 | |
797 | + | let fu = fs._2 | |
798 | + | let fv = if (fr) | |
799 | + | then $Tuple2(fm, 0) | |
800 | + | else $Tuple2(0, fm) | |
801 | + | let fw = fv._1 | |
802 | + | let fx = fv._2 | |
803 | + | let eO = fj(fw, aX)._1 | |
804 | + | let eP = fj(fx, aX)._1 | |
805 | + | let fy = fj(fm, aX) | |
806 | + | let fz = fy._1 | |
807 | + | let fk = fy._2 | |
808 | + | let fA = (ft + eO) | |
809 | + | let fB = (fu + eP) | |
810 | + | let fC = bQ(D(fB, bu), D(fA, bt)) | |
811 | + | let fD = H(fC, b) | |
812 | + | let fE = if (fr) | |
813 | + | then ft | |
814 | + | else fu | |
815 | + | let fF = toBigInt(fE) | |
816 | + | let fG = toBigInt(valueOrErrorMessage(assetInfo(bq), (("asset " + toBase58String(bq)) + " doesn't exist")).quantity) | |
817 | + | let fH = if ((fG > f)) | |
828 | 818 | then true | |
829 | 819 | else aS("initial deposit requires all coins") | |
830 | - | if (( | |
820 | + | if ((fH == fH)) | |
831 | 821 | then { | |
832 | - | let | |
833 | - | let | |
834 | - | let | |
822 | + | let fI = toBigInt(fz) | |
823 | + | let fJ = max([0, toInt(((fG * (sqrtBigInt((d + ((fI * d) / fF)), 18, 18, DOWN) - d)) / d))]) | |
824 | + | let er = if (fo) | |
835 | 825 | then nil | |
836 | - | else [IntegerEntry(W(), | |
837 | - | let | |
838 | - | let | |
839 | - | let | |
840 | - | let | |
841 | - | then $Tuple2( | |
842 | - | else $Tuple2( | |
843 | - | let | |
844 | - | let | |
845 | - | let | |
846 | - | fraction(( | |
826 | + | else [IntegerEntry(W(), fD), IntegerEntry(X(height, lastBlock.timestamp), fD), StringEntry(aa(toString(value(ab)), toBase58String(value(ac))), by(fw, fx, fJ, fD, 0, 0, height, lastBlock.timestamp, 0, 0))] | |
827 | + | let fK = bQ(D(fu, bu), D(ft, bt)) | |
828 | + | let fL = H(fK, b) | |
829 | + | let fM = { | |
830 | + | let fN = if (fr) | |
831 | + | then $Tuple2(fw, ft) | |
832 | + | else $Tuple2(fx, fu) | |
833 | + | let ca = fN._1 | |
834 | + | let fO = fN._2 | |
835 | + | let fP = toInt(fraction(fG, toBigInt((ca / 2)), toBigInt(fO))) | |
836 | + | fraction((fJ - fP), b, fP) | |
847 | 837 | } | |
848 | - | $Tuple5( | |
838 | + | $Tuple5(fJ, er, fk, fM, fr) | |
849 | 839 | } | |
850 | 840 | else throw("Strict value is not equal to itself.") | |
851 | 841 | } | |
852 | 842 | ||
853 | 843 | ||
854 | - | func | |
855 | - | let | |
856 | - | let | |
857 | - | let | |
858 | - | let | |
859 | - | let | |
844 | + | func fQ (fR,fz,fn,ab,ac) = { | |
845 | + | let fo = (ac == unit) | |
846 | + | let dd = be() | |
847 | + | let de = parseIntValue(dd[t]) | |
848 | + | let df = parseIntValue(dd[u]) | |
849 | + | let fS = [if ((fn == bq)) | |
860 | 850 | then true | |
861 | 851 | else aS("invalid lp asset")] | |
862 | - | if (( | |
852 | + | if ((fS == fS)) | |
863 | 853 | then { | |
864 | - | let | |
854 | + | let fT = if ((fR == br)) | |
865 | 855 | then true | |
866 | - | else if (( | |
856 | + | else if ((fR == bs)) | |
867 | 857 | then false | |
868 | 858 | else aS("invalid asset") | |
869 | - | let | |
859 | + | let fU = if (fT) | |
870 | 860 | then toBigInt(bN(bj(br))) | |
871 | 861 | else toBigInt(bN(bj(bs))) | |
872 | - | let fT = if (fR) | |
873 | - | then dc | |
874 | - | else dd | |
875 | - | let fU = bN(bj(br)) | |
876 | - | let fV = bN(bj(bs)) | |
877 | - | let fW = if (fR) | |
878 | - | then fU | |
879 | - | else fV | |
880 | - | let fX = toBigInt(fW) | |
881 | - | let fE = toBigInt(valueOrErrorMessage(assetInfo(bq), (("asset " + toBase58String(bq)) + " doesn't exist")).quantity) | |
882 | - | let fY = toBigInt(fx) | |
883 | - | let fZ = max([0, toInt(((fS * (d - pow((d - ((fY * d) / fE)), 18, h, 0, 18, DOWN))) / d))]) | |
884 | - | let ga = fh(fZ, aZ) | |
885 | - | let gb = ga._1 | |
886 | - | let fi = ga._2 | |
887 | - | let gc = if (fR) | |
888 | - | then $Tuple4(gb, 0, (fU - fZ), fV) | |
889 | - | else $Tuple4(0, gb, fU, (fV - fZ)) | |
862 | + | let fV = if (fT) | |
863 | + | then de | |
864 | + | else df | |
865 | + | let fW = bN(bj(br)) | |
866 | + | let fX = bN(bj(bs)) | |
867 | + | let fY = if (fT) | |
868 | + | then fW | |
869 | + | else fX | |
870 | + | let fZ = toBigInt(fY) | |
871 | + | let fG = toBigInt(valueOrErrorMessage(assetInfo(bq), (("asset " + toBase58String(bq)) + " doesn't exist")).quantity) | |
872 | + | let ga = toBigInt(fz) | |
873 | + | let gb = max([0, toInt(((fU * (d - pow((d - ((ga * d) / fG)), 18, h, 0, 18, DOWN))) / d))]) | |
874 | + | let gc = fj(gb, aZ) | |
890 | 875 | let gd = gc._1 | |
891 | - | let ge = gc._2 | |
892 | - | let gf = gc._3 | |
893 | - | let gg = gc._4 | |
894 | - | let fA = bO(D(gg, bu), D(gf, bt)) | |
895 | - | let fB = H(fA, b) | |
896 | - | let ep = if (fm) | |
876 | + | let fk = gc._2 | |
877 | + | let ge = if (fT) | |
878 | + | then $Tuple4(gd, 0, (fW - gb), fX) | |
879 | + | else $Tuple4(0, gd, fW, (fX - gb)) | |
880 | + | let gf = ge._1 | |
881 | + | let gg = ge._2 | |
882 | + | let gh = ge._3 | |
883 | + | let gi = ge._4 | |
884 | + | let fC = bQ(D(gi, bu), D(gh, bt)) | |
885 | + | let fD = H(fC, b) | |
886 | + | let er = if (fo) | |
897 | 887 | then nil | |
898 | - | else [StringEntry(ad(toString(value(ab)), toBase58String(value(ac))), bJ( | |
899 | - | let | |
900 | - | let | |
901 | - | let | |
902 | - | let | |
903 | - | fraction(( | |
888 | + | else [StringEntry(ad(toString(value(ab)), toBase58String(value(ac))), bJ(gf, gg, fz, fD, height, lastBlock.timestamp)), IntegerEntry(W(), fD), IntegerEntry(X(height, lastBlock.timestamp), fD)] | |
889 | + | let fK = bQ(D(fX, bu), D(fW, bt)) | |
890 | + | let fL = H(fK, b) | |
891 | + | let fM = { | |
892 | + | let gj = (toInt(fraction(fU, ga, fG)) * 2) | |
893 | + | fraction((gd - gj), b, gj) | |
904 | 894 | } | |
905 | - | $Tuple5( | |
895 | + | $Tuple5(gd, er, fk, fM, fT) | |
906 | 896 | } | |
907 | 897 | else throw("Strict value is not equal to itself.") | |
908 | 898 | } | |
909 | 899 | ||
910 | 900 | ||
911 | - | func | |
912 | - | let | |
913 | - | if ($isInstanceOf( | |
901 | + | func gk () = { | |
902 | + | let bX = getString(U()) | |
903 | + | if ($isInstanceOf(bX, "String")) | |
914 | 904 | then { | |
915 | - | let | |
916 | - | fromBase58String( | |
905 | + | let gl = bX | |
906 | + | fromBase58String(gl) | |
917 | 907 | } | |
918 | - | else if ($isInstanceOf( | |
908 | + | else if ($isInstanceOf(bX, "Unit")) | |
919 | 909 | then unit | |
920 | 910 | else throw("Match error") | |
921 | 911 | } | |
922 | 912 | ||
923 | 913 | ||
924 | - | func | |
925 | - | let | |
926 | - | if ($isInstanceOf( | |
914 | + | func gm () = { | |
915 | + | let bX = getString(V()) | |
916 | + | if ($isInstanceOf(bX, "String")) | |
927 | 917 | then { | |
928 | - | let | |
929 | - | fromBase58String( | |
918 | + | let gl = bX | |
919 | + | fromBase58String(gl) | |
930 | 920 | } | |
931 | - | else if ($isInstanceOf( | |
921 | + | else if ($isInstanceOf(bX, "Unit")) | |
932 | 922 | then unit | |
933 | 923 | else throw("Match error") | |
934 | 924 | } | |
935 | 925 | ||
936 | 926 | ||
937 | - | func | |
938 | - | let | |
939 | - | if ($isInstanceOf( | |
927 | + | func gn (eY) = { | |
928 | + | let bX = gk() | |
929 | + | if ($isInstanceOf(bX, "ByteVector")) | |
940 | 930 | then { | |
941 | - | let | |
942 | - | ( | |
931 | + | let go = bX | |
932 | + | (eY.callerPublicKey == go) | |
943 | 933 | } | |
944 | - | else if ($isInstanceOf( | |
945 | - | then ( | |
934 | + | else if ($isInstanceOf(bX, "Unit")) | |
935 | + | then (eY.caller == this) | |
946 | 936 | else throw("Match error") | |
947 | 937 | } | |
948 | 938 | ||
949 | 939 | ||
950 | - | func | |
951 | - | let | |
952 | - | let | |
953 | - | if ($isInstanceOf( | |
940 | + | func gp (eY) = { | |
941 | + | let gq = throw("Permission denied") | |
942 | + | let bX = gk() | |
943 | + | if ($isInstanceOf(bX, "ByteVector")) | |
954 | 944 | then { | |
955 | - | let | |
956 | - | if (( | |
945 | + | let go = bX | |
946 | + | if ((eY.callerPublicKey == go)) | |
957 | 947 | then true | |
958 | - | else | |
948 | + | else gq | |
959 | 949 | } | |
960 | - | else if ($isInstanceOf( | |
961 | - | then if (( | |
950 | + | else if ($isInstanceOf(bX, "Unit")) | |
951 | + | then if ((eY.caller == this)) | |
962 | 952 | then true | |
963 | - | else | |
953 | + | else gq | |
964 | 954 | else throw("Match error") | |
965 | 955 | } | |
966 | 956 | ||
967 | 957 | ||
968 | - | @Callable( | |
969 | - | func rebalance () = ( | |
958 | + | @Callable(eY) | |
959 | + | func rebalance () = (cG(aO(this, ae())) ++ cG(aO(this, af()))) | |
970 | 960 | ||
971 | 961 | ||
972 | 962 | ||
973 | - | @Callable( | |
974 | - | func calculateAmountOutForSwapREADONLY ( | |
975 | - | let | |
963 | + | @Callable(eY) | |
964 | + | func calculateAmountOutForSwapREADONLY (gr,gs,gt) = { | |
965 | + | let gu = if ((gs == false)) | |
976 | 966 | then { | |
977 | - | let | |
978 | - | let | |
979 | - | $Tuple2( | |
967 | + | let gv = aO(this, af()) | |
968 | + | let gw = aO(this, ae()) | |
969 | + | $Tuple2(gv, gw) | |
980 | 970 | } | |
981 | 971 | else { | |
982 | - | let | |
983 | - | let | |
984 | - | $Tuple2( | |
972 | + | let gv = aO(this, ae()) | |
973 | + | let gw = aO(this, af()) | |
974 | + | $Tuple2(gv, gw) | |
985 | 975 | } | |
986 | - | let | |
987 | - | let | |
988 | - | let | |
989 | - | let | |
990 | - | let | |
991 | - | let | |
992 | - | let | |
993 | - | let | |
976 | + | let gv = gu._1 | |
977 | + | let gw = gu._2 | |
978 | + | let gx = bN(gw) | |
979 | + | let gy = bN(gv) | |
980 | + | let gz = fraction(gy, gr, (gx + gr)) | |
981 | + | let gA = (toBigInt(gx) * toBigInt(gy)) | |
982 | + | let gB = (((toBigInt(bN(gw)) + toBigInt(gr)) + toBigInt(gt)) * (toBigInt(bN(gv)) - toBigInt(gz))) | |
983 | + | let gC = if ((gB >= gA)) | |
994 | 984 | then true | |
995 | 985 | else throw("new K is fewer error") | |
996 | - | if (( | |
997 | - | then $Tuple2(nil, | |
986 | + | if ((gC == gC)) | |
987 | + | then $Tuple2(nil, gz) | |
998 | 988 | else throw("Strict value is not equal to itself.") | |
999 | 989 | } | |
1000 | 990 | ||
1001 | 991 | ||
1002 | 992 | ||
1003 | - | @Callable( | |
1004 | - | func calculateAmountOutForSwapAndSendTokens ( | |
1005 | - | let | |
993 | + | @Callable(eY) | |
994 | + | func calculateAmountOutForSwapAndSendTokens (gr,gs,gD,gE,gt) = { | |
995 | + | let gF = { | |
1006 | 996 | let aY = invoke(aV, "getSwapContractREADONLY", nil, nil) | |
1007 | 997 | if ($isInstanceOf(aY, "String")) | |
1008 | 998 | then aY | |
1009 | 999 | else throw(($getType(aY) + " couldn't be cast to String")) | |
1010 | 1000 | } | |
1011 | - | let | |
1001 | + | let fS = [if ((value(eY.payments[0]).amount >= gr)) | |
1012 | 1002 | then true | |
1013 | - | else aS("Wrong amount"), if (( | |
1003 | + | else aS("Wrong amount"), if ((eY.caller == addressFromStringValue(gF))) | |
1014 | 1004 | then true | |
1015 | 1005 | else aS("Permission denied")] | |
1016 | - | if (( | |
1006 | + | if ((fS == fS)) | |
1017 | 1007 | then { | |
1018 | - | let | |
1019 | - | let | |
1020 | - | let | |
1008 | + | let eZ = value(eY.payments[0]) | |
1009 | + | let gw = bj(eZ.assetId) | |
1010 | + | let gv = if ((gs == false)) | |
1021 | 1011 | then aO(this, af()) | |
1022 | 1012 | else aO(this, ae()) | |
1023 | - | let | |
1024 | - | let | |
1025 | - | let | |
1026 | - | let | |
1027 | - | let | |
1028 | - | let | |
1013 | + | let gx = (bN(gw) - value(eY.payments[0]).amount) | |
1014 | + | let gy = bN(gv) | |
1015 | + | let gz = fraction(gy, gr, (gx + gr)) | |
1016 | + | let gA = (toBigInt(gx) * toBigInt(gy)) | |
1017 | + | let gB = ((toBigInt(bN(gw)) + toBigInt(gt)) * (toBigInt(bN(gv)) - toBigInt(gz))) | |
1018 | + | let gC = if ((gB >= gA)) | |
1029 | 1019 | then true | |
1030 | 1020 | else throw("new K is fewer error") | |
1031 | - | if (( | |
1021 | + | if ((gC == gC)) | |
1032 | 1022 | then { | |
1033 | - | let | |
1023 | + | let gG = if ((gz >= gD)) | |
1034 | 1024 | then true | |
1035 | 1025 | else throw("Exchange result is fewer coins than expected") | |
1036 | - | if (( | |
1026 | + | if ((gG == gG)) | |
1037 | 1027 | then { | |
1038 | - | let | |
1039 | - | let | |
1040 | - | if ($isInstanceOf( | |
1028 | + | let gH = { | |
1029 | + | let bX = cu(gv) | |
1030 | + | if ($isInstanceOf(bX, "(Boolean, Int, Int, String, String, Int, String)")) | |
1041 | 1031 | then { | |
1042 | - | let | |
1043 | - | | |
1032 | + | let cH = bX | |
1033 | + | cH | |
1044 | 1034 | } | |
1045 | 1035 | else throw("error lease config") | |
1046 | 1036 | } | |
1047 | - | let | |
1048 | - | if (( | |
1037 | + | let gI = cQ(gv, gz) | |
1038 | + | if ((gI == gI)) | |
1049 | 1039 | then { | |
1050 | - | let | |
1051 | - | if (( | |
1052 | - | then $Tuple2(( | |
1040 | + | let dJ = invoke(this, "rebalance", nil, nil) | |
1041 | + | if ((dJ == dJ)) | |
1042 | + | then $Tuple2((gI ++ [ScriptTransfer(addressFromStringValue(gE), gz, bh(gv))]), gz) | |
1053 | 1043 | else throw("Strict value is not equal to itself.") | |
1054 | 1044 | } | |
1055 | 1045 | else throw("Strict value is not equal to itself.") | |
1063 | 1053 | ||
1064 | 1054 | ||
1065 | 1055 | ||
1066 | - | @Callable( | |
1067 | - | func setManager ( | |
1068 | - | let | |
1069 | - | if (( | |
1056 | + | @Callable(eY) | |
1057 | + | func setManager (gJ) = { | |
1058 | + | let gK = gp(eY) | |
1059 | + | if ((gK == gK)) | |
1070 | 1060 | then { | |
1071 | - | let | |
1072 | - | if (( | |
1073 | - | then [StringEntry(V(), | |
1061 | + | let gL = fromBase58String(gJ) | |
1062 | + | if ((gL == gL)) | |
1063 | + | then [StringEntry(V(), gJ)] | |
1074 | 1064 | else throw("Strict value is not equal to itself.") | |
1075 | 1065 | } | |
1076 | 1066 | else throw("Strict value is not equal to itself.") | |
1078 | 1068 | ||
1079 | 1069 | ||
1080 | 1070 | ||
1081 | - | @Callable( | |
1071 | + | @Callable(eY) | |
1082 | 1072 | func confirmManager () = { | |
1083 | - | let | |
1084 | - | let | |
1073 | + | let gM = gm() | |
1074 | + | let gN = if (isDefined(gM)) | |
1085 | 1075 | then true | |
1086 | 1076 | else throw("No pending manager") | |
1087 | - | if (( | |
1077 | + | if ((gN == gN)) | |
1088 | 1078 | then { | |
1089 | - | let | |
1079 | + | let gO = if ((eY.callerPublicKey == value(gM))) | |
1090 | 1080 | then true | |
1091 | 1081 | else throw("You are not pending manager") | |
1092 | - | if (( | |
1093 | - | then [StringEntry(U(), toBase58String(value( | |
1082 | + | if ((gO == gO)) | |
1083 | + | then [StringEntry(U(), toBase58String(value(gM))), DeleteEntry(V())] | |
1094 | 1084 | else throw("Strict value is not equal to itself.") | |
1095 | 1085 | } | |
1096 | 1086 | else throw("Strict value is not equal to itself.") | |
1098 | 1088 | ||
1099 | 1089 | ||
1100 | 1090 | ||
1101 | - | @Callable( | |
1102 | - | func put ( | |
1091 | + | @Callable(eY) | |
1092 | + | func put (dM,gP) = if ((0 > dM)) | |
1103 | 1093 | then throw("Invalid slippageTolerance passed") | |
1104 | 1094 | else { | |
1105 | - | let | |
1106 | - | let | |
1107 | - | let | |
1108 | - | let | |
1109 | - | let | |
1110 | - | let | |
1111 | - | let | |
1112 | - | let | |
1113 | - | let | |
1114 | - | let | |
1115 | - | let | |
1116 | - | if (( | |
1095 | + | let fe = fb(eY, dM, true) | |
1096 | + | let eo = fe._2 | |
1097 | + | let dq = fe._7 | |
1098 | + | let dK = fe._9 | |
1099 | + | let ep = fe._10 | |
1100 | + | let eq = fe._11 | |
1101 | + | let gQ = fe._12 | |
1102 | + | let gR = fe._13 | |
1103 | + | let fc = toBigInt(value(eY.payments[0]).amount) | |
1104 | + | let fd = toBigInt(value(eY.payments[1]).amount) | |
1105 | + | let eF = ey(fc, fd, toBigInt(0)) | |
1106 | + | if ((eF == eF)) | |
1117 | 1107 | then { | |
1118 | - | let | |
1119 | - | if (( | |
1108 | + | let fg = invoke(aV, "emit", [eo], nil) | |
1109 | + | if ((fg == fg)) | |
1120 | 1110 | then { | |
1121 | - | let | |
1122 | - | let | |
1123 | - | if ($isInstanceOf( | |
1111 | + | let fh = { | |
1112 | + | let bX = fg | |
1113 | + | if ($isInstanceOf(bX, "Address")) | |
1124 | 1114 | then { | |
1125 | - | let | |
1126 | - | invoke( | |
1115 | + | let fi = bX | |
1116 | + | invoke(fi, "emit", [eo], nil) | |
1127 | 1117 | } | |
1128 | 1118 | else unit | |
1129 | 1119 | } | |
1130 | - | if (( | |
1120 | + | if ((fh == fh)) | |
1131 | 1121 | then { | |
1132 | - | let | |
1133 | - | then invoke(bx, "put", nil, [AttachedPayment( | |
1122 | + | let gS = if ((ep > 0)) | |
1123 | + | then invoke(bx, "put", nil, [AttachedPayment(gQ, ep)]) | |
1134 | 1124 | else nil | |
1135 | - | if (( | |
1125 | + | if ((gS == gS)) | |
1136 | 1126 | then { | |
1137 | - | let | |
1138 | - | then invoke(bx, "put", nil, [AttachedPayment( | |
1127 | + | let gT = if ((eq > 0)) | |
1128 | + | then invoke(bx, "put", nil, [AttachedPayment(gR, eq)]) | |
1139 | 1129 | else nil | |
1140 | - | if (( | |
1130 | + | if ((gT == gT)) | |
1141 | 1131 | then { | |
1142 | - | let | |
1132 | + | let gU = if (gP) | |
1143 | 1133 | then { | |
1144 | - | let | |
1145 | - | if (( | |
1134 | + | let gV = invoke(bw, "stake", nil, [AttachedPayment(dq, eo)]) | |
1135 | + | if ((gV == gV)) | |
1146 | 1136 | then nil | |
1147 | 1137 | else throw("Strict value is not equal to itself.") | |
1148 | 1138 | } | |
1149 | - | else [ScriptTransfer( | |
1150 | - | let | |
1151 | - | if (( | |
1139 | + | else [ScriptTransfer(eY.caller, eo, dq)] | |
1140 | + | let gW = eG(0, 0, 0) | |
1141 | + | if ((gW == gW)) | |
1152 | 1142 | then { | |
1153 | - | let | |
1154 | - | let | |
1155 | - | let | |
1156 | - | if (( | |
1157 | - | then (( | |
1143 | + | let ex = gW._2 | |
1144 | + | let gX = gW._1 | |
1145 | + | let gY = eK(eF, ex) | |
1146 | + | if ((gY == gY)) | |
1147 | + | then ((dK ++ gU) ++ gX) | |
1158 | 1148 | else throw("Strict value is not equal to itself.") | |
1159 | 1149 | } | |
1160 | 1150 | else throw("Strict value is not equal to itself.") | |
1172 | 1162 | ||
1173 | 1163 | ||
1174 | 1164 | ||
1175 | - | @Callable( | |
1176 | - | func putForFree ( | |
1165 | + | @Callable(eY) | |
1166 | + | func putForFree (gZ) = if ((0 > gZ)) | |
1177 | 1167 | then throw("Invalid value passed") | |
1178 | 1168 | else { | |
1179 | - | let | |
1180 | - | let | |
1181 | - | let | |
1182 | - | let | |
1183 | - | let | |
1184 | - | if (( | |
1169 | + | let fe = fb(eY, gZ, false) | |
1170 | + | let dK = fe._9 | |
1171 | + | let fc = toBigInt(value(eY.payments[0]).amount) | |
1172 | + | let fd = toBigInt(value(eY.payments[1]).amount) | |
1173 | + | let eF = ey(fc, fd, toBigInt(0)) | |
1174 | + | if ((eF == eF)) | |
1185 | 1175 | then { | |
1186 | - | let | |
1187 | - | let | |
1188 | - | let | |
1189 | - | let | |
1190 | - | if (( | |
1191 | - | then ( | |
1176 | + | let ha = eG(0, 0, 0) | |
1177 | + | let gX = ha._1 | |
1178 | + | let ex = ha._2 | |
1179 | + | let gY = eK(eF, ex) | |
1180 | + | if ((gY == gY)) | |
1181 | + | then (dK ++ gX) | |
1192 | 1182 | else throw("Strict value is not equal to itself.") | |
1193 | 1183 | } | |
1194 | 1184 | else throw("Strict value is not equal to itself.") | |
1196 | 1186 | ||
1197 | 1187 | ||
1198 | 1188 | ||
1199 | - | @Callable( | |
1200 | - | func putOneTkn ( | |
1201 | - | let | |
1189 | + | @Callable(eY) | |
1190 | + | func putOneTkn (hb,hc) = { | |
1191 | + | let hd = { | |
1202 | 1192 | let aY = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1203 | 1193 | if ($isInstanceOf(aY, "Boolean")) | |
1204 | 1194 | then aY | |
1205 | 1195 | else throw(($getType(aY) + " couldn't be cast to Boolean")) | |
1206 | 1196 | } | |
1207 | - | let | |
1197 | + | let he = if (if (if (bc()) | |
1208 | 1198 | then true | |
1209 | 1199 | else (bp == l)) | |
1210 | 1200 | then true | |
1211 | 1201 | else (bp == n)) | |
1212 | 1202 | then true | |
1213 | - | else | |
1214 | - | let | |
1203 | + | else hd | |
1204 | + | let fS = [if (if (!(he)) | |
1215 | 1205 | then true | |
1216 | - | else | |
1206 | + | else gn(eY)) | |
1217 | 1207 | then true | |
1218 | - | else aS("put operation is blocked by admin"), if ((size( | |
1208 | + | else aS("put operation is blocked by admin"), if ((size(eY.payments) == 1)) | |
1219 | 1209 | then true | |
1220 | 1210 | else aS("exactly 1 payment are expected")] | |
1221 | - | if (( | |
1211 | + | if ((fS == fS)) | |
1222 | 1212 | then { | |
1223 | - | let | |
1224 | - | let | |
1225 | - | let | |
1226 | - | let | |
1227 | - | then | |
1228 | - | else if (( | |
1229 | - | then | |
1213 | + | let hf = eY.payments[0] | |
1214 | + | let fn = hf.assetId | |
1215 | + | let fm = hf.amount | |
1216 | + | let eF = if ((fn == br)) | |
1217 | + | then ey(toBigInt(fm), toBigInt(0), toBigInt(0)) | |
1218 | + | else if ((fn == bs)) | |
1219 | + | then ey(toBigInt(0), toBigInt(fm), toBigInt(0)) | |
1230 | 1220 | else aS("payment asset is not supported") | |
1231 | - | if (( | |
1221 | + | if ((eF == eF)) | |
1232 | 1222 | then { | |
1233 | - | let ab = | |
1234 | - | let ac = | |
1235 | - | let | |
1236 | - | if (( | |
1223 | + | let ab = eY.caller | |
1224 | + | let ac = eY.transactionId | |
1225 | + | let hg = fl(fm, fn, ab, ac) | |
1226 | + | if ((hg == hg)) | |
1237 | 1227 | then { | |
1238 | - | let | |
1239 | - | let | |
1240 | - | let | |
1241 | - | let | |
1242 | - | let | |
1243 | - | let | |
1244 | - | then ( | |
1228 | + | let fr = hg._5 | |
1229 | + | let hh = hg._4 | |
1230 | + | let fk = hg._3 | |
1231 | + | let er = hg._2 | |
1232 | + | let hi = hg._1 | |
1233 | + | let hj = if (if ((hb > 0)) | |
1234 | + | then (hb > hi) | |
1245 | 1235 | else false) | |
1246 | - | then aS(makeString(["amount to receive is less than ", toString( | |
1247 | - | else | |
1248 | - | let | |
1249 | - | if (( | |
1236 | + | then aS(makeString(["amount to receive is less than ", toString(hb)], "")) | |
1237 | + | else hi | |
1238 | + | let fg = ff(hj) | |
1239 | + | if ((fg == fg)) | |
1250 | 1240 | then { | |
1251 | - | let | |
1241 | + | let gU = if (hc) | |
1252 | 1242 | then { | |
1253 | - | let | |
1254 | - | if (( | |
1243 | + | let hk = invoke(bw, "stake", nil, [AttachedPayment(bq, hj)]) | |
1244 | + | if ((hk == hk)) | |
1255 | 1245 | then nil | |
1256 | 1246 | else throw("Strict value is not equal to itself.") | |
1257 | 1247 | } | |
1258 | - | else [ScriptTransfer( | |
1259 | - | let | |
1260 | - | then [ScriptTransfer(aW, | |
1248 | + | else [ScriptTransfer(eY.caller, hj, bq)] | |
1249 | + | let hl = if ((fk > 0)) | |
1250 | + | then [ScriptTransfer(aW, fk, fn)] | |
1261 | 1251 | else nil | |
1262 | - | let | |
1252 | + | let hm = if ((this == aW)) | |
1263 | 1253 | then $Tuple2(0, 0) | |
1264 | - | else if ( | |
1265 | - | then $Tuple2(-( | |
1266 | - | else $Tuple2(0, -( | |
1267 | - | let | |
1268 | - | let | |
1269 | - | let | |
1270 | - | let | |
1271 | - | let | |
1272 | - | let | |
1273 | - | let | |
1274 | - | if (( | |
1254 | + | else if (fr) | |
1255 | + | then $Tuple2(-(fk), 0) | |
1256 | + | else $Tuple2(0, -(fk)) | |
1257 | + | let eH = hm._1 | |
1258 | + | let eI = hm._2 | |
1259 | + | let hn = eG(eH, eI, 0) | |
1260 | + | let gX = hn._1 | |
1261 | + | let ex = hn._2 | |
1262 | + | let eR = value(getString(aj)) | |
1263 | + | let gY = eK(eF, ex) | |
1264 | + | if ((gY == gY)) | |
1275 | 1265 | then { | |
1276 | - | let | |
1277 | - | if (( | |
1278 | - | then $Tuple2(((( | |
1266 | + | let dJ = invoke(this, "rebalance", nil, nil) | |
1267 | + | if ((dJ == dJ)) | |
1268 | + | then $Tuple2((((er ++ gU) ++ hl) ++ gX), hj) | |
1279 | 1269 | else throw("Strict value is not equal to itself.") | |
1280 | 1270 | } | |
1281 | 1271 | else throw("Strict value is not equal to itself.") | |
1291 | 1281 | ||
1292 | 1282 | ||
1293 | 1283 | ||
1294 | - | @Callable( | |
1295 | - | func putOneTknREADONLY ( | |
1296 | - | let | |
1297 | - | let | |
1298 | - | let | |
1299 | - | let | |
1300 | - | let | |
1301 | - | let | |
1302 | - | $Tuple2(nil, $Tuple3( | |
1284 | + | @Callable(eY) | |
1285 | + | func putOneTknREADONLY (fn,fm) = { | |
1286 | + | let ho = fl(fm, bh(fn), unit, unit) | |
1287 | + | let hi = ho._1 | |
1288 | + | let er = ho._2 | |
1289 | + | let fk = ho._3 | |
1290 | + | let hh = ho._4 | |
1291 | + | let fr = ho._5 | |
1292 | + | $Tuple2(nil, $Tuple3(hi, fk, hh)) | |
1303 | 1293 | } | |
1304 | 1294 | ||
1305 | 1295 | ||
1306 | 1296 | ||
1307 | - | @Callable( | |
1308 | - | func getOneTkn ( | |
1309 | - | let | |
1297 | + | @Callable(eY) | |
1298 | + | func getOneTkn (hp,hb) = { | |
1299 | + | let hd = { | |
1310 | 1300 | let aY = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1311 | 1301 | if ($isInstanceOf(aY, "Boolean")) | |
1312 | 1302 | then aY | |
1313 | 1303 | else throw(($getType(aY) + " couldn't be cast to Boolean")) | |
1314 | 1304 | } | |
1315 | - | let | |
1305 | + | let hq = if (if (bc()) | |
1316 | 1306 | then true | |
1317 | 1307 | else (bp == n)) | |
1318 | 1308 | then true | |
1319 | - | else | |
1320 | - | let | |
1309 | + | else hd | |
1310 | + | let fS = [if (if (!(hq)) | |
1321 | 1311 | then true | |
1322 | - | else | |
1312 | + | else gn(eY)) | |
1323 | 1313 | then true | |
1324 | - | else aS("get operation is blocked by admin"), if ((size( | |
1314 | + | else aS("get operation is blocked by admin"), if ((size(eY.payments) == 1)) | |
1325 | 1315 | then true | |
1326 | 1316 | else aS("exactly 1 payment are expected")] | |
1327 | - | if (( | |
1317 | + | if ((fS == fS)) | |
1328 | 1318 | then { | |
1329 | - | let | |
1330 | - | let | |
1331 | - | let | |
1332 | - | let | |
1333 | - | let | |
1334 | - | if (( | |
1319 | + | let fR = bh(hp) | |
1320 | + | let hf = eY.payments[0] | |
1321 | + | let fn = hf.assetId | |
1322 | + | let fz = hf.amount | |
1323 | + | let eF = ey(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1324 | + | if ((eF == eF)) | |
1335 | 1325 | then { | |
1336 | - | let ab = | |
1337 | - | let ac = | |
1338 | - | let | |
1339 | - | if (( | |
1326 | + | let ab = eY.caller | |
1327 | + | let ac = eY.transactionId | |
1328 | + | let hr = fQ(fR, fz, fn, ab, ac) | |
1329 | + | if ((hr == hr)) | |
1340 | 1330 | then { | |
1341 | - | let | |
1342 | - | let | |
1343 | - | let | |
1344 | - | let | |
1345 | - | let | |
1346 | - | let | |
1347 | - | then ( | |
1331 | + | let fT = hr._5 | |
1332 | + | let hh = hr._4 | |
1333 | + | let fk = hr._3 | |
1334 | + | let er = hr._2 | |
1335 | + | let hs = hr._1 | |
1336 | + | let ca = if (if ((hb > 0)) | |
1337 | + | then (hb > hs) | |
1348 | 1338 | else false) | |
1349 | - | then aS(makeString(["amount to receive is less than ", toString( | |
1350 | - | else | |
1351 | - | let | |
1352 | - | let | |
1353 | - | if ($isInstanceOf( | |
1339 | + | then aS(makeString(["amount to receive is less than ", toString(hb)], "")) | |
1340 | + | else hs | |
1341 | + | let gH = { | |
1342 | + | let bX = cu(hp) | |
1343 | + | if ($isInstanceOf(bX, "(Boolean, Int, Int, String, String, Int, String)")) | |
1354 | 1344 | then { | |
1355 | - | let | |
1356 | - | | |
1345 | + | let cH = bX | |
1346 | + | cH | |
1357 | 1347 | } | |
1358 | 1348 | else throw("error lease config") | |
1359 | 1349 | } | |
1360 | - | let | |
1361 | - | if (( | |
1350 | + | let ht = invoke(aV, "burn", [fz], [AttachedPayment(fn, fz)]) | |
1351 | + | if ((ht == ht)) | |
1362 | 1352 | then { | |
1363 | - | let | |
1364 | - | if (( | |
1353 | + | let gI = cQ(hp, ca) | |
1354 | + | if ((gI == gI)) | |
1365 | 1355 | then { | |
1366 | - | let | |
1367 | - | let | |
1368 | - | then [ScriptTransfer(aW, | |
1356 | + | let hu = [ScriptTransfer(ab, ca, fR)] | |
1357 | + | let hl = if ((fk > 0)) | |
1358 | + | then [ScriptTransfer(aW, fk, fR)] | |
1369 | 1359 | else nil | |
1370 | - | let | |
1371 | - | let | |
1360 | + | let hv = { | |
1361 | + | let hw = if ((this == aW)) | |
1372 | 1362 | then 0 | |
1373 | - | else | |
1374 | - | if ( | |
1375 | - | then $Tuple2(-(( | |
1376 | - | else $Tuple2(0, -(( | |
1363 | + | else fk | |
1364 | + | if (fT) | |
1365 | + | then $Tuple2(-((ca + hw)), 0) | |
1366 | + | else $Tuple2(0, -((ca + hw))) | |
1377 | 1367 | } | |
1378 | - | let | |
1379 | - | let | |
1380 | - | let | |
1381 | - | let | |
1382 | - | let | |
1383 | - | let | |
1384 | - | if (( | |
1368 | + | let eH = hv._1 | |
1369 | + | let eI = hv._2 | |
1370 | + | let hx = eG(eH, eI, 0) | |
1371 | + | let gX = hx._1 | |
1372 | + | let ex = hx._2 | |
1373 | + | let gY = eK(eF, ex) | |
1374 | + | if ((gY == gY)) | |
1385 | 1375 | then { | |
1386 | - | let | |
1387 | - | if (( | |
1388 | - | then $Tuple2(((( | |
1376 | + | let dJ = invoke(this, "rebalance", nil, nil) | |
1377 | + | if ((dJ == dJ)) | |
1378 | + | then $Tuple2(((((er ++ gI) ++ hu) ++ hl) ++ gX), ca) | |
1389 | 1379 | else throw("Strict value is not equal to itself.") | |
1390 | 1380 | } | |
1391 | 1381 | else throw("Strict value is not equal to itself.") | |
1403 | 1393 | ||
1404 | 1394 | ||
1405 | 1395 | ||
1406 | - | @Callable( | |
1407 | - | func getOneTknREADONLY ( | |
1408 | - | let | |
1409 | - | let | |
1410 | - | let | |
1411 | - | let | |
1412 | - | let | |
1413 | - | let | |
1414 | - | $Tuple2(nil, $Tuple3( | |
1396 | + | @Callable(eY) | |
1397 | + | func getOneTknREADONLY (fR,fz) = { | |
1398 | + | let hy = fQ(bh(fR), fz, bq, unit, unit) | |
1399 | + | let hs = hy._1 | |
1400 | + | let er = hy._2 | |
1401 | + | let fk = hy._3 | |
1402 | + | let hh = hy._4 | |
1403 | + | let fT = hy._5 | |
1404 | + | $Tuple2(nil, $Tuple3(hs, fk, hh)) | |
1415 | 1405 | } | |
1416 | 1406 | ||
1417 | 1407 | ||
1418 | 1408 | ||
1419 | - | @Callable( | |
1420 | - | func unstakeAndGetOneTkn ( | |
1421 | - | let | |
1409 | + | @Callable(eY) | |
1410 | + | func unstakeAndGetOneTkn (hz,hp,hb) = { | |
1411 | + | let hd = { | |
1422 | 1412 | let aY = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1423 | 1413 | if ($isInstanceOf(aY, "Boolean")) | |
1424 | 1414 | then aY | |
1425 | 1415 | else throw(($getType(aY) + " couldn't be cast to Boolean")) | |
1426 | 1416 | } | |
1427 | - | let | |
1417 | + | let hq = if (if (bc()) | |
1428 | 1418 | then true | |
1429 | 1419 | else (bp == n)) | |
1430 | 1420 | then true | |
1431 | - | else | |
1432 | - | let | |
1421 | + | else hd | |
1422 | + | let fS = [if (if (!(hq)) | |
1433 | 1423 | then true | |
1434 | - | else | |
1424 | + | else gn(eY)) | |
1435 | 1425 | then true | |
1436 | - | else aS("get operation is blocked by admin"), if ((size( | |
1426 | + | else aS("get operation is blocked by admin"), if ((size(eY.payments) == 0)) | |
1437 | 1427 | then true | |
1438 | 1428 | else aS("no payments are expected")] | |
1439 | - | if (( | |
1429 | + | if ((fS == fS)) | |
1440 | 1430 | then { | |
1441 | - | let | |
1442 | - | let ab = | |
1443 | - | let ac = | |
1444 | - | let | |
1445 | - | if (( | |
1431 | + | let fR = bh(hp) | |
1432 | + | let ab = eY.caller | |
1433 | + | let ac = eY.transactionId | |
1434 | + | let eF = ey(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1435 | + | if ((eF == eF)) | |
1446 | 1436 | then { | |
1447 | - | let | |
1448 | - | if (( | |
1437 | + | let hA = invoke(bw, "unstake", [toBase58String(bq), hz], nil) | |
1438 | + | if ((hA == hA)) | |
1449 | 1439 | then { | |
1450 | - | let | |
1451 | - | if (( | |
1440 | + | let hB = fQ(fR, hz, bq, ab, ac) | |
1441 | + | if ((hB == hB)) | |
1452 | 1442 | then { | |
1453 | - | let | |
1454 | - | let | |
1455 | - | let | |
1456 | - | let | |
1457 | - | let | |
1458 | - | let | |
1459 | - | then ( | |
1443 | + | let fT = hB._5 | |
1444 | + | let hh = hB._4 | |
1445 | + | let fk = hB._3 | |
1446 | + | let er = hB._2 | |
1447 | + | let hs = hB._1 | |
1448 | + | let ca = if (if ((hb > 0)) | |
1449 | + | then (hb > hs) | |
1460 | 1450 | else false) | |
1461 | - | then aS(makeString(["amount to receive is less than ", toString( | |
1462 | - | else | |
1463 | - | let | |
1464 | - | if (( | |
1451 | + | then aS(makeString(["amount to receive is less than ", toString(hb)], "")) | |
1452 | + | else hs | |
1453 | + | let ht = invoke(aV, "burn", [hz], [AttachedPayment(bq, hz)]) | |
1454 | + | if ((ht == ht)) | |
1465 | 1455 | then { | |
1466 | - | let | |
1467 | - | if (( | |
1456 | + | let gI = cQ(hp, ca) | |
1457 | + | if ((gI == gI)) | |
1468 | 1458 | then { | |
1469 | - | let | |
1470 | - | let | |
1471 | - | then [ScriptTransfer(aW, | |
1459 | + | let hu = [ScriptTransfer(eY.caller, ca, fR)] | |
1460 | + | let hl = if ((fk > 0)) | |
1461 | + | then [ScriptTransfer(aW, fk, fR)] | |
1472 | 1462 | else nil | |
1473 | - | let | |
1474 | - | let | |
1463 | + | let hC = { | |
1464 | + | let hw = if ((this == aW)) | |
1475 | 1465 | then 0 | |
1476 | - | else | |
1477 | - | if ( | |
1478 | - | then $Tuple2(-(( | |
1479 | - | else $Tuple2(0, -(( | |
1466 | + | else fk | |
1467 | + | if (fT) | |
1468 | + | then $Tuple2(-((ca + hw)), 0) | |
1469 | + | else $Tuple2(0, -((ca + hw))) | |
1480 | 1470 | } | |
1481 | - | let | |
1482 | - | let | |
1483 | - | let | |
1484 | - | let | |
1485 | - | let | |
1486 | - | let | |
1487 | - | if (( | |
1471 | + | let eH = hC._1 | |
1472 | + | let eI = hC._2 | |
1473 | + | let hD = eG(eH, eI, 0) | |
1474 | + | let gX = hD._1 | |
1475 | + | let ex = hD._2 | |
1476 | + | let gY = eK(eF, ex) | |
1477 | + | if ((gY == gY)) | |
1488 | 1478 | then { | |
1489 | - | let | |
1490 | - | if (( | |
1491 | - | then $Tuple2((((( | |
1479 | + | let dJ = invoke(this, "rebalance", nil, nil) | |
1480 | + | if ((dJ == dJ)) | |
1481 | + | then $Tuple2(((((er ++ gI) ++ hu) ++ hl) ++ gX), ca) | |
1492 | 1482 | else throw("Strict value is not equal to itself.") | |
1493 | 1483 | } | |
1494 | 1484 | else throw("Strict value is not equal to itself.") | |
1508 | 1498 | ||
1509 | 1499 | ||
1510 | 1500 | ||
1511 | - | @Callable( | |
1501 | + | @Callable(eY) | |
1512 | 1502 | func get () = { | |
1513 | - | let | |
1514 | - | let | |
1515 | - | let | |
1516 | - | let | |
1517 | - | let | |
1518 | - | let | |
1519 | - | let | |
1520 | - | if (( | |
1503 | + | let ec = eX(eY) | |
1504 | + | let hE = ec._1 | |
1505 | + | let dG = ec._2 | |
1506 | + | let fa = ec._3 | |
1507 | + | let do = ec._4 | |
1508 | + | let dK = ec._5 | |
1509 | + | let eF = ey(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1510 | + | if ((eF == eF)) | |
1521 | 1511 | then { | |
1522 | - | let | |
1523 | - | if (( | |
1512 | + | let hF = invoke(aV, "burn", [fa], [AttachedPayment(do, fa)]) | |
1513 | + | if ((hF == hF)) | |
1524 | 1514 | then { | |
1525 | - | let | |
1526 | - | let | |
1527 | - | let | |
1528 | - | let | |
1529 | - | if (( | |
1530 | - | then ( | |
1515 | + | let hG = eG(-(hE), -(dG), 0) | |
1516 | + | let gX = hG._1 | |
1517 | + | let ex = hG._2 | |
1518 | + | let gY = eK(eF, ex) | |
1519 | + | if ((gY == gY)) | |
1520 | + | then (dK ++ gX) | |
1531 | 1521 | else throw("Strict value is not equal to itself.") | |
1532 | 1522 | } | |
1533 | 1523 | else throw("Strict value is not equal to itself.") | |
1537 | 1527 | ||
1538 | 1528 | ||
1539 | 1529 | ||
1540 | - | @Callable( | |
1541 | - | func getNoLess ( | |
1542 | - | let | |
1543 | - | let | |
1544 | - | let | |
1545 | - | let | |
1546 | - | let | |
1547 | - | let | |
1548 | - | if (( | |
1549 | - | then throw(((("noLessThenAmtAsset failed: " + toString( | |
1550 | - | else if (( | |
1551 | - | then throw(((("noLessThenPriceAsset failed: " + toString( | |
1530 | + | @Callable(eY) | |
1531 | + | func getNoLess (hH,hI) = { | |
1532 | + | let ec = eX(eY) | |
1533 | + | let dF = ec._1 | |
1534 | + | let dG = ec._2 | |
1535 | + | let fa = ec._3 | |
1536 | + | let do = ec._4 | |
1537 | + | let dK = ec._5 | |
1538 | + | if ((hH > dF)) | |
1539 | + | then throw(((("noLessThenAmtAsset failed: " + toString(dF)) + " < ") + toString(hH))) | |
1540 | + | else if ((hI > dG)) | |
1541 | + | then throw(((("noLessThenPriceAsset failed: " + toString(dG)) + " < ") + toString(hI))) | |
1552 | 1542 | else { | |
1553 | - | let | |
1554 | - | if (( | |
1543 | + | let eF = ey(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1544 | + | if ((eF == eF)) | |
1555 | 1545 | then { | |
1556 | - | let | |
1557 | - | if (( | |
1546 | + | let hF = invoke(aV, "burn", [fa], [AttachedPayment(do, fa)]) | |
1547 | + | if ((hF == hF)) | |
1558 | 1548 | then { | |
1559 | - | let | |
1560 | - | let | |
1561 | - | let | |
1562 | - | let | |
1563 | - | if (( | |
1564 | - | then ( | |
1549 | + | let hJ = eG(-(dF), -(dG), 0) | |
1550 | + | let gX = hJ._1 | |
1551 | + | let ex = hJ._2 | |
1552 | + | let gY = eK(eF, ex) | |
1553 | + | if ((gY == gY)) | |
1554 | + | then (dK ++ gX) | |
1565 | 1555 | else throw("Strict value is not equal to itself.") | |
1566 | 1556 | } | |
1567 | 1557 | else throw("Strict value is not equal to itself.") | |
1572 | 1562 | ||
1573 | 1563 | ||
1574 | 1564 | ||
1575 | - | @Callable( | |
1576 | - | func unstakeAndGet ( | |
1577 | - | let | |
1565 | + | @Callable(eY) | |
1566 | + | func unstakeAndGet (ca) = { | |
1567 | + | let hK = if ((size(eY.payments) != 0)) | |
1578 | 1568 | then throw("No payments are expected") | |
1579 | 1569 | else true | |
1580 | - | if (( | |
1570 | + | if ((hK == hK)) | |
1581 | 1571 | then { | |
1582 | - | let | |
1583 | - | let | |
1584 | - | let | |
1585 | - | if (( | |
1572 | + | let dd = be() | |
1573 | + | let dq = fromBase58String(dd[q]) | |
1574 | + | let eF = ey(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1575 | + | if ((eF == eF)) | |
1586 | 1576 | then { | |
1587 | - | let | |
1588 | - | if (( | |
1577 | + | let hA = invoke(bw, "unstake", [toBase58String(dq), ca], nil) | |
1578 | + | if ((hA == hA)) | |
1589 | 1579 | then { | |
1590 | - | let | |
1591 | - | let | |
1592 | - | let | |
1593 | - | let | |
1594 | - | let | |
1595 | - | let | |
1580 | + | let ec = dm(toBase58String(eY.transactionId), toBase58String(dq), ca, eY.caller) | |
1581 | + | let dF = ec._1 | |
1582 | + | let dG = ec._2 | |
1583 | + | let dt = parseIntValue(ec._9) | |
1584 | + | let dK = ec._10 | |
1585 | + | let hL = if (if (bc()) | |
1596 | 1586 | then true | |
1597 | - | else ( | |
1598 | - | then throw(("Get operation is blocked by admin. Status = " + toString( | |
1587 | + | else (dt == n)) | |
1588 | + | then throw(("Get operation is blocked by admin. Status = " + toString(dt))) | |
1599 | 1589 | else true | |
1600 | - | if (( | |
1590 | + | if ((hL == hL)) | |
1601 | 1591 | then { | |
1602 | - | let | |
1603 | - | if (( | |
1592 | + | let hF = invoke(aV, "burn", [ca], [AttachedPayment(dq, ca)]) | |
1593 | + | if ((hF == hF)) | |
1604 | 1594 | then { | |
1605 | - | let | |
1606 | - | let | |
1607 | - | let | |
1608 | - | let | |
1609 | - | if (( | |
1610 | - | then ( | |
1595 | + | let hM = eG(-(dF), -(dG), 0) | |
1596 | + | let gX = hM._1 | |
1597 | + | let ex = hM._2 | |
1598 | + | let gY = eK(eF, ex) | |
1599 | + | if ((gY == gY)) | |
1600 | + | then (dK ++ gX) | |
1611 | 1601 | else throw("Strict value is not equal to itself.") | |
1612 | 1602 | } | |
1613 | 1603 | else throw("Strict value is not equal to itself.") | |
1623 | 1613 | ||
1624 | 1614 | ||
1625 | 1615 | ||
1626 | - | @Callable( | |
1627 | - | func unstakeAndGetNoLess ( | |
1628 | - | let | |
1616 | + | @Callable(eY) | |
1617 | + | func unstakeAndGetNoLess (hz,hN,hI) = { | |
1618 | + | let hq = if (bc()) | |
1629 | 1619 | then true | |
1630 | 1620 | else (bp == n) | |
1631 | - | let | |
1621 | + | let fS = [if (!(hq)) | |
1632 | 1622 | then true | |
1633 | - | else throw("get operation is blocked by admin"), if ((size( | |
1623 | + | else throw("get operation is blocked by admin"), if ((size(eY.payments) == 0)) | |
1634 | 1624 | then true | |
1635 | 1625 | else throw("no payments are expected")] | |
1636 | - | if (( | |
1626 | + | if ((fS == fS)) | |
1637 | 1627 | then { | |
1638 | - | let | |
1639 | - | if (( | |
1628 | + | let eF = ey(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1629 | + | if ((eF == eF)) | |
1640 | 1630 | then { | |
1641 | - | let | |
1642 | - | if (( | |
1631 | + | let hA = invoke(bw, "unstake", [toBase58String(bq), hz], nil) | |
1632 | + | if ((hA == hA)) | |
1643 | 1633 | then { | |
1644 | - | let | |
1645 | - | let | |
1646 | - | let | |
1647 | - | let | |
1648 | - | let | |
1634 | + | let ec = dm(toBase58String(eY.transactionId), toBase58String(bq), hz, eY.caller) | |
1635 | + | let dF = ec._1 | |
1636 | + | let dG = ec._2 | |
1637 | + | let dK = ec._10 | |
1638 | + | let hO = [if ((dF >= hN)) | |
1649 | 1639 | then true | |
1650 | - | else throw(makeString(["amount asset amount to receive is less than ", toString( | |
1640 | + | else throw(makeString(["amount asset amount to receive is less than ", toString(hN)], "")), if ((dG >= hI)) | |
1651 | 1641 | then true | |
1652 | - | else throw(makeString(["price asset amount to receive is less than ", toString( | |
1653 | - | if (( | |
1642 | + | else throw(makeString(["price asset amount to receive is less than ", toString(hI)], ""))] | |
1643 | + | if ((hO == hO)) | |
1654 | 1644 | then { | |
1655 | - | let | |
1656 | - | if (( | |
1645 | + | let hF = invoke(aV, "burn", [hz], [AttachedPayment(bq, hz)]) | |
1646 | + | if ((hF == hF)) | |
1657 | 1647 | then { | |
1658 | - | let | |
1659 | - | let | |
1660 | - | let | |
1661 | - | let | |
1662 | - | if (( | |
1663 | - | then ( | |
1648 | + | let hP = eG(-(dF), -(dG), 0) | |
1649 | + | let gX = hP._1 | |
1650 | + | let ex = hP._2 | |
1651 | + | let gY = eK(eF, ex) | |
1652 | + | if ((gY == gY)) | |
1653 | + | then (dK ++ gX) | |
1664 | 1654 | else throw("Strict value is not equal to itself.") | |
1665 | 1655 | } | |
1666 | 1656 | else throw("Strict value is not equal to itself.") | |
1676 | 1666 | ||
1677 | 1667 | ||
1678 | 1668 | ||
1679 | - | @Callable( | |
1680 | - | func activate ( | |
1669 | + | @Callable(eY) | |
1670 | + | func activate (hQ,hR) = if ((toString(eY.caller) != toString(aV))) | |
1681 | 1671 | then throw("permissions denied") | |
1682 | - | else $Tuple2([StringEntry(ae(), | |
1672 | + | else $Tuple2([StringEntry(ae(), hQ), StringEntry(af(), hR)], "success") | |
1683 | 1673 | ||
1684 | 1674 | ||
1685 | 1675 | ||
1686 | - | @Callable( | |
1676 | + | @Callable(eY) | |
1687 | 1677 | func refreshKLp () = { | |
1688 | - | let | |
1689 | - | let | |
1678 | + | let hS = valueOrElse(getInteger(ak), 0) | |
1679 | + | let hT = if (((height - hS) >= an)) | |
1690 | 1680 | then unit | |
1691 | 1681 | else aS(makeString([toString(an), " blocks have not passed since the previous call"], "")) | |
1692 | - | if (( | |
1682 | + | if ((hT == hT)) | |
1693 | 1683 | then { | |
1694 | - | let | |
1695 | - | let | |
1696 | - | let | |
1697 | - | let | |
1698 | - | let | |
1699 | - | then | |
1684 | + | let eR = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aj), "0")), aU("invalid kLp")) | |
1685 | + | let hU = eG(0, 0, 0) | |
1686 | + | let hV = hU._1 | |
1687 | + | let ex = hU._2 | |
1688 | + | let eJ = if ((eR != ex)) | |
1689 | + | then hV | |
1700 | 1690 | else aS("nothing to refresh") | |
1701 | - | $Tuple2( | |
1691 | + | $Tuple2(eJ, toString(ex)) | |
1702 | 1692 | } | |
1703 | 1693 | else throw("Strict value is not equal to itself.") | |
1704 | 1694 | } | |
1705 | 1695 | ||
1706 | 1696 | ||
1707 | 1697 | ||
1708 | - | @Callable( | |
1698 | + | @Callable(eY) | |
1709 | 1699 | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, be()) | |
1710 | 1700 | ||
1711 | 1701 | ||
1712 | 1702 | ||
1713 | - | @Callable( | |
1703 | + | @Callable(eY) | |
1714 | 1704 | func getAccBalanceWrapperREADONLY (ar) = $Tuple2(nil, bN(ar)) | |
1715 | 1705 | ||
1716 | 1706 | ||
1717 | 1707 | ||
1718 | - | @Callable( | |
1719 | - | func calcPricesWrapperREADONLY ( | |
1720 | - | let | |
1721 | - | $Tuple2(nil, [toString( | |
1708 | + | @Callable(eY) | |
1709 | + | func calcPricesWrapperREADONLY (cX,cY,dc) = { | |
1710 | + | let dl = db(cX, cY, dc) | |
1711 | + | $Tuple2(nil, [toString(dl[0]), toString(dl[1]), toString(dl[2])]) | |
1722 | 1712 | } | |
1723 | 1713 | ||
1724 | 1714 | ||
1725 | 1715 | ||
1726 | - | @Callable( | |
1716 | + | @Callable(eY) | |
1727 | 1717 | func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F))) | |
1728 | 1718 | ||
1729 | 1719 | ||
1730 | 1720 | ||
1731 | - | @Callable( | |
1721 | + | @Callable(eY) | |
1732 | 1722 | func fromX18WrapperREADONLY (I,J) = $Tuple2(nil, H(parseBigIntValue(I), J)) | |
1733 | 1723 | ||
1734 | 1724 | ||
1735 | 1725 | ||
1736 | - | @Callable( | |
1737 | - | func calcPriceBigIntWrapperREADONLY ( | |
1726 | + | @Callable(eY) | |
1727 | + | func calcPriceBigIntWrapperREADONLY (bR,bS) = $Tuple2(nil, toString(bQ(parseBigIntValue(bR), parseBigIntValue(bS)))) | |
1738 | 1728 | ||
1739 | 1729 | ||
1740 | 1730 | ||
1741 | - | @Callable( | |
1742 | - | func estimatePutOperationWrapperREADONLY ( | |
1731 | + | @Callable(eY) | |
1732 | + | func estimatePutOperationWrapperREADONLY (dn,dM,dN,dO,dP,dQ,ab,dR,dS) = $Tuple2(nil, dL(dn, dM, dN, dO, dP, dQ, ab, dR, dS)) | |
1743 | 1733 | ||
1744 | 1734 | ||
1745 | 1735 | ||
1746 | - | @Callable( | |
1747 | - | func estimateGetOperationWrapperREADONLY ( | |
1748 | - | let | |
1749 | - | $Tuple2(nil, $Tuple10( | |
1736 | + | @Callable(eY) | |
1737 | + | func estimateGetOperationWrapperREADONLY (dn,do,dp,ab) = { | |
1738 | + | let ec = dm(dn, do, dp, addressFromStringValue(ab)) | |
1739 | + | $Tuple2(nil, $Tuple10(ec._1, ec._2, ec._3, ec._4, ec._5, ec._6, ec._7, toString(ec._8), ec._9, ec._10)) | |
1750 | 1740 | } | |
1751 | 1741 | ||
1752 | 1742 | ||
1753 | 1743 | ||
1754 | - | @Callable( | |
1744 | + | @Callable(eY) | |
1755 | 1745 | func statsREADONLY () = { | |
1756 | - | let | |
1757 | - | let | |
1758 | - | let | |
1759 | - | let | |
1760 | - | let | |
1761 | - | let | |
1762 | - | let | |
1763 | - | let | |
1764 | - | let | |
1765 | - | let | |
1766 | - | let | |
1767 | - | let | |
1746 | + | let dd = be() | |
1747 | + | let dq = fromBase58String(dd[q]) | |
1748 | + | let hW = dd[r] | |
1749 | + | let hX = dd[s] | |
1750 | + | let dV = dd[v] | |
1751 | + | let dW = dd[w] | |
1752 | + | let de = parseIntValue(dd[t]) | |
1753 | + | let df = parseIntValue(dd[u]) | |
1754 | + | let hY = valueOrErrorMessage(assetInfo(dq), (("Asset " + toBase58String(dq)) + " doesn't exist")).quantity | |
1755 | + | let hZ = bN(hW) | |
1756 | + | let ia = bN(hX) | |
1757 | + | let ib = if ((hY == 0)) | |
1768 | 1758 | then [e, e, e] | |
1769 | - | else | |
1770 | - | let | |
1771 | - | let | |
1772 | - | let | |
1773 | - | let | |
1774 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString( | |
1759 | + | else db(hZ, ia, hY) | |
1760 | + | let dA = 0 | |
1761 | + | let ic = H(ib[1], b) | |
1762 | + | let id = H(ib[2], b) | |
1763 | + | let ie = value(getInteger(aV, aF(toString(this)))) | |
1764 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(hZ), toString(ia), toString(hY), toString(dA), toString(ic), toString(id), toString(ie)], j)) | |
1775 | 1765 | } | |
1776 | 1766 | ||
1777 | 1767 | ||
1778 | 1768 | ||
1779 | - | @Callable( | |
1780 | - | func evaluatePutByAmountAssetREADONLY ( | |
1781 | - | let | |
1782 | - | let | |
1783 | - | let | |
1784 | - | let | |
1785 | - | let | |
1786 | - | let | |
1787 | - | let | |
1788 | - | let | |
1789 | - | let | |
1790 | - | let | |
1791 | - | let | |
1792 | - | let | |
1793 | - | let | |
1794 | - | let | |
1795 | - | let | |
1769 | + | @Callable(eY) | |
1770 | + | func evaluatePutByAmountAssetREADONLY (dN) = { | |
1771 | + | let dd = be() | |
1772 | + | let dq = fromBase58String(dd[q]) | |
1773 | + | let dT = dd[r] | |
1774 | + | let dr = fromBase58String(dT) | |
1775 | + | let dU = dd[s] | |
1776 | + | let ds = fromBase58String(dU) | |
1777 | + | let de = parseIntValue(dd[t]) | |
1778 | + | let df = parseIntValue(dd[u]) | |
1779 | + | let dt = dd[p] | |
1780 | + | let hY = valueOrErrorMessage(assetInfo(dq), (("Asset " + toBase58String(dq)) + " doesn't exist")).quantity | |
1781 | + | let hZ = bN(dT) | |
1782 | + | let ia = bN(dU) | |
1783 | + | let cZ = D(hZ, de) | |
1784 | + | let da = D(ia, df) | |
1785 | + | let dz = if ((hY == 0)) | |
1796 | 1786 | then e | |
1797 | - | else | |
1798 | - | let | |
1799 | - | let | |
1800 | - | let | |
1801 | - | let | |
1802 | - | let | |
1803 | - | let | |
1804 | - | let | |
1805 | - | let | |
1806 | - | let | |
1807 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString( | |
1787 | + | else bQ(da, cZ) | |
1788 | + | let dZ = D(dN, de) | |
1789 | + | let ea = fraction(dZ, dz, d) | |
1790 | + | let dP = H(ea, df) | |
1791 | + | let fe = dL("", 500000, dN, dr, dP, ds, "", true, false) | |
1792 | + | let ek = fe._1 | |
1793 | + | let if = fe._3 | |
1794 | + | let dv = fe._4 | |
1795 | + | let dx = fe._5 | |
1796 | + | let du = fe._6 | |
1797 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(ek), toString(H(dz, b)), toString(dv), toString(dx), toString(du), dt, toString(dN), toString(dP)], j)) | |
1808 | 1798 | } | |
1809 | 1799 | ||
1810 | 1800 | ||
1811 | 1801 | ||
1812 | - | @Callable( | |
1813 | - | func evaluatePutByPriceAssetREADONLY ( | |
1814 | - | let | |
1815 | - | let | |
1816 | - | let | |
1817 | - | let | |
1818 | - | let | |
1819 | - | let | |
1820 | - | let | |
1821 | - | let | |
1822 | - | let | |
1823 | - | let | |
1824 | - | let | |
1825 | - | let | |
1826 | - | let | |
1827 | - | let | |
1828 | - | let | |
1802 | + | @Callable(eY) | |
1803 | + | func evaluatePutByPriceAssetREADONLY (dP) = { | |
1804 | + | let dd = be() | |
1805 | + | let dq = fromBase58String(dd[q]) | |
1806 | + | let dT = dd[r] | |
1807 | + | let dr = fromBase58String(dT) | |
1808 | + | let dU = dd[s] | |
1809 | + | let ds = fromBase58String(dU) | |
1810 | + | let de = parseIntValue(dd[t]) | |
1811 | + | let df = parseIntValue(dd[u]) | |
1812 | + | let dt = dd[p] | |
1813 | + | let hY = valueOrErrorMessage(assetInfo(dq), (("Asset " + toBase58String(dq)) + " doesn't exist")).quantity | |
1814 | + | let ig = bN(dT) | |
1815 | + | let ih = bN(dU) | |
1816 | + | let ii = D(ig, de) | |
1817 | + | let ij = D(ih, df) | |
1818 | + | let dz = if ((hY == 0)) | |
1829 | 1819 | then e | |
1830 | - | else | |
1831 | - | let | |
1832 | - | let | |
1833 | - | let | |
1834 | - | let | |
1835 | - | let | |
1836 | - | let | |
1837 | - | let | |
1838 | - | let | |
1839 | - | let | |
1840 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString( | |
1820 | + | else bQ(ij, ii) | |
1821 | + | let ea = D(dP, df) | |
1822 | + | let dZ = fraction(ea, d, dz) | |
1823 | + | let dN = H(dZ, de) | |
1824 | + | let fe = dL("", 500000, dN, dr, dP, ds, "", true, false) | |
1825 | + | let ek = fe._1 | |
1826 | + | let if = fe._3 | |
1827 | + | let dv = fe._4 | |
1828 | + | let dx = fe._5 | |
1829 | + | let du = fe._6 | |
1830 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(ek), toString(H(dz, b)), toString(dv), toString(dx), toString(du), dt, toString(dN), toString(dP)], j)) | |
1841 | 1831 | } | |
1842 | 1832 | ||
1843 | 1833 | ||
1844 | 1834 | ||
1845 | - | @Callable( | |
1846 | - | func evaluateGetREADONLY ( | |
1847 | - | let | |
1848 | - | let | |
1849 | - | let | |
1850 | - | let | |
1851 | - | let | |
1852 | - | let | |
1853 | - | let | |
1854 | - | let | |
1855 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString( | |
1835 | + | @Callable(eY) | |
1836 | + | func evaluateGetREADONLY (ik,il) = { | |
1837 | + | let ec = dm("", ik, il, this) | |
1838 | + | let dF = ec._1 | |
1839 | + | let dG = ec._2 | |
1840 | + | let dv = ec._5 | |
1841 | + | let dx = ec._6 | |
1842 | + | let du = ec._7 | |
1843 | + | let dA = ec._8 | |
1844 | + | let dt = parseIntValue(ec._9) | |
1845 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(dF), toString(dG), toString(dv), toString(dx), toString(du), toString(dA), toString(dt)], j)) | |
1856 | 1846 | } | |
1857 | 1847 | ||
1858 | 1848 | ||
1859 | - | @Verifier( | |
1860 | - | func | |
1861 | - | let | |
1862 | - | let | |
1863 | - | if ($isInstanceOf( | |
1849 | + | @Verifier(im) | |
1850 | + | func in () = { | |
1851 | + | let io = { | |
1852 | + | let bX = gk() | |
1853 | + | if ($isInstanceOf(bX, "ByteVector")) | |
1864 | 1854 | then { | |
1865 | - | let | |
1866 | - | | |
1855 | + | let go = bX | |
1856 | + | go | |
1867 | 1857 | } | |
1868 | - | else if ($isInstanceOf( | |
1869 | - | then | |
1858 | + | else if ($isInstanceOf(bX, "Unit")) | |
1859 | + | then im.senderPublicKey | |
1870 | 1860 | else throw("Match error") | |
1871 | 1861 | } | |
1872 | - | let | |
1873 | - | if ($isInstanceOf( | |
1862 | + | let bX = im | |
1863 | + | if ($isInstanceOf(bX, "Order")) | |
1874 | 1864 | then { | |
1875 | - | let | |
1876 | - | let | |
1877 | - | let | |
1878 | - | let aK = | |
1879 | - | let aL = | |
1880 | - | let aM = sigVerify( | |
1881 | - | let aN = sigVerify( | |
1865 | + | let eN = bX | |
1866 | + | let ip = bd() | |
1867 | + | let iq = eM(eN) | |
1868 | + | let aK = iq._1 | |
1869 | + | let aL = iq._2 | |
1870 | + | let aM = sigVerify(eN.bodyBytes, eN.proofs[0], eN.senderPublicKey) | |
1871 | + | let aN = sigVerify(eN.bodyBytes, eN.proofs[1], ip) | |
1882 | 1872 | if (if (if (aK) | |
1883 | 1873 | then aM | |
1884 | 1874 | else false) | |
1887 | 1877 | then true | |
1888 | 1878 | else aJ(aK, aL, aM, aN) | |
1889 | 1879 | } | |
1890 | - | else if ($isInstanceOf( | |
1880 | + | else if ($isInstanceOf(bX, "SetScriptTransaction")) | |
1891 | 1881 | then { | |
1892 | - | let | |
1893 | - | if (sigVerify( | |
1882 | + | let gl = bX | |
1883 | + | if (sigVerify(im.bodyBytes, im.proofs[0], io)) | |
1894 | 1884 | then true | |
1895 | 1885 | else { | |
1896 | - | let | |
1897 | - | let | |
1898 | - | let | |
1899 | - | if (( | |
1900 | - | then ( | |
1886 | + | let ir = blake2b256(value(gl.script)) | |
1887 | + | let is = fromBase64String(value(getString(aV, aH()))) | |
1888 | + | let it = scriptHash(this) | |
1889 | + | if ((is == ir)) | |
1890 | + | then (it != ir) | |
1901 | 1891 | else false | |
1902 | 1892 | } | |
1903 | 1893 | } | |
1904 | - | else sigVerify( | |
1894 | + | else sigVerify(im.bodyBytes, im.proofs[0], io) | |
1905 | 1895 | } | |
1906 | 1896 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 8 | |
5 | 5 | ||
6 | 6 | let b = 100000000 | |
7 | 7 | ||
8 | 8 | let c = toBigInt(100000000) | |
9 | 9 | ||
10 | 10 | let d = toBigInt(1000000000000000000) | |
11 | 11 | ||
12 | 12 | let e = toBigInt(0) | |
13 | 13 | ||
14 | 14 | let f = toBigInt(0) | |
15 | 15 | ||
16 | 16 | let g = toBigInt(1) | |
17 | 17 | ||
18 | 18 | let h = toBigInt(2) | |
19 | 19 | ||
20 | 20 | let i = "WAVES" | |
21 | 21 | ||
22 | 22 | let j = "__" | |
23 | 23 | ||
24 | 24 | let k = 1 | |
25 | 25 | ||
26 | 26 | let l = 2 | |
27 | 27 | ||
28 | 28 | let m = 3 | |
29 | 29 | ||
30 | 30 | let n = 4 | |
31 | 31 | ||
32 | 32 | let o = 1 | |
33 | 33 | ||
34 | 34 | let p = 2 | |
35 | 35 | ||
36 | 36 | let q = 3 | |
37 | 37 | ||
38 | 38 | let r = 4 | |
39 | 39 | ||
40 | 40 | let s = 5 | |
41 | 41 | ||
42 | 42 | let t = 6 | |
43 | 43 | ||
44 | 44 | let u = 7 | |
45 | 45 | ||
46 | 46 | let v = 8 | |
47 | 47 | ||
48 | 48 | let w = 9 | |
49 | 49 | ||
50 | 50 | let x = 10 | |
51 | 51 | ||
52 | 52 | let y = 1 | |
53 | 53 | ||
54 | 54 | let z = 2 | |
55 | 55 | ||
56 | 56 | let A = 3 | |
57 | 57 | ||
58 | 58 | let B = 1 | |
59 | 59 | ||
60 | 60 | let C = 7 | |
61 | 61 | ||
62 | 62 | func D (E,F) = fraction(toBigInt(E), d, toBigInt(F)) | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func G (E,F) = fraction(E, d, F) | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func H (I,J) = toInt(fraction(I, toBigInt(J), d)) | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func K (I,J,L) = toInt(fraction(I, toBigInt(J), d, L)) | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func M (N,O,P) = fraction(N, O, P) | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func Q (I) = if ((0 > I)) | |
78 | 78 | then -(I) | |
79 | 79 | else I | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func R (I) = if ((e > I)) | |
83 | 83 | then -(I) | |
84 | 84 | else I | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func S () = "%s__swapContract" | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func T () = "%s__factoryContract" | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func U () = "%s__managerPublicKey" | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func V () = "%s__pendingManagerPublicKey" | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func W () = "%s%s__price__last" | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func X (Y,Z) = makeString(["%s%s%d%d__price__history", toString(Y), toString(Z)], j) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func aa (ab,ac) = ((("%s%s%s__P__" + ab) + "__") + ac) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func ad (ab,ac) = ((("%s%s%s__G__" + ab) + "__") + ac) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func ae () = "%s__amountAsset" | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func af () = "%s__priceAsset" | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | let ag = "%s__fee" | |
118 | 118 | ||
119 | 119 | let ah = fraction(10, b, 10000) | |
120 | 120 | ||
121 | 121 | let ai = valueOrElse(getInteger(this, ag), ah) | |
122 | 122 | ||
123 | 123 | let aj = makeString(["%s", "kLp"], j) | |
124 | 124 | ||
125 | 125 | let ak = makeString(["%s", "kLpRefreshedHeight"], j) | |
126 | 126 | ||
127 | 127 | let al = makeString(["%s", "refreshKLpDelay"], j) | |
128 | 128 | ||
129 | 129 | let am = 30 | |
130 | 130 | ||
131 | 131 | let an = valueOrElse(getInteger(this, al), am) | |
132 | 132 | ||
133 | 133 | func ao () = "%s__sWavesAssetId" | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | func ap () = "%s__sWavesProxyAddress" | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | func aq (ar) = makeString(["%s%s", "additionalBalance", ar], j) | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | func as (ar) = makeString(["%s%s", "stakingAssetBalance", ar], j) | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | func at (ar) = valueOrElse(getInteger(this, aq(ar)), 0) | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | func au (ar) = valueOrElse(getInteger(this, as(ar)), 0) | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | func av () = "%s__factoryConfig" | |
152 | 152 | ||
153 | 153 | ||
154 | 154 | func aw () = "%s%s__matcher__publicKey" | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | func ax (ay) = (("%s%s%s__" + ay) + "__mappings__poolContract2LpAsset") | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | func az (aA,aB) = (((("%d%d%s__" + aA) + "__") + aB) + "__config") | |
161 | 161 | ||
162 | 162 | ||
163 | 163 | func aC (aD) = ("%s%s%s__mappings__baseAsset2internalId__" + aD) | |
164 | 164 | ||
165 | 165 | ||
166 | 166 | func aE () = "%s__shutdown" | |
167 | 167 | ||
168 | 168 | ||
169 | 169 | func aF (aG) = ("%s%s__poolWeight__" + aG) | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | func aH () = "%s__allowedLpScriptHash" | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | let aI = "%s__feeCollectorAddress" | |
176 | 176 | ||
177 | 177 | func aJ (aK,aL,aM,aN) = throw((((((((("order validation failed: orderValid=" + toString(aK)) + " (") + aL) + ")") + " senderValid=") + toString(aM)) + " matcherValid=") + toString(aN))) | |
178 | 178 | ||
179 | 179 | ||
180 | 180 | func aO (aP,aQ) = valueOrErrorMessage(getString(aP, aQ), makeString(["mandatory ", toString(aP), ".", aQ, " is not defined"], "")) | |
181 | 181 | ||
182 | 182 | ||
183 | 183 | func aR (aP,aQ) = valueOrErrorMessage(getInteger(aP, aQ), makeString(["mandatory ", toString(aP), ".", aQ, " is not defined"], "")) | |
184 | 184 | ||
185 | 185 | ||
186 | 186 | func aS (aT) = throw(makeString(["lp.ride:", aT], " ")) | |
187 | 187 | ||
188 | 188 | ||
189 | 189 | func aU (aT) = makeString(["lp.ride:", aT], " ") | |
190 | 190 | ||
191 | 191 | ||
192 | 192 | let aV = addressFromStringValue(aO(this, T())) | |
193 | 193 | ||
194 | 194 | let aW = addressFromStringValue(aO(aV, aI)) | |
195 | 195 | ||
196 | 196 | let aX = { | |
197 | 197 | let aY = invoke(aV, "getInFeeREADONLY", [toString(this)], nil) | |
198 | 198 | if ($isInstanceOf(aY, "Int")) | |
199 | 199 | then aY | |
200 | 200 | else throw(($getType(aY) + " couldn't be cast to Int")) | |
201 | 201 | } | |
202 | 202 | ||
203 | 203 | let aZ = { | |
204 | 204 | let aY = invoke(aV, "getOutFeeREADONLY", [toString(this)], nil) | |
205 | 205 | if ($isInstanceOf(aY, "Int")) | |
206 | 206 | then aY | |
207 | 207 | else throw(($getType(aY) + " couldn't be cast to Int")) | |
208 | 208 | } | |
209 | 209 | ||
210 | 210 | func ba () = aO(aV, ao()) | |
211 | 211 | ||
212 | 212 | ||
213 | 213 | func bb () = aO(aV, ap()) | |
214 | 214 | ||
215 | 215 | ||
216 | 216 | func bc () = valueOrElse(getBoolean(aV, aE()), false) | |
217 | 217 | ||
218 | 218 | ||
219 | 219 | func bd () = fromBase58String(aO(aV, aw())) | |
220 | 220 | ||
221 | 221 | ||
222 | 222 | func be () = { | |
223 | 223 | let bf = aO(this, ae()) | |
224 | 224 | let bg = aO(this, af()) | |
225 | 225 | let aB = aR(aV, aC(bg)) | |
226 | 226 | let aA = aR(aV, aC(bf)) | |
227 | 227 | split(aO(aV, az(toString(aA), toString(aB))), j) | |
228 | 228 | } | |
229 | 229 | ||
230 | 230 | ||
231 | 231 | func bh (bi) = if ((bi == i)) | |
232 | 232 | then unit | |
233 | 233 | else fromBase58String(bi) | |
234 | 234 | ||
235 | 235 | ||
236 | 236 | func bj (bi) = if ((bi == unit)) | |
237 | 237 | then i | |
238 | 238 | else toBase58String(value(bi)) | |
239 | 239 | ||
240 | 240 | ||
241 | 241 | func bk (bl) = $Tuple7(addressFromStringValue(bl[o]), parseIntValue(bl[p]), fromBase58String(bl[q]), bh(bl[r]), bh(bl[s]), parseIntValue(bl[t]), parseIntValue(bl[u])) | |
242 | 242 | ||
243 | 243 | ||
244 | 244 | let bm = bk(be()) | |
245 | 245 | ||
246 | 246 | let bn = bm | |
247 | 247 | ||
248 | 248 | let bo = bn._1 | |
249 | 249 | ||
250 | 250 | let bp = bn._2 | |
251 | 251 | ||
252 | 252 | let bq = bn._3 | |
253 | 253 | ||
254 | 254 | let br = bn._4 | |
255 | 255 | ||
256 | 256 | let bs = bn._5 | |
257 | 257 | ||
258 | 258 | let bt = bn._6 | |
259 | 259 | ||
260 | 260 | let bu = bn._7 | |
261 | 261 | ||
262 | 262 | func bv () = split(aO(aV, av()), j) | |
263 | 263 | ||
264 | 264 | ||
265 | 265 | let bw = valueOrErrorMessage(addressFromString(bv()[B]), "incorrect staking address") | |
266 | 266 | ||
267 | 267 | let bx = valueOrErrorMessage(addressFromString(bv()[C]), "incorrect staking address") | |
268 | 268 | ||
269 | 269 | func by (bz,bA,bB,bC,bD,bE,bF,bG,bH,bI) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bz), toString(bA), toString(bB), toString(bC), toString(bD), toString(bE), toString(bF), toString(bG), toString(bH), toString(bI)], j) | |
270 | 270 | ||
271 | 271 | ||
272 | 272 | func bJ (bK,bL,bM,bC,bF,bG) = makeString(["%d%d%d%d%d%d", toString(bK), toString(bL), toString(bM), toString(bC), toString(bF), toString(bG)], j) | |
273 | 273 | ||
274 | 274 | ||
275 | - | func bN (ar) = if ((ar == "WAVES")) | |
276 | - | then (wavesBalance(this).available + at(ar)) | |
277 | - | else if ((ar == ba())) | |
278 | - | then { | |
279 | - | let bf = aO(this, ae()) | |
280 | - | let bg = aO(this, af()) | |
281 | - | if (if (if ((bf == "WAVES")) | |
282 | - | then (bg == ba()) | |
283 | - | else false) | |
284 | - | then true | |
285 | - | else if ((bg == "WAVES")) | |
286 | - | then (bf == ba()) | |
287 | - | else false) | |
288 | - | then assetBalance(this, fromBase58String(ar)) | |
289 | - | else (assetBalance(this, fromBase58String(ar)) + au(ar)) | |
290 | - | } | |
275 | + | func bN (ar) = { | |
276 | + | let bO = if ((ar == "WAVES")) | |
277 | + | then wavesBalance(this).available | |
291 | 278 | else assetBalance(this, fromBase58String(ar)) | |
279 | + | let bP = ((bO + at(ar)) - au(ar)) | |
280 | + | max([0, bP]) | |
281 | + | } | |
292 | 282 | ||
293 | 283 | ||
294 | - | func | |
284 | + | func bQ (bR,bS) = fraction(bR, d, bS) | |
295 | 285 | ||
296 | 286 | ||
297 | - | func | |
287 | + | func bT (bR,bS,L) = fraction(bR, d, bS, L) | |
298 | 288 | ||
299 | 289 | ||
300 | - | func | |
301 | - | let | |
302 | - | if (( | |
290 | + | func bU (bV) = { | |
291 | + | let bW = invoke(bV, "getRate", nil, nil) | |
292 | + | if ((bW == bW)) | |
303 | 293 | then { | |
304 | - | let | |
305 | - | if ($isInstanceOf( | |
294 | + | let bX = bW | |
295 | + | if ($isInstanceOf(bX, "Int")) | |
306 | 296 | then { | |
307 | - | let | |
308 | - | | |
297 | + | let bY = bX | |
298 | + | bY | |
309 | 299 | } | |
310 | 300 | else aS("proxy.getRate() unexpected value") | |
311 | 301 | } | |
312 | 302 | else throw("Strict value is not equal to itself.") | |
313 | 303 | } | |
314 | 304 | ||
315 | 305 | ||
316 | - | func | |
317 | - | let | |
318 | - | if (( | |
306 | + | func bZ (ar,ca,cb,bV) = { | |
307 | + | let cc = at(ar) | |
308 | + | if ((cc == cc)) | |
319 | 309 | then { | |
320 | - | let | |
321 | - | if (( | |
310 | + | let cd = au(cb) | |
311 | + | if ((cd == cd)) | |
322 | 312 | then { | |
323 | - | let | |
324 | - | if (( | |
313 | + | let ce = bh(ar) | |
314 | + | if ((ca > 0)) | |
325 | 315 | then { | |
326 | - | let | |
327 | - | if (( | |
316 | + | let cf = invoke(bV, "deposit", nil, [AttachedPayment(ce, ca)]) | |
317 | + | if ((cf == cf)) | |
328 | 318 | then { | |
329 | - | let | |
330 | - | if ($isInstanceOf( | |
319 | + | let bX = cf | |
320 | + | if ($isInstanceOf(bX, "Int")) | |
331 | 321 | then { | |
332 | - | let | |
333 | - | let | |
334 | - | let | |
335 | - | [IntegerEntry(aq(ar), | |
322 | + | let cg = bX | |
323 | + | let ch = (cc + ca) | |
324 | + | let ci = (cd + cg) | |
325 | + | [IntegerEntry(aq(ar), ch), IntegerEntry(as(cb), ci)] | |
336 | 326 | } | |
337 | 327 | else nil | |
338 | 328 | } | |
339 | 329 | else throw("Strict value is not equal to itself.") | |
340 | 330 | } | |
341 | 331 | else nil | |
342 | 332 | } | |
343 | 333 | else throw("Strict value is not equal to itself.") | |
344 | 334 | } | |
345 | 335 | else throw("Strict value is not equal to itself.") | |
346 | 336 | } | |
347 | 337 | ||
348 | 338 | ||
349 | - | func | |
350 | - | let | |
351 | - | if (( | |
339 | + | func cj (ar,ca,cb,bV,ck,cl) = { | |
340 | + | let cc = at(ar) | |
341 | + | if ((cc == cc)) | |
352 | 342 | then { | |
353 | - | let | |
354 | - | if (( | |
343 | + | let cd = au(cb) | |
344 | + | if ((cd == cd)) | |
355 | 345 | then { | |
356 | - | let | |
357 | - | if (( | |
346 | + | let cm = bU(bV) | |
347 | + | if ((cm == cm)) | |
358 | 348 | then { | |
359 | - | let | |
360 | - | let | |
361 | - | let | |
362 | - | let | |
363 | - | let | |
364 | - | if (( | |
349 | + | let cn = fraction(ck, cc, cd) | |
350 | + | let co = bh(cb) | |
351 | + | let cp = fraction(ck, ca, cn) | |
352 | + | let cq = fraction(ck, ca, cm) | |
353 | + | let cr = max([0, (cp - cq)]) | |
354 | + | if ((cq > 0)) | |
365 | 355 | then { | |
366 | - | let | |
367 | - | if (( | |
356 | + | let cs = invoke(bV, "withdraw", nil, [AttachedPayment(co, cq)]) | |
357 | + | if ((cs == cs)) | |
368 | 358 | then { | |
369 | - | let | |
370 | - | if ($isInstanceOf( | |
359 | + | let bX = cs | |
360 | + | if ($isInstanceOf(bX, "Int")) | |
371 | 361 | then { | |
372 | - | let | |
373 | - | let | |
374 | - | let | |
375 | - | [IntegerEntry(aq(ar), | |
362 | + | let ct = bX | |
363 | + | let ch = (cc - ct) | |
364 | + | let ci = ((cd - cq) - cr) | |
365 | + | [IntegerEntry(aq(ar), ch), IntegerEntry(as(cb), ci), ScriptTransfer(cl, cr, bh(cb))] | |
376 | 366 | } | |
377 | 367 | else nil | |
378 | 368 | } | |
379 | 369 | else throw("Strict value is not equal to itself.") | |
380 | 370 | } | |
381 | 371 | else nil | |
382 | 372 | } | |
383 | 373 | else throw("Strict value is not equal to itself.") | |
384 | 374 | } | |
385 | 375 | else throw("Strict value is not equal to itself.") | |
386 | 376 | } | |
387 | 377 | else throw("Strict value is not equal to itself.") | |
388 | 378 | } | |
389 | 379 | ||
390 | 380 | ||
391 | - | func | |
381 | + | func cu (ar) = invoke(aV, "getPoolLeaseConfigREADONLY", [toString(this), ar], nil) | |
392 | 382 | ||
393 | 383 | ||
394 | - | func | |
395 | - | let | |
396 | - | if (( | |
384 | + | func cv (cw,ar,cb,cx,bV,ck,cl) = { | |
385 | + | let cc = at(ar) | |
386 | + | if ((cc == cc)) | |
397 | 387 | then { | |
398 | - | let | |
399 | - | if (( | |
388 | + | let cd = au(cb) | |
389 | + | if ((cd == cd)) | |
400 | 390 | then { | |
401 | - | let | |
402 | - | let | |
403 | - | if ($isInstanceOf( | |
391 | + | let cy = { | |
392 | + | let bX = bh(ar) | |
393 | + | if ($isInstanceOf(bX, "ByteVector")) | |
404 | 394 | then { | |
405 | - | let | |
406 | - | assetBalance(this, | |
395 | + | let cz = bX | |
396 | + | assetBalance(this, cz) | |
407 | 397 | } | |
408 | - | else if ($isInstanceOf( | |
398 | + | else if ($isInstanceOf(bX, "Unit")) | |
409 | 399 | then { | |
410 | - | let | |
400 | + | let cA = bX | |
411 | 401 | wavesBalance(this).available | |
412 | 402 | } | |
413 | 403 | else throw("Match error") | |
414 | 404 | } | |
415 | - | if (( | |
405 | + | if ((cy == cy)) | |
416 | 406 | then { | |
417 | - | let | |
418 | - | let | |
419 | - | let | |
420 | - | if (( | |
407 | + | let cB = max([0, ((cy + cc) - cx)]) | |
408 | + | let cC = fraction(cw, cB, 100) | |
409 | + | let cD = (cc - cC) | |
410 | + | if ((cD == 0)) | |
421 | 411 | then nil | |
422 | - | else if ((0 > | |
412 | + | else if ((0 > cD)) | |
423 | 413 | then { | |
424 | - | let | |
425 | - | | |
414 | + | let cE = -(cD) | |
415 | + | bZ(ar, cE, cb, bV) | |
426 | 416 | } | |
427 | 417 | else { | |
428 | - | let | |
429 | - | | |
418 | + | let cF = cD | |
419 | + | cj(ar, cF, cb, bV, ck, cl) | |
430 | 420 | } | |
431 | 421 | } | |
432 | 422 | else throw("Strict value is not equal to itself.") | |
433 | 423 | } | |
434 | 424 | else throw("Strict value is not equal to itself.") | |
435 | 425 | } | |
436 | 426 | else throw("Strict value is not equal to itself.") | |
437 | 427 | } | |
438 | 428 | ||
439 | 429 | ||
440 | - | func | |
441 | - | let | |
442 | - | if ($isInstanceOf( | |
430 | + | func cG (ar) = { | |
431 | + | let bX = cu(ar) | |
432 | + | if ($isInstanceOf(bX, "(Boolean, Int, Int, String, String, Int, String)")) | |
443 | 433 | then { | |
444 | - | let | |
445 | - | let | |
446 | - | let | |
447 | - | let | |
448 | - | let | |
449 | - | let | |
450 | - | let | |
451 | - | let | |
452 | - | let | |
453 | - | if ( | |
454 | - | then | |
434 | + | let cH = bX | |
435 | + | let cI = cH | |
436 | + | let cJ = cI._1 | |
437 | + | let cK = cI._2 | |
438 | + | let cx = cI._3 | |
439 | + | let cL = cI._4 | |
440 | + | let cM = cI._5 | |
441 | + | let ck = cI._6 | |
442 | + | let cN = cI._7 | |
443 | + | if (cJ) | |
444 | + | then cv(cK, ar, cM, cx, addressFromStringValue(cL), ck, addressFromStringValue(cN)) | |
455 | 445 | else nil | |
456 | 446 | } | |
457 | 447 | else aS((("[" + ar) + "] Rebalance error")) | |
458 | 448 | } | |
459 | 449 | ||
460 | 450 | ||
461 | - | func | |
462 | - | let | |
463 | - | if ($isInstanceOf( | |
451 | + | func cO (ar,ca) = { | |
452 | + | let bX = cu(ar) | |
453 | + | if ($isInstanceOf(bX, "(Boolean, Int, Int, String, String, Int, String)")) | |
464 | 454 | then { | |
465 | - | let | |
466 | - | let | |
467 | - | let | |
468 | - | let | |
469 | - | let | |
470 | - | let | |
471 | - | let | |
472 | - | let | |
473 | - | let | |
474 | - | if ( | |
475 | - | then | |
455 | + | let cH = bX | |
456 | + | let cP = cH | |
457 | + | let cJ = cP._1 | |
458 | + | let cK = cP._2 | |
459 | + | let cx = cP._3 | |
460 | + | let cL = cP._4 | |
461 | + | let cM = cP._5 | |
462 | + | let ck = cP._6 | |
463 | + | let cN = cP._7 | |
464 | + | if (cJ) | |
465 | + | then cj(ar, ca, cM, addressFromStringValue(cL), ck, addressFromStringValue(cN)) | |
476 | 466 | else nil | |
477 | 467 | } | |
478 | 468 | else aS((("[" + ar) + "] withdrawAssetWrapper() error")) | |
479 | 469 | } | |
480 | 470 | ||
481 | 471 | ||
482 | - | func | |
483 | - | let | |
484 | - | let | |
485 | - | if ($isInstanceOf( | |
472 | + | func cQ (ar,ca) = { | |
473 | + | let cR = { | |
474 | + | let bX = bh(ar) | |
475 | + | if ($isInstanceOf(bX, "ByteVector")) | |
486 | 476 | then { | |
487 | - | let | |
488 | - | assetBalance(this, | |
477 | + | let cz = bX | |
478 | + | assetBalance(this, cz) | |
489 | 479 | } | |
490 | - | else if ($isInstanceOf( | |
480 | + | else if ($isInstanceOf(bX, "Unit")) | |
491 | 481 | then { | |
492 | - | let | |
482 | + | let cS = bX | |
493 | 483 | wavesBalance(this).available | |
494 | 484 | } | |
495 | 485 | else throw("Match error") | |
496 | 486 | } | |
497 | - | if (( | |
487 | + | if ((ca > cR)) | |
498 | 488 | then { | |
499 | - | let | |
500 | - | | |
489 | + | let cT = (ca - cR) | |
490 | + | cO(ar, cT) | |
501 | 491 | } | |
502 | 492 | else nil | |
503 | 493 | } | |
504 | 494 | ||
505 | 495 | ||
506 | - | func | |
507 | - | let | |
508 | - | let | |
509 | - | | |
496 | + | func cU (cV,cW,cX,cY) = { | |
497 | + | let cZ = D(cX, cV) | |
498 | + | let da = D(cY, cW) | |
499 | + | bQ(da, cZ) | |
510 | 500 | } | |
511 | 501 | ||
512 | 502 | ||
513 | - | func | |
514 | - | let | |
515 | - | let | |
516 | - | let | |
517 | - | let | |
518 | - | let | |
519 | - | let | |
520 | - | let | |
521 | - | let | |
522 | - | let | |
523 | - | [ | |
503 | + | func db (cX,cY,dc) = { | |
504 | + | let dd = be() | |
505 | + | let de = parseIntValue(dd[t]) | |
506 | + | let df = parseIntValue(dd[u]) | |
507 | + | let dg = cU(de, df, cX, cY) | |
508 | + | let bS = D(cX, de) | |
509 | + | let bR = D(cY, df) | |
510 | + | let dh = D(dc, b) | |
511 | + | let di = bQ(bS, dh) | |
512 | + | let dj = bQ(bR, dh) | |
513 | + | [dg, di, dj] | |
524 | 514 | } | |
525 | 515 | ||
526 | 516 | ||
527 | - | func | |
528 | - | let | |
529 | - | [H( | |
517 | + | func dk (cX,cY,dc) = { | |
518 | + | let dl = db(cX, cY, dc) | |
519 | + | [H(dl[0], b), H(dl[1], b), H(dl[2], b)] | |
530 | 520 | } | |
531 | 521 | ||
532 | 522 | ||
533 | - | func | |
534 | - | let | |
535 | - | let | |
536 | - | let | |
537 | - | let | |
538 | - | let | |
539 | - | let | |
540 | - | let | |
541 | - | let | |
542 | - | if (( | |
523 | + | func dm (dn,do,dp,ab) = { | |
524 | + | let dd = be() | |
525 | + | let dq = dd[q] | |
526 | + | let dr = dd[r] | |
527 | + | let ds = dd[s] | |
528 | + | let cV = parseIntValue(dd[t]) | |
529 | + | let cW = parseIntValue(dd[u]) | |
530 | + | let dt = dd[p] | |
531 | + | let du = valueOrErrorMessage(assetInfo(fromBase58String(dq)), (("Asset " + dq) + " doesn't exist")).quantity | |
532 | + | if ((dq != do)) | |
543 | 533 | then throw("Invalid asset passed.") | |
544 | 534 | else { | |
545 | - | let | |
546 | - | let | |
547 | - | let | |
548 | - | let | |
549 | - | let | |
550 | - | let | |
551 | - | let | |
552 | - | let | |
553 | - | let | |
554 | - | let | |
555 | - | let | |
556 | - | let | |
557 | - | let | |
558 | - | if (( | |
535 | + | let dv = bN(dr) | |
536 | + | let dw = D(dv, cV) | |
537 | + | let dx = bN(ds) | |
538 | + | let dy = D(dx, cW) | |
539 | + | let dz = bQ(dy, dw) | |
540 | + | let dA = H(dz, b) | |
541 | + | let dB = D(dp, b) | |
542 | + | let dC = D(du, b) | |
543 | + | let dD = fraction(dw, dB, dC) | |
544 | + | let dE = fraction(dy, dB, dC) | |
545 | + | let dF = K(dD, cV, FLOOR) | |
546 | + | let dG = K(dE, cW, FLOOR) | |
547 | + | let dH = cQ(dr, dF) | |
548 | + | if ((dH == dH)) | |
559 | 549 | then { | |
560 | - | let | |
561 | - | if (( | |
550 | + | let dI = cQ(ds, dG) | |
551 | + | if ((dI == dI)) | |
562 | 552 | then { | |
563 | - | let | |
564 | - | if (( | |
553 | + | let dJ = invoke(this, "rebalance", nil, nil) | |
554 | + | if ((dJ == dJ)) | |
565 | 555 | then { | |
566 | - | let | |
556 | + | let dK = if ((dn == "")) | |
567 | 557 | then nil | |
568 | - | else (( | |
558 | + | else ((dH ++ dI) ++ [ScriptTransfer(ab, dF, if ((dr == "WAVES")) | |
569 | 559 | then unit | |
570 | - | else fromBase58String( | |
560 | + | else fromBase58String(dr)), ScriptTransfer(ab, dG, if ((ds == "WAVES")) | |
571 | 561 | then unit | |
572 | - | else fromBase58String( | |
573 | - | $Tuple10( | |
562 | + | else fromBase58String(ds)), StringEntry(ad(toString(ab), dn), bJ(dF, dG, dp, dA, height, lastBlock.timestamp)), IntegerEntry(W(), dA), IntegerEntry(X(height, lastBlock.timestamp), dA)]) | |
563 | + | $Tuple10(dF, dG, dr, ds, dv, dx, du, dz, dt, dK) | |
574 | 564 | } | |
575 | 565 | else throw("Strict value is not equal to itself.") | |
576 | 566 | } | |
577 | 567 | else throw("Strict value is not equal to itself.") | |
578 | 568 | } | |
579 | 569 | else throw("Strict value is not equal to itself.") | |
580 | 570 | } | |
581 | 571 | } | |
582 | 572 | ||
583 | 573 | ||
584 | - | func | |
585 | - | let | |
586 | - | let | |
587 | - | let | |
588 | - | let | |
589 | - | let | |
590 | - | let | |
591 | - | let | |
592 | - | let | |
593 | - | let | |
594 | - | let | |
595 | - | let | |
596 | - | let | |
597 | - | if (if (( | |
574 | + | func dL (dn,dM,dN,dO,dP,dQ,ab,dR,dS) = { | |
575 | + | let dd = be() | |
576 | + | let dq = fromBase58String(dd[q]) | |
577 | + | let dT = dd[r] | |
578 | + | let dU = dd[s] | |
579 | + | let dV = dd[v] | |
580 | + | let dW = dd[w] | |
581 | + | let de = parseIntValue(dd[t]) | |
582 | + | let df = parseIntValue(dd[u]) | |
583 | + | let dt = dd[p] | |
584 | + | let du = valueOrErrorMessage(assetInfo(dq), (("Asset " + toBase58String(dq)) + " doesn't exist")).quantity | |
585 | + | let dX = toBase58String(valueOrElse(dO, fromBase58String("WAVES"))) | |
586 | + | let dY = toBase58String(valueOrElse(dQ, fromBase58String("WAVES"))) | |
587 | + | if (if ((dT != dX)) | |
598 | 588 | then true | |
599 | - | else ( | |
589 | + | else (dU != dY)) | |
600 | 590 | then throw("Invalid amt or price asset passed.") | |
601 | 591 | else { | |
602 | - | let | |
603 | - | then bN( | |
604 | - | else (bN( | |
605 | - | let | |
606 | - | then bN( | |
607 | - | else (bN( | |
608 | - | let | |
609 | - | let | |
610 | - | let | |
611 | - | let | |
612 | - | let | |
613 | - | let | |
592 | + | let dv = if (dR) | |
593 | + | then bN(dT) | |
594 | + | else (bN(dT) - dN) | |
595 | + | let dx = if (dR) | |
596 | + | then bN(dU) | |
597 | + | else (bN(dU) - dP) | |
598 | + | let dZ = D(dN, de) | |
599 | + | let ea = D(dP, df) | |
600 | + | let eb = bQ(ea, dZ) | |
601 | + | let dw = D(dv, de) | |
602 | + | let dy = D(dx, df) | |
603 | + | let ec = if ((du == 0)) | |
614 | 604 | then { | |
615 | - | let | |
616 | - | let | |
617 | - | let | |
618 | - | $Tuple5(H( | |
605 | + | let dz = e | |
606 | + | let ed = e | |
607 | + | let dh = pow((dZ * ea), 0, toBigInt(5), 1, 0, DOWN) | |
608 | + | $Tuple5(H(dh, b), H(dZ, de), H(ea, df), bQ((dy + ea), (dw + dZ)), ed) | |
619 | 609 | } | |
620 | 610 | else { | |
621 | - | let | |
622 | - | let | |
623 | - | let | |
624 | - | if (if (( | |
625 | - | then ( | |
611 | + | let dz = bQ(dy, dw) | |
612 | + | let ed = fraction(R((dz - eb)), d, dz) | |
613 | + | let ee = D(dM, b) | |
614 | + | if (if ((dz != e)) | |
615 | + | then (ed > ee) | |
626 | 616 | else false) | |
627 | - | then throw(((("Price slippage " + toString( | |
617 | + | then throw(((("Price slippage " + toString(ed)) + " exceeded the passed limit of ") + toString(ee))) | |
628 | 618 | else { | |
629 | - | let | |
630 | - | let | |
631 | - | let | |
632 | - | let | |
633 | - | then $Tuple2( | |
634 | - | else $Tuple2( | |
635 | - | let | |
636 | - | let | |
637 | - | let | |
638 | - | $Tuple5(K( | |
619 | + | let dC = D(du, b) | |
620 | + | let ef = fraction(dZ, bT(dy, dw, CEILING), d, CEILING) | |
621 | + | let eg = fraction(ea, d, bT(dy, dw, FLOOR), CEILING) | |
622 | + | let eh = if ((ef > ea)) | |
623 | + | then $Tuple2(eg, ea) | |
624 | + | else $Tuple2(dZ, ef) | |
625 | + | let ei = eh._1 | |
626 | + | let ej = eh._2 | |
627 | + | let dh = fraction(dC, ej, dy, FLOOR) | |
628 | + | $Tuple5(K(dh, b, FLOOR), K(ei, de, CEILING), K(ej, df, CEILING), dz, ed) | |
639 | 629 | } | |
640 | 630 | } | |
641 | - | let | |
642 | - | let | |
643 | - | let | |
644 | - | let | |
645 | - | let | |
646 | - | if ((0 >= | |
631 | + | let ek = ec._1 | |
632 | + | let el = ec._2 | |
633 | + | let em = ec._3 | |
634 | + | let dA = H(ec._4, b) | |
635 | + | let en = H(ec._5, b) | |
636 | + | if ((0 >= ek)) | |
647 | 637 | then throw("Invalid calculations. LP calculated is less than zero.") | |
648 | 638 | else { | |
649 | - | let | |
639 | + | let eo = if (!(dS)) | |
650 | 640 | then 0 | |
651 | - | else | |
652 | - | let | |
653 | - | let | |
654 | - | let | |
655 | - | $Tuple13( | |
641 | + | else ek | |
642 | + | let ep = (dN - el) | |
643 | + | let eq = (dP - em) | |
644 | + | let er = [IntegerEntry(W(), dA), IntegerEntry(X(height, lastBlock.timestamp), dA), StringEntry(aa(ab, dn), by(el, em, eo, dA, dM, en, height, lastBlock.timestamp, ep, eq))] | |
645 | + | $Tuple13(ek, eo, dA, dv, dx, du, dq, dt, er, ep, eq, dO, dQ) | |
656 | 646 | } | |
657 | 647 | } | |
658 | 648 | } | |
659 | 649 | ||
660 | 650 | ||
661 | - | func | |
662 | - | let | |
663 | - | let | |
664 | - | let | |
665 | - | if (( | |
651 | + | func es (et,eu,du) = { | |
652 | + | let ev = G(et, toBigInt(bt)) | |
653 | + | let ew = G(eu, toBigInt(bu)) | |
654 | + | let ex = fraction(pow((ev * ew), 0, toBigInt(5), 1, 18, DOWN), g, du) | |
655 | + | if ((du == f)) | |
666 | 656 | then f | |
667 | - | else | |
657 | + | else ex | |
668 | 658 | } | |
669 | 659 | ||
670 | 660 | ||
671 | - | func | |
672 | - | let | |
673 | - | let | |
674 | - | let | |
675 | - | let | |
676 | - | | |
661 | + | func ey (ez,eA,eB) = { | |
662 | + | let eC = (toBigInt(bN(bj(br))) - ez) | |
663 | + | let eD = (toBigInt(bN(bj(bs))) - eA) | |
664 | + | let eE = (toBigInt(value(assetInfo(bq)).quantity) - eB) | |
665 | + | let eF = es(eC, eD, eE) | |
666 | + | eF | |
677 | 667 | } | |
678 | 668 | ||
679 | 669 | ||
680 | - | func | |
681 | - | let | |
682 | - | let | |
683 | - | let | |
684 | - | let | |
685 | - | let | |
686 | - | $Tuple2( | |
670 | + | func eG (eH,eI,eB) = { | |
671 | + | let eC = (bN(bj(br)) + eH) | |
672 | + | let eD = (bN(bj(bs)) + eI) | |
673 | + | let eE = (value(assetInfo(bq)).quantity + eB) | |
674 | + | let ex = es(toBigInt(eC), toBigInt(eD), toBigInt(eE)) | |
675 | + | let eJ = [IntegerEntry(ak, height), StringEntry(aj, toString(ex))] | |
676 | + | $Tuple2(eJ, ex) | |
687 | 677 | } | |
688 | 678 | ||
689 | 679 | ||
690 | - | func | |
680 | + | func eK (eL,ex) = if ((ex >= eL)) | |
691 | 681 | then true | |
692 | - | else aS(makeString(["updated KLp lower than current KLp", toString( | |
682 | + | else aS(makeString(["updated KLp lower than current KLp", toString(eL), toString(ex)], " ")) | |
693 | 683 | ||
694 | 684 | ||
695 | - | func | |
696 | - | let | |
697 | - | let | |
698 | - | let | |
699 | - | let | |
700 | - | let | |
701 | - | then $Tuple2( | |
702 | - | else $Tuple2(-( | |
703 | - | let | |
704 | - | let | |
685 | + | func eM (eN) = { | |
686 | + | let eC = bN(bj(br)) | |
687 | + | let eD = bN(bj(bs)) | |
688 | + | let eO = eN.amount | |
689 | + | let eP = fraction(eN.amount, eN.price, b, FLOOR) | |
690 | + | let eQ = if ((eN.orderType == Buy)) | |
691 | + | then $Tuple2(eO, -(eP)) | |
692 | + | else $Tuple2(-(eO), eP) | |
693 | + | let eH = eQ._1 | |
694 | + | let eI = eQ._2 | |
705 | 695 | if (if (if (bc()) | |
706 | 696 | then true | |
707 | 697 | else (bp == m)) | |
708 | 698 | then true | |
709 | 699 | else (bp == n)) | |
710 | 700 | then throw("Exchange operations disabled") | |
711 | - | else if (if (( | |
701 | + | else if (if ((eN.assetPair.amountAsset != br)) | |
712 | 702 | then true | |
713 | - | else ( | |
703 | + | else (eN.assetPair.priceAsset != bs)) | |
714 | 704 | then throw("Wrong order assets.") | |
715 | 705 | else { | |
716 | - | let | |
717 | - | let | |
718 | - | let | |
719 | - | let | |
720 | - | let | |
721 | - | let | |
722 | - | $Tuple2( | |
706 | + | let eR = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aj), "0")), aU("invalid kLp")) | |
707 | + | let eS = eG(eH, eI, 0) | |
708 | + | let eT = eS._1 | |
709 | + | let eU = eS._2 | |
710 | + | let eV = (eU >= eR) | |
711 | + | let eW = makeString(["kLp=", toString(eR), " kLpNew=", toString(eU), " amountAssetBalance=", toString(eC), " priceAssetBalance=", toString(eD), " amountAssetBalanceDelta=", toString(eH), " priceAssetBalanceDelta=", toString(eI), " height=", toString(height)], "") | |
712 | + | $Tuple2(eV, eW) | |
723 | 713 | } | |
724 | 714 | } | |
725 | 715 | ||
726 | 716 | ||
727 | - | func | |
717 | + | func eX (eY) = if ((size(eY.payments) != 1)) | |
728 | 718 | then throw("exactly 1 payment is expected") | |
729 | 719 | else { | |
730 | - | let | |
731 | - | let | |
732 | - | let | |
733 | - | let | |
734 | - | let | |
735 | - | let | |
736 | - | let | |
737 | - | let | |
720 | + | let eZ = value(eY.payments[0]) | |
721 | + | let do = value(eZ.assetId) | |
722 | + | let fa = eZ.amount | |
723 | + | let ec = dm(toBase58String(eY.transactionId), toBase58String(do), fa, eY.caller) | |
724 | + | let dF = ec._1 | |
725 | + | let dG = ec._2 | |
726 | + | let dt = parseIntValue(ec._9) | |
727 | + | let dK = ec._10 | |
738 | 728 | if (if (bc()) | |
739 | 729 | then true | |
740 | - | else ( | |
741 | - | then throw(("Get operation is blocked by admin. Status = " + toString( | |
742 | - | else $Tuple5( | |
730 | + | else (dt == n)) | |
731 | + | then throw(("Get operation is blocked by admin. Status = " + toString(dt))) | |
732 | + | else $Tuple5(dF, dG, fa, do, dK) | |
743 | 733 | } | |
744 | 734 | ||
745 | 735 | ||
746 | - | func | |
736 | + | func fb (eY,dM,dS) = if ((size(eY.payments) != 2)) | |
747 | 737 | then throw("exactly 2 payments are expected") | |
748 | 738 | else { | |
749 | - | let | |
750 | - | let | |
751 | - | let | |
752 | - | let | |
739 | + | let fc = value(eY.payments[0]) | |
740 | + | let fd = value(eY.payments[1]) | |
741 | + | let fe = dL(toBase58String(eY.transactionId), dM, fc.amount, fc.assetId, fd.amount, fd.assetId, toString(eY.caller), false, dS) | |
742 | + | let dt = parseIntValue(fe._8) | |
753 | 743 | if (if (if (bc()) | |
754 | 744 | then true | |
755 | - | else ( | |
745 | + | else (dt == l)) | |
756 | 746 | then true | |
757 | - | else ( | |
758 | - | then throw(("Put operation is blocked by admin. Status = " + toString( | |
759 | - | else | |
747 | + | else (dt == n)) | |
748 | + | then throw(("Put operation is blocked by admin. Status = " + toString(dt))) | |
749 | + | else fe | |
760 | 750 | } | |
761 | 751 | ||
762 | 752 | ||
763 | - | func | |
764 | - | let | |
765 | - | if (( | |
753 | + | func ff (ca) = { | |
754 | + | let fg = invoke(aV, "emit", [ca], nil) | |
755 | + | if ((fg == fg)) | |
766 | 756 | then { | |
767 | - | let | |
768 | - | let | |
769 | - | if ($isInstanceOf( | |
757 | + | let fh = { | |
758 | + | let bX = fg | |
759 | + | if ($isInstanceOf(bX, "Address")) | |
770 | 760 | then { | |
771 | - | let | |
772 | - | invoke( | |
761 | + | let fi = bX | |
762 | + | invoke(fi, "emit", [ca], nil) | |
773 | 763 | } | |
774 | 764 | else unit | |
775 | 765 | } | |
776 | - | if (( | |
777 | - | then | |
766 | + | if ((fh == fh)) | |
767 | + | then ca | |
778 | 768 | else throw("Strict value is not equal to itself.") | |
779 | 769 | } | |
780 | 770 | else throw("Strict value is not equal to itself.") | |
781 | 771 | } | |
782 | 772 | ||
783 | 773 | ||
784 | - | func | |
785 | - | let | |
774 | + | func fj (ca,ai) = { | |
775 | + | let fk = if ((ai == 0)) | |
786 | 776 | then 0 | |
787 | - | else fraction( | |
788 | - | $Tuple2(( | |
777 | + | else fraction(ca, ai, b) | |
778 | + | $Tuple2((ca - fk), fk) | |
789 | 779 | } | |
790 | 780 | ||
791 | 781 | ||
792 | - | func | |
793 | - | let | |
794 | - | let | |
795 | - | let | |
796 | - | let | |
782 | + | func fl (fm,fn,ab,ac) = { | |
783 | + | let fo = (ac == unit) | |
784 | + | let fp = bN(bj(br)) | |
785 | + | let fq = bN(bj(bs)) | |
786 | + | let fr = if ((fn == br)) | |
797 | 787 | then true | |
798 | - | else if (( | |
788 | + | else if ((fn == bs)) | |
799 | 789 | then false | |
800 | 790 | else aS("invalid asset") | |
801 | - | let | |
802 | - | then $Tuple2( | |
803 | - | else if ( | |
804 | - | then $Tuple2(( | |
805 | - | else $Tuple2( | |
806 | - | let | |
807 | - | let | |
808 | - | let | |
809 | - | then $Tuple2( | |
810 | - | else $Tuple2(0, | |
811 | - | let | |
812 | - | let | |
813 | - | let | |
814 | - | let | |
815 | - | let | |
816 | - | let | |
817 | - | let | |
818 | - | let | |
819 | - | let | |
820 | - | let | |
821 | - | let | |
822 | - | let | |
823 | - | then | |
824 | - | else | |
825 | - | let | |
826 | - | let | |
827 | - | let | |
791 | + | let fs = if (fo) | |
792 | + | then $Tuple2(fp, fq) | |
793 | + | else if (fr) | |
794 | + | then $Tuple2((fp - fm), fq) | |
795 | + | else $Tuple2(fp, (fq - fm)) | |
796 | + | let ft = fs._1 | |
797 | + | let fu = fs._2 | |
798 | + | let fv = if (fr) | |
799 | + | then $Tuple2(fm, 0) | |
800 | + | else $Tuple2(0, fm) | |
801 | + | let fw = fv._1 | |
802 | + | let fx = fv._2 | |
803 | + | let eO = fj(fw, aX)._1 | |
804 | + | let eP = fj(fx, aX)._1 | |
805 | + | let fy = fj(fm, aX) | |
806 | + | let fz = fy._1 | |
807 | + | let fk = fy._2 | |
808 | + | let fA = (ft + eO) | |
809 | + | let fB = (fu + eP) | |
810 | + | let fC = bQ(D(fB, bu), D(fA, bt)) | |
811 | + | let fD = H(fC, b) | |
812 | + | let fE = if (fr) | |
813 | + | then ft | |
814 | + | else fu | |
815 | + | let fF = toBigInt(fE) | |
816 | + | let fG = toBigInt(valueOrErrorMessage(assetInfo(bq), (("asset " + toBase58String(bq)) + " doesn't exist")).quantity) | |
817 | + | let fH = if ((fG > f)) | |
828 | 818 | then true | |
829 | 819 | else aS("initial deposit requires all coins") | |
830 | - | if (( | |
820 | + | if ((fH == fH)) | |
831 | 821 | then { | |
832 | - | let | |
833 | - | let | |
834 | - | let | |
822 | + | let fI = toBigInt(fz) | |
823 | + | let fJ = max([0, toInt(((fG * (sqrtBigInt((d + ((fI * d) / fF)), 18, 18, DOWN) - d)) / d))]) | |
824 | + | let er = if (fo) | |
835 | 825 | then nil | |
836 | - | else [IntegerEntry(W(), | |
837 | - | let | |
838 | - | let | |
839 | - | let | |
840 | - | let | |
841 | - | then $Tuple2( | |
842 | - | else $Tuple2( | |
843 | - | let | |
844 | - | let | |
845 | - | let | |
846 | - | fraction(( | |
826 | + | else [IntegerEntry(W(), fD), IntegerEntry(X(height, lastBlock.timestamp), fD), StringEntry(aa(toString(value(ab)), toBase58String(value(ac))), by(fw, fx, fJ, fD, 0, 0, height, lastBlock.timestamp, 0, 0))] | |
827 | + | let fK = bQ(D(fu, bu), D(ft, bt)) | |
828 | + | let fL = H(fK, b) | |
829 | + | let fM = { | |
830 | + | let fN = if (fr) | |
831 | + | then $Tuple2(fw, ft) | |
832 | + | else $Tuple2(fx, fu) | |
833 | + | let ca = fN._1 | |
834 | + | let fO = fN._2 | |
835 | + | let fP = toInt(fraction(fG, toBigInt((ca / 2)), toBigInt(fO))) | |
836 | + | fraction((fJ - fP), b, fP) | |
847 | 837 | } | |
848 | - | $Tuple5( | |
838 | + | $Tuple5(fJ, er, fk, fM, fr) | |
849 | 839 | } | |
850 | 840 | else throw("Strict value is not equal to itself.") | |
851 | 841 | } | |
852 | 842 | ||
853 | 843 | ||
854 | - | func | |
855 | - | let | |
856 | - | let | |
857 | - | let | |
858 | - | let | |
859 | - | let | |
844 | + | func fQ (fR,fz,fn,ab,ac) = { | |
845 | + | let fo = (ac == unit) | |
846 | + | let dd = be() | |
847 | + | let de = parseIntValue(dd[t]) | |
848 | + | let df = parseIntValue(dd[u]) | |
849 | + | let fS = [if ((fn == bq)) | |
860 | 850 | then true | |
861 | 851 | else aS("invalid lp asset")] | |
862 | - | if (( | |
852 | + | if ((fS == fS)) | |
863 | 853 | then { | |
864 | - | let | |
854 | + | let fT = if ((fR == br)) | |
865 | 855 | then true | |
866 | - | else if (( | |
856 | + | else if ((fR == bs)) | |
867 | 857 | then false | |
868 | 858 | else aS("invalid asset") | |
869 | - | let | |
859 | + | let fU = if (fT) | |
870 | 860 | then toBigInt(bN(bj(br))) | |
871 | 861 | else toBigInt(bN(bj(bs))) | |
872 | - | let fT = if (fR) | |
873 | - | then dc | |
874 | - | else dd | |
875 | - | let fU = bN(bj(br)) | |
876 | - | let fV = bN(bj(bs)) | |
877 | - | let fW = if (fR) | |
878 | - | then fU | |
879 | - | else fV | |
880 | - | let fX = toBigInt(fW) | |
881 | - | let fE = toBigInt(valueOrErrorMessage(assetInfo(bq), (("asset " + toBase58String(bq)) + " doesn't exist")).quantity) | |
882 | - | let fY = toBigInt(fx) | |
883 | - | let fZ = max([0, toInt(((fS * (d - pow((d - ((fY * d) / fE)), 18, h, 0, 18, DOWN))) / d))]) | |
884 | - | let ga = fh(fZ, aZ) | |
885 | - | let gb = ga._1 | |
886 | - | let fi = ga._2 | |
887 | - | let gc = if (fR) | |
888 | - | then $Tuple4(gb, 0, (fU - fZ), fV) | |
889 | - | else $Tuple4(0, gb, fU, (fV - fZ)) | |
862 | + | let fV = if (fT) | |
863 | + | then de | |
864 | + | else df | |
865 | + | let fW = bN(bj(br)) | |
866 | + | let fX = bN(bj(bs)) | |
867 | + | let fY = if (fT) | |
868 | + | then fW | |
869 | + | else fX | |
870 | + | let fZ = toBigInt(fY) | |
871 | + | let fG = toBigInt(valueOrErrorMessage(assetInfo(bq), (("asset " + toBase58String(bq)) + " doesn't exist")).quantity) | |
872 | + | let ga = toBigInt(fz) | |
873 | + | let gb = max([0, toInt(((fU * (d - pow((d - ((ga * d) / fG)), 18, h, 0, 18, DOWN))) / d))]) | |
874 | + | let gc = fj(gb, aZ) | |
890 | 875 | let gd = gc._1 | |
891 | - | let ge = gc._2 | |
892 | - | let gf = gc._3 | |
893 | - | let gg = gc._4 | |
894 | - | let fA = bO(D(gg, bu), D(gf, bt)) | |
895 | - | let fB = H(fA, b) | |
896 | - | let ep = if (fm) | |
876 | + | let fk = gc._2 | |
877 | + | let ge = if (fT) | |
878 | + | then $Tuple4(gd, 0, (fW - gb), fX) | |
879 | + | else $Tuple4(0, gd, fW, (fX - gb)) | |
880 | + | let gf = ge._1 | |
881 | + | let gg = ge._2 | |
882 | + | let gh = ge._3 | |
883 | + | let gi = ge._4 | |
884 | + | let fC = bQ(D(gi, bu), D(gh, bt)) | |
885 | + | let fD = H(fC, b) | |
886 | + | let er = if (fo) | |
897 | 887 | then nil | |
898 | - | else [StringEntry(ad(toString(value(ab)), toBase58String(value(ac))), bJ( | |
899 | - | let | |
900 | - | let | |
901 | - | let | |
902 | - | let | |
903 | - | fraction(( | |
888 | + | else [StringEntry(ad(toString(value(ab)), toBase58String(value(ac))), bJ(gf, gg, fz, fD, height, lastBlock.timestamp)), IntegerEntry(W(), fD), IntegerEntry(X(height, lastBlock.timestamp), fD)] | |
889 | + | let fK = bQ(D(fX, bu), D(fW, bt)) | |
890 | + | let fL = H(fK, b) | |
891 | + | let fM = { | |
892 | + | let gj = (toInt(fraction(fU, ga, fG)) * 2) | |
893 | + | fraction((gd - gj), b, gj) | |
904 | 894 | } | |
905 | - | $Tuple5( | |
895 | + | $Tuple5(gd, er, fk, fM, fT) | |
906 | 896 | } | |
907 | 897 | else throw("Strict value is not equal to itself.") | |
908 | 898 | } | |
909 | 899 | ||
910 | 900 | ||
911 | - | func | |
912 | - | let | |
913 | - | if ($isInstanceOf( | |
901 | + | func gk () = { | |
902 | + | let bX = getString(U()) | |
903 | + | if ($isInstanceOf(bX, "String")) | |
914 | 904 | then { | |
915 | - | let | |
916 | - | fromBase58String( | |
905 | + | let gl = bX | |
906 | + | fromBase58String(gl) | |
917 | 907 | } | |
918 | - | else if ($isInstanceOf( | |
908 | + | else if ($isInstanceOf(bX, "Unit")) | |
919 | 909 | then unit | |
920 | 910 | else throw("Match error") | |
921 | 911 | } | |
922 | 912 | ||
923 | 913 | ||
924 | - | func | |
925 | - | let | |
926 | - | if ($isInstanceOf( | |
914 | + | func gm () = { | |
915 | + | let bX = getString(V()) | |
916 | + | if ($isInstanceOf(bX, "String")) | |
927 | 917 | then { | |
928 | - | let | |
929 | - | fromBase58String( | |
918 | + | let gl = bX | |
919 | + | fromBase58String(gl) | |
930 | 920 | } | |
931 | - | else if ($isInstanceOf( | |
921 | + | else if ($isInstanceOf(bX, "Unit")) | |
932 | 922 | then unit | |
933 | 923 | else throw("Match error") | |
934 | 924 | } | |
935 | 925 | ||
936 | 926 | ||
937 | - | func | |
938 | - | let | |
939 | - | if ($isInstanceOf( | |
927 | + | func gn (eY) = { | |
928 | + | let bX = gk() | |
929 | + | if ($isInstanceOf(bX, "ByteVector")) | |
940 | 930 | then { | |
941 | - | let | |
942 | - | ( | |
931 | + | let go = bX | |
932 | + | (eY.callerPublicKey == go) | |
943 | 933 | } | |
944 | - | else if ($isInstanceOf( | |
945 | - | then ( | |
934 | + | else if ($isInstanceOf(bX, "Unit")) | |
935 | + | then (eY.caller == this) | |
946 | 936 | else throw("Match error") | |
947 | 937 | } | |
948 | 938 | ||
949 | 939 | ||
950 | - | func | |
951 | - | let | |
952 | - | let | |
953 | - | if ($isInstanceOf( | |
940 | + | func gp (eY) = { | |
941 | + | let gq = throw("Permission denied") | |
942 | + | let bX = gk() | |
943 | + | if ($isInstanceOf(bX, "ByteVector")) | |
954 | 944 | then { | |
955 | - | let | |
956 | - | if (( | |
945 | + | let go = bX | |
946 | + | if ((eY.callerPublicKey == go)) | |
957 | 947 | then true | |
958 | - | else | |
948 | + | else gq | |
959 | 949 | } | |
960 | - | else if ($isInstanceOf( | |
961 | - | then if (( | |
950 | + | else if ($isInstanceOf(bX, "Unit")) | |
951 | + | then if ((eY.caller == this)) | |
962 | 952 | then true | |
963 | - | else | |
953 | + | else gq | |
964 | 954 | else throw("Match error") | |
965 | 955 | } | |
966 | 956 | ||
967 | 957 | ||
968 | - | @Callable( | |
969 | - | func rebalance () = ( | |
958 | + | @Callable(eY) | |
959 | + | func rebalance () = (cG(aO(this, ae())) ++ cG(aO(this, af()))) | |
970 | 960 | ||
971 | 961 | ||
972 | 962 | ||
973 | - | @Callable( | |
974 | - | func calculateAmountOutForSwapREADONLY ( | |
975 | - | let | |
963 | + | @Callable(eY) | |
964 | + | func calculateAmountOutForSwapREADONLY (gr,gs,gt) = { | |
965 | + | let gu = if ((gs == false)) | |
976 | 966 | then { | |
977 | - | let | |
978 | - | let | |
979 | - | $Tuple2( | |
967 | + | let gv = aO(this, af()) | |
968 | + | let gw = aO(this, ae()) | |
969 | + | $Tuple2(gv, gw) | |
980 | 970 | } | |
981 | 971 | else { | |
982 | - | let | |
983 | - | let | |
984 | - | $Tuple2( | |
972 | + | let gv = aO(this, ae()) | |
973 | + | let gw = aO(this, af()) | |
974 | + | $Tuple2(gv, gw) | |
985 | 975 | } | |
986 | - | let | |
987 | - | let | |
988 | - | let | |
989 | - | let | |
990 | - | let | |
991 | - | let | |
992 | - | let | |
993 | - | let | |
976 | + | let gv = gu._1 | |
977 | + | let gw = gu._2 | |
978 | + | let gx = bN(gw) | |
979 | + | let gy = bN(gv) | |
980 | + | let gz = fraction(gy, gr, (gx + gr)) | |
981 | + | let gA = (toBigInt(gx) * toBigInt(gy)) | |
982 | + | let gB = (((toBigInt(bN(gw)) + toBigInt(gr)) + toBigInt(gt)) * (toBigInt(bN(gv)) - toBigInt(gz))) | |
983 | + | let gC = if ((gB >= gA)) | |
994 | 984 | then true | |
995 | 985 | else throw("new K is fewer error") | |
996 | - | if (( | |
997 | - | then $Tuple2(nil, | |
986 | + | if ((gC == gC)) | |
987 | + | then $Tuple2(nil, gz) | |
998 | 988 | else throw("Strict value is not equal to itself.") | |
999 | 989 | } | |
1000 | 990 | ||
1001 | 991 | ||
1002 | 992 | ||
1003 | - | @Callable( | |
1004 | - | func calculateAmountOutForSwapAndSendTokens ( | |
1005 | - | let | |
993 | + | @Callable(eY) | |
994 | + | func calculateAmountOutForSwapAndSendTokens (gr,gs,gD,gE,gt) = { | |
995 | + | let gF = { | |
1006 | 996 | let aY = invoke(aV, "getSwapContractREADONLY", nil, nil) | |
1007 | 997 | if ($isInstanceOf(aY, "String")) | |
1008 | 998 | then aY | |
1009 | 999 | else throw(($getType(aY) + " couldn't be cast to String")) | |
1010 | 1000 | } | |
1011 | - | let | |
1001 | + | let fS = [if ((value(eY.payments[0]).amount >= gr)) | |
1012 | 1002 | then true | |
1013 | - | else aS("Wrong amount"), if (( | |
1003 | + | else aS("Wrong amount"), if ((eY.caller == addressFromStringValue(gF))) | |
1014 | 1004 | then true | |
1015 | 1005 | else aS("Permission denied")] | |
1016 | - | if (( | |
1006 | + | if ((fS == fS)) | |
1017 | 1007 | then { | |
1018 | - | let | |
1019 | - | let | |
1020 | - | let | |
1008 | + | let eZ = value(eY.payments[0]) | |
1009 | + | let gw = bj(eZ.assetId) | |
1010 | + | let gv = if ((gs == false)) | |
1021 | 1011 | then aO(this, af()) | |
1022 | 1012 | else aO(this, ae()) | |
1023 | - | let | |
1024 | - | let | |
1025 | - | let | |
1026 | - | let | |
1027 | - | let | |
1028 | - | let | |
1013 | + | let gx = (bN(gw) - value(eY.payments[0]).amount) | |
1014 | + | let gy = bN(gv) | |
1015 | + | let gz = fraction(gy, gr, (gx + gr)) | |
1016 | + | let gA = (toBigInt(gx) * toBigInt(gy)) | |
1017 | + | let gB = ((toBigInt(bN(gw)) + toBigInt(gt)) * (toBigInt(bN(gv)) - toBigInt(gz))) | |
1018 | + | let gC = if ((gB >= gA)) | |
1029 | 1019 | then true | |
1030 | 1020 | else throw("new K is fewer error") | |
1031 | - | if (( | |
1021 | + | if ((gC == gC)) | |
1032 | 1022 | then { | |
1033 | - | let | |
1023 | + | let gG = if ((gz >= gD)) | |
1034 | 1024 | then true | |
1035 | 1025 | else throw("Exchange result is fewer coins than expected") | |
1036 | - | if (( | |
1026 | + | if ((gG == gG)) | |
1037 | 1027 | then { | |
1038 | - | let | |
1039 | - | let | |
1040 | - | if ($isInstanceOf( | |
1028 | + | let gH = { | |
1029 | + | let bX = cu(gv) | |
1030 | + | if ($isInstanceOf(bX, "(Boolean, Int, Int, String, String, Int, String)")) | |
1041 | 1031 | then { | |
1042 | - | let | |
1043 | - | | |
1032 | + | let cH = bX | |
1033 | + | cH | |
1044 | 1034 | } | |
1045 | 1035 | else throw("error lease config") | |
1046 | 1036 | } | |
1047 | - | let | |
1048 | - | if (( | |
1037 | + | let gI = cQ(gv, gz) | |
1038 | + | if ((gI == gI)) | |
1049 | 1039 | then { | |
1050 | - | let | |
1051 | - | if (( | |
1052 | - | then $Tuple2(( | |
1040 | + | let dJ = invoke(this, "rebalance", nil, nil) | |
1041 | + | if ((dJ == dJ)) | |
1042 | + | then $Tuple2((gI ++ [ScriptTransfer(addressFromStringValue(gE), gz, bh(gv))]), gz) | |
1053 | 1043 | else throw("Strict value is not equal to itself.") | |
1054 | 1044 | } | |
1055 | 1045 | else throw("Strict value is not equal to itself.") | |
1056 | 1046 | } | |
1057 | 1047 | else throw("Strict value is not equal to itself.") | |
1058 | 1048 | } | |
1059 | 1049 | else throw("Strict value is not equal to itself.") | |
1060 | 1050 | } | |
1061 | 1051 | else throw("Strict value is not equal to itself.") | |
1062 | 1052 | } | |
1063 | 1053 | ||
1064 | 1054 | ||
1065 | 1055 | ||
1066 | - | @Callable( | |
1067 | - | func setManager ( | |
1068 | - | let | |
1069 | - | if (( | |
1056 | + | @Callable(eY) | |
1057 | + | func setManager (gJ) = { | |
1058 | + | let gK = gp(eY) | |
1059 | + | if ((gK == gK)) | |
1070 | 1060 | then { | |
1071 | - | let | |
1072 | - | if (( | |
1073 | - | then [StringEntry(V(), | |
1061 | + | let gL = fromBase58String(gJ) | |
1062 | + | if ((gL == gL)) | |
1063 | + | then [StringEntry(V(), gJ)] | |
1074 | 1064 | else throw("Strict value is not equal to itself.") | |
1075 | 1065 | } | |
1076 | 1066 | else throw("Strict value is not equal to itself.") | |
1077 | 1067 | } | |
1078 | 1068 | ||
1079 | 1069 | ||
1080 | 1070 | ||
1081 | - | @Callable( | |
1071 | + | @Callable(eY) | |
1082 | 1072 | func confirmManager () = { | |
1083 | - | let | |
1084 | - | let | |
1073 | + | let gM = gm() | |
1074 | + | let gN = if (isDefined(gM)) | |
1085 | 1075 | then true | |
1086 | 1076 | else throw("No pending manager") | |
1087 | - | if (( | |
1077 | + | if ((gN == gN)) | |
1088 | 1078 | then { | |
1089 | - | let | |
1079 | + | let gO = if ((eY.callerPublicKey == value(gM))) | |
1090 | 1080 | then true | |
1091 | 1081 | else throw("You are not pending manager") | |
1092 | - | if (( | |
1093 | - | then [StringEntry(U(), toBase58String(value( | |
1082 | + | if ((gO == gO)) | |
1083 | + | then [StringEntry(U(), toBase58String(value(gM))), DeleteEntry(V())] | |
1094 | 1084 | else throw("Strict value is not equal to itself.") | |
1095 | 1085 | } | |
1096 | 1086 | else throw("Strict value is not equal to itself.") | |
1097 | 1087 | } | |
1098 | 1088 | ||
1099 | 1089 | ||
1100 | 1090 | ||
1101 | - | @Callable( | |
1102 | - | func put ( | |
1091 | + | @Callable(eY) | |
1092 | + | func put (dM,gP) = if ((0 > dM)) | |
1103 | 1093 | then throw("Invalid slippageTolerance passed") | |
1104 | 1094 | else { | |
1105 | - | let | |
1106 | - | let | |
1107 | - | let | |
1108 | - | let | |
1109 | - | let | |
1110 | - | let | |
1111 | - | let | |
1112 | - | let | |
1113 | - | let | |
1114 | - | let | |
1115 | - | let | |
1116 | - | if (( | |
1095 | + | let fe = fb(eY, dM, true) | |
1096 | + | let eo = fe._2 | |
1097 | + | let dq = fe._7 | |
1098 | + | let dK = fe._9 | |
1099 | + | let ep = fe._10 | |
1100 | + | let eq = fe._11 | |
1101 | + | let gQ = fe._12 | |
1102 | + | let gR = fe._13 | |
1103 | + | let fc = toBigInt(value(eY.payments[0]).amount) | |
1104 | + | let fd = toBigInt(value(eY.payments[1]).amount) | |
1105 | + | let eF = ey(fc, fd, toBigInt(0)) | |
1106 | + | if ((eF == eF)) | |
1117 | 1107 | then { | |
1118 | - | let | |
1119 | - | if (( | |
1108 | + | let fg = invoke(aV, "emit", [eo], nil) | |
1109 | + | if ((fg == fg)) | |
1120 | 1110 | then { | |
1121 | - | let | |
1122 | - | let | |
1123 | - | if ($isInstanceOf( | |
1111 | + | let fh = { | |
1112 | + | let bX = fg | |
1113 | + | if ($isInstanceOf(bX, "Address")) | |
1124 | 1114 | then { | |
1125 | - | let | |
1126 | - | invoke( | |
1115 | + | let fi = bX | |
1116 | + | invoke(fi, "emit", [eo], nil) | |
1127 | 1117 | } | |
1128 | 1118 | else unit | |
1129 | 1119 | } | |
1130 | - | if (( | |
1120 | + | if ((fh == fh)) | |
1131 | 1121 | then { | |
1132 | - | let | |
1133 | - | then invoke(bx, "put", nil, [AttachedPayment( | |
1122 | + | let gS = if ((ep > 0)) | |
1123 | + | then invoke(bx, "put", nil, [AttachedPayment(gQ, ep)]) | |
1134 | 1124 | else nil | |
1135 | - | if (( | |
1125 | + | if ((gS == gS)) | |
1136 | 1126 | then { | |
1137 | - | let | |
1138 | - | then invoke(bx, "put", nil, [AttachedPayment( | |
1127 | + | let gT = if ((eq > 0)) | |
1128 | + | then invoke(bx, "put", nil, [AttachedPayment(gR, eq)]) | |
1139 | 1129 | else nil | |
1140 | - | if (( | |
1130 | + | if ((gT == gT)) | |
1141 | 1131 | then { | |
1142 | - | let | |
1132 | + | let gU = if (gP) | |
1143 | 1133 | then { | |
1144 | - | let | |
1145 | - | if (( | |
1134 | + | let gV = invoke(bw, "stake", nil, [AttachedPayment(dq, eo)]) | |
1135 | + | if ((gV == gV)) | |
1146 | 1136 | then nil | |
1147 | 1137 | else throw("Strict value is not equal to itself.") | |
1148 | 1138 | } | |
1149 | - | else [ScriptTransfer( | |
1150 | - | let | |
1151 | - | if (( | |
1139 | + | else [ScriptTransfer(eY.caller, eo, dq)] | |
1140 | + | let gW = eG(0, 0, 0) | |
1141 | + | if ((gW == gW)) | |
1152 | 1142 | then { | |
1153 | - | let | |
1154 | - | let | |
1155 | - | let | |
1156 | - | if (( | |
1157 | - | then (( | |
1143 | + | let ex = gW._2 | |
1144 | + | let gX = gW._1 | |
1145 | + | let gY = eK(eF, ex) | |
1146 | + | if ((gY == gY)) | |
1147 | + | then ((dK ++ gU) ++ gX) | |
1158 | 1148 | else throw("Strict value is not equal to itself.") | |
1159 | 1149 | } | |
1160 | 1150 | else throw("Strict value is not equal to itself.") | |
1161 | 1151 | } | |
1162 | 1152 | else throw("Strict value is not equal to itself.") | |
1163 | 1153 | } | |
1164 | 1154 | else throw("Strict value is not equal to itself.") | |
1165 | 1155 | } | |
1166 | 1156 | else throw("Strict value is not equal to itself.") | |
1167 | 1157 | } | |
1168 | 1158 | else throw("Strict value is not equal to itself.") | |
1169 | 1159 | } | |
1170 | 1160 | else throw("Strict value is not equal to itself.") | |
1171 | 1161 | } | |
1172 | 1162 | ||
1173 | 1163 | ||
1174 | 1164 | ||
1175 | - | @Callable( | |
1176 | - | func putForFree ( | |
1165 | + | @Callable(eY) | |
1166 | + | func putForFree (gZ) = if ((0 > gZ)) | |
1177 | 1167 | then throw("Invalid value passed") | |
1178 | 1168 | else { | |
1179 | - | let | |
1180 | - | let | |
1181 | - | let | |
1182 | - | let | |
1183 | - | let | |
1184 | - | if (( | |
1169 | + | let fe = fb(eY, gZ, false) | |
1170 | + | let dK = fe._9 | |
1171 | + | let fc = toBigInt(value(eY.payments[0]).amount) | |
1172 | + | let fd = toBigInt(value(eY.payments[1]).amount) | |
1173 | + | let eF = ey(fc, fd, toBigInt(0)) | |
1174 | + | if ((eF == eF)) | |
1185 | 1175 | then { | |
1186 | - | let | |
1187 | - | let | |
1188 | - | let | |
1189 | - | let | |
1190 | - | if (( | |
1191 | - | then ( | |
1176 | + | let ha = eG(0, 0, 0) | |
1177 | + | let gX = ha._1 | |
1178 | + | let ex = ha._2 | |
1179 | + | let gY = eK(eF, ex) | |
1180 | + | if ((gY == gY)) | |
1181 | + | then (dK ++ gX) | |
1192 | 1182 | else throw("Strict value is not equal to itself.") | |
1193 | 1183 | } | |
1194 | 1184 | else throw("Strict value is not equal to itself.") | |
1195 | 1185 | } | |
1196 | 1186 | ||
1197 | 1187 | ||
1198 | 1188 | ||
1199 | - | @Callable( | |
1200 | - | func putOneTkn ( | |
1201 | - | let | |
1189 | + | @Callable(eY) | |
1190 | + | func putOneTkn (hb,hc) = { | |
1191 | + | let hd = { | |
1202 | 1192 | let aY = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1203 | 1193 | if ($isInstanceOf(aY, "Boolean")) | |
1204 | 1194 | then aY | |
1205 | 1195 | else throw(($getType(aY) + " couldn't be cast to Boolean")) | |
1206 | 1196 | } | |
1207 | - | let | |
1197 | + | let he = if (if (if (bc()) | |
1208 | 1198 | then true | |
1209 | 1199 | else (bp == l)) | |
1210 | 1200 | then true | |
1211 | 1201 | else (bp == n)) | |
1212 | 1202 | then true | |
1213 | - | else | |
1214 | - | let | |
1203 | + | else hd | |
1204 | + | let fS = [if (if (!(he)) | |
1215 | 1205 | then true | |
1216 | - | else | |
1206 | + | else gn(eY)) | |
1217 | 1207 | then true | |
1218 | - | else aS("put operation is blocked by admin"), if ((size( | |
1208 | + | else aS("put operation is blocked by admin"), if ((size(eY.payments) == 1)) | |
1219 | 1209 | then true | |
1220 | 1210 | else aS("exactly 1 payment are expected")] | |
1221 | - | if (( | |
1211 | + | if ((fS == fS)) | |
1222 | 1212 | then { | |
1223 | - | let | |
1224 | - | let | |
1225 | - | let | |
1226 | - | let | |
1227 | - | then | |
1228 | - | else if (( | |
1229 | - | then | |
1213 | + | let hf = eY.payments[0] | |
1214 | + | let fn = hf.assetId | |
1215 | + | let fm = hf.amount | |
1216 | + | let eF = if ((fn == br)) | |
1217 | + | then ey(toBigInt(fm), toBigInt(0), toBigInt(0)) | |
1218 | + | else if ((fn == bs)) | |
1219 | + | then ey(toBigInt(0), toBigInt(fm), toBigInt(0)) | |
1230 | 1220 | else aS("payment asset is not supported") | |
1231 | - | if (( | |
1221 | + | if ((eF == eF)) | |
1232 | 1222 | then { | |
1233 | - | let ab = | |
1234 | - | let ac = | |
1235 | - | let | |
1236 | - | if (( | |
1223 | + | let ab = eY.caller | |
1224 | + | let ac = eY.transactionId | |
1225 | + | let hg = fl(fm, fn, ab, ac) | |
1226 | + | if ((hg == hg)) | |
1237 | 1227 | then { | |
1238 | - | let | |
1239 | - | let | |
1240 | - | let | |
1241 | - | let | |
1242 | - | let | |
1243 | - | let | |
1244 | - | then ( | |
1228 | + | let fr = hg._5 | |
1229 | + | let hh = hg._4 | |
1230 | + | let fk = hg._3 | |
1231 | + | let er = hg._2 | |
1232 | + | let hi = hg._1 | |
1233 | + | let hj = if (if ((hb > 0)) | |
1234 | + | then (hb > hi) | |
1245 | 1235 | else false) | |
1246 | - | then aS(makeString(["amount to receive is less than ", toString( | |
1247 | - | else | |
1248 | - | let | |
1249 | - | if (( | |
1236 | + | then aS(makeString(["amount to receive is less than ", toString(hb)], "")) | |
1237 | + | else hi | |
1238 | + | let fg = ff(hj) | |
1239 | + | if ((fg == fg)) | |
1250 | 1240 | then { | |
1251 | - | let | |
1241 | + | let gU = if (hc) | |
1252 | 1242 | then { | |
1253 | - | let | |
1254 | - | if (( | |
1243 | + | let hk = invoke(bw, "stake", nil, [AttachedPayment(bq, hj)]) | |
1244 | + | if ((hk == hk)) | |
1255 | 1245 | then nil | |
1256 | 1246 | else throw("Strict value is not equal to itself.") | |
1257 | 1247 | } | |
1258 | - | else [ScriptTransfer( | |
1259 | - | let | |
1260 | - | then [ScriptTransfer(aW, | |
1248 | + | else [ScriptTransfer(eY.caller, hj, bq)] | |
1249 | + | let hl = if ((fk > 0)) | |
1250 | + | then [ScriptTransfer(aW, fk, fn)] | |
1261 | 1251 | else nil | |
1262 | - | let | |
1252 | + | let hm = if ((this == aW)) | |
1263 | 1253 | then $Tuple2(0, 0) | |
1264 | - | else if ( | |
1265 | - | then $Tuple2(-( | |
1266 | - | else $Tuple2(0, -( | |
1267 | - | let | |
1268 | - | let | |
1269 | - | let | |
1270 | - | let | |
1271 | - | let | |
1272 | - | let | |
1273 | - | let | |
1274 | - | if (( | |
1254 | + | else if (fr) | |
1255 | + | then $Tuple2(-(fk), 0) | |
1256 | + | else $Tuple2(0, -(fk)) | |
1257 | + | let eH = hm._1 | |
1258 | + | let eI = hm._2 | |
1259 | + | let hn = eG(eH, eI, 0) | |
1260 | + | let gX = hn._1 | |
1261 | + | let ex = hn._2 | |
1262 | + | let eR = value(getString(aj)) | |
1263 | + | let gY = eK(eF, ex) | |
1264 | + | if ((gY == gY)) | |
1275 | 1265 | then { | |
1276 | - | let | |
1277 | - | if (( | |
1278 | - | then $Tuple2(((( | |
1266 | + | let dJ = invoke(this, "rebalance", nil, nil) | |
1267 | + | if ((dJ == dJ)) | |
1268 | + | then $Tuple2((((er ++ gU) ++ hl) ++ gX), hj) | |
1279 | 1269 | else throw("Strict value is not equal to itself.") | |
1280 | 1270 | } | |
1281 | 1271 | else throw("Strict value is not equal to itself.") | |
1282 | 1272 | } | |
1283 | 1273 | else throw("Strict value is not equal to itself.") | |
1284 | 1274 | } | |
1285 | 1275 | else throw("Strict value is not equal to itself.") | |
1286 | 1276 | } | |
1287 | 1277 | else throw("Strict value is not equal to itself.") | |
1288 | 1278 | } | |
1289 | 1279 | else throw("Strict value is not equal to itself.") | |
1290 | 1280 | } | |
1291 | 1281 | ||
1292 | 1282 | ||
1293 | 1283 | ||
1294 | - | @Callable( | |
1295 | - | func putOneTknREADONLY ( | |
1296 | - | let | |
1297 | - | let | |
1298 | - | let | |
1299 | - | let | |
1300 | - | let | |
1301 | - | let | |
1302 | - | $Tuple2(nil, $Tuple3( | |
1284 | + | @Callable(eY) | |
1285 | + | func putOneTknREADONLY (fn,fm) = { | |
1286 | + | let ho = fl(fm, bh(fn), unit, unit) | |
1287 | + | let hi = ho._1 | |
1288 | + | let er = ho._2 | |
1289 | + | let fk = ho._3 | |
1290 | + | let hh = ho._4 | |
1291 | + | let fr = ho._5 | |
1292 | + | $Tuple2(nil, $Tuple3(hi, fk, hh)) | |
1303 | 1293 | } | |
1304 | 1294 | ||
1305 | 1295 | ||
1306 | 1296 | ||
1307 | - | @Callable( | |
1308 | - | func getOneTkn ( | |
1309 | - | let | |
1297 | + | @Callable(eY) | |
1298 | + | func getOneTkn (hp,hb) = { | |
1299 | + | let hd = { | |
1310 | 1300 | let aY = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1311 | 1301 | if ($isInstanceOf(aY, "Boolean")) | |
1312 | 1302 | then aY | |
1313 | 1303 | else throw(($getType(aY) + " couldn't be cast to Boolean")) | |
1314 | 1304 | } | |
1315 | - | let | |
1305 | + | let hq = if (if (bc()) | |
1316 | 1306 | then true | |
1317 | 1307 | else (bp == n)) | |
1318 | 1308 | then true | |
1319 | - | else | |
1320 | - | let | |
1309 | + | else hd | |
1310 | + | let fS = [if (if (!(hq)) | |
1321 | 1311 | then true | |
1322 | - | else | |
1312 | + | else gn(eY)) | |
1323 | 1313 | then true | |
1324 | - | else aS("get operation is blocked by admin"), if ((size( | |
1314 | + | else aS("get operation is blocked by admin"), if ((size(eY.payments) == 1)) | |
1325 | 1315 | then true | |
1326 | 1316 | else aS("exactly 1 payment are expected")] | |
1327 | - | if (( | |
1317 | + | if ((fS == fS)) | |
1328 | 1318 | then { | |
1329 | - | let | |
1330 | - | let | |
1331 | - | let | |
1332 | - | let | |
1333 | - | let | |
1334 | - | if (( | |
1319 | + | let fR = bh(hp) | |
1320 | + | let hf = eY.payments[0] | |
1321 | + | let fn = hf.assetId | |
1322 | + | let fz = hf.amount | |
1323 | + | let eF = ey(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1324 | + | if ((eF == eF)) | |
1335 | 1325 | then { | |
1336 | - | let ab = | |
1337 | - | let ac = | |
1338 | - | let | |
1339 | - | if (( | |
1326 | + | let ab = eY.caller | |
1327 | + | let ac = eY.transactionId | |
1328 | + | let hr = fQ(fR, fz, fn, ab, ac) | |
1329 | + | if ((hr == hr)) | |
1340 | 1330 | then { | |
1341 | - | let | |
1342 | - | let | |
1343 | - | let | |
1344 | - | let | |
1345 | - | let | |
1346 | - | let | |
1347 | - | then ( | |
1331 | + | let fT = hr._5 | |
1332 | + | let hh = hr._4 | |
1333 | + | let fk = hr._3 | |
1334 | + | let er = hr._2 | |
1335 | + | let hs = hr._1 | |
1336 | + | let ca = if (if ((hb > 0)) | |
1337 | + | then (hb > hs) | |
1348 | 1338 | else false) | |
1349 | - | then aS(makeString(["amount to receive is less than ", toString( | |
1350 | - | else | |
1351 | - | let | |
1352 | - | let | |
1353 | - | if ($isInstanceOf( | |
1339 | + | then aS(makeString(["amount to receive is less than ", toString(hb)], "")) | |
1340 | + | else hs | |
1341 | + | let gH = { | |
1342 | + | let bX = cu(hp) | |
1343 | + | if ($isInstanceOf(bX, "(Boolean, Int, Int, String, String, Int, String)")) | |
1354 | 1344 | then { | |
1355 | - | let | |
1356 | - | | |
1345 | + | let cH = bX | |
1346 | + | cH | |
1357 | 1347 | } | |
1358 | 1348 | else throw("error lease config") | |
1359 | 1349 | } | |
1360 | - | let | |
1361 | - | if (( | |
1350 | + | let ht = invoke(aV, "burn", [fz], [AttachedPayment(fn, fz)]) | |
1351 | + | if ((ht == ht)) | |
1362 | 1352 | then { | |
1363 | - | let | |
1364 | - | if (( | |
1353 | + | let gI = cQ(hp, ca) | |
1354 | + | if ((gI == gI)) | |
1365 | 1355 | then { | |
1366 | - | let | |
1367 | - | let | |
1368 | - | then [ScriptTransfer(aW, | |
1356 | + | let hu = [ScriptTransfer(ab, ca, fR)] | |
1357 | + | let hl = if ((fk > 0)) | |
1358 | + | then [ScriptTransfer(aW, fk, fR)] | |
1369 | 1359 | else nil | |
1370 | - | let | |
1371 | - | let | |
1360 | + | let hv = { | |
1361 | + | let hw = if ((this == aW)) | |
1372 | 1362 | then 0 | |
1373 | - | else | |
1374 | - | if ( | |
1375 | - | then $Tuple2(-(( | |
1376 | - | else $Tuple2(0, -(( | |
1363 | + | else fk | |
1364 | + | if (fT) | |
1365 | + | then $Tuple2(-((ca + hw)), 0) | |
1366 | + | else $Tuple2(0, -((ca + hw))) | |
1377 | 1367 | } | |
1378 | - | let | |
1379 | - | let | |
1380 | - | let | |
1381 | - | let | |
1382 | - | let | |
1383 | - | let | |
1384 | - | if (( | |
1368 | + | let eH = hv._1 | |
1369 | + | let eI = hv._2 | |
1370 | + | let hx = eG(eH, eI, 0) | |
1371 | + | let gX = hx._1 | |
1372 | + | let ex = hx._2 | |
1373 | + | let gY = eK(eF, ex) | |
1374 | + | if ((gY == gY)) | |
1385 | 1375 | then { | |
1386 | - | let | |
1387 | - | if (( | |
1388 | - | then $Tuple2(((( | |
1376 | + | let dJ = invoke(this, "rebalance", nil, nil) | |
1377 | + | if ((dJ == dJ)) | |
1378 | + | then $Tuple2(((((er ++ gI) ++ hu) ++ hl) ++ gX), ca) | |
1389 | 1379 | else throw("Strict value is not equal to itself.") | |
1390 | 1380 | } | |
1391 | 1381 | else throw("Strict value is not equal to itself.") | |
1392 | 1382 | } | |
1393 | 1383 | else throw("Strict value is not equal to itself.") | |
1394 | 1384 | } | |
1395 | 1385 | else throw("Strict value is not equal to itself.") | |
1396 | 1386 | } | |
1397 | 1387 | else throw("Strict value is not equal to itself.") | |
1398 | 1388 | } | |
1399 | 1389 | else throw("Strict value is not equal to itself.") | |
1400 | 1390 | } | |
1401 | 1391 | else throw("Strict value is not equal to itself.") | |
1402 | 1392 | } | |
1403 | 1393 | ||
1404 | 1394 | ||
1405 | 1395 | ||
1406 | - | @Callable( | |
1407 | - | func getOneTknREADONLY ( | |
1408 | - | let | |
1409 | - | let | |
1410 | - | let | |
1411 | - | let | |
1412 | - | let | |
1413 | - | let | |
1414 | - | $Tuple2(nil, $Tuple3( | |
1396 | + | @Callable(eY) | |
1397 | + | func getOneTknREADONLY (fR,fz) = { | |
1398 | + | let hy = fQ(bh(fR), fz, bq, unit, unit) | |
1399 | + | let hs = hy._1 | |
1400 | + | let er = hy._2 | |
1401 | + | let fk = hy._3 | |
1402 | + | let hh = hy._4 | |
1403 | + | let fT = hy._5 | |
1404 | + | $Tuple2(nil, $Tuple3(hs, fk, hh)) | |
1415 | 1405 | } | |
1416 | 1406 | ||
1417 | 1407 | ||
1418 | 1408 | ||
1419 | - | @Callable( | |
1420 | - | func unstakeAndGetOneTkn ( | |
1421 | - | let | |
1409 | + | @Callable(eY) | |
1410 | + | func unstakeAndGetOneTkn (hz,hp,hb) = { | |
1411 | + | let hd = { | |
1422 | 1412 | let aY = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1423 | 1413 | if ($isInstanceOf(aY, "Boolean")) | |
1424 | 1414 | then aY | |
1425 | 1415 | else throw(($getType(aY) + " couldn't be cast to Boolean")) | |
1426 | 1416 | } | |
1427 | - | let | |
1417 | + | let hq = if (if (bc()) | |
1428 | 1418 | then true | |
1429 | 1419 | else (bp == n)) | |
1430 | 1420 | then true | |
1431 | - | else | |
1432 | - | let | |
1421 | + | else hd | |
1422 | + | let fS = [if (if (!(hq)) | |
1433 | 1423 | then true | |
1434 | - | else | |
1424 | + | else gn(eY)) | |
1435 | 1425 | then true | |
1436 | - | else aS("get operation is blocked by admin"), if ((size( | |
1426 | + | else aS("get operation is blocked by admin"), if ((size(eY.payments) == 0)) | |
1437 | 1427 | then true | |
1438 | 1428 | else aS("no payments are expected")] | |
1439 | - | if (( | |
1429 | + | if ((fS == fS)) | |
1440 | 1430 | then { | |
1441 | - | let | |
1442 | - | let ab = | |
1443 | - | let ac = | |
1444 | - | let | |
1445 | - | if (( | |
1431 | + | let fR = bh(hp) | |
1432 | + | let ab = eY.caller | |
1433 | + | let ac = eY.transactionId | |
1434 | + | let eF = ey(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1435 | + | if ((eF == eF)) | |
1446 | 1436 | then { | |
1447 | - | let | |
1448 | - | if (( | |
1437 | + | let hA = invoke(bw, "unstake", [toBase58String(bq), hz], nil) | |
1438 | + | if ((hA == hA)) | |
1449 | 1439 | then { | |
1450 | - | let | |
1451 | - | if (( | |
1440 | + | let hB = fQ(fR, hz, bq, ab, ac) | |
1441 | + | if ((hB == hB)) | |
1452 | 1442 | then { | |
1453 | - | let | |
1454 | - | let | |
1455 | - | let | |
1456 | - | let | |
1457 | - | let | |
1458 | - | let | |
1459 | - | then ( | |
1443 | + | let fT = hB._5 | |
1444 | + | let hh = hB._4 | |
1445 | + | let fk = hB._3 | |
1446 | + | let er = hB._2 | |
1447 | + | let hs = hB._1 | |
1448 | + | let ca = if (if ((hb > 0)) | |
1449 | + | then (hb > hs) | |
1460 | 1450 | else false) | |
1461 | - | then aS(makeString(["amount to receive is less than ", toString( | |
1462 | - | else | |
1463 | - | let | |
1464 | - | if (( | |
1451 | + | then aS(makeString(["amount to receive is less than ", toString(hb)], "")) | |
1452 | + | else hs | |
1453 | + | let ht = invoke(aV, "burn", [hz], [AttachedPayment(bq, hz)]) | |
1454 | + | if ((ht == ht)) | |
1465 | 1455 | then { | |
1466 | - | let | |
1467 | - | if (( | |
1456 | + | let gI = cQ(hp, ca) | |
1457 | + | if ((gI == gI)) | |
1468 | 1458 | then { | |
1469 | - | let | |
1470 | - | let | |
1471 | - | then [ScriptTransfer(aW, | |
1459 | + | let hu = [ScriptTransfer(eY.caller, ca, fR)] | |
1460 | + | let hl = if ((fk > 0)) | |
1461 | + | then [ScriptTransfer(aW, fk, fR)] | |
1472 | 1462 | else nil | |
1473 | - | let | |
1474 | - | let | |
1463 | + | let hC = { | |
1464 | + | let hw = if ((this == aW)) | |
1475 | 1465 | then 0 | |
1476 | - | else | |
1477 | - | if ( | |
1478 | - | then $Tuple2(-(( | |
1479 | - | else $Tuple2(0, -(( | |
1466 | + | else fk | |
1467 | + | if (fT) | |
1468 | + | then $Tuple2(-((ca + hw)), 0) | |
1469 | + | else $Tuple2(0, -((ca + hw))) | |
1480 | 1470 | } | |
1481 | - | let | |
1482 | - | let | |
1483 | - | let | |
1484 | - | let | |
1485 | - | let | |
1486 | - | let | |
1487 | - | if (( | |
1471 | + | let eH = hC._1 | |
1472 | + | let eI = hC._2 | |
1473 | + | let hD = eG(eH, eI, 0) | |
1474 | + | let gX = hD._1 | |
1475 | + | let ex = hD._2 | |
1476 | + | let gY = eK(eF, ex) | |
1477 | + | if ((gY == gY)) | |
1488 | 1478 | then { | |
1489 | - | let | |
1490 | - | if (( | |
1491 | - | then $Tuple2((((( | |
1479 | + | let dJ = invoke(this, "rebalance", nil, nil) | |
1480 | + | if ((dJ == dJ)) | |
1481 | + | then $Tuple2(((((er ++ gI) ++ hu) ++ hl) ++ gX), ca) | |
1492 | 1482 | else throw("Strict value is not equal to itself.") | |
1493 | 1483 | } | |
1494 | 1484 | else throw("Strict value is not equal to itself.") | |
1495 | 1485 | } | |
1496 | 1486 | else throw("Strict value is not equal to itself.") | |
1497 | 1487 | } | |
1498 | 1488 | else throw("Strict value is not equal to itself.") | |
1499 | 1489 | } | |
1500 | 1490 | else throw("Strict value is not equal to itself.") | |
1501 | 1491 | } | |
1502 | 1492 | else throw("Strict value is not equal to itself.") | |
1503 | 1493 | } | |
1504 | 1494 | else throw("Strict value is not equal to itself.") | |
1505 | 1495 | } | |
1506 | 1496 | else throw("Strict value is not equal to itself.") | |
1507 | 1497 | } | |
1508 | 1498 | ||
1509 | 1499 | ||
1510 | 1500 | ||
1511 | - | @Callable( | |
1501 | + | @Callable(eY) | |
1512 | 1502 | func get () = { | |
1513 | - | let | |
1514 | - | let | |
1515 | - | let | |
1516 | - | let | |
1517 | - | let | |
1518 | - | let | |
1519 | - | let | |
1520 | - | if (( | |
1503 | + | let ec = eX(eY) | |
1504 | + | let hE = ec._1 | |
1505 | + | let dG = ec._2 | |
1506 | + | let fa = ec._3 | |
1507 | + | let do = ec._4 | |
1508 | + | let dK = ec._5 | |
1509 | + | let eF = ey(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1510 | + | if ((eF == eF)) | |
1521 | 1511 | then { | |
1522 | - | let | |
1523 | - | if (( | |
1512 | + | let hF = invoke(aV, "burn", [fa], [AttachedPayment(do, fa)]) | |
1513 | + | if ((hF == hF)) | |
1524 | 1514 | then { | |
1525 | - | let | |
1526 | - | let | |
1527 | - | let | |
1528 | - | let | |
1529 | - | if (( | |
1530 | - | then ( | |
1515 | + | let hG = eG(-(hE), -(dG), 0) | |
1516 | + | let gX = hG._1 | |
1517 | + | let ex = hG._2 | |
1518 | + | let gY = eK(eF, ex) | |
1519 | + | if ((gY == gY)) | |
1520 | + | then (dK ++ gX) | |
1531 | 1521 | else throw("Strict value is not equal to itself.") | |
1532 | 1522 | } | |
1533 | 1523 | else throw("Strict value is not equal to itself.") | |
1534 | 1524 | } | |
1535 | 1525 | else throw("Strict value is not equal to itself.") | |
1536 | 1526 | } | |
1537 | 1527 | ||
1538 | 1528 | ||
1539 | 1529 | ||
1540 | - | @Callable( | |
1541 | - | func getNoLess ( | |
1542 | - | let | |
1543 | - | let | |
1544 | - | let | |
1545 | - | let | |
1546 | - | let | |
1547 | - | let | |
1548 | - | if (( | |
1549 | - | then throw(((("noLessThenAmtAsset failed: " + toString( | |
1550 | - | else if (( | |
1551 | - | then throw(((("noLessThenPriceAsset failed: " + toString( | |
1530 | + | @Callable(eY) | |
1531 | + | func getNoLess (hH,hI) = { | |
1532 | + | let ec = eX(eY) | |
1533 | + | let dF = ec._1 | |
1534 | + | let dG = ec._2 | |
1535 | + | let fa = ec._3 | |
1536 | + | let do = ec._4 | |
1537 | + | let dK = ec._5 | |
1538 | + | if ((hH > dF)) | |
1539 | + | then throw(((("noLessThenAmtAsset failed: " + toString(dF)) + " < ") + toString(hH))) | |
1540 | + | else if ((hI > dG)) | |
1541 | + | then throw(((("noLessThenPriceAsset failed: " + toString(dG)) + " < ") + toString(hI))) | |
1552 | 1542 | else { | |
1553 | - | let | |
1554 | - | if (( | |
1543 | + | let eF = ey(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1544 | + | if ((eF == eF)) | |
1555 | 1545 | then { | |
1556 | - | let | |
1557 | - | if (( | |
1546 | + | let hF = invoke(aV, "burn", [fa], [AttachedPayment(do, fa)]) | |
1547 | + | if ((hF == hF)) | |
1558 | 1548 | then { | |
1559 | - | let | |
1560 | - | let | |
1561 | - | let | |
1562 | - | let | |
1563 | - | if (( | |
1564 | - | then ( | |
1549 | + | let hJ = eG(-(dF), -(dG), 0) | |
1550 | + | let gX = hJ._1 | |
1551 | + | let ex = hJ._2 | |
1552 | + | let gY = eK(eF, ex) | |
1553 | + | if ((gY == gY)) | |
1554 | + | then (dK ++ gX) | |
1565 | 1555 | else throw("Strict value is not equal to itself.") | |
1566 | 1556 | } | |
1567 | 1557 | else throw("Strict value is not equal to itself.") | |
1568 | 1558 | } | |
1569 | 1559 | else throw("Strict value is not equal to itself.") | |
1570 | 1560 | } | |
1571 | 1561 | } | |
1572 | 1562 | ||
1573 | 1563 | ||
1574 | 1564 | ||
1575 | - | @Callable( | |
1576 | - | func unstakeAndGet ( | |
1577 | - | let | |
1565 | + | @Callable(eY) | |
1566 | + | func unstakeAndGet (ca) = { | |
1567 | + | let hK = if ((size(eY.payments) != 0)) | |
1578 | 1568 | then throw("No payments are expected") | |
1579 | 1569 | else true | |
1580 | - | if (( | |
1570 | + | if ((hK == hK)) | |
1581 | 1571 | then { | |
1582 | - | let | |
1583 | - | let | |
1584 | - | let | |
1585 | - | if (( | |
1572 | + | let dd = be() | |
1573 | + | let dq = fromBase58String(dd[q]) | |
1574 | + | let eF = ey(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1575 | + | if ((eF == eF)) | |
1586 | 1576 | then { | |
1587 | - | let | |
1588 | - | if (( | |
1577 | + | let hA = invoke(bw, "unstake", [toBase58String(dq), ca], nil) | |
1578 | + | if ((hA == hA)) | |
1589 | 1579 | then { | |
1590 | - | let | |
1591 | - | let | |
1592 | - | let | |
1593 | - | let | |
1594 | - | let | |
1595 | - | let | |
1580 | + | let ec = dm(toBase58String(eY.transactionId), toBase58String(dq), ca, eY.caller) | |
1581 | + | let dF = ec._1 | |
1582 | + | let dG = ec._2 | |
1583 | + | let dt = parseIntValue(ec._9) | |
1584 | + | let dK = ec._10 | |
1585 | + | let hL = if (if (bc()) | |
1596 | 1586 | then true | |
1597 | - | else ( | |
1598 | - | then throw(("Get operation is blocked by admin. Status = " + toString( | |
1587 | + | else (dt == n)) | |
1588 | + | then throw(("Get operation is blocked by admin. Status = " + toString(dt))) | |
1599 | 1589 | else true | |
1600 | - | if (( | |
1590 | + | if ((hL == hL)) | |
1601 | 1591 | then { | |
1602 | - | let | |
1603 | - | if (( | |
1592 | + | let hF = invoke(aV, "burn", [ca], [AttachedPayment(dq, ca)]) | |
1593 | + | if ((hF == hF)) | |
1604 | 1594 | then { | |
1605 | - | let | |
1606 | - | let | |
1607 | - | let | |
1608 | - | let | |
1609 | - | if (( | |
1610 | - | then ( | |
1595 | + | let hM = eG(-(dF), -(dG), 0) | |
1596 | + | let gX = hM._1 | |
1597 | + | let ex = hM._2 | |
1598 | + | let gY = eK(eF, ex) | |
1599 | + | if ((gY == gY)) | |
1600 | + | then (dK ++ gX) | |
1611 | 1601 | else throw("Strict value is not equal to itself.") | |
1612 | 1602 | } | |
1613 | 1603 | else throw("Strict value is not equal to itself.") | |
1614 | 1604 | } | |
1615 | 1605 | else throw("Strict value is not equal to itself.") | |
1616 | 1606 | } | |
1617 | 1607 | else throw("Strict value is not equal to itself.") | |
1618 | 1608 | } | |
1619 | 1609 | else throw("Strict value is not equal to itself.") | |
1620 | 1610 | } | |
1621 | 1611 | else throw("Strict value is not equal to itself.") | |
1622 | 1612 | } | |
1623 | 1613 | ||
1624 | 1614 | ||
1625 | 1615 | ||
1626 | - | @Callable( | |
1627 | - | func unstakeAndGetNoLess ( | |
1628 | - | let | |
1616 | + | @Callable(eY) | |
1617 | + | func unstakeAndGetNoLess (hz,hN,hI) = { | |
1618 | + | let hq = if (bc()) | |
1629 | 1619 | then true | |
1630 | 1620 | else (bp == n) | |
1631 | - | let | |
1621 | + | let fS = [if (!(hq)) | |
1632 | 1622 | then true | |
1633 | - | else throw("get operation is blocked by admin"), if ((size( | |
1623 | + | else throw("get operation is blocked by admin"), if ((size(eY.payments) == 0)) | |
1634 | 1624 | then true | |
1635 | 1625 | else throw("no payments are expected")] | |
1636 | - | if (( | |
1626 | + | if ((fS == fS)) | |
1637 | 1627 | then { | |
1638 | - | let | |
1639 | - | if (( | |
1628 | + | let eF = ey(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1629 | + | if ((eF == eF)) | |
1640 | 1630 | then { | |
1641 | - | let | |
1642 | - | if (( | |
1631 | + | let hA = invoke(bw, "unstake", [toBase58String(bq), hz], nil) | |
1632 | + | if ((hA == hA)) | |
1643 | 1633 | then { | |
1644 | - | let | |
1645 | - | let | |
1646 | - | let | |
1647 | - | let | |
1648 | - | let | |
1634 | + | let ec = dm(toBase58String(eY.transactionId), toBase58String(bq), hz, eY.caller) | |
1635 | + | let dF = ec._1 | |
1636 | + | let dG = ec._2 | |
1637 | + | let dK = ec._10 | |
1638 | + | let hO = [if ((dF >= hN)) | |
1649 | 1639 | then true | |
1650 | - | else throw(makeString(["amount asset amount to receive is less than ", toString( | |
1640 | + | else throw(makeString(["amount asset amount to receive is less than ", toString(hN)], "")), if ((dG >= hI)) | |
1651 | 1641 | then true | |
1652 | - | else throw(makeString(["price asset amount to receive is less than ", toString( | |
1653 | - | if (( | |
1642 | + | else throw(makeString(["price asset amount to receive is less than ", toString(hI)], ""))] | |
1643 | + | if ((hO == hO)) | |
1654 | 1644 | then { | |
1655 | - | let | |
1656 | - | if (( | |
1645 | + | let hF = invoke(aV, "burn", [hz], [AttachedPayment(bq, hz)]) | |
1646 | + | if ((hF == hF)) | |
1657 | 1647 | then { | |
1658 | - | let | |
1659 | - | let | |
1660 | - | let | |
1661 | - | let | |
1662 | - | if (( | |
1663 | - | then ( | |
1648 | + | let hP = eG(-(dF), -(dG), 0) | |
1649 | + | let gX = hP._1 | |
1650 | + | let ex = hP._2 | |
1651 | + | let gY = eK(eF, ex) | |
1652 | + | if ((gY == gY)) | |
1653 | + | then (dK ++ gX) | |
1664 | 1654 | else throw("Strict value is not equal to itself.") | |
1665 | 1655 | } | |
1666 | 1656 | else throw("Strict value is not equal to itself.") | |
1667 | 1657 | } | |
1668 | 1658 | else throw("Strict value is not equal to itself.") | |
1669 | 1659 | } | |
1670 | 1660 | else throw("Strict value is not equal to itself.") | |
1671 | 1661 | } | |
1672 | 1662 | else throw("Strict value is not equal to itself.") | |
1673 | 1663 | } | |
1674 | 1664 | else throw("Strict value is not equal to itself.") | |
1675 | 1665 | } | |
1676 | 1666 | ||
1677 | 1667 | ||
1678 | 1668 | ||
1679 | - | @Callable( | |
1680 | - | func activate ( | |
1669 | + | @Callable(eY) | |
1670 | + | func activate (hQ,hR) = if ((toString(eY.caller) != toString(aV))) | |
1681 | 1671 | then throw("permissions denied") | |
1682 | - | else $Tuple2([StringEntry(ae(), | |
1672 | + | else $Tuple2([StringEntry(ae(), hQ), StringEntry(af(), hR)], "success") | |
1683 | 1673 | ||
1684 | 1674 | ||
1685 | 1675 | ||
1686 | - | @Callable( | |
1676 | + | @Callable(eY) | |
1687 | 1677 | func refreshKLp () = { | |
1688 | - | let | |
1689 | - | let | |
1678 | + | let hS = valueOrElse(getInteger(ak), 0) | |
1679 | + | let hT = if (((height - hS) >= an)) | |
1690 | 1680 | then unit | |
1691 | 1681 | else aS(makeString([toString(an), " blocks have not passed since the previous call"], "")) | |
1692 | - | if (( | |
1682 | + | if ((hT == hT)) | |
1693 | 1683 | then { | |
1694 | - | let | |
1695 | - | let | |
1696 | - | let | |
1697 | - | let | |
1698 | - | let | |
1699 | - | then | |
1684 | + | let eR = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aj), "0")), aU("invalid kLp")) | |
1685 | + | let hU = eG(0, 0, 0) | |
1686 | + | let hV = hU._1 | |
1687 | + | let ex = hU._2 | |
1688 | + | let eJ = if ((eR != ex)) | |
1689 | + | then hV | |
1700 | 1690 | else aS("nothing to refresh") | |
1701 | - | $Tuple2( | |
1691 | + | $Tuple2(eJ, toString(ex)) | |
1702 | 1692 | } | |
1703 | 1693 | else throw("Strict value is not equal to itself.") | |
1704 | 1694 | } | |
1705 | 1695 | ||
1706 | 1696 | ||
1707 | 1697 | ||
1708 | - | @Callable( | |
1698 | + | @Callable(eY) | |
1709 | 1699 | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, be()) | |
1710 | 1700 | ||
1711 | 1701 | ||
1712 | 1702 | ||
1713 | - | @Callable( | |
1703 | + | @Callable(eY) | |
1714 | 1704 | func getAccBalanceWrapperREADONLY (ar) = $Tuple2(nil, bN(ar)) | |
1715 | 1705 | ||
1716 | 1706 | ||
1717 | 1707 | ||
1718 | - | @Callable( | |
1719 | - | func calcPricesWrapperREADONLY ( | |
1720 | - | let | |
1721 | - | $Tuple2(nil, [toString( | |
1708 | + | @Callable(eY) | |
1709 | + | func calcPricesWrapperREADONLY (cX,cY,dc) = { | |
1710 | + | let dl = db(cX, cY, dc) | |
1711 | + | $Tuple2(nil, [toString(dl[0]), toString(dl[1]), toString(dl[2])]) | |
1722 | 1712 | } | |
1723 | 1713 | ||
1724 | 1714 | ||
1725 | 1715 | ||
1726 | - | @Callable( | |
1716 | + | @Callable(eY) | |
1727 | 1717 | func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F))) | |
1728 | 1718 | ||
1729 | 1719 | ||
1730 | 1720 | ||
1731 | - | @Callable( | |
1721 | + | @Callable(eY) | |
1732 | 1722 | func fromX18WrapperREADONLY (I,J) = $Tuple2(nil, H(parseBigIntValue(I), J)) | |
1733 | 1723 | ||
1734 | 1724 | ||
1735 | 1725 | ||
1736 | - | @Callable( | |
1737 | - | func calcPriceBigIntWrapperREADONLY ( | |
1726 | + | @Callable(eY) | |
1727 | + | func calcPriceBigIntWrapperREADONLY (bR,bS) = $Tuple2(nil, toString(bQ(parseBigIntValue(bR), parseBigIntValue(bS)))) | |
1738 | 1728 | ||
1739 | 1729 | ||
1740 | 1730 | ||
1741 | - | @Callable( | |
1742 | - | func estimatePutOperationWrapperREADONLY ( | |
1731 | + | @Callable(eY) | |
1732 | + | func estimatePutOperationWrapperREADONLY (dn,dM,dN,dO,dP,dQ,ab,dR,dS) = $Tuple2(nil, dL(dn, dM, dN, dO, dP, dQ, ab, dR, dS)) | |
1743 | 1733 | ||
1744 | 1734 | ||
1745 | 1735 | ||
1746 | - | @Callable( | |
1747 | - | func estimateGetOperationWrapperREADONLY ( | |
1748 | - | let | |
1749 | - | $Tuple2(nil, $Tuple10( | |
1736 | + | @Callable(eY) | |
1737 | + | func estimateGetOperationWrapperREADONLY (dn,do,dp,ab) = { | |
1738 | + | let ec = dm(dn, do, dp, addressFromStringValue(ab)) | |
1739 | + | $Tuple2(nil, $Tuple10(ec._1, ec._2, ec._3, ec._4, ec._5, ec._6, ec._7, toString(ec._8), ec._9, ec._10)) | |
1750 | 1740 | } | |
1751 | 1741 | ||
1752 | 1742 | ||
1753 | 1743 | ||
1754 | - | @Callable( | |
1744 | + | @Callable(eY) | |
1755 | 1745 | func statsREADONLY () = { | |
1756 | - | let | |
1757 | - | let | |
1758 | - | let | |
1759 | - | let | |
1760 | - | let | |
1761 | - | let | |
1762 | - | let | |
1763 | - | let | |
1764 | - | let | |
1765 | - | let | |
1766 | - | let | |
1767 | - | let | |
1746 | + | let dd = be() | |
1747 | + | let dq = fromBase58String(dd[q]) | |
1748 | + | let hW = dd[r] | |
1749 | + | let hX = dd[s] | |
1750 | + | let dV = dd[v] | |
1751 | + | let dW = dd[w] | |
1752 | + | let de = parseIntValue(dd[t]) | |
1753 | + | let df = parseIntValue(dd[u]) | |
1754 | + | let hY = valueOrErrorMessage(assetInfo(dq), (("Asset " + toBase58String(dq)) + " doesn't exist")).quantity | |
1755 | + | let hZ = bN(hW) | |
1756 | + | let ia = bN(hX) | |
1757 | + | let ib = if ((hY == 0)) | |
1768 | 1758 | then [e, e, e] | |
1769 | - | else | |
1770 | - | let | |
1771 | - | let | |
1772 | - | let | |
1773 | - | let | |
1774 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString( | |
1759 | + | else db(hZ, ia, hY) | |
1760 | + | let dA = 0 | |
1761 | + | let ic = H(ib[1], b) | |
1762 | + | let id = H(ib[2], b) | |
1763 | + | let ie = value(getInteger(aV, aF(toString(this)))) | |
1764 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(hZ), toString(ia), toString(hY), toString(dA), toString(ic), toString(id), toString(ie)], j)) | |
1775 | 1765 | } | |
1776 | 1766 | ||
1777 | 1767 | ||
1778 | 1768 | ||
1779 | - | @Callable( | |
1780 | - | func evaluatePutByAmountAssetREADONLY ( | |
1781 | - | let | |
1782 | - | let | |
1783 | - | let | |
1784 | - | let | |
1785 | - | let | |
1786 | - | let | |
1787 | - | let | |
1788 | - | let | |
1789 | - | let | |
1790 | - | let | |
1791 | - | let | |
1792 | - | let | |
1793 | - | let | |
1794 | - | let | |
1795 | - | let | |
1769 | + | @Callable(eY) | |
1770 | + | func evaluatePutByAmountAssetREADONLY (dN) = { | |
1771 | + | let dd = be() | |
1772 | + | let dq = fromBase58String(dd[q]) | |
1773 | + | let dT = dd[r] | |
1774 | + | let dr = fromBase58String(dT) | |
1775 | + | let dU = dd[s] | |
1776 | + | let ds = fromBase58String(dU) | |
1777 | + | let de = parseIntValue(dd[t]) | |
1778 | + | let df = parseIntValue(dd[u]) | |
1779 | + | let dt = dd[p] | |
1780 | + | let hY = valueOrErrorMessage(assetInfo(dq), (("Asset " + toBase58String(dq)) + " doesn't exist")).quantity | |
1781 | + | let hZ = bN(dT) | |
1782 | + | let ia = bN(dU) | |
1783 | + | let cZ = D(hZ, de) | |
1784 | + | let da = D(ia, df) | |
1785 | + | let dz = if ((hY == 0)) | |
1796 | 1786 | then e | |
1797 | - | else | |
1798 | - | let | |
1799 | - | let | |
1800 | - | let | |
1801 | - | let | |
1802 | - | let | |
1803 | - | let | |
1804 | - | let | |
1805 | - | let | |
1806 | - | let | |
1807 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString( | |
1787 | + | else bQ(da, cZ) | |
1788 | + | let dZ = D(dN, de) | |
1789 | + | let ea = fraction(dZ, dz, d) | |
1790 | + | let dP = H(ea, df) | |
1791 | + | let fe = dL("", 500000, dN, dr, dP, ds, "", true, false) | |
1792 | + | let ek = fe._1 | |
1793 | + | let if = fe._3 | |
1794 | + | let dv = fe._4 | |
1795 | + | let dx = fe._5 | |
1796 | + | let du = fe._6 | |
1797 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(ek), toString(H(dz, b)), toString(dv), toString(dx), toString(du), dt, toString(dN), toString(dP)], j)) | |
1808 | 1798 | } | |
1809 | 1799 | ||
1810 | 1800 | ||
1811 | 1801 | ||
1812 | - | @Callable( | |
1813 | - | func evaluatePutByPriceAssetREADONLY ( | |
1814 | - | let | |
1815 | - | let | |
1816 | - | let | |
1817 | - | let | |
1818 | - | let | |
1819 | - | let | |
1820 | - | let | |
1821 | - | let | |
1822 | - | let | |
1823 | - | let | |
1824 | - | let | |
1825 | - | let | |
1826 | - | let | |
1827 | - | let | |
1828 | - | let | |
1802 | + | @Callable(eY) | |
1803 | + | func evaluatePutByPriceAssetREADONLY (dP) = { | |
1804 | + | let dd = be() | |
1805 | + | let dq = fromBase58String(dd[q]) | |
1806 | + | let dT = dd[r] | |
1807 | + | let dr = fromBase58String(dT) | |
1808 | + | let dU = dd[s] | |
1809 | + | let ds = fromBase58String(dU) | |
1810 | + | let de = parseIntValue(dd[t]) | |
1811 | + | let df = parseIntValue(dd[u]) | |
1812 | + | let dt = dd[p] | |
1813 | + | let hY = valueOrErrorMessage(assetInfo(dq), (("Asset " + toBase58String(dq)) + " doesn't exist")).quantity | |
1814 | + | let ig = bN(dT) | |
1815 | + | let ih = bN(dU) | |
1816 | + | let ii = D(ig, de) | |
1817 | + | let ij = D(ih, df) | |
1818 | + | let dz = if ((hY == 0)) | |
1829 | 1819 | then e | |
1830 | - | else | |
1831 | - | let | |
1832 | - | let | |
1833 | - | let | |
1834 | - | let | |
1835 | - | let | |
1836 | - | let | |
1837 | - | let | |
1838 | - | let | |
1839 | - | let | |
1840 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString( | |
1820 | + | else bQ(ij, ii) | |
1821 | + | let ea = D(dP, df) | |
1822 | + | let dZ = fraction(ea, d, dz) | |
1823 | + | let dN = H(dZ, de) | |
1824 | + | let fe = dL("", 500000, dN, dr, dP, ds, "", true, false) | |
1825 | + | let ek = fe._1 | |
1826 | + | let if = fe._3 | |
1827 | + | let dv = fe._4 | |
1828 | + | let dx = fe._5 | |
1829 | + | let du = fe._6 | |
1830 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(ek), toString(H(dz, b)), toString(dv), toString(dx), toString(du), dt, toString(dN), toString(dP)], j)) | |
1841 | 1831 | } | |
1842 | 1832 | ||
1843 | 1833 | ||
1844 | 1834 | ||
1845 | - | @Callable( | |
1846 | - | func evaluateGetREADONLY ( | |
1847 | - | let | |
1848 | - | let | |
1849 | - | let | |
1850 | - | let | |
1851 | - | let | |
1852 | - | let | |
1853 | - | let | |
1854 | - | let | |
1855 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString( | |
1835 | + | @Callable(eY) | |
1836 | + | func evaluateGetREADONLY (ik,il) = { | |
1837 | + | let ec = dm("", ik, il, this) | |
1838 | + | let dF = ec._1 | |
1839 | + | let dG = ec._2 | |
1840 | + | let dv = ec._5 | |
1841 | + | let dx = ec._6 | |
1842 | + | let du = ec._7 | |
1843 | + | let dA = ec._8 | |
1844 | + | let dt = parseIntValue(ec._9) | |
1845 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(dF), toString(dG), toString(dv), toString(dx), toString(du), toString(dA), toString(dt)], j)) | |
1856 | 1846 | } | |
1857 | 1847 | ||
1858 | 1848 | ||
1859 | - | @Verifier( | |
1860 | - | func | |
1861 | - | let | |
1862 | - | let | |
1863 | - | if ($isInstanceOf( | |
1849 | + | @Verifier(im) | |
1850 | + | func in () = { | |
1851 | + | let io = { | |
1852 | + | let bX = gk() | |
1853 | + | if ($isInstanceOf(bX, "ByteVector")) | |
1864 | 1854 | then { | |
1865 | - | let | |
1866 | - | | |
1855 | + | let go = bX | |
1856 | + | go | |
1867 | 1857 | } | |
1868 | - | else if ($isInstanceOf( | |
1869 | - | then | |
1858 | + | else if ($isInstanceOf(bX, "Unit")) | |
1859 | + | then im.senderPublicKey | |
1870 | 1860 | else throw("Match error") | |
1871 | 1861 | } | |
1872 | - | let | |
1873 | - | if ($isInstanceOf( | |
1862 | + | let bX = im | |
1863 | + | if ($isInstanceOf(bX, "Order")) | |
1874 | 1864 | then { | |
1875 | - | let | |
1876 | - | let | |
1877 | - | let | |
1878 | - | let aK = | |
1879 | - | let aL = | |
1880 | - | let aM = sigVerify( | |
1881 | - | let aN = sigVerify( | |
1865 | + | let eN = bX | |
1866 | + | let ip = bd() | |
1867 | + | let iq = eM(eN) | |
1868 | + | let aK = iq._1 | |
1869 | + | let aL = iq._2 | |
1870 | + | let aM = sigVerify(eN.bodyBytes, eN.proofs[0], eN.senderPublicKey) | |
1871 | + | let aN = sigVerify(eN.bodyBytes, eN.proofs[1], ip) | |
1882 | 1872 | if (if (if (aK) | |
1883 | 1873 | then aM | |
1884 | 1874 | else false) | |
1885 | 1875 | then aN | |
1886 | 1876 | else false) | |
1887 | 1877 | then true | |
1888 | 1878 | else aJ(aK, aL, aM, aN) | |
1889 | 1879 | } | |
1890 | - | else if ($isInstanceOf( | |
1880 | + | else if ($isInstanceOf(bX, "SetScriptTransaction")) | |
1891 | 1881 | then { | |
1892 | - | let | |
1893 | - | if (sigVerify( | |
1882 | + | let gl = bX | |
1883 | + | if (sigVerify(im.bodyBytes, im.proofs[0], io)) | |
1894 | 1884 | then true | |
1895 | 1885 | else { | |
1896 | - | let | |
1897 | - | let | |
1898 | - | let | |
1899 | - | if (( | |
1900 | - | then ( | |
1886 | + | let ir = blake2b256(value(gl.script)) | |
1887 | + | let is = fromBase64String(value(getString(aV, aH()))) | |
1888 | + | let it = scriptHash(this) | |
1889 | + | if ((is == ir)) | |
1890 | + | then (it != ir) | |
1901 | 1891 | else false | |
1902 | 1892 | } | |
1903 | 1893 | } | |
1904 | - | else sigVerify( | |
1894 | + | else sigVerify(im.bodyBytes, im.proofs[0], io) | |
1905 | 1895 | } | |
1906 | 1896 |
github/deemru/w8io/026f985 732.82 ms ◑