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