tx · 3Zf7THF2Usw3xNwhyvEWz8j8TXSLVyuqSWr359g8LLg5 3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai: -0.02900000 Waves 2023.08.18 11:03 [2715775] smart account 3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai > SELF 0.00000000 Waves
{ "type": 13, "id": "3Zf7THF2Usw3xNwhyvEWz8j8TXSLVyuqSWr359g8LLg5", "fee": 2900000, "feeAssetId": null, "timestamp": 1692345894315, "version": 2, "chainId": 84, "sender": "3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai", "senderPublicKey": "2JEaBjtjvMoNGKZmL9QxYefa1VkMJM3vMW8rNvTs9R2H", "proofs": [ "2C5G5WczegJg6qiA1RPDUFPScm6qjjHyg2hEayDfZtJuQakt51knVkgwtK5csvckaRm3L1zERVcGckLNqVuNbFuh" ], "script": "base64:BgLlLggCEgASBAoCCAgSBAoCCAgSAwoBCBIKCggICAgICAgIARIDCgEIEgYKBAgICAgSBAoCCBgSAwoBCBIECgIIGBIDCgEYEgoKCAgICAgIAQgIEgQKAggBEgMKAQESAwoBARIECgIIARIGCgQICAgIEgQKAggIEgQKAggIEgQKAggIEgMKAQgSAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEgQKAggIEgMKAQgSAwoBCBIDCgEIEgQKAggIEgMKAQgSAwoBCBIDCgEIEgMKAQgiBlNDQUxFOCIFTVVMVDgiBk1VTFQxMiIHU0NBTEUxOCIGTVVMVDE4Ig5QT09MV0VJR0hUTVVMVCIOR1dYdmlydHVhbFBPT0wiDGxhYmVsUG9vbHNMcCINZGVmYXVsdFNwcmVhZCILd2F2ZXNTdHJpbmciEGNvbnRyYWN0RmlsZW5hbWUiEWRlY2ltYWxzTXVsdFByaWNlIgNTRVAiBUVNUFRZIgpQb29sQWN0aXZlIg9Qb29sUHV0RGlzYWJsZWQiE1Bvb2xNYXRjaGVyRGlzYWJsZWQiDFBvb2xTaHV0ZG93biISaWR4SW50ZXJ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ZXRlRW50cnkBCQECYWUBBQJhRAkAzAgCCQELRGVsZXRlRW50cnkBCQECYUIBBQJhRAkAzAgCCQELRGVsZXRlRW50cnkBCQECYUsBBQJhRAkAzAgCCQELRGVsZXRlRW50cnkBCQECYU4BBQJhRAkAzAgCCQELRGVsZXRlRW50cnkBCQECYVABBQJhRAkAzAgCCQELRGVsZXRlRW50cnkBCQECYVEBBQJhRAkAzAgCCQELRGVsZXRlRW50cnkBCQECYVIBBQJhRAkAzAgCCQELRGVsZXRlRW50cnkBCQECYVMBBQJhRAUDbmlsCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAQJmRwECZkgABAJmSQQCYmoJAQJiQwADCQABAgUCYmoCCkJ5dGVWZWN0b3IEAmJKBQJiagUCYkoDCQABAgUCYmoCBFVuaXQIBQJmRw9zZW5kZXJQdWJsaWNLZXkJAAIBAgtNYXRjaCBlcnJvcgkA9AMDCAUCZkcJYm9keUJ5dGVzCQCRAwIIBQJmRwZwcm9vZnMAAAUCZknyrmEI", "height": 2715775, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3nGt3bwf2dGC4w3HPz7dXsP7DfbdMFtFn5ezxYzVhr4h Next: 2UqTRZfzvSRD7545Q6ZoKmvc7sMehGZHXFGB2mS7Qa65 Diff:
Old | New | Differences | |
---|---|---|---|
156 | 156 | ||
157 | 157 | ||
158 | 158 | func keyAllPoolsOneTokenOperationsDisabled () = makeString(["%s", "oneTokenOperationsDisabled"], SEP) | |
159 | + | ||
160 | + | ||
161 | + | func keyPoolSwapDisabled (assetsInternal) = { | |
162 | + | let $t042324294 = assetsInternal | |
163 | + | let amountAssetInternal = $t042324294._1 | |
164 | + | let priceAssetInternal = $t042324294._2 | |
165 | + | makeString(["%d%d%s", toString(amountAssetInternal), toString(priceAssetInternal), "swapDisabled"], SEP) | |
166 | + | } | |
167 | + | ||
168 | + | ||
169 | + | func keyAllPoolsSwapDisabled () = makeString(["%s", "swapDisabled"], SEP) | |
159 | 170 | ||
160 | 171 | ||
161 | 172 | func keyMappingLpAssetToPoolAssets (lpAssetStr) = (("%s%s%s__" + lpAssetStr) + "__mappings__lpAsset2Pool") | |
419 | 430 | ||
420 | 431 | ||
421 | 432 | func getPoolCreator (poolContractAddress) = { | |
422 | - | let $ | |
423 | - | let amountAssetId = $ | |
424 | - | let priceAssetId = $ | |
425 | - | let lpAssetId = $ | |
426 | - | let amountAssetInternal = $ | |
427 | - | let priceAssetInternal = $ | |
433 | + | let $t01558215719 = getAssetsDataFromPoolAddress(poolContractAddress) | |
434 | + | let amountAssetId = $t01558215719._1 | |
435 | + | let priceAssetId = $t01558215719._2 | |
436 | + | let lpAssetId = $t01558215719._3 | |
437 | + | let amountAssetInternal = $t01558215719._4 | |
438 | + | let priceAssetInternal = $t01558215719._5 | |
428 | 439 | let userPoolsContract = addressFromStringValue(getStringValue(keyUserPoolsContract())) | |
429 | 440 | let poolCreator = invoke(userPoolsContract, "getPoolCreatorREADONLY", [amountAssetId, priceAssetId], nil) | |
430 | 441 | poolCreator | |
443 | 454 | ||
444 | 455 | ||
445 | 456 | func isPoolEmpty (poolContractAddress) = { | |
446 | - | let $ | |
447 | - | let amountAssetId = $ | |
448 | - | let priceAssetId = $ | |
449 | - | let lpAssetId = $ | |
450 | - | let amountAssetInternal = $ | |
451 | - | let priceAssetInternal = $ | |
457 | + | let $t01629416431 = getAssetsDataFromPoolAddress(poolContractAddress) | |
458 | + | let amountAssetId = $t01629416431._1 | |
459 | + | let priceAssetId = $t01629416431._2 | |
460 | + | let lpAssetId = $t01629416431._3 | |
461 | + | let amountAssetInternal = $t01629416431._4 | |
462 | + | let priceAssetInternal = $t01629416431._5 | |
452 | 463 | if ((getAddressBalance(poolContractAddress, amountAssetId) == 0)) | |
453 | 464 | then (getAddressBalance(poolContractAddress, priceAssetId) == 0) | |
454 | 465 | else false | |
462 | 473 | ||
463 | 474 | @Callable(i) | |
464 | 475 | func getPoolLeaseConfigREADONLY (poolAddress,assetId) = { | |
465 | - | let $ | |
476 | + | let $t01674617050 = match getInteger(this, keyLeasedRatio(poolAddress, assetId)) { | |
466 | 477 | case r: Int => | |
467 | 478 | $Tuple2(true, min([100, max([0, r])])) | |
468 | 479 | case _ => | |
473 | 484 | $Tuple2(false, 0) | |
474 | 485 | } | |
475 | 486 | } | |
476 | - | let isLeasable = $ | |
477 | - | let leasedRatio = $ | |
487 | + | let isLeasable = $t01674617050._1 | |
488 | + | let leasedRatio = $t01674617050._2 | |
478 | 489 | let minBalance = match getInteger(this, keyMinBalance(poolAddress, assetId)) { | |
479 | 490 | case b: Int => | |
480 | 491 | max([0, b]) | |
486 | 497 | 0 | |
487 | 498 | } | |
488 | 499 | } | |
489 | - | let $ | |
500 | + | let $t01731617540 = if ((assetId == "WAVES")) | |
490 | 501 | then $Tuple3(valueOrElse(getString(this, keySWavesProxyAddress()), ""), getString(this, valueOrElse(keySWavesAssetId(), "")), MULT12) | |
491 | 502 | else $Tuple3("", "", 0) | |
492 | - | let proxyAddress = $ | |
493 | - | let proxyAssetId = $ | |
494 | - | let proxyRateMul = $ | |
503 | + | let proxyAddress = $t01731617540._1 | |
504 | + | let proxyAssetId = $t01731617540._2 | |
505 | + | let proxyRateMul = $t01731617540._3 | |
495 | 506 | let stakingProfitAddress = valueOrElse(getString(this, keyStakingProfitAddress()), "") | |
496 | 507 | $Tuple2(nil, $Tuple7(isLeasable, leasedRatio, minBalance, proxyAddress, proxyAssetId, proxyRateMul, stakingProfitAddress)) | |
497 | 508 | } | |
911 | 922 | ||
912 | 923 | ||
913 | 924 | @Callable(i) | |
925 | + | func isPoolSwapDisabledREADONLY (poolAddress) = { | |
926 | + | let poolConfig = getPoolConfig(poolAddress) | |
927 | + | let assetsInternal = $Tuple2(parseIntValue(poolConfig[idxIAmtAssetId]), parseIntValue(poolConfig[idxIPriceAssetId])) | |
928 | + | let poolSwapDisabled = valueOrElse(getBoolean(keyPoolSwapDisabled(assetsInternal)), false) | |
929 | + | let allPoolsSwapDisabled = valueOrElse(getBoolean(keyAllPoolsSwapDisabled()), false) | |
930 | + | $Tuple2(nil, if (allPoolsSwapDisabled) | |
931 | + | then true | |
932 | + | else poolSwapDisabled) | |
933 | + | } | |
934 | + | ||
935 | + | ||
936 | + | ||
937 | + | @Callable(i) | |
914 | 938 | func getInFeeREADONLY (poolAddress) = { | |
915 | 939 | let fee = intOrDefaultOrFallback(keyInFee(poolAddress), keyInFeeDefault(), 0) | |
916 | 940 | $Tuple2(nil, fee) | |
1045 | 1069 | else throwErr("Pool must be SHUTDOWN (4)") | |
1046 | 1070 | if ((checkStatus == checkStatus)) | |
1047 | 1071 | then { | |
1048 | - | let $ | |
1049 | - | let amountAssetId = $ | |
1050 | - | let priceAssetId = $ | |
1051 | - | let lpAssetId = $ | |
1052 | - | let amountAssetInternal = $ | |
1053 | - | let priceAssetInternal = $ | |
1072 | + | let $t04039540532 = getAssetsDataFromPoolAddress(poolContractAddress) | |
1073 | + | let amountAssetId = $t04039540532._1 | |
1074 | + | let priceAssetId = $t04039540532._2 | |
1075 | + | let lpAssetId = $t04039540532._3 | |
1076 | + | let amountAssetInternal = $t04039540532._4 | |
1077 | + | let priceAssetInternal = $t04039540532._5 | |
1054 | 1078 | let userPoolsContract = addressFromStringValue(getStringValue(keyUserPoolsContract())) | |
1055 | 1079 | let userPoolsInvoke = invoke(userPoolsContract, "deletePool", [amountAssetId, priceAssetId], nil) | |
1056 | 1080 | if ((userPoolsInvoke == userPoolsInvoke)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SCALE8 = 8 | |
5 | 5 | ||
6 | 6 | let MULT8 = 100000000 | |
7 | 7 | ||
8 | 8 | let MULT12 = 1000000000000 | |
9 | 9 | ||
10 | 10 | let SCALE18 = 18 | |
11 | 11 | ||
12 | 12 | let MULT18 = toBigInt(1000000000000000000) | |
13 | 13 | ||
14 | 14 | let POOLWEIGHTMULT = MULT8 | |
15 | 15 | ||
16 | 16 | let GWXvirtualPOOL = "GWXvirtualPOOL" | |
17 | 17 | ||
18 | 18 | let labelPoolsLp = "POOLS_LP" | |
19 | 19 | ||
20 | 20 | let defaultSpread = 2000000 | |
21 | 21 | ||
22 | 22 | let wavesString = "WAVES" | |
23 | 23 | ||
24 | 24 | let contractFilename = "factory_v2.ride" | |
25 | 25 | ||
26 | 26 | let decimalsMultPrice = ((100 * 1000) * 1000) | |
27 | 27 | ||
28 | 28 | let SEP = "__" | |
29 | 29 | ||
30 | 30 | let EMPTY = "" | |
31 | 31 | ||
32 | 32 | let PoolActive = 1 | |
33 | 33 | ||
34 | 34 | let PoolPutDisabled = 2 | |
35 | 35 | ||
36 | 36 | let PoolMatcherDisabled = 3 | |
37 | 37 | ||
38 | 38 | let PoolShutdown = 4 | |
39 | 39 | ||
40 | 40 | let idxInternalAssetId = 1 | |
41 | 41 | ||
42 | 42 | let idxResutActions = 2 | |
43 | 43 | ||
44 | 44 | let idxIfAssetIdCalculationPerformed = 3 | |
45 | 45 | ||
46 | 46 | let idxPoolAddress = 1 | |
47 | 47 | ||
48 | 48 | let idxPoolStatus = 2 | |
49 | 49 | ||
50 | 50 | let idxPoolLPAssetId = 3 | |
51 | 51 | ||
52 | 52 | let idxAmtAssetId = 4 | |
53 | 53 | ||
54 | 54 | let idxPriceAssetId = 5 | |
55 | 55 | ||
56 | 56 | let idxAmtAssetDcm = 6 | |
57 | 57 | ||
58 | 58 | let idxPriceAssetDcm = 7 | |
59 | 59 | ||
60 | 60 | let idxIAmtAssetId = 8 | |
61 | 61 | ||
62 | 62 | let idxIPriceAssetId = 9 | |
63 | 63 | ||
64 | 64 | let idxLPAssetDcm = 10 | |
65 | 65 | ||
66 | 66 | let idxPoolType = 11 | |
67 | 67 | ||
68 | 68 | let poolLabelWxEmission = "WX_EMISSION" | |
69 | 69 | ||
70 | 70 | let validPoolLabels = [poolLabelWxEmission] | |
71 | 71 | ||
72 | 72 | func wrapErr (msg) = makeString([contractFilename, ": ", msg], "") | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func throwErr (msg) = throw(wrapErr(msg)) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func keyAllowedLpScriptHash () = "%s__allowedLpScriptHash" | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash" | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func swapContract () = "%s__swapContract" | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func keyFactoryConfig () = "%s__factoryConfig" | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func keyLpTokensList () = "%s__lpTokensList" | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func keyPoolScriptHash () = "%s%s__pool__scriptHash" | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func keyMatcherPub () = "%s%s__matcher__publicKey" | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func keyLegacyFactoryContract () = "%s__legacyFactoryContract" | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func keyLegacyPools () = "%s__legacyPools" | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func keyManagerVaultAddress () = "%s__managerVaultAddress" | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func keyAdminPubKeys () = "%s__adminPubKeys" | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func keyAssetsStoreContract () = "%s__assetsStoreContract" | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func keyVotingEmissionContract () = "%s__votingEmissionContract" | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | func keyUserPoolsContract () = "%s__userPoolsContract" | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func keyPriceAssets () = makeString(["%s", "priceAssets"], SEP) | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func keyPriceDecimals () = "%s__priceDecimals" | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | func keyAllPoolsShutdown () = "%s__shutdown" | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | func keyNextInternalAssetId () = "%s__nextInternalAssetId" | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func keyPoolToWeight (poolAddress) = ("%s%s__poolWeight__" + poolAddress) | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func keyPoolToWeightHistory (poolAddress,num) = ((("%s%s__poolWeight__" + poolAddress) + "__") + toString(num)) | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func keyMappingsInternal2baseAssetId (internalBaseAsset) = ("%s%s%d__mappings__internal2baseAssetId__" + toString(internalBaseAsset)) | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr) | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | func keyPoolConfig (amountAssetInternal,priceAssetInternal) = (((("%d%d%s__" + amountAssetInternal) + "__") + priceAssetInternal) + "__config") | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | func keyPoolOneTokenOperationsDisabled (assetsInternal) = { | |
151 | 151 | let $t038783940 = assetsInternal | |
152 | 152 | let amountAssetInternal = $t038783940._1 | |
153 | 153 | let priceAssetInternal = $t038783940._2 | |
154 | 154 | makeString(["%d%d%s", toString(amountAssetInternal), toString(priceAssetInternal), "oneTokenOperationsDisabled"], SEP) | |
155 | 155 | } | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | func keyAllPoolsOneTokenOperationsDisabled () = makeString(["%s", "oneTokenOperationsDisabled"], SEP) | |
159 | + | ||
160 | + | ||
161 | + | func keyPoolSwapDisabled (assetsInternal) = { | |
162 | + | let $t042324294 = assetsInternal | |
163 | + | let amountAssetInternal = $t042324294._1 | |
164 | + | let priceAssetInternal = $t042324294._2 | |
165 | + | makeString(["%d%d%s", toString(amountAssetInternal), toString(priceAssetInternal), "swapDisabled"], SEP) | |
166 | + | } | |
167 | + | ||
168 | + | ||
169 | + | func keyAllPoolsSwapDisabled () = makeString(["%s", "swapDisabled"], SEP) | |
159 | 170 | ||
160 | 171 | ||
161 | 172 | func keyMappingLpAssetToPoolAssets (lpAssetStr) = (("%s%s%s__" + lpAssetStr) + "__mappings__lpAsset2Pool") | |
162 | 173 | ||
163 | 174 | ||
164 | 175 | func keyMappingPoolAssetsToLpasset (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + internalAmountAssetIdStr) + "__") + internalPriceAssetIdStr) + "__mappings__PoolAssets2LpAsset") | |
165 | 176 | ||
166 | 177 | ||
167 | 178 | func keyPoolSpread (poolAddress) = ("%s%s__spread__" + poolAddress) | |
168 | 179 | ||
169 | 180 | ||
170 | 181 | func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2PoolAssets") | |
171 | 182 | ||
172 | 183 | ||
173 | 184 | func keyMappingPoolAssetsToPoolContractAddress (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + toString(internalAmountAssetIdStr)) + "__") + toString(internalPriceAssetIdStr)) + "__mappings__poolAssets2PoolContract") | |
174 | 185 | ||
175 | 186 | ||
176 | 187 | func keyMappingPoolContractToLPAsset (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset") | |
177 | 188 | ||
178 | 189 | ||
179 | 190 | func keyMappingPoolLPAssetToPoolContractAddress (lpAssetStr) = (("%s%s%s__" + lpAssetStr) + "__mappings__lpAsset2PoolContract") | |
180 | 191 | ||
181 | 192 | ||
182 | 193 | func keyWxEmission (amountAssetId,priceAssetId) = ((("%s%s%s__wxEmission__" + amountAssetId) + "__") + priceAssetId) | |
183 | 194 | ||
184 | 195 | ||
185 | 196 | func keyInFee (poolAddress) = ("%s%s__inFee__" + poolAddress) | |
186 | 197 | ||
187 | 198 | ||
188 | 199 | func keyInFeeDefault () = "%s__inFeeDefault" | |
189 | 200 | ||
190 | 201 | ||
191 | 202 | func keySwapFee (poolAddress) = ("%s%s__swapFee__" + poolAddress) | |
192 | 203 | ||
193 | 204 | ||
194 | 205 | func keyOutFee (poolAddress) = ("%s%s__outFee__" + poolAddress) | |
195 | 206 | ||
196 | 207 | ||
197 | 208 | func keyOutFeeDefault () = "%s__outFeeDefault" | |
198 | 209 | ||
199 | 210 | ||
200 | 211 | func keySkipOrderValidation (poolAddress) = ("%s%s__skipOrderValidation__" + poolAddress) | |
201 | 212 | ||
202 | 213 | ||
203 | 214 | func keyChangeAmpDelay (poolAddress) = ("%s%s__changeAmpDelay__" + poolAddress) | |
204 | 215 | ||
205 | 216 | ||
206 | 217 | func keyChangeAmpDelta (poolAddress) = ("%s%s__changeAmpDelta__" + poolAddress) | |
207 | 218 | ||
208 | 219 | ||
209 | 220 | func keyChangeAmpTarget (poolAddress) = ("%s%s__changeAmpTarget__" + poolAddress) | |
210 | 221 | ||
211 | 222 | ||
212 | 223 | func keySWavesProxyAddress () = "%s__sWavesProxyAddress" | |
213 | 224 | ||
214 | 225 | ||
215 | 226 | func keySWavesAssetId () = "%s__sWavesAssetId" | |
216 | 227 | ||
217 | 228 | ||
218 | 229 | func keyStakingProfitAddress () = "%s__stakingProfitAddress" | |
219 | 230 | ||
220 | 231 | ||
221 | 232 | func keyLeasedRatio (poolAddress,assetId) = makeString(["%s%s%s", "leasedRatio", poolAddress, assetId], SEP) | |
222 | 233 | ||
223 | 234 | ||
224 | 235 | func keyLeasedRatioDefault (assetId) = makeString(["%s%s", "leasedRatioDefault", assetId], SEP) | |
225 | 236 | ||
226 | 237 | ||
227 | 238 | func keyLeasedRatioTolerance (poolAddress,assetId) = makeString(["%s%s%s", "leasedRatioTolerance", poolAddress, assetId], SEP) | |
228 | 239 | ||
229 | 240 | ||
230 | 241 | func keyMinBalance (poolAddress,assetId) = makeString(["%s%s%s", "minBalance", poolAddress, assetId], SEP) | |
231 | 242 | ||
232 | 243 | ||
233 | 244 | func keyMinBalanceDefault (assetId) = makeString(["%s%s", "minBalanceDefault", assetId], SEP) | |
234 | 245 | ||
235 | 246 | ||
236 | 247 | func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), ("No data for this.key=" + key)) | |
237 | 248 | ||
238 | 249 | ||
239 | 250 | func getBooleanOrFail (key) = valueOrErrorMessage(getBoolean(this, key), ("No data for this.key=" + key)) | |
240 | 251 | ||
241 | 252 | ||
242 | 253 | func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), ("No data for this.key=" + key)) | |
243 | 254 | ||
244 | 255 | ||
245 | 256 | func parseAssetId (input) = if ((input == wavesString)) | |
246 | 257 | then unit | |
247 | 258 | else fromBase58String(input) | |
248 | 259 | ||
249 | 260 | ||
250 | 261 | func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) { | |
251 | 262 | case s: String => | |
252 | 263 | addressFromStringValue(s) | |
253 | 264 | case _ => | |
254 | 265 | this | |
255 | 266 | } | |
256 | 267 | ||
257 | 268 | ||
258 | 269 | let IdxFactoryCfgStakingDapp = 1 | |
259 | 270 | ||
260 | 271 | let IdxFactoryCfgBoostingDapp = 2 | |
261 | 272 | ||
262 | 273 | let IdxFactoryCfgIdoDapp = 3 | |
263 | 274 | ||
264 | 275 | let IdxFactoryCfgTeamDapp = 4 | |
265 | 276 | ||
266 | 277 | let IdxFactoryCfgEmissionDapp = 5 | |
267 | 278 | ||
268 | 279 | let IdxFactoryCfgRestDapp = 6 | |
269 | 280 | ||
270 | 281 | let IdxFactoryCfgSlippageDapp = 7 | |
271 | 282 | ||
272 | 283 | let IdxFactoryCfgDaoDapp = 8 | |
273 | 284 | ||
274 | 285 | let IdxFactoryCfgMarketingDapp = 9 | |
275 | 286 | ||
276 | 287 | let IdxFactoryCfgGwxRewardDapp = 10 | |
277 | 288 | ||
278 | 289 | let IdxFactoryCfgBirdsDapp = 11 | |
279 | 290 | ||
280 | 291 | func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp]) | |
281 | 292 | ||
282 | 293 | ||
283 | 294 | func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp]) | |
284 | 295 | ||
285 | 296 | ||
286 | 297 | func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp]) | |
287 | 298 | ||
288 | 299 | ||
289 | 300 | func getGwxRewardAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgGwxRewardDapp]) | |
290 | 301 | ||
291 | 302 | ||
292 | 303 | func getPriceAssets () = match getString(keyPriceAssets()) { | |
293 | 304 | case s: String => | |
294 | 305 | if ((size(s) == 0)) | |
295 | 306 | then nil | |
296 | 307 | else split_4C(s, SEP) | |
297 | 308 | case _ => | |
298 | 309 | nil | |
299 | 310 | } | |
300 | 311 | ||
301 | 312 | ||
302 | 313 | func managerPublicKeyOrUnit () = { | |
303 | 314 | let managerVaultAddress = getManagerVaultAddressOrThis() | |
304 | 315 | match getString(managerVaultAddress, keyManagerPublicKey()) { | |
305 | 316 | case s: String => | |
306 | 317 | fromBase58String(s) | |
307 | 318 | case _: Unit => | |
308 | 319 | unit | |
309 | 320 | case _ => | |
310 | 321 | throw("Match error") | |
311 | 322 | } | |
312 | 323 | } | |
313 | 324 | ||
314 | 325 | ||
315 | 326 | let permissionDeniedError = throwErr("Permission denied") | |
316 | 327 | ||
317 | 328 | let testError = throwErr("Test error here") | |
318 | 329 | ||
319 | 330 | func mustThis (i) = if ((i.caller == this)) | |
320 | 331 | then true | |
321 | 332 | else permissionDeniedError | |
322 | 333 | ||
323 | 334 | ||
324 | 335 | func mustManager (i) = match managerPublicKeyOrUnit() { | |
325 | 336 | case pk: ByteVector => | |
326 | 337 | if ((i.callerPublicKey == pk)) | |
327 | 338 | then true | |
328 | 339 | else permissionDeniedError | |
329 | 340 | case _: Unit => | |
330 | 341 | mustThis(i) | |
331 | 342 | case _ => | |
332 | 343 | throw("Match error") | |
333 | 344 | } | |
334 | 345 | ||
335 | 346 | ||
336 | 347 | 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) | |
337 | 348 | ||
338 | 349 | ||
339 | 350 | func dataFactoryCfg (stakingAddress,boostingAddress,idoContract,teamContract,emissionContract,restContract,slippageContract) = makeString(["%s%s%s%s%s%s", stakingAddress, boostingAddress, idoContract, teamContract, emissionContract, restContract, slippageContract], SEP) | |
340 | 351 | ||
341 | 352 | ||
342 | 353 | 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) | |
343 | 354 | ||
344 | 355 | ||
345 | 356 | func dataMappingPoolAssets (internalAmountAssetStr,internalPriceAssetStr) = makeString(["%d%d", toString(internalAmountAssetStr), toString(internalPriceAssetStr)], SEP) | |
346 | 357 | ||
347 | 358 | ||
348 | 359 | func getPoolConfig (poolAddress) = { | |
349 | 360 | let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolAddress)), SEP) | |
350 | 361 | let amountAssetInternal = poolAssets[1] | |
351 | 362 | let priceAssetInternal = poolAssets[2] | |
352 | 363 | split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP) | |
353 | 364 | } | |
354 | 365 | ||
355 | 366 | ||
356 | 367 | func getInternalAssetIdOrCreate (assetIdStr,incrementor) = { | |
357 | 368 | let internalAssetId = valueOrElse(getInteger(this, keyMappingsBaseAsset2internalId(assetIdStr)), 0) | |
358 | 369 | let currentIndexOfInternalId = valueOrElse(getInteger(this, keyNextInternalAssetId()), 0) | |
359 | 370 | let result = if ((internalAssetId == 0)) | |
360 | 371 | then { | |
361 | 372 | let newInternalAssetId = (currentIndexOfInternalId + incrementor) | |
362 | 373 | $Tuple3(newInternalAssetId, [IntegerEntry(keyNextInternalAssetId(), newInternalAssetId), IntegerEntry(keyMappingsBaseAsset2internalId(assetIdStr), newInternalAssetId), StringEntry(keyMappingsInternal2baseAssetId(newInternalAssetId), assetIdStr)], true) | |
363 | 374 | } | |
364 | 375 | else $Tuple3(internalAssetId, nil, false) | |
365 | 376 | result | |
366 | 377 | } | |
367 | 378 | ||
368 | 379 | ||
369 | 380 | func mustAdmin (i) = { | |
370 | 381 | let adminPKs = split(valueOrElse(getString(keyAdminPubKeys()), EMPTY), SEP) | |
371 | 382 | if (containsElement(adminPKs, toBase58String(i.callerPublicKey))) | |
372 | 383 | then true | |
373 | 384 | else { | |
374 | 385 | let isManager = mustManager(i) | |
375 | 386 | if ((isManager == isManager)) | |
376 | 387 | then true | |
377 | 388 | else throw("Strict value is not equal to itself.") | |
378 | 389 | } | |
379 | 390 | } | |
380 | 391 | ||
381 | 392 | ||
382 | 393 | func intOrDefaultOrFallback (key,keyDefault,valueFallback) = valueOrElse(getInteger(this, key), valueOrElse(getInteger(this, keyDefault), valueFallback)) | |
383 | 394 | ||
384 | 395 | ||
385 | 396 | func poolExistsInternal (amountAssetId,priceAssetId) = { | |
386 | 397 | let amountAssetInternal = getInteger(keyMappingsBaseAsset2internalId(amountAssetId)) | |
387 | 398 | let priceAssetInternal = getInteger(keyMappingsBaseAsset2internalId(priceAssetId)) | |
388 | 399 | if (if ((amountAssetInternal == unit)) | |
389 | 400 | then true | |
390 | 401 | else (priceAssetInternal == unit)) | |
391 | 402 | then false | |
392 | 403 | else { | |
393 | 404 | let amAs = toString(value(amountAssetInternal)) | |
394 | 405 | let prAs = toString(value(priceAssetInternal)) | |
395 | 406 | let cfg = getString(keyPoolConfig(amAs, prAs)) | |
396 | 407 | let cfgReverse = getString(keyPoolConfig(prAs, amAs)) | |
397 | 408 | let exists = if ((cfg != unit)) | |
398 | 409 | then true | |
399 | 410 | else (cfgReverse != unit) | |
400 | 411 | exists | |
401 | 412 | } | |
402 | 413 | } | |
403 | 414 | ||
404 | 415 | ||
405 | 416 | func getAssetsDataFromPoolAddress (poolContractAddress) = { | |
406 | 417 | let poolAssets = match getString(keyMappingPoolContractAddressToPoolAssets(poolContractAddress)) { | |
407 | 418 | case s: String => | |
408 | 419 | split(s, SEP) | |
409 | 420 | case _ => | |
410 | 421 | throwErr(makeString([poolContractAddress, "pool is not found"], " ")) | |
411 | 422 | } | |
412 | 423 | let amountAssetInternal = parseIntValue(poolAssets[1]) | |
413 | 424 | let priceAssetInternal = parseIntValue(poolAssets[2]) | |
414 | 425 | let amountAssetId = getStringValue(keyMappingsInternal2baseAssetId(amountAssetInternal)) | |
415 | 426 | let priceAssetId = getStringValue(keyMappingsInternal2baseAssetId(priceAssetInternal)) | |
416 | 427 | let lpAssetId = getStringValue(keyMappingPoolContractToLPAsset(poolContractAddress)) | |
417 | 428 | $Tuple5(amountAssetId, priceAssetId, lpAssetId, amountAssetInternal, priceAssetInternal) | |
418 | 429 | } | |
419 | 430 | ||
420 | 431 | ||
421 | 432 | func getPoolCreator (poolContractAddress) = { | |
422 | - | let $ | |
423 | - | let amountAssetId = $ | |
424 | - | let priceAssetId = $ | |
425 | - | let lpAssetId = $ | |
426 | - | let amountAssetInternal = $ | |
427 | - | let priceAssetInternal = $ | |
433 | + | let $t01558215719 = getAssetsDataFromPoolAddress(poolContractAddress) | |
434 | + | let amountAssetId = $t01558215719._1 | |
435 | + | let priceAssetId = $t01558215719._2 | |
436 | + | let lpAssetId = $t01558215719._3 | |
437 | + | let amountAssetInternal = $t01558215719._4 | |
438 | + | let priceAssetInternal = $t01558215719._5 | |
428 | 439 | let userPoolsContract = addressFromStringValue(getStringValue(keyUserPoolsContract())) | |
429 | 440 | let poolCreator = invoke(userPoolsContract, "getPoolCreatorREADONLY", [amountAssetId, priceAssetId], nil) | |
430 | 441 | poolCreator | |
431 | 442 | } | |
432 | 443 | ||
433 | 444 | ||
434 | 445 | func getAddressBalance (addressString,assetIdString) = { | |
435 | 446 | let address = addressFromStringValue(addressString) | |
436 | 447 | if ((assetIdString == "WAVES")) | |
437 | 448 | then wavesBalance(address).regular | |
438 | 449 | else { | |
439 | 450 | let assetId = fromBase58String(assetIdString) | |
440 | 451 | assetBalance(address, assetId) | |
441 | 452 | } | |
442 | 453 | } | |
443 | 454 | ||
444 | 455 | ||
445 | 456 | func isPoolEmpty (poolContractAddress) = { | |
446 | - | let $ | |
447 | - | let amountAssetId = $ | |
448 | - | let priceAssetId = $ | |
449 | - | let lpAssetId = $ | |
450 | - | let amountAssetInternal = $ | |
451 | - | let priceAssetInternal = $ | |
457 | + | let $t01629416431 = getAssetsDataFromPoolAddress(poolContractAddress) | |
458 | + | let amountAssetId = $t01629416431._1 | |
459 | + | let priceAssetId = $t01629416431._2 | |
460 | + | let lpAssetId = $t01629416431._3 | |
461 | + | let amountAssetInternal = $t01629416431._4 | |
462 | + | let priceAssetInternal = $t01629416431._5 | |
452 | 463 | if ((getAddressBalance(poolContractAddress, amountAssetId) == 0)) | |
453 | 464 | then (getAddressBalance(poolContractAddress, priceAssetId) == 0) | |
454 | 465 | else false | |
455 | 466 | } | |
456 | 467 | ||
457 | 468 | ||
458 | 469 | @Callable(i) | |
459 | 470 | func getSwapContractREADONLY () = $Tuple2(nil, getStringOrFail(swapContract())) | |
460 | 471 | ||
461 | 472 | ||
462 | 473 | ||
463 | 474 | @Callable(i) | |
464 | 475 | func getPoolLeaseConfigREADONLY (poolAddress,assetId) = { | |
465 | - | let $ | |
476 | + | let $t01674617050 = match getInteger(this, keyLeasedRatio(poolAddress, assetId)) { | |
466 | 477 | case r: Int => | |
467 | 478 | $Tuple2(true, min([100, max([0, r])])) | |
468 | 479 | case _ => | |
469 | 480 | match getInteger(this, keyLeasedRatioDefault(assetId)) { | |
470 | 481 | case rd: Int => | |
471 | 482 | $Tuple2(true, min([100, max([0, rd])])) | |
472 | 483 | case _ => | |
473 | 484 | $Tuple2(false, 0) | |
474 | 485 | } | |
475 | 486 | } | |
476 | - | let isLeasable = $ | |
477 | - | let leasedRatio = $ | |
487 | + | let isLeasable = $t01674617050._1 | |
488 | + | let leasedRatio = $t01674617050._2 | |
478 | 489 | let minBalance = match getInteger(this, keyMinBalance(poolAddress, assetId)) { | |
479 | 490 | case b: Int => | |
480 | 491 | max([0, b]) | |
481 | 492 | case _ => | |
482 | 493 | match getInteger(this, keyMinBalanceDefault(assetId)) { | |
483 | 494 | case bd: Int => | |
484 | 495 | max([0, bd]) | |
485 | 496 | case _ => | |
486 | 497 | 0 | |
487 | 498 | } | |
488 | 499 | } | |
489 | - | let $ | |
500 | + | let $t01731617540 = if ((assetId == "WAVES")) | |
490 | 501 | then $Tuple3(valueOrElse(getString(this, keySWavesProxyAddress()), ""), getString(this, valueOrElse(keySWavesAssetId(), "")), MULT12) | |
491 | 502 | else $Tuple3("", "", 0) | |
492 | - | let proxyAddress = $ | |
493 | - | let proxyAssetId = $ | |
494 | - | let proxyRateMul = $ | |
503 | + | let proxyAddress = $t01731617540._1 | |
504 | + | let proxyAssetId = $t01731617540._2 | |
505 | + | let proxyRateMul = $t01731617540._3 | |
495 | 506 | let stakingProfitAddress = valueOrElse(getString(this, keyStakingProfitAddress()), "") | |
496 | 507 | $Tuple2(nil, $Tuple7(isLeasable, leasedRatio, minBalance, proxyAddress, proxyAssetId, proxyRateMul, stakingProfitAddress)) | |
497 | 508 | } | |
498 | 509 | ||
499 | 510 | ||
500 | 511 | ||
501 | 512 | @Callable(i) | |
502 | 513 | func getLpAssetFromPoolAssetsREADONLY (asset1,asset2) = if (if ((asset1 == "8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS")) | |
503 | 514 | then (asset2 == "WAVES") | |
504 | 515 | else false) | |
505 | 516 | then $Tuple2(nil, unit) | |
506 | 517 | else { | |
507 | 518 | let assetNum1 = value(getInteger(this, keyMappingsBaseAsset2internalId(asset1))) | |
508 | 519 | let assetNum2 = value(getInteger(this, keyMappingsBaseAsset2internalId(asset2))) | |
509 | 520 | let ee = getString(this, keyMappingPoolAssetsToLpasset(toString(assetNum1), toString(assetNum2))) | |
510 | 521 | let res = if ((ee == unit)) | |
511 | 522 | then unit | |
512 | 523 | else drop(value(ee), 4) | |
513 | 524 | $Tuple2(nil, res) | |
514 | 525 | } | |
515 | 526 | ||
516 | 527 | ||
517 | 528 | ||
518 | 529 | @Callable(i) | |
519 | 530 | func getPoolAddressFromLpAssetREADONLY (lp) = $Tuple2(nil, valueOrElse(getString(this, keyMappingPoolLPAssetToPoolContractAddress(lp)), "")) | |
520 | 531 | ||
521 | 532 | ||
522 | 533 | ||
523 | 534 | @Callable(i) | |
524 | 535 | func constructor (stakingContract,boostingContract,idoContract,teamContract,emissionContract,restContract,slpipageContract,priceDecimals) = { | |
525 | 536 | let checkCaller = mustManager(i) | |
526 | 537 | if ((checkCaller == checkCaller)) | |
527 | 538 | then [StringEntry(keyFactoryConfig(), dataFactoryCfg(stakingContract, boostingContract, idoContract, teamContract, emissionContract, restContract, slpipageContract)), IntegerEntry(keyPriceDecimals(), priceDecimals)] | |
528 | 539 | else throw("Strict value is not equal to itself.") | |
529 | 540 | } | |
530 | 541 | ||
531 | 542 | ||
532 | 543 | ||
533 | 544 | @Callable(i) | |
534 | 545 | func constructorV2 (mathcherPub58Str) = { | |
535 | 546 | let checkCaller = mustManager(i) | |
536 | 547 | if ((checkCaller == checkCaller)) | |
537 | 548 | then { | |
538 | 549 | let mathcerPub = addressFromPublicKey(fromBase58String(mathcherPub58Str)) | |
539 | 550 | if ((mathcerPub == mathcerPub)) | |
540 | 551 | then [StringEntry(keyMatcherPub(), mathcherPub58Str)] | |
541 | 552 | else throw("Strict value is not equal to itself.") | |
542 | 553 | } | |
543 | 554 | else throw("Strict value is not equal to itself.") | |
544 | 555 | } | |
545 | 556 | ||
546 | 557 | ||
547 | 558 | ||
548 | 559 | @Callable(i) | |
549 | 560 | func constructorV3 (daoContract,marketingContract,gwxRewardsContract,birdsContract) = { | |
550 | 561 | let checkCaller = mustManager(i) | |
551 | 562 | if ((checkCaller == checkCaller)) | |
552 | 563 | then { | |
553 | 564 | let factoryCfg = split(getStringOrFail(keyFactoryConfig()), SEP) | |
554 | 565 | [StringEntry(keyFactoryConfig(), dataFactoryCfgV3(factoryCfg[1], factoryCfg[2], factoryCfg[3], factoryCfg[4], factoryCfg[5], factoryCfg[6], factoryCfg[7], daoContract, marketingContract, gwxRewardsContract, birdsContract))] | |
555 | 566 | } | |
556 | 567 | else throw("Strict value is not equal to itself.") | |
557 | 568 | } | |
558 | 569 | ||
559 | 570 | ||
560 | 571 | ||
561 | 572 | @Callable(i) | |
562 | 573 | func constructorV4 (legacyFactoryContract,legacyPools) = { | |
563 | 574 | let checkCaller = mustManager(i) | |
564 | 575 | if ((checkCaller == checkCaller)) | |
565 | 576 | then [StringEntry(keyLegacyFactoryContract(), legacyFactoryContract), StringEntry(keyLegacyPools(), makeString(legacyPools, SEP))] | |
566 | 577 | else throw("Strict value is not equal to itself.") | |
567 | 578 | } | |
568 | 579 | ||
569 | 580 | ||
570 | 581 | ||
571 | 582 | @Callable(i) | |
572 | 583 | func constructorV5 (assetsStoreContract) = { | |
573 | 584 | let checkCaller = mustManager(i) | |
574 | 585 | if ((checkCaller == checkCaller)) | |
575 | 586 | then [StringEntry(keyAssetsStoreContract(), assetsStoreContract)] | |
576 | 587 | else throw("Strict value is not equal to itself.") | |
577 | 588 | } | |
578 | 589 | ||
579 | 590 | ||
580 | 591 | ||
581 | 592 | @Callable(i) | |
582 | 593 | func constructorV6 (votingEmissionContract,priceAssets) = { | |
583 | 594 | let cheks = [mustManager(i), if ((addressFromString(votingEmissionContract) != unit)) | |
584 | 595 | then true | |
585 | 596 | else "invalid voting emission contract address"] | |
586 | 597 | if ((cheks == cheks)) | |
587 | 598 | then [StringEntry(keyVotingEmissionContract(), votingEmissionContract), StringEntry(keyPriceAssets(), makeString(priceAssets, SEP))] | |
588 | 599 | else throw("Strict value is not equal to itself.") | |
589 | 600 | } | |
590 | 601 | ||
591 | 602 | ||
592 | 603 | ||
593 | 604 | @Callable(i) | |
594 | 605 | func setAdmins (adminPubKeys) = { | |
595 | 606 | let checkCaller = mustManager(i) | |
596 | 607 | if ((checkCaller == checkCaller)) | |
597 | 608 | then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))] | |
598 | 609 | else throw("Strict value is not equal to itself.") | |
599 | 610 | } | |
600 | 611 | ||
601 | 612 | ||
602 | 613 | ||
603 | 614 | @Callable(i) | |
604 | 615 | func activateNewPool (poolAddress,amountAssetStr,priceAssetStr,lpAssetName,lpAssetDescr,poolWeight,poolType,logo) = { | |
605 | 616 | let checkCaller = mustAdmin(i) | |
606 | 617 | if ((checkCaller == checkCaller)) | |
607 | 618 | then if (isDefined(getString(keyMappingPoolContractAddressToPoolAssets(poolAddress)))) | |
608 | 619 | then throwErr((("Pool address " + poolAddress) + " already registered.")) | |
609 | 620 | else { | |
610 | 621 | let internalAmountAssetData = getInternalAssetIdOrCreate(amountAssetStr, 1) | |
611 | 622 | let internalAmountAssetId = internalAmountAssetData._1 | |
612 | 623 | let internalPriceAssetData = getInternalAssetIdOrCreate(priceAssetStr, if (internalAmountAssetData._3) | |
613 | 624 | then 2 | |
614 | 625 | else 1) | |
615 | 626 | let internalPriceAssetId = internalPriceAssetData._1 | |
616 | 627 | let poolAccountScriptHash = valueOrErrorMessage(scriptHash(addressFromStringValue(poolAddress)), ("No script has been found on pool account " + poolAddress)) | |
617 | 628 | let ethalonPoolAccountScriptHash = getBinaryValue(keyPoolScriptHash()) | |
618 | 629 | let poolExists = poolExistsInternal(amountAssetStr, priceAssetStr) | |
619 | 630 | if (poolExists) | |
620 | 631 | then throwErr((((("Pool " + amountAssetStr) + "/") + priceAssetStr) + " has already been activated.")) | |
621 | 632 | else { | |
622 | 633 | let poolConfigValue = value(getString(this, keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId)))) | |
623 | 634 | let amountAssetsDecimals = if ((amountAssetStr == "WAVES")) | |
624 | 635 | then decimalsMultPrice | |
625 | 636 | else pow(10, 0, value(assetInfo(fromBase58String(amountAssetStr))).decimals, 0, 0, DOWN) | |
626 | 637 | let priceAssetsDecimals = if ((priceAssetStr == "WAVES")) | |
627 | 638 | then decimalsMultPrice | |
628 | 639 | else pow(10, 0, value(assetInfo(fromBase58String(priceAssetStr))).decimals, 0, 0, DOWN) | |
629 | 640 | let lpAssetIssueAction = Issue(lpAssetName, lpAssetDescr, 1, 8, true) | |
630 | 641 | let lpAssetId = calculateAssetId(lpAssetIssueAction) | |
631 | 642 | let lpAssetIdStr = toBase58String(lpAssetId) | |
632 | 643 | let poolActivateInvokeResult = invoke(addressFromStringValue(poolAddress), "activate", [amountAssetStr, priceAssetStr], nil) | |
633 | 644 | if ((poolActivateInvokeResult == poolActivateInvokeResult)) | |
634 | 645 | then if ((poolActivateInvokeResult != "success")) | |
635 | 646 | then throwErr("Pool initialisation error happened.") | |
636 | 647 | else { | |
637 | 648 | let assetsStoreContract = addressFromStringValue(getStringOrFail(keyAssetsStoreContract())) | |
638 | 649 | let createOrUpdateLpAssetInv = invoke(assetsStoreContract, "createOrUpdate", [lpAssetIdStr, lpAssetName, false], nil) | |
639 | 650 | if ((createOrUpdateLpAssetInv == createOrUpdateLpAssetInv)) | |
640 | 651 | then { | |
641 | 652 | let addPoolsLpLabelInv = invoke(assetsStoreContract, "addLabel", [lpAssetIdStr, labelPoolsLp], nil) | |
642 | 653 | if ((addPoolsLpLabelInv == addPoolsLpLabelInv)) | |
643 | 654 | then { | |
644 | 655 | let setLogoInv = invoke(assetsStoreContract, "setLogo", [lpAssetIdStr, logo], nil) | |
645 | 656 | if ((setLogoInv == setLogoInv)) | |
646 | 657 | then { | |
647 | 658 | let addAssetsLinkInv = invoke(assetsStoreContract, "addAssetsLink", [amountAssetStr, priceAssetStr, lpAssetIdStr], nil) | |
648 | 659 | if ((addAssetsLinkInv == addAssetsLinkInv)) | |
649 | 660 | then { | |
650 | 661 | let increaseAssetPoolsNumberInv = invoke(assetsStoreContract, "increaseAssetPoolsNumber", [amountAssetStr], nil) | |
651 | 662 | if ((increaseAssetPoolsNumberInv == increaseAssetPoolsNumberInv)) | |
652 | 663 | 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) | |
653 | 664 | else throw("Strict value is not equal to itself.") | |
654 | 665 | } | |
655 | 666 | else throw("Strict value is not equal to itself.") | |
656 | 667 | } | |
657 | 668 | else throw("Strict value is not equal to itself.") | |
658 | 669 | } | |
659 | 670 | else throw("Strict value is not equal to itself.") | |
660 | 671 | } | |
661 | 672 | else throw("Strict value is not equal to itself.") | |
662 | 673 | } | |
663 | 674 | else throw("Strict value is not equal to itself.") | |
664 | 675 | } | |
665 | 676 | } | |
666 | 677 | else throw("Strict value is not equal to itself.") | |
667 | 678 | } | |
668 | 679 | ||
669 | 680 | ||
670 | 681 | ||
671 | 682 | @Callable(i) | |
672 | 683 | func managePool (poolAddress,newStatus) = { | |
673 | 684 | let checkCaller = mustManager(i) | |
674 | 685 | if ((checkCaller == checkCaller)) | |
675 | 686 | then { | |
676 | 687 | let poolConfig = getPoolConfig(poolAddress) | |
677 | 688 | let poolStatus = poolConfig[idxPoolStatus] | |
678 | 689 | let lpAssetIdStr = poolConfig[idxPoolLPAssetId] | |
679 | 690 | let amountAssetStr = poolConfig[idxAmtAssetId] | |
680 | 691 | let priceAssetStr = poolConfig[idxPriceAssetId] | |
681 | 692 | let amountAssetsDecimals = parseIntValue(poolConfig[idxAmtAssetDcm]) | |
682 | 693 | let priceAssetsDecimals = parseIntValue(poolConfig[idxPriceAssetDcm]) | |
683 | 694 | let internalAmountAssetId = parseIntValue(poolConfig[idxIAmtAssetId]) | |
684 | 695 | let internalPriceAssetId = parseIntValue(poolConfig[idxIPriceAssetId]) | |
685 | 696 | let lpAssetDcm = parseIntValue(poolConfig[idxLPAssetDcm]) | |
686 | 697 | let poolType = poolConfig[idxPoolType] | |
687 | 698 | [StringEntry(keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId)), dataPoolCfg(poolAddress, toString(newStatus), lpAssetIdStr, amountAssetStr, priceAssetStr, amountAssetsDecimals, priceAssetsDecimals, internalAmountAssetId, internalPriceAssetId, lpAssetDcm, poolType))] | |
688 | 699 | } | |
689 | 700 | else throw("Strict value is not equal to itself.") | |
690 | 701 | } | |
691 | 702 | ||
692 | 703 | ||
693 | 704 | ||
694 | 705 | @Callable(i) | |
695 | 706 | func emit (amountToEmit) = { | |
696 | 707 | let caller = i.caller | |
697 | 708 | let originCaller = i.originCaller | |
698 | 709 | let lpAssetRequested = valueOrErrorMessage(getString(keyMappingPoolContractToLPAsset(toString(caller))), "Invalid LP address called me.") | |
699 | 710 | let lpAsset = fromBase58String(lpAssetRequested) | |
700 | 711 | let legacyPools = split(valueOrElse(getString(keyLegacyPools()), EMPTY), SEP) | |
701 | 712 | let legacyFactoryContract = addressFromStringValue(valueOrErrorMessage(getString(keyLegacyFactoryContract()), "Legacy factory contract does not exists.")) | |
702 | 713 | if ((0 >= amountToEmit)) | |
703 | 714 | then nil | |
704 | 715 | else if (containsElement(legacyPools, toString(caller))) | |
705 | 716 | then $Tuple2(nil, legacyFactoryContract) | |
706 | 717 | else $Tuple2([Reissue(lpAsset, amountToEmit, true), ScriptTransfer(i.caller, amountToEmit, lpAsset)], "success") | |
707 | 718 | } | |
708 | 719 | ||
709 | 720 | ||
710 | 721 | ||
711 | 722 | @Callable(i) | |
712 | 723 | func burn (amountToBurn) = { | |
713 | 724 | let caller = i.caller | |
714 | 725 | let originCaller = i.originCaller | |
715 | 726 | let payment = value(i.payments[0]) | |
716 | 727 | let paymentAmount = value(payment.amount) | |
717 | 728 | let inAmountAssetId = toBase58String(value(payment.assetId)) | |
718 | 729 | let lpAssetRequestedForBurning = valueOrErrorMessage(getString(keyMappingPoolContractToLPAsset(toString(caller))), "Invalid LP address called me.") | |
719 | 730 | if ((inAmountAssetId != lpAssetRequestedForBurning)) | |
720 | 731 | then throwErr("Invalid asset passed.") | |
721 | 732 | else if ((amountToBurn != paymentAmount)) | |
722 | 733 | then throwErr("Invalid amount passed.") | |
723 | 734 | else { | |
724 | 735 | let lpAsset = fromBase58String(lpAssetRequestedForBurning) | |
725 | 736 | $Tuple2([Burn(lpAsset, amountToBurn)], "success") | |
726 | 737 | } | |
727 | 738 | } | |
728 | 739 | ||
729 | 740 | ||
730 | 741 | ||
731 | 742 | @Callable(i) | |
732 | 743 | func modifyWeight (lpAssetId,share) = { | |
733 | 744 | let checkCaller = if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionContract()), ""))) | |
734 | 745 | then true | |
735 | 746 | else mustManager(i) | |
736 | 747 | if ((checkCaller == checkCaller)) | |
737 | 748 | then { | |
738 | 749 | let poolContractAddress = getStringOrFail(keyMappingPoolLPAssetToPoolContractAddress(lpAssetId)) | |
739 | 750 | let poolWeightKey = keyPoolToWeight(poolContractAddress) | |
740 | 751 | let gwxWeightKey = keyPoolToWeight(GWXvirtualPOOL) | |
741 | 752 | let gwxWeight = valueOrElse(getInteger(gwxWeightKey), 0) | |
742 | 753 | let poolWeight = valueOrElse(getInteger(poolWeightKey), 0) | |
743 | 754 | let poolWeightNew = share | |
744 | 755 | let factoryCfg = split(getStringOrFail(keyFactoryConfig()), SEP) | |
745 | 756 | let stakingContract = getStakingAddressOrFail(factoryCfg) | |
746 | 757 | let onModifyWeightInv = invoke(stakingContract, "onModifyWeight", [lpAssetId, poolContractAddress], nil) | |
747 | 758 | if ((onModifyWeightInv == onModifyWeightInv)) | |
748 | 759 | then { | |
749 | 760 | let gwxVirtualPoolActions = if ((gwxWeight == 0)) | |
750 | 761 | then nil | |
751 | 762 | else [IntegerEntry(gwxWeightKey, 0)] | |
752 | 763 | let poolWeightHistoryKey = keyPoolToWeightHistory(poolContractAddress, 0) | |
753 | 764 | let poolWeightHistoryOrUnit = getInteger(poolWeightHistoryKey) | |
754 | 765 | let poolWeightHistoryActions = if ((poolWeightHistoryOrUnit == unit)) | |
755 | 766 | then nil | |
756 | 767 | else [DeleteEntry(poolWeightHistoryKey)] | |
757 | 768 | (([IntegerEntry(poolWeightKey, poolWeightNew)] ++ gwxVirtualPoolActions) ++ poolWeightHistoryActions) | |
758 | 769 | } | |
759 | 770 | else throw("Strict value is not equal to itself.") | |
760 | 771 | } | |
761 | 772 | else throw("Strict value is not equal to itself.") | |
762 | 773 | } | |
763 | 774 | ||
764 | 775 | ||
765 | 776 | ||
766 | 777 | @Callable(i) | |
767 | 778 | func modifyWeights (btcPoolAddress,ethPoolAddress,ethBtcPoolAddress,usdcUsdtPoolAddress) = { | |
768 | 779 | let checkCaller = mustManager(i) | |
769 | 780 | if ((checkCaller == checkCaller)) | |
770 | 781 | then { | |
771 | 782 | let ethBtcWeightNew = ((5 * POOLWEIGHTMULT) / 100) | |
772 | 783 | let usdcUsdtWeightNew = ((5 * POOLWEIGHTMULT) / 100) | |
773 | 784 | let weightDecrement = ((5 * POOLWEIGHTMULT) / 100) | |
774 | 785 | let factoryCfg = split(getStringOrFail(keyFactoryConfig()), SEP) | |
775 | 786 | let stakingDapp = getStakingAddressOrFail(factoryCfg) | |
776 | 787 | let gwxRewardDapp = getGwxRewardAddressOrFail(factoryCfg) | |
777 | 788 | let btcWeightKEY = keyPoolToWeight(btcPoolAddress) | |
778 | 789 | let ethWeightKEY = keyPoolToWeight(ethPoolAddress) | |
779 | 790 | let ethBtcWeightKEY = keyPoolToWeight(ethBtcPoolAddress) | |
780 | 791 | let usdcUsdtWeightKEY = keyPoolToWeight(usdcUsdtPoolAddress) | |
781 | 792 | let btcWeight = getIntOrFail(btcWeightKEY) | |
782 | 793 | let ethWeight = getIntOrFail(ethWeightKEY) | |
783 | 794 | let btcWeightNew = (btcWeight - weightDecrement) | |
784 | 795 | let ethWeightNew = (ethWeight - weightDecrement) | |
785 | 796 | if ((0 >= btcWeightNew)) | |
786 | 797 | then throwErr(("invalid btcWeightNew: " + toString(btcWeightNew))) | |
787 | 798 | else if ((0 >= ethWeightNew)) | |
788 | 799 | then throwErr(("invalid ethWeightNew: " + toString(ethWeightNew))) | |
789 | 800 | else { | |
790 | 801 | let btcLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(btcPoolAddress)) | |
791 | 802 | let ethLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(ethPoolAddress)) | |
792 | 803 | let ethBtcLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(ethBtcPoolAddress)) | |
793 | 804 | let usdcUsdtLpAssetIdStr = getStringOrFail(keyMappingPoolContractToLPAsset(usdcUsdtPoolAddress)) | |
794 | 805 | let onModifyWeightBtc = invoke(stakingDapp, "onModifyWeight", [btcLpAssetIdStr, btcPoolAddress], nil) | |
795 | 806 | if ((onModifyWeightBtc == onModifyWeightBtc)) | |
796 | 807 | then { | |
797 | 808 | let onModifyWeightEth = invoke(stakingDapp, "onModifyWeight", [ethLpAssetIdStr, ethPoolAddress], nil) | |
798 | 809 | if ((onModifyWeightEth == onModifyWeightEth)) | |
799 | 810 | then { | |
800 | 811 | let onModifyWeightEthBtc = invoke(stakingDapp, "onModifyWeight", [ethBtcLpAssetIdStr, ethBtcPoolAddress], nil) | |
801 | 812 | if ((onModifyWeightEthBtc == onModifyWeightEthBtc)) | |
802 | 813 | then { | |
803 | 814 | let onModifyWeightUsdcUsdt = invoke(stakingDapp, "onModifyWeight", [usdcUsdtLpAssetIdStr, usdcUsdtPoolAddress], nil) | |
804 | 815 | if ((onModifyWeightUsdcUsdt == onModifyWeightUsdcUsdt)) | |
805 | 816 | 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)] | |
806 | 817 | else throw("Strict value is not equal to itself.") | |
807 | 818 | } | |
808 | 819 | else throw("Strict value is not equal to itself.") | |
809 | 820 | } | |
810 | 821 | else throw("Strict value is not equal to itself.") | |
811 | 822 | } | |
812 | 823 | else throw("Strict value is not equal to itself.") | |
813 | 824 | } | |
814 | 825 | } | |
815 | 826 | else throw("Strict value is not equal to itself.") | |
816 | 827 | } | |
817 | 828 | ||
818 | 829 | ||
819 | 830 | ||
820 | 831 | @Callable(i) | |
821 | 832 | func checkWxEmissionPoolLabel (amountAssetId,priceAssetId) = { | |
822 | 833 | let haveLabel = match getBoolean(keyWxEmission(amountAssetId, priceAssetId)) { | |
823 | 834 | case b: Boolean => | |
824 | 835 | b | |
825 | 836 | case _ => | |
826 | 837 | false | |
827 | 838 | } | |
828 | 839 | $Tuple2(nil, haveLabel) | |
829 | 840 | } | |
830 | 841 | ||
831 | 842 | ||
832 | 843 | ||
833 | 844 | @Callable(i) | |
834 | 845 | func setWxEmissionPoolLabel (amountAssetId,priceAssetId) = { | |
835 | 846 | let checkCaller = mustAdmin(i) | |
836 | 847 | if ((checkCaller == checkCaller)) | |
837 | 848 | then $Tuple2([BooleanEntry(keyWxEmission(amountAssetId, priceAssetId), true)], unit) | |
838 | 849 | else throw("Strict value is not equal to itself.") | |
839 | 850 | } | |
840 | 851 | ||
841 | 852 | ||
842 | 853 | ||
843 | 854 | @Callable(i) | |
844 | 855 | func deleteWxEmissionPoolLabel (amountAssetId,priceAssetId) = { | |
845 | 856 | let checkCaller = if ((i.caller == this)) | |
846 | 857 | then true | |
847 | 858 | else mustAdmin(i) | |
848 | 859 | if ((checkCaller == checkCaller)) | |
849 | 860 | then $Tuple2([DeleteEntry(keyWxEmission(amountAssetId, priceAssetId))], unit) | |
850 | 861 | else throw("Strict value is not equal to itself.") | |
851 | 862 | } | |
852 | 863 | ||
853 | 864 | ||
854 | 865 | ||
855 | 866 | @Callable(i) | |
856 | 867 | func onVerificationLoss (assetId) = { | |
857 | 868 | let checkCaller = if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyAssetsStoreContract()), ""))) | |
858 | 869 | then true | |
859 | 870 | else mustManager(i) | |
860 | 871 | if ((checkCaller == checkCaller)) | |
861 | 872 | then { | |
862 | 873 | let priceAssets = getPriceAssets() | |
863 | 874 | let checkPriceAssetsSize = if ((size(priceAssets) > 0)) | |
864 | 875 | then true | |
865 | 876 | else throwErr("invalid price assets") | |
866 | 877 | if ((checkPriceAssetsSize == checkPriceAssetsSize)) | |
867 | 878 | then { | |
868 | 879 | func cb (acc,priceAsset) = { | |
869 | 880 | let r = invoke(this, "deleteWxEmissionPoolLabel", [assetId, priceAsset], nil) | |
870 | 881 | if ((r == r)) | |
871 | 882 | then unit | |
872 | 883 | else throw("Strict value is not equal to itself.") | |
873 | 884 | } | |
874 | 885 | ||
875 | 886 | let actions = { | |
876 | 887 | let $l = priceAssets | |
877 | 888 | let $s = size($l) | |
878 | 889 | let $acc0 = unit | |
879 | 890 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
880 | 891 | then $a | |
881 | 892 | else cb($a, $l[$i]) | |
882 | 893 | ||
883 | 894 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
884 | 895 | then $a | |
885 | 896 | else throw("List size exceeds 13") | |
886 | 897 | ||
887 | 898 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13) | |
888 | 899 | } | |
889 | 900 | if ((actions == actions)) | |
890 | 901 | then $Tuple2(nil, unit) | |
891 | 902 | else throw("Strict value is not equal to itself.") | |
892 | 903 | } | |
893 | 904 | else throw("Strict value is not equal to itself.") | |
894 | 905 | } | |
895 | 906 | else throw("Strict value is not equal to itself.") | |
896 | 907 | } | |
897 | 908 | ||
898 | 909 | ||
899 | 910 | ||
900 | 911 | @Callable(i) | |
901 | 912 | func isPoolOneTokenOperationsDisabledREADONLY (poolAddress) = { | |
902 | 913 | let poolConfig = getPoolConfig(poolAddress) | |
903 | 914 | let assetsInternal = $Tuple2(parseIntValue(poolConfig[idxIAmtAssetId]), parseIntValue(poolConfig[idxIPriceAssetId])) | |
904 | 915 | let poolOneTokenOperationsDisabled = valueOrElse(getBoolean(keyPoolOneTokenOperationsDisabled(assetsInternal)), false) | |
905 | 916 | let allPoolsOneTokenOperationsDisabled = valueOrElse(getBoolean(keyAllPoolsOneTokenOperationsDisabled()), false) | |
906 | 917 | $Tuple2(nil, if (allPoolsOneTokenOperationsDisabled) | |
907 | 918 | then true | |
908 | 919 | else poolOneTokenOperationsDisabled) | |
909 | 920 | } | |
910 | 921 | ||
911 | 922 | ||
912 | 923 | ||
913 | 924 | @Callable(i) | |
925 | + | func isPoolSwapDisabledREADONLY (poolAddress) = { | |
926 | + | let poolConfig = getPoolConfig(poolAddress) | |
927 | + | let assetsInternal = $Tuple2(parseIntValue(poolConfig[idxIAmtAssetId]), parseIntValue(poolConfig[idxIPriceAssetId])) | |
928 | + | let poolSwapDisabled = valueOrElse(getBoolean(keyPoolSwapDisabled(assetsInternal)), false) | |
929 | + | let allPoolsSwapDisabled = valueOrElse(getBoolean(keyAllPoolsSwapDisabled()), false) | |
930 | + | $Tuple2(nil, if (allPoolsSwapDisabled) | |
931 | + | then true | |
932 | + | else poolSwapDisabled) | |
933 | + | } | |
934 | + | ||
935 | + | ||
936 | + | ||
937 | + | @Callable(i) | |
914 | 938 | func getInFeeREADONLY (poolAddress) = { | |
915 | 939 | let fee = intOrDefaultOrFallback(keyInFee(poolAddress), keyInFeeDefault(), 0) | |
916 | 940 | $Tuple2(nil, fee) | |
917 | 941 | } | |
918 | 942 | ||
919 | 943 | ||
920 | 944 | ||
921 | 945 | @Callable(i) | |
922 | 946 | func getOutFeeREADONLY (poolAddress) = { | |
923 | 947 | let fee = intOrDefaultOrFallback(keyOutFee(poolAddress), keyOutFeeDefault(), fraction(10, MULT8, 10000)) | |
924 | 948 | $Tuple2(nil, fee) | |
925 | 949 | } | |
926 | 950 | ||
927 | 951 | ||
928 | 952 | ||
929 | 953 | @Callable(i) | |
930 | 954 | func getSwapFeeREADONLY (poolAddressStr) = { | |
931 | 955 | let feeOption = match getString(this, keySwapFee(poolAddressStr)) { | |
932 | 956 | case s: String => | |
933 | 957 | let parts = split(s, SEP) | |
934 | 958 | let poolFee = parseIntValue(parts[1]) | |
935 | 959 | let protocolFee = parseIntValue(parts[2]) | |
936 | 960 | $Tuple2(poolFee, protocolFee) | |
937 | 961 | case _: Unit => | |
938 | 962 | unit | |
939 | 963 | case _ => | |
940 | 964 | throw("Match error") | |
941 | 965 | } | |
942 | 966 | $Tuple2(nil, feeOption) | |
943 | 967 | } | |
944 | 968 | ||
945 | 969 | ||
946 | 970 | ||
947 | 971 | @Callable(i) | |
948 | 972 | func poolInfoREADONLY (amountAssetIdStr,priceAssetIdStr) = { | |
949 | 973 | let amountAssetInternalIdOption = getInteger(this, keyMappingsBaseAsset2internalId(amountAssetIdStr)) | |
950 | 974 | let priceAssetInternalIdOption = getInteger(this, keyMappingsBaseAsset2internalId(priceAssetIdStr)) | |
951 | 975 | let poolContractAddressOption = getString(this, keyMappingPoolAssetsToPoolContractAddress(value(amountAssetInternalIdOption), value(priceAssetInternalIdOption))) | |
952 | 976 | let lpAssetIdOption = getString(this, keyMappingPoolContractToLPAsset(value(poolContractAddressOption))) | |
953 | 977 | let poolExists = if (if (isDefined(amountAssetInternalIdOption)) | |
954 | 978 | then isDefined(priceAssetInternalIdOption) | |
955 | 979 | else false) | |
956 | 980 | then isDefined(poolContractAddressOption) | |
957 | 981 | else false | |
958 | 982 | let poolInfo = if (poolExists) | |
959 | 983 | then $Tuple2(addressFromStringValue(value(poolContractAddressOption)), parseAssetId(value(lpAssetIdOption))) | |
960 | 984 | else unit | |
961 | 985 | $Tuple2(nil, poolInfo) | |
962 | 986 | } | |
963 | 987 | ||
964 | 988 | ||
965 | 989 | ||
966 | 990 | @Callable(i) | |
967 | 991 | func getPoolStatusREADONLY (poolAddress) = { | |
968 | 992 | let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolAddress)), SEP) | |
969 | 993 | let amountAssetInternal = poolAssets[1] | |
970 | 994 | let priceAssetInternal = poolAssets[2] | |
971 | 995 | let cfg = split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP) | |
972 | 996 | $Tuple2(nil, parseIntValue(cfg[idxPoolStatus])) | |
973 | 997 | } | |
974 | 998 | ||
975 | 999 | ||
976 | 1000 | ||
977 | 1001 | @Callable(i) | |
978 | 1002 | func getPoolConfigREADONLY (poolAddress) = { | |
979 | 1003 | let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolAddress)), SEP) | |
980 | 1004 | let amountAssetInternal = poolAssets[1] | |
981 | 1005 | let priceAssetInternal = poolAssets[2] | |
982 | 1006 | let cfg = split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP) | |
983 | 1007 | $Tuple2(nil, cfg) | |
984 | 1008 | } | |
985 | 1009 | ||
986 | 1010 | ||
987 | 1011 | ||
988 | 1012 | @Callable(i) | |
989 | 1013 | func getPoolConfigByLpAssetIdREADONLY (lpAssetIdStr) = { | |
990 | 1014 | let poolAssets = split(getStringOrFail(keyMappingLpAssetToPoolAssets(lpAssetIdStr)), SEP) | |
991 | 1015 | let amountAssetInternal = poolAssets[1] | |
992 | 1016 | let priceAssetInternal = poolAssets[2] | |
993 | 1017 | let cfg = split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP) | |
994 | 1018 | $Tuple2(nil, cfg) | |
995 | 1019 | } | |
996 | 1020 | ||
997 | 1021 | ||
998 | 1022 | ||
999 | 1023 | @Callable(i) | |
1000 | 1024 | func poolExistsREADONLY (amountAssetId,priceAssetId) = $Tuple2(nil, poolExistsInternal(amountAssetId, priceAssetId)) | |
1001 | 1025 | ||
1002 | 1026 | ||
1003 | 1027 | ||
1004 | 1028 | @Callable(i) | |
1005 | 1029 | func skipOrderValidationREADONLY (poolAddress) = $Tuple2(nil, valueOrElse(getBoolean(keySkipOrderValidation(poolAddress)), false)) | |
1006 | 1030 | ||
1007 | 1031 | ||
1008 | 1032 | ||
1009 | 1033 | @Callable(i) | |
1010 | 1034 | func getChangeAmpConfigREADONLY (poolAddress) = { | |
1011 | 1035 | let delay = getIntegerValue(keyChangeAmpDelay(poolAddress)) | |
1012 | 1036 | let delta = getIntegerValue(keyChangeAmpDelta(poolAddress)) | |
1013 | 1037 | let target = getIntegerValue(keyChangeAmpTarget(poolAddress)) | |
1014 | 1038 | $Tuple2(nil, [delay, delta, target]) | |
1015 | 1039 | } | |
1016 | 1040 | ||
1017 | 1041 | ||
1018 | 1042 | ||
1019 | 1043 | @Callable(i) | |
1020 | 1044 | func getPoolWeightREADONLY (lpAssetId) = { | |
1021 | 1045 | let poolAddress = getStringOrFail(keyMappingPoolLPAssetToPoolContractAddress(lpAssetId)) | |
1022 | 1046 | let weight = valueOrElse(getInteger(keyPoolToWeight(poolAddress)), 0) | |
1023 | 1047 | $Tuple2(nil, weight) | |
1024 | 1048 | } | |
1025 | 1049 | ||
1026 | 1050 | ||
1027 | 1051 | ||
1028 | 1052 | @Callable(i) | |
1029 | 1053 | func deletePool (poolContractAddress) = { | |
1030 | 1054 | let poolConfig = getPoolConfig(poolContractAddress) | |
1031 | 1055 | let checkCaller = if ((toString(i.caller) == getPoolCreator(poolContractAddress))) | |
1032 | 1056 | then if (isPoolEmpty(poolContractAddress)) | |
1033 | 1057 | then true | |
1034 | 1058 | else throwErr("Pool is not empty") | |
1035 | 1059 | else mustManager(i) | |
1036 | 1060 | if ((checkCaller == checkCaller)) | |
1037 | 1061 | then { | |
1038 | 1062 | let checkWeight = if ((valueOrElse(getInteger(keyPoolToWeight(poolContractAddress)), 0) == 0)) | |
1039 | 1063 | then true | |
1040 | 1064 | else throwErr("Pool weight is not Zero") | |
1041 | 1065 | if ((checkWeight == checkWeight)) | |
1042 | 1066 | then { | |
1043 | 1067 | let checkStatus = if ((poolConfig[idxPoolStatus] == toString(PoolShutdown))) | |
1044 | 1068 | then true | |
1045 | 1069 | else throwErr("Pool must be SHUTDOWN (4)") | |
1046 | 1070 | if ((checkStatus == checkStatus)) | |
1047 | 1071 | then { | |
1048 | - | let $ | |
1049 | - | let amountAssetId = $ | |
1050 | - | let priceAssetId = $ | |
1051 | - | let lpAssetId = $ | |
1052 | - | let amountAssetInternal = $ | |
1053 | - | let priceAssetInternal = $ | |
1072 | + | let $t04039540532 = getAssetsDataFromPoolAddress(poolContractAddress) | |
1073 | + | let amountAssetId = $t04039540532._1 | |
1074 | + | let priceAssetId = $t04039540532._2 | |
1075 | + | let lpAssetId = $t04039540532._3 | |
1076 | + | let amountAssetInternal = $t04039540532._4 | |
1077 | + | let priceAssetInternal = $t04039540532._5 | |
1054 | 1078 | let userPoolsContract = addressFromStringValue(getStringValue(keyUserPoolsContract())) | |
1055 | 1079 | let userPoolsInvoke = invoke(userPoolsContract, "deletePool", [amountAssetId, priceAssetId], nil) | |
1056 | 1080 | if ((userPoolsInvoke == userPoolsInvoke)) | |
1057 | 1081 | then { | |
1058 | 1082 | let votingEmissionContract = addressFromStringValue(getStringValue(keyVotingEmissionContract())) | |
1059 | 1083 | let votingEmissionInvoke = invoke(votingEmissionContract, "deletePool", [amountAssetId, priceAssetId], nil) | |
1060 | 1084 | if ((votingEmissionInvoke == votingEmissionInvoke)) | |
1061 | 1085 | then { | |
1062 | 1086 | let assetsStoreContract = addressFromStringValue(getStringValue(keyAssetsStoreContract())) | |
1063 | 1087 | let assetsStoreInvoke = invoke(assetsStoreContract, "deletePool", [amountAssetId, priceAssetId], nil) | |
1064 | 1088 | if ((assetsStoreInvoke == assetsStoreInvoke)) | |
1065 | 1089 | then [DeleteEntry(keyMappingPoolContractToLPAsset(poolContractAddress)), DeleteEntry(keyMappingPoolContractAddressToPoolAssets(poolContractAddress)), DeleteEntry(keyMappingPoolAssetsToLpasset(toString(amountAssetInternal), toString(priceAssetInternal))), DeleteEntry(keyMappingPoolAssetsToPoolContractAddress(amountAssetInternal, priceAssetInternal)), DeleteEntry(keyPoolConfig(toString(amountAssetInternal), toString(priceAssetInternal))), DeleteEntry(keyMappingLpAssetToPoolAssets(lpAssetId)), DeleteEntry(keyMappingPoolLPAssetToPoolContractAddress(lpAssetId)), DeleteEntry(keyWxEmission(amountAssetId, priceAssetId)), DeleteEntry(keyPoolToWeight(poolContractAddress)), DeleteEntry(keyPoolSpread(poolContractAddress)), DeleteEntry(keyInFee(poolContractAddress)), DeleteEntry(keyOutFee(poolContractAddress)), DeleteEntry(keySkipOrderValidation(poolContractAddress)), DeleteEntry(keyChangeAmpDelay(poolContractAddress)), DeleteEntry(keyChangeAmpDelta(poolContractAddress)), DeleteEntry(keyChangeAmpTarget(poolContractAddress))] | |
1066 | 1090 | else throw("Strict value is not equal to itself.") | |
1067 | 1091 | } | |
1068 | 1092 | else throw("Strict value is not equal to itself.") | |
1069 | 1093 | } | |
1070 | 1094 | else throw("Strict value is not equal to itself.") | |
1071 | 1095 | } | |
1072 | 1096 | else throw("Strict value is not equal to itself.") | |
1073 | 1097 | } | |
1074 | 1098 | else throw("Strict value is not equal to itself.") | |
1075 | 1099 | } | |
1076 | 1100 | else throw("Strict value is not equal to itself.") | |
1077 | 1101 | } | |
1078 | 1102 | ||
1079 | 1103 | ||
1080 | 1104 | @Verifier(tx) | |
1081 | 1105 | func verify () = { | |
1082 | 1106 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
1083 | 1107 | case pk: ByteVector => | |
1084 | 1108 | pk | |
1085 | 1109 | case _: Unit => | |
1086 | 1110 | tx.senderPublicKey | |
1087 | 1111 | case _ => | |
1088 | 1112 | throw("Match error") | |
1089 | 1113 | } | |
1090 | 1114 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
1091 | 1115 | } | |
1092 | 1116 |
github/deemru/w8io/026f985 129.90 ms ◑