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:BwIoCAISBAoCAhgSBgoEAgIBARIECgICGBIECgICGBIECgICGBIECgICGDQAB2NoYWluSWQJAMkBAgkAygECCAUEdGhpcwVieXRlcwABAAEACGNoYWluSWRUAQFUAAhjaGFpbklkVwEBVwADU0VQAgJfXwAFV0FWRVMCBVdBVkVTABBjb250cmFjdEZpbGVuYW1lAhV3eGRhb19jYWxjdWxhdG9yLnJpZGUABW11bHQ4AIDC1y8ABm11bHQxOAkAtgIBAICAkLu61q3wDQANd2F2ZXNEZWNpbWFscwAIAAx1c2R0RGVjaW1hbHMABgEFdG9YMTgCB29yaWdWYWwNb3JpZ1NjYWxlTXVsdAkAvAIDCQC2AgEFB29yaWdWYWwFBm11bHQxOAkAtgIBBQ1vcmlnU2NhbGVNdWx0AQdmcm9tWDE4AgN2YWwPcmVzdWx0U2NhbGVNdWx0CQCgAwEJALwCAwUDdmFsCQC2AgEFD3Jlc3VsdFNjYWxlTXVsdAUGbXVsdDE4AQd3cmFwRXJyAQFzCQCsAgIJAKwCAgUQY29udHJhY3RGaWxlbmFtZQICOiAFAXMBCHRocm93RXJyAQF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WFsIHRvIGl0c2VsZi4BaQEQZ2V0VHJlYXN1cnlWYWx1ZQIPY2FsbGVyUHVibGljS2V5BGFyZ3MEC2NoZWNrQ2FsbGVyCQELb25seUZhY3RvcnkBBQFpAwkAAAIFC2NoZWNrQ2FsbGVyBQtjaGVja0NhbGxlcgQNdHJlYXN1cnlWYWx1ZQkBB2Zyb21YMTgCCQERY2FsY1RyZWFzdXJ5VmFsdWUACQBsBgAKAAAFDHVzZHREZWNpbWFscwAAAAAFBERPV04JAJQKAgUDbmlsBQ10cmVhc3VyeVZhbHVlCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAQJ0eAEGdmVyaWZ5AAkAAAIFB2NoYWluSWQFCGNoYWluSWRUSQTfag==", "height": 2984301, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GYMAeHFch3LRN8yeSxsbwNVzaJFuRsu2kcKes6ezfrpr Next: none Diff:
OldNewDifferences
173173 func getAssetInfoOrFail (assetId) = valueOrErrorMessage(assetInfo(assetId), wrapErr("invalid asset info"))
174174
175175
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)
177177
178178
179179 func lockParse (s) = {
426426 then {
427427 let lock = if ((userAddressOption == unit))
428428 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)
430430 if ((lock == lock))
431431 then $Tuple2((acc._1 :+ assetId), (acc._2 :+ amount))
432432 else throw("Strict value is not equal to itself.")
515515
516516
517517 @Callable(i)
518-func lockInternal (userAddressBytes,assetId,amount) = {
518+func lockInternal (userAddressBytes,assetId,amount,lpAssetAmount) = {
519519 let checkCaller = onlyThis(i)
520520 if ((checkCaller == checkCaller))
521521 then {
525525 let getAssets = invoke(factoryAddress(), "transferAsset", [lockAddress().bytes, amount, assetId], nil)
526526 if ((getAssets == getAssets))
527527 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)]
529529 $Tuple2(nil, factoryActions)
530530 }
531531 else throw("Strict value is not equal to itself.")
543543 let userAddress = addressFromPublicKey(callerPublicKey)
544544 func fold (acc,next) = {
545545 let counter = valueOrErrorMessage(parseInt(next), wrapErr("invalid counter"))
546- let $t01751117720 = lockParse(valueOrErrorMessage(getString(factoryAddress(), keyLock(userAddress, counter)), wrapErr(("invalid lock: " + keyLock(userAddress, counter)))))
547- let from = $t01751117720._1
548- let to = $t01751117720._2
549- let assetId = $t01751117720._3
550- let amount = $t01751117720._4
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
551551 let result = if ((height > to))
552552 then [invoke(lockAddress(), "transferAsset", [userAddress.bytes, amount, assetId], nil), invoke(factoryAddress(), "deleteEntry", [keyLock(userAddress, counter)], nil)]
553553 else throwErr("invalid height")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 7 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let chainId = take(drop(this.bytes, 1), 1)
55
66 let chainIdT = base58'2T'
77
88 let chainIdW = base58'2W'
99
1010 let SEP = "__"
1111
1212 let WAVES = "WAVES"
1313
1414 let contractFilename = "wxdao_calculator.ride"
1515
1616 let mult8 = 100000000
1717
1818 let mult18 = toBigInt(1000000000000000000)
1919
2020 let wavesDecimals = 8
2121
2222 let usdtDecimals = 6
2323
2424 func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), mult18, toBigInt(origScaleMult))
2525
2626
2727 func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), mult18))
2828
2929
3030 func wrapErr (s) = ((contractFilename + ": ") + s)
3131
3232
3333 func throwErr (s) = throw(wrapErr(s))
3434
3535
3636 func keyFactoryAddress () = "%s__factoryAddress"
3737
3838
3939 func factoryAddress () = valueOrErrorMessage(match getString(this, keyFactoryAddress()) {
4040 case s: String =>
4141 addressFromString(s)
4242 case _: Unit =>
4343 unit
4444 case _ =>
4545 throw("Match error")
4646 }, wrapErr("invalid factory address"))
4747
4848
4949 func onlyAddress (i,address) = if ((i.caller == address))
5050 then true
5151 else throwErr("permission denied")
5252
5353
5454 func onlyThis (i) = onlyAddress(i, this)
5555
5656
5757 func onlyFactory (i) = onlyAddress(i, factoryAddress())
5858
5959
6060 let wxAssetId = if ((chainId == chainIdW))
6161 then base58'Atqv59EYzjFGuitKVnMRk6H8FukjoV3ktPorbEys25on'
6262 else if ((chainId == chainIdT))
6363 then base58'EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc'
6464 else throwErr("invalid chain id")
6565
6666 func keyCurrentPeriod () = makeString(["%s", "currentPeriod"], SEP)
6767
6868
6969 func keyStartHeightByPeriod (period) = makeString(["%s%d", "startHeight", toString(period)], SEP)
7070
7171
7272 func keyPeriodLength () = makeString(["%s", "periodLength"], SEP)
7373
7474
7575 func keyTreasuryValueByPeriod (period) = makeString(["%s%d", "treasuryValue", toString(period)], SEP)
7676
7777
7878 func keyLockGlobalCounter () = makeString(["%s", "lockGlobalCounter"], SEP)
7979
8080
8181 func keyLockDuration () = makeString(["%s", "lockDuration"], SEP)
8282
8383
8484 func keyLock (userAddress,counter) = makeString(["%s%s%d", "lock", toString(userAddress), toString(counter)], SEP)
8585
8686
8787 func keySkinTotal (treasuryAddress) = ("skin_total_" + toString(treasuryAddress))
8888
8989
9090 func keyPowerConfigAddress () = "%s__powerConfigAddress"
9191
9292
9393 func powerConfigAddress () = valueOrErrorMessage(match getString(factoryAddress(), keyPowerConfigAddress()) {
9494 case s: String =>
9595 addressFromString(s)
9696 case _: Unit =>
9797 unit
9898 case _ =>
9999 throw("Match error")
100100 }, wrapErr("invalid power config address"))
101101
102102
103103 func keyPowerAssetId () = "powerAssetId"
104104
105105
106106 func getPowerAssetId () = fromBase58String(valueOrErrorMessage(getString(powerConfigAddress(), keyPowerAssetId()), wrapErr("invalid power asset id")))
107107
108108
109109 func keyPowerContractAddress () = "%s__powerContractAddress"
110110
111111
112112 func powerContractAddress () = valueOrErrorMessage(match getString(factoryAddress(), keyPowerContractAddress()) {
113113 case s: String =>
114114 addressFromString(s)
115115 case _: Unit =>
116116 unit
117117 case _ =>
118118 throw("Match error")
119119 }, wrapErr("invalid power contract address"))
120120
121121
122122 func keyLockAddress () = "%s__lockAddress"
123123
124124
125125 func lockAddress () = valueOrErrorMessage(match getString(factoryAddress(), keyLockAddress()) {
126126 case s: String =>
127127 addressFromString(s)
128128 case _: Unit =>
129129 unit
130130 case _ =>
131131 throw("Match error")
132132 }, wrapErr("invalid lock contract address"))
133133
134134
135135 func keyPoolsFactoryAddress () = "%s__poolsFactoryAddress"
136136
137137
138138 func getPoolsFactoryAddress () = valueOrErrorMessage(match getString(factoryAddress(), keyPoolsFactoryAddress()) {
139139 case s: String =>
140140 addressFromString(s)
141141 case _: Unit =>
142142 unit
143143 case _ =>
144144 throw("Match error")
145145 }, wrapErr("invalid pools factory address"))
146146
147147
148148 func keyTreasuryAddress () = "%s__treasuryAddress"
149149
150150
151151 func getTreasuryAddress () = valueOrErrorMessage(match getString(factoryAddress(), keyTreasuryAddress()) {
152152 case s: String =>
153153 addressFromString(s)
154154 case _: Unit =>
155155 unit
156156 case _ =>
157157 throw("Match error")
158158 }, wrapErr("invalid treasury address"))
159159
160160
161161 func keyAssets () = "%s__assets"
162162
163163
164164 func getAssetsStr () = valueOrErrorMessage(getString(factoryAddress(), keyAssets()), wrapErr("invalid assets"))
165165
166166
167167 func keyLpAssetId () = "%s__lpAssetId"
168168
169169
170170 func getLpAssetId () = fromBase58String(valueOrErrorMessage(getString(factoryAddress(), keyLpAssetId()), wrapErr("invalid lp asset id")))
171171
172172
173173 func getAssetInfoOrFail (assetId) = valueOrErrorMessage(assetInfo(assetId), wrapErr("invalid asset info"))
174174
175175
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)
177177
178178
179179 func lockParse (s) = {
180180 let parts = split(s, SEP)
181181 $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")))
182182 }
183183
184184
185185 func getAssetsBalances (targetAddress,assetIdList) = {
186186 func map (acc,nextAssetIdStr) = {
187187 let balance = if ((nextAssetIdStr == WAVES))
188188 then toX18(wavesBalance(targetAddress).available, pow(10, 0, wavesDecimals, 0, 0, DOWN))
189189 else {
190190 let assetId = fromBase58String(nextAssetIdStr)
191191 let assetDecimals = getAssetInfoOrFail(assetId).decimals
192192 toX18(assetBalance(targetAddress, assetId), pow(10, 0, assetDecimals, 0, 0, DOWN))
193193 }
194194 (acc :+ balance)
195195 }
196196
197197 let $l = assetIdList
198198 let $s = size($l)
199199 let $acc0 = nil
200200 func $f0_1 ($a,$i) = if (($i >= $s))
201201 then $a
202202 else map($a, $l[$i])
203203
204204 func $f0_2 ($a,$i) = if (($i >= $s))
205205 then $a
206206 else throw("List size exceeds 10")
207207
208208 $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)
209209 }
210210
211211
212212 func getAssetsPrices (poolsFactoryAddress,assetIdList) = if ((chainId == chainIdW))
213213 then {
214214 let wavesUsdtAddressStr = "3PKfrupEydU2nZAghVjZAfvCwMBkzuR1F52"
215215 let wavesUsdtPrice = parseBigIntValue({
216216 let @ = invoke(poolsFactoryAddress, "getPrice", [wavesUsdtAddressStr], nil)
217217 if ($isInstanceOf(@, "String"))
218218 then @
219219 else throw(($getType(@) + " couldn't be cast to String"))
220220 })
221221 let wavesXtnAddressStr = "3PPZWgFNRKHLvM51pwS934C8VZ7d2F4Z58g"
222222 let wavesXtnPrice = parseBigIntValue({
223223 let @ = invoke(poolsFactoryAddress, "getPrice", [wavesXtnAddressStr], nil)
224224 if ($isInstanceOf(@, "String"))
225225 then @
226226 else throw(($getType(@) + " couldn't be cast to String"))
227227 })
228228 let xtnUsdtPrice = fraction(wavesUsdtPrice, mult18, wavesXtnPrice)
229229 func map (acc,nextAssetId) = {
230230 let price = match nextAssetId {
231231 case _ =>
232232 if (("2thsACuHmzDMuNezPM32wg9a3BwUzBWDeSKakgz3cw21" == $match0))
233233 then {
234234 let pwrWavesAddressStr = "3PDi7Qq8pLQYvtKyTfQuqqPUWyhoYbU957t"
235235 let pwrWavesPrice = parseBigIntValue({
236236 let @ = invoke(poolsFactoryAddress, "getPrice", [pwrWavesAddressStr], nil)
237237 if ($isInstanceOf(@, "String"))
238238 then @
239239 else throw(($getType(@) + " couldn't be cast to String"))
240240 })
241241 fraction(pwrWavesPrice, wavesUsdtPrice, mult18)
242242 }
243243 else if (("Atqv59EYzjFGuitKVnMRk6H8FukjoV3ktPorbEys25on" == $match0))
244244 then {
245245 let wxWavesAddressStr = "3PFzaH2ghpwANHFgjeva83N1yxzErELx2eh"
246246 let wxWavesPrice = parseBigIntValue({
247247 let @ = invoke(poolsFactoryAddress, "getPrice", [wxWavesAddressStr], nil)
248248 if ($isInstanceOf(@, "String"))
249249 then @
250250 else throw(($getType(@) + " couldn't be cast to String"))
251251 })
252252 fraction(wxWavesPrice, wavesUsdtPrice, mult18)
253253 }
254254 else if (("34N9YcEETLWn93qYQ64EsP1x89tSruJU44RrEMSXXEPJ" == $match0))
255255 then {
256256 let wavesUsdtwxgAddressStr = "3PKMVZ7kQeaREajYi8Yc25Ro6mcNw5D6QSa"
257257 let wavesUsdtwxgPrice = parseBigIntValue({
258258 let @ = invoke(poolsFactoryAddress, "getPrice", [wavesUsdtwxgAddressStr], nil)
259259 if ($isInstanceOf(@, "String"))
260260 then @
261261 else throw(($getType(@) + " couldn't be cast to String"))
262262 })
263263 fraction(wavesUsdtPrice, mult18, wavesUsdtwxgPrice)
264264 }
265265 else if (("6XtHjpXbs9RRJP2Sr9GUyVqzACcby9TkThHXnjVC5CDJ" == $match0))
266266 then {
267267 let wavesUsdcwxgAddressStr = "3P3g3eipfG2NZKKQE8DZXt2E9tRJqii9jcX"
268268 let wavesUsdcwxgPrice = parseBigIntValue({
269269 let @ = invoke(poolsFactoryAddress, "getPrice", [wavesUsdcwxgAddressStr], nil)
270270 if ($isInstanceOf(@, "String"))
271271 then @
272272 else throw(($getType(@) + " couldn't be cast to String"))
273273 })
274274 fraction(wavesUsdtPrice, mult18, wavesUsdcwxgPrice)
275275 }
276276 else if (("HZk1mbfuJpmxU1Fs4AX5MWLVYtctsNcg6e2C6VKqK8zk" == $match0))
277277 then {
278278 let ltcwxgXtnAddressStr = "3P94wvu5gA7VhjPgAB3twaeqdwHCwNK2vsn"
279279 let ltcwxgXtnPrice = parseBigIntValue({
280280 let @ = invoke(poolsFactoryAddress, "getPrice", [ltcwxgXtnAddressStr], nil)
281281 if ($isInstanceOf(@, "String"))
282282 then @
283283 else throw(($getType(@) + " couldn't be cast to String"))
284284 })
285285 fraction(ltcwxgXtnPrice, xtnUsdtPrice, mult18)
286286 }
287287 else if (("474jTeYx2r2Va35794tCScAXWJG9hU2HcgxzMowaZUnu" == $match0))
288288 then {
289289 let ethwxgWavesAddressStr = "3P3XGTN6s292g9iwYhs3TEqJqHiffQYojuE"
290290 let ethwxgWavesPrice = parseBigIntValue({
291291 let @ = invoke(poolsFactoryAddress, "getPrice", [ethwxgWavesAddressStr], nil)
292292 if ($isInstanceOf(@, "String"))
293293 then @
294294 else throw(($getType(@) + " couldn't be cast to String"))
295295 })
296296 fraction(ethwxgWavesPrice, wavesUsdtPrice, mult18)
297297 }
298298 else if (("8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS" == $match0))
299299 then {
300300 let btcwxgXtnAddressStr = "3PCBWDTA6jrFswd7gQgaE3Xk7gLM5RKofvp"
301301 let btcwxgXtnPrice = parseBigIntValue({
302302 let @ = invoke(poolsFactoryAddress, "getPrice", [btcwxgXtnAddressStr], nil)
303303 if ($isInstanceOf(@, "String"))
304304 then @
305305 else throw(($getType(@) + " couldn't be cast to String"))
306306 })
307307 fraction(btcwxgXtnPrice, xtnUsdtPrice, mult18)
308308 }
309309 else throwErr("invalid asset id")
310310 }
311311 (acc :+ price)
312312 }
313313
314314 let $l = assetIdList
315315 let $s = size($l)
316316 let $acc0 = nil
317317 func $f0_1 ($a,$i) = if (($i >= $s))
318318 then $a
319319 else map($a, $l[$i])
320320
321321 func $f0_2 ($a,$i) = if (($i >= $s))
322322 then $a
323323 else throw("List size exceeds 10")
324324
325325 $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)
326326 }
327327 else if ((chainId == chainIdT))
328328 then {
329329 func map (acc,nextAssetId) = {
330330 let price = match nextAssetId {
331331 case _ =>
332332 if (("EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc" == $match0))
333333 then {
334334 let wxUsdtAddressStr = "3MrULQRLc52GWrJF1tMcAm4M78fPe57o9Kt"
335335 let wxUsdtPrice = parseBigIntValue({
336336 let @ = invoke(poolsFactoryAddress, "getPrice", [wxUsdtAddressStr], nil)
337337 if ($isInstanceOf(@, "String"))
338338 then @
339339 else throw(($getType(@) + " couldn't be cast to String"))
340340 })
341341 wxUsdtPrice
342342 }
343343 else if (("A7Ksh7fXyqm1KhKAiK3bAB2aiPSitQQF6v1pyu9SS3FR" == $match0))
344344 then {
345345 let usdcUsdtAddressStr = "3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA"
346346 let usdcUsdtPrice = parseBigIntValue({
347347 let @ = invoke(poolsFactoryAddress, "getPrice", [usdcUsdtAddressStr], nil)
348348 if ($isInstanceOf(@, "String"))
349349 then @
350350 else throw(($getType(@) + " couldn't be cast to String"))
351351 })
352352 usdcUsdtPrice
353353 }
354354 else if (("8Q6SE2ANebufw8JuPjJVRjZD6drD8ihjNjM8xaGUSfdR" == $match0))
355355 then {
356356 let price = toX18(150000000, pow(10, 0, usdtDecimals, 0, 0, DOWN))
357357 price
358358 }
359359 else throwErr("invalid asset id")
360360 }
361361 (acc :+ price)
362362 }
363363
364364 let $l = assetIdList
365365 let $s = size($l)
366366 let $acc0 = nil
367367 func $f0_1 ($a,$i) = if (($i >= $s))
368368 then $a
369369 else map($a, $l[$i])
370370
371371 func $f0_2 ($a,$i) = if (($i >= $s))
372372 then $a
373373 else throw("List size exceeds 10")
374374
375375 $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)
376376 }
377377 else throwErr("invalid chain id")
378378
379379
380380 func calcTreasuryValue () = {
381381 let treasuryAddress = getTreasuryAddress()
382382 let poolsFactoryAddress = getPoolsFactoryAddress()
383383 let assetsStr = split(getAssetsStr(), SEP)
384384 let assetsBalances = getAssetsBalances(treasuryAddress, assetsStr)
385385 let assetsPrices = getAssetsPrices(poolsFactoryAddress, assetsStr)
386386 func reduce (acc,nextAssetIdStr) = {
387387 let assetId = fromBase58String(nextAssetIdStr)
388388 let index = valueOrErrorMessage(indexOf(assetsStr, nextAssetIdStr), wrapErr("invalid asset id"))
389389 let balance = assetsBalances[index]
390390 let price = assetsPrices[index]
391391 let assetValue = fraction(balance, price, mult18)
392392 (acc + assetValue)
393393 }
394394
395395 let treasuryValue = {
396396 let $l = assetsStr
397397 let $s = size($l)
398398 let $acc0 = toBigInt(0)
399399 func $f0_1 ($a,$i) = if (($i >= $s))
400400 then $a
401401 else reduce($a, $l[$i])
402402
403403 func $f0_2 ($a,$i) = if (($i >= $s))
404404 then $a
405405 else throw("List size exceeds 10")
406406
407407 $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)
408408 }
409409 treasuryValue
410410 }
411411
412412
413413 func calcRewardsAndLock (paymentAmount,userAddressOption) = {
414414 let assetsStr = split(getAssetsStr(), SEP)
415415 let wxdaoQuantity = getAssetInfoOrFail(getLpAssetId()).quantity
416416 if ((wxdaoQuantity == wxdaoQuantity))
417417 then {
418418 let assetsBalances = getAssetsBalances(factoryAddress(), assetsStr)
419419 func map (acc,nextAssetIdStr) = {
420420 let assetId = fromBase58String(nextAssetIdStr)
421421 let index = valueOrErrorMessage(indexOf(assetsStr, nextAssetIdStr), wrapErr("invalid asset balance"))
422422 let assetDecimals = getAssetInfoOrFail(assetId).decimals
423423 let balance = fromX18(assetsBalances[index], pow(10, 0, assetDecimals, 0, 0, DOWN))
424424 let amount = fraction(balance, paymentAmount, wxdaoQuantity)
425425 if ((amount > 0))
426426 then {
427427 let lock = if ((userAddressOption == unit))
428428 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)
430430 if ((lock == lock))
431431 then $Tuple2((acc._1 :+ assetId), (acc._2 :+ amount))
432432 else throw("Strict value is not equal to itself.")
433433 }
434434 else acc
435435 }
436436
437437 let $l = assetsStr
438438 let $s = size($l)
439439 let $acc0 = $Tuple2(nil, nil)
440440 func $f0_1 ($a,$i) = if (($i >= $s))
441441 then $a
442442 else map($a, $l[$i])
443443
444444 func $f0_2 ($a,$i) = if (($i >= $s))
445445 then $a
446446 else throw("List size exceeds 6")
447447
448448 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
449449 }
450450 else throw("Strict value is not equal to itself.")
451451 }
452452
453453
454454 func calcPrice () = {
455455 let poolsFactoryAddress = getPoolsFactoryAddress()
456456 let currentPeriod = valueOrErrorMessage(getInteger(factoryAddress(), keyCurrentPeriod()), wrapErr("invalid current period"))
457457 let startTreasuryValue = valueOrErrorMessage(getInteger(factoryAddress(), keyTreasuryValueByPeriod(currentPeriod)), wrapErr(("invalid treasury value for period " + toString(currentPeriod))))
458458 let treasuryValue = fromX18(calcTreasuryValue(), pow(10, 0, usdtDecimals, 0, 0, DOWN))
459459 let treasuryValueDiff = (treasuryValue - startTreasuryValue)
460460 let treasuryValueDiffX18 = toX18(treasuryValueDiff, pow(10, 0, usdtDecimals, 0, 0, DOWN))
461461 let pwrAssetId = getPowerAssetId()
462462 let pwrInfo = getAssetInfoOrFail(pwrAssetId)
463463 let pwrPriceX18 = getAssetsPrices(poolsFactoryAddress, [toBase58String(pwrAssetId)])[0]
464464 let pwrPrice = if ((pwrPriceX18 > toBigInt(0)))
465465 then fromX18(pwrPriceX18, pow(10, 0, usdtDecimals, 0, 0, DOWN))
466466 else throwErr("invalid PWR price")
467467 let treasuryAddress = getTreasuryAddress()
468468 let skinTotal = valueOrElse(getInteger(powerContractAddress(), keySkinTotal(treasuryAddress)), 0)
469469 let wxdaoInfo = getAssetInfoOrFail(getLpAssetId())
470470 let pwrRemaining = (wxdaoInfo.quantity / 100)
471471 let pwrAmount = (skinTotal + pwrRemaining)
472472 let pwrAmountX18 = toX18(pwrAmount, pow(10, 0, pwrInfo.decimals, 0, 0, DOWN))
473473 let factoryAddressWxBalanceX18 = getAssetsBalances(factoryAddress(), [toBase58String(wxAssetId)])[0]
474474 let factoryAddressWxBalance = fromX18(factoryAddressWxBalanceX18, pow(10, 0, usdtDecimals, 0, 0, DOWN))
475475 let wxPriceX18 = getAssetsPrices(poolsFactoryAddress, [toBase58String(wxAssetId)])[0]
476476 let wxPrice = if ((wxPriceX18 > toBigInt(0)))
477477 then fromX18(wxPriceX18, pow(10, 0, usdtDecimals, 0, 0, DOWN))
478478 else throwErr("invalid wx price")
479479 let wxdaoQuantity = wxdaoInfo.quantity
480480 let wxdaoQuantityX18 = toX18(wxdaoQuantity, pow(10, 0, wxdaoInfo.decimals, 0, 0, DOWN))
481481 let wxDaoPriceX18 = (((pwrPriceX18 + fraction((factoryAddressWxBalanceX18 * toBigInt(100)), wxPriceX18, wxdaoQuantityX18)) + fraction(max([treasuryValueDiffX18, toBigInt(0)]), (toBigInt(2) * mult18), (toBigInt(10) * pwrAmountX18))) / toBigInt(100))
482482 let wxDaoPrice = fromX18(wxDaoPriceX18, pow(10, 0, usdtDecimals, 0, 0, DOWN))
483483 let rewardsPrices = calcRewardsAndLock(pow(10, 0, wxdaoInfo.decimals, 0, 0, DOWN), unit)
484484 $Tuple2([wxDaoPrice, rewardsPrices], [["wxDaoPrice", wxDaoPrice], ["pwrPrice", pwrPrice], ["factoryAddressWxBalance", factoryAddressWxBalance], ["wxPrice", wxPrice], ["wxdaoQuantity", wxdaoQuantity], ["treasuryValueDiff", treasuryValueDiff], ["pwrAmount", pwrAmount], ["skinTotal", skinTotal], ["pwrRemaining", pwrRemaining]])
485485 }
486486
487487
488488 @Callable(i)
489489 func swap (callerPublicKey,args) = {
490490 let checkCaller = onlyFactory(i)
491491 if ((checkCaller == checkCaller))
492492 then {
493493 let userAddress = addressFromPublicKey(callerPublicKey)
494494 let payment = if ((size(i.payments) == 1))
495495 then i.payments[0]
496496 else throwErr("1 payment is required")
497497 let err = wrapErr("invalid payment asset id")
498498 let paymentAssetId = if ((valueOrErrorMessage(payment.assetId, err) == getLpAssetId()))
499499 then value(payment.assetId)
500500 else throwErr(err)
501501 let pwrPrice = 100
502502 let pwrAmount = (payment.amount / pwrPrice)
503503 let rewards = calcRewardsAndLock(payment.amount, userAddress)
504504 if ((rewards == rewards))
505505 then {
506506 let additionalLockRounds = 0
507507 let factoryActions = [invoke(factoryAddress(), "commitAfterStartWithLockRoundFor", [toString(powerContractAddress()), toString(getTreasuryAddress()), toString(userAddress), additionalLockRounds, getPowerAssetId(), pwrAmount], nil)]
508508 $Tuple2([Burn(paymentAssetId, payment.amount)], factoryActions)
509509 }
510510 else throw("Strict value is not equal to itself.")
511511 }
512512 else throw("Strict value is not equal to itself.")
513513 }
514514
515515
516516
517517 @Callable(i)
518-func lockInternal (userAddressBytes,assetId,amount) = {
518+func lockInternal (userAddressBytes,assetId,amount,lpAssetAmount) = {
519519 let checkCaller = onlyThis(i)
520520 if ((checkCaller == checkCaller))
521521 then {
522522 let userAddress = Address(userAddressBytes)
523523 let lockGlobalCounter = valueOrElse(getInteger(factoryAddress(), keyLockGlobalCounter()), 0)
524524 let lockDuration = valueOrErrorMessage(getInteger(factoryAddress(), keyLockDuration()), wrapErr("invalid lock duration"))
525525 let getAssets = invoke(factoryAddress(), "transferAsset", [lockAddress().bytes, amount, assetId], nil)
526526 if ((getAssets == getAssets))
527527 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)]
529529 $Tuple2(nil, factoryActions)
530530 }
531531 else throw("Strict value is not equal to itself.")
532532 }
533533 else throw("Strict value is not equal to itself.")
534534 }
535535
536536
537537
538538 @Callable(i)
539539 func unlock (callerPublicKey,args) = {
540540 let checkCaller = onlyFactory(i)
541541 if ((checkCaller == checkCaller))
542542 then {
543543 let userAddress = addressFromPublicKey(callerPublicKey)
544544 func fold (acc,next) = {
545545 let counter = valueOrErrorMessage(parseInt(next), wrapErr("invalid counter"))
546- let $t01751117720 = lockParse(valueOrErrorMessage(getString(factoryAddress(), keyLock(userAddress, counter)), wrapErr(("invalid lock: " + keyLock(userAddress, counter)))))
547- let from = $t01751117720._1
548- let to = $t01751117720._2
549- let assetId = $t01751117720._3
550- let amount = $t01751117720._4
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
551551 let result = if ((height > to))
552552 then [invoke(lockAddress(), "transferAsset", [userAddress.bytes, amount, assetId], nil), invoke(factoryAddress(), "deleteEntry", [keyLock(userAddress, counter)], nil)]
553553 else throwErr("invalid height")
554554 (acc :+ result)
555555 }
556556
557557 let result = {
558558 let $l = args
559559 let $s = size($l)
560560 let $acc0 = nil
561561 func $f0_1 ($a,$i) = if (($i >= $s))
562562 then $a
563563 else fold($a, $l[$i])
564564
565565 func $f0_2 ($a,$i) = if (($i >= $s))
566566 then $a
567567 else throw("List size exceeds 30")
568568
569569 $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)
570570 }
571571 $Tuple2(nil, result)
572572 }
573573 else throw("Strict value is not equal to itself.")
574574 }
575575
576576
577577
578578 @Callable(i)
579579 func price (callerPublicKey,args) = {
580580 let checkCaller = onlyFactory(i)
581581 if ((checkCaller == checkCaller))
582582 then $Tuple2(nil, calcPrice()._1)
583583 else throw("Strict value is not equal to itself.")
584584 }
585585
586586
587587
588588 @Callable(i)
589589 func priceDebug (callerPublicKey,args) = {
590590 let checkCaller = onlyFactory(i)
591591 if ((checkCaller == checkCaller))
592592 then $Tuple2(nil, calcPrice()._2)
593593 else throw("Strict value is not equal to itself.")
594594 }
595595
596596
597597
598598 @Callable(i)
599599 func getTreasuryValue (callerPublicKey,args) = {
600600 let checkCaller = onlyFactory(i)
601601 if ((checkCaller == checkCaller))
602602 then {
603603 let treasuryValue = fromX18(calcTreasuryValue(), pow(10, 0, usdtDecimals, 0, 0, DOWN))
604604 $Tuple2(nil, treasuryValue)
605605 }
606606 else throw("Strict value is not equal to itself.")
607607 }
608608
609609
610610 @Verifier(tx)
611611 func verify () = (chainId == chainIdT)
612612

github/deemru/w8io/026f985 
72.68 ms