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