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