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