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