tx · mXumWeCWX3rChbHAArh4uUUWhWWoM78zxw4KZ3tTExA

3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai:  -0.02500000 Waves

2023.06.19 17:23 [2629629] smart account 3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai > SELF 0.00000000 Waves

{ "type": 13, "id": "mXumWeCWX3rChbHAArh4uUUWhWWoM78zxw4KZ3tTExA", "fee": 2500000, "feeAssetId": null, "timestamp": 1687184599416, "version": 2, "chainId": 84, "sender": "3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai", "senderPublicKey": "2JEaBjtjvMoNGKZmL9QxYefa1VkMJM3vMW8rNvTs9R2H", "proofs": [ "4trd8vdKfeaCiQxppvrir8HTcKpvuk4iLi36w8SFC1ZCbqnSd3GgBdJQwwyDu65Rw5dJY1GUTVCVJV217yNUMha5" ], "script": "base64:BgLZKggCEgASBAoCCAgSBAoCCAgSAwoBCBIKCggICAgICAgIARIDCgEIEgYKBAgICAgSBAoCCBgSAwoBCBIECgIIGBIDCgEYEgoKCAgICAgIAQgIEgQKAggBEgMKAQESAwoBARIECgIIARIGCgQICAgIEgQKAggIEgQKAggIEgQKAggIEgMKAQgSAwoBCBIDCgEIEgMKAQgSBAoCCAgSAwoBCBIDCgEIEgMKAQgSBAoCCAgSAwoBCBIDCgEIEgMKAQgiBlNDQUxFOCIFTVVMVDgiBk1VTFQxMiIHU0NBTEUxOCIGTVVMVDE4Ig5QT09MV0VJR0hUTVVMVCIOR1dYdmlydHVhbFBPT0wiDGxhYmVsUG9vbHNMcCINZGVmYXVsdFNwcmVhZCILd2F2ZXNTdHJpbmciEWRlY2ltYWxzTXVsdFByaWNlIgNTRVAiBUVNUFRZIgpQb29sQWN0aXZlIg9Qb29sUHV0RGlzYWJsZWQiE1Bvb2xNYXRjaGVyRGlzYWJsZWQiDFBvb2xTaHV0ZG93biISaWR4SW50ZXJuYWxBc3NldElkIg9pZHhSZXN1dEFjdGlvbnMiIGlkeElmQ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pbAkAzAgCBQJlVgkAzAgCBQJlVwkAzAgCBQJlWAUDbmlsAmJ5ARVnZXRQb29sV2VpZ2h0UkVBRE9OTFkBAmJRBAJhYQkBAmFUAQkBAmF5AQUCYlEEAmVZCQELdmFsdWVPckVsc2UCCQCfCAEJAQFaAQUCYWEAAAkAlAoCBQNuaWwFAmVZAQJlWgECZmEABAJmYgQCYmEJAQJidAADCQABAgUCYmECCkJ5dGVWZWN0b3IEAmJBBQJiYQUCYkEDCQABAgUCYmECBFVuaXQIBQJlWg9zZW5kZXJQdWJsaWNLZXkJAAIBAgtNYXRjaCBlcnJvcgkA9AMDCAUCZVoJYm9keUJ5dGVzCQCRAwIIBQJlWgZwcm9vZnMAAAUCZmKMPpMa", "height": 2629629, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7N9YN26FYN5ozkfvCdUgJViuqKnYBYSdurenGMrJkVRc Next: Fbu3LcjNjY2fKFv6zNepNRNCHRHQn2td49g6E64eyy3i Diff:
OldNewDifferences
2020 let defaultSpread = 2000000
2121
2222 let wavesString = "WAVES"
23-
24-let contractFilename = "factory_v2.ride"
2523
2624 let decimalsMultPrice = ((100 * 1000) * 1000)
2725
6967
7068 let validPoolLabels = [poolLabelWxEmission]
7169
72-func wrapErr (msg) = makeString([contractFilename, ": ", msg], "")
73-
74-
75-func throwErr (msg) = throw(wrapErr(msg))
76-
77-
7870 func keyAllowedLpScriptHash () = "%s__allowedLpScriptHash"
7971
8072
117109 func keyVotingEmissionContract () = "%s__votingEmissionContract"
118110
119111
120-func keyUserPoolsContract () = "%s__userPoolsContract"
121-
122-
123112 func keyPriceAssets () = makeString(["%s", "priceAssets"], SEP)
124113
125114
148137
149138
150139 func keyPoolOneTokenOperationsDisabled (assetsInternal) = {
151- let $t038783940 = assetsInternal
152- let amountAssetInternal = $t038783940._1
153- let priceAssetInternal = $t038783940._2
140+ let $t036583720 = assetsInternal
141+ let amountAssetInternal = $t036583720._1
142+ let priceAssetInternal = $t036583720._2
154143 makeString(["%d%d%s", toString(amountAssetInternal), toString(priceAssetInternal), "oneTokenOperationsDisabled"], SEP)
155144 }
156145
309298 }
310299
311300
312-let permissionDeniedError = throwErr("Permission denied")
301+let permissionDeniedError = throw("Permission denied")
313302
314-let testError = throwErr("Test error here")
303+let testError = throw("Test error here")
315304
316305 func mustThis (i) = if ((i.caller == this))
317306 then true
399388 }
400389
401390
402-func getAssetsDataFromPoolAddress (poolContractAddress) = {
403- let poolAssets = split(getStringValue(keyMappingPoolContractAddressToPoolAssets(poolContractAddress)), SEP)
404- let amountAssetInternal = parseIntValue(poolAssets[1])
405- let priceAssetInternal = parseIntValue(poolAssets[2])
406- let amountAssetId = getStringValue(keyMappingsInternal2baseAssetId(amountAssetInternal))
407- let priceAssetId = getStringValue(keyMappingsInternal2baseAssetId(priceAssetInternal))
408- let lpAssetId = getStringValue(keyMappingPoolContractToLPAsset(poolContractAddress))
409- $Tuple5(amountAssetId, priceAssetId, lpAssetId, amountAssetInternal, priceAssetInternal)
410- }
411-
412-
413-func getPoolCreator (poolContractAddress) = {
414- let $t01504915186 = getAssetsDataFromPoolAddress(poolContractAddress)
415- let amountAssetId = $t01504915186._1
416- let priceAssetId = $t01504915186._2
417- let lpAssetId = $t01504915186._3
418- let amountAssetInternal = $t01504915186._4
419- let priceAssetInternal = $t01504915186._5
420- let userPoolsContract = addressFromStringValue(getStringValue(keyUserPoolsContract()))
421- let poolCreator = invoke(userPoolsContract, "getPoolCreatorREADONLY", [amountAssetId, priceAssetId], nil)
422- poolCreator
423- }
424-
425-
426-func getAddressBalance (addressString,assetIdString) = {
427- let address = addressFromStringValue(addressString)
428- if ((assetIdString == "WAVES"))
429- then wavesBalance(address).regular
430- else {
431- let assetId = toBytes(assetIdString)
432- assetBalance(address, assetId)
433- }
434- }
435-
436-
437-func isPoolEmpty (poolContractAddress) = {
438- let $t01575215889 = getAssetsDataFromPoolAddress(poolContractAddress)
439- let amountAssetId = $t01575215889._1
440- let priceAssetId = $t01575215889._2
441- let lpAssetId = $t01575215889._3
442- let amountAssetInternal = $t01575215889._4
443- let priceAssetInternal = $t01575215889._5
444- if ((getAddressBalance(poolContractAddress, amountAssetId) == 0))
445- then (getAddressBalance(poolContractAddress, priceAssetId) == 0)
446- else false
447- }
448-
449-
450391 @Callable(i)
451392 func getSwapContractREADONLY () = $Tuple2(nil, getStringOrFail(swapContract()))
452393
454395
455396 @Callable(i)
456397 func getPoolLeaseConfigREADONLY (poolAddress,assetId) = {
457- let $t01620416508 = match getInteger(this, keyLeasedRatio(poolAddress, assetId)) {
398+ let $t01430414608 = match getInteger(this, keyLeasedRatio(poolAddress, assetId)) {
458399 case r: Int =>
459400 $Tuple2(true, min([100, max([0, r])]))
460401 case _ =>
465406 $Tuple2(false, 0)
466407 }
467408 }
468- let isLeasable = $t01620416508._1
469- let leasedRatio = $t01620416508._2
409+ let isLeasable = $t01430414608._1
410+ let leasedRatio = $t01430414608._2
470411 let minBalance = match getInteger(this, keyMinBalance(poolAddress, assetId)) {
471412 case b: Int =>
472413 max([0, b])
478419 0
479420 }
480421 }
481- let $t01677416998 = if ((assetId == "WAVES"))
422+ let $t01487415098 = if ((assetId == "WAVES"))
482423 then $Tuple3(valueOrElse(getString(this, keySWavesProxyAddress()), ""), getString(this, valueOrElse(keySWavesAssetId(), "")), MULT12)
483424 else $Tuple3("", "", 0)
484- let proxyAddress = $t01677416998._1
485- let proxyAssetId = $t01677416998._2
486- let proxyRateMul = $t01677416998._3
425+ let proxyAddress = $t01487415098._1
426+ let proxyAssetId = $t01487415098._2
427+ let proxyRateMul = $t01487415098._3
487428 let stakingProfitAddress = valueOrElse(getString(this, keyStakingProfitAddress()), "")
488429 $Tuple2(nil, $Tuple7(isLeasable, leasedRatio, minBalance, proxyAddress, proxyAssetId, proxyRateMul, stakingProfitAddress))
489430 }
597538 let checkCaller = mustAdmin(i)
598539 if ((checkCaller == checkCaller))
599540 then if (isDefined(getString(keyMappingPoolContractAddressToPoolAssets(poolAddress))))
600- then throwErr((("Pool address " + poolAddress) + " already registered."))
541+ then throw((("Pool address " + poolAddress) + " already registered."))
601542 else {
602543 let internalAmountAssetData = getInternalAssetIdOrCreate(amountAssetStr, 1)
603544 let internalAmountAssetId = internalAmountAssetData._1
609550 let ethalonPoolAccountScriptHash = getBinaryValue(keyPoolScriptHash())
610551 let poolExists = poolExistsInternal(amountAssetStr, priceAssetStr)
611552 if (poolExists)
612- then throwErr((((("Pool " + amountAssetStr) + "/") + priceAssetStr) + " has already been activated."))
553+ then throw((((("Pool " + amountAssetStr) + "/") + priceAssetStr) + " has already been activated."))
613554 else {
614555 let poolConfigValue = value(getString(this, keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId))))
615556 let amountAssetsDecimals = if ((amountAssetStr == "WAVES"))
624565 let poolActivateInvokeResult = invoke(addressFromStringValue(poolAddress), "activate", [amountAssetStr, priceAssetStr], nil)
625566 if ((poolActivateInvokeResult == poolActivateInvokeResult))
626567 then if ((poolActivateInvokeResult != "success"))
627- then throwErr("Pool initialisation error happened.")
568+ then throw("Pool initialisation error happened.")
628569 else {
629570 let assetsStoreContract = addressFromStringValue(getStringOrFail(keyAssetsStoreContract()))
630571 let createOrUpdateLpAssetInv = invoke(assetsStoreContract, "createOrUpdate", [lpAssetIdStr, lpAssetName, false], nil)
709650 let inAmountAssetId = toBase58String(value(payment.assetId))
710651 let lpAssetRequestedForBurning = valueOrErrorMessage(getString(keyMappingPoolContractToLPAsset(toString(caller))), "Invalid LP address called me.")
711652 if ((inAmountAssetId != lpAssetRequestedForBurning))
712- then throwErr("Invalid asset passed.")
653+ then throw("Invalid asset passed.")
713654 else if ((amountToBurn != paymentAmount))
714- then throwErr("Invalid amount passed.")
655+ then throw("Invalid amount passed.")
715656 else {
716657 let lpAsset = fromBase58String(lpAssetRequestedForBurning)
717658 $Tuple2([Burn(lpAsset, amountToBurn)], "success")
775716 let btcWeightNew = (btcWeight - weightDecrement)
776717 let ethWeightNew = (ethWeight - weightDecrement)
777718 if ((0 >= btcWeightNew))
778- then throwErr(("invalid btcWeightNew: " + toString(btcWeightNew)))
719+ then throw(("invalid btcWeightNew: " + toString(btcWeightNew)))
779720 else if ((0 >= ethWeightNew))
780- then throwErr(("invalid ethWeightNew: " + toString(ethWeightNew)))
721+ then throw(("invalid ethWeightNew: " + toString(ethWeightNew)))
781722 else {
782723 let btcLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(btcPoolAddress))
783724 let ethLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(ethPoolAddress))
854795 let priceAssets = getPriceAssets()
855796 let checkPriceAssetsSize = if ((size(priceAssets) > 0))
856797 then true
857- else throwErr("invalid price assets")
798+ else throw("invalid price assets")
858799 if ((checkPriceAssetsSize == checkPriceAssetsSize))
859800 then {
860801 func cb (acc,priceAsset) = {
998939 }
999940
1000941
1001-
1002-@Callable(i)
1003-func deletePool (poolContractAddress) = {
1004- let checkCaller = if (if (mustManager(i))
1005- then true
1006- else if (isPoolEmpty(poolContractAddress))
1007- then (toString(i.caller) == getPoolCreator(poolContractAddress))
1008- else false)
1009- then true
1010- else permissionDeniedError
1011- if ((checkCaller == checkCaller))
1012- then {
1013- let checkWeight = if ((valueOrElse(getInteger(keyPoolToWeight(poolContractAddress)), 0) == 0))
1014- then true
1015- else throwErr("Pool weight is not Zero")
1016- if ((checkWeight == checkWeight))
1017- then {
1018- let $t03878038917 = getAssetsDataFromPoolAddress(poolContractAddress)
1019- let amountAssetId = $t03878038917._1
1020- let priceAssetId = $t03878038917._2
1021- let lpAssetId = $t03878038917._3
1022- let amountAssetInternal = $t03878038917._4
1023- let priceAssetInternal = $t03878038917._5
1024- let userPoolsContract = addressFromStringValue(getStringValue(keyUserPoolsContract()))
1025- let userPoolsInvoke = invoke(userPoolsContract, "deletePool", [amountAssetId, priceAssetId], nil)
1026- if ((userPoolsInvoke == userPoolsInvoke))
1027- then {
1028- let votingEmissionContract = addressFromStringValue(getStringValue(keyVotingEmissionContract()))
1029- let votingEmissionInvoke = invoke(votingEmissionContract, "deletePool", [amountAssetId, priceAssetId], nil)
1030- if ((votingEmissionInvoke == votingEmissionInvoke))
1031- then {
1032- let assetsStoreContract = addressFromStringValue(getStringValue(keyAssetsStoreContract()))
1033- let assetsStoreInvoke = invoke(assetsStoreContract, "deletePool", [amountAssetId, priceAssetId], nil)
1034- if ((assetsStoreInvoke == assetsStoreInvoke))
1035- 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))]
1036- else throw("Strict value is not equal to itself.")
1037- }
1038- else throw("Strict value is not equal to itself.")
1039- }
1040- else throw("Strict value is not equal to itself.")
1041- }
1042- else throw("Strict value is not equal to itself.")
1043- }
1044- else throw("Strict value is not equal to itself.")
1045- }
1046-
1047-
1048942 @Verifier(tx)
1049943 func verify () = {
1050944 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"
2523
2624 let decimalsMultPrice = ((100 * 1000) * 1000)
2725
2826 let SEP = "__"
2927
3028 let EMPTY = ""
3129
3230 let PoolActive = 1
3331
3432 let PoolPutDisabled = 2
3533
3634 let PoolMatcherDisabled = 3
3735
3836 let PoolShutdown = 4
3937
4038 let idxInternalAssetId = 1
4139
4240 let idxResutActions = 2
4341
4442 let idxIfAssetIdCalculationPerformed = 3
4543
4644 let idxPoolAddress = 1
4745
4846 let idxPoolStatus = 2
4947
5048 let idxPoolLPAssetId = 3
5149
5250 let idxAmtAssetId = 4
5351
5452 let idxPriceAssetId = 5
5553
5654 let idxAmtAssetDcm = 6
5755
5856 let idxPriceAssetDcm = 7
5957
6058 let idxIAmtAssetId = 8
6159
6260 let idxIPriceAssetId = 9
6361
6462 let idxLPAssetDcm = 10
6563
6664 let idxPoolType = 11
6765
6866 let poolLabelWxEmission = "WX_EMISSION"
6967
7068 let validPoolLabels = [poolLabelWxEmission]
7169
72-func wrapErr (msg) = makeString([contractFilename, ": ", msg], "")
73-
74-
75-func throwErr (msg) = throw(wrapErr(msg))
76-
77-
7870 func keyAllowedLpScriptHash () = "%s__allowedLpScriptHash"
7971
8072
8173 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
8274
8375
8476 func swapContract () = "%s__swapContract"
8577
8678
8779 func keyFactoryConfig () = "%s__factoryConfig"
8880
8981
9082 func keyLpTokensList () = "%s__lpTokensList"
9183
9284
9385 func keyPoolScriptHash () = "%s%s__pool__scriptHash"
9486
9587
9688 func keyMatcherPub () = "%s%s__matcher__publicKey"
9789
9890
9991 func keyLegacyFactoryContract () = "%s__legacyFactoryContract"
10092
10193
10294 func keyLegacyPools () = "%s__legacyPools"
10395
10496
10597 func keyManagerPublicKey () = "%s__managerPublicKey"
10698
10799
108100 func keyManagerVaultAddress () = "%s__managerVaultAddress"
109101
110102
111103 func keyAdminPubKeys () = "%s__adminPubKeys"
112104
113105
114106 func keyAssetsStoreContract () = "%s__assetsStoreContract"
115107
116108
117109 func keyVotingEmissionContract () = "%s__votingEmissionContract"
118110
119111
120-func keyUserPoolsContract () = "%s__userPoolsContract"
121-
122-
123112 func keyPriceAssets () = makeString(["%s", "priceAssets"], SEP)
124113
125114
126115 func keyPriceDecimals () = "%s__priceDecimals"
127116
128117
129118 func keyAllPoolsShutdown () = "%s__shutdown"
130119
131120
132121 func keyNextInternalAssetId () = "%s__nextInternalAssetId"
133122
134123
135124 func keyPoolToWeight (poolAddress) = ("%s%s__poolWeight__" + poolAddress)
136125
137126
138127 func keyPoolToWeightHistory (poolAddress,num) = ((("%s%s__poolWeight__" + poolAddress) + "__") + toString(num))
139128
140129
141130 func keyMappingsInternal2baseAssetId (internalBaseAsset) = ("%s%s%d__mappings__internal2baseAssetId__" + toString(internalBaseAsset))
142131
143132
144133 func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
145134
146135
147136 func keyPoolConfig (amountAssetInternal,priceAssetInternal) = (((("%d%d%s__" + amountAssetInternal) + "__") + priceAssetInternal) + "__config")
148137
149138
150139 func keyPoolOneTokenOperationsDisabled (assetsInternal) = {
151- let $t038783940 = assetsInternal
152- let amountAssetInternal = $t038783940._1
153- let priceAssetInternal = $t038783940._2
140+ let $t036583720 = assetsInternal
141+ let amountAssetInternal = $t036583720._1
142+ let priceAssetInternal = $t036583720._2
154143 makeString(["%d%d%s", toString(amountAssetInternal), toString(priceAssetInternal), "oneTokenOperationsDisabled"], SEP)
155144 }
156145
157146
158147 func keyAllPoolsOneTokenOperationsDisabled () = makeString(["%s", "oneTokenOperationsDisabled"], SEP)
159148
160149
161150 func keyMappingLpAssetToPoolAssets (lpAssetStr) = (("%s%s%s__" + lpAssetStr) + "__mappings__lpAsset2Pool")
162151
163152
164153 func keyMappingPoolAssetsToLpasset (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + internalAmountAssetIdStr) + "__") + internalPriceAssetIdStr) + "__mappings__PoolAssets2LpAsset")
165154
166155
167156 func keyPoolSpread (poolAddress) = ("%s%s__spread__" + poolAddress)
168157
169158
170159 func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2PoolAssets")
171160
172161
173162 func keyMappingPoolAssetsToPoolContractAddress (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + toString(internalAmountAssetIdStr)) + "__") + toString(internalPriceAssetIdStr)) + "__mappings__poolAssets2PoolContract")
174163
175164
176165 func keyMappingPoolContractToLPAsset (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
177166
178167
179168 func keyMappingPoolLPAssetToPoolContractAddress (lpAssetStr) = (("%s%s%s__" + lpAssetStr) + "__mappings__lpAsset2PoolContract")
180169
181170
182171 func keyWxEmission (amountAssetId,priceAssetId) = ((("%s%s%s__wxEmission__" + amountAssetId) + "__") + priceAssetId)
183172
184173
185174 func keyInFee (poolAddress) = ("%s%s__inFee__" + poolAddress)
186175
187176
188177 func keyInFeeDefault () = "%s__inFeeDefault"
189178
190179
191180 func keyOutFee (poolAddress) = ("%s%s__outFee__" + poolAddress)
192181
193182
194183 func keyOutFeeDefault () = "%s__outFeeDefault"
195184
196185
197186 func keySkipOrderValidation (poolAddress) = ("%s%s__skipOrderValidation__" + poolAddress)
198187
199188
200189 func keyChangeAmpDelay (poolAddress) = ("%s%s__changeAmpDelay__" + poolAddress)
201190
202191
203192 func keyChangeAmpDelta (poolAddress) = ("%s%s__changeAmpDelta__" + poolAddress)
204193
205194
206195 func keyChangeAmpTarget (poolAddress) = ("%s%s__changeAmpTarget__" + poolAddress)
207196
208197
209198 func keySWavesProxyAddress () = "%s__sWavesProxyAddress"
210199
211200
212201 func keySWavesAssetId () = "%s__sWavesAssetId"
213202
214203
215204 func keyStakingProfitAddress () = "%s__stakingProfitAddress"
216205
217206
218207 func keyLeasedRatio (poolAddress,assetId) = makeString(["%s%s%s", "leasedRatio", poolAddress, assetId], SEP)
219208
220209
221210 func keyLeasedRatioDefault (assetId) = makeString(["%s%s", "leasedRatioDefault", assetId], SEP)
222211
223212
224213 func keyLeasedRatioTolerance (poolAddress,assetId) = makeString(["%s%s%s", "leasedRatioTolerance", poolAddress, assetId], SEP)
225214
226215
227216 func keyMinBalance (poolAddress,assetId) = makeString(["%s%s%s", "minBalance", poolAddress, assetId], SEP)
228217
229218
230219 func keyMinBalanceDefault (assetId) = makeString(["%s%s", "minBalanceDefault", assetId], SEP)
231220
232221
233222 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), ("No data for this.key=" + key))
234223
235224
236225 func getBooleanOrFail (key) = valueOrErrorMessage(getBoolean(this, key), ("No data for this.key=" + key))
237226
238227
239228 func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), ("No data for this.key=" + key))
240229
241230
242231 func parseAssetId (input) = if ((input == wavesString))
243232 then unit
244233 else fromBase58String(input)
245234
246235
247236 func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) {
248237 case s: String =>
249238 addressFromStringValue(s)
250239 case _ =>
251240 this
252241 }
253242
254243
255244 let IdxFactoryCfgStakingDapp = 1
256245
257246 let IdxFactoryCfgBoostingDapp = 2
258247
259248 let IdxFactoryCfgIdoDapp = 3
260249
261250 let IdxFactoryCfgTeamDapp = 4
262251
263252 let IdxFactoryCfgEmissionDapp = 5
264253
265254 let IdxFactoryCfgRestDapp = 6
266255
267256 let IdxFactoryCfgSlippageDapp = 7
268257
269258 let IdxFactoryCfgDaoDapp = 8
270259
271260 let IdxFactoryCfgMarketingDapp = 9
272261
273262 let IdxFactoryCfgGwxRewardDapp = 10
274263
275264 let IdxFactoryCfgBirdsDapp = 11
276265
277266 func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp])
278267
279268
280269 func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp])
281270
282271
283272 func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp])
284273
285274
286275 func getGwxRewardAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgGwxRewardDapp])
287276
288277
289278 func getPriceAssets () = match getString(keyPriceAssets()) {
290279 case s: String =>
291280 if ((size(s) == 0))
292281 then nil
293282 else split(s, SEP)
294283 case _ =>
295284 nil
296285 }
297286
298287
299288 func managerPublicKeyOrUnit () = {
300289 let managerVaultAddress = getManagerVaultAddressOrThis()
301290 match getString(managerVaultAddress, keyManagerPublicKey()) {
302291 case s: String =>
303292 fromBase58String(s)
304293 case _: Unit =>
305294 unit
306295 case _ =>
307296 throw("Match error")
308297 }
309298 }
310299
311300
312-let permissionDeniedError = throwErr("Permission denied")
301+let permissionDeniedError = throw("Permission denied")
313302
314-let testError = throwErr("Test error here")
303+let testError = throw("Test error here")
315304
316305 func mustThis (i) = if ((i.caller == this))
317306 then true
318307 else permissionDeniedError
319308
320309
321310 func mustManager (i) = match managerPublicKeyOrUnit() {
322311 case pk: ByteVector =>
323312 if ((i.callerPublicKey == pk))
324313 then true
325314 else permissionDeniedError
326315 case _: Unit =>
327316 mustThis(i)
328317 case _ =>
329318 throw("Match error")
330319 }
331320
332321
333322 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)
334323
335324
336325 func dataFactoryCfg (stakingAddress,boostingAddress,idoContract,teamContract,emissionContract,restContract,slippageContract) = makeString(["%s%s%s%s%s%s", stakingAddress, boostingAddress, idoContract, teamContract, emissionContract, restContract, slippageContract], SEP)
337326
338327
339328 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)
340329
341330
342331 func dataMappingPoolAssets (internalAmountAssetStr,internalPriceAssetStr) = makeString(["%d%d", toString(internalAmountAssetStr), toString(internalPriceAssetStr)], SEP)
343332
344333
345334 func getPoolConfig (poolAddress) = {
346335 let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolAddress)), SEP)
347336 let amountAssetInternal = poolAssets[1]
348337 let priceAssetInternal = poolAssets[2]
349338 split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP)
350339 }
351340
352341
353342 func getInternalAssetIdOrCreate (assetIdStr,incrementor) = {
354343 let internalAssetId = valueOrElse(getInteger(this, keyMappingsBaseAsset2internalId(assetIdStr)), 0)
355344 let currentIndexOfInternalId = valueOrElse(getInteger(this, keyNextInternalAssetId()), 0)
356345 let result = if ((internalAssetId == 0))
357346 then {
358347 let newInternalAssetId = (currentIndexOfInternalId + incrementor)
359348 $Tuple3(newInternalAssetId, [IntegerEntry(keyNextInternalAssetId(), newInternalAssetId), IntegerEntry(keyMappingsBaseAsset2internalId(assetIdStr), newInternalAssetId), StringEntry(keyMappingsInternal2baseAssetId(newInternalAssetId), assetIdStr)], true)
360349 }
361350 else $Tuple3(internalAssetId, nil, false)
362351 result
363352 }
364353
365354
366355 func mustAdmin (i) = {
367356 let adminPKs = split(valueOrElse(getString(keyAdminPubKeys()), EMPTY), SEP)
368357 if (containsElement(adminPKs, toBase58String(i.callerPublicKey)))
369358 then true
370359 else {
371360 let isManager = mustManager(i)
372361 if ((isManager == isManager))
373362 then true
374363 else throw("Strict value is not equal to itself.")
375364 }
376365 }
377366
378367
379368 func intOrDefaultOrFallback (key,keyDefault,valueFallback) = valueOrElse(getInteger(this, key), valueOrElse(getInteger(this, keyDefault), valueFallback))
380369
381370
382371 func poolExistsInternal (amountAssetId,priceAssetId) = {
383372 let amountAssetInternal = getInteger(keyMappingsBaseAsset2internalId(amountAssetId))
384373 let priceAssetInternal = getInteger(keyMappingsBaseAsset2internalId(priceAssetId))
385374 if (if ((amountAssetInternal == unit))
386375 then true
387376 else (priceAssetInternal == unit))
388377 then false
389378 else {
390379 let amAs = toString(value(amountAssetInternal))
391380 let prAs = toString(value(priceAssetInternal))
392381 let cfg = getString(keyPoolConfig(amAs, prAs))
393382 let cfgReverse = getString(keyPoolConfig(prAs, amAs))
394383 let exists = if ((cfg != unit))
395384 then true
396385 else (cfgReverse != unit)
397386 exists
398387 }
399388 }
400389
401390
402-func getAssetsDataFromPoolAddress (poolContractAddress) = {
403- let poolAssets = split(getStringValue(keyMappingPoolContractAddressToPoolAssets(poolContractAddress)), SEP)
404- let amountAssetInternal = parseIntValue(poolAssets[1])
405- let priceAssetInternal = parseIntValue(poolAssets[2])
406- let amountAssetId = getStringValue(keyMappingsInternal2baseAssetId(amountAssetInternal))
407- let priceAssetId = getStringValue(keyMappingsInternal2baseAssetId(priceAssetInternal))
408- let lpAssetId = getStringValue(keyMappingPoolContractToLPAsset(poolContractAddress))
409- $Tuple5(amountAssetId, priceAssetId, lpAssetId, amountAssetInternal, priceAssetInternal)
410- }
411-
412-
413-func getPoolCreator (poolContractAddress) = {
414- let $t01504915186 = getAssetsDataFromPoolAddress(poolContractAddress)
415- let amountAssetId = $t01504915186._1
416- let priceAssetId = $t01504915186._2
417- let lpAssetId = $t01504915186._3
418- let amountAssetInternal = $t01504915186._4
419- let priceAssetInternal = $t01504915186._5
420- let userPoolsContract = addressFromStringValue(getStringValue(keyUserPoolsContract()))
421- let poolCreator = invoke(userPoolsContract, "getPoolCreatorREADONLY", [amountAssetId, priceAssetId], nil)
422- poolCreator
423- }
424-
425-
426-func getAddressBalance (addressString,assetIdString) = {
427- let address = addressFromStringValue(addressString)
428- if ((assetIdString == "WAVES"))
429- then wavesBalance(address).regular
430- else {
431- let assetId = toBytes(assetIdString)
432- assetBalance(address, assetId)
433- }
434- }
435-
436-
437-func isPoolEmpty (poolContractAddress) = {
438- let $t01575215889 = getAssetsDataFromPoolAddress(poolContractAddress)
439- let amountAssetId = $t01575215889._1
440- let priceAssetId = $t01575215889._2
441- let lpAssetId = $t01575215889._3
442- let amountAssetInternal = $t01575215889._4
443- let priceAssetInternal = $t01575215889._5
444- if ((getAddressBalance(poolContractAddress, amountAssetId) == 0))
445- then (getAddressBalance(poolContractAddress, priceAssetId) == 0)
446- else false
447- }
448-
449-
450391 @Callable(i)
451392 func getSwapContractREADONLY () = $Tuple2(nil, getStringOrFail(swapContract()))
452393
453394
454395
455396 @Callable(i)
456397 func getPoolLeaseConfigREADONLY (poolAddress,assetId) = {
457- let $t01620416508 = match getInteger(this, keyLeasedRatio(poolAddress, assetId)) {
398+ let $t01430414608 = match getInteger(this, keyLeasedRatio(poolAddress, assetId)) {
458399 case r: Int =>
459400 $Tuple2(true, min([100, max([0, r])]))
460401 case _ =>
461402 match getInteger(this, keyLeasedRatioDefault(assetId)) {
462403 case rd: Int =>
463404 $Tuple2(true, min([100, max([0, rd])]))
464405 case _ =>
465406 $Tuple2(false, 0)
466407 }
467408 }
468- let isLeasable = $t01620416508._1
469- let leasedRatio = $t01620416508._2
409+ let isLeasable = $t01430414608._1
410+ let leasedRatio = $t01430414608._2
470411 let minBalance = match getInteger(this, keyMinBalance(poolAddress, assetId)) {
471412 case b: Int =>
472413 max([0, b])
473414 case _ =>
474415 match getInteger(this, keyMinBalanceDefault(assetId)) {
475416 case bd: Int =>
476417 max([0, bd])
477418 case _ =>
478419 0
479420 }
480421 }
481- let $t01677416998 = if ((assetId == "WAVES"))
422+ let $t01487415098 = if ((assetId == "WAVES"))
482423 then $Tuple3(valueOrElse(getString(this, keySWavesProxyAddress()), ""), getString(this, valueOrElse(keySWavesAssetId(), "")), MULT12)
483424 else $Tuple3("", "", 0)
484- let proxyAddress = $t01677416998._1
485- let proxyAssetId = $t01677416998._2
486- let proxyRateMul = $t01677416998._3
425+ let proxyAddress = $t01487415098._1
426+ let proxyAssetId = $t01487415098._2
427+ let proxyRateMul = $t01487415098._3
487428 let stakingProfitAddress = valueOrElse(getString(this, keyStakingProfitAddress()), "")
488429 $Tuple2(nil, $Tuple7(isLeasable, leasedRatio, minBalance, proxyAddress, proxyAssetId, proxyRateMul, stakingProfitAddress))
489430 }
490431
491432
492433
493434 @Callable(i)
494435 func getLpAssetFromPoolAssetsREADONLY (asset1,asset2) = if (if ((asset1 == "8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS"))
495436 then (asset2 == "WAVES")
496437 else false)
497438 then $Tuple2(nil, unit)
498439 else {
499440 let assetNum1 = value(getInteger(this, keyMappingsBaseAsset2internalId(asset1)))
500441 let assetNum2 = value(getInteger(this, keyMappingsBaseAsset2internalId(asset2)))
501442 let ee = getString(this, keyMappingPoolAssetsToLpasset(toString(assetNum1), toString(assetNum2)))
502443 let res = if ((ee == unit))
503444 then unit
504445 else drop(value(ee), 4)
505446 $Tuple2(nil, res)
506447 }
507448
508449
509450
510451 @Callable(i)
511452 func getPoolAddressFromLpAssetREADONLY (lp) = $Tuple2(nil, valueOrElse(getString(this, keyMappingPoolLPAssetToPoolContractAddress(lp)), ""))
512453
513454
514455
515456 @Callable(i)
516457 func constructor (stakingContract,boostingContract,idoContract,teamContract,emissionContract,restContract,slpipageContract,priceDecimals) = {
517458 let checkCaller = mustManager(i)
518459 if ((checkCaller == checkCaller))
519460 then [StringEntry(keyFactoryConfig(), dataFactoryCfg(stakingContract, boostingContract, idoContract, teamContract, emissionContract, restContract, slpipageContract)), IntegerEntry(keyPriceDecimals(), priceDecimals)]
520461 else throw("Strict value is not equal to itself.")
521462 }
522463
523464
524465
525466 @Callable(i)
526467 func constructorV2 (mathcherPub58Str) = {
527468 let checkCaller = mustManager(i)
528469 if ((checkCaller == checkCaller))
529470 then {
530471 let mathcerPub = addressFromPublicKey(fromBase58String(mathcherPub58Str))
531472 if ((mathcerPub == mathcerPub))
532473 then [StringEntry(keyMatcherPub(), mathcherPub58Str)]
533474 else throw("Strict value is not equal to itself.")
534475 }
535476 else throw("Strict value is not equal to itself.")
536477 }
537478
538479
539480
540481 @Callable(i)
541482 func constructorV3 (daoContract,marketingContract,gwxRewardsContract,birdsContract) = {
542483 let checkCaller = mustManager(i)
543484 if ((checkCaller == checkCaller))
544485 then {
545486 let factoryCfg = split(getStringOrFail(keyFactoryConfig()), SEP)
546487 [StringEntry(keyFactoryConfig(), dataFactoryCfgV3(factoryCfg[1], factoryCfg[2], factoryCfg[3], factoryCfg[4], factoryCfg[5], factoryCfg[6], factoryCfg[7], daoContract, marketingContract, gwxRewardsContract, birdsContract))]
547488 }
548489 else throw("Strict value is not equal to itself.")
549490 }
550491
551492
552493
553494 @Callable(i)
554495 func constructorV4 (legacyFactoryContract,legacyPools) = {
555496 let checkCaller = mustManager(i)
556497 if ((checkCaller == checkCaller))
557498 then [StringEntry(keyLegacyFactoryContract(), legacyFactoryContract), StringEntry(keyLegacyPools(), makeString(legacyPools, SEP))]
558499 else throw("Strict value is not equal to itself.")
559500 }
560501
561502
562503
563504 @Callable(i)
564505 func constructorV5 (assetsStoreContract) = {
565506 let checkCaller = mustManager(i)
566507 if ((checkCaller == checkCaller))
567508 then [StringEntry(keyAssetsStoreContract(), assetsStoreContract)]
568509 else throw("Strict value is not equal to itself.")
569510 }
570511
571512
572513
573514 @Callable(i)
574515 func constructorV6 (votingEmissionContract,priceAssets) = {
575516 let cheks = [mustManager(i), if ((addressFromString(votingEmissionContract) != unit))
576517 then true
577518 else "invalid voting emission contract address"]
578519 if ((cheks == cheks))
579520 then [StringEntry(keyVotingEmissionContract(), votingEmissionContract), StringEntry(keyPriceAssets(), makeString(priceAssets, SEP))]
580521 else throw("Strict value is not equal to itself.")
581522 }
582523
583524
584525
585526 @Callable(i)
586527 func setAdmins (adminPubKeys) = {
587528 let checkCaller = mustManager(i)
588529 if ((checkCaller == checkCaller))
589530 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
590531 else throw("Strict value is not equal to itself.")
591532 }
592533
593534
594535
595536 @Callable(i)
596537 func activateNewPool (poolAddress,amountAssetStr,priceAssetStr,lpAssetName,lpAssetDescr,poolWeight,poolType,logo) = {
597538 let checkCaller = mustAdmin(i)
598539 if ((checkCaller == checkCaller))
599540 then if (isDefined(getString(keyMappingPoolContractAddressToPoolAssets(poolAddress))))
600- then throwErr((("Pool address " + poolAddress) + " already registered."))
541+ then throw((("Pool address " + poolAddress) + " already registered."))
601542 else {
602543 let internalAmountAssetData = getInternalAssetIdOrCreate(amountAssetStr, 1)
603544 let internalAmountAssetId = internalAmountAssetData._1
604545 let internalPriceAssetData = getInternalAssetIdOrCreate(priceAssetStr, if (internalAmountAssetData._3)
605546 then 2
606547 else 1)
607548 let internalPriceAssetId = internalPriceAssetData._1
608549 let poolAccountScriptHash = valueOrErrorMessage(scriptHash(addressFromStringValue(poolAddress)), ("No script has been found on pool account " + poolAddress))
609550 let ethalonPoolAccountScriptHash = getBinaryValue(keyPoolScriptHash())
610551 let poolExists = poolExistsInternal(amountAssetStr, priceAssetStr)
611552 if (poolExists)
612- then throwErr((((("Pool " + amountAssetStr) + "/") + priceAssetStr) + " has already been activated."))
553+ then throw((((("Pool " + amountAssetStr) + "/") + priceAssetStr) + " has already been activated."))
613554 else {
614555 let poolConfigValue = value(getString(this, keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId))))
615556 let amountAssetsDecimals = if ((amountAssetStr == "WAVES"))
616557 then decimalsMultPrice
617558 else pow(10, 0, value(assetInfo(fromBase58String(amountAssetStr))).decimals, 0, 0, DOWN)
618559 let priceAssetsDecimals = if ((priceAssetStr == "WAVES"))
619560 then decimalsMultPrice
620561 else pow(10, 0, value(assetInfo(fromBase58String(priceAssetStr))).decimals, 0, 0, DOWN)
621562 let lpAssetIssueAction = Issue(lpAssetName, lpAssetDescr, 1, 8, true)
622563 let lpAssetId = calculateAssetId(lpAssetIssueAction)
623564 let lpAssetIdStr = toBase58String(lpAssetId)
624565 let poolActivateInvokeResult = invoke(addressFromStringValue(poolAddress), "activate", [amountAssetStr, priceAssetStr], nil)
625566 if ((poolActivateInvokeResult == poolActivateInvokeResult))
626567 then if ((poolActivateInvokeResult != "success"))
627- then throwErr("Pool initialisation error happened.")
568+ then throw("Pool initialisation error happened.")
628569 else {
629570 let assetsStoreContract = addressFromStringValue(getStringOrFail(keyAssetsStoreContract()))
630571 let createOrUpdateLpAssetInv = invoke(assetsStoreContract, "createOrUpdate", [lpAssetIdStr, lpAssetName, false], nil)
631572 if ((createOrUpdateLpAssetInv == createOrUpdateLpAssetInv))
632573 then {
633574 let addPoolsLpLabelInv = invoke(assetsStoreContract, "addLabel", [lpAssetIdStr, labelPoolsLp], nil)
634575 if ((addPoolsLpLabelInv == addPoolsLpLabelInv))
635576 then {
636577 let setLogoInv = invoke(assetsStoreContract, "setLogo", [lpAssetIdStr, logo], nil)
637578 if ((setLogoInv == setLogoInv))
638579 then {
639580 let addAssetsLinkInv = invoke(assetsStoreContract, "addAssetsLink", [amountAssetStr, priceAssetStr, lpAssetIdStr], nil)
640581 if ((addAssetsLinkInv == addAssetsLinkInv))
641582 then {
642583 let increaseAssetPoolsNumberInv = invoke(assetsStoreContract, "increaseAssetPoolsNumber", [amountAssetStr], nil)
643584 if ((increaseAssetPoolsNumberInv == increaseAssetPoolsNumberInv))
644585 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)
645586 else throw("Strict value is not equal to itself.")
646587 }
647588 else throw("Strict value is not equal to itself.")
648589 }
649590 else throw("Strict value is not equal to itself.")
650591 }
651592 else throw("Strict value is not equal to itself.")
652593 }
653594 else throw("Strict value is not equal to itself.")
654595 }
655596 else throw("Strict value is not equal to itself.")
656597 }
657598 }
658599 else throw("Strict value is not equal to itself.")
659600 }
660601
661602
662603
663604 @Callable(i)
664605 func managePool (poolAddress,newStatus) = {
665606 let checkCaller = mustManager(i)
666607 if ((checkCaller == checkCaller))
667608 then {
668609 let poolConfig = getPoolConfig(poolAddress)
669610 let poolStatus = poolConfig[idxPoolStatus]
670611 let lpAssetIdStr = poolConfig[idxPoolLPAssetId]
671612 let amountAssetStr = poolConfig[idxAmtAssetId]
672613 let priceAssetStr = poolConfig[idxPriceAssetId]
673614 let amountAssetsDecimals = parseIntValue(poolConfig[idxAmtAssetDcm])
674615 let priceAssetsDecimals = parseIntValue(poolConfig[idxPriceAssetDcm])
675616 let internalAmountAssetId = parseIntValue(poolConfig[idxIAmtAssetId])
676617 let internalPriceAssetId = parseIntValue(poolConfig[idxIPriceAssetId])
677618 let lpAssetDcm = parseIntValue(poolConfig[idxLPAssetDcm])
678619 let poolType = poolConfig[idxPoolType]
679620 [StringEntry(keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId)), dataPoolCfg(poolAddress, toString(newStatus), lpAssetIdStr, amountAssetStr, priceAssetStr, amountAssetsDecimals, priceAssetsDecimals, internalAmountAssetId, internalPriceAssetId, lpAssetDcm, poolType))]
680621 }
681622 else throw("Strict value is not equal to itself.")
682623 }
683624
684625
685626
686627 @Callable(i)
687628 func emit (amountToEmit) = {
688629 let caller = i.caller
689630 let originCaller = i.originCaller
690631 let lpAssetRequested = valueOrErrorMessage(getString(keyMappingPoolContractToLPAsset(toString(caller))), "Invalid LP address called me.")
691632 let lpAsset = fromBase58String(lpAssetRequested)
692633 let legacyPools = split(valueOrElse(getString(keyLegacyPools()), EMPTY), SEP)
693634 let legacyFactoryContract = addressFromStringValue(valueOrErrorMessage(getString(keyLegacyFactoryContract()), "Legacy factory contract does not exists."))
694635 if ((0 >= amountToEmit))
695636 then nil
696637 else if (containsElement(legacyPools, toString(caller)))
697638 then $Tuple2(nil, legacyFactoryContract)
698639 else $Tuple2([Reissue(lpAsset, amountToEmit, true), ScriptTransfer(i.caller, amountToEmit, lpAsset)], "success")
699640 }
700641
701642
702643
703644 @Callable(i)
704645 func burn (amountToBurn) = {
705646 let caller = i.caller
706647 let originCaller = i.originCaller
707648 let payment = value(i.payments[0])
708649 let paymentAmount = value(payment.amount)
709650 let inAmountAssetId = toBase58String(value(payment.assetId))
710651 let lpAssetRequestedForBurning = valueOrErrorMessage(getString(keyMappingPoolContractToLPAsset(toString(caller))), "Invalid LP address called me.")
711652 if ((inAmountAssetId != lpAssetRequestedForBurning))
712- then throwErr("Invalid asset passed.")
653+ then throw("Invalid asset passed.")
713654 else if ((amountToBurn != paymentAmount))
714- then throwErr("Invalid amount passed.")
655+ then throw("Invalid amount passed.")
715656 else {
716657 let lpAsset = fromBase58String(lpAssetRequestedForBurning)
717658 $Tuple2([Burn(lpAsset, amountToBurn)], "success")
718659 }
719660 }
720661
721662
722663
723664 @Callable(i)
724665 func modifyWeight (lpAssetId,share) = {
725666 let checkCaller = if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionContract()), "")))
726667 then true
727668 else mustManager(i)
728669 if ((checkCaller == checkCaller))
729670 then {
730671 let poolContractAddress = getStringOrFail(keyMappingPoolLPAssetToPoolContractAddress(lpAssetId))
731672 let poolWeightKey = keyPoolToWeight(poolContractAddress)
732673 let gwxWeightKey = keyPoolToWeight(GWXvirtualPOOL)
733674 let gwxWeight = valueOrElse(getInteger(gwxWeightKey), 0)
734675 let poolWeight = valueOrElse(getInteger(poolWeightKey), 0)
735676 let poolWeightNew = share
736677 let factoryCfg = split(getStringOrFail(keyFactoryConfig()), SEP)
737678 let stakingContract = getStakingAddressOrFail(factoryCfg)
738679 let onModifyWeightInv = invoke(stakingContract, "onModifyWeight", [lpAssetId, poolContractAddress], nil)
739680 if ((onModifyWeightInv == onModifyWeightInv))
740681 then {
741682 let gwxVirtualPoolActions = if ((gwxWeight == 0))
742683 then nil
743684 else [IntegerEntry(gwxWeightKey, 0)]
744685 let poolWeightHistoryKey = keyPoolToWeightHistory(poolContractAddress, 0)
745686 let poolWeightHistoryOrUnit = getInteger(poolWeightHistoryKey)
746687 let poolWeightHistoryActions = if ((poolWeightHistoryOrUnit == unit))
747688 then nil
748689 else [DeleteEntry(poolWeightHistoryKey)]
749690 (([IntegerEntry(poolWeightKey, poolWeightNew)] ++ gwxVirtualPoolActions) ++ poolWeightHistoryActions)
750691 }
751692 else throw("Strict value is not equal to itself.")
752693 }
753694 else throw("Strict value is not equal to itself.")
754695 }
755696
756697
757698
758699 @Callable(i)
759700 func modifyWeights (btcPoolAddress,ethPoolAddress,ethBtcPoolAddress,usdcUsdtPoolAddress) = {
760701 let checkCaller = mustManager(i)
761702 if ((checkCaller == checkCaller))
762703 then {
763704 let ethBtcWeightNew = ((5 * POOLWEIGHTMULT) / 100)
764705 let usdcUsdtWeightNew = ((5 * POOLWEIGHTMULT) / 100)
765706 let weightDecrement = ((5 * POOLWEIGHTMULT) / 100)
766707 let factoryCfg = split(getStringOrFail(keyFactoryConfig()), SEP)
767708 let stakingDapp = getStakingAddressOrFail(factoryCfg)
768709 let gwxRewardDapp = getGwxRewardAddressOrFail(factoryCfg)
769710 let btcWeightKEY = keyPoolToWeight(btcPoolAddress)
770711 let ethWeightKEY = keyPoolToWeight(ethPoolAddress)
771712 let ethBtcWeightKEY = keyPoolToWeight(ethBtcPoolAddress)
772713 let usdcUsdtWeightKEY = keyPoolToWeight(usdcUsdtPoolAddress)
773714 let btcWeight = getIntOrFail(btcWeightKEY)
774715 let ethWeight = getIntOrFail(ethWeightKEY)
775716 let btcWeightNew = (btcWeight - weightDecrement)
776717 let ethWeightNew = (ethWeight - weightDecrement)
777718 if ((0 >= btcWeightNew))
778- then throwErr(("invalid btcWeightNew: " + toString(btcWeightNew)))
719+ then throw(("invalid btcWeightNew: " + toString(btcWeightNew)))
779720 else if ((0 >= ethWeightNew))
780- then throwErr(("invalid ethWeightNew: " + toString(ethWeightNew)))
721+ then throw(("invalid ethWeightNew: " + toString(ethWeightNew)))
781722 else {
782723 let btcLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(btcPoolAddress))
783724 let ethLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(ethPoolAddress))
784725 let ethBtcLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(ethBtcPoolAddress))
785726 let usdcUsdtLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(usdcUsdtPoolAddress))
786727 let onModifyWeightBtc = invoke(stakingDapp, "onModifyWeight", [btcLpAssetIdStr, btcPoolAddress], nil)
787728 if ((onModifyWeightBtc == onModifyWeightBtc))
788729 then {
789730 let onModifyWeightEth = invoke(stakingDapp, "onModifyWeight", [ethLpAssetIdStr, ethPoolAddress], nil)
790731 if ((onModifyWeightEth == onModifyWeightEth))
791732 then {
792733 let onModifyWeightEthBtc = invoke(stakingDapp, "onModifyWeight", [ethBtcLpAssetIdStr, ethBtcPoolAddress], nil)
793734 if ((onModifyWeightEthBtc == onModifyWeightEthBtc))
794735 then {
795736 let onModifyWeightUsdcUsdt = invoke(stakingDapp, "onModifyWeight", [usdcUsdtLpAssetIdStr, usdcUsdtPoolAddress], nil)
796737 if ((onModifyWeightUsdcUsdt == onModifyWeightUsdcUsdt))
797738 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)]
798739 else throw("Strict value is not equal to itself.")
799740 }
800741 else throw("Strict value is not equal to itself.")
801742 }
802743 else throw("Strict value is not equal to itself.")
803744 }
804745 else throw("Strict value is not equal to itself.")
805746 }
806747 }
807748 else throw("Strict value is not equal to itself.")
808749 }
809750
810751
811752
812753 @Callable(i)
813754 func checkWxEmissionPoolLabel (amountAssetId,priceAssetId) = {
814755 let haveLabel = match getBoolean(keyWxEmission(amountAssetId, priceAssetId)) {
815756 case b: Boolean =>
816757 b
817758 case _ =>
818759 false
819760 }
820761 $Tuple2(nil, haveLabel)
821762 }
822763
823764
824765
825766 @Callable(i)
826767 func setWxEmissionPoolLabel (amountAssetId,priceAssetId) = {
827768 let checkCaller = mustAdmin(i)
828769 if ((checkCaller == checkCaller))
829770 then $Tuple2([BooleanEntry(keyWxEmission(amountAssetId, priceAssetId), true)], unit)
830771 else throw("Strict value is not equal to itself.")
831772 }
832773
833774
834775
835776 @Callable(i)
836777 func deleteWxEmissionPoolLabel (amountAssetId,priceAssetId) = {
837778 let checkCaller = if ((i.caller == this))
838779 then true
839780 else mustAdmin(i)
840781 if ((checkCaller == checkCaller))
841782 then $Tuple2([DeleteEntry(keyWxEmission(amountAssetId, priceAssetId))], unit)
842783 else throw("Strict value is not equal to itself.")
843784 }
844785
845786
846787
847788 @Callable(i)
848789 func onVerificationLoss (assetId) = {
849790 let checkCaller = if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyAssetsStoreContract()), "")))
850791 then true
851792 else mustManager(i)
852793 if ((checkCaller == checkCaller))
853794 then {
854795 let priceAssets = getPriceAssets()
855796 let checkPriceAssetsSize = if ((size(priceAssets) > 0))
856797 then true
857- else throwErr("invalid price assets")
798+ else throw("invalid price assets")
858799 if ((checkPriceAssetsSize == checkPriceAssetsSize))
859800 then {
860801 func cb (acc,priceAsset) = {
861802 let r = invoke(this, "deleteWxEmissionPoolLabel", [assetId, priceAsset], nil)
862803 if ((r == r))
863804 then unit
864805 else throw("Strict value is not equal to itself.")
865806 }
866807
867808 let actions = {
868809 let $l = priceAssets
869810 let $s = size($l)
870811 let $acc0 = unit
871812 func $f0_1 ($a,$i) = if (($i >= $s))
872813 then $a
873814 else cb($a, $l[$i])
874815
875816 func $f0_2 ($a,$i) = if (($i >= $s))
876817 then $a
877818 else throw("List size exceeds 11")
878819
879820 $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)
880821 }
881822 if ((actions == actions))
882823 then $Tuple2(nil, unit)
883824 else throw("Strict value is not equal to itself.")
884825 }
885826 else throw("Strict value is not equal to itself.")
886827 }
887828 else throw("Strict value is not equal to itself.")
888829 }
889830
890831
891832
892833 @Callable(i)
893834 func isPoolOneTokenOperationsDisabledREADONLY (poolAddress) = {
894835 let poolConfig = getPoolConfig(poolAddress)
895836 let assetsInternal = $Tuple2(parseIntValue(poolConfig[idxIAmtAssetId]), parseIntValue(poolConfig[idxIPriceAssetId]))
896837 let poolOneTokenOperationsDisabled = valueOrElse(getBoolean(keyPoolOneTokenOperationsDisabled(assetsInternal)), false)
897838 let allPoolsOneTokenOperationsDisabled = valueOrElse(getBoolean(keyAllPoolsOneTokenOperationsDisabled()), false)
898839 $Tuple2(nil, if (allPoolsOneTokenOperationsDisabled)
899840 then true
900841 else poolOneTokenOperationsDisabled)
901842 }
902843
903844
904845
905846 @Callable(i)
906847 func getInFeeREADONLY (poolAddress) = {
907848 let fee = intOrDefaultOrFallback(keyInFee(poolAddress), keyInFeeDefault(), 0)
908849 $Tuple2(nil, fee)
909850 }
910851
911852
912853
913854 @Callable(i)
914855 func getOutFeeREADONLY (poolAddress) = {
915856 let fee = intOrDefaultOrFallback(keyOutFee(poolAddress), keyOutFeeDefault(), fraction(10, MULT8, 10000))
916857 $Tuple2(nil, fee)
917858 }
918859
919860
920861
921862 @Callable(i)
922863 func poolInfoREADONLY (amountAssetIdStr,priceAssetIdStr) = {
923864 let amountAssetInternalIdOption = getInteger(this, keyMappingsBaseAsset2internalId(amountAssetIdStr))
924865 let priceAssetInternalIdOption = getInteger(this, keyMappingsBaseAsset2internalId(priceAssetIdStr))
925866 let poolContractAddressOption = getString(this, keyMappingPoolAssetsToPoolContractAddress(value(amountAssetInternalIdOption), value(priceAssetInternalIdOption)))
926867 let lpAssetIdOption = getString(this, keyMappingPoolContractToLPAsset(value(poolContractAddressOption)))
927868 let poolExists = if (if (isDefined(amountAssetInternalIdOption))
928869 then isDefined(priceAssetInternalIdOption)
929870 else false)
930871 then isDefined(poolContractAddressOption)
931872 else false
932873 let poolInfo = if (poolExists)
933874 then $Tuple2(addressFromStringValue(value(poolContractAddressOption)), parseAssetId(value(lpAssetIdOption)))
934875 else unit
935876 $Tuple2(nil, poolInfo)
936877 }
937878
938879
939880
940881 @Callable(i)
941882 func getPoolStatusREADONLY (poolAddress) = {
942883 let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolAddress)), SEP)
943884 let amountAssetInternal = poolAssets[1]
944885 let priceAssetInternal = poolAssets[2]
945886 let cfg = split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP)
946887 $Tuple2(nil, parseIntValue(cfg[idxPoolStatus]))
947888 }
948889
949890
950891
951892 @Callable(i)
952893 func getPoolConfigREADONLY (poolAddress) = {
953894 let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolAddress)), SEP)
954895 let amountAssetInternal = poolAssets[1]
955896 let priceAssetInternal = poolAssets[2]
956897 let cfg = split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP)
957898 $Tuple2(nil, cfg)
958899 }
959900
960901
961902
962903 @Callable(i)
963904 func getPoolConfigByLpAssetIdREADONLY (lpAssetIdStr) = {
964905 let poolAssets = split(getStringOrFail(keyMappingLpAssetToPoolAssets(lpAssetIdStr)), SEP)
965906 let amountAssetInternal = poolAssets[1]
966907 let priceAssetInternal = poolAssets[2]
967908 let cfg = split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP)
968909 $Tuple2(nil, cfg)
969910 }
970911
971912
972913
973914 @Callable(i)
974915 func poolExistsREADONLY (amountAssetId,priceAssetId) = $Tuple2(nil, poolExistsInternal(amountAssetId, priceAssetId))
975916
976917
977918
978919 @Callable(i)
979920 func skipOrderValidationREADONLY (poolAddress) = $Tuple2(nil, valueOrElse(getBoolean(keySkipOrderValidation(poolAddress)), false))
980921
981922
982923
983924 @Callable(i)
984925 func getChangeAmpConfigREADONLY (poolAddress) = {
985926 let delay = getIntegerValue(keyChangeAmpDelay(poolAddress))
986927 let delta = getIntegerValue(keyChangeAmpDelta(poolAddress))
987928 let target = getIntegerValue(keyChangeAmpTarget(poolAddress))
988929 $Tuple2(nil, [delay, delta, target])
989930 }
990931
991932
992933
993934 @Callable(i)
994935 func getPoolWeightREADONLY (lpAssetId) = {
995936 let poolAddress = getStringOrFail(keyMappingPoolLPAssetToPoolContractAddress(lpAssetId))
996937 let weight = valueOrElse(getInteger(keyPoolToWeight(poolAddress)), 0)
997938 $Tuple2(nil, weight)
998939 }
999940
1000941
1001-
1002-@Callable(i)
1003-func deletePool (poolContractAddress) = {
1004- let checkCaller = if (if (mustManager(i))
1005- then true
1006- else if (isPoolEmpty(poolContractAddress))
1007- then (toString(i.caller) == getPoolCreator(poolContractAddress))
1008- else false)
1009- then true
1010- else permissionDeniedError
1011- if ((checkCaller == checkCaller))
1012- then {
1013- let checkWeight = if ((valueOrElse(getInteger(keyPoolToWeight(poolContractAddress)), 0) == 0))
1014- then true
1015- else throwErr("Pool weight is not Zero")
1016- if ((checkWeight == checkWeight))
1017- then {
1018- let $t03878038917 = getAssetsDataFromPoolAddress(poolContractAddress)
1019- let amountAssetId = $t03878038917._1
1020- let priceAssetId = $t03878038917._2
1021- let lpAssetId = $t03878038917._3
1022- let amountAssetInternal = $t03878038917._4
1023- let priceAssetInternal = $t03878038917._5
1024- let userPoolsContract = addressFromStringValue(getStringValue(keyUserPoolsContract()))
1025- let userPoolsInvoke = invoke(userPoolsContract, "deletePool", [amountAssetId, priceAssetId], nil)
1026- if ((userPoolsInvoke == userPoolsInvoke))
1027- then {
1028- let votingEmissionContract = addressFromStringValue(getStringValue(keyVotingEmissionContract()))
1029- let votingEmissionInvoke = invoke(votingEmissionContract, "deletePool", [amountAssetId, priceAssetId], nil)
1030- if ((votingEmissionInvoke == votingEmissionInvoke))
1031- then {
1032- let assetsStoreContract = addressFromStringValue(getStringValue(keyAssetsStoreContract()))
1033- let assetsStoreInvoke = invoke(assetsStoreContract, "deletePool", [amountAssetId, priceAssetId], nil)
1034- if ((assetsStoreInvoke == assetsStoreInvoke))
1035- 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))]
1036- else throw("Strict value is not equal to itself.")
1037- }
1038- else throw("Strict value is not equal to itself.")
1039- }
1040- else throw("Strict value is not equal to itself.")
1041- }
1042- else throw("Strict value is not equal to itself.")
1043- }
1044- else throw("Strict value is not equal to itself.")
1045- }
1046-
1047-
1048942 @Verifier(tx)
1049943 func verify () = {
1050944 let targetPublicKey = match managerPublicKeyOrUnit() {
1051945 case pk: ByteVector =>
1052946 pk
1053947 case _: Unit =>
1054948 tx.senderPublicKey
1055949 case _ =>
1056950 throw("Match error")
1057951 }
1058952 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
1059953 }
1060954

github/deemru/w8io/fabc49c 
112.75 ms