tx · 7N9YN26FYN5ozkfvCdUgJViuqKnYBYSdurenGMrJkVRc

3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai:  -0.02800000 Waves

2023.06.19 11:15 [2629255] smart account 3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai > SELF 0.00000000 Waves

{ "type": 13, "id": "7N9YN26FYN5ozkfvCdUgJViuqKnYBYSdurenGMrJkVRc", "fee": 2800000, "feeAssetId": null, "timestamp": 1687162548410, "version": 2, "chainId": 84, "sender": "3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai", "senderPublicKey": "2JEaBjtjvMoNGKZmL9QxYefa1VkMJM3vMW8rNvTs9R2H", "proofs": [ "dzL3sPkT8L5JMhhYUnxGjRAxRUaiVLvBRzSF8sw66iDL7bgswJneSpHeWQEpXtBu72eSFhWMyPA3E69mqJJJm7Z" ], "script": "base64:BgKnLQgCEgASBAoCCAgSBAoCCAgSAwoBCBIKCggICAgICAgIARIDCgEIEgYKBAgICAgSBAoCCBgSAwoBCBIECgIIGBIDCgEYEgoKCAgICAgIAQgIEgQKAggBEgMKAQESAwoBARIECgIIARIGCgQICAgIEgQKAggIEgQKAggIEgQKAggIEgMKAQgSAwoBCBIDCgEIEgMKAQgSBAoCCAgSAwoBCBIDCgEIEgMKAQgSBAoCCAgSAwoBCBIDCgEIEgMKAQgSAwoBCCIGU0NBTEU4IgVNVUxUOCIGTVVMVDEyIgdTQ0FMRTE4IgZNVUxUMTgiDlBPT0xXRUlHSFRNVUxUIg5HV1h2aXJ0dWFsUE9PTCIMbGFiZWxQb29sc0xwIg1kZWZhdWx0U3ByZWFkIgt3YXZlc1N0cmluZyIQY29udHJhY3RGaWxlbmFtZSIRZGVjaW1hbHNNdWx0UHJpY2UiA1NFUCIFRU1QVFkiClBvb2xBY3RpdmUiD1Bvb2xQdXREaXNhYmxlZCITUG9vbE1hdGNoZXJEaXNhYmxlZCIMUG9vbFNodXRkb3duIhJpZHhJbnRlcm5hbEFzc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50cnkBCQECYU4BBQJhQQkAzAgCCQELRGVsZXRlRW50cnkBCQECYU8BBQJhQQUDbmlsCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAQJmdQECZnYABAJmdwQCYmYJAQJieQADCQABAgUCYmYCCkJ5dGVWZWN0b3IEAmJGBQJiZgUCYkYDCQABAgUCYmYCBFVuaXQIBQJmdQ9zZW5kZXJQdWJsaWNLZXkJAAIBAgtNYXRjaCBlcnJvcgkA9AMDCAUCZnUJYm9keUJ5dGVzCQCRAwIIBQJmdQZwcm9vZnMAAAUCZnc0BvWU", "height": 2629255, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 37DqwX9n5E8Z3eewpmJjkKLRag6cPQPiogiFf2t3sWaF Next: mXumWeCWX3rChbHAArh4uUUWhWWoM78zxw4KZ3tTExA Diff:
OldNewDifferences
399399 }
400400
401401
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+
402450 @Callable(i)
403451 func getSwapContractREADONLY () = $Tuple2(nil, getStringOrFail(swapContract()))
404452
406454
407455 @Callable(i)
408456 func getPoolLeaseConfigREADONLY (poolAddress,assetId) = {
409- let $t01453014834 = match getInteger(this, keyLeasedRatio(poolAddress, assetId)) {
457+ let $t01620416508 = match getInteger(this, keyLeasedRatio(poolAddress, assetId)) {
410458 case r: Int =>
411459 $Tuple2(true, min([100, max([0, r])]))
412460 case _ =>
417465 $Tuple2(false, 0)
418466 }
419467 }
420- let isLeasable = $t01453014834._1
421- let leasedRatio = $t01453014834._2
468+ let isLeasable = $t01620416508._1
469+ let leasedRatio = $t01620416508._2
422470 let minBalance = match getInteger(this, keyMinBalance(poolAddress, assetId)) {
423471 case b: Int =>
424472 max([0, b])
430478 0
431479 }
432480 }
433- let $t01510015324 = if ((assetId == "WAVES"))
481+ let $t01677416998 = if ((assetId == "WAVES"))
434482 then $Tuple3(valueOrElse(getString(this, keySWavesProxyAddress()), ""), getString(this, valueOrElse(keySWavesAssetId(), "")), MULT12)
435483 else $Tuple3("", "", 0)
436- let proxyAddress = $t01510015324._1
437- let proxyAssetId = $t01510015324._2
438- let proxyRateMul = $t01510015324._3
484+ let proxyAddress = $t01677416998._1
485+ let proxyAssetId = $t01677416998._2
486+ let proxyRateMul = $t01677416998._3
439487 let stakingProfitAddress = valueOrElse(getString(this, keyStakingProfitAddress()), "")
440488 $Tuple2(nil, $Tuple7(isLeasable, leasedRatio, minBalance, proxyAddress, proxyAssetId, proxyRateMul, stakingProfitAddress))
441489 }
9531001
9541002 @Callable(i)
9551003 func deletePool (poolContractAddress) = {
956- let checkCaller = if (mustManager(i))
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)
9571009 then true
9581010 else permissionDeniedError
9591011 if ((checkCaller == checkCaller))
9631015 else throwErr("Pool weight is not Zero")
9641016 if ((checkWeight == checkWeight))
9651017 then {
966- let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolContractAddress)), SEP)
967- let amountAssetInternal = parseIntValue(poolAssets[1])
968- let priceAssetInternal = parseIntValue(poolAssets[2])
969- let amountAssetId = getStringValue(keyMappingsInternal2baseAssetId(amountAssetInternal))
970- let priceAssetId = getStringValue(keyMappingsInternal2baseAssetId(priceAssetInternal))
971- let lpAssetId = getStringOrFail(keyMappingPoolContractToLPAsset(poolContractAddress))
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
9721024 let userPoolsContract = addressFromStringValue(getStringValue(keyUserPoolsContract()))
9731025 let userPoolsInvoke = invoke(userPoolsContract, "deletePool", [amountAssetId, priceAssetId], nil)
9741026 if ((userPoolsInvoke == userPoolsInvoke))
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 keyMappingLpAssetToPoolAssets (lpAssetStr) = (("%s%s%s__" + lpAssetStr) + "__mappings__lpAsset2Pool")
162162
163163
164164 func keyMappingPoolAssetsToLpasset (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + internalAmountAssetIdStr) + "__") + internalPriceAssetIdStr) + "__mappings__PoolAssets2LpAsset")
165165
166166
167167 func keyPoolSpread (poolAddress) = ("%s%s__spread__" + poolAddress)
168168
169169
170170 func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2PoolAssets")
171171
172172
173173 func keyMappingPoolAssetsToPoolContractAddress (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + toString(internalAmountAssetIdStr)) + "__") + toString(internalPriceAssetIdStr)) + "__mappings__poolAssets2PoolContract")
174174
175175
176176 func keyMappingPoolContractToLPAsset (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
177177
178178
179179 func keyMappingPoolLPAssetToPoolContractAddress (lpAssetStr) = (("%s%s%s__" + lpAssetStr) + "__mappings__lpAsset2PoolContract")
180180
181181
182182 func keyWxEmission (amountAssetId,priceAssetId) = ((("%s%s%s__wxEmission__" + amountAssetId) + "__") + priceAssetId)
183183
184184
185185 func keyInFee (poolAddress) = ("%s%s__inFee__" + poolAddress)
186186
187187
188188 func keyInFeeDefault () = "%s__inFeeDefault"
189189
190190
191191 func keyOutFee (poolAddress) = ("%s%s__outFee__" + poolAddress)
192192
193193
194194 func keyOutFeeDefault () = "%s__outFeeDefault"
195195
196196
197197 func keySkipOrderValidation (poolAddress) = ("%s%s__skipOrderValidation__" + poolAddress)
198198
199199
200200 func keyChangeAmpDelay (poolAddress) = ("%s%s__changeAmpDelay__" + poolAddress)
201201
202202
203203 func keyChangeAmpDelta (poolAddress) = ("%s%s__changeAmpDelta__" + poolAddress)
204204
205205
206206 func keyChangeAmpTarget (poolAddress) = ("%s%s__changeAmpTarget__" + poolAddress)
207207
208208
209209 func keySWavesProxyAddress () = "%s__sWavesProxyAddress"
210210
211211
212212 func keySWavesAssetId () = "%s__sWavesAssetId"
213213
214214
215215 func keyStakingProfitAddress () = "%s__stakingProfitAddress"
216216
217217
218218 func keyLeasedRatio (poolAddress,assetId) = makeString(["%s%s%s", "leasedRatio", poolAddress, assetId], SEP)
219219
220220
221221 func keyLeasedRatioDefault (assetId) = makeString(["%s%s", "leasedRatioDefault", assetId], SEP)
222222
223223
224224 func keyLeasedRatioTolerance (poolAddress,assetId) = makeString(["%s%s%s", "leasedRatioTolerance", poolAddress, assetId], SEP)
225225
226226
227227 func keyMinBalance (poolAddress,assetId) = makeString(["%s%s%s", "minBalance", poolAddress, assetId], SEP)
228228
229229
230230 func keyMinBalanceDefault (assetId) = makeString(["%s%s", "minBalanceDefault", assetId], SEP)
231231
232232
233233 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), ("No data for this.key=" + key))
234234
235235
236236 func getBooleanOrFail (key) = valueOrErrorMessage(getBoolean(this, key), ("No data for this.key=" + key))
237237
238238
239239 func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), ("No data for this.key=" + key))
240240
241241
242242 func parseAssetId (input) = if ((input == wavesString))
243243 then unit
244244 else fromBase58String(input)
245245
246246
247247 func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) {
248248 case s: String =>
249249 addressFromStringValue(s)
250250 case _ =>
251251 this
252252 }
253253
254254
255255 let IdxFactoryCfgStakingDapp = 1
256256
257257 let IdxFactoryCfgBoostingDapp = 2
258258
259259 let IdxFactoryCfgIdoDapp = 3
260260
261261 let IdxFactoryCfgTeamDapp = 4
262262
263263 let IdxFactoryCfgEmissionDapp = 5
264264
265265 let IdxFactoryCfgRestDapp = 6
266266
267267 let IdxFactoryCfgSlippageDapp = 7
268268
269269 let IdxFactoryCfgDaoDapp = 8
270270
271271 let IdxFactoryCfgMarketingDapp = 9
272272
273273 let IdxFactoryCfgGwxRewardDapp = 10
274274
275275 let IdxFactoryCfgBirdsDapp = 11
276276
277277 func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp])
278278
279279
280280 func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp])
281281
282282
283283 func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp])
284284
285285
286286 func getGwxRewardAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgGwxRewardDapp])
287287
288288
289289 func getPriceAssets () = match getString(keyPriceAssets()) {
290290 case s: String =>
291291 if ((size(s) == 0))
292292 then nil
293293 else split(s, SEP)
294294 case _ =>
295295 nil
296296 }
297297
298298
299299 func managerPublicKeyOrUnit () = {
300300 let managerVaultAddress = getManagerVaultAddressOrThis()
301301 match getString(managerVaultAddress, keyManagerPublicKey()) {
302302 case s: String =>
303303 fromBase58String(s)
304304 case _: Unit =>
305305 unit
306306 case _ =>
307307 throw("Match error")
308308 }
309309 }
310310
311311
312312 let permissionDeniedError = throwErr("Permission denied")
313313
314314 let testError = throwErr("Test error here")
315315
316316 func mustThis (i) = if ((i.caller == this))
317317 then true
318318 else permissionDeniedError
319319
320320
321321 func mustManager (i) = match managerPublicKeyOrUnit() {
322322 case pk: ByteVector =>
323323 if ((i.callerPublicKey == pk))
324324 then true
325325 else permissionDeniedError
326326 case _: Unit =>
327327 mustThis(i)
328328 case _ =>
329329 throw("Match error")
330330 }
331331
332332
333333 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)
334334
335335
336336 func dataFactoryCfg (stakingAddress,boostingAddress,idoContract,teamContract,emissionContract,restContract,slippageContract) = makeString(["%s%s%s%s%s%s", stakingAddress, boostingAddress, idoContract, teamContract, emissionContract, restContract, slippageContract], SEP)
337337
338338
339339 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)
340340
341341
342342 func dataMappingPoolAssets (internalAmountAssetStr,internalPriceAssetStr) = makeString(["%d%d", toString(internalAmountAssetStr), toString(internalPriceAssetStr)], SEP)
343343
344344
345345 func getPoolConfig (poolAddress) = {
346346 let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolAddress)), SEP)
347347 let amountAssetInternal = poolAssets[1]
348348 let priceAssetInternal = poolAssets[2]
349349 split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP)
350350 }
351351
352352
353353 func getInternalAssetIdOrCreate (assetIdStr,incrementor) = {
354354 let internalAssetId = valueOrElse(getInteger(this, keyMappingsBaseAsset2internalId(assetIdStr)), 0)
355355 let currentIndexOfInternalId = valueOrElse(getInteger(this, keyNextInternalAssetId()), 0)
356356 let result = if ((internalAssetId == 0))
357357 then {
358358 let newInternalAssetId = (currentIndexOfInternalId + incrementor)
359359 $Tuple3(newInternalAssetId, [IntegerEntry(keyNextInternalAssetId(), newInternalAssetId), IntegerEntry(keyMappingsBaseAsset2internalId(assetIdStr), newInternalAssetId), StringEntry(keyMappingsInternal2baseAssetId(newInternalAssetId), assetIdStr)], true)
360360 }
361361 else $Tuple3(internalAssetId, nil, false)
362362 result
363363 }
364364
365365
366366 func mustAdmin (i) = {
367367 let adminPKs = split(valueOrElse(getString(keyAdminPubKeys()), EMPTY), SEP)
368368 if (containsElement(adminPKs, toBase58String(i.callerPublicKey)))
369369 then true
370370 else {
371371 let isManager = mustManager(i)
372372 if ((isManager == isManager))
373373 then true
374374 else throw("Strict value is not equal to itself.")
375375 }
376376 }
377377
378378
379379 func intOrDefaultOrFallback (key,keyDefault,valueFallback) = valueOrElse(getInteger(this, key), valueOrElse(getInteger(this, keyDefault), valueFallback))
380380
381381
382382 func poolExistsInternal (amountAssetId,priceAssetId) = {
383383 let amountAssetInternal = getInteger(keyMappingsBaseAsset2internalId(amountAssetId))
384384 let priceAssetInternal = getInteger(keyMappingsBaseAsset2internalId(priceAssetId))
385385 if (if ((amountAssetInternal == unit))
386386 then true
387387 else (priceAssetInternal == unit))
388388 then false
389389 else {
390390 let amAs = toString(value(amountAssetInternal))
391391 let prAs = toString(value(priceAssetInternal))
392392 let cfg = getString(keyPoolConfig(amAs, prAs))
393393 let cfgReverse = getString(keyPoolConfig(prAs, amAs))
394394 let exists = if ((cfg != unit))
395395 then true
396396 else (cfgReverse != unit)
397397 exists
398398 }
399399 }
400400
401401
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+
402450 @Callable(i)
403451 func getSwapContractREADONLY () = $Tuple2(nil, getStringOrFail(swapContract()))
404452
405453
406454
407455 @Callable(i)
408456 func getPoolLeaseConfigREADONLY (poolAddress,assetId) = {
409- let $t01453014834 = match getInteger(this, keyLeasedRatio(poolAddress, assetId)) {
457+ let $t01620416508 = match getInteger(this, keyLeasedRatio(poolAddress, assetId)) {
410458 case r: Int =>
411459 $Tuple2(true, min([100, max([0, r])]))
412460 case _ =>
413461 match getInteger(this, keyLeasedRatioDefault(assetId)) {
414462 case rd: Int =>
415463 $Tuple2(true, min([100, max([0, rd])]))
416464 case _ =>
417465 $Tuple2(false, 0)
418466 }
419467 }
420- let isLeasable = $t01453014834._1
421- let leasedRatio = $t01453014834._2
468+ let isLeasable = $t01620416508._1
469+ let leasedRatio = $t01620416508._2
422470 let minBalance = match getInteger(this, keyMinBalance(poolAddress, assetId)) {
423471 case b: Int =>
424472 max([0, b])
425473 case _ =>
426474 match getInteger(this, keyMinBalanceDefault(assetId)) {
427475 case bd: Int =>
428476 max([0, bd])
429477 case _ =>
430478 0
431479 }
432480 }
433- let $t01510015324 = if ((assetId == "WAVES"))
481+ let $t01677416998 = if ((assetId == "WAVES"))
434482 then $Tuple3(valueOrElse(getString(this, keySWavesProxyAddress()), ""), getString(this, valueOrElse(keySWavesAssetId(), "")), MULT12)
435483 else $Tuple3("", "", 0)
436- let proxyAddress = $t01510015324._1
437- let proxyAssetId = $t01510015324._2
438- let proxyRateMul = $t01510015324._3
484+ let proxyAddress = $t01677416998._1
485+ let proxyAssetId = $t01677416998._2
486+ let proxyRateMul = $t01677416998._3
439487 let stakingProfitAddress = valueOrElse(getString(this, keyStakingProfitAddress()), "")
440488 $Tuple2(nil, $Tuple7(isLeasable, leasedRatio, minBalance, proxyAddress, proxyAssetId, proxyRateMul, stakingProfitAddress))
441489 }
442490
443491
444492
445493 @Callable(i)
446494 func getLpAssetFromPoolAssetsREADONLY (asset1,asset2) = if (if ((asset1 == "8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS"))
447495 then (asset2 == "WAVES")
448496 else false)
449497 then $Tuple2(nil, unit)
450498 else {
451499 let assetNum1 = value(getInteger(this, keyMappingsBaseAsset2internalId(asset1)))
452500 let assetNum2 = value(getInteger(this, keyMappingsBaseAsset2internalId(asset2)))
453501 let ee = getString(this, keyMappingPoolAssetsToLpasset(toString(assetNum1), toString(assetNum2)))
454502 let res = if ((ee == unit))
455503 then unit
456504 else drop(value(ee), 4)
457505 $Tuple2(nil, res)
458506 }
459507
460508
461509
462510 @Callable(i)
463511 func getPoolAddressFromLpAssetREADONLY (lp) = $Tuple2(nil, valueOrElse(getString(this, keyMappingPoolLPAssetToPoolContractAddress(lp)), ""))
464512
465513
466514
467515 @Callable(i)
468516 func constructor (stakingContract,boostingContract,idoContract,teamContract,emissionContract,restContract,slpipageContract,priceDecimals) = {
469517 let checkCaller = mustManager(i)
470518 if ((checkCaller == checkCaller))
471519 then [StringEntry(keyFactoryConfig(), dataFactoryCfg(stakingContract, boostingContract, idoContract, teamContract, emissionContract, restContract, slpipageContract)), IntegerEntry(keyPriceDecimals(), priceDecimals)]
472520 else throw("Strict value is not equal to itself.")
473521 }
474522
475523
476524
477525 @Callable(i)
478526 func constructorV2 (mathcherPub58Str) = {
479527 let checkCaller = mustManager(i)
480528 if ((checkCaller == checkCaller))
481529 then {
482530 let mathcerPub = addressFromPublicKey(fromBase58String(mathcherPub58Str))
483531 if ((mathcerPub == mathcerPub))
484532 then [StringEntry(keyMatcherPub(), mathcherPub58Str)]
485533 else throw("Strict value is not equal to itself.")
486534 }
487535 else throw("Strict value is not equal to itself.")
488536 }
489537
490538
491539
492540 @Callable(i)
493541 func constructorV3 (daoContract,marketingContract,gwxRewardsContract,birdsContract) = {
494542 let checkCaller = mustManager(i)
495543 if ((checkCaller == checkCaller))
496544 then {
497545 let factoryCfg = split(getStringOrFail(keyFactoryConfig()), SEP)
498546 [StringEntry(keyFactoryConfig(), dataFactoryCfgV3(factoryCfg[1], factoryCfg[2], factoryCfg[3], factoryCfg[4], factoryCfg[5], factoryCfg[6], factoryCfg[7], daoContract, marketingContract, gwxRewardsContract, birdsContract))]
499547 }
500548 else throw("Strict value is not equal to itself.")
501549 }
502550
503551
504552
505553 @Callable(i)
506554 func constructorV4 (legacyFactoryContract,legacyPools) = {
507555 let checkCaller = mustManager(i)
508556 if ((checkCaller == checkCaller))
509557 then [StringEntry(keyLegacyFactoryContract(), legacyFactoryContract), StringEntry(keyLegacyPools(), makeString(legacyPools, SEP))]
510558 else throw("Strict value is not equal to itself.")
511559 }
512560
513561
514562
515563 @Callable(i)
516564 func constructorV5 (assetsStoreContract) = {
517565 let checkCaller = mustManager(i)
518566 if ((checkCaller == checkCaller))
519567 then [StringEntry(keyAssetsStoreContract(), assetsStoreContract)]
520568 else throw("Strict value is not equal to itself.")
521569 }
522570
523571
524572
525573 @Callable(i)
526574 func constructorV6 (votingEmissionContract,priceAssets) = {
527575 let cheks = [mustManager(i), if ((addressFromString(votingEmissionContract) != unit))
528576 then true
529577 else "invalid voting emission contract address"]
530578 if ((cheks == cheks))
531579 then [StringEntry(keyVotingEmissionContract(), votingEmissionContract), StringEntry(keyPriceAssets(), makeString(priceAssets, SEP))]
532580 else throw("Strict value is not equal to itself.")
533581 }
534582
535583
536584
537585 @Callable(i)
538586 func setAdmins (adminPubKeys) = {
539587 let checkCaller = mustManager(i)
540588 if ((checkCaller == checkCaller))
541589 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
542590 else throw("Strict value is not equal to itself.")
543591 }
544592
545593
546594
547595 @Callable(i)
548596 func activateNewPool (poolAddress,amountAssetStr,priceAssetStr,lpAssetName,lpAssetDescr,poolWeight,poolType,logo) = {
549597 let checkCaller = mustAdmin(i)
550598 if ((checkCaller == checkCaller))
551599 then if (isDefined(getString(keyMappingPoolContractAddressToPoolAssets(poolAddress))))
552600 then throwErr((("Pool address " + poolAddress) + " already registered."))
553601 else {
554602 let internalAmountAssetData = getInternalAssetIdOrCreate(amountAssetStr, 1)
555603 let internalAmountAssetId = internalAmountAssetData._1
556604 let internalPriceAssetData = getInternalAssetIdOrCreate(priceAssetStr, if (internalAmountAssetData._3)
557605 then 2
558606 else 1)
559607 let internalPriceAssetId = internalPriceAssetData._1
560608 let poolAccountScriptHash = valueOrErrorMessage(scriptHash(addressFromStringValue(poolAddress)), ("No script has been found on pool account " + poolAddress))
561609 let ethalonPoolAccountScriptHash = getBinaryValue(keyPoolScriptHash())
562610 let poolExists = poolExistsInternal(amountAssetStr, priceAssetStr)
563611 if (poolExists)
564612 then throwErr((((("Pool " + amountAssetStr) + "/") + priceAssetStr) + " has already been activated."))
565613 else {
566614 let poolConfigValue = value(getString(this, keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId))))
567615 let amountAssetsDecimals = if ((amountAssetStr == "WAVES"))
568616 then decimalsMultPrice
569617 else pow(10, 0, value(assetInfo(fromBase58String(amountAssetStr))).decimals, 0, 0, DOWN)
570618 let priceAssetsDecimals = if ((priceAssetStr == "WAVES"))
571619 then decimalsMultPrice
572620 else pow(10, 0, value(assetInfo(fromBase58String(priceAssetStr))).decimals, 0, 0, DOWN)
573621 let lpAssetIssueAction = Issue(lpAssetName, lpAssetDescr, 1, 8, true)
574622 let lpAssetId = calculateAssetId(lpAssetIssueAction)
575623 let lpAssetIdStr = toBase58String(lpAssetId)
576624 let poolActivateInvokeResult = invoke(addressFromStringValue(poolAddress), "activate", [amountAssetStr, priceAssetStr], nil)
577625 if ((poolActivateInvokeResult == poolActivateInvokeResult))
578626 then if ((poolActivateInvokeResult != "success"))
579627 then throwErr("Pool initialisation error happened.")
580628 else {
581629 let assetsStoreContract = addressFromStringValue(getStringOrFail(keyAssetsStoreContract()))
582630 let createOrUpdateLpAssetInv = invoke(assetsStoreContract, "createOrUpdate", [lpAssetIdStr, lpAssetName, false], nil)
583631 if ((createOrUpdateLpAssetInv == createOrUpdateLpAssetInv))
584632 then {
585633 let addPoolsLpLabelInv = invoke(assetsStoreContract, "addLabel", [lpAssetIdStr, labelPoolsLp], nil)
586634 if ((addPoolsLpLabelInv == addPoolsLpLabelInv))
587635 then {
588636 let setLogoInv = invoke(assetsStoreContract, "setLogo", [lpAssetIdStr, logo], nil)
589637 if ((setLogoInv == setLogoInv))
590638 then {
591639 let addAssetsLinkInv = invoke(assetsStoreContract, "addAssetsLink", [amountAssetStr, priceAssetStr, lpAssetIdStr], nil)
592640 if ((addAssetsLinkInv == addAssetsLinkInv))
593641 then {
594642 let increaseAssetPoolsNumberInv = invoke(assetsStoreContract, "increaseAssetPoolsNumber", [amountAssetStr], nil)
595643 if ((increaseAssetPoolsNumberInv == increaseAssetPoolsNumberInv))
596644 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)
597645 else throw("Strict value is not equal to itself.")
598646 }
599647 else throw("Strict value is not equal to itself.")
600648 }
601649 else throw("Strict value is not equal to itself.")
602650 }
603651 else throw("Strict value is not equal to itself.")
604652 }
605653 else throw("Strict value is not equal to itself.")
606654 }
607655 else throw("Strict value is not equal to itself.")
608656 }
609657 }
610658 else throw("Strict value is not equal to itself.")
611659 }
612660
613661
614662
615663 @Callable(i)
616664 func managePool (poolAddress,newStatus) = {
617665 let checkCaller = mustManager(i)
618666 if ((checkCaller == checkCaller))
619667 then {
620668 let poolConfig = getPoolConfig(poolAddress)
621669 let poolStatus = poolConfig[idxPoolStatus]
622670 let lpAssetIdStr = poolConfig[idxPoolLPAssetId]
623671 let amountAssetStr = poolConfig[idxAmtAssetId]
624672 let priceAssetStr = poolConfig[idxPriceAssetId]
625673 let amountAssetsDecimals = parseIntValue(poolConfig[idxAmtAssetDcm])
626674 let priceAssetsDecimals = parseIntValue(poolConfig[idxPriceAssetDcm])
627675 let internalAmountAssetId = parseIntValue(poolConfig[idxIAmtAssetId])
628676 let internalPriceAssetId = parseIntValue(poolConfig[idxIPriceAssetId])
629677 let lpAssetDcm = parseIntValue(poolConfig[idxLPAssetDcm])
630678 let poolType = poolConfig[idxPoolType]
631679 [StringEntry(keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId)), dataPoolCfg(poolAddress, toString(newStatus), lpAssetIdStr, amountAssetStr, priceAssetStr, amountAssetsDecimals, priceAssetsDecimals, internalAmountAssetId, internalPriceAssetId, lpAssetDcm, poolType))]
632680 }
633681 else throw("Strict value is not equal to itself.")
634682 }
635683
636684
637685
638686 @Callable(i)
639687 func emit (amountToEmit) = {
640688 let caller = i.caller
641689 let originCaller = i.originCaller
642690 let lpAssetRequested = valueOrErrorMessage(getString(keyMappingPoolContractToLPAsset(toString(caller))), "Invalid LP address called me.")
643691 let lpAsset = fromBase58String(lpAssetRequested)
644692 let legacyPools = split(valueOrElse(getString(keyLegacyPools()), EMPTY), SEP)
645693 let legacyFactoryContract = addressFromStringValue(valueOrErrorMessage(getString(keyLegacyFactoryContract()), "Legacy factory contract does not exists."))
646694 if ((0 >= amountToEmit))
647695 then nil
648696 else if (containsElement(legacyPools, toString(caller)))
649697 then $Tuple2(nil, legacyFactoryContract)
650698 else $Tuple2([Reissue(lpAsset, amountToEmit, true), ScriptTransfer(i.caller, amountToEmit, lpAsset)], "success")
651699 }
652700
653701
654702
655703 @Callable(i)
656704 func burn (amountToBurn) = {
657705 let caller = i.caller
658706 let originCaller = i.originCaller
659707 let payment = value(i.payments[0])
660708 let paymentAmount = value(payment.amount)
661709 let inAmountAssetId = toBase58String(value(payment.assetId))
662710 let lpAssetRequestedForBurning = valueOrErrorMessage(getString(keyMappingPoolContractToLPAsset(toString(caller))), "Invalid LP address called me.")
663711 if ((inAmountAssetId != lpAssetRequestedForBurning))
664712 then throwErr("Invalid asset passed.")
665713 else if ((amountToBurn != paymentAmount))
666714 then throwErr("Invalid amount passed.")
667715 else {
668716 let lpAsset = fromBase58String(lpAssetRequestedForBurning)
669717 $Tuple2([Burn(lpAsset, amountToBurn)], "success")
670718 }
671719 }
672720
673721
674722
675723 @Callable(i)
676724 func modifyWeight (lpAssetId,share) = {
677725 let checkCaller = if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionContract()), "")))
678726 then true
679727 else mustManager(i)
680728 if ((checkCaller == checkCaller))
681729 then {
682730 let poolContractAddress = getStringOrFail(keyMappingPoolLPAssetToPoolContractAddress(lpAssetId))
683731 let poolWeightKey = keyPoolToWeight(poolContractAddress)
684732 let gwxWeightKey = keyPoolToWeight(GWXvirtualPOOL)
685733 let gwxWeight = valueOrElse(getInteger(gwxWeightKey), 0)
686734 let poolWeight = valueOrElse(getInteger(poolWeightKey), 0)
687735 let poolWeightNew = share
688736 let factoryCfg = split(getStringOrFail(keyFactoryConfig()), SEP)
689737 let stakingContract = getStakingAddressOrFail(factoryCfg)
690738 let onModifyWeightInv = invoke(stakingContract, "onModifyWeight", [lpAssetId, poolContractAddress], nil)
691739 if ((onModifyWeightInv == onModifyWeightInv))
692740 then {
693741 let gwxVirtualPoolActions = if ((gwxWeight == 0))
694742 then nil
695743 else [IntegerEntry(gwxWeightKey, 0)]
696744 let poolWeightHistoryKey = keyPoolToWeightHistory(poolContractAddress, 0)
697745 let poolWeightHistoryOrUnit = getInteger(poolWeightHistoryKey)
698746 let poolWeightHistoryActions = if ((poolWeightHistoryOrUnit == unit))
699747 then nil
700748 else [DeleteEntry(poolWeightHistoryKey)]
701749 (([IntegerEntry(poolWeightKey, poolWeightNew)] ++ gwxVirtualPoolActions) ++ poolWeightHistoryActions)
702750 }
703751 else throw("Strict value is not equal to itself.")
704752 }
705753 else throw("Strict value is not equal to itself.")
706754 }
707755
708756
709757
710758 @Callable(i)
711759 func modifyWeights (btcPoolAddress,ethPoolAddress,ethBtcPoolAddress,usdcUsdtPoolAddress) = {
712760 let checkCaller = mustManager(i)
713761 if ((checkCaller == checkCaller))
714762 then {
715763 let ethBtcWeightNew = ((5 * POOLWEIGHTMULT) / 100)
716764 let usdcUsdtWeightNew = ((5 * POOLWEIGHTMULT) / 100)
717765 let weightDecrement = ((5 * POOLWEIGHTMULT) / 100)
718766 let factoryCfg = split(getStringOrFail(keyFactoryConfig()), SEP)
719767 let stakingDapp = getStakingAddressOrFail(factoryCfg)
720768 let gwxRewardDapp = getGwxRewardAddressOrFail(factoryCfg)
721769 let btcWeightKEY = keyPoolToWeight(btcPoolAddress)
722770 let ethWeightKEY = keyPoolToWeight(ethPoolAddress)
723771 let ethBtcWeightKEY = keyPoolToWeight(ethBtcPoolAddress)
724772 let usdcUsdtWeightKEY = keyPoolToWeight(usdcUsdtPoolAddress)
725773 let btcWeight = getIntOrFail(btcWeightKEY)
726774 let ethWeight = getIntOrFail(ethWeightKEY)
727775 let btcWeightNew = (btcWeight - weightDecrement)
728776 let ethWeightNew = (ethWeight - weightDecrement)
729777 if ((0 >= btcWeightNew))
730778 then throwErr(("invalid btcWeightNew: " + toString(btcWeightNew)))
731779 else if ((0 >= ethWeightNew))
732780 then throwErr(("invalid ethWeightNew: " + toString(ethWeightNew)))
733781 else {
734782 let btcLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(btcPoolAddress))
735783 let ethLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(ethPoolAddress))
736784 let ethBtcLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(ethBtcPoolAddress))
737785 let usdcUsdtLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(usdcUsdtPoolAddress))
738786 let onModifyWeightBtc = invoke(stakingDapp, "onModifyWeight", [btcLpAssetIdStr, btcPoolAddress], nil)
739787 if ((onModifyWeightBtc == onModifyWeightBtc))
740788 then {
741789 let onModifyWeightEth = invoke(stakingDapp, "onModifyWeight", [ethLpAssetIdStr, ethPoolAddress], nil)
742790 if ((onModifyWeightEth == onModifyWeightEth))
743791 then {
744792 let onModifyWeightEthBtc = invoke(stakingDapp, "onModifyWeight", [ethBtcLpAssetIdStr, ethBtcPoolAddress], nil)
745793 if ((onModifyWeightEthBtc == onModifyWeightEthBtc))
746794 then {
747795 let onModifyWeightUsdcUsdt = invoke(stakingDapp, "onModifyWeight", [usdcUsdtLpAssetIdStr, usdcUsdtPoolAddress], nil)
748796 if ((onModifyWeightUsdcUsdt == onModifyWeightUsdcUsdt))
749797 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)]
750798 else throw("Strict value is not equal to itself.")
751799 }
752800 else throw("Strict value is not equal to itself.")
753801 }
754802 else throw("Strict value is not equal to itself.")
755803 }
756804 else throw("Strict value is not equal to itself.")
757805 }
758806 }
759807 else throw("Strict value is not equal to itself.")
760808 }
761809
762810
763811
764812 @Callable(i)
765813 func checkWxEmissionPoolLabel (amountAssetId,priceAssetId) = {
766814 let haveLabel = match getBoolean(keyWxEmission(amountAssetId, priceAssetId)) {
767815 case b: Boolean =>
768816 b
769817 case _ =>
770818 false
771819 }
772820 $Tuple2(nil, haveLabel)
773821 }
774822
775823
776824
777825 @Callable(i)
778826 func setWxEmissionPoolLabel (amountAssetId,priceAssetId) = {
779827 let checkCaller = mustAdmin(i)
780828 if ((checkCaller == checkCaller))
781829 then $Tuple2([BooleanEntry(keyWxEmission(amountAssetId, priceAssetId), true)], unit)
782830 else throw("Strict value is not equal to itself.")
783831 }
784832
785833
786834
787835 @Callable(i)
788836 func deleteWxEmissionPoolLabel (amountAssetId,priceAssetId) = {
789837 let checkCaller = if ((i.caller == this))
790838 then true
791839 else mustAdmin(i)
792840 if ((checkCaller == checkCaller))
793841 then $Tuple2([DeleteEntry(keyWxEmission(amountAssetId, priceAssetId))], unit)
794842 else throw("Strict value is not equal to itself.")
795843 }
796844
797845
798846
799847 @Callable(i)
800848 func onVerificationLoss (assetId) = {
801849 let checkCaller = if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyAssetsStoreContract()), "")))
802850 then true
803851 else mustManager(i)
804852 if ((checkCaller == checkCaller))
805853 then {
806854 let priceAssets = getPriceAssets()
807855 let checkPriceAssetsSize = if ((size(priceAssets) > 0))
808856 then true
809857 else throwErr("invalid price assets")
810858 if ((checkPriceAssetsSize == checkPriceAssetsSize))
811859 then {
812860 func cb (acc,priceAsset) = {
813861 let r = invoke(this, "deleteWxEmissionPoolLabel", [assetId, priceAsset], nil)
814862 if ((r == r))
815863 then unit
816864 else throw("Strict value is not equal to itself.")
817865 }
818866
819867 let actions = {
820868 let $l = priceAssets
821869 let $s = size($l)
822870 let $acc0 = unit
823871 func $f0_1 ($a,$i) = if (($i >= $s))
824872 then $a
825873 else cb($a, $l[$i])
826874
827875 func $f0_2 ($a,$i) = if (($i >= $s))
828876 then $a
829877 else throw("List size exceeds 11")
830878
831879 $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)
832880 }
833881 if ((actions == actions))
834882 then $Tuple2(nil, unit)
835883 else throw("Strict value is not equal to itself.")
836884 }
837885 else throw("Strict value is not equal to itself.")
838886 }
839887 else throw("Strict value is not equal to itself.")
840888 }
841889
842890
843891
844892 @Callable(i)
845893 func isPoolOneTokenOperationsDisabledREADONLY (poolAddress) = {
846894 let poolConfig = getPoolConfig(poolAddress)
847895 let assetsInternal = $Tuple2(parseIntValue(poolConfig[idxIAmtAssetId]), parseIntValue(poolConfig[idxIPriceAssetId]))
848896 let poolOneTokenOperationsDisabled = valueOrElse(getBoolean(keyPoolOneTokenOperationsDisabled(assetsInternal)), false)
849897 let allPoolsOneTokenOperationsDisabled = valueOrElse(getBoolean(keyAllPoolsOneTokenOperationsDisabled()), false)
850898 $Tuple2(nil, if (allPoolsOneTokenOperationsDisabled)
851899 then true
852900 else poolOneTokenOperationsDisabled)
853901 }
854902
855903
856904
857905 @Callable(i)
858906 func getInFeeREADONLY (poolAddress) = {
859907 let fee = intOrDefaultOrFallback(keyInFee(poolAddress), keyInFeeDefault(), 0)
860908 $Tuple2(nil, fee)
861909 }
862910
863911
864912
865913 @Callable(i)
866914 func getOutFeeREADONLY (poolAddress) = {
867915 let fee = intOrDefaultOrFallback(keyOutFee(poolAddress), keyOutFeeDefault(), fraction(10, MULT8, 10000))
868916 $Tuple2(nil, fee)
869917 }
870918
871919
872920
873921 @Callable(i)
874922 func poolInfoREADONLY (amountAssetIdStr,priceAssetIdStr) = {
875923 let amountAssetInternalIdOption = getInteger(this, keyMappingsBaseAsset2internalId(amountAssetIdStr))
876924 let priceAssetInternalIdOption = getInteger(this, keyMappingsBaseAsset2internalId(priceAssetIdStr))
877925 let poolContractAddressOption = getString(this, keyMappingPoolAssetsToPoolContractAddress(value(amountAssetInternalIdOption), value(priceAssetInternalIdOption)))
878926 let lpAssetIdOption = getString(this, keyMappingPoolContractToLPAsset(value(poolContractAddressOption)))
879927 let poolExists = if (if (isDefined(amountAssetInternalIdOption))
880928 then isDefined(priceAssetInternalIdOption)
881929 else false)
882930 then isDefined(poolContractAddressOption)
883931 else false
884932 let poolInfo = if (poolExists)
885933 then $Tuple2(addressFromStringValue(value(poolContractAddressOption)), parseAssetId(value(lpAssetIdOption)))
886934 else unit
887935 $Tuple2(nil, poolInfo)
888936 }
889937
890938
891939
892940 @Callable(i)
893941 func getPoolStatusREADONLY (poolAddress) = {
894942 let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolAddress)), SEP)
895943 let amountAssetInternal = poolAssets[1]
896944 let priceAssetInternal = poolAssets[2]
897945 let cfg = split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP)
898946 $Tuple2(nil, parseIntValue(cfg[idxPoolStatus]))
899947 }
900948
901949
902950
903951 @Callable(i)
904952 func getPoolConfigREADONLY (poolAddress) = {
905953 let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolAddress)), SEP)
906954 let amountAssetInternal = poolAssets[1]
907955 let priceAssetInternal = poolAssets[2]
908956 let cfg = split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP)
909957 $Tuple2(nil, cfg)
910958 }
911959
912960
913961
914962 @Callable(i)
915963 func getPoolConfigByLpAssetIdREADONLY (lpAssetIdStr) = {
916964 let poolAssets = split(getStringOrFail(keyMappingLpAssetToPoolAssets(lpAssetIdStr)), SEP)
917965 let amountAssetInternal = poolAssets[1]
918966 let priceAssetInternal = poolAssets[2]
919967 let cfg = split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP)
920968 $Tuple2(nil, cfg)
921969 }
922970
923971
924972
925973 @Callable(i)
926974 func poolExistsREADONLY (amountAssetId,priceAssetId) = $Tuple2(nil, poolExistsInternal(amountAssetId, priceAssetId))
927975
928976
929977
930978 @Callable(i)
931979 func skipOrderValidationREADONLY (poolAddress) = $Tuple2(nil, valueOrElse(getBoolean(keySkipOrderValidation(poolAddress)), false))
932980
933981
934982
935983 @Callable(i)
936984 func getChangeAmpConfigREADONLY (poolAddress) = {
937985 let delay = getIntegerValue(keyChangeAmpDelay(poolAddress))
938986 let delta = getIntegerValue(keyChangeAmpDelta(poolAddress))
939987 let target = getIntegerValue(keyChangeAmpTarget(poolAddress))
940988 $Tuple2(nil, [delay, delta, target])
941989 }
942990
943991
944992
945993 @Callable(i)
946994 func getPoolWeightREADONLY (lpAssetId) = {
947995 let poolAddress = getStringOrFail(keyMappingPoolLPAssetToPoolContractAddress(lpAssetId))
948996 let weight = valueOrElse(getInteger(keyPoolToWeight(poolAddress)), 0)
949997 $Tuple2(nil, weight)
950998 }
951999
9521000
9531001
9541002 @Callable(i)
9551003 func deletePool (poolContractAddress) = {
956- let checkCaller = if (mustManager(i))
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)
9571009 then true
9581010 else permissionDeniedError
9591011 if ((checkCaller == checkCaller))
9601012 then {
9611013 let checkWeight = if ((valueOrElse(getInteger(keyPoolToWeight(poolContractAddress)), 0) == 0))
9621014 then true
9631015 else throwErr("Pool weight is not Zero")
9641016 if ((checkWeight == checkWeight))
9651017 then {
966- let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolContractAddress)), SEP)
967- let amountAssetInternal = parseIntValue(poolAssets[1])
968- let priceAssetInternal = parseIntValue(poolAssets[2])
969- let amountAssetId = getStringValue(keyMappingsInternal2baseAssetId(amountAssetInternal))
970- let priceAssetId = getStringValue(keyMappingsInternal2baseAssetId(priceAssetInternal))
971- let lpAssetId = getStringOrFail(keyMappingPoolContractToLPAsset(poolContractAddress))
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
9721024 let userPoolsContract = addressFromStringValue(getStringValue(keyUserPoolsContract()))
9731025 let userPoolsInvoke = invoke(userPoolsContract, "deletePool", [amountAssetId, priceAssetId], nil)
9741026 if ((userPoolsInvoke == userPoolsInvoke))
9751027 then {
9761028 let votingEmissionContract = addressFromStringValue(getStringValue(keyVotingEmissionContract()))
9771029 let votingEmissionInvoke = invoke(votingEmissionContract, "deletePool", [amountAssetId, priceAssetId], nil)
9781030 if ((votingEmissionInvoke == votingEmissionInvoke))
9791031 then {
9801032 let assetsStoreContract = addressFromStringValue(getStringValue(keyAssetsStoreContract()))
9811033 let assetsStoreInvoke = invoke(assetsStoreContract, "deletePool", [amountAssetId, priceAssetId], nil)
9821034 if ((assetsStoreInvoke == assetsStoreInvoke))
9831035 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))]
9841036 else throw("Strict value is not equal to itself.")
9851037 }
9861038 else throw("Strict value is not equal to itself.")
9871039 }
9881040 else throw("Strict value is not equal to itself.")
9891041 }
9901042 else throw("Strict value is not equal to itself.")
9911043 }
9921044 else throw("Strict value is not equal to itself.")
9931045 }
9941046
9951047
9961048 @Verifier(tx)
9971049 func verify () = {
9981050 let targetPublicKey = match managerPublicKeyOrUnit() {
9991051 case pk: ByteVector =>
10001052 pk
10011053 case _: Unit =>
10021054 tx.senderPublicKey
10031055 case _ =>
10041056 throw("Match error")
10051057 }
10061058 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
10071059 }
10081060

github/deemru/w8io/fabc49c 
111.60 ms