tx · G5PH2HgsX53FmJ1aYeViXQsxTuPvCf4XogMtSW3tEvZa 3N6HSS7Toat1RhyEsyqVGgVSRzH19W1FTbP: -0.03400000 Waves 2023.08.18 10:45 [2715759] smart account 3N6HSS7Toat1RhyEsyqVGgVSRzH19W1FTbP > SELF 0.00000000 Waves
{ "type": 13, "id": "G5PH2HgsX53FmJ1aYeViXQsxTuPvCf4XogMtSW3tEvZa", "fee": 3400000, "feeAssetId": null, "timestamp": 1692344780412, "version": 1, "sender": "3N6HSS7Toat1RhyEsyqVGgVSRzH19W1FTbP", "senderPublicKey": "AoKo4segKHU4DeJnxXQYJj2u7J6XJeux6r8KLW52cd2Q", "proofs": [ "2Tj5qJgjFxHRh7MQGgdo7o6N9Hnj8t7EWjESJs2Lkd3AtsQSxhVmZM1Jrg8EP9yoXktEGrtAjX2areqQzw9SWmYu" ], "script": "base64:BwJFCAISAwoBAhIHCgUCAQEBARIGCgQBAQEBEgMKAQISAwoBAhIECgICAhIECgICCBIECgICGBIECgICCBIECgICGBIDCgECPQADU0VQAgJfXwANQ09OVFJBQ1RfTkFNRQIPY2FsY3VsYXRvci5yaWRlAAZTQ0FMRTgAgMLXLwAHUEVORElORwIHUEVORElORwAFV0FWRVMCBVdBVkVTAQd3cmFwRXJyAQFzCQCsAgIJAKwCAgUNQ09OVFJBQ1RfTkFNRQICOiAFAXMBCHRocm93RXJyAQFzCQACAQkBB3dyYXBFcnIBBQFzAQ9hc3NldElkVG9TdHJpbmcBB2Fzc2V0SWQEByRtYXRjaDAFB2Fzc2V0SWQDCQABAgUHJG1hdGNoMAIKQnl0ZVZlY3RvcgQBYgUHJG1hdGNoMAkA2AQBBQFiAwkAAQIFByRtYXRjaDACBFVuaXQFBVdBVkVTCQACAQILTWF0Y2ggZXJyb3IBD3N0cmluZ1RvQXNzZXRJZAEBcwMJAAACBQFzBQVXQVZFUwUEdW5pdAkA2QQBBQFzAQNhYnMBAW4DCQBmAgAABQFuCQEBLQEFAW4FAW4BEWtleUZhY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AgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECdHgBBnZlcmlmeQAECXB1YmxpY0tleQQHJG1hdGNoMAkBGWdldE1hbmFnZXJQdWJsaWNLZXlPclVuaXQAAwkAAQIFByRtYXRjaDACCkJ5dGVWZWN0b3IEA3B1YgUHJG1hdGNoMAUDcHViCAUCdHgPc2VuZGVyUHVibGljS2V5CQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQlwdWJsaWNLZXnIjo4r", "chainId": 84, "height": 2715759, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3pfspFhKeMtRC9i4f24UrLaiowdW8mi78gXtjVF7oFUi Next: 6rLD4CDndN4tFiVth23tXZQL7cguVsyQKC2KWQgMH7a2 Diff:
Old | New | Differences | |
---|---|---|---|
766 | 766 | let transferAction = [invoke(factoryAddressOrFail, "transferFromProxyTreasury", [factoryAddressOrFail.bytes, amountToPowerTotal], nil)] | |
767 | 767 | if ((transferAction == transferAction)) | |
768 | 768 | then { | |
769 | - | let totalPowerAmount = invoke(factoryAddressOrFail, "swap", [powerAssetIdStringOrFail, | |
769 | + | let totalPowerAmount = invoke(factoryAddressOrFail, "swap", [powerAssetIdStringOrFail, WAVES, amountToPowerTotal], nil) | |
770 | 770 | if ((totalPowerAmount == totalPowerAmount)) | |
771 | 771 | then { | |
772 | 772 | let totalPowerAmountInt = match totalPowerAmount { | |
776 | 776 | 0 | |
777 | 777 | } | |
778 | 778 | func stakePowerInvoke (acc,next) = { | |
779 | - | let $ | |
780 | - | let generator = $ | |
781 | - | let shareAmount = $ | |
779 | + | let $t02844128476 = next | |
780 | + | let generator = $t02844128476._1 | |
781 | + | let shareAmount = $t02844128476._2 | |
782 | 782 | if ((amountToPowerTotal > 0)) | |
783 | 783 | then { | |
784 | 784 | let powerAmount = fraction(shareAmount, totalPowerAmountInt, amountToPowerTotal) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 7 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | 5 | ||
6 | 6 | let CONTRACT_NAME = "calculator.ride" | |
7 | 7 | ||
8 | 8 | let SCALE8 = 100000000 | |
9 | 9 | ||
10 | 10 | let PENDING = "PENDING" | |
11 | 11 | ||
12 | 12 | let WAVES = "WAVES" | |
13 | 13 | ||
14 | 14 | func wrapErr (s) = ((CONTRACT_NAME + ": ") + s) | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | func throwErr (s) = throw(wrapErr(s)) | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func assetIdToString (assetId) = match assetId { | |
21 | 21 | case b: ByteVector => | |
22 | 22 | toBase58String(b) | |
23 | 23 | case _: Unit => | |
24 | 24 | WAVES | |
25 | 25 | case _ => | |
26 | 26 | throw("Match error") | |
27 | 27 | } | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func stringToAssetId (s) = if ((s == WAVES)) | |
31 | 31 | then unit | |
32 | 32 | else fromBase58String(s) | |
33 | 33 | ||
34 | 34 | ||
35 | 35 | func abs (n) = if ((0 > n)) | |
36 | 36 | then -(n) | |
37 | 37 | else n | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func keyFactoryAddress () = makeString(["%s", "factory"], SEP) | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func keyManagerPublicKey () = makeString(["%s", "managerPublicKey"], SEP) | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func keyLpAssetId () = makeString(["%s", "lpAssetId"], SEP) | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func keyProxyTreasuryAddress () = makeString(["%s", "proxyTreasury"], SEP) | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func keyMainTreasuryAddress () = makeString(["%s", "mainTreasury"], SEP) | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func keyBusinessTreasuryAddress () = makeString(["%s", "businessTreasury"], SEP) | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func keyBusinessTreasuryPart () = makeString(["%s", "businessTreasuryPart"], SEP) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func keyPowerContractAddress () = makeString(["%s", "powerContract"], SEP) | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func keyPowerShareRatio () = makeString(["%s", "powerShareRatio"], SEP) | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func keyPowerAssetId () = makeString(["%s", "powerAssetId"], SEP) | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func keyInvested (assetId) = makeString(["%s%s", "invested", assetIdToString(assetId)], SEP) | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func keyDonated (assetId) = makeString(["%s%s", "donated", assetIdToString(assetId)], SEP) | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func keyAvailable (userAddress) = makeString(["%s%s", "available", toString(userAddress)], SEP) | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func keyClaimed (userAddress) = makeString(["%s%s", "claimed", toString(userAddress)], SEP) | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func keyCurrentPeriod () = makeString(["%s", "currentPeriod"], SEP) | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func keyPriceForPeriod (period) = makeString(["%s%d", "price", toString(period)], SEP) | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func keyStartHeight (period) = makeString(["%s%d", "startHeight", toString(period)], SEP) | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func keyPowerManagerBonus (period) = makeString(["%s%d", "powerManagerBonus", toString(period)], SEP) | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func keyClaimWavesAmount (period) = makeString(["%s%d", "claimWavesAmount", toString(period)], SEP) | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func keyPeriodLength () = "%s__periodLength" | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func keyInvestPeriodLength () = "%s__investPeriodLength" | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func keyBlockProcessingReward () = "%s__blockProcessingReward" | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func keyNextBlockToProcess () = "%s__nextBlockToProcess" | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func keyBlockProcessed (height) = makeString(["%s%d", "blockProcessed", toString(height)], SEP) | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | func keyWithdrawal () = "%s__withdrawal" | |
113 | 113 | ||
114 | 114 | ||
115 | 115 | func keyWithdrawalRequest (userAddress,txId) = makeString(["%s%s%s", "withdrawal", toString(userAddress), toBase58String(txId)], SEP) | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | func valueWithdrawalRequest (status,lpAssetAmount,targetPeriod,claimTxId) = { | |
119 | 119 | let claimTxIdStr = match claimTxId { | |
120 | 120 | case b: ByteVector => | |
121 | 121 | toBase58String(b) | |
122 | 122 | case _: Unit => | |
123 | 123 | "SOON" | |
124 | 124 | case _ => | |
125 | 125 | throw("Match error") | |
126 | 126 | } | |
127 | 127 | makeString(["%s%d%d%s", status, toString(lpAssetAmount), toString(targetPeriod), claimTxIdStr], SEP) | |
128 | 128 | } | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func keyWithdrawalHistory (userAddress,txId) = makeString(["%s%s%s", "withdrawalHistory", toString(userAddress), toBase58String(txId)], SEP) | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | func keyPeriodWithdrawalAssetIds (period) = makeString(["%s%d", "periodReward", toString(period)], SEP) | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | func keyPeriodWithdrawalAmounts (period) = makeString(["%s%d", "periodRewardAmount", toString(period)], SEP) | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | func parseWithdrawalRequestValueOrFail (s) = { | |
141 | 141 | let parts = split(s, SEP) | |
142 | 142 | if ((size(parts) == 5)) | |
143 | 143 | then { | |
144 | 144 | let status = parts[1] | |
145 | 145 | let lpAssetAmount = valueOrErrorMessage(parseInt(parts[2]), wrapErr("invalid lpAssetAmount")) | |
146 | 146 | let targetPeriod = valueOrErrorMessage(parseInt(parts[3]), wrapErr("invalid targetPeriod")) | |
147 | 147 | let claimTxId = parts[4] | |
148 | 148 | $Tuple4(status, lpAssetAmount, targetPeriod, claimTxId) | |
149 | 149 | } | |
150 | 150 | else throwErr("invalid withdrawal request value") | |
151 | 151 | } | |
152 | 152 | ||
153 | 153 | ||
154 | 154 | let factoryAddressOption = match getString(this, keyFactoryAddress()) { | |
155 | 155 | case s: String => | |
156 | 156 | addressFromString(s) | |
157 | 157 | case _: Unit => | |
158 | 158 | unit | |
159 | 159 | case _ => | |
160 | 160 | throw("Match error") | |
161 | 161 | } | |
162 | 162 | ||
163 | 163 | let factoryAddressOrFail = valueOrErrorMessage(factoryAddressOption, wrapErr("invalid factory address")) | |
164 | 164 | ||
165 | 165 | let lpAssetIdOption = match factoryAddressOption { | |
166 | 166 | case a: Address => | |
167 | 167 | match getString(a, keyLpAssetId()) { | |
168 | 168 | case s: String => | |
169 | 169 | fromBase58String(s) | |
170 | 170 | case _: Unit => | |
171 | 171 | unit | |
172 | 172 | case _ => | |
173 | 173 | throw("Match error") | |
174 | 174 | } | |
175 | 175 | case _: Unit => | |
176 | 176 | unit | |
177 | 177 | case _ => | |
178 | 178 | throw("Match error") | |
179 | 179 | } | |
180 | 180 | ||
181 | 181 | let lpAssetIdOrFail = valueOrErrorMessage(lpAssetIdOption, wrapErr("invalid lpAssetId")) | |
182 | 182 | ||
183 | 183 | let proxyTreasuryAddressOption = match factoryAddressOption { | |
184 | 184 | case a: Address => | |
185 | 185 | match getString(a, keyProxyTreasuryAddress()) { | |
186 | 186 | case s: String => | |
187 | 187 | addressFromString(s) | |
188 | 188 | case _: Unit => | |
189 | 189 | unit | |
190 | 190 | case _ => | |
191 | 191 | throw("Match error") | |
192 | 192 | } | |
193 | 193 | case _: Unit => | |
194 | 194 | unit | |
195 | 195 | case _ => | |
196 | 196 | throw("Match error") | |
197 | 197 | } | |
198 | 198 | ||
199 | 199 | let proxyTreasuryAddressOrFail = valueOrErrorMessage(proxyTreasuryAddressOption, wrapErr("invalid proxy treasury address")) | |
200 | 200 | ||
201 | 201 | let mainTreasuryAddressOption = match factoryAddressOption { | |
202 | 202 | case a: Address => | |
203 | 203 | match getString(a, keyMainTreasuryAddress()) { | |
204 | 204 | case s: String => | |
205 | 205 | addressFromString(s) | |
206 | 206 | case _: Unit => | |
207 | 207 | unit | |
208 | 208 | case _ => | |
209 | 209 | throw("Match error") | |
210 | 210 | } | |
211 | 211 | case _: Unit => | |
212 | 212 | unit | |
213 | 213 | case _ => | |
214 | 214 | throw("Match error") | |
215 | 215 | } | |
216 | 216 | ||
217 | 217 | let businessTreasuryAddressOption = match factoryAddressOption { | |
218 | 218 | case a: Address => | |
219 | 219 | match getString(a, keyBusinessTreasuryAddress()) { | |
220 | 220 | case s: String => | |
221 | 221 | addressFromString(s) | |
222 | 222 | case _: Unit => | |
223 | 223 | unit | |
224 | 224 | case _ => | |
225 | 225 | throw("Match error") | |
226 | 226 | } | |
227 | 227 | case _: Unit => | |
228 | 228 | unit | |
229 | 229 | case _ => | |
230 | 230 | throw("Match error") | |
231 | 231 | } | |
232 | 232 | ||
233 | 233 | let mainTreasuryAddressOrFail = valueOrErrorMessage(mainTreasuryAddressOption, wrapErr("invalid main treasury address")) | |
234 | 234 | ||
235 | 235 | let businessTreasuryAddressOrFail = valueOrErrorMessage(businessTreasuryAddressOption, wrapErr("invalid business treasury address")) | |
236 | 236 | ||
237 | 237 | let powerContractAddressOption = match factoryAddressOption { | |
238 | 238 | case a: Address => | |
239 | 239 | match getString(a, keyPowerContractAddress()) { | |
240 | 240 | case s: String => | |
241 | 241 | addressFromString(s) | |
242 | 242 | case _: Unit => | |
243 | 243 | unit | |
244 | 244 | case _ => | |
245 | 245 | throw("Match error") | |
246 | 246 | } | |
247 | 247 | case _: Unit => | |
248 | 248 | unit | |
249 | 249 | case _ => | |
250 | 250 | throw("Match error") | |
251 | 251 | } | |
252 | 252 | ||
253 | 253 | let powerContractAddressOrFail = valueOrErrorMessage(powerContractAddressOption, wrapErr("invalid power contract address")) | |
254 | 254 | ||
255 | 255 | let powerAssetIdStringOrFail = valueOrErrorMessage(getString(factoryAddressOrFail, keyPowerAssetId()), wrapErr("power asset id not found")) | |
256 | 256 | ||
257 | 257 | func getManagerPublicKeyOrUnit () = match factoryAddressOption { | |
258 | 258 | case fa: Address => | |
259 | 259 | match getString(fa, keyManagerPublicKey()) { | |
260 | 260 | case pub: String => | |
261 | 261 | fromBase58String(pub) | |
262 | 262 | case _ => | |
263 | 263 | unit | |
264 | 264 | } | |
265 | 265 | case _ => | |
266 | 266 | unit | |
267 | 267 | } | |
268 | 268 | ||
269 | 269 | ||
270 | 270 | func onlyAddress (i,address) = if ((i.caller == address)) | |
271 | 271 | then true | |
272 | 272 | else throwErr("permission denied") | |
273 | 273 | ||
274 | 274 | ||
275 | 275 | func onlyFactory (i) = onlyAddress(i, factoryAddressOrFail) | |
276 | 276 | ||
277 | 277 | ||
278 | 278 | func rewardForOption (rewards,target) = { | |
279 | 279 | let s = size(rewards) | |
280 | 280 | let $t066316656 = rewards[0] | |
281 | 281 | let a0 = $t066316656._1 | |
282 | 282 | let r0 = $t066316656._2 | |
283 | 283 | let $t066596684 = rewards[1] | |
284 | 284 | let a1 = $t066596684._1 | |
285 | 285 | let r1 = $t066596684._2 | |
286 | 286 | let $t066876712 = rewards[2] | |
287 | 287 | let a2 = $t066876712._1 | |
288 | 288 | let r2 = $t066876712._2 | |
289 | 289 | if (if ((s > 0)) | |
290 | 290 | then (a0 == target) | |
291 | 291 | else false) | |
292 | 292 | then r0 | |
293 | 293 | else if (if ((s > 1)) | |
294 | 294 | then (a1 == target) | |
295 | 295 | else false) | |
296 | 296 | then r1 | |
297 | 297 | else if (if ((s > 2)) | |
298 | 298 | then (a2 == target) | |
299 | 299 | else false) | |
300 | 300 | then r2 | |
301 | 301 | else unit | |
302 | 302 | } | |
303 | 303 | ||
304 | 304 | ||
305 | 305 | func calculatePrice (lpPartInWaves) = { | |
306 | 306 | let lpAssetAmountToBurn = valueOrElse(getInteger(factoryAddressOrFail, keyWithdrawal()), 0) | |
307 | 307 | let lpAssetQuantity = valueOrErrorMessage(assetInfo(lpAssetIdOrFail), wrapErr("invalid lpAsset info")).quantity | |
308 | 308 | let newPrice = fraction(lpPartInWaves, SCALE8, (lpAssetQuantity - lpAssetAmountToBurn)) | |
309 | 309 | let checkIfPriceNotZero = if ((newPrice != 0)) | |
310 | 310 | then true | |
311 | 311 | else throwErr("LP price cannot be 0") | |
312 | 312 | if ((checkIfPriceNotZero == checkIfPriceNotZero)) | |
313 | 313 | then { | |
314 | 314 | let lpAssetFinalQuantity = (lpAssetQuantity - lpAssetAmountToBurn) | |
315 | 315 | $Tuple3(newPrice, lpAssetAmountToBurn, lpAssetFinalQuantity) | |
316 | 316 | } | |
317 | 317 | else throw("Strict value is not equal to itself.") | |
318 | 318 | } | |
319 | 319 | ||
320 | 320 | ||
321 | 321 | func claimCollateralINTERNAL (userAddressBytes,txId) = { | |
322 | 322 | let userAddress = Address(userAddressBytes) | |
323 | 323 | let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period")) | |
324 | 324 | let withdrawalRequestOption = valueOrErrorMessage(getString(factoryAddressOrFail, keyWithdrawalRequest(userAddress, txId)), wrapErr("invalid withdrawal request")) | |
325 | 325 | let $t078797992 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption) | |
326 | 326 | let status = $t078797992._1 | |
327 | 327 | let lpAssetAmount = $t078797992._2 | |
328 | 328 | let targetPeriod = $t078797992._3 | |
329 | 329 | let claimTxId = $t078797992._4 | |
330 | 330 | if ((targetPeriod > currentPeriodOrFail)) | |
331 | 331 | then throwErr("invalid withdrawal request period") | |
332 | 332 | else { | |
333 | 333 | let priceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(targetPeriod)), wrapErr("invalid price")) | |
334 | 334 | let wavesAmount = if ((priceOrFail > 0)) | |
335 | 335 | then fraction(lpAssetAmount, priceOrFail, SCALE8) | |
336 | 336 | else 0 | |
337 | 337 | let assetsString = getStringValue(factoryAddressOrFail, keyPeriodWithdrawalAssetIds(currentPeriodOrFail)) | |
338 | 338 | let amountsString = getStringValue(factoryAddressOrFail, keyPeriodWithdrawalAmounts(currentPeriodOrFail)) | |
339 | 339 | $Tuple6(userAddress, lpAssetAmount, targetPeriod, wavesAmount, assetsString, amountsString) | |
340 | 340 | } | |
341 | 341 | } | |
342 | 342 | ||
343 | 343 | ||
344 | 344 | func claimCollateralREADONLYStringResponse (userAddressBytes,txId) = { | |
345 | 345 | let $t087798945 = claimCollateralINTERNAL(userAddressBytes, txId) | |
346 | 346 | let userAddress = $t087798945._1 | |
347 | 347 | let lpAssetAmount = $t087798945._2 | |
348 | 348 | let targetPeriod = $t087798945._3 | |
349 | 349 | let wavesAmount = $t087798945._4 | |
350 | 350 | let assetsString = $t087798945._5 | |
351 | 351 | let amountsString = $t087798945._6 | |
352 | 352 | let assets = makeString(removeByIndex(split_51C(assetsString, SEP), 0), ":") | |
353 | 353 | let amounts = makeString(removeByIndex(split_51C(amountsString, SEP), 0), ":") | |
354 | 354 | makeString(["%d%s%s", toString(wavesAmount), assets, amounts], SEP) | |
355 | 355 | } | |
356 | 356 | ||
357 | 357 | ||
358 | 358 | @Callable(i) | |
359 | 359 | func claimLP (userAddressBytes) = { | |
360 | 360 | let checkCaller = onlyFactory(i) | |
361 | 361 | if ((checkCaller == checkCaller)) | |
362 | 362 | then { | |
363 | 363 | let userAddress = Address(userAddressBytes) | |
364 | 364 | let available = valueOrElse(getInteger(factoryAddressOrFail, keyAvailable(userAddress)), 0) | |
365 | 365 | let claimed = valueOrElse(getInteger(factoryAddressOrFail, keyClaimed(userAddress)), 0) | |
366 | 366 | let factoryActions = if ((available > 0)) | |
367 | 367 | then [invoke(factoryAddressOrFail, "transferAsset", [userAddressBytes, available, lpAssetIdOrFail], nil), invoke(factoryAddressOrFail, "integerEntry", [keyAvailable(userAddress), 0], nil), invoke(factoryAddressOrFail, "integerEntry", [keyClaimed(userAddress), (claimed + available)], nil)] | |
368 | 368 | else throwErr("nothing to claim") | |
369 | 369 | $Tuple2(nil, factoryActions) | |
370 | 370 | } | |
371 | 371 | else throw("Strict value is not equal to itself.") | |
372 | 372 | } | |
373 | 373 | ||
374 | 374 | ||
375 | 375 | ||
376 | 376 | @Callable(i) | |
377 | 377 | func finalize (userAddressBytes,donationPartInWaves,lpPartInWaves,claimPartInWaves,powerStakePartInWaves) = { | |
378 | 378 | let checkCaller = onlyFactory(i) | |
379 | 379 | if ((checkCaller == checkCaller)) | |
380 | 380 | then { | |
381 | 381 | let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period")) | |
382 | 382 | let periodLength = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPeriodLength()), wrapErr("invalid period length")) | |
383 | 383 | let currentStartHeight = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyStartHeight(currentPeriodOrFail)), wrapErr("invalid start height")) | |
384 | 384 | let currentPriceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(currentPeriodOrFail)), wrapErr("invalid price")) | |
385 | 385 | let nextBlockToProcess = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyNextBlockToProcess()), wrapErr("invalid next block to process")) | |
386 | 386 | let periodEndHeight = ((currentStartHeight + periodLength) - 1) | |
387 | 387 | let checks = [if ((i.originCaller == mainTreasuryAddressOrFail)) | |
388 | 388 | then true | |
389 | 389 | else throwErr("permission denied"), if ((nextBlockToProcess > periodEndHeight)) | |
390 | 390 | then true | |
391 | 391 | else throwErr("unprocessed blocks"), if ((donationPartInWaves >= 0)) | |
392 | 392 | then true | |
393 | 393 | else throwErr("invalid donation part"), if ((lpPartInWaves >= 0)) | |
394 | 394 | then true | |
395 | 395 | else throwErr("invalid lp part"), if ((claimPartInWaves >= 0)) | |
396 | 396 | then true | |
397 | 397 | else throwErr("invalid claim part"), if ((powerStakePartInWaves >= 0)) | |
398 | 398 | then true | |
399 | 399 | else throwErr("invalid PWR stake part")] | |
400 | 400 | if ((checks == checks)) | |
401 | 401 | then { | |
402 | 402 | let $t01150211607 = calculatePrice(lpPartInWaves) | |
403 | 403 | let newPrice = $t01150211607._1 | |
404 | 404 | let lpAssetAmountToBurn = $t01150211607._2 | |
405 | 405 | let lpAssetFinalQuantity = $t01150211607._3 | |
406 | 406 | let newPeriod = (currentPeriodOrFail + 1) | |
407 | 407 | func addNewAction (actions,payment) = { | |
408 | 408 | let $t01175511817 = actions | |
409 | 409 | let scriptTransfers = $t01175511817._1 | |
410 | 410 | let assetIdsString = $t01175511817._2 | |
411 | 411 | let amountsString = $t01175511817._3 | |
412 | 412 | let paymentAmount = payment.amount | |
413 | 413 | let paymentAssetId = payment.assetId | |
414 | 414 | let newAssetIdsString = ("%s" + makeString([assetIdsString, assetIdToString(paymentAssetId)], SEP)) | |
415 | 415 | let newAmountsString = ("%d" + makeString([amountsString, toString(paymentAmount)], SEP)) | |
416 | 416 | let newScriptTransfer = ScriptTransfer(factoryAddressOrFail, paymentAmount, paymentAssetId) | |
417 | 417 | $Tuple3((scriptTransfers :+ newScriptTransfer), newAssetIdsString, newAmountsString) | |
418 | 418 | } | |
419 | 419 | ||
420 | 420 | let $t01227712368 = { | |
421 | 421 | let $l = i.payments | |
422 | 422 | let $s = size($l) | |
423 | 423 | let $acc0 = $Tuple3(nil, "", "") | |
424 | 424 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
425 | 425 | then $a | |
426 | 426 | else addNewAction($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 10") | |
431 | 431 | ||
432 | 432 | $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) | |
433 | 433 | } | |
434 | 434 | let scriptTransfers = $t01227712368._1 | |
435 | 435 | let AssetIds = $t01227712368._2 | |
436 | 436 | let Amounts = $t01227712368._3 | |
437 | 437 | let factoryActions = [invoke(factoryAddressOrFail, "integerEntry", [keyPowerManagerBonus(currentPeriodOrFail), powerStakePartInWaves], nil), invoke(factoryAddressOrFail, "integerEntry", [keyClaimWavesAmount(currentPeriodOrFail), claimPartInWaves], nil), invoke(factoryAddressOrFail, "integerEntry", [keyCurrentPeriod(), newPeriod], nil), invoke(factoryAddressOrFail, "integerEntry", [keyPriceForPeriod(newPeriod), newPrice], nil), invoke(factoryAddressOrFail, "integerEntry", [keyStartHeight(newPeriod), (periodEndHeight + 1)], nil), invoke(factoryAddressOrFail, "burn", [lpAssetAmountToBurn], nil), invoke(factoryAddressOrFail, "integerEntry", [keyWithdrawal(), 0], nil), invoke(factoryAddressOrFail, "integerEntry", [keyInvested(unit), lpPartInWaves], nil), invoke(factoryAddressOrFail, "integerEntry", [keyDonated(unit), donationPartInWaves], nil), invoke(factoryAddressOrFail, "stringEntry", [keyPeriodWithdrawalAssetIds(newPeriod), AssetIds], nil), invoke(factoryAddressOrFail, "stringEntry", [keyPeriodWithdrawalAmounts(newPeriod), Amounts], nil)] | |
438 | 438 | $Tuple2(scriptTransfers, factoryActions) | |
439 | 439 | } | |
440 | 440 | else throw("Strict value is not equal to itself.") | |
441 | 441 | } | |
442 | 442 | else throw("Strict value is not equal to itself.") | |
443 | 443 | } | |
444 | 444 | ||
445 | 445 | ||
446 | 446 | ||
447 | 447 | @Callable(i) | |
448 | 448 | func finalizeREADONLY (donationPartInWaves,lpPartInWaves,claimPartInWaves,powerStakePartInWaves) = { | |
449 | 449 | let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period")) | |
450 | 450 | let periodLength = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPeriodLength()), wrapErr("invalid period length")) | |
451 | 451 | let currentStartHeight = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyStartHeight(currentPeriodOrFail)), wrapErr("invalid start height")) | |
452 | 452 | let currentPriceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(currentPeriodOrFail)), wrapErr("invalid price")) | |
453 | 453 | let nextBlockToProcess = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyNextBlockToProcess()), wrapErr("invalid next block to process")) | |
454 | 454 | let periodEndHeight = ((currentStartHeight + periodLength) - 1) | |
455 | 455 | let checks = [if ((nextBlockToProcess > periodEndHeight)) | |
456 | 456 | then true | |
457 | 457 | else throwErr("unprocessed blocks"), if ((donationPartInWaves >= 0)) | |
458 | 458 | then true | |
459 | 459 | else throwErr("invalid donation part"), if ((lpPartInWaves >= 0)) | |
460 | 460 | then true | |
461 | 461 | else throwErr("invalid lp part"), if ((claimPartInWaves >= 0)) | |
462 | 462 | then true | |
463 | 463 | else throwErr("invalid claim part"), if ((powerStakePartInWaves >= 0)) | |
464 | 464 | then true | |
465 | 465 | else throwErr("invalid PWR stake part")] | |
466 | 466 | if ((checks == checks)) | |
467 | 467 | then { | |
468 | 468 | let $t01524715352 = calculatePrice(lpPartInWaves) | |
469 | 469 | let newPrice = $t01524715352._1 | |
470 | 470 | let lpAssetAmountToBurn = $t01524715352._2 | |
471 | 471 | let lpAssetFinalQuantity = $t01524715352._3 | |
472 | 472 | $Tuple2(nil, $Tuple6(claimPartInWaves, lpPartInWaves, donationPartInWaves, newPrice, lpAssetAmountToBurn, lpAssetFinalQuantity)) | |
473 | 473 | } | |
474 | 474 | else throw("Strict value is not equal to itself.") | |
475 | 475 | } | |
476 | 476 | ||
477 | 477 | ||
478 | 478 | ||
479 | 479 | @Callable(i) | |
480 | 480 | func invest (userAddressBytes) = { | |
481 | 481 | let checkCaller = onlyFactory(i) | |
482 | 482 | if ((checkCaller == checkCaller)) | |
483 | 483 | then { | |
484 | 484 | let userAddress = Address(userAddressBytes) | |
485 | 485 | let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period")) | |
486 | 486 | let currentStartHeight = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyStartHeight(currentPeriodOrFail)), wrapErr("invalid start height")) | |
487 | 487 | let investPeriodLength = getIntegerValue(factoryAddressOrFail, keyInvestPeriodLength()) | |
488 | 488 | let heightCheck = if (((currentStartHeight + investPeriodLength) > height)) | |
489 | 489 | then true | |
490 | 490 | else throwErr("too late to invest in this period") | |
491 | 491 | if ((heightCheck == heightCheck)) | |
492 | 492 | then { | |
493 | 493 | let currentPriceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(currentPeriodOrFail)), wrapErr("invalid price")) | |
494 | 494 | let payment = if ((size(i.payments) == 1)) | |
495 | 495 | then i.payments[0] | |
496 | 496 | else throwErr("invalid payments") | |
497 | 497 | let $t01646116638 = if (if ((payment.assetId == unit)) | |
498 | 498 | then (payment.amount > 0) | |
499 | 499 | else false) | |
500 | 500 | then $Tuple2(payment.amount, payment.assetId) | |
501 | 501 | else throwErr("invalid payment amount") | |
502 | 502 | let paymentAmount = $t01646116638._1 | |
503 | 503 | let paymentAssetId = $t01646116638._2 | |
504 | 504 | let treasuryPart = valueOrElse(getInteger(factoryAddressOrFail, keyBusinessTreasuryPart()), 0) | |
505 | 505 | let paymentsWithoutTreasuryPart = fraction(paymentAmount, (SCALE8 - treasuryPart), SCALE8) | |
506 | 506 | let lpAssetAmount = if ((currentPriceOrFail > 0)) | |
507 | 507 | then fraction(paymentsWithoutTreasuryPart, SCALE8, currentPriceOrFail) | |
508 | 508 | else 0 | |
509 | 509 | let invested = valueOrElse(getInteger(factoryAddressOrFail, keyInvested(unit)), 0) | |
510 | 510 | let actions = [ScriptTransfer(mainTreasuryAddressOrFail, paymentsWithoutTreasuryPart, paymentAssetId), ScriptTransfer(businessTreasuryAddressOrFail, treasuryPart, paymentAssetId)] | |
511 | 511 | let factoryActions = [invoke(factoryAddressOrFail, "integerEntry", [keyInvested(unit), (invested + paymentsWithoutTreasuryPart)], nil), invoke(factoryAddressOrFail, "reissue", [lpAssetAmount], nil), invoke(factoryAddressOrFail, "transferAsset", [userAddressBytes, lpAssetAmount, lpAssetIdOrFail], nil)] | |
512 | 512 | $Tuple2(actions, factoryActions) | |
513 | 513 | } | |
514 | 514 | else throw("Strict value is not equal to itself.") | |
515 | 515 | } | |
516 | 516 | else throw("Strict value is not equal to itself.") | |
517 | 517 | } | |
518 | 518 | ||
519 | 519 | ||
520 | 520 | ||
521 | 521 | @Callable(i) | |
522 | 522 | func withdraw (userAddressBytes) = { | |
523 | 523 | let checkCaller = onlyFactory(i) | |
524 | 524 | if ((checkCaller == checkCaller)) | |
525 | 525 | then { | |
526 | 526 | let userAddress = Address(userAddressBytes) | |
527 | 527 | let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period")) | |
528 | 528 | let payment = if ((size(i.payments) == 1)) | |
529 | 529 | then i.payments[0] | |
530 | 530 | else throwErr(wrapErr("invalid payments")) | |
531 | 531 | let paymentAssetId = if ((payment.assetId == lpAssetIdOrFail)) | |
532 | 532 | then lpAssetIdOrFail | |
533 | 533 | else throwErr("invalid payment asset") | |
534 | 534 | let paymentAmount = if ((payment.amount > 0)) | |
535 | 535 | then payment.amount | |
536 | 536 | else throwErr("invalid payment amount") | |
537 | 537 | let withdrawal = valueOrElse(getInteger(factoryAddressOrFail, keyWithdrawal()), 0) | |
538 | 538 | let actions = [ScriptTransfer(factoryAddressOrFail, paymentAmount, paymentAssetId)] | |
539 | 539 | let factoryActions = [invoke(factoryAddressOrFail, "integerEntry", [keyWithdrawal(), (withdrawal + paymentAmount)], nil), invoke(factoryAddressOrFail, "stringEntry", [keyWithdrawalRequest(userAddress, i.transactionId), valueWithdrawalRequest(PENDING, paymentAmount, (currentPeriodOrFail + 1), unit)], nil)] | |
540 | 540 | if ((factoryActions == factoryActions)) | |
541 | 541 | then $Tuple2(actions, factoryActions) | |
542 | 542 | else throw("Strict value is not equal to itself.") | |
543 | 543 | } | |
544 | 544 | else throw("Strict value is not equal to itself.") | |
545 | 545 | } | |
546 | 546 | ||
547 | 547 | ||
548 | 548 | ||
549 | 549 | @Callable(i) | |
550 | 550 | func cancelWithdraw (userAddressBytes,txId) = { | |
551 | 551 | let checkCaller = onlyFactory(i) | |
552 | 552 | if ((checkCaller == checkCaller)) | |
553 | 553 | then { | |
554 | 554 | let userAddress = Address(userAddressBytes) | |
555 | 555 | let withdrawalRequestOption = valueOrErrorMessage(getString(factoryAddressOrFail, keyWithdrawalRequest(userAddress, txId)), wrapErr("invalid withdrawal request")) | |
556 | 556 | let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period")) | |
557 | 557 | let $t01937219485 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption) | |
558 | 558 | let status = $t01937219485._1 | |
559 | 559 | let lpAssetAmount = $t01937219485._2 | |
560 | 560 | let targetPeriod = $t01937219485._3 | |
561 | 561 | let claimTxId = $t01937219485._4 | |
562 | 562 | let checks = [if ((status == PENDING)) | |
563 | 563 | then true | |
564 | 564 | else throwErr("invalid withdrawal request status"), if ((targetPeriod > currentPeriodOrFail)) | |
565 | 565 | then true | |
566 | 566 | else throwErr("invalid withdrawal request period")] | |
567 | 567 | if ((checks == checks)) | |
568 | 568 | then { | |
569 | 569 | let withdrawal = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyWithdrawal()), wrapErr("invalid total withdrawal amount")) | |
570 | 570 | let factoryActions = [invoke(factoryAddressOrFail, "integerEntry", [keyWithdrawal(), if ((withdrawal >= lpAssetAmount)) | |
571 | 571 | then (withdrawal - lpAssetAmount) | |
572 | 572 | else throwErr("invalid withdrawal amount")], nil), invoke(factoryAddressOrFail, "deleteEntry", [keyWithdrawalRequest(userAddress, txId)], nil), invoke(factoryAddressOrFail, "transferAsset", [userAddressBytes, lpAssetAmount, lpAssetIdOrFail], nil)] | |
573 | 573 | if ((factoryActions == factoryActions)) | |
574 | 574 | then $Tuple2(nil, factoryActions) | |
575 | 575 | else throw("Strict value is not equal to itself.") | |
576 | 576 | } | |
577 | 577 | else throw("Strict value is not equal to itself.") | |
578 | 578 | } | |
579 | 579 | else throw("Strict value is not equal to itself.") | |
580 | 580 | } | |
581 | 581 | ||
582 | 582 | ||
583 | 583 | ||
584 | 584 | @Callable(i) | |
585 | 585 | func claimCollateral (userAddressBytes,txId) = { | |
586 | 586 | let checkCaller = onlyFactory(i) | |
587 | 587 | if ((checkCaller == checkCaller)) | |
588 | 588 | then { | |
589 | 589 | let $t02047120656 = claimCollateralINTERNAL(userAddressBytes, fromBase58String(txId)) | |
590 | 590 | let userAddress = $t02047120656._1 | |
591 | 591 | let lpAssetAmount = $t02047120656._2 | |
592 | 592 | let targetPeriod = $t02047120656._3 | |
593 | 593 | let wavesAmount = $t02047120656._4 | |
594 | 594 | let assetsString = $t02047120656._5 | |
595 | 595 | let amountsString = $t02047120656._6 | |
596 | 596 | let assetsList = removeByIndex(split_51C(assetsString, SEP), 0) | |
597 | 597 | let amountsList = removeByIndex(split_51C(amountsString, SEP), 0) | |
598 | 598 | let factoryActions = [invoke(factoryAddressOrFail, "deleteEntry", [keyWithdrawalRequest(userAddress, fromBase58String(txId))], nil), invoke(factoryAddressOrFail, "integerEntry", [keyWithdrawalHistory(userAddress, fromBase58String(txId)), lpAssetAmount], nil), invoke(factoryAddressOrFail, "transferAssets", [userAddressBytes, assetsList, amountsList], nil)] | |
599 | 599 | $Tuple2(nil, factoryActions) | |
600 | 600 | } | |
601 | 601 | else throw("Strict value is not equal to itself.") | |
602 | 602 | } | |
603 | 603 | ||
604 | 604 | ||
605 | 605 | ||
606 | 606 | @Callable(i) | |
607 | 607 | func claimCollateralBulk (userAddressBytes,txIds) = { | |
608 | 608 | let checkCaller = onlyFactory(i) | |
609 | 609 | if ((checkCaller == checkCaller)) | |
610 | 610 | then { | |
611 | 611 | func addNewAction (state,txId) = { | |
612 | 612 | let $t02141421613 = claimCollateralINTERNAL(userAddressBytes, fromBase58String(txId)) | |
613 | 613 | let userAddress = $t02141421613._1 | |
614 | 614 | let lpAssetAmount = $t02141421613._2 | |
615 | 615 | let targetPeriod = $t02141421613._3 | |
616 | 616 | let wavesAmount = $t02141421613._4 | |
617 | 617 | let assetsString = $t02141421613._5 | |
618 | 618 | let amountsString = $t02141421613._6 | |
619 | 619 | let assetsList = removeByIndex(split_51C(assetsString, SEP), 0) | |
620 | 620 | let amountsList = removeByIndex(split_51C(amountsString, SEP), 0) | |
621 | 621 | let newActions = [invoke(factoryAddressOrFail, "deleteEntry", [keyWithdrawalRequest(userAddress, fromBase58String(txId))], nil), invoke(factoryAddressOrFail, "integerEntry", [keyWithdrawalHistory(userAddress, fromBase58String(txId)), lpAssetAmount], nil), invoke(factoryAddressOrFail, "transferAssets", [userAddressBytes, assetsList, amountsList], nil)] | |
622 | 622 | (state ++ newActions) | |
623 | 623 | } | |
624 | 624 | ||
625 | 625 | let allFactoryActions = { | |
626 | 626 | let $l = txIds | |
627 | 627 | let $s = size($l) | |
628 | 628 | let $acc0 = nil | |
629 | 629 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
630 | 630 | then $a | |
631 | 631 | else addNewAction($a, $l[$i]) | |
632 | 632 | ||
633 | 633 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
634 | 634 | then $a | |
635 | 635 | else throw("List size exceeds 10") | |
636 | 636 | ||
637 | 637 | $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) | |
638 | 638 | } | |
639 | 639 | $Tuple2(nil, allFactoryActions) | |
640 | 640 | } | |
641 | 641 | else throw("Strict value is not equal to itself.") | |
642 | 642 | } | |
643 | 643 | ||
644 | 644 | ||
645 | 645 | ||
646 | 646 | @Callable(i) | |
647 | 647 | func claimCollateralREADONLY (userAddressBytes,txId) = { | |
648 | 648 | let response = claimCollateralREADONLYStringResponse(userAddressBytes, fromBase58String(txId)) | |
649 | 649 | $Tuple2(nil, response) | |
650 | 650 | } | |
651 | 651 | ||
652 | 652 | ||
653 | 653 | ||
654 | 654 | @Callable(i) | |
655 | 655 | func claimCollateralBulkREADONLY (userAddressBytes,txIds) = { | |
656 | 656 | func processTxId (state,txId) = { | |
657 | 657 | let response = claimCollateralREADONLYStringResponse(userAddressBytes, fromBase58String(txId)) | |
658 | 658 | (state :+ response) | |
659 | 659 | } | |
660 | 660 | ||
661 | 661 | let allResponses = { | |
662 | 662 | let $l = txIds | |
663 | 663 | let $s = size($l) | |
664 | 664 | let $acc0 = nil | |
665 | 665 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
666 | 666 | then $a | |
667 | 667 | else processTxId($a, $l[$i]) | |
668 | 668 | ||
669 | 669 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
670 | 670 | then $a | |
671 | 671 | else throw("List size exceeds 10") | |
672 | 672 | ||
673 | 673 | $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) | |
674 | 674 | } | |
675 | 675 | $Tuple2(nil, allResponses) | |
676 | 676 | } | |
677 | 677 | ||
678 | 678 | ||
679 | 679 | ||
680 | 680 | @Callable(i) | |
681 | 681 | func processBlocks (userAddressBytes) = { | |
682 | 682 | let checkCaller = onlyFactory(i) | |
683 | 683 | if ((checkCaller == checkCaller)) | |
684 | 684 | then { | |
685 | 685 | let userAddress = Address(userAddressBytes) | |
686 | 686 | let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period")) | |
687 | 687 | let periodLength = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPeriodLength()), wrapErr("invalid period length")) | |
688 | 688 | let currentStartHeight = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyStartHeight(currentPeriodOrFail)), wrapErr("invalid start height")) | |
689 | 689 | let currentPriceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(currentPeriodOrFail)), wrapErr("invalid price")) | |
690 | 690 | let nextBlockToProcess = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyNextBlockToProcess()), wrapErr("invalid next block to process")) | |
691 | 691 | let periodEndHeight = ((currentStartHeight + periodLength) - 1) | |
692 | 692 | let blocksProcessingBatchSizeMax = 20 | |
693 | 693 | let blocksProcessingBatchSize = if (if (if ((height >= nextBlockToProcess)) | |
694 | 694 | then if ((nextBlockToProcess >= currentStartHeight)) | |
695 | 695 | then true | |
696 | 696 | else (currentPeriodOrFail == 0) | |
697 | 697 | else false) | |
698 | 698 | then (periodEndHeight >= nextBlockToProcess) | |
699 | 699 | else false) | |
700 | 700 | then min([((periodEndHeight - nextBlockToProcess) + 1), blocksProcessingBatchSizeMax]) | |
701 | 701 | else throwErr(wrapErr("invalid target block")) | |
702 | 702 | let blockProcessingReward = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyBlockProcessingReward()), wrapErr("invalid block processing reward")) | |
703 | 703 | let blockProcessingRewardByGenerator = (blockProcessingReward / blocksProcessingBatchSize) | |
704 | 704 | let blockProcessingRewardByGeneratorRemainder = (blockProcessingReward - (blockProcessingRewardByGenerator * blocksProcessingBatchSize)) | |
705 | 705 | func map (acc,inc) = if ((inc >= blocksProcessingBatchSize)) | |
706 | 706 | then acc | |
707 | 707 | else { | |
708 | 708 | let targetBlockHeight = (nextBlockToProcess + inc) | |
709 | 709 | let targetBlockInfo = valueOrErrorMessage(blockInfoByHeight(targetBlockHeight), wrapErr("invalid block info")) | |
710 | 710 | let treasuryRewardOrFail = valueOrErrorMessage(rewardForOption(targetBlockInfo.rewards, proxyTreasuryAddressOrFail), wrapErr(("invalid treasury reward for height " + toString(targetBlockHeight)))) | |
711 | 711 | let generator = targetBlockInfo.generator | |
712 | 712 | let available = valueOrElse(getInteger(factoryAddressOrFail, keyAvailable(generator)), 0) | |
713 | 713 | let callerReward = if ((inc == (blocksProcessingBatchSize - 1))) | |
714 | 714 | then (blockProcessingRewardByGenerator + blockProcessingRewardByGeneratorRemainder) | |
715 | 715 | else blockProcessingRewardByGenerator | |
716 | 716 | let powerShareRatio = max([0, min([valueOrElse(getInteger(factoryAddressOrFail, keyPowerShareRatio()), 0), SCALE8])]) | |
717 | 717 | let shareAmountToPower = fraction((treasuryRewardOrFail - callerReward), powerShareRatio, SCALE8) | |
718 | 718 | let lpAssetAmount = if ((currentPriceOrFail > 0)) | |
719 | 719 | then fraction(((treasuryRewardOrFail - callerReward) - shareAmountToPower), SCALE8, currentPriceOrFail) | |
720 | 720 | else 0 | |
721 | 721 | let factoryActionsSingle = [invoke(factoryAddressOrFail, "stringEntry", [keyBlockProcessed(targetBlockHeight), makeString([toBase58String(i.transactionId), toString(currentPeriodOrFail), toString(generator), toBase58String(userAddressBytes), toString(treasuryRewardOrFail), toString(callerReward), toString(lpAssetAmount), toString(shareAmountToPower)], SEP)], nil), invoke(factoryAddressOrFail, "integerEntry", [keyAvailable(generator), (available + lpAssetAmount)], nil)] | |
722 | 722 | if ((factoryActionsSingle == factoryActionsSingle)) | |
723 | 723 | then { | |
724 | 724 | let $t02670426758 = acc | |
725 | 725 | let lpAssetAcc = $t02670426758._1 | |
726 | 726 | let rewardAcc = $t02670426758._2 | |
727 | 727 | let powerShareDataTuple = $t02670426758._3 | |
728 | 728 | let $t02676526831 = powerShareDataTuple | |
729 | 729 | let powerShareAcc = $t02676526831._1 | |
730 | 730 | let generatorPowerShareList = $t02676526831._2 | |
731 | 731 | let newGeneratorPowerShareList = (generatorPowerShareList :+ $Tuple2(toString(generator), shareAmountToPower)) | |
732 | 732 | $Tuple3((lpAssetAcc + lpAssetAmount), (rewardAcc + treasuryRewardOrFail), $Tuple2((powerShareAcc + shareAmountToPower), newGeneratorPowerShareList)) | |
733 | 733 | } | |
734 | 734 | else throw("Strict value is not equal to itself.") | |
735 | 735 | } | |
736 | 736 | ||
737 | 737 | let list = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] | |
738 | 738 | let $t02718627292 = { | |
739 | 739 | let $l = list | |
740 | 740 | let $s = size($l) | |
741 | 741 | let $acc0 = $Tuple3(0, 0, $Tuple2(0, nil)) | |
742 | 742 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
743 | 743 | then $a | |
744 | 744 | else map($a, $l[$i]) | |
745 | 745 | ||
746 | 746 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
747 | 747 | then $a | |
748 | 748 | else throw("List size exceeds 20") | |
749 | 749 | ||
750 | 750 | $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
751 | 751 | } | |
752 | 752 | if (($t02718627292 == $t02718627292)) | |
753 | 753 | then { | |
754 | 754 | let powerShareDataTuple = $t02718627292._3 | |
755 | 755 | let rewardAmountTotal = $t02718627292._2 | |
756 | 756 | let lpAssetAmountTotal = $t02718627292._1 | |
757 | 757 | let $t02729627365 = powerShareDataTuple | |
758 | 758 | let amountToPowerTotal = $t02729627365._1 | |
759 | 759 | let powerShareAmountsList = $t02729627365._2 | |
760 | 760 | let businessTreasuryPart = valueOrElse(getInteger(factoryAddressOrFail, keyBusinessTreasuryPart()), 0) | |
761 | 761 | let rewardToBusinessTreasuryAmount = fraction(rewardAmountTotal, businessTreasuryPart, SCALE8) | |
762 | 762 | let rewardToMainTreasuryAmount = (((rewardAmountTotal - rewardToBusinessTreasuryAmount) - blockProcessingReward) - amountToPowerTotal) | |
763 | 763 | let invested = valueOrElse(getInteger(factoryAddressOrFail, keyInvested(unit)), 0) | |
764 | 764 | let powerShareActions = if ((amountToPowerTotal > 0)) | |
765 | 765 | then { | |
766 | 766 | let transferAction = [invoke(factoryAddressOrFail, "transferFromProxyTreasury", [factoryAddressOrFail.bytes, amountToPowerTotal], nil)] | |
767 | 767 | if ((transferAction == transferAction)) | |
768 | 768 | then { | |
769 | - | let totalPowerAmount = invoke(factoryAddressOrFail, "swap", [powerAssetIdStringOrFail, | |
769 | + | let totalPowerAmount = invoke(factoryAddressOrFail, "swap", [powerAssetIdStringOrFail, WAVES, amountToPowerTotal], nil) | |
770 | 770 | if ((totalPowerAmount == totalPowerAmount)) | |
771 | 771 | then { | |
772 | 772 | let totalPowerAmountInt = match totalPowerAmount { | |
773 | 773 | case pAmount: Int => | |
774 | 774 | pAmount | |
775 | 775 | case _ => | |
776 | 776 | 0 | |
777 | 777 | } | |
778 | 778 | func stakePowerInvoke (acc,next) = { | |
779 | - | let $ | |
780 | - | let generator = $ | |
781 | - | let shareAmount = $ | |
779 | + | let $t02844128476 = next | |
780 | + | let generator = $t02844128476._1 | |
781 | + | let shareAmount = $t02844128476._2 | |
782 | 782 | if ((amountToPowerTotal > 0)) | |
783 | 783 | then { | |
784 | 784 | let powerAmount = fraction(shareAmount, totalPowerAmountInt, amountToPowerTotal) | |
785 | 785 | let inv = invoke(factoryAddressOrFail, "powerStake", [fromBase58String(generator), fromBase58String(powerAssetIdStringOrFail), powerAmount], nil) | |
786 | 786 | if ((inv == inv)) | |
787 | 787 | then nil | |
788 | 788 | else throw("Strict value is not equal to itself.") | |
789 | 789 | } | |
790 | 790 | else nil | |
791 | 791 | } | |
792 | 792 | ||
793 | 793 | let powerStakesActions = { | |
794 | 794 | let $l = powerShareAmountsList | |
795 | 795 | let $s = size($l) | |
796 | 796 | let $acc0 = 0 | |
797 | 797 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
798 | 798 | then $a | |
799 | 799 | else stakePowerInvoke($a, $l[$i]) | |
800 | 800 | ||
801 | 801 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
802 | 802 | then $a | |
803 | 803 | else throw("List size exceeds 20") | |
804 | 804 | ||
805 | 805 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
806 | 806 | } | |
807 | 807 | if ((powerStakesActions == powerStakesActions)) | |
808 | 808 | then nil | |
809 | 809 | else throw("Strict value is not equal to itself.") | |
810 | 810 | } | |
811 | 811 | else throw("Strict value is not equal to itself.") | |
812 | 812 | } | |
813 | 813 | else throw("Strict value is not equal to itself.") | |
814 | 814 | } | |
815 | 815 | else nil | |
816 | 816 | if ((powerShareActions == powerShareActions)) | |
817 | 817 | then { | |
818 | 818 | let actions = [invoke(factoryAddressOrFail, "reissue", [lpAssetAmountTotal], nil), invoke(factoryAddressOrFail, "integerEntry", [keyNextBlockToProcess(), (nextBlockToProcess + blocksProcessingBatchSize)], nil), invoke(factoryAddressOrFail, "transferFromProxyTreasury", [mainTreasuryAddressOrFail.bytes, rewardToMainTreasuryAmount], nil), invoke(factoryAddressOrFail, "transferFromProxyTreasury", [userAddressBytes, blockProcessingReward], nil), invoke(factoryAddressOrFail, "transferFromProxyTreasury", [businessTreasuryAddressOrFail.bytes, rewardToBusinessTreasuryAmount], nil), invoke(factoryAddressOrFail, "integerEntry", [keyInvested(unit), (invested + rewardToMainTreasuryAmount)], nil)] | |
819 | 819 | if ((actions == actions)) | |
820 | 820 | then $Tuple2(nil, unit) | |
821 | 821 | else throw("Strict value is not equal to itself.") | |
822 | 822 | } | |
823 | 823 | else throw("Strict value is not equal to itself.") | |
824 | 824 | } | |
825 | 825 | else throw("Strict value is not equal to itself.") | |
826 | 826 | } | |
827 | 827 | else throw("Strict value is not equal to itself.") | |
828 | 828 | } | |
829 | 829 | ||
830 | 830 | ||
831 | 831 | @Verifier(tx) | |
832 | 832 | func verify () = { | |
833 | 833 | let publicKey = match getManagerPublicKeyOrUnit() { | |
834 | 834 | case pub: ByteVector => | |
835 | 835 | pub | |
836 | 836 | case _ => | |
837 | 837 | tx.senderPublicKey | |
838 | 838 | } | |
839 | 839 | sigVerify(tx.bodyBytes, tx.proofs[0], publicKey) | |
840 | 840 | } | |
841 | 841 |
github/deemru/w8io/169f3d6 83.25 ms ◑