tx · 9jiCiTPCb6XA7GDduEtBDC5qmpYJDhsZBfADeFkdnDBW

3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai:  -0.03100000 Waves

2023.12.26 15:48 [2903734] smart account 3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai > SELF 0.00000000 Waves

{ "type": 13, "id": "9jiCiTPCb6XA7GDduEtBDC5qmpYJDhsZBfADeFkdnDBW", "fee": 3100000, "feeAssetId": null, "timestamp": 1703594921500, "version": 2, "chainId": 84, "sender": "3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai", "senderPublicKey": "2JEaBjtjvMoNGKZmL9QxYefa1VkMJM3vMW8rNvTs9R2H", "proofs": [ "MG71gh9VveVvmYANuNa8RC2e6Pg5ZmeRZscTGVEY5AP2o7QsReBCf5CjsHbkpYHQ4agqRgFwgGBSRfeEwXEA3bJ" ], "script": "base64:BgLuMQgCEgASBAoCCAgSBAoCCAgSAwoBCBIKCggICAgICAgIARIDCgEIEgYKBAgICAgSBAoCCBgSAwoBCBIECgIIGBIDCgEYEgoKCAgICAgIAQgIEgQKAggBEgMKAQESAwoBARIECgIIARIGCgQICAgIEgQKAggIEgQKAggIEgQKAggIEgMKAQgSAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEgQKAggIEgMKAQgSAwoBCBIDCgEIEgQKAggIEgMKAQgSAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIIgZTQ0FMRTgiBU1VTFQ4IgZNVUxUMTIiB1NDQUxFMTgiBk1VTFQxOCIOUE9PTFdFSUdIVE1VTFQiDkdXWHZpcnR1YWxQT09MIgxsYWJlbFBvb2xzTHAiDWRlZmF1bHRTcHJlYWQiC3dhdmVzU3RyaW5nIhBjb250cmFjdEZpbGVuYW1lIhFkZWNpbWFsc011bHRQcmljZSIDU0VQIgVFTVBUWSIKUG9vbEFjdGl2ZSIPUG9vbFB1dERpc2FibGVkIhNQb29sTWF0Y2hlckRpc2FibGVkIgxQb29sU2h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NuaWwFAmdjAQJnZAECZ2UABAJnZgQCYm4JAQJiTQADCQABAgUCYm4CCkJ5dGVWZWN0b3IEAmJUBQJibgUCYlQDCQABAgUCYm4CBFVuaXQIBQJnZA9zZW5kZXJQdWJsaWNLZXkJAAIBAgtNYXRjaCBlcnJvcgkA9AMDCAUCZ2QJYm9keUJ5dGVzCQCRAwIIBQJnZAZwcm9vZnMAAAUCZ2YJ4F1K", "height": 2903734, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7DBVuw4UfF3pgGQCZK2ARjoddUJfDZwXsaBcMqYbVSfj Next: 35rUGfn1R78jjc21XERgUQDh6soDDA6moYL7bZJdJZ6J Diff:
OldNewDifferences
206206
207207
208208 func keyOutFeeDefault () = "%s__outFeeDefault"
209+
210+
211+func keyPoolAssetDefaultMinAmount () = makeString(["%s", "poolAssetDefaultMinAmount"], SEP)
212+
213+
214+func keyPoolAssetsMinAmount (assetId) = makeString(["%s%s", "poolAssetMinAmount", assetId], SEP)
209215
210216
211217 func keySkipOrderValidation (poolAddress) = ("%s%s__skipOrderValidation__" + poolAddress)
439445
440446
441447 func getPoolCreator (poolContractAddress) = {
442- let $t01590916046 = getAssetsDataFromPoolAddress(poolContractAddress)
443- let amountAssetId = $t01590916046._1
444- let priceAssetId = $t01590916046._2
445- let lpAssetId = $t01590916046._3
446- let amountAssetInternal = $t01590916046._4
447- let priceAssetInternal = $t01590916046._5
448+ let $t01610316240 = getAssetsDataFromPoolAddress(poolContractAddress)
449+ let amountAssetId = $t01610316240._1
450+ let priceAssetId = $t01610316240._2
451+ let lpAssetId = $t01610316240._3
452+ let amountAssetInternal = $t01610316240._4
453+ let priceAssetInternal = $t01610316240._5
448454 let userPoolsContract = addressFromStringValue(getStringValue(keyUserPoolsContract()))
449455 let poolCreator = invoke(userPoolsContract, "getPoolCreatorREADONLY", [amountAssetId, priceAssetId], nil)
450456 poolCreator
463469
464470
465471 func isPoolEmpty (poolContractAddress) = {
466- let $t01662116758 = getAssetsDataFromPoolAddress(poolContractAddress)
467- let amountAssetId = $t01662116758._1
468- let priceAssetId = $t01662116758._2
469- let lpAssetId = $t01662116758._3
470- let amountAssetInternal = $t01662116758._4
471- let priceAssetInternal = $t01662116758._5
472+ let $t01681516952 = getAssetsDataFromPoolAddress(poolContractAddress)
473+ let amountAssetId = $t01681516952._1
474+ let priceAssetId = $t01681516952._2
475+ let lpAssetId = $t01681516952._3
476+ let amountAssetInternal = $t01681516952._4
477+ let priceAssetInternal = $t01681516952._5
472478 if ((getAddressBalance(poolContractAddress, amountAssetId) == 0))
473479 then (getAddressBalance(poolContractAddress, priceAssetId) == 0)
474480 else false
482488
483489 @Callable(i)
484490 func getPoolLeaseConfigREADONLY (poolAddress,assetId) = {
485- let $t01707317377 = match getInteger(this, keyLeasedRatio(poolAddress, assetId)) {
491+ let $t01726717571 = match getInteger(this, keyLeasedRatio(poolAddress, assetId)) {
486492 case r: Int =>
487493 $Tuple2(true, min([100, max([0, r])]))
488494 case _ =>
493499 $Tuple2(false, 0)
494500 }
495501 }
496- let isLeasable = $t01707317377._1
497- let leasedRatio = $t01707317377._2
502+ let isLeasable = $t01726717571._1
503+ let leasedRatio = $t01726717571._2
498504 let minBalance = match getInteger(this, keyMinBalance(poolAddress, assetId)) {
499505 case b: Int =>
500506 max([0, b])
506512 0
507513 }
508514 }
509- let $t01764317867 = if ((assetId == "WAVES"))
515+ let $t01783718061 = if ((assetId == "WAVES"))
510516 then $Tuple3(valueOrElse(getString(this, keySWavesProxyAddress()), ""), getString(this, valueOrElse(keySWavesAssetId(), "")), MULT12)
511517 else $Tuple3("", "", 0)
512- let proxyAddress = $t01764317867._1
513- let proxyAssetId = $t01764317867._2
514- let proxyRateMul = $t01764317867._3
518+ let proxyAddress = $t01783718061._1
519+ let proxyAssetId = $t01783718061._2
520+ let proxyRateMul = $t01783718061._3
515521 let stakingProfitAddress = valueOrElse(getString(this, keyStakingProfitAddress()), "")
516522 $Tuple2(nil, $Tuple7(isLeasable, leasedRatio, minBalance, proxyAddress, proxyAssetId, proxyRateMul, stakingProfitAddress))
517523 }
10781084 else throwErr("Pool must be SHUTDOWN (4)")
10791085 if ((checkStatus == checkStatus))
10801086 then {
1081- let $t04072240859 = getAssetsDataFromPoolAddress(poolContractAddress)
1082- let amountAssetId = $t04072240859._1
1083- let priceAssetId = $t04072240859._2
1084- let lpAssetId = $t04072240859._3
1085- let amountAssetInternal = $t04072240859._4
1086- let priceAssetInternal = $t04072240859._5
1087+ let $t04091641053 = getAssetsDataFromPoolAddress(poolContractAddress)
1088+ let amountAssetId = $t04091641053._1
1089+ let priceAssetId = $t04091641053._2
1090+ let lpAssetId = $t04091641053._3
1091+ let amountAssetInternal = $t04091641053._4
1092+ let priceAssetInternal = $t04091641053._5
10871093 let userPoolsContract = addressFromStringValue(getStringValue(keyUserPoolsContract()))
10881094 let userPoolsInvoke = invoke(userPoolsContract, "deletePool", [amountAssetId, priceAssetId], nil)
10891095 if ((userPoolsInvoke == userPoolsInvoke))
11481154 }
11491155
11501156
1157+
1158+@Callable(i)
1159+func checkBalance (lpAssetIdStr) = {
1160+ let poolAddressStr = getStringOrFail(keyMappingPoolLPAssetToPoolContractAddress(lpAssetIdStr))
1161+ let poolAddress = addressFromStringValue(poolAddressStr)
1162+ let cfg = getPoolConfig(poolAddressStr)
1163+ let amountAssetIdStr = cfg[idxAmtAssetId]
1164+ let priceAssetIdStr = cfg[idxPriceAssetId]
1165+ let assetMinAmountDefault = getIntegerValue(this, keyPoolAssetDefaultMinAmount())
1166+ let amountAssetMinAmount = valueOrElse(getInteger(this, keyPoolAssetsMinAmount(amountAssetIdStr)), assetMinAmountDefault)
1167+ let priceAssetMinAmount = valueOrElse(getInteger(this, keyPoolAssetsMinAmount(priceAssetIdStr)), assetMinAmountDefault)
1168+ let amountAssetBalance = {
1169+ let @ = invoke(poolAddress, "getAccBalanceWrapperREADONLY", [amountAssetIdStr], nil)
1170+ if ($isInstanceOf(@, "Int"))
1171+ then @
1172+ else throw(($getType(@) + " couldn't be cast to Int"))
1173+ }
1174+ let priceAssetBalance = {
1175+ let @ = invoke(poolAddress, "getAccBalanceWrapperREADONLY", [priceAssetIdStr], nil)
1176+ if ($isInstanceOf(@, "Int"))
1177+ then @
1178+ else throw(($getType(@) + " couldn't be cast to Int"))
1179+ }
1180+ let amountAssetBalanceIsOk = (amountAssetBalance >= (amountAssetMinAmount / 2))
1181+ let priceAssetBalanceIsOk = (priceAssetBalance >= (priceAssetMinAmount / 2))
1182+ let balanceIsOk = if (amountAssetBalanceIsOk)
1183+ then priceAssetBalanceIsOk
1184+ else false
1185+ $Tuple2(nil, balanceIsOk)
1186+ }
1187+
1188+
11511189 @Verifier(tx)
11521190 func verify () = {
11531191 let targetPublicKey = match managerPublicKeyOrUnit() {
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SCALE8 = 8
55
66 let MULT8 = 100000000
77
88 let MULT12 = 1000000000000
99
1010 let SCALE18 = 18
1111
1212 let MULT18 = toBigInt(1000000000000000000)
1313
1414 let POOLWEIGHTMULT = MULT8
1515
1616 let GWXvirtualPOOL = "GWXvirtualPOOL"
1717
1818 let labelPoolsLp = "POOLS_LP"
1919
2020 let defaultSpread = 2000000
2121
2222 let wavesString = "WAVES"
2323
2424 let contractFilename = "factory_v2.ride"
2525
2626 let decimalsMultPrice = ((100 * 1000) * 1000)
2727
2828 let SEP = "__"
2929
3030 let EMPTY = ""
3131
3232 let PoolActive = 1
3333
3434 let PoolPutDisabled = 2
3535
3636 let PoolMatcherDisabled = 3
3737
3838 let PoolShutdown = 4
3939
4040 let idxInternalAssetId = 1
4141
4242 let idxResutActions = 2
4343
4444 let idxIfAssetIdCalculationPerformed = 3
4545
4646 let idxPoolAddress = 1
4747
4848 let idxPoolStatus = 2
4949
5050 let idxPoolLPAssetId = 3
5151
5252 let idxAmtAssetId = 4
5353
5454 let idxPriceAssetId = 5
5555
5656 let idxAmtAssetDcm = 6
5757
5858 let idxPriceAssetDcm = 7
5959
6060 let idxIAmtAssetId = 8
6161
6262 let idxIPriceAssetId = 9
6363
6464 let idxLPAssetDcm = 10
6565
6666 let idxPoolType = 11
6767
6868 let poolLabelWxEmission = "WX_EMISSION"
6969
7070 let validPoolLabels = [poolLabelWxEmission]
7171
7272 func wrapErr (msg) = makeString([contractFilename, ": ", msg], "")
7373
7474
7575 func throwErr (msg) = throw(wrapErr(msg))
7676
7777
7878 func keyAllowedLpScriptHash () = "%s__allowedLpScriptHash"
7979
8080
8181 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
8282
8383
8484 func swapContract () = "%s__swapContract"
8585
8686
8787 func keyFactoryConfig () = "%s__factoryConfig"
8888
8989
9090 func keyLpTokensList () = "%s__lpTokensList"
9191
9292
9393 func keyPoolScriptHash () = "%s%s__pool__scriptHash"
9494
9595
9696 func keyMatcherPub () = "%s%s__matcher__publicKey"
9797
9898
9999 func keyLegacyFactoryContract () = "%s__legacyFactoryContract"
100100
101101
102102 func keyLegacyPools () = "%s__legacyPools"
103103
104104
105105 func keyManagerPublicKey () = "%s__managerPublicKey"
106106
107107
108108 func keyManagerVaultAddress () = "%s__managerVaultAddress"
109109
110110
111111 func keyAdminPubKeys () = "%s__adminPubKeys"
112112
113113
114114 func keyAssetsStoreContract () = "%s__assetsStoreContract"
115115
116116
117117 func keyVotingEmissionContract () = "%s__votingEmissionContract"
118118
119119
120120 func keyUserPoolsContract () = "%s__userPoolsContract"
121121
122122
123123 func keyPriceAssets () = makeString(["%s", "priceAssets"], SEP)
124124
125125
126126 func keyPriceDecimals () = "%s__priceDecimals"
127127
128128
129129 func keyAllPoolsShutdown () = "%s__shutdown"
130130
131131
132132 func keyNextInternalAssetId () = "%s__nextInternalAssetId"
133133
134134
135135 func keyPoolToWeight (poolAddress) = ("%s%s__poolWeight__" + poolAddress)
136136
137137
138138 func keyPoolToWeightHistory (poolAddress,num) = ((("%s%s__poolWeight__" + poolAddress) + "__") + toString(num))
139139
140140
141141 func keyMappingsInternal2baseAssetId (internalBaseAsset) = ("%s%s%d__mappings__internal2baseAssetId__" + toString(internalBaseAsset))
142142
143143
144144 func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
145145
146146
147147 func keyPoolConfig (amountAssetInternal,priceAssetInternal) = (((("%d%d%s__" + amountAssetInternal) + "__") + priceAssetInternal) + "__config")
148148
149149
150150 func keyPoolOneTokenOperationsDisabled (assetsInternal) = {
151151 let $t038783940 = assetsInternal
152152 let amountAssetInternal = $t038783940._1
153153 let priceAssetInternal = $t038783940._2
154154 makeString(["%d%d%s", toString(amountAssetInternal), toString(priceAssetInternal), "oneTokenOperationsDisabled"], SEP)
155155 }
156156
157157
158158 func keyAllPoolsOneTokenOperationsDisabled () = makeString(["%s", "oneTokenOperationsDisabled"], SEP)
159159
160160
161161 func keyPoolSwapDisabled (assetsInternal) = {
162162 let $t042324294 = assetsInternal
163163 let amountAssetInternal = $t042324294._1
164164 let priceAssetInternal = $t042324294._2
165165 makeString(["%d%d%s", toString(amountAssetInternal), toString(priceAssetInternal), "swapDisabled"], SEP)
166166 }
167167
168168
169169 func keyAllPoolsSwapDisabled () = makeString(["%s", "swapDisabled"], SEP)
170170
171171
172172 func keyMappingLpAssetToPoolAssets (lpAssetStr) = (("%s%s%s__" + lpAssetStr) + "__mappings__lpAsset2Pool")
173173
174174
175175 func keyMappingPoolAssetsToLpasset (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + internalAmountAssetIdStr) + "__") + internalPriceAssetIdStr) + "__mappings__PoolAssets2LpAsset")
176176
177177
178178 func keyPoolSpread (poolAddress) = ("%s%s__spread__" + poolAddress)
179179
180180
181181 func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2PoolAssets")
182182
183183
184184 func keyMappingPoolAssetsToPoolContractAddress (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + toString(internalAmountAssetIdStr)) + "__") + toString(internalPriceAssetIdStr)) + "__mappings__poolAssets2PoolContract")
185185
186186
187187 func keyMappingPoolContractToLPAsset (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
188188
189189
190190 func keyMappingPoolLPAssetToPoolContractAddress (lpAssetStr) = (("%s%s%s__" + lpAssetStr) + "__mappings__lpAsset2PoolContract")
191191
192192
193193 func keyWxEmission (amountAssetId,priceAssetId) = ((("%s%s%s__wxEmission__" + amountAssetId) + "__") + priceAssetId)
194194
195195
196196 func keyInFee (poolAddress) = ("%s%s__inFee__" + poolAddress)
197197
198198
199199 func keyInFeeDefault () = "%s__inFeeDefault"
200200
201201
202202 func keySwapFee (poolAddress) = ("%s%s__swapFee__" + poolAddress)
203203
204204
205205 func keyOutFee (poolAddress) = ("%s%s__outFee__" + poolAddress)
206206
207207
208208 func keyOutFeeDefault () = "%s__outFeeDefault"
209+
210+
211+func keyPoolAssetDefaultMinAmount () = makeString(["%s", "poolAssetDefaultMinAmount"], SEP)
212+
213+
214+func keyPoolAssetsMinAmount (assetId) = makeString(["%s%s", "poolAssetMinAmount", assetId], SEP)
209215
210216
211217 func keySkipOrderValidation (poolAddress) = ("%s%s__skipOrderValidation__" + poolAddress)
212218
213219
214220 func keyChangeAmpDelay (poolAddress) = ("%s%s__changeAmpDelay__" + poolAddress)
215221
216222
217223 func keyChangeAmpDelta (poolAddress) = ("%s%s__changeAmpDelta__" + poolAddress)
218224
219225
220226 func keyChangeAmpTarget (poolAddress) = ("%s%s__changeAmpTarget__" + poolAddress)
221227
222228
223229 func keySWavesProxyAddress () = "%s__sWavesProxyAddress"
224230
225231
226232 func keySWavesAssetId () = "%s__sWavesAssetId"
227233
228234
229235 func keyStakingProfitAddress () = "%s__stakingProfitAddress"
230236
231237
232238 func keyLeasedRatio (poolAddress,assetId) = makeString(["%s%s%s", "leasedRatio", poolAddress, assetId], SEP)
233239
234240
235241 func keyLeasedRatioDefault (assetId) = makeString(["%s%s", "leasedRatioDefault", assetId], SEP)
236242
237243
238244 func keyLeasedRatioTolerance (poolAddress,assetId) = makeString(["%s%s%s", "leasedRatioTolerance", poolAddress, assetId], SEP)
239245
240246
241247 func keyMinBalance (poolAddress,assetId) = makeString(["%s%s%s", "minBalance", poolAddress, assetId], SEP)
242248
243249
244250 func keyMinBalanceDefault (assetId) = makeString(["%s%s", "minBalanceDefault", assetId], SEP)
245251
246252
247253 func keyAddressWhitelisted (address) = makeString(["%s%s", "whitelisted", toString(address)], SEP)
248254
249255
250256 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), ("No data for this.key=" + key))
251257
252258
253259 func getBooleanOrFail (key) = valueOrErrorMessage(getBoolean(this, key), ("No data for this.key=" + key))
254260
255261
256262 func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), ("No data for this.key=" + key))
257263
258264
259265 func parseAssetId (input) = if ((input == wavesString))
260266 then unit
261267 else fromBase58String(input)
262268
263269
264270 func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) {
265271 case s: String =>
266272 addressFromStringValue(s)
267273 case _ =>
268274 this
269275 }
270276
271277
272278 func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), MULT18, toBigInt(origScaleMult))
273279
274280
275281 func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), MULT18))
276282
277283
278284 let IdxFactoryCfgStakingDapp = 1
279285
280286 let IdxFactoryCfgBoostingDapp = 2
281287
282288 let IdxFactoryCfgIdoDapp = 3
283289
284290 let IdxFactoryCfgTeamDapp = 4
285291
286292 let IdxFactoryCfgEmissionDapp = 5
287293
288294 let IdxFactoryCfgRestDapp = 6
289295
290296 let IdxFactoryCfgSlippageDapp = 7
291297
292298 let IdxFactoryCfgDaoDapp = 8
293299
294300 let IdxFactoryCfgMarketingDapp = 9
295301
296302 let IdxFactoryCfgGwxRewardDapp = 10
297303
298304 let IdxFactoryCfgBirdsDapp = 11
299305
300306 func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp])
301307
302308
303309 func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp])
304310
305311
306312 func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp])
307313
308314
309315 func getGwxRewardAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgGwxRewardDapp])
310316
311317
312318 func getPriceAssets () = match getString(keyPriceAssets()) {
313319 case s: String =>
314320 if ((size(s) == 0))
315321 then nil
316322 else split_4C(s, SEP)
317323 case _ =>
318324 nil
319325 }
320326
321327
322328 func managerPublicKeyOrUnit () = {
323329 let managerVaultAddress = getManagerVaultAddressOrThis()
324330 match getString(managerVaultAddress, keyManagerPublicKey()) {
325331 case s: String =>
326332 fromBase58String(s)
327333 case _: Unit =>
328334 unit
329335 case _ =>
330336 throw("Match error")
331337 }
332338 }
333339
334340
335341 let permissionDeniedError = throwErr("Permission denied")
336342
337343 let testError = throwErr("Test error here")
338344
339345 func mustThis (i) = if ((i.caller == this))
340346 then true
341347 else permissionDeniedError
342348
343349
344350 func mustManager (i) = match managerPublicKeyOrUnit() {
345351 case pk: ByteVector =>
346352 if ((i.callerPublicKey == pk))
347353 then true
348354 else permissionDeniedError
349355 case _: Unit =>
350356 mustThis(i)
351357 case _ =>
352358 throw("Match error")
353359 }
354360
355361
356362 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)
357363
358364
359365 func dataFactoryCfg (stakingAddress,boostingAddress,idoContract,teamContract,emissionContract,restContract,slippageContract) = makeString(["%s%s%s%s%s%s", stakingAddress, boostingAddress, idoContract, teamContract, emissionContract, restContract, slippageContract], SEP)
360366
361367
362368 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)
363369
364370
365371 func dataMappingPoolAssets (internalAmountAssetStr,internalPriceAssetStr) = makeString(["%d%d", toString(internalAmountAssetStr), toString(internalPriceAssetStr)], SEP)
366372
367373
368374 func getPoolConfig (poolAddress) = {
369375 let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolAddress)), SEP)
370376 let amountAssetInternal = poolAssets[1]
371377 let priceAssetInternal = poolAssets[2]
372378 split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP)
373379 }
374380
375381
376382 func getInternalAssetIdOrCreate (assetIdStr,incrementor) = {
377383 let internalAssetId = valueOrElse(getInteger(this, keyMappingsBaseAsset2internalId(assetIdStr)), 0)
378384 let currentIndexOfInternalId = valueOrElse(getInteger(this, keyNextInternalAssetId()), 0)
379385 let result = if ((internalAssetId == 0))
380386 then {
381387 let newInternalAssetId = (currentIndexOfInternalId + incrementor)
382388 $Tuple3(newInternalAssetId, [IntegerEntry(keyNextInternalAssetId(), newInternalAssetId), IntegerEntry(keyMappingsBaseAsset2internalId(assetIdStr), newInternalAssetId), StringEntry(keyMappingsInternal2baseAssetId(newInternalAssetId), assetIdStr)], true)
383389 }
384390 else $Tuple3(internalAssetId, nil, false)
385391 result
386392 }
387393
388394
389395 func mustAdmin (i) = {
390396 let adminPKs = split(valueOrElse(getString(keyAdminPubKeys()), EMPTY), SEP)
391397 if (containsElement(adminPKs, toBase58String(i.callerPublicKey)))
392398 then true
393399 else {
394400 let isManager = mustManager(i)
395401 if ((isManager == isManager))
396402 then true
397403 else throw("Strict value is not equal to itself.")
398404 }
399405 }
400406
401407
402408 func intOrDefaultOrFallback (key,keyDefault,valueFallback) = valueOrElse(getInteger(this, key), valueOrElse(getInteger(this, keyDefault), valueFallback))
403409
404410
405411 func poolExistsInternal (amountAssetId,priceAssetId) = {
406412 let amountAssetInternal = getInteger(keyMappingsBaseAsset2internalId(amountAssetId))
407413 let priceAssetInternal = getInteger(keyMappingsBaseAsset2internalId(priceAssetId))
408414 if (if ((amountAssetInternal == unit))
409415 then true
410416 else (priceAssetInternal == unit))
411417 then false
412418 else {
413419 let amAs = toString(value(amountAssetInternal))
414420 let prAs = toString(value(priceAssetInternal))
415421 let cfg = getString(keyPoolConfig(amAs, prAs))
416422 let cfgReverse = getString(keyPoolConfig(prAs, amAs))
417423 let exists = if ((cfg != unit))
418424 then true
419425 else (cfgReverse != unit)
420426 exists
421427 }
422428 }
423429
424430
425431 func getAssetsDataFromPoolAddress (poolContractAddress) = {
426432 let poolAssets = match getString(keyMappingPoolContractAddressToPoolAssets(poolContractAddress)) {
427433 case s: String =>
428434 split(s, SEP)
429435 case _ =>
430436 throwErr(makeString([poolContractAddress, "pool is not found"], " "))
431437 }
432438 let amountAssetInternal = parseIntValue(poolAssets[1])
433439 let priceAssetInternal = parseIntValue(poolAssets[2])
434440 let amountAssetId = getStringValue(keyMappingsInternal2baseAssetId(amountAssetInternal))
435441 let priceAssetId = getStringValue(keyMappingsInternal2baseAssetId(priceAssetInternal))
436442 let lpAssetId = getStringValue(keyMappingPoolContractToLPAsset(poolContractAddress))
437443 $Tuple5(amountAssetId, priceAssetId, lpAssetId, amountAssetInternal, priceAssetInternal)
438444 }
439445
440446
441447 func getPoolCreator (poolContractAddress) = {
442- let $t01590916046 = getAssetsDataFromPoolAddress(poolContractAddress)
443- let amountAssetId = $t01590916046._1
444- let priceAssetId = $t01590916046._2
445- let lpAssetId = $t01590916046._3
446- let amountAssetInternal = $t01590916046._4
447- let priceAssetInternal = $t01590916046._5
448+ let $t01610316240 = getAssetsDataFromPoolAddress(poolContractAddress)
449+ let amountAssetId = $t01610316240._1
450+ let priceAssetId = $t01610316240._2
451+ let lpAssetId = $t01610316240._3
452+ let amountAssetInternal = $t01610316240._4
453+ let priceAssetInternal = $t01610316240._5
448454 let userPoolsContract = addressFromStringValue(getStringValue(keyUserPoolsContract()))
449455 let poolCreator = invoke(userPoolsContract, "getPoolCreatorREADONLY", [amountAssetId, priceAssetId], nil)
450456 poolCreator
451457 }
452458
453459
454460 func getAddressBalance (addressString,assetIdString) = {
455461 let address = addressFromStringValue(addressString)
456462 if ((assetIdString == "WAVES"))
457463 then wavesBalance(address).regular
458464 else {
459465 let assetId = fromBase58String(assetIdString)
460466 assetBalance(address, assetId)
461467 }
462468 }
463469
464470
465471 func isPoolEmpty (poolContractAddress) = {
466- let $t01662116758 = getAssetsDataFromPoolAddress(poolContractAddress)
467- let amountAssetId = $t01662116758._1
468- let priceAssetId = $t01662116758._2
469- let lpAssetId = $t01662116758._3
470- let amountAssetInternal = $t01662116758._4
471- let priceAssetInternal = $t01662116758._5
472+ let $t01681516952 = getAssetsDataFromPoolAddress(poolContractAddress)
473+ let amountAssetId = $t01681516952._1
474+ let priceAssetId = $t01681516952._2
475+ let lpAssetId = $t01681516952._3
476+ let amountAssetInternal = $t01681516952._4
477+ let priceAssetInternal = $t01681516952._5
472478 if ((getAddressBalance(poolContractAddress, amountAssetId) == 0))
473479 then (getAddressBalance(poolContractAddress, priceAssetId) == 0)
474480 else false
475481 }
476482
477483
478484 @Callable(i)
479485 func getSwapContractREADONLY () = $Tuple2(nil, getStringOrFail(swapContract()))
480486
481487
482488
483489 @Callable(i)
484490 func getPoolLeaseConfigREADONLY (poolAddress,assetId) = {
485- let $t01707317377 = match getInteger(this, keyLeasedRatio(poolAddress, assetId)) {
491+ let $t01726717571 = match getInteger(this, keyLeasedRatio(poolAddress, assetId)) {
486492 case r: Int =>
487493 $Tuple2(true, min([100, max([0, r])]))
488494 case _ =>
489495 match getInteger(this, keyLeasedRatioDefault(assetId)) {
490496 case rd: Int =>
491497 $Tuple2(true, min([100, max([0, rd])]))
492498 case _ =>
493499 $Tuple2(false, 0)
494500 }
495501 }
496- let isLeasable = $t01707317377._1
497- let leasedRatio = $t01707317377._2
502+ let isLeasable = $t01726717571._1
503+ let leasedRatio = $t01726717571._2
498504 let minBalance = match getInteger(this, keyMinBalance(poolAddress, assetId)) {
499505 case b: Int =>
500506 max([0, b])
501507 case _ =>
502508 match getInteger(this, keyMinBalanceDefault(assetId)) {
503509 case bd: Int =>
504510 max([0, bd])
505511 case _ =>
506512 0
507513 }
508514 }
509- let $t01764317867 = if ((assetId == "WAVES"))
515+ let $t01783718061 = if ((assetId == "WAVES"))
510516 then $Tuple3(valueOrElse(getString(this, keySWavesProxyAddress()), ""), getString(this, valueOrElse(keySWavesAssetId(), "")), MULT12)
511517 else $Tuple3("", "", 0)
512- let proxyAddress = $t01764317867._1
513- let proxyAssetId = $t01764317867._2
514- let proxyRateMul = $t01764317867._3
518+ let proxyAddress = $t01783718061._1
519+ let proxyAssetId = $t01783718061._2
520+ let proxyRateMul = $t01783718061._3
515521 let stakingProfitAddress = valueOrElse(getString(this, keyStakingProfitAddress()), "")
516522 $Tuple2(nil, $Tuple7(isLeasable, leasedRatio, minBalance, proxyAddress, proxyAssetId, proxyRateMul, stakingProfitAddress))
517523 }
518524
519525
520526
521527 @Callable(i)
522528 func getLpAssetFromPoolAssetsREADONLY (asset1,asset2) = if (if ((asset1 == "8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS"))
523529 then (asset2 == "WAVES")
524530 else false)
525531 then $Tuple2(nil, unit)
526532 else {
527533 let assetNum1 = value(getInteger(this, keyMappingsBaseAsset2internalId(asset1)))
528534 let assetNum2 = value(getInteger(this, keyMappingsBaseAsset2internalId(asset2)))
529535 let ee = getString(this, keyMappingPoolAssetsToLpasset(toString(assetNum1), toString(assetNum2)))
530536 let res = if ((ee == unit))
531537 then unit
532538 else drop(value(ee), 4)
533539 $Tuple2(nil, res)
534540 }
535541
536542
537543
538544 @Callable(i)
539545 func getPoolAddressFromLpAssetREADONLY (lp) = $Tuple2(nil, valueOrElse(getString(this, keyMappingPoolLPAssetToPoolContractAddress(lp)), ""))
540546
541547
542548
543549 @Callable(i)
544550 func constructor (stakingContract,boostingContract,idoContract,teamContract,emissionContract,restContract,slpipageContract,priceDecimals) = {
545551 let checkCaller = mustManager(i)
546552 if ((checkCaller == checkCaller))
547553 then [StringEntry(keyFactoryConfig(), dataFactoryCfg(stakingContract, boostingContract, idoContract, teamContract, emissionContract, restContract, slpipageContract)), IntegerEntry(keyPriceDecimals(), priceDecimals)]
548554 else throw("Strict value is not equal to itself.")
549555 }
550556
551557
552558
553559 @Callable(i)
554560 func constructorV2 (mathcherPub58Str) = {
555561 let checkCaller = mustManager(i)
556562 if ((checkCaller == checkCaller))
557563 then {
558564 let mathcerPub = addressFromPublicKey(fromBase58String(mathcherPub58Str))
559565 if ((mathcerPub == mathcerPub))
560566 then [StringEntry(keyMatcherPub(), mathcherPub58Str)]
561567 else throw("Strict value is not equal to itself.")
562568 }
563569 else throw("Strict value is not equal to itself.")
564570 }
565571
566572
567573
568574 @Callable(i)
569575 func constructorV3 (daoContract,marketingContract,gwxRewardsContract,birdsContract) = {
570576 let checkCaller = mustManager(i)
571577 if ((checkCaller == checkCaller))
572578 then {
573579 let factoryCfg = split(getStringOrFail(keyFactoryConfig()), SEP)
574580 [StringEntry(keyFactoryConfig(), dataFactoryCfgV3(factoryCfg[1], factoryCfg[2], factoryCfg[3], factoryCfg[4], factoryCfg[5], factoryCfg[6], factoryCfg[7], daoContract, marketingContract, gwxRewardsContract, birdsContract))]
575581 }
576582 else throw("Strict value is not equal to itself.")
577583 }
578584
579585
580586
581587 @Callable(i)
582588 func constructorV4 (legacyFactoryContract,legacyPools) = {
583589 let checkCaller = mustManager(i)
584590 if ((checkCaller == checkCaller))
585591 then [StringEntry(keyLegacyFactoryContract(), legacyFactoryContract), StringEntry(keyLegacyPools(), makeString(legacyPools, SEP))]
586592 else throw("Strict value is not equal to itself.")
587593 }
588594
589595
590596
591597 @Callable(i)
592598 func constructorV5 (assetsStoreContract) = {
593599 let checkCaller = mustManager(i)
594600 if ((checkCaller == checkCaller))
595601 then [StringEntry(keyAssetsStoreContract(), assetsStoreContract)]
596602 else throw("Strict value is not equal to itself.")
597603 }
598604
599605
600606
601607 @Callable(i)
602608 func constructorV6 (votingEmissionContract,priceAssets) = {
603609 let cheks = [mustManager(i), if ((addressFromString(votingEmissionContract) != unit))
604610 then true
605611 else "invalid voting emission contract address"]
606612 if ((cheks == cheks))
607613 then [StringEntry(keyVotingEmissionContract(), votingEmissionContract), StringEntry(keyPriceAssets(), makeString(priceAssets, SEP))]
608614 else throw("Strict value is not equal to itself.")
609615 }
610616
611617
612618
613619 @Callable(i)
614620 func setAdmins (adminPubKeys) = {
615621 let checkCaller = mustManager(i)
616622 if ((checkCaller == checkCaller))
617623 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
618624 else throw("Strict value is not equal to itself.")
619625 }
620626
621627
622628
623629 @Callable(i)
624630 func activateNewPool (poolAddress,amountAssetStr,priceAssetStr,lpAssetName,lpAssetDescr,poolWeight,poolType,logo) = {
625631 let checkCaller = mustAdmin(i)
626632 if ((checkCaller == checkCaller))
627633 then if (isDefined(getString(keyMappingPoolContractAddressToPoolAssets(poolAddress))))
628634 then throwErr((("Pool address " + poolAddress) + " already registered."))
629635 else {
630636 let internalAmountAssetData = getInternalAssetIdOrCreate(amountAssetStr, 1)
631637 let internalAmountAssetId = internalAmountAssetData._1
632638 let internalPriceAssetData = getInternalAssetIdOrCreate(priceAssetStr, if (internalAmountAssetData._3)
633639 then 2
634640 else 1)
635641 let internalPriceAssetId = internalPriceAssetData._1
636642 let poolAccountScriptHash = valueOrErrorMessage(scriptHash(addressFromStringValue(poolAddress)), ("No script has been found on pool account " + poolAddress))
637643 let ethalonPoolAccountScriptHash = getBinaryValue(keyPoolScriptHash())
638644 let poolExists = poolExistsInternal(amountAssetStr, priceAssetStr)
639645 if (poolExists)
640646 then throwErr((((("Pool " + amountAssetStr) + "/") + priceAssetStr) + " has already been activated."))
641647 else {
642648 let poolConfigValue = value(getString(this, keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId))))
643649 let amountAssetsDecimals = if ((amountAssetStr == "WAVES"))
644650 then decimalsMultPrice
645651 else pow(10, 0, value(assetInfo(fromBase58String(amountAssetStr))).decimals, 0, 0, DOWN)
646652 let priceAssetsDecimals = if ((priceAssetStr == "WAVES"))
647653 then decimalsMultPrice
648654 else pow(10, 0, value(assetInfo(fromBase58String(priceAssetStr))).decimals, 0, 0, DOWN)
649655 let lpAssetIssueAction = Issue(lpAssetName, lpAssetDescr, 1, 8, true)
650656 let lpAssetId = calculateAssetId(lpAssetIssueAction)
651657 let lpAssetIdStr = toBase58String(lpAssetId)
652658 let poolActivateInvokeResult = invoke(addressFromStringValue(poolAddress), "activate", [amountAssetStr, priceAssetStr], nil)
653659 if ((poolActivateInvokeResult == poolActivateInvokeResult))
654660 then if ((poolActivateInvokeResult != "success"))
655661 then throwErr("Pool initialisation error happened.")
656662 else {
657663 let assetsStoreContract = addressFromStringValue(getStringOrFail(keyAssetsStoreContract()))
658664 let createOrUpdateLpAssetInv = invoke(assetsStoreContract, "createOrUpdate", [lpAssetIdStr, lpAssetName, false], nil)
659665 if ((createOrUpdateLpAssetInv == createOrUpdateLpAssetInv))
660666 then {
661667 let addPoolsLpLabelInv = invoke(assetsStoreContract, "addLabel", [lpAssetIdStr, labelPoolsLp], nil)
662668 if ((addPoolsLpLabelInv == addPoolsLpLabelInv))
663669 then {
664670 let setLogoInv = invoke(assetsStoreContract, "setLogo", [lpAssetIdStr, logo], nil)
665671 if ((setLogoInv == setLogoInv))
666672 then {
667673 let addAssetsLinkInv = invoke(assetsStoreContract, "addAssetsLink", [amountAssetStr, priceAssetStr, lpAssetIdStr], nil)
668674 if ((addAssetsLinkInv == addAssetsLinkInv))
669675 then {
670676 let increaseAssetPoolsNumberInv = invoke(assetsStoreContract, "increaseAssetPoolsNumber", [amountAssetStr], nil)
671677 if ((increaseAssetPoolsNumberInv == increaseAssetPoolsNumberInv))
672678 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)
673679 else throw("Strict value is not equal to itself.")
674680 }
675681 else throw("Strict value is not equal to itself.")
676682 }
677683 else throw("Strict value is not equal to itself.")
678684 }
679685 else throw("Strict value is not equal to itself.")
680686 }
681687 else throw("Strict value is not equal to itself.")
682688 }
683689 else throw("Strict value is not equal to itself.")
684690 }
685691 }
686692 else throw("Strict value is not equal to itself.")
687693 }
688694
689695
690696
691697 @Callable(i)
692698 func managePool (poolAddress,newStatus) = {
693699 let checkCaller = mustManager(i)
694700 if ((checkCaller == checkCaller))
695701 then {
696702 let poolConfig = getPoolConfig(poolAddress)
697703 let poolStatus = poolConfig[idxPoolStatus]
698704 let lpAssetIdStr = poolConfig[idxPoolLPAssetId]
699705 let amountAssetStr = poolConfig[idxAmtAssetId]
700706 let priceAssetStr = poolConfig[idxPriceAssetId]
701707 let amountAssetsDecimals = parseIntValue(poolConfig[idxAmtAssetDcm])
702708 let priceAssetsDecimals = parseIntValue(poolConfig[idxPriceAssetDcm])
703709 let internalAmountAssetId = parseIntValue(poolConfig[idxIAmtAssetId])
704710 let internalPriceAssetId = parseIntValue(poolConfig[idxIPriceAssetId])
705711 let lpAssetDcm = parseIntValue(poolConfig[idxLPAssetDcm])
706712 let poolType = poolConfig[idxPoolType]
707713 [StringEntry(keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId)), dataPoolCfg(poolAddress, toString(newStatus), lpAssetIdStr, amountAssetStr, priceAssetStr, amountAssetsDecimals, priceAssetsDecimals, internalAmountAssetId, internalPriceAssetId, lpAssetDcm, poolType))]
708714 }
709715 else throw("Strict value is not equal to itself.")
710716 }
711717
712718
713719
714720 @Callable(i)
715721 func emit (amountToEmit) = {
716722 let caller = i.caller
717723 let originCaller = i.originCaller
718724 let lpAssetRequested = valueOrErrorMessage(getString(keyMappingPoolContractToLPAsset(toString(caller))), "Invalid LP address called me.")
719725 let lpAsset = fromBase58String(lpAssetRequested)
720726 let legacyPools = split(valueOrElse(getString(keyLegacyPools()), EMPTY), SEP)
721727 let legacyFactoryContract = addressFromStringValue(valueOrErrorMessage(getString(keyLegacyFactoryContract()), "Legacy factory contract does not exists."))
722728 if ((0 >= amountToEmit))
723729 then nil
724730 else if (containsElement(legacyPools, toString(caller)))
725731 then $Tuple2(nil, legacyFactoryContract)
726732 else $Tuple2([Reissue(lpAsset, amountToEmit, true), ScriptTransfer(i.caller, amountToEmit, lpAsset)], "success")
727733 }
728734
729735
730736
731737 @Callable(i)
732738 func burn (amountToBurn) = {
733739 let caller = i.caller
734740 let originCaller = i.originCaller
735741 let payment = value(i.payments[0])
736742 let paymentAmount = value(payment.amount)
737743 let inAmountAssetId = toBase58String(value(payment.assetId))
738744 let lpAssetRequestedForBurning = valueOrErrorMessage(getString(keyMappingPoolContractToLPAsset(toString(caller))), "Invalid LP address called me.")
739745 if ((inAmountAssetId != lpAssetRequestedForBurning))
740746 then throwErr("Invalid asset passed.")
741747 else if ((amountToBurn != paymentAmount))
742748 then throwErr("Invalid amount passed.")
743749 else {
744750 let lpAsset = fromBase58String(lpAssetRequestedForBurning)
745751 $Tuple2([Burn(lpAsset, amountToBurn)], "success")
746752 }
747753 }
748754
749755
750756
751757 @Callable(i)
752758 func modifyWeight (lpAssetId,share) = {
753759 let checkCaller = if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionContract()), "")))
754760 then true
755761 else mustManager(i)
756762 if ((checkCaller == checkCaller))
757763 then {
758764 let poolContractAddress = getStringOrFail(keyMappingPoolLPAssetToPoolContractAddress(lpAssetId))
759765 let poolWeightKey = keyPoolToWeight(poolContractAddress)
760766 let gwxWeightKey = keyPoolToWeight(GWXvirtualPOOL)
761767 let gwxWeight = valueOrElse(getInteger(gwxWeightKey), 0)
762768 let poolWeight = valueOrElse(getInteger(poolWeightKey), 0)
763769 let poolWeightNew = share
764770 let factoryCfg = split(getStringOrFail(keyFactoryConfig()), SEP)
765771 let stakingContract = getStakingAddressOrFail(factoryCfg)
766772 let onModifyWeightInv = invoke(stakingContract, "onModifyWeight", [lpAssetId, poolContractAddress], nil)
767773 if ((onModifyWeightInv == onModifyWeightInv))
768774 then {
769775 let gwxVirtualPoolActions = if ((gwxWeight == 0))
770776 then nil
771777 else [IntegerEntry(gwxWeightKey, 0)]
772778 let poolWeightHistoryKey = keyPoolToWeightHistory(poolContractAddress, 0)
773779 let poolWeightHistoryOrUnit = getInteger(poolWeightHistoryKey)
774780 let poolWeightHistoryActions = if ((poolWeightHistoryOrUnit == unit))
775781 then nil
776782 else [DeleteEntry(poolWeightHistoryKey)]
777783 (([IntegerEntry(poolWeightKey, poolWeightNew)] ++ gwxVirtualPoolActions) ++ poolWeightHistoryActions)
778784 }
779785 else throw("Strict value is not equal to itself.")
780786 }
781787 else throw("Strict value is not equal to itself.")
782788 }
783789
784790
785791
786792 @Callable(i)
787793 func modifyWeights (btcPoolAddress,ethPoolAddress,ethBtcPoolAddress,usdcUsdtPoolAddress) = {
788794 let checkCaller = mustManager(i)
789795 if ((checkCaller == checkCaller))
790796 then {
791797 let ethBtcWeightNew = ((5 * POOLWEIGHTMULT) / 100)
792798 let usdcUsdtWeightNew = ((5 * POOLWEIGHTMULT) / 100)
793799 let weightDecrement = ((5 * POOLWEIGHTMULT) / 100)
794800 let factoryCfg = split(getStringOrFail(keyFactoryConfig()), SEP)
795801 let stakingDapp = getStakingAddressOrFail(factoryCfg)
796802 let gwxRewardDapp = getGwxRewardAddressOrFail(factoryCfg)
797803 let btcWeightKEY = keyPoolToWeight(btcPoolAddress)
798804 let ethWeightKEY = keyPoolToWeight(ethPoolAddress)
799805 let ethBtcWeightKEY = keyPoolToWeight(ethBtcPoolAddress)
800806 let usdcUsdtWeightKEY = keyPoolToWeight(usdcUsdtPoolAddress)
801807 let btcWeight = getIntOrFail(btcWeightKEY)
802808 let ethWeight = getIntOrFail(ethWeightKEY)
803809 let btcWeightNew = (btcWeight - weightDecrement)
804810 let ethWeightNew = (ethWeight - weightDecrement)
805811 if ((0 >= btcWeightNew))
806812 then throwErr(("invalid btcWeightNew: " + toString(btcWeightNew)))
807813 else if ((0 >= ethWeightNew))
808814 then throwErr(("invalid ethWeightNew: " + toString(ethWeightNew)))
809815 else {
810816 let btcLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(btcPoolAddress))
811817 let ethLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(ethPoolAddress))
812818 let ethBtcLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(ethBtcPoolAddress))
813819 let usdcUsdtLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(usdcUsdtPoolAddress))
814820 let onModifyWeightBtc = invoke(stakingDapp, "onModifyWeight", [btcLpAssetIdStr, btcPoolAddress], nil)
815821 if ((onModifyWeightBtc == onModifyWeightBtc))
816822 then {
817823 let onModifyWeightEth = invoke(stakingDapp, "onModifyWeight", [ethLpAssetIdStr, ethPoolAddress], nil)
818824 if ((onModifyWeightEth == onModifyWeightEth))
819825 then {
820826 let onModifyWeightEthBtc = invoke(stakingDapp, "onModifyWeight", [ethBtcLpAssetIdStr, ethBtcPoolAddress], nil)
821827 if ((onModifyWeightEthBtc == onModifyWeightEthBtc))
822828 then {
823829 let onModifyWeightUsdcUsdt = invoke(stakingDapp, "onModifyWeight", [usdcUsdtLpAssetIdStr, usdcUsdtPoolAddress], nil)
824830 if ((onModifyWeightUsdcUsdt == onModifyWeightUsdcUsdt))
825831 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)]
826832 else throw("Strict value is not equal to itself.")
827833 }
828834 else throw("Strict value is not equal to itself.")
829835 }
830836 else throw("Strict value is not equal to itself.")
831837 }
832838 else throw("Strict value is not equal to itself.")
833839 }
834840 }
835841 else throw("Strict value is not equal to itself.")
836842 }
837843
838844
839845
840846 @Callable(i)
841847 func checkWxEmissionPoolLabel (amountAssetId,priceAssetId) = {
842848 let haveLabel = match getBoolean(keyWxEmission(amountAssetId, priceAssetId)) {
843849 case b: Boolean =>
844850 b
845851 case _ =>
846852 false
847853 }
848854 $Tuple2(nil, haveLabel)
849855 }
850856
851857
852858
853859 @Callable(i)
854860 func setWxEmissionPoolLabel (amountAssetId,priceAssetId) = {
855861 let checkCaller = mustAdmin(i)
856862 if ((checkCaller == checkCaller))
857863 then $Tuple2([BooleanEntry(keyWxEmission(amountAssetId, priceAssetId), true)], unit)
858864 else throw("Strict value is not equal to itself.")
859865 }
860866
861867
862868
863869 @Callable(i)
864870 func deleteWxEmissionPoolLabel (amountAssetId,priceAssetId) = {
865871 let checkCaller = if ((i.caller == this))
866872 then true
867873 else mustAdmin(i)
868874 if ((checkCaller == checkCaller))
869875 then $Tuple2([DeleteEntry(keyWxEmission(amountAssetId, priceAssetId))], unit)
870876 else throw("Strict value is not equal to itself.")
871877 }
872878
873879
874880
875881 @Callable(i)
876882 func onVerificationLoss (assetId) = {
877883 let checkCaller = if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyAssetsStoreContract()), "")))
878884 then true
879885 else mustManager(i)
880886 if ((checkCaller == checkCaller))
881887 then {
882888 let priceAssets = getPriceAssets()
883889 let checkPriceAssetsSize = if ((size(priceAssets) > 0))
884890 then true
885891 else throwErr("invalid price assets")
886892 if ((checkPriceAssetsSize == checkPriceAssetsSize))
887893 then {
888894 func cb (acc,priceAsset) = {
889895 let r = invoke(this, "deleteWxEmissionPoolLabel", [assetId, priceAsset], nil)
890896 if ((r == r))
891897 then unit
892898 else throw("Strict value is not equal to itself.")
893899 }
894900
895901 let actions = {
896902 let $l = priceAssets
897903 let $s = size($l)
898904 let $acc0 = unit
899905 func $f0_1 ($a,$i) = if (($i >= $s))
900906 then $a
901907 else cb($a, $l[$i])
902908
903909 func $f0_2 ($a,$i) = if (($i >= $s))
904910 then $a
905911 else throw("List size exceeds 13")
906912
907913 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13)
908914 }
909915 if ((actions == actions))
910916 then $Tuple2(nil, unit)
911917 else throw("Strict value is not equal to itself.")
912918 }
913919 else throw("Strict value is not equal to itself.")
914920 }
915921 else throw("Strict value is not equal to itself.")
916922 }
917923
918924
919925
920926 @Callable(i)
921927 func isPoolOneTokenOperationsDisabledREADONLY (poolAddress) = {
922928 let poolConfig = getPoolConfig(poolAddress)
923929 let assetsInternal = $Tuple2(parseIntValue(poolConfig[idxIAmtAssetId]), parseIntValue(poolConfig[idxIPriceAssetId]))
924930 let poolOneTokenOperationsDisabled = valueOrElse(getBoolean(keyPoolOneTokenOperationsDisabled(assetsInternal)), false)
925931 let allPoolsOneTokenOperationsDisabled = valueOrElse(getBoolean(keyAllPoolsOneTokenOperationsDisabled()), false)
926932 $Tuple2(nil, if (allPoolsOneTokenOperationsDisabled)
927933 then true
928934 else poolOneTokenOperationsDisabled)
929935 }
930936
931937
932938
933939 @Callable(i)
934940 func isPoolSwapDisabledREADONLY (poolAddress) = {
935941 let poolConfig = getPoolConfig(poolAddress)
936942 let assetsInternal = $Tuple2(parseIntValue(poolConfig[idxIAmtAssetId]), parseIntValue(poolConfig[idxIPriceAssetId]))
937943 let poolSwapDisabled = valueOrElse(getBoolean(keyPoolSwapDisabled(assetsInternal)), false)
938944 let allPoolsSwapDisabled = valueOrElse(getBoolean(keyAllPoolsSwapDisabled()), false)
939945 $Tuple2(nil, if (allPoolsSwapDisabled)
940946 then true
941947 else poolSwapDisabled)
942948 }
943949
944950
945951
946952 @Callable(i)
947953 func getInFeeREADONLY (poolAddress) = {
948954 let fee = intOrDefaultOrFallback(keyInFee(poolAddress), keyInFeeDefault(), 0)
949955 $Tuple2(nil, fee)
950956 }
951957
952958
953959
954960 @Callable(i)
955961 func getOutFeeREADONLY (poolAddress) = {
956962 let fee = intOrDefaultOrFallback(keyOutFee(poolAddress), keyOutFeeDefault(), fraction(10, MULT8, 10000))
957963 $Tuple2(nil, fee)
958964 }
959965
960966
961967
962968 @Callable(i)
963969 func getSwapFeeREADONLY (poolAddressStr) = {
964970 let feeOption = match getString(this, keySwapFee(poolAddressStr)) {
965971 case s: String =>
966972 let parts = split(s, SEP)
967973 let poolFee = parseIntValue(parts[1])
968974 let protocolFee = parseIntValue(parts[2])
969975 $Tuple2(poolFee, protocolFee)
970976 case _: Unit =>
971977 unit
972978 case _ =>
973979 throw("Match error")
974980 }
975981 $Tuple2(nil, feeOption)
976982 }
977983
978984
979985
980986 @Callable(i)
981987 func poolInfoREADONLY (amountAssetIdStr,priceAssetIdStr) = {
982988 let amountAssetInternalIdOption = getInteger(this, keyMappingsBaseAsset2internalId(amountAssetIdStr))
983989 let priceAssetInternalIdOption = getInteger(this, keyMappingsBaseAsset2internalId(priceAssetIdStr))
984990 let poolContractAddressOption = getString(this, keyMappingPoolAssetsToPoolContractAddress(value(amountAssetInternalIdOption), value(priceAssetInternalIdOption)))
985991 let lpAssetIdOption = getString(this, keyMappingPoolContractToLPAsset(value(poolContractAddressOption)))
986992 let poolExists = if (if (isDefined(amountAssetInternalIdOption))
987993 then isDefined(priceAssetInternalIdOption)
988994 else false)
989995 then isDefined(poolContractAddressOption)
990996 else false
991997 let poolInfo = if (poolExists)
992998 then $Tuple2(addressFromStringValue(value(poolContractAddressOption)), parseAssetId(value(lpAssetIdOption)))
993999 else unit
9941000 $Tuple2(nil, poolInfo)
9951001 }
9961002
9971003
9981004
9991005 @Callable(i)
10001006 func getPoolStatusREADONLY (poolAddress) = {
10011007 let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolAddress)), SEP)
10021008 let amountAssetInternal = poolAssets[1]
10031009 let priceAssetInternal = poolAssets[2]
10041010 let cfg = split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP)
10051011 $Tuple2(nil, parseIntValue(cfg[idxPoolStatus]))
10061012 }
10071013
10081014
10091015
10101016 @Callable(i)
10111017 func getPoolConfigREADONLY (poolAddress) = {
10121018 let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolAddress)), SEP)
10131019 let amountAssetInternal = poolAssets[1]
10141020 let priceAssetInternal = poolAssets[2]
10151021 let cfg = split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP)
10161022 $Tuple2(nil, cfg)
10171023 }
10181024
10191025
10201026
10211027 @Callable(i)
10221028 func getPoolConfigByLpAssetIdREADONLY (lpAssetIdStr) = {
10231029 let poolAssets = split(getStringOrFail(keyMappingLpAssetToPoolAssets(lpAssetIdStr)), SEP)
10241030 let amountAssetInternal = poolAssets[1]
10251031 let priceAssetInternal = poolAssets[2]
10261032 let cfg = split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP)
10271033 $Tuple2(nil, cfg)
10281034 }
10291035
10301036
10311037
10321038 @Callable(i)
10331039 func poolExistsREADONLY (amountAssetId,priceAssetId) = $Tuple2(nil, poolExistsInternal(amountAssetId, priceAssetId))
10341040
10351041
10361042
10371043 @Callable(i)
10381044 func skipOrderValidationREADONLY (poolAddress) = $Tuple2(nil, valueOrElse(getBoolean(keySkipOrderValidation(poolAddress)), false))
10391045
10401046
10411047
10421048 @Callable(i)
10431049 func getChangeAmpConfigREADONLY (poolAddress) = {
10441050 let delay = getIntegerValue(keyChangeAmpDelay(poolAddress))
10451051 let delta = getIntegerValue(keyChangeAmpDelta(poolAddress))
10461052 let target = getIntegerValue(keyChangeAmpTarget(poolAddress))
10471053 $Tuple2(nil, [delay, delta, target])
10481054 }
10491055
10501056
10511057
10521058 @Callable(i)
10531059 func getPoolWeightREADONLY (lpAssetId) = {
10541060 let poolAddress = getStringOrFail(keyMappingPoolLPAssetToPoolContractAddress(lpAssetId))
10551061 let weight = valueOrElse(getInteger(keyPoolToWeight(poolAddress)), 0)
10561062 $Tuple2(nil, weight)
10571063 }
10581064
10591065
10601066
10611067 @Callable(i)
10621068 func deletePool (poolContractAddress) = {
10631069 let poolConfig = getPoolConfig(poolContractAddress)
10641070 let checkCaller = if ((toString(i.caller) == getPoolCreator(poolContractAddress)))
10651071 then if (isPoolEmpty(poolContractAddress))
10661072 then true
10671073 else throwErr("Pool is not empty")
10681074 else mustManager(i)
10691075 if ((checkCaller == checkCaller))
10701076 then {
10711077 let checkWeight = if ((valueOrElse(getInteger(keyPoolToWeight(poolContractAddress)), 0) == 0))
10721078 then true
10731079 else throwErr("Pool weight is not Zero")
10741080 if ((checkWeight == checkWeight))
10751081 then {
10761082 let checkStatus = if ((poolConfig[idxPoolStatus] == toString(PoolShutdown)))
10771083 then true
10781084 else throwErr("Pool must be SHUTDOWN (4)")
10791085 if ((checkStatus == checkStatus))
10801086 then {
1081- let $t04072240859 = getAssetsDataFromPoolAddress(poolContractAddress)
1082- let amountAssetId = $t04072240859._1
1083- let priceAssetId = $t04072240859._2
1084- let lpAssetId = $t04072240859._3
1085- let amountAssetInternal = $t04072240859._4
1086- let priceAssetInternal = $t04072240859._5
1087+ let $t04091641053 = getAssetsDataFromPoolAddress(poolContractAddress)
1088+ let amountAssetId = $t04091641053._1
1089+ let priceAssetId = $t04091641053._2
1090+ let lpAssetId = $t04091641053._3
1091+ let amountAssetInternal = $t04091641053._4
1092+ let priceAssetInternal = $t04091641053._5
10871093 let userPoolsContract = addressFromStringValue(getStringValue(keyUserPoolsContract()))
10881094 let userPoolsInvoke = invoke(userPoolsContract, "deletePool", [amountAssetId, priceAssetId], nil)
10891095 if ((userPoolsInvoke == userPoolsInvoke))
10901096 then {
10911097 let votingEmissionContract = addressFromStringValue(getStringValue(keyVotingEmissionContract()))
10921098 let votingEmissionInvoke = invoke(votingEmissionContract, "deletePool", [amountAssetId, priceAssetId], nil)
10931099 if ((votingEmissionInvoke == votingEmissionInvoke))
10941100 then {
10951101 let assetsStoreContract = addressFromStringValue(getStringValue(keyAssetsStoreContract()))
10961102 let assetsStoreInvoke = invoke(assetsStoreContract, "deletePool", [amountAssetId, priceAssetId], nil)
10971103 if ((assetsStoreInvoke == assetsStoreInvoke))
10981104 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))]
10991105 else throw("Strict value is not equal to itself.")
11001106 }
11011107 else throw("Strict value is not equal to itself.")
11021108 }
11031109 else throw("Strict value is not equal to itself.")
11041110 }
11051111 else throw("Strict value is not equal to itself.")
11061112 }
11071113 else throw("Strict value is not equal to itself.")
11081114 }
11091115 else throw("Strict value is not equal to itself.")
11101116 }
11111117
11121118
11131119
11141120 @Callable(i)
11151121 func getPrice (poolAddressStr) = {
11161122 let poolAddress = addressFromStringValue(poolAddressStr)
11171123 let cfg = getPoolConfig(poolAddressStr)
11181124 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
11191125 let amtAssetId = cfg[idxAmtAssetId]
11201126 let priceAssetId = cfg[idxPriceAssetId]
11211127 let poolLpBalance = value(assetInfo(lpAssetId)).quantity
11221128 let accAmtAssetBalance = {
11231129 let @ = invoke(poolAddress, "getAccBalanceWrapperREADONLY", [amtAssetId], nil)
11241130 if ($isInstanceOf(@, "Int"))
11251131 then @
11261132 else throw(($getType(@) + " couldn't be cast to Int"))
11271133 }
11281134 let accPriceAssetBalance = {
11291135 let @ = invoke(poolAddress, "getAccBalanceWrapperREADONLY", [priceAssetId], nil)
11301136 if ($isInstanceOf(@, "Int"))
11311137 then @
11321138 else throw(($getType(@) + " couldn't be cast to Int"))
11331139 }
11341140 let price = if ((poolLpBalance == 0))
11351141 then 0
11361142 else {
11371143 let @ = ({
11381144 let @ = invoke(poolAddress, "calcPricesWrapperREADONLY", [accAmtAssetBalance, accPriceAssetBalance, poolLpBalance], nil)
11391145 if ($isInstanceOf(@, "List[Any]"))
11401146 then @
11411147 else throw(($getType(@) + " couldn't be cast to List[Any]"))
11421148 })[0]
11431149 if ($isInstanceOf(@, "String"))
11441150 then @
11451151 else throw(($getType(@) + " couldn't be cast to String"))
11461152 }
11471153 $Tuple2(nil, price)
11481154 }
11491155
11501156
1157+
1158+@Callable(i)
1159+func checkBalance (lpAssetIdStr) = {
1160+ let poolAddressStr = getStringOrFail(keyMappingPoolLPAssetToPoolContractAddress(lpAssetIdStr))
1161+ let poolAddress = addressFromStringValue(poolAddressStr)
1162+ let cfg = getPoolConfig(poolAddressStr)
1163+ let amountAssetIdStr = cfg[idxAmtAssetId]
1164+ let priceAssetIdStr = cfg[idxPriceAssetId]
1165+ let assetMinAmountDefault = getIntegerValue(this, keyPoolAssetDefaultMinAmount())
1166+ let amountAssetMinAmount = valueOrElse(getInteger(this, keyPoolAssetsMinAmount(amountAssetIdStr)), assetMinAmountDefault)
1167+ let priceAssetMinAmount = valueOrElse(getInteger(this, keyPoolAssetsMinAmount(priceAssetIdStr)), assetMinAmountDefault)
1168+ let amountAssetBalance = {
1169+ let @ = invoke(poolAddress, "getAccBalanceWrapperREADONLY", [amountAssetIdStr], nil)
1170+ if ($isInstanceOf(@, "Int"))
1171+ then @
1172+ else throw(($getType(@) + " couldn't be cast to Int"))
1173+ }
1174+ let priceAssetBalance = {
1175+ let @ = invoke(poolAddress, "getAccBalanceWrapperREADONLY", [priceAssetIdStr], nil)
1176+ if ($isInstanceOf(@, "Int"))
1177+ then @
1178+ else throw(($getType(@) + " couldn't be cast to Int"))
1179+ }
1180+ let amountAssetBalanceIsOk = (amountAssetBalance >= (amountAssetMinAmount / 2))
1181+ let priceAssetBalanceIsOk = (priceAssetBalance >= (priceAssetMinAmount / 2))
1182+ let balanceIsOk = if (amountAssetBalanceIsOk)
1183+ then priceAssetBalanceIsOk
1184+ else false
1185+ $Tuple2(nil, balanceIsOk)
1186+ }
1187+
1188+
11511189 @Verifier(tx)
11521190 func verify () = {
11531191 let targetPublicKey = match managerPublicKeyOrUnit() {
11541192 case pk: ByteVector =>
11551193 pk
11561194 case _: Unit =>
11571195 tx.senderPublicKey
11581196 case _ =>
11591197 throw("Match error")
11601198 }
11611199 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
11621200 }
11631201

github/deemru/w8io/169f3d6 
138.12 ms