tx · 4AZezJTV9ZsKRAXtEB1C7cZRqsSfodsrDBLczBUP6zLf

3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai:  -0.02600000 Waves

2023.04.06 18:02 [2522857] smart account 3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai > SELF 0.00000000 Waves

{ "type": 13, "id": "4AZezJTV9ZsKRAXtEB1C7cZRqsSfodsrDBLczBUP6zLf", "fee": 2600000, "feeAssetId": null, "timestamp": 1680793436469, "version": 2, "chainId": 84, "sender": "3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai", "senderPublicKey": "2JEaBjtjvMoNGKZmL9QxYefa1VkMJM3vMW8rNvTs9R2H", "proofs": [ "44QzQQgruDgEiAMh1Y5g9xt9kKn93DhFGQBG2RHqLWDzJGoK7q52DmqQSsToUPK8FBjSv4nvjDe2HfVTYf1x6mRk" ], "script": "base64:BgK3KwgCEgASBAoCCAgSBAoCCAgSAwoBCBIKCggICAgICAgIARIDCgEIEgYKBAgICAgSBAoCCBgSAwoBCBIECgIIGBIDCgEIEgASAwoBGBIKCggICAgICAEICBIECgIIARIDCgEBEgMKAQESBAoCCAESBgoECAgICBIECgIICBIECgIICBIECgIICBIDCgEIEgMKAQgSAwoBCBIDCgEIEgQKAggIEgMKAQgSAwoBCBIDCgEIEgQKAggIEgMKAQgSAwoBCBIDCgEIIgZTQ0FMRTgiBU1VTFQ4IgZNVUxUMTIiB1NDQUxFMTgiBk1VTFQxOCIOUE9PTFdFSUdIVE1VTFQiDkdXWHZpcnR1YWxQT09MIgxsYWJlbFBvb2xzTHAiDWRlZmF1bHRTcHJlYWQiC3dhdmVzU3RyaW5nIhFkZWNpbWFsc011bHRQcmljZSIDU0VQIgVFTVBUWSIKUG9vbEFjdGl2ZSIPUG9vbFB1dERpc2FibGVkIhNQb29sTWF0Y2hlckRpc2FibGVkIgxQb29sU2h1dGRvd24iEmlkeEludGVybmFsQXNzZXRJZCIPaWR4UmVzdXRBY3Rpb25zI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AAIBAgtNYXRjaCBlcnJvcgkA9AMDCAUCZmUJYm9keUJ5dGVzCQCRAwIIBQJmZQZwcm9vZnMAAAUCZmesX5qk", "height": 2522857, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8jDFViNr6ArUXefKy8oSEgqWYjkojSUYFhPuLD5cHtCy Next: AaxkrQ4SAMqRawyTuwASWjtmgFWG3TTxEajXN2iH3FVb Diff:
OldNewDifferences
967967 }
968968
969969
970+
971+@Callable(i)
972+func getPoolWeightREADONLY (lpAssetId) = {
973+ let poolAddress = getStringOrFail(keyMappingPoolLPAssetToPoolContractAddress(lpAssetId))
974+ let weight = valueOrElse(getInteger(keyPoolToWeight(poolAddress)), 0)
975+ $Tuple2(nil, weight)
976+ }
977+
978+
970979 @Verifier(tx)
971980 func verify () = {
972981 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 decimalsMultPrice = ((100 * 1000) * 1000)
2525
2626 let SEP = "__"
2727
2828 let EMPTY = ""
2929
3030 let PoolActive = 1
3131
3232 let PoolPutDisabled = 2
3333
3434 let PoolMatcherDisabled = 3
3535
3636 let PoolShutdown = 4
3737
3838 let idxInternalAssetId = 1
3939
4040 let idxResutActions = 2
4141
4242 let idxIfAssetIdCalculationPerformed = 3
4343
4444 let idxPoolAddress = 1
4545
4646 let idxPoolStatus = 2
4747
4848 let idxPoolLPAssetId = 3
4949
5050 let idxAmtAssetId = 4
5151
5252 let idxPriceAssetId = 5
5353
5454 let idxAmtAssetDcm = 6
5555
5656 let idxPriceAssetDcm = 7
5757
5858 let idxIAmtAssetId = 8
5959
6060 let idxIPriceAssetId = 9
6161
6262 let idxLPAssetDcm = 10
6363
6464 let idxPoolType = 11
6565
6666 let poolLabelWxEmission = "WX_EMISSION"
6767
6868 let validPoolLabels = [poolLabelWxEmission]
6969
7070 func keyAllowedLpScriptHash () = "%s__allowedLpScriptHash"
7171
7272
7373 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
7474
7575
7676 func keyAllowedLpStableAddonScriptHash () = "%s__allowedLpStableAddonScriptHash"
7777
7878
7979 func swapContract () = "%s__swapContract"
8080
8181
8282 func keyFactoryConfig () = "%s__factoryConfig"
8383
8484
8585 func keyLpTokensList () = "%s__lpTokensList"
8686
8787
8888 func keyPoolScriptHash () = "%s%s__pool__scriptHash"
8989
9090
9191 func keyMatcherPub () = "%s%s__matcher__publicKey"
9292
9393
9494 func keyLegacyFactoryContract () = "%s__legacyFactoryContract"
9595
9696
9797 func keyLegacyPools () = "%s__legacyPools"
9898
9999
100100 func keyManagerPublicKey () = "%s__managerPublicKey"
101101
102102
103103 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
104104
105105
106106 func keyAdminPubKeys () = "%s__adminPubKeys"
107107
108108
109109 func keyAssetsStoreContract () = "%s__assetsStoreContract"
110110
111111
112112 func keyVotingEmissionContract () = "%s__votingEmissionContract"
113113
114114
115115 func keyPriceAssets () = makeString(["%s", "priceAssets"], SEP)
116116
117117
118118 func keyPriceDecimals () = "%s__priceDecimals"
119119
120120
121121 func keyAllPoolsShutdown () = "%s__shutdown"
122122
123123
124124 func keyNextInternalAssetId () = "%s__nextInternalAssetId"
125125
126126
127127 func keyPoolToWeight (poolAddress) = ("%s%s__poolWeight__" + poolAddress)
128128
129129
130130 func keyPoolToWeightHistory (poolAddress,num) = ((("%s%s__poolWeight__" + poolAddress) + "__") + toString(num))
131131
132132
133133 func keyMappingsInternal2baseAssetId (internalBaseAsset) = ("%s%s%d__mappings__internal2baseAssetId__" + toString(internalBaseAsset))
134134
135135
136136 func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
137137
138138
139139 func keyPoolConfig (amountAssetInternal,priceAssetInternal) = (((("%d%d%s__" + amountAssetInternal) + "__") + priceAssetInternal) + "__config")
140140
141141
142142 func keyPoolOneTokenOperationsDisabled (assetsInternal) = {
143143 let $t037543816 = assetsInternal
144144 let amountAssetInternal = $t037543816._1
145145 let priceAssetInternal = $t037543816._2
146146 makeString(["%d%d%s", toString(amountAssetInternal), toString(priceAssetInternal), "oneTokenOperationsDisabled"], SEP)
147147 }
148148
149149
150150 func keyAllPoolsOneTokenOperationsDisabled () = makeString(["%s", "oneTokenOperationsDisabled"], SEP)
151151
152152
153153 func keyMappingLpAssetToPoolAssets (lpAssetStr) = (("%s%s%s__" + lpAssetStr) + "__mappings__lpAsset2Pool")
154154
155155
156156 func keyMappingPoolAssetsToLpasset (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + internalAmountAssetIdStr) + "__") + internalPriceAssetIdStr) + "__mappings__PoolAssets2LpAsset")
157157
158158
159159 func keyPoolSpread (poolAddress) = ("%s%s__spread__" + poolAddress)
160160
161161
162162 func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2PoolAssets")
163163
164164
165165 func keyMappingPoolAssetsToPoolContractAddress (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + toString(internalAmountAssetIdStr)) + "__") + toString(internalPriceAssetIdStr)) + "__mappings__poolAssets2PoolContract")
166166
167167
168168 func keyMappingPoolContractToLPAsset (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
169169
170170
171171 func keyMappingPoolLPAssetToPoolContractAddress (lpAssetStr) = (("%s%s%s__" + lpAssetStr) + "__mappings__lpAsset2PoolContract")
172172
173173
174174 func keyWxEmission (amountAssetId,priceAssetId) = ((("%s%s%s__wxEmission__" + amountAssetId) + "__") + priceAssetId)
175175
176176
177177 func keyInFee (poolAddress) = ("%s%s__inFee__" + poolAddress)
178178
179179
180180 func keyInFeeDefault () = "%s__inFeeDefault"
181181
182182
183183 func keyOutFee (poolAddress) = ("%s%s__outFee__" + poolAddress)
184184
185185
186186 func keyOutFeeDefault () = "%s__outFeeDefault"
187187
188188
189189 func keySkipOrderValidation (poolAddress) = ("%s%s__skipOrderValidation__" + poolAddress)
190190
191191
192192 func keyChangeAmpDelay (poolAddress) = ("%s%s__changeAmpDelay__" + poolAddress)
193193
194194
195195 func keyChangeAmpDelta (poolAddress) = ("%s%s__changeAmpDelta__" + poolAddress)
196196
197197
198198 func keyChangeAmpTarget (poolAddress) = ("%s%s__changeAmpTarget__" + poolAddress)
199199
200200
201201 func keySWavesProxyAddress () = "%s__sWavesProxyAddress"
202202
203203
204204 func keySWavesAssetId () = "%s__sWavesAssetId"
205205
206206
207207 func keyStakingProfitAddress () = "%s__stakingProfitAddress"
208208
209209
210210 func keyLeasedRatio (poolAddress,assetId) = makeString(["%s%s%s", "leasedRatio", poolAddress, assetId], SEP)
211211
212212
213213 func keyLeasedRatioDefault (assetId) = makeString(["%s%s", "leasedRatioDefault", assetId], SEP)
214214
215215
216216 func keyLeasedRatioTolerance (poolAddress,assetId) = makeString(["%s%s%s", "leasedRatioTolerance", poolAddress, assetId], SEP)
217217
218218
219219 func keyMinBalance (poolAddress,assetId) = makeString(["%s%s%s", "minBalance", poolAddress, assetId], SEP)
220220
221221
222222 func keyMinBalanceDefault (assetId) = makeString(["%s%s", "minBalanceDefault", assetId], SEP)
223223
224224
225225 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), ("No data for this.key=" + key))
226226
227227
228228 func getBooleanOrFail (key) = valueOrErrorMessage(getBoolean(this, key), ("No data for this.key=" + key))
229229
230230
231231 func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), ("No data for this.key=" + key))
232232
233233
234234 func parseAssetId (input) = if ((input == wavesString))
235235 then unit
236236 else fromBase58String(input)
237237
238238
239239 let IdxFactoryCfgStakingDapp = 1
240240
241241 let IdxFactoryCfgBoostingDapp = 2
242242
243243 let IdxFactoryCfgIdoDapp = 3
244244
245245 let IdxFactoryCfgTeamDapp = 4
246246
247247 let IdxFactoryCfgEmissionDapp = 5
248248
249249 let IdxFactoryCfgRestDapp = 6
250250
251251 let IdxFactoryCfgSlippageDapp = 7
252252
253253 let IdxFactoryCfgDaoDapp = 8
254254
255255 let IdxFactoryCfgMarketingDapp = 9
256256
257257 let IdxFactoryCfgGwxRewardDapp = 10
258258
259259 let IdxFactoryCfgBirdsDapp = 11
260260
261261 func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp])
262262
263263
264264 func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp])
265265
266266
267267 func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp])
268268
269269
270270 func getGwxRewardAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgGwxRewardDapp])
271271
272272
273273 func getPriceAssets () = match getString(keyPriceAssets()) {
274274 case s: String =>
275275 if ((size(s) == 0))
276276 then nil
277277 else split(s, SEP)
278278 case _ =>
279279 nil
280280 }
281281
282282
283283 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
284284 case s: String =>
285285 fromBase58String(s)
286286 case _: Unit =>
287287 unit
288288 case _ =>
289289 throw("Match error")
290290 }
291291
292292
293293 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
294294 case s: String =>
295295 fromBase58String(s)
296296 case _: Unit =>
297297 unit
298298 case _ =>
299299 throw("Match error")
300300 }
301301
302302
303303 let permissionDeniedError = throw("Permission denied")
304304
305305 let testError = throw("Test error here")
306306
307307 func mustThis (i) = if ((i.caller == this))
308308 then true
309309 else permissionDeniedError
310310
311311
312312 func mustManager (i) = match managerPublicKeyOrUnit() {
313313 case pk: ByteVector =>
314314 if ((i.callerPublicKey == pk))
315315 then true
316316 else permissionDeniedError
317317 case _: Unit =>
318318 mustThis(i)
319319 case _ =>
320320 throw("Match error")
321321 }
322322
323323
324324 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)
325325
326326
327327 func dataFactoryCfg (stakingAddress,boostingAddress,idoContract,teamContract,emissionContract,restContract,slippageContract) = makeString(["%s%s%s%s%s%s", stakingAddress, boostingAddress, idoContract, teamContract, emissionContract, restContract, slippageContract], SEP)
328328
329329
330330 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)
331331
332332
333333 func dataMappingPoolAssets (internalAmountAssetStr,internalPriceAssetStr) = makeString(["%d%d", toString(internalAmountAssetStr), toString(internalPriceAssetStr)], SEP)
334334
335335
336336 func getPoolConfig (poolAddress) = {
337337 let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolAddress)), SEP)
338338 let amountAssetInternal = poolAssets[1]
339339 let priceAssetInternal = poolAssets[2]
340340 split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP)
341341 }
342342
343343
344344 func getInternalAssetIdOrCreate (assetIdStr,incrementor) = {
345345 let internalAssetId = valueOrElse(getInteger(this, keyMappingsBaseAsset2internalId(assetIdStr)), 0)
346346 let currentIndexOfInternalId = valueOrElse(getInteger(this, keyNextInternalAssetId()), 0)
347347 let result = if ((internalAssetId == 0))
348348 then {
349349 let newInternalAssetId = (currentIndexOfInternalId + incrementor)
350350 $Tuple3(newInternalAssetId, [IntegerEntry(keyNextInternalAssetId(), newInternalAssetId), IntegerEntry(keyMappingsBaseAsset2internalId(assetIdStr), newInternalAssetId), StringEntry(keyMappingsInternal2baseAssetId(newInternalAssetId), assetIdStr)], true)
351351 }
352352 else $Tuple3(internalAssetId, nil, false)
353353 result
354354 }
355355
356356
357357 func mustAdmin (i) = {
358358 let adminPKs = split(valueOrElse(getString(keyAdminPubKeys()), EMPTY), SEP)
359359 if (containsElement(adminPKs, toBase58String(i.callerPublicKey)))
360360 then true
361361 else {
362362 let isManager = mustManager(i)
363363 if ((isManager == isManager))
364364 then true
365365 else throw("Strict value is not equal to itself.")
366366 }
367367 }
368368
369369
370370 func intOrDefaultOrFallback (key,keyDefault,valueFallback) = valueOrElse(getInteger(this, key), valueOrElse(getInteger(this, keyDefault), valueFallback))
371371
372372
373373 func poolExistsInternal (amountAssetId,priceAssetId) = {
374374 let amountAssetInternal = getInteger(keyMappingsBaseAsset2internalId(amountAssetId))
375375 let priceAssetInternal = getInteger(keyMappingsBaseAsset2internalId(priceAssetId))
376376 if (if ((amountAssetInternal == unit))
377377 then true
378378 else (priceAssetInternal == unit))
379379 then false
380380 else {
381381 let amAs = toString(value(amountAssetInternal))
382382 let prAs = toString(value(priceAssetInternal))
383383 let cfg = getString(keyPoolConfig(amAs, prAs))
384384 let cfgReverse = getString(keyPoolConfig(prAs, amAs))
385385 let exists = if ((cfg != unit))
386386 then true
387387 else (cfgReverse != unit)
388388 exists
389389 }
390390 }
391391
392392
393393 @Callable(i)
394394 func getSwapContractREADONLY () = $Tuple2(nil, getStringOrFail(swapContract()))
395395
396396
397397
398398 @Callable(i)
399399 func getPoolLeaseConfigREADONLY (poolAddress,assetId) = {
400400 let $t01430514609 = match getInteger(this, keyLeasedRatio(poolAddress, assetId)) {
401401 case r: Int =>
402402 $Tuple2(true, min([100, max([0, r])]))
403403 case _ =>
404404 match getInteger(this, keyLeasedRatioDefault(assetId)) {
405405 case rd: Int =>
406406 $Tuple2(true, min([100, max([0, rd])]))
407407 case _ =>
408408 $Tuple2(false, 0)
409409 }
410410 }
411411 let isLeasable = $t01430514609._1
412412 let leasedRatio = $t01430514609._2
413413 let minBalance = match getInteger(this, keyMinBalance(poolAddress, assetId)) {
414414 case b: Int =>
415415 max([0, b])
416416 case _ =>
417417 match getInteger(this, keyMinBalanceDefault(assetId)) {
418418 case bd: Int =>
419419 max([0, bd])
420420 case _ =>
421421 0
422422 }
423423 }
424424 let $t01487515099 = if ((assetId == "WAVES"))
425425 then $Tuple3(valueOrElse(getString(this, keySWavesProxyAddress()), ""), getString(this, valueOrElse(keySWavesAssetId(), "")), MULT12)
426426 else $Tuple3("", "", 0)
427427 let proxyAddress = $t01487515099._1
428428 let proxyAssetId = $t01487515099._2
429429 let proxyRateMul = $t01487515099._3
430430 let stakingProfitAddress = valueOrElse(getString(this, keyStakingProfitAddress()), "")
431431 $Tuple2(nil, $Tuple7(isLeasable, leasedRatio, minBalance, proxyAddress, proxyAssetId, proxyRateMul, stakingProfitAddress))
432432 }
433433
434434
435435
436436 @Callable(i)
437437 func getLpAssetFromPoolAssetsREADONLY (asset1,asset2) = if (if ((asset1 == "8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS"))
438438 then (asset2 == "WAVES")
439439 else false)
440440 then $Tuple2(nil, unit)
441441 else {
442442 let assetNum1 = value(getInteger(this, keyMappingsBaseAsset2internalId(asset1)))
443443 let assetNum2 = value(getInteger(this, keyMappingsBaseAsset2internalId(asset2)))
444444 let ee = getString(this, keyMappingPoolAssetsToLpasset(toString(assetNum1), toString(assetNum2)))
445445 let res = if ((ee == unit))
446446 then unit
447447 else drop(value(ee), 4)
448448 $Tuple2(nil, res)
449449 }
450450
451451
452452
453453 @Callable(i)
454454 func getPoolAddressFromLpAssetREADONLY (lp) = $Tuple2(nil, valueOrElse(getString(this, keyMappingPoolLPAssetToPoolContractAddress(lp)), ""))
455455
456456
457457
458458 @Callable(i)
459459 func constructor (stakingContract,boostingContract,idoContract,teamContract,emissionContract,restContract,slpipageContract,priceDecimals) = {
460460 let checkCaller = mustManager(i)
461461 if ((checkCaller == checkCaller))
462462 then [StringEntry(keyFactoryConfig(), dataFactoryCfg(stakingContract, boostingContract, idoContract, teamContract, emissionContract, restContract, slpipageContract)), IntegerEntry(keyPriceDecimals(), priceDecimals)]
463463 else throw("Strict value is not equal to itself.")
464464 }
465465
466466
467467
468468 @Callable(i)
469469 func constructorV2 (mathcherPub58Str) = {
470470 let checkCaller = mustManager(i)
471471 if ((checkCaller == checkCaller))
472472 then {
473473 let mathcerPub = addressFromPublicKey(fromBase58String(mathcherPub58Str))
474474 if ((mathcerPub == mathcerPub))
475475 then [StringEntry(keyMatcherPub(), mathcherPub58Str)]
476476 else throw("Strict value is not equal to itself.")
477477 }
478478 else throw("Strict value is not equal to itself.")
479479 }
480480
481481
482482
483483 @Callable(i)
484484 func constructorV3 (daoContract,marketingContract,gwxRewardsContract,birdsContract) = {
485485 let checkCaller = mustManager(i)
486486 if ((checkCaller == checkCaller))
487487 then {
488488 let factoryCfg = split(getStringOrFail(keyFactoryConfig()), SEP)
489489 [StringEntry(keyFactoryConfig(), dataFactoryCfgV3(factoryCfg[1], factoryCfg[2], factoryCfg[3], factoryCfg[4], factoryCfg[5], factoryCfg[6], factoryCfg[7], daoContract, marketingContract, gwxRewardsContract, birdsContract))]
490490 }
491491 else throw("Strict value is not equal to itself.")
492492 }
493493
494494
495495
496496 @Callable(i)
497497 func constructorV4 (legacyFactoryContract,legacyPools) = {
498498 let checkCaller = mustManager(i)
499499 if ((checkCaller == checkCaller))
500500 then [StringEntry(keyLegacyFactoryContract(), legacyFactoryContract), StringEntry(keyLegacyPools(), makeString(legacyPools, SEP))]
501501 else throw("Strict value is not equal to itself.")
502502 }
503503
504504
505505
506506 @Callable(i)
507507 func constructorV5 (assetsStoreContract) = {
508508 let checkCaller = mustManager(i)
509509 if ((checkCaller == checkCaller))
510510 then [StringEntry(keyAssetsStoreContract(), assetsStoreContract)]
511511 else throw("Strict value is not equal to itself.")
512512 }
513513
514514
515515
516516 @Callable(i)
517517 func constructorV6 (votingEmissionContract,priceAssets) = {
518518 let cheks = [mustManager(i), if ((addressFromString(votingEmissionContract) != unit))
519519 then true
520520 else "invalid voting emission contract address"]
521521 if ((cheks == cheks))
522522 then [StringEntry(keyVotingEmissionContract(), votingEmissionContract), StringEntry(keyPriceAssets(), makeString(priceAssets, SEP))]
523523 else throw("Strict value is not equal to itself.")
524524 }
525525
526526
527527
528528 @Callable(i)
529529 func setManager (pendingManagerPublicKey) = {
530530 let checkCaller = mustManager(i)
531531 if ((checkCaller == checkCaller))
532532 then {
533533 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
534534 if ((checkManagerPublicKey == checkManagerPublicKey))
535535 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
536536 else throw("Strict value is not equal to itself.")
537537 }
538538 else throw("Strict value is not equal to itself.")
539539 }
540540
541541
542542
543543 @Callable(i)
544544 func confirmManager () = {
545545 let pm = pendingManagerPublicKeyOrUnit()
546546 let hasPM = if (isDefined(pm))
547547 then true
548548 else throw("No pending manager")
549549 if ((hasPM == hasPM))
550550 then {
551551 let checkPM = if ((i.callerPublicKey == value(pm)))
552552 then true
553553 else throw("You are not pending manager")
554554 if ((checkPM == checkPM))
555555 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
556556 else throw("Strict value is not equal to itself.")
557557 }
558558 else throw("Strict value is not equal to itself.")
559559 }
560560
561561
562562
563563 @Callable(i)
564564 func setAdmins (adminPubKeys) = {
565565 let checkCaller = mustManager(i)
566566 if ((checkCaller == checkCaller))
567567 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
568568 else throw("Strict value is not equal to itself.")
569569 }
570570
571571
572572
573573 @Callable(i)
574574 func activateNewPool (poolAddress,amountAssetStr,priceAssetStr,lpAssetName,lpAssetDescr,poolWeight,poolType,logo) = {
575575 let checkCaller = mustAdmin(i)
576576 if ((checkCaller == checkCaller))
577577 then if (isDefined(getString(keyMappingPoolContractAddressToPoolAssets(poolAddress))))
578578 then throw((("Pool address " + poolAddress) + " already registered."))
579579 else {
580580 let internalAmountAssetData = getInternalAssetIdOrCreate(amountAssetStr, 1)
581581 let internalAmountAssetId = internalAmountAssetData._1
582582 let internalPriceAssetData = getInternalAssetIdOrCreate(priceAssetStr, if (internalAmountAssetData._3)
583583 then 2
584584 else 1)
585585 let internalPriceAssetId = internalPriceAssetData._1
586586 let poolAccountScriptHash = valueOrErrorMessage(scriptHash(addressFromStringValue(poolAddress)), ("No script has been found on pool account " + poolAddress))
587587 let ethalonPoolAccountScriptHash = getBinaryValue(keyPoolScriptHash())
588588 let poolExists = poolExistsInternal(amountAssetStr, priceAssetStr)
589589 if (poolExists)
590590 then throw((((("Pool " + amountAssetStr) + "/") + priceAssetStr) + " has already been activated."))
591591 else {
592592 let poolConfigValue = value(getString(this, keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId))))
593593 let amountAssetsDecimals = if ((amountAssetStr == "WAVES"))
594594 then decimalsMultPrice
595595 else pow(10, 0, value(assetInfo(fromBase58String(amountAssetStr))).decimals, 0, 0, DOWN)
596596 let priceAssetsDecimals = if ((priceAssetStr == "WAVES"))
597597 then decimalsMultPrice
598598 else pow(10, 0, value(assetInfo(fromBase58String(priceAssetStr))).decimals, 0, 0, DOWN)
599599 let lpAssetIssueAction = Issue(lpAssetName, lpAssetDescr, 1, 8, true)
600600 let lpAssetId = calculateAssetId(lpAssetIssueAction)
601601 let lpAssetIdStr = toBase58String(lpAssetId)
602602 let poolActivateInvokeResult = invoke(addressFromStringValue(poolAddress), "activate", [amountAssetStr, priceAssetStr], nil)
603603 if ((poolActivateInvokeResult == poolActivateInvokeResult))
604604 then if ((poolActivateInvokeResult != "success"))
605605 then throw("Pool initialisation error happened.")
606606 else {
607607 let assetsStoreContract = addressFromStringValue(getStringOrFail(keyAssetsStoreContract()))
608608 let createOrUpdateLpAssetInv = invoke(assetsStoreContract, "createOrUpdate", [lpAssetIdStr, lpAssetName, false], nil)
609609 if ((createOrUpdateLpAssetInv == createOrUpdateLpAssetInv))
610610 then {
611611 let addPoolsLpLabelInv = invoke(assetsStoreContract, "addLabel", [lpAssetIdStr, labelPoolsLp], nil)
612612 if ((addPoolsLpLabelInv == addPoolsLpLabelInv))
613613 then {
614614 let setLogoInv = invoke(assetsStoreContract, "setLogo", [lpAssetIdStr, logo], nil)
615615 if ((setLogoInv == setLogoInv))
616616 then {
617617 let addAssetsLinkInv = invoke(assetsStoreContract, "addAssetsLink", [amountAssetStr, priceAssetStr, lpAssetIdStr], nil)
618618 if ((addAssetsLinkInv == addAssetsLinkInv))
619619 then {
620620 let increaseAssetPoolsNumberInv = invoke(assetsStoreContract, "increaseAssetPoolsNumber", [amountAssetStr], nil)
621621 if ((increaseAssetPoolsNumberInv == increaseAssetPoolsNumberInv))
622622 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)
623623 else throw("Strict value is not equal to itself.")
624624 }
625625 else throw("Strict value is not equal to itself.")
626626 }
627627 else throw("Strict value is not equal to itself.")
628628 }
629629 else throw("Strict value is not equal to itself.")
630630 }
631631 else throw("Strict value is not equal to itself.")
632632 }
633633 else throw("Strict value is not equal to itself.")
634634 }
635635 }
636636 else throw("Strict value is not equal to itself.")
637637 }
638638
639639
640640
641641 @Callable(i)
642642 func managePool (poolAddress,newStatus) = {
643643 let checkCaller = mustManager(i)
644644 if ((checkCaller == checkCaller))
645645 then {
646646 let poolConfig = getPoolConfig(poolAddress)
647647 let poolStatus = poolConfig[idxPoolStatus]
648648 let lpAssetIdStr = poolConfig[idxPoolLPAssetId]
649649 let amountAssetStr = poolConfig[idxAmtAssetId]
650650 let priceAssetStr = poolConfig[idxPriceAssetId]
651651 let amountAssetsDecimals = parseIntValue(poolConfig[idxAmtAssetDcm])
652652 let priceAssetsDecimals = parseIntValue(poolConfig[idxPriceAssetDcm])
653653 let internalAmountAssetId = parseIntValue(poolConfig[idxIAmtAssetId])
654654 let internalPriceAssetId = parseIntValue(poolConfig[idxIPriceAssetId])
655655 let lpAssetDcm = parseIntValue(poolConfig[idxLPAssetDcm])
656656 let poolType = poolConfig[idxPoolType]
657657 [StringEntry(keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId)), dataPoolCfg(poolAddress, toString(newStatus), lpAssetIdStr, amountAssetStr, priceAssetStr, amountAssetsDecimals, priceAssetsDecimals, internalAmountAssetId, internalPriceAssetId, lpAssetDcm, poolType))]
658658 }
659659 else throw("Strict value is not equal to itself.")
660660 }
661661
662662
663663
664664 @Callable(i)
665665 func emit (amountToEmit) = {
666666 let caller = i.caller
667667 let originCaller = i.originCaller
668668 let lpAssetRequested = valueOrErrorMessage(getString(keyMappingPoolContractToLPAsset(toString(caller))), "Invalid LP address called me.")
669669 let lpAsset = fromBase58String(lpAssetRequested)
670670 let legacyPools = split(valueOrElse(getString(keyLegacyPools()), EMPTY), SEP)
671671 let legacyFactoryContract = addressFromStringValue(valueOrErrorMessage(getString(keyLegacyFactoryContract()), "Legacy factory contract does not exists."))
672672 if ((0 >= amountToEmit))
673673 then nil
674674 else if (containsElement(legacyPools, toString(caller)))
675675 then $Tuple2(nil, legacyFactoryContract)
676676 else $Tuple2([Reissue(lpAsset, amountToEmit, true), ScriptTransfer(i.caller, amountToEmit, lpAsset)], "success")
677677 }
678678
679679
680680
681681 @Callable(i)
682682 func burn (amountToBurn) = {
683683 let caller = i.caller
684684 let originCaller = i.originCaller
685685 let payment = value(i.payments[0])
686686 let paymentAmount = value(payment.amount)
687687 let inAmountAssetId = toBase58String(value(payment.assetId))
688688 let lpAssetRequestedForBurning = valueOrErrorMessage(getString(keyMappingPoolContractToLPAsset(toString(caller))), "Invalid LP address called me.")
689689 if ((inAmountAssetId != lpAssetRequestedForBurning))
690690 then throw("Invalid asset passed.")
691691 else if ((amountToBurn != paymentAmount))
692692 then throw("Invalid amount passed.")
693693 else {
694694 let lpAsset = fromBase58String(lpAssetRequestedForBurning)
695695 $Tuple2([Burn(lpAsset, amountToBurn)], "success")
696696 }
697697 }
698698
699699
700700
701701 @Callable(i)
702702 func modifyWeight (lpAssetId,share) = {
703703 let checkCaller = if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionContract()), "")))
704704 then true
705705 else mustManager(i)
706706 if ((checkCaller == checkCaller))
707707 then {
708708 let poolContractAddress = getStringOrFail(keyMappingPoolLPAssetToPoolContractAddress(lpAssetId))
709709 let poolWeightKey = keyPoolToWeight(poolContractAddress)
710710 let gwxWeightKey = keyPoolToWeight(GWXvirtualPOOL)
711711 let gwxWeight = valueOrElse(getInteger(gwxWeightKey), 0)
712712 let poolWeight = valueOrElse(getInteger(poolWeightKey), 0)
713713 let poolWeightNew = share
714714 let factoryCfg = split(getStringOrFail(keyFactoryConfig()), SEP)
715715 let stakingContract = getStakingAddressOrFail(factoryCfg)
716716 let onModifyWeightInv = invoke(stakingContract, "onModifyWeight", [lpAssetId, poolContractAddress], nil)
717717 if ((onModifyWeightInv == onModifyWeightInv))
718718 then {
719719 let gwxVirtualPoolActions = if ((gwxWeight == 0))
720720 then nil
721721 else [IntegerEntry(gwxWeightKey, 0)]
722722 let poolWeightHistoryKey = keyPoolToWeightHistory(poolContractAddress, 0)
723723 let poolWeightHistoryOrUnit = getInteger(poolWeightHistoryKey)
724724 let poolWeightHistoryActions = if ((poolWeightHistoryOrUnit == unit))
725725 then nil
726726 else [DeleteEntry(poolWeightHistoryKey)]
727727 (([IntegerEntry(poolWeightKey, poolWeightNew)] ++ gwxVirtualPoolActions) ++ poolWeightHistoryActions)
728728 }
729729 else throw("Strict value is not equal to itself.")
730730 }
731731 else throw("Strict value is not equal to itself.")
732732 }
733733
734734
735735
736736 @Callable(i)
737737 func modifyWeights (btcPoolAddress,ethPoolAddress,ethBtcPoolAddress,usdcUsdtPoolAddress) = {
738738 let checkCaller = mustManager(i)
739739 if ((checkCaller == checkCaller))
740740 then {
741741 let ethBtcWeightNew = ((5 * POOLWEIGHTMULT) / 100)
742742 let usdcUsdtWeightNew = ((5 * POOLWEIGHTMULT) / 100)
743743 let weightDecrement = ((5 * POOLWEIGHTMULT) / 100)
744744 let factoryCfg = split(getStringOrFail(keyFactoryConfig()), SEP)
745745 let stakingDapp = getStakingAddressOrFail(factoryCfg)
746746 let gwxRewardDapp = getGwxRewardAddressOrFail(factoryCfg)
747747 let btcWeightKEY = keyPoolToWeight(btcPoolAddress)
748748 let ethWeightKEY = keyPoolToWeight(ethPoolAddress)
749749 let ethBtcWeightKEY = keyPoolToWeight(ethBtcPoolAddress)
750750 let usdcUsdtWeightKEY = keyPoolToWeight(usdcUsdtPoolAddress)
751751 let btcWeight = getIntOrFail(btcWeightKEY)
752752 let ethWeight = getIntOrFail(ethWeightKEY)
753753 let btcWeightNew = (btcWeight - weightDecrement)
754754 let ethWeightNew = (ethWeight - weightDecrement)
755755 if ((0 >= btcWeightNew))
756756 then throw(("invalid btcWeightNew: " + toString(btcWeightNew)))
757757 else if ((0 >= ethWeightNew))
758758 then throw(("invalid ethWeightNew: " + toString(ethWeightNew)))
759759 else {
760760 let btcLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(btcPoolAddress))
761761 let ethLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(ethPoolAddress))
762762 let ethBtcLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(ethBtcPoolAddress))
763763 let usdcUsdtLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(usdcUsdtPoolAddress))
764764 let onModifyWeightBtc = invoke(stakingDapp, "onModifyWeight", [btcLpAssetIdStr, btcPoolAddress], nil)
765765 if ((onModifyWeightBtc == onModifyWeightBtc))
766766 then {
767767 let onModifyWeightEth = invoke(stakingDapp, "onModifyWeight", [ethLpAssetIdStr, ethPoolAddress], nil)
768768 if ((onModifyWeightEth == onModifyWeightEth))
769769 then {
770770 let onModifyWeightEthBtc = invoke(stakingDapp, "onModifyWeight", [ethBtcLpAssetIdStr, ethBtcPoolAddress], nil)
771771 if ((onModifyWeightEthBtc == onModifyWeightEthBtc))
772772 then {
773773 let onModifyWeightUsdcUsdt = invoke(stakingDapp, "onModifyWeight", [usdcUsdtLpAssetIdStr, usdcUsdtPoolAddress], nil)
774774 if ((onModifyWeightUsdcUsdt == onModifyWeightUsdcUsdt))
775775 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)]
776776 else throw("Strict value is not equal to itself.")
777777 }
778778 else throw("Strict value is not equal to itself.")
779779 }
780780 else throw("Strict value is not equal to itself.")
781781 }
782782 else throw("Strict value is not equal to itself.")
783783 }
784784 }
785785 else throw("Strict value is not equal to itself.")
786786 }
787787
788788
789789
790790 @Callable(i)
791791 func checkWxEmissionPoolLabel (amountAssetId,priceAssetId) = {
792792 let haveLabel = match getBoolean(keyWxEmission(amountAssetId, priceAssetId)) {
793793 case b: Boolean =>
794794 b
795795 case _ =>
796796 false
797797 }
798798 $Tuple2(nil, haveLabel)
799799 }
800800
801801
802802
803803 @Callable(i)
804804 func setWxEmissionPoolLabel (amountAssetId,priceAssetId) = {
805805 let checkCaller = mustAdmin(i)
806806 if ((checkCaller == checkCaller))
807807 then $Tuple2([BooleanEntry(keyWxEmission(amountAssetId, priceAssetId), true)], unit)
808808 else throw("Strict value is not equal to itself.")
809809 }
810810
811811
812812
813813 @Callable(i)
814814 func deleteWxEmissionPoolLabel (amountAssetId,priceAssetId) = {
815815 let checkCaller = if (mustThis(i))
816816 then true
817817 else mustAdmin(i)
818818 if ((checkCaller == checkCaller))
819819 then $Tuple2([DeleteEntry(keyWxEmission(amountAssetId, priceAssetId))], unit)
820820 else throw("Strict value is not equal to itself.")
821821 }
822822
823823
824824
825825 @Callable(i)
826826 func onVerificationLoss (assetId) = {
827827 let checkCaller = if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyAssetsStoreContract()), "")))
828828 then true
829829 else mustManager(i)
830830 if ((checkCaller == checkCaller))
831831 then {
832832 let priceAssets = getPriceAssets()
833833 let checkPriceAssetsSize = if ((size(priceAssets) > 0))
834834 then true
835835 else throw("invalid price assets")
836836 if ((checkPriceAssetsSize == checkPriceAssetsSize))
837837 then {
838838 func cb (acc,priceAsset) = {
839839 let r = invoke(this, "deleteWxEmissionPoolLabel", [assetId, priceAsset], nil)
840840 if ((r == r))
841841 then unit
842842 else throw("Strict value is not equal to itself.")
843843 }
844844
845845 let actions = {
846846 let $l = priceAssets
847847 let $s = size($l)
848848 let $acc0 = unit
849849 func $f0_1 ($a,$i) = if (($i >= $s))
850850 then $a
851851 else cb($a, $l[$i])
852852
853853 func $f0_2 ($a,$i) = if (($i >= $s))
854854 then $a
855855 else throw("List size exceeds 2")
856856
857857 $f0_2($f0_1($f0_1($acc0, 0), 1), 2)
858858 }
859859 if ((actions == actions))
860860 then $Tuple2(nil, unit)
861861 else throw("Strict value is not equal to itself.")
862862 }
863863 else throw("Strict value is not equal to itself.")
864864 }
865865 else throw("Strict value is not equal to itself.")
866866 }
867867
868868
869869
870870 @Callable(i)
871871 func isPoolOneTokenOperationsDisabledREADONLY (poolAddress) = {
872872 let poolConfig = getPoolConfig(poolAddress)
873873 let assetsInternal = $Tuple2(parseIntValue(poolConfig[idxIAmtAssetId]), parseIntValue(poolConfig[idxIPriceAssetId]))
874874 let poolOneTokenOperationsDisabled = valueOrElse(getBoolean(keyPoolOneTokenOperationsDisabled(assetsInternal)), false)
875875 let allPoolsOneTokenOperationsDisabled = valueOrElse(getBoolean(keyAllPoolsOneTokenOperationsDisabled()), false)
876876 $Tuple2(nil, if (allPoolsOneTokenOperationsDisabled)
877877 then true
878878 else poolOneTokenOperationsDisabled)
879879 }
880880
881881
882882
883883 @Callable(i)
884884 func getInFeeREADONLY (poolAddress) = {
885885 let fee = intOrDefaultOrFallback(keyInFee(poolAddress), keyInFeeDefault(), 0)
886886 $Tuple2(nil, fee)
887887 }
888888
889889
890890
891891 @Callable(i)
892892 func getOutFeeREADONLY (poolAddress) = {
893893 let fee = intOrDefaultOrFallback(keyOutFee(poolAddress), keyOutFeeDefault(), fraction(10, MULT8, 10000))
894894 $Tuple2(nil, fee)
895895 }
896896
897897
898898
899899 @Callable(i)
900900 func poolInfoREADONLY (amountAssetIdStr,priceAssetIdStr) = {
901901 let amountAssetInternalIdOption = getInteger(this, keyMappingsBaseAsset2internalId(amountAssetIdStr))
902902 let priceAssetInternalIdOption = getInteger(this, keyMappingsBaseAsset2internalId(priceAssetIdStr))
903903 let poolContractAddressOption = getString(this, keyMappingPoolAssetsToPoolContractAddress(value(amountAssetInternalIdOption), value(priceAssetInternalIdOption)))
904904 let lpAssetIdOption = getString(this, keyMappingPoolContractToLPAsset(value(poolContractAddressOption)))
905905 let poolExists = if (if (isDefined(amountAssetInternalIdOption))
906906 then isDefined(priceAssetInternalIdOption)
907907 else false)
908908 then isDefined(poolContractAddressOption)
909909 else false
910910 let poolInfo = if (poolExists)
911911 then $Tuple2(addressFromStringValue(value(poolContractAddressOption)), parseAssetId(value(lpAssetIdOption)))
912912 else unit
913913 $Tuple2(nil, poolInfo)
914914 }
915915
916916
917917
918918 @Callable(i)
919919 func getPoolStatusREADONLY (poolAddress) = {
920920 let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolAddress)), SEP)
921921 let amountAssetInternal = poolAssets[1]
922922 let priceAssetInternal = poolAssets[2]
923923 let cfg = split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP)
924924 $Tuple2(nil, parseIntValue(cfg[idxPoolStatus]))
925925 }
926926
927927
928928
929929 @Callable(i)
930930 func getPoolConfigREADONLY (poolAddress) = {
931931 let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolAddress)), SEP)
932932 let amountAssetInternal = poolAssets[1]
933933 let priceAssetInternal = poolAssets[2]
934934 let cfg = split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP)
935935 $Tuple2(nil, cfg)
936936 }
937937
938938
939939
940940 @Callable(i)
941941 func getPoolConfigByLpAssetIdREADONLY (lpAssetIdStr) = {
942942 let poolAssets = split(getStringOrFail(keyMappingLpAssetToPoolAssets(lpAssetIdStr)), SEP)
943943 let amountAssetInternal = poolAssets[1]
944944 let priceAssetInternal = poolAssets[2]
945945 let cfg = split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP)
946946 $Tuple2(nil, cfg)
947947 }
948948
949949
950950
951951 @Callable(i)
952952 func poolExistsREADONLY (amountAssetId,priceAssetId) = $Tuple2(nil, poolExistsInternal(amountAssetId, priceAssetId))
953953
954954
955955
956956 @Callable(i)
957957 func skipOrderValidationREADONLY (poolAddress) = $Tuple2(nil, valueOrElse(getBoolean(keySkipOrderValidation(poolAddress)), false))
958958
959959
960960
961961 @Callable(i)
962962 func getChangeAmpConfigREADONLY (poolAddress) = {
963963 let delay = getIntegerValue(keyChangeAmpDelay(poolAddress))
964964 let delta = getIntegerValue(keyChangeAmpDelta(poolAddress))
965965 let target = getIntegerValue(keyChangeAmpTarget(poolAddress))
966966 $Tuple2(nil, [delay, delta, target])
967967 }
968968
969969
970+
971+@Callable(i)
972+func getPoolWeightREADONLY (lpAssetId) = {
973+ let poolAddress = getStringOrFail(keyMappingPoolLPAssetToPoolContractAddress(lpAssetId))
974+ let weight = valueOrElse(getInteger(keyPoolToWeight(poolAddress)), 0)
975+ $Tuple2(nil, weight)
976+ }
977+
978+
970979 @Verifier(tx)
971980 func verify () = {
972981 let targetPublicKey = match managerPublicKeyOrUnit() {
973982 case pk: ByteVector =>
974983 pk
975984 case _: Unit =>
976985 tx.senderPublicKey
977986 case _ =>
978987 throw("Match error")
979988 }
980989 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
981990 }
982991

github/deemru/w8io/026f985 
86.06 ms