tx · 8aNYCwCCkUKo2rjf5ufwSwG6eCWWj9HSFGsU4mdYdMKv 3MqXE9vrYjAGDbXPVqHEUufiqzMn9tRhdz1: -0.03300000 Waves 2022.11.30 09:50 [2339518] smart account 3MqXE9vrYjAGDbXPVqHEUufiqzMn9tRhdz1 > SELF 0.00000000 Waves
{ "type": 13, "id": "8aNYCwCCkUKo2rjf5ufwSwG6eCWWj9HSFGsU4mdYdMKv", "fee": 3300000, "feeAssetId": null, "timestamp": 1669790949859, "version": 1, "sender": "3MqXE9vrYjAGDbXPVqHEUufiqzMn9tRhdz1", "senderPublicKey": "5g8AQudVM8TuhK11MwRya5kECFAwuTLj1QBxmUdKms57", "proofs": [ "4hBSzK38hMRfbHZPzWBfko8kbb47qHKbjXYKAgzU3393zEnirr51QjqXDsFaG5uwgeCbU1NfJ9YwYzEJdfNn3jQg" ], "script": "base64:BgLYKwgCEgMKAQgSABIECgIBBBIDCgEBEgQKAgEEEgQKAggBEgQKAggBEgQKAggBEgUKAwEIARIAEgQKAgEBEgMKAQESBQoDAQEBEgQKAggIEgASABIDCgEIEgUKAwEBARIECgIBARIECgIIARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAEgMKAQESAwoBARIECgIIASIKbFBkZWNpbWFscyIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiC3dhdmVzU3RyaW5nIgNTRVAiClBvb2xBY3RpdmUiD1Bvb2xQdXREaXNhYmxlZCITUG9vbE1hdGNoZXJEaXNhYmxlZCIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyINaWR4UG9vbFN0YXR1cyIQaWR4UG9vbExQQXNzZXRJZCINaWR4QW10QXNzZXRJZCIPaWR4UHJpY2VBc3NldElkIg5pZHhBbXRBc3NldERjbSIQaWR4UHJpY2VBc3NldERjbSIOaWR4SUFtdEFzc2V0SWQiEGlkeElQcmljZUFzc2V0SWQiDWlkeExQ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QJjZQkAzAgCCQCkAwEFAmNiCQDMCAIJAKYDAQUCY2gJAMwIAgkApAMBBQJjYQUDbmlsBQFqAQJncAECZ3EABAJncgQCZEUJAQJlRwADCQABAgUCZEUCCkJ5dGVWZWN0b3IEAmVLBQJkRQUCZUsDCQABAgUCZEUCBFVuaXQIBQJncA9zZW5kZXJQdWJsaWNLZXkJAAIBAgtNYXRjaCBlcnJvcgQCZEUFAmdwAwkAAQIFAmRFAgVPcmRlcgQCZGoFAmRFBAJncwkBAmFNAAQCYXoJAQJkaQEFAmRqBAJhQQkA9AMDCAUCZGoJYm9keUJ5dGVzCQCRAwIIBQJkagZwcm9vZnMAAAgFAmRqD3NlbmRlclB1YmxpY0tleQQCYUIJAPQDAwgFAmRqCWJvZHlCeXRlcwkAkQMCCAUCZGoGcHJvb2ZzAAEFAmdzAwMDBQJhegUCYUEHBQJhQgcGCQECYXkDBQJhegUCYUEFAmFCAwkAAQIFAmRFAhRTZXRTY3JpcHRUcmFuc2FjdGlvbgQCZUgFAmRFBAJndAkA9gMBCQEFdmFsdWUBCAUCZUgGc2NyaXB0BAJndQkA2wQBCQEFdmFsdWUBCQCdCAIFAmFKCQECYXcABAJndgkA8QcBBQR0aGlzAwMJAAACBQJndQUCZ3QJAQIhPQIFAmd2BQJndAcGCQD0AwMIBQJncAlib2R5Qnl0ZXMJAJEDAggFAmdwBnByb29mcwAABQJncgkA9AMDCAUCZ3AJYm9keUJ5dGVzCQCRAwIIBQJncAZwcm9vZnMAAAUCZ3JXKual", "chainId": 84, "height": 2339518, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: F3izyKa9SXDTKQKgMrfXKGYFcXDKRLK8ZS5Ma8KcXwfA Next: DDLC5YAYTiUHZFN8v1KTem6y7J6pE46iYM7N7dSfogMY Diff:
Old | New | Differences | |
---|---|---|---|
390 | 390 | ||
391 | 391 | ||
392 | 392 | func di (dj) = { | |
393 | - | let bK = aN() | |
394 | - | let dk = bK[r] | |
395 | - | let dl = bK[s] | |
396 | - | let ca = parseIntValue(bK[p]) | |
397 | - | let bL = parseIntValue(bK[t]) | |
398 | - | let bM = parseIntValue(bK[u]) | |
399 | - | let dm = dj.amount | |
400 | - | let dn = fraction(dj.amount, dj.price, b) | |
401 | - | let do = if ((dj.orderType == Buy)) | |
402 | - | then $Tuple2(dm, -(dn)) | |
403 | - | else $Tuple2(-(dm), dn) | |
404 | - | let db = do._1 | |
405 | - | let dc = do._2 | |
393 | + | let dk = dj.amount | |
394 | + | let dl = fraction(dj.amount, dj.price, b) | |
395 | + | let dm = if ((dj.orderType == Buy)) | |
396 | + | then $Tuple2(dk, -(dl)) | |
397 | + | else $Tuple2(-(dk), dl) | |
398 | + | let db = dm._1 | |
399 | + | let dc = dm._2 | |
406 | 400 | if (if (if (aL()) | |
407 | 401 | then true | |
408 | - | else ( | |
402 | + | else (aY == m)) | |
409 | 403 | then true | |
410 | - | else ( | |
404 | + | else (aY == n)) | |
411 | 405 | then throw("Exchange operations disabled") | |
412 | - | else { | |
413 | - | let dp = aS(value(dj.assetPair.amountAsset)) | |
414 | - | let dq = aS(value(dj.assetPair.priceAsset)) | |
415 | - | if (if ((dp != dk)) | |
416 | - | then true | |
417 | - | else (dq != dl)) | |
418 | - | then throw("Wrong order assets.") | |
419 | - | else { | |
420 | - | let dr = valueOrErrorMessage(parseBigInt(valueOrErrorMessage(getString(this, af), aI("kLp is required"))), aI("invalid kLp")) | |
421 | - | let ds = da(db, dc, 0) | |
422 | - | let dt = ds._1 | |
423 | - | let du = ds._2 | |
424 | - | let dv = (du > dr) | |
425 | - | dv | |
426 | - | } | |
427 | - | } | |
406 | + | else if (if ((dj.assetPair.amountAsset != ba)) | |
407 | + | then true | |
408 | + | else (dj.assetPair.priceAsset != bb)) | |
409 | + | then throw("Wrong order assets.") | |
410 | + | else { | |
411 | + | let dn = valueOrErrorMessage(parseBigInt(valueOrErrorMessage(getString(this, af), aI("kLp is required"))), aI("invalid kLp")) | |
412 | + | let do = da(db, dc, 0) | |
413 | + | let dp = do._1 | |
414 | + | let dq = do._2 | |
415 | + | let dr = (dq > dn) | |
416 | + | dr | |
417 | + | } | |
428 | 418 | } | |
429 | 419 | ||
430 | 420 | ||
431 | - | func | |
421 | + | func ds (dt) = if ((size(dt.payments) != 1)) | |
432 | 422 | then throw("exactly 1 payment is expected") | |
433 | 423 | else { | |
434 | - | let | |
435 | - | let bV = value( | |
436 | - | let | |
437 | - | let cG = bT(toBase58String( | |
424 | + | let du = value(dt.payments[0]) | |
425 | + | let bV = value(du.assetId) | |
426 | + | let dv = du.amount | |
427 | + | let cG = bT(toBase58String(dt.transactionId), toBase58String(bV), dv, dt.caller) | |
438 | 428 | let cm = cG._1 | |
439 | 429 | let cn = cG._2 | |
440 | 430 | let ca = parseIntValue(cG._9) | |
443 | 433 | then true | |
444 | 434 | else (ca == n)) | |
445 | 435 | then throw(("Get operation is blocked by admin. Status = " + toString(ca))) | |
446 | - | else $Tuple5(cm, cn, | |
436 | + | else $Tuple5(cm, cn, dv, bV, co) | |
447 | 437 | } | |
448 | 438 | ||
449 | 439 | ||
450 | - | func | |
440 | + | func dw (dt,cq,cw) = if ((size(dt.payments) != 2)) | |
451 | 441 | then throw("exactly 2 payments are expected") | |
452 | 442 | else { | |
453 | - | let | |
454 | - | let | |
455 | - | let | |
456 | - | let ca = parseIntValue( | |
443 | + | let dx = value(dt.payments[0]) | |
444 | + | let dy = value(dt.payments[1]) | |
445 | + | let dz = cp(toBase58String(dt.transactionId), cq, dx.amount, dx.assetId, dy.amount, dy.assetId, toString(dt.caller), false, cw) | |
446 | + | let ca = parseIntValue(dz._8) | |
457 | 447 | if (if (if (aL()) | |
458 | 448 | then true | |
459 | 449 | else (ca == l)) | |
460 | 450 | then true | |
461 | 451 | else (ca == n)) | |
462 | 452 | then throw(("Put operation is blocked by admin. Status = " + toString(ca))) | |
463 | - | else | |
453 | + | else dz | |
464 | 454 | } | |
465 | 455 | ||
466 | 456 | ||
467 | - | func | |
468 | - | let | |
469 | - | if (( | |
457 | + | func dA (dB) = { | |
458 | + | let dC = invoke(aJ, "emit", [dB], nil) | |
459 | + | if ((dC == dC)) | |
470 | 460 | then { | |
471 | - | let | |
472 | - | let | |
473 | - | if ($isInstanceOf( | |
461 | + | let dD = { | |
462 | + | let dE = dC | |
463 | + | if ($isInstanceOf(dE, "Address")) | |
474 | 464 | then { | |
475 | - | let | |
476 | - | invoke( | |
465 | + | let dF = dE | |
466 | + | invoke(dF, "emit", [dB], nil) | |
477 | 467 | } | |
478 | 468 | else unit | |
479 | 469 | } | |
480 | - | if (( | |
481 | - | then | |
470 | + | if ((dD == dD)) | |
471 | + | then dB | |
482 | 472 | else throw("Strict value is not equal to itself.") | |
483 | 473 | } | |
484 | 474 | else throw("Strict value is not equal to itself.") | |
485 | 475 | } | |
486 | 476 | ||
487 | 477 | ||
488 | - | func | |
489 | - | let | |
490 | - | $Tuple2(( | |
478 | + | func dG (dB) = { | |
479 | + | let dH = fraction(dB, ae, b) | |
480 | + | $Tuple2((dB - dH), dH) | |
491 | 481 | } | |
492 | 482 | ||
493 | 483 | ||
494 | - | func | |
495 | - | let | |
496 | - | let | |
497 | - | let | |
498 | - | let | |
484 | + | func dI (dJ,dK,X,Y) = { | |
485 | + | let dL = (Y == unit) | |
486 | + | let dM = bw(aS(ba)) | |
487 | + | let dN = bw(aS(bb)) | |
488 | + | let dO = if ((dK == ba)) | |
499 | 489 | then true | |
500 | - | else if (( | |
490 | + | else if ((dK == bb)) | |
501 | 491 | then false | |
502 | 492 | else aG("invalid asset") | |
503 | - | let | |
504 | - | then $Tuple2( | |
505 | - | else if ( | |
506 | - | then $Tuple2(( | |
507 | - | else $Tuple2( | |
508 | - | let | |
509 | - | let | |
510 | - | let | |
511 | - | then $Tuple2( | |
512 | - | else $Tuple2(0, | |
513 | - | let | |
514 | - | let | |
515 | - | let | |
516 | - | let | |
517 | - | let | |
518 | - | let | |
519 | - | let | |
520 | - | let | |
521 | - | let | |
522 | - | let | |
523 | - | let | |
524 | - | let | |
525 | - | then | |
526 | - | else | |
527 | - | let | |
528 | - | let | |
529 | - | let | |
493 | + | let dP = if (dL) | |
494 | + | then $Tuple2(dM, dN) | |
495 | + | else if (dO) | |
496 | + | then $Tuple2((dM - dJ), dN) | |
497 | + | else $Tuple2(dM, (dN - dJ)) | |
498 | + | let dQ = dP._1 | |
499 | + | let dR = dP._2 | |
500 | + | let dS = if (dO) | |
501 | + | then $Tuple2(dJ, 0) | |
502 | + | else $Tuple2(0, dJ) | |
503 | + | let dT = dS._1 | |
504 | + | let dU = dS._2 | |
505 | + | let dk = dG(dT)._1 | |
506 | + | let dl = dG(dU)._1 | |
507 | + | let dV = dG(dJ) | |
508 | + | let dW = dV._1 | |
509 | + | let dH = dV._2 | |
510 | + | let dX = (dQ + dk) | |
511 | + | let dY = (dR + dl) | |
512 | + | let dZ = by(D(dY, bd), D(dX, bc)) | |
513 | + | let ea = G(dZ, b) | |
514 | + | let eb = if (dO) | |
515 | + | then dQ | |
516 | + | else dR | |
517 | + | let ec = toBigInt(eb) | |
518 | + | let ed = toBigInt(valueOrErrorMessage(assetInfo(aZ), (("asset " + toBase58String(aZ)) + " doesn't exist")).quantity) | |
519 | + | let ee = if ((ed > f)) | |
530 | 520 | then true | |
531 | 521 | else aG("initial deposit requires all coins") | |
532 | - | if (( | |
522 | + | if ((ee == ee)) | |
533 | 523 | then { | |
534 | - | let | |
535 | - | let | |
536 | - | let cV = if ( | |
524 | + | let ef = toBigInt(dW) | |
525 | + | let eg = max([0, toInt(((ed * (sqrtBigInt((d + ((ef * d) / ec)), 18, 18, DOWN) - d)) / d))]) | |
526 | + | let cV = if (dL) | |
537 | 527 | then nil | |
538 | - | else [IntegerEntry(S(), | |
539 | - | let | |
540 | - | let | |
541 | - | let | |
542 | - | let | |
543 | - | then $Tuple2( | |
544 | - | else $Tuple2( | |
545 | - | let | |
546 | - | let | |
547 | - | let | |
548 | - | fraction(( | |
528 | + | else [IntegerEntry(S(), ea), IntegerEntry(T(height, lastBlock.timestamp), ea), StringEntry(W(toString(value(X)), toBase58String(value(Y))), bh(dT, dU, eg, ea, 0, 0, height, lastBlock.timestamp, 0, 0))] | |
529 | + | let eh = by(D(dR, bd), D(dQ, bc)) | |
530 | + | let ei = G(eh, b) | |
531 | + | let ej = { | |
532 | + | let ek = if (dO) | |
533 | + | then $Tuple2(dT, dQ) | |
534 | + | else $Tuple2(dU, dR) | |
535 | + | let dB = ek._1 | |
536 | + | let el = ek._2 | |
537 | + | let em = toInt(fraction(ed, toBigInt((dB / 2)), toBigInt(el))) | |
538 | + | fraction((eg - em), b, em) | |
549 | 539 | } | |
550 | - | $Tuple5( | |
540 | + | $Tuple5(eg, cV, dH, ej, dO) | |
551 | 541 | } | |
552 | 542 | else throw("Strict value is not equal to itself.") | |
553 | 543 | } | |
554 | 544 | ||
555 | 545 | ||
556 | - | func | |
557 | - | let | |
558 | - | let | |
546 | + | func en (eo,dW,dK,X,Y) = { | |
547 | + | let dL = (Y == unit) | |
548 | + | let ep = [if ((dK == aZ)) | |
559 | 549 | then true | |
560 | 550 | else aG("invalid lp asset")] | |
561 | - | if (( | |
551 | + | if ((ep == ep)) | |
562 | 552 | then { | |
563 | - | let | |
553 | + | let eq = if ((eo == ba)) | |
564 | 554 | then true | |
565 | - | else if (( | |
555 | + | else if ((eo == bb)) | |
566 | 556 | then false | |
567 | 557 | else aG("invalid asset") | |
568 | - | let | |
558 | + | let er = if (eq) | |
569 | 559 | then toBigInt(bw(aS(ba))) | |
570 | 560 | else toBigInt(bw(aS(bb))) | |
571 | - | let | |
572 | - | let | |
573 | - | let | |
574 | - | then | |
575 | - | else | |
576 | - | let | |
577 | - | let | |
578 | - | let | |
579 | - | let | |
580 | - | let | |
581 | - | let | |
582 | - | let | |
583 | - | let | |
584 | - | then $Tuple4( | |
585 | - | else $Tuple4(0, | |
586 | - | let | |
587 | - | let | |
588 | - | let | |
589 | - | let | |
590 | - | let | |
591 | - | let | |
592 | - | let cV = if ( | |
561 | + | let es = bw(aS(ba)) | |
562 | + | let et = bw(aS(bb)) | |
563 | + | let eu = if (eq) | |
564 | + | then es | |
565 | + | else et | |
566 | + | let ev = toBigInt(eu) | |
567 | + | let ed = toBigInt(valueOrErrorMessage(assetInfo(aZ), (("asset " + toBase58String(aZ)) + " doesn't exist")).quantity) | |
568 | + | let ew = toBigInt(dW) | |
569 | + | let ex = max([0, toInt(((er * (d - pow((d - ((ew * d) / ed)), 18, h, 0, 18, DOWN))) / d))]) | |
570 | + | let ey = dG(ex) | |
571 | + | let ez = ey._1 | |
572 | + | let dH = ey._2 | |
573 | + | let eA = if (eq) | |
574 | + | then $Tuple4(ez, 0, (es - ex), et) | |
575 | + | else $Tuple4(0, ez, es, (et - ex)) | |
576 | + | let eB = eA._1 | |
577 | + | let eC = eA._2 | |
578 | + | let eD = eA._3 | |
579 | + | let eE = eA._4 | |
580 | + | let dZ = by(D(eE, bd), D(eD, bc)) | |
581 | + | let ea = G(dZ, b) | |
582 | + | let cV = if (dL) | |
593 | 583 | then nil | |
594 | - | else [StringEntry(Z(toString(value(X)), toBase58String(value(Y))), bs( | |
595 | - | let | |
596 | - | let | |
597 | - | let | |
598 | - | let | |
599 | - | fraction(( | |
584 | + | else [StringEntry(Z(toString(value(X)), toBase58String(value(Y))), bs(eB, eC, dW, ea, height, lastBlock.timestamp)), IntegerEntry(S(), ea), IntegerEntry(T(height, lastBlock.timestamp), ea)] | |
585 | + | let eh = by(D(et, bd), D(es, bc)) | |
586 | + | let ei = G(eh, b) | |
587 | + | let ej = { | |
588 | + | let eF = (toInt(fraction(er, ew, ed)) * 2) | |
589 | + | fraction((ez - eF), b, eF) | |
600 | 590 | } | |
601 | - | $Tuple5( | |
591 | + | $Tuple5(ez, cV, dH, ej, eq) | |
602 | 592 | } | |
603 | 593 | else throw("Strict value is not equal to itself.") | |
604 | 594 | } | |
605 | 595 | ||
606 | 596 | ||
607 | - | func | |
608 | - | let | |
609 | - | if ($isInstanceOf( | |
597 | + | func eG () = { | |
598 | + | let dE = getString(Q()) | |
599 | + | if ($isInstanceOf(dE, "String")) | |
610 | 600 | then { | |
611 | - | let | |
612 | - | fromBase58String( | |
601 | + | let eH = dE | |
602 | + | fromBase58String(eH) | |
613 | 603 | } | |
614 | - | else if ($isInstanceOf( | |
604 | + | else if ($isInstanceOf(dE, "Unit")) | |
615 | 605 | then unit | |
616 | 606 | else throw("Match error") | |
617 | 607 | } | |
618 | 608 | ||
619 | 609 | ||
620 | - | func | |
621 | - | let | |
622 | - | if ($isInstanceOf( | |
610 | + | func eI () = { | |
611 | + | let dE = getString(R()) | |
612 | + | if ($isInstanceOf(dE, "String")) | |
623 | 613 | then { | |
624 | - | let | |
625 | - | fromBase58String( | |
614 | + | let eH = dE | |
615 | + | fromBase58String(eH) | |
626 | 616 | } | |
627 | - | else if ($isInstanceOf( | |
617 | + | else if ($isInstanceOf(dE, "Unit")) | |
628 | 618 | then unit | |
629 | 619 | else throw("Match error") | |
630 | 620 | } | |
631 | 621 | ||
632 | 622 | ||
633 | - | func | |
634 | - | let | |
635 | - | if ($isInstanceOf( | |
623 | + | func eJ (dt) = { | |
624 | + | let dE = eG() | |
625 | + | if ($isInstanceOf(dE, "ByteVector")) | |
636 | 626 | then { | |
637 | - | let | |
638 | - | ( | |
627 | + | let eK = dE | |
628 | + | (dt.callerPublicKey == eK) | |
639 | 629 | } | |
640 | - | else if ($isInstanceOf( | |
641 | - | then ( | |
630 | + | else if ($isInstanceOf(dE, "Unit")) | |
631 | + | then (dt.caller == this) | |
642 | 632 | else throw("Match error") | |
643 | 633 | } | |
644 | 634 | ||
645 | 635 | ||
646 | - | func | |
647 | - | let | |
648 | - | let | |
649 | - | if ($isInstanceOf( | |
636 | + | func eL (dt) = { | |
637 | + | let eM = throw("Permission denied") | |
638 | + | let dE = eG() | |
639 | + | if ($isInstanceOf(dE, "ByteVector")) | |
650 | 640 | then { | |
651 | - | let | |
652 | - | if (( | |
641 | + | let eK = dE | |
642 | + | if ((dt.callerPublicKey == eK)) | |
653 | 643 | then true | |
654 | - | else | |
644 | + | else eM | |
655 | 645 | } | |
656 | - | else if ($isInstanceOf( | |
657 | - | then if (( | |
646 | + | else if ($isInstanceOf(dE, "Unit")) | |
647 | + | then if ((dt.caller == this)) | |
658 | 648 | then true | |
659 | - | else | |
649 | + | else eM | |
660 | 650 | else throw("Match error") | |
661 | 651 | } | |
662 | 652 | ||
663 | 653 | ||
664 | - | @Callable( | |
665 | - | func setManager ( | |
666 | - | let | |
667 | - | if (( | |
654 | + | @Callable(dt) | |
655 | + | func setManager (eN) = { | |
656 | + | let eO = eL(dt) | |
657 | + | if ((eO == eO)) | |
668 | 658 | then { | |
669 | - | let | |
670 | - | if (( | |
671 | - | then [StringEntry(R(), | |
659 | + | let eP = fromBase58String(eN) | |
660 | + | if ((eP == eP)) | |
661 | + | then [StringEntry(R(), eN)] | |
672 | 662 | else throw("Strict value is not equal to itself.") | |
673 | 663 | } | |
674 | 664 | else throw("Strict value is not equal to itself.") | |
676 | 666 | ||
677 | 667 | ||
678 | 668 | ||
679 | - | @Callable( | |
669 | + | @Callable(dt) | |
680 | 670 | func confirmManager () = { | |
681 | - | let | |
682 | - | let | |
671 | + | let eQ = eI() | |
672 | + | let eR = if (isDefined(eQ)) | |
683 | 673 | then true | |
684 | 674 | else throw("No pending manager") | |
685 | - | if (( | |
675 | + | if ((eR == eR)) | |
686 | 676 | then { | |
687 | - | let | |
677 | + | let eS = if ((dt.callerPublicKey == value(eQ))) | |
688 | 678 | then true | |
689 | 679 | else throw("You are not pending manager") | |
690 | - | if (( | |
691 | - | then [StringEntry(Q(), toBase58String(value( | |
680 | + | if ((eS == eS)) | |
681 | + | then [StringEntry(Q(), toBase58String(value(eQ))), DeleteEntry(R())] | |
692 | 682 | else throw("Strict value is not equal to itself.") | |
693 | 683 | } | |
694 | 684 | else throw("Strict value is not equal to itself.") | |
696 | 686 | ||
697 | 687 | ||
698 | 688 | ||
699 | - | @Callable( | |
700 | - | func put (cq, | |
689 | + | @Callable(dt) | |
690 | + | func put (cq,eT) = if ((0 > cq)) | |
701 | 691 | then throw("Invalid slippageTolerance passed") | |
702 | 692 | else { | |
703 | - | let | |
704 | - | let cS = | |
705 | - | let bX = | |
706 | - | let co = | |
707 | - | let cT = | |
708 | - | let cU = | |
709 | - | let | |
710 | - | let | |
711 | - | let | |
712 | - | if (( | |
693 | + | let dz = dw(dt, cq, true) | |
694 | + | let cS = dz._2 | |
695 | + | let bX = dz._7 | |
696 | + | let co = dz._9 | |
697 | + | let cT = dz._10 | |
698 | + | let cU = dz._11 | |
699 | + | let eU = dz._12 | |
700 | + | let eV = dz._13 | |
701 | + | let dC = invoke(aJ, "emit", [cS], nil) | |
702 | + | if ((dC == dC)) | |
713 | 703 | then { | |
714 | - | let | |
715 | - | let | |
716 | - | if ($isInstanceOf( | |
704 | + | let dD = { | |
705 | + | let dE = dC | |
706 | + | if ($isInstanceOf(dE, "Address")) | |
717 | 707 | then { | |
718 | - | let | |
719 | - | invoke( | |
708 | + | let dF = dE | |
709 | + | invoke(dF, "emit", [cS], nil) | |
720 | 710 | } | |
721 | 711 | else unit | |
722 | 712 | } | |
723 | - | if (( | |
713 | + | if ((dD == dD)) | |
724 | 714 | then { | |
725 | - | let | |
726 | - | then invoke(bg, "put", nil, [AttachedPayment( | |
715 | + | let eW = if ((cT > 0)) | |
716 | + | then invoke(bg, "put", nil, [AttachedPayment(eU, cT)]) | |
727 | 717 | else nil | |
728 | - | if (( | |
718 | + | if ((eW == eW)) | |
729 | 719 | then { | |
730 | - | let | |
731 | - | then invoke(bg, "put", nil, [AttachedPayment( | |
720 | + | let eX = if ((cU > 0)) | |
721 | + | then invoke(bg, "put", nil, [AttachedPayment(eV, cU)]) | |
732 | 722 | else nil | |
733 | - | if (( | |
723 | + | if ((eX == eX)) | |
734 | 724 | then { | |
735 | - | let | |
725 | + | let eY = if (eT) | |
736 | 726 | then { | |
737 | - | let | |
738 | - | if (( | |
727 | + | let eZ = invoke(bf, "stake", nil, [AttachedPayment(bX, cS)]) | |
728 | + | if ((eZ == eZ)) | |
739 | 729 | then nil | |
740 | 730 | else throw("Strict value is not equal to itself.") | |
741 | 731 | } | |
742 | - | else [ScriptTransfer( | |
743 | - | let | |
744 | - | let | |
745 | - | let cZ = | |
746 | - | ((co ++ | |
732 | + | else [ScriptTransfer(dt.caller, cS, bX)] | |
733 | + | let fa = da(0, 0, 0) | |
734 | + | let fb = fa._1 | |
735 | + | let cZ = fa._2 | |
736 | + | ((co ++ eY) ++ fb) | |
747 | 737 | } | |
748 | 738 | else throw("Strict value is not equal to itself.") | |
749 | 739 | } | |
756 | 746 | ||
757 | 747 | ||
758 | 748 | ||
759 | - | @Callable( | |
760 | - | func putForFree ( | |
749 | + | @Callable(dt) | |
750 | + | func putForFree (fc) = if ((0 > fc)) | |
761 | 751 | then throw("Invalid value passed") | |
762 | 752 | else { | |
763 | - | let | |
764 | - | let co = | |
765 | - | let | |
766 | - | let | |
767 | - | let cZ = | |
768 | - | (co ++ | |
753 | + | let dz = dw(dt, fc, false) | |
754 | + | let co = dz._9 | |
755 | + | let fd = da(0, 0, 0) | |
756 | + | let fb = fd._1 | |
757 | + | let cZ = fd._2 | |
758 | + | (co ++ fb) | |
769 | 759 | } | |
770 | 760 | ||
771 | 761 | ||
772 | 762 | ||
773 | - | @Callable( | |
774 | - | func putOneTkn ( | |
775 | - | let | |
776 | - | let | |
777 | - | if ($isInstanceOf( | |
778 | - | then | |
779 | - | else throw(($getType( | |
763 | + | @Callable(dt) | |
764 | + | func putOneTkn (fe,ff) = { | |
765 | + | let fg = { | |
766 | + | let fh = invoke(aJ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
767 | + | if ($isInstanceOf(fh, "Boolean")) | |
768 | + | then fh | |
769 | + | else throw(($getType(fh) + " couldn't be cast to Boolean")) | |
780 | 770 | } | |
781 | - | let | |
771 | + | let fi = if (if (if (aL()) | |
782 | 772 | then true | |
783 | 773 | else (aY == l)) | |
784 | 774 | then true | |
785 | 775 | else (aY == n)) | |
786 | 776 | then true | |
787 | - | else | |
788 | - | let | |
777 | + | else fg | |
778 | + | let ep = [if (if (!(fi)) | |
789 | 779 | then true | |
790 | - | else | |
780 | + | else eJ(dt)) | |
791 | 781 | then true | |
792 | - | else aG("put operation is blocked by admin"), if ((size( | |
782 | + | else aG("put operation is blocked by admin"), if ((size(dt.payments) == 1)) | |
793 | 783 | then true | |
794 | 784 | else aG("exactly 1 payment are expected")] | |
795 | - | if (( | |
785 | + | if ((ep == ep)) | |
796 | 786 | then { | |
797 | - | let | |
798 | - | let | |
799 | - | let | |
800 | - | let X = | |
801 | - | let Y = | |
802 | - | let | |
803 | - | if (( | |
787 | + | let fj = dt.payments[0] | |
788 | + | let dK = fj.assetId | |
789 | + | let dJ = fj.amount | |
790 | + | let X = dt.caller | |
791 | + | let Y = dt.transactionId | |
792 | + | let fk = dI(dJ, dK, X, Y) | |
793 | + | if ((fk == fk)) | |
804 | 794 | then { | |
805 | - | let | |
806 | - | let | |
807 | - | let | |
808 | - | let cV = | |
809 | - | let | |
810 | - | let | |
811 | - | then ( | |
795 | + | let dO = fk._5 | |
796 | + | let fl = fk._4 | |
797 | + | let dH = fk._3 | |
798 | + | let cV = fk._2 | |
799 | + | let fm = fk._1 | |
800 | + | let fn = if (if ((fe > 0)) | |
801 | + | then (fe > fm) | |
812 | 802 | else false) | |
813 | - | then aG(makeString(["amount to receive is less than ", toString( | |
814 | - | else | |
815 | - | let | |
816 | - | if (( | |
803 | + | then aG(makeString(["amount to receive is less than ", toString(fe)], "")) | |
804 | + | else fm | |
805 | + | let dC = dA(fn) | |
806 | + | if ((dC == dC)) | |
817 | 807 | then { | |
818 | - | let | |
808 | + | let eY = if (ff) | |
819 | 809 | then { | |
820 | - | let | |
821 | - | if (( | |
810 | + | let fo = invoke(bf, "stake", nil, [AttachedPayment(aZ, fn)]) | |
811 | + | if ((fo == fo)) | |
822 | 812 | then nil | |
823 | 813 | else throw("Strict value is not equal to itself.") | |
824 | 814 | } | |
825 | - | else [ScriptTransfer( | |
826 | - | let | |
827 | - | then [ScriptTransfer(aK, | |
815 | + | else [ScriptTransfer(dt.caller, fn, aZ)] | |
816 | + | let fp = if ((dH > 0)) | |
817 | + | then [ScriptTransfer(aK, dH, dK)] | |
828 | 818 | else nil | |
829 | - | let | |
819 | + | let fq = if ((this == aK)) | |
830 | 820 | then $Tuple2(0, 0) | |
831 | - | else if ( | |
832 | - | then $Tuple2(-( | |
833 | - | else $Tuple2(0, -( | |
834 | - | let db = | |
835 | - | let dc = | |
836 | - | let | |
837 | - | let | |
838 | - | let cZ = | |
839 | - | $Tuple2((((cV ++ | |
821 | + | else if (dO) | |
822 | + | then $Tuple2(-(dH), 0) | |
823 | + | else $Tuple2(0, -(dH)) | |
824 | + | let db = fq._1 | |
825 | + | let dc = fq._2 | |
826 | + | let fr = da(db, dc, 0) | |
827 | + | let fb = fr._1 | |
828 | + | let cZ = fr._2 | |
829 | + | $Tuple2((((cV ++ eY) ++ fp) ++ fb), fn) | |
840 | 830 | } | |
841 | 831 | else throw("Strict value is not equal to itself.") | |
842 | 832 | } | |
847 | 837 | ||
848 | 838 | ||
849 | 839 | ||
850 | - | @Callable( | |
851 | - | func putOneTknREADONLY ( | |
852 | - | let | |
853 | - | let | |
854 | - | let cV = | |
855 | - | let | |
856 | - | let | |
857 | - | let | |
858 | - | $Tuple2(nil, $Tuple3( | |
840 | + | @Callable(dt) | |
841 | + | func putOneTknREADONLY (dK,dJ) = { | |
842 | + | let fs = dI(dJ, aQ(dK), unit, unit) | |
843 | + | let fm = fs._1 | |
844 | + | let cV = fs._2 | |
845 | + | let dH = fs._3 | |
846 | + | let fl = fs._4 | |
847 | + | let dO = fs._5 | |
848 | + | $Tuple2(nil, $Tuple3(fm, dH, fl)) | |
859 | 849 | } | |
860 | 850 | ||
861 | 851 | ||
862 | 852 | ||
863 | - | @Callable( | |
864 | - | func getOneTkn ( | |
865 | - | let | |
866 | - | let | |
867 | - | if ($isInstanceOf( | |
868 | - | then | |
869 | - | else throw(($getType( | |
853 | + | @Callable(dt) | |
854 | + | func getOneTkn (ft,fe) = { | |
855 | + | let fg = { | |
856 | + | let fh = invoke(aJ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
857 | + | if ($isInstanceOf(fh, "Boolean")) | |
858 | + | then fh | |
859 | + | else throw(($getType(fh) + " couldn't be cast to Boolean")) | |
870 | 860 | } | |
871 | - | let | |
861 | + | let fu = if (if (aL()) | |
872 | 862 | then true | |
873 | 863 | else (aY == n)) | |
874 | 864 | then true | |
875 | - | else | |
876 | - | let | |
865 | + | else fg | |
866 | + | let ep = [if (if (!(fu)) | |
877 | 867 | then true | |
878 | - | else | |
868 | + | else eJ(dt)) | |
879 | 869 | then true | |
880 | - | else aG("get operation is blocked by admin"), if ((size( | |
870 | + | else aG("get operation is blocked by admin"), if ((size(dt.payments) == 1)) | |
881 | 871 | then true | |
882 | 872 | else aG("exactly 1 payment are expected")] | |
883 | - | if (( | |
873 | + | if ((ep == ep)) | |
884 | 874 | then { | |
885 | - | let | |
886 | - | let | |
887 | - | let | |
888 | - | let | |
889 | - | let X = | |
890 | - | let Y = | |
891 | - | let | |
892 | - | if (( | |
875 | + | let eo = aQ(ft) | |
876 | + | let fj = dt.payments[0] | |
877 | + | let dK = fj.assetId | |
878 | + | let dW = fj.amount | |
879 | + | let X = dt.caller | |
880 | + | let Y = dt.transactionId | |
881 | + | let fv = en(eo, dW, dK, X, Y) | |
882 | + | if ((fv == fv)) | |
893 | 883 | then { | |
894 | - | let | |
895 | - | let | |
896 | - | let | |
897 | - | let cV = | |
898 | - | let | |
899 | - | let | |
900 | - | then ( | |
884 | + | let eq = fv._5 | |
885 | + | let fl = fv._4 | |
886 | + | let dH = fv._3 | |
887 | + | let cV = fv._2 | |
888 | + | let fw = fv._1 | |
889 | + | let dB = if (if ((fe > 0)) | |
890 | + | then (fe > fw) | |
901 | 891 | else false) | |
902 | - | then aG(makeString(["amount to receive is less than ", toString( | |
903 | - | else | |
904 | - | let | |
905 | - | if (( | |
892 | + | then aG(makeString(["amount to receive is less than ", toString(fe)], "")) | |
893 | + | else fw | |
894 | + | let fx = invoke(aJ, "burn", [dW], [AttachedPayment(dK, dW)]) | |
895 | + | if ((fx == fx)) | |
906 | 896 | then { | |
907 | - | let | |
908 | - | let | |
909 | - | then [ScriptTransfer(aK, | |
897 | + | let fy = [ScriptTransfer(X, dB, eo)] | |
898 | + | let fp = if ((dH > 0)) | |
899 | + | then [ScriptTransfer(aK, dH, eo)] | |
910 | 900 | else nil | |
911 | - | let | |
912 | - | let | |
901 | + | let fz = { | |
902 | + | let fA = if ((this == aK)) | |
913 | 903 | then 0 | |
914 | - | else | |
915 | - | if ( | |
916 | - | then $Tuple2(-(( | |
917 | - | else $Tuple2(0, -(( | |
904 | + | else dH | |
905 | + | if (eq) | |
906 | + | then $Tuple2(-((dB + fA)), 0) | |
907 | + | else $Tuple2(0, -((dB + fA))) | |
918 | 908 | } | |
919 | - | let db = | |
920 | - | let dc = | |
921 | - | let | |
922 | - | let | |
923 | - | let cZ = | |
924 | - | $Tuple2((((cV ++ | |
909 | + | let db = fz._1 | |
910 | + | let dc = fz._2 | |
911 | + | let fB = da(db, dc, 0) | |
912 | + | let fb = fB._1 | |
913 | + | let cZ = fB._2 | |
914 | + | $Tuple2((((cV ++ fy) ++ fp) ++ fb), dB) | |
925 | 915 | } | |
926 | 916 | else throw("Strict value is not equal to itself.") | |
927 | 917 | } | |
932 | 922 | ||
933 | 923 | ||
934 | 924 | ||
935 | - | @Callable( | |
936 | - | func getOneTknREADONLY ( | |
937 | - | let | |
938 | - | let | |
939 | - | let cV = | |
940 | - | let | |
941 | - | let | |
942 | - | let | |
943 | - | $Tuple2(nil, $Tuple3( | |
925 | + | @Callable(dt) | |
926 | + | func getOneTknREADONLY (eo,dW) = { | |
927 | + | let fC = en(aQ(eo), dW, aZ, unit, unit) | |
928 | + | let fw = fC._1 | |
929 | + | let cV = fC._2 | |
930 | + | let dH = fC._3 | |
931 | + | let fl = fC._4 | |
932 | + | let eq = fC._5 | |
933 | + | $Tuple2(nil, $Tuple3(fw, dH, fl)) | |
944 | 934 | } | |
945 | 935 | ||
946 | 936 | ||
947 | 937 | ||
948 | - | @Callable( | |
949 | - | func unstakeAndGetOneTkn ( | |
950 | - | let | |
951 | - | let | |
952 | - | if ($isInstanceOf( | |
953 | - | then | |
954 | - | else throw(($getType( | |
938 | + | @Callable(dt) | |
939 | + | func unstakeAndGetOneTkn (fD,ft,fe) = { | |
940 | + | let fg = { | |
941 | + | let fh = invoke(aJ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
942 | + | if ($isInstanceOf(fh, "Boolean")) | |
943 | + | then fh | |
944 | + | else throw(($getType(fh) + " couldn't be cast to Boolean")) | |
955 | 945 | } | |
956 | - | let | |
946 | + | let fu = if (if (aL()) | |
957 | 947 | then true | |
958 | 948 | else (aY == n)) | |
959 | 949 | then true | |
960 | - | else | |
961 | - | let | |
950 | + | else fg | |
951 | + | let ep = [if (if (!(fu)) | |
962 | 952 | then true | |
963 | - | else | |
953 | + | else eJ(dt)) | |
964 | 954 | then true | |
965 | - | else aG("get operation is blocked by admin"), if ((size( | |
955 | + | else aG("get operation is blocked by admin"), if ((size(dt.payments) == 0)) | |
966 | 956 | then true | |
967 | 957 | else aG("no payments are expected")] | |
968 | - | if (( | |
958 | + | if ((ep == ep)) | |
969 | 959 | then { | |
970 | - | let | |
971 | - | let X = | |
972 | - | let Y = | |
973 | - | let | |
974 | - | if (( | |
960 | + | let eo = aQ(ft) | |
961 | + | let X = dt.caller | |
962 | + | let Y = dt.transactionId | |
963 | + | let fE = invoke(bf, "unstake", [toBase58String(aZ), fD], nil) | |
964 | + | if ((fE == fE)) | |
975 | 965 | then { | |
976 | - | let | |
977 | - | if (( | |
966 | + | let fF = en(eo, fD, aZ, X, Y) | |
967 | + | if ((fF == fF)) | |
978 | 968 | then { | |
979 | - | let | |
980 | - | let | |
981 | - | let | |
982 | - | let cV = | |
983 | - | let | |
984 | - | let | |
985 | - | then ( | |
969 | + | let eq = fF._5 | |
970 | + | let fl = fF._4 | |
971 | + | let dH = fF._3 | |
972 | + | let cV = fF._2 | |
973 | + | let fw = fF._1 | |
974 | + | let dB = if (if ((fe > 0)) | |
975 | + | then (fe > fw) | |
986 | 976 | else false) | |
987 | - | then aG(makeString(["amount to receive is less than ", toString( | |
988 | - | else | |
989 | - | let | |
990 | - | if (( | |
977 | + | then aG(makeString(["amount to receive is less than ", toString(fe)], "")) | |
978 | + | else fw | |
979 | + | let fx = invoke(aJ, "burn", [fD], [AttachedPayment(aZ, fD)]) | |
980 | + | if ((fx == fx)) | |
991 | 981 | then { | |
992 | - | let | |
993 | - | let | |
994 | - | then [ScriptTransfer(aK, | |
982 | + | let fy = [ScriptTransfer(dt.caller, dB, eo)] | |
983 | + | let fp = if ((dH > 0)) | |
984 | + | then [ScriptTransfer(aK, dH, eo)] | |
995 | 985 | else nil | |
996 | - | let | |
997 | - | let | |
986 | + | let fG = { | |
987 | + | let fA = if ((this == aK)) | |
998 | 988 | then 0 | |
999 | - | else | |
1000 | - | if ( | |
1001 | - | then $Tuple2(-(( | |
1002 | - | else $Tuple2(0, -(( | |
989 | + | else dH | |
990 | + | if (eq) | |
991 | + | then $Tuple2(-((dB + fA)), 0) | |
992 | + | else $Tuple2(0, -((dB + fA))) | |
1003 | 993 | } | |
1004 | - | let db = | |
1005 | - | let dc = | |
1006 | - | let | |
1007 | - | let | |
1008 | - | let cZ = | |
1009 | - | $Tuple2((((cV ++ | |
994 | + | let db = fG._1 | |
995 | + | let dc = fG._2 | |
996 | + | let fH = da(db, dc, 0) | |
997 | + | let fb = fH._1 | |
998 | + | let cZ = fH._2 | |
999 | + | $Tuple2((((cV ++ fy) ++ fp) ++ fb), dB) | |
1010 | 1000 | } | |
1011 | 1001 | else throw("Strict value is not equal to itself.") | |
1012 | 1002 | } | |
1019 | 1009 | ||
1020 | 1010 | ||
1021 | 1011 | ||
1022 | - | @Callable( | |
1012 | + | @Callable(dt) | |
1023 | 1013 | func get () = { | |
1024 | - | let cG = | |
1025 | - | let | |
1014 | + | let cG = ds(dt) | |
1015 | + | let fI = cG._1 | |
1026 | 1016 | let cn = cG._2 | |
1027 | - | let | |
1017 | + | let dv = cG._3 | |
1028 | 1018 | let bV = cG._4 | |
1029 | 1019 | let co = cG._5 | |
1030 | - | let | |
1031 | - | if (( | |
1020 | + | let fJ = invoke(aJ, "burn", [dv], [AttachedPayment(bV, dv)]) | |
1021 | + | if ((fJ == fJ)) | |
1032 | 1022 | then { | |
1033 | - | let | |
1034 | - | let | |
1035 | - | let cZ = | |
1036 | - | (co ++ | |
1023 | + | let fK = da(-(fI), -(cn), 0) | |
1024 | + | let fb = fK._1 | |
1025 | + | let cZ = fK._2 | |
1026 | + | (co ++ fb) | |
1037 | 1027 | } | |
1038 | 1028 | else throw("Strict value is not equal to itself.") | |
1039 | 1029 | } | |
1040 | 1030 | ||
1041 | 1031 | ||
1042 | 1032 | ||
1043 | - | @Callable( | |
1044 | - | func getNoLess ( | |
1045 | - | let cG = | |
1033 | + | @Callable(dt) | |
1034 | + | func getNoLess (fL,fM) = { | |
1035 | + | let cG = ds(dt) | |
1046 | 1036 | let cm = cG._1 | |
1047 | 1037 | let cn = cG._2 | |
1048 | - | let | |
1038 | + | let dv = cG._3 | |
1049 | 1039 | let bV = cG._4 | |
1050 | 1040 | let co = cG._5 | |
1051 | - | if (( | |
1052 | - | then throw(((("noLessThenAmtAsset failed: " + toString(cm)) + " < ") + toString( | |
1053 | - | else if (( | |
1054 | - | then throw(((("noLessThenPriceAsset failed: " + toString(cn)) + " < ") + toString( | |
1041 | + | if ((fL > cm)) | |
1042 | + | then throw(((("noLessThenAmtAsset failed: " + toString(cm)) + " < ") + toString(fL))) | |
1043 | + | else if ((fM > cn)) | |
1044 | + | then throw(((("noLessThenPriceAsset failed: " + toString(cn)) + " < ") + toString(fM))) | |
1055 | 1045 | else { | |
1056 | - | let | |
1057 | - | if (( | |
1046 | + | let fJ = invoke(aJ, "burn", [dv], [AttachedPayment(bV, dv)]) | |
1047 | + | if ((fJ == fJ)) | |
1058 | 1048 | then { | |
1059 | - | let | |
1060 | - | let | |
1061 | - | let cZ = | |
1062 | - | (co ++ | |
1049 | + | let fN = da(-(cm), -(cn), 0) | |
1050 | + | let fb = fN._1 | |
1051 | + | let cZ = fN._2 | |
1052 | + | (co ++ fb) | |
1063 | 1053 | } | |
1064 | 1054 | else throw("Strict value is not equal to itself.") | |
1065 | 1055 | } | |
1067 | 1057 | ||
1068 | 1058 | ||
1069 | 1059 | ||
1070 | - | @Callable( | |
1071 | - | func unstakeAndGet ( | |
1072 | - | let | |
1060 | + | @Callable(dt) | |
1061 | + | func unstakeAndGet (dB) = { | |
1062 | + | let fO = if ((size(dt.payments) != 0)) | |
1073 | 1063 | then throw("No payments are expected") | |
1074 | 1064 | else true | |
1075 | - | if (( | |
1065 | + | if ((fO == fO)) | |
1076 | 1066 | then { | |
1077 | 1067 | let bK = aN() | |
1078 | 1068 | let bX = fromBase58String(bK[q]) | |
1079 | - | let | |
1080 | - | if (( | |
1069 | + | let fE = invoke(bf, "unstake", [toBase58String(bX), dB], nil) | |
1070 | + | if ((fE == fE)) | |
1081 | 1071 | then { | |
1082 | - | let cG = bT(toBase58String( | |
1072 | + | let cG = bT(toBase58String(dt.transactionId), toBase58String(bX), dB, dt.caller) | |
1083 | 1073 | let cm = cG._1 | |
1084 | 1074 | let cn = cG._2 | |
1085 | 1075 | let ca = parseIntValue(cG._9) | |
1086 | 1076 | let co = cG._10 | |
1087 | - | let | |
1077 | + | let fP = if (if (aL()) | |
1088 | 1078 | then true | |
1089 | 1079 | else (ca == n)) | |
1090 | 1080 | then throw(("Get operation is blocked by admin. Status = " + toString(ca))) | |
1091 | 1081 | else true | |
1092 | - | if (( | |
1082 | + | if ((fP == fP)) | |
1093 | 1083 | then { | |
1094 | - | let | |
1095 | - | if (( | |
1084 | + | let fJ = invoke(aJ, "burn", [dB], [AttachedPayment(bX, dB)]) | |
1085 | + | if ((fJ == fJ)) | |
1096 | 1086 | then { | |
1097 | - | let | |
1098 | - | let | |
1099 | - | let cZ = | |
1100 | - | (co ++ | |
1087 | + | let fQ = da(-(cm), -(cn), 0) | |
1088 | + | let fb = fQ._1 | |
1089 | + | let cZ = fQ._2 | |
1090 | + | (co ++ fb) | |
1101 | 1091 | } | |
1102 | 1092 | else throw("Strict value is not equal to itself.") | |
1103 | 1093 | } | |
1110 | 1100 | ||
1111 | 1101 | ||
1112 | 1102 | ||
1113 | - | @Callable( | |
1114 | - | func unstakeAndGetNoLess ( | |
1115 | - | let | |
1103 | + | @Callable(dt) | |
1104 | + | func unstakeAndGetNoLess (fD,fR,fM) = { | |
1105 | + | let fu = if (aL()) | |
1116 | 1106 | then true | |
1117 | 1107 | else (aY == n) | |
1118 | - | let | |
1108 | + | let ep = [if (!(fu)) | |
1119 | 1109 | then true | |
1120 | - | else throw("get operation is blocked by admin"), if ((size( | |
1110 | + | else throw("get operation is blocked by admin"), if ((size(dt.payments) == 0)) | |
1121 | 1111 | then true | |
1122 | 1112 | else throw("no payments are expected")] | |
1123 | - | if (( | |
1113 | + | if ((ep == ep)) | |
1124 | 1114 | then { | |
1125 | - | let | |
1126 | - | if (( | |
1115 | + | let fE = invoke(bf, "unstake", [toBase58String(aZ), fD], nil) | |
1116 | + | if ((fE == fE)) | |
1127 | 1117 | then { | |
1128 | - | let cG = bT(toBase58String( | |
1118 | + | let cG = bT(toBase58String(dt.transactionId), toBase58String(aZ), fD, dt.caller) | |
1129 | 1119 | let cm = cG._1 | |
1130 | 1120 | let cn = cG._2 | |
1131 | 1121 | let co = cG._10 | |
1132 | - | let | |
1122 | + | let fS = [if ((cm >= fR)) | |
1133 | 1123 | then true | |
1134 | - | else throw(makeString(["amount asset amount to receive is less than ", toString( | |
1124 | + | else throw(makeString(["amount asset amount to receive is less than ", toString(fR)], "")), if ((cn >= fM)) | |
1135 | 1125 | then true | |
1136 | - | else throw(makeString(["price asset amount to receive is less than ", toString( | |
1137 | - | if (( | |
1126 | + | else throw(makeString(["price asset amount to receive is less than ", toString(fM)], ""))] | |
1127 | + | if ((fS == fS)) | |
1138 | 1128 | then { | |
1139 | - | let | |
1140 | - | if (( | |
1129 | + | let fJ = invoke(aJ, "burn", [fD], [AttachedPayment(aZ, fD)]) | |
1130 | + | if ((fJ == fJ)) | |
1141 | 1131 | then { | |
1142 | - | let | |
1143 | - | let | |
1144 | - | let cZ = | |
1145 | - | (co ++ | |
1132 | + | let fT = da(-(cm), -(cn), 0) | |
1133 | + | let fb = fT._1 | |
1134 | + | let cZ = fT._2 | |
1135 | + | (co ++ fb) | |
1146 | 1136 | } | |
1147 | 1137 | else throw("Strict value is not equal to itself.") | |
1148 | 1138 | } | |
1155 | 1145 | ||
1156 | 1146 | ||
1157 | 1147 | ||
1158 | - | @Callable( | |
1159 | - | func activate ( | |
1148 | + | @Callable(dt) | |
1149 | + | func activate (fU,fV) = if ((toString(dt.caller) != toString(aJ))) | |
1160 | 1150 | then throw("permissions denied") | |
1161 | - | else $Tuple2([StringEntry(aa(), | |
1151 | + | else $Tuple2([StringEntry(aa(), fU), StringEntry(ab(), fV)], "success") | |
1162 | 1152 | ||
1163 | 1153 | ||
1164 | 1154 | ||
1165 | - | @Callable( | |
1155 | + | @Callable(dt) | |
1166 | 1156 | func refreshKLp () = { | |
1167 | - | let | |
1168 | - | let | |
1157 | + | let fW = valueOrElse(getInteger(ag), 0) | |
1158 | + | let fX = if (((height - fW) >= aj)) | |
1169 | 1159 | then unit | |
1170 | 1160 | else aG(makeString([toString(aj), " blocks have not passed since the previous call"], "")) | |
1171 | - | if (( | |
1161 | + | if ((fX == fX)) | |
1172 | 1162 | then { | |
1173 | - | let | |
1174 | - | let dh = | |
1175 | - | let cZ = | |
1163 | + | let fY = da(0, 0, 0) | |
1164 | + | let dh = fY._1 | |
1165 | + | let cZ = fY._2 | |
1176 | 1166 | $Tuple2(dh, toString(cZ)) | |
1177 | 1167 | } | |
1178 | 1168 | else throw("Strict value is not equal to itself.") | |
1180 | 1170 | ||
1181 | 1171 | ||
1182 | 1172 | ||
1183 | - | @Callable( | |
1173 | + | @Callable(dt) | |
1184 | 1174 | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aN()) | |
1185 | 1175 | ||
1186 | 1176 | ||
1187 | 1177 | ||
1188 | - | @Callable( | |
1178 | + | @Callable(dt) | |
1189 | 1179 | func getAccBalanceWrapperREADONLY (bx) = $Tuple2(nil, bw(bx)) | |
1190 | 1180 | ||
1191 | 1181 | ||
1192 | 1182 | ||
1193 | - | @Callable( | |
1183 | + | @Callable(dt) | |
1194 | 1184 | func calcPricesWrapperREADONLY (bE,bF,bJ) = { | |
1195 | 1185 | let bS = bI(bE, bF, bJ) | |
1196 | 1186 | $Tuple2(nil, [toString(bS[0]), toString(bS[1]), toString(bS[2])]) | |
1198 | 1188 | ||
1199 | 1189 | ||
1200 | 1190 | ||
1201 | - | @Callable( | |
1191 | + | @Callable(dt) | |
1202 | 1192 | func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F))) | |
1203 | 1193 | ||
1204 | 1194 | ||
1205 | 1195 | ||
1206 | - | @Callable( | |
1196 | + | @Callable(dt) | |
1207 | 1197 | func fromX18WrapperREADONLY (H,I) = $Tuple2(nil, G(parseBigIntValue(H), I)) | |
1208 | 1198 | ||
1209 | 1199 | ||
1210 | 1200 | ||
1211 | - | @Callable( | |
1201 | + | @Callable(dt) | |
1212 | 1202 | func calcPriceBigIntWrapperREADONLY (bz,bA) = $Tuple2(nil, toString(by(parseBigIntValue(bz), parseBigIntValue(bA)))) | |
1213 | 1203 | ||
1214 | 1204 | ||
1215 | 1205 | ||
1216 | - | @Callable( | |
1206 | + | @Callable(dt) | |
1217 | 1207 | func estimatePutOperationWrapperREADONLY (bU,cq,cr,cs,ct,cu,X,cv,cw) = $Tuple2(nil, cp(bU, cq, cr, cs, ct, cu, X, cv, cw)) | |
1218 | 1208 | ||
1219 | 1209 | ||
1220 | 1210 | ||
1221 | - | @Callable( | |
1211 | + | @Callable(dt) | |
1222 | 1212 | func estimateGetOperationWrapperREADONLY (bU,bV,bW,X) = { | |
1223 | 1213 | let cG = bT(bU, bV, bW, addressFromStringValue(X)) | |
1224 | 1214 | $Tuple2(nil, $Tuple10(cG._1, cG._2, cG._3, cG._4, cG._5, cG._6, cG._7, toString(cG._8), cG._9, cG._10)) | |
1226 | 1216 | ||
1227 | 1217 | ||
1228 | 1218 | ||
1229 | - | @Callable( | |
1219 | + | @Callable(dt) | |
1230 | 1220 | func statsREADONLY () = { | |
1231 | 1221 | let bK = aN() | |
1232 | 1222 | let bX = fromBase58String(bK[q]) | |
1233 | - | let | |
1234 | - | let | |
1223 | + | let fZ = bK[r] | |
1224 | + | let ga = bK[s] | |
1235 | 1225 | let cz = bK[v] | |
1236 | 1226 | let cA = bK[w] | |
1237 | 1227 | let bL = parseIntValue(bK[t]) | |
1238 | 1228 | let bM = parseIntValue(bK[u]) | |
1239 | - | let | |
1240 | - | let | |
1241 | - | let | |
1242 | - | let | |
1229 | + | let gb = valueOrErrorMessage(assetInfo(bX), (("Asset " + toBase58String(bX)) + " doesn't exist")).quantity | |
1230 | + | let gc = bw(fZ) | |
1231 | + | let gd = bw(ga) | |
1232 | + | let ge = if ((gb == 0)) | |
1243 | 1233 | then [e, e, e] | |
1244 | - | else bI( | |
1234 | + | else bI(gc, gd, gb) | |
1245 | 1235 | let ch = 0 | |
1246 | - | let | |
1247 | - | let | |
1248 | - | let | |
1249 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString( | |
1236 | + | let gf = G(ge[1], b) | |
1237 | + | let gg = G(ge[2], b) | |
1238 | + | let gh = value(getInteger(aJ, au(toString(this)))) | |
1239 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(gc), toString(gd), toString(gb), toString(ch), toString(gf), toString(gg), toString(gh)], j)) | |
1250 | 1240 | } | |
1251 | 1241 | ||
1252 | 1242 | ||
1253 | 1243 | ||
1254 | - | @Callable( | |
1244 | + | @Callable(dt) | |
1255 | 1245 | func evaluatePutByAmountAssetREADONLY (cr) = { | |
1256 | 1246 | let bK = aN() | |
1257 | 1247 | let bX = fromBase58String(bK[q]) | |
1262 | 1252 | let bL = parseIntValue(bK[t]) | |
1263 | 1253 | let bM = parseIntValue(bK[u]) | |
1264 | 1254 | let ca = bK[p] | |
1265 | - | let | |
1266 | - | let | |
1267 | - | let | |
1268 | - | let bG = D( | |
1269 | - | let bH = D( | |
1270 | - | let cg = if (( | |
1255 | + | let gb = valueOrErrorMessage(assetInfo(bX), (("Asset " + toBase58String(bX)) + " doesn't exist")).quantity | |
1256 | + | let gc = bw(cx) | |
1257 | + | let gd = bw(cy) | |
1258 | + | let bG = D(gc, bL) | |
1259 | + | let bH = D(gd, bM) | |
1260 | + | let cg = if ((gb == 0)) | |
1271 | 1261 | then e | |
1272 | 1262 | else by(bH, bG) | |
1273 | 1263 | let cD = D(cr, bL) | |
1274 | 1264 | let cE = fraction(cD, cg, d) | |
1275 | 1265 | let ct = G(cE, bM) | |
1276 | - | let | |
1277 | - | let cO = | |
1278 | - | let | |
1279 | - | let cc = | |
1280 | - | let ce = | |
1281 | - | let cb = | |
1266 | + | let dz = cp("", 500000, cr, bY, ct, bZ, "", true, false) | |
1267 | + | let cO = dz._1 | |
1268 | + | let gi = dz._3 | |
1269 | + | let cc = dz._4 | |
1270 | + | let ce = dz._5 | |
1271 | + | let cb = dz._6 | |
1282 | 1272 | $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)) | |
1283 | 1273 | } | |
1284 | 1274 | ||
1285 | 1275 | ||
1286 | 1276 | ||
1287 | - | @Callable( | |
1277 | + | @Callable(dt) | |
1288 | 1278 | func evaluatePutByPriceAssetREADONLY (ct) = { | |
1289 | 1279 | let bK = aN() | |
1290 | 1280 | let bX = fromBase58String(bK[q]) | |
1295 | 1285 | let bL = parseIntValue(bK[t]) | |
1296 | 1286 | let bM = parseIntValue(bK[u]) | |
1297 | 1287 | let ca = bK[p] | |
1298 | - | let | |
1299 | - | let | |
1300 | - | let | |
1301 | - | let | |
1302 | - | let | |
1303 | - | let cg = if (( | |
1288 | + | let gb = valueOrErrorMessage(assetInfo(bX), (("Asset " + toBase58String(bX)) + " doesn't exist")).quantity | |
1289 | + | let gj = bw(cx) | |
1290 | + | let gk = bw(cy) | |
1291 | + | let gl = D(gj, bL) | |
1292 | + | let gm = D(gk, bM) | |
1293 | + | let cg = if ((gb == 0)) | |
1304 | 1294 | then e | |
1305 | - | else by( | |
1295 | + | else by(gm, gl) | |
1306 | 1296 | let cE = D(ct, bM) | |
1307 | 1297 | let cD = fraction(cE, d, cg) | |
1308 | 1298 | let cr = G(cD, bL) | |
1309 | - | let | |
1310 | - | let cO = | |
1311 | - | let | |
1312 | - | let cc = | |
1313 | - | let ce = | |
1314 | - | let cb = | |
1299 | + | let dz = cp("", 500000, cr, bY, ct, bZ, "", true, false) | |
1300 | + | let cO = dz._1 | |
1301 | + | let gi = dz._3 | |
1302 | + | let cc = dz._4 | |
1303 | + | let ce = dz._5 | |
1304 | + | let cb = dz._6 | |
1315 | 1305 | $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)) | |
1316 | 1306 | } | |
1317 | 1307 | ||
1318 | 1308 | ||
1319 | 1309 | ||
1320 | - | @Callable( | |
1321 | - | func evaluateGetREADONLY ( | |
1322 | - | let cG = bT("", | |
1310 | + | @Callable(dt) | |
1311 | + | func evaluateGetREADONLY (gn,go) = { | |
1312 | + | let cG = bT("", gn, go, this) | |
1323 | 1313 | let cm = cG._1 | |
1324 | 1314 | let cn = cG._2 | |
1325 | 1315 | let cc = cG._5 | |
1331 | 1321 | } | |
1332 | 1322 | ||
1333 | 1323 | ||
1334 | - | @Verifier( | |
1335 | - | func | |
1336 | - | let | |
1337 | - | let | |
1338 | - | if ($isInstanceOf( | |
1324 | + | @Verifier(gp) | |
1325 | + | func gq () = { | |
1326 | + | let gr = { | |
1327 | + | let dE = eG() | |
1328 | + | if ($isInstanceOf(dE, "ByteVector")) | |
1339 | 1329 | then { | |
1340 | - | let | |
1341 | - | | |
1330 | + | let eK = dE | |
1331 | + | eK | |
1342 | 1332 | } | |
1343 | - | else if ($isInstanceOf( | |
1344 | - | then | |
1333 | + | else if ($isInstanceOf(dE, "Unit")) | |
1334 | + | then gp.senderPublicKey | |
1345 | 1335 | else throw("Match error") | |
1346 | 1336 | } | |
1347 | - | let | |
1348 | - | if ($isInstanceOf( | |
1337 | + | let dE = gp | |
1338 | + | if ($isInstanceOf(dE, "Order")) | |
1349 | 1339 | then { | |
1350 | - | let dj = | |
1351 | - | let | |
1340 | + | let dj = dE | |
1341 | + | let gs = aM() | |
1352 | 1342 | let az = di(dj) | |
1353 | 1343 | let aA = sigVerify(dj.bodyBytes, dj.proofs[0], dj.senderPublicKey) | |
1354 | - | let aB = sigVerify(dj.bodyBytes, dj.proofs[1], | |
1344 | + | let aB = sigVerify(dj.bodyBytes, dj.proofs[1], gs) | |
1355 | 1345 | if (if (if (az) | |
1356 | 1346 | then aA | |
1357 | 1347 | else false) | |
1360 | 1350 | then true | |
1361 | 1351 | else ay(az, aA, aB) | |
1362 | 1352 | } | |
1363 | - | else if ($isInstanceOf( | |
1353 | + | else if ($isInstanceOf(dE, "SetScriptTransaction")) | |
1364 | 1354 | then { | |
1365 | - | let | |
1366 | - | let | |
1367 | - | let | |
1368 | - | let | |
1369 | - | if (if (( | |
1370 | - | then ( | |
1355 | + | let eH = dE | |
1356 | + | let gt = blake2b256(value(eH.script)) | |
1357 | + | let gu = fromBase64String(value(getString(aJ, aw()))) | |
1358 | + | let gv = scriptHash(this) | |
1359 | + | if (if ((gu == gt)) | |
1360 | + | then (gv != gt) | |
1371 | 1361 | else false) | |
1372 | 1362 | then true | |
1373 | - | else sigVerify( | |
1363 | + | else sigVerify(gp.bodyBytes, gp.proofs[0], gr) | |
1374 | 1364 | } | |
1375 | - | else sigVerify( | |
1365 | + | else sigVerify(gp.bodyBytes, gp.proofs[0], gr) | |
1376 | 1366 | } | |
1377 | 1367 |
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 | 383 | let de = (bw(aS(ba)) + db) | |
384 | 384 | let df = (bw(aS(bb)) + dc) | |
385 | 385 | let dg = (value(assetInfo(aZ)).quantity + dd) | |
386 | 386 | let cZ = cW(toBigInt(de), toBigInt(df), toBigInt(dg)) | |
387 | 387 | let dh = [IntegerEntry(ag, height), StringEntry(af, toString(cZ))] | |
388 | 388 | $Tuple2(dh, cZ) | |
389 | 389 | } | |
390 | 390 | ||
391 | 391 | ||
392 | 392 | func di (dj) = { | |
393 | - | let bK = aN() | |
394 | - | let dk = bK[r] | |
395 | - | let dl = bK[s] | |
396 | - | let ca = parseIntValue(bK[p]) | |
397 | - | let bL = parseIntValue(bK[t]) | |
398 | - | let bM = parseIntValue(bK[u]) | |
399 | - | let dm = dj.amount | |
400 | - | let dn = fraction(dj.amount, dj.price, b) | |
401 | - | let do = if ((dj.orderType == Buy)) | |
402 | - | then $Tuple2(dm, -(dn)) | |
403 | - | else $Tuple2(-(dm), dn) | |
404 | - | let db = do._1 | |
405 | - | let dc = do._2 | |
393 | + | let dk = dj.amount | |
394 | + | let dl = fraction(dj.amount, dj.price, b) | |
395 | + | let dm = if ((dj.orderType == Buy)) | |
396 | + | then $Tuple2(dk, -(dl)) | |
397 | + | else $Tuple2(-(dk), dl) | |
398 | + | let db = dm._1 | |
399 | + | let dc = dm._2 | |
406 | 400 | if (if (if (aL()) | |
407 | 401 | then true | |
408 | - | else ( | |
402 | + | else (aY == m)) | |
409 | 403 | then true | |
410 | - | else ( | |
404 | + | else (aY == n)) | |
411 | 405 | then throw("Exchange operations disabled") | |
412 | - | else { | |
413 | - | let dp = aS(value(dj.assetPair.amountAsset)) | |
414 | - | let dq = aS(value(dj.assetPair.priceAsset)) | |
415 | - | if (if ((dp != dk)) | |
416 | - | then true | |
417 | - | else (dq != dl)) | |
418 | - | then throw("Wrong order assets.") | |
419 | - | else { | |
420 | - | let dr = valueOrErrorMessage(parseBigInt(valueOrErrorMessage(getString(this, af), aI("kLp is required"))), aI("invalid kLp")) | |
421 | - | let ds = da(db, dc, 0) | |
422 | - | let dt = ds._1 | |
423 | - | let du = ds._2 | |
424 | - | let dv = (du > dr) | |
425 | - | dv | |
426 | - | } | |
427 | - | } | |
406 | + | else if (if ((dj.assetPair.amountAsset != ba)) | |
407 | + | then true | |
408 | + | else (dj.assetPair.priceAsset != bb)) | |
409 | + | then throw("Wrong order assets.") | |
410 | + | else { | |
411 | + | let dn = valueOrErrorMessage(parseBigInt(valueOrErrorMessage(getString(this, af), aI("kLp is required"))), aI("invalid kLp")) | |
412 | + | let do = da(db, dc, 0) | |
413 | + | let dp = do._1 | |
414 | + | let dq = do._2 | |
415 | + | let dr = (dq > dn) | |
416 | + | dr | |
417 | + | } | |
428 | 418 | } | |
429 | 419 | ||
430 | 420 | ||
431 | - | func | |
421 | + | func ds (dt) = if ((size(dt.payments) != 1)) | |
432 | 422 | then throw("exactly 1 payment is expected") | |
433 | 423 | else { | |
434 | - | let | |
435 | - | let bV = value( | |
436 | - | let | |
437 | - | let cG = bT(toBase58String( | |
424 | + | let du = value(dt.payments[0]) | |
425 | + | let bV = value(du.assetId) | |
426 | + | let dv = du.amount | |
427 | + | let cG = bT(toBase58String(dt.transactionId), toBase58String(bV), dv, dt.caller) | |
438 | 428 | let cm = cG._1 | |
439 | 429 | let cn = cG._2 | |
440 | 430 | let ca = parseIntValue(cG._9) | |
441 | 431 | let co = cG._10 | |
442 | 432 | if (if (aL()) | |
443 | 433 | then true | |
444 | 434 | else (ca == n)) | |
445 | 435 | then throw(("Get operation is blocked by admin. Status = " + toString(ca))) | |
446 | - | else $Tuple5(cm, cn, | |
436 | + | else $Tuple5(cm, cn, dv, bV, co) | |
447 | 437 | } | |
448 | 438 | ||
449 | 439 | ||
450 | - | func | |
440 | + | func dw (dt,cq,cw) = if ((size(dt.payments) != 2)) | |
451 | 441 | then throw("exactly 2 payments are expected") | |
452 | 442 | else { | |
453 | - | let | |
454 | - | let | |
455 | - | let | |
456 | - | let ca = parseIntValue( | |
443 | + | let dx = value(dt.payments[0]) | |
444 | + | let dy = value(dt.payments[1]) | |
445 | + | let dz = cp(toBase58String(dt.transactionId), cq, dx.amount, dx.assetId, dy.amount, dy.assetId, toString(dt.caller), false, cw) | |
446 | + | let ca = parseIntValue(dz._8) | |
457 | 447 | if (if (if (aL()) | |
458 | 448 | then true | |
459 | 449 | else (ca == l)) | |
460 | 450 | then true | |
461 | 451 | else (ca == n)) | |
462 | 452 | then throw(("Put operation is blocked by admin. Status = " + toString(ca))) | |
463 | - | else | |
453 | + | else dz | |
464 | 454 | } | |
465 | 455 | ||
466 | 456 | ||
467 | - | func | |
468 | - | let | |
469 | - | if (( | |
457 | + | func dA (dB) = { | |
458 | + | let dC = invoke(aJ, "emit", [dB], nil) | |
459 | + | if ((dC == dC)) | |
470 | 460 | then { | |
471 | - | let | |
472 | - | let | |
473 | - | if ($isInstanceOf( | |
461 | + | let dD = { | |
462 | + | let dE = dC | |
463 | + | if ($isInstanceOf(dE, "Address")) | |
474 | 464 | then { | |
475 | - | let | |
476 | - | invoke( | |
465 | + | let dF = dE | |
466 | + | invoke(dF, "emit", [dB], nil) | |
477 | 467 | } | |
478 | 468 | else unit | |
479 | 469 | } | |
480 | - | if (( | |
481 | - | then | |
470 | + | if ((dD == dD)) | |
471 | + | then dB | |
482 | 472 | else throw("Strict value is not equal to itself.") | |
483 | 473 | } | |
484 | 474 | else throw("Strict value is not equal to itself.") | |
485 | 475 | } | |
486 | 476 | ||
487 | 477 | ||
488 | - | func | |
489 | - | let | |
490 | - | $Tuple2(( | |
478 | + | func dG (dB) = { | |
479 | + | let dH = fraction(dB, ae, b) | |
480 | + | $Tuple2((dB - dH), dH) | |
491 | 481 | } | |
492 | 482 | ||
493 | 483 | ||
494 | - | func | |
495 | - | let | |
496 | - | let | |
497 | - | let | |
498 | - | let | |
484 | + | func dI (dJ,dK,X,Y) = { | |
485 | + | let dL = (Y == unit) | |
486 | + | let dM = bw(aS(ba)) | |
487 | + | let dN = bw(aS(bb)) | |
488 | + | let dO = if ((dK == ba)) | |
499 | 489 | then true | |
500 | - | else if (( | |
490 | + | else if ((dK == bb)) | |
501 | 491 | then false | |
502 | 492 | else aG("invalid asset") | |
503 | - | let | |
504 | - | then $Tuple2( | |
505 | - | else if ( | |
506 | - | then $Tuple2(( | |
507 | - | else $Tuple2( | |
508 | - | let | |
509 | - | let | |
510 | - | let | |
511 | - | then $Tuple2( | |
512 | - | else $Tuple2(0, | |
513 | - | let | |
514 | - | let | |
515 | - | let | |
516 | - | let | |
517 | - | let | |
518 | - | let | |
519 | - | let | |
520 | - | let | |
521 | - | let | |
522 | - | let | |
523 | - | let | |
524 | - | let | |
525 | - | then | |
526 | - | else | |
527 | - | let | |
528 | - | let | |
529 | - | let | |
493 | + | let dP = if (dL) | |
494 | + | then $Tuple2(dM, dN) | |
495 | + | else if (dO) | |
496 | + | then $Tuple2((dM - dJ), dN) | |
497 | + | else $Tuple2(dM, (dN - dJ)) | |
498 | + | let dQ = dP._1 | |
499 | + | let dR = dP._2 | |
500 | + | let dS = if (dO) | |
501 | + | then $Tuple2(dJ, 0) | |
502 | + | else $Tuple2(0, dJ) | |
503 | + | let dT = dS._1 | |
504 | + | let dU = dS._2 | |
505 | + | let dk = dG(dT)._1 | |
506 | + | let dl = dG(dU)._1 | |
507 | + | let dV = dG(dJ) | |
508 | + | let dW = dV._1 | |
509 | + | let dH = dV._2 | |
510 | + | let dX = (dQ + dk) | |
511 | + | let dY = (dR + dl) | |
512 | + | let dZ = by(D(dY, bd), D(dX, bc)) | |
513 | + | let ea = G(dZ, b) | |
514 | + | let eb = if (dO) | |
515 | + | then dQ | |
516 | + | else dR | |
517 | + | let ec = toBigInt(eb) | |
518 | + | let ed = toBigInt(valueOrErrorMessage(assetInfo(aZ), (("asset " + toBase58String(aZ)) + " doesn't exist")).quantity) | |
519 | + | let ee = if ((ed > f)) | |
530 | 520 | then true | |
531 | 521 | else aG("initial deposit requires all coins") | |
532 | - | if (( | |
522 | + | if ((ee == ee)) | |
533 | 523 | then { | |
534 | - | let | |
535 | - | let | |
536 | - | let cV = if ( | |
524 | + | let ef = toBigInt(dW) | |
525 | + | let eg = max([0, toInt(((ed * (sqrtBigInt((d + ((ef * d) / ec)), 18, 18, DOWN) - d)) / d))]) | |
526 | + | let cV = if (dL) | |
537 | 527 | then nil | |
538 | - | else [IntegerEntry(S(), | |
539 | - | let | |
540 | - | let | |
541 | - | let | |
542 | - | let | |
543 | - | then $Tuple2( | |
544 | - | else $Tuple2( | |
545 | - | let | |
546 | - | let | |
547 | - | let | |
548 | - | fraction(( | |
528 | + | else [IntegerEntry(S(), ea), IntegerEntry(T(height, lastBlock.timestamp), ea), StringEntry(W(toString(value(X)), toBase58String(value(Y))), bh(dT, dU, eg, ea, 0, 0, height, lastBlock.timestamp, 0, 0))] | |
529 | + | let eh = by(D(dR, bd), D(dQ, bc)) | |
530 | + | let ei = G(eh, b) | |
531 | + | let ej = { | |
532 | + | let ek = if (dO) | |
533 | + | then $Tuple2(dT, dQ) | |
534 | + | else $Tuple2(dU, dR) | |
535 | + | let dB = ek._1 | |
536 | + | let el = ek._2 | |
537 | + | let em = toInt(fraction(ed, toBigInt((dB / 2)), toBigInt(el))) | |
538 | + | fraction((eg - em), b, em) | |
549 | 539 | } | |
550 | - | $Tuple5( | |
540 | + | $Tuple5(eg, cV, dH, ej, dO) | |
551 | 541 | } | |
552 | 542 | else throw("Strict value is not equal to itself.") | |
553 | 543 | } | |
554 | 544 | ||
555 | 545 | ||
556 | - | func | |
557 | - | let | |
558 | - | let | |
546 | + | func en (eo,dW,dK,X,Y) = { | |
547 | + | let dL = (Y == unit) | |
548 | + | let ep = [if ((dK == aZ)) | |
559 | 549 | then true | |
560 | 550 | else aG("invalid lp asset")] | |
561 | - | if (( | |
551 | + | if ((ep == ep)) | |
562 | 552 | then { | |
563 | - | let | |
553 | + | let eq = if ((eo == ba)) | |
564 | 554 | then true | |
565 | - | else if (( | |
555 | + | else if ((eo == bb)) | |
566 | 556 | then false | |
567 | 557 | else aG("invalid asset") | |
568 | - | let | |
558 | + | let er = if (eq) | |
569 | 559 | then toBigInt(bw(aS(ba))) | |
570 | 560 | else toBigInt(bw(aS(bb))) | |
571 | - | let | |
572 | - | let | |
573 | - | let | |
574 | - | then | |
575 | - | else | |
576 | - | let | |
577 | - | let | |
578 | - | let | |
579 | - | let | |
580 | - | let | |
581 | - | let | |
582 | - | let | |
583 | - | let | |
584 | - | then $Tuple4( | |
585 | - | else $Tuple4(0, | |
586 | - | let | |
587 | - | let | |
588 | - | let | |
589 | - | let | |
590 | - | let | |
591 | - | let | |
592 | - | let cV = if ( | |
561 | + | let es = bw(aS(ba)) | |
562 | + | let et = bw(aS(bb)) | |
563 | + | let eu = if (eq) | |
564 | + | then es | |
565 | + | else et | |
566 | + | let ev = toBigInt(eu) | |
567 | + | let ed = toBigInt(valueOrErrorMessage(assetInfo(aZ), (("asset " + toBase58String(aZ)) + " doesn't exist")).quantity) | |
568 | + | let ew = toBigInt(dW) | |
569 | + | let ex = max([0, toInt(((er * (d - pow((d - ((ew * d) / ed)), 18, h, 0, 18, DOWN))) / d))]) | |
570 | + | let ey = dG(ex) | |
571 | + | let ez = ey._1 | |
572 | + | let dH = ey._2 | |
573 | + | let eA = if (eq) | |
574 | + | then $Tuple4(ez, 0, (es - ex), et) | |
575 | + | else $Tuple4(0, ez, es, (et - ex)) | |
576 | + | let eB = eA._1 | |
577 | + | let eC = eA._2 | |
578 | + | let eD = eA._3 | |
579 | + | let eE = eA._4 | |
580 | + | let dZ = by(D(eE, bd), D(eD, bc)) | |
581 | + | let ea = G(dZ, b) | |
582 | + | let cV = if (dL) | |
593 | 583 | then nil | |
594 | - | else [StringEntry(Z(toString(value(X)), toBase58String(value(Y))), bs( | |
595 | - | let | |
596 | - | let | |
597 | - | let | |
598 | - | let | |
599 | - | fraction(( | |
584 | + | else [StringEntry(Z(toString(value(X)), toBase58String(value(Y))), bs(eB, eC, dW, ea, height, lastBlock.timestamp)), IntegerEntry(S(), ea), IntegerEntry(T(height, lastBlock.timestamp), ea)] | |
585 | + | let eh = by(D(et, bd), D(es, bc)) | |
586 | + | let ei = G(eh, b) | |
587 | + | let ej = { | |
588 | + | let eF = (toInt(fraction(er, ew, ed)) * 2) | |
589 | + | fraction((ez - eF), b, eF) | |
600 | 590 | } | |
601 | - | $Tuple5( | |
591 | + | $Tuple5(ez, cV, dH, ej, eq) | |
602 | 592 | } | |
603 | 593 | else throw("Strict value is not equal to itself.") | |
604 | 594 | } | |
605 | 595 | ||
606 | 596 | ||
607 | - | func | |
608 | - | let | |
609 | - | if ($isInstanceOf( | |
597 | + | func eG () = { | |
598 | + | let dE = getString(Q()) | |
599 | + | if ($isInstanceOf(dE, "String")) | |
610 | 600 | then { | |
611 | - | let | |
612 | - | fromBase58String( | |
601 | + | let eH = dE | |
602 | + | fromBase58String(eH) | |
613 | 603 | } | |
614 | - | else if ($isInstanceOf( | |
604 | + | else if ($isInstanceOf(dE, "Unit")) | |
615 | 605 | then unit | |
616 | 606 | else throw("Match error") | |
617 | 607 | } | |
618 | 608 | ||
619 | 609 | ||
620 | - | func | |
621 | - | let | |
622 | - | if ($isInstanceOf( | |
610 | + | func eI () = { | |
611 | + | let dE = getString(R()) | |
612 | + | if ($isInstanceOf(dE, "String")) | |
623 | 613 | then { | |
624 | - | let | |
625 | - | fromBase58String( | |
614 | + | let eH = dE | |
615 | + | fromBase58String(eH) | |
626 | 616 | } | |
627 | - | else if ($isInstanceOf( | |
617 | + | else if ($isInstanceOf(dE, "Unit")) | |
628 | 618 | then unit | |
629 | 619 | else throw("Match error") | |
630 | 620 | } | |
631 | 621 | ||
632 | 622 | ||
633 | - | func | |
634 | - | let | |
635 | - | if ($isInstanceOf( | |
623 | + | func eJ (dt) = { | |
624 | + | let dE = eG() | |
625 | + | if ($isInstanceOf(dE, "ByteVector")) | |
636 | 626 | then { | |
637 | - | let | |
638 | - | ( | |
627 | + | let eK = dE | |
628 | + | (dt.callerPublicKey == eK) | |
639 | 629 | } | |
640 | - | else if ($isInstanceOf( | |
641 | - | then ( | |
630 | + | else if ($isInstanceOf(dE, "Unit")) | |
631 | + | then (dt.caller == this) | |
642 | 632 | else throw("Match error") | |
643 | 633 | } | |
644 | 634 | ||
645 | 635 | ||
646 | - | func | |
647 | - | let | |
648 | - | let | |
649 | - | if ($isInstanceOf( | |
636 | + | func eL (dt) = { | |
637 | + | let eM = throw("Permission denied") | |
638 | + | let dE = eG() | |
639 | + | if ($isInstanceOf(dE, "ByteVector")) | |
650 | 640 | then { | |
651 | - | let | |
652 | - | if (( | |
641 | + | let eK = dE | |
642 | + | if ((dt.callerPublicKey == eK)) | |
653 | 643 | then true | |
654 | - | else | |
644 | + | else eM | |
655 | 645 | } | |
656 | - | else if ($isInstanceOf( | |
657 | - | then if (( | |
646 | + | else if ($isInstanceOf(dE, "Unit")) | |
647 | + | then if ((dt.caller == this)) | |
658 | 648 | then true | |
659 | - | else | |
649 | + | else eM | |
660 | 650 | else throw("Match error") | |
661 | 651 | } | |
662 | 652 | ||
663 | 653 | ||
664 | - | @Callable( | |
665 | - | func setManager ( | |
666 | - | let | |
667 | - | if (( | |
654 | + | @Callable(dt) | |
655 | + | func setManager (eN) = { | |
656 | + | let eO = eL(dt) | |
657 | + | if ((eO == eO)) | |
668 | 658 | then { | |
669 | - | let | |
670 | - | if (( | |
671 | - | then [StringEntry(R(), | |
659 | + | let eP = fromBase58String(eN) | |
660 | + | if ((eP == eP)) | |
661 | + | then [StringEntry(R(), eN)] | |
672 | 662 | else throw("Strict value is not equal to itself.") | |
673 | 663 | } | |
674 | 664 | else throw("Strict value is not equal to itself.") | |
675 | 665 | } | |
676 | 666 | ||
677 | 667 | ||
678 | 668 | ||
679 | - | @Callable( | |
669 | + | @Callable(dt) | |
680 | 670 | func confirmManager () = { | |
681 | - | let | |
682 | - | let | |
671 | + | let eQ = eI() | |
672 | + | let eR = if (isDefined(eQ)) | |
683 | 673 | then true | |
684 | 674 | else throw("No pending manager") | |
685 | - | if (( | |
675 | + | if ((eR == eR)) | |
686 | 676 | then { | |
687 | - | let | |
677 | + | let eS = if ((dt.callerPublicKey == value(eQ))) | |
688 | 678 | then true | |
689 | 679 | else throw("You are not pending manager") | |
690 | - | if (( | |
691 | - | then [StringEntry(Q(), toBase58String(value( | |
680 | + | if ((eS == eS)) | |
681 | + | then [StringEntry(Q(), toBase58String(value(eQ))), DeleteEntry(R())] | |
692 | 682 | else throw("Strict value is not equal to itself.") | |
693 | 683 | } | |
694 | 684 | else throw("Strict value is not equal to itself.") | |
695 | 685 | } | |
696 | 686 | ||
697 | 687 | ||
698 | 688 | ||
699 | - | @Callable( | |
700 | - | func put (cq, | |
689 | + | @Callable(dt) | |
690 | + | func put (cq,eT) = if ((0 > cq)) | |
701 | 691 | then throw("Invalid slippageTolerance passed") | |
702 | 692 | else { | |
703 | - | let | |
704 | - | let cS = | |
705 | - | let bX = | |
706 | - | let co = | |
707 | - | let cT = | |
708 | - | let cU = | |
709 | - | let | |
710 | - | let | |
711 | - | let | |
712 | - | if (( | |
693 | + | let dz = dw(dt, cq, true) | |
694 | + | let cS = dz._2 | |
695 | + | let bX = dz._7 | |
696 | + | let co = dz._9 | |
697 | + | let cT = dz._10 | |
698 | + | let cU = dz._11 | |
699 | + | let eU = dz._12 | |
700 | + | let eV = dz._13 | |
701 | + | let dC = invoke(aJ, "emit", [cS], nil) | |
702 | + | if ((dC == dC)) | |
713 | 703 | then { | |
714 | - | let | |
715 | - | let | |
716 | - | if ($isInstanceOf( | |
704 | + | let dD = { | |
705 | + | let dE = dC | |
706 | + | if ($isInstanceOf(dE, "Address")) | |
717 | 707 | then { | |
718 | - | let | |
719 | - | invoke( | |
708 | + | let dF = dE | |
709 | + | invoke(dF, "emit", [cS], nil) | |
720 | 710 | } | |
721 | 711 | else unit | |
722 | 712 | } | |
723 | - | if (( | |
713 | + | if ((dD == dD)) | |
724 | 714 | then { | |
725 | - | let | |
726 | - | then invoke(bg, "put", nil, [AttachedPayment( | |
715 | + | let eW = if ((cT > 0)) | |
716 | + | then invoke(bg, "put", nil, [AttachedPayment(eU, cT)]) | |
727 | 717 | else nil | |
728 | - | if (( | |
718 | + | if ((eW == eW)) | |
729 | 719 | then { | |
730 | - | let | |
731 | - | then invoke(bg, "put", nil, [AttachedPayment( | |
720 | + | let eX = if ((cU > 0)) | |
721 | + | then invoke(bg, "put", nil, [AttachedPayment(eV, cU)]) | |
732 | 722 | else nil | |
733 | - | if (( | |
723 | + | if ((eX == eX)) | |
734 | 724 | then { | |
735 | - | let | |
725 | + | let eY = if (eT) | |
736 | 726 | then { | |
737 | - | let | |
738 | - | if (( | |
727 | + | let eZ = invoke(bf, "stake", nil, [AttachedPayment(bX, cS)]) | |
728 | + | if ((eZ == eZ)) | |
739 | 729 | then nil | |
740 | 730 | else throw("Strict value is not equal to itself.") | |
741 | 731 | } | |
742 | - | else [ScriptTransfer( | |
743 | - | let | |
744 | - | let | |
745 | - | let cZ = | |
746 | - | ((co ++ | |
732 | + | else [ScriptTransfer(dt.caller, cS, bX)] | |
733 | + | let fa = da(0, 0, 0) | |
734 | + | let fb = fa._1 | |
735 | + | let cZ = fa._2 | |
736 | + | ((co ++ eY) ++ fb) | |
747 | 737 | } | |
748 | 738 | else throw("Strict value is not equal to itself.") | |
749 | 739 | } | |
750 | 740 | else throw("Strict value is not equal to itself.") | |
751 | 741 | } | |
752 | 742 | else throw("Strict value is not equal to itself.") | |
753 | 743 | } | |
754 | 744 | else throw("Strict value is not equal to itself.") | |
755 | 745 | } | |
756 | 746 | ||
757 | 747 | ||
758 | 748 | ||
759 | - | @Callable( | |
760 | - | func putForFree ( | |
749 | + | @Callable(dt) | |
750 | + | func putForFree (fc) = if ((0 > fc)) | |
761 | 751 | then throw("Invalid value passed") | |
762 | 752 | else { | |
763 | - | let | |
764 | - | let co = | |
765 | - | let | |
766 | - | let | |
767 | - | let cZ = | |
768 | - | (co ++ | |
753 | + | let dz = dw(dt, fc, false) | |
754 | + | let co = dz._9 | |
755 | + | let fd = da(0, 0, 0) | |
756 | + | let fb = fd._1 | |
757 | + | let cZ = fd._2 | |
758 | + | (co ++ fb) | |
769 | 759 | } | |
770 | 760 | ||
771 | 761 | ||
772 | 762 | ||
773 | - | @Callable( | |
774 | - | func putOneTkn ( | |
775 | - | let | |
776 | - | let | |
777 | - | if ($isInstanceOf( | |
778 | - | then | |
779 | - | else throw(($getType( | |
763 | + | @Callable(dt) | |
764 | + | func putOneTkn (fe,ff) = { | |
765 | + | let fg = { | |
766 | + | let fh = invoke(aJ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
767 | + | if ($isInstanceOf(fh, "Boolean")) | |
768 | + | then fh | |
769 | + | else throw(($getType(fh) + " couldn't be cast to Boolean")) | |
780 | 770 | } | |
781 | - | let | |
771 | + | let fi = if (if (if (aL()) | |
782 | 772 | then true | |
783 | 773 | else (aY == l)) | |
784 | 774 | then true | |
785 | 775 | else (aY == n)) | |
786 | 776 | then true | |
787 | - | else | |
788 | - | let | |
777 | + | else fg | |
778 | + | let ep = [if (if (!(fi)) | |
789 | 779 | then true | |
790 | - | else | |
780 | + | else eJ(dt)) | |
791 | 781 | then true | |
792 | - | else aG("put operation is blocked by admin"), if ((size( | |
782 | + | else aG("put operation is blocked by admin"), if ((size(dt.payments) == 1)) | |
793 | 783 | then true | |
794 | 784 | else aG("exactly 1 payment are expected")] | |
795 | - | if (( | |
785 | + | if ((ep == ep)) | |
796 | 786 | then { | |
797 | - | let | |
798 | - | let | |
799 | - | let | |
800 | - | let X = | |
801 | - | let Y = | |
802 | - | let | |
803 | - | if (( | |
787 | + | let fj = dt.payments[0] | |
788 | + | let dK = fj.assetId | |
789 | + | let dJ = fj.amount | |
790 | + | let X = dt.caller | |
791 | + | let Y = dt.transactionId | |
792 | + | let fk = dI(dJ, dK, X, Y) | |
793 | + | if ((fk == fk)) | |
804 | 794 | then { | |
805 | - | let | |
806 | - | let | |
807 | - | let | |
808 | - | let cV = | |
809 | - | let | |
810 | - | let | |
811 | - | then ( | |
795 | + | let dO = fk._5 | |
796 | + | let fl = fk._4 | |
797 | + | let dH = fk._3 | |
798 | + | let cV = fk._2 | |
799 | + | let fm = fk._1 | |
800 | + | let fn = if (if ((fe > 0)) | |
801 | + | then (fe > fm) | |
812 | 802 | else false) | |
813 | - | then aG(makeString(["amount to receive is less than ", toString( | |
814 | - | else | |
815 | - | let | |
816 | - | if (( | |
803 | + | then aG(makeString(["amount to receive is less than ", toString(fe)], "")) | |
804 | + | else fm | |
805 | + | let dC = dA(fn) | |
806 | + | if ((dC == dC)) | |
817 | 807 | then { | |
818 | - | let | |
808 | + | let eY = if (ff) | |
819 | 809 | then { | |
820 | - | let | |
821 | - | if (( | |
810 | + | let fo = invoke(bf, "stake", nil, [AttachedPayment(aZ, fn)]) | |
811 | + | if ((fo == fo)) | |
822 | 812 | then nil | |
823 | 813 | else throw("Strict value is not equal to itself.") | |
824 | 814 | } | |
825 | - | else [ScriptTransfer( | |
826 | - | let | |
827 | - | then [ScriptTransfer(aK, | |
815 | + | else [ScriptTransfer(dt.caller, fn, aZ)] | |
816 | + | let fp = if ((dH > 0)) | |
817 | + | then [ScriptTransfer(aK, dH, dK)] | |
828 | 818 | else nil | |
829 | - | let | |
819 | + | let fq = if ((this == aK)) | |
830 | 820 | then $Tuple2(0, 0) | |
831 | - | else if ( | |
832 | - | then $Tuple2(-( | |
833 | - | else $Tuple2(0, -( | |
834 | - | let db = | |
835 | - | let dc = | |
836 | - | let | |
837 | - | let | |
838 | - | let cZ = | |
839 | - | $Tuple2((((cV ++ | |
821 | + | else if (dO) | |
822 | + | then $Tuple2(-(dH), 0) | |
823 | + | else $Tuple2(0, -(dH)) | |
824 | + | let db = fq._1 | |
825 | + | let dc = fq._2 | |
826 | + | let fr = da(db, dc, 0) | |
827 | + | let fb = fr._1 | |
828 | + | let cZ = fr._2 | |
829 | + | $Tuple2((((cV ++ eY) ++ fp) ++ fb), fn) | |
840 | 830 | } | |
841 | 831 | else throw("Strict value is not equal to itself.") | |
842 | 832 | } | |
843 | 833 | else throw("Strict value is not equal to itself.") | |
844 | 834 | } | |
845 | 835 | else throw("Strict value is not equal to itself.") | |
846 | 836 | } | |
847 | 837 | ||
848 | 838 | ||
849 | 839 | ||
850 | - | @Callable( | |
851 | - | func putOneTknREADONLY ( | |
852 | - | let | |
853 | - | let | |
854 | - | let cV = | |
855 | - | let | |
856 | - | let | |
857 | - | let | |
858 | - | $Tuple2(nil, $Tuple3( | |
840 | + | @Callable(dt) | |
841 | + | func putOneTknREADONLY (dK,dJ) = { | |
842 | + | let fs = dI(dJ, aQ(dK), unit, unit) | |
843 | + | let fm = fs._1 | |
844 | + | let cV = fs._2 | |
845 | + | let dH = fs._3 | |
846 | + | let fl = fs._4 | |
847 | + | let dO = fs._5 | |
848 | + | $Tuple2(nil, $Tuple3(fm, dH, fl)) | |
859 | 849 | } | |
860 | 850 | ||
861 | 851 | ||
862 | 852 | ||
863 | - | @Callable( | |
864 | - | func getOneTkn ( | |
865 | - | let | |
866 | - | let | |
867 | - | if ($isInstanceOf( | |
868 | - | then | |
869 | - | else throw(($getType( | |
853 | + | @Callable(dt) | |
854 | + | func getOneTkn (ft,fe) = { | |
855 | + | let fg = { | |
856 | + | let fh = invoke(aJ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
857 | + | if ($isInstanceOf(fh, "Boolean")) | |
858 | + | then fh | |
859 | + | else throw(($getType(fh) + " couldn't be cast to Boolean")) | |
870 | 860 | } | |
871 | - | let | |
861 | + | let fu = if (if (aL()) | |
872 | 862 | then true | |
873 | 863 | else (aY == n)) | |
874 | 864 | then true | |
875 | - | else | |
876 | - | let | |
865 | + | else fg | |
866 | + | let ep = [if (if (!(fu)) | |
877 | 867 | then true | |
878 | - | else | |
868 | + | else eJ(dt)) | |
879 | 869 | then true | |
880 | - | else aG("get operation is blocked by admin"), if ((size( | |
870 | + | else aG("get operation is blocked by admin"), if ((size(dt.payments) == 1)) | |
881 | 871 | then true | |
882 | 872 | else aG("exactly 1 payment are expected")] | |
883 | - | if (( | |
873 | + | if ((ep == ep)) | |
884 | 874 | then { | |
885 | - | let | |
886 | - | let | |
887 | - | let | |
888 | - | let | |
889 | - | let X = | |
890 | - | let Y = | |
891 | - | let | |
892 | - | if (( | |
875 | + | let eo = aQ(ft) | |
876 | + | let fj = dt.payments[0] | |
877 | + | let dK = fj.assetId | |
878 | + | let dW = fj.amount | |
879 | + | let X = dt.caller | |
880 | + | let Y = dt.transactionId | |
881 | + | let fv = en(eo, dW, dK, X, Y) | |
882 | + | if ((fv == fv)) | |
893 | 883 | then { | |
894 | - | let | |
895 | - | let | |
896 | - | let | |
897 | - | let cV = | |
898 | - | let | |
899 | - | let | |
900 | - | then ( | |
884 | + | let eq = fv._5 | |
885 | + | let fl = fv._4 | |
886 | + | let dH = fv._3 | |
887 | + | let cV = fv._2 | |
888 | + | let fw = fv._1 | |
889 | + | let dB = if (if ((fe > 0)) | |
890 | + | then (fe > fw) | |
901 | 891 | else false) | |
902 | - | then aG(makeString(["amount to receive is less than ", toString( | |
903 | - | else | |
904 | - | let | |
905 | - | if (( | |
892 | + | then aG(makeString(["amount to receive is less than ", toString(fe)], "")) | |
893 | + | else fw | |
894 | + | let fx = invoke(aJ, "burn", [dW], [AttachedPayment(dK, dW)]) | |
895 | + | if ((fx == fx)) | |
906 | 896 | then { | |
907 | - | let | |
908 | - | let | |
909 | - | then [ScriptTransfer(aK, | |
897 | + | let fy = [ScriptTransfer(X, dB, eo)] | |
898 | + | let fp = if ((dH > 0)) | |
899 | + | then [ScriptTransfer(aK, dH, eo)] | |
910 | 900 | else nil | |
911 | - | let | |
912 | - | let | |
901 | + | let fz = { | |
902 | + | let fA = if ((this == aK)) | |
913 | 903 | then 0 | |
914 | - | else | |
915 | - | if ( | |
916 | - | then $Tuple2(-(( | |
917 | - | else $Tuple2(0, -(( | |
904 | + | else dH | |
905 | + | if (eq) | |
906 | + | then $Tuple2(-((dB + fA)), 0) | |
907 | + | else $Tuple2(0, -((dB + fA))) | |
918 | 908 | } | |
919 | - | let db = | |
920 | - | let dc = | |
921 | - | let | |
922 | - | let | |
923 | - | let cZ = | |
924 | - | $Tuple2((((cV ++ | |
909 | + | let db = fz._1 | |
910 | + | let dc = fz._2 | |
911 | + | let fB = da(db, dc, 0) | |
912 | + | let fb = fB._1 | |
913 | + | let cZ = fB._2 | |
914 | + | $Tuple2((((cV ++ fy) ++ fp) ++ fb), dB) | |
925 | 915 | } | |
926 | 916 | else throw("Strict value is not equal to itself.") | |
927 | 917 | } | |
928 | 918 | else throw("Strict value is not equal to itself.") | |
929 | 919 | } | |
930 | 920 | else throw("Strict value is not equal to itself.") | |
931 | 921 | } | |
932 | 922 | ||
933 | 923 | ||
934 | 924 | ||
935 | - | @Callable( | |
936 | - | func getOneTknREADONLY ( | |
937 | - | let | |
938 | - | let | |
939 | - | let cV = | |
940 | - | let | |
941 | - | let | |
942 | - | let | |
943 | - | $Tuple2(nil, $Tuple3( | |
925 | + | @Callable(dt) | |
926 | + | func getOneTknREADONLY (eo,dW) = { | |
927 | + | let fC = en(aQ(eo), dW, aZ, unit, unit) | |
928 | + | let fw = fC._1 | |
929 | + | let cV = fC._2 | |
930 | + | let dH = fC._3 | |
931 | + | let fl = fC._4 | |
932 | + | let eq = fC._5 | |
933 | + | $Tuple2(nil, $Tuple3(fw, dH, fl)) | |
944 | 934 | } | |
945 | 935 | ||
946 | 936 | ||
947 | 937 | ||
948 | - | @Callable( | |
949 | - | func unstakeAndGetOneTkn ( | |
950 | - | let | |
951 | - | let | |
952 | - | if ($isInstanceOf( | |
953 | - | then | |
954 | - | else throw(($getType( | |
938 | + | @Callable(dt) | |
939 | + | func unstakeAndGetOneTkn (fD,ft,fe) = { | |
940 | + | let fg = { | |
941 | + | let fh = invoke(aJ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
942 | + | if ($isInstanceOf(fh, "Boolean")) | |
943 | + | then fh | |
944 | + | else throw(($getType(fh) + " couldn't be cast to Boolean")) | |
955 | 945 | } | |
956 | - | let | |
946 | + | let fu = if (if (aL()) | |
957 | 947 | then true | |
958 | 948 | else (aY == n)) | |
959 | 949 | then true | |
960 | - | else | |
961 | - | let | |
950 | + | else fg | |
951 | + | let ep = [if (if (!(fu)) | |
962 | 952 | then true | |
963 | - | else | |
953 | + | else eJ(dt)) | |
964 | 954 | then true | |
965 | - | else aG("get operation is blocked by admin"), if ((size( | |
955 | + | else aG("get operation is blocked by admin"), if ((size(dt.payments) == 0)) | |
966 | 956 | then true | |
967 | 957 | else aG("no payments are expected")] | |
968 | - | if (( | |
958 | + | if ((ep == ep)) | |
969 | 959 | then { | |
970 | - | let | |
971 | - | let X = | |
972 | - | let Y = | |
973 | - | let | |
974 | - | if (( | |
960 | + | let eo = aQ(ft) | |
961 | + | let X = dt.caller | |
962 | + | let Y = dt.transactionId | |
963 | + | let fE = invoke(bf, "unstake", [toBase58String(aZ), fD], nil) | |
964 | + | if ((fE == fE)) | |
975 | 965 | then { | |
976 | - | let | |
977 | - | if (( | |
966 | + | let fF = en(eo, fD, aZ, X, Y) | |
967 | + | if ((fF == fF)) | |
978 | 968 | then { | |
979 | - | let | |
980 | - | let | |
981 | - | let | |
982 | - | let cV = | |
983 | - | let | |
984 | - | let | |
985 | - | then ( | |
969 | + | let eq = fF._5 | |
970 | + | let fl = fF._4 | |
971 | + | let dH = fF._3 | |
972 | + | let cV = fF._2 | |
973 | + | let fw = fF._1 | |
974 | + | let dB = if (if ((fe > 0)) | |
975 | + | then (fe > fw) | |
986 | 976 | else false) | |
987 | - | then aG(makeString(["amount to receive is less than ", toString( | |
988 | - | else | |
989 | - | let | |
990 | - | if (( | |
977 | + | then aG(makeString(["amount to receive is less than ", toString(fe)], "")) | |
978 | + | else fw | |
979 | + | let fx = invoke(aJ, "burn", [fD], [AttachedPayment(aZ, fD)]) | |
980 | + | if ((fx == fx)) | |
991 | 981 | then { | |
992 | - | let | |
993 | - | let | |
994 | - | then [ScriptTransfer(aK, | |
982 | + | let fy = [ScriptTransfer(dt.caller, dB, eo)] | |
983 | + | let fp = if ((dH > 0)) | |
984 | + | then [ScriptTransfer(aK, dH, eo)] | |
995 | 985 | else nil | |
996 | - | let | |
997 | - | let | |
986 | + | let fG = { | |
987 | + | let fA = if ((this == aK)) | |
998 | 988 | then 0 | |
999 | - | else | |
1000 | - | if ( | |
1001 | - | then $Tuple2(-(( | |
1002 | - | else $Tuple2(0, -(( | |
989 | + | else dH | |
990 | + | if (eq) | |
991 | + | then $Tuple2(-((dB + fA)), 0) | |
992 | + | else $Tuple2(0, -((dB + fA))) | |
1003 | 993 | } | |
1004 | - | let db = | |
1005 | - | let dc = | |
1006 | - | let | |
1007 | - | let | |
1008 | - | let cZ = | |
1009 | - | $Tuple2((((cV ++ | |
994 | + | let db = fG._1 | |
995 | + | let dc = fG._2 | |
996 | + | let fH = da(db, dc, 0) | |
997 | + | let fb = fH._1 | |
998 | + | let cZ = fH._2 | |
999 | + | $Tuple2((((cV ++ fy) ++ fp) ++ fb), dB) | |
1010 | 1000 | } | |
1011 | 1001 | else throw("Strict value is not equal to itself.") | |
1012 | 1002 | } | |
1013 | 1003 | else throw("Strict value is not equal to itself.") | |
1014 | 1004 | } | |
1015 | 1005 | else throw("Strict value is not equal to itself.") | |
1016 | 1006 | } | |
1017 | 1007 | else throw("Strict value is not equal to itself.") | |
1018 | 1008 | } | |
1019 | 1009 | ||
1020 | 1010 | ||
1021 | 1011 | ||
1022 | - | @Callable( | |
1012 | + | @Callable(dt) | |
1023 | 1013 | func get () = { | |
1024 | - | let cG = | |
1025 | - | let | |
1014 | + | let cG = ds(dt) | |
1015 | + | let fI = cG._1 | |
1026 | 1016 | let cn = cG._2 | |
1027 | - | let | |
1017 | + | let dv = cG._3 | |
1028 | 1018 | let bV = cG._4 | |
1029 | 1019 | let co = cG._5 | |
1030 | - | let | |
1031 | - | if (( | |
1020 | + | let fJ = invoke(aJ, "burn", [dv], [AttachedPayment(bV, dv)]) | |
1021 | + | if ((fJ == fJ)) | |
1032 | 1022 | then { | |
1033 | - | let | |
1034 | - | let | |
1035 | - | let cZ = | |
1036 | - | (co ++ | |
1023 | + | let fK = da(-(fI), -(cn), 0) | |
1024 | + | let fb = fK._1 | |
1025 | + | let cZ = fK._2 | |
1026 | + | (co ++ fb) | |
1037 | 1027 | } | |
1038 | 1028 | else throw("Strict value is not equal to itself.") | |
1039 | 1029 | } | |
1040 | 1030 | ||
1041 | 1031 | ||
1042 | 1032 | ||
1043 | - | @Callable( | |
1044 | - | func getNoLess ( | |
1045 | - | let cG = | |
1033 | + | @Callable(dt) | |
1034 | + | func getNoLess (fL,fM) = { | |
1035 | + | let cG = ds(dt) | |
1046 | 1036 | let cm = cG._1 | |
1047 | 1037 | let cn = cG._2 | |
1048 | - | let | |
1038 | + | let dv = cG._3 | |
1049 | 1039 | let bV = cG._4 | |
1050 | 1040 | let co = cG._5 | |
1051 | - | if (( | |
1052 | - | then throw(((("noLessThenAmtAsset failed: " + toString(cm)) + " < ") + toString( | |
1053 | - | else if (( | |
1054 | - | then throw(((("noLessThenPriceAsset failed: " + toString(cn)) + " < ") + toString( | |
1041 | + | if ((fL > cm)) | |
1042 | + | then throw(((("noLessThenAmtAsset failed: " + toString(cm)) + " < ") + toString(fL))) | |
1043 | + | else if ((fM > cn)) | |
1044 | + | then throw(((("noLessThenPriceAsset failed: " + toString(cn)) + " < ") + toString(fM))) | |
1055 | 1045 | else { | |
1056 | - | let | |
1057 | - | if (( | |
1046 | + | let fJ = invoke(aJ, "burn", [dv], [AttachedPayment(bV, dv)]) | |
1047 | + | if ((fJ == fJ)) | |
1058 | 1048 | then { | |
1059 | - | let | |
1060 | - | let | |
1061 | - | let cZ = | |
1062 | - | (co ++ | |
1049 | + | let fN = da(-(cm), -(cn), 0) | |
1050 | + | let fb = fN._1 | |
1051 | + | let cZ = fN._2 | |
1052 | + | (co ++ fb) | |
1063 | 1053 | } | |
1064 | 1054 | else throw("Strict value is not equal to itself.") | |
1065 | 1055 | } | |
1066 | 1056 | } | |
1067 | 1057 | ||
1068 | 1058 | ||
1069 | 1059 | ||
1070 | - | @Callable( | |
1071 | - | func unstakeAndGet ( | |
1072 | - | let | |
1060 | + | @Callable(dt) | |
1061 | + | func unstakeAndGet (dB) = { | |
1062 | + | let fO = if ((size(dt.payments) != 0)) | |
1073 | 1063 | then throw("No payments are expected") | |
1074 | 1064 | else true | |
1075 | - | if (( | |
1065 | + | if ((fO == fO)) | |
1076 | 1066 | then { | |
1077 | 1067 | let bK = aN() | |
1078 | 1068 | let bX = fromBase58String(bK[q]) | |
1079 | - | let | |
1080 | - | if (( | |
1069 | + | let fE = invoke(bf, "unstake", [toBase58String(bX), dB], nil) | |
1070 | + | if ((fE == fE)) | |
1081 | 1071 | then { | |
1082 | - | let cG = bT(toBase58String( | |
1072 | + | let cG = bT(toBase58String(dt.transactionId), toBase58String(bX), dB, dt.caller) | |
1083 | 1073 | let cm = cG._1 | |
1084 | 1074 | let cn = cG._2 | |
1085 | 1075 | let ca = parseIntValue(cG._9) | |
1086 | 1076 | let co = cG._10 | |
1087 | - | let | |
1077 | + | let fP = if (if (aL()) | |
1088 | 1078 | then true | |
1089 | 1079 | else (ca == n)) | |
1090 | 1080 | then throw(("Get operation is blocked by admin. Status = " + toString(ca))) | |
1091 | 1081 | else true | |
1092 | - | if (( | |
1082 | + | if ((fP == fP)) | |
1093 | 1083 | then { | |
1094 | - | let | |
1095 | - | if (( | |
1084 | + | let fJ = invoke(aJ, "burn", [dB], [AttachedPayment(bX, dB)]) | |
1085 | + | if ((fJ == fJ)) | |
1096 | 1086 | then { | |
1097 | - | let | |
1098 | - | let | |
1099 | - | let cZ = | |
1100 | - | (co ++ | |
1087 | + | let fQ = da(-(cm), -(cn), 0) | |
1088 | + | let fb = fQ._1 | |
1089 | + | let cZ = fQ._2 | |
1090 | + | (co ++ fb) | |
1101 | 1091 | } | |
1102 | 1092 | else throw("Strict value is not equal to itself.") | |
1103 | 1093 | } | |
1104 | 1094 | else throw("Strict value is not equal to itself.") | |
1105 | 1095 | } | |
1106 | 1096 | else throw("Strict value is not equal to itself.") | |
1107 | 1097 | } | |
1108 | 1098 | else throw("Strict value is not equal to itself.") | |
1109 | 1099 | } | |
1110 | 1100 | ||
1111 | 1101 | ||
1112 | 1102 | ||
1113 | - | @Callable( | |
1114 | - | func unstakeAndGetNoLess ( | |
1115 | - | let | |
1103 | + | @Callable(dt) | |
1104 | + | func unstakeAndGetNoLess (fD,fR,fM) = { | |
1105 | + | let fu = if (aL()) | |
1116 | 1106 | then true | |
1117 | 1107 | else (aY == n) | |
1118 | - | let | |
1108 | + | let ep = [if (!(fu)) | |
1119 | 1109 | then true | |
1120 | - | else throw("get operation is blocked by admin"), if ((size( | |
1110 | + | else throw("get operation is blocked by admin"), if ((size(dt.payments) == 0)) | |
1121 | 1111 | then true | |
1122 | 1112 | else throw("no payments are expected")] | |
1123 | - | if (( | |
1113 | + | if ((ep == ep)) | |
1124 | 1114 | then { | |
1125 | - | let | |
1126 | - | if (( | |
1115 | + | let fE = invoke(bf, "unstake", [toBase58String(aZ), fD], nil) | |
1116 | + | if ((fE == fE)) | |
1127 | 1117 | then { | |
1128 | - | let cG = bT(toBase58String( | |
1118 | + | let cG = bT(toBase58String(dt.transactionId), toBase58String(aZ), fD, dt.caller) | |
1129 | 1119 | let cm = cG._1 | |
1130 | 1120 | let cn = cG._2 | |
1131 | 1121 | let co = cG._10 | |
1132 | - | let | |
1122 | + | let fS = [if ((cm >= fR)) | |
1133 | 1123 | then true | |
1134 | - | else throw(makeString(["amount asset amount to receive is less than ", toString( | |
1124 | + | else throw(makeString(["amount asset amount to receive is less than ", toString(fR)], "")), if ((cn >= fM)) | |
1135 | 1125 | then true | |
1136 | - | else throw(makeString(["price asset amount to receive is less than ", toString( | |
1137 | - | if (( | |
1126 | + | else throw(makeString(["price asset amount to receive is less than ", toString(fM)], ""))] | |
1127 | + | if ((fS == fS)) | |
1138 | 1128 | then { | |
1139 | - | let | |
1140 | - | if (( | |
1129 | + | let fJ = invoke(aJ, "burn", [fD], [AttachedPayment(aZ, fD)]) | |
1130 | + | if ((fJ == fJ)) | |
1141 | 1131 | then { | |
1142 | - | let | |
1143 | - | let | |
1144 | - | let cZ = | |
1145 | - | (co ++ | |
1132 | + | let fT = da(-(cm), -(cn), 0) | |
1133 | + | let fb = fT._1 | |
1134 | + | let cZ = fT._2 | |
1135 | + | (co ++ fb) | |
1146 | 1136 | } | |
1147 | 1137 | else throw("Strict value is not equal to itself.") | |
1148 | 1138 | } | |
1149 | 1139 | else throw("Strict value is not equal to itself.") | |
1150 | 1140 | } | |
1151 | 1141 | else throw("Strict value is not equal to itself.") | |
1152 | 1142 | } | |
1153 | 1143 | else throw("Strict value is not equal to itself.") | |
1154 | 1144 | } | |
1155 | 1145 | ||
1156 | 1146 | ||
1157 | 1147 | ||
1158 | - | @Callable( | |
1159 | - | func activate ( | |
1148 | + | @Callable(dt) | |
1149 | + | func activate (fU,fV) = if ((toString(dt.caller) != toString(aJ))) | |
1160 | 1150 | then throw("permissions denied") | |
1161 | - | else $Tuple2([StringEntry(aa(), | |
1151 | + | else $Tuple2([StringEntry(aa(), fU), StringEntry(ab(), fV)], "success") | |
1162 | 1152 | ||
1163 | 1153 | ||
1164 | 1154 | ||
1165 | - | @Callable( | |
1155 | + | @Callable(dt) | |
1166 | 1156 | func refreshKLp () = { | |
1167 | - | let | |
1168 | - | let | |
1157 | + | let fW = valueOrElse(getInteger(ag), 0) | |
1158 | + | let fX = if (((height - fW) >= aj)) | |
1169 | 1159 | then unit | |
1170 | 1160 | else aG(makeString([toString(aj), " blocks have not passed since the previous call"], "")) | |
1171 | - | if (( | |
1161 | + | if ((fX == fX)) | |
1172 | 1162 | then { | |
1173 | - | let | |
1174 | - | let dh = | |
1175 | - | let cZ = | |
1163 | + | let fY = da(0, 0, 0) | |
1164 | + | let dh = fY._1 | |
1165 | + | let cZ = fY._2 | |
1176 | 1166 | $Tuple2(dh, toString(cZ)) | |
1177 | 1167 | } | |
1178 | 1168 | else throw("Strict value is not equal to itself.") | |
1179 | 1169 | } | |
1180 | 1170 | ||
1181 | 1171 | ||
1182 | 1172 | ||
1183 | - | @Callable( | |
1173 | + | @Callable(dt) | |
1184 | 1174 | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aN()) | |
1185 | 1175 | ||
1186 | 1176 | ||
1187 | 1177 | ||
1188 | - | @Callable( | |
1178 | + | @Callable(dt) | |
1189 | 1179 | func getAccBalanceWrapperREADONLY (bx) = $Tuple2(nil, bw(bx)) | |
1190 | 1180 | ||
1191 | 1181 | ||
1192 | 1182 | ||
1193 | - | @Callable( | |
1183 | + | @Callable(dt) | |
1194 | 1184 | func calcPricesWrapperREADONLY (bE,bF,bJ) = { | |
1195 | 1185 | let bS = bI(bE, bF, bJ) | |
1196 | 1186 | $Tuple2(nil, [toString(bS[0]), toString(bS[1]), toString(bS[2])]) | |
1197 | 1187 | } | |
1198 | 1188 | ||
1199 | 1189 | ||
1200 | 1190 | ||
1201 | - | @Callable( | |
1191 | + | @Callable(dt) | |
1202 | 1192 | func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F))) | |
1203 | 1193 | ||
1204 | 1194 | ||
1205 | 1195 | ||
1206 | - | @Callable( | |
1196 | + | @Callable(dt) | |
1207 | 1197 | func fromX18WrapperREADONLY (H,I) = $Tuple2(nil, G(parseBigIntValue(H), I)) | |
1208 | 1198 | ||
1209 | 1199 | ||
1210 | 1200 | ||
1211 | - | @Callable( | |
1201 | + | @Callable(dt) | |
1212 | 1202 | func calcPriceBigIntWrapperREADONLY (bz,bA) = $Tuple2(nil, toString(by(parseBigIntValue(bz), parseBigIntValue(bA)))) | |
1213 | 1203 | ||
1214 | 1204 | ||
1215 | 1205 | ||
1216 | - | @Callable( | |
1206 | + | @Callable(dt) | |
1217 | 1207 | func estimatePutOperationWrapperREADONLY (bU,cq,cr,cs,ct,cu,X,cv,cw) = $Tuple2(nil, cp(bU, cq, cr, cs, ct, cu, X, cv, cw)) | |
1218 | 1208 | ||
1219 | 1209 | ||
1220 | 1210 | ||
1221 | - | @Callable( | |
1211 | + | @Callable(dt) | |
1222 | 1212 | func estimateGetOperationWrapperREADONLY (bU,bV,bW,X) = { | |
1223 | 1213 | let cG = bT(bU, bV, bW, addressFromStringValue(X)) | |
1224 | 1214 | $Tuple2(nil, $Tuple10(cG._1, cG._2, cG._3, cG._4, cG._5, cG._6, cG._7, toString(cG._8), cG._9, cG._10)) | |
1225 | 1215 | } | |
1226 | 1216 | ||
1227 | 1217 | ||
1228 | 1218 | ||
1229 | - | @Callable( | |
1219 | + | @Callable(dt) | |
1230 | 1220 | func statsREADONLY () = { | |
1231 | 1221 | let bK = aN() | |
1232 | 1222 | let bX = fromBase58String(bK[q]) | |
1233 | - | let | |
1234 | - | let | |
1223 | + | let fZ = bK[r] | |
1224 | + | let ga = bK[s] | |
1235 | 1225 | let cz = bK[v] | |
1236 | 1226 | let cA = bK[w] | |
1237 | 1227 | let bL = parseIntValue(bK[t]) | |
1238 | 1228 | let bM = parseIntValue(bK[u]) | |
1239 | - | let | |
1240 | - | let | |
1241 | - | let | |
1242 | - | let | |
1229 | + | let gb = valueOrErrorMessage(assetInfo(bX), (("Asset " + toBase58String(bX)) + " doesn't exist")).quantity | |
1230 | + | let gc = bw(fZ) | |
1231 | + | let gd = bw(ga) | |
1232 | + | let ge = if ((gb == 0)) | |
1243 | 1233 | then [e, e, e] | |
1244 | - | else bI( | |
1234 | + | else bI(gc, gd, gb) | |
1245 | 1235 | let ch = 0 | |
1246 | - | let | |
1247 | - | let | |
1248 | - | let | |
1249 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString( | |
1236 | + | let gf = G(ge[1], b) | |
1237 | + | let gg = G(ge[2], b) | |
1238 | + | let gh = value(getInteger(aJ, au(toString(this)))) | |
1239 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(gc), toString(gd), toString(gb), toString(ch), toString(gf), toString(gg), toString(gh)], j)) | |
1250 | 1240 | } | |
1251 | 1241 | ||
1252 | 1242 | ||
1253 | 1243 | ||
1254 | - | @Callable( | |
1244 | + | @Callable(dt) | |
1255 | 1245 | func evaluatePutByAmountAssetREADONLY (cr) = { | |
1256 | 1246 | let bK = aN() | |
1257 | 1247 | let bX = fromBase58String(bK[q]) | |
1258 | 1248 | let cx = bK[r] | |
1259 | 1249 | let bY = fromBase58String(cx) | |
1260 | 1250 | let cy = bK[s] | |
1261 | 1251 | let bZ = fromBase58String(cy) | |
1262 | 1252 | let bL = parseIntValue(bK[t]) | |
1263 | 1253 | let bM = parseIntValue(bK[u]) | |
1264 | 1254 | let ca = bK[p] | |
1265 | - | let | |
1266 | - | let | |
1267 | - | let | |
1268 | - | let bG = D( | |
1269 | - | let bH = D( | |
1270 | - | let cg = if (( | |
1255 | + | let gb = valueOrErrorMessage(assetInfo(bX), (("Asset " + toBase58String(bX)) + " doesn't exist")).quantity | |
1256 | + | let gc = bw(cx) | |
1257 | + | let gd = bw(cy) | |
1258 | + | let bG = D(gc, bL) | |
1259 | + | let bH = D(gd, bM) | |
1260 | + | let cg = if ((gb == 0)) | |
1271 | 1261 | then e | |
1272 | 1262 | else by(bH, bG) | |
1273 | 1263 | let cD = D(cr, bL) | |
1274 | 1264 | let cE = fraction(cD, cg, d) | |
1275 | 1265 | let ct = G(cE, bM) | |
1276 | - | let | |
1277 | - | let cO = | |
1278 | - | let | |
1279 | - | let cc = | |
1280 | - | let ce = | |
1281 | - | let cb = | |
1266 | + | let dz = cp("", 500000, cr, bY, ct, bZ, "", true, false) | |
1267 | + | let cO = dz._1 | |
1268 | + | let gi = dz._3 | |
1269 | + | let cc = dz._4 | |
1270 | + | let ce = dz._5 | |
1271 | + | let cb = dz._6 | |
1282 | 1272 | $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)) | |
1283 | 1273 | } | |
1284 | 1274 | ||
1285 | 1275 | ||
1286 | 1276 | ||
1287 | - | @Callable( | |
1277 | + | @Callable(dt) | |
1288 | 1278 | func evaluatePutByPriceAssetREADONLY (ct) = { | |
1289 | 1279 | let bK = aN() | |
1290 | 1280 | let bX = fromBase58String(bK[q]) | |
1291 | 1281 | let cx = bK[r] | |
1292 | 1282 | let bY = fromBase58String(cx) | |
1293 | 1283 | let cy = bK[s] | |
1294 | 1284 | let bZ = fromBase58String(cy) | |
1295 | 1285 | let bL = parseIntValue(bK[t]) | |
1296 | 1286 | let bM = parseIntValue(bK[u]) | |
1297 | 1287 | let ca = bK[p] | |
1298 | - | let | |
1299 | - | let | |
1300 | - | let | |
1301 | - | let | |
1302 | - | let | |
1303 | - | let cg = if (( | |
1288 | + | let gb = valueOrErrorMessage(assetInfo(bX), (("Asset " + toBase58String(bX)) + " doesn't exist")).quantity | |
1289 | + | let gj = bw(cx) | |
1290 | + | let gk = bw(cy) | |
1291 | + | let gl = D(gj, bL) | |
1292 | + | let gm = D(gk, bM) | |
1293 | + | let cg = if ((gb == 0)) | |
1304 | 1294 | then e | |
1305 | - | else by( | |
1295 | + | else by(gm, gl) | |
1306 | 1296 | let cE = D(ct, bM) | |
1307 | 1297 | let cD = fraction(cE, d, cg) | |
1308 | 1298 | let cr = G(cD, bL) | |
1309 | - | let | |
1310 | - | let cO = | |
1311 | - | let | |
1312 | - | let cc = | |
1313 | - | let ce = | |
1314 | - | let cb = | |
1299 | + | let dz = cp("", 500000, cr, bY, ct, bZ, "", true, false) | |
1300 | + | let cO = dz._1 | |
1301 | + | let gi = dz._3 | |
1302 | + | let cc = dz._4 | |
1303 | + | let ce = dz._5 | |
1304 | + | let cb = dz._6 | |
1315 | 1305 | $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)) | |
1316 | 1306 | } | |
1317 | 1307 | ||
1318 | 1308 | ||
1319 | 1309 | ||
1320 | - | @Callable( | |
1321 | - | func evaluateGetREADONLY ( | |
1322 | - | let cG = bT("", | |
1310 | + | @Callable(dt) | |
1311 | + | func evaluateGetREADONLY (gn,go) = { | |
1312 | + | let cG = bT("", gn, go, this) | |
1323 | 1313 | let cm = cG._1 | |
1324 | 1314 | let cn = cG._2 | |
1325 | 1315 | let cc = cG._5 | |
1326 | 1316 | let ce = cG._6 | |
1327 | 1317 | let cb = cG._7 | |
1328 | 1318 | let ch = cG._8 | |
1329 | 1319 | let ca = parseIntValue(cG._9) | |
1330 | 1320 | $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)) | |
1331 | 1321 | } | |
1332 | 1322 | ||
1333 | 1323 | ||
1334 | - | @Verifier( | |
1335 | - | func | |
1336 | - | let | |
1337 | - | let | |
1338 | - | if ($isInstanceOf( | |
1324 | + | @Verifier(gp) | |
1325 | + | func gq () = { | |
1326 | + | let gr = { | |
1327 | + | let dE = eG() | |
1328 | + | if ($isInstanceOf(dE, "ByteVector")) | |
1339 | 1329 | then { | |
1340 | - | let | |
1341 | - | | |
1330 | + | let eK = dE | |
1331 | + | eK | |
1342 | 1332 | } | |
1343 | - | else if ($isInstanceOf( | |
1344 | - | then | |
1333 | + | else if ($isInstanceOf(dE, "Unit")) | |
1334 | + | then gp.senderPublicKey | |
1345 | 1335 | else throw("Match error") | |
1346 | 1336 | } | |
1347 | - | let | |
1348 | - | if ($isInstanceOf( | |
1337 | + | let dE = gp | |
1338 | + | if ($isInstanceOf(dE, "Order")) | |
1349 | 1339 | then { | |
1350 | - | let dj = | |
1351 | - | let | |
1340 | + | let dj = dE | |
1341 | + | let gs = aM() | |
1352 | 1342 | let az = di(dj) | |
1353 | 1343 | let aA = sigVerify(dj.bodyBytes, dj.proofs[0], dj.senderPublicKey) | |
1354 | - | let aB = sigVerify(dj.bodyBytes, dj.proofs[1], | |
1344 | + | let aB = sigVerify(dj.bodyBytes, dj.proofs[1], gs) | |
1355 | 1345 | if (if (if (az) | |
1356 | 1346 | then aA | |
1357 | 1347 | else false) | |
1358 | 1348 | then aB | |
1359 | 1349 | else false) | |
1360 | 1350 | then true | |
1361 | 1351 | else ay(az, aA, aB) | |
1362 | 1352 | } | |
1363 | - | else if ($isInstanceOf( | |
1353 | + | else if ($isInstanceOf(dE, "SetScriptTransaction")) | |
1364 | 1354 | then { | |
1365 | - | let | |
1366 | - | let | |
1367 | - | let | |
1368 | - | let | |
1369 | - | if (if (( | |
1370 | - | then ( | |
1355 | + | let eH = dE | |
1356 | + | let gt = blake2b256(value(eH.script)) | |
1357 | + | let gu = fromBase64String(value(getString(aJ, aw()))) | |
1358 | + | let gv = scriptHash(this) | |
1359 | + | if (if ((gu == gt)) | |
1360 | + | then (gv != gt) | |
1371 | 1361 | else false) | |
1372 | 1362 | then true | |
1373 | - | else sigVerify( | |
1363 | + | else sigVerify(gp.bodyBytes, gp.proofs[0], gr) | |
1374 | 1364 | } | |
1375 | - | else sigVerify( | |
1365 | + | else sigVerify(gp.bodyBytes, gp.proofs[0], gr) | |
1376 | 1366 | } | |
1377 | 1367 |
github/deemru/w8io/fabc49c 372.95 ms ◑