tx · 12YoHs4V5AhvPUhVMvYMF9MsLY5isxGnkNDWB7D4ATze

3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai:  -0.03000000 Waves

2023.09.25 13:55 [2770838] smart account 3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai > SELF 0.00000000 Waves

{ "type": 13, "id": "12YoHs4V5AhvPUhVMvYMF9MsLY5isxGnkNDWB7D4ATze", "fee": 3000000, "feeAssetId": null, "timestamp": 1695639365125, "version": 2, "chainId": 84, "sender": "3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai", "senderPublicKey": "2JEaBjtjvMoNGKZmL9QxYefa1VkMJM3vMW8rNvTs9R2H", "proofs": [ "4xiPDis4yCv7tuuWXvVcnjUzfYZxGenwUWA4pLo6NfPtLTxmCDtZrgYZARnn4VNrUgN5TQEYfur6MfS4D2gygTYf" ], "script": "base64:BgLkLwgCEgASBAoCCAgSBAoCCAgSAwoBCBIKCggICAgICAgIARIDCgEIEgYKBAgICAgSBAoCCBgSAwoBCBIECgIIGBIDCgEYEgoKCAgICAgIAQgIEgQKAggBEgMKAQESAwoBARIECgIIARIGCgQICAgIEgQKAggIEgQKAggIEgQKAggIEgMKAQgSAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSBAoCCAgSAwoBCBIDCgEIEgMKAQgSBAoCCAgSAwoBCBIDCgEIEgMKAQgSAwoBCCIGU0NBTEU4IgVNVUxUOCIGTVVMVDEyIgdTQ0FMRTE4IgZNVUxUMTgiDlBPT0xXRUlHSFRNVUxUIg5HV1h2aXJ0dWFsUE9PTCIMbGFiZWxQb29sc0xwIg1kZWZhdWx0U3ByZWFkIgt3YXZlc1N0cmluZyIQY29udHJhY3RGaWxlbmFtZSIRZGVjaW1hbHNNdWx0UHJpY2UiA1NFUCIFRU1QVFkiClBvb2xBY3RpdmUiD1Bvb2xQdXREaXNhYmxlZCITUG9vbE1hdGNoZXJEaXNhYmxlZCIMUG9vbFNodXRkb3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mVAQCYm8JAQJiSAADCQABAgUCYm8CCkJ5dGVWZWN0b3IEAmJPBQJibwUCYk8DCQABAgUCYm8CBFVuaXQIBQJmUg9zZW5kZXJQdWJsaWNLZXkJAAIBAgtNYXRjaCBlcnJvcgkA9AMDCAUCZlIJYm9keUJ5dGVzCQCRAwIIBQJmUgZwcm9vZnMAAAUCZlT+AC9o", "height": 2770838, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2UqTRZfzvSRD7545Q6ZoKmvc7sMehGZHXFGB2mS7Qa65 Next: FaxQ3DWJoup7joT5vjjifGE59B5V91oLX2BwswLiEhjV Diff:
OldNewDifferences
244244 func keyMinBalanceDefault (assetId) = makeString(["%s%s", "minBalanceDefault", assetId], SEP)
245245
246246
247+func keyAmp (poolAddress) = makeString(["%s%s", "amp", poolAddress], SEP)
248+
249+
250+func keyAmpHistory (poolAddress,heightBlocks) = makeString(["%s%s%d", "amp", poolAddress, toString(heightBlocks)], SEP)
251+
252+
253+func keyChangeAmpLastCall (poolAddress) = makeString(["%s%s", "changeAmpLastCall", poolAddress], SEP)
254+
255+
256+let ampInitial = 50
257+
247258 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), ("No data for this.key=" + key))
248259
249260
430441
431442
432443 func getPoolCreator (poolContractAddress) = {
433- let $t01558215719 = getAssetsDataFromPoolAddress(poolContractAddress)
434- let amountAssetId = $t01558215719._1
435- let priceAssetId = $t01558215719._2
436- let lpAssetId = $t01558215719._3
437- let amountAssetInternal = $t01558215719._4
438- let priceAssetInternal = $t01558215719._5
444+ let $t01596716104 = getAssetsDataFromPoolAddress(poolContractAddress)
445+ let amountAssetId = $t01596716104._1
446+ let priceAssetId = $t01596716104._2
447+ let lpAssetId = $t01596716104._3
448+ let amountAssetInternal = $t01596716104._4
449+ let priceAssetInternal = $t01596716104._5
439450 let userPoolsContract = addressFromStringValue(getStringValue(keyUserPoolsContract()))
440451 let poolCreator = invoke(userPoolsContract, "getPoolCreatorREADONLY", [amountAssetId, priceAssetId], nil)
441452 poolCreator
454465
455466
456467 func isPoolEmpty (poolContractAddress) = {
457- let $t01629416431 = getAssetsDataFromPoolAddress(poolContractAddress)
458- let amountAssetId = $t01629416431._1
459- let priceAssetId = $t01629416431._2
460- let lpAssetId = $t01629416431._3
461- let amountAssetInternal = $t01629416431._4
462- let priceAssetInternal = $t01629416431._5
468+ let $t01667916816 = getAssetsDataFromPoolAddress(poolContractAddress)
469+ let amountAssetId = $t01667916816._1
470+ let priceAssetId = $t01667916816._2
471+ let lpAssetId = $t01667916816._3
472+ let amountAssetInternal = $t01667916816._4
473+ let priceAssetInternal = $t01667916816._5
463474 if ((getAddressBalance(poolContractAddress, amountAssetId) == 0))
464475 then (getAddressBalance(poolContractAddress, priceAssetId) == 0)
465476 else false
473484
474485 @Callable(i)
475486 func getPoolLeaseConfigREADONLY (poolAddress,assetId) = {
476- let $t01674617050 = match getInteger(this, keyLeasedRatio(poolAddress, assetId)) {
487+ let $t01713117435 = match getInteger(this, keyLeasedRatio(poolAddress, assetId)) {
477488 case r: Int =>
478489 $Tuple2(true, min([100, max([0, r])]))
479490 case _ =>
484495 $Tuple2(false, 0)
485496 }
486497 }
487- let isLeasable = $t01674617050._1
488- let leasedRatio = $t01674617050._2
498+ let isLeasable = $t01713117435._1
499+ let leasedRatio = $t01713117435._2
489500 let minBalance = match getInteger(this, keyMinBalance(poolAddress, assetId)) {
490501 case b: Int =>
491502 max([0, b])
497508 0
498509 }
499510 }
500- let $t01731617540 = if ((assetId == "WAVES"))
511+ let $t01770117925 = if ((assetId == "WAVES"))
501512 then $Tuple3(valueOrElse(getString(this, keySWavesProxyAddress()), ""), getString(this, valueOrElse(keySWavesAssetId(), "")), MULT12)
502513 else $Tuple3("", "", 0)
503- let proxyAddress = $t01731617540._1
504- let proxyAssetId = $t01731617540._2
505- let proxyRateMul = $t01731617540._3
514+ let proxyAddress = $t01770117925._1
515+ let proxyAssetId = $t01770117925._2
516+ let proxyRateMul = $t01770117925._3
506517 let stakingProfitAddress = valueOrElse(getString(this, keyStakingProfitAddress()), "")
507518 $Tuple2(nil, $Tuple7(isLeasable, leasedRatio, minBalance, proxyAddress, proxyAssetId, proxyRateMul, stakingProfitAddress))
508519 }
660671 then {
661672 let increaseAssetPoolsNumberInv = invoke(assetsStoreContract, "increaseAssetPoolsNumber", [amountAssetStr], nil)
662673 if ((increaseAssetPoolsNumberInv == increaseAssetPoolsNumberInv))
663- 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)
674+ 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), StringEntry(keyAmp(poolAddress), toString(ampInitial)), StringEntry(keyAmpHistory(poolAddress, height), toString(ampInitial))]), lpAssetIdStr)
664675 else throw("Strict value is not equal to itself.")
665676 }
666677 else throw("Strict value is not equal to itself.")
909920
910921
911922 @Callable(i)
923+func changeAmp (poolAddress) = {
924+ let delay = getIntegerValue(keyChangeAmpDelay(poolAddress))
925+ let delta = getIntegerValue(keyChangeAmpDelta(poolAddress))
926+ let target = getIntegerValue(keyChangeAmpTarget(poolAddress))
927+ let curAmp = parseIntValue(getStringValue(keyAmp(poolAddress)))
928+ let newAmpRaw = (curAmp + delta)
929+ let newAmp = if ((0 > delta))
930+ then if ((target > newAmpRaw))
931+ then target
932+ else newAmpRaw
933+ else if ((newAmpRaw > target))
934+ then target
935+ else newAmpRaw
936+ let lastCall = valueOrElse(getInteger(keyChangeAmpLastCall(poolAddress)), 0)
937+ let wait = (lastCall + delay)
938+ let checks = [if ((height > wait))
939+ then true
940+ else throwErr("try again in few blocks"), if ((curAmp != newAmp))
941+ then true
942+ else throwErr("already reached target")]
943+ if ((checks == checks))
944+ then [IntegerEntry(keyChangeAmpLastCall(poolAddress), height), StringEntry(keyAmp(poolAddress), toString(newAmp)), StringEntry(keyAmpHistory(poolAddress, height), toString(newAmp))]
945+ else throw("Strict value is not equal to itself.")
946+ }
947+
948+
949+
950+@Callable(i)
912951 func isPoolOneTokenOperationsDisabledREADONLY (poolAddress) = {
913952 let poolConfig = getPoolConfig(poolAddress)
914953 let assetsInternal = $Tuple2(parseIntValue(poolConfig[idxIAmtAssetId]), parseIntValue(poolConfig[idxIPriceAssetId]))
10691108 else throwErr("Pool must be SHUTDOWN (4)")
10701109 if ((checkStatus == checkStatus))
10711110 then {
1072- let $t04039540532 = getAssetsDataFromPoolAddress(poolContractAddress)
1073- let amountAssetId = $t04039540532._1
1074- let priceAssetId = $t04039540532._2
1075- let lpAssetId = $t04039540532._3
1076- let amountAssetInternal = $t04039540532._4
1077- let priceAssetInternal = $t04039540532._5
1111+ let $t04194642083 = getAssetsDataFromPoolAddress(poolContractAddress)
1112+ let amountAssetId = $t04194642083._1
1113+ let priceAssetId = $t04194642083._2
1114+ let lpAssetId = $t04194642083._3
1115+ let amountAssetInternal = $t04194642083._4
1116+ let priceAssetInternal = $t04194642083._5
10781117 let userPoolsContract = addressFromStringValue(getStringValue(keyUserPoolsContract()))
10791118 let userPoolsInvoke = invoke(userPoolsContract, "deletePool", [amountAssetId, priceAssetId], nil)
10801119 if ((userPoolsInvoke == userPoolsInvoke))
10861125 let assetsStoreContract = addressFromStringValue(getStringValue(keyAssetsStoreContract()))
10871126 let assetsStoreInvoke = invoke(assetsStoreContract, "deletePool", [amountAssetId, priceAssetId], nil)
10881127 if ((assetsStoreInvoke == assetsStoreInvoke))
1089- 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))]
1128+ 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)), DeleteEntry(keyAmp(poolContractAddress)), DeleteEntry(keyChangeAmpLastCall(poolContractAddress))]
10901129 else throw("Strict value is not equal to itself.")
10911130 }
10921131 else throw("Strict value is not equal to itself.")
10941133 else throw("Strict value is not equal to itself.")
10951134 }
10961135 else throw("Strict value is not equal to itself.")
1097- }
1098- else throw("Strict value is not equal to itself.")
1099- }
1100- else throw("Strict value is not equal to itself.")
1101- }
1102-
1103-
1104-
1105-@Callable(i)
1106-func invert (poolAddressStr) = {
1107- let checks = [mustManager(i)]
1108- if ((checks == checks))
1109- then {
1110- let userPoolsContract = addressFromStringValue(getStringValue(keyUserPoolsContract()))
1111- let votingEmissionContract = addressFromStringValue(getStringValue(keyVotingEmissionContract()))
1112- let poolAddress = addressFromStringValue(poolAddressStr)
1113- let poolConfig = getPoolConfig(poolAddressStr)
1114- let poolStatus = poolConfig[idxPoolStatus]
1115- let lpAssetIdStr = poolConfig[idxPoolLPAssetId]
1116- let amountAssetStr = poolConfig[idxAmtAssetId]
1117- let priceAssetStr = poolConfig[idxPriceAssetId]
1118- let amountAssetsDecimals = parseIntValue(poolConfig[idxAmtAssetDcm])
1119- let priceAssetsDecimals = parseIntValue(poolConfig[idxPriceAssetDcm])
1120- let internalAmountAssetId = parseIntValue(poolConfig[idxIAmtAssetId])
1121- let internalPriceAssetId = parseIntValue(poolConfig[idxIPriceAssetId])
1122- let lpAssetDcm = parseIntValue(poolConfig[idxLPAssetDcm])
1123- let poolType = poolConfig[idxPoolType]
1124- let invs = [invoke(poolAddress, "invert", nil, nil), invoke(votingEmissionContract, "invert", [amountAssetStr, priceAssetStr], nil)]
1125- if ((invs == invs))
1126- then {
1127- let wxEmission = valueOrElse(getBoolean(this, keyWxEmission(amountAssetStr, priceAssetStr)), false)
1128- let wxEmissionActions = if (wxEmission)
1129- then [DeleteEntry(keyWxEmission(amountAssetStr, priceAssetStr)), BooleanEntry(keyWxEmission(priceAssetStr, amountAssetStr), wxEmission)]
1130- else nil
1131- $Tuple2(([StringEntry(keyPoolConfig(toString(internalPriceAssetId), toString(internalAmountAssetId)), dataPoolCfg(poolAddressStr, poolStatus, lpAssetIdStr, priceAssetStr, amountAssetStr, priceAssetsDecimals, amountAssetsDecimals, internalPriceAssetId, internalAmountAssetId, lpAssetDcm, poolType)), DeleteEntry(keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId))), StringEntry(keyMappingLpAssetToPoolAssets(lpAssetIdStr), dataMappingPoolAssets(internalPriceAssetId, internalAmountAssetId)), DeleteEntry(keyMappingPoolAssetsToLpasset(toString(internalAmountAssetId), toString(internalPriceAssetId))), StringEntry(keyMappingPoolAssetsToLpasset(toString(internalPriceAssetId), toString(internalAmountAssetId)), ("%s__" + lpAssetIdStr)), StringEntry(keyMappingPoolContractAddressToPoolAssets(poolAddressStr), dataMappingPoolAssets(internalPriceAssetId, internalAmountAssetId)), DeleteEntry(keyMappingPoolAssetsToPoolContractAddress(internalAmountAssetId, internalPriceAssetId)), StringEntry(keyMappingPoolAssetsToPoolContractAddress(internalPriceAssetId, internalAmountAssetId), poolAddressStr)] ++ wxEmissionActions), unit)
11321136 }
11331137 else throw("Strict value is not equal to itself.")
11341138 }
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"
2323
2424 let contractFilename = "factory_v2.ride"
2525
2626 let decimalsMultPrice = ((100 * 1000) * 1000)
2727
2828 let SEP = "__"
2929
3030 let EMPTY = ""
3131
3232 let PoolActive = 1
3333
3434 let PoolPutDisabled = 2
3535
3636 let PoolMatcherDisabled = 3
3737
3838 let PoolShutdown = 4
3939
4040 let idxInternalAssetId = 1
4141
4242 let idxResutActions = 2
4343
4444 let idxIfAssetIdCalculationPerformed = 3
4545
4646 let idxPoolAddress = 1
4747
4848 let idxPoolStatus = 2
4949
5050 let idxPoolLPAssetId = 3
5151
5252 let idxAmtAssetId = 4
5353
5454 let idxPriceAssetId = 5
5555
5656 let idxAmtAssetDcm = 6
5757
5858 let idxPriceAssetDcm = 7
5959
6060 let idxIAmtAssetId = 8
6161
6262 let idxIPriceAssetId = 9
6363
6464 let idxLPAssetDcm = 10
6565
6666 let idxPoolType = 11
6767
6868 let poolLabelWxEmission = "WX_EMISSION"
6969
7070 let validPoolLabels = [poolLabelWxEmission]
7171
7272 func wrapErr (msg) = makeString([contractFilename, ": ", msg], "")
7373
7474
7575 func throwErr (msg) = throw(wrapErr(msg))
7676
7777
7878 func keyAllowedLpScriptHash () = "%s__allowedLpScriptHash"
7979
8080
8181 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
8282
8383
8484 func swapContract () = "%s__swapContract"
8585
8686
8787 func keyFactoryConfig () = "%s__factoryConfig"
8888
8989
9090 func keyLpTokensList () = "%s__lpTokensList"
9191
9292
9393 func keyPoolScriptHash () = "%s%s__pool__scriptHash"
9494
9595
9696 func keyMatcherPub () = "%s%s__matcher__publicKey"
9797
9898
9999 func keyLegacyFactoryContract () = "%s__legacyFactoryContract"
100100
101101
102102 func keyLegacyPools () = "%s__legacyPools"
103103
104104
105105 func keyManagerPublicKey () = "%s__managerPublicKey"
106106
107107
108108 func keyManagerVaultAddress () = "%s__managerVaultAddress"
109109
110110
111111 func keyAdminPubKeys () = "%s__adminPubKeys"
112112
113113
114114 func keyAssetsStoreContract () = "%s__assetsStoreContract"
115115
116116
117117 func keyVotingEmissionContract () = "%s__votingEmissionContract"
118118
119119
120120 func keyUserPoolsContract () = "%s__userPoolsContract"
121121
122122
123123 func keyPriceAssets () = makeString(["%s", "priceAssets"], SEP)
124124
125125
126126 func keyPriceDecimals () = "%s__priceDecimals"
127127
128128
129129 func keyAllPoolsShutdown () = "%s__shutdown"
130130
131131
132132 func keyNextInternalAssetId () = "%s__nextInternalAssetId"
133133
134134
135135 func keyPoolToWeight (poolAddress) = ("%s%s__poolWeight__" + poolAddress)
136136
137137
138138 func keyPoolToWeightHistory (poolAddress,num) = ((("%s%s__poolWeight__" + poolAddress) + "__") + toString(num))
139139
140140
141141 func keyMappingsInternal2baseAssetId (internalBaseAsset) = ("%s%s%d__mappings__internal2baseAssetId__" + toString(internalBaseAsset))
142142
143143
144144 func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
145145
146146
147147 func keyPoolConfig (amountAssetInternal,priceAssetInternal) = (((("%d%d%s__" + amountAssetInternal) + "__") + priceAssetInternal) + "__config")
148148
149149
150150 func keyPoolOneTokenOperationsDisabled (assetsInternal) = {
151151 let $t038783940 = assetsInternal
152152 let amountAssetInternal = $t038783940._1
153153 let priceAssetInternal = $t038783940._2
154154 makeString(["%d%d%s", toString(amountAssetInternal), toString(priceAssetInternal), "oneTokenOperationsDisabled"], SEP)
155155 }
156156
157157
158158 func keyAllPoolsOneTokenOperationsDisabled () = makeString(["%s", "oneTokenOperationsDisabled"], SEP)
159159
160160
161161 func keyPoolSwapDisabled (assetsInternal) = {
162162 let $t042324294 = assetsInternal
163163 let amountAssetInternal = $t042324294._1
164164 let priceAssetInternal = $t042324294._2
165165 makeString(["%d%d%s", toString(amountAssetInternal), toString(priceAssetInternal), "swapDisabled"], SEP)
166166 }
167167
168168
169169 func keyAllPoolsSwapDisabled () = makeString(["%s", "swapDisabled"], SEP)
170170
171171
172172 func keyMappingLpAssetToPoolAssets (lpAssetStr) = (("%s%s%s__" + lpAssetStr) + "__mappings__lpAsset2Pool")
173173
174174
175175 func keyMappingPoolAssetsToLpasset (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + internalAmountAssetIdStr) + "__") + internalPriceAssetIdStr) + "__mappings__PoolAssets2LpAsset")
176176
177177
178178 func keyPoolSpread (poolAddress) = ("%s%s__spread__" + poolAddress)
179179
180180
181181 func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2PoolAssets")
182182
183183
184184 func keyMappingPoolAssetsToPoolContractAddress (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + toString(internalAmountAssetIdStr)) + "__") + toString(internalPriceAssetIdStr)) + "__mappings__poolAssets2PoolContract")
185185
186186
187187 func keyMappingPoolContractToLPAsset (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
188188
189189
190190 func keyMappingPoolLPAssetToPoolContractAddress (lpAssetStr) = (("%s%s%s__" + lpAssetStr) + "__mappings__lpAsset2PoolContract")
191191
192192
193193 func keyWxEmission (amountAssetId,priceAssetId) = ((("%s%s%s__wxEmission__" + amountAssetId) + "__") + priceAssetId)
194194
195195
196196 func keyInFee (poolAddress) = ("%s%s__inFee__" + poolAddress)
197197
198198
199199 func keyInFeeDefault () = "%s__inFeeDefault"
200200
201201
202202 func keySwapFee (poolAddress) = ("%s%s__swapFee__" + poolAddress)
203203
204204
205205 func keyOutFee (poolAddress) = ("%s%s__outFee__" + poolAddress)
206206
207207
208208 func keyOutFeeDefault () = "%s__outFeeDefault"
209209
210210
211211 func keySkipOrderValidation (poolAddress) = ("%s%s__skipOrderValidation__" + poolAddress)
212212
213213
214214 func keyChangeAmpDelay (poolAddress) = ("%s%s__changeAmpDelay__" + poolAddress)
215215
216216
217217 func keyChangeAmpDelta (poolAddress) = ("%s%s__changeAmpDelta__" + poolAddress)
218218
219219
220220 func keyChangeAmpTarget (poolAddress) = ("%s%s__changeAmpTarget__" + poolAddress)
221221
222222
223223 func keySWavesProxyAddress () = "%s__sWavesProxyAddress"
224224
225225
226226 func keySWavesAssetId () = "%s__sWavesAssetId"
227227
228228
229229 func keyStakingProfitAddress () = "%s__stakingProfitAddress"
230230
231231
232232 func keyLeasedRatio (poolAddress,assetId) = makeString(["%s%s%s", "leasedRatio", poolAddress, assetId], SEP)
233233
234234
235235 func keyLeasedRatioDefault (assetId) = makeString(["%s%s", "leasedRatioDefault", assetId], SEP)
236236
237237
238238 func keyLeasedRatioTolerance (poolAddress,assetId) = makeString(["%s%s%s", "leasedRatioTolerance", poolAddress, assetId], SEP)
239239
240240
241241 func keyMinBalance (poolAddress,assetId) = makeString(["%s%s%s", "minBalance", poolAddress, assetId], SEP)
242242
243243
244244 func keyMinBalanceDefault (assetId) = makeString(["%s%s", "minBalanceDefault", assetId], SEP)
245245
246246
247+func keyAmp (poolAddress) = makeString(["%s%s", "amp", poolAddress], SEP)
248+
249+
250+func keyAmpHistory (poolAddress,heightBlocks) = makeString(["%s%s%d", "amp", poolAddress, toString(heightBlocks)], SEP)
251+
252+
253+func keyChangeAmpLastCall (poolAddress) = makeString(["%s%s", "changeAmpLastCall", poolAddress], SEP)
254+
255+
256+let ampInitial = 50
257+
247258 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), ("No data for this.key=" + key))
248259
249260
250261 func getBooleanOrFail (key) = valueOrErrorMessage(getBoolean(this, key), ("No data for this.key=" + key))
251262
252263
253264 func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), ("No data for this.key=" + key))
254265
255266
256267 func parseAssetId (input) = if ((input == wavesString))
257268 then unit
258269 else fromBase58String(input)
259270
260271
261272 func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) {
262273 case s: String =>
263274 addressFromStringValue(s)
264275 case _ =>
265276 this
266277 }
267278
268279
269280 let IdxFactoryCfgStakingDapp = 1
270281
271282 let IdxFactoryCfgBoostingDapp = 2
272283
273284 let IdxFactoryCfgIdoDapp = 3
274285
275286 let IdxFactoryCfgTeamDapp = 4
276287
277288 let IdxFactoryCfgEmissionDapp = 5
278289
279290 let IdxFactoryCfgRestDapp = 6
280291
281292 let IdxFactoryCfgSlippageDapp = 7
282293
283294 let IdxFactoryCfgDaoDapp = 8
284295
285296 let IdxFactoryCfgMarketingDapp = 9
286297
287298 let IdxFactoryCfgGwxRewardDapp = 10
288299
289300 let IdxFactoryCfgBirdsDapp = 11
290301
291302 func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp])
292303
293304
294305 func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp])
295306
296307
297308 func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp])
298309
299310
300311 func getGwxRewardAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgGwxRewardDapp])
301312
302313
303314 func getPriceAssets () = match getString(keyPriceAssets()) {
304315 case s: String =>
305316 if ((size(s) == 0))
306317 then nil
307318 else split_4C(s, SEP)
308319 case _ =>
309320 nil
310321 }
311322
312323
313324 func managerPublicKeyOrUnit () = {
314325 let managerVaultAddress = getManagerVaultAddressOrThis()
315326 match getString(managerVaultAddress, keyManagerPublicKey()) {
316327 case s: String =>
317328 fromBase58String(s)
318329 case _: Unit =>
319330 unit
320331 case _ =>
321332 throw("Match error")
322333 }
323334 }
324335
325336
326337 let permissionDeniedError = throwErr("Permission denied")
327338
328339 let testError = throwErr("Test error here")
329340
330341 func mustThis (i) = if ((i.caller == this))
331342 then true
332343 else permissionDeniedError
333344
334345
335346 func mustManager (i) = match managerPublicKeyOrUnit() {
336347 case pk: ByteVector =>
337348 if ((i.callerPublicKey == pk))
338349 then true
339350 else permissionDeniedError
340351 case _: Unit =>
341352 mustThis(i)
342353 case _ =>
343354 throw("Match error")
344355 }
345356
346357
347358 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)
348359
349360
350361 func dataFactoryCfg (stakingAddress,boostingAddress,idoContract,teamContract,emissionContract,restContract,slippageContract) = makeString(["%s%s%s%s%s%s", stakingAddress, boostingAddress, idoContract, teamContract, emissionContract, restContract, slippageContract], SEP)
351362
352363
353364 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)
354365
355366
356367 func dataMappingPoolAssets (internalAmountAssetStr,internalPriceAssetStr) = makeString(["%d%d", toString(internalAmountAssetStr), toString(internalPriceAssetStr)], SEP)
357368
358369
359370 func getPoolConfig (poolAddress) = {
360371 let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolAddress)), SEP)
361372 let amountAssetInternal = poolAssets[1]
362373 let priceAssetInternal = poolAssets[2]
363374 split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP)
364375 }
365376
366377
367378 func getInternalAssetIdOrCreate (assetIdStr,incrementor) = {
368379 let internalAssetId = valueOrElse(getInteger(this, keyMappingsBaseAsset2internalId(assetIdStr)), 0)
369380 let currentIndexOfInternalId = valueOrElse(getInteger(this, keyNextInternalAssetId()), 0)
370381 let result = if ((internalAssetId == 0))
371382 then {
372383 let newInternalAssetId = (currentIndexOfInternalId + incrementor)
373384 $Tuple3(newInternalAssetId, [IntegerEntry(keyNextInternalAssetId(), newInternalAssetId), IntegerEntry(keyMappingsBaseAsset2internalId(assetIdStr), newInternalAssetId), StringEntry(keyMappingsInternal2baseAssetId(newInternalAssetId), assetIdStr)], true)
374385 }
375386 else $Tuple3(internalAssetId, nil, false)
376387 result
377388 }
378389
379390
380391 func mustAdmin (i) = {
381392 let adminPKs = split(valueOrElse(getString(keyAdminPubKeys()), EMPTY), SEP)
382393 if (containsElement(adminPKs, toBase58String(i.callerPublicKey)))
383394 then true
384395 else {
385396 let isManager = mustManager(i)
386397 if ((isManager == isManager))
387398 then true
388399 else throw("Strict value is not equal to itself.")
389400 }
390401 }
391402
392403
393404 func intOrDefaultOrFallback (key,keyDefault,valueFallback) = valueOrElse(getInteger(this, key), valueOrElse(getInteger(this, keyDefault), valueFallback))
394405
395406
396407 func poolExistsInternal (amountAssetId,priceAssetId) = {
397408 let amountAssetInternal = getInteger(keyMappingsBaseAsset2internalId(amountAssetId))
398409 let priceAssetInternal = getInteger(keyMappingsBaseAsset2internalId(priceAssetId))
399410 if (if ((amountAssetInternal == unit))
400411 then true
401412 else (priceAssetInternal == unit))
402413 then false
403414 else {
404415 let amAs = toString(value(amountAssetInternal))
405416 let prAs = toString(value(priceAssetInternal))
406417 let cfg = getString(keyPoolConfig(amAs, prAs))
407418 let cfgReverse = getString(keyPoolConfig(prAs, amAs))
408419 let exists = if ((cfg != unit))
409420 then true
410421 else (cfgReverse != unit)
411422 exists
412423 }
413424 }
414425
415426
416427 func getAssetsDataFromPoolAddress (poolContractAddress) = {
417428 let poolAssets = match getString(keyMappingPoolContractAddressToPoolAssets(poolContractAddress)) {
418429 case s: String =>
419430 split(s, SEP)
420431 case _ =>
421432 throwErr(makeString([poolContractAddress, "pool is not found"], " "))
422433 }
423434 let amountAssetInternal = parseIntValue(poolAssets[1])
424435 let priceAssetInternal = parseIntValue(poolAssets[2])
425436 let amountAssetId = getStringValue(keyMappingsInternal2baseAssetId(amountAssetInternal))
426437 let priceAssetId = getStringValue(keyMappingsInternal2baseAssetId(priceAssetInternal))
427438 let lpAssetId = getStringValue(keyMappingPoolContractToLPAsset(poolContractAddress))
428439 $Tuple5(amountAssetId, priceAssetId, lpAssetId, amountAssetInternal, priceAssetInternal)
429440 }
430441
431442
432443 func getPoolCreator (poolContractAddress) = {
433- let $t01558215719 = getAssetsDataFromPoolAddress(poolContractAddress)
434- let amountAssetId = $t01558215719._1
435- let priceAssetId = $t01558215719._2
436- let lpAssetId = $t01558215719._3
437- let amountAssetInternal = $t01558215719._4
438- let priceAssetInternal = $t01558215719._5
444+ let $t01596716104 = getAssetsDataFromPoolAddress(poolContractAddress)
445+ let amountAssetId = $t01596716104._1
446+ let priceAssetId = $t01596716104._2
447+ let lpAssetId = $t01596716104._3
448+ let amountAssetInternal = $t01596716104._4
449+ let priceAssetInternal = $t01596716104._5
439450 let userPoolsContract = addressFromStringValue(getStringValue(keyUserPoolsContract()))
440451 let poolCreator = invoke(userPoolsContract, "getPoolCreatorREADONLY", [amountAssetId, priceAssetId], nil)
441452 poolCreator
442453 }
443454
444455
445456 func getAddressBalance (addressString,assetIdString) = {
446457 let address = addressFromStringValue(addressString)
447458 if ((assetIdString == "WAVES"))
448459 then wavesBalance(address).regular
449460 else {
450461 let assetId = fromBase58String(assetIdString)
451462 assetBalance(address, assetId)
452463 }
453464 }
454465
455466
456467 func isPoolEmpty (poolContractAddress) = {
457- let $t01629416431 = getAssetsDataFromPoolAddress(poolContractAddress)
458- let amountAssetId = $t01629416431._1
459- let priceAssetId = $t01629416431._2
460- let lpAssetId = $t01629416431._3
461- let amountAssetInternal = $t01629416431._4
462- let priceAssetInternal = $t01629416431._5
468+ let $t01667916816 = getAssetsDataFromPoolAddress(poolContractAddress)
469+ let amountAssetId = $t01667916816._1
470+ let priceAssetId = $t01667916816._2
471+ let lpAssetId = $t01667916816._3
472+ let amountAssetInternal = $t01667916816._4
473+ let priceAssetInternal = $t01667916816._5
463474 if ((getAddressBalance(poolContractAddress, amountAssetId) == 0))
464475 then (getAddressBalance(poolContractAddress, priceAssetId) == 0)
465476 else false
466477 }
467478
468479
469480 @Callable(i)
470481 func getSwapContractREADONLY () = $Tuple2(nil, getStringOrFail(swapContract()))
471482
472483
473484
474485 @Callable(i)
475486 func getPoolLeaseConfigREADONLY (poolAddress,assetId) = {
476- let $t01674617050 = match getInteger(this, keyLeasedRatio(poolAddress, assetId)) {
487+ let $t01713117435 = match getInteger(this, keyLeasedRatio(poolAddress, assetId)) {
477488 case r: Int =>
478489 $Tuple2(true, min([100, max([0, r])]))
479490 case _ =>
480491 match getInteger(this, keyLeasedRatioDefault(assetId)) {
481492 case rd: Int =>
482493 $Tuple2(true, min([100, max([0, rd])]))
483494 case _ =>
484495 $Tuple2(false, 0)
485496 }
486497 }
487- let isLeasable = $t01674617050._1
488- let leasedRatio = $t01674617050._2
498+ let isLeasable = $t01713117435._1
499+ let leasedRatio = $t01713117435._2
489500 let minBalance = match getInteger(this, keyMinBalance(poolAddress, assetId)) {
490501 case b: Int =>
491502 max([0, b])
492503 case _ =>
493504 match getInteger(this, keyMinBalanceDefault(assetId)) {
494505 case bd: Int =>
495506 max([0, bd])
496507 case _ =>
497508 0
498509 }
499510 }
500- let $t01731617540 = if ((assetId == "WAVES"))
511+ let $t01770117925 = if ((assetId == "WAVES"))
501512 then $Tuple3(valueOrElse(getString(this, keySWavesProxyAddress()), ""), getString(this, valueOrElse(keySWavesAssetId(), "")), MULT12)
502513 else $Tuple3("", "", 0)
503- let proxyAddress = $t01731617540._1
504- let proxyAssetId = $t01731617540._2
505- let proxyRateMul = $t01731617540._3
514+ let proxyAddress = $t01770117925._1
515+ let proxyAssetId = $t01770117925._2
516+ let proxyRateMul = $t01770117925._3
506517 let stakingProfitAddress = valueOrElse(getString(this, keyStakingProfitAddress()), "")
507518 $Tuple2(nil, $Tuple7(isLeasable, leasedRatio, minBalance, proxyAddress, proxyAssetId, proxyRateMul, stakingProfitAddress))
508519 }
509520
510521
511522
512523 @Callable(i)
513524 func getLpAssetFromPoolAssetsREADONLY (asset1,asset2) = if (if ((asset1 == "8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS"))
514525 then (asset2 == "WAVES")
515526 else false)
516527 then $Tuple2(nil, unit)
517528 else {
518529 let assetNum1 = value(getInteger(this, keyMappingsBaseAsset2internalId(asset1)))
519530 let assetNum2 = value(getInteger(this, keyMappingsBaseAsset2internalId(asset2)))
520531 let ee = getString(this, keyMappingPoolAssetsToLpasset(toString(assetNum1), toString(assetNum2)))
521532 let res = if ((ee == unit))
522533 then unit
523534 else drop(value(ee), 4)
524535 $Tuple2(nil, res)
525536 }
526537
527538
528539
529540 @Callable(i)
530541 func getPoolAddressFromLpAssetREADONLY (lp) = $Tuple2(nil, valueOrElse(getString(this, keyMappingPoolLPAssetToPoolContractAddress(lp)), ""))
531542
532543
533544
534545 @Callable(i)
535546 func constructor (stakingContract,boostingContract,idoContract,teamContract,emissionContract,restContract,slpipageContract,priceDecimals) = {
536547 let checkCaller = mustManager(i)
537548 if ((checkCaller == checkCaller))
538549 then [StringEntry(keyFactoryConfig(), dataFactoryCfg(stakingContract, boostingContract, idoContract, teamContract, emissionContract, restContract, slpipageContract)), IntegerEntry(keyPriceDecimals(), priceDecimals)]
539550 else throw("Strict value is not equal to itself.")
540551 }
541552
542553
543554
544555 @Callable(i)
545556 func constructorV2 (mathcherPub58Str) = {
546557 let checkCaller = mustManager(i)
547558 if ((checkCaller == checkCaller))
548559 then {
549560 let mathcerPub = addressFromPublicKey(fromBase58String(mathcherPub58Str))
550561 if ((mathcerPub == mathcerPub))
551562 then [StringEntry(keyMatcherPub(), mathcherPub58Str)]
552563 else throw("Strict value is not equal to itself.")
553564 }
554565 else throw("Strict value is not equal to itself.")
555566 }
556567
557568
558569
559570 @Callable(i)
560571 func constructorV3 (daoContract,marketingContract,gwxRewardsContract,birdsContract) = {
561572 let checkCaller = mustManager(i)
562573 if ((checkCaller == checkCaller))
563574 then {
564575 let factoryCfg = split(getStringOrFail(keyFactoryConfig()), SEP)
565576 [StringEntry(keyFactoryConfig(), dataFactoryCfgV3(factoryCfg[1], factoryCfg[2], factoryCfg[3], factoryCfg[4], factoryCfg[5], factoryCfg[6], factoryCfg[7], daoContract, marketingContract, gwxRewardsContract, birdsContract))]
566577 }
567578 else throw("Strict value is not equal to itself.")
568579 }
569580
570581
571582
572583 @Callable(i)
573584 func constructorV4 (legacyFactoryContract,legacyPools) = {
574585 let checkCaller = mustManager(i)
575586 if ((checkCaller == checkCaller))
576587 then [StringEntry(keyLegacyFactoryContract(), legacyFactoryContract), StringEntry(keyLegacyPools(), makeString(legacyPools, SEP))]
577588 else throw("Strict value is not equal to itself.")
578589 }
579590
580591
581592
582593 @Callable(i)
583594 func constructorV5 (assetsStoreContract) = {
584595 let checkCaller = mustManager(i)
585596 if ((checkCaller == checkCaller))
586597 then [StringEntry(keyAssetsStoreContract(), assetsStoreContract)]
587598 else throw("Strict value is not equal to itself.")
588599 }
589600
590601
591602
592603 @Callable(i)
593604 func constructorV6 (votingEmissionContract,priceAssets) = {
594605 let cheks = [mustManager(i), if ((addressFromString(votingEmissionContract) != unit))
595606 then true
596607 else "invalid voting emission contract address"]
597608 if ((cheks == cheks))
598609 then [StringEntry(keyVotingEmissionContract(), votingEmissionContract), StringEntry(keyPriceAssets(), makeString(priceAssets, SEP))]
599610 else throw("Strict value is not equal to itself.")
600611 }
601612
602613
603614
604615 @Callable(i)
605616 func setAdmins (adminPubKeys) = {
606617 let checkCaller = mustManager(i)
607618 if ((checkCaller == checkCaller))
608619 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
609620 else throw("Strict value is not equal to itself.")
610621 }
611622
612623
613624
614625 @Callable(i)
615626 func activateNewPool (poolAddress,amountAssetStr,priceAssetStr,lpAssetName,lpAssetDescr,poolWeight,poolType,logo) = {
616627 let checkCaller = mustAdmin(i)
617628 if ((checkCaller == checkCaller))
618629 then if (isDefined(getString(keyMappingPoolContractAddressToPoolAssets(poolAddress))))
619630 then throwErr((("Pool address " + poolAddress) + " already registered."))
620631 else {
621632 let internalAmountAssetData = getInternalAssetIdOrCreate(amountAssetStr, 1)
622633 let internalAmountAssetId = internalAmountAssetData._1
623634 let internalPriceAssetData = getInternalAssetIdOrCreate(priceAssetStr, if (internalAmountAssetData._3)
624635 then 2
625636 else 1)
626637 let internalPriceAssetId = internalPriceAssetData._1
627638 let poolAccountScriptHash = valueOrErrorMessage(scriptHash(addressFromStringValue(poolAddress)), ("No script has been found on pool account " + poolAddress))
628639 let ethalonPoolAccountScriptHash = getBinaryValue(keyPoolScriptHash())
629640 let poolExists = poolExistsInternal(amountAssetStr, priceAssetStr)
630641 if (poolExists)
631642 then throwErr((((("Pool " + amountAssetStr) + "/") + priceAssetStr) + " has already been activated."))
632643 else {
633644 let poolConfigValue = value(getString(this, keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId))))
634645 let amountAssetsDecimals = if ((amountAssetStr == "WAVES"))
635646 then decimalsMultPrice
636647 else pow(10, 0, value(assetInfo(fromBase58String(amountAssetStr))).decimals, 0, 0, DOWN)
637648 let priceAssetsDecimals = if ((priceAssetStr == "WAVES"))
638649 then decimalsMultPrice
639650 else pow(10, 0, value(assetInfo(fromBase58String(priceAssetStr))).decimals, 0, 0, DOWN)
640651 let lpAssetIssueAction = Issue(lpAssetName, lpAssetDescr, 1, 8, true)
641652 let lpAssetId = calculateAssetId(lpAssetIssueAction)
642653 let lpAssetIdStr = toBase58String(lpAssetId)
643654 let poolActivateInvokeResult = invoke(addressFromStringValue(poolAddress), "activate", [amountAssetStr, priceAssetStr], nil)
644655 if ((poolActivateInvokeResult == poolActivateInvokeResult))
645656 then if ((poolActivateInvokeResult != "success"))
646657 then throwErr("Pool initialisation error happened.")
647658 else {
648659 let assetsStoreContract = addressFromStringValue(getStringOrFail(keyAssetsStoreContract()))
649660 let createOrUpdateLpAssetInv = invoke(assetsStoreContract, "createOrUpdate", [lpAssetIdStr, lpAssetName, false], nil)
650661 if ((createOrUpdateLpAssetInv == createOrUpdateLpAssetInv))
651662 then {
652663 let addPoolsLpLabelInv = invoke(assetsStoreContract, "addLabel", [lpAssetIdStr, labelPoolsLp], nil)
653664 if ((addPoolsLpLabelInv == addPoolsLpLabelInv))
654665 then {
655666 let setLogoInv = invoke(assetsStoreContract, "setLogo", [lpAssetIdStr, logo], nil)
656667 if ((setLogoInv == setLogoInv))
657668 then {
658669 let addAssetsLinkInv = invoke(assetsStoreContract, "addAssetsLink", [amountAssetStr, priceAssetStr, lpAssetIdStr], nil)
659670 if ((addAssetsLinkInv == addAssetsLinkInv))
660671 then {
661672 let increaseAssetPoolsNumberInv = invoke(assetsStoreContract, "increaseAssetPoolsNumber", [amountAssetStr], nil)
662673 if ((increaseAssetPoolsNumberInv == increaseAssetPoolsNumberInv))
663- 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)
674+ 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), StringEntry(keyAmp(poolAddress), toString(ampInitial)), StringEntry(keyAmpHistory(poolAddress, height), toString(ampInitial))]), lpAssetIdStr)
664675 else throw("Strict value is not equal to itself.")
665676 }
666677 else throw("Strict value is not equal to itself.")
667678 }
668679 else throw("Strict value is not equal to itself.")
669680 }
670681 else throw("Strict value is not equal to itself.")
671682 }
672683 else throw("Strict value is not equal to itself.")
673684 }
674685 else throw("Strict value is not equal to itself.")
675686 }
676687 }
677688 else throw("Strict value is not equal to itself.")
678689 }
679690
680691
681692
682693 @Callable(i)
683694 func managePool (poolAddress,newStatus) = {
684695 let checkCaller = mustManager(i)
685696 if ((checkCaller == checkCaller))
686697 then {
687698 let poolConfig = getPoolConfig(poolAddress)
688699 let poolStatus = poolConfig[idxPoolStatus]
689700 let lpAssetIdStr = poolConfig[idxPoolLPAssetId]
690701 let amountAssetStr = poolConfig[idxAmtAssetId]
691702 let priceAssetStr = poolConfig[idxPriceAssetId]
692703 let amountAssetsDecimals = parseIntValue(poolConfig[idxAmtAssetDcm])
693704 let priceAssetsDecimals = parseIntValue(poolConfig[idxPriceAssetDcm])
694705 let internalAmountAssetId = parseIntValue(poolConfig[idxIAmtAssetId])
695706 let internalPriceAssetId = parseIntValue(poolConfig[idxIPriceAssetId])
696707 let lpAssetDcm = parseIntValue(poolConfig[idxLPAssetDcm])
697708 let poolType = poolConfig[idxPoolType]
698709 [StringEntry(keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId)), dataPoolCfg(poolAddress, toString(newStatus), lpAssetIdStr, amountAssetStr, priceAssetStr, amountAssetsDecimals, priceAssetsDecimals, internalAmountAssetId, internalPriceAssetId, lpAssetDcm, poolType))]
699710 }
700711 else throw("Strict value is not equal to itself.")
701712 }
702713
703714
704715
705716 @Callable(i)
706717 func emit (amountToEmit) = {
707718 let caller = i.caller
708719 let originCaller = i.originCaller
709720 let lpAssetRequested = valueOrErrorMessage(getString(keyMappingPoolContractToLPAsset(toString(caller))), "Invalid LP address called me.")
710721 let lpAsset = fromBase58String(lpAssetRequested)
711722 let legacyPools = split(valueOrElse(getString(keyLegacyPools()), EMPTY), SEP)
712723 let legacyFactoryContract = addressFromStringValue(valueOrErrorMessage(getString(keyLegacyFactoryContract()), "Legacy factory contract does not exists."))
713724 if ((0 >= amountToEmit))
714725 then nil
715726 else if (containsElement(legacyPools, toString(caller)))
716727 then $Tuple2(nil, legacyFactoryContract)
717728 else $Tuple2([Reissue(lpAsset, amountToEmit, true), ScriptTransfer(i.caller, amountToEmit, lpAsset)], "success")
718729 }
719730
720731
721732
722733 @Callable(i)
723734 func burn (amountToBurn) = {
724735 let caller = i.caller
725736 let originCaller = i.originCaller
726737 let payment = value(i.payments[0])
727738 let paymentAmount = value(payment.amount)
728739 let inAmountAssetId = toBase58String(value(payment.assetId))
729740 let lpAssetRequestedForBurning = valueOrErrorMessage(getString(keyMappingPoolContractToLPAsset(toString(caller))), "Invalid LP address called me.")
730741 if ((inAmountAssetId != lpAssetRequestedForBurning))
731742 then throwErr("Invalid asset passed.")
732743 else if ((amountToBurn != paymentAmount))
733744 then throwErr("Invalid amount passed.")
734745 else {
735746 let lpAsset = fromBase58String(lpAssetRequestedForBurning)
736747 $Tuple2([Burn(lpAsset, amountToBurn)], "success")
737748 }
738749 }
739750
740751
741752
742753 @Callable(i)
743754 func modifyWeight (lpAssetId,share) = {
744755 let checkCaller = if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionContract()), "")))
745756 then true
746757 else mustManager(i)
747758 if ((checkCaller == checkCaller))
748759 then {
749760 let poolContractAddress = getStringOrFail(keyMappingPoolLPAssetToPoolContractAddress(lpAssetId))
750761 let poolWeightKey = keyPoolToWeight(poolContractAddress)
751762 let gwxWeightKey = keyPoolToWeight(GWXvirtualPOOL)
752763 let gwxWeight = valueOrElse(getInteger(gwxWeightKey), 0)
753764 let poolWeight = valueOrElse(getInteger(poolWeightKey), 0)
754765 let poolWeightNew = share
755766 let factoryCfg = split(getStringOrFail(keyFactoryConfig()), SEP)
756767 let stakingContract = getStakingAddressOrFail(factoryCfg)
757768 let onModifyWeightInv = invoke(stakingContract, "onModifyWeight", [lpAssetId, poolContractAddress], nil)
758769 if ((onModifyWeightInv == onModifyWeightInv))
759770 then {
760771 let gwxVirtualPoolActions = if ((gwxWeight == 0))
761772 then nil
762773 else [IntegerEntry(gwxWeightKey, 0)]
763774 let poolWeightHistoryKey = keyPoolToWeightHistory(poolContractAddress, 0)
764775 let poolWeightHistoryOrUnit = getInteger(poolWeightHistoryKey)
765776 let poolWeightHistoryActions = if ((poolWeightHistoryOrUnit == unit))
766777 then nil
767778 else [DeleteEntry(poolWeightHistoryKey)]
768779 (([IntegerEntry(poolWeightKey, poolWeightNew)] ++ gwxVirtualPoolActions) ++ poolWeightHistoryActions)
769780 }
770781 else throw("Strict value is not equal to itself.")
771782 }
772783 else throw("Strict value is not equal to itself.")
773784 }
774785
775786
776787
777788 @Callable(i)
778789 func modifyWeights (btcPoolAddress,ethPoolAddress,ethBtcPoolAddress,usdcUsdtPoolAddress) = {
779790 let checkCaller = mustManager(i)
780791 if ((checkCaller == checkCaller))
781792 then {
782793 let ethBtcWeightNew = ((5 * POOLWEIGHTMULT) / 100)
783794 let usdcUsdtWeightNew = ((5 * POOLWEIGHTMULT) / 100)
784795 let weightDecrement = ((5 * POOLWEIGHTMULT) / 100)
785796 let factoryCfg = split(getStringOrFail(keyFactoryConfig()), SEP)
786797 let stakingDapp = getStakingAddressOrFail(factoryCfg)
787798 let gwxRewardDapp = getGwxRewardAddressOrFail(factoryCfg)
788799 let btcWeightKEY = keyPoolToWeight(btcPoolAddress)
789800 let ethWeightKEY = keyPoolToWeight(ethPoolAddress)
790801 let ethBtcWeightKEY = keyPoolToWeight(ethBtcPoolAddress)
791802 let usdcUsdtWeightKEY = keyPoolToWeight(usdcUsdtPoolAddress)
792803 let btcWeight = getIntOrFail(btcWeightKEY)
793804 let ethWeight = getIntOrFail(ethWeightKEY)
794805 let btcWeightNew = (btcWeight - weightDecrement)
795806 let ethWeightNew = (ethWeight - weightDecrement)
796807 if ((0 >= btcWeightNew))
797808 then throwErr(("invalid btcWeightNew: " + toString(btcWeightNew)))
798809 else if ((0 >= ethWeightNew))
799810 then throwErr(("invalid ethWeightNew: " + toString(ethWeightNew)))
800811 else {
801812 let btcLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(btcPoolAddress))
802813 let ethLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(ethPoolAddress))
803814 let ethBtcLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(ethBtcPoolAddress))
804815 let usdcUsdtLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(usdcUsdtPoolAddress))
805816 let onModifyWeightBtc = invoke(stakingDapp, "onModifyWeight", [btcLpAssetIdStr, btcPoolAddress], nil)
806817 if ((onModifyWeightBtc == onModifyWeightBtc))
807818 then {
808819 let onModifyWeightEth = invoke(stakingDapp, "onModifyWeight", [ethLpAssetIdStr, ethPoolAddress], nil)
809820 if ((onModifyWeightEth == onModifyWeightEth))
810821 then {
811822 let onModifyWeightEthBtc = invoke(stakingDapp, "onModifyWeight", [ethBtcLpAssetIdStr, ethBtcPoolAddress], nil)
812823 if ((onModifyWeightEthBtc == onModifyWeightEthBtc))
813824 then {
814825 let onModifyWeightUsdcUsdt = invoke(stakingDapp, "onModifyWeight", [usdcUsdtLpAssetIdStr, usdcUsdtPoolAddress], nil)
815826 if ((onModifyWeightUsdcUsdt == onModifyWeightUsdcUsdt))
816827 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)]
817828 else throw("Strict value is not equal to itself.")
818829 }
819830 else throw("Strict value is not equal to itself.")
820831 }
821832 else throw("Strict value is not equal to itself.")
822833 }
823834 else throw("Strict value is not equal to itself.")
824835 }
825836 }
826837 else throw("Strict value is not equal to itself.")
827838 }
828839
829840
830841
831842 @Callable(i)
832843 func checkWxEmissionPoolLabel (amountAssetId,priceAssetId) = {
833844 let haveLabel = match getBoolean(keyWxEmission(amountAssetId, priceAssetId)) {
834845 case b: Boolean =>
835846 b
836847 case _ =>
837848 false
838849 }
839850 $Tuple2(nil, haveLabel)
840851 }
841852
842853
843854
844855 @Callable(i)
845856 func setWxEmissionPoolLabel (amountAssetId,priceAssetId) = {
846857 let checkCaller = mustAdmin(i)
847858 if ((checkCaller == checkCaller))
848859 then $Tuple2([BooleanEntry(keyWxEmission(amountAssetId, priceAssetId), true)], unit)
849860 else throw("Strict value is not equal to itself.")
850861 }
851862
852863
853864
854865 @Callable(i)
855866 func deleteWxEmissionPoolLabel (amountAssetId,priceAssetId) = {
856867 let checkCaller = if ((i.caller == this))
857868 then true
858869 else mustAdmin(i)
859870 if ((checkCaller == checkCaller))
860871 then $Tuple2([DeleteEntry(keyWxEmission(amountAssetId, priceAssetId))], unit)
861872 else throw("Strict value is not equal to itself.")
862873 }
863874
864875
865876
866877 @Callable(i)
867878 func onVerificationLoss (assetId) = {
868879 let checkCaller = if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyAssetsStoreContract()), "")))
869880 then true
870881 else mustManager(i)
871882 if ((checkCaller == checkCaller))
872883 then {
873884 let priceAssets = getPriceAssets()
874885 let checkPriceAssetsSize = if ((size(priceAssets) > 0))
875886 then true
876887 else throwErr("invalid price assets")
877888 if ((checkPriceAssetsSize == checkPriceAssetsSize))
878889 then {
879890 func cb (acc,priceAsset) = {
880891 let r = invoke(this, "deleteWxEmissionPoolLabel", [assetId, priceAsset], nil)
881892 if ((r == r))
882893 then unit
883894 else throw("Strict value is not equal to itself.")
884895 }
885896
886897 let actions = {
887898 let $l = priceAssets
888899 let $s = size($l)
889900 let $acc0 = unit
890901 func $f0_1 ($a,$i) = if (($i >= $s))
891902 then $a
892903 else cb($a, $l[$i])
893904
894905 func $f0_2 ($a,$i) = if (($i >= $s))
895906 then $a
896907 else throw("List size exceeds 13")
897908
898909 $f0_2($f0_1($f0_1($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), 12), 13)
899910 }
900911 if ((actions == actions))
901912 then $Tuple2(nil, unit)
902913 else throw("Strict value is not equal to itself.")
903914 }
904915 else throw("Strict value is not equal to itself.")
905916 }
906917 else throw("Strict value is not equal to itself.")
907918 }
908919
909920
910921
911922 @Callable(i)
923+func changeAmp (poolAddress) = {
924+ let delay = getIntegerValue(keyChangeAmpDelay(poolAddress))
925+ let delta = getIntegerValue(keyChangeAmpDelta(poolAddress))
926+ let target = getIntegerValue(keyChangeAmpTarget(poolAddress))
927+ let curAmp = parseIntValue(getStringValue(keyAmp(poolAddress)))
928+ let newAmpRaw = (curAmp + delta)
929+ let newAmp = if ((0 > delta))
930+ then if ((target > newAmpRaw))
931+ then target
932+ else newAmpRaw
933+ else if ((newAmpRaw > target))
934+ then target
935+ else newAmpRaw
936+ let lastCall = valueOrElse(getInteger(keyChangeAmpLastCall(poolAddress)), 0)
937+ let wait = (lastCall + delay)
938+ let checks = [if ((height > wait))
939+ then true
940+ else throwErr("try again in few blocks"), if ((curAmp != newAmp))
941+ then true
942+ else throwErr("already reached target")]
943+ if ((checks == checks))
944+ then [IntegerEntry(keyChangeAmpLastCall(poolAddress), height), StringEntry(keyAmp(poolAddress), toString(newAmp)), StringEntry(keyAmpHistory(poolAddress, height), toString(newAmp))]
945+ else throw("Strict value is not equal to itself.")
946+ }
947+
948+
949+
950+@Callable(i)
912951 func isPoolOneTokenOperationsDisabledREADONLY (poolAddress) = {
913952 let poolConfig = getPoolConfig(poolAddress)
914953 let assetsInternal = $Tuple2(parseIntValue(poolConfig[idxIAmtAssetId]), parseIntValue(poolConfig[idxIPriceAssetId]))
915954 let poolOneTokenOperationsDisabled = valueOrElse(getBoolean(keyPoolOneTokenOperationsDisabled(assetsInternal)), false)
916955 let allPoolsOneTokenOperationsDisabled = valueOrElse(getBoolean(keyAllPoolsOneTokenOperationsDisabled()), false)
917956 $Tuple2(nil, if (allPoolsOneTokenOperationsDisabled)
918957 then true
919958 else poolOneTokenOperationsDisabled)
920959 }
921960
922961
923962
924963 @Callable(i)
925964 func isPoolSwapDisabledREADONLY (poolAddress) = {
926965 let poolConfig = getPoolConfig(poolAddress)
927966 let assetsInternal = $Tuple2(parseIntValue(poolConfig[idxIAmtAssetId]), parseIntValue(poolConfig[idxIPriceAssetId]))
928967 let poolSwapDisabled = valueOrElse(getBoolean(keyPoolSwapDisabled(assetsInternal)), false)
929968 let allPoolsSwapDisabled = valueOrElse(getBoolean(keyAllPoolsSwapDisabled()), false)
930969 $Tuple2(nil, if (allPoolsSwapDisabled)
931970 then true
932971 else poolSwapDisabled)
933972 }
934973
935974
936975
937976 @Callable(i)
938977 func getInFeeREADONLY (poolAddress) = {
939978 let fee = intOrDefaultOrFallback(keyInFee(poolAddress), keyInFeeDefault(), 0)
940979 $Tuple2(nil, fee)
941980 }
942981
943982
944983
945984 @Callable(i)
946985 func getOutFeeREADONLY (poolAddress) = {
947986 let fee = intOrDefaultOrFallback(keyOutFee(poolAddress), keyOutFeeDefault(), fraction(10, MULT8, 10000))
948987 $Tuple2(nil, fee)
949988 }
950989
951990
952991
953992 @Callable(i)
954993 func getSwapFeeREADONLY (poolAddressStr) = {
955994 let feeOption = match getString(this, keySwapFee(poolAddressStr)) {
956995 case s: String =>
957996 let parts = split(s, SEP)
958997 let poolFee = parseIntValue(parts[1])
959998 let protocolFee = parseIntValue(parts[2])
960999 $Tuple2(poolFee, protocolFee)
9611000 case _: Unit =>
9621001 unit
9631002 case _ =>
9641003 throw("Match error")
9651004 }
9661005 $Tuple2(nil, feeOption)
9671006 }
9681007
9691008
9701009
9711010 @Callable(i)
9721011 func poolInfoREADONLY (amountAssetIdStr,priceAssetIdStr) = {
9731012 let amountAssetInternalIdOption = getInteger(this, keyMappingsBaseAsset2internalId(amountAssetIdStr))
9741013 let priceAssetInternalIdOption = getInteger(this, keyMappingsBaseAsset2internalId(priceAssetIdStr))
9751014 let poolContractAddressOption = getString(this, keyMappingPoolAssetsToPoolContractAddress(value(amountAssetInternalIdOption), value(priceAssetInternalIdOption)))
9761015 let lpAssetIdOption = getString(this, keyMappingPoolContractToLPAsset(value(poolContractAddressOption)))
9771016 let poolExists = if (if (isDefined(amountAssetInternalIdOption))
9781017 then isDefined(priceAssetInternalIdOption)
9791018 else false)
9801019 then isDefined(poolContractAddressOption)
9811020 else false
9821021 let poolInfo = if (poolExists)
9831022 then $Tuple2(addressFromStringValue(value(poolContractAddressOption)), parseAssetId(value(lpAssetIdOption)))
9841023 else unit
9851024 $Tuple2(nil, poolInfo)
9861025 }
9871026
9881027
9891028
9901029 @Callable(i)
9911030 func getPoolStatusREADONLY (poolAddress) = {
9921031 let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolAddress)), SEP)
9931032 let amountAssetInternal = poolAssets[1]
9941033 let priceAssetInternal = poolAssets[2]
9951034 let cfg = split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP)
9961035 $Tuple2(nil, parseIntValue(cfg[idxPoolStatus]))
9971036 }
9981037
9991038
10001039
10011040 @Callable(i)
10021041 func getPoolConfigREADONLY (poolAddress) = {
10031042 let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolAddress)), SEP)
10041043 let amountAssetInternal = poolAssets[1]
10051044 let priceAssetInternal = poolAssets[2]
10061045 let cfg = split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP)
10071046 $Tuple2(nil, cfg)
10081047 }
10091048
10101049
10111050
10121051 @Callable(i)
10131052 func getPoolConfigByLpAssetIdREADONLY (lpAssetIdStr) = {
10141053 let poolAssets = split(getStringOrFail(keyMappingLpAssetToPoolAssets(lpAssetIdStr)), SEP)
10151054 let amountAssetInternal = poolAssets[1]
10161055 let priceAssetInternal = poolAssets[2]
10171056 let cfg = split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP)
10181057 $Tuple2(nil, cfg)
10191058 }
10201059
10211060
10221061
10231062 @Callable(i)
10241063 func poolExistsREADONLY (amountAssetId,priceAssetId) = $Tuple2(nil, poolExistsInternal(amountAssetId, priceAssetId))
10251064
10261065
10271066
10281067 @Callable(i)
10291068 func skipOrderValidationREADONLY (poolAddress) = $Tuple2(nil, valueOrElse(getBoolean(keySkipOrderValidation(poolAddress)), false))
10301069
10311070
10321071
10331072 @Callable(i)
10341073 func getChangeAmpConfigREADONLY (poolAddress) = {
10351074 let delay = getIntegerValue(keyChangeAmpDelay(poolAddress))
10361075 let delta = getIntegerValue(keyChangeAmpDelta(poolAddress))
10371076 let target = getIntegerValue(keyChangeAmpTarget(poolAddress))
10381077 $Tuple2(nil, [delay, delta, target])
10391078 }
10401079
10411080
10421081
10431082 @Callable(i)
10441083 func getPoolWeightREADONLY (lpAssetId) = {
10451084 let poolAddress = getStringOrFail(keyMappingPoolLPAssetToPoolContractAddress(lpAssetId))
10461085 let weight = valueOrElse(getInteger(keyPoolToWeight(poolAddress)), 0)
10471086 $Tuple2(nil, weight)
10481087 }
10491088
10501089
10511090
10521091 @Callable(i)
10531092 func deletePool (poolContractAddress) = {
10541093 let poolConfig = getPoolConfig(poolContractAddress)
10551094 let checkCaller = if ((toString(i.caller) == getPoolCreator(poolContractAddress)))
10561095 then if (isPoolEmpty(poolContractAddress))
10571096 then true
10581097 else throwErr("Pool is not empty")
10591098 else mustManager(i)
10601099 if ((checkCaller == checkCaller))
10611100 then {
10621101 let checkWeight = if ((valueOrElse(getInteger(keyPoolToWeight(poolContractAddress)), 0) == 0))
10631102 then true
10641103 else throwErr("Pool weight is not Zero")
10651104 if ((checkWeight == checkWeight))
10661105 then {
10671106 let checkStatus = if ((poolConfig[idxPoolStatus] == toString(PoolShutdown)))
10681107 then true
10691108 else throwErr("Pool must be SHUTDOWN (4)")
10701109 if ((checkStatus == checkStatus))
10711110 then {
1072- let $t04039540532 = getAssetsDataFromPoolAddress(poolContractAddress)
1073- let amountAssetId = $t04039540532._1
1074- let priceAssetId = $t04039540532._2
1075- let lpAssetId = $t04039540532._3
1076- let amountAssetInternal = $t04039540532._4
1077- let priceAssetInternal = $t04039540532._5
1111+ let $t04194642083 = getAssetsDataFromPoolAddress(poolContractAddress)
1112+ let amountAssetId = $t04194642083._1
1113+ let priceAssetId = $t04194642083._2
1114+ let lpAssetId = $t04194642083._3
1115+ let amountAssetInternal = $t04194642083._4
1116+ let priceAssetInternal = $t04194642083._5
10781117 let userPoolsContract = addressFromStringValue(getStringValue(keyUserPoolsContract()))
10791118 let userPoolsInvoke = invoke(userPoolsContract, "deletePool", [amountAssetId, priceAssetId], nil)
10801119 if ((userPoolsInvoke == userPoolsInvoke))
10811120 then {
10821121 let votingEmissionContract = addressFromStringValue(getStringValue(keyVotingEmissionContract()))
10831122 let votingEmissionInvoke = invoke(votingEmissionContract, "deletePool", [amountAssetId, priceAssetId], nil)
10841123 if ((votingEmissionInvoke == votingEmissionInvoke))
10851124 then {
10861125 let assetsStoreContract = addressFromStringValue(getStringValue(keyAssetsStoreContract()))
10871126 let assetsStoreInvoke = invoke(assetsStoreContract, "deletePool", [amountAssetId, priceAssetId], nil)
10881127 if ((assetsStoreInvoke == assetsStoreInvoke))
1089- 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))]
1128+ 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)), DeleteEntry(keyAmp(poolContractAddress)), DeleteEntry(keyChangeAmpLastCall(poolContractAddress))]
10901129 else throw("Strict value is not equal to itself.")
10911130 }
10921131 else throw("Strict value is not equal to itself.")
10931132 }
10941133 else throw("Strict value is not equal to itself.")
10951134 }
10961135 else throw("Strict value is not equal to itself.")
1097- }
1098- else throw("Strict value is not equal to itself.")
1099- }
1100- else throw("Strict value is not equal to itself.")
1101- }
1102-
1103-
1104-
1105-@Callable(i)
1106-func invert (poolAddressStr) = {
1107- let checks = [mustManager(i)]
1108- if ((checks == checks))
1109- then {
1110- let userPoolsContract = addressFromStringValue(getStringValue(keyUserPoolsContract()))
1111- let votingEmissionContract = addressFromStringValue(getStringValue(keyVotingEmissionContract()))
1112- let poolAddress = addressFromStringValue(poolAddressStr)
1113- let poolConfig = getPoolConfig(poolAddressStr)
1114- let poolStatus = poolConfig[idxPoolStatus]
1115- let lpAssetIdStr = poolConfig[idxPoolLPAssetId]
1116- let amountAssetStr = poolConfig[idxAmtAssetId]
1117- let priceAssetStr = poolConfig[idxPriceAssetId]
1118- let amountAssetsDecimals = parseIntValue(poolConfig[idxAmtAssetDcm])
1119- let priceAssetsDecimals = parseIntValue(poolConfig[idxPriceAssetDcm])
1120- let internalAmountAssetId = parseIntValue(poolConfig[idxIAmtAssetId])
1121- let internalPriceAssetId = parseIntValue(poolConfig[idxIPriceAssetId])
1122- let lpAssetDcm = parseIntValue(poolConfig[idxLPAssetDcm])
1123- let poolType = poolConfig[idxPoolType]
1124- let invs = [invoke(poolAddress, "invert", nil, nil), invoke(votingEmissionContract, "invert", [amountAssetStr, priceAssetStr], nil)]
1125- if ((invs == invs))
1126- then {
1127- let wxEmission = valueOrElse(getBoolean(this, keyWxEmission(amountAssetStr, priceAssetStr)), false)
1128- let wxEmissionActions = if (wxEmission)
1129- then [DeleteEntry(keyWxEmission(amountAssetStr, priceAssetStr)), BooleanEntry(keyWxEmission(priceAssetStr, amountAssetStr), wxEmission)]
1130- else nil
1131- $Tuple2(([StringEntry(keyPoolConfig(toString(internalPriceAssetId), toString(internalAmountAssetId)), dataPoolCfg(poolAddressStr, poolStatus, lpAssetIdStr, priceAssetStr, amountAssetStr, priceAssetsDecimals, amountAssetsDecimals, internalPriceAssetId, internalAmountAssetId, lpAssetDcm, poolType)), DeleteEntry(keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId))), StringEntry(keyMappingLpAssetToPoolAssets(lpAssetIdStr), dataMappingPoolAssets(internalPriceAssetId, internalAmountAssetId)), DeleteEntry(keyMappingPoolAssetsToLpasset(toString(internalAmountAssetId), toString(internalPriceAssetId))), StringEntry(keyMappingPoolAssetsToLpasset(toString(internalPriceAssetId), toString(internalAmountAssetId)), ("%s__" + lpAssetIdStr)), StringEntry(keyMappingPoolContractAddressToPoolAssets(poolAddressStr), dataMappingPoolAssets(internalPriceAssetId, internalAmountAssetId)), DeleteEntry(keyMappingPoolAssetsToPoolContractAddress(internalAmountAssetId, internalPriceAssetId)), StringEntry(keyMappingPoolAssetsToPoolContractAddress(internalPriceAssetId, internalAmountAssetId), poolAddressStr)] ++ wxEmissionActions), unit)
11321136 }
11331137 else throw("Strict value is not equal to itself.")
11341138 }
11351139 else throw("Strict value is not equal to itself.")
11361140 }
11371141
11381142
11391143 @Verifier(tx)
11401144 func verify () = {
11411145 let targetPublicKey = match managerPublicKeyOrUnit() {
11421146 case pk: ByteVector =>
11431147 pk
11441148 case _: Unit =>
11451149 tx.senderPublicKey
11461150 case _ =>
11471151 throw("Match error")
11481152 }
11491153 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
11501154 }
11511155

github/deemru/w8io/fabc49c 
141.72 ms