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