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