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