tx · DXaPtP5RHZWHvPmdW9rS7vrvQZZFYDoUVxpGhVjcBdQ9 3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai: -0.02800000 Waves 2023.07.21 12:32 [2675441] smart account 3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai > SELF 0.00000000 Waves
{ "type": 13, "id": "DXaPtP5RHZWHvPmdW9rS7vrvQZZFYDoUVxpGhVjcBdQ9", "fee": 2800000, "feeAssetId": null, "timestamp": 1689931993167, "version": 2, "chainId": 84, "sender": "3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai", "senderPublicKey": "2JEaBjtjvMoNGKZmL9QxYefa1VkMJM3vMW8rNvTs9R2H", "proofs": [ "2993T2sBtQdTrHHfGJeiahuuSm67RjbGrxdsMPiFujwZPCoR48rDyXtWUymYeuEZvPhv2yN7nWYXtGAQK4f5iUTn" ], "script": "base64:BgK0LQgCEgASBAoCCAgSBAoCCAgSAwoBCBIKCggICAgICAgIARIDCgEIEgYKBAgICAgSBAoCCBgSAwoBCBIECgIIGBIDCgEYEgoKCAgICAgIAQgIEgQKAggBEgMKAQESAwoBARIECgIIARIGCgQICAgIEgQKAggIEgQKAggIEgQKAggIEgMKAQgSAwoBCBIDCgEIEgMKAQgSBAoCCAgSAwoBCBIDCgEIEgMKAQgSBAoCCAgSAwoBCBIDCgEIEgMKAQgSAwoBCCIGU0NBTEU4IgVNVUxUOCIGTVVMVDEyIgdTQ0FMRTE4IgZNVUxUMTgiDlBPT0xXRUlHSFRNVUxUIg5HV1h2aXJ0dWFsUE9PTCIMbGFiZWxQb29sc0xwIg1kZWZhdWx0U3ByZWFkIgt3YXZlc1N0cmluZyIQY29udHJhY3RGaWxlbmFtZSIRZGVjaW1hbHNNdWx0UHJpY2UiA1NFUCIFRU1QVFkiClBvb2xBY3RpdmUiD1Bvb2xQdXREaXNhYmxlZCITUG9vbE1hdGNoZXJEaXNhYmxlZCIMUG9vbFNodXRkb3duIhJpZHhJbnRlcm5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HJ5AQkBAmFlAQUCYUEJAMwIAgkBC0RlbGV0ZUVudHJ5AQkBAmF5AQUCYUEJAMwIAgkBC0RlbGV0ZUVudHJ5AQkBAmFIAQUCYUEJAMwIAgkBC0RlbGV0ZUVudHJ5AQkBAmFKAQUCYUEJAMwIAgkBC0RlbGV0ZUVudHJ5AQkBAmFMAQUCYUEJAMwIAgkBC0RlbGV0ZUVudHJ5AQkBAmFNAQUCYUEJAMwIAgkBC0RlbGV0ZUVudHJ5AQkBAmFOAQUCYUEJAMwIAgkBC0RlbGV0ZUVudHJ5AQkBAmFPAQUCYUEFA25pbAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECZnYBAmZ3AAQCZngEAmJmCQECYnkAAwkAAQIFAmJmAgpCeXRlVmVjdG9yBAJiRgUCYmYFAmJGAwkAAQIFAmJmAgRVbml0CAUCZnYPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IJAPQDAwgFAmZ2CWJvZHlCeXRlcwkAkQMCCAUCZnYGcHJvb2ZzAAAFAmZ4LuuPpg==", "height": 2675441, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2mbizu3bHURTHUkscMagK8sDgfrAAaezopZYNbQaU6mo Next: Fw6T22x2kMq44ar2UAF6WnJTV2zdZJp61J3dAScAidbG Diff:
Old | New | Differences | |
---|---|---|---|
20 | 20 | let defaultSpread = 2000000 | |
21 | 21 | ||
22 | 22 | let wavesString = "WAVES" | |
23 | + | ||
24 | + | let contractFilename = "factory_v2.ride" | |
23 | 25 | ||
24 | 26 | let decimalsMultPrice = ((100 * 1000) * 1000) | |
25 | 27 | ||
67 | 69 | ||
68 | 70 | let validPoolLabels = [poolLabelWxEmission] | |
69 | 71 | ||
72 | + | func wrapErr (msg) = makeString([contractFilename, ": ", msg], "") | |
73 | + | ||
74 | + | ||
75 | + | func throwErr (msg) = throw(wrapErr(msg)) | |
76 | + | ||
77 | + | ||
70 | 78 | func keyAllowedLpScriptHash () = "%s__allowedLpScriptHash" | |
71 | 79 | ||
72 | 80 | ||
109 | 117 | func keyVotingEmissionContract () = "%s__votingEmissionContract" | |
110 | 118 | ||
111 | 119 | ||
120 | + | func keyUserPoolsContract () = "%s__userPoolsContract" | |
121 | + | ||
122 | + | ||
112 | 123 | func keyPriceAssets () = makeString(["%s", "priceAssets"], SEP) | |
113 | 124 | ||
114 | 125 | ||
137 | 148 | ||
138 | 149 | ||
139 | 150 | func keyPoolOneTokenOperationsDisabled (assetsInternal) = { | |
140 | - | let $ | |
141 | - | let amountAssetInternal = $ | |
142 | - | let priceAssetInternal = $ | |
151 | + | let $t038783940 = assetsInternal | |
152 | + | let amountAssetInternal = $t038783940._1 | |
153 | + | let priceAssetInternal = $t038783940._2 | |
143 | 154 | makeString(["%d%d%s", toString(amountAssetInternal), toString(priceAssetInternal), "oneTokenOperationsDisabled"], SEP) | |
144 | 155 | } | |
145 | 156 | ||
298 | 309 | } | |
299 | 310 | ||
300 | 311 | ||
301 | - | let permissionDeniedError = | |
312 | + | let permissionDeniedError = throwErr("Permission denied") | |
302 | 313 | ||
303 | - | let testError = | |
314 | + | let testError = throwErr("Test error here") | |
304 | 315 | ||
305 | 316 | func mustThis (i) = if ((i.caller == this)) | |
306 | 317 | then true | |
388 | 399 | } | |
389 | 400 | ||
390 | 401 | ||
402 | + | func getAssetsDataFromPoolAddress (poolContractAddress) = { | |
403 | + | let poolAssets = match getString(keyMappingPoolContractAddressToPoolAssets(poolContractAddress)) { | |
404 | + | case s: String => | |
405 | + | split(s, SEP) | |
406 | + | case _ => | |
407 | + | throwErr(makeString([poolContractAddress, "pool is not found"], " ")) | |
408 | + | } | |
409 | + | let amountAssetInternal = parseIntValue(poolAssets[1]) | |
410 | + | let priceAssetInternal = parseIntValue(poolAssets[2]) | |
411 | + | let amountAssetId = getStringValue(keyMappingsInternal2baseAssetId(amountAssetInternal)) | |
412 | + | let priceAssetId = getStringValue(keyMappingsInternal2baseAssetId(priceAssetInternal)) | |
413 | + | let lpAssetId = getStringValue(keyMappingPoolContractToLPAsset(poolContractAddress)) | |
414 | + | $Tuple5(amountAssetId, priceAssetId, lpAssetId, amountAssetInternal, priceAssetInternal) | |
415 | + | } | |
416 | + | ||
417 | + | ||
418 | + | func getPoolCreator (poolContractAddress) = { | |
419 | + | let $t01516615303 = getAssetsDataFromPoolAddress(poolContractAddress) | |
420 | + | let amountAssetId = $t01516615303._1 | |
421 | + | let priceAssetId = $t01516615303._2 | |
422 | + | let lpAssetId = $t01516615303._3 | |
423 | + | let amountAssetInternal = $t01516615303._4 | |
424 | + | let priceAssetInternal = $t01516615303._5 | |
425 | + | let userPoolsContract = addressFromStringValue(getStringValue(keyUserPoolsContract())) | |
426 | + | let poolCreator = invoke(userPoolsContract, "getPoolCreatorREADONLY", [amountAssetId, priceAssetId], nil) | |
427 | + | poolCreator | |
428 | + | } | |
429 | + | ||
430 | + | ||
431 | + | func getAddressBalance (addressString,assetIdString) = { | |
432 | + | let address = addressFromStringValue(addressString) | |
433 | + | if ((assetIdString == "WAVES")) | |
434 | + | then wavesBalance(address).regular | |
435 | + | else { | |
436 | + | let assetId = fromBase58String(assetIdString) | |
437 | + | assetBalance(address, assetId) | |
438 | + | } | |
439 | + | } | |
440 | + | ||
441 | + | ||
442 | + | func isPoolEmpty (poolContractAddress) = { | |
443 | + | let $t01587816015 = getAssetsDataFromPoolAddress(poolContractAddress) | |
444 | + | let amountAssetId = $t01587816015._1 | |
445 | + | let priceAssetId = $t01587816015._2 | |
446 | + | let lpAssetId = $t01587816015._3 | |
447 | + | let amountAssetInternal = $t01587816015._4 | |
448 | + | let priceAssetInternal = $t01587816015._5 | |
449 | + | if ((getAddressBalance(poolContractAddress, amountAssetId) == 0)) | |
450 | + | then (getAddressBalance(poolContractAddress, priceAssetId) == 0) | |
451 | + | else false | |
452 | + | } | |
453 | + | ||
454 | + | ||
391 | 455 | @Callable(i) | |
392 | 456 | func getSwapContractREADONLY () = $Tuple2(nil, getStringOrFail(swapContract())) | |
393 | 457 | ||
395 | 459 | ||
396 | 460 | @Callable(i) | |
397 | 461 | func getPoolLeaseConfigREADONLY (poolAddress,assetId) = { | |
398 | - | let $ | |
462 | + | let $t01633016634 = match getInteger(this, keyLeasedRatio(poolAddress, assetId)) { | |
399 | 463 | case r: Int => | |
400 | 464 | $Tuple2(true, min([100, max([0, r])])) | |
401 | 465 | case _ => | |
406 | 470 | $Tuple2(false, 0) | |
407 | 471 | } | |
408 | 472 | } | |
409 | - | let isLeasable = $ | |
410 | - | let leasedRatio = $ | |
473 | + | let isLeasable = $t01633016634._1 | |
474 | + | let leasedRatio = $t01633016634._2 | |
411 | 475 | let minBalance = match getInteger(this, keyMinBalance(poolAddress, assetId)) { | |
412 | 476 | case b: Int => | |
413 | 477 | max([0, b]) | |
419 | 483 | 0 | |
420 | 484 | } | |
421 | 485 | } | |
422 | - | let $ | |
486 | + | let $t01690017124 = if ((assetId == "WAVES")) | |
423 | 487 | then $Tuple3(valueOrElse(getString(this, keySWavesProxyAddress()), ""), getString(this, valueOrElse(keySWavesAssetId(), "")), MULT12) | |
424 | 488 | else $Tuple3("", "", 0) | |
425 | - | let proxyAddress = $ | |
426 | - | let proxyAssetId = $ | |
427 | - | let proxyRateMul = $ | |
489 | + | let proxyAddress = $t01690017124._1 | |
490 | + | let proxyAssetId = $t01690017124._2 | |
491 | + | let proxyRateMul = $t01690017124._3 | |
428 | 492 | let stakingProfitAddress = valueOrElse(getString(this, keyStakingProfitAddress()), "") | |
429 | 493 | $Tuple2(nil, $Tuple7(isLeasable, leasedRatio, minBalance, proxyAddress, proxyAssetId, proxyRateMul, stakingProfitAddress)) | |
430 | 494 | } | |
538 | 602 | let checkCaller = mustAdmin(i) | |
539 | 603 | if ((checkCaller == checkCaller)) | |
540 | 604 | then if (isDefined(getString(keyMappingPoolContractAddressToPoolAssets(poolAddress)))) | |
541 | - | then | |
605 | + | then throwErr((("Pool address " + poolAddress) + " already registered.")) | |
542 | 606 | else { | |
543 | 607 | let internalAmountAssetData = getInternalAssetIdOrCreate(amountAssetStr, 1) | |
544 | 608 | let internalAmountAssetId = internalAmountAssetData._1 | |
550 | 614 | let ethalonPoolAccountScriptHash = getBinaryValue(keyPoolScriptHash()) | |
551 | 615 | let poolExists = poolExistsInternal(amountAssetStr, priceAssetStr) | |
552 | 616 | if (poolExists) | |
553 | - | then | |
617 | + | then throwErr((((("Pool " + amountAssetStr) + "/") + priceAssetStr) + " has already been activated.")) | |
554 | 618 | else { | |
555 | 619 | let poolConfigValue = value(getString(this, keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId)))) | |
556 | 620 | let amountAssetsDecimals = if ((amountAssetStr == "WAVES")) | |
565 | 629 | let poolActivateInvokeResult = invoke(addressFromStringValue(poolAddress), "activate", [amountAssetStr, priceAssetStr], nil) | |
566 | 630 | if ((poolActivateInvokeResult == poolActivateInvokeResult)) | |
567 | 631 | then if ((poolActivateInvokeResult != "success")) | |
568 | - | then | |
632 | + | then throwErr("Pool initialisation error happened.") | |
569 | 633 | else { | |
570 | 634 | let assetsStoreContract = addressFromStringValue(getStringOrFail(keyAssetsStoreContract())) | |
571 | 635 | let createOrUpdateLpAssetInv = invoke(assetsStoreContract, "createOrUpdate", [lpAssetIdStr, lpAssetName, false], nil) | |
650 | 714 | let inAmountAssetId = toBase58String(value(payment.assetId)) | |
651 | 715 | let lpAssetRequestedForBurning = valueOrErrorMessage(getString(keyMappingPoolContractToLPAsset(toString(caller))), "Invalid LP address called me.") | |
652 | 716 | if ((inAmountAssetId != lpAssetRequestedForBurning)) | |
653 | - | then | |
717 | + | then throwErr("Invalid asset passed.") | |
654 | 718 | else if ((amountToBurn != paymentAmount)) | |
655 | - | then | |
719 | + | then throwErr("Invalid amount passed.") | |
656 | 720 | else { | |
657 | 721 | let lpAsset = fromBase58String(lpAssetRequestedForBurning) | |
658 | 722 | $Tuple2([Burn(lpAsset, amountToBurn)], "success") | |
716 | 780 | let btcWeightNew = (btcWeight - weightDecrement) | |
717 | 781 | let ethWeightNew = (ethWeight - weightDecrement) | |
718 | 782 | if ((0 >= btcWeightNew)) | |
719 | - | then | |
783 | + | then throwErr(("invalid btcWeightNew: " + toString(btcWeightNew))) | |
720 | 784 | else if ((0 >= ethWeightNew)) | |
721 | - | then | |
785 | + | then throwErr(("invalid ethWeightNew: " + toString(ethWeightNew))) | |
722 | 786 | else { | |
723 | 787 | let btcLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(btcPoolAddress)) | |
724 | 788 | let ethLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(ethPoolAddress)) | |
795 | 859 | let priceAssets = getPriceAssets() | |
796 | 860 | let checkPriceAssetsSize = if ((size(priceAssets) > 0)) | |
797 | 861 | then true | |
798 | - | else | |
862 | + | else throwErr("invalid price assets") | |
799 | 863 | if ((checkPriceAssetsSize == checkPriceAssetsSize)) | |
800 | 864 | then { | |
801 | 865 | func cb (acc,priceAsset) = { | |
939 | 1003 | } | |
940 | 1004 | ||
941 | 1005 | ||
1006 | + | ||
1007 | + | @Callable(i) | |
1008 | + | func deletePool (poolContractAddress) = { | |
1009 | + | let poolConfig = getPoolConfig(poolContractAddress) | |
1010 | + | let checkCaller = if ((toString(i.caller) == getPoolCreator(poolContractAddress))) | |
1011 | + | then if (isPoolEmpty(poolContractAddress)) | |
1012 | + | then true | |
1013 | + | else throwErr("Pool is not empty") | |
1014 | + | else mustManager(i) | |
1015 | + | if ((checkCaller == checkCaller)) | |
1016 | + | then { | |
1017 | + | let checkWeight = if ((valueOrElse(getInteger(keyPoolToWeight(poolContractAddress)), 0) == 0)) | |
1018 | + | then true | |
1019 | + | else throwErr("Pool weight is not Zero") | |
1020 | + | if ((checkWeight == checkWeight)) | |
1021 | + | then { | |
1022 | + | let checkStatus = if ((poolConfig[idxPoolStatus] == toString(PoolShutdown))) | |
1023 | + | then true | |
1024 | + | else throwErr("Pool must be SHUTDOWN (4)") | |
1025 | + | if ((checkStatus == checkStatus)) | |
1026 | + | then { | |
1027 | + | let $t03911639253 = getAssetsDataFromPoolAddress(poolContractAddress) | |
1028 | + | let amountAssetId = $t03911639253._1 | |
1029 | + | let priceAssetId = $t03911639253._2 | |
1030 | + | let lpAssetId = $t03911639253._3 | |
1031 | + | let amountAssetInternal = $t03911639253._4 | |
1032 | + | let priceAssetInternal = $t03911639253._5 | |
1033 | + | let userPoolsContract = addressFromStringValue(getStringValue(keyUserPoolsContract())) | |
1034 | + | let userPoolsInvoke = invoke(userPoolsContract, "deletePool", [amountAssetId, priceAssetId], nil) | |
1035 | + | if ((userPoolsInvoke == userPoolsInvoke)) | |
1036 | + | then { | |
1037 | + | let votingEmissionContract = addressFromStringValue(getStringValue(keyVotingEmissionContract())) | |
1038 | + | let votingEmissionInvoke = invoke(votingEmissionContract, "deletePool", [amountAssetId, priceAssetId], nil) | |
1039 | + | if ((votingEmissionInvoke == votingEmissionInvoke)) | |
1040 | + | then { | |
1041 | + | let assetsStoreContract = addressFromStringValue(getStringValue(keyAssetsStoreContract())) | |
1042 | + | let assetsStoreInvoke = invoke(assetsStoreContract, "deletePool", [amountAssetId, priceAssetId], nil) | |
1043 | + | if ((assetsStoreInvoke == assetsStoreInvoke)) | |
1044 | + | then [DeleteEntry(keyMappingPoolContractToLPAsset(poolContractAddress)), DeleteEntry(keyMappingPoolContractAddressToPoolAssets(poolContractAddress)), DeleteEntry(keyMappingPoolAssetsToLpasset(toString(amountAssetInternal), toString(priceAssetInternal))), DeleteEntry(keyMappingPoolAssetsToPoolContractAddress(amountAssetInternal, priceAssetInternal)), DeleteEntry(keyPoolConfig(toString(amountAssetInternal), toString(priceAssetInternal))), DeleteEntry(keyMappingLpAssetToPoolAssets(lpAssetId)), DeleteEntry(keyMappingPoolLPAssetToPoolContractAddress(lpAssetId)), DeleteEntry(keyWxEmission(amountAssetId, priceAssetId)), DeleteEntry(keyPoolToWeight(poolContractAddress)), DeleteEntry(keyPoolSpread(poolContractAddress)), DeleteEntry(keyInFee(poolContractAddress)), DeleteEntry(keyOutFee(poolContractAddress)), DeleteEntry(keySkipOrderValidation(poolContractAddress)), DeleteEntry(keyChangeAmpDelay(poolContractAddress)), DeleteEntry(keyChangeAmpDelta(poolContractAddress)), DeleteEntry(keyChangeAmpTarget(poolContractAddress))] | |
1045 | + | else throw("Strict value is not equal to itself.") | |
1046 | + | } | |
1047 | + | else throw("Strict value is not equal to itself.") | |
1048 | + | } | |
1049 | + | else throw("Strict value is not equal to itself.") | |
1050 | + | } | |
1051 | + | else throw("Strict value is not equal to itself.") | |
1052 | + | } | |
1053 | + | else throw("Strict value is not equal to itself.") | |
1054 | + | } | |
1055 | + | else throw("Strict value is not equal to itself.") | |
1056 | + | } | |
1057 | + | ||
1058 | + | ||
942 | 1059 | @Verifier(tx) | |
943 | 1060 | func verify () = { | |
944 | 1061 | let targetPublicKey = match managerPublicKeyOrUnit() { |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SCALE8 = 8 | |
5 | 5 | ||
6 | 6 | let MULT8 = 100000000 | |
7 | 7 | ||
8 | 8 | let MULT12 = 1000000000000 | |
9 | 9 | ||
10 | 10 | let SCALE18 = 18 | |
11 | 11 | ||
12 | 12 | let MULT18 = toBigInt(1000000000000000000) | |
13 | 13 | ||
14 | 14 | let POOLWEIGHTMULT = MULT8 | |
15 | 15 | ||
16 | 16 | let GWXvirtualPOOL = "GWXvirtualPOOL" | |
17 | 17 | ||
18 | 18 | let labelPoolsLp = "POOLS_LP" | |
19 | 19 | ||
20 | 20 | let defaultSpread = 2000000 | |
21 | 21 | ||
22 | 22 | let wavesString = "WAVES" | |
23 | + | ||
24 | + | let contractFilename = "factory_v2.ride" | |
23 | 25 | ||
24 | 26 | let decimalsMultPrice = ((100 * 1000) * 1000) | |
25 | 27 | ||
26 | 28 | let SEP = "__" | |
27 | 29 | ||
28 | 30 | let EMPTY = "" | |
29 | 31 | ||
30 | 32 | let PoolActive = 1 | |
31 | 33 | ||
32 | 34 | let PoolPutDisabled = 2 | |
33 | 35 | ||
34 | 36 | let PoolMatcherDisabled = 3 | |
35 | 37 | ||
36 | 38 | let PoolShutdown = 4 | |
37 | 39 | ||
38 | 40 | let idxInternalAssetId = 1 | |
39 | 41 | ||
40 | 42 | let idxResutActions = 2 | |
41 | 43 | ||
42 | 44 | let idxIfAssetIdCalculationPerformed = 3 | |
43 | 45 | ||
44 | 46 | let idxPoolAddress = 1 | |
45 | 47 | ||
46 | 48 | let idxPoolStatus = 2 | |
47 | 49 | ||
48 | 50 | let idxPoolLPAssetId = 3 | |
49 | 51 | ||
50 | 52 | let idxAmtAssetId = 4 | |
51 | 53 | ||
52 | 54 | let idxPriceAssetId = 5 | |
53 | 55 | ||
54 | 56 | let idxAmtAssetDcm = 6 | |
55 | 57 | ||
56 | 58 | let idxPriceAssetDcm = 7 | |
57 | 59 | ||
58 | 60 | let idxIAmtAssetId = 8 | |
59 | 61 | ||
60 | 62 | let idxIPriceAssetId = 9 | |
61 | 63 | ||
62 | 64 | let idxLPAssetDcm = 10 | |
63 | 65 | ||
64 | 66 | let idxPoolType = 11 | |
65 | 67 | ||
66 | 68 | let poolLabelWxEmission = "WX_EMISSION" | |
67 | 69 | ||
68 | 70 | let validPoolLabels = [poolLabelWxEmission] | |
69 | 71 | ||
72 | + | func wrapErr (msg) = makeString([contractFilename, ": ", msg], "") | |
73 | + | ||
74 | + | ||
75 | + | func throwErr (msg) = throw(wrapErr(msg)) | |
76 | + | ||
77 | + | ||
70 | 78 | func keyAllowedLpScriptHash () = "%s__allowedLpScriptHash" | |
71 | 79 | ||
72 | 80 | ||
73 | 81 | func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash" | |
74 | 82 | ||
75 | 83 | ||
76 | 84 | func swapContract () = "%s__swapContract" | |
77 | 85 | ||
78 | 86 | ||
79 | 87 | func keyFactoryConfig () = "%s__factoryConfig" | |
80 | 88 | ||
81 | 89 | ||
82 | 90 | func keyLpTokensList () = "%s__lpTokensList" | |
83 | 91 | ||
84 | 92 | ||
85 | 93 | func keyPoolScriptHash () = "%s%s__pool__scriptHash" | |
86 | 94 | ||
87 | 95 | ||
88 | 96 | func keyMatcherPub () = "%s%s__matcher__publicKey" | |
89 | 97 | ||
90 | 98 | ||
91 | 99 | func keyLegacyFactoryContract () = "%s__legacyFactoryContract" | |
92 | 100 | ||
93 | 101 | ||
94 | 102 | func keyLegacyPools () = "%s__legacyPools" | |
95 | 103 | ||
96 | 104 | ||
97 | 105 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
98 | 106 | ||
99 | 107 | ||
100 | 108 | func keyManagerVaultAddress () = "%s__managerVaultAddress" | |
101 | 109 | ||
102 | 110 | ||
103 | 111 | func keyAdminPubKeys () = "%s__adminPubKeys" | |
104 | 112 | ||
105 | 113 | ||
106 | 114 | func keyAssetsStoreContract () = "%s__assetsStoreContract" | |
107 | 115 | ||
108 | 116 | ||
109 | 117 | func keyVotingEmissionContract () = "%s__votingEmissionContract" | |
110 | 118 | ||
111 | 119 | ||
120 | + | func keyUserPoolsContract () = "%s__userPoolsContract" | |
121 | + | ||
122 | + | ||
112 | 123 | func keyPriceAssets () = makeString(["%s", "priceAssets"], SEP) | |
113 | 124 | ||
114 | 125 | ||
115 | 126 | func keyPriceDecimals () = "%s__priceDecimals" | |
116 | 127 | ||
117 | 128 | ||
118 | 129 | func keyAllPoolsShutdown () = "%s__shutdown" | |
119 | 130 | ||
120 | 131 | ||
121 | 132 | func keyNextInternalAssetId () = "%s__nextInternalAssetId" | |
122 | 133 | ||
123 | 134 | ||
124 | 135 | func keyPoolToWeight (poolAddress) = ("%s%s__poolWeight__" + poolAddress) | |
125 | 136 | ||
126 | 137 | ||
127 | 138 | func keyPoolToWeightHistory (poolAddress,num) = ((("%s%s__poolWeight__" + poolAddress) + "__") + toString(num)) | |
128 | 139 | ||
129 | 140 | ||
130 | 141 | func keyMappingsInternal2baseAssetId (internalBaseAsset) = ("%s%s%d__mappings__internal2baseAssetId__" + toString(internalBaseAsset)) | |
131 | 142 | ||
132 | 143 | ||
133 | 144 | func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr) | |
134 | 145 | ||
135 | 146 | ||
136 | 147 | func keyPoolConfig (amountAssetInternal,priceAssetInternal) = (((("%d%d%s__" + amountAssetInternal) + "__") + priceAssetInternal) + "__config") | |
137 | 148 | ||
138 | 149 | ||
139 | 150 | func keyPoolOneTokenOperationsDisabled (assetsInternal) = { | |
140 | - | let $ | |
141 | - | let amountAssetInternal = $ | |
142 | - | let priceAssetInternal = $ | |
151 | + | let $t038783940 = assetsInternal | |
152 | + | let amountAssetInternal = $t038783940._1 | |
153 | + | let priceAssetInternal = $t038783940._2 | |
143 | 154 | makeString(["%d%d%s", toString(amountAssetInternal), toString(priceAssetInternal), "oneTokenOperationsDisabled"], SEP) | |
144 | 155 | } | |
145 | 156 | ||
146 | 157 | ||
147 | 158 | func keyAllPoolsOneTokenOperationsDisabled () = makeString(["%s", "oneTokenOperationsDisabled"], SEP) | |
148 | 159 | ||
149 | 160 | ||
150 | 161 | func keyMappingLpAssetToPoolAssets (lpAssetStr) = (("%s%s%s__" + lpAssetStr) + "__mappings__lpAsset2Pool") | |
151 | 162 | ||
152 | 163 | ||
153 | 164 | func keyMappingPoolAssetsToLpasset (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + internalAmountAssetIdStr) + "__") + internalPriceAssetIdStr) + "__mappings__PoolAssets2LpAsset") | |
154 | 165 | ||
155 | 166 | ||
156 | 167 | func keyPoolSpread (poolAddress) = ("%s%s__spread__" + poolAddress) | |
157 | 168 | ||
158 | 169 | ||
159 | 170 | func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2PoolAssets") | |
160 | 171 | ||
161 | 172 | ||
162 | 173 | func keyMappingPoolAssetsToPoolContractAddress (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + toString(internalAmountAssetIdStr)) + "__") + toString(internalPriceAssetIdStr)) + "__mappings__poolAssets2PoolContract") | |
163 | 174 | ||
164 | 175 | ||
165 | 176 | func keyMappingPoolContractToLPAsset (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset") | |
166 | 177 | ||
167 | 178 | ||
168 | 179 | func keyMappingPoolLPAssetToPoolContractAddress (lpAssetStr) = (("%s%s%s__" + lpAssetStr) + "__mappings__lpAsset2PoolContract") | |
169 | 180 | ||
170 | 181 | ||
171 | 182 | func keyWxEmission (amountAssetId,priceAssetId) = ((("%s%s%s__wxEmission__" + amountAssetId) + "__") + priceAssetId) | |
172 | 183 | ||
173 | 184 | ||
174 | 185 | func keyInFee (poolAddress) = ("%s%s__inFee__" + poolAddress) | |
175 | 186 | ||
176 | 187 | ||
177 | 188 | func keyInFeeDefault () = "%s__inFeeDefault" | |
178 | 189 | ||
179 | 190 | ||
180 | 191 | func keyOutFee (poolAddress) = ("%s%s__outFee__" + poolAddress) | |
181 | 192 | ||
182 | 193 | ||
183 | 194 | func keyOutFeeDefault () = "%s__outFeeDefault" | |
184 | 195 | ||
185 | 196 | ||
186 | 197 | func keySkipOrderValidation (poolAddress) = ("%s%s__skipOrderValidation__" + poolAddress) | |
187 | 198 | ||
188 | 199 | ||
189 | 200 | func keyChangeAmpDelay (poolAddress) = ("%s%s__changeAmpDelay__" + poolAddress) | |
190 | 201 | ||
191 | 202 | ||
192 | 203 | func keyChangeAmpDelta (poolAddress) = ("%s%s__changeAmpDelta__" + poolAddress) | |
193 | 204 | ||
194 | 205 | ||
195 | 206 | func keyChangeAmpTarget (poolAddress) = ("%s%s__changeAmpTarget__" + poolAddress) | |
196 | 207 | ||
197 | 208 | ||
198 | 209 | func keySWavesProxyAddress () = "%s__sWavesProxyAddress" | |
199 | 210 | ||
200 | 211 | ||
201 | 212 | func keySWavesAssetId () = "%s__sWavesAssetId" | |
202 | 213 | ||
203 | 214 | ||
204 | 215 | func keyStakingProfitAddress () = "%s__stakingProfitAddress" | |
205 | 216 | ||
206 | 217 | ||
207 | 218 | func keyLeasedRatio (poolAddress,assetId) = makeString(["%s%s%s", "leasedRatio", poolAddress, assetId], SEP) | |
208 | 219 | ||
209 | 220 | ||
210 | 221 | func keyLeasedRatioDefault (assetId) = makeString(["%s%s", "leasedRatioDefault", assetId], SEP) | |
211 | 222 | ||
212 | 223 | ||
213 | 224 | func keyLeasedRatioTolerance (poolAddress,assetId) = makeString(["%s%s%s", "leasedRatioTolerance", poolAddress, assetId], SEP) | |
214 | 225 | ||
215 | 226 | ||
216 | 227 | func keyMinBalance (poolAddress,assetId) = makeString(["%s%s%s", "minBalance", poolAddress, assetId], SEP) | |
217 | 228 | ||
218 | 229 | ||
219 | 230 | func keyMinBalanceDefault (assetId) = makeString(["%s%s", "minBalanceDefault", assetId], SEP) | |
220 | 231 | ||
221 | 232 | ||
222 | 233 | func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), ("No data for this.key=" + key)) | |
223 | 234 | ||
224 | 235 | ||
225 | 236 | func getBooleanOrFail (key) = valueOrErrorMessage(getBoolean(this, key), ("No data for this.key=" + key)) | |
226 | 237 | ||
227 | 238 | ||
228 | 239 | func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), ("No data for this.key=" + key)) | |
229 | 240 | ||
230 | 241 | ||
231 | 242 | func parseAssetId (input) = if ((input == wavesString)) | |
232 | 243 | then unit | |
233 | 244 | else fromBase58String(input) | |
234 | 245 | ||
235 | 246 | ||
236 | 247 | func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) { | |
237 | 248 | case s: String => | |
238 | 249 | addressFromStringValue(s) | |
239 | 250 | case _ => | |
240 | 251 | this | |
241 | 252 | } | |
242 | 253 | ||
243 | 254 | ||
244 | 255 | let IdxFactoryCfgStakingDapp = 1 | |
245 | 256 | ||
246 | 257 | let IdxFactoryCfgBoostingDapp = 2 | |
247 | 258 | ||
248 | 259 | let IdxFactoryCfgIdoDapp = 3 | |
249 | 260 | ||
250 | 261 | let IdxFactoryCfgTeamDapp = 4 | |
251 | 262 | ||
252 | 263 | let IdxFactoryCfgEmissionDapp = 5 | |
253 | 264 | ||
254 | 265 | let IdxFactoryCfgRestDapp = 6 | |
255 | 266 | ||
256 | 267 | let IdxFactoryCfgSlippageDapp = 7 | |
257 | 268 | ||
258 | 269 | let IdxFactoryCfgDaoDapp = 8 | |
259 | 270 | ||
260 | 271 | let IdxFactoryCfgMarketingDapp = 9 | |
261 | 272 | ||
262 | 273 | let IdxFactoryCfgGwxRewardDapp = 10 | |
263 | 274 | ||
264 | 275 | let IdxFactoryCfgBirdsDapp = 11 | |
265 | 276 | ||
266 | 277 | func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp]) | |
267 | 278 | ||
268 | 279 | ||
269 | 280 | func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp]) | |
270 | 281 | ||
271 | 282 | ||
272 | 283 | func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp]) | |
273 | 284 | ||
274 | 285 | ||
275 | 286 | func getGwxRewardAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgGwxRewardDapp]) | |
276 | 287 | ||
277 | 288 | ||
278 | 289 | func getPriceAssets () = match getString(keyPriceAssets()) { | |
279 | 290 | case s: String => | |
280 | 291 | if ((size(s) == 0)) | |
281 | 292 | then nil | |
282 | 293 | else split(s, SEP) | |
283 | 294 | case _ => | |
284 | 295 | nil | |
285 | 296 | } | |
286 | 297 | ||
287 | 298 | ||
288 | 299 | func managerPublicKeyOrUnit () = { | |
289 | 300 | let managerVaultAddress = getManagerVaultAddressOrThis() | |
290 | 301 | match getString(managerVaultAddress, keyManagerPublicKey()) { | |
291 | 302 | case s: String => | |
292 | 303 | fromBase58String(s) | |
293 | 304 | case _: Unit => | |
294 | 305 | unit | |
295 | 306 | case _ => | |
296 | 307 | throw("Match error") | |
297 | 308 | } | |
298 | 309 | } | |
299 | 310 | ||
300 | 311 | ||
301 | - | let permissionDeniedError = | |
312 | + | let permissionDeniedError = throwErr("Permission denied") | |
302 | 313 | ||
303 | - | let testError = | |
314 | + | let testError = throwErr("Test error here") | |
304 | 315 | ||
305 | 316 | func mustThis (i) = if ((i.caller == this)) | |
306 | 317 | then true | |
307 | 318 | else permissionDeniedError | |
308 | 319 | ||
309 | 320 | ||
310 | 321 | func mustManager (i) = match managerPublicKeyOrUnit() { | |
311 | 322 | case pk: ByteVector => | |
312 | 323 | if ((i.callerPublicKey == pk)) | |
313 | 324 | then true | |
314 | 325 | else permissionDeniedError | |
315 | 326 | case _: Unit => | |
316 | 327 | mustThis(i) | |
317 | 328 | case _ => | |
318 | 329 | throw("Match error") | |
319 | 330 | } | |
320 | 331 | ||
321 | 332 | ||
322 | 333 | func dataFactoryCfgV3 (stakingAddress,boostingAddress,idoContract,teamContract,emissionContract,restContract,slippageContract,daoContract,marketingContract,gwxRewardsContract,birdsContract) = makeString(["%s%s%s%s%s%s%s%s%s%s%s", stakingAddress, boostingAddress, idoContract, teamContract, emissionContract, restContract, slippageContract, daoContract, marketingContract, gwxRewardsContract, birdsContract], SEP) | |
323 | 334 | ||
324 | 335 | ||
325 | 336 | func dataFactoryCfg (stakingAddress,boostingAddress,idoContract,teamContract,emissionContract,restContract,slippageContract) = makeString(["%s%s%s%s%s%s", stakingAddress, boostingAddress, idoContract, teamContract, emissionContract, restContract, slippageContract], SEP) | |
326 | 337 | ||
327 | 338 | ||
328 | 339 | func dataPoolCfg (poolAddress,poolStatus,lpAssetId,amountAssetStr,priceAssetStr,amountAssetDecimals,priceAssetDecimals,amountAssetInternalId,priceAssetInternalId,lpAssetDecimals,poolType) = makeString(["%s%d%s%s%s%d%d%d%d%d%s", poolAddress, poolStatus, lpAssetId, amountAssetStr, priceAssetStr, toString(amountAssetDecimals), toString(priceAssetDecimals), toString(amountAssetInternalId), toString(priceAssetInternalId), toString(lpAssetDecimals), poolType], SEP) | |
329 | 340 | ||
330 | 341 | ||
331 | 342 | func dataMappingPoolAssets (internalAmountAssetStr,internalPriceAssetStr) = makeString(["%d%d", toString(internalAmountAssetStr), toString(internalPriceAssetStr)], SEP) | |
332 | 343 | ||
333 | 344 | ||
334 | 345 | func getPoolConfig (poolAddress) = { | |
335 | 346 | let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolAddress)), SEP) | |
336 | 347 | let amountAssetInternal = poolAssets[1] | |
337 | 348 | let priceAssetInternal = poolAssets[2] | |
338 | 349 | split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP) | |
339 | 350 | } | |
340 | 351 | ||
341 | 352 | ||
342 | 353 | func getInternalAssetIdOrCreate (assetIdStr,incrementor) = { | |
343 | 354 | let internalAssetId = valueOrElse(getInteger(this, keyMappingsBaseAsset2internalId(assetIdStr)), 0) | |
344 | 355 | let currentIndexOfInternalId = valueOrElse(getInteger(this, keyNextInternalAssetId()), 0) | |
345 | 356 | let result = if ((internalAssetId == 0)) | |
346 | 357 | then { | |
347 | 358 | let newInternalAssetId = (currentIndexOfInternalId + incrementor) | |
348 | 359 | $Tuple3(newInternalAssetId, [IntegerEntry(keyNextInternalAssetId(), newInternalAssetId), IntegerEntry(keyMappingsBaseAsset2internalId(assetIdStr), newInternalAssetId), StringEntry(keyMappingsInternal2baseAssetId(newInternalAssetId), assetIdStr)], true) | |
349 | 360 | } | |
350 | 361 | else $Tuple3(internalAssetId, nil, false) | |
351 | 362 | result | |
352 | 363 | } | |
353 | 364 | ||
354 | 365 | ||
355 | 366 | func mustAdmin (i) = { | |
356 | 367 | let adminPKs = split(valueOrElse(getString(keyAdminPubKeys()), EMPTY), SEP) | |
357 | 368 | if (containsElement(adminPKs, toBase58String(i.callerPublicKey))) | |
358 | 369 | then true | |
359 | 370 | else { | |
360 | 371 | let isManager = mustManager(i) | |
361 | 372 | if ((isManager == isManager)) | |
362 | 373 | then true | |
363 | 374 | else throw("Strict value is not equal to itself.") | |
364 | 375 | } | |
365 | 376 | } | |
366 | 377 | ||
367 | 378 | ||
368 | 379 | func intOrDefaultOrFallback (key,keyDefault,valueFallback) = valueOrElse(getInteger(this, key), valueOrElse(getInteger(this, keyDefault), valueFallback)) | |
369 | 380 | ||
370 | 381 | ||
371 | 382 | func poolExistsInternal (amountAssetId,priceAssetId) = { | |
372 | 383 | let amountAssetInternal = getInteger(keyMappingsBaseAsset2internalId(amountAssetId)) | |
373 | 384 | let priceAssetInternal = getInteger(keyMappingsBaseAsset2internalId(priceAssetId)) | |
374 | 385 | if (if ((amountAssetInternal == unit)) | |
375 | 386 | then true | |
376 | 387 | else (priceAssetInternal == unit)) | |
377 | 388 | then false | |
378 | 389 | else { | |
379 | 390 | let amAs = toString(value(amountAssetInternal)) | |
380 | 391 | let prAs = toString(value(priceAssetInternal)) | |
381 | 392 | let cfg = getString(keyPoolConfig(amAs, prAs)) | |
382 | 393 | let cfgReverse = getString(keyPoolConfig(prAs, amAs)) | |
383 | 394 | let exists = if ((cfg != unit)) | |
384 | 395 | then true | |
385 | 396 | else (cfgReverse != unit) | |
386 | 397 | exists | |
387 | 398 | } | |
388 | 399 | } | |
389 | 400 | ||
390 | 401 | ||
402 | + | func getAssetsDataFromPoolAddress (poolContractAddress) = { | |
403 | + | let poolAssets = match getString(keyMappingPoolContractAddressToPoolAssets(poolContractAddress)) { | |
404 | + | case s: String => | |
405 | + | split(s, SEP) | |
406 | + | case _ => | |
407 | + | throwErr(makeString([poolContractAddress, "pool is not found"], " ")) | |
408 | + | } | |
409 | + | let amountAssetInternal = parseIntValue(poolAssets[1]) | |
410 | + | let priceAssetInternal = parseIntValue(poolAssets[2]) | |
411 | + | let amountAssetId = getStringValue(keyMappingsInternal2baseAssetId(amountAssetInternal)) | |
412 | + | let priceAssetId = getStringValue(keyMappingsInternal2baseAssetId(priceAssetInternal)) | |
413 | + | let lpAssetId = getStringValue(keyMappingPoolContractToLPAsset(poolContractAddress)) | |
414 | + | $Tuple5(amountAssetId, priceAssetId, lpAssetId, amountAssetInternal, priceAssetInternal) | |
415 | + | } | |
416 | + | ||
417 | + | ||
418 | + | func getPoolCreator (poolContractAddress) = { | |
419 | + | let $t01516615303 = getAssetsDataFromPoolAddress(poolContractAddress) | |
420 | + | let amountAssetId = $t01516615303._1 | |
421 | + | let priceAssetId = $t01516615303._2 | |
422 | + | let lpAssetId = $t01516615303._3 | |
423 | + | let amountAssetInternal = $t01516615303._4 | |
424 | + | let priceAssetInternal = $t01516615303._5 | |
425 | + | let userPoolsContract = addressFromStringValue(getStringValue(keyUserPoolsContract())) | |
426 | + | let poolCreator = invoke(userPoolsContract, "getPoolCreatorREADONLY", [amountAssetId, priceAssetId], nil) | |
427 | + | poolCreator | |
428 | + | } | |
429 | + | ||
430 | + | ||
431 | + | func getAddressBalance (addressString,assetIdString) = { | |
432 | + | let address = addressFromStringValue(addressString) | |
433 | + | if ((assetIdString == "WAVES")) | |
434 | + | then wavesBalance(address).regular | |
435 | + | else { | |
436 | + | let assetId = fromBase58String(assetIdString) | |
437 | + | assetBalance(address, assetId) | |
438 | + | } | |
439 | + | } | |
440 | + | ||
441 | + | ||
442 | + | func isPoolEmpty (poolContractAddress) = { | |
443 | + | let $t01587816015 = getAssetsDataFromPoolAddress(poolContractAddress) | |
444 | + | let amountAssetId = $t01587816015._1 | |
445 | + | let priceAssetId = $t01587816015._2 | |
446 | + | let lpAssetId = $t01587816015._3 | |
447 | + | let amountAssetInternal = $t01587816015._4 | |
448 | + | let priceAssetInternal = $t01587816015._5 | |
449 | + | if ((getAddressBalance(poolContractAddress, amountAssetId) == 0)) | |
450 | + | then (getAddressBalance(poolContractAddress, priceAssetId) == 0) | |
451 | + | else false | |
452 | + | } | |
453 | + | ||
454 | + | ||
391 | 455 | @Callable(i) | |
392 | 456 | func getSwapContractREADONLY () = $Tuple2(nil, getStringOrFail(swapContract())) | |
393 | 457 | ||
394 | 458 | ||
395 | 459 | ||
396 | 460 | @Callable(i) | |
397 | 461 | func getPoolLeaseConfigREADONLY (poolAddress,assetId) = { | |
398 | - | let $ | |
462 | + | let $t01633016634 = match getInteger(this, keyLeasedRatio(poolAddress, assetId)) { | |
399 | 463 | case r: Int => | |
400 | 464 | $Tuple2(true, min([100, max([0, r])])) | |
401 | 465 | case _ => | |
402 | 466 | match getInteger(this, keyLeasedRatioDefault(assetId)) { | |
403 | 467 | case rd: Int => | |
404 | 468 | $Tuple2(true, min([100, max([0, rd])])) | |
405 | 469 | case _ => | |
406 | 470 | $Tuple2(false, 0) | |
407 | 471 | } | |
408 | 472 | } | |
409 | - | let isLeasable = $ | |
410 | - | let leasedRatio = $ | |
473 | + | let isLeasable = $t01633016634._1 | |
474 | + | let leasedRatio = $t01633016634._2 | |
411 | 475 | let minBalance = match getInteger(this, keyMinBalance(poolAddress, assetId)) { | |
412 | 476 | case b: Int => | |
413 | 477 | max([0, b]) | |
414 | 478 | case _ => | |
415 | 479 | match getInteger(this, keyMinBalanceDefault(assetId)) { | |
416 | 480 | case bd: Int => | |
417 | 481 | max([0, bd]) | |
418 | 482 | case _ => | |
419 | 483 | 0 | |
420 | 484 | } | |
421 | 485 | } | |
422 | - | let $ | |
486 | + | let $t01690017124 = if ((assetId == "WAVES")) | |
423 | 487 | then $Tuple3(valueOrElse(getString(this, keySWavesProxyAddress()), ""), getString(this, valueOrElse(keySWavesAssetId(), "")), MULT12) | |
424 | 488 | else $Tuple3("", "", 0) | |
425 | - | let proxyAddress = $ | |
426 | - | let proxyAssetId = $ | |
427 | - | let proxyRateMul = $ | |
489 | + | let proxyAddress = $t01690017124._1 | |
490 | + | let proxyAssetId = $t01690017124._2 | |
491 | + | let proxyRateMul = $t01690017124._3 | |
428 | 492 | let stakingProfitAddress = valueOrElse(getString(this, keyStakingProfitAddress()), "") | |
429 | 493 | $Tuple2(nil, $Tuple7(isLeasable, leasedRatio, minBalance, proxyAddress, proxyAssetId, proxyRateMul, stakingProfitAddress)) | |
430 | 494 | } | |
431 | 495 | ||
432 | 496 | ||
433 | 497 | ||
434 | 498 | @Callable(i) | |
435 | 499 | func getLpAssetFromPoolAssetsREADONLY (asset1,asset2) = if (if ((asset1 == "8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS")) | |
436 | 500 | then (asset2 == "WAVES") | |
437 | 501 | else false) | |
438 | 502 | then $Tuple2(nil, unit) | |
439 | 503 | else { | |
440 | 504 | let assetNum1 = value(getInteger(this, keyMappingsBaseAsset2internalId(asset1))) | |
441 | 505 | let assetNum2 = value(getInteger(this, keyMappingsBaseAsset2internalId(asset2))) | |
442 | 506 | let ee = getString(this, keyMappingPoolAssetsToLpasset(toString(assetNum1), toString(assetNum2))) | |
443 | 507 | let res = if ((ee == unit)) | |
444 | 508 | then unit | |
445 | 509 | else drop(value(ee), 4) | |
446 | 510 | $Tuple2(nil, res) | |
447 | 511 | } | |
448 | 512 | ||
449 | 513 | ||
450 | 514 | ||
451 | 515 | @Callable(i) | |
452 | 516 | func getPoolAddressFromLpAssetREADONLY (lp) = $Tuple2(nil, valueOrElse(getString(this, keyMappingPoolLPAssetToPoolContractAddress(lp)), "")) | |
453 | 517 | ||
454 | 518 | ||
455 | 519 | ||
456 | 520 | @Callable(i) | |
457 | 521 | func constructor (stakingContract,boostingContract,idoContract,teamContract,emissionContract,restContract,slpipageContract,priceDecimals) = { | |
458 | 522 | let checkCaller = mustManager(i) | |
459 | 523 | if ((checkCaller == checkCaller)) | |
460 | 524 | then [StringEntry(keyFactoryConfig(), dataFactoryCfg(stakingContract, boostingContract, idoContract, teamContract, emissionContract, restContract, slpipageContract)), IntegerEntry(keyPriceDecimals(), priceDecimals)] | |
461 | 525 | else throw("Strict value is not equal to itself.") | |
462 | 526 | } | |
463 | 527 | ||
464 | 528 | ||
465 | 529 | ||
466 | 530 | @Callable(i) | |
467 | 531 | func constructorV2 (mathcherPub58Str) = { | |
468 | 532 | let checkCaller = mustManager(i) | |
469 | 533 | if ((checkCaller == checkCaller)) | |
470 | 534 | then { | |
471 | 535 | let mathcerPub = addressFromPublicKey(fromBase58String(mathcherPub58Str)) | |
472 | 536 | if ((mathcerPub == mathcerPub)) | |
473 | 537 | then [StringEntry(keyMatcherPub(), mathcherPub58Str)] | |
474 | 538 | else throw("Strict value is not equal to itself.") | |
475 | 539 | } | |
476 | 540 | else throw("Strict value is not equal to itself.") | |
477 | 541 | } | |
478 | 542 | ||
479 | 543 | ||
480 | 544 | ||
481 | 545 | @Callable(i) | |
482 | 546 | func constructorV3 (daoContract,marketingContract,gwxRewardsContract,birdsContract) = { | |
483 | 547 | let checkCaller = mustManager(i) | |
484 | 548 | if ((checkCaller == checkCaller)) | |
485 | 549 | then { | |
486 | 550 | let factoryCfg = split(getStringOrFail(keyFactoryConfig()), SEP) | |
487 | 551 | [StringEntry(keyFactoryConfig(), dataFactoryCfgV3(factoryCfg[1], factoryCfg[2], factoryCfg[3], factoryCfg[4], factoryCfg[5], factoryCfg[6], factoryCfg[7], daoContract, marketingContract, gwxRewardsContract, birdsContract))] | |
488 | 552 | } | |
489 | 553 | else throw("Strict value is not equal to itself.") | |
490 | 554 | } | |
491 | 555 | ||
492 | 556 | ||
493 | 557 | ||
494 | 558 | @Callable(i) | |
495 | 559 | func constructorV4 (legacyFactoryContract,legacyPools) = { | |
496 | 560 | let checkCaller = mustManager(i) | |
497 | 561 | if ((checkCaller == checkCaller)) | |
498 | 562 | then [StringEntry(keyLegacyFactoryContract(), legacyFactoryContract), StringEntry(keyLegacyPools(), makeString(legacyPools, SEP))] | |
499 | 563 | else throw("Strict value is not equal to itself.") | |
500 | 564 | } | |
501 | 565 | ||
502 | 566 | ||
503 | 567 | ||
504 | 568 | @Callable(i) | |
505 | 569 | func constructorV5 (assetsStoreContract) = { | |
506 | 570 | let checkCaller = mustManager(i) | |
507 | 571 | if ((checkCaller == checkCaller)) | |
508 | 572 | then [StringEntry(keyAssetsStoreContract(), assetsStoreContract)] | |
509 | 573 | else throw("Strict value is not equal to itself.") | |
510 | 574 | } | |
511 | 575 | ||
512 | 576 | ||
513 | 577 | ||
514 | 578 | @Callable(i) | |
515 | 579 | func constructorV6 (votingEmissionContract,priceAssets) = { | |
516 | 580 | let cheks = [mustManager(i), if ((addressFromString(votingEmissionContract) != unit)) | |
517 | 581 | then true | |
518 | 582 | else "invalid voting emission contract address"] | |
519 | 583 | if ((cheks == cheks)) | |
520 | 584 | then [StringEntry(keyVotingEmissionContract(), votingEmissionContract), StringEntry(keyPriceAssets(), makeString(priceAssets, SEP))] | |
521 | 585 | else throw("Strict value is not equal to itself.") | |
522 | 586 | } | |
523 | 587 | ||
524 | 588 | ||
525 | 589 | ||
526 | 590 | @Callable(i) | |
527 | 591 | func setAdmins (adminPubKeys) = { | |
528 | 592 | let checkCaller = mustManager(i) | |
529 | 593 | if ((checkCaller == checkCaller)) | |
530 | 594 | then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))] | |
531 | 595 | else throw("Strict value is not equal to itself.") | |
532 | 596 | } | |
533 | 597 | ||
534 | 598 | ||
535 | 599 | ||
536 | 600 | @Callable(i) | |
537 | 601 | func activateNewPool (poolAddress,amountAssetStr,priceAssetStr,lpAssetName,lpAssetDescr,poolWeight,poolType,logo) = { | |
538 | 602 | let checkCaller = mustAdmin(i) | |
539 | 603 | if ((checkCaller == checkCaller)) | |
540 | 604 | then if (isDefined(getString(keyMappingPoolContractAddressToPoolAssets(poolAddress)))) | |
541 | - | then | |
605 | + | then throwErr((("Pool address " + poolAddress) + " already registered.")) | |
542 | 606 | else { | |
543 | 607 | let internalAmountAssetData = getInternalAssetIdOrCreate(amountAssetStr, 1) | |
544 | 608 | let internalAmountAssetId = internalAmountAssetData._1 | |
545 | 609 | let internalPriceAssetData = getInternalAssetIdOrCreate(priceAssetStr, if (internalAmountAssetData._3) | |
546 | 610 | then 2 | |
547 | 611 | else 1) | |
548 | 612 | let internalPriceAssetId = internalPriceAssetData._1 | |
549 | 613 | let poolAccountScriptHash = valueOrErrorMessage(scriptHash(addressFromStringValue(poolAddress)), ("No script has been found on pool account " + poolAddress)) | |
550 | 614 | let ethalonPoolAccountScriptHash = getBinaryValue(keyPoolScriptHash()) | |
551 | 615 | let poolExists = poolExistsInternal(amountAssetStr, priceAssetStr) | |
552 | 616 | if (poolExists) | |
553 | - | then | |
617 | + | then throwErr((((("Pool " + amountAssetStr) + "/") + priceAssetStr) + " has already been activated.")) | |
554 | 618 | else { | |
555 | 619 | let poolConfigValue = value(getString(this, keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId)))) | |
556 | 620 | let amountAssetsDecimals = if ((amountAssetStr == "WAVES")) | |
557 | 621 | then decimalsMultPrice | |
558 | 622 | else pow(10, 0, value(assetInfo(fromBase58String(amountAssetStr))).decimals, 0, 0, DOWN) | |
559 | 623 | let priceAssetsDecimals = if ((priceAssetStr == "WAVES")) | |
560 | 624 | then decimalsMultPrice | |
561 | 625 | else pow(10, 0, value(assetInfo(fromBase58String(priceAssetStr))).decimals, 0, 0, DOWN) | |
562 | 626 | let lpAssetIssueAction = Issue(lpAssetName, lpAssetDescr, 1, 8, true) | |
563 | 627 | let lpAssetId = calculateAssetId(lpAssetIssueAction) | |
564 | 628 | let lpAssetIdStr = toBase58String(lpAssetId) | |
565 | 629 | let poolActivateInvokeResult = invoke(addressFromStringValue(poolAddress), "activate", [amountAssetStr, priceAssetStr], nil) | |
566 | 630 | if ((poolActivateInvokeResult == poolActivateInvokeResult)) | |
567 | 631 | then if ((poolActivateInvokeResult != "success")) | |
568 | - | then | |
632 | + | then throwErr("Pool initialisation error happened.") | |
569 | 633 | else { | |
570 | 634 | let assetsStoreContract = addressFromStringValue(getStringOrFail(keyAssetsStoreContract())) | |
571 | 635 | let createOrUpdateLpAssetInv = invoke(assetsStoreContract, "createOrUpdate", [lpAssetIdStr, lpAssetName, false], nil) | |
572 | 636 | if ((createOrUpdateLpAssetInv == createOrUpdateLpAssetInv)) | |
573 | 637 | then { | |
574 | 638 | let addPoolsLpLabelInv = invoke(assetsStoreContract, "addLabel", [lpAssetIdStr, labelPoolsLp], nil) | |
575 | 639 | if ((addPoolsLpLabelInv == addPoolsLpLabelInv)) | |
576 | 640 | then { | |
577 | 641 | let setLogoInv = invoke(assetsStoreContract, "setLogo", [lpAssetIdStr, logo], nil) | |
578 | 642 | if ((setLogoInv == setLogoInv)) | |
579 | 643 | then { | |
580 | 644 | let addAssetsLinkInv = invoke(assetsStoreContract, "addAssetsLink", [amountAssetStr, priceAssetStr, lpAssetIdStr], nil) | |
581 | 645 | if ((addAssetsLinkInv == addAssetsLinkInv)) | |
582 | 646 | then { | |
583 | 647 | let increaseAssetPoolsNumberInv = invoke(assetsStoreContract, "increaseAssetPoolsNumber", [amountAssetStr], nil) | |
584 | 648 | if ((increaseAssetPoolsNumberInv == increaseAssetPoolsNumberInv)) | |
585 | 649 | then $Tuple2(((internalAmountAssetData._2 ++ internalPriceAssetData._2) ++ [lpAssetIssueAction, Burn(lpAssetId, 1), StringEntry(keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId)), dataPoolCfg(poolAddress, toString(PoolActive), lpAssetIdStr, amountAssetStr, priceAssetStr, amountAssetsDecimals, priceAssetsDecimals, internalAmountAssetId, internalPriceAssetId, decimalsMultPrice, poolType)), StringEntry(keyMappingLpAssetToPoolAssets(lpAssetIdStr), dataMappingPoolAssets(internalAmountAssetId, internalPriceAssetId)), StringEntry(keyMappingPoolAssetsToLpasset(toString(internalAmountAssetId), toString(internalPriceAssetId)), ("%s__" + lpAssetIdStr)), StringEntry(keyMappingPoolContractAddressToPoolAssets(poolAddress), dataMappingPoolAssets(internalAmountAssetId, internalPriceAssetId)), StringEntry(keyMappingPoolAssetsToPoolContractAddress(internalAmountAssetId, internalPriceAssetId), poolAddress), StringEntry(keyMappingPoolLPAssetToPoolContractAddress(lpAssetIdStr), poolAddress), StringEntry(keyMappingPoolContractToLPAsset(poolAddress), lpAssetIdStr), IntegerEntry(keyPoolToWeight(poolAddress), poolWeight), IntegerEntry(keyPoolSpread(poolAddress), defaultSpread)]), lpAssetIdStr) | |
586 | 650 | else throw("Strict value is not equal to itself.") | |
587 | 651 | } | |
588 | 652 | else throw("Strict value is not equal to itself.") | |
589 | 653 | } | |
590 | 654 | else throw("Strict value is not equal to itself.") | |
591 | 655 | } | |
592 | 656 | else throw("Strict value is not equal to itself.") | |
593 | 657 | } | |
594 | 658 | else throw("Strict value is not equal to itself.") | |
595 | 659 | } | |
596 | 660 | else throw("Strict value is not equal to itself.") | |
597 | 661 | } | |
598 | 662 | } | |
599 | 663 | else throw("Strict value is not equal to itself.") | |
600 | 664 | } | |
601 | 665 | ||
602 | 666 | ||
603 | 667 | ||
604 | 668 | @Callable(i) | |
605 | 669 | func managePool (poolAddress,newStatus) = { | |
606 | 670 | let checkCaller = mustManager(i) | |
607 | 671 | if ((checkCaller == checkCaller)) | |
608 | 672 | then { | |
609 | 673 | let poolConfig = getPoolConfig(poolAddress) | |
610 | 674 | let poolStatus = poolConfig[idxPoolStatus] | |
611 | 675 | let lpAssetIdStr = poolConfig[idxPoolLPAssetId] | |
612 | 676 | let amountAssetStr = poolConfig[idxAmtAssetId] | |
613 | 677 | let priceAssetStr = poolConfig[idxPriceAssetId] | |
614 | 678 | let amountAssetsDecimals = parseIntValue(poolConfig[idxAmtAssetDcm]) | |
615 | 679 | let priceAssetsDecimals = parseIntValue(poolConfig[idxPriceAssetDcm]) | |
616 | 680 | let internalAmountAssetId = parseIntValue(poolConfig[idxIAmtAssetId]) | |
617 | 681 | let internalPriceAssetId = parseIntValue(poolConfig[idxIPriceAssetId]) | |
618 | 682 | let lpAssetDcm = parseIntValue(poolConfig[idxLPAssetDcm]) | |
619 | 683 | let poolType = poolConfig[idxPoolType] | |
620 | 684 | [StringEntry(keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId)), dataPoolCfg(poolAddress, toString(newStatus), lpAssetIdStr, amountAssetStr, priceAssetStr, amountAssetsDecimals, priceAssetsDecimals, internalAmountAssetId, internalPriceAssetId, lpAssetDcm, poolType))] | |
621 | 685 | } | |
622 | 686 | else throw("Strict value is not equal to itself.") | |
623 | 687 | } | |
624 | 688 | ||
625 | 689 | ||
626 | 690 | ||
627 | 691 | @Callable(i) | |
628 | 692 | func emit (amountToEmit) = { | |
629 | 693 | let caller = i.caller | |
630 | 694 | let originCaller = i.originCaller | |
631 | 695 | let lpAssetRequested = valueOrErrorMessage(getString(keyMappingPoolContractToLPAsset(toString(caller))), "Invalid LP address called me.") | |
632 | 696 | let lpAsset = fromBase58String(lpAssetRequested) | |
633 | 697 | let legacyPools = split(valueOrElse(getString(keyLegacyPools()), EMPTY), SEP) | |
634 | 698 | let legacyFactoryContract = addressFromStringValue(valueOrErrorMessage(getString(keyLegacyFactoryContract()), "Legacy factory contract does not exists.")) | |
635 | 699 | if ((0 >= amountToEmit)) | |
636 | 700 | then nil | |
637 | 701 | else if (containsElement(legacyPools, toString(caller))) | |
638 | 702 | then $Tuple2(nil, legacyFactoryContract) | |
639 | 703 | else $Tuple2([Reissue(lpAsset, amountToEmit, true), ScriptTransfer(i.caller, amountToEmit, lpAsset)], "success") | |
640 | 704 | } | |
641 | 705 | ||
642 | 706 | ||
643 | 707 | ||
644 | 708 | @Callable(i) | |
645 | 709 | func burn (amountToBurn) = { | |
646 | 710 | let caller = i.caller | |
647 | 711 | let originCaller = i.originCaller | |
648 | 712 | let payment = value(i.payments[0]) | |
649 | 713 | let paymentAmount = value(payment.amount) | |
650 | 714 | let inAmountAssetId = toBase58String(value(payment.assetId)) | |
651 | 715 | let lpAssetRequestedForBurning = valueOrErrorMessage(getString(keyMappingPoolContractToLPAsset(toString(caller))), "Invalid LP address called me.") | |
652 | 716 | if ((inAmountAssetId != lpAssetRequestedForBurning)) | |
653 | - | then | |
717 | + | then throwErr("Invalid asset passed.") | |
654 | 718 | else if ((amountToBurn != paymentAmount)) | |
655 | - | then | |
719 | + | then throwErr("Invalid amount passed.") | |
656 | 720 | else { | |
657 | 721 | let lpAsset = fromBase58String(lpAssetRequestedForBurning) | |
658 | 722 | $Tuple2([Burn(lpAsset, amountToBurn)], "success") | |
659 | 723 | } | |
660 | 724 | } | |
661 | 725 | ||
662 | 726 | ||
663 | 727 | ||
664 | 728 | @Callable(i) | |
665 | 729 | func modifyWeight (lpAssetId,share) = { | |
666 | 730 | let checkCaller = if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionContract()), ""))) | |
667 | 731 | then true | |
668 | 732 | else mustManager(i) | |
669 | 733 | if ((checkCaller == checkCaller)) | |
670 | 734 | then { | |
671 | 735 | let poolContractAddress = getStringOrFail(keyMappingPoolLPAssetToPoolContractAddress(lpAssetId)) | |
672 | 736 | let poolWeightKey = keyPoolToWeight(poolContractAddress) | |
673 | 737 | let gwxWeightKey = keyPoolToWeight(GWXvirtualPOOL) | |
674 | 738 | let gwxWeight = valueOrElse(getInteger(gwxWeightKey), 0) | |
675 | 739 | let poolWeight = valueOrElse(getInteger(poolWeightKey), 0) | |
676 | 740 | let poolWeightNew = share | |
677 | 741 | let factoryCfg = split(getStringOrFail(keyFactoryConfig()), SEP) | |
678 | 742 | let stakingContract = getStakingAddressOrFail(factoryCfg) | |
679 | 743 | let onModifyWeightInv = invoke(stakingContract, "onModifyWeight", [lpAssetId, poolContractAddress], nil) | |
680 | 744 | if ((onModifyWeightInv == onModifyWeightInv)) | |
681 | 745 | then { | |
682 | 746 | let gwxVirtualPoolActions = if ((gwxWeight == 0)) | |
683 | 747 | then nil | |
684 | 748 | else [IntegerEntry(gwxWeightKey, 0)] | |
685 | 749 | let poolWeightHistoryKey = keyPoolToWeightHistory(poolContractAddress, 0) | |
686 | 750 | let poolWeightHistoryOrUnit = getInteger(poolWeightHistoryKey) | |
687 | 751 | let poolWeightHistoryActions = if ((poolWeightHistoryOrUnit == unit)) | |
688 | 752 | then nil | |
689 | 753 | else [DeleteEntry(poolWeightHistoryKey)] | |
690 | 754 | (([IntegerEntry(poolWeightKey, poolWeightNew)] ++ gwxVirtualPoolActions) ++ poolWeightHistoryActions) | |
691 | 755 | } | |
692 | 756 | else throw("Strict value is not equal to itself.") | |
693 | 757 | } | |
694 | 758 | else throw("Strict value is not equal to itself.") | |
695 | 759 | } | |
696 | 760 | ||
697 | 761 | ||
698 | 762 | ||
699 | 763 | @Callable(i) | |
700 | 764 | func modifyWeights (btcPoolAddress,ethPoolAddress,ethBtcPoolAddress,usdcUsdtPoolAddress) = { | |
701 | 765 | let checkCaller = mustManager(i) | |
702 | 766 | if ((checkCaller == checkCaller)) | |
703 | 767 | then { | |
704 | 768 | let ethBtcWeightNew = ((5 * POOLWEIGHTMULT) / 100) | |
705 | 769 | let usdcUsdtWeightNew = ((5 * POOLWEIGHTMULT) / 100) | |
706 | 770 | let weightDecrement = ((5 * POOLWEIGHTMULT) / 100) | |
707 | 771 | let factoryCfg = split(getStringOrFail(keyFactoryConfig()), SEP) | |
708 | 772 | let stakingDapp = getStakingAddressOrFail(factoryCfg) | |
709 | 773 | let gwxRewardDapp = getGwxRewardAddressOrFail(factoryCfg) | |
710 | 774 | let btcWeightKEY = keyPoolToWeight(btcPoolAddress) | |
711 | 775 | let ethWeightKEY = keyPoolToWeight(ethPoolAddress) | |
712 | 776 | let ethBtcWeightKEY = keyPoolToWeight(ethBtcPoolAddress) | |
713 | 777 | let usdcUsdtWeightKEY = keyPoolToWeight(usdcUsdtPoolAddress) | |
714 | 778 | let btcWeight = getIntOrFail(btcWeightKEY) | |
715 | 779 | let ethWeight = getIntOrFail(ethWeightKEY) | |
716 | 780 | let btcWeightNew = (btcWeight - weightDecrement) | |
717 | 781 | let ethWeightNew = (ethWeight - weightDecrement) | |
718 | 782 | if ((0 >= btcWeightNew)) | |
719 | - | then | |
783 | + | then throwErr(("invalid btcWeightNew: " + toString(btcWeightNew))) | |
720 | 784 | else if ((0 >= ethWeightNew)) | |
721 | - | then | |
785 | + | then throwErr(("invalid ethWeightNew: " + toString(ethWeightNew))) | |
722 | 786 | else { | |
723 | 787 | let btcLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(btcPoolAddress)) | |
724 | 788 | let ethLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(ethPoolAddress)) | |
725 | 789 | let ethBtcLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(ethBtcPoolAddress)) | |
726 | 790 | let usdcUsdtLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(usdcUsdtPoolAddress)) | |
727 | 791 | let onModifyWeightBtc = invoke(stakingDapp, "onModifyWeight", [btcLpAssetIdStr, btcPoolAddress], nil) | |
728 | 792 | if ((onModifyWeightBtc == onModifyWeightBtc)) | |
729 | 793 | then { | |
730 | 794 | let onModifyWeightEth = invoke(stakingDapp, "onModifyWeight", [ethLpAssetIdStr, ethPoolAddress], nil) | |
731 | 795 | if ((onModifyWeightEth == onModifyWeightEth)) | |
732 | 796 | then { | |
733 | 797 | let onModifyWeightEthBtc = invoke(stakingDapp, "onModifyWeight", [ethBtcLpAssetIdStr, ethBtcPoolAddress], nil) | |
734 | 798 | if ((onModifyWeightEthBtc == onModifyWeightEthBtc)) | |
735 | 799 | then { | |
736 | 800 | let onModifyWeightUsdcUsdt = invoke(stakingDapp, "onModifyWeight", [usdcUsdtLpAssetIdStr, usdcUsdtPoolAddress], nil) | |
737 | 801 | if ((onModifyWeightUsdcUsdt == onModifyWeightUsdcUsdt)) | |
738 | 802 | then [IntegerEntry(btcWeightKEY, btcWeightNew), IntegerEntry(ethWeightKEY, ethWeightNew), IntegerEntry(ethBtcWeightKEY, ethBtcWeightNew), IntegerEntry(usdcUsdtWeightKEY, usdcUsdtWeightNew), IntegerEntry(keyPoolToWeightHistory(btcPoolAddress, 0), btcWeight), IntegerEntry(keyPoolToWeightHistory(ethPoolAddress, 0), ethWeight), IntegerEntry(keyPoolToWeightHistory(ethBtcPoolAddress, 0), ethBtcWeightNew), IntegerEntry(keyPoolToWeightHistory(usdcUsdtPoolAddress, 0), usdcUsdtWeightNew)] | |
739 | 803 | else throw("Strict value is not equal to itself.") | |
740 | 804 | } | |
741 | 805 | else throw("Strict value is not equal to itself.") | |
742 | 806 | } | |
743 | 807 | else throw("Strict value is not equal to itself.") | |
744 | 808 | } | |
745 | 809 | else throw("Strict value is not equal to itself.") | |
746 | 810 | } | |
747 | 811 | } | |
748 | 812 | else throw("Strict value is not equal to itself.") | |
749 | 813 | } | |
750 | 814 | ||
751 | 815 | ||
752 | 816 | ||
753 | 817 | @Callable(i) | |
754 | 818 | func checkWxEmissionPoolLabel (amountAssetId,priceAssetId) = { | |
755 | 819 | let haveLabel = match getBoolean(keyWxEmission(amountAssetId, priceAssetId)) { | |
756 | 820 | case b: Boolean => | |
757 | 821 | b | |
758 | 822 | case _ => | |
759 | 823 | false | |
760 | 824 | } | |
761 | 825 | $Tuple2(nil, haveLabel) | |
762 | 826 | } | |
763 | 827 | ||
764 | 828 | ||
765 | 829 | ||
766 | 830 | @Callable(i) | |
767 | 831 | func setWxEmissionPoolLabel (amountAssetId,priceAssetId) = { | |
768 | 832 | let checkCaller = mustAdmin(i) | |
769 | 833 | if ((checkCaller == checkCaller)) | |
770 | 834 | then $Tuple2([BooleanEntry(keyWxEmission(amountAssetId, priceAssetId), true)], unit) | |
771 | 835 | else throw("Strict value is not equal to itself.") | |
772 | 836 | } | |
773 | 837 | ||
774 | 838 | ||
775 | 839 | ||
776 | 840 | @Callable(i) | |
777 | 841 | func deleteWxEmissionPoolLabel (amountAssetId,priceAssetId) = { | |
778 | 842 | let checkCaller = if ((i.caller == this)) | |
779 | 843 | then true | |
780 | 844 | else mustAdmin(i) | |
781 | 845 | if ((checkCaller == checkCaller)) | |
782 | 846 | then $Tuple2([DeleteEntry(keyWxEmission(amountAssetId, priceAssetId))], unit) | |
783 | 847 | else throw("Strict value is not equal to itself.") | |
784 | 848 | } | |
785 | 849 | ||
786 | 850 | ||
787 | 851 | ||
788 | 852 | @Callable(i) | |
789 | 853 | func onVerificationLoss (assetId) = { | |
790 | 854 | let checkCaller = if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyAssetsStoreContract()), ""))) | |
791 | 855 | then true | |
792 | 856 | else mustManager(i) | |
793 | 857 | if ((checkCaller == checkCaller)) | |
794 | 858 | then { | |
795 | 859 | let priceAssets = getPriceAssets() | |
796 | 860 | let checkPriceAssetsSize = if ((size(priceAssets) > 0)) | |
797 | 861 | then true | |
798 | - | else | |
862 | + | else throwErr("invalid price assets") | |
799 | 863 | if ((checkPriceAssetsSize == checkPriceAssetsSize)) | |
800 | 864 | then { | |
801 | 865 | func cb (acc,priceAsset) = { | |
802 | 866 | let r = invoke(this, "deleteWxEmissionPoolLabel", [assetId, priceAsset], nil) | |
803 | 867 | if ((r == r)) | |
804 | 868 | then unit | |
805 | 869 | else throw("Strict value is not equal to itself.") | |
806 | 870 | } | |
807 | 871 | ||
808 | 872 | let actions = { | |
809 | 873 | let $l = priceAssets | |
810 | 874 | let $s = size($l) | |
811 | 875 | let $acc0 = unit | |
812 | 876 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
813 | 877 | then $a | |
814 | 878 | else cb($a, $l[$i]) | |
815 | 879 | ||
816 | 880 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
817 | 881 | then $a | |
818 | 882 | else throw("List size exceeds 11") | |
819 | 883 | ||
820 | 884 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11) | |
821 | 885 | } | |
822 | 886 | if ((actions == actions)) | |
823 | 887 | then $Tuple2(nil, unit) | |
824 | 888 | else throw("Strict value is not equal to itself.") | |
825 | 889 | } | |
826 | 890 | else throw("Strict value is not equal to itself.") | |
827 | 891 | } | |
828 | 892 | else throw("Strict value is not equal to itself.") | |
829 | 893 | } | |
830 | 894 | ||
831 | 895 | ||
832 | 896 | ||
833 | 897 | @Callable(i) | |
834 | 898 | func isPoolOneTokenOperationsDisabledREADONLY (poolAddress) = { | |
835 | 899 | let poolConfig = getPoolConfig(poolAddress) | |
836 | 900 | let assetsInternal = $Tuple2(parseIntValue(poolConfig[idxIAmtAssetId]), parseIntValue(poolConfig[idxIPriceAssetId])) | |
837 | 901 | let poolOneTokenOperationsDisabled = valueOrElse(getBoolean(keyPoolOneTokenOperationsDisabled(assetsInternal)), false) | |
838 | 902 | let allPoolsOneTokenOperationsDisabled = valueOrElse(getBoolean(keyAllPoolsOneTokenOperationsDisabled()), false) | |
839 | 903 | $Tuple2(nil, if (allPoolsOneTokenOperationsDisabled) | |
840 | 904 | then true | |
841 | 905 | else poolOneTokenOperationsDisabled) | |
842 | 906 | } | |
843 | 907 | ||
844 | 908 | ||
845 | 909 | ||
846 | 910 | @Callable(i) | |
847 | 911 | func getInFeeREADONLY (poolAddress) = { | |
848 | 912 | let fee = intOrDefaultOrFallback(keyInFee(poolAddress), keyInFeeDefault(), 0) | |
849 | 913 | $Tuple2(nil, fee) | |
850 | 914 | } | |
851 | 915 | ||
852 | 916 | ||
853 | 917 | ||
854 | 918 | @Callable(i) | |
855 | 919 | func getOutFeeREADONLY (poolAddress) = { | |
856 | 920 | let fee = intOrDefaultOrFallback(keyOutFee(poolAddress), keyOutFeeDefault(), fraction(10, MULT8, 10000)) | |
857 | 921 | $Tuple2(nil, fee) | |
858 | 922 | } | |
859 | 923 | ||
860 | 924 | ||
861 | 925 | ||
862 | 926 | @Callable(i) | |
863 | 927 | func poolInfoREADONLY (amountAssetIdStr,priceAssetIdStr) = { | |
864 | 928 | let amountAssetInternalIdOption = getInteger(this, keyMappingsBaseAsset2internalId(amountAssetIdStr)) | |
865 | 929 | let priceAssetInternalIdOption = getInteger(this, keyMappingsBaseAsset2internalId(priceAssetIdStr)) | |
866 | 930 | let poolContractAddressOption = getString(this, keyMappingPoolAssetsToPoolContractAddress(value(amountAssetInternalIdOption), value(priceAssetInternalIdOption))) | |
867 | 931 | let lpAssetIdOption = getString(this, keyMappingPoolContractToLPAsset(value(poolContractAddressOption))) | |
868 | 932 | let poolExists = if (if (isDefined(amountAssetInternalIdOption)) | |
869 | 933 | then isDefined(priceAssetInternalIdOption) | |
870 | 934 | else false) | |
871 | 935 | then isDefined(poolContractAddressOption) | |
872 | 936 | else false | |
873 | 937 | let poolInfo = if (poolExists) | |
874 | 938 | then $Tuple2(addressFromStringValue(value(poolContractAddressOption)), parseAssetId(value(lpAssetIdOption))) | |
875 | 939 | else unit | |
876 | 940 | $Tuple2(nil, poolInfo) | |
877 | 941 | } | |
878 | 942 | ||
879 | 943 | ||
880 | 944 | ||
881 | 945 | @Callable(i) | |
882 | 946 | func getPoolStatusREADONLY (poolAddress) = { | |
883 | 947 | let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolAddress)), SEP) | |
884 | 948 | let amountAssetInternal = poolAssets[1] | |
885 | 949 | let priceAssetInternal = poolAssets[2] | |
886 | 950 | let cfg = split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP) | |
887 | 951 | $Tuple2(nil, parseIntValue(cfg[idxPoolStatus])) | |
888 | 952 | } | |
889 | 953 | ||
890 | 954 | ||
891 | 955 | ||
892 | 956 | @Callable(i) | |
893 | 957 | func getPoolConfigREADONLY (poolAddress) = { | |
894 | 958 | let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolAddress)), SEP) | |
895 | 959 | let amountAssetInternal = poolAssets[1] | |
896 | 960 | let priceAssetInternal = poolAssets[2] | |
897 | 961 | let cfg = split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP) | |
898 | 962 | $Tuple2(nil, cfg) | |
899 | 963 | } | |
900 | 964 | ||
901 | 965 | ||
902 | 966 | ||
903 | 967 | @Callable(i) | |
904 | 968 | func getPoolConfigByLpAssetIdREADONLY (lpAssetIdStr) = { | |
905 | 969 | let poolAssets = split(getStringOrFail(keyMappingLpAssetToPoolAssets(lpAssetIdStr)), SEP) | |
906 | 970 | let amountAssetInternal = poolAssets[1] | |
907 | 971 | let priceAssetInternal = poolAssets[2] | |
908 | 972 | let cfg = split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP) | |
909 | 973 | $Tuple2(nil, cfg) | |
910 | 974 | } | |
911 | 975 | ||
912 | 976 | ||
913 | 977 | ||
914 | 978 | @Callable(i) | |
915 | 979 | func poolExistsREADONLY (amountAssetId,priceAssetId) = $Tuple2(nil, poolExistsInternal(amountAssetId, priceAssetId)) | |
916 | 980 | ||
917 | 981 | ||
918 | 982 | ||
919 | 983 | @Callable(i) | |
920 | 984 | func skipOrderValidationREADONLY (poolAddress) = $Tuple2(nil, valueOrElse(getBoolean(keySkipOrderValidation(poolAddress)), false)) | |
921 | 985 | ||
922 | 986 | ||
923 | 987 | ||
924 | 988 | @Callable(i) | |
925 | 989 | func getChangeAmpConfigREADONLY (poolAddress) = { | |
926 | 990 | let delay = getIntegerValue(keyChangeAmpDelay(poolAddress)) | |
927 | 991 | let delta = getIntegerValue(keyChangeAmpDelta(poolAddress)) | |
928 | 992 | let target = getIntegerValue(keyChangeAmpTarget(poolAddress)) | |
929 | 993 | $Tuple2(nil, [delay, delta, target]) | |
930 | 994 | } | |
931 | 995 | ||
932 | 996 | ||
933 | 997 | ||
934 | 998 | @Callable(i) | |
935 | 999 | func getPoolWeightREADONLY (lpAssetId) = { | |
936 | 1000 | let poolAddress = getStringOrFail(keyMappingPoolLPAssetToPoolContractAddress(lpAssetId)) | |
937 | 1001 | let weight = valueOrElse(getInteger(keyPoolToWeight(poolAddress)), 0) | |
938 | 1002 | $Tuple2(nil, weight) | |
939 | 1003 | } | |
940 | 1004 | ||
941 | 1005 | ||
1006 | + | ||
1007 | + | @Callable(i) | |
1008 | + | func deletePool (poolContractAddress) = { | |
1009 | + | let poolConfig = getPoolConfig(poolContractAddress) | |
1010 | + | let checkCaller = if ((toString(i.caller) == getPoolCreator(poolContractAddress))) | |
1011 | + | then if (isPoolEmpty(poolContractAddress)) | |
1012 | + | then true | |
1013 | + | else throwErr("Pool is not empty") | |
1014 | + | else mustManager(i) | |
1015 | + | if ((checkCaller == checkCaller)) | |
1016 | + | then { | |
1017 | + | let checkWeight = if ((valueOrElse(getInteger(keyPoolToWeight(poolContractAddress)), 0) == 0)) | |
1018 | + | then true | |
1019 | + | else throwErr("Pool weight is not Zero") | |
1020 | + | if ((checkWeight == checkWeight)) | |
1021 | + | then { | |
1022 | + | let checkStatus = if ((poolConfig[idxPoolStatus] == toString(PoolShutdown))) | |
1023 | + | then true | |
1024 | + | else throwErr("Pool must be SHUTDOWN (4)") | |
1025 | + | if ((checkStatus == checkStatus)) | |
1026 | + | then { | |
1027 | + | let $t03911639253 = getAssetsDataFromPoolAddress(poolContractAddress) | |
1028 | + | let amountAssetId = $t03911639253._1 | |
1029 | + | let priceAssetId = $t03911639253._2 | |
1030 | + | let lpAssetId = $t03911639253._3 | |
1031 | + | let amountAssetInternal = $t03911639253._4 | |
1032 | + | let priceAssetInternal = $t03911639253._5 | |
1033 | + | let userPoolsContract = addressFromStringValue(getStringValue(keyUserPoolsContract())) | |
1034 | + | let userPoolsInvoke = invoke(userPoolsContract, "deletePool", [amountAssetId, priceAssetId], nil) | |
1035 | + | if ((userPoolsInvoke == userPoolsInvoke)) | |
1036 | + | then { | |
1037 | + | let votingEmissionContract = addressFromStringValue(getStringValue(keyVotingEmissionContract())) | |
1038 | + | let votingEmissionInvoke = invoke(votingEmissionContract, "deletePool", [amountAssetId, priceAssetId], nil) | |
1039 | + | if ((votingEmissionInvoke == votingEmissionInvoke)) | |
1040 | + | then { | |
1041 | + | let assetsStoreContract = addressFromStringValue(getStringValue(keyAssetsStoreContract())) | |
1042 | + | let assetsStoreInvoke = invoke(assetsStoreContract, "deletePool", [amountAssetId, priceAssetId], nil) | |
1043 | + | if ((assetsStoreInvoke == assetsStoreInvoke)) | |
1044 | + | then [DeleteEntry(keyMappingPoolContractToLPAsset(poolContractAddress)), DeleteEntry(keyMappingPoolContractAddressToPoolAssets(poolContractAddress)), DeleteEntry(keyMappingPoolAssetsToLpasset(toString(amountAssetInternal), toString(priceAssetInternal))), DeleteEntry(keyMappingPoolAssetsToPoolContractAddress(amountAssetInternal, priceAssetInternal)), DeleteEntry(keyPoolConfig(toString(amountAssetInternal), toString(priceAssetInternal))), DeleteEntry(keyMappingLpAssetToPoolAssets(lpAssetId)), DeleteEntry(keyMappingPoolLPAssetToPoolContractAddress(lpAssetId)), DeleteEntry(keyWxEmission(amountAssetId, priceAssetId)), DeleteEntry(keyPoolToWeight(poolContractAddress)), DeleteEntry(keyPoolSpread(poolContractAddress)), DeleteEntry(keyInFee(poolContractAddress)), DeleteEntry(keyOutFee(poolContractAddress)), DeleteEntry(keySkipOrderValidation(poolContractAddress)), DeleteEntry(keyChangeAmpDelay(poolContractAddress)), DeleteEntry(keyChangeAmpDelta(poolContractAddress)), DeleteEntry(keyChangeAmpTarget(poolContractAddress))] | |
1045 | + | else throw("Strict value is not equal to itself.") | |
1046 | + | } | |
1047 | + | else throw("Strict value is not equal to itself.") | |
1048 | + | } | |
1049 | + | else throw("Strict value is not equal to itself.") | |
1050 | + | } | |
1051 | + | else throw("Strict value is not equal to itself.") | |
1052 | + | } | |
1053 | + | else throw("Strict value is not equal to itself.") | |
1054 | + | } | |
1055 | + | else throw("Strict value is not equal to itself.") | |
1056 | + | } | |
1057 | + | ||
1058 | + | ||
942 | 1059 | @Verifier(tx) | |
943 | 1060 | func verify () = { | |
944 | 1061 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
945 | 1062 | case pk: ByteVector => | |
946 | 1063 | pk | |
947 | 1064 | case _: Unit => | |
948 | 1065 | tx.senderPublicKey | |
949 | 1066 | case _ => | |
950 | 1067 | throw("Match error") | |
951 | 1068 | } | |
952 | 1069 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
953 | 1070 | } | |
954 | 1071 |
github/deemru/w8io/169f3d6 115.96 ms ◑