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