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