tx · Fbu3LcjNjY2fKFv6zNepNRNCHRHQn2td49g6E64eyy3i

3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai:  -0.02800000 Waves

2023.06.21 11:09 [2632150] smart account 3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai > SELF 0.00000000 Waves

{ "type": 13, "id": "Fbu3LcjNjY2fKFv6zNepNRNCHRHQn2td49g6E64eyy3i", "fee": 2800000, "feeAssetId": null, "timestamp": 1687335023806, "version": 2, "chainId": 84, "sender": "3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai", "senderPublicKey": "2JEaBjtjvMoNGKZmL9QxYefa1VkMJM3vMW8rNvTs9R2H", "proofs": [ "3GyTd91wQevtst2pDx964iwAYkn2fDE4WAgRv1AK5zzo5nXsQ2519gJjBSTrBEcth4nGiouWQndtgHwz9eKvVy9c" ], "script": "base64:BgKnLQgCEgASBAoCCAgSBAoCCAgSAwoBCBIKCggICAgICAgIARIDCgEIEgYKBAgICAgSBAoCCBgSAwoBCBIECgIIGBIDCgEYEgoKCAgICAgIAQgIEgQKAggBEgMKAQESAwoBARIECgIIARIGCgQICAgIEgQKAggIEgQKAggIEgQKAggIEgMKAQgSAwoBCBIDCgEIEgMKAQgSBAoCCAgSAwoBCBIDCgEIEgMKAQgSBAoCCAgSAwoBCBIDCgEIEgMKAQgSAwoBCCIGU0NBTEU4IgVNVUxUOCIGTVVMVDEyIgdTQ0FMRTE4IgZNVUxUMTgiDlBPT0xXRUlHSFRNVUxUIg5HV1h2aXJ0dWFsUE9PTCIMbGFiZWxQb29sc0xwIg1kZWZhdWx0U3ByZWFkIgt3YXZlc1N0cmluZyIQY29udHJhY3RGaWxlbmFtZSIRZGVjaW1hbHNNdWx0UHJpY2UiA1NFUCIFRU1QVFkiClBvb2xBY3RpdmUiD1Bvb2xQdXREaXNhYmxlZCITUG9vbE1hdGNoZXJEaXNhYmxlZCIMUG9vbFNodXRkb3duIhJpZHhJbnRlcm5hbEFzc2V0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lbGV0ZUVudHJ5AQkBAmFKAQUCYUEJAMwIAgkBC0RlbGV0ZUVudHJ5AQkBAmFMAQUCYUEJAMwIAgkBC0RlbGV0ZUVudHJ5AQkBAmFNAQUCYUEJAMwIAgkBC0RlbGV0ZUVudHJ5AQkBAmFOAQUCYUEJAMwIAgkBC0RlbGV0ZUVudHJ5AQkBAmFPAQUCYUEFA25pbAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECZnUBAmZ2AAQCZncEAmJmCQECYnkAAwkAAQIFAmJmAgpCeXRlVmVjdG9yBAJiRgUCYmYFAmJGAwkAAQIFAmJmAgRVbml0CAUCZnUPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IJAPQDAwgFAmZ1CWJvZHlCeXRlcwkAkQMCCAUCZnUGcHJvb2ZzAAAFAmZ3ZLDdDA==", "height": 2632150, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: mXumWeCWX3rChbHAArh4uUUWhWWoM78zxw4KZ3tTExA Next: GF22pAHoqkVWwjBzh7znDA6broC8QfRbGVMEWfefydp6 Diff:
OldNewDifferences
2020 let defaultSpread = 2000000
2121
2222 let wavesString = "WAVES"
23+
24+let contractFilename = "factory_v2.ride"
2325
2426 let decimalsMultPrice = ((100 * 1000) * 1000)
2527
6769
6870 let validPoolLabels = [poolLabelWxEmission]
6971
72+func wrapErr (msg) = makeString([contractFilename, ": ", msg], "")
73+
74+
75+func throwErr (msg) = throw(wrapErr(msg))
76+
77+
7078 func keyAllowedLpScriptHash () = "%s__allowedLpScriptHash"
7179
7280
109117 func keyVotingEmissionContract () = "%s__votingEmissionContract"
110118
111119
120+func keyUserPoolsContract () = "%s__userPoolsContract"
121+
122+
112123 func keyPriceAssets () = makeString(["%s", "priceAssets"], SEP)
113124
114125
137148
138149
139150 func keyPoolOneTokenOperationsDisabled (assetsInternal) = {
140- let $t036583720 = assetsInternal
141- let amountAssetInternal = $t036583720._1
142- let priceAssetInternal = $t036583720._2
151+ let $t038783940 = assetsInternal
152+ let amountAssetInternal = $t038783940._1
153+ let priceAssetInternal = $t038783940._2
143154 makeString(["%d%d%s", toString(amountAssetInternal), toString(priceAssetInternal), "oneTokenOperationsDisabled"], SEP)
144155 }
145156
298309 }
299310
300311
301-let permissionDeniedError = throw("Permission denied")
312+let permissionDeniedError = throwErr("Permission denied")
302313
303-let testError = throw("Test error here")
314+let testError = throwErr("Test error here")
304315
305316 func mustThis (i) = if ((i.caller == this))
306317 then true
388399 }
389400
390401
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+
391455 @Callable(i)
392456 func getSwapContractREADONLY () = $Tuple2(nil, getStringOrFail(swapContract()))
393457
395459
396460 @Callable(i)
397461 func getPoolLeaseConfigREADONLY (poolAddress,assetId) = {
398- let $t01430414608 = match getInteger(this, keyLeasedRatio(poolAddress, assetId)) {
462+ let $t01633016634 = match getInteger(this, keyLeasedRatio(poolAddress, assetId)) {
399463 case r: Int =>
400464 $Tuple2(true, min([100, max([0, r])]))
401465 case _ =>
406470 $Tuple2(false, 0)
407471 }
408472 }
409- let isLeasable = $t01430414608._1
410- let leasedRatio = $t01430414608._2
473+ let isLeasable = $t01633016634._1
474+ let leasedRatio = $t01633016634._2
411475 let minBalance = match getInteger(this, keyMinBalance(poolAddress, assetId)) {
412476 case b: Int =>
413477 max([0, b])
419483 0
420484 }
421485 }
422- let $t01487415098 = if ((assetId == "WAVES"))
486+ let $t01690017124 = if ((assetId == "WAVES"))
423487 then $Tuple3(valueOrElse(getString(this, keySWavesProxyAddress()), ""), getString(this, valueOrElse(keySWavesAssetId(), "")), MULT12)
424488 else $Tuple3("", "", 0)
425- let proxyAddress = $t01487415098._1
426- let proxyAssetId = $t01487415098._2
427- let proxyRateMul = $t01487415098._3
489+ let proxyAddress = $t01690017124._1
490+ let proxyAssetId = $t01690017124._2
491+ let proxyRateMul = $t01690017124._3
428492 let stakingProfitAddress = valueOrElse(getString(this, keyStakingProfitAddress()), "")
429493 $Tuple2(nil, $Tuple7(isLeasable, leasedRatio, minBalance, proxyAddress, proxyAssetId, proxyRateMul, stakingProfitAddress))
430494 }
538602 let checkCaller = mustAdmin(i)
539603 if ((checkCaller == checkCaller))
540604 then if (isDefined(getString(keyMappingPoolContractAddressToPoolAssets(poolAddress))))
541- then throw((("Pool address " + poolAddress) + " already registered."))
605+ then throwErr((("Pool address " + poolAddress) + " already registered."))
542606 else {
543607 let internalAmountAssetData = getInternalAssetIdOrCreate(amountAssetStr, 1)
544608 let internalAmountAssetId = internalAmountAssetData._1
550614 let ethalonPoolAccountScriptHash = getBinaryValue(keyPoolScriptHash())
551615 let poolExists = poolExistsInternal(amountAssetStr, priceAssetStr)
552616 if (poolExists)
553- then throw((((("Pool " + amountAssetStr) + "/") + priceAssetStr) + " has already been activated."))
617+ then throwErr((((("Pool " + amountAssetStr) + "/") + priceAssetStr) + " has already been activated."))
554618 else {
555619 let poolConfigValue = value(getString(this, keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId))))
556620 let amountAssetsDecimals = if ((amountAssetStr == "WAVES"))
565629 let poolActivateInvokeResult = invoke(addressFromStringValue(poolAddress), "activate", [amountAssetStr, priceAssetStr], nil)
566630 if ((poolActivateInvokeResult == poolActivateInvokeResult))
567631 then if ((poolActivateInvokeResult != "success"))
568- then throw("Pool initialisation error happened.")
632+ then throwErr("Pool initialisation error happened.")
569633 else {
570634 let assetsStoreContract = addressFromStringValue(getStringOrFail(keyAssetsStoreContract()))
571635 let createOrUpdateLpAssetInv = invoke(assetsStoreContract, "createOrUpdate", [lpAssetIdStr, lpAssetName, false], nil)
650714 let inAmountAssetId = toBase58String(value(payment.assetId))
651715 let lpAssetRequestedForBurning = valueOrErrorMessage(getString(keyMappingPoolContractToLPAsset(toString(caller))), "Invalid LP address called me.")
652716 if ((inAmountAssetId != lpAssetRequestedForBurning))
653- then throw("Invalid asset passed.")
717+ then throwErr("Invalid asset passed.")
654718 else if ((amountToBurn != paymentAmount))
655- then throw("Invalid amount passed.")
719+ then throwErr("Invalid amount passed.")
656720 else {
657721 let lpAsset = fromBase58String(lpAssetRequestedForBurning)
658722 $Tuple2([Burn(lpAsset, amountToBurn)], "success")
716780 let btcWeightNew = (btcWeight - weightDecrement)
717781 let ethWeightNew = (ethWeight - weightDecrement)
718782 if ((0 >= btcWeightNew))
719- then throw(("invalid btcWeightNew: " + toString(btcWeightNew)))
783+ then throwErr(("invalid btcWeightNew: " + toString(btcWeightNew)))
720784 else if ((0 >= ethWeightNew))
721- then throw(("invalid ethWeightNew: " + toString(ethWeightNew)))
785+ then throwErr(("invalid ethWeightNew: " + toString(ethWeightNew)))
722786 else {
723787 let btcLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(btcPoolAddress))
724788 let ethLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(ethPoolAddress))
795859 let priceAssets = getPriceAssets()
796860 let checkPriceAssetsSize = if ((size(priceAssets) > 0))
797861 then true
798- else throw("invalid price assets")
862+ else throwErr("invalid price assets")
799863 if ((checkPriceAssetsSize == checkPriceAssetsSize))
800864 then {
801865 func cb (acc,priceAsset) = {
9391003 }
9401004
9411005
1006+
1007+@Callable(i)
1008+func deletePool (poolContractAddress) = {
1009+ let checkCaller = if ((toString(i.caller) == getPoolCreator(poolContractAddress)))
1010+ then if (isPoolEmpty(poolContractAddress))
1011+ then true
1012+ else throwErr("Pool is not empty")
1013+ else mustManager(i)
1014+ if ((checkCaller == checkCaller))
1015+ then {
1016+ let checkWeight = if ((valueOrElse(getInteger(keyPoolToWeight(poolContractAddress)), 0) == 0))
1017+ then true
1018+ else throwErr("Pool weight is not Zero")
1019+ if ((checkWeight == checkWeight))
1020+ then {
1021+ let $t03894539082 = getAssetsDataFromPoolAddress(poolContractAddress)
1022+ let amountAssetId = $t03894539082._1
1023+ let priceAssetId = $t03894539082._2
1024+ let lpAssetId = $t03894539082._3
1025+ let amountAssetInternal = $t03894539082._4
1026+ let priceAssetInternal = $t03894539082._5
1027+ let userPoolsContract = addressFromStringValue(getStringValue(keyUserPoolsContract()))
1028+ let userPoolsInvoke = invoke(userPoolsContract, "deletePool", [amountAssetId, priceAssetId], nil)
1029+ if ((userPoolsInvoke == userPoolsInvoke))
1030+ then {
1031+ let votingEmissionContract = addressFromStringValue(getStringValue(keyVotingEmissionContract()))
1032+ let votingEmissionInvoke = invoke(votingEmissionContract, "deletePool", [amountAssetId, priceAssetId], nil)
1033+ if ((votingEmissionInvoke == votingEmissionInvoke))
1034+ then {
1035+ let assetsStoreContract = addressFromStringValue(getStringValue(keyAssetsStoreContract()))
1036+ let assetsStoreInvoke = invoke(assetsStoreContract, "deletePool", [amountAssetId, priceAssetId], nil)
1037+ if ((assetsStoreInvoke == assetsStoreInvoke))
1038+ 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))]
1039+ else throw("Strict value is not equal to itself.")
1040+ }
1041+ else throw("Strict value is not equal to itself.")
1042+ }
1043+ else throw("Strict value is not equal to itself.")
1044+ }
1045+ else throw("Strict value is not equal to itself.")
1046+ }
1047+ else throw("Strict value is not equal to itself.")
1048+ }
1049+
1050+
9421051 @Verifier(tx)
9431052 func verify () = {
9441053 let targetPublicKey = match managerPublicKeyOrUnit() {
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SCALE8 = 8
55
66 let MULT8 = 100000000
77
88 let MULT12 = 1000000000000
99
1010 let SCALE18 = 18
1111
1212 let MULT18 = toBigInt(1000000000000000000)
1313
1414 let POOLWEIGHTMULT = MULT8
1515
1616 let GWXvirtualPOOL = "GWXvirtualPOOL"
1717
1818 let labelPoolsLp = "POOLS_LP"
1919
2020 let defaultSpread = 2000000
2121
2222 let wavesString = "WAVES"
23+
24+let contractFilename = "factory_v2.ride"
2325
2426 let decimalsMultPrice = ((100 * 1000) * 1000)
2527
2628 let SEP = "__"
2729
2830 let EMPTY = ""
2931
3032 let PoolActive = 1
3133
3234 let PoolPutDisabled = 2
3335
3436 let PoolMatcherDisabled = 3
3537
3638 let PoolShutdown = 4
3739
3840 let idxInternalAssetId = 1
3941
4042 let idxResutActions = 2
4143
4244 let idxIfAssetIdCalculationPerformed = 3
4345
4446 let idxPoolAddress = 1
4547
4648 let idxPoolStatus = 2
4749
4850 let idxPoolLPAssetId = 3
4951
5052 let idxAmtAssetId = 4
5153
5254 let idxPriceAssetId = 5
5355
5456 let idxAmtAssetDcm = 6
5557
5658 let idxPriceAssetDcm = 7
5759
5860 let idxIAmtAssetId = 8
5961
6062 let idxIPriceAssetId = 9
6163
6264 let idxLPAssetDcm = 10
6365
6466 let idxPoolType = 11
6567
6668 let poolLabelWxEmission = "WX_EMISSION"
6769
6870 let validPoolLabels = [poolLabelWxEmission]
6971
72+func wrapErr (msg) = makeString([contractFilename, ": ", msg], "")
73+
74+
75+func throwErr (msg) = throw(wrapErr(msg))
76+
77+
7078 func keyAllowedLpScriptHash () = "%s__allowedLpScriptHash"
7179
7280
7381 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
7482
7583
7684 func swapContract () = "%s__swapContract"
7785
7886
7987 func keyFactoryConfig () = "%s__factoryConfig"
8088
8189
8290 func keyLpTokensList () = "%s__lpTokensList"
8391
8492
8593 func keyPoolScriptHash () = "%s%s__pool__scriptHash"
8694
8795
8896 func keyMatcherPub () = "%s%s__matcher__publicKey"
8997
9098
9199 func keyLegacyFactoryContract () = "%s__legacyFactoryContract"
92100
93101
94102 func keyLegacyPools () = "%s__legacyPools"
95103
96104
97105 func keyManagerPublicKey () = "%s__managerPublicKey"
98106
99107
100108 func keyManagerVaultAddress () = "%s__managerVaultAddress"
101109
102110
103111 func keyAdminPubKeys () = "%s__adminPubKeys"
104112
105113
106114 func keyAssetsStoreContract () = "%s__assetsStoreContract"
107115
108116
109117 func keyVotingEmissionContract () = "%s__votingEmissionContract"
110118
111119
120+func keyUserPoolsContract () = "%s__userPoolsContract"
121+
122+
112123 func keyPriceAssets () = makeString(["%s", "priceAssets"], SEP)
113124
114125
115126 func keyPriceDecimals () = "%s__priceDecimals"
116127
117128
118129 func keyAllPoolsShutdown () = "%s__shutdown"
119130
120131
121132 func keyNextInternalAssetId () = "%s__nextInternalAssetId"
122133
123134
124135 func keyPoolToWeight (poolAddress) = ("%s%s__poolWeight__" + poolAddress)
125136
126137
127138 func keyPoolToWeightHistory (poolAddress,num) = ((("%s%s__poolWeight__" + poolAddress) + "__") + toString(num))
128139
129140
130141 func keyMappingsInternal2baseAssetId (internalBaseAsset) = ("%s%s%d__mappings__internal2baseAssetId__" + toString(internalBaseAsset))
131142
132143
133144 func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
134145
135146
136147 func keyPoolConfig (amountAssetInternal,priceAssetInternal) = (((("%d%d%s__" + amountAssetInternal) + "__") + priceAssetInternal) + "__config")
137148
138149
139150 func keyPoolOneTokenOperationsDisabled (assetsInternal) = {
140- let $t036583720 = assetsInternal
141- let amountAssetInternal = $t036583720._1
142- let priceAssetInternal = $t036583720._2
151+ let $t038783940 = assetsInternal
152+ let amountAssetInternal = $t038783940._1
153+ let priceAssetInternal = $t038783940._2
143154 makeString(["%d%d%s", toString(amountAssetInternal), toString(priceAssetInternal), "oneTokenOperationsDisabled"], SEP)
144155 }
145156
146157
147158 func keyAllPoolsOneTokenOperationsDisabled () = makeString(["%s", "oneTokenOperationsDisabled"], SEP)
148159
149160
150161 func keyMappingLpAssetToPoolAssets (lpAssetStr) = (("%s%s%s__" + lpAssetStr) + "__mappings__lpAsset2Pool")
151162
152163
153164 func keyMappingPoolAssetsToLpasset (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + internalAmountAssetIdStr) + "__") + internalPriceAssetIdStr) + "__mappings__PoolAssets2LpAsset")
154165
155166
156167 func keyPoolSpread (poolAddress) = ("%s%s__spread__" + poolAddress)
157168
158169
159170 func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2PoolAssets")
160171
161172
162173 func keyMappingPoolAssetsToPoolContractAddress (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + toString(internalAmountAssetIdStr)) + "__") + toString(internalPriceAssetIdStr)) + "__mappings__poolAssets2PoolContract")
163174
164175
165176 func keyMappingPoolContractToLPAsset (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
166177
167178
168179 func keyMappingPoolLPAssetToPoolContractAddress (lpAssetStr) = (("%s%s%s__" + lpAssetStr) + "__mappings__lpAsset2PoolContract")
169180
170181
171182 func keyWxEmission (amountAssetId,priceAssetId) = ((("%s%s%s__wxEmission__" + amountAssetId) + "__") + priceAssetId)
172183
173184
174185 func keyInFee (poolAddress) = ("%s%s__inFee__" + poolAddress)
175186
176187
177188 func keyInFeeDefault () = "%s__inFeeDefault"
178189
179190
180191 func keyOutFee (poolAddress) = ("%s%s__outFee__" + poolAddress)
181192
182193
183194 func keyOutFeeDefault () = "%s__outFeeDefault"
184195
185196
186197 func keySkipOrderValidation (poolAddress) = ("%s%s__skipOrderValidation__" + poolAddress)
187198
188199
189200 func keyChangeAmpDelay (poolAddress) = ("%s%s__changeAmpDelay__" + poolAddress)
190201
191202
192203 func keyChangeAmpDelta (poolAddress) = ("%s%s__changeAmpDelta__" + poolAddress)
193204
194205
195206 func keyChangeAmpTarget (poolAddress) = ("%s%s__changeAmpTarget__" + poolAddress)
196207
197208
198209 func keySWavesProxyAddress () = "%s__sWavesProxyAddress"
199210
200211
201212 func keySWavesAssetId () = "%s__sWavesAssetId"
202213
203214
204215 func keyStakingProfitAddress () = "%s__stakingProfitAddress"
205216
206217
207218 func keyLeasedRatio (poolAddress,assetId) = makeString(["%s%s%s", "leasedRatio", poolAddress, assetId], SEP)
208219
209220
210221 func keyLeasedRatioDefault (assetId) = makeString(["%s%s", "leasedRatioDefault", assetId], SEP)
211222
212223
213224 func keyLeasedRatioTolerance (poolAddress,assetId) = makeString(["%s%s%s", "leasedRatioTolerance", poolAddress, assetId], SEP)
214225
215226
216227 func keyMinBalance (poolAddress,assetId) = makeString(["%s%s%s", "minBalance", poolAddress, assetId], SEP)
217228
218229
219230 func keyMinBalanceDefault (assetId) = makeString(["%s%s", "minBalanceDefault", assetId], SEP)
220231
221232
222233 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), ("No data for this.key=" + key))
223234
224235
225236 func getBooleanOrFail (key) = valueOrErrorMessage(getBoolean(this, key), ("No data for this.key=" + key))
226237
227238
228239 func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), ("No data for this.key=" + key))
229240
230241
231242 func parseAssetId (input) = if ((input == wavesString))
232243 then unit
233244 else fromBase58String(input)
234245
235246
236247 func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) {
237248 case s: String =>
238249 addressFromStringValue(s)
239250 case _ =>
240251 this
241252 }
242253
243254
244255 let IdxFactoryCfgStakingDapp = 1
245256
246257 let IdxFactoryCfgBoostingDapp = 2
247258
248259 let IdxFactoryCfgIdoDapp = 3
249260
250261 let IdxFactoryCfgTeamDapp = 4
251262
252263 let IdxFactoryCfgEmissionDapp = 5
253264
254265 let IdxFactoryCfgRestDapp = 6
255266
256267 let IdxFactoryCfgSlippageDapp = 7
257268
258269 let IdxFactoryCfgDaoDapp = 8
259270
260271 let IdxFactoryCfgMarketingDapp = 9
261272
262273 let IdxFactoryCfgGwxRewardDapp = 10
263274
264275 let IdxFactoryCfgBirdsDapp = 11
265276
266277 func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp])
267278
268279
269280 func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp])
270281
271282
272283 func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp])
273284
274285
275286 func getGwxRewardAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgGwxRewardDapp])
276287
277288
278289 func getPriceAssets () = match getString(keyPriceAssets()) {
279290 case s: String =>
280291 if ((size(s) == 0))
281292 then nil
282293 else split(s, SEP)
283294 case _ =>
284295 nil
285296 }
286297
287298
288299 func managerPublicKeyOrUnit () = {
289300 let managerVaultAddress = getManagerVaultAddressOrThis()
290301 match getString(managerVaultAddress, keyManagerPublicKey()) {
291302 case s: String =>
292303 fromBase58String(s)
293304 case _: Unit =>
294305 unit
295306 case _ =>
296307 throw("Match error")
297308 }
298309 }
299310
300311
301-let permissionDeniedError = throw("Permission denied")
312+let permissionDeniedError = throwErr("Permission denied")
302313
303-let testError = throw("Test error here")
314+let testError = throwErr("Test error here")
304315
305316 func mustThis (i) = if ((i.caller == this))
306317 then true
307318 else permissionDeniedError
308319
309320
310321 func mustManager (i) = match managerPublicKeyOrUnit() {
311322 case pk: ByteVector =>
312323 if ((i.callerPublicKey == pk))
313324 then true
314325 else permissionDeniedError
315326 case _: Unit =>
316327 mustThis(i)
317328 case _ =>
318329 throw("Match error")
319330 }
320331
321332
322333 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)
323334
324335
325336 func dataFactoryCfg (stakingAddress,boostingAddress,idoContract,teamContract,emissionContract,restContract,slippageContract) = makeString(["%s%s%s%s%s%s", stakingAddress, boostingAddress, idoContract, teamContract, emissionContract, restContract, slippageContract], SEP)
326337
327338
328339 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)
329340
330341
331342 func dataMappingPoolAssets (internalAmountAssetStr,internalPriceAssetStr) = makeString(["%d%d", toString(internalAmountAssetStr), toString(internalPriceAssetStr)], SEP)
332343
333344
334345 func getPoolConfig (poolAddress) = {
335346 let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolAddress)), SEP)
336347 let amountAssetInternal = poolAssets[1]
337348 let priceAssetInternal = poolAssets[2]
338349 split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP)
339350 }
340351
341352
342353 func getInternalAssetIdOrCreate (assetIdStr,incrementor) = {
343354 let internalAssetId = valueOrElse(getInteger(this, keyMappingsBaseAsset2internalId(assetIdStr)), 0)
344355 let currentIndexOfInternalId = valueOrElse(getInteger(this, keyNextInternalAssetId()), 0)
345356 let result = if ((internalAssetId == 0))
346357 then {
347358 let newInternalAssetId = (currentIndexOfInternalId + incrementor)
348359 $Tuple3(newInternalAssetId, [IntegerEntry(keyNextInternalAssetId(), newInternalAssetId), IntegerEntry(keyMappingsBaseAsset2internalId(assetIdStr), newInternalAssetId), StringEntry(keyMappingsInternal2baseAssetId(newInternalAssetId), assetIdStr)], true)
349360 }
350361 else $Tuple3(internalAssetId, nil, false)
351362 result
352363 }
353364
354365
355366 func mustAdmin (i) = {
356367 let adminPKs = split(valueOrElse(getString(keyAdminPubKeys()), EMPTY), SEP)
357368 if (containsElement(adminPKs, toBase58String(i.callerPublicKey)))
358369 then true
359370 else {
360371 let isManager = mustManager(i)
361372 if ((isManager == isManager))
362373 then true
363374 else throw("Strict value is not equal to itself.")
364375 }
365376 }
366377
367378
368379 func intOrDefaultOrFallback (key,keyDefault,valueFallback) = valueOrElse(getInteger(this, key), valueOrElse(getInteger(this, keyDefault), valueFallback))
369380
370381
371382 func poolExistsInternal (amountAssetId,priceAssetId) = {
372383 let amountAssetInternal = getInteger(keyMappingsBaseAsset2internalId(amountAssetId))
373384 let priceAssetInternal = getInteger(keyMappingsBaseAsset2internalId(priceAssetId))
374385 if (if ((amountAssetInternal == unit))
375386 then true
376387 else (priceAssetInternal == unit))
377388 then false
378389 else {
379390 let amAs = toString(value(amountAssetInternal))
380391 let prAs = toString(value(priceAssetInternal))
381392 let cfg = getString(keyPoolConfig(amAs, prAs))
382393 let cfgReverse = getString(keyPoolConfig(prAs, amAs))
383394 let exists = if ((cfg != unit))
384395 then true
385396 else (cfgReverse != unit)
386397 exists
387398 }
388399 }
389400
390401
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+
391455 @Callable(i)
392456 func getSwapContractREADONLY () = $Tuple2(nil, getStringOrFail(swapContract()))
393457
394458
395459
396460 @Callable(i)
397461 func getPoolLeaseConfigREADONLY (poolAddress,assetId) = {
398- let $t01430414608 = match getInteger(this, keyLeasedRatio(poolAddress, assetId)) {
462+ let $t01633016634 = match getInteger(this, keyLeasedRatio(poolAddress, assetId)) {
399463 case r: Int =>
400464 $Tuple2(true, min([100, max([0, r])]))
401465 case _ =>
402466 match getInteger(this, keyLeasedRatioDefault(assetId)) {
403467 case rd: Int =>
404468 $Tuple2(true, min([100, max([0, rd])]))
405469 case _ =>
406470 $Tuple2(false, 0)
407471 }
408472 }
409- let isLeasable = $t01430414608._1
410- let leasedRatio = $t01430414608._2
473+ let isLeasable = $t01633016634._1
474+ let leasedRatio = $t01633016634._2
411475 let minBalance = match getInteger(this, keyMinBalance(poolAddress, assetId)) {
412476 case b: Int =>
413477 max([0, b])
414478 case _ =>
415479 match getInteger(this, keyMinBalanceDefault(assetId)) {
416480 case bd: Int =>
417481 max([0, bd])
418482 case _ =>
419483 0
420484 }
421485 }
422- let $t01487415098 = if ((assetId == "WAVES"))
486+ let $t01690017124 = if ((assetId == "WAVES"))
423487 then $Tuple3(valueOrElse(getString(this, keySWavesProxyAddress()), ""), getString(this, valueOrElse(keySWavesAssetId(), "")), MULT12)
424488 else $Tuple3("", "", 0)
425- let proxyAddress = $t01487415098._1
426- let proxyAssetId = $t01487415098._2
427- let proxyRateMul = $t01487415098._3
489+ let proxyAddress = $t01690017124._1
490+ let proxyAssetId = $t01690017124._2
491+ let proxyRateMul = $t01690017124._3
428492 let stakingProfitAddress = valueOrElse(getString(this, keyStakingProfitAddress()), "")
429493 $Tuple2(nil, $Tuple7(isLeasable, leasedRatio, minBalance, proxyAddress, proxyAssetId, proxyRateMul, stakingProfitAddress))
430494 }
431495
432496
433497
434498 @Callable(i)
435499 func getLpAssetFromPoolAssetsREADONLY (asset1,asset2) = if (if ((asset1 == "8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS"))
436500 then (asset2 == "WAVES")
437501 else false)
438502 then $Tuple2(nil, unit)
439503 else {
440504 let assetNum1 = value(getInteger(this, keyMappingsBaseAsset2internalId(asset1)))
441505 let assetNum2 = value(getInteger(this, keyMappingsBaseAsset2internalId(asset2)))
442506 let ee = getString(this, keyMappingPoolAssetsToLpasset(toString(assetNum1), toString(assetNum2)))
443507 let res = if ((ee == unit))
444508 then unit
445509 else drop(value(ee), 4)
446510 $Tuple2(nil, res)
447511 }
448512
449513
450514
451515 @Callable(i)
452516 func getPoolAddressFromLpAssetREADONLY (lp) = $Tuple2(nil, valueOrElse(getString(this, keyMappingPoolLPAssetToPoolContractAddress(lp)), ""))
453517
454518
455519
456520 @Callable(i)
457521 func constructor (stakingContract,boostingContract,idoContract,teamContract,emissionContract,restContract,slpipageContract,priceDecimals) = {
458522 let checkCaller = mustManager(i)
459523 if ((checkCaller == checkCaller))
460524 then [StringEntry(keyFactoryConfig(), dataFactoryCfg(stakingContract, boostingContract, idoContract, teamContract, emissionContract, restContract, slpipageContract)), IntegerEntry(keyPriceDecimals(), priceDecimals)]
461525 else throw("Strict value is not equal to itself.")
462526 }
463527
464528
465529
466530 @Callable(i)
467531 func constructorV2 (mathcherPub58Str) = {
468532 let checkCaller = mustManager(i)
469533 if ((checkCaller == checkCaller))
470534 then {
471535 let mathcerPub = addressFromPublicKey(fromBase58String(mathcherPub58Str))
472536 if ((mathcerPub == mathcerPub))
473537 then [StringEntry(keyMatcherPub(), mathcherPub58Str)]
474538 else throw("Strict value is not equal to itself.")
475539 }
476540 else throw("Strict value is not equal to itself.")
477541 }
478542
479543
480544
481545 @Callable(i)
482546 func constructorV3 (daoContract,marketingContract,gwxRewardsContract,birdsContract) = {
483547 let checkCaller = mustManager(i)
484548 if ((checkCaller == checkCaller))
485549 then {
486550 let factoryCfg = split(getStringOrFail(keyFactoryConfig()), SEP)
487551 [StringEntry(keyFactoryConfig(), dataFactoryCfgV3(factoryCfg[1], factoryCfg[2], factoryCfg[3], factoryCfg[4], factoryCfg[5], factoryCfg[6], factoryCfg[7], daoContract, marketingContract, gwxRewardsContract, birdsContract))]
488552 }
489553 else throw("Strict value is not equal to itself.")
490554 }
491555
492556
493557
494558 @Callable(i)
495559 func constructorV4 (legacyFactoryContract,legacyPools) = {
496560 let checkCaller = mustManager(i)
497561 if ((checkCaller == checkCaller))
498562 then [StringEntry(keyLegacyFactoryContract(), legacyFactoryContract), StringEntry(keyLegacyPools(), makeString(legacyPools, SEP))]
499563 else throw("Strict value is not equal to itself.")
500564 }
501565
502566
503567
504568 @Callable(i)
505569 func constructorV5 (assetsStoreContract) = {
506570 let checkCaller = mustManager(i)
507571 if ((checkCaller == checkCaller))
508572 then [StringEntry(keyAssetsStoreContract(), assetsStoreContract)]
509573 else throw("Strict value is not equal to itself.")
510574 }
511575
512576
513577
514578 @Callable(i)
515579 func constructorV6 (votingEmissionContract,priceAssets) = {
516580 let cheks = [mustManager(i), if ((addressFromString(votingEmissionContract) != unit))
517581 then true
518582 else "invalid voting emission contract address"]
519583 if ((cheks == cheks))
520584 then [StringEntry(keyVotingEmissionContract(), votingEmissionContract), StringEntry(keyPriceAssets(), makeString(priceAssets, SEP))]
521585 else throw("Strict value is not equal to itself.")
522586 }
523587
524588
525589
526590 @Callable(i)
527591 func setAdmins (adminPubKeys) = {
528592 let checkCaller = mustManager(i)
529593 if ((checkCaller == checkCaller))
530594 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
531595 else throw("Strict value is not equal to itself.")
532596 }
533597
534598
535599
536600 @Callable(i)
537601 func activateNewPool (poolAddress,amountAssetStr,priceAssetStr,lpAssetName,lpAssetDescr,poolWeight,poolType,logo) = {
538602 let checkCaller = mustAdmin(i)
539603 if ((checkCaller == checkCaller))
540604 then if (isDefined(getString(keyMappingPoolContractAddressToPoolAssets(poolAddress))))
541- then throw((("Pool address " + poolAddress) + " already registered."))
605+ then throwErr((("Pool address " + poolAddress) + " already registered."))
542606 else {
543607 let internalAmountAssetData = getInternalAssetIdOrCreate(amountAssetStr, 1)
544608 let internalAmountAssetId = internalAmountAssetData._1
545609 let internalPriceAssetData = getInternalAssetIdOrCreate(priceAssetStr, if (internalAmountAssetData._3)
546610 then 2
547611 else 1)
548612 let internalPriceAssetId = internalPriceAssetData._1
549613 let poolAccountScriptHash = valueOrErrorMessage(scriptHash(addressFromStringValue(poolAddress)), ("No script has been found on pool account " + poolAddress))
550614 let ethalonPoolAccountScriptHash = getBinaryValue(keyPoolScriptHash())
551615 let poolExists = poolExistsInternal(amountAssetStr, priceAssetStr)
552616 if (poolExists)
553- then throw((((("Pool " + amountAssetStr) + "/") + priceAssetStr) + " has already been activated."))
617+ then throwErr((((("Pool " + amountAssetStr) + "/") + priceAssetStr) + " has already been activated."))
554618 else {
555619 let poolConfigValue = value(getString(this, keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId))))
556620 let amountAssetsDecimals = if ((amountAssetStr == "WAVES"))
557621 then decimalsMultPrice
558622 else pow(10, 0, value(assetInfo(fromBase58String(amountAssetStr))).decimals, 0, 0, DOWN)
559623 let priceAssetsDecimals = if ((priceAssetStr == "WAVES"))
560624 then decimalsMultPrice
561625 else pow(10, 0, value(assetInfo(fromBase58String(priceAssetStr))).decimals, 0, 0, DOWN)
562626 let lpAssetIssueAction = Issue(lpAssetName, lpAssetDescr, 1, 8, true)
563627 let lpAssetId = calculateAssetId(lpAssetIssueAction)
564628 let lpAssetIdStr = toBase58String(lpAssetId)
565629 let poolActivateInvokeResult = invoke(addressFromStringValue(poolAddress), "activate", [amountAssetStr, priceAssetStr], nil)
566630 if ((poolActivateInvokeResult == poolActivateInvokeResult))
567631 then if ((poolActivateInvokeResult != "success"))
568- then throw("Pool initialisation error happened.")
632+ then throwErr("Pool initialisation error happened.")
569633 else {
570634 let assetsStoreContract = addressFromStringValue(getStringOrFail(keyAssetsStoreContract()))
571635 let createOrUpdateLpAssetInv = invoke(assetsStoreContract, "createOrUpdate", [lpAssetIdStr, lpAssetName, false], nil)
572636 if ((createOrUpdateLpAssetInv == createOrUpdateLpAssetInv))
573637 then {
574638 let addPoolsLpLabelInv = invoke(assetsStoreContract, "addLabel", [lpAssetIdStr, labelPoolsLp], nil)
575639 if ((addPoolsLpLabelInv == addPoolsLpLabelInv))
576640 then {
577641 let setLogoInv = invoke(assetsStoreContract, "setLogo", [lpAssetIdStr, logo], nil)
578642 if ((setLogoInv == setLogoInv))
579643 then {
580644 let addAssetsLinkInv = invoke(assetsStoreContract, "addAssetsLink", [amountAssetStr, priceAssetStr, lpAssetIdStr], nil)
581645 if ((addAssetsLinkInv == addAssetsLinkInv))
582646 then {
583647 let increaseAssetPoolsNumberInv = invoke(assetsStoreContract, "increaseAssetPoolsNumber", [amountAssetStr], nil)
584648 if ((increaseAssetPoolsNumberInv == increaseAssetPoolsNumberInv))
585649 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)
586650 else throw("Strict value is not equal to itself.")
587651 }
588652 else throw("Strict value is not equal to itself.")
589653 }
590654 else throw("Strict value is not equal to itself.")
591655 }
592656 else throw("Strict value is not equal to itself.")
593657 }
594658 else throw("Strict value is not equal to itself.")
595659 }
596660 else throw("Strict value is not equal to itself.")
597661 }
598662 }
599663 else throw("Strict value is not equal to itself.")
600664 }
601665
602666
603667
604668 @Callable(i)
605669 func managePool (poolAddress,newStatus) = {
606670 let checkCaller = mustManager(i)
607671 if ((checkCaller == checkCaller))
608672 then {
609673 let poolConfig = getPoolConfig(poolAddress)
610674 let poolStatus = poolConfig[idxPoolStatus]
611675 let lpAssetIdStr = poolConfig[idxPoolLPAssetId]
612676 let amountAssetStr = poolConfig[idxAmtAssetId]
613677 let priceAssetStr = poolConfig[idxPriceAssetId]
614678 let amountAssetsDecimals = parseIntValue(poolConfig[idxAmtAssetDcm])
615679 let priceAssetsDecimals = parseIntValue(poolConfig[idxPriceAssetDcm])
616680 let internalAmountAssetId = parseIntValue(poolConfig[idxIAmtAssetId])
617681 let internalPriceAssetId = parseIntValue(poolConfig[idxIPriceAssetId])
618682 let lpAssetDcm = parseIntValue(poolConfig[idxLPAssetDcm])
619683 let poolType = poolConfig[idxPoolType]
620684 [StringEntry(keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId)), dataPoolCfg(poolAddress, toString(newStatus), lpAssetIdStr, amountAssetStr, priceAssetStr, amountAssetsDecimals, priceAssetsDecimals, internalAmountAssetId, internalPriceAssetId, lpAssetDcm, poolType))]
621685 }
622686 else throw("Strict value is not equal to itself.")
623687 }
624688
625689
626690
627691 @Callable(i)
628692 func emit (amountToEmit) = {
629693 let caller = i.caller
630694 let originCaller = i.originCaller
631695 let lpAssetRequested = valueOrErrorMessage(getString(keyMappingPoolContractToLPAsset(toString(caller))), "Invalid LP address called me.")
632696 let lpAsset = fromBase58String(lpAssetRequested)
633697 let legacyPools = split(valueOrElse(getString(keyLegacyPools()), EMPTY), SEP)
634698 let legacyFactoryContract = addressFromStringValue(valueOrErrorMessage(getString(keyLegacyFactoryContract()), "Legacy factory contract does not exists."))
635699 if ((0 >= amountToEmit))
636700 then nil
637701 else if (containsElement(legacyPools, toString(caller)))
638702 then $Tuple2(nil, legacyFactoryContract)
639703 else $Tuple2([Reissue(lpAsset, amountToEmit, true), ScriptTransfer(i.caller, amountToEmit, lpAsset)], "success")
640704 }
641705
642706
643707
644708 @Callable(i)
645709 func burn (amountToBurn) = {
646710 let caller = i.caller
647711 let originCaller = i.originCaller
648712 let payment = value(i.payments[0])
649713 let paymentAmount = value(payment.amount)
650714 let inAmountAssetId = toBase58String(value(payment.assetId))
651715 let lpAssetRequestedForBurning = valueOrErrorMessage(getString(keyMappingPoolContractToLPAsset(toString(caller))), "Invalid LP address called me.")
652716 if ((inAmountAssetId != lpAssetRequestedForBurning))
653- then throw("Invalid asset passed.")
717+ then throwErr("Invalid asset passed.")
654718 else if ((amountToBurn != paymentAmount))
655- then throw("Invalid amount passed.")
719+ then throwErr("Invalid amount passed.")
656720 else {
657721 let lpAsset = fromBase58String(lpAssetRequestedForBurning)
658722 $Tuple2([Burn(lpAsset, amountToBurn)], "success")
659723 }
660724 }
661725
662726
663727
664728 @Callable(i)
665729 func modifyWeight (lpAssetId,share) = {
666730 let checkCaller = if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionContract()), "")))
667731 then true
668732 else mustManager(i)
669733 if ((checkCaller == checkCaller))
670734 then {
671735 let poolContractAddress = getStringOrFail(keyMappingPoolLPAssetToPoolContractAddress(lpAssetId))
672736 let poolWeightKey = keyPoolToWeight(poolContractAddress)
673737 let gwxWeightKey = keyPoolToWeight(GWXvirtualPOOL)
674738 let gwxWeight = valueOrElse(getInteger(gwxWeightKey), 0)
675739 let poolWeight = valueOrElse(getInteger(poolWeightKey), 0)
676740 let poolWeightNew = share
677741 let factoryCfg = split(getStringOrFail(keyFactoryConfig()), SEP)
678742 let stakingContract = getStakingAddressOrFail(factoryCfg)
679743 let onModifyWeightInv = invoke(stakingContract, "onModifyWeight", [lpAssetId, poolContractAddress], nil)
680744 if ((onModifyWeightInv == onModifyWeightInv))
681745 then {
682746 let gwxVirtualPoolActions = if ((gwxWeight == 0))
683747 then nil
684748 else [IntegerEntry(gwxWeightKey, 0)]
685749 let poolWeightHistoryKey = keyPoolToWeightHistory(poolContractAddress, 0)
686750 let poolWeightHistoryOrUnit = getInteger(poolWeightHistoryKey)
687751 let poolWeightHistoryActions = if ((poolWeightHistoryOrUnit == unit))
688752 then nil
689753 else [DeleteEntry(poolWeightHistoryKey)]
690754 (([IntegerEntry(poolWeightKey, poolWeightNew)] ++ gwxVirtualPoolActions) ++ poolWeightHistoryActions)
691755 }
692756 else throw("Strict value is not equal to itself.")
693757 }
694758 else throw("Strict value is not equal to itself.")
695759 }
696760
697761
698762
699763 @Callable(i)
700764 func modifyWeights (btcPoolAddress,ethPoolAddress,ethBtcPoolAddress,usdcUsdtPoolAddress) = {
701765 let checkCaller = mustManager(i)
702766 if ((checkCaller == checkCaller))
703767 then {
704768 let ethBtcWeightNew = ((5 * POOLWEIGHTMULT) / 100)
705769 let usdcUsdtWeightNew = ((5 * POOLWEIGHTMULT) / 100)
706770 let weightDecrement = ((5 * POOLWEIGHTMULT) / 100)
707771 let factoryCfg = split(getStringOrFail(keyFactoryConfig()), SEP)
708772 let stakingDapp = getStakingAddressOrFail(factoryCfg)
709773 let gwxRewardDapp = getGwxRewardAddressOrFail(factoryCfg)
710774 let btcWeightKEY = keyPoolToWeight(btcPoolAddress)
711775 let ethWeightKEY = keyPoolToWeight(ethPoolAddress)
712776 let ethBtcWeightKEY = keyPoolToWeight(ethBtcPoolAddress)
713777 let usdcUsdtWeightKEY = keyPoolToWeight(usdcUsdtPoolAddress)
714778 let btcWeight = getIntOrFail(btcWeightKEY)
715779 let ethWeight = getIntOrFail(ethWeightKEY)
716780 let btcWeightNew = (btcWeight - weightDecrement)
717781 let ethWeightNew = (ethWeight - weightDecrement)
718782 if ((0 >= btcWeightNew))
719- then throw(("invalid btcWeightNew: " + toString(btcWeightNew)))
783+ then throwErr(("invalid btcWeightNew: " + toString(btcWeightNew)))
720784 else if ((0 >= ethWeightNew))
721- then throw(("invalid ethWeightNew: " + toString(ethWeightNew)))
785+ then throwErr(("invalid ethWeightNew: " + toString(ethWeightNew)))
722786 else {
723787 let btcLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(btcPoolAddress))
724788 let ethLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(ethPoolAddress))
725789 let ethBtcLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(ethBtcPoolAddress))
726790 let usdcUsdtLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(usdcUsdtPoolAddress))
727791 let onModifyWeightBtc = invoke(stakingDapp, "onModifyWeight", [btcLpAssetIdStr, btcPoolAddress], nil)
728792 if ((onModifyWeightBtc == onModifyWeightBtc))
729793 then {
730794 let onModifyWeightEth = invoke(stakingDapp, "onModifyWeight", [ethLpAssetIdStr, ethPoolAddress], nil)
731795 if ((onModifyWeightEth == onModifyWeightEth))
732796 then {
733797 let onModifyWeightEthBtc = invoke(stakingDapp, "onModifyWeight", [ethBtcLpAssetIdStr, ethBtcPoolAddress], nil)
734798 if ((onModifyWeightEthBtc == onModifyWeightEthBtc))
735799 then {
736800 let onModifyWeightUsdcUsdt = invoke(stakingDapp, "onModifyWeight", [usdcUsdtLpAssetIdStr, usdcUsdtPoolAddress], nil)
737801 if ((onModifyWeightUsdcUsdt == onModifyWeightUsdcUsdt))
738802 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)]
739803 else throw("Strict value is not equal to itself.")
740804 }
741805 else throw("Strict value is not equal to itself.")
742806 }
743807 else throw("Strict value is not equal to itself.")
744808 }
745809 else throw("Strict value is not equal to itself.")
746810 }
747811 }
748812 else throw("Strict value is not equal to itself.")
749813 }
750814
751815
752816
753817 @Callable(i)
754818 func checkWxEmissionPoolLabel (amountAssetId,priceAssetId) = {
755819 let haveLabel = match getBoolean(keyWxEmission(amountAssetId, priceAssetId)) {
756820 case b: Boolean =>
757821 b
758822 case _ =>
759823 false
760824 }
761825 $Tuple2(nil, haveLabel)
762826 }
763827
764828
765829
766830 @Callable(i)
767831 func setWxEmissionPoolLabel (amountAssetId,priceAssetId) = {
768832 let checkCaller = mustAdmin(i)
769833 if ((checkCaller == checkCaller))
770834 then $Tuple2([BooleanEntry(keyWxEmission(amountAssetId, priceAssetId), true)], unit)
771835 else throw("Strict value is not equal to itself.")
772836 }
773837
774838
775839
776840 @Callable(i)
777841 func deleteWxEmissionPoolLabel (amountAssetId,priceAssetId) = {
778842 let checkCaller = if ((i.caller == this))
779843 then true
780844 else mustAdmin(i)
781845 if ((checkCaller == checkCaller))
782846 then $Tuple2([DeleteEntry(keyWxEmission(amountAssetId, priceAssetId))], unit)
783847 else throw("Strict value is not equal to itself.")
784848 }
785849
786850
787851
788852 @Callable(i)
789853 func onVerificationLoss (assetId) = {
790854 let checkCaller = if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyAssetsStoreContract()), "")))
791855 then true
792856 else mustManager(i)
793857 if ((checkCaller == checkCaller))
794858 then {
795859 let priceAssets = getPriceAssets()
796860 let checkPriceAssetsSize = if ((size(priceAssets) > 0))
797861 then true
798- else throw("invalid price assets")
862+ else throwErr("invalid price assets")
799863 if ((checkPriceAssetsSize == checkPriceAssetsSize))
800864 then {
801865 func cb (acc,priceAsset) = {
802866 let r = invoke(this, "deleteWxEmissionPoolLabel", [assetId, priceAsset], nil)
803867 if ((r == r))
804868 then unit
805869 else throw("Strict value is not equal to itself.")
806870 }
807871
808872 let actions = {
809873 let $l = priceAssets
810874 let $s = size($l)
811875 let $acc0 = unit
812876 func $f0_1 ($a,$i) = if (($i >= $s))
813877 then $a
814878 else cb($a, $l[$i])
815879
816880 func $f0_2 ($a,$i) = if (($i >= $s))
817881 then $a
818882 else throw("List size exceeds 11")
819883
820884 $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)
821885 }
822886 if ((actions == actions))
823887 then $Tuple2(nil, unit)
824888 else throw("Strict value is not equal to itself.")
825889 }
826890 else throw("Strict value is not equal to itself.")
827891 }
828892 else throw("Strict value is not equal to itself.")
829893 }
830894
831895
832896
833897 @Callable(i)
834898 func isPoolOneTokenOperationsDisabledREADONLY (poolAddress) = {
835899 let poolConfig = getPoolConfig(poolAddress)
836900 let assetsInternal = $Tuple2(parseIntValue(poolConfig[idxIAmtAssetId]), parseIntValue(poolConfig[idxIPriceAssetId]))
837901 let poolOneTokenOperationsDisabled = valueOrElse(getBoolean(keyPoolOneTokenOperationsDisabled(assetsInternal)), false)
838902 let allPoolsOneTokenOperationsDisabled = valueOrElse(getBoolean(keyAllPoolsOneTokenOperationsDisabled()), false)
839903 $Tuple2(nil, if (allPoolsOneTokenOperationsDisabled)
840904 then true
841905 else poolOneTokenOperationsDisabled)
842906 }
843907
844908
845909
846910 @Callable(i)
847911 func getInFeeREADONLY (poolAddress) = {
848912 let fee = intOrDefaultOrFallback(keyInFee(poolAddress), keyInFeeDefault(), 0)
849913 $Tuple2(nil, fee)
850914 }
851915
852916
853917
854918 @Callable(i)
855919 func getOutFeeREADONLY (poolAddress) = {
856920 let fee = intOrDefaultOrFallback(keyOutFee(poolAddress), keyOutFeeDefault(), fraction(10, MULT8, 10000))
857921 $Tuple2(nil, fee)
858922 }
859923
860924
861925
862926 @Callable(i)
863927 func poolInfoREADONLY (amountAssetIdStr,priceAssetIdStr) = {
864928 let amountAssetInternalIdOption = getInteger(this, keyMappingsBaseAsset2internalId(amountAssetIdStr))
865929 let priceAssetInternalIdOption = getInteger(this, keyMappingsBaseAsset2internalId(priceAssetIdStr))
866930 let poolContractAddressOption = getString(this, keyMappingPoolAssetsToPoolContractAddress(value(amountAssetInternalIdOption), value(priceAssetInternalIdOption)))
867931 let lpAssetIdOption = getString(this, keyMappingPoolContractToLPAsset(value(poolContractAddressOption)))
868932 let poolExists = if (if (isDefined(amountAssetInternalIdOption))
869933 then isDefined(priceAssetInternalIdOption)
870934 else false)
871935 then isDefined(poolContractAddressOption)
872936 else false
873937 let poolInfo = if (poolExists)
874938 then $Tuple2(addressFromStringValue(value(poolContractAddressOption)), parseAssetId(value(lpAssetIdOption)))
875939 else unit
876940 $Tuple2(nil, poolInfo)
877941 }
878942
879943
880944
881945 @Callable(i)
882946 func getPoolStatusREADONLY (poolAddress) = {
883947 let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolAddress)), SEP)
884948 let amountAssetInternal = poolAssets[1]
885949 let priceAssetInternal = poolAssets[2]
886950 let cfg = split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP)
887951 $Tuple2(nil, parseIntValue(cfg[idxPoolStatus]))
888952 }
889953
890954
891955
892956 @Callable(i)
893957 func getPoolConfigREADONLY (poolAddress) = {
894958 let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolAddress)), SEP)
895959 let amountAssetInternal = poolAssets[1]
896960 let priceAssetInternal = poolAssets[2]
897961 let cfg = split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP)
898962 $Tuple2(nil, cfg)
899963 }
900964
901965
902966
903967 @Callable(i)
904968 func getPoolConfigByLpAssetIdREADONLY (lpAssetIdStr) = {
905969 let poolAssets = split(getStringOrFail(keyMappingLpAssetToPoolAssets(lpAssetIdStr)), SEP)
906970 let amountAssetInternal = poolAssets[1]
907971 let priceAssetInternal = poolAssets[2]
908972 let cfg = split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP)
909973 $Tuple2(nil, cfg)
910974 }
911975
912976
913977
914978 @Callable(i)
915979 func poolExistsREADONLY (amountAssetId,priceAssetId) = $Tuple2(nil, poolExistsInternal(amountAssetId, priceAssetId))
916980
917981
918982
919983 @Callable(i)
920984 func skipOrderValidationREADONLY (poolAddress) = $Tuple2(nil, valueOrElse(getBoolean(keySkipOrderValidation(poolAddress)), false))
921985
922986
923987
924988 @Callable(i)
925989 func getChangeAmpConfigREADONLY (poolAddress) = {
926990 let delay = getIntegerValue(keyChangeAmpDelay(poolAddress))
927991 let delta = getIntegerValue(keyChangeAmpDelta(poolAddress))
928992 let target = getIntegerValue(keyChangeAmpTarget(poolAddress))
929993 $Tuple2(nil, [delay, delta, target])
930994 }
931995
932996
933997
934998 @Callable(i)
935999 func getPoolWeightREADONLY (lpAssetId) = {
9361000 let poolAddress = getStringOrFail(keyMappingPoolLPAssetToPoolContractAddress(lpAssetId))
9371001 let weight = valueOrElse(getInteger(keyPoolToWeight(poolAddress)), 0)
9381002 $Tuple2(nil, weight)
9391003 }
9401004
9411005
1006+
1007+@Callable(i)
1008+func deletePool (poolContractAddress) = {
1009+ let checkCaller = if ((toString(i.caller) == getPoolCreator(poolContractAddress)))
1010+ then if (isPoolEmpty(poolContractAddress))
1011+ then true
1012+ else throwErr("Pool is not empty")
1013+ else mustManager(i)
1014+ if ((checkCaller == checkCaller))
1015+ then {
1016+ let checkWeight = if ((valueOrElse(getInteger(keyPoolToWeight(poolContractAddress)), 0) == 0))
1017+ then true
1018+ else throwErr("Pool weight is not Zero")
1019+ if ((checkWeight == checkWeight))
1020+ then {
1021+ let $t03894539082 = getAssetsDataFromPoolAddress(poolContractAddress)
1022+ let amountAssetId = $t03894539082._1
1023+ let priceAssetId = $t03894539082._2
1024+ let lpAssetId = $t03894539082._3
1025+ let amountAssetInternal = $t03894539082._4
1026+ let priceAssetInternal = $t03894539082._5
1027+ let userPoolsContract = addressFromStringValue(getStringValue(keyUserPoolsContract()))
1028+ let userPoolsInvoke = invoke(userPoolsContract, "deletePool", [amountAssetId, priceAssetId], nil)
1029+ if ((userPoolsInvoke == userPoolsInvoke))
1030+ then {
1031+ let votingEmissionContract = addressFromStringValue(getStringValue(keyVotingEmissionContract()))
1032+ let votingEmissionInvoke = invoke(votingEmissionContract, "deletePool", [amountAssetId, priceAssetId], nil)
1033+ if ((votingEmissionInvoke == votingEmissionInvoke))
1034+ then {
1035+ let assetsStoreContract = addressFromStringValue(getStringValue(keyAssetsStoreContract()))
1036+ let assetsStoreInvoke = invoke(assetsStoreContract, "deletePool", [amountAssetId, priceAssetId], nil)
1037+ if ((assetsStoreInvoke == assetsStoreInvoke))
1038+ 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))]
1039+ else throw("Strict value is not equal to itself.")
1040+ }
1041+ else throw("Strict value is not equal to itself.")
1042+ }
1043+ else throw("Strict value is not equal to itself.")
1044+ }
1045+ else throw("Strict value is not equal to itself.")
1046+ }
1047+ else throw("Strict value is not equal to itself.")
1048+ }
1049+
1050+
9421051 @Verifier(tx)
9431052 func verify () = {
9441053 let targetPublicKey = match managerPublicKeyOrUnit() {
9451054 case pk: ByteVector =>
9461055 pk
9471056 case _: Unit =>
9481057 tx.senderPublicKey
9491058 case _ =>
9501059 throw("Match error")
9511060 }
9521061 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
9531062 }
9541063

github/deemru/w8io/026f985 
124.06 ms