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