tx · FgcgESC5EunTkVKAAJUjb7D3rmmGpYRo59qoYKje7sn2 3Mzep1R5kHeC1ecKFkWjuhU3Gw4LAdCib9N: -0.01800000 Waves 2024.02.20 11:24 [2984301] smart account 3Mzep1R5kHeC1ecKFkWjuhU3Gw4LAdCib9N > SELF 0.00000000 Waves
{ "type": 13, "id": "FgcgESC5EunTkVKAAJUjb7D3rmmGpYRo59qoYKje7sn2", "fee": 1800000, "feeAssetId": null, "timestamp": 1708417465504, "version": 2, "chainId": 84, "sender": "3Mzep1R5kHeC1ecKFkWjuhU3Gw4LAdCib9N", "senderPublicKey": "41THq9VrFxHEvVGJyz2oMpJQErnSkkqJXpBypSDxa5Mv", "proofs": [ "5XQaPvTxZmHgJJbDkh8jTzjuJPzfp7yh7zBZMBoEGoEv2R1ps6CgWNsNn4yoFZ8FSv5iJTNPtL1LPraDMzSHZeJL" ], "script": "base64:BwIoCAISBAoCAhgSBgoEAgIBARIECgICGBIECgICGBIECgICGBIECgICGDQAB2NoYWluSWQJAMkBAgkAygECCAUEdGhpcwVieXRlcwABAAEACGNoYWluSWRUAQFUAAhjaGFpbklkVwEBVwADU0VQAgJfXwAFV0FWRVMCBVdBVkVTABBjb250cmFjdEZpbGVuYW1lAhV3eGRhb19jYWxjdWxhdG9yLnJpZGUABW11bHQ4AIDC1y8ABm11bHQxOAkAtgIBAICAkLu61q3wDQANd2F2ZXNEZWNpbWFscwAIAAx1c2R0RGVjaW1hbHMABgEFdG9YMTgCB29yaWdWYWwNb3JpZ1NjYWxlTXVsdAkAvAIDCQC2AgEFB29yaWdWYWwFBm11bHQxOAkAtgIBBQ1vcmlnU2NhbGVNdWx0AQdmcm9tWDE4AgN2YWwPcmVzdWx0U2NhbGVNdWx0CQCgAwEJALwCAwUDdmFsCQC2AgEFD3Jlc3VsdFNjYWxlTXVsdAUGbXVsdDE4AQd3cmFwRXJyAQFzCQCsAgIJAKwCAgUQY29udHJhY3RGaWxlbmFtZQICOiAFAXMBCHRocm93RXJyAQFz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FsIHRvIGl0c2VsZi4BaQEQZ2V0VHJlYXN1cnlWYWx1ZQIPY2FsbGVyUHVibGljS2V5BGFyZ3MEC2NoZWNrQ2FsbGVyCQELb25seUZhY3RvcnkBBQFpAwkAAAIFC2NoZWNrQ2FsbGVyBQtjaGVja0NhbGxlcgQNdHJlYXN1cnlWYWx1ZQkBB2Zyb21YMTgCCQERY2FsY1RyZWFzdXJ5VmFsdWUACQBsBgAKAAAFDHVzZHREZWNpbWFscwAAAAAFBERPV04JAJQKAgUDbmlsBQ10cmVhc3VyeVZhbHVlCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAQJ0eAEGdmVyaWZ5AAkAAAIFB2NoYWluSWQFCGNoYWluSWRUSQTfag==", "height": 2984301, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GYMAeHFch3LRN8yeSxsbwNVzaJFuRsu2kcKes6ezfrpr Next: none Diff:
Old | New | Differences | |
---|---|---|---|
173 | 173 | func getAssetInfoOrFail (assetId) = valueOrErrorMessage(assetInfo(assetId), wrapErr("invalid asset info")) | |
174 | 174 | ||
175 | 175 | ||
176 | - | func lockFormat (from,to,assetId,amount) = makeString(["%d%d%s%d", toString(from), toString(to), toBase58String(assetId), toString(amount)], SEP) | |
176 | + | func lockFormat (from,to,assetId,amount,lpAssetAmount) = makeString(["%d%d%s%d%d", toString(from), toString(to), toBase58String(assetId), toString(amount), toString(lpAssetAmount)], SEP) | |
177 | 177 | ||
178 | 178 | ||
179 | 179 | func lockParse (s) = { | |
426 | 426 | then { | |
427 | 427 | let lock = if ((userAddressOption == unit)) | |
428 | 428 | then unit | |
429 | - | else invoke(this, "lockInternal", [value(userAddressOption).bytes, assetId, amount], nil) | |
429 | + | else invoke(this, "lockInternal", [value(userAddressOption).bytes, assetId, amount, paymentAmount], nil) | |
430 | 430 | if ((lock == lock)) | |
431 | 431 | then $Tuple2((acc._1 :+ assetId), (acc._2 :+ amount)) | |
432 | 432 | else throw("Strict value is not equal to itself.") | |
515 | 515 | ||
516 | 516 | ||
517 | 517 | @Callable(i) | |
518 | - | func lockInternal (userAddressBytes,assetId,amount) = { | |
518 | + | func lockInternal (userAddressBytes,assetId,amount,lpAssetAmount) = { | |
519 | 519 | let checkCaller = onlyThis(i) | |
520 | 520 | if ((checkCaller == checkCaller)) | |
521 | 521 | then { | |
525 | 525 | let getAssets = invoke(factoryAddress(), "transferAsset", [lockAddress().bytes, amount, assetId], nil) | |
526 | 526 | if ((getAssets == getAssets)) | |
527 | 527 | then { | |
528 | - | let factoryActions = [invoke(factoryAddress(), "stringEntry", [keyLock(userAddress, lockGlobalCounter), lockFormat(height, (height + lockDuration), assetId, amount)], nil), invoke(factoryAddress(), "integerEntry", [keyLockGlobalCounter(), (lockGlobalCounter + 1)], nil)] | |
528 | + | let factoryActions = [invoke(factoryAddress(), "stringEntry", [keyLock(userAddress, lockGlobalCounter), lockFormat(height, (height + lockDuration), assetId, amount, lpAssetAmount)], nil), invoke(factoryAddress(), "integerEntry", [keyLockGlobalCounter(), (lockGlobalCounter + 1)], nil)] | |
529 | 529 | $Tuple2(nil, factoryActions) | |
530 | 530 | } | |
531 | 531 | else throw("Strict value is not equal to itself.") | |
543 | 543 | let userAddress = addressFromPublicKey(callerPublicKey) | |
544 | 544 | func fold (acc,next) = { | |
545 | 545 | let counter = valueOrErrorMessage(parseInt(next), wrapErr("invalid counter")) | |
546 | - | let $ | |
547 | - | let from = $ | |
548 | - | let to = $ | |
549 | - | let assetId = $ | |
550 | - | let amount = $ | |
546 | + | let $t01761317822 = lockParse(valueOrErrorMessage(getString(factoryAddress(), keyLock(userAddress, counter)), wrapErr(("invalid lock: " + keyLock(userAddress, counter))))) | |
547 | + | let from = $t01761317822._1 | |
548 | + | let to = $t01761317822._2 | |
549 | + | let assetId = $t01761317822._3 | |
550 | + | let amount = $t01761317822._4 | |
551 | 551 | let result = if ((height > to)) | |
552 | 552 | then [invoke(lockAddress(), "transferAsset", [userAddress.bytes, amount, assetId], nil), invoke(factoryAddress(), "deleteEntry", [keyLock(userAddress, counter)], nil)] | |
553 | 553 | else throwErr("invalid height") |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 7 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let chainId = take(drop(this.bytes, 1), 1) | |
5 | 5 | ||
6 | 6 | let chainIdT = base58'2T' | |
7 | 7 | ||
8 | 8 | let chainIdW = base58'2W' | |
9 | 9 | ||
10 | 10 | let SEP = "__" | |
11 | 11 | ||
12 | 12 | let WAVES = "WAVES" | |
13 | 13 | ||
14 | 14 | let contractFilename = "wxdao_calculator.ride" | |
15 | 15 | ||
16 | 16 | let mult8 = 100000000 | |
17 | 17 | ||
18 | 18 | let mult18 = toBigInt(1000000000000000000) | |
19 | 19 | ||
20 | 20 | let wavesDecimals = 8 | |
21 | 21 | ||
22 | 22 | let usdtDecimals = 6 | |
23 | 23 | ||
24 | 24 | func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), mult18, toBigInt(origScaleMult)) | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), mult18)) | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func wrapErr (s) = ((contractFilename + ": ") + s) | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func throwErr (s) = throw(wrapErr(s)) | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func keyFactoryAddress () = "%s__factoryAddress" | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func factoryAddress () = valueOrErrorMessage(match getString(this, keyFactoryAddress()) { | |
40 | 40 | case s: String => | |
41 | 41 | addressFromString(s) | |
42 | 42 | case _: Unit => | |
43 | 43 | unit | |
44 | 44 | case _ => | |
45 | 45 | throw("Match error") | |
46 | 46 | }, wrapErr("invalid factory address")) | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func onlyAddress (i,address) = if ((i.caller == address)) | |
50 | 50 | then true | |
51 | 51 | else throwErr("permission denied") | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func onlyThis (i) = onlyAddress(i, this) | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func onlyFactory (i) = onlyAddress(i, factoryAddress()) | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | let wxAssetId = if ((chainId == chainIdW)) | |
61 | 61 | then base58'Atqv59EYzjFGuitKVnMRk6H8FukjoV3ktPorbEys25on' | |
62 | 62 | else if ((chainId == chainIdT)) | |
63 | 63 | then base58'EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc' | |
64 | 64 | else throwErr("invalid chain id") | |
65 | 65 | ||
66 | 66 | func keyCurrentPeriod () = makeString(["%s", "currentPeriod"], SEP) | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func keyStartHeightByPeriod (period) = makeString(["%s%d", "startHeight", toString(period)], SEP) | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func keyPeriodLength () = makeString(["%s", "periodLength"], SEP) | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func keyTreasuryValueByPeriod (period) = makeString(["%s%d", "treasuryValue", toString(period)], SEP) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func keyLockGlobalCounter () = makeString(["%s", "lockGlobalCounter"], SEP) | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func keyLockDuration () = makeString(["%s", "lockDuration"], SEP) | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func keyLock (userAddress,counter) = makeString(["%s%s%d", "lock", toString(userAddress), toString(counter)], SEP) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func keySkinTotal (treasuryAddress) = ("skin_total_" + toString(treasuryAddress)) | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func keyPowerConfigAddress () = "%s__powerConfigAddress" | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func powerConfigAddress () = valueOrErrorMessage(match getString(factoryAddress(), keyPowerConfigAddress()) { | |
94 | 94 | case s: String => | |
95 | 95 | addressFromString(s) | |
96 | 96 | case _: Unit => | |
97 | 97 | unit | |
98 | 98 | case _ => | |
99 | 99 | throw("Match error") | |
100 | 100 | }, wrapErr("invalid power config address")) | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func keyPowerAssetId () = "powerAssetId" | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func getPowerAssetId () = fromBase58String(valueOrErrorMessage(getString(powerConfigAddress(), keyPowerAssetId()), wrapErr("invalid power asset id"))) | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func keyPowerContractAddress () = "%s__powerContractAddress" | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | func powerContractAddress () = valueOrErrorMessage(match getString(factoryAddress(), keyPowerContractAddress()) { | |
113 | 113 | case s: String => | |
114 | 114 | addressFromString(s) | |
115 | 115 | case _: Unit => | |
116 | 116 | unit | |
117 | 117 | case _ => | |
118 | 118 | throw("Match error") | |
119 | 119 | }, wrapErr("invalid power contract address")) | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func keyLockAddress () = "%s__lockAddress" | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func lockAddress () = valueOrErrorMessage(match getString(factoryAddress(), keyLockAddress()) { | |
126 | 126 | case s: String => | |
127 | 127 | addressFromString(s) | |
128 | 128 | case _: Unit => | |
129 | 129 | unit | |
130 | 130 | case _ => | |
131 | 131 | throw("Match error") | |
132 | 132 | }, wrapErr("invalid lock contract address")) | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func keyPoolsFactoryAddress () = "%s__poolsFactoryAddress" | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func getPoolsFactoryAddress () = valueOrErrorMessage(match getString(factoryAddress(), keyPoolsFactoryAddress()) { | |
139 | 139 | case s: String => | |
140 | 140 | addressFromString(s) | |
141 | 141 | case _: Unit => | |
142 | 142 | unit | |
143 | 143 | case _ => | |
144 | 144 | throw("Match error") | |
145 | 145 | }, wrapErr("invalid pools factory address")) | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | func keyTreasuryAddress () = "%s__treasuryAddress" | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | func getTreasuryAddress () = valueOrErrorMessage(match getString(factoryAddress(), keyTreasuryAddress()) { | |
152 | 152 | case s: String => | |
153 | 153 | addressFromString(s) | |
154 | 154 | case _: Unit => | |
155 | 155 | unit | |
156 | 156 | case _ => | |
157 | 157 | throw("Match error") | |
158 | 158 | }, wrapErr("invalid treasury address")) | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | func keyAssets () = "%s__assets" | |
162 | 162 | ||
163 | 163 | ||
164 | 164 | func getAssetsStr () = valueOrErrorMessage(getString(factoryAddress(), keyAssets()), wrapErr("invalid assets")) | |
165 | 165 | ||
166 | 166 | ||
167 | 167 | func keyLpAssetId () = "%s__lpAssetId" | |
168 | 168 | ||
169 | 169 | ||
170 | 170 | func getLpAssetId () = fromBase58String(valueOrErrorMessage(getString(factoryAddress(), keyLpAssetId()), wrapErr("invalid lp asset id"))) | |
171 | 171 | ||
172 | 172 | ||
173 | 173 | func getAssetInfoOrFail (assetId) = valueOrErrorMessage(assetInfo(assetId), wrapErr("invalid asset info")) | |
174 | 174 | ||
175 | 175 | ||
176 | - | func lockFormat (from,to,assetId,amount) = makeString(["%d%d%s%d", toString(from), toString(to), toBase58String(assetId), toString(amount)], SEP) | |
176 | + | func lockFormat (from,to,assetId,amount,lpAssetAmount) = makeString(["%d%d%s%d%d", toString(from), toString(to), toBase58String(assetId), toString(amount), toString(lpAssetAmount)], SEP) | |
177 | 177 | ||
178 | 178 | ||
179 | 179 | func lockParse (s) = { | |
180 | 180 | let parts = split(s, SEP) | |
181 | 181 | $Tuple4(valueOrErrorMessage(parseInt(parts[1]), wrapErr("error during processing lock start height")), valueOrErrorMessage(parseInt(parts[2]), wrapErr("error during processing lock end height")), fromBase58String(parts[3]), valueOrErrorMessage(parseInt(parts[4]), wrapErr("error during processing lock amount"))) | |
182 | 182 | } | |
183 | 183 | ||
184 | 184 | ||
185 | 185 | func getAssetsBalances (targetAddress,assetIdList) = { | |
186 | 186 | func map (acc,nextAssetIdStr) = { | |
187 | 187 | let balance = if ((nextAssetIdStr == WAVES)) | |
188 | 188 | then toX18(wavesBalance(targetAddress).available, pow(10, 0, wavesDecimals, 0, 0, DOWN)) | |
189 | 189 | else { | |
190 | 190 | let assetId = fromBase58String(nextAssetIdStr) | |
191 | 191 | let assetDecimals = getAssetInfoOrFail(assetId).decimals | |
192 | 192 | toX18(assetBalance(targetAddress, assetId), pow(10, 0, assetDecimals, 0, 0, DOWN)) | |
193 | 193 | } | |
194 | 194 | (acc :+ balance) | |
195 | 195 | } | |
196 | 196 | ||
197 | 197 | let $l = assetIdList | |
198 | 198 | let $s = size($l) | |
199 | 199 | let $acc0 = nil | |
200 | 200 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
201 | 201 | then $a | |
202 | 202 | else map($a, $l[$i]) | |
203 | 203 | ||
204 | 204 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
205 | 205 | then $a | |
206 | 206 | else throw("List size exceeds 10") | |
207 | 207 | ||
208 | 208 | $f0_2($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) | |
209 | 209 | } | |
210 | 210 | ||
211 | 211 | ||
212 | 212 | func getAssetsPrices (poolsFactoryAddress,assetIdList) = if ((chainId == chainIdW)) | |
213 | 213 | then { | |
214 | 214 | let wavesUsdtAddressStr = "3PKfrupEydU2nZAghVjZAfvCwMBkzuR1F52" | |
215 | 215 | let wavesUsdtPrice = parseBigIntValue({ | |
216 | 216 | let @ = invoke(poolsFactoryAddress, "getPrice", [wavesUsdtAddressStr], nil) | |
217 | 217 | if ($isInstanceOf(@, "String")) | |
218 | 218 | then @ | |
219 | 219 | else throw(($getType(@) + " couldn't be cast to String")) | |
220 | 220 | }) | |
221 | 221 | let wavesXtnAddressStr = "3PPZWgFNRKHLvM51pwS934C8VZ7d2F4Z58g" | |
222 | 222 | let wavesXtnPrice = parseBigIntValue({ | |
223 | 223 | let @ = invoke(poolsFactoryAddress, "getPrice", [wavesXtnAddressStr], nil) | |
224 | 224 | if ($isInstanceOf(@, "String")) | |
225 | 225 | then @ | |
226 | 226 | else throw(($getType(@) + " couldn't be cast to String")) | |
227 | 227 | }) | |
228 | 228 | let xtnUsdtPrice = fraction(wavesUsdtPrice, mult18, wavesXtnPrice) | |
229 | 229 | func map (acc,nextAssetId) = { | |
230 | 230 | let price = match nextAssetId { | |
231 | 231 | case _ => | |
232 | 232 | if (("2thsACuHmzDMuNezPM32wg9a3BwUzBWDeSKakgz3cw21" == $match0)) | |
233 | 233 | then { | |
234 | 234 | let pwrWavesAddressStr = "3PDi7Qq8pLQYvtKyTfQuqqPUWyhoYbU957t" | |
235 | 235 | let pwrWavesPrice = parseBigIntValue({ | |
236 | 236 | let @ = invoke(poolsFactoryAddress, "getPrice", [pwrWavesAddressStr], nil) | |
237 | 237 | if ($isInstanceOf(@, "String")) | |
238 | 238 | then @ | |
239 | 239 | else throw(($getType(@) + " couldn't be cast to String")) | |
240 | 240 | }) | |
241 | 241 | fraction(pwrWavesPrice, wavesUsdtPrice, mult18) | |
242 | 242 | } | |
243 | 243 | else if (("Atqv59EYzjFGuitKVnMRk6H8FukjoV3ktPorbEys25on" == $match0)) | |
244 | 244 | then { | |
245 | 245 | let wxWavesAddressStr = "3PFzaH2ghpwANHFgjeva83N1yxzErELx2eh" | |
246 | 246 | let wxWavesPrice = parseBigIntValue({ | |
247 | 247 | let @ = invoke(poolsFactoryAddress, "getPrice", [wxWavesAddressStr], nil) | |
248 | 248 | if ($isInstanceOf(@, "String")) | |
249 | 249 | then @ | |
250 | 250 | else throw(($getType(@) + " couldn't be cast to String")) | |
251 | 251 | }) | |
252 | 252 | fraction(wxWavesPrice, wavesUsdtPrice, mult18) | |
253 | 253 | } | |
254 | 254 | else if (("34N9YcEETLWn93qYQ64EsP1x89tSruJU44RrEMSXXEPJ" == $match0)) | |
255 | 255 | then { | |
256 | 256 | let wavesUsdtwxgAddressStr = "3PKMVZ7kQeaREajYi8Yc25Ro6mcNw5D6QSa" | |
257 | 257 | let wavesUsdtwxgPrice = parseBigIntValue({ | |
258 | 258 | let @ = invoke(poolsFactoryAddress, "getPrice", [wavesUsdtwxgAddressStr], nil) | |
259 | 259 | if ($isInstanceOf(@, "String")) | |
260 | 260 | then @ | |
261 | 261 | else throw(($getType(@) + " couldn't be cast to String")) | |
262 | 262 | }) | |
263 | 263 | fraction(wavesUsdtPrice, mult18, wavesUsdtwxgPrice) | |
264 | 264 | } | |
265 | 265 | else if (("6XtHjpXbs9RRJP2Sr9GUyVqzACcby9TkThHXnjVC5CDJ" == $match0)) | |
266 | 266 | then { | |
267 | 267 | let wavesUsdcwxgAddressStr = "3P3g3eipfG2NZKKQE8DZXt2E9tRJqii9jcX" | |
268 | 268 | let wavesUsdcwxgPrice = parseBigIntValue({ | |
269 | 269 | let @ = invoke(poolsFactoryAddress, "getPrice", [wavesUsdcwxgAddressStr], nil) | |
270 | 270 | if ($isInstanceOf(@, "String")) | |
271 | 271 | then @ | |
272 | 272 | else throw(($getType(@) + " couldn't be cast to String")) | |
273 | 273 | }) | |
274 | 274 | fraction(wavesUsdtPrice, mult18, wavesUsdcwxgPrice) | |
275 | 275 | } | |
276 | 276 | else if (("HZk1mbfuJpmxU1Fs4AX5MWLVYtctsNcg6e2C6VKqK8zk" == $match0)) | |
277 | 277 | then { | |
278 | 278 | let ltcwxgXtnAddressStr = "3P94wvu5gA7VhjPgAB3twaeqdwHCwNK2vsn" | |
279 | 279 | let ltcwxgXtnPrice = parseBigIntValue({ | |
280 | 280 | let @ = invoke(poolsFactoryAddress, "getPrice", [ltcwxgXtnAddressStr], nil) | |
281 | 281 | if ($isInstanceOf(@, "String")) | |
282 | 282 | then @ | |
283 | 283 | else throw(($getType(@) + " couldn't be cast to String")) | |
284 | 284 | }) | |
285 | 285 | fraction(ltcwxgXtnPrice, xtnUsdtPrice, mult18) | |
286 | 286 | } | |
287 | 287 | else if (("474jTeYx2r2Va35794tCScAXWJG9hU2HcgxzMowaZUnu" == $match0)) | |
288 | 288 | then { | |
289 | 289 | let ethwxgWavesAddressStr = "3P3XGTN6s292g9iwYhs3TEqJqHiffQYojuE" | |
290 | 290 | let ethwxgWavesPrice = parseBigIntValue({ | |
291 | 291 | let @ = invoke(poolsFactoryAddress, "getPrice", [ethwxgWavesAddressStr], nil) | |
292 | 292 | if ($isInstanceOf(@, "String")) | |
293 | 293 | then @ | |
294 | 294 | else throw(($getType(@) + " couldn't be cast to String")) | |
295 | 295 | }) | |
296 | 296 | fraction(ethwxgWavesPrice, wavesUsdtPrice, mult18) | |
297 | 297 | } | |
298 | 298 | else if (("8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS" == $match0)) | |
299 | 299 | then { | |
300 | 300 | let btcwxgXtnAddressStr = "3PCBWDTA6jrFswd7gQgaE3Xk7gLM5RKofvp" | |
301 | 301 | let btcwxgXtnPrice = parseBigIntValue({ | |
302 | 302 | let @ = invoke(poolsFactoryAddress, "getPrice", [btcwxgXtnAddressStr], nil) | |
303 | 303 | if ($isInstanceOf(@, "String")) | |
304 | 304 | then @ | |
305 | 305 | else throw(($getType(@) + " couldn't be cast to String")) | |
306 | 306 | }) | |
307 | 307 | fraction(btcwxgXtnPrice, xtnUsdtPrice, mult18) | |
308 | 308 | } | |
309 | 309 | else throwErr("invalid asset id") | |
310 | 310 | } | |
311 | 311 | (acc :+ price) | |
312 | 312 | } | |
313 | 313 | ||
314 | 314 | let $l = assetIdList | |
315 | 315 | let $s = size($l) | |
316 | 316 | let $acc0 = nil | |
317 | 317 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
318 | 318 | then $a | |
319 | 319 | else map($a, $l[$i]) | |
320 | 320 | ||
321 | 321 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
322 | 322 | then $a | |
323 | 323 | else throw("List size exceeds 10") | |
324 | 324 | ||
325 | 325 | $f0_2($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) | |
326 | 326 | } | |
327 | 327 | else if ((chainId == chainIdT)) | |
328 | 328 | then { | |
329 | 329 | func map (acc,nextAssetId) = { | |
330 | 330 | let price = match nextAssetId { | |
331 | 331 | case _ => | |
332 | 332 | if (("EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc" == $match0)) | |
333 | 333 | then { | |
334 | 334 | let wxUsdtAddressStr = "3MrULQRLc52GWrJF1tMcAm4M78fPe57o9Kt" | |
335 | 335 | let wxUsdtPrice = parseBigIntValue({ | |
336 | 336 | let @ = invoke(poolsFactoryAddress, "getPrice", [wxUsdtAddressStr], nil) | |
337 | 337 | if ($isInstanceOf(@, "String")) | |
338 | 338 | then @ | |
339 | 339 | else throw(($getType(@) + " couldn't be cast to String")) | |
340 | 340 | }) | |
341 | 341 | wxUsdtPrice | |
342 | 342 | } | |
343 | 343 | else if (("A7Ksh7fXyqm1KhKAiK3bAB2aiPSitQQF6v1pyu9SS3FR" == $match0)) | |
344 | 344 | then { | |
345 | 345 | let usdcUsdtAddressStr = "3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA" | |
346 | 346 | let usdcUsdtPrice = parseBigIntValue({ | |
347 | 347 | let @ = invoke(poolsFactoryAddress, "getPrice", [usdcUsdtAddressStr], nil) | |
348 | 348 | if ($isInstanceOf(@, "String")) | |
349 | 349 | then @ | |
350 | 350 | else throw(($getType(@) + " couldn't be cast to String")) | |
351 | 351 | }) | |
352 | 352 | usdcUsdtPrice | |
353 | 353 | } | |
354 | 354 | else if (("8Q6SE2ANebufw8JuPjJVRjZD6drD8ihjNjM8xaGUSfdR" == $match0)) | |
355 | 355 | then { | |
356 | 356 | let price = toX18(150000000, pow(10, 0, usdtDecimals, 0, 0, DOWN)) | |
357 | 357 | price | |
358 | 358 | } | |
359 | 359 | else throwErr("invalid asset id") | |
360 | 360 | } | |
361 | 361 | (acc :+ price) | |
362 | 362 | } | |
363 | 363 | ||
364 | 364 | let $l = assetIdList | |
365 | 365 | let $s = size($l) | |
366 | 366 | let $acc0 = nil | |
367 | 367 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
368 | 368 | then $a | |
369 | 369 | else map($a, $l[$i]) | |
370 | 370 | ||
371 | 371 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
372 | 372 | then $a | |
373 | 373 | else throw("List size exceeds 10") | |
374 | 374 | ||
375 | 375 | $f0_2($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) | |
376 | 376 | } | |
377 | 377 | else throwErr("invalid chain id") | |
378 | 378 | ||
379 | 379 | ||
380 | 380 | func calcTreasuryValue () = { | |
381 | 381 | let treasuryAddress = getTreasuryAddress() | |
382 | 382 | let poolsFactoryAddress = getPoolsFactoryAddress() | |
383 | 383 | let assetsStr = split(getAssetsStr(), SEP) | |
384 | 384 | let assetsBalances = getAssetsBalances(treasuryAddress, assetsStr) | |
385 | 385 | let assetsPrices = getAssetsPrices(poolsFactoryAddress, assetsStr) | |
386 | 386 | func reduce (acc,nextAssetIdStr) = { | |
387 | 387 | let assetId = fromBase58String(nextAssetIdStr) | |
388 | 388 | let index = valueOrErrorMessage(indexOf(assetsStr, nextAssetIdStr), wrapErr("invalid asset id")) | |
389 | 389 | let balance = assetsBalances[index] | |
390 | 390 | let price = assetsPrices[index] | |
391 | 391 | let assetValue = fraction(balance, price, mult18) | |
392 | 392 | (acc + assetValue) | |
393 | 393 | } | |
394 | 394 | ||
395 | 395 | let treasuryValue = { | |
396 | 396 | let $l = assetsStr | |
397 | 397 | let $s = size($l) | |
398 | 398 | let $acc0 = toBigInt(0) | |
399 | 399 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
400 | 400 | then $a | |
401 | 401 | else reduce($a, $l[$i]) | |
402 | 402 | ||
403 | 403 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
404 | 404 | then $a | |
405 | 405 | else throw("List size exceeds 10") | |
406 | 406 | ||
407 | 407 | $f0_2($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) | |
408 | 408 | } | |
409 | 409 | treasuryValue | |
410 | 410 | } | |
411 | 411 | ||
412 | 412 | ||
413 | 413 | func calcRewardsAndLock (paymentAmount,userAddressOption) = { | |
414 | 414 | let assetsStr = split(getAssetsStr(), SEP) | |
415 | 415 | let wxdaoQuantity = getAssetInfoOrFail(getLpAssetId()).quantity | |
416 | 416 | if ((wxdaoQuantity == wxdaoQuantity)) | |
417 | 417 | then { | |
418 | 418 | let assetsBalances = getAssetsBalances(factoryAddress(), assetsStr) | |
419 | 419 | func map (acc,nextAssetIdStr) = { | |
420 | 420 | let assetId = fromBase58String(nextAssetIdStr) | |
421 | 421 | let index = valueOrErrorMessage(indexOf(assetsStr, nextAssetIdStr), wrapErr("invalid asset balance")) | |
422 | 422 | let assetDecimals = getAssetInfoOrFail(assetId).decimals | |
423 | 423 | let balance = fromX18(assetsBalances[index], pow(10, 0, assetDecimals, 0, 0, DOWN)) | |
424 | 424 | let amount = fraction(balance, paymentAmount, wxdaoQuantity) | |
425 | 425 | if ((amount > 0)) | |
426 | 426 | then { | |
427 | 427 | let lock = if ((userAddressOption == unit)) | |
428 | 428 | then unit | |
429 | - | else invoke(this, "lockInternal", [value(userAddressOption).bytes, assetId, amount], nil) | |
429 | + | else invoke(this, "lockInternal", [value(userAddressOption).bytes, assetId, amount, paymentAmount], nil) | |
430 | 430 | if ((lock == lock)) | |
431 | 431 | then $Tuple2((acc._1 :+ assetId), (acc._2 :+ amount)) | |
432 | 432 | else throw("Strict value is not equal to itself.") | |
433 | 433 | } | |
434 | 434 | else acc | |
435 | 435 | } | |
436 | 436 | ||
437 | 437 | let $l = assetsStr | |
438 | 438 | let $s = size($l) | |
439 | 439 | let $acc0 = $Tuple2(nil, nil) | |
440 | 440 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
441 | 441 | then $a | |
442 | 442 | else map($a, $l[$i]) | |
443 | 443 | ||
444 | 444 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
445 | 445 | then $a | |
446 | 446 | else throw("List size exceeds 6") | |
447 | 447 | ||
448 | 448 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
449 | 449 | } | |
450 | 450 | else throw("Strict value is not equal to itself.") | |
451 | 451 | } | |
452 | 452 | ||
453 | 453 | ||
454 | 454 | func calcPrice () = { | |
455 | 455 | let poolsFactoryAddress = getPoolsFactoryAddress() | |
456 | 456 | let currentPeriod = valueOrErrorMessage(getInteger(factoryAddress(), keyCurrentPeriod()), wrapErr("invalid current period")) | |
457 | 457 | let startTreasuryValue = valueOrErrorMessage(getInteger(factoryAddress(), keyTreasuryValueByPeriod(currentPeriod)), wrapErr(("invalid treasury value for period " + toString(currentPeriod)))) | |
458 | 458 | let treasuryValue = fromX18(calcTreasuryValue(), pow(10, 0, usdtDecimals, 0, 0, DOWN)) | |
459 | 459 | let treasuryValueDiff = (treasuryValue - startTreasuryValue) | |
460 | 460 | let treasuryValueDiffX18 = toX18(treasuryValueDiff, pow(10, 0, usdtDecimals, 0, 0, DOWN)) | |
461 | 461 | let pwrAssetId = getPowerAssetId() | |
462 | 462 | let pwrInfo = getAssetInfoOrFail(pwrAssetId) | |
463 | 463 | let pwrPriceX18 = getAssetsPrices(poolsFactoryAddress, [toBase58String(pwrAssetId)])[0] | |
464 | 464 | let pwrPrice = if ((pwrPriceX18 > toBigInt(0))) | |
465 | 465 | then fromX18(pwrPriceX18, pow(10, 0, usdtDecimals, 0, 0, DOWN)) | |
466 | 466 | else throwErr("invalid PWR price") | |
467 | 467 | let treasuryAddress = getTreasuryAddress() | |
468 | 468 | let skinTotal = valueOrElse(getInteger(powerContractAddress(), keySkinTotal(treasuryAddress)), 0) | |
469 | 469 | let wxdaoInfo = getAssetInfoOrFail(getLpAssetId()) | |
470 | 470 | let pwrRemaining = (wxdaoInfo.quantity / 100) | |
471 | 471 | let pwrAmount = (skinTotal + pwrRemaining) | |
472 | 472 | let pwrAmountX18 = toX18(pwrAmount, pow(10, 0, pwrInfo.decimals, 0, 0, DOWN)) | |
473 | 473 | let factoryAddressWxBalanceX18 = getAssetsBalances(factoryAddress(), [toBase58String(wxAssetId)])[0] | |
474 | 474 | let factoryAddressWxBalance = fromX18(factoryAddressWxBalanceX18, pow(10, 0, usdtDecimals, 0, 0, DOWN)) | |
475 | 475 | let wxPriceX18 = getAssetsPrices(poolsFactoryAddress, [toBase58String(wxAssetId)])[0] | |
476 | 476 | let wxPrice = if ((wxPriceX18 > toBigInt(0))) | |
477 | 477 | then fromX18(wxPriceX18, pow(10, 0, usdtDecimals, 0, 0, DOWN)) | |
478 | 478 | else throwErr("invalid wx price") | |
479 | 479 | let wxdaoQuantity = wxdaoInfo.quantity | |
480 | 480 | let wxdaoQuantityX18 = toX18(wxdaoQuantity, pow(10, 0, wxdaoInfo.decimals, 0, 0, DOWN)) | |
481 | 481 | let wxDaoPriceX18 = (((pwrPriceX18 + fraction((factoryAddressWxBalanceX18 * toBigInt(100)), wxPriceX18, wxdaoQuantityX18)) + fraction(max([treasuryValueDiffX18, toBigInt(0)]), (toBigInt(2) * mult18), (toBigInt(10) * pwrAmountX18))) / toBigInt(100)) | |
482 | 482 | let wxDaoPrice = fromX18(wxDaoPriceX18, pow(10, 0, usdtDecimals, 0, 0, DOWN)) | |
483 | 483 | let rewardsPrices = calcRewardsAndLock(pow(10, 0, wxdaoInfo.decimals, 0, 0, DOWN), unit) | |
484 | 484 | $Tuple2([wxDaoPrice, rewardsPrices], [["wxDaoPrice", wxDaoPrice], ["pwrPrice", pwrPrice], ["factoryAddressWxBalance", factoryAddressWxBalance], ["wxPrice", wxPrice], ["wxdaoQuantity", wxdaoQuantity], ["treasuryValueDiff", treasuryValueDiff], ["pwrAmount", pwrAmount], ["skinTotal", skinTotal], ["pwrRemaining", pwrRemaining]]) | |
485 | 485 | } | |
486 | 486 | ||
487 | 487 | ||
488 | 488 | @Callable(i) | |
489 | 489 | func swap (callerPublicKey,args) = { | |
490 | 490 | let checkCaller = onlyFactory(i) | |
491 | 491 | if ((checkCaller == checkCaller)) | |
492 | 492 | then { | |
493 | 493 | let userAddress = addressFromPublicKey(callerPublicKey) | |
494 | 494 | let payment = if ((size(i.payments) == 1)) | |
495 | 495 | then i.payments[0] | |
496 | 496 | else throwErr("1 payment is required") | |
497 | 497 | let err = wrapErr("invalid payment asset id") | |
498 | 498 | let paymentAssetId = if ((valueOrErrorMessage(payment.assetId, err) == getLpAssetId())) | |
499 | 499 | then value(payment.assetId) | |
500 | 500 | else throwErr(err) | |
501 | 501 | let pwrPrice = 100 | |
502 | 502 | let pwrAmount = (payment.amount / pwrPrice) | |
503 | 503 | let rewards = calcRewardsAndLock(payment.amount, userAddress) | |
504 | 504 | if ((rewards == rewards)) | |
505 | 505 | then { | |
506 | 506 | let additionalLockRounds = 0 | |
507 | 507 | let factoryActions = [invoke(factoryAddress(), "commitAfterStartWithLockRoundFor", [toString(powerContractAddress()), toString(getTreasuryAddress()), toString(userAddress), additionalLockRounds, getPowerAssetId(), pwrAmount], nil)] | |
508 | 508 | $Tuple2([Burn(paymentAssetId, payment.amount)], factoryActions) | |
509 | 509 | } | |
510 | 510 | else throw("Strict value is not equal to itself.") | |
511 | 511 | } | |
512 | 512 | else throw("Strict value is not equal to itself.") | |
513 | 513 | } | |
514 | 514 | ||
515 | 515 | ||
516 | 516 | ||
517 | 517 | @Callable(i) | |
518 | - | func lockInternal (userAddressBytes,assetId,amount) = { | |
518 | + | func lockInternal (userAddressBytes,assetId,amount,lpAssetAmount) = { | |
519 | 519 | let checkCaller = onlyThis(i) | |
520 | 520 | if ((checkCaller == checkCaller)) | |
521 | 521 | then { | |
522 | 522 | let userAddress = Address(userAddressBytes) | |
523 | 523 | let lockGlobalCounter = valueOrElse(getInteger(factoryAddress(), keyLockGlobalCounter()), 0) | |
524 | 524 | let lockDuration = valueOrErrorMessage(getInteger(factoryAddress(), keyLockDuration()), wrapErr("invalid lock duration")) | |
525 | 525 | let getAssets = invoke(factoryAddress(), "transferAsset", [lockAddress().bytes, amount, assetId], nil) | |
526 | 526 | if ((getAssets == getAssets)) | |
527 | 527 | then { | |
528 | - | let factoryActions = [invoke(factoryAddress(), "stringEntry", [keyLock(userAddress, lockGlobalCounter), lockFormat(height, (height + lockDuration), assetId, amount)], nil), invoke(factoryAddress(), "integerEntry", [keyLockGlobalCounter(), (lockGlobalCounter + 1)], nil)] | |
528 | + | let factoryActions = [invoke(factoryAddress(), "stringEntry", [keyLock(userAddress, lockGlobalCounter), lockFormat(height, (height + lockDuration), assetId, amount, lpAssetAmount)], nil), invoke(factoryAddress(), "integerEntry", [keyLockGlobalCounter(), (lockGlobalCounter + 1)], nil)] | |
529 | 529 | $Tuple2(nil, factoryActions) | |
530 | 530 | } | |
531 | 531 | else throw("Strict value is not equal to itself.") | |
532 | 532 | } | |
533 | 533 | else throw("Strict value is not equal to itself.") | |
534 | 534 | } | |
535 | 535 | ||
536 | 536 | ||
537 | 537 | ||
538 | 538 | @Callable(i) | |
539 | 539 | func unlock (callerPublicKey,args) = { | |
540 | 540 | let checkCaller = onlyFactory(i) | |
541 | 541 | if ((checkCaller == checkCaller)) | |
542 | 542 | then { | |
543 | 543 | let userAddress = addressFromPublicKey(callerPublicKey) | |
544 | 544 | func fold (acc,next) = { | |
545 | 545 | let counter = valueOrErrorMessage(parseInt(next), wrapErr("invalid counter")) | |
546 | - | let $ | |
547 | - | let from = $ | |
548 | - | let to = $ | |
549 | - | let assetId = $ | |
550 | - | let amount = $ | |
546 | + | let $t01761317822 = lockParse(valueOrErrorMessage(getString(factoryAddress(), keyLock(userAddress, counter)), wrapErr(("invalid lock: " + keyLock(userAddress, counter))))) | |
547 | + | let from = $t01761317822._1 | |
548 | + | let to = $t01761317822._2 | |
549 | + | let assetId = $t01761317822._3 | |
550 | + | let amount = $t01761317822._4 | |
551 | 551 | let result = if ((height > to)) | |
552 | 552 | then [invoke(lockAddress(), "transferAsset", [userAddress.bytes, amount, assetId], nil), invoke(factoryAddress(), "deleteEntry", [keyLock(userAddress, counter)], nil)] | |
553 | 553 | else throwErr("invalid height") | |
554 | 554 | (acc :+ result) | |
555 | 555 | } | |
556 | 556 | ||
557 | 557 | let result = { | |
558 | 558 | let $l = args | |
559 | 559 | let $s = size($l) | |
560 | 560 | let $acc0 = nil | |
561 | 561 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
562 | 562 | then $a | |
563 | 563 | else fold($a, $l[$i]) | |
564 | 564 | ||
565 | 565 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
566 | 566 | then $a | |
567 | 567 | else throw("List size exceeds 30") | |
568 | 568 | ||
569 | 569 | $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($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($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30) | |
570 | 570 | } | |
571 | 571 | $Tuple2(nil, result) | |
572 | 572 | } | |
573 | 573 | else throw("Strict value is not equal to itself.") | |
574 | 574 | } | |
575 | 575 | ||
576 | 576 | ||
577 | 577 | ||
578 | 578 | @Callable(i) | |
579 | 579 | func price (callerPublicKey,args) = { | |
580 | 580 | let checkCaller = onlyFactory(i) | |
581 | 581 | if ((checkCaller == checkCaller)) | |
582 | 582 | then $Tuple2(nil, calcPrice()._1) | |
583 | 583 | else throw("Strict value is not equal to itself.") | |
584 | 584 | } | |
585 | 585 | ||
586 | 586 | ||
587 | 587 | ||
588 | 588 | @Callable(i) | |
589 | 589 | func priceDebug (callerPublicKey,args) = { | |
590 | 590 | let checkCaller = onlyFactory(i) | |
591 | 591 | if ((checkCaller == checkCaller)) | |
592 | 592 | then $Tuple2(nil, calcPrice()._2) | |
593 | 593 | else throw("Strict value is not equal to itself.") | |
594 | 594 | } | |
595 | 595 | ||
596 | 596 | ||
597 | 597 | ||
598 | 598 | @Callable(i) | |
599 | 599 | func getTreasuryValue (callerPublicKey,args) = { | |
600 | 600 | let checkCaller = onlyFactory(i) | |
601 | 601 | if ((checkCaller == checkCaller)) | |
602 | 602 | then { | |
603 | 603 | let treasuryValue = fromX18(calcTreasuryValue(), pow(10, 0, usdtDecimals, 0, 0, DOWN)) | |
604 | 604 | $Tuple2(nil, treasuryValue) | |
605 | 605 | } | |
606 | 606 | else throw("Strict value is not equal to itself.") | |
607 | 607 | } | |
608 | 608 | ||
609 | 609 | ||
610 | 610 | @Verifier(tx) | |
611 | 611 | func verify () = (chainId == chainIdT) | |
612 | 612 |
github/deemru/w8io/026f985 72.68 ms ◑