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