tx · AfuyX9LCCj4Uw2dXuXNWSNshHbB61oiFrNHKm4MQgizD

3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai:  -0.02400000 Waves

2023.04.06 17:28 [2522824] smart account 3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai > SELF 0.00000000 Waves

{ "type": 13, "id": "AfuyX9LCCj4Uw2dXuXNWSNshHbB61oiFrNHKm4MQgizD", "fee": 2400000, "feeAssetId": null, "timestamp": 1680791394282, "version": 2, "chainId": 84, "sender": "3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai", "senderPublicKey": "2JEaBjtjvMoNGKZmL9QxYefa1VkMJM3vMW8rNvTs9R2H", "proofs": [ "4A4LV7HenQ96PGhRTLhp25w2QwvLmR1oBrsJ3NP6qqevZFK2XJ7KwaTCmMfbD1uGFj4nQH2WSU5XbdbBEqo7M5y5" ], "script": "base64:BgLhKAgCEgASBAoCCAgSAwoBCBIKCggICAgICAgIARIDCgEIEgYKBAgICAgSBAoCCBgSAwoBCBIECgIIGBIDCgEIEgASAwoBGBIKCggICAgICAEICBIECgIIARIDCgEBEgMKAQESBAoCCAESBgoECAgICBIECgIICBIECgIICBIECgIICBIDCgEIEgMKAQgSAwoBCBIDCgEIEgQKAggIEgMKAQgSAwoBCBIDCgEIEgQKAggIEgMKAQgSAwoBCCIGU0NBTEU4IgVNVUxUOCIHU0NBTEUxOCIGTVVMVDE4Ig5QT09MV0VJR0hUTVVMVCIOR1dYdmlydHVhbFBPT0wiDGxhYmVsUG9vbHNMcCINZGVmYXVsdFNwcmVhZCILd2F2ZXNTdHJpbmciEWRlY2ltYWxzTXVsdFByaWNlIgNTRVAiBUVNUFRZIgpQb29sQWN0aXZlIg9Qb29sUHV0RGlzYWJsZWQiE1Bvb2xNYXRjaGVyRGlzYWJsZWQiDFBvb2xTaHV0ZG93biISaWR4SW50ZXJuYWxBc3NldElkIg9pZHhSZXN1dEFjdGlvbnMiIGlkeElmQXNzZXRJZENhbGN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y2ggZXJyb3IJAPQDAwgFAmVJCWJvZHlCeXRlcwkAkQMCCAUCZUkGcHJvb2ZzAAAFAmVL6jjb0Q==", "height": 2522824, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Gz5TfXpAircRUVdWC6McyGBdQUue1GsD7oXaCoS6GyV4 Next: 8jDFViNr6ArUXefKy8oSEgqWYjkojSUYFhPuLD5cHtCy Diff:
OldNewDifferences
44 let SCALE8 = 8
55
66 let MULT8 = 100000000
7-
8-let MULT12 = 1000000000000
97
108 let SCALE18 = 18
119
140138
141139
142140 func keyPoolOneTokenOperationsDisabled (assetsInternal) = {
143- let $t037543816 = assetsInternal
144- let amountAssetInternal = $t037543816._1
145- let priceAssetInternal = $t037543816._2
141+ let $t037263788 = assetsInternal
142+ let amountAssetInternal = $t037263788._1
143+ let priceAssetInternal = $t037263788._2
146144 makeString(["%d%d%s", toString(amountAssetInternal), toString(priceAssetInternal), "oneTokenOperationsDisabled"], SEP)
147145 }
148146
196194
197195
198196 func keyChangeAmpTarget (poolAddress) = ("%s%s__changeAmpTarget__" + poolAddress)
199-
200-
201-func keySWavesProxyAddress () = "%s__sWavesProxyAddress"
202-
203-
204-func keySWavesAssetId () = "%s__sWavesAssetId"
205-
206-
207-func keyStakingProfitAddress () = "%s__stakingProfitAddress"
208-
209-
210-func keyLeasedRatio (poolAddress,assetId) = makeString(["%s%s%s", "leasedRatio", poolAddress, assetId], SEP)
211-
212-
213-func keyLeasedRatioDefault (assetId) = makeString(["%s%s", "leasedRatioDefault", assetId], SEP)
214-
215-
216-func keyLeasedRatioTolerance (poolAddress,assetId) = makeString(["%s%s%s", "leasedRatioTolerance", poolAddress, assetId], SEP)
217-
218-
219-func keyMinBalance (poolAddress,assetId) = makeString(["%s%s%s", "minBalance", poolAddress, assetId], SEP)
220-
221-
222-func keyMinBalanceDefault (assetId) = makeString(["%s%s", "minBalanceDefault", assetId], SEP)
223197
224198
225199 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), ("No data for this.key=" + key))
392366
393367 @Callable(i)
394368 func getSwapContractREADONLY () = $Tuple2(nil, getStringOrFail(swapContract()))
395-
396-
397-
398-@Callable(i)
399-func getPoolLeaseConfigREADONLY (poolAddress,assetId) = {
400- let $t01430514609 = match getInteger(this, keyLeasedRatio(poolAddress, assetId)) {
401- case r: Int =>
402- $Tuple2(true, min([100, max([0, r])]))
403- case _ =>
404- match getInteger(this, keyLeasedRatioDefault(assetId)) {
405- case rd: Int =>
406- $Tuple2(true, min([100, max([0, rd])]))
407- case _ =>
408- $Tuple2(false, 0)
409- }
410- }
411- let isLeasable = $t01430514609._1
412- let leasedRatio = $t01430514609._2
413- let minBalance = match getInteger(this, keyMinBalance(poolAddress, assetId)) {
414- case b: Int =>
415- max([0, b])
416- case _ =>
417- match getInteger(this, keyMinBalanceDefault(assetId)) {
418- case bd: Int =>
419- max([0, bd])
420- case _ =>
421- 0
422- }
423- }
424- let $t01487515099 = if ((assetId == "WAVES"))
425- then $Tuple3(valueOrElse(getString(this, keySWavesProxyAddress()), ""), getString(this, valueOrElse(keySWavesAssetId(), "")), MULT12)
426- else $Tuple3("", "", 0)
427- let proxyAddress = $t01487515099._1
428- let proxyAssetId = $t01487515099._2
429- let proxyRateMul = $t01487515099._3
430- let stakingProfitAddress = valueOrElse(getString(this, keyStakingProfitAddress()), "")
431- $Tuple2(nil, $Tuple7(isLeasable, leasedRatio, minBalance, proxyAddress, proxyAssetId, proxyRateMul, stakingProfitAddress))
432- }
433369
434370
435371
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SCALE8 = 8
55
66 let MULT8 = 100000000
7-
8-let MULT12 = 1000000000000
97
108 let SCALE18 = 18
119
1210 let MULT18 = toBigInt(1000000000000000000)
1311
1412 let POOLWEIGHTMULT = MULT8
1513
1614 let GWXvirtualPOOL = "GWXvirtualPOOL"
1715
1816 let labelPoolsLp = "POOLS_LP"
1917
2018 let defaultSpread = 2000000
2119
2220 let wavesString = "WAVES"
2321
2422 let decimalsMultPrice = ((100 * 1000) * 1000)
2523
2624 let SEP = "__"
2725
2826 let EMPTY = ""
2927
3028 let PoolActive = 1
3129
3230 let PoolPutDisabled = 2
3331
3432 let PoolMatcherDisabled = 3
3533
3634 let PoolShutdown = 4
3735
3836 let idxInternalAssetId = 1
3937
4038 let idxResutActions = 2
4139
4240 let idxIfAssetIdCalculationPerformed = 3
4341
4442 let idxPoolAddress = 1
4543
4644 let idxPoolStatus = 2
4745
4846 let idxPoolLPAssetId = 3
4947
5048 let idxAmtAssetId = 4
5149
5250 let idxPriceAssetId = 5
5351
5452 let idxAmtAssetDcm = 6
5553
5654 let idxPriceAssetDcm = 7
5755
5856 let idxIAmtAssetId = 8
5957
6058 let idxIPriceAssetId = 9
6159
6260 let idxLPAssetDcm = 10
6361
6462 let idxPoolType = 11
6563
6664 let poolLabelWxEmission = "WX_EMISSION"
6765
6866 let validPoolLabels = [poolLabelWxEmission]
6967
7068 func keyAllowedLpScriptHash () = "%s__allowedLpScriptHash"
7169
7270
7371 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
7472
7573
7674 func keyAllowedLpStableAddonScriptHash () = "%s__allowedLpStableAddonScriptHash"
7775
7876
7977 func swapContract () = "%s__swapContract"
8078
8179
8280 func keyFactoryConfig () = "%s__factoryConfig"
8381
8482
8583 func keyLpTokensList () = "%s__lpTokensList"
8684
8785
8886 func keyPoolScriptHash () = "%s%s__pool__scriptHash"
8987
9088
9189 func keyMatcherPub () = "%s%s__matcher__publicKey"
9290
9391
9492 func keyLegacyFactoryContract () = "%s__legacyFactoryContract"
9593
9694
9795 func keyLegacyPools () = "%s__legacyPools"
9896
9997
10098 func keyManagerPublicKey () = "%s__managerPublicKey"
10199
102100
103101 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
104102
105103
106104 func keyAdminPubKeys () = "%s__adminPubKeys"
107105
108106
109107 func keyAssetsStoreContract () = "%s__assetsStoreContract"
110108
111109
112110 func keyVotingEmissionContract () = "%s__votingEmissionContract"
113111
114112
115113 func keyPriceAssets () = makeString(["%s", "priceAssets"], SEP)
116114
117115
118116 func keyPriceDecimals () = "%s__priceDecimals"
119117
120118
121119 func keyAllPoolsShutdown () = "%s__shutdown"
122120
123121
124122 func keyNextInternalAssetId () = "%s__nextInternalAssetId"
125123
126124
127125 func keyPoolToWeight (poolAddress) = ("%s%s__poolWeight__" + poolAddress)
128126
129127
130128 func keyPoolToWeightHistory (poolAddress,num) = ((("%s%s__poolWeight__" + poolAddress) + "__") + toString(num))
131129
132130
133131 func keyMappingsInternal2baseAssetId (internalBaseAsset) = ("%s%s%d__mappings__internal2baseAssetId__" + toString(internalBaseAsset))
134132
135133
136134 func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
137135
138136
139137 func keyPoolConfig (amountAssetInternal,priceAssetInternal) = (((("%d%d%s__" + amountAssetInternal) + "__") + priceAssetInternal) + "__config")
140138
141139
142140 func keyPoolOneTokenOperationsDisabled (assetsInternal) = {
143- let $t037543816 = assetsInternal
144- let amountAssetInternal = $t037543816._1
145- let priceAssetInternal = $t037543816._2
141+ let $t037263788 = assetsInternal
142+ let amountAssetInternal = $t037263788._1
143+ let priceAssetInternal = $t037263788._2
146144 makeString(["%d%d%s", toString(amountAssetInternal), toString(priceAssetInternal), "oneTokenOperationsDisabled"], SEP)
147145 }
148146
149147
150148 func keyAllPoolsOneTokenOperationsDisabled () = makeString(["%s", "oneTokenOperationsDisabled"], SEP)
151149
152150
153151 func keyMappingLpAssetToPoolAssets (lpAssetStr) = (("%s%s%s__" + lpAssetStr) + "__mappings__lpAsset2Pool")
154152
155153
156154 func keyMappingPoolAssetsToLpasset (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + internalAmountAssetIdStr) + "__") + internalPriceAssetIdStr) + "__mappings__PoolAssets2LpAsset")
157155
158156
159157 func keyPoolSpread (poolAddress) = ("%s%s__spread__" + poolAddress)
160158
161159
162160 func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2PoolAssets")
163161
164162
165163 func keyMappingPoolAssetsToPoolContractAddress (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + toString(internalAmountAssetIdStr)) + "__") + toString(internalPriceAssetIdStr)) + "__mappings__poolAssets2PoolContract")
166164
167165
168166 func keyMappingPoolContractToLPAsset (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
169167
170168
171169 func keyMappingPoolLPAssetToPoolContractAddress (lpAssetStr) = (("%s%s%s__" + lpAssetStr) + "__mappings__lpAsset2PoolContract")
172170
173171
174172 func keyWxEmission (amountAssetId,priceAssetId) = ((("%s%s%s__wxEmission__" + amountAssetId) + "__") + priceAssetId)
175173
176174
177175 func keyInFee (poolAddress) = ("%s%s__inFee__" + poolAddress)
178176
179177
180178 func keyInFeeDefault () = "%s__inFeeDefault"
181179
182180
183181 func keyOutFee (poolAddress) = ("%s%s__outFee__" + poolAddress)
184182
185183
186184 func keyOutFeeDefault () = "%s__outFeeDefault"
187185
188186
189187 func keySkipOrderValidation (poolAddress) = ("%s%s__skipOrderValidation__" + poolAddress)
190188
191189
192190 func keyChangeAmpDelay (poolAddress) = ("%s%s__changeAmpDelay__" + poolAddress)
193191
194192
195193 func keyChangeAmpDelta (poolAddress) = ("%s%s__changeAmpDelta__" + poolAddress)
196194
197195
198196 func keyChangeAmpTarget (poolAddress) = ("%s%s__changeAmpTarget__" + poolAddress)
199-
200-
201-func keySWavesProxyAddress () = "%s__sWavesProxyAddress"
202-
203-
204-func keySWavesAssetId () = "%s__sWavesAssetId"
205-
206-
207-func keyStakingProfitAddress () = "%s__stakingProfitAddress"
208-
209-
210-func keyLeasedRatio (poolAddress,assetId) = makeString(["%s%s%s", "leasedRatio", poolAddress, assetId], SEP)
211-
212-
213-func keyLeasedRatioDefault (assetId) = makeString(["%s%s", "leasedRatioDefault", assetId], SEP)
214-
215-
216-func keyLeasedRatioTolerance (poolAddress,assetId) = makeString(["%s%s%s", "leasedRatioTolerance", poolAddress, assetId], SEP)
217-
218-
219-func keyMinBalance (poolAddress,assetId) = makeString(["%s%s%s", "minBalance", poolAddress, assetId], SEP)
220-
221-
222-func keyMinBalanceDefault (assetId) = makeString(["%s%s", "minBalanceDefault", assetId], SEP)
223197
224198
225199 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), ("No data for this.key=" + key))
226200
227201
228202 func getBooleanOrFail (key) = valueOrErrorMessage(getBoolean(this, key), ("No data for this.key=" + key))
229203
230204
231205 func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), ("No data for this.key=" + key))
232206
233207
234208 func parseAssetId (input) = if ((input == wavesString))
235209 then unit
236210 else fromBase58String(input)
237211
238212
239213 let IdxFactoryCfgStakingDapp = 1
240214
241215 let IdxFactoryCfgBoostingDapp = 2
242216
243217 let IdxFactoryCfgIdoDapp = 3
244218
245219 let IdxFactoryCfgTeamDapp = 4
246220
247221 let IdxFactoryCfgEmissionDapp = 5
248222
249223 let IdxFactoryCfgRestDapp = 6
250224
251225 let IdxFactoryCfgSlippageDapp = 7
252226
253227 let IdxFactoryCfgDaoDapp = 8
254228
255229 let IdxFactoryCfgMarketingDapp = 9
256230
257231 let IdxFactoryCfgGwxRewardDapp = 10
258232
259233 let IdxFactoryCfgBirdsDapp = 11
260234
261235 func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp])
262236
263237
264238 func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp])
265239
266240
267241 func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp])
268242
269243
270244 func getGwxRewardAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgGwxRewardDapp])
271245
272246
273247 func getPriceAssets () = match getString(keyPriceAssets()) {
274248 case s: String =>
275249 if ((size(s) == 0))
276250 then nil
277251 else split(s, SEP)
278252 case _ =>
279253 nil
280254 }
281255
282256
283257 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
284258 case s: String =>
285259 fromBase58String(s)
286260 case _: Unit =>
287261 unit
288262 case _ =>
289263 throw("Match error")
290264 }
291265
292266
293267 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
294268 case s: String =>
295269 fromBase58String(s)
296270 case _: Unit =>
297271 unit
298272 case _ =>
299273 throw("Match error")
300274 }
301275
302276
303277 let permissionDeniedError = throw("Permission denied")
304278
305279 let testError = throw("Test error here")
306280
307281 func mustThis (i) = if ((i.caller == this))
308282 then true
309283 else permissionDeniedError
310284
311285
312286 func mustManager (i) = match managerPublicKeyOrUnit() {
313287 case pk: ByteVector =>
314288 if ((i.callerPublicKey == pk))
315289 then true
316290 else permissionDeniedError
317291 case _: Unit =>
318292 mustThis(i)
319293 case _ =>
320294 throw("Match error")
321295 }
322296
323297
324298 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)
325299
326300
327301 func dataFactoryCfg (stakingAddress,boostingAddress,idoContract,teamContract,emissionContract,restContract,slippageContract) = makeString(["%s%s%s%s%s%s", stakingAddress, boostingAddress, idoContract, teamContract, emissionContract, restContract, slippageContract], SEP)
328302
329303
330304 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)
331305
332306
333307 func dataMappingPoolAssets (internalAmountAssetStr,internalPriceAssetStr) = makeString(["%d%d", toString(internalAmountAssetStr), toString(internalPriceAssetStr)], SEP)
334308
335309
336310 func getPoolConfig (poolAddress) = {
337311 let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolAddress)), SEP)
338312 let amountAssetInternal = poolAssets[1]
339313 let priceAssetInternal = poolAssets[2]
340314 split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP)
341315 }
342316
343317
344318 func getInternalAssetIdOrCreate (assetIdStr,incrementor) = {
345319 let internalAssetId = valueOrElse(getInteger(this, keyMappingsBaseAsset2internalId(assetIdStr)), 0)
346320 let currentIndexOfInternalId = valueOrElse(getInteger(this, keyNextInternalAssetId()), 0)
347321 let result = if ((internalAssetId == 0))
348322 then {
349323 let newInternalAssetId = (currentIndexOfInternalId + incrementor)
350324 $Tuple3(newInternalAssetId, [IntegerEntry(keyNextInternalAssetId(), newInternalAssetId), IntegerEntry(keyMappingsBaseAsset2internalId(assetIdStr), newInternalAssetId), StringEntry(keyMappingsInternal2baseAssetId(newInternalAssetId), assetIdStr)], true)
351325 }
352326 else $Tuple3(internalAssetId, nil, false)
353327 result
354328 }
355329
356330
357331 func mustAdmin (i) = {
358332 let adminPKs = split(valueOrElse(getString(keyAdminPubKeys()), EMPTY), SEP)
359333 if (containsElement(adminPKs, toBase58String(i.callerPublicKey)))
360334 then true
361335 else {
362336 let isManager = mustManager(i)
363337 if ((isManager == isManager))
364338 then true
365339 else throw("Strict value is not equal to itself.")
366340 }
367341 }
368342
369343
370344 func intOrDefaultOrFallback (key,keyDefault,valueFallback) = valueOrElse(getInteger(this, key), valueOrElse(getInteger(this, keyDefault), valueFallback))
371345
372346
373347 func poolExistsInternal (amountAssetId,priceAssetId) = {
374348 let amountAssetInternal = getInteger(keyMappingsBaseAsset2internalId(amountAssetId))
375349 let priceAssetInternal = getInteger(keyMappingsBaseAsset2internalId(priceAssetId))
376350 if (if ((amountAssetInternal == unit))
377351 then true
378352 else (priceAssetInternal == unit))
379353 then false
380354 else {
381355 let amAs = toString(value(amountAssetInternal))
382356 let prAs = toString(value(priceAssetInternal))
383357 let cfg = getString(keyPoolConfig(amAs, prAs))
384358 let cfgReverse = getString(keyPoolConfig(prAs, amAs))
385359 let exists = if ((cfg != unit))
386360 then true
387361 else (cfgReverse != unit)
388362 exists
389363 }
390364 }
391365
392366
393367 @Callable(i)
394368 func getSwapContractREADONLY () = $Tuple2(nil, getStringOrFail(swapContract()))
395-
396-
397-
398-@Callable(i)
399-func getPoolLeaseConfigREADONLY (poolAddress,assetId) = {
400- let $t01430514609 = match getInteger(this, keyLeasedRatio(poolAddress, assetId)) {
401- case r: Int =>
402- $Tuple2(true, min([100, max([0, r])]))
403- case _ =>
404- match getInteger(this, keyLeasedRatioDefault(assetId)) {
405- case rd: Int =>
406- $Tuple2(true, min([100, max([0, rd])]))
407- case _ =>
408- $Tuple2(false, 0)
409- }
410- }
411- let isLeasable = $t01430514609._1
412- let leasedRatio = $t01430514609._2
413- let minBalance = match getInteger(this, keyMinBalance(poolAddress, assetId)) {
414- case b: Int =>
415- max([0, b])
416- case _ =>
417- match getInteger(this, keyMinBalanceDefault(assetId)) {
418- case bd: Int =>
419- max([0, bd])
420- case _ =>
421- 0
422- }
423- }
424- let $t01487515099 = if ((assetId == "WAVES"))
425- then $Tuple3(valueOrElse(getString(this, keySWavesProxyAddress()), ""), getString(this, valueOrElse(keySWavesAssetId(), "")), MULT12)
426- else $Tuple3("", "", 0)
427- let proxyAddress = $t01487515099._1
428- let proxyAssetId = $t01487515099._2
429- let proxyRateMul = $t01487515099._3
430- let stakingProfitAddress = valueOrElse(getString(this, keyStakingProfitAddress()), "")
431- $Tuple2(nil, $Tuple7(isLeasable, leasedRatio, minBalance, proxyAddress, proxyAssetId, proxyRateMul, stakingProfitAddress))
432- }
433369
434370
435371
436372 @Callable(i)
437373 func getLpAssetFromPoolAssetsREADONLY (asset1,asset2) = if (if ((asset1 == "8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS"))
438374 then (asset2 == "WAVES")
439375 else false)
440376 then $Tuple2(nil, unit)
441377 else {
442378 let assetNum1 = value(getInteger(this, keyMappingsBaseAsset2internalId(asset1)))
443379 let assetNum2 = value(getInteger(this, keyMappingsBaseAsset2internalId(asset2)))
444380 let ee = getString(this, keyMappingPoolAssetsToLpasset(toString(assetNum1), toString(assetNum2)))
445381 let res = if ((ee == unit))
446382 then unit
447383 else drop(value(ee), 4)
448384 $Tuple2(nil, res)
449385 }
450386
451387
452388
453389 @Callable(i)
454390 func getPoolAddressFromLpAssetREADONLY (lp) = $Tuple2(nil, valueOrElse(getString(this, keyMappingPoolLPAssetToPoolContractAddress(lp)), ""))
455391
456392
457393
458394 @Callable(i)
459395 func constructor (stakingContract,boostingContract,idoContract,teamContract,emissionContract,restContract,slpipageContract,priceDecimals) = {
460396 let checkCaller = mustManager(i)
461397 if ((checkCaller == checkCaller))
462398 then [StringEntry(keyFactoryConfig(), dataFactoryCfg(stakingContract, boostingContract, idoContract, teamContract, emissionContract, restContract, slpipageContract)), IntegerEntry(keyPriceDecimals(), priceDecimals)]
463399 else throw("Strict value is not equal to itself.")
464400 }
465401
466402
467403
468404 @Callable(i)
469405 func constructorV2 (mathcherPub58Str) = {
470406 let checkCaller = mustManager(i)
471407 if ((checkCaller == checkCaller))
472408 then {
473409 let mathcerPub = addressFromPublicKey(fromBase58String(mathcherPub58Str))
474410 if ((mathcerPub == mathcerPub))
475411 then [StringEntry(keyMatcherPub(), mathcherPub58Str)]
476412 else throw("Strict value is not equal to itself.")
477413 }
478414 else throw("Strict value is not equal to itself.")
479415 }
480416
481417
482418
483419 @Callable(i)
484420 func constructorV3 (daoContract,marketingContract,gwxRewardsContract,birdsContract) = {
485421 let checkCaller = mustManager(i)
486422 if ((checkCaller == checkCaller))
487423 then {
488424 let factoryCfg = split(getStringOrFail(keyFactoryConfig()), SEP)
489425 [StringEntry(keyFactoryConfig(), dataFactoryCfgV3(factoryCfg[1], factoryCfg[2], factoryCfg[3], factoryCfg[4], factoryCfg[5], factoryCfg[6], factoryCfg[7], daoContract, marketingContract, gwxRewardsContract, birdsContract))]
490426 }
491427 else throw("Strict value is not equal to itself.")
492428 }
493429
494430
495431
496432 @Callable(i)
497433 func constructorV4 (legacyFactoryContract,legacyPools) = {
498434 let checkCaller = mustManager(i)
499435 if ((checkCaller == checkCaller))
500436 then [StringEntry(keyLegacyFactoryContract(), legacyFactoryContract), StringEntry(keyLegacyPools(), makeString(legacyPools, SEP))]
501437 else throw("Strict value is not equal to itself.")
502438 }
503439
504440
505441
506442 @Callable(i)
507443 func constructorV5 (assetsStoreContract) = {
508444 let checkCaller = mustManager(i)
509445 if ((checkCaller == checkCaller))
510446 then [StringEntry(keyAssetsStoreContract(), assetsStoreContract)]
511447 else throw("Strict value is not equal to itself.")
512448 }
513449
514450
515451
516452 @Callable(i)
517453 func constructorV6 (votingEmissionContract,priceAssets) = {
518454 let cheks = [mustManager(i), if ((addressFromString(votingEmissionContract) != unit))
519455 then true
520456 else "invalid voting emission contract address"]
521457 if ((cheks == cheks))
522458 then [StringEntry(keyVotingEmissionContract(), votingEmissionContract), StringEntry(keyPriceAssets(), makeString(priceAssets, SEP))]
523459 else throw("Strict value is not equal to itself.")
524460 }
525461
526462
527463
528464 @Callable(i)
529465 func setManager (pendingManagerPublicKey) = {
530466 let checkCaller = mustManager(i)
531467 if ((checkCaller == checkCaller))
532468 then {
533469 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
534470 if ((checkManagerPublicKey == checkManagerPublicKey))
535471 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
536472 else throw("Strict value is not equal to itself.")
537473 }
538474 else throw("Strict value is not equal to itself.")
539475 }
540476
541477
542478
543479 @Callable(i)
544480 func confirmManager () = {
545481 let pm = pendingManagerPublicKeyOrUnit()
546482 let hasPM = if (isDefined(pm))
547483 then true
548484 else throw("No pending manager")
549485 if ((hasPM == hasPM))
550486 then {
551487 let checkPM = if ((i.callerPublicKey == value(pm)))
552488 then true
553489 else throw("You are not pending manager")
554490 if ((checkPM == checkPM))
555491 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
556492 else throw("Strict value is not equal to itself.")
557493 }
558494 else throw("Strict value is not equal to itself.")
559495 }
560496
561497
562498
563499 @Callable(i)
564500 func setAdmins (adminPubKeys) = {
565501 let checkCaller = mustManager(i)
566502 if ((checkCaller == checkCaller))
567503 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
568504 else throw("Strict value is not equal to itself.")
569505 }
570506
571507
572508
573509 @Callable(i)
574510 func activateNewPool (poolAddress,amountAssetStr,priceAssetStr,lpAssetName,lpAssetDescr,poolWeight,poolType,logo) = {
575511 let checkCaller = mustAdmin(i)
576512 if ((checkCaller == checkCaller))
577513 then if (isDefined(getString(keyMappingPoolContractAddressToPoolAssets(poolAddress))))
578514 then throw((("Pool address " + poolAddress) + " already registered."))
579515 else {
580516 let internalAmountAssetData = getInternalAssetIdOrCreate(amountAssetStr, 1)
581517 let internalAmountAssetId = internalAmountAssetData._1
582518 let internalPriceAssetData = getInternalAssetIdOrCreate(priceAssetStr, if (internalAmountAssetData._3)
583519 then 2
584520 else 1)
585521 let internalPriceAssetId = internalPriceAssetData._1
586522 let poolAccountScriptHash = valueOrErrorMessage(scriptHash(addressFromStringValue(poolAddress)), ("No script has been found on pool account " + poolAddress))
587523 let ethalonPoolAccountScriptHash = getBinaryValue(keyPoolScriptHash())
588524 let poolExists = poolExistsInternal(amountAssetStr, priceAssetStr)
589525 if (poolExists)
590526 then throw((((("Pool " + amountAssetStr) + "/") + priceAssetStr) + " has already been activated."))
591527 else {
592528 let poolConfigValue = value(getString(this, keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId))))
593529 let amountAssetsDecimals = if ((amountAssetStr == "WAVES"))
594530 then decimalsMultPrice
595531 else pow(10, 0, value(assetInfo(fromBase58String(amountAssetStr))).decimals, 0, 0, DOWN)
596532 let priceAssetsDecimals = if ((priceAssetStr == "WAVES"))
597533 then decimalsMultPrice
598534 else pow(10, 0, value(assetInfo(fromBase58String(priceAssetStr))).decimals, 0, 0, DOWN)
599535 let lpAssetIssueAction = Issue(lpAssetName, lpAssetDescr, 1, 8, true)
600536 let lpAssetId = calculateAssetId(lpAssetIssueAction)
601537 let lpAssetIdStr = toBase58String(lpAssetId)
602538 let poolActivateInvokeResult = invoke(addressFromStringValue(poolAddress), "activate", [amountAssetStr, priceAssetStr], nil)
603539 if ((poolActivateInvokeResult == poolActivateInvokeResult))
604540 then if ((poolActivateInvokeResult != "success"))
605541 then throw("Pool initialisation error happened.")
606542 else {
607543 let assetsStoreContract = addressFromStringValue(getStringOrFail(keyAssetsStoreContract()))
608544 let createOrUpdateLpAssetInv = invoke(assetsStoreContract, "createOrUpdate", [lpAssetIdStr, lpAssetName, false], nil)
609545 if ((createOrUpdateLpAssetInv == createOrUpdateLpAssetInv))
610546 then {
611547 let addPoolsLpLabelInv = invoke(assetsStoreContract, "addLabel", [lpAssetIdStr, labelPoolsLp], nil)
612548 if ((addPoolsLpLabelInv == addPoolsLpLabelInv))
613549 then {
614550 let setLogoInv = invoke(assetsStoreContract, "setLogo", [lpAssetIdStr, logo], nil)
615551 if ((setLogoInv == setLogoInv))
616552 then {
617553 let addAssetsLinkInv = invoke(assetsStoreContract, "addAssetsLink", [amountAssetStr, priceAssetStr, lpAssetIdStr], nil)
618554 if ((addAssetsLinkInv == addAssetsLinkInv))
619555 then {
620556 let increaseAssetPoolsNumberInv = invoke(assetsStoreContract, "increaseAssetPoolsNumber", [amountAssetStr], nil)
621557 if ((increaseAssetPoolsNumberInv == increaseAssetPoolsNumberInv))
622558 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)
623559 else throw("Strict value is not equal to itself.")
624560 }
625561 else throw("Strict value is not equal to itself.")
626562 }
627563 else throw("Strict value is not equal to itself.")
628564 }
629565 else throw("Strict value is not equal to itself.")
630566 }
631567 else throw("Strict value is not equal to itself.")
632568 }
633569 else throw("Strict value is not equal to itself.")
634570 }
635571 }
636572 else throw("Strict value is not equal to itself.")
637573 }
638574
639575
640576
641577 @Callable(i)
642578 func managePool (poolAddress,newStatus) = {
643579 let checkCaller = mustManager(i)
644580 if ((checkCaller == checkCaller))
645581 then {
646582 let poolConfig = getPoolConfig(poolAddress)
647583 let poolStatus = poolConfig[idxPoolStatus]
648584 let lpAssetIdStr = poolConfig[idxPoolLPAssetId]
649585 let amountAssetStr = poolConfig[idxAmtAssetId]
650586 let priceAssetStr = poolConfig[idxPriceAssetId]
651587 let amountAssetsDecimals = parseIntValue(poolConfig[idxAmtAssetDcm])
652588 let priceAssetsDecimals = parseIntValue(poolConfig[idxPriceAssetDcm])
653589 let internalAmountAssetId = parseIntValue(poolConfig[idxIAmtAssetId])
654590 let internalPriceAssetId = parseIntValue(poolConfig[idxIPriceAssetId])
655591 let lpAssetDcm = parseIntValue(poolConfig[idxLPAssetDcm])
656592 let poolType = poolConfig[idxPoolType]
657593 [StringEntry(keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId)), dataPoolCfg(poolAddress, toString(newStatus), lpAssetIdStr, amountAssetStr, priceAssetStr, amountAssetsDecimals, priceAssetsDecimals, internalAmountAssetId, internalPriceAssetId, lpAssetDcm, poolType))]
658594 }
659595 else throw("Strict value is not equal to itself.")
660596 }
661597
662598
663599
664600 @Callable(i)
665601 func emit (amountToEmit) = {
666602 let caller = i.caller
667603 let originCaller = i.originCaller
668604 let lpAssetRequested = valueOrErrorMessage(getString(keyMappingPoolContractToLPAsset(toString(caller))), "Invalid LP address called me.")
669605 let lpAsset = fromBase58String(lpAssetRequested)
670606 let legacyPools = split(valueOrElse(getString(keyLegacyPools()), EMPTY), SEP)
671607 let legacyFactoryContract = addressFromStringValue(valueOrErrorMessage(getString(keyLegacyFactoryContract()), "Legacy factory contract does not exists."))
672608 if ((0 >= amountToEmit))
673609 then nil
674610 else if (containsElement(legacyPools, toString(caller)))
675611 then $Tuple2(nil, legacyFactoryContract)
676612 else $Tuple2([Reissue(lpAsset, amountToEmit, true), ScriptTransfer(i.caller, amountToEmit, lpAsset)], "success")
677613 }
678614
679615
680616
681617 @Callable(i)
682618 func burn (amountToBurn) = {
683619 let caller = i.caller
684620 let originCaller = i.originCaller
685621 let payment = value(i.payments[0])
686622 let paymentAmount = value(payment.amount)
687623 let inAmountAssetId = toBase58String(value(payment.assetId))
688624 let lpAssetRequestedForBurning = valueOrErrorMessage(getString(keyMappingPoolContractToLPAsset(toString(caller))), "Invalid LP address called me.")
689625 if ((inAmountAssetId != lpAssetRequestedForBurning))
690626 then throw("Invalid asset passed.")
691627 else if ((amountToBurn != paymentAmount))
692628 then throw("Invalid amount passed.")
693629 else {
694630 let lpAsset = fromBase58String(lpAssetRequestedForBurning)
695631 $Tuple2([Burn(lpAsset, amountToBurn)], "success")
696632 }
697633 }
698634
699635
700636
701637 @Callable(i)
702638 func modifyWeight (lpAssetId,share) = {
703639 let checkCaller = if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionContract()), "")))
704640 then true
705641 else mustManager(i)
706642 if ((checkCaller == checkCaller))
707643 then {
708644 let poolContractAddress = getStringOrFail(keyMappingPoolLPAssetToPoolContractAddress(lpAssetId))
709645 let poolWeightKey = keyPoolToWeight(poolContractAddress)
710646 let gwxWeightKey = keyPoolToWeight(GWXvirtualPOOL)
711647 let gwxWeight = valueOrElse(getInteger(gwxWeightKey), 0)
712648 let poolWeight = valueOrElse(getInteger(poolWeightKey), 0)
713649 let poolWeightNew = share
714650 let factoryCfg = split(getStringOrFail(keyFactoryConfig()), SEP)
715651 let stakingContract = getStakingAddressOrFail(factoryCfg)
716652 let onModifyWeightInv = invoke(stakingContract, "onModifyWeight", [lpAssetId, poolContractAddress], nil)
717653 if ((onModifyWeightInv == onModifyWeightInv))
718654 then {
719655 let gwxVirtualPoolActions = if ((gwxWeight == 0))
720656 then nil
721657 else [IntegerEntry(gwxWeightKey, 0)]
722658 let poolWeightHistoryKey = keyPoolToWeightHistory(poolContractAddress, 0)
723659 let poolWeightHistoryOrUnit = getInteger(poolWeightHistoryKey)
724660 let poolWeightHistoryActions = if ((poolWeightHistoryOrUnit == unit))
725661 then nil
726662 else [DeleteEntry(poolWeightHistoryKey)]
727663 (([IntegerEntry(poolWeightKey, poolWeightNew)] ++ gwxVirtualPoolActions) ++ poolWeightHistoryActions)
728664 }
729665 else throw("Strict value is not equal to itself.")
730666 }
731667 else throw("Strict value is not equal to itself.")
732668 }
733669
734670
735671
736672 @Callable(i)
737673 func modifyWeights (btcPoolAddress,ethPoolAddress,ethBtcPoolAddress,usdcUsdtPoolAddress) = {
738674 let checkCaller = mustManager(i)
739675 if ((checkCaller == checkCaller))
740676 then {
741677 let ethBtcWeightNew = ((5 * POOLWEIGHTMULT) / 100)
742678 let usdcUsdtWeightNew = ((5 * POOLWEIGHTMULT) / 100)
743679 let weightDecrement = ((5 * POOLWEIGHTMULT) / 100)
744680 let factoryCfg = split(getStringOrFail(keyFactoryConfig()), SEP)
745681 let stakingDapp = getStakingAddressOrFail(factoryCfg)
746682 let gwxRewardDapp = getGwxRewardAddressOrFail(factoryCfg)
747683 let btcWeightKEY = keyPoolToWeight(btcPoolAddress)
748684 let ethWeightKEY = keyPoolToWeight(ethPoolAddress)
749685 let ethBtcWeightKEY = keyPoolToWeight(ethBtcPoolAddress)
750686 let usdcUsdtWeightKEY = keyPoolToWeight(usdcUsdtPoolAddress)
751687 let btcWeight = getIntOrFail(btcWeightKEY)
752688 let ethWeight = getIntOrFail(ethWeightKEY)
753689 let btcWeightNew = (btcWeight - weightDecrement)
754690 let ethWeightNew = (ethWeight - weightDecrement)
755691 if ((0 >= btcWeightNew))
756692 then throw(("invalid btcWeightNew: " + toString(btcWeightNew)))
757693 else if ((0 >= ethWeightNew))
758694 then throw(("invalid ethWeightNew: " + toString(ethWeightNew)))
759695 else {
760696 let btcLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(btcPoolAddress))
761697 let ethLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(ethPoolAddress))
762698 let ethBtcLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(ethBtcPoolAddress))
763699 let usdcUsdtLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(usdcUsdtPoolAddress))
764700 let onModifyWeightBtc = invoke(stakingDapp, "onModifyWeight", [btcLpAssetIdStr, btcPoolAddress], nil)
765701 if ((onModifyWeightBtc == onModifyWeightBtc))
766702 then {
767703 let onModifyWeightEth = invoke(stakingDapp, "onModifyWeight", [ethLpAssetIdStr, ethPoolAddress], nil)
768704 if ((onModifyWeightEth == onModifyWeightEth))
769705 then {
770706 let onModifyWeightEthBtc = invoke(stakingDapp, "onModifyWeight", [ethBtcLpAssetIdStr, ethBtcPoolAddress], nil)
771707 if ((onModifyWeightEthBtc == onModifyWeightEthBtc))
772708 then {
773709 let onModifyWeightUsdcUsdt = invoke(stakingDapp, "onModifyWeight", [usdcUsdtLpAssetIdStr, usdcUsdtPoolAddress], nil)
774710 if ((onModifyWeightUsdcUsdt == onModifyWeightUsdcUsdt))
775711 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)]
776712 else throw("Strict value is not equal to itself.")
777713 }
778714 else throw("Strict value is not equal to itself.")
779715 }
780716 else throw("Strict value is not equal to itself.")
781717 }
782718 else throw("Strict value is not equal to itself.")
783719 }
784720 }
785721 else throw("Strict value is not equal to itself.")
786722 }
787723
788724
789725
790726 @Callable(i)
791727 func checkWxEmissionPoolLabel (amountAssetId,priceAssetId) = {
792728 let haveLabel = match getBoolean(keyWxEmission(amountAssetId, priceAssetId)) {
793729 case b: Boolean =>
794730 b
795731 case _ =>
796732 false
797733 }
798734 $Tuple2(nil, haveLabel)
799735 }
800736
801737
802738
803739 @Callable(i)
804740 func setWxEmissionPoolLabel (amountAssetId,priceAssetId) = {
805741 let checkCaller = mustAdmin(i)
806742 if ((checkCaller == checkCaller))
807743 then $Tuple2([BooleanEntry(keyWxEmission(amountAssetId, priceAssetId), true)], unit)
808744 else throw("Strict value is not equal to itself.")
809745 }
810746
811747
812748
813749 @Callable(i)
814750 func deleteWxEmissionPoolLabel (amountAssetId,priceAssetId) = {
815751 let checkCaller = if (mustThis(i))
816752 then true
817753 else mustAdmin(i)
818754 if ((checkCaller == checkCaller))
819755 then $Tuple2([DeleteEntry(keyWxEmission(amountAssetId, priceAssetId))], unit)
820756 else throw("Strict value is not equal to itself.")
821757 }
822758
823759
824760
825761 @Callable(i)
826762 func onVerificationLoss (assetId) = {
827763 let checkCaller = if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyAssetsStoreContract()), "")))
828764 then true
829765 else mustManager(i)
830766 if ((checkCaller == checkCaller))
831767 then {
832768 let priceAssets = getPriceAssets()
833769 let checkPriceAssetsSize = if ((size(priceAssets) > 0))
834770 then true
835771 else throw("invalid price assets")
836772 if ((checkPriceAssetsSize == checkPriceAssetsSize))
837773 then {
838774 func cb (acc,priceAsset) = {
839775 let r = invoke(this, "deleteWxEmissionPoolLabel", [assetId, priceAsset], nil)
840776 if ((r == r))
841777 then unit
842778 else throw("Strict value is not equal to itself.")
843779 }
844780
845781 let actions = {
846782 let $l = priceAssets
847783 let $s = size($l)
848784 let $acc0 = unit
849785 func $f0_1 ($a,$i) = if (($i >= $s))
850786 then $a
851787 else cb($a, $l[$i])
852788
853789 func $f0_2 ($a,$i) = if (($i >= $s))
854790 then $a
855791 else throw("List size exceeds 2")
856792
857793 $f0_2($f0_1($f0_1($acc0, 0), 1), 2)
858794 }
859795 if ((actions == actions))
860796 then $Tuple2(nil, unit)
861797 else throw("Strict value is not equal to itself.")
862798 }
863799 else throw("Strict value is not equal to itself.")
864800 }
865801 else throw("Strict value is not equal to itself.")
866802 }
867803
868804
869805
870806 @Callable(i)
871807 func isPoolOneTokenOperationsDisabledREADONLY (poolAddress) = {
872808 let poolConfig = getPoolConfig(poolAddress)
873809 let assetsInternal = $Tuple2(parseIntValue(poolConfig[idxIAmtAssetId]), parseIntValue(poolConfig[idxIPriceAssetId]))
874810 let poolOneTokenOperationsDisabled = valueOrElse(getBoolean(keyPoolOneTokenOperationsDisabled(assetsInternal)), false)
875811 let allPoolsOneTokenOperationsDisabled = valueOrElse(getBoolean(keyAllPoolsOneTokenOperationsDisabled()), false)
876812 $Tuple2(nil, if (allPoolsOneTokenOperationsDisabled)
877813 then true
878814 else poolOneTokenOperationsDisabled)
879815 }
880816
881817
882818
883819 @Callable(i)
884820 func getInFeeREADONLY (poolAddress) = {
885821 let fee = intOrDefaultOrFallback(keyInFee(poolAddress), keyInFeeDefault(), 0)
886822 $Tuple2(nil, fee)
887823 }
888824
889825
890826
891827 @Callable(i)
892828 func getOutFeeREADONLY (poolAddress) = {
893829 let fee = intOrDefaultOrFallback(keyOutFee(poolAddress), keyOutFeeDefault(), fraction(10, MULT8, 10000))
894830 $Tuple2(nil, fee)
895831 }
896832
897833
898834
899835 @Callable(i)
900836 func poolInfoREADONLY (amountAssetIdStr,priceAssetIdStr) = {
901837 let amountAssetInternalIdOption = getInteger(this, keyMappingsBaseAsset2internalId(amountAssetIdStr))
902838 let priceAssetInternalIdOption = getInteger(this, keyMappingsBaseAsset2internalId(priceAssetIdStr))
903839 let poolContractAddressOption = getString(this, keyMappingPoolAssetsToPoolContractAddress(value(amountAssetInternalIdOption), value(priceAssetInternalIdOption)))
904840 let lpAssetIdOption = getString(this, keyMappingPoolContractToLPAsset(value(poolContractAddressOption)))
905841 let poolExists = if (if (isDefined(amountAssetInternalIdOption))
906842 then isDefined(priceAssetInternalIdOption)
907843 else false)
908844 then isDefined(poolContractAddressOption)
909845 else false
910846 let poolInfo = if (poolExists)
911847 then $Tuple2(addressFromStringValue(value(poolContractAddressOption)), parseAssetId(value(lpAssetIdOption)))
912848 else unit
913849 $Tuple2(nil, poolInfo)
914850 }
915851
916852
917853
918854 @Callable(i)
919855 func getPoolStatusREADONLY (poolAddress) = {
920856 let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolAddress)), SEP)
921857 let amountAssetInternal = poolAssets[1]
922858 let priceAssetInternal = poolAssets[2]
923859 let cfg = split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP)
924860 $Tuple2(nil, parseIntValue(cfg[idxPoolStatus]))
925861 }
926862
927863
928864
929865 @Callable(i)
930866 func getPoolConfigREADONLY (poolAddress) = {
931867 let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolAddress)), SEP)
932868 let amountAssetInternal = poolAssets[1]
933869 let priceAssetInternal = poolAssets[2]
934870 let cfg = split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP)
935871 $Tuple2(nil, cfg)
936872 }
937873
938874
939875
940876 @Callable(i)
941877 func getPoolConfigByLpAssetIdREADONLY (lpAssetIdStr) = {
942878 let poolAssets = split(getStringOrFail(keyMappingLpAssetToPoolAssets(lpAssetIdStr)), SEP)
943879 let amountAssetInternal = poolAssets[1]
944880 let priceAssetInternal = poolAssets[2]
945881 let cfg = split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP)
946882 $Tuple2(nil, cfg)
947883 }
948884
949885
950886
951887 @Callable(i)
952888 func poolExistsREADONLY (amountAssetId,priceAssetId) = $Tuple2(nil, poolExistsInternal(amountAssetId, priceAssetId))
953889
954890
955891
956892 @Callable(i)
957893 func skipOrderValidationREADONLY (poolAddress) = $Tuple2(nil, valueOrElse(getBoolean(keySkipOrderValidation(poolAddress)), false))
958894
959895
960896
961897 @Callable(i)
962898 func getChangeAmpConfigREADONLY (poolAddress) = {
963899 let delay = getIntegerValue(keyChangeAmpDelay(poolAddress))
964900 let delta = getIntegerValue(keyChangeAmpDelta(poolAddress))
965901 let target = getIntegerValue(keyChangeAmpTarget(poolAddress))
966902 $Tuple2(nil, [delay, delta, target])
967903 }
968904
969905
970906 @Verifier(tx)
971907 func verify () = {
972908 let targetPublicKey = match managerPublicKeyOrUnit() {
973909 case pk: ByteVector =>
974910 pk
975911 case _: Unit =>
976912 tx.senderPublicKey
977913 case _ =>
978914 throw("Match error")
979915 }
980916 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
981917 }
982918

github/deemru/w8io/fabc49c 
98.34 ms