tx · Gz5TfXpAircRUVdWC6McyGBdQUue1GsD7oXaCoS6GyV4

3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai:  -0.02600000 Waves

2023.04.03 16:03 [2518429] smart account 3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai > SELF 0.00000000 Waves

{ "type": 13, "id": "Gz5TfXpAircRUVdWC6McyGBdQUue1GsD7oXaCoS6GyV4", "fee": 2600000, "feeAssetId": null, "timestamp": 1680527023923, "version": 2, "chainId": 84, "sender": "3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai", "senderPublicKey": "2JEaBjtjvMoNGKZmL9QxYefa1VkMJM3vMW8rNvTs9R2H", "proofs": [ "3nUd2wb7rMCnJXE3mR4TBMzbAnKG7R24feWpqEfcHZdnskaJFBk9MncoE27ZjVGJgXzewo7MrjbFeenemRdHXpFL" ], "script": "base64:BgKqKwgCEgASBAoCCAgSBAoCCAgSAwoBCBIKCggICAgICAgIARIDCgEIEgYKBAgICAgSBAoCCBgSAwoBCBIECgIIGBIDCgEIEgASAwoBGBIKCggICAgICAEICBIECgIIARIDCgEBEgMKAQESBAoCCAESBgoECAgICBIECgIICBIECgIICBIECgIICBIDCgEIEgMKAQgSAwoBCBIDCgEIEgQKAggIEgMKAQgSAwoBCBIDCgEIEgQKAggIEgMKAQgSAwoBCCIGU0NBTEU4IgVNVUxUOCIGTVVMVDEyIgdTQ0FMRTE4IgZNVUxUMTgiDlBPT0xXRUlHSFRNVUxUIg5HV1h2aXJ0dWFsUE9PTCIMbGFiZWxQb29sc0xwIg1kZWZhdWx0U3ByZWFkIgt3YXZlc1N0cmluZyIRZGVjaW1hbHNNdWx0UHJpY2UiA1NFUCIFRU1QVFkiClBvb2xBY3RpdmUiD1Bvb2xQdXREaXNhYmxlZCITUG9vbE1hdGNoZXJEaXNhYmxlZCIMUG9vbFNodXRkb3duIhJpZHhJbnRlcm5hbEFzc2V0SWQiD2lkeFJlc3V0QWN0aW9ucyIgaWR4S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se2vbjA7MwiE1DVNehoYpBaPUn7K4x4ELEAEShan Next: AfuyX9LCCj4Uw2dXuXNWSNshHbB61oiFrNHKm4MQgizD Diff:
OldNewDifferences
397397
398398 @Callable(i)
399399 func getPoolLeaseConfigREADONLY (poolAddress,assetId) = {
400- let $t01430514599 = match getInteger(keyLeasedRatio(poolAddress, assetId)) {
400+ let $t01430514609 = match getInteger(this, keyLeasedRatio(poolAddress, assetId)) {
401401 case r: Int =>
402402 $Tuple2(true, min([100, max([0, r])]))
403403 case _ =>
404- match getInteger(keyLeasedRatioDefault(assetId)) {
404+ 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 }
411- let isLeasable = $t01430514599._1
412- let leasedRatio = $t01430514599._2
413- let minBalance = match getInteger(keyMinBalance(poolAddress, assetId)) {
411+ let isLeasable = $t01430514609._1
412+ let leasedRatio = $t01430514609._2
413+ let minBalance = match getInteger(this, keyMinBalance(poolAddress, assetId)) {
414414 case b: Int =>
415415 max([0, b])
416416 case _ =>
417- match getInteger(keyMinBalanceDefault(assetId)) {
417+ match getInteger(this, keyMinBalanceDefault(assetId)) {
418418 case bd: Int =>
419419 max([0, bd])
420420 case _ =>
421421 0
422422 }
423423 }
424- let $t01485515079 = if ((assetId == "WAVES"))
424+ let $t01487515099 = if ((assetId == "WAVES"))
425425 then $Tuple3(valueOrElse(getString(this, keySWavesProxyAddress()), ""), getString(this, valueOrElse(keySWavesAssetId(), "")), MULT12)
426426 else $Tuple3("", "", 0)
427- let proxyAddress = $t01485515079._1
428- let proxyAssetId = $t01485515079._2
429- let proxyRateMul = $t01485515079._3
427+ let proxyAddress = $t01487515099._1
428+ let proxyAssetId = $t01487515099._2
429+ let proxyRateMul = $t01487515099._3
430430 let stakingProfitAddress = valueOrElse(getString(this, keyStakingProfitAddress()), "")
431431 $Tuple2(nil, $Tuple7(isLeasable, leasedRatio, minBalance, proxyAddress, proxyAssetId, proxyRateMul, stakingProfitAddress))
432432 }
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) = {
400- let $t01430514599 = match getInteger(keyLeasedRatio(poolAddress, assetId)) {
400+ let $t01430514609 = match getInteger(this, keyLeasedRatio(poolAddress, assetId)) {
401401 case r: Int =>
402402 $Tuple2(true, min([100, max([0, r])]))
403403 case _ =>
404- match getInteger(keyLeasedRatioDefault(assetId)) {
404+ 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 }
411- let isLeasable = $t01430514599._1
412- let leasedRatio = $t01430514599._2
413- let minBalance = match getInteger(keyMinBalance(poolAddress, assetId)) {
411+ let isLeasable = $t01430514609._1
412+ let leasedRatio = $t01430514609._2
413+ let minBalance = match getInteger(this, keyMinBalance(poolAddress, assetId)) {
414414 case b: Int =>
415415 max([0, b])
416416 case _ =>
417- match getInteger(keyMinBalanceDefault(assetId)) {
417+ match getInteger(this, keyMinBalanceDefault(assetId)) {
418418 case bd: Int =>
419419 max([0, bd])
420420 case _ =>
421421 0
422422 }
423423 }
424- let $t01485515079 = if ((assetId == "WAVES"))
424+ let $t01487515099 = if ((assetId == "WAVES"))
425425 then $Tuple3(valueOrElse(getString(this, keySWavesProxyAddress()), ""), getString(this, valueOrElse(keySWavesAssetId(), "")), MULT12)
426426 else $Tuple3("", "", 0)
427- let proxyAddress = $t01485515079._1
428- let proxyAssetId = $t01485515079._2
429- let proxyRateMul = $t01485515079._3
427+ let proxyAddress = $t01487515099._1
428+ let proxyAssetId = $t01487515099._2
429+ 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
970970 @Verifier(tx)
971971 func verify () = {
972972 let targetPublicKey = match managerPublicKeyOrUnit() {
973973 case pk: ByteVector =>
974974 pk
975975 case _: Unit =>
976976 tx.senderPublicKey
977977 case _ =>
978978 throw("Match error")
979979 }
980980 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
981981 }
982982

github/deemru/w8io/026f985 
190.96 ms