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