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