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