tx · 4U15NPRnyRhbHWP1iQ4JfV52XBQ7dTQ75SnNCvjeedC9 3NBLSz3BB8QU3BAPnsnrMyjFWr75tcEXryF: -0.03400000 Waves 2022.12.06 17:12 [2348591] smart account 3NBLSz3BB8QU3BAPnsnrMyjFWr75tcEXryF > SELF 0.00000000 Waves
{ "type": 13, "id": "4U15NPRnyRhbHWP1iQ4JfV52XBQ7dTQ75SnNCvjeedC9", "fee": 3400000, "feeAssetId": null, "timestamp": 1670335791793, "version": 1, "sender": "3NBLSz3BB8QU3BAPnsnrMyjFWr75tcEXryF", "senderPublicKey": "BPTgianAtANVixAd7SHgec6W3RNNty3z1LVE9AQbYHdz", "proofs": [ "5U7UdJGSLTfk82WfMDJu6snyJicWa5sAhxbfdfuYbLffXTHQQz2sqADVh3AsibHVdSEHsURFHXhePK6VhzDdtxna" ], "script": "base64:BgLYLAgCEgMKAQgSABIECgIBBBIDCgEBEgQKAgEEEgQKAggBEgQKAggBEgQKAggBEgUKAwEIARIAEgQKAgEBEgMKAQESBQoDAQEBEgQKAggIEgASABIDCgEIEgUKAwEBARIECgIBARIECgIIARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAEgMKAQESAwoBARIECgIIASIKbFBkZWNpbWFscyIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiC3dhdmVzU3RyaW5nIgNTRVAiClBvb2xBY3RpdmUiD1Bvb2xQdXREaXNhYmxlZCITUG9vbE1hdGNoZXJEaXNhYmxlZCIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyINaWR4UG9vbFN0YXR1cyIQaWR4UG9vbExQQXNzZXRJZCINaWR4QW10QXNzZXRJZCIPaWR4UHJpY2VBc3NldElkIg5pZHhBbXRBc3NldERjbSIQaWR4UHJpY2VBc3NldERjbSIOaWR4SUFtdEFzc2V0SWQiEGlkeElQcmljZUFzc2V0SWQiDWlkeExQQXNzZXREY20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m9vZnMAAAUCZ3oAsH45", "chainId": 84, "height": 2348591, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EsEtBECvfgWyHmEewUnweu9U2PA5nhXcJXPAQ9LdTxdq Next: 7c5G7W4cDHMLddm3gg76fRA3MGrQz2QtymbbG5csa3V4 Diff:
Old | New | Differences | |
---|---|---|---|
380 | 380 | ||
381 | 381 | ||
382 | 382 | func da (db,dc,dd) = { | |
383 | - | let de = (bw(aS(ba)) + db) | |
384 | - | let df = (bw(aS(bb)) + dc) | |
385 | - | let dg = (value(assetInfo(aZ)).quantity + dd) | |
386 | - | let cZ = cW(toBigInt(de), toBigInt(df), toBigInt(dg)) | |
387 | - | let dh = [IntegerEntry(ag, height), StringEntry(af, toString(cZ))] | |
388 | - | $Tuple2(dh, cZ) | |
383 | + | let de = (toBigInt(bw(aS(ba))) - db) | |
384 | + | let df = (toBigInt(bw(aS(bb))) - dc) | |
385 | + | let dg = (toBigInt(value(assetInfo(aZ)).quantity) - dd) | |
386 | + | let dh = cW(de, df, dg) | |
387 | + | dh | |
389 | 388 | } | |
390 | 389 | ||
391 | 390 | ||
392 | - | func di (cZ) = { | |
393 | - | let de = bw(aS(ba)) | |
394 | - | let df = bw(aS(bb)) | |
395 | - | let dg = value(assetInfo(aZ)).quantity | |
396 | - | let dj = cW(toBigInt(de), toBigInt(df), toBigInt(dg)) | |
397 | - | if ((cZ >= dj)) | |
398 | - | then true | |
399 | - | else aG("updated KLp lower than current KLp") | |
391 | + | func di (dj,dk,dd) = { | |
392 | + | let de = (bw(aS(ba)) + dj) | |
393 | + | let df = (bw(aS(bb)) + dk) | |
394 | + | let dg = (value(assetInfo(aZ)).quantity + dd) | |
395 | + | let cZ = cW(toBigInt(de), toBigInt(df), toBigInt(dg)) | |
396 | + | let dl = [IntegerEntry(ag, height), StringEntry(af, toString(cZ))] | |
397 | + | $Tuple2(dl, cZ) | |
400 | 398 | } | |
401 | 399 | ||
402 | 400 | ||
403 | - | func dk (dl) = { | |
404 | - | let dm = dl.amount | |
405 | - | let dn = fraction(dl.amount, dl.price, b) | |
406 | - | let do = if ((dl.orderType == Buy)) | |
407 | - | then $Tuple2(dm, -(dn)) | |
408 | - | else $Tuple2(-(dm), dn) | |
409 | - | let db = do._1 | |
410 | - | let dc = do._2 | |
401 | + | func dm (dn,cZ) = if ((cZ >= dn)) | |
402 | + | then true | |
403 | + | else aG("updated KLp lower than current KLp") | |
404 | + | ||
405 | + | ||
406 | + | func do (dp) = { | |
407 | + | let dq = dp.amount | |
408 | + | let dr = fraction(dp.amount, dp.price, b) | |
409 | + | let ds = if ((dp.orderType == Buy)) | |
410 | + | then $Tuple2(dq, -(dr)) | |
411 | + | else $Tuple2(-(dq), dr) | |
412 | + | let dj = ds._1 | |
413 | + | let dk = ds._2 | |
411 | 414 | if (if (if (aL()) | |
412 | 415 | then true | |
413 | 416 | else (aY == m)) | |
414 | 417 | then true | |
415 | 418 | else (aY == n)) | |
416 | 419 | then throw("Exchange operations disabled") | |
417 | - | else if (if (( | |
420 | + | else if (if ((dp.assetPair.amountAsset != ba)) | |
418 | 421 | then true | |
419 | - | else ( | |
422 | + | else (dp.assetPair.priceAsset != bb)) | |
420 | 423 | then throw("Wrong order assets.") | |
421 | 424 | else { | |
422 | - | let | |
423 | - | let | |
424 | - | let | |
425 | - | let | |
426 | - | let | |
427 | - | | |
425 | + | let dt = valueOrErrorMessage(parseBigInt(valueOrErrorMessage(getString(this, af), aI("kLp is required"))), aI("invalid kLp")) | |
426 | + | let du = di(dj, dk, 0) | |
427 | + | let dv = du._1 | |
428 | + | let dw = du._2 | |
429 | + | let dx = (dw > dt) | |
430 | + | dx | |
428 | 431 | } | |
429 | 432 | } | |
430 | 433 | ||
431 | 434 | ||
432 | - | func | |
435 | + | func dy (dz) = if ((size(dz.payments) != 1)) | |
433 | 436 | then throw("exactly 1 payment is expected") | |
434 | 437 | else { | |
435 | - | let | |
436 | - | let bV = value( | |
437 | - | let | |
438 | - | let cG = bT(toBase58String( | |
438 | + | let dA = value(dz.payments[0]) | |
439 | + | let bV = value(dA.assetId) | |
440 | + | let dB = dA.amount | |
441 | + | let cG = bT(toBase58String(dz.transactionId), toBase58String(bV), dB, dz.caller) | |
439 | 442 | let cm = cG._1 | |
440 | 443 | let cn = cG._2 | |
441 | 444 | let ca = parseIntValue(cG._9) | |
444 | 447 | then true | |
445 | 448 | else (ca == n)) | |
446 | 449 | then throw(("Get operation is blocked by admin. Status = " + toString(ca))) | |
447 | - | else $Tuple5(cm, cn, | |
450 | + | else $Tuple5(cm, cn, dB, bV, co) | |
448 | 451 | } | |
449 | 452 | ||
450 | 453 | ||
451 | - | func | |
454 | + | func dC (dz,cq,cw) = if ((size(dz.payments) != 2)) | |
452 | 455 | then throw("exactly 2 payments are expected") | |
453 | 456 | else { | |
454 | - | let | |
455 | - | let | |
456 | - | let | |
457 | - | let ca = parseIntValue( | |
457 | + | let dD = value(dz.payments[0]) | |
458 | + | let dE = value(dz.payments[1]) | |
459 | + | let dF = cp(toBase58String(dz.transactionId), cq, dD.amount, dD.assetId, dE.amount, dE.assetId, toString(dz.caller), false, cw) | |
460 | + | let ca = parseIntValue(dF._8) | |
458 | 461 | if (if (if (aL()) | |
459 | 462 | then true | |
460 | 463 | else (ca == l)) | |
461 | 464 | then true | |
462 | 465 | else (ca == n)) | |
463 | 466 | then throw(("Put operation is blocked by admin. Status = " + toString(ca))) | |
464 | - | else | |
467 | + | else dF | |
465 | 468 | } | |
466 | 469 | ||
467 | 470 | ||
468 | - | func | |
469 | - | let | |
470 | - | if (( | |
471 | + | func dG (dH) = { | |
472 | + | let dI = invoke(aJ, "emit", [dH], nil) | |
473 | + | if ((dI == dI)) | |
471 | 474 | then { | |
472 | - | let | |
473 | - | let | |
474 | - | if ($isInstanceOf( | |
475 | + | let dJ = { | |
476 | + | let dK = dI | |
477 | + | if ($isInstanceOf(dK, "Address")) | |
475 | 478 | then { | |
476 | - | let | |
477 | - | invoke( | |
479 | + | let dL = dK | |
480 | + | invoke(dL, "emit", [dH], nil) | |
478 | 481 | } | |
479 | 482 | else unit | |
480 | 483 | } | |
481 | - | if (( | |
482 | - | then | |
484 | + | if ((dJ == dJ)) | |
485 | + | then dH | |
483 | 486 | else throw("Strict value is not equal to itself.") | |
484 | 487 | } | |
485 | 488 | else throw("Strict value is not equal to itself.") | |
486 | 489 | } | |
487 | 490 | ||
488 | 491 | ||
489 | - | func | |
490 | - | let | |
491 | - | $Tuple2(( | |
492 | + | func dM (dH) = { | |
493 | + | let dN = fraction(dH, ae, b) | |
494 | + | $Tuple2((dH - dN), dN) | |
492 | 495 | } | |
493 | 496 | ||
494 | 497 | ||
495 | - | func | |
496 | - | let | |
497 | - | let | |
498 | - | let | |
499 | - | let | |
498 | + | func dO (dP,dQ,X,Y) = { | |
499 | + | let dR = (Y == unit) | |
500 | + | let dS = bw(aS(ba)) | |
501 | + | let dT = bw(aS(bb)) | |
502 | + | let dU = if ((dQ == ba)) | |
500 | 503 | then true | |
501 | - | else if (( | |
504 | + | else if ((dQ == bb)) | |
502 | 505 | then false | |
503 | 506 | else aG("invalid asset") | |
504 | - | let | |
505 | - | then $Tuple2( | |
506 | - | else if ( | |
507 | - | then $Tuple2(( | |
508 | - | else $Tuple2( | |
509 | - | let | |
510 | - | let | |
511 | - | let | |
512 | - | then $Tuple2( | |
513 | - | else $Tuple2(0, | |
514 | - | let | |
515 | - | let | |
516 | - | let | |
517 | - | let | |
518 | - | let | |
519 | - | let | |
520 | - | let | |
521 | - | let | |
522 | - | let | |
523 | - | let | |
524 | - | let | |
525 | - | let | |
526 | - | then | |
527 | - | else | |
528 | - | let | |
529 | - | let | |
530 | - | let | |
507 | + | let dV = if (dR) | |
508 | + | then $Tuple2(dS, dT) | |
509 | + | else if (dU) | |
510 | + | then $Tuple2((dS - dP), dT) | |
511 | + | else $Tuple2(dS, (dT - dP)) | |
512 | + | let dW = dV._1 | |
513 | + | let dX = dV._2 | |
514 | + | let dY = if (dU) | |
515 | + | then $Tuple2(dP, 0) | |
516 | + | else $Tuple2(0, dP) | |
517 | + | let dZ = dY._1 | |
518 | + | let ea = dY._2 | |
519 | + | let dq = dM(dZ)._1 | |
520 | + | let dr = dM(ea)._1 | |
521 | + | let eb = dM(dP) | |
522 | + | let ec = eb._1 | |
523 | + | let dN = eb._2 | |
524 | + | let ed = (dW + dq) | |
525 | + | let ee = (dX + dr) | |
526 | + | let ef = by(D(ee, bd), D(ed, bc)) | |
527 | + | let eg = G(ef, b) | |
528 | + | let eh = if (dU) | |
529 | + | then dW | |
530 | + | else dX | |
531 | + | let ei = toBigInt(eh) | |
532 | + | let ej = toBigInt(valueOrErrorMessage(assetInfo(aZ), (("asset " + toBase58String(aZ)) + " doesn't exist")).quantity) | |
533 | + | let ek = if ((ej > f)) | |
531 | 534 | then true | |
532 | 535 | else aG("initial deposit requires all coins") | |
533 | - | if (( | |
536 | + | if ((ek == ek)) | |
534 | 537 | then { | |
535 | - | let | |
536 | - | let | |
537 | - | let cV = if ( | |
538 | + | let el = toBigInt(ec) | |
539 | + | let em = max([0, toInt(((ej * (sqrtBigInt((d + ((el * d) / ei)), 18, 18, DOWN) - d)) / d))]) | |
540 | + | let cV = if (dR) | |
538 | 541 | then nil | |
539 | - | else [IntegerEntry(S(), | |
540 | - | let | |
541 | - | let | |
542 | - | let | |
543 | - | let | |
544 | - | then $Tuple2( | |
545 | - | else $Tuple2( | |
546 | - | let | |
547 | - | let | |
548 | - | let | |
549 | - | fraction(( | |
542 | + | else [IntegerEntry(S(), eg), IntegerEntry(T(height, lastBlock.timestamp), eg), StringEntry(W(toString(value(X)), toBase58String(value(Y))), bh(dZ, ea, em, eg, 0, 0, height, lastBlock.timestamp, 0, 0))] | |
543 | + | let en = by(D(dX, bd), D(dW, bc)) | |
544 | + | let eo = G(en, b) | |
545 | + | let ep = { | |
546 | + | let eq = if (dU) | |
547 | + | then $Tuple2(dZ, dW) | |
548 | + | else $Tuple2(ea, dX) | |
549 | + | let dH = eq._1 | |
550 | + | let er = eq._2 | |
551 | + | let es = toInt(fraction(ej, toBigInt((dH / 2)), toBigInt(er))) | |
552 | + | fraction((em - es), b, es) | |
550 | 553 | } | |
551 | - | $Tuple5( | |
554 | + | $Tuple5(em, cV, dN, ep, dU) | |
552 | 555 | } | |
553 | 556 | else throw("Strict value is not equal to itself.") | |
554 | 557 | } | |
555 | 558 | ||
556 | 559 | ||
557 | - | func | |
558 | - | let | |
559 | - | let | |
560 | + | func et (eu,ec,dQ,X,Y) = { | |
561 | + | let dR = (Y == unit) | |
562 | + | let ev = [if ((dQ == aZ)) | |
560 | 563 | then true | |
561 | 564 | else aG("invalid lp asset")] | |
562 | - | if (( | |
565 | + | if ((ev == ev)) | |
563 | 566 | then { | |
564 | - | let | |
567 | + | let ew = if ((eu == ba)) | |
565 | 568 | then true | |
566 | - | else if (( | |
569 | + | else if ((eu == bb)) | |
567 | 570 | then false | |
568 | 571 | else aG("invalid asset") | |
569 | - | let | |
572 | + | let ex = if (ew) | |
570 | 573 | then toBigInt(bw(aS(ba))) | |
571 | 574 | else toBigInt(bw(aS(bb))) | |
572 | - | let | |
573 | - | let | |
574 | - | let | |
575 | - | then | |
576 | - | else | |
577 | - | let | |
578 | - | let | |
579 | - | let | |
580 | - | let | |
581 | - | let | |
582 | - | let | |
583 | - | let | |
584 | - | let | |
585 | - | then $Tuple4( | |
586 | - | else $Tuple4(0, | |
587 | - | let | |
588 | - | let | |
589 | - | let | |
590 | - | let | |
591 | - | let | |
592 | - | let | |
593 | - | let cV = if ( | |
575 | + | let ey = bw(aS(ba)) | |
576 | + | let ez = bw(aS(bb)) | |
577 | + | let eA = if (ew) | |
578 | + | then ey | |
579 | + | else ez | |
580 | + | let eB = toBigInt(eA) | |
581 | + | let ej = toBigInt(valueOrErrorMessage(assetInfo(aZ), (("asset " + toBase58String(aZ)) + " doesn't exist")).quantity) | |
582 | + | let eC = toBigInt(ec) | |
583 | + | let eD = max([0, toInt(((ex * (d - pow((d - ((eC * d) / ej)), 18, h, 0, 18, DOWN))) / d))]) | |
584 | + | let eE = dM(eD) | |
585 | + | let eF = eE._1 | |
586 | + | let dN = eE._2 | |
587 | + | let eG = if (ew) | |
588 | + | then $Tuple4(eF, 0, (ey - eD), ez) | |
589 | + | else $Tuple4(0, eF, ey, (ez - eD)) | |
590 | + | let eH = eG._1 | |
591 | + | let eI = eG._2 | |
592 | + | let eJ = eG._3 | |
593 | + | let eK = eG._4 | |
594 | + | let ef = by(D(eK, bd), D(eJ, bc)) | |
595 | + | let eg = G(ef, b) | |
596 | + | let cV = if (dR) | |
594 | 597 | then nil | |
595 | - | else [StringEntry(Z(toString(value(X)), toBase58String(value(Y))), bs( | |
596 | - | let | |
597 | - | let | |
598 | - | let | |
599 | - | let | |
600 | - | fraction(( | |
598 | + | else [StringEntry(Z(toString(value(X)), toBase58String(value(Y))), bs(eH, eI, ec, eg, height, lastBlock.timestamp)), IntegerEntry(S(), eg), IntegerEntry(T(height, lastBlock.timestamp), eg)] | |
599 | + | let en = by(D(ez, bd), D(ey, bc)) | |
600 | + | let eo = G(en, b) | |
601 | + | let ep = { | |
602 | + | let eL = (toInt(fraction(ex, eC, ej)) * 2) | |
603 | + | fraction((eF - eL), b, eL) | |
601 | 604 | } | |
602 | - | $Tuple5( | |
605 | + | $Tuple5(eF, cV, dN, ep, ew) | |
603 | 606 | } | |
604 | 607 | else throw("Strict value is not equal to itself.") | |
605 | 608 | } | |
606 | 609 | ||
607 | 610 | ||
608 | - | func | |
609 | - | let | |
610 | - | if ($isInstanceOf( | |
611 | + | func eM () = { | |
612 | + | let dK = getString(Q()) | |
613 | + | if ($isInstanceOf(dK, "String")) | |
611 | 614 | then { | |
612 | - | let | |
613 | - | fromBase58String( | |
615 | + | let eN = dK | |
616 | + | fromBase58String(eN) | |
614 | 617 | } | |
615 | - | else if ($isInstanceOf( | |
618 | + | else if ($isInstanceOf(dK, "Unit")) | |
616 | 619 | then unit | |
617 | 620 | else throw("Match error") | |
618 | 621 | } | |
619 | 622 | ||
620 | 623 | ||
621 | - | func | |
622 | - | let | |
623 | - | if ($isInstanceOf( | |
624 | + | func eO () = { | |
625 | + | let dK = getString(R()) | |
626 | + | if ($isInstanceOf(dK, "String")) | |
624 | 627 | then { | |
625 | - | let | |
626 | - | fromBase58String( | |
628 | + | let eN = dK | |
629 | + | fromBase58String(eN) | |
627 | 630 | } | |
628 | - | else if ($isInstanceOf( | |
631 | + | else if ($isInstanceOf(dK, "Unit")) | |
629 | 632 | then unit | |
630 | 633 | else throw("Match error") | |
631 | 634 | } | |
632 | 635 | ||
633 | 636 | ||
634 | - | func | |
635 | - | let | |
636 | - | if ($isInstanceOf( | |
637 | + | func eP (dz) = { | |
638 | + | let dK = eM() | |
639 | + | if ($isInstanceOf(dK, "ByteVector")) | |
637 | 640 | then { | |
638 | - | let | |
639 | - | ( | |
641 | + | let eQ = dK | |
642 | + | (dz.callerPublicKey == eQ) | |
640 | 643 | } | |
641 | - | else if ($isInstanceOf( | |
642 | - | then ( | |
644 | + | else if ($isInstanceOf(dK, "Unit")) | |
645 | + | then (dz.caller == this) | |
643 | 646 | else throw("Match error") | |
644 | 647 | } | |
645 | 648 | ||
646 | 649 | ||
647 | - | func | |
648 | - | let | |
649 | - | let | |
650 | - | if ($isInstanceOf( | |
650 | + | func eR (dz) = { | |
651 | + | let eS = throw("Permission denied") | |
652 | + | let dK = eM() | |
653 | + | if ($isInstanceOf(dK, "ByteVector")) | |
651 | 654 | then { | |
652 | - | let | |
653 | - | if (( | |
655 | + | let eQ = dK | |
656 | + | if ((dz.callerPublicKey == eQ)) | |
654 | 657 | then true | |
655 | - | else | |
658 | + | else eS | |
656 | 659 | } | |
657 | - | else if ($isInstanceOf( | |
658 | - | then if (( | |
660 | + | else if ($isInstanceOf(dK, "Unit")) | |
661 | + | then if ((dz.caller == this)) | |
659 | 662 | then true | |
660 | - | else | |
663 | + | else eS | |
661 | 664 | else throw("Match error") | |
662 | 665 | } | |
663 | 666 | ||
664 | 667 | ||
665 | - | @Callable( | |
666 | - | func setManager ( | |
667 | - | let | |
668 | - | if (( | |
668 | + | @Callable(dz) | |
669 | + | func setManager (eT) = { | |
670 | + | let eU = eR(dz) | |
671 | + | if ((eU == eU)) | |
669 | 672 | then { | |
670 | - | let | |
671 | - | if (( | |
672 | - | then [StringEntry(R(), | |
673 | + | let eV = fromBase58String(eT) | |
674 | + | if ((eV == eV)) | |
675 | + | then [StringEntry(R(), eT)] | |
673 | 676 | else throw("Strict value is not equal to itself.") | |
674 | 677 | } | |
675 | 678 | else throw("Strict value is not equal to itself.") | |
677 | 680 | ||
678 | 681 | ||
679 | 682 | ||
680 | - | @Callable( | |
683 | + | @Callable(dz) | |
681 | 684 | func confirmManager () = { | |
682 | - | let | |
683 | - | let | |
685 | + | let eW = eO() | |
686 | + | let eX = if (isDefined(eW)) | |
684 | 687 | then true | |
685 | 688 | else throw("No pending manager") | |
686 | - | if (( | |
689 | + | if ((eX == eX)) | |
687 | 690 | then { | |
688 | - | let | |
691 | + | let eY = if ((dz.callerPublicKey == value(eW))) | |
689 | 692 | then true | |
690 | 693 | else throw("You are not pending manager") | |
691 | - | if (( | |
692 | - | then [StringEntry(Q(), toBase58String(value( | |
694 | + | if ((eY == eY)) | |
695 | + | then [StringEntry(Q(), toBase58String(value(eW))), DeleteEntry(R())] | |
693 | 696 | else throw("Strict value is not equal to itself.") | |
694 | 697 | } | |
695 | 698 | else throw("Strict value is not equal to itself.") | |
697 | 700 | ||
698 | 701 | ||
699 | 702 | ||
700 | - | @Callable( | |
701 | - | func put (cq, | |
703 | + | @Callable(dz) | |
704 | + | func put (cq,eZ) = if ((0 > cq)) | |
702 | 705 | then throw("Invalid slippageTolerance passed") | |
703 | 706 | else { | |
704 | - | let dB = dy(dv, cq, true) | |
705 | - | let cS = dB._2 | |
706 | - | let bX = dB._7 | |
707 | - | let co = dB._9 | |
708 | - | let cT = dB._10 | |
709 | - | let cU = dB._11 | |
710 | - | let eW = dB._12 | |
711 | - | let eX = dB._13 | |
712 | - | let dE = invoke(aJ, "emit", [cS], nil) | |
713 | - | if ((dE == dE)) | |
707 | + | let dF = dC(dz, cq, true) | |
708 | + | let cS = dF._2 | |
709 | + | let bX = dF._7 | |
710 | + | let co = dF._9 | |
711 | + | let cT = dF._10 | |
712 | + | let cU = dF._11 | |
713 | + | let fa = dF._12 | |
714 | + | let fb = dF._13 | |
715 | + | let dD = toBigInt(value(dz.payments[0]).amount) | |
716 | + | let dE = toBigInt(value(dz.payments[1]).amount) | |
717 | + | let dh = da(dD, dE, toBigInt(0)) | |
718 | + | if ((dh == dh)) | |
714 | 719 | then { | |
715 | - | let dF = { | |
716 | - | let dG = dE | |
717 | - | if ($isInstanceOf(dG, "Address")) | |
718 | - | then { | |
719 | - | let dH = dG | |
720 | - | invoke(dH, "emit", [cS], nil) | |
720 | + | let dI = invoke(aJ, "emit", [cS], nil) | |
721 | + | if ((dI == dI)) | |
722 | + | then { | |
723 | + | let dJ = { | |
724 | + | let dK = dI | |
725 | + | if ($isInstanceOf(dK, "Address")) | |
726 | + | then { | |
727 | + | let dL = dK | |
728 | + | invoke(dL, "emit", [cS], nil) | |
729 | + | } | |
730 | + | else unit | |
721 | 731 | } | |
722 | - | else unit | |
723 | - | } | |
724 | - | if ((dF == dF)) | |
725 | - | then { | |
726 | - | let eY = if ((cT > 0)) | |
727 | - | then invoke(bg, "put", nil, [AttachedPayment(eW, cT)]) | |
728 | - | else nil | |
729 | - | if ((eY == eY)) | |
732 | + | if ((dJ == dJ)) | |
730 | 733 | then { | |
731 | - | let | |
732 | - | then invoke(bg, "put", nil, [AttachedPayment( | |
734 | + | let fc = if ((cT > 0)) | |
735 | + | then invoke(bg, "put", nil, [AttachedPayment(fa, cT)]) | |
733 | 736 | else nil | |
734 | - | if (( | |
737 | + | if ((fc == fc)) | |
735 | 738 | then { | |
736 | - | let fa = if (eV) | |
739 | + | let fd = if ((cU > 0)) | |
740 | + | then invoke(bg, "put", nil, [AttachedPayment(fb, cU)]) | |
741 | + | else nil | |
742 | + | if ((fd == fd)) | |
737 | 743 | then { | |
738 | - | let fb = invoke(bf, "stake", nil, [AttachedPayment(bX, cS)]) | |
739 | - | if ((fb == fb)) | |
740 | - | then nil | |
744 | + | let fe = if (eZ) | |
745 | + | then { | |
746 | + | let ff = invoke(bf, "stake", nil, [AttachedPayment(bX, cS)]) | |
747 | + | if ((ff == ff)) | |
748 | + | then nil | |
749 | + | else throw("Strict value is not equal to itself.") | |
750 | + | } | |
751 | + | else [ScriptTransfer(dz.caller, cS, bX)] | |
752 | + | let fg = di(0, 0, 0) | |
753 | + | let fh = fg._1 | |
754 | + | let cZ = fg._2 | |
755 | + | let fi = dm(dh, cZ) | |
756 | + | if ((fi == fi)) | |
757 | + | then ((co ++ fe) ++ fh) | |
741 | 758 | else throw("Strict value is not equal to itself.") | |
742 | 759 | } | |
743 | - | else [ScriptTransfer(dv.caller, cS, bX)] | |
744 | - | let fc = da(0, 0, 0) | |
745 | - | let fd = fc._1 | |
746 | - | let cZ = fc._2 | |
747 | - | let fe = di(cZ) | |
748 | - | if ((fe == fe)) | |
749 | - | then ((co ++ fa) ++ fd) | |
750 | 760 | else throw("Strict value is not equal to itself.") | |
751 | 761 | } | |
752 | 762 | else throw("Strict value is not equal to itself.") | |
760 | 770 | ||
761 | 771 | ||
762 | 772 | ||
763 | - | @Callable( | |
764 | - | func putForFree ( | |
773 | + | @Callable(dz) | |
774 | + | func putForFree (fj) = if ((0 > fj)) | |
765 | 775 | then throw("Invalid value passed") | |
766 | 776 | else { | |
767 | - | let dB = dy(dv, ff, false) | |
768 | - | let co = dB._9 | |
769 | - | let fg = da(0, 0, 0) | |
770 | - | let fd = fg._1 | |
771 | - | let cZ = fg._2 | |
772 | - | let fe = di(cZ) | |
773 | - | if ((fe == fe)) | |
774 | - | then (co ++ fd) | |
777 | + | let dF = dC(dz, fj, false) | |
778 | + | let co = dF._9 | |
779 | + | let dD = toBigInt(value(dz.payments[0]).amount) | |
780 | + | let dE = toBigInt(value(dz.payments[1]).amount) | |
781 | + | let dh = da(dD, dE, toBigInt(0)) | |
782 | + | if ((dh == dh)) | |
783 | + | then { | |
784 | + | let fk = di(0, 0, 0) | |
785 | + | let fh = fk._1 | |
786 | + | let cZ = fk._2 | |
787 | + | let fi = dm(dh, cZ) | |
788 | + | if ((fi == fi)) | |
789 | + | then (co ++ fh) | |
790 | + | else throw("Strict value is not equal to itself.") | |
791 | + | } | |
775 | 792 | else throw("Strict value is not equal to itself.") | |
776 | 793 | } | |
777 | 794 | ||
778 | 795 | ||
779 | 796 | ||
780 | - | @Callable( | |
781 | - | func putOneTkn ( | |
782 | - | let | |
783 | - | let | |
784 | - | if ($isInstanceOf( | |
785 | - | then | |
786 | - | else throw(($getType( | |
797 | + | @Callable(dz) | |
798 | + | func putOneTkn (fl,fm) = { | |
799 | + | let fn = { | |
800 | + | let fo = invoke(aJ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
801 | + | if ($isInstanceOf(fo, "Boolean")) | |
802 | + | then fo | |
803 | + | else throw(($getType(fo) + " couldn't be cast to Boolean")) | |
787 | 804 | } | |
788 | - | let | |
805 | + | let fp = if (if (if (aL()) | |
789 | 806 | then true | |
790 | 807 | else (aY == l)) | |
791 | 808 | then true | |
792 | 809 | else (aY == n)) | |
793 | 810 | then true | |
794 | - | else | |
795 | - | let | |
811 | + | else fn | |
812 | + | let ev = [if (if (!(fp)) | |
796 | 813 | then true | |
797 | - | else | |
814 | + | else eP(dz)) | |
798 | 815 | then true | |
799 | - | else aG("put operation is blocked by admin"), if ((size( | |
816 | + | else aG("put operation is blocked by admin"), if ((size(dz.payments) == 1)) | |
800 | 817 | then true | |
801 | 818 | else aG("exactly 1 payment are expected")] | |
802 | - | if (( | |
819 | + | if ((ev == ev)) | |
803 | 820 | then { | |
804 | - | let fm = dv.payments[0] | |
805 | - | let dM = fm.assetId | |
806 | - | let dL = fm.amount | |
807 | - | let X = dv.caller | |
808 | - | let Y = dv.transactionId | |
809 | - | let fn = dK(dL, dM, X, Y) | |
810 | - | if ((fn == fn)) | |
821 | + | let fq = dz.payments[0] | |
822 | + | let dQ = fq.assetId | |
823 | + | let dP = fq.amount | |
824 | + | let dh = if ((dQ == ba)) | |
825 | + | then da(toBigInt(dP), toBigInt(0), toBigInt(0)) | |
826 | + | else if ((dQ == bb)) | |
827 | + | then da(toBigInt(0), toBigInt(dP), toBigInt(0)) | |
828 | + | else aG("payment asset is not supported") | |
829 | + | let X = dz.caller | |
830 | + | let Y = dz.transactionId | |
831 | + | let fr = dO(dP, dQ, X, Y) | |
832 | + | if ((fr == fr)) | |
811 | 833 | then { | |
812 | - | let | |
813 | - | let | |
814 | - | let | |
815 | - | let cV = | |
816 | - | let | |
817 | - | let | |
818 | - | then ( | |
834 | + | let dU = fr._5 | |
835 | + | let fs = fr._4 | |
836 | + | let dN = fr._3 | |
837 | + | let cV = fr._2 | |
838 | + | let ft = fr._1 | |
839 | + | let fu = if (if ((fl > 0)) | |
840 | + | then (fl > ft) | |
819 | 841 | else false) | |
820 | - | then aG(makeString(["amount to receive is less than ", toString( | |
821 | - | else | |
822 | - | let | |
823 | - | if (( | |
842 | + | then aG(makeString(["amount to receive is less than ", toString(fl)], "")) | |
843 | + | else ft | |
844 | + | let dI = dG(fu) | |
845 | + | if ((dI == dI)) | |
824 | 846 | then { | |
825 | - | let | |
847 | + | let fe = if (fm) | |
826 | 848 | then { | |
827 | - | let | |
828 | - | if (( | |
849 | + | let fv = invoke(bf, "stake", nil, [AttachedPayment(aZ, fu)]) | |
850 | + | if ((fv == fv)) | |
829 | 851 | then nil | |
830 | 852 | else throw("Strict value is not equal to itself.") | |
831 | 853 | } | |
832 | - | else [ScriptTransfer( | |
833 | - | let | |
834 | - | then [ScriptTransfer(aK, | |
854 | + | else [ScriptTransfer(dz.caller, fu, aZ)] | |
855 | + | let fw = if ((dN > 0)) | |
856 | + | then [ScriptTransfer(aK, dN, dQ)] | |
835 | 857 | else nil | |
836 | - | let | |
858 | + | let fx = if ((this == aK)) | |
837 | 859 | then $Tuple2(0, 0) | |
838 | - | else if ( | |
839 | - | then $Tuple2(-( | |
840 | - | else $Tuple2(0, -( | |
841 | - | let | |
842 | - | let | |
843 | - | let | |
844 | - | let | |
845 | - | let cZ = | |
846 | - | let | |
847 | - | if (( | |
848 | - | then $Tuple2((((cV ++ | |
860 | + | else if (dU) | |
861 | + | then $Tuple2(-(dN), 0) | |
862 | + | else $Tuple2(0, -(dN)) | |
863 | + | let dj = fx._1 | |
864 | + | let dk = fx._2 | |
865 | + | let fy = di(dj, dk, 0) | |
866 | + | let fh = fy._1 | |
867 | + | let cZ = fy._2 | |
868 | + | let fi = dm(dh, cZ) | |
869 | + | if ((fi == fi)) | |
870 | + | then $Tuple2((((cV ++ fe) ++ fw) ++ fh), fu) | |
849 | 871 | else throw("Strict value is not equal to itself.") | |
850 | 872 | } | |
851 | 873 | else throw("Strict value is not equal to itself.") | |
857 | 879 | ||
858 | 880 | ||
859 | 881 | ||
860 | - | @Callable( | |
861 | - | func putOneTknREADONLY ( | |
862 | - | let | |
863 | - | let | |
864 | - | let cV = | |
865 | - | let | |
866 | - | let | |
867 | - | let | |
868 | - | $Tuple2(nil, $Tuple3( | |
882 | + | @Callable(dz) | |
883 | + | func putOneTknREADONLY (dQ,dP) = { | |
884 | + | let fz = dO(dP, aQ(dQ), unit, unit) | |
885 | + | let ft = fz._1 | |
886 | + | let cV = fz._2 | |
887 | + | let dN = fz._3 | |
888 | + | let fs = fz._4 | |
889 | + | let dU = fz._5 | |
890 | + | $Tuple2(nil, $Tuple3(ft, dN, fs)) | |
869 | 891 | } | |
870 | 892 | ||
871 | 893 | ||
872 | 894 | ||
873 | - | @Callable( | |
874 | - | func getOneTkn ( | |
875 | - | let | |
876 | - | let | |
877 | - | if ($isInstanceOf( | |
878 | - | then | |
879 | - | else throw(($getType( | |
895 | + | @Callable(dz) | |
896 | + | func getOneTkn (fA,fl) = { | |
897 | + | let fn = { | |
898 | + | let fo = invoke(aJ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
899 | + | if ($isInstanceOf(fo, "Boolean")) | |
900 | + | then fo | |
901 | + | else throw(($getType(fo) + " couldn't be cast to Boolean")) | |
880 | 902 | } | |
881 | - | let | |
903 | + | let fB = if (if (aL()) | |
882 | 904 | then true | |
883 | 905 | else (aY == n)) | |
884 | 906 | then true | |
885 | - | else | |
886 | - | let | |
907 | + | else fn | |
908 | + | let ev = [if (if (!(fB)) | |
887 | 909 | then true | |
888 | - | else | |
910 | + | else eP(dz)) | |
889 | 911 | then true | |
890 | - | else aG("get operation is blocked by admin"), if ((size( | |
912 | + | else aG("get operation is blocked by admin"), if ((size(dz.payments) == 1)) | |
891 | 913 | then true | |
892 | 914 | else aG("exactly 1 payment are expected")] | |
893 | - | if (( | |
915 | + | if ((ev == ev)) | |
894 | 916 | then { | |
895 | - | let eq = aQ(fw) | |
896 | - | let fm = dv.payments[0] | |
897 | - | let dM = fm.assetId | |
898 | - | let dY = fm.amount | |
899 | - | let X = dv.caller | |
900 | - | let Y = dv.transactionId | |
901 | - | let fy = ep(eq, dY, dM, X, Y) | |
902 | - | if ((fy == fy)) | |
917 | + | let eu = aQ(fA) | |
918 | + | let fq = dz.payments[0] | |
919 | + | let dQ = fq.assetId | |
920 | + | let ec = fq.amount | |
921 | + | let dh = da(toBigInt(0), toBigInt(0), toBigInt(ec)) | |
922 | + | let X = dz.caller | |
923 | + | let Y = dz.transactionId | |
924 | + | let fC = et(eu, ec, dQ, X, Y) | |
925 | + | if ((fC == fC)) | |
903 | 926 | then { | |
904 | - | let | |
905 | - | let | |
906 | - | let | |
907 | - | let cV = | |
908 | - | let | |
909 | - | let | |
910 | - | then ( | |
927 | + | let ew = fC._5 | |
928 | + | let fs = fC._4 | |
929 | + | let dN = fC._3 | |
930 | + | let cV = fC._2 | |
931 | + | let fD = fC._1 | |
932 | + | let dH = if (if ((fl > 0)) | |
933 | + | then (fl > fD) | |
911 | 934 | else false) | |
912 | - | then aG(makeString(["amount to receive is less than ", toString( | |
913 | - | else | |
914 | - | let | |
915 | - | if (( | |
935 | + | then aG(makeString(["amount to receive is less than ", toString(fl)], "")) | |
936 | + | else fD | |
937 | + | let fE = invoke(aJ, "burn", [ec], [AttachedPayment(dQ, ec)]) | |
938 | + | if ((fE == fE)) | |
916 | 939 | then { | |
917 | - | let | |
918 | - | let | |
919 | - | then [ScriptTransfer(aK, | |
940 | + | let fF = [ScriptTransfer(X, dH, eu)] | |
941 | + | let fw = if ((dN > 0)) | |
942 | + | then [ScriptTransfer(aK, dN, eu)] | |
920 | 943 | else nil | |
921 | - | let | |
922 | - | let | |
944 | + | let fG = { | |
945 | + | let fH = if ((this == aK)) | |
923 | 946 | then 0 | |
924 | - | else | |
925 | - | if ( | |
926 | - | then $Tuple2(-(( | |
927 | - | else $Tuple2(0, -(( | |
947 | + | else dN | |
948 | + | if (ew) | |
949 | + | then $Tuple2(-((dH + fH)), 0) | |
950 | + | else $Tuple2(0, -((dH + fH))) | |
928 | 951 | } | |
929 | - | let | |
930 | - | let | |
931 | - | let | |
932 | - | let | |
933 | - | let cZ = | |
934 | - | let | |
935 | - | if (( | |
936 | - | then $Tuple2((((cV ++ | |
952 | + | let dj = fG._1 | |
953 | + | let dk = fG._2 | |
954 | + | let fI = di(dj, dk, 0) | |
955 | + | let fh = fI._1 | |
956 | + | let cZ = fI._2 | |
957 | + | let fi = dm(dh, cZ) | |
958 | + | if ((fi == fi)) | |
959 | + | then $Tuple2((((cV ++ fF) ++ fw) ++ fh), dH) | |
937 | 960 | else throw("Strict value is not equal to itself.") | |
938 | 961 | } | |
939 | 962 | else throw("Strict value is not equal to itself.") | |
945 | 968 | ||
946 | 969 | ||
947 | 970 | ||
948 | - | @Callable( | |
949 | - | func getOneTknREADONLY ( | |
950 | - | let | |
951 | - | let | |
952 | - | let cV = | |
953 | - | let | |
954 | - | let | |
955 | - | let | |
956 | - | $Tuple2(nil, $Tuple3( | |
971 | + | @Callable(dz) | |
972 | + | func getOneTknREADONLY (eu,ec) = { | |
973 | + | let fJ = et(aQ(eu), ec, aZ, unit, unit) | |
974 | + | let fD = fJ._1 | |
975 | + | let cV = fJ._2 | |
976 | + | let dN = fJ._3 | |
977 | + | let fs = fJ._4 | |
978 | + | let ew = fJ._5 | |
979 | + | $Tuple2(nil, $Tuple3(fD, dN, fs)) | |
957 | 980 | } | |
958 | 981 | ||
959 | 982 | ||
960 | 983 | ||
961 | - | @Callable( | |
962 | - | func unstakeAndGetOneTkn ( | |
963 | - | let | |
964 | - | let | |
965 | - | if ($isInstanceOf( | |
966 | - | then | |
967 | - | else throw(($getType( | |
984 | + | @Callable(dz) | |
985 | + | func unstakeAndGetOneTkn (fK,fA,fl) = { | |
986 | + | let fn = { | |
987 | + | let fo = invoke(aJ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
988 | + | if ($isInstanceOf(fo, "Boolean")) | |
989 | + | then fo | |
990 | + | else throw(($getType(fo) + " couldn't be cast to Boolean")) | |
968 | 991 | } | |
969 | - | let | |
992 | + | let fB = if (if (aL()) | |
970 | 993 | then true | |
971 | 994 | else (aY == n)) | |
972 | 995 | then true | |
973 | - | else | |
974 | - | let | |
996 | + | else fn | |
997 | + | let ev = [if (if (!(fB)) | |
975 | 998 | then true | |
976 | - | else | |
999 | + | else eP(dz)) | |
977 | 1000 | then true | |
978 | - | else aG("get operation is blocked by admin"), if ((size( | |
1001 | + | else aG("get operation is blocked by admin"), if ((size(dz.payments) == 0)) | |
979 | 1002 | then true | |
980 | 1003 | else aG("no payments are expected")] | |
981 | - | if (( | |
1004 | + | if ((ev == ev)) | |
982 | 1005 | then { | |
983 | - | let eq = aQ(fw) | |
984 | - | let X = dv.caller | |
985 | - | let Y = dv.transactionId | |
986 | - | let fH = invoke(bf, "unstake", [toBase58String(aZ), fG], nil) | |
987 | - | if ((fH == fH)) | |
1006 | + | let eu = aQ(fA) | |
1007 | + | let X = dz.caller | |
1008 | + | let Y = dz.transactionId | |
1009 | + | let dh = da(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1010 | + | let fL = invoke(bf, "unstake", [toBase58String(aZ), fK], nil) | |
1011 | + | if ((fL == fL)) | |
988 | 1012 | then { | |
989 | - | let | |
990 | - | if (( | |
1013 | + | let fM = et(eu, fK, aZ, X, Y) | |
1014 | + | if ((fM == fM)) | |
991 | 1015 | then { | |
992 | - | let | |
993 | - | let | |
994 | - | let | |
995 | - | let cV = | |
996 | - | let | |
997 | - | let | |
998 | - | then ( | |
1016 | + | let ew = fM._5 | |
1017 | + | let fs = fM._4 | |
1018 | + | let dN = fM._3 | |
1019 | + | let cV = fM._2 | |
1020 | + | let fD = fM._1 | |
1021 | + | let dH = if (if ((fl > 0)) | |
1022 | + | then (fl > fD) | |
999 | 1023 | else false) | |
1000 | - | then aG(makeString(["amount to receive is less than ", toString( | |
1001 | - | else | |
1002 | - | let | |
1003 | - | if (( | |
1024 | + | then aG(makeString(["amount to receive is less than ", toString(fl)], "")) | |
1025 | + | else fD | |
1026 | + | let fE = invoke(aJ, "burn", [fK], [AttachedPayment(aZ, fK)]) | |
1027 | + | if ((fE == fE)) | |
1004 | 1028 | then { | |
1005 | - | let | |
1006 | - | let | |
1007 | - | then [ScriptTransfer(aK, | |
1029 | + | let fF = [ScriptTransfer(dz.caller, dH, eu)] | |
1030 | + | let fw = if ((dN > 0)) | |
1031 | + | then [ScriptTransfer(aK, dN, eu)] | |
1008 | 1032 | else nil | |
1009 | - | let | |
1010 | - | let | |
1033 | + | let fN = { | |
1034 | + | let fH = if ((this == aK)) | |
1011 | 1035 | then 0 | |
1012 | - | else | |
1013 | - | if ( | |
1014 | - | then $Tuple2(-(( | |
1015 | - | else $Tuple2(0, -(( | |
1036 | + | else dN | |
1037 | + | if (ew) | |
1038 | + | then $Tuple2(-((dH + fH)), 0) | |
1039 | + | else $Tuple2(0, -((dH + fH))) | |
1016 | 1040 | } | |
1017 | - | let | |
1018 | - | let | |
1019 | - | let | |
1020 | - | let | |
1021 | - | let cZ = | |
1022 | - | let | |
1023 | - | if (( | |
1024 | - | then $Tuple2((((cV ++ | |
1041 | + | let dj = fN._1 | |
1042 | + | let dk = fN._2 | |
1043 | + | let fO = di(dj, dk, 0) | |
1044 | + | let fh = fO._1 | |
1045 | + | let cZ = fO._2 | |
1046 | + | let fi = dm(dh, cZ) | |
1047 | + | if ((fi == fi)) | |
1048 | + | then $Tuple2((((cV ++ fF) ++ fw) ++ fh), dH) | |
1025 | 1049 | else throw("Strict value is not equal to itself.") | |
1026 | 1050 | } | |
1027 | 1051 | else throw("Strict value is not equal to itself.") | |
1035 | 1059 | ||
1036 | 1060 | ||
1037 | 1061 | ||
1038 | - | @Callable( | |
1062 | + | @Callable(dz) | |
1039 | 1063 | func get () = { | |
1040 | - | let cG = | |
1041 | - | let | |
1064 | + | let cG = dy(dz) | |
1065 | + | let fP = cG._1 | |
1042 | 1066 | let cn = cG._2 | |
1043 | - | let | |
1067 | + | let dB = cG._3 | |
1044 | 1068 | let bV = cG._4 | |
1045 | 1069 | let co = cG._5 | |
1046 | - | let fM = invoke(aJ, "burn", [dx], [AttachedPayment(bV, dx)]) | |
1047 | - | if ((fM == fM)) | |
1070 | + | let dh = da(toBigInt(0), toBigInt(0), toBigInt(dB)) | |
1071 | + | let fQ = invoke(aJ, "burn", [dB], [AttachedPayment(bV, dB)]) | |
1072 | + | if ((fQ == fQ)) | |
1048 | 1073 | then { | |
1049 | - | let | |
1050 | - | let | |
1051 | - | let cZ = | |
1052 | - | let | |
1053 | - | if (( | |
1054 | - | then (co ++ | |
1074 | + | let fR = di(-(fP), -(cn), 0) | |
1075 | + | let fh = fR._1 | |
1076 | + | let cZ = fR._2 | |
1077 | + | let fi = dm(dh, cZ) | |
1078 | + | if ((fi == fi)) | |
1079 | + | then (co ++ fh) | |
1055 | 1080 | else throw("Strict value is not equal to itself.") | |
1056 | 1081 | } | |
1057 | 1082 | else throw("Strict value is not equal to itself.") | |
1059 | 1084 | ||
1060 | 1085 | ||
1061 | 1086 | ||
1062 | - | @Callable( | |
1063 | - | func getNoLess ( | |
1064 | - | let cG = | |
1087 | + | @Callable(dz) | |
1088 | + | func getNoLess (fS,fT) = { | |
1089 | + | let cG = dy(dz) | |
1065 | 1090 | let cm = cG._1 | |
1066 | 1091 | let cn = cG._2 | |
1067 | - | let | |
1092 | + | let dB = cG._3 | |
1068 | 1093 | let bV = cG._4 | |
1069 | 1094 | let co = cG._5 | |
1070 | - | if (( | |
1071 | - | then throw(((("noLessThenAmtAsset failed: " + toString(cm)) + " < ") + toString( | |
1072 | - | else if (( | |
1073 | - | then throw(((("noLessThenPriceAsset failed: " + toString(cn)) + " < ") + toString( | |
1095 | + | if ((fS > cm)) | |
1096 | + | then throw(((("noLessThenAmtAsset failed: " + toString(cm)) + " < ") + toString(fS))) | |
1097 | + | else if ((fT > cn)) | |
1098 | + | then throw(((("noLessThenPriceAsset failed: " + toString(cn)) + " < ") + toString(fT))) | |
1074 | 1099 | else { | |
1075 | - | let fM = invoke(aJ, "burn", [dx], [AttachedPayment(bV, dx)]) | |
1076 | - | if ((fM == fM)) | |
1100 | + | let dh = da(toBigInt(0), toBigInt(0), toBigInt(dB)) | |
1101 | + | let fQ = invoke(aJ, "burn", [dB], [AttachedPayment(bV, dB)]) | |
1102 | + | if ((fQ == fQ)) | |
1077 | 1103 | then { | |
1078 | - | let | |
1079 | - | let | |
1080 | - | let cZ = | |
1081 | - | let | |
1082 | - | if (( | |
1083 | - | then (co ++ | |
1104 | + | let fU = di(-(cm), -(cn), 0) | |
1105 | + | let fh = fU._1 | |
1106 | + | let cZ = fU._2 | |
1107 | + | let fi = dm(dh, cZ) | |
1108 | + | if ((fi == fi)) | |
1109 | + | then (co ++ fh) | |
1084 | 1110 | else throw("Strict value is not equal to itself.") | |
1085 | 1111 | } | |
1086 | 1112 | else throw("Strict value is not equal to itself.") | |
1089 | 1115 | ||
1090 | 1116 | ||
1091 | 1117 | ||
1092 | - | @Callable( | |
1093 | - | func unstakeAndGet ( | |
1094 | - | let | |
1118 | + | @Callable(dz) | |
1119 | + | func unstakeAndGet (dH) = { | |
1120 | + | let fV = if ((size(dz.payments) != 0)) | |
1095 | 1121 | then throw("No payments are expected") | |
1096 | 1122 | else true | |
1097 | - | if (( | |
1123 | + | if ((fV == fV)) | |
1098 | 1124 | then { | |
1099 | 1125 | let bK = aN() | |
1100 | 1126 | let bX = fromBase58String(bK[q]) | |
1101 | - | let fH = invoke(bf, "unstake", [toBase58String(bX), dD], nil) | |
1102 | - | if ((fH == fH)) | |
1127 | + | let dh = da(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1128 | + | let fL = invoke(bf, "unstake", [toBase58String(bX), dH], nil) | |
1129 | + | if ((fL == fL)) | |
1103 | 1130 | then { | |
1104 | - | let cG = bT(toBase58String( | |
1131 | + | let cG = bT(toBase58String(dz.transactionId), toBase58String(bX), dH, dz.caller) | |
1105 | 1132 | let cm = cG._1 | |
1106 | 1133 | let cn = cG._2 | |
1107 | 1134 | let ca = parseIntValue(cG._9) | |
1108 | 1135 | let co = cG._10 | |
1109 | - | let | |
1136 | + | let fW = if (if (aL()) | |
1110 | 1137 | then true | |
1111 | 1138 | else (ca == n)) | |
1112 | 1139 | then throw(("Get operation is blocked by admin. Status = " + toString(ca))) | |
1113 | 1140 | else true | |
1114 | - | if (( | |
1141 | + | if ((fW == fW)) | |
1115 | 1142 | then { | |
1116 | - | let | |
1117 | - | if (( | |
1143 | + | let fQ = invoke(aJ, "burn", [dH], [AttachedPayment(bX, dH)]) | |
1144 | + | if ((fQ == fQ)) | |
1118 | 1145 | then { | |
1119 | - | let | |
1120 | - | let | |
1121 | - | let cZ = | |
1122 | - | let | |
1123 | - | if (( | |
1124 | - | then (co ++ | |
1146 | + | let fX = di(-(cm), -(cn), 0) | |
1147 | + | let fh = fX._1 | |
1148 | + | let cZ = fX._2 | |
1149 | + | let fi = dm(dh, cZ) | |
1150 | + | if ((fi == fi)) | |
1151 | + | then (co ++ fh) | |
1125 | 1152 | else throw("Strict value is not equal to itself.") | |
1126 | 1153 | } | |
1127 | 1154 | else throw("Strict value is not equal to itself.") | |
1135 | 1162 | ||
1136 | 1163 | ||
1137 | 1164 | ||
1138 | - | @Callable( | |
1139 | - | func unstakeAndGetNoLess ( | |
1140 | - | let | |
1165 | + | @Callable(dz) | |
1166 | + | func unstakeAndGetNoLess (fK,fY,fT) = { | |
1167 | + | let fB = if (aL()) | |
1141 | 1168 | then true | |
1142 | 1169 | else (aY == n) | |
1143 | - | let | |
1170 | + | let ev = [if (!(fB)) | |
1144 | 1171 | then true | |
1145 | - | else throw("get operation is blocked by admin"), if ((size( | |
1172 | + | else throw("get operation is blocked by admin"), if ((size(dz.payments) == 0)) | |
1146 | 1173 | then true | |
1147 | 1174 | else throw("no payments are expected")] | |
1148 | - | if (( | |
1175 | + | if ((ev == ev)) | |
1149 | 1176 | then { | |
1150 | - | let fH = invoke(bf, "unstake", [toBase58String(aZ), fG], nil) | |
1151 | - | if ((fH == fH)) | |
1177 | + | let dh = da(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1178 | + | let fL = invoke(bf, "unstake", [toBase58String(aZ), fK], nil) | |
1179 | + | if ((fL == fL)) | |
1152 | 1180 | then { | |
1153 | - | let cG = bT(toBase58String( | |
1181 | + | let cG = bT(toBase58String(dz.transactionId), toBase58String(aZ), fK, dz.caller) | |
1154 | 1182 | let cm = cG._1 | |
1155 | 1183 | let cn = cG._2 | |
1156 | 1184 | let co = cG._10 | |
1157 | - | let | |
1185 | + | let fZ = [if ((cm >= fY)) | |
1158 | 1186 | then true | |
1159 | - | else throw(makeString(["amount asset amount to receive is less than ", toString( | |
1187 | + | else throw(makeString(["amount asset amount to receive is less than ", toString(fY)], "")), if ((cn >= fT)) | |
1160 | 1188 | then true | |
1161 | - | else throw(makeString(["price asset amount to receive is less than ", toString( | |
1162 | - | if (( | |
1189 | + | else throw(makeString(["price asset amount to receive is less than ", toString(fT)], ""))] | |
1190 | + | if ((fZ == fZ)) | |
1163 | 1191 | then { | |
1164 | - | let | |
1165 | - | if (( | |
1192 | + | let fQ = invoke(aJ, "burn", [fK], [AttachedPayment(aZ, fK)]) | |
1193 | + | if ((fQ == fQ)) | |
1166 | 1194 | then { | |
1167 | - | let | |
1168 | - | let | |
1169 | - | let cZ = | |
1170 | - | let | |
1171 | - | if (( | |
1172 | - | then (co ++ | |
1195 | + | let ga = di(-(cm), -(cn), 0) | |
1196 | + | let fh = ga._1 | |
1197 | + | let cZ = ga._2 | |
1198 | + | let fi = dm(dh, cZ) | |
1199 | + | if ((fi == fi)) | |
1200 | + | then (co ++ fh) | |
1173 | 1201 | else throw("Strict value is not equal to itself.") | |
1174 | 1202 | } | |
1175 | 1203 | else throw("Strict value is not equal to itself.") | |
1183 | 1211 | ||
1184 | 1212 | ||
1185 | 1213 | ||
1186 | - | @Callable( | |
1187 | - | func activate ( | |
1214 | + | @Callable(dz) | |
1215 | + | func activate (gb,gc) = if ((toString(dz.caller) != toString(aJ))) | |
1188 | 1216 | then throw("permissions denied") | |
1189 | - | else $Tuple2([StringEntry(aa(), | |
1217 | + | else $Tuple2([StringEntry(aa(), gb), StringEntry(ab(), gc)], "success") | |
1190 | 1218 | ||
1191 | 1219 | ||
1192 | 1220 | ||
1193 | - | @Callable( | |
1221 | + | @Callable(dz) | |
1194 | 1222 | func refreshKLp () = { | |
1195 | - | let | |
1196 | - | let | |
1223 | + | let gd = valueOrElse(getInteger(ag), 0) | |
1224 | + | let ge = if (((height - gd) >= aj)) | |
1197 | 1225 | then unit | |
1198 | 1226 | else aG(makeString([toString(aj), " blocks have not passed since the previous call"], "")) | |
1199 | - | if (( | |
1227 | + | if ((ge == ge)) | |
1200 | 1228 | then { | |
1201 | - | let | |
1202 | - | let | |
1203 | - | let | |
1204 | - | let cZ = | |
1205 | - | let | |
1206 | - | then | |
1229 | + | let dt = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, af), "0")), aI("invalid kLp")) | |
1230 | + | let gf = di(0, 0, 0) | |
1231 | + | let gg = gf._1 | |
1232 | + | let cZ = gf._2 | |
1233 | + | let dl = if ((dt != cZ)) | |
1234 | + | then gg | |
1207 | 1235 | else aG("nothing to refresh") | |
1208 | - | $Tuple2( | |
1236 | + | $Tuple2(dl, toString(cZ)) | |
1209 | 1237 | } | |
1210 | 1238 | else throw("Strict value is not equal to itself.") | |
1211 | 1239 | } | |
1212 | 1240 | ||
1213 | 1241 | ||
1214 | 1242 | ||
1215 | - | @Callable( | |
1243 | + | @Callable(dz) | |
1216 | 1244 | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aN()) | |
1217 | 1245 | ||
1218 | 1246 | ||
1219 | 1247 | ||
1220 | - | @Callable( | |
1248 | + | @Callable(dz) | |
1221 | 1249 | func getAccBalanceWrapperREADONLY (bx) = $Tuple2(nil, bw(bx)) | |
1222 | 1250 | ||
1223 | 1251 | ||
1224 | 1252 | ||
1225 | - | @Callable( | |
1253 | + | @Callable(dz) | |
1226 | 1254 | func calcPricesWrapperREADONLY (bE,bF,bJ) = { | |
1227 | 1255 | let bS = bI(bE, bF, bJ) | |
1228 | 1256 | $Tuple2(nil, [toString(bS[0]), toString(bS[1]), toString(bS[2])]) | |
1230 | 1258 | ||
1231 | 1259 | ||
1232 | 1260 | ||
1233 | - | @Callable( | |
1261 | + | @Callable(dz) | |
1234 | 1262 | func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F))) | |
1235 | 1263 | ||
1236 | 1264 | ||
1237 | 1265 | ||
1238 | - | @Callable( | |
1266 | + | @Callable(dz) | |
1239 | 1267 | func fromX18WrapperREADONLY (H,I) = $Tuple2(nil, G(parseBigIntValue(H), I)) | |
1240 | 1268 | ||
1241 | 1269 | ||
1242 | 1270 | ||
1243 | - | @Callable( | |
1271 | + | @Callable(dz) | |
1244 | 1272 | func calcPriceBigIntWrapperREADONLY (bz,bA) = $Tuple2(nil, toString(by(parseBigIntValue(bz), parseBigIntValue(bA)))) | |
1245 | 1273 | ||
1246 | 1274 | ||
1247 | 1275 | ||
1248 | - | @Callable( | |
1276 | + | @Callable(dz) | |
1249 | 1277 | func estimatePutOperationWrapperREADONLY (bU,cq,cr,cs,ct,cu,X,cv,cw) = $Tuple2(nil, cp(bU, cq, cr, cs, ct, cu, X, cv, cw)) | |
1250 | 1278 | ||
1251 | 1279 | ||
1252 | 1280 | ||
1253 | - | @Callable( | |
1281 | + | @Callable(dz) | |
1254 | 1282 | func estimateGetOperationWrapperREADONLY (bU,bV,bW,X) = { | |
1255 | 1283 | let cG = bT(bU, bV, bW, addressFromStringValue(X)) | |
1256 | 1284 | $Tuple2(nil, $Tuple10(cG._1, cG._2, cG._3, cG._4, cG._5, cG._6, cG._7, toString(cG._8), cG._9, cG._10)) | |
1258 | 1286 | ||
1259 | 1287 | ||
1260 | 1288 | ||
1261 | - | @Callable( | |
1289 | + | @Callable(dz) | |
1262 | 1290 | func statsREADONLY () = { | |
1263 | 1291 | let bK = aN() | |
1264 | 1292 | let bX = fromBase58String(bK[q]) | |
1265 | - | let | |
1266 | - | let | |
1293 | + | let gh = bK[r] | |
1294 | + | let gi = bK[s] | |
1267 | 1295 | let cz = bK[v] | |
1268 | 1296 | let cA = bK[w] | |
1269 | 1297 | let bL = parseIntValue(bK[t]) | |
1270 | 1298 | let bM = parseIntValue(bK[u]) | |
1271 | - | let | |
1272 | - | let | |
1273 | - | let | |
1274 | - | let | |
1299 | + | let gj = valueOrErrorMessage(assetInfo(bX), (("Asset " + toBase58String(bX)) + " doesn't exist")).quantity | |
1300 | + | let gk = bw(gh) | |
1301 | + | let gl = bw(gi) | |
1302 | + | let gm = if ((gj == 0)) | |
1275 | 1303 | then [e, e, e] | |
1276 | - | else bI( | |
1304 | + | else bI(gk, gl, gj) | |
1277 | 1305 | let ch = 0 | |
1278 | - | let | |
1279 | - | let | |
1280 | - | let | |
1281 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString( | |
1306 | + | let gn = G(gm[1], b) | |
1307 | + | let go = G(gm[2], b) | |
1308 | + | let gp = value(getInteger(aJ, au(toString(this)))) | |
1309 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(gk), toString(gl), toString(gj), toString(ch), toString(gn), toString(go), toString(gp)], j)) | |
1282 | 1310 | } | |
1283 | 1311 | ||
1284 | 1312 | ||
1285 | 1313 | ||
1286 | - | @Callable( | |
1314 | + | @Callable(dz) | |
1287 | 1315 | func evaluatePutByAmountAssetREADONLY (cr) = { | |
1288 | 1316 | let bK = aN() | |
1289 | 1317 | let bX = fromBase58String(bK[q]) | |
1294 | 1322 | let bL = parseIntValue(bK[t]) | |
1295 | 1323 | let bM = parseIntValue(bK[u]) | |
1296 | 1324 | let ca = bK[p] | |
1297 | - | let | |
1298 | - | let | |
1299 | - | let | |
1300 | - | let bG = D( | |
1301 | - | let bH = D( | |
1302 | - | let cg = if (( | |
1325 | + | let gj = valueOrErrorMessage(assetInfo(bX), (("Asset " + toBase58String(bX)) + " doesn't exist")).quantity | |
1326 | + | let gk = bw(cx) | |
1327 | + | let gl = bw(cy) | |
1328 | + | let bG = D(gk, bL) | |
1329 | + | let bH = D(gl, bM) | |
1330 | + | let cg = if ((gj == 0)) | |
1303 | 1331 | then e | |
1304 | 1332 | else by(bH, bG) | |
1305 | 1333 | let cD = D(cr, bL) | |
1306 | 1334 | let cE = fraction(cD, cg, d) | |
1307 | 1335 | let ct = G(cE, bM) | |
1308 | - | let | |
1309 | - | let cO = | |
1310 | - | let | |
1311 | - | let cc = | |
1312 | - | let ce = | |
1313 | - | let cb = | |
1336 | + | let dF = cp("", 500000, cr, bY, ct, bZ, "", true, false) | |
1337 | + | let cO = dF._1 | |
1338 | + | let gq = dF._3 | |
1339 | + | let cc = dF._4 | |
1340 | + | let ce = dF._5 | |
1341 | + | let cb = dF._6 | |
1314 | 1342 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cO), toString(G(cg, b)), toString(cc), toString(ce), toString(cb), ca, toString(cr), toString(ct)], j)) | |
1315 | 1343 | } | |
1316 | 1344 | ||
1317 | 1345 | ||
1318 | 1346 | ||
1319 | - | @Callable( | |
1347 | + | @Callable(dz) | |
1320 | 1348 | func evaluatePutByPriceAssetREADONLY (ct) = { | |
1321 | 1349 | let bK = aN() | |
1322 | 1350 | let bX = fromBase58String(bK[q]) | |
1327 | 1355 | let bL = parseIntValue(bK[t]) | |
1328 | 1356 | let bM = parseIntValue(bK[u]) | |
1329 | 1357 | let ca = bK[p] | |
1330 | - | let | |
1331 | - | let | |
1332 | - | let | |
1333 | - | let | |
1334 | - | let | |
1335 | - | let cg = if (( | |
1358 | + | let gj = valueOrErrorMessage(assetInfo(bX), (("Asset " + toBase58String(bX)) + " doesn't exist")).quantity | |
1359 | + | let gr = bw(cx) | |
1360 | + | let gs = bw(cy) | |
1361 | + | let gt = D(gr, bL) | |
1362 | + | let gu = D(gs, bM) | |
1363 | + | let cg = if ((gj == 0)) | |
1336 | 1364 | then e | |
1337 | - | else by( | |
1365 | + | else by(gu, gt) | |
1338 | 1366 | let cE = D(ct, bM) | |
1339 | 1367 | let cD = fraction(cE, d, cg) | |
1340 | 1368 | let cr = G(cD, bL) | |
1341 | - | let | |
1342 | - | let cO = | |
1343 | - | let | |
1344 | - | let cc = | |
1345 | - | let ce = | |
1346 | - | let cb = | |
1369 | + | let dF = cp("", 500000, cr, bY, ct, bZ, "", true, false) | |
1370 | + | let cO = dF._1 | |
1371 | + | let gq = dF._3 | |
1372 | + | let cc = dF._4 | |
1373 | + | let ce = dF._5 | |
1374 | + | let cb = dF._6 | |
1347 | 1375 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cO), toString(G(cg, b)), toString(cc), toString(ce), toString(cb), ca, toString(cr), toString(ct)], j)) | |
1348 | 1376 | } | |
1349 | 1377 | ||
1350 | 1378 | ||
1351 | 1379 | ||
1352 | - | @Callable( | |
1353 | - | func evaluateGetREADONLY ( | |
1354 | - | let cG = bT("", | |
1380 | + | @Callable(dz) | |
1381 | + | func evaluateGetREADONLY (gv,gw) = { | |
1382 | + | let cG = bT("", gv, gw, this) | |
1355 | 1383 | let cm = cG._1 | |
1356 | 1384 | let cn = cG._2 | |
1357 | 1385 | let cc = cG._5 | |
1363 | 1391 | } | |
1364 | 1392 | ||
1365 | 1393 | ||
1366 | - | @Verifier( | |
1367 | - | func | |
1368 | - | let | |
1369 | - | let | |
1370 | - | if ($isInstanceOf( | |
1394 | + | @Verifier(gx) | |
1395 | + | func gy () = { | |
1396 | + | let gz = { | |
1397 | + | let dK = eM() | |
1398 | + | if ($isInstanceOf(dK, "ByteVector")) | |
1371 | 1399 | then { | |
1372 | - | let | |
1373 | - | | |
1400 | + | let eQ = dK | |
1401 | + | eQ | |
1374 | 1402 | } | |
1375 | - | else if ($isInstanceOf( | |
1376 | - | then | |
1403 | + | else if ($isInstanceOf(dK, "Unit")) | |
1404 | + | then gx.senderPublicKey | |
1377 | 1405 | else throw("Match error") | |
1378 | 1406 | } | |
1379 | - | let | |
1380 | - | if ($isInstanceOf( | |
1407 | + | let dK = gx | |
1408 | + | if ($isInstanceOf(dK, "Order")) | |
1381 | 1409 | then { | |
1382 | - | let | |
1383 | - | let | |
1384 | - | let az = | |
1385 | - | let aA = sigVerify( | |
1386 | - | let aB = sigVerify( | |
1410 | + | let dp = dK | |
1411 | + | let gA = aM() | |
1412 | + | let az = do(dp) | |
1413 | + | let aA = sigVerify(dp.bodyBytes, dp.proofs[0], dp.senderPublicKey) | |
1414 | + | let aB = sigVerify(dp.bodyBytes, dp.proofs[1], gA) | |
1387 | 1415 | if (if (if (az) | |
1388 | 1416 | then aA | |
1389 | 1417 | else false) | |
1392 | 1420 | then true | |
1393 | 1421 | else ay(az, aA, aB) | |
1394 | 1422 | } | |
1395 | - | else if ($isInstanceOf( | |
1423 | + | else if ($isInstanceOf(dK, "SetScriptTransaction")) | |
1396 | 1424 | then { | |
1397 | - | let | |
1398 | - | let | |
1399 | - | let | |
1400 | - | let | |
1401 | - | if (if (( | |
1402 | - | then ( | |
1425 | + | let eN = dK | |
1426 | + | let gB = blake2b256(value(eN.script)) | |
1427 | + | let gC = fromBase64String(value(getString(aJ, aw()))) | |
1428 | + | let gD = scriptHash(this) | |
1429 | + | if (if ((gC == gB)) | |
1430 | + | then (gD != gB) | |
1403 | 1431 | else false) | |
1404 | 1432 | then true | |
1405 | - | else sigVerify( | |
1433 | + | else sigVerify(gx.bodyBytes, gx.proofs[0], gz) | |
1406 | 1434 | } | |
1407 | - | else sigVerify( | |
1435 | + | else sigVerify(gx.bodyBytes, gx.proofs[0], gz) | |
1408 | 1436 | } | |
1409 | 1437 |
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 (H,I) = toInt(fraction(H, toBigInt(I), d)) | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func J (K,L,M) = fraction(K, L, M) | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func N (H) = if ((0 > H)) | |
72 | 72 | then -(H) | |
73 | 73 | else H | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func O (H) = if ((e > H)) | |
77 | 77 | then -(H) | |
78 | 78 | else H | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func P () = "%s__factoryContract" | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func Q () = "%s__managerPublicKey" | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func R () = "%s__pendingManagerPublicKey" | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func S () = "%s%s__price__last" | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func T (U,V) = makeString(["%s%s%d%d__price__history", toString(U), toString(V)], j) | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func W (X,Y) = ((("%s%s%s__P__" + X) + "__") + Y) | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func Z (X,Y) = ((("%s%s%s__G__" + X) + "__") + Y) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func aa () = "%s__amountAsset" | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func ab () = "%s__priceAsset" | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | let ac = "%s__fee" | |
109 | 109 | ||
110 | 110 | let ad = fraction(10, b, 10000) | |
111 | 111 | ||
112 | 112 | let ae = valueOrElse(getInteger(this, ac), ad) | |
113 | 113 | ||
114 | 114 | let af = makeString(["%s", "kLp"], j) | |
115 | 115 | ||
116 | 116 | let ag = makeString(["%s", "kLpRefreshedHeight"], j) | |
117 | 117 | ||
118 | 118 | let ah = makeString(["%s", "refreshKLpDelay"], j) | |
119 | 119 | ||
120 | 120 | let ai = 30 | |
121 | 121 | ||
122 | 122 | let aj = valueOrElse(getInteger(this, ah), ai) | |
123 | 123 | ||
124 | 124 | func ak () = "%s__factoryConfig" | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | func al () = "%s%s__matcher__publicKey" | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | func am (an) = (("%s%s%s__" + an) + "__mappings__poolContract2LpAsset") | |
131 | 131 | ||
132 | 132 | ||
133 | 133 | func ao (ap,aq) = (((("%d%d%s__" + ap) + "__") + aq) + "__config") | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | func ar (as) = ("%s%s%s__mappings__baseAsset2internalId__" + as) | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | func at () = "%s__shutdown" | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | func au (av) = ("%s%s__poolWeight__" + av) | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | func aw () = "%s__allowedLpScriptHash" | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | let ax = "%s__feeCollectorAddress" | |
149 | 149 | ||
150 | 150 | func ay (az,aA,aB) = throw(((((("order validation failed: orderValid=" + toString(az)) + " senderValid=") + toString(aA)) + " matcherValid=") + toString(aB))) | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func aC (aD,aE) = valueOrErrorMessage(getString(aD, aE), makeString(["mandatory ", toString(aD), ".", aE, " is not defined"], "")) | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | func aF (aD,aE) = valueOrErrorMessage(getInteger(aD, aE), makeString(["mandatory ", toString(aD), ".", aE, " is not defined"], "")) | |
157 | 157 | ||
158 | 158 | ||
159 | 159 | func aG (aH) = throw(makeString(["lp.ride:", aH], " ")) | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | func aI (aH) = makeString(["lp.ride:", aH], " ") | |
163 | 163 | ||
164 | 164 | ||
165 | 165 | let aJ = addressFromStringValue(aC(this, P())) | |
166 | 166 | ||
167 | 167 | let aK = addressFromStringValue(aC(aJ, ax)) | |
168 | 168 | ||
169 | 169 | func aL () = valueOrElse(getBoolean(aJ, at()), false) | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | func aM () = fromBase58String(aC(aJ, al())) | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | func aN () = { | |
176 | 176 | let aO = aC(this, aa()) | |
177 | 177 | let aP = aC(this, ab()) | |
178 | 178 | let aq = aF(aJ, ar(aP)) | |
179 | 179 | let ap = aF(aJ, ar(aO)) | |
180 | 180 | split(aC(aJ, ao(toString(ap), toString(aq))), j) | |
181 | 181 | } | |
182 | 182 | ||
183 | 183 | ||
184 | 184 | func aQ (aR) = if ((aR == i)) | |
185 | 185 | then unit | |
186 | 186 | else fromBase58String(aR) | |
187 | 187 | ||
188 | 188 | ||
189 | 189 | func aS (aR) = if ((aR == unit)) | |
190 | 190 | then i | |
191 | 191 | else toBase58String(value(aR)) | |
192 | 192 | ||
193 | 193 | ||
194 | 194 | func aT (aU) = $Tuple7(addressFromStringValue(aU[o]), parseIntValue(aU[p]), fromBase58String(aU[q]), aQ(aU[r]), aQ(aU[s]), parseIntValue(aU[t]), parseIntValue(aU[u])) | |
195 | 195 | ||
196 | 196 | ||
197 | 197 | let aV = aT(aN()) | |
198 | 198 | ||
199 | 199 | let aW = aV | |
200 | 200 | ||
201 | 201 | let aX = aW._1 | |
202 | 202 | ||
203 | 203 | let aY = aW._2 | |
204 | 204 | ||
205 | 205 | let aZ = aW._3 | |
206 | 206 | ||
207 | 207 | let ba = aW._4 | |
208 | 208 | ||
209 | 209 | let bb = aW._5 | |
210 | 210 | ||
211 | 211 | let bc = aW._6 | |
212 | 212 | ||
213 | 213 | let bd = aW._7 | |
214 | 214 | ||
215 | 215 | func be () = split(aC(aJ, ak()), j) | |
216 | 216 | ||
217 | 217 | ||
218 | 218 | let bf = valueOrErrorMessage(addressFromString(be()[B]), "incorrect staking address") | |
219 | 219 | ||
220 | 220 | let bg = valueOrErrorMessage(addressFromString(be()[C]), "incorrect staking address") | |
221 | 221 | ||
222 | 222 | func bh (bi,bj,bk,bl,bm,bn,bo,bp,bq,br) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bi), toString(bj), toString(bk), toString(bl), toString(bm), toString(bn), toString(bo), toString(bp), toString(bq), toString(br)], j) | |
223 | 223 | ||
224 | 224 | ||
225 | 225 | func bs (bt,bu,bv,bl,bo,bp) = makeString(["%d%d%d%d%d%d", toString(bt), toString(bu), toString(bv), toString(bl), toString(bo), toString(bp)], j) | |
226 | 226 | ||
227 | 227 | ||
228 | 228 | func bw (bx) = if ((bx == "WAVES")) | |
229 | 229 | then wavesBalance(this).available | |
230 | 230 | else assetBalance(this, fromBase58String(bx)) | |
231 | 231 | ||
232 | 232 | ||
233 | 233 | func by (bz,bA) = fraction(bz, d, bA) | |
234 | 234 | ||
235 | 235 | ||
236 | 236 | func bB (bC,bD,bE,bF) = { | |
237 | 237 | let bG = D(bE, bC) | |
238 | 238 | let bH = D(bF, bD) | |
239 | 239 | by(bH, bG) | |
240 | 240 | } | |
241 | 241 | ||
242 | 242 | ||
243 | 243 | func bI (bE,bF,bJ) = { | |
244 | 244 | let bK = aN() | |
245 | 245 | let bL = parseIntValue(bK[t]) | |
246 | 246 | let bM = parseIntValue(bK[u]) | |
247 | 247 | let bN = bB(bL, bM, bE, bF) | |
248 | 248 | let bA = D(bE, bL) | |
249 | 249 | let bz = D(bF, bM) | |
250 | 250 | let bO = D(bJ, b) | |
251 | 251 | let bP = by(bA, bO) | |
252 | 252 | let bQ = by(bz, bO) | |
253 | 253 | [bN, bP, bQ] | |
254 | 254 | } | |
255 | 255 | ||
256 | 256 | ||
257 | 257 | func bR (bE,bF,bJ) = { | |
258 | 258 | let bS = bI(bE, bF, bJ) | |
259 | 259 | [G(bS[0], b), G(bS[1], b), G(bS[2], b)] | |
260 | 260 | } | |
261 | 261 | ||
262 | 262 | ||
263 | 263 | func bT (bU,bV,bW,X) = { | |
264 | 264 | let bK = aN() | |
265 | 265 | let bX = bK[q] | |
266 | 266 | let bY = bK[r] | |
267 | 267 | let bZ = bK[s] | |
268 | 268 | let bC = parseIntValue(bK[t]) | |
269 | 269 | let bD = parseIntValue(bK[u]) | |
270 | 270 | let ca = bK[p] | |
271 | 271 | let cb = valueOrErrorMessage(assetInfo(fromBase58String(bX)), (("Asset " + bX) + " doesn't exist")).quantity | |
272 | 272 | if ((bX != bV)) | |
273 | 273 | then throw("Invalid asset passed.") | |
274 | 274 | else { | |
275 | 275 | let cc = bw(bY) | |
276 | 276 | let cd = D(cc, bC) | |
277 | 277 | let ce = bw(bZ) | |
278 | 278 | let cf = D(ce, bD) | |
279 | 279 | let cg = by(cf, cd) | |
280 | 280 | let ch = G(cg, b) | |
281 | 281 | let ci = D(bW, b) | |
282 | 282 | let cj = D(cb, b) | |
283 | 283 | let ck = fraction(cd, ci, cj) | |
284 | 284 | let cl = fraction(cf, ci, cj) | |
285 | 285 | let cm = G(ck, bC) | |
286 | 286 | let cn = G(cl, bD) | |
287 | 287 | let co = if ((bU == "")) | |
288 | 288 | then nil | |
289 | 289 | else [ScriptTransfer(X, cm, if ((bY == "WAVES")) | |
290 | 290 | then unit | |
291 | 291 | else fromBase58String(bY)), ScriptTransfer(X, cn, if ((bZ == "WAVES")) | |
292 | 292 | then unit | |
293 | 293 | else fromBase58String(bZ)), StringEntry(Z(toString(X), bU), bs(cm, cn, bW, ch, height, lastBlock.timestamp)), IntegerEntry(S(), ch), IntegerEntry(T(height, lastBlock.timestamp), ch)] | |
294 | 294 | $Tuple10(cm, cn, bY, bZ, cc, ce, cb, cg, ca, co) | |
295 | 295 | } | |
296 | 296 | } | |
297 | 297 | ||
298 | 298 | ||
299 | 299 | func cp (bU,cq,cr,cs,ct,cu,X,cv,cw) = { | |
300 | 300 | let bK = aN() | |
301 | 301 | let bX = fromBase58String(bK[q]) | |
302 | 302 | let cx = bK[r] | |
303 | 303 | let cy = bK[s] | |
304 | 304 | let cz = bK[v] | |
305 | 305 | let cA = bK[w] | |
306 | 306 | let bL = parseIntValue(bK[t]) | |
307 | 307 | let bM = parseIntValue(bK[u]) | |
308 | 308 | let ca = bK[p] | |
309 | 309 | let cb = valueOrErrorMessage(assetInfo(bX), (("Asset " + toBase58String(bX)) + " doesn't exist")).quantity | |
310 | 310 | let cB = toBase58String(valueOrElse(cs, fromBase58String("WAVES"))) | |
311 | 311 | let cC = toBase58String(valueOrElse(cu, fromBase58String("WAVES"))) | |
312 | 312 | if (if ((cx != cB)) | |
313 | 313 | then true | |
314 | 314 | else (cy != cC)) | |
315 | 315 | then throw("Invalid amt or price asset passed.") | |
316 | 316 | else { | |
317 | 317 | let cc = if (cv) | |
318 | 318 | then bw(cx) | |
319 | 319 | else (bw(cx) - cr) | |
320 | 320 | let ce = if (cv) | |
321 | 321 | then bw(cy) | |
322 | 322 | else (bw(cy) - ct) | |
323 | 323 | let cD = D(cr, bL) | |
324 | 324 | let cE = D(ct, bM) | |
325 | 325 | let cF = by(cE, cD) | |
326 | 326 | let cd = D(cc, bL) | |
327 | 327 | let cf = D(ce, bM) | |
328 | 328 | let cG = if ((cb == 0)) | |
329 | 329 | then { | |
330 | 330 | let cg = e | |
331 | 331 | let cH = e | |
332 | 332 | let bO = pow((cD * cE), 0, toBigInt(5), 1, 0, DOWN) | |
333 | 333 | $Tuple5(G(bO, b), G(cD, bL), G(cE, bM), by((cf + cE), (cd + cD)), cH) | |
334 | 334 | } | |
335 | 335 | else { | |
336 | 336 | let cg = by(cf, cd) | |
337 | 337 | let cH = fraction(O((cg - cF)), d, cg) | |
338 | 338 | let cI = D(cq, b) | |
339 | 339 | if (if ((cg != e)) | |
340 | 340 | then (cH > cI) | |
341 | 341 | else false) | |
342 | 342 | then throw(((("Price slippage " + toString(cH)) + " exceeded the passed limit of ") + toString(cI))) | |
343 | 343 | else { | |
344 | 344 | let cj = D(cb, b) | |
345 | 345 | let cJ = fraction(cD, cg, d) | |
346 | 346 | let cK = fraction(cE, d, cg) | |
347 | 347 | let cL = if ((cJ > cE)) | |
348 | 348 | then $Tuple2(cK, cE) | |
349 | 349 | else $Tuple2(cD, cJ) | |
350 | 350 | let cM = cL._1 | |
351 | 351 | let cN = cL._2 | |
352 | 352 | let bO = fraction(cj, cN, cf) | |
353 | 353 | $Tuple5(G(bO, b), G(cM, bL), G(cN, bM), cg, cH) | |
354 | 354 | } | |
355 | 355 | } | |
356 | 356 | let cO = cG._1 | |
357 | 357 | let cP = cG._2 | |
358 | 358 | let cQ = cG._3 | |
359 | 359 | let ch = G(cG._4, b) | |
360 | 360 | let cR = G(cG._5, b) | |
361 | 361 | if ((0 >= cO)) | |
362 | 362 | then throw("Invalid calculations. LP calculated is less than zero.") | |
363 | 363 | else { | |
364 | 364 | let cS = if (!(cw)) | |
365 | 365 | then 0 | |
366 | 366 | else cO | |
367 | 367 | let cT = (cr - cP) | |
368 | 368 | let cU = (ct - cQ) | |
369 | 369 | let cV = [IntegerEntry(S(), ch), IntegerEntry(T(height, lastBlock.timestamp), ch), StringEntry(W(X, bU), bh(cP, cQ, cS, ch, cq, cR, height, lastBlock.timestamp, cT, cU))] | |
370 | 370 | $Tuple13(cO, cS, ch, cc, ce, cb, bX, ca, cV, cT, cU, cs, cu) | |
371 | 371 | } | |
372 | 372 | } | |
373 | 373 | } | |
374 | 374 | ||
375 | 375 | ||
376 | 376 | func cW (cX,cY,cb) = { | |
377 | 377 | let cZ = fraction(pow((cX * cY), 0, toBigInt(5), 1, 0, DOWN), d, cb) | |
378 | 378 | cZ | |
379 | 379 | } | |
380 | 380 | ||
381 | 381 | ||
382 | 382 | func da (db,dc,dd) = { | |
383 | - | let de = (bw(aS(ba)) + db) | |
384 | - | let df = (bw(aS(bb)) + dc) | |
385 | - | let dg = (value(assetInfo(aZ)).quantity + dd) | |
386 | - | let cZ = cW(toBigInt(de), toBigInt(df), toBigInt(dg)) | |
387 | - | let dh = [IntegerEntry(ag, height), StringEntry(af, toString(cZ))] | |
388 | - | $Tuple2(dh, cZ) | |
383 | + | let de = (toBigInt(bw(aS(ba))) - db) | |
384 | + | let df = (toBigInt(bw(aS(bb))) - dc) | |
385 | + | let dg = (toBigInt(value(assetInfo(aZ)).quantity) - dd) | |
386 | + | let dh = cW(de, df, dg) | |
387 | + | dh | |
389 | 388 | } | |
390 | 389 | ||
391 | 390 | ||
392 | - | func di (cZ) = { | |
393 | - | let de = bw(aS(ba)) | |
394 | - | let df = bw(aS(bb)) | |
395 | - | let dg = value(assetInfo(aZ)).quantity | |
396 | - | let dj = cW(toBigInt(de), toBigInt(df), toBigInt(dg)) | |
397 | - | if ((cZ >= dj)) | |
398 | - | then true | |
399 | - | else aG("updated KLp lower than current KLp") | |
391 | + | func di (dj,dk,dd) = { | |
392 | + | let de = (bw(aS(ba)) + dj) | |
393 | + | let df = (bw(aS(bb)) + dk) | |
394 | + | let dg = (value(assetInfo(aZ)).quantity + dd) | |
395 | + | let cZ = cW(toBigInt(de), toBigInt(df), toBigInt(dg)) | |
396 | + | let dl = [IntegerEntry(ag, height), StringEntry(af, toString(cZ))] | |
397 | + | $Tuple2(dl, cZ) | |
400 | 398 | } | |
401 | 399 | ||
402 | 400 | ||
403 | - | func dk (dl) = { | |
404 | - | let dm = dl.amount | |
405 | - | let dn = fraction(dl.amount, dl.price, b) | |
406 | - | let do = if ((dl.orderType == Buy)) | |
407 | - | then $Tuple2(dm, -(dn)) | |
408 | - | else $Tuple2(-(dm), dn) | |
409 | - | let db = do._1 | |
410 | - | let dc = do._2 | |
401 | + | func dm (dn,cZ) = if ((cZ >= dn)) | |
402 | + | then true | |
403 | + | else aG("updated KLp lower than current KLp") | |
404 | + | ||
405 | + | ||
406 | + | func do (dp) = { | |
407 | + | let dq = dp.amount | |
408 | + | let dr = fraction(dp.amount, dp.price, b) | |
409 | + | let ds = if ((dp.orderType == Buy)) | |
410 | + | then $Tuple2(dq, -(dr)) | |
411 | + | else $Tuple2(-(dq), dr) | |
412 | + | let dj = ds._1 | |
413 | + | let dk = ds._2 | |
411 | 414 | if (if (if (aL()) | |
412 | 415 | then true | |
413 | 416 | else (aY == m)) | |
414 | 417 | then true | |
415 | 418 | else (aY == n)) | |
416 | 419 | then throw("Exchange operations disabled") | |
417 | - | else if (if (( | |
420 | + | else if (if ((dp.assetPair.amountAsset != ba)) | |
418 | 421 | then true | |
419 | - | else ( | |
422 | + | else (dp.assetPair.priceAsset != bb)) | |
420 | 423 | then throw("Wrong order assets.") | |
421 | 424 | else { | |
422 | - | let | |
423 | - | let | |
424 | - | let | |
425 | - | let | |
426 | - | let | |
427 | - | | |
425 | + | let dt = valueOrErrorMessage(parseBigInt(valueOrErrorMessage(getString(this, af), aI("kLp is required"))), aI("invalid kLp")) | |
426 | + | let du = di(dj, dk, 0) | |
427 | + | let dv = du._1 | |
428 | + | let dw = du._2 | |
429 | + | let dx = (dw > dt) | |
430 | + | dx | |
428 | 431 | } | |
429 | 432 | } | |
430 | 433 | ||
431 | 434 | ||
432 | - | func | |
435 | + | func dy (dz) = if ((size(dz.payments) != 1)) | |
433 | 436 | then throw("exactly 1 payment is expected") | |
434 | 437 | else { | |
435 | - | let | |
436 | - | let bV = value( | |
437 | - | let | |
438 | - | let cG = bT(toBase58String( | |
438 | + | let dA = value(dz.payments[0]) | |
439 | + | let bV = value(dA.assetId) | |
440 | + | let dB = dA.amount | |
441 | + | let cG = bT(toBase58String(dz.transactionId), toBase58String(bV), dB, dz.caller) | |
439 | 442 | let cm = cG._1 | |
440 | 443 | let cn = cG._2 | |
441 | 444 | let ca = parseIntValue(cG._9) | |
442 | 445 | let co = cG._10 | |
443 | 446 | if (if (aL()) | |
444 | 447 | then true | |
445 | 448 | else (ca == n)) | |
446 | 449 | then throw(("Get operation is blocked by admin. Status = " + toString(ca))) | |
447 | - | else $Tuple5(cm, cn, | |
450 | + | else $Tuple5(cm, cn, dB, bV, co) | |
448 | 451 | } | |
449 | 452 | ||
450 | 453 | ||
451 | - | func | |
454 | + | func dC (dz,cq,cw) = if ((size(dz.payments) != 2)) | |
452 | 455 | then throw("exactly 2 payments are expected") | |
453 | 456 | else { | |
454 | - | let | |
455 | - | let | |
456 | - | let | |
457 | - | let ca = parseIntValue( | |
457 | + | let dD = value(dz.payments[0]) | |
458 | + | let dE = value(dz.payments[1]) | |
459 | + | let dF = cp(toBase58String(dz.transactionId), cq, dD.amount, dD.assetId, dE.amount, dE.assetId, toString(dz.caller), false, cw) | |
460 | + | let ca = parseIntValue(dF._8) | |
458 | 461 | if (if (if (aL()) | |
459 | 462 | then true | |
460 | 463 | else (ca == l)) | |
461 | 464 | then true | |
462 | 465 | else (ca == n)) | |
463 | 466 | then throw(("Put operation is blocked by admin. Status = " + toString(ca))) | |
464 | - | else | |
467 | + | else dF | |
465 | 468 | } | |
466 | 469 | ||
467 | 470 | ||
468 | - | func | |
469 | - | let | |
470 | - | if (( | |
471 | + | func dG (dH) = { | |
472 | + | let dI = invoke(aJ, "emit", [dH], nil) | |
473 | + | if ((dI == dI)) | |
471 | 474 | then { | |
472 | - | let | |
473 | - | let | |
474 | - | if ($isInstanceOf( | |
475 | + | let dJ = { | |
476 | + | let dK = dI | |
477 | + | if ($isInstanceOf(dK, "Address")) | |
475 | 478 | then { | |
476 | - | let | |
477 | - | invoke( | |
479 | + | let dL = dK | |
480 | + | invoke(dL, "emit", [dH], nil) | |
478 | 481 | } | |
479 | 482 | else unit | |
480 | 483 | } | |
481 | - | if (( | |
482 | - | then | |
484 | + | if ((dJ == dJ)) | |
485 | + | then dH | |
483 | 486 | else throw("Strict value is not equal to itself.") | |
484 | 487 | } | |
485 | 488 | else throw("Strict value is not equal to itself.") | |
486 | 489 | } | |
487 | 490 | ||
488 | 491 | ||
489 | - | func | |
490 | - | let | |
491 | - | $Tuple2(( | |
492 | + | func dM (dH) = { | |
493 | + | let dN = fraction(dH, ae, b) | |
494 | + | $Tuple2((dH - dN), dN) | |
492 | 495 | } | |
493 | 496 | ||
494 | 497 | ||
495 | - | func | |
496 | - | let | |
497 | - | let | |
498 | - | let | |
499 | - | let | |
498 | + | func dO (dP,dQ,X,Y) = { | |
499 | + | let dR = (Y == unit) | |
500 | + | let dS = bw(aS(ba)) | |
501 | + | let dT = bw(aS(bb)) | |
502 | + | let dU = if ((dQ == ba)) | |
500 | 503 | then true | |
501 | - | else if (( | |
504 | + | else if ((dQ == bb)) | |
502 | 505 | then false | |
503 | 506 | else aG("invalid asset") | |
504 | - | let | |
505 | - | then $Tuple2( | |
506 | - | else if ( | |
507 | - | then $Tuple2(( | |
508 | - | else $Tuple2( | |
509 | - | let | |
510 | - | let | |
511 | - | let | |
512 | - | then $Tuple2( | |
513 | - | else $Tuple2(0, | |
514 | - | let | |
515 | - | let | |
516 | - | let | |
517 | - | let | |
518 | - | let | |
519 | - | let | |
520 | - | let | |
521 | - | let | |
522 | - | let | |
523 | - | let | |
524 | - | let | |
525 | - | let | |
526 | - | then | |
527 | - | else | |
528 | - | let | |
529 | - | let | |
530 | - | let | |
507 | + | let dV = if (dR) | |
508 | + | then $Tuple2(dS, dT) | |
509 | + | else if (dU) | |
510 | + | then $Tuple2((dS - dP), dT) | |
511 | + | else $Tuple2(dS, (dT - dP)) | |
512 | + | let dW = dV._1 | |
513 | + | let dX = dV._2 | |
514 | + | let dY = if (dU) | |
515 | + | then $Tuple2(dP, 0) | |
516 | + | else $Tuple2(0, dP) | |
517 | + | let dZ = dY._1 | |
518 | + | let ea = dY._2 | |
519 | + | let dq = dM(dZ)._1 | |
520 | + | let dr = dM(ea)._1 | |
521 | + | let eb = dM(dP) | |
522 | + | let ec = eb._1 | |
523 | + | let dN = eb._2 | |
524 | + | let ed = (dW + dq) | |
525 | + | let ee = (dX + dr) | |
526 | + | let ef = by(D(ee, bd), D(ed, bc)) | |
527 | + | let eg = G(ef, b) | |
528 | + | let eh = if (dU) | |
529 | + | then dW | |
530 | + | else dX | |
531 | + | let ei = toBigInt(eh) | |
532 | + | let ej = toBigInt(valueOrErrorMessage(assetInfo(aZ), (("asset " + toBase58String(aZ)) + " doesn't exist")).quantity) | |
533 | + | let ek = if ((ej > f)) | |
531 | 534 | then true | |
532 | 535 | else aG("initial deposit requires all coins") | |
533 | - | if (( | |
536 | + | if ((ek == ek)) | |
534 | 537 | then { | |
535 | - | let | |
536 | - | let | |
537 | - | let cV = if ( | |
538 | + | let el = toBigInt(ec) | |
539 | + | let em = max([0, toInt(((ej * (sqrtBigInt((d + ((el * d) / ei)), 18, 18, DOWN) - d)) / d))]) | |
540 | + | let cV = if (dR) | |
538 | 541 | then nil | |
539 | - | else [IntegerEntry(S(), | |
540 | - | let | |
541 | - | let | |
542 | - | let | |
543 | - | let | |
544 | - | then $Tuple2( | |
545 | - | else $Tuple2( | |
546 | - | let | |
547 | - | let | |
548 | - | let | |
549 | - | fraction(( | |
542 | + | else [IntegerEntry(S(), eg), IntegerEntry(T(height, lastBlock.timestamp), eg), StringEntry(W(toString(value(X)), toBase58String(value(Y))), bh(dZ, ea, em, eg, 0, 0, height, lastBlock.timestamp, 0, 0))] | |
543 | + | let en = by(D(dX, bd), D(dW, bc)) | |
544 | + | let eo = G(en, b) | |
545 | + | let ep = { | |
546 | + | let eq = if (dU) | |
547 | + | then $Tuple2(dZ, dW) | |
548 | + | else $Tuple2(ea, dX) | |
549 | + | let dH = eq._1 | |
550 | + | let er = eq._2 | |
551 | + | let es = toInt(fraction(ej, toBigInt((dH / 2)), toBigInt(er))) | |
552 | + | fraction((em - es), b, es) | |
550 | 553 | } | |
551 | - | $Tuple5( | |
554 | + | $Tuple5(em, cV, dN, ep, dU) | |
552 | 555 | } | |
553 | 556 | else throw("Strict value is not equal to itself.") | |
554 | 557 | } | |
555 | 558 | ||
556 | 559 | ||
557 | - | func | |
558 | - | let | |
559 | - | let | |
560 | + | func et (eu,ec,dQ,X,Y) = { | |
561 | + | let dR = (Y == unit) | |
562 | + | let ev = [if ((dQ == aZ)) | |
560 | 563 | then true | |
561 | 564 | else aG("invalid lp asset")] | |
562 | - | if (( | |
565 | + | if ((ev == ev)) | |
563 | 566 | then { | |
564 | - | let | |
567 | + | let ew = if ((eu == ba)) | |
565 | 568 | then true | |
566 | - | else if (( | |
569 | + | else if ((eu == bb)) | |
567 | 570 | then false | |
568 | 571 | else aG("invalid asset") | |
569 | - | let | |
572 | + | let ex = if (ew) | |
570 | 573 | then toBigInt(bw(aS(ba))) | |
571 | 574 | else toBigInt(bw(aS(bb))) | |
572 | - | let | |
573 | - | let | |
574 | - | let | |
575 | - | then | |
576 | - | else | |
577 | - | let | |
578 | - | let | |
579 | - | let | |
580 | - | let | |
581 | - | let | |
582 | - | let | |
583 | - | let | |
584 | - | let | |
585 | - | then $Tuple4( | |
586 | - | else $Tuple4(0, | |
587 | - | let | |
588 | - | let | |
589 | - | let | |
590 | - | let | |
591 | - | let | |
592 | - | let | |
593 | - | let cV = if ( | |
575 | + | let ey = bw(aS(ba)) | |
576 | + | let ez = bw(aS(bb)) | |
577 | + | let eA = if (ew) | |
578 | + | then ey | |
579 | + | else ez | |
580 | + | let eB = toBigInt(eA) | |
581 | + | let ej = toBigInt(valueOrErrorMessage(assetInfo(aZ), (("asset " + toBase58String(aZ)) + " doesn't exist")).quantity) | |
582 | + | let eC = toBigInt(ec) | |
583 | + | let eD = max([0, toInt(((ex * (d - pow((d - ((eC * d) / ej)), 18, h, 0, 18, DOWN))) / d))]) | |
584 | + | let eE = dM(eD) | |
585 | + | let eF = eE._1 | |
586 | + | let dN = eE._2 | |
587 | + | let eG = if (ew) | |
588 | + | then $Tuple4(eF, 0, (ey - eD), ez) | |
589 | + | else $Tuple4(0, eF, ey, (ez - eD)) | |
590 | + | let eH = eG._1 | |
591 | + | let eI = eG._2 | |
592 | + | let eJ = eG._3 | |
593 | + | let eK = eG._4 | |
594 | + | let ef = by(D(eK, bd), D(eJ, bc)) | |
595 | + | let eg = G(ef, b) | |
596 | + | let cV = if (dR) | |
594 | 597 | then nil | |
595 | - | else [StringEntry(Z(toString(value(X)), toBase58String(value(Y))), bs( | |
596 | - | let | |
597 | - | let | |
598 | - | let | |
599 | - | let | |
600 | - | fraction(( | |
598 | + | else [StringEntry(Z(toString(value(X)), toBase58String(value(Y))), bs(eH, eI, ec, eg, height, lastBlock.timestamp)), IntegerEntry(S(), eg), IntegerEntry(T(height, lastBlock.timestamp), eg)] | |
599 | + | let en = by(D(ez, bd), D(ey, bc)) | |
600 | + | let eo = G(en, b) | |
601 | + | let ep = { | |
602 | + | let eL = (toInt(fraction(ex, eC, ej)) * 2) | |
603 | + | fraction((eF - eL), b, eL) | |
601 | 604 | } | |
602 | - | $Tuple5( | |
605 | + | $Tuple5(eF, cV, dN, ep, ew) | |
603 | 606 | } | |
604 | 607 | else throw("Strict value is not equal to itself.") | |
605 | 608 | } | |
606 | 609 | ||
607 | 610 | ||
608 | - | func | |
609 | - | let | |
610 | - | if ($isInstanceOf( | |
611 | + | func eM () = { | |
612 | + | let dK = getString(Q()) | |
613 | + | if ($isInstanceOf(dK, "String")) | |
611 | 614 | then { | |
612 | - | let | |
613 | - | fromBase58String( | |
615 | + | let eN = dK | |
616 | + | fromBase58String(eN) | |
614 | 617 | } | |
615 | - | else if ($isInstanceOf( | |
618 | + | else if ($isInstanceOf(dK, "Unit")) | |
616 | 619 | then unit | |
617 | 620 | else throw("Match error") | |
618 | 621 | } | |
619 | 622 | ||
620 | 623 | ||
621 | - | func | |
622 | - | let | |
623 | - | if ($isInstanceOf( | |
624 | + | func eO () = { | |
625 | + | let dK = getString(R()) | |
626 | + | if ($isInstanceOf(dK, "String")) | |
624 | 627 | then { | |
625 | - | let | |
626 | - | fromBase58String( | |
628 | + | let eN = dK | |
629 | + | fromBase58String(eN) | |
627 | 630 | } | |
628 | - | else if ($isInstanceOf( | |
631 | + | else if ($isInstanceOf(dK, "Unit")) | |
629 | 632 | then unit | |
630 | 633 | else throw("Match error") | |
631 | 634 | } | |
632 | 635 | ||
633 | 636 | ||
634 | - | func | |
635 | - | let | |
636 | - | if ($isInstanceOf( | |
637 | + | func eP (dz) = { | |
638 | + | let dK = eM() | |
639 | + | if ($isInstanceOf(dK, "ByteVector")) | |
637 | 640 | then { | |
638 | - | let | |
639 | - | ( | |
641 | + | let eQ = dK | |
642 | + | (dz.callerPublicKey == eQ) | |
640 | 643 | } | |
641 | - | else if ($isInstanceOf( | |
642 | - | then ( | |
644 | + | else if ($isInstanceOf(dK, "Unit")) | |
645 | + | then (dz.caller == this) | |
643 | 646 | else throw("Match error") | |
644 | 647 | } | |
645 | 648 | ||
646 | 649 | ||
647 | - | func | |
648 | - | let | |
649 | - | let | |
650 | - | if ($isInstanceOf( | |
650 | + | func eR (dz) = { | |
651 | + | let eS = throw("Permission denied") | |
652 | + | let dK = eM() | |
653 | + | if ($isInstanceOf(dK, "ByteVector")) | |
651 | 654 | then { | |
652 | - | let | |
653 | - | if (( | |
655 | + | let eQ = dK | |
656 | + | if ((dz.callerPublicKey == eQ)) | |
654 | 657 | then true | |
655 | - | else | |
658 | + | else eS | |
656 | 659 | } | |
657 | - | else if ($isInstanceOf( | |
658 | - | then if (( | |
660 | + | else if ($isInstanceOf(dK, "Unit")) | |
661 | + | then if ((dz.caller == this)) | |
659 | 662 | then true | |
660 | - | else | |
663 | + | else eS | |
661 | 664 | else throw("Match error") | |
662 | 665 | } | |
663 | 666 | ||
664 | 667 | ||
665 | - | @Callable( | |
666 | - | func setManager ( | |
667 | - | let | |
668 | - | if (( | |
668 | + | @Callable(dz) | |
669 | + | func setManager (eT) = { | |
670 | + | let eU = eR(dz) | |
671 | + | if ((eU == eU)) | |
669 | 672 | then { | |
670 | - | let | |
671 | - | if (( | |
672 | - | then [StringEntry(R(), | |
673 | + | let eV = fromBase58String(eT) | |
674 | + | if ((eV == eV)) | |
675 | + | then [StringEntry(R(), eT)] | |
673 | 676 | else throw("Strict value is not equal to itself.") | |
674 | 677 | } | |
675 | 678 | else throw("Strict value is not equal to itself.") | |
676 | 679 | } | |
677 | 680 | ||
678 | 681 | ||
679 | 682 | ||
680 | - | @Callable( | |
683 | + | @Callable(dz) | |
681 | 684 | func confirmManager () = { | |
682 | - | let | |
683 | - | let | |
685 | + | let eW = eO() | |
686 | + | let eX = if (isDefined(eW)) | |
684 | 687 | then true | |
685 | 688 | else throw("No pending manager") | |
686 | - | if (( | |
689 | + | if ((eX == eX)) | |
687 | 690 | then { | |
688 | - | let | |
691 | + | let eY = if ((dz.callerPublicKey == value(eW))) | |
689 | 692 | then true | |
690 | 693 | else throw("You are not pending manager") | |
691 | - | if (( | |
692 | - | then [StringEntry(Q(), toBase58String(value( | |
694 | + | if ((eY == eY)) | |
695 | + | then [StringEntry(Q(), toBase58String(value(eW))), DeleteEntry(R())] | |
693 | 696 | else throw("Strict value is not equal to itself.") | |
694 | 697 | } | |
695 | 698 | else throw("Strict value is not equal to itself.") | |
696 | 699 | } | |
697 | 700 | ||
698 | 701 | ||
699 | 702 | ||
700 | - | @Callable( | |
701 | - | func put (cq, | |
703 | + | @Callable(dz) | |
704 | + | func put (cq,eZ) = if ((0 > cq)) | |
702 | 705 | then throw("Invalid slippageTolerance passed") | |
703 | 706 | else { | |
704 | - | let dB = dy(dv, cq, true) | |
705 | - | let cS = dB._2 | |
706 | - | let bX = dB._7 | |
707 | - | let co = dB._9 | |
708 | - | let cT = dB._10 | |
709 | - | let cU = dB._11 | |
710 | - | let eW = dB._12 | |
711 | - | let eX = dB._13 | |
712 | - | let dE = invoke(aJ, "emit", [cS], nil) | |
713 | - | if ((dE == dE)) | |
707 | + | let dF = dC(dz, cq, true) | |
708 | + | let cS = dF._2 | |
709 | + | let bX = dF._7 | |
710 | + | let co = dF._9 | |
711 | + | let cT = dF._10 | |
712 | + | let cU = dF._11 | |
713 | + | let fa = dF._12 | |
714 | + | let fb = dF._13 | |
715 | + | let dD = toBigInt(value(dz.payments[0]).amount) | |
716 | + | let dE = toBigInt(value(dz.payments[1]).amount) | |
717 | + | let dh = da(dD, dE, toBigInt(0)) | |
718 | + | if ((dh == dh)) | |
714 | 719 | then { | |
715 | - | let dF = { | |
716 | - | let dG = dE | |
717 | - | if ($isInstanceOf(dG, "Address")) | |
718 | - | then { | |
719 | - | let dH = dG | |
720 | - | invoke(dH, "emit", [cS], nil) | |
720 | + | let dI = invoke(aJ, "emit", [cS], nil) | |
721 | + | if ((dI == dI)) | |
722 | + | then { | |
723 | + | let dJ = { | |
724 | + | let dK = dI | |
725 | + | if ($isInstanceOf(dK, "Address")) | |
726 | + | then { | |
727 | + | let dL = dK | |
728 | + | invoke(dL, "emit", [cS], nil) | |
729 | + | } | |
730 | + | else unit | |
721 | 731 | } | |
722 | - | else unit | |
723 | - | } | |
724 | - | if ((dF == dF)) | |
725 | - | then { | |
726 | - | let eY = if ((cT > 0)) | |
727 | - | then invoke(bg, "put", nil, [AttachedPayment(eW, cT)]) | |
728 | - | else nil | |
729 | - | if ((eY == eY)) | |
732 | + | if ((dJ == dJ)) | |
730 | 733 | then { | |
731 | - | let | |
732 | - | then invoke(bg, "put", nil, [AttachedPayment( | |
734 | + | let fc = if ((cT > 0)) | |
735 | + | then invoke(bg, "put", nil, [AttachedPayment(fa, cT)]) | |
733 | 736 | else nil | |
734 | - | if (( | |
737 | + | if ((fc == fc)) | |
735 | 738 | then { | |
736 | - | let fa = if (eV) | |
739 | + | let fd = if ((cU > 0)) | |
740 | + | then invoke(bg, "put", nil, [AttachedPayment(fb, cU)]) | |
741 | + | else nil | |
742 | + | if ((fd == fd)) | |
737 | 743 | then { | |
738 | - | let fb = invoke(bf, "stake", nil, [AttachedPayment(bX, cS)]) | |
739 | - | if ((fb == fb)) | |
740 | - | then nil | |
744 | + | let fe = if (eZ) | |
745 | + | then { | |
746 | + | let ff = invoke(bf, "stake", nil, [AttachedPayment(bX, cS)]) | |
747 | + | if ((ff == ff)) | |
748 | + | then nil | |
749 | + | else throw("Strict value is not equal to itself.") | |
750 | + | } | |
751 | + | else [ScriptTransfer(dz.caller, cS, bX)] | |
752 | + | let fg = di(0, 0, 0) | |
753 | + | let fh = fg._1 | |
754 | + | let cZ = fg._2 | |
755 | + | let fi = dm(dh, cZ) | |
756 | + | if ((fi == fi)) | |
757 | + | then ((co ++ fe) ++ fh) | |
741 | 758 | else throw("Strict value is not equal to itself.") | |
742 | 759 | } | |
743 | - | else [ScriptTransfer(dv.caller, cS, bX)] | |
744 | - | let fc = da(0, 0, 0) | |
745 | - | let fd = fc._1 | |
746 | - | let cZ = fc._2 | |
747 | - | let fe = di(cZ) | |
748 | - | if ((fe == fe)) | |
749 | - | then ((co ++ fa) ++ fd) | |
750 | 760 | else throw("Strict value is not equal to itself.") | |
751 | 761 | } | |
752 | 762 | else throw("Strict value is not equal to itself.") | |
753 | 763 | } | |
754 | 764 | else throw("Strict value is not equal to itself.") | |
755 | 765 | } | |
756 | 766 | else throw("Strict value is not equal to itself.") | |
757 | 767 | } | |
758 | 768 | else throw("Strict value is not equal to itself.") | |
759 | 769 | } | |
760 | 770 | ||
761 | 771 | ||
762 | 772 | ||
763 | - | @Callable( | |
764 | - | func putForFree ( | |
773 | + | @Callable(dz) | |
774 | + | func putForFree (fj) = if ((0 > fj)) | |
765 | 775 | then throw("Invalid value passed") | |
766 | 776 | else { | |
767 | - | let dB = dy(dv, ff, false) | |
768 | - | let co = dB._9 | |
769 | - | let fg = da(0, 0, 0) | |
770 | - | let fd = fg._1 | |
771 | - | let cZ = fg._2 | |
772 | - | let fe = di(cZ) | |
773 | - | if ((fe == fe)) | |
774 | - | then (co ++ fd) | |
777 | + | let dF = dC(dz, fj, false) | |
778 | + | let co = dF._9 | |
779 | + | let dD = toBigInt(value(dz.payments[0]).amount) | |
780 | + | let dE = toBigInt(value(dz.payments[1]).amount) | |
781 | + | let dh = da(dD, dE, toBigInt(0)) | |
782 | + | if ((dh == dh)) | |
783 | + | then { | |
784 | + | let fk = di(0, 0, 0) | |
785 | + | let fh = fk._1 | |
786 | + | let cZ = fk._2 | |
787 | + | let fi = dm(dh, cZ) | |
788 | + | if ((fi == fi)) | |
789 | + | then (co ++ fh) | |
790 | + | else throw("Strict value is not equal to itself.") | |
791 | + | } | |
775 | 792 | else throw("Strict value is not equal to itself.") | |
776 | 793 | } | |
777 | 794 | ||
778 | 795 | ||
779 | 796 | ||
780 | - | @Callable( | |
781 | - | func putOneTkn ( | |
782 | - | let | |
783 | - | let | |
784 | - | if ($isInstanceOf( | |
785 | - | then | |
786 | - | else throw(($getType( | |
797 | + | @Callable(dz) | |
798 | + | func putOneTkn (fl,fm) = { | |
799 | + | let fn = { | |
800 | + | let fo = invoke(aJ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
801 | + | if ($isInstanceOf(fo, "Boolean")) | |
802 | + | then fo | |
803 | + | else throw(($getType(fo) + " couldn't be cast to Boolean")) | |
787 | 804 | } | |
788 | - | let | |
805 | + | let fp = if (if (if (aL()) | |
789 | 806 | then true | |
790 | 807 | else (aY == l)) | |
791 | 808 | then true | |
792 | 809 | else (aY == n)) | |
793 | 810 | then true | |
794 | - | else | |
795 | - | let | |
811 | + | else fn | |
812 | + | let ev = [if (if (!(fp)) | |
796 | 813 | then true | |
797 | - | else | |
814 | + | else eP(dz)) | |
798 | 815 | then true | |
799 | - | else aG("put operation is blocked by admin"), if ((size( | |
816 | + | else aG("put operation is blocked by admin"), if ((size(dz.payments) == 1)) | |
800 | 817 | then true | |
801 | 818 | else aG("exactly 1 payment are expected")] | |
802 | - | if (( | |
819 | + | if ((ev == ev)) | |
803 | 820 | then { | |
804 | - | let fm = dv.payments[0] | |
805 | - | let dM = fm.assetId | |
806 | - | let dL = fm.amount | |
807 | - | let X = dv.caller | |
808 | - | let Y = dv.transactionId | |
809 | - | let fn = dK(dL, dM, X, Y) | |
810 | - | if ((fn == fn)) | |
821 | + | let fq = dz.payments[0] | |
822 | + | let dQ = fq.assetId | |
823 | + | let dP = fq.amount | |
824 | + | let dh = if ((dQ == ba)) | |
825 | + | then da(toBigInt(dP), toBigInt(0), toBigInt(0)) | |
826 | + | else if ((dQ == bb)) | |
827 | + | then da(toBigInt(0), toBigInt(dP), toBigInt(0)) | |
828 | + | else aG("payment asset is not supported") | |
829 | + | let X = dz.caller | |
830 | + | let Y = dz.transactionId | |
831 | + | let fr = dO(dP, dQ, X, Y) | |
832 | + | if ((fr == fr)) | |
811 | 833 | then { | |
812 | - | let | |
813 | - | let | |
814 | - | let | |
815 | - | let cV = | |
816 | - | let | |
817 | - | let | |
818 | - | then ( | |
834 | + | let dU = fr._5 | |
835 | + | let fs = fr._4 | |
836 | + | let dN = fr._3 | |
837 | + | let cV = fr._2 | |
838 | + | let ft = fr._1 | |
839 | + | let fu = if (if ((fl > 0)) | |
840 | + | then (fl > ft) | |
819 | 841 | else false) | |
820 | - | then aG(makeString(["amount to receive is less than ", toString( | |
821 | - | else | |
822 | - | let | |
823 | - | if (( | |
842 | + | then aG(makeString(["amount to receive is less than ", toString(fl)], "")) | |
843 | + | else ft | |
844 | + | let dI = dG(fu) | |
845 | + | if ((dI == dI)) | |
824 | 846 | then { | |
825 | - | let | |
847 | + | let fe = if (fm) | |
826 | 848 | then { | |
827 | - | let | |
828 | - | if (( | |
849 | + | let fv = invoke(bf, "stake", nil, [AttachedPayment(aZ, fu)]) | |
850 | + | if ((fv == fv)) | |
829 | 851 | then nil | |
830 | 852 | else throw("Strict value is not equal to itself.") | |
831 | 853 | } | |
832 | - | else [ScriptTransfer( | |
833 | - | let | |
834 | - | then [ScriptTransfer(aK, | |
854 | + | else [ScriptTransfer(dz.caller, fu, aZ)] | |
855 | + | let fw = if ((dN > 0)) | |
856 | + | then [ScriptTransfer(aK, dN, dQ)] | |
835 | 857 | else nil | |
836 | - | let | |
858 | + | let fx = if ((this == aK)) | |
837 | 859 | then $Tuple2(0, 0) | |
838 | - | else if ( | |
839 | - | then $Tuple2(-( | |
840 | - | else $Tuple2(0, -( | |
841 | - | let | |
842 | - | let | |
843 | - | let | |
844 | - | let | |
845 | - | let cZ = | |
846 | - | let | |
847 | - | if (( | |
848 | - | then $Tuple2((((cV ++ | |
860 | + | else if (dU) | |
861 | + | then $Tuple2(-(dN), 0) | |
862 | + | else $Tuple2(0, -(dN)) | |
863 | + | let dj = fx._1 | |
864 | + | let dk = fx._2 | |
865 | + | let fy = di(dj, dk, 0) | |
866 | + | let fh = fy._1 | |
867 | + | let cZ = fy._2 | |
868 | + | let fi = dm(dh, cZ) | |
869 | + | if ((fi == fi)) | |
870 | + | then $Tuple2((((cV ++ fe) ++ fw) ++ fh), fu) | |
849 | 871 | else throw("Strict value is not equal to itself.") | |
850 | 872 | } | |
851 | 873 | else throw("Strict value is not equal to itself.") | |
852 | 874 | } | |
853 | 875 | else throw("Strict value is not equal to itself.") | |
854 | 876 | } | |
855 | 877 | else throw("Strict value is not equal to itself.") | |
856 | 878 | } | |
857 | 879 | ||
858 | 880 | ||
859 | 881 | ||
860 | - | @Callable( | |
861 | - | func putOneTknREADONLY ( | |
862 | - | let | |
863 | - | let | |
864 | - | let cV = | |
865 | - | let | |
866 | - | let | |
867 | - | let | |
868 | - | $Tuple2(nil, $Tuple3( | |
882 | + | @Callable(dz) | |
883 | + | func putOneTknREADONLY (dQ,dP) = { | |
884 | + | let fz = dO(dP, aQ(dQ), unit, unit) | |
885 | + | let ft = fz._1 | |
886 | + | let cV = fz._2 | |
887 | + | let dN = fz._3 | |
888 | + | let fs = fz._4 | |
889 | + | let dU = fz._5 | |
890 | + | $Tuple2(nil, $Tuple3(ft, dN, fs)) | |
869 | 891 | } | |
870 | 892 | ||
871 | 893 | ||
872 | 894 | ||
873 | - | @Callable( | |
874 | - | func getOneTkn ( | |
875 | - | let | |
876 | - | let | |
877 | - | if ($isInstanceOf( | |
878 | - | then | |
879 | - | else throw(($getType( | |
895 | + | @Callable(dz) | |
896 | + | func getOneTkn (fA,fl) = { | |
897 | + | let fn = { | |
898 | + | let fo = invoke(aJ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
899 | + | if ($isInstanceOf(fo, "Boolean")) | |
900 | + | then fo | |
901 | + | else throw(($getType(fo) + " couldn't be cast to Boolean")) | |
880 | 902 | } | |
881 | - | let | |
903 | + | let fB = if (if (aL()) | |
882 | 904 | then true | |
883 | 905 | else (aY == n)) | |
884 | 906 | then true | |
885 | - | else | |
886 | - | let | |
907 | + | else fn | |
908 | + | let ev = [if (if (!(fB)) | |
887 | 909 | then true | |
888 | - | else | |
910 | + | else eP(dz)) | |
889 | 911 | then true | |
890 | - | else aG("get operation is blocked by admin"), if ((size( | |
912 | + | else aG("get operation is blocked by admin"), if ((size(dz.payments) == 1)) | |
891 | 913 | then true | |
892 | 914 | else aG("exactly 1 payment are expected")] | |
893 | - | if (( | |
915 | + | if ((ev == ev)) | |
894 | 916 | then { | |
895 | - | let eq = aQ(fw) | |
896 | - | let fm = dv.payments[0] | |
897 | - | let dM = fm.assetId | |
898 | - | let dY = fm.amount | |
899 | - | let X = dv.caller | |
900 | - | let Y = dv.transactionId | |
901 | - | let fy = ep(eq, dY, dM, X, Y) | |
902 | - | if ((fy == fy)) | |
917 | + | let eu = aQ(fA) | |
918 | + | let fq = dz.payments[0] | |
919 | + | let dQ = fq.assetId | |
920 | + | let ec = fq.amount | |
921 | + | let dh = da(toBigInt(0), toBigInt(0), toBigInt(ec)) | |
922 | + | let X = dz.caller | |
923 | + | let Y = dz.transactionId | |
924 | + | let fC = et(eu, ec, dQ, X, Y) | |
925 | + | if ((fC == fC)) | |
903 | 926 | then { | |
904 | - | let | |
905 | - | let | |
906 | - | let | |
907 | - | let cV = | |
908 | - | let | |
909 | - | let | |
910 | - | then ( | |
927 | + | let ew = fC._5 | |
928 | + | let fs = fC._4 | |
929 | + | let dN = fC._3 | |
930 | + | let cV = fC._2 | |
931 | + | let fD = fC._1 | |
932 | + | let dH = if (if ((fl > 0)) | |
933 | + | then (fl > fD) | |
911 | 934 | else false) | |
912 | - | then aG(makeString(["amount to receive is less than ", toString( | |
913 | - | else | |
914 | - | let | |
915 | - | if (( | |
935 | + | then aG(makeString(["amount to receive is less than ", toString(fl)], "")) | |
936 | + | else fD | |
937 | + | let fE = invoke(aJ, "burn", [ec], [AttachedPayment(dQ, ec)]) | |
938 | + | if ((fE == fE)) | |
916 | 939 | then { | |
917 | - | let | |
918 | - | let | |
919 | - | then [ScriptTransfer(aK, | |
940 | + | let fF = [ScriptTransfer(X, dH, eu)] | |
941 | + | let fw = if ((dN > 0)) | |
942 | + | then [ScriptTransfer(aK, dN, eu)] | |
920 | 943 | else nil | |
921 | - | let | |
922 | - | let | |
944 | + | let fG = { | |
945 | + | let fH = if ((this == aK)) | |
923 | 946 | then 0 | |
924 | - | else | |
925 | - | if ( | |
926 | - | then $Tuple2(-(( | |
927 | - | else $Tuple2(0, -(( | |
947 | + | else dN | |
948 | + | if (ew) | |
949 | + | then $Tuple2(-((dH + fH)), 0) | |
950 | + | else $Tuple2(0, -((dH + fH))) | |
928 | 951 | } | |
929 | - | let | |
930 | - | let | |
931 | - | let | |
932 | - | let | |
933 | - | let cZ = | |
934 | - | let | |
935 | - | if (( | |
936 | - | then $Tuple2((((cV ++ | |
952 | + | let dj = fG._1 | |
953 | + | let dk = fG._2 | |
954 | + | let fI = di(dj, dk, 0) | |
955 | + | let fh = fI._1 | |
956 | + | let cZ = fI._2 | |
957 | + | let fi = dm(dh, cZ) | |
958 | + | if ((fi == fi)) | |
959 | + | then $Tuple2((((cV ++ fF) ++ fw) ++ fh), dH) | |
937 | 960 | else throw("Strict value is not equal to itself.") | |
938 | 961 | } | |
939 | 962 | else throw("Strict value is not equal to itself.") | |
940 | 963 | } | |
941 | 964 | else throw("Strict value is not equal to itself.") | |
942 | 965 | } | |
943 | 966 | else throw("Strict value is not equal to itself.") | |
944 | 967 | } | |
945 | 968 | ||
946 | 969 | ||
947 | 970 | ||
948 | - | @Callable( | |
949 | - | func getOneTknREADONLY ( | |
950 | - | let | |
951 | - | let | |
952 | - | let cV = | |
953 | - | let | |
954 | - | let | |
955 | - | let | |
956 | - | $Tuple2(nil, $Tuple3( | |
971 | + | @Callable(dz) | |
972 | + | func getOneTknREADONLY (eu,ec) = { | |
973 | + | let fJ = et(aQ(eu), ec, aZ, unit, unit) | |
974 | + | let fD = fJ._1 | |
975 | + | let cV = fJ._2 | |
976 | + | let dN = fJ._3 | |
977 | + | let fs = fJ._4 | |
978 | + | let ew = fJ._5 | |
979 | + | $Tuple2(nil, $Tuple3(fD, dN, fs)) | |
957 | 980 | } | |
958 | 981 | ||
959 | 982 | ||
960 | 983 | ||
961 | - | @Callable( | |
962 | - | func unstakeAndGetOneTkn ( | |
963 | - | let | |
964 | - | let | |
965 | - | if ($isInstanceOf( | |
966 | - | then | |
967 | - | else throw(($getType( | |
984 | + | @Callable(dz) | |
985 | + | func unstakeAndGetOneTkn (fK,fA,fl) = { | |
986 | + | let fn = { | |
987 | + | let fo = invoke(aJ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
988 | + | if ($isInstanceOf(fo, "Boolean")) | |
989 | + | then fo | |
990 | + | else throw(($getType(fo) + " couldn't be cast to Boolean")) | |
968 | 991 | } | |
969 | - | let | |
992 | + | let fB = if (if (aL()) | |
970 | 993 | then true | |
971 | 994 | else (aY == n)) | |
972 | 995 | then true | |
973 | - | else | |
974 | - | let | |
996 | + | else fn | |
997 | + | let ev = [if (if (!(fB)) | |
975 | 998 | then true | |
976 | - | else | |
999 | + | else eP(dz)) | |
977 | 1000 | then true | |
978 | - | else aG("get operation is blocked by admin"), if ((size( | |
1001 | + | else aG("get operation is blocked by admin"), if ((size(dz.payments) == 0)) | |
979 | 1002 | then true | |
980 | 1003 | else aG("no payments are expected")] | |
981 | - | if (( | |
1004 | + | if ((ev == ev)) | |
982 | 1005 | then { | |
983 | - | let eq = aQ(fw) | |
984 | - | let X = dv.caller | |
985 | - | let Y = dv.transactionId | |
986 | - | let fH = invoke(bf, "unstake", [toBase58String(aZ), fG], nil) | |
987 | - | if ((fH == fH)) | |
1006 | + | let eu = aQ(fA) | |
1007 | + | let X = dz.caller | |
1008 | + | let Y = dz.transactionId | |
1009 | + | let dh = da(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1010 | + | let fL = invoke(bf, "unstake", [toBase58String(aZ), fK], nil) | |
1011 | + | if ((fL == fL)) | |
988 | 1012 | then { | |
989 | - | let | |
990 | - | if (( | |
1013 | + | let fM = et(eu, fK, aZ, X, Y) | |
1014 | + | if ((fM == fM)) | |
991 | 1015 | then { | |
992 | - | let | |
993 | - | let | |
994 | - | let | |
995 | - | let cV = | |
996 | - | let | |
997 | - | let | |
998 | - | then ( | |
1016 | + | let ew = fM._5 | |
1017 | + | let fs = fM._4 | |
1018 | + | let dN = fM._3 | |
1019 | + | let cV = fM._2 | |
1020 | + | let fD = fM._1 | |
1021 | + | let dH = if (if ((fl > 0)) | |
1022 | + | then (fl > fD) | |
999 | 1023 | else false) | |
1000 | - | then aG(makeString(["amount to receive is less than ", toString( | |
1001 | - | else | |
1002 | - | let | |
1003 | - | if (( | |
1024 | + | then aG(makeString(["amount to receive is less than ", toString(fl)], "")) | |
1025 | + | else fD | |
1026 | + | let fE = invoke(aJ, "burn", [fK], [AttachedPayment(aZ, fK)]) | |
1027 | + | if ((fE == fE)) | |
1004 | 1028 | then { | |
1005 | - | let | |
1006 | - | let | |
1007 | - | then [ScriptTransfer(aK, | |
1029 | + | let fF = [ScriptTransfer(dz.caller, dH, eu)] | |
1030 | + | let fw = if ((dN > 0)) | |
1031 | + | then [ScriptTransfer(aK, dN, eu)] | |
1008 | 1032 | else nil | |
1009 | - | let | |
1010 | - | let | |
1033 | + | let fN = { | |
1034 | + | let fH = if ((this == aK)) | |
1011 | 1035 | then 0 | |
1012 | - | else | |
1013 | - | if ( | |
1014 | - | then $Tuple2(-(( | |
1015 | - | else $Tuple2(0, -(( | |
1036 | + | else dN | |
1037 | + | if (ew) | |
1038 | + | then $Tuple2(-((dH + fH)), 0) | |
1039 | + | else $Tuple2(0, -((dH + fH))) | |
1016 | 1040 | } | |
1017 | - | let | |
1018 | - | let | |
1019 | - | let | |
1020 | - | let | |
1021 | - | let cZ = | |
1022 | - | let | |
1023 | - | if (( | |
1024 | - | then $Tuple2((((cV ++ | |
1041 | + | let dj = fN._1 | |
1042 | + | let dk = fN._2 | |
1043 | + | let fO = di(dj, dk, 0) | |
1044 | + | let fh = fO._1 | |
1045 | + | let cZ = fO._2 | |
1046 | + | let fi = dm(dh, cZ) | |
1047 | + | if ((fi == fi)) | |
1048 | + | then $Tuple2((((cV ++ fF) ++ fw) ++ fh), dH) | |
1025 | 1049 | else throw("Strict value is not equal to itself.") | |
1026 | 1050 | } | |
1027 | 1051 | else throw("Strict value is not equal to itself.") | |
1028 | 1052 | } | |
1029 | 1053 | else throw("Strict value is not equal to itself.") | |
1030 | 1054 | } | |
1031 | 1055 | else throw("Strict value is not equal to itself.") | |
1032 | 1056 | } | |
1033 | 1057 | else throw("Strict value is not equal to itself.") | |
1034 | 1058 | } | |
1035 | 1059 | ||
1036 | 1060 | ||
1037 | 1061 | ||
1038 | - | @Callable( | |
1062 | + | @Callable(dz) | |
1039 | 1063 | func get () = { | |
1040 | - | let cG = | |
1041 | - | let | |
1064 | + | let cG = dy(dz) | |
1065 | + | let fP = cG._1 | |
1042 | 1066 | let cn = cG._2 | |
1043 | - | let | |
1067 | + | let dB = cG._3 | |
1044 | 1068 | let bV = cG._4 | |
1045 | 1069 | let co = cG._5 | |
1046 | - | let fM = invoke(aJ, "burn", [dx], [AttachedPayment(bV, dx)]) | |
1047 | - | if ((fM == fM)) | |
1070 | + | let dh = da(toBigInt(0), toBigInt(0), toBigInt(dB)) | |
1071 | + | let fQ = invoke(aJ, "burn", [dB], [AttachedPayment(bV, dB)]) | |
1072 | + | if ((fQ == fQ)) | |
1048 | 1073 | then { | |
1049 | - | let | |
1050 | - | let | |
1051 | - | let cZ = | |
1052 | - | let | |
1053 | - | if (( | |
1054 | - | then (co ++ | |
1074 | + | let fR = di(-(fP), -(cn), 0) | |
1075 | + | let fh = fR._1 | |
1076 | + | let cZ = fR._2 | |
1077 | + | let fi = dm(dh, cZ) | |
1078 | + | if ((fi == fi)) | |
1079 | + | then (co ++ fh) | |
1055 | 1080 | else throw("Strict value is not equal to itself.") | |
1056 | 1081 | } | |
1057 | 1082 | else throw("Strict value is not equal to itself.") | |
1058 | 1083 | } | |
1059 | 1084 | ||
1060 | 1085 | ||
1061 | 1086 | ||
1062 | - | @Callable( | |
1063 | - | func getNoLess ( | |
1064 | - | let cG = | |
1087 | + | @Callable(dz) | |
1088 | + | func getNoLess (fS,fT) = { | |
1089 | + | let cG = dy(dz) | |
1065 | 1090 | let cm = cG._1 | |
1066 | 1091 | let cn = cG._2 | |
1067 | - | let | |
1092 | + | let dB = cG._3 | |
1068 | 1093 | let bV = cG._4 | |
1069 | 1094 | let co = cG._5 | |
1070 | - | if (( | |
1071 | - | then throw(((("noLessThenAmtAsset failed: " + toString(cm)) + " < ") + toString( | |
1072 | - | else if (( | |
1073 | - | then throw(((("noLessThenPriceAsset failed: " + toString(cn)) + " < ") + toString( | |
1095 | + | if ((fS > cm)) | |
1096 | + | then throw(((("noLessThenAmtAsset failed: " + toString(cm)) + " < ") + toString(fS))) | |
1097 | + | else if ((fT > cn)) | |
1098 | + | then throw(((("noLessThenPriceAsset failed: " + toString(cn)) + " < ") + toString(fT))) | |
1074 | 1099 | else { | |
1075 | - | let fM = invoke(aJ, "burn", [dx], [AttachedPayment(bV, dx)]) | |
1076 | - | if ((fM == fM)) | |
1100 | + | let dh = da(toBigInt(0), toBigInt(0), toBigInt(dB)) | |
1101 | + | let fQ = invoke(aJ, "burn", [dB], [AttachedPayment(bV, dB)]) | |
1102 | + | if ((fQ == fQ)) | |
1077 | 1103 | then { | |
1078 | - | let | |
1079 | - | let | |
1080 | - | let cZ = | |
1081 | - | let | |
1082 | - | if (( | |
1083 | - | then (co ++ | |
1104 | + | let fU = di(-(cm), -(cn), 0) | |
1105 | + | let fh = fU._1 | |
1106 | + | let cZ = fU._2 | |
1107 | + | let fi = dm(dh, cZ) | |
1108 | + | if ((fi == fi)) | |
1109 | + | then (co ++ fh) | |
1084 | 1110 | else throw("Strict value is not equal to itself.") | |
1085 | 1111 | } | |
1086 | 1112 | else throw("Strict value is not equal to itself.") | |
1087 | 1113 | } | |
1088 | 1114 | } | |
1089 | 1115 | ||
1090 | 1116 | ||
1091 | 1117 | ||
1092 | - | @Callable( | |
1093 | - | func unstakeAndGet ( | |
1094 | - | let | |
1118 | + | @Callable(dz) | |
1119 | + | func unstakeAndGet (dH) = { | |
1120 | + | let fV = if ((size(dz.payments) != 0)) | |
1095 | 1121 | then throw("No payments are expected") | |
1096 | 1122 | else true | |
1097 | - | if (( | |
1123 | + | if ((fV == fV)) | |
1098 | 1124 | then { | |
1099 | 1125 | let bK = aN() | |
1100 | 1126 | let bX = fromBase58String(bK[q]) | |
1101 | - | let fH = invoke(bf, "unstake", [toBase58String(bX), dD], nil) | |
1102 | - | if ((fH == fH)) | |
1127 | + | let dh = da(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1128 | + | let fL = invoke(bf, "unstake", [toBase58String(bX), dH], nil) | |
1129 | + | if ((fL == fL)) | |
1103 | 1130 | then { | |
1104 | - | let cG = bT(toBase58String( | |
1131 | + | let cG = bT(toBase58String(dz.transactionId), toBase58String(bX), dH, dz.caller) | |
1105 | 1132 | let cm = cG._1 | |
1106 | 1133 | let cn = cG._2 | |
1107 | 1134 | let ca = parseIntValue(cG._9) | |
1108 | 1135 | let co = cG._10 | |
1109 | - | let | |
1136 | + | let fW = if (if (aL()) | |
1110 | 1137 | then true | |
1111 | 1138 | else (ca == n)) | |
1112 | 1139 | then throw(("Get operation is blocked by admin. Status = " + toString(ca))) | |
1113 | 1140 | else true | |
1114 | - | if (( | |
1141 | + | if ((fW == fW)) | |
1115 | 1142 | then { | |
1116 | - | let | |
1117 | - | if (( | |
1143 | + | let fQ = invoke(aJ, "burn", [dH], [AttachedPayment(bX, dH)]) | |
1144 | + | if ((fQ == fQ)) | |
1118 | 1145 | then { | |
1119 | - | let | |
1120 | - | let | |
1121 | - | let cZ = | |
1122 | - | let | |
1123 | - | if (( | |
1124 | - | then (co ++ | |
1146 | + | let fX = di(-(cm), -(cn), 0) | |
1147 | + | let fh = fX._1 | |
1148 | + | let cZ = fX._2 | |
1149 | + | let fi = dm(dh, cZ) | |
1150 | + | if ((fi == fi)) | |
1151 | + | then (co ++ fh) | |
1125 | 1152 | else throw("Strict value is not equal to itself.") | |
1126 | 1153 | } | |
1127 | 1154 | else throw("Strict value is not equal to itself.") | |
1128 | 1155 | } | |
1129 | 1156 | else throw("Strict value is not equal to itself.") | |
1130 | 1157 | } | |
1131 | 1158 | else throw("Strict value is not equal to itself.") | |
1132 | 1159 | } | |
1133 | 1160 | else throw("Strict value is not equal to itself.") | |
1134 | 1161 | } | |
1135 | 1162 | ||
1136 | 1163 | ||
1137 | 1164 | ||
1138 | - | @Callable( | |
1139 | - | func unstakeAndGetNoLess ( | |
1140 | - | let | |
1165 | + | @Callable(dz) | |
1166 | + | func unstakeAndGetNoLess (fK,fY,fT) = { | |
1167 | + | let fB = if (aL()) | |
1141 | 1168 | then true | |
1142 | 1169 | else (aY == n) | |
1143 | - | let | |
1170 | + | let ev = [if (!(fB)) | |
1144 | 1171 | then true | |
1145 | - | else throw("get operation is blocked by admin"), if ((size( | |
1172 | + | else throw("get operation is blocked by admin"), if ((size(dz.payments) == 0)) | |
1146 | 1173 | then true | |
1147 | 1174 | else throw("no payments are expected")] | |
1148 | - | if (( | |
1175 | + | if ((ev == ev)) | |
1149 | 1176 | then { | |
1150 | - | let fH = invoke(bf, "unstake", [toBase58String(aZ), fG], nil) | |
1151 | - | if ((fH == fH)) | |
1177 | + | let dh = da(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1178 | + | let fL = invoke(bf, "unstake", [toBase58String(aZ), fK], nil) | |
1179 | + | if ((fL == fL)) | |
1152 | 1180 | then { | |
1153 | - | let cG = bT(toBase58String( | |
1181 | + | let cG = bT(toBase58String(dz.transactionId), toBase58String(aZ), fK, dz.caller) | |
1154 | 1182 | let cm = cG._1 | |
1155 | 1183 | let cn = cG._2 | |
1156 | 1184 | let co = cG._10 | |
1157 | - | let | |
1185 | + | let fZ = [if ((cm >= fY)) | |
1158 | 1186 | then true | |
1159 | - | else throw(makeString(["amount asset amount to receive is less than ", toString( | |
1187 | + | else throw(makeString(["amount asset amount to receive is less than ", toString(fY)], "")), if ((cn >= fT)) | |
1160 | 1188 | then true | |
1161 | - | else throw(makeString(["price asset amount to receive is less than ", toString( | |
1162 | - | if (( | |
1189 | + | else throw(makeString(["price asset amount to receive is less than ", toString(fT)], ""))] | |
1190 | + | if ((fZ == fZ)) | |
1163 | 1191 | then { | |
1164 | - | let | |
1165 | - | if (( | |
1192 | + | let fQ = invoke(aJ, "burn", [fK], [AttachedPayment(aZ, fK)]) | |
1193 | + | if ((fQ == fQ)) | |
1166 | 1194 | then { | |
1167 | - | let | |
1168 | - | let | |
1169 | - | let cZ = | |
1170 | - | let | |
1171 | - | if (( | |
1172 | - | then (co ++ | |
1195 | + | let ga = di(-(cm), -(cn), 0) | |
1196 | + | let fh = ga._1 | |
1197 | + | let cZ = ga._2 | |
1198 | + | let fi = dm(dh, cZ) | |
1199 | + | if ((fi == fi)) | |
1200 | + | then (co ++ fh) | |
1173 | 1201 | else throw("Strict value is not equal to itself.") | |
1174 | 1202 | } | |
1175 | 1203 | else throw("Strict value is not equal to itself.") | |
1176 | 1204 | } | |
1177 | 1205 | else throw("Strict value is not equal to itself.") | |
1178 | 1206 | } | |
1179 | 1207 | else throw("Strict value is not equal to itself.") | |
1180 | 1208 | } | |
1181 | 1209 | else throw("Strict value is not equal to itself.") | |
1182 | 1210 | } | |
1183 | 1211 | ||
1184 | 1212 | ||
1185 | 1213 | ||
1186 | - | @Callable( | |
1187 | - | func activate ( | |
1214 | + | @Callable(dz) | |
1215 | + | func activate (gb,gc) = if ((toString(dz.caller) != toString(aJ))) | |
1188 | 1216 | then throw("permissions denied") | |
1189 | - | else $Tuple2([StringEntry(aa(), | |
1217 | + | else $Tuple2([StringEntry(aa(), gb), StringEntry(ab(), gc)], "success") | |
1190 | 1218 | ||
1191 | 1219 | ||
1192 | 1220 | ||
1193 | - | @Callable( | |
1221 | + | @Callable(dz) | |
1194 | 1222 | func refreshKLp () = { | |
1195 | - | let | |
1196 | - | let | |
1223 | + | let gd = valueOrElse(getInteger(ag), 0) | |
1224 | + | let ge = if (((height - gd) >= aj)) | |
1197 | 1225 | then unit | |
1198 | 1226 | else aG(makeString([toString(aj), " blocks have not passed since the previous call"], "")) | |
1199 | - | if (( | |
1227 | + | if ((ge == ge)) | |
1200 | 1228 | then { | |
1201 | - | let | |
1202 | - | let | |
1203 | - | let | |
1204 | - | let cZ = | |
1205 | - | let | |
1206 | - | then | |
1229 | + | let dt = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, af), "0")), aI("invalid kLp")) | |
1230 | + | let gf = di(0, 0, 0) | |
1231 | + | let gg = gf._1 | |
1232 | + | let cZ = gf._2 | |
1233 | + | let dl = if ((dt != cZ)) | |
1234 | + | then gg | |
1207 | 1235 | else aG("nothing to refresh") | |
1208 | - | $Tuple2( | |
1236 | + | $Tuple2(dl, toString(cZ)) | |
1209 | 1237 | } | |
1210 | 1238 | else throw("Strict value is not equal to itself.") | |
1211 | 1239 | } | |
1212 | 1240 | ||
1213 | 1241 | ||
1214 | 1242 | ||
1215 | - | @Callable( | |
1243 | + | @Callable(dz) | |
1216 | 1244 | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aN()) | |
1217 | 1245 | ||
1218 | 1246 | ||
1219 | 1247 | ||
1220 | - | @Callable( | |
1248 | + | @Callable(dz) | |
1221 | 1249 | func getAccBalanceWrapperREADONLY (bx) = $Tuple2(nil, bw(bx)) | |
1222 | 1250 | ||
1223 | 1251 | ||
1224 | 1252 | ||
1225 | - | @Callable( | |
1253 | + | @Callable(dz) | |
1226 | 1254 | func calcPricesWrapperREADONLY (bE,bF,bJ) = { | |
1227 | 1255 | let bS = bI(bE, bF, bJ) | |
1228 | 1256 | $Tuple2(nil, [toString(bS[0]), toString(bS[1]), toString(bS[2])]) | |
1229 | 1257 | } | |
1230 | 1258 | ||
1231 | 1259 | ||
1232 | 1260 | ||
1233 | - | @Callable( | |
1261 | + | @Callable(dz) | |
1234 | 1262 | func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F))) | |
1235 | 1263 | ||
1236 | 1264 | ||
1237 | 1265 | ||
1238 | - | @Callable( | |
1266 | + | @Callable(dz) | |
1239 | 1267 | func fromX18WrapperREADONLY (H,I) = $Tuple2(nil, G(parseBigIntValue(H), I)) | |
1240 | 1268 | ||
1241 | 1269 | ||
1242 | 1270 | ||
1243 | - | @Callable( | |
1271 | + | @Callable(dz) | |
1244 | 1272 | func calcPriceBigIntWrapperREADONLY (bz,bA) = $Tuple2(nil, toString(by(parseBigIntValue(bz), parseBigIntValue(bA)))) | |
1245 | 1273 | ||
1246 | 1274 | ||
1247 | 1275 | ||
1248 | - | @Callable( | |
1276 | + | @Callable(dz) | |
1249 | 1277 | func estimatePutOperationWrapperREADONLY (bU,cq,cr,cs,ct,cu,X,cv,cw) = $Tuple2(nil, cp(bU, cq, cr, cs, ct, cu, X, cv, cw)) | |
1250 | 1278 | ||
1251 | 1279 | ||
1252 | 1280 | ||
1253 | - | @Callable( | |
1281 | + | @Callable(dz) | |
1254 | 1282 | func estimateGetOperationWrapperREADONLY (bU,bV,bW,X) = { | |
1255 | 1283 | let cG = bT(bU, bV, bW, addressFromStringValue(X)) | |
1256 | 1284 | $Tuple2(nil, $Tuple10(cG._1, cG._2, cG._3, cG._4, cG._5, cG._6, cG._7, toString(cG._8), cG._9, cG._10)) | |
1257 | 1285 | } | |
1258 | 1286 | ||
1259 | 1287 | ||
1260 | 1288 | ||
1261 | - | @Callable( | |
1289 | + | @Callable(dz) | |
1262 | 1290 | func statsREADONLY () = { | |
1263 | 1291 | let bK = aN() | |
1264 | 1292 | let bX = fromBase58String(bK[q]) | |
1265 | - | let | |
1266 | - | let | |
1293 | + | let gh = bK[r] | |
1294 | + | let gi = bK[s] | |
1267 | 1295 | let cz = bK[v] | |
1268 | 1296 | let cA = bK[w] | |
1269 | 1297 | let bL = parseIntValue(bK[t]) | |
1270 | 1298 | let bM = parseIntValue(bK[u]) | |
1271 | - | let | |
1272 | - | let | |
1273 | - | let | |
1274 | - | let | |
1299 | + | let gj = valueOrErrorMessage(assetInfo(bX), (("Asset " + toBase58String(bX)) + " doesn't exist")).quantity | |
1300 | + | let gk = bw(gh) | |
1301 | + | let gl = bw(gi) | |
1302 | + | let gm = if ((gj == 0)) | |
1275 | 1303 | then [e, e, e] | |
1276 | - | else bI( | |
1304 | + | else bI(gk, gl, gj) | |
1277 | 1305 | let ch = 0 | |
1278 | - | let | |
1279 | - | let | |
1280 | - | let | |
1281 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString( | |
1306 | + | let gn = G(gm[1], b) | |
1307 | + | let go = G(gm[2], b) | |
1308 | + | let gp = value(getInteger(aJ, au(toString(this)))) | |
1309 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(gk), toString(gl), toString(gj), toString(ch), toString(gn), toString(go), toString(gp)], j)) | |
1282 | 1310 | } | |
1283 | 1311 | ||
1284 | 1312 | ||
1285 | 1313 | ||
1286 | - | @Callable( | |
1314 | + | @Callable(dz) | |
1287 | 1315 | func evaluatePutByAmountAssetREADONLY (cr) = { | |
1288 | 1316 | let bK = aN() | |
1289 | 1317 | let bX = fromBase58String(bK[q]) | |
1290 | 1318 | let cx = bK[r] | |
1291 | 1319 | let bY = fromBase58String(cx) | |
1292 | 1320 | let cy = bK[s] | |
1293 | 1321 | let bZ = fromBase58String(cy) | |
1294 | 1322 | let bL = parseIntValue(bK[t]) | |
1295 | 1323 | let bM = parseIntValue(bK[u]) | |
1296 | 1324 | let ca = bK[p] | |
1297 | - | let | |
1298 | - | let | |
1299 | - | let | |
1300 | - | let bG = D( | |
1301 | - | let bH = D( | |
1302 | - | let cg = if (( | |
1325 | + | let gj = valueOrErrorMessage(assetInfo(bX), (("Asset " + toBase58String(bX)) + " doesn't exist")).quantity | |
1326 | + | let gk = bw(cx) | |
1327 | + | let gl = bw(cy) | |
1328 | + | let bG = D(gk, bL) | |
1329 | + | let bH = D(gl, bM) | |
1330 | + | let cg = if ((gj == 0)) | |
1303 | 1331 | then e | |
1304 | 1332 | else by(bH, bG) | |
1305 | 1333 | let cD = D(cr, bL) | |
1306 | 1334 | let cE = fraction(cD, cg, d) | |
1307 | 1335 | let ct = G(cE, bM) | |
1308 | - | let | |
1309 | - | let cO = | |
1310 | - | let | |
1311 | - | let cc = | |
1312 | - | let ce = | |
1313 | - | let cb = | |
1336 | + | let dF = cp("", 500000, cr, bY, ct, bZ, "", true, false) | |
1337 | + | let cO = dF._1 | |
1338 | + | let gq = dF._3 | |
1339 | + | let cc = dF._4 | |
1340 | + | let ce = dF._5 | |
1341 | + | let cb = dF._6 | |
1314 | 1342 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cO), toString(G(cg, b)), toString(cc), toString(ce), toString(cb), ca, toString(cr), toString(ct)], j)) | |
1315 | 1343 | } | |
1316 | 1344 | ||
1317 | 1345 | ||
1318 | 1346 | ||
1319 | - | @Callable( | |
1347 | + | @Callable(dz) | |
1320 | 1348 | func evaluatePutByPriceAssetREADONLY (ct) = { | |
1321 | 1349 | let bK = aN() | |
1322 | 1350 | let bX = fromBase58String(bK[q]) | |
1323 | 1351 | let cx = bK[r] | |
1324 | 1352 | let bY = fromBase58String(cx) | |
1325 | 1353 | let cy = bK[s] | |
1326 | 1354 | let bZ = fromBase58String(cy) | |
1327 | 1355 | let bL = parseIntValue(bK[t]) | |
1328 | 1356 | let bM = parseIntValue(bK[u]) | |
1329 | 1357 | let ca = bK[p] | |
1330 | - | let | |
1331 | - | let | |
1332 | - | let | |
1333 | - | let | |
1334 | - | let | |
1335 | - | let cg = if (( | |
1358 | + | let gj = valueOrErrorMessage(assetInfo(bX), (("Asset " + toBase58String(bX)) + " doesn't exist")).quantity | |
1359 | + | let gr = bw(cx) | |
1360 | + | let gs = bw(cy) | |
1361 | + | let gt = D(gr, bL) | |
1362 | + | let gu = D(gs, bM) | |
1363 | + | let cg = if ((gj == 0)) | |
1336 | 1364 | then e | |
1337 | - | else by( | |
1365 | + | else by(gu, gt) | |
1338 | 1366 | let cE = D(ct, bM) | |
1339 | 1367 | let cD = fraction(cE, d, cg) | |
1340 | 1368 | let cr = G(cD, bL) | |
1341 | - | let | |
1342 | - | let cO = | |
1343 | - | let | |
1344 | - | let cc = | |
1345 | - | let ce = | |
1346 | - | let cb = | |
1369 | + | let dF = cp("", 500000, cr, bY, ct, bZ, "", true, false) | |
1370 | + | let cO = dF._1 | |
1371 | + | let gq = dF._3 | |
1372 | + | let cc = dF._4 | |
1373 | + | let ce = dF._5 | |
1374 | + | let cb = dF._6 | |
1347 | 1375 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cO), toString(G(cg, b)), toString(cc), toString(ce), toString(cb), ca, toString(cr), toString(ct)], j)) | |
1348 | 1376 | } | |
1349 | 1377 | ||
1350 | 1378 | ||
1351 | 1379 | ||
1352 | - | @Callable( | |
1353 | - | func evaluateGetREADONLY ( | |
1354 | - | let cG = bT("", | |
1380 | + | @Callable(dz) | |
1381 | + | func evaluateGetREADONLY (gv,gw) = { | |
1382 | + | let cG = bT("", gv, gw, this) | |
1355 | 1383 | let cm = cG._1 | |
1356 | 1384 | let cn = cG._2 | |
1357 | 1385 | let cc = cG._5 | |
1358 | 1386 | let ce = cG._6 | |
1359 | 1387 | let cb = cG._7 | |
1360 | 1388 | let ch = cG._8 | |
1361 | 1389 | let ca = parseIntValue(cG._9) | |
1362 | 1390 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cm), toString(cn), toString(cc), toString(ce), toString(cb), toString(ch), toString(ca)], j)) | |
1363 | 1391 | } | |
1364 | 1392 | ||
1365 | 1393 | ||
1366 | - | @Verifier( | |
1367 | - | func | |
1368 | - | let | |
1369 | - | let | |
1370 | - | if ($isInstanceOf( | |
1394 | + | @Verifier(gx) | |
1395 | + | func gy () = { | |
1396 | + | let gz = { | |
1397 | + | let dK = eM() | |
1398 | + | if ($isInstanceOf(dK, "ByteVector")) | |
1371 | 1399 | then { | |
1372 | - | let | |
1373 | - | | |
1400 | + | let eQ = dK | |
1401 | + | eQ | |
1374 | 1402 | } | |
1375 | - | else if ($isInstanceOf( | |
1376 | - | then | |
1403 | + | else if ($isInstanceOf(dK, "Unit")) | |
1404 | + | then gx.senderPublicKey | |
1377 | 1405 | else throw("Match error") | |
1378 | 1406 | } | |
1379 | - | let | |
1380 | - | if ($isInstanceOf( | |
1407 | + | let dK = gx | |
1408 | + | if ($isInstanceOf(dK, "Order")) | |
1381 | 1409 | then { | |
1382 | - | let | |
1383 | - | let | |
1384 | - | let az = | |
1385 | - | let aA = sigVerify( | |
1386 | - | let aB = sigVerify( | |
1410 | + | let dp = dK | |
1411 | + | let gA = aM() | |
1412 | + | let az = do(dp) | |
1413 | + | let aA = sigVerify(dp.bodyBytes, dp.proofs[0], dp.senderPublicKey) | |
1414 | + | let aB = sigVerify(dp.bodyBytes, dp.proofs[1], gA) | |
1387 | 1415 | if (if (if (az) | |
1388 | 1416 | then aA | |
1389 | 1417 | else false) | |
1390 | 1418 | then aB | |
1391 | 1419 | else false) | |
1392 | 1420 | then true | |
1393 | 1421 | else ay(az, aA, aB) | |
1394 | 1422 | } | |
1395 | - | else if ($isInstanceOf( | |
1423 | + | else if ($isInstanceOf(dK, "SetScriptTransaction")) | |
1396 | 1424 | then { | |
1397 | - | let | |
1398 | - | let | |
1399 | - | let | |
1400 | - | let | |
1401 | - | if (if (( | |
1402 | - | then ( | |
1425 | + | let eN = dK | |
1426 | + | let gB = blake2b256(value(eN.script)) | |
1427 | + | let gC = fromBase64String(value(getString(aJ, aw()))) | |
1428 | + | let gD = scriptHash(this) | |
1429 | + | if (if ((gC == gB)) | |
1430 | + | then (gD != gB) | |
1403 | 1431 | else false) | |
1404 | 1432 | then true | |
1405 | - | else sigVerify( | |
1433 | + | else sigVerify(gx.bodyBytes, gx.proofs[0], gz) | |
1406 | 1434 | } | |
1407 | - | else sigVerify( | |
1435 | + | else sigVerify(gx.bodyBytes, gx.proofs[0], gz) | |
1408 | 1436 | } | |
1409 | 1437 |
github/deemru/w8io/fabc49c 352.54 ms ◑