tx · 37DqwX9n5E8Z3eewpmJjkKLRag6cPQPiogiFf2t3sWaF

3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai:  -0.02700000 Waves

2023.06.19 10:15 [2629197] smart account 3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai > SELF 0.00000000 Waves

{ "type": 13, "id": "37DqwX9n5E8Z3eewpmJjkKLRag6cPQPiogiFf2t3sWaF", "fee": 2700000, "feeAssetId": null, "timestamp": 1687158962867, "version": 2, "chainId": 84, "sender": "3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai", "senderPublicKey": "2JEaBjtjvMoNGKZmL9QxYefa1VkMJM3vMW8rNvTs9R2H", "proofs": [ "493idR96M36rGuyv7G8AZhEJGv8yoxCHsuUWmJdX5RaczfcS6p64iR9u8xWNYs22BuKnobqrgSRRhUYCgWGRQSB3" ], "script": "base64:BgL4KwgCEgASBAoCCAgSBAoCCAgSAwoBCBIKCggICAgICAgIARIDCgEIEgYKBAgICAgSBAoCCBgSAwoBCBIECgIIGBIDCgEYEgoKCAgICAgIAQgIEgQKAggBEgMKAQESAwoBARIECgIIARIGCgQICAgIEgQKAggIEgQKAggIEgQKAggIEgMKAQgSAwoBCBIDCgEIEgMKAQgSBAoCCAgSAwoBCBIDCgEIEgMKAQgSBAoCCAgSAwoBCBIDCgEIEgMKAQgSAwoBCCIGU0NBTEU4IgVNVUxUOCIGTVVMVDEyIgdTQ0FMRTE4IgZNVUxUMTgiDlBPT0xXRUlHSFRNVUxUIg5HV1h2aXJ0dWFsUE9PTCIMbGFiZWxQb29sc0xwIg1kZWZhdWx0U3ByZWFkIgt3YXZlc1N0cmluZyIQY29udHJhY3RGaWxlbmFtZSIRZGVjaW1hbHNNdWx0UHJpY2UiA1NFUCIFRU1QVFkiClBvb2xBY3RpdmUiD1Bvb2xQdXREaXNhYmxlZCITUG9vbE1hdGNoZXJEaXNhYmxlZCIMUG9vbFNodXRkb3duIhJpZHhJbnRlcm5hbEFzc2V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CQELRGVsZXRlRW50cnkBCQECYU4BBQJhQQkAzAgCCQELRGVsZXRlRW50cnkBCQECYU8BBQJhQQUDbmlsCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAQJmagECZmsABAJmbAQCYmYJAQJieQADCQABAgUCYmYCCkJ5dGVWZWN0b3IEAmJGBQJiZgUCYkYDCQABAgUCYmYCBFVuaXQIBQJmag9zZW5kZXJQdWJsaWNLZXkJAAIBAgtNYXRjaCBlcnJvcgkA9AMDCAUCZmoJYm9keUJ5dGVzCQCRAwIIBQJmagZwcm9vZnMAAAUCZmyUjMcX", "height": 2629197, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Ax73N5XmJCkQPjF5YJ4VKpfrhe53RoanVWVxbNSVX2pQ Next: 7N9YN26FYN5ozkfvCdUgJViuqKnYBYSdurenGMrJkVRc Diff:
OldNewDifferences
958958 else permissionDeniedError
959959 if ((checkCaller == checkCaller))
960960 then {
961- let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolContractAddress)), SEP)
962- let amountAssetInternal = parseIntValue(poolAssets[1])
963- let priceAssetInternal = parseIntValue(poolAssets[2])
964- let amountAssetId = getStringValue(keyMappingsInternal2baseAssetId(amountAssetInternal))
965- let priceAssetId = getStringValue(keyMappingsInternal2baseAssetId(priceAssetInternal))
966- let lpAssetId = getStringOrFail(keyMappingPoolContractToLPAsset(poolContractAddress))
967- let userPoolsContract = addressFromStringValue(getStringValue(keyUserPoolsContract()))
968- let userPoolsInvoke = invoke(userPoolsContract, "deletePool", [amountAssetId, priceAssetId], nil)
969- if ((userPoolsInvoke == userPoolsInvoke))
961+ let checkWeight = if ((valueOrElse(getInteger(keyPoolToWeight(poolContractAddress)), 0) == 0))
962+ then true
963+ else throwErr("Pool weight is not Zero")
964+ if ((checkWeight == checkWeight))
970965 then {
971- let votingEmissionContract = addressFromStringValue(getStringValue(keyVotingEmissionContract()))
972- let votingEmissionInvoke = invoke(votingEmissionContract, "deletePool", [amountAssetId, priceAssetId], nil)
973- if ((votingEmissionInvoke == votingEmissionInvoke))
974- 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))]
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))
972+ let userPoolsContract = addressFromStringValue(getStringValue(keyUserPoolsContract()))
973+ let userPoolsInvoke = invoke(userPoolsContract, "deletePool", [amountAssetId, priceAssetId], nil)
974+ if ((userPoolsInvoke == userPoolsInvoke))
975+ then {
976+ let votingEmissionContract = addressFromStringValue(getStringValue(keyVotingEmissionContract()))
977+ let votingEmissionInvoke = invoke(votingEmissionContract, "deletePool", [amountAssetId, priceAssetId], nil)
978+ if ((votingEmissionInvoke == votingEmissionInvoke))
979+ then {
980+ let assetsStoreContract = addressFromStringValue(getStringValue(keyAssetsStoreContract()))
981+ let assetsStoreInvoke = invoke(assetsStoreContract, "deletePool", [amountAssetId, priceAssetId], nil)
982+ if ((assetsStoreInvoke == assetsStoreInvoke))
983+ 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))]
984+ else throw("Strict value is not equal to itself.")
985+ }
986+ else throw("Strict value is not equal to itself.")
987+ }
975988 else throw("Strict value is not equal to itself.")
976989 }
977990 else throw("Strict value is not equal to itself.")
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
402402 @Callable(i)
403403 func getSwapContractREADONLY () = $Tuple2(nil, getStringOrFail(swapContract()))
404404
405405
406406
407407 @Callable(i)
408408 func getPoolLeaseConfigREADONLY (poolAddress,assetId) = {
409409 let $t01453014834 = match getInteger(this, keyLeasedRatio(poolAddress, assetId)) {
410410 case r: Int =>
411411 $Tuple2(true, min([100, max([0, r])]))
412412 case _ =>
413413 match getInteger(this, keyLeasedRatioDefault(assetId)) {
414414 case rd: Int =>
415415 $Tuple2(true, min([100, max([0, rd])]))
416416 case _ =>
417417 $Tuple2(false, 0)
418418 }
419419 }
420420 let isLeasable = $t01453014834._1
421421 let leasedRatio = $t01453014834._2
422422 let minBalance = match getInteger(this, keyMinBalance(poolAddress, assetId)) {
423423 case b: Int =>
424424 max([0, b])
425425 case _ =>
426426 match getInteger(this, keyMinBalanceDefault(assetId)) {
427427 case bd: Int =>
428428 max([0, bd])
429429 case _ =>
430430 0
431431 }
432432 }
433433 let $t01510015324 = if ((assetId == "WAVES"))
434434 then $Tuple3(valueOrElse(getString(this, keySWavesProxyAddress()), ""), getString(this, valueOrElse(keySWavesAssetId(), "")), MULT12)
435435 else $Tuple3("", "", 0)
436436 let proxyAddress = $t01510015324._1
437437 let proxyAssetId = $t01510015324._2
438438 let proxyRateMul = $t01510015324._3
439439 let stakingProfitAddress = valueOrElse(getString(this, keyStakingProfitAddress()), "")
440440 $Tuple2(nil, $Tuple7(isLeasable, leasedRatio, minBalance, proxyAddress, proxyAssetId, proxyRateMul, stakingProfitAddress))
441441 }
442442
443443
444444
445445 @Callable(i)
446446 func getLpAssetFromPoolAssetsREADONLY (asset1,asset2) = if (if ((asset1 == "8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS"))
447447 then (asset2 == "WAVES")
448448 else false)
449449 then $Tuple2(nil, unit)
450450 else {
451451 let assetNum1 = value(getInteger(this, keyMappingsBaseAsset2internalId(asset1)))
452452 let assetNum2 = value(getInteger(this, keyMappingsBaseAsset2internalId(asset2)))
453453 let ee = getString(this, keyMappingPoolAssetsToLpasset(toString(assetNum1), toString(assetNum2)))
454454 let res = if ((ee == unit))
455455 then unit
456456 else drop(value(ee), 4)
457457 $Tuple2(nil, res)
458458 }
459459
460460
461461
462462 @Callable(i)
463463 func getPoolAddressFromLpAssetREADONLY (lp) = $Tuple2(nil, valueOrElse(getString(this, keyMappingPoolLPAssetToPoolContractAddress(lp)), ""))
464464
465465
466466
467467 @Callable(i)
468468 func constructor (stakingContract,boostingContract,idoContract,teamContract,emissionContract,restContract,slpipageContract,priceDecimals) = {
469469 let checkCaller = mustManager(i)
470470 if ((checkCaller == checkCaller))
471471 then [StringEntry(keyFactoryConfig(), dataFactoryCfg(stakingContract, boostingContract, idoContract, teamContract, emissionContract, restContract, slpipageContract)), IntegerEntry(keyPriceDecimals(), priceDecimals)]
472472 else throw("Strict value is not equal to itself.")
473473 }
474474
475475
476476
477477 @Callable(i)
478478 func constructorV2 (mathcherPub58Str) = {
479479 let checkCaller = mustManager(i)
480480 if ((checkCaller == checkCaller))
481481 then {
482482 let mathcerPub = addressFromPublicKey(fromBase58String(mathcherPub58Str))
483483 if ((mathcerPub == mathcerPub))
484484 then [StringEntry(keyMatcherPub(), mathcherPub58Str)]
485485 else throw("Strict value is not equal to itself.")
486486 }
487487 else throw("Strict value is not equal to itself.")
488488 }
489489
490490
491491
492492 @Callable(i)
493493 func constructorV3 (daoContract,marketingContract,gwxRewardsContract,birdsContract) = {
494494 let checkCaller = mustManager(i)
495495 if ((checkCaller == checkCaller))
496496 then {
497497 let factoryCfg = split(getStringOrFail(keyFactoryConfig()), SEP)
498498 [StringEntry(keyFactoryConfig(), dataFactoryCfgV3(factoryCfg[1], factoryCfg[2], factoryCfg[3], factoryCfg[4], factoryCfg[5], factoryCfg[6], factoryCfg[7], daoContract, marketingContract, gwxRewardsContract, birdsContract))]
499499 }
500500 else throw("Strict value is not equal to itself.")
501501 }
502502
503503
504504
505505 @Callable(i)
506506 func constructorV4 (legacyFactoryContract,legacyPools) = {
507507 let checkCaller = mustManager(i)
508508 if ((checkCaller == checkCaller))
509509 then [StringEntry(keyLegacyFactoryContract(), legacyFactoryContract), StringEntry(keyLegacyPools(), makeString(legacyPools, SEP))]
510510 else throw("Strict value is not equal to itself.")
511511 }
512512
513513
514514
515515 @Callable(i)
516516 func constructorV5 (assetsStoreContract) = {
517517 let checkCaller = mustManager(i)
518518 if ((checkCaller == checkCaller))
519519 then [StringEntry(keyAssetsStoreContract(), assetsStoreContract)]
520520 else throw("Strict value is not equal to itself.")
521521 }
522522
523523
524524
525525 @Callable(i)
526526 func constructorV6 (votingEmissionContract,priceAssets) = {
527527 let cheks = [mustManager(i), if ((addressFromString(votingEmissionContract) != unit))
528528 then true
529529 else "invalid voting emission contract address"]
530530 if ((cheks == cheks))
531531 then [StringEntry(keyVotingEmissionContract(), votingEmissionContract), StringEntry(keyPriceAssets(), makeString(priceAssets, SEP))]
532532 else throw("Strict value is not equal to itself.")
533533 }
534534
535535
536536
537537 @Callable(i)
538538 func setAdmins (adminPubKeys) = {
539539 let checkCaller = mustManager(i)
540540 if ((checkCaller == checkCaller))
541541 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
542542 else throw("Strict value is not equal to itself.")
543543 }
544544
545545
546546
547547 @Callable(i)
548548 func activateNewPool (poolAddress,amountAssetStr,priceAssetStr,lpAssetName,lpAssetDescr,poolWeight,poolType,logo) = {
549549 let checkCaller = mustAdmin(i)
550550 if ((checkCaller == checkCaller))
551551 then if (isDefined(getString(keyMappingPoolContractAddressToPoolAssets(poolAddress))))
552552 then throwErr((("Pool address " + poolAddress) + " already registered."))
553553 else {
554554 let internalAmountAssetData = getInternalAssetIdOrCreate(amountAssetStr, 1)
555555 let internalAmountAssetId = internalAmountAssetData._1
556556 let internalPriceAssetData = getInternalAssetIdOrCreate(priceAssetStr, if (internalAmountAssetData._3)
557557 then 2
558558 else 1)
559559 let internalPriceAssetId = internalPriceAssetData._1
560560 let poolAccountScriptHash = valueOrErrorMessage(scriptHash(addressFromStringValue(poolAddress)), ("No script has been found on pool account " + poolAddress))
561561 let ethalonPoolAccountScriptHash = getBinaryValue(keyPoolScriptHash())
562562 let poolExists = poolExistsInternal(amountAssetStr, priceAssetStr)
563563 if (poolExists)
564564 then throwErr((((("Pool " + amountAssetStr) + "/") + priceAssetStr) + " has already been activated."))
565565 else {
566566 let poolConfigValue = value(getString(this, keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId))))
567567 let amountAssetsDecimals = if ((amountAssetStr == "WAVES"))
568568 then decimalsMultPrice
569569 else pow(10, 0, value(assetInfo(fromBase58String(amountAssetStr))).decimals, 0, 0, DOWN)
570570 let priceAssetsDecimals = if ((priceAssetStr == "WAVES"))
571571 then decimalsMultPrice
572572 else pow(10, 0, value(assetInfo(fromBase58String(priceAssetStr))).decimals, 0, 0, DOWN)
573573 let lpAssetIssueAction = Issue(lpAssetName, lpAssetDescr, 1, 8, true)
574574 let lpAssetId = calculateAssetId(lpAssetIssueAction)
575575 let lpAssetIdStr = toBase58String(lpAssetId)
576576 let poolActivateInvokeResult = invoke(addressFromStringValue(poolAddress), "activate", [amountAssetStr, priceAssetStr], nil)
577577 if ((poolActivateInvokeResult == poolActivateInvokeResult))
578578 then if ((poolActivateInvokeResult != "success"))
579579 then throwErr("Pool initialisation error happened.")
580580 else {
581581 let assetsStoreContract = addressFromStringValue(getStringOrFail(keyAssetsStoreContract()))
582582 let createOrUpdateLpAssetInv = invoke(assetsStoreContract, "createOrUpdate", [lpAssetIdStr, lpAssetName, false], nil)
583583 if ((createOrUpdateLpAssetInv == createOrUpdateLpAssetInv))
584584 then {
585585 let addPoolsLpLabelInv = invoke(assetsStoreContract, "addLabel", [lpAssetIdStr, labelPoolsLp], nil)
586586 if ((addPoolsLpLabelInv == addPoolsLpLabelInv))
587587 then {
588588 let setLogoInv = invoke(assetsStoreContract, "setLogo", [lpAssetIdStr, logo], nil)
589589 if ((setLogoInv == setLogoInv))
590590 then {
591591 let addAssetsLinkInv = invoke(assetsStoreContract, "addAssetsLink", [amountAssetStr, priceAssetStr, lpAssetIdStr], nil)
592592 if ((addAssetsLinkInv == addAssetsLinkInv))
593593 then {
594594 let increaseAssetPoolsNumberInv = invoke(assetsStoreContract, "increaseAssetPoolsNumber", [amountAssetStr], nil)
595595 if ((increaseAssetPoolsNumberInv == increaseAssetPoolsNumberInv))
596596 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)
597597 else throw("Strict value is not equal to itself.")
598598 }
599599 else throw("Strict value is not equal to itself.")
600600 }
601601 else throw("Strict value is not equal to itself.")
602602 }
603603 else throw("Strict value is not equal to itself.")
604604 }
605605 else throw("Strict value is not equal to itself.")
606606 }
607607 else throw("Strict value is not equal to itself.")
608608 }
609609 }
610610 else throw("Strict value is not equal to itself.")
611611 }
612612
613613
614614
615615 @Callable(i)
616616 func managePool (poolAddress,newStatus) = {
617617 let checkCaller = mustManager(i)
618618 if ((checkCaller == checkCaller))
619619 then {
620620 let poolConfig = getPoolConfig(poolAddress)
621621 let poolStatus = poolConfig[idxPoolStatus]
622622 let lpAssetIdStr = poolConfig[idxPoolLPAssetId]
623623 let amountAssetStr = poolConfig[idxAmtAssetId]
624624 let priceAssetStr = poolConfig[idxPriceAssetId]
625625 let amountAssetsDecimals = parseIntValue(poolConfig[idxAmtAssetDcm])
626626 let priceAssetsDecimals = parseIntValue(poolConfig[idxPriceAssetDcm])
627627 let internalAmountAssetId = parseIntValue(poolConfig[idxIAmtAssetId])
628628 let internalPriceAssetId = parseIntValue(poolConfig[idxIPriceAssetId])
629629 let lpAssetDcm = parseIntValue(poolConfig[idxLPAssetDcm])
630630 let poolType = poolConfig[idxPoolType]
631631 [StringEntry(keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId)), dataPoolCfg(poolAddress, toString(newStatus), lpAssetIdStr, amountAssetStr, priceAssetStr, amountAssetsDecimals, priceAssetsDecimals, internalAmountAssetId, internalPriceAssetId, lpAssetDcm, poolType))]
632632 }
633633 else throw("Strict value is not equal to itself.")
634634 }
635635
636636
637637
638638 @Callable(i)
639639 func emit (amountToEmit) = {
640640 let caller = i.caller
641641 let originCaller = i.originCaller
642642 let lpAssetRequested = valueOrErrorMessage(getString(keyMappingPoolContractToLPAsset(toString(caller))), "Invalid LP address called me.")
643643 let lpAsset = fromBase58String(lpAssetRequested)
644644 let legacyPools = split(valueOrElse(getString(keyLegacyPools()), EMPTY), SEP)
645645 let legacyFactoryContract = addressFromStringValue(valueOrErrorMessage(getString(keyLegacyFactoryContract()), "Legacy factory contract does not exists."))
646646 if ((0 >= amountToEmit))
647647 then nil
648648 else if (containsElement(legacyPools, toString(caller)))
649649 then $Tuple2(nil, legacyFactoryContract)
650650 else $Tuple2([Reissue(lpAsset, amountToEmit, true), ScriptTransfer(i.caller, amountToEmit, lpAsset)], "success")
651651 }
652652
653653
654654
655655 @Callable(i)
656656 func burn (amountToBurn) = {
657657 let caller = i.caller
658658 let originCaller = i.originCaller
659659 let payment = value(i.payments[0])
660660 let paymentAmount = value(payment.amount)
661661 let inAmountAssetId = toBase58String(value(payment.assetId))
662662 let lpAssetRequestedForBurning = valueOrErrorMessage(getString(keyMappingPoolContractToLPAsset(toString(caller))), "Invalid LP address called me.")
663663 if ((inAmountAssetId != lpAssetRequestedForBurning))
664664 then throwErr("Invalid asset passed.")
665665 else if ((amountToBurn != paymentAmount))
666666 then throwErr("Invalid amount passed.")
667667 else {
668668 let lpAsset = fromBase58String(lpAssetRequestedForBurning)
669669 $Tuple2([Burn(lpAsset, amountToBurn)], "success")
670670 }
671671 }
672672
673673
674674
675675 @Callable(i)
676676 func modifyWeight (lpAssetId,share) = {
677677 let checkCaller = if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionContract()), "")))
678678 then true
679679 else mustManager(i)
680680 if ((checkCaller == checkCaller))
681681 then {
682682 let poolContractAddress = getStringOrFail(keyMappingPoolLPAssetToPoolContractAddress(lpAssetId))
683683 let poolWeightKey = keyPoolToWeight(poolContractAddress)
684684 let gwxWeightKey = keyPoolToWeight(GWXvirtualPOOL)
685685 let gwxWeight = valueOrElse(getInteger(gwxWeightKey), 0)
686686 let poolWeight = valueOrElse(getInteger(poolWeightKey), 0)
687687 let poolWeightNew = share
688688 let factoryCfg = split(getStringOrFail(keyFactoryConfig()), SEP)
689689 let stakingContract = getStakingAddressOrFail(factoryCfg)
690690 let onModifyWeightInv = invoke(stakingContract, "onModifyWeight", [lpAssetId, poolContractAddress], nil)
691691 if ((onModifyWeightInv == onModifyWeightInv))
692692 then {
693693 let gwxVirtualPoolActions = if ((gwxWeight == 0))
694694 then nil
695695 else [IntegerEntry(gwxWeightKey, 0)]
696696 let poolWeightHistoryKey = keyPoolToWeightHistory(poolContractAddress, 0)
697697 let poolWeightHistoryOrUnit = getInteger(poolWeightHistoryKey)
698698 let poolWeightHistoryActions = if ((poolWeightHistoryOrUnit == unit))
699699 then nil
700700 else [DeleteEntry(poolWeightHistoryKey)]
701701 (([IntegerEntry(poolWeightKey, poolWeightNew)] ++ gwxVirtualPoolActions) ++ poolWeightHistoryActions)
702702 }
703703 else throw("Strict value is not equal to itself.")
704704 }
705705 else throw("Strict value is not equal to itself.")
706706 }
707707
708708
709709
710710 @Callable(i)
711711 func modifyWeights (btcPoolAddress,ethPoolAddress,ethBtcPoolAddress,usdcUsdtPoolAddress) = {
712712 let checkCaller = mustManager(i)
713713 if ((checkCaller == checkCaller))
714714 then {
715715 let ethBtcWeightNew = ((5 * POOLWEIGHTMULT) / 100)
716716 let usdcUsdtWeightNew = ((5 * POOLWEIGHTMULT) / 100)
717717 let weightDecrement = ((5 * POOLWEIGHTMULT) / 100)
718718 let factoryCfg = split(getStringOrFail(keyFactoryConfig()), SEP)
719719 let stakingDapp = getStakingAddressOrFail(factoryCfg)
720720 let gwxRewardDapp = getGwxRewardAddressOrFail(factoryCfg)
721721 let btcWeightKEY = keyPoolToWeight(btcPoolAddress)
722722 let ethWeightKEY = keyPoolToWeight(ethPoolAddress)
723723 let ethBtcWeightKEY = keyPoolToWeight(ethBtcPoolAddress)
724724 let usdcUsdtWeightKEY = keyPoolToWeight(usdcUsdtPoolAddress)
725725 let btcWeight = getIntOrFail(btcWeightKEY)
726726 let ethWeight = getIntOrFail(ethWeightKEY)
727727 let btcWeightNew = (btcWeight - weightDecrement)
728728 let ethWeightNew = (ethWeight - weightDecrement)
729729 if ((0 >= btcWeightNew))
730730 then throwErr(("invalid btcWeightNew: " + toString(btcWeightNew)))
731731 else if ((0 >= ethWeightNew))
732732 then throwErr(("invalid ethWeightNew: " + toString(ethWeightNew)))
733733 else {
734734 let btcLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(btcPoolAddress))
735735 let ethLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(ethPoolAddress))
736736 let ethBtcLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(ethBtcPoolAddress))
737737 let usdcUsdtLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(usdcUsdtPoolAddress))
738738 let onModifyWeightBtc = invoke(stakingDapp, "onModifyWeight", [btcLpAssetIdStr, btcPoolAddress], nil)
739739 if ((onModifyWeightBtc == onModifyWeightBtc))
740740 then {
741741 let onModifyWeightEth = invoke(stakingDapp, "onModifyWeight", [ethLpAssetIdStr, ethPoolAddress], nil)
742742 if ((onModifyWeightEth == onModifyWeightEth))
743743 then {
744744 let onModifyWeightEthBtc = invoke(stakingDapp, "onModifyWeight", [ethBtcLpAssetIdStr, ethBtcPoolAddress], nil)
745745 if ((onModifyWeightEthBtc == onModifyWeightEthBtc))
746746 then {
747747 let onModifyWeightUsdcUsdt = invoke(stakingDapp, "onModifyWeight", [usdcUsdtLpAssetIdStr, usdcUsdtPoolAddress], nil)
748748 if ((onModifyWeightUsdcUsdt == onModifyWeightUsdcUsdt))
749749 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)]
750750 else throw("Strict value is not equal to itself.")
751751 }
752752 else throw("Strict value is not equal to itself.")
753753 }
754754 else throw("Strict value is not equal to itself.")
755755 }
756756 else throw("Strict value is not equal to itself.")
757757 }
758758 }
759759 else throw("Strict value is not equal to itself.")
760760 }
761761
762762
763763
764764 @Callable(i)
765765 func checkWxEmissionPoolLabel (amountAssetId,priceAssetId) = {
766766 let haveLabel = match getBoolean(keyWxEmission(amountAssetId, priceAssetId)) {
767767 case b: Boolean =>
768768 b
769769 case _ =>
770770 false
771771 }
772772 $Tuple2(nil, haveLabel)
773773 }
774774
775775
776776
777777 @Callable(i)
778778 func setWxEmissionPoolLabel (amountAssetId,priceAssetId) = {
779779 let checkCaller = mustAdmin(i)
780780 if ((checkCaller == checkCaller))
781781 then $Tuple2([BooleanEntry(keyWxEmission(amountAssetId, priceAssetId), true)], unit)
782782 else throw("Strict value is not equal to itself.")
783783 }
784784
785785
786786
787787 @Callable(i)
788788 func deleteWxEmissionPoolLabel (amountAssetId,priceAssetId) = {
789789 let checkCaller = if ((i.caller == this))
790790 then true
791791 else mustAdmin(i)
792792 if ((checkCaller == checkCaller))
793793 then $Tuple2([DeleteEntry(keyWxEmission(amountAssetId, priceAssetId))], unit)
794794 else throw("Strict value is not equal to itself.")
795795 }
796796
797797
798798
799799 @Callable(i)
800800 func onVerificationLoss (assetId) = {
801801 let checkCaller = if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyAssetsStoreContract()), "")))
802802 then true
803803 else mustManager(i)
804804 if ((checkCaller == checkCaller))
805805 then {
806806 let priceAssets = getPriceAssets()
807807 let checkPriceAssetsSize = if ((size(priceAssets) > 0))
808808 then true
809809 else throwErr("invalid price assets")
810810 if ((checkPriceAssetsSize == checkPriceAssetsSize))
811811 then {
812812 func cb (acc,priceAsset) = {
813813 let r = invoke(this, "deleteWxEmissionPoolLabel", [assetId, priceAsset], nil)
814814 if ((r == r))
815815 then unit
816816 else throw("Strict value is not equal to itself.")
817817 }
818818
819819 let actions = {
820820 let $l = priceAssets
821821 let $s = size($l)
822822 let $acc0 = unit
823823 func $f0_1 ($a,$i) = if (($i >= $s))
824824 then $a
825825 else cb($a, $l[$i])
826826
827827 func $f0_2 ($a,$i) = if (($i >= $s))
828828 then $a
829829 else throw("List size exceeds 11")
830830
831831 $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)
832832 }
833833 if ((actions == actions))
834834 then $Tuple2(nil, unit)
835835 else throw("Strict value is not equal to itself.")
836836 }
837837 else throw("Strict value is not equal to itself.")
838838 }
839839 else throw("Strict value is not equal to itself.")
840840 }
841841
842842
843843
844844 @Callable(i)
845845 func isPoolOneTokenOperationsDisabledREADONLY (poolAddress) = {
846846 let poolConfig = getPoolConfig(poolAddress)
847847 let assetsInternal = $Tuple2(parseIntValue(poolConfig[idxIAmtAssetId]), parseIntValue(poolConfig[idxIPriceAssetId]))
848848 let poolOneTokenOperationsDisabled = valueOrElse(getBoolean(keyPoolOneTokenOperationsDisabled(assetsInternal)), false)
849849 let allPoolsOneTokenOperationsDisabled = valueOrElse(getBoolean(keyAllPoolsOneTokenOperationsDisabled()), false)
850850 $Tuple2(nil, if (allPoolsOneTokenOperationsDisabled)
851851 then true
852852 else poolOneTokenOperationsDisabled)
853853 }
854854
855855
856856
857857 @Callable(i)
858858 func getInFeeREADONLY (poolAddress) = {
859859 let fee = intOrDefaultOrFallback(keyInFee(poolAddress), keyInFeeDefault(), 0)
860860 $Tuple2(nil, fee)
861861 }
862862
863863
864864
865865 @Callable(i)
866866 func getOutFeeREADONLY (poolAddress) = {
867867 let fee = intOrDefaultOrFallback(keyOutFee(poolAddress), keyOutFeeDefault(), fraction(10, MULT8, 10000))
868868 $Tuple2(nil, fee)
869869 }
870870
871871
872872
873873 @Callable(i)
874874 func poolInfoREADONLY (amountAssetIdStr,priceAssetIdStr) = {
875875 let amountAssetInternalIdOption = getInteger(this, keyMappingsBaseAsset2internalId(amountAssetIdStr))
876876 let priceAssetInternalIdOption = getInteger(this, keyMappingsBaseAsset2internalId(priceAssetIdStr))
877877 let poolContractAddressOption = getString(this, keyMappingPoolAssetsToPoolContractAddress(value(amountAssetInternalIdOption), value(priceAssetInternalIdOption)))
878878 let lpAssetIdOption = getString(this, keyMappingPoolContractToLPAsset(value(poolContractAddressOption)))
879879 let poolExists = if (if (isDefined(amountAssetInternalIdOption))
880880 then isDefined(priceAssetInternalIdOption)
881881 else false)
882882 then isDefined(poolContractAddressOption)
883883 else false
884884 let poolInfo = if (poolExists)
885885 then $Tuple2(addressFromStringValue(value(poolContractAddressOption)), parseAssetId(value(lpAssetIdOption)))
886886 else unit
887887 $Tuple2(nil, poolInfo)
888888 }
889889
890890
891891
892892 @Callable(i)
893893 func getPoolStatusREADONLY (poolAddress) = {
894894 let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolAddress)), SEP)
895895 let amountAssetInternal = poolAssets[1]
896896 let priceAssetInternal = poolAssets[2]
897897 let cfg = split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP)
898898 $Tuple2(nil, parseIntValue(cfg[idxPoolStatus]))
899899 }
900900
901901
902902
903903 @Callable(i)
904904 func getPoolConfigREADONLY (poolAddress) = {
905905 let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolAddress)), SEP)
906906 let amountAssetInternal = poolAssets[1]
907907 let priceAssetInternal = poolAssets[2]
908908 let cfg = split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP)
909909 $Tuple2(nil, cfg)
910910 }
911911
912912
913913
914914 @Callable(i)
915915 func getPoolConfigByLpAssetIdREADONLY (lpAssetIdStr) = {
916916 let poolAssets = split(getStringOrFail(keyMappingLpAssetToPoolAssets(lpAssetIdStr)), SEP)
917917 let amountAssetInternal = poolAssets[1]
918918 let priceAssetInternal = poolAssets[2]
919919 let cfg = split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP)
920920 $Tuple2(nil, cfg)
921921 }
922922
923923
924924
925925 @Callable(i)
926926 func poolExistsREADONLY (amountAssetId,priceAssetId) = $Tuple2(nil, poolExistsInternal(amountAssetId, priceAssetId))
927927
928928
929929
930930 @Callable(i)
931931 func skipOrderValidationREADONLY (poolAddress) = $Tuple2(nil, valueOrElse(getBoolean(keySkipOrderValidation(poolAddress)), false))
932932
933933
934934
935935 @Callable(i)
936936 func getChangeAmpConfigREADONLY (poolAddress) = {
937937 let delay = getIntegerValue(keyChangeAmpDelay(poolAddress))
938938 let delta = getIntegerValue(keyChangeAmpDelta(poolAddress))
939939 let target = getIntegerValue(keyChangeAmpTarget(poolAddress))
940940 $Tuple2(nil, [delay, delta, target])
941941 }
942942
943943
944944
945945 @Callable(i)
946946 func getPoolWeightREADONLY (lpAssetId) = {
947947 let poolAddress = getStringOrFail(keyMappingPoolLPAssetToPoolContractAddress(lpAssetId))
948948 let weight = valueOrElse(getInteger(keyPoolToWeight(poolAddress)), 0)
949949 $Tuple2(nil, weight)
950950 }
951951
952952
953953
954954 @Callable(i)
955955 func deletePool (poolContractAddress) = {
956956 let checkCaller = if (mustManager(i))
957957 then true
958958 else permissionDeniedError
959959 if ((checkCaller == checkCaller))
960960 then {
961- let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolContractAddress)), SEP)
962- let amountAssetInternal = parseIntValue(poolAssets[1])
963- let priceAssetInternal = parseIntValue(poolAssets[2])
964- let amountAssetId = getStringValue(keyMappingsInternal2baseAssetId(amountAssetInternal))
965- let priceAssetId = getStringValue(keyMappingsInternal2baseAssetId(priceAssetInternal))
966- let lpAssetId = getStringOrFail(keyMappingPoolContractToLPAsset(poolContractAddress))
967- let userPoolsContract = addressFromStringValue(getStringValue(keyUserPoolsContract()))
968- let userPoolsInvoke = invoke(userPoolsContract, "deletePool", [amountAssetId, priceAssetId], nil)
969- if ((userPoolsInvoke == userPoolsInvoke))
961+ let checkWeight = if ((valueOrElse(getInteger(keyPoolToWeight(poolContractAddress)), 0) == 0))
962+ then true
963+ else throwErr("Pool weight is not Zero")
964+ if ((checkWeight == checkWeight))
970965 then {
971- let votingEmissionContract = addressFromStringValue(getStringValue(keyVotingEmissionContract()))
972- let votingEmissionInvoke = invoke(votingEmissionContract, "deletePool", [amountAssetId, priceAssetId], nil)
973- if ((votingEmissionInvoke == votingEmissionInvoke))
974- 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))]
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))
972+ let userPoolsContract = addressFromStringValue(getStringValue(keyUserPoolsContract()))
973+ let userPoolsInvoke = invoke(userPoolsContract, "deletePool", [amountAssetId, priceAssetId], nil)
974+ if ((userPoolsInvoke == userPoolsInvoke))
975+ then {
976+ let votingEmissionContract = addressFromStringValue(getStringValue(keyVotingEmissionContract()))
977+ let votingEmissionInvoke = invoke(votingEmissionContract, "deletePool", [amountAssetId, priceAssetId], nil)
978+ if ((votingEmissionInvoke == votingEmissionInvoke))
979+ then {
980+ let assetsStoreContract = addressFromStringValue(getStringValue(keyAssetsStoreContract()))
981+ let assetsStoreInvoke = invoke(assetsStoreContract, "deletePool", [amountAssetId, priceAssetId], nil)
982+ if ((assetsStoreInvoke == assetsStoreInvoke))
983+ 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))]
984+ else throw("Strict value is not equal to itself.")
985+ }
986+ else throw("Strict value is not equal to itself.")
987+ }
975988 else throw("Strict value is not equal to itself.")
976989 }
977990 else throw("Strict value is not equal to itself.")
978991 }
979992 else throw("Strict value is not equal to itself.")
980993 }
981994
982995
983996 @Verifier(tx)
984997 func verify () = {
985998 let targetPublicKey = match managerPublicKeyOrUnit() {
986999 case pk: ByteVector =>
9871000 pk
9881001 case _: Unit =>
9891002 tx.senderPublicKey
9901003 case _ =>
9911004 throw("Match error")
9921005 }
9931006 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
9941007 }
9951008

github/deemru/w8io/fabc49c 
96.85 ms