tx · Fwg3KEi4xaucJVgh1QjVnsHehBvzHATZ1yxU1v6gzuqp

3Mzep1R5kHeC1ecKFkWjuhU3Gw4LAdCib9N:  -0.01700000 Waves

2024.02.14 10:35 [2975597] smart account 3Mzep1R5kHeC1ecKFkWjuhU3Gw4LAdCib9N > SELF 0.00000000 Waves

{ "type": 13, "id": "Fwg3KEi4xaucJVgh1QjVnsHehBvzHATZ1yxU1v6gzuqp", "fee": 1700000, "feeAssetId": null, "timestamp": 1707896184747, "version": 2, "chainId": 84, "sender": "3Mzep1R5kHeC1ecKFkWjuhU3Gw4LAdCib9N", "senderPublicKey": "41THq9VrFxHEvVGJyz2oMpJQErnSkkqJXpBypSDxa5Mv", "proofs": [ "2WuytdgZ7CLjKVH6xbttLdauZG3zSeaorsMw23wFcrVaRW1Qjo6Fo9jpyBrzE25rPL9VoCevQpqrD3RjCTTsvGrq" ], "script": "base64:BwIoCAISBAoCAhgSBgoEAgICARIECgICGBIECgICGBIECgICGBIECgICGDEAB2NoYWluSWQJAMkBAgkAygECCAUEdGhpcwVieXRlcwABAAEACGNoYWluSWRUAQFUAAhjaGFpbklkVwEBVwADU0VQAgJfXwAFV0FWRVMCBVdBVkVTABBjb250cmFjdEZpbGVuYW1lAhV3eGRhb19jYWxjdWxhdG9yLnJpZGUABW11bHQ4AIDC1y8ABm11bHQxOAkAtgIBAICAkLu61q3wDQANd2F2ZXNEZWNpbWFscwAIAAx1c2R0RGVjaW1hbHMABgEFdG9YMTgCB29yaWdWYWwNb3JpZ1NjYWxlTXVsdAkAvAIDCQC2AgEFB29yaWdWYWwFBm11bHQxOAkAtgIBBQ1vcmlnU2NhbGVNdWx0AQdmcm9tWDE4AgN2YWwPcmVzdWx0U2NhbGVNdWx0CQCgAwEJALwCAwUDdmFsCQC2AgEFD3Jlc3VsdFNjYWxlTXVsdAUGbXVsdDE4AQd3cmFwRXJyAQFzCQCsAgIJAKwCAgUQY29udHJhY3RGaWxlbmFtZQICOiAFAXMBCHRocm93RXJyAQ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HJlc3MIBQFpBmNhbGxlcgQNdHJlYXN1cnlWYWx1ZQkBB2Zyb21YMTgCCQERY2FsY1RyZWFzdXJ5VmFsdWUBBQ5mYWN0b3J5QWRkcmVzcwkAbAYACgAABQx1c2R0RGVjaW1hbHMAAAAABQRET1dOCQCUCgIFA25pbAUNdHJlYXN1cnlWYWx1ZQECdHgBBnZlcmlmeQAJAAACBQdjaGFpbklkBQhjaGFpbklkVP3qz+Y=", "height": 2975597, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Byj7p9z1FSzu5JBrbjgHxFeJZWjmuEjv4sb3pV4uenBP Next: GYMAeHFch3LRN8yeSxsbwNVzaJFuRsu2kcKes6ezfrpr Diff:
OldNewDifferences
520520 func unlock (callerPublicKey,args) = {
521521 let factoryAddress = i.caller
522522 let userAddress = addressFromPublicKey(callerPublicKey)
523- let counter = valueOrErrorMessage(parseInt(args[0]), wrapErr("invalid counter"))
524- let $t01770817873 = lockParse(valueOrErrorMessage(getString(factoryAddress, keyLock(userAddress, counter)), wrapErr("invalid lock")))
525- let from = $t01770817873._1
526- let to = $t01770817873._2
527- let assetId = $t01770817873._3
528- let amount = $t01770817873._4
529- let result = if ((height > to))
530- then [invoke(lockAddress(factoryAddress), "transferAsset", [userAddress.bytes, amount, assetId], nil), invoke(factoryAddress, "deleteEntry", [keyLock(userAddress, counter)], nil)]
531- else throwErr("invalid height")
523+ func fold (acc,next) = {
524+ let counter = valueOrErrorMessage(parseInt(next), wrapErr("invalid counter"))
525+ let $t01775517928 = lockParse(valueOrErrorMessage(getString(factoryAddress, keyLock(userAddress, counter)), wrapErr("invalid lock")))
526+ let from = $t01775517928._1
527+ let to = $t01775517928._2
528+ let assetId = $t01775517928._3
529+ let amount = $t01775517928._4
530+ let result = if ((height > to))
531+ then [invoke(lockAddress(factoryAddress), "transferAsset", [userAddress.bytes, amount, assetId], nil), invoke(factoryAddress, "deleteEntry", [keyLock(userAddress, counter)], nil)]
532+ else throwErr("invalid height")
533+ (acc :+ result)
534+ }
535+
536+ let result = {
537+ let $l = args
538+ let $s = size($l)
539+ let $acc0 = nil
540+ func $f0_1 ($a,$i) = if (($i >= $s))
541+ then $a
542+ else fold($a, $l[$i])
543+
544+ func $f0_2 ($a,$i) = if (($i >= $s))
545+ then $a
546+ else throw("List size exceeds 30")
547+
548+ $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)
549+ }
532550 $Tuple2(nil, result)
533551 }
534552
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 onlyAddress (i,address) = if ((i.caller == address))
3737 then true
3838 else throwErr("permission denied")
3939
4040
4141 func onlyThis (i) = onlyAddress(i, this)
4242
4343
4444 let wxAssetId = if ((chainId == chainIdW))
4545 then base58'Atqv59EYzjFGuitKVnMRk6H8FukjoV3ktPorbEys25on'
4646 else if ((chainId == chainIdT))
4747 then base58'EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc'
4848 else throwErr("invalid chain id")
4949
5050 func keyCurrentPeriod () = makeString(["%s", "currentPeriod"], SEP)
5151
5252
5353 func keyStartHeightByPeriod (period) = makeString(["%s%d", "startHeight", toString(period)], SEP)
5454
5555
5656 func keyPeriodLength () = makeString(["%s", "periodLength"], SEP)
5757
5858
5959 func keyTreasuryValueByPeriod (period) = makeString(["%s%d", "treasuryValue", toString(period)], SEP)
6060
6161
6262 func keyLockGlobalCounter () = makeString(["%s", "lockGlobalCounter"], SEP)
6363
6464
6565 func keyLockDuration () = makeString(["%s", "lockDuration"], SEP)
6666
6767
6868 func keyLock (userAddress,counter) = makeString(["%s%s%d", "lock", toString(userAddress), toString(counter)], SEP)
6969
7070
7171 func keySkinTotal (treasuryAddress) = ("skin_total_" + toString(treasuryAddress))
7272
7373
7474 func keyPowerConfigAddress () = "%s__powerConfigAddress"
7575
7676
7777 func powerConfigAddress (factoryAddress) = valueOrErrorMessage(match getString(factoryAddress, keyPowerConfigAddress()) {
7878 case s: String =>
7979 addressFromString(s)
8080 case _: Unit =>
8181 unit
8282 case _ =>
8383 throw("Match error")
8484 }, wrapErr("invalid power config address"))
8585
8686
8787 func keyPowerAssetId () = "powerAssetId"
8888
8989
9090 func getPowerAssetId (factoryAddress) = fromBase58String(valueOrErrorMessage(getString(powerConfigAddress(factoryAddress), keyPowerAssetId()), wrapErr("invalid power asset id")))
9191
9292
9393 func keyPowerContractAddress () = "%s__powerContractAddress"
9494
9595
9696 func powerContractAddress (factoryAddress) = valueOrErrorMessage(match getString(factoryAddress, keyPowerContractAddress()) {
9797 case s: String =>
9898 addressFromString(s)
9999 case _: Unit =>
100100 unit
101101 case _ =>
102102 throw("Match error")
103103 }, wrapErr("invalid power contract address"))
104104
105105
106106 func keyLockAddress () = "%s__lockAddress"
107107
108108
109109 func lockAddress (factoryAddress) = valueOrErrorMessage(match getString(factoryAddress, keyLockAddress()) {
110110 case s: String =>
111111 addressFromString(s)
112112 case _: Unit =>
113113 unit
114114 case _ =>
115115 throw("Match error")
116116 }, wrapErr("invalid lock contract address"))
117117
118118
119119 func keyPoolsFactoryAddress () = "%s__poolsFactoryAddress"
120120
121121
122122 func getPoolsFactoryAddress (factoryAddress) = valueOrErrorMessage(match getString(factoryAddress, keyPoolsFactoryAddress()) {
123123 case s: String =>
124124 addressFromString(s)
125125 case _: Unit =>
126126 unit
127127 case _ =>
128128 throw("Match error")
129129 }, wrapErr("invalid pools factory address"))
130130
131131
132132 func keyTreasuryAddress () = "%s__treasuryAddress"
133133
134134
135135 func getTreasuryAddress (factoryAddress) = valueOrErrorMessage(match getString(factoryAddress, keyTreasuryAddress()) {
136136 case s: String =>
137137 addressFromString(s)
138138 case _: Unit =>
139139 unit
140140 case _ =>
141141 throw("Match error")
142142 }, wrapErr("invalid treasury address"))
143143
144144
145145 func keyAssets () = "%s__assets"
146146
147147
148148 func getAssetsStr (factoryAddress) = valueOrErrorMessage(getString(factoryAddress, keyAssets()), wrapErr("invalid assets"))
149149
150150
151151 func keyLpAssetId () = "%s__lpAssetId"
152152
153153
154154 func getLpAssetId (factoryAddress) = fromBase58String(valueOrErrorMessage(getString(factoryAddress, keyLpAssetId()), wrapErr("invalid lp asset id")))
155155
156156
157157 func getAssetInfoOrFail (assetId) = valueOrErrorMessage(assetInfo(assetId), wrapErr("invalid asset info"))
158158
159159
160160 func lockFormat (from,to,assetId,amount) = makeString([toString(from), toString(to), toBase58String(assetId), toString(amount)], SEP)
161161
162162
163163 func lockParse (s) = {
164164 let parts = split(s, SEP)
165165 $Tuple4(valueOrErrorMessage(parseInt(parts[0]), wrapErr("error during processing lock start height")), valueOrErrorMessage(parseInt(parts[1]), wrapErr("error during processing lock end height")), fromBase58String(parts[2]), valueOrErrorMessage(parseInt(parts[3]), wrapErr("error during processing lock amount")))
166166 }
167167
168168
169169 func getAssetsBalances (targetAddress,assetIdList) = {
170170 func map (acc,nextAssetIdStr) = {
171171 let balance = if ((nextAssetIdStr == WAVES))
172172 then toX18(wavesBalance(targetAddress).available, pow(10, 0, wavesDecimals, 0, 0, DOWN))
173173 else {
174174 let assetId = fromBase58String(nextAssetIdStr)
175175 let assetDecimals = getAssetInfoOrFail(assetId).decimals
176176 toX18(assetBalance(targetAddress, assetId), pow(10, 0, assetDecimals, 0, 0, DOWN))
177177 }
178178 (acc :+ balance)
179179 }
180180
181181 let $l = assetIdList
182182 let $s = size($l)
183183 let $acc0 = nil
184184 func $f0_1 ($a,$i) = if (($i >= $s))
185185 then $a
186186 else map($a, $l[$i])
187187
188188 func $f0_2 ($a,$i) = if (($i >= $s))
189189 then $a
190190 else throw("List size exceeds 10")
191191
192192 $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)
193193 }
194194
195195
196196 func getAssetsPrices (poolsFactoryAddress,assetIdList) = if ((chainId == chainIdW))
197197 then {
198198 let wavesUsdtAddressStr = "3PKfrupEydU2nZAghVjZAfvCwMBkzuR1F52"
199199 let wavesUsdtPrice = parseBigIntValue({
200200 let @ = invoke(poolsFactoryAddress, "getPrice", [wavesUsdtAddressStr], nil)
201201 if ($isInstanceOf(@, "String"))
202202 then @
203203 else throw(($getType(@) + " couldn't be cast to String"))
204204 })
205205 let wavesXtnAddressStr = "3PPZWgFNRKHLvM51pwS934C8VZ7d2F4Z58g"
206206 let wavesXtnPrice = parseBigIntValue({
207207 let @ = invoke(poolsFactoryAddress, "getPrice", [wavesXtnAddressStr], nil)
208208 if ($isInstanceOf(@, "String"))
209209 then @
210210 else throw(($getType(@) + " couldn't be cast to String"))
211211 })
212212 let xtnUsdtPrice = fraction(wavesUsdtPrice, mult18, wavesXtnPrice)
213213 func map (acc,nextAssetId) = {
214214 let price = match nextAssetId {
215215 case _ =>
216216 if (("2thsACuHmzDMuNezPM32wg9a3BwUzBWDeSKakgz3cw21" == $match0))
217217 then {
218218 let pwrWavesAddressStr = "3PDi7Qq8pLQYvtKyTfQuqqPUWyhoYbU957t"
219219 let pwrWavesPrice = parseBigIntValue({
220220 let @ = invoke(poolsFactoryAddress, "getPrice", [pwrWavesAddressStr], nil)
221221 if ($isInstanceOf(@, "String"))
222222 then @
223223 else throw(($getType(@) + " couldn't be cast to String"))
224224 })
225225 fraction(pwrWavesPrice, wavesUsdtPrice, mult18)
226226 }
227227 else if (("Atqv59EYzjFGuitKVnMRk6H8FukjoV3ktPorbEys25on" == $match0))
228228 then {
229229 let wxWavesAddressStr = "3PFzaH2ghpwANHFgjeva83N1yxzErELx2eh"
230230 let wxWavesPrice = parseBigIntValue({
231231 let @ = invoke(poolsFactoryAddress, "getPrice", [wxWavesAddressStr], nil)
232232 if ($isInstanceOf(@, "String"))
233233 then @
234234 else throw(($getType(@) + " couldn't be cast to String"))
235235 })
236236 fraction(wxWavesPrice, wavesUsdtPrice, mult18)
237237 }
238238 else if (("34N9YcEETLWn93qYQ64EsP1x89tSruJU44RrEMSXXEPJ" == $match0))
239239 then {
240240 let wavesUsdtwxgAddressStr = "3PKMVZ7kQeaREajYi8Yc25Ro6mcNw5D6QSa"
241241 let wavesUsdtwxgPrice = parseBigIntValue({
242242 let @ = invoke(poolsFactoryAddress, "getPrice", [wavesUsdtwxgAddressStr], nil)
243243 if ($isInstanceOf(@, "String"))
244244 then @
245245 else throw(($getType(@) + " couldn't be cast to String"))
246246 })
247247 fraction(wavesUsdtPrice, mult18, wavesUsdtwxgPrice)
248248 }
249249 else if (("6XtHjpXbs9RRJP2Sr9GUyVqzACcby9TkThHXnjVC5CDJ" == $match0))
250250 then {
251251 let wavesUsdcwxgAddressStr = "3P3g3eipfG2NZKKQE8DZXt2E9tRJqii9jcX"
252252 let wavesUsdcwxgPrice = parseBigIntValue({
253253 let @ = invoke(poolsFactoryAddress, "getPrice", [wavesUsdcwxgAddressStr], nil)
254254 if ($isInstanceOf(@, "String"))
255255 then @
256256 else throw(($getType(@) + " couldn't be cast to String"))
257257 })
258258 fraction(wavesUsdtPrice, mult18, wavesUsdcwxgPrice)
259259 }
260260 else if (("HZk1mbfuJpmxU1Fs4AX5MWLVYtctsNcg6e2C6VKqK8zk" == $match0))
261261 then {
262262 let ltcwxgXtnAddressStr = "3P94wvu5gA7VhjPgAB3twaeqdwHCwNK2vsn"
263263 let ltcwxgXtnPrice = parseBigIntValue({
264264 let @ = invoke(poolsFactoryAddress, "getPrice", [ltcwxgXtnAddressStr], nil)
265265 if ($isInstanceOf(@, "String"))
266266 then @
267267 else throw(($getType(@) + " couldn't be cast to String"))
268268 })
269269 fraction(ltcwxgXtnPrice, xtnUsdtPrice, mult18)
270270 }
271271 else if (("474jTeYx2r2Va35794tCScAXWJG9hU2HcgxzMowaZUnu" == $match0))
272272 then {
273273 let ethwxgWavesAddressStr = "3P3XGTN6s292g9iwYhs3TEqJqHiffQYojuE"
274274 let ethwxgWavesPrice = parseBigIntValue({
275275 let @ = invoke(poolsFactoryAddress, "getPrice", [ethwxgWavesAddressStr], nil)
276276 if ($isInstanceOf(@, "String"))
277277 then @
278278 else throw(($getType(@) + " couldn't be cast to String"))
279279 })
280280 fraction(ethwxgWavesPrice, wavesUsdtPrice, mult18)
281281 }
282282 else if (("8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS" == $match0))
283283 then {
284284 let btcwxgXtnAddressStr = "3PCBWDTA6jrFswd7gQgaE3Xk7gLM5RKofvp"
285285 let btcwxgXtnPrice = parseBigIntValue({
286286 let @ = invoke(poolsFactoryAddress, "getPrice", [btcwxgXtnAddressStr], nil)
287287 if ($isInstanceOf(@, "String"))
288288 then @
289289 else throw(($getType(@) + " couldn't be cast to String"))
290290 })
291291 fraction(btcwxgXtnPrice, xtnUsdtPrice, mult18)
292292 }
293293 else throwErr("invalid asset id")
294294 }
295295 (acc :+ price)
296296 }
297297
298298 let $l = assetIdList
299299 let $s = size($l)
300300 let $acc0 = nil
301301 func $f0_1 ($a,$i) = if (($i >= $s))
302302 then $a
303303 else map($a, $l[$i])
304304
305305 func $f0_2 ($a,$i) = if (($i >= $s))
306306 then $a
307307 else throw("List size exceeds 10")
308308
309309 $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)
310310 }
311311 else if ((chainId == chainIdT))
312312 then {
313313 func map (acc,nextAssetId) = {
314314 let price = match nextAssetId {
315315 case _ =>
316316 if (("EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc" == $match0))
317317 then {
318318 let wxUsdtAddressStr = "3MrULQRLc52GWrJF1tMcAm4M78fPe57o9Kt"
319319 let wxUsdtPrice = parseBigIntValue({
320320 let @ = invoke(poolsFactoryAddress, "getPrice", [wxUsdtAddressStr], nil)
321321 if ($isInstanceOf(@, "String"))
322322 then @
323323 else throw(($getType(@) + " couldn't be cast to String"))
324324 })
325325 wxUsdtPrice
326326 }
327327 else if (("A7Ksh7fXyqm1KhKAiK3bAB2aiPSitQQF6v1pyu9SS3FR" == $match0))
328328 then {
329329 let usdcUsdtAddressStr = "3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA"
330330 let usdcUsdtPrice = parseBigIntValue({
331331 let @ = invoke(poolsFactoryAddress, "getPrice", [usdcUsdtAddressStr], nil)
332332 if ($isInstanceOf(@, "String"))
333333 then @
334334 else throw(($getType(@) + " couldn't be cast to String"))
335335 })
336336 usdcUsdtPrice
337337 }
338338 else if (("8Q6SE2ANebufw8JuPjJVRjZD6drD8ihjNjM8xaGUSfdR" == $match0))
339339 then {
340340 let price = toX18(150000000, pow(10, 0, usdtDecimals, 0, 0, DOWN))
341341 price
342342 }
343343 else throwErr("invalid asset id")
344344 }
345345 (acc :+ price)
346346 }
347347
348348 let $l = assetIdList
349349 let $s = size($l)
350350 let $acc0 = nil
351351 func $f0_1 ($a,$i) = if (($i >= $s))
352352 then $a
353353 else map($a, $l[$i])
354354
355355 func $f0_2 ($a,$i) = if (($i >= $s))
356356 then $a
357357 else throw("List size exceeds 10")
358358
359359 $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)
360360 }
361361 else throwErr("invalid chain id")
362362
363363
364364 func calcTreasuryValue (factoryAddress) = {
365365 let treasuryAddress = getTreasuryAddress(factoryAddress)
366366 let poolsFactoryAddress = getPoolsFactoryAddress(factoryAddress)
367367 let assetsStr = split(getAssetsStr(factoryAddress), SEP)
368368 let assetsBalances = getAssetsBalances(treasuryAddress, assetsStr)
369369 let assetsPrices = getAssetsPrices(poolsFactoryAddress, assetsStr)
370370 func reduce (acc,nextAssetIdStr) = {
371371 let assetId = fromBase58String(nextAssetIdStr)
372372 let index = valueOrErrorMessage(indexOf(assetsStr, nextAssetIdStr), wrapErr("invalid asset id"))
373373 let balance = assetsBalances[index]
374374 let price = assetsPrices[index]
375375 let assetValue = fraction(balance, price, mult18)
376376 (acc + assetValue)
377377 }
378378
379379 let treasuryValue = {
380380 let $l = assetsStr
381381 let $s = size($l)
382382 let $acc0 = toBigInt(0)
383383 func $f0_1 ($a,$i) = if (($i >= $s))
384384 then $a
385385 else reduce($a, $l[$i])
386386
387387 func $f0_2 ($a,$i) = if (($i >= $s))
388388 then $a
389389 else throw("List size exceeds 10")
390390
391391 $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)
392392 }
393393 treasuryValue
394394 }
395395
396396
397397 func calcRewardsAndLock (factoryAddress,paymentAmount,userAddressOption) = {
398398 let assetsStr = split(getAssetsStr(factoryAddress), SEP)
399399 let wxdaoQuantity = getAssetInfoOrFail(getLpAssetId(factoryAddress)).quantity
400400 if ((wxdaoQuantity == wxdaoQuantity))
401401 then {
402402 let assetsBalances = getAssetsBalances(factoryAddress, assetsStr)
403403 func map (acc,nextAssetIdStr) = {
404404 let assetId = fromBase58String(nextAssetIdStr)
405405 let index = valueOrErrorMessage(indexOf(assetsStr, nextAssetIdStr), wrapErr("invalid asset balance"))
406406 let assetDecimals = getAssetInfoOrFail(assetId).decimals
407407 let balance = fromX18(assetsBalances[index], pow(10, 0, assetDecimals, 0, 0, DOWN))
408408 let amount = fraction(balance, paymentAmount, wxdaoQuantity)
409409 if ((amount > 0))
410410 then {
411411 let lock = if ((userAddressOption == unit))
412412 then unit
413413 else invoke(this, "lockInternal", [factoryAddress.bytes, value(userAddressOption).bytes, assetId, amount], nil)
414414 if ((lock == lock))
415415 then $Tuple2((acc._1 :+ assetId), (acc._2 :+ amount))
416416 else throw("Strict value is not equal to itself.")
417417 }
418418 else acc
419419 }
420420
421421 let $l = assetsStr
422422 let $s = size($l)
423423 let $acc0 = $Tuple2(nil, nil)
424424 func $f0_1 ($a,$i) = if (($i >= $s))
425425 then $a
426426 else map($a, $l[$i])
427427
428428 func $f0_2 ($a,$i) = if (($i >= $s))
429429 then $a
430430 else throw("List size exceeds 6")
431431
432432 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
433433 }
434434 else throw("Strict value is not equal to itself.")
435435 }
436436
437437
438438 func calcPrice (factoryAddress) = {
439439 let poolsFactoryAddress = getPoolsFactoryAddress(factoryAddress)
440440 let currentPeriod = valueOrErrorMessage(getInteger(factoryAddress, keyCurrentPeriod()), wrapErr("invalid current period"))
441441 let startTreasuryValue = valueOrErrorMessage(getInteger(factoryAddress, keyTreasuryValueByPeriod(currentPeriod)), wrapErr(("invalid treasury value for period " + toString(currentPeriod))))
442442 let treasuryValue = fromX18(calcTreasuryValue(factoryAddress), pow(10, 0, usdtDecimals, 0, 0, DOWN))
443443 let treasuryValueDiff = (treasuryValue - startTreasuryValue)
444444 let treasuryValueDiffX18 = toX18(treasuryValueDiff, pow(10, 0, usdtDecimals, 0, 0, DOWN))
445445 let pwrAssetId = getPowerAssetId(factoryAddress)
446446 let pwrInfo = getAssetInfoOrFail(pwrAssetId)
447447 let pwrPriceX18 = getAssetsPrices(poolsFactoryAddress, [toBase58String(pwrAssetId)])[0]
448448 let pwrPrice = if ((pwrPriceX18 > toBigInt(0)))
449449 then fromX18(pwrPriceX18, pow(10, 0, usdtDecimals, 0, 0, DOWN))
450450 else throwErr("invalid PWR price")
451451 let treasuryAddress = getTreasuryAddress(factoryAddress)
452452 let skinTotal = valueOrElse(getInteger(powerContractAddress(factoryAddress), keySkinTotal(treasuryAddress)), 0)
453453 let wxdaoInfo = getAssetInfoOrFail(getLpAssetId(factoryAddress))
454454 let pwrRemaining = (wxdaoInfo.quantity / 100)
455455 let pwrAmount = (skinTotal + pwrRemaining)
456456 let pwrAmountX18 = toX18(pwrAmount, pow(10, 0, pwrInfo.decimals, 0, 0, DOWN))
457457 let factoryAddressWxBalanceX18 = getAssetsBalances(factoryAddress, [toBase58String(wxAssetId)])[0]
458458 let factoryAddressWxBalance = fromX18(factoryAddressWxBalanceX18, pow(10, 0, usdtDecimals, 0, 0, DOWN))
459459 let wxPriceX18 = getAssetsPrices(poolsFactoryAddress, [toBase58String(wxAssetId)])[0]
460460 let wxPrice = if ((wxPriceX18 > toBigInt(0)))
461461 then fromX18(wxPriceX18, pow(10, 0, usdtDecimals, 0, 0, DOWN))
462462 else throwErr("invalid wx price")
463463 let wxdaoQuantity = wxdaoInfo.quantity
464464 let wxdaoQuantityX18 = toX18(wxdaoQuantity, pow(10, 0, wxdaoInfo.decimals, 0, 0, DOWN))
465465 let wxDaoPriceX18 = (((pwrPriceX18 + fraction((factoryAddressWxBalanceX18 * toBigInt(100)), wxPriceX18, wxdaoQuantityX18)) + fraction(max([treasuryValueDiffX18, toBigInt(0)]), (toBigInt(2) * mult18), (toBigInt(10) * pwrAmountX18))) / toBigInt(100))
466466 let wxDaoPrice = fromX18(wxDaoPriceX18, pow(10, 0, usdtDecimals, 0, 0, DOWN))
467467 let rewardsPrices = calcRewardsAndLock(factoryAddress, pow(10, 0, wxdaoInfo.decimals, 0, 0, DOWN), unit)
468468 $Tuple2([wxDaoPrice, rewardsPrices], [["wxDaoPrice", wxDaoPrice], ["pwrPrice", pwrPrice], ["factoryAddressWxBalance", factoryAddressWxBalance], ["wxPrice", wxPrice], ["wxdaoQuantity", wxdaoQuantity], ["treasuryValueDiff", treasuryValueDiff], ["pwrAmount", pwrAmount], ["skinTotal", skinTotal], ["pwrRemaining", pwrRemaining]])
469469 }
470470
471471
472472 @Callable(i)
473473 func swap (callerPublicKey,args) = {
474474 let factoryAddress = i.caller
475475 let userAddress = addressFromPublicKey(callerPublicKey)
476476 let payment = if ((size(i.payments) == 1))
477477 then i.payments[0]
478478 else throwErr("1 payment is required")
479479 let err = wrapErr("invalid payment asset id")
480480 let paymentAssetId = if ((valueOrErrorMessage(payment.assetId, err) == getLpAssetId(factoryAddress)))
481481 then value(payment.assetId)
482482 else throwErr(err)
483483 let pwrPrice = 100
484484 let pwrAmount = (payment.amount / pwrPrice)
485485 let rewards = calcRewardsAndLock(factoryAddress, payment.amount, userAddress)
486486 if ((rewards == rewards))
487487 then {
488488 let additionalLockRounds = 0
489489 let factoryActions = [invoke(factoryAddress, "commitAfterStartWithLockRoundFor", [toString(powerContractAddress(factoryAddress)), toString(getTreasuryAddress(factoryAddress)), toString(userAddress), additionalLockRounds, getPowerAssetId(factoryAddress), pwrAmount], nil)]
490490 $Tuple2([Burn(paymentAssetId, payment.amount)], factoryActions)
491491 }
492492 else throw("Strict value is not equal to itself.")
493493 }
494494
495495
496496
497497 @Callable(i)
498498 func lockInternal (factoryAddressBytes,userAddressBytes,assetId,amount) = {
499499 let checkCaller = onlyThis(i)
500500 if ((checkCaller == checkCaller))
501501 then {
502502 let factoryAddress = Address(factoryAddressBytes)
503503 let userAddress = Address(userAddressBytes)
504504 let lockGlobalCounter = valueOrElse(getInteger(factoryAddress, keyLockGlobalCounter()), 0)
505505 let lockDuration = valueOrErrorMessage(getInteger(factoryAddress, keyLockDuration()), wrapErr("invalid lock duration"))
506506 let getAssets = invoke(factoryAddress, "transferAsset", [lockAddress(factoryAddress).bytes, amount, assetId], nil)
507507 if ((getAssets == getAssets))
508508 then {
509509 let factoryActions = [invoke(factoryAddress, "stringEntry", [keyLock(userAddress, lockGlobalCounter), lockFormat(height, (height + lockDuration), assetId, amount)], nil), invoke(factoryAddress, "integerEntry", [keyLockGlobalCounter(), (lockGlobalCounter + 1)], nil)]
510510 $Tuple2(nil, factoryActions)
511511 }
512512 else throw("Strict value is not equal to itself.")
513513 }
514514 else throw("Strict value is not equal to itself.")
515515 }
516516
517517
518518
519519 @Callable(i)
520520 func unlock (callerPublicKey,args) = {
521521 let factoryAddress = i.caller
522522 let userAddress = addressFromPublicKey(callerPublicKey)
523- let counter = valueOrErrorMessage(parseInt(args[0]), wrapErr("invalid counter"))
524- let $t01770817873 = lockParse(valueOrErrorMessage(getString(factoryAddress, keyLock(userAddress, counter)), wrapErr("invalid lock")))
525- let from = $t01770817873._1
526- let to = $t01770817873._2
527- let assetId = $t01770817873._3
528- let amount = $t01770817873._4
529- let result = if ((height > to))
530- then [invoke(lockAddress(factoryAddress), "transferAsset", [userAddress.bytes, amount, assetId], nil), invoke(factoryAddress, "deleteEntry", [keyLock(userAddress, counter)], nil)]
531- else throwErr("invalid height")
523+ func fold (acc,next) = {
524+ let counter = valueOrErrorMessage(parseInt(next), wrapErr("invalid counter"))
525+ let $t01775517928 = lockParse(valueOrErrorMessage(getString(factoryAddress, keyLock(userAddress, counter)), wrapErr("invalid lock")))
526+ let from = $t01775517928._1
527+ let to = $t01775517928._2
528+ let assetId = $t01775517928._3
529+ let amount = $t01775517928._4
530+ let result = if ((height > to))
531+ then [invoke(lockAddress(factoryAddress), "transferAsset", [userAddress.bytes, amount, assetId], nil), invoke(factoryAddress, "deleteEntry", [keyLock(userAddress, counter)], nil)]
532+ else throwErr("invalid height")
533+ (acc :+ result)
534+ }
535+
536+ let result = {
537+ let $l = args
538+ let $s = size($l)
539+ let $acc0 = nil
540+ func $f0_1 ($a,$i) = if (($i >= $s))
541+ then $a
542+ else fold($a, $l[$i])
543+
544+ func $f0_2 ($a,$i) = if (($i >= $s))
545+ then $a
546+ else throw("List size exceeds 30")
547+
548+ $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)
549+ }
532550 $Tuple2(nil, result)
533551 }
534552
535553
536554
537555 @Callable(i)
538556 func price (callerPublicKey,args) = {
539557 let factoryAddress = i.caller
540558 $Tuple2(nil, calcPrice(factoryAddress)._1)
541559 }
542560
543561
544562
545563 @Callable(i)
546564 func priceDebug (callerPublicKey,args) = {
547565 let factoryAddress = i.caller
548566 $Tuple2(nil, calcPrice(factoryAddress)._2)
549567 }
550568
551569
552570
553571 @Callable(i)
554572 func getTreasuryValue (callerPublicKey,args) = {
555573 let factoryAddress = i.caller
556574 let treasuryValue = fromX18(calcTreasuryValue(factoryAddress), pow(10, 0, usdtDecimals, 0, 0, DOWN))
557575 $Tuple2(nil, treasuryValue)
558576 }
559577
560578
561579 @Verifier(tx)
562580 func verify () = (chainId == chainIdT)
563581

github/deemru/w8io/026f985 
55.08 ms