tx · CJCqnd2oqcuRURtrirJd3wExyzCauSTqZ9WuFDxSgxGy 3N6HSS7Toat1RhyEsyqVGgVSRzH19W1FTbP: -0.03300000 Waves 2023.08.08 17:28 [2701735] smart account 3N6HSS7Toat1RhyEsyqVGgVSRzH19W1FTbP > SELF 0.00000000 Waves
{ "type": 13, "id": "CJCqnd2oqcuRURtrirJd3wExyzCauSTqZ9WuFDxSgxGy", "fee": 3300000, "feeAssetId": null, "timestamp": 1691504986410, "version": 2, "chainId": 84, "sender": "3N6HSS7Toat1RhyEsyqVGgVSRzH19W1FTbP", "senderPublicKey": "AoKo4segKHU4DeJnxXQYJj2u7J6XJeux6r8KLW52cd2Q", "proofs": [ "kuDGunigPQFRzNsceN4DDodP6pQBK4M12NLeHcAVgiX1YNQ53Gi5QWxhAVa4y5A6Lby6B5ypRo7kimCwChqGYAF" ], "script": "base64:BwJDCAISAwoBAhIGCgQCAQEBEgUKAwEBARIDCgECEgMKAQISBAoCAgISBAoCAggSBAoCAhgSBAoCAggSBAoCAhgSAwoBAjUAA1NFUAICX18ADUNPTlRSQUNUX05BTUUCD2NhbGN1bGF0b3IucmlkZQAGU0NBTEU4AIDC1y8AB1BFTkRJTkcCB1BFTkRJTkcABVdBVkVTAgVXQVZFUwEHd3JhcEVycgEBcwkArAICCQCsAgIFDUNPTlRSQUNUX05BTUUCAjogBQFzAQh0aHJvd0VycgEBcwkAAgEJAQd3cmFwRXJyAQUBcwEPYXNzZXRJZFRvU3RyaW5nAQdhc3NldElkBAckbWF0Y2gwBQdhc3NldElkAwkAAQIFByRtYXRjaDACCkJ5dGVWZWN0b3IEAWIFByRtYXRjaDAJANgEAQUBYgMJAAECBQckbWF0Y2gwAgRVbml0BQVXQVZFUwkAAgECC01hdGNoIGVycm9yAQ9zdHJpbmdUb0Fzc2V0SWQBAXMDCQAAAgUBcwUFV0FWRVMFBHVuaXQJANkEAQUBcwEDYWJzAQFuAwkAZgIAAAUBbgkBAS0BBQFuBQFuARFrZXlGYWN0b3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next: GEimRHwKJoyZKiLey5tfCVDAAY4FPbAPPUxrTsbRktnA Diff:
Old | New | Differences | |
---|---|---|---|
571 | 571 | let checkCaller = onlyFactory(i) | |
572 | 572 | if ((checkCaller == checkCaller)) | |
573 | 573 | then { | |
574 | - | let $ | |
575 | - | let userAddress = $ | |
576 | - | let lpAssetAmount = $ | |
577 | - | let targetPeriod = $ | |
578 | - | let wavesAmount = $ | |
579 | - | let assetsString = $ | |
580 | - | let amountsString = $ | |
574 | + | let $t02163421836 = claimCollateralINTERNAL(userAddressBytes, fromBase58String(txId), i.transactionId) | |
575 | + | let userAddress = $t02163421836._1 | |
576 | + | let lpAssetAmount = $t02163421836._2 | |
577 | + | let targetPeriod = $t02163421836._3 | |
578 | + | let wavesAmount = $t02163421836._4 | |
579 | + | let assetsString = $t02163421836._5 | |
580 | + | let amountsString = $t02163421836._6 | |
581 | 581 | let assetsList = removeByIndex(split_51C(assetsString, SEP), 0) | |
582 | 582 | let amountsList = removeByIndex(split_51C(amountsString, SEP), 0) | |
583 | - | let factoryActions = [invoke(factoryAddressOrFail, "deleteEntry", [keyWithdrawalRequest(userAddress, txId)], nil), invoke(factoryAddressOrFail, "integerEntry", [keyWithdrawalHistory(userAddress, txId), lpAssetAmount], nil), invoke(factoryAddressOrFail, "transferAssets", [userAddressBytes, assetsList, amountsList], nil)] | |
583 | + | 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)] | |
584 | 584 | $Tuple2(nil, factoryActions) | |
585 | 585 | } | |
586 | 586 | else throw("Strict value is not equal to itself.") | |
594 | 594 | if ((checkCaller == checkCaller)) | |
595 | 595 | then { | |
596 | 596 | func addNewAction (state,txId) = { | |
597 | - | let $ | |
598 | - | let userAddress = $ | |
599 | - | let lpAssetAmount = $ | |
600 | - | let targetPeriod = $ | |
601 | - | let wavesAmount = $ | |
602 | - | let assetsString = $ | |
603 | - | let amountsString = $ | |
597 | + | let $t02259422810 = claimCollateralINTERNAL(userAddressBytes, fromBase58String(txId), i.transactionId) | |
598 | + | let userAddress = $t02259422810._1 | |
599 | + | let lpAssetAmount = $t02259422810._2 | |
600 | + | let targetPeriod = $t02259422810._3 | |
601 | + | let wavesAmount = $t02259422810._4 | |
602 | + | let assetsString = $t02259422810._5 | |
603 | + | let amountsString = $t02259422810._6 | |
604 | 604 | let assetsList = removeByIndex(split_51C(assetsString, SEP), 0) | |
605 | 605 | let amountsList = removeByIndex(split_51C(amountsString, SEP), 0) | |
606 | - | let newActions = [invoke(factoryAddressOrFail, "deleteEntry", [keyWithdrawalRequest(userAddress, txId)], nil), invoke(factoryAddressOrFail, "integerEntry", [keyWithdrawalHistory(userAddress, txId), lpAssetAmount], nil), invoke(factoryAddressOrFail, "transferAssets", [userAddressBytes, assetsList, amountsList], nil)] | |
606 | + | 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)] | |
607 | 607 | (state ++ newActions) | |
608 | 608 | } | |
609 | 609 | ||
630 | 630 | ||
631 | 631 | @Callable(i) | |
632 | 632 | func claimCollateralREADONLY (userAddressBytes,txId) = { | |
633 | - | let response = claimCollateralREADONLYStringResponse(userAddressBytes, txId, i.transactionId) | |
633 | + | let response = claimCollateralREADONLYStringResponse(userAddressBytes, fromBase58String(txId), i.transactionId) | |
634 | 634 | $Tuple2(nil, response) | |
635 | 635 | } | |
636 | 636 | ||
639 | 639 | @Callable(i) | |
640 | 640 | func claimCollateralBulkREADONLY (userAddressBytes,txIds) = { | |
641 | 641 | func processTxId (state,txId) = { | |
642 | - | let response = claimCollateralREADONLYStringResponse(userAddressBytes, txId, i.transactionId) | |
642 | + | let response = claimCollateralREADONLYStringResponse(userAddressBytes, fromBase58String(txId), i.transactionId) | |
643 | 643 | (state :+ response) | |
644 | 644 | } | |
645 | 645 | ||
704 | 704 | let factoryActionsSingle = [invoke(factoryAddressOrFail, "stringEntry", [keyBlockProcessed(targetBlockHeight), makeString([toBase58String(i.transactionId), toString(currentPeriodOrFail), toString(generator), toBase58String(userAddressBytes), toString(treasuryRewardOrFail), toString(callerReward), toString(lpAssetAmount)], SEP)], nil), invoke(factoryAddressOrFail, "integerEntry", [keyAvailable(generator), (available + lpAssetAmount)], nil)] | |
705 | 705 | if ((factoryActionsSingle == factoryActionsSingle)) | |
706 | 706 | then { | |
707 | - | let $ | |
708 | - | let lpAssetAcc = $ | |
709 | - | let rewardAcc = $ | |
707 | + | let $t02754827581 = acc | |
708 | + | let lpAssetAcc = $t02754827581._1 | |
709 | + | let rewardAcc = $t02754827581._2 | |
710 | 710 | $Tuple2((lpAssetAcc + lpAssetAmount), (rewardAcc + treasuryRewardOrFail)) | |
711 | 711 | } | |
712 | 712 | else throw("Strict value is not equal to itself.") | |
713 | 713 | } | |
714 | 714 | ||
715 | 715 | let list = [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, 31, 32, 33, 34, 35, 36, 37, 38, 39] | |
716 | - | let $ | |
716 | + | let $t02784827924 = { | |
717 | 717 | let $l = list | |
718 | 718 | let $s = size($l) | |
719 | 719 | let $acc0 = $Tuple2(0, 0) | |
727 | 727 | ||
728 | 728 | $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($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), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40) | |
729 | 729 | } | |
730 | - | if (($ | |
730 | + | if (($t02784827924 == $t02784827924)) | |
731 | 731 | then { | |
732 | - | let rewardAmountTotal = $ | |
733 | - | let lpAssetAmountTotal = $ | |
732 | + | let rewardAmountTotal = $t02784827924._2 | |
733 | + | let lpAssetAmountTotal = $t02784827924._1 | |
734 | 734 | let businessTreasuryPart = valueOrElse(getInteger(factoryAddressOrFail, keyBusinessTreasuryPart()), 0) | |
735 | 735 | let rewardToBusinessTreasuryAmount = fraction(rewardAmountTotal, businessTreasuryPart, SCALE8) | |
736 | 736 | let rewardToMainTreasuryAmount = ((rewardAmountTotal - rewardToBusinessTreasuryAmount) - blockProcessingReward) |
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 keyInvested (assetId) = makeString(["%s%s", "invested", assetIdToString(assetId)], SEP) | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func keyDonated (assetId) = makeString(["%s%s", "donated", assetIdToString(assetId)], SEP) | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func keyAvailable (userAddress) = makeString(["%s%s", "available", toString(userAddress)], SEP) | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func keyClaimed (userAddress) = makeString(["%s%s", "claimed", toString(userAddress)], SEP) | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func keyCurrentPeriod () = makeString(["%s", "currentPeriod"], SEP) | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func keyPriceForPeriod (period) = makeString(["%s%d", "price", toString(period)], SEP) | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func keyStartHeight (period) = makeString(["%s%d", "startHeight", toString(period)], SEP) | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func keyPowerManagerBonus (period) = makeString(["%s%d", "powerManagerBonus", toString(period)], SEP) | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func keyPeriodLength () = "%s__periodLength" | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func keyBlockProcessingReward () = "%s__blockProcessingReward" | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func keyNextBlockToProcess () = "%s__nextBlockToProcess" | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func keyBlockProcessed (height) = makeString(["%s%d", "blockProcessed", toString(height)], SEP) | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func keyWithdrawal () = "%s__withdrawal" | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func keyWithdrawalRequest (userAddress,txId) = makeString(["%s%s%s", "withdrawal", toString(userAddress), toBase58String(txId)], SEP) | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func valueWithdrawalRequest (status,lpAssetAmount,targetPeriod,claimTxId) = { | |
104 | 104 | let claimTxIdStr = match claimTxId { | |
105 | 105 | case b: ByteVector => | |
106 | 106 | toBase58String(b) | |
107 | 107 | case _: Unit => | |
108 | 108 | "SOON" | |
109 | 109 | case _ => | |
110 | 110 | throw("Match error") | |
111 | 111 | } | |
112 | 112 | makeString(["%s%d%d%s", status, toString(lpAssetAmount), toString(targetPeriod), claimTxIdStr], SEP) | |
113 | 113 | } | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func keyWithdrawalHistory (userAddress,txId) = makeString(["%s%s%s", "withdrawalHistory", toString(userAddress), toBase58String(txId)], SEP) | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func keyPeriodWithdrawalAssetIds (period) = makeString(["%s%d", "periodReward", toString(period)], SEP) | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func keyPeriodWithdrawalAmounts (period) = makeString(["%s%d", "periodRewardAmount", toString(period)], SEP) | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func parseWithdrawalRequestValueOrFail (s) = { | |
126 | 126 | let parts = split(s, SEP) | |
127 | 127 | if ((size(parts) == 5)) | |
128 | 128 | then { | |
129 | 129 | let status = parts[1] | |
130 | 130 | let lpAssetAmount = valueOrErrorMessage(parseInt(parts[2]), wrapErr("invalid lpAssetAmount")) | |
131 | 131 | let targetPeriod = valueOrErrorMessage(parseInt(parts[3]), wrapErr("invalid targetPeriod")) | |
132 | 132 | let claimTxId = parts[4] | |
133 | 133 | $Tuple4(status, lpAssetAmount, targetPeriod, claimTxId) | |
134 | 134 | } | |
135 | 135 | else throwErr("invalid withdrawal request value") | |
136 | 136 | } | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | let factoryAddressOption = match getString(this, keyFactoryAddress()) { | |
140 | 140 | case s: String => | |
141 | 141 | addressFromString(s) | |
142 | 142 | case _: Unit => | |
143 | 143 | unit | |
144 | 144 | case _ => | |
145 | 145 | throw("Match error") | |
146 | 146 | } | |
147 | 147 | ||
148 | 148 | let factoryAddressOrFail = valueOrErrorMessage(factoryAddressOption, wrapErr("invalid factory address")) | |
149 | 149 | ||
150 | 150 | let lpAssetIdOption = match factoryAddressOption { | |
151 | 151 | case a: Address => | |
152 | 152 | match getString(a, keyLpAssetId()) { | |
153 | 153 | case s: String => | |
154 | 154 | fromBase58String(s) | |
155 | 155 | case _: Unit => | |
156 | 156 | unit | |
157 | 157 | case _ => | |
158 | 158 | throw("Match error") | |
159 | 159 | } | |
160 | 160 | case _: Unit => | |
161 | 161 | unit | |
162 | 162 | case _ => | |
163 | 163 | throw("Match error") | |
164 | 164 | } | |
165 | 165 | ||
166 | 166 | let lpAssetIdOrFail = valueOrErrorMessage(lpAssetIdOption, wrapErr("invalid lpAssetId")) | |
167 | 167 | ||
168 | 168 | let proxyTreasuryAddressOption = match factoryAddressOption { | |
169 | 169 | case a: Address => | |
170 | 170 | match getString(a, keyProxyTreasuryAddress()) { | |
171 | 171 | case s: String => | |
172 | 172 | addressFromString(s) | |
173 | 173 | case _: Unit => | |
174 | 174 | unit | |
175 | 175 | case _ => | |
176 | 176 | throw("Match error") | |
177 | 177 | } | |
178 | 178 | case _: Unit => | |
179 | 179 | unit | |
180 | 180 | case _ => | |
181 | 181 | throw("Match error") | |
182 | 182 | } | |
183 | 183 | ||
184 | 184 | let proxyTreasuryAddressOrFail = valueOrErrorMessage(proxyTreasuryAddressOption, wrapErr("invalid proxy treasury address")) | |
185 | 185 | ||
186 | 186 | let mainTreasuryAddressOption = match factoryAddressOption { | |
187 | 187 | case a: Address => | |
188 | 188 | match getString(a, keyMainTreasuryAddress()) { | |
189 | 189 | case s: String => | |
190 | 190 | addressFromString(s) | |
191 | 191 | case _: Unit => | |
192 | 192 | unit | |
193 | 193 | case _ => | |
194 | 194 | throw("Match error") | |
195 | 195 | } | |
196 | 196 | case _: Unit => | |
197 | 197 | unit | |
198 | 198 | case _ => | |
199 | 199 | throw("Match error") | |
200 | 200 | } | |
201 | 201 | ||
202 | 202 | let businessTreasuryAddressOption = match factoryAddressOption { | |
203 | 203 | case a: Address => | |
204 | 204 | match getString(a, keyBusinessTreasuryAddress()) { | |
205 | 205 | case s: String => | |
206 | 206 | addressFromString(s) | |
207 | 207 | case _: Unit => | |
208 | 208 | unit | |
209 | 209 | case _ => | |
210 | 210 | throw("Match error") | |
211 | 211 | } | |
212 | 212 | case _: Unit => | |
213 | 213 | unit | |
214 | 214 | case _ => | |
215 | 215 | throw("Match error") | |
216 | 216 | } | |
217 | 217 | ||
218 | 218 | let mainTreasuryAddressOrFail = valueOrErrorMessage(mainTreasuryAddressOption, wrapErr("invalid main treasury address")) | |
219 | 219 | ||
220 | 220 | let businessTreasuryAddressOrFail = valueOrErrorMessage(businessTreasuryAddressOption, wrapErr("invalid business treasury address")) | |
221 | 221 | ||
222 | 222 | func getManagerPublicKeyOrUnit () = match factoryAddressOption { | |
223 | 223 | case fa: Address => | |
224 | 224 | match getString(fa, keyManagerPublicKey()) { | |
225 | 225 | case pub: String => | |
226 | 226 | fromBase58String(pub) | |
227 | 227 | case _ => | |
228 | 228 | unit | |
229 | 229 | } | |
230 | 230 | case _ => | |
231 | 231 | unit | |
232 | 232 | } | |
233 | 233 | ||
234 | 234 | ||
235 | 235 | func onlyAddress (i,address) = if ((i.caller == address)) | |
236 | 236 | then true | |
237 | 237 | else throwErr("permission denied") | |
238 | 238 | ||
239 | 239 | ||
240 | 240 | func onlyFactory (i) = onlyAddress(i, factoryAddressOrFail) | |
241 | 241 | ||
242 | 242 | ||
243 | 243 | func rewardForOption (rewards,target) = { | |
244 | 244 | let s = size(rewards) | |
245 | 245 | let $t057295754 = rewards[0] | |
246 | 246 | let a0 = $t057295754._1 | |
247 | 247 | let r0 = $t057295754._2 | |
248 | 248 | let $t057575782 = rewards[1] | |
249 | 249 | let a1 = $t057575782._1 | |
250 | 250 | let r1 = $t057575782._2 | |
251 | 251 | let $t057855810 = rewards[2] | |
252 | 252 | let a2 = $t057855810._1 | |
253 | 253 | let r2 = $t057855810._2 | |
254 | 254 | if (if ((s > 0)) | |
255 | 255 | then (a0 == target) | |
256 | 256 | else false) | |
257 | 257 | then r0 | |
258 | 258 | else if (if ((s > 1)) | |
259 | 259 | then (a1 == target) | |
260 | 260 | else false) | |
261 | 261 | then r1 | |
262 | 262 | else if (if ((s > 2)) | |
263 | 263 | then (a2 == target) | |
264 | 264 | else false) | |
265 | 265 | then r2 | |
266 | 266 | else unit | |
267 | 267 | } | |
268 | 268 | ||
269 | 269 | ||
270 | 270 | func finalizeINTERNAL (newTreasuryVolumeInWaves,pwrManagersBonusInWaves,treasuryVolumeDiffAllocationCoef) = { | |
271 | 271 | let donatedWavesAmount = valueOrElse(getInteger(factoryAddressOrFail, keyDonated(unit)), 0) | |
272 | 272 | let investedWavesAmount = valueOrElse(getInteger(factoryAddressOrFail, keyInvested(unit)), 0) | |
273 | 273 | let currentTreasuryVolumeInWaves = (donatedWavesAmount + investedWavesAmount) | |
274 | 274 | let profitRaw = (newTreasuryVolumeInWaves - currentTreasuryVolumeInWaves) | |
275 | 275 | let pwrManagersBonusAmount = if (if ((profitRaw >= pwrManagersBonusInWaves)) | |
276 | 276 | then true | |
277 | 277 | else (pwrManagersBonusInWaves == 0)) | |
278 | 278 | then pwrManagersBonusInWaves | |
279 | 279 | else throwErr("power bonus is more than profit") | |
280 | 280 | let profit = (profitRaw - pwrManagersBonusAmount) | |
281 | 281 | let donationPart = if ((currentTreasuryVolumeInWaves > 0)) | |
282 | 282 | then fraction(donatedWavesAmount, SCALE8, currentTreasuryVolumeInWaves) | |
283 | 283 | else 0 | |
284 | 284 | let donationProfitPartRaw = fraction(profit, donationPart, SCALE8) | |
285 | 285 | let investmentProfitPartRaw = (profit - donationProfitPartRaw) | |
286 | 286 | let treasuryVolumeDiffAllocationCoefAbs = abs(treasuryVolumeDiffAllocationCoef) | |
287 | 287 | let amountToDonation = fraction(investmentProfitPartRaw, if ((0 > treasuryVolumeDiffAllocationCoef)) | |
288 | 288 | then treasuryVolumeDiffAllocationCoefAbs | |
289 | 289 | else 0, SCALE8) | |
290 | 290 | let amountToInvestment = fraction(donationProfitPartRaw, if ((treasuryVolumeDiffAllocationCoef > 0)) | |
291 | 291 | then treasuryVolumeDiffAllocationCoefAbs | |
292 | 292 | else 0, SCALE8) | |
293 | 293 | let donationProfitPart = ((donationProfitPartRaw - amountToInvestment) + amountToDonation) | |
294 | 294 | let investmentProfitPart = ((investmentProfitPartRaw - amountToDonation) + amountToInvestment) | |
295 | 295 | let donatedWavesAmountNewRaw = (donatedWavesAmount + donationProfitPart) | |
296 | 296 | let investedWavesAmountNewRaw = (investedWavesAmount + investmentProfitPart) | |
297 | 297 | let donatedPartDebt = min([0, donatedWavesAmountNewRaw]) | |
298 | 298 | let investedPartDebt = min([0, investedWavesAmountNewRaw]) | |
299 | 299 | let donatedWavesAmountNew = (max([0, donatedWavesAmountNewRaw]) + investedPartDebt) | |
300 | 300 | let investedWavesAmountNew = (max([0, investedWavesAmountNewRaw]) + donatedPartDebt) | |
301 | 301 | let lpAssetQuantity = valueOrErrorMessage(assetInfo(lpAssetIdOrFail), wrapErr("invalid lpAsset info")).quantity | |
302 | 302 | let newPrice = fraction(investedWavesAmountNew, SCALE8, lpAssetQuantity) | |
303 | 303 | let checkIfPriceNotZero = if ((newPrice != 0)) | |
304 | 304 | then true | |
305 | 305 | else throwErr("LP price cannot be 0") | |
306 | 306 | if ((checkIfPriceNotZero == checkIfPriceNotZero)) | |
307 | 307 | then { | |
308 | 308 | let lpAssetAmountToBurn = valueOrElse(getInteger(factoryAddressOrFail, keyWithdrawal()), 0) | |
309 | 309 | let paymentAmountMin = max([0, fraction(lpAssetAmountToBurn, newPrice, SCALE8)]) | |
310 | 310 | let finalInvestedWavesAmount = (investedWavesAmountNew - paymentAmountMin) | |
311 | 311 | let lpAssetFinalQuantity = (lpAssetQuantity - lpAssetAmountToBurn) | |
312 | 312 | $Tuple6(paymentAmountMin, finalInvestedWavesAmount, donatedWavesAmountNew, newPrice, lpAssetAmountToBurn, lpAssetFinalQuantity) | |
313 | 313 | } | |
314 | 314 | else throw("Strict value is not equal to itself.") | |
315 | 315 | } | |
316 | 316 | ||
317 | 317 | ||
318 | 318 | func claimCollateralINTERNAL (userAddressBytes,txId,transactionId) = { | |
319 | 319 | let userAddress = Address(userAddressBytes) | |
320 | 320 | let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period")) | |
321 | 321 | let withdrawalRequestOption = valueOrErrorMessage(getString(factoryAddressOrFail, keyWithdrawalRequest(userAddress, txId)), wrapErr("invalid withdrawal request")) | |
322 | 322 | let $t092529365 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption) | |
323 | 323 | let status = $t092529365._1 | |
324 | 324 | let lpAssetAmount = $t092529365._2 | |
325 | 325 | let targetPeriod = $t092529365._3 | |
326 | 326 | let claimTxId = $t092529365._4 | |
327 | 327 | if ((targetPeriod > currentPeriodOrFail)) | |
328 | 328 | then throwErr("invalid withdrawal request period") | |
329 | 329 | else { | |
330 | 330 | let priceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(targetPeriod)), wrapErr("invalid price")) | |
331 | 331 | let wavesAmount = if ((priceOrFail > 0)) | |
332 | 332 | then fraction(lpAssetAmount, priceOrFail, SCALE8) | |
333 | 333 | else 0 | |
334 | 334 | let assetsString = getStringValue(factoryAddressOrFail, keyPeriodWithdrawalAssetIds(currentPeriodOrFail)) | |
335 | 335 | let amountsString = getStringValue(factoryAddressOrFail, keyPeriodWithdrawalAmounts(currentPeriodOrFail)) | |
336 | 336 | $Tuple6(userAddress, lpAssetAmount, targetPeriod, wavesAmount, assetsString, amountsString) | |
337 | 337 | } | |
338 | 338 | } | |
339 | 339 | ||
340 | 340 | ||
341 | 341 | func claimCollateralREADONLYStringResponse (userAddressBytes,txId,transactionId) = { | |
342 | 342 | let $t01017910360 = claimCollateralINTERNAL(userAddressBytes, txId, transactionId) | |
343 | 343 | let userAddress = $t01017910360._1 | |
344 | 344 | let lpAssetAmount = $t01017910360._2 | |
345 | 345 | let targetPeriod = $t01017910360._3 | |
346 | 346 | let wavesAmount = $t01017910360._4 | |
347 | 347 | let assetsString = $t01017910360._5 | |
348 | 348 | let amountsString = $t01017910360._6 | |
349 | 349 | let assets = makeString(removeByIndex(split_51C(assetsString, SEP), 0), ":") | |
350 | 350 | let amounts = makeString(removeByIndex(split_51C(amountsString, SEP), 0), ":") | |
351 | 351 | makeString(["%d%s%s", toString(wavesAmount), assets, amounts], SEP) | |
352 | 352 | } | |
353 | 353 | ||
354 | 354 | ||
355 | 355 | @Callable(i) | |
356 | 356 | func claimLP (userAddressBytes) = { | |
357 | 357 | let checkCaller = onlyFactory(i) | |
358 | 358 | if ((checkCaller == checkCaller)) | |
359 | 359 | then { | |
360 | 360 | let userAddress = Address(userAddressBytes) | |
361 | 361 | let available = valueOrElse(getInteger(factoryAddressOrFail, keyAvailable(userAddress)), 0) | |
362 | 362 | let claimed = valueOrElse(getInteger(factoryAddressOrFail, keyClaimed(userAddress)), 0) | |
363 | 363 | let factoryActions = if ((available > 0)) | |
364 | 364 | then [invoke(factoryAddressOrFail, "transferAsset", [userAddressBytes, available, lpAssetIdOrFail], nil), invoke(factoryAddressOrFail, "integerEntry", [keyAvailable(userAddress), 0], nil), invoke(factoryAddressOrFail, "integerEntry", [keyClaimed(userAddress), (claimed + available)], nil)] | |
365 | 365 | else throwErr("nothing to claim") | |
366 | 366 | $Tuple2(nil, factoryActions) | |
367 | 367 | } | |
368 | 368 | else throw("Strict value is not equal to itself.") | |
369 | 369 | } | |
370 | 370 | ||
371 | 371 | ||
372 | 372 | ||
373 | 373 | @Callable(i) | |
374 | 374 | func finalize (userAddressBytes,newTreasuryVolumeInWaves,pwrManagersBonusInWaves,treasuryVolumeDiffAllocationCoef) = { | |
375 | 375 | let checkCaller = onlyFactory(i) | |
376 | 376 | if ((checkCaller == checkCaller)) | |
377 | 377 | then { | |
378 | 378 | let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period")) | |
379 | 379 | let periodLength = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPeriodLength()), wrapErr("invalid period length")) | |
380 | 380 | let currentStartHeight = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyStartHeight(currentPeriodOrFail)), wrapErr("invalid start height")) | |
381 | 381 | let currentPriceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(currentPeriodOrFail)), wrapErr("invalid price")) | |
382 | 382 | let nextBlockToProcess = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyNextBlockToProcess()), wrapErr("invalid next block to process")) | |
383 | 383 | let periodEndHeight = ((currentStartHeight + periodLength) - 1) | |
384 | 384 | let checks = [if ((i.originCaller == mainTreasuryAddressOrFail)) | |
385 | 385 | then true | |
386 | 386 | else throwErr("permission denied"), if ((nextBlockToProcess > periodEndHeight)) | |
387 | 387 | then true | |
388 | 388 | else throwErr("unprocessed blocks"), if ((newTreasuryVolumeInWaves >= 0)) | |
389 | 389 | then true | |
390 | 390 | else throwErr("invalid new treasury volume"), if ((pwrManagersBonusInWaves >= 0)) | |
391 | 391 | then true | |
392 | 392 | else throwErr("invalid PWR managers bonus"), if (if ((treasuryVolumeDiffAllocationCoef >= -(SCALE8))) | |
393 | 393 | then (SCALE8 >= treasuryVolumeDiffAllocationCoef) | |
394 | 394 | else false) | |
395 | 395 | then true | |
396 | 396 | else throwErr("invalid treasury volume diff allocation coefficient")] | |
397 | 397 | if ((checks == checks)) | |
398 | 398 | then { | |
399 | 399 | let $t01312213382 = finalizeINTERNAL(newTreasuryVolumeInWaves, pwrManagersBonusInWaves, treasuryVolumeDiffAllocationCoef) | |
400 | 400 | let paymentAmountMin = $t01312213382._1 | |
401 | 401 | let finalInvestedWavesAmount = $t01312213382._2 | |
402 | 402 | let donatedWavesAmountNew = $t01312213382._3 | |
403 | 403 | let newPrice = $t01312213382._4 | |
404 | 404 | let lpAssetAmountToBurn = $t01312213382._5 | |
405 | 405 | let lpAssetFinalQuantity = $t01312213382._6 | |
406 | 406 | let newPeriod = (currentPeriodOrFail + 1) | |
407 | 407 | func addNewAction (actions,payment) = { | |
408 | 408 | let $t01353013592 = actions | |
409 | 409 | let scriptTransfers = $t01353013592._1 | |
410 | 410 | let assetIdsString = $t01353013592._2 | |
411 | 411 | let amountsString = $t01353013592._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 $t01405214143 = { | |
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 = $t01405214143._1 | |
435 | 435 | let AssetIds = $t01405214143._2 | |
436 | 436 | let Amounts = $t01405214143._3 | |
437 | 437 | let factoryActions = [invoke(factoryAddressOrFail, "integerEntry", [keyPowerManagerBonus(currentPeriodOrFail), pwrManagersBonusInWaves], 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), finalInvestedWavesAmount], nil), invoke(factoryAddressOrFail, "integerEntry", [keyDonated(unit), donatedWavesAmountNew], 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 (newTreasuryVolumeInWaves,pwrManagersBonusInWaves,treasuryVolumeDiffAllocationCoef) = { | |
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 ((newTreasuryVolumeInWaves >= 0)) | |
458 | 458 | then true | |
459 | 459 | else throwErr("invalid new treasury volume"), if ((pwrManagersBonusInWaves >= 0)) | |
460 | 460 | then true | |
461 | 461 | else throwErr("invalid PWR managers bonus"), if (if ((treasuryVolumeDiffAllocationCoef >= -(SCALE8))) | |
462 | 462 | then (SCALE8 >= treasuryVolumeDiffAllocationCoef) | |
463 | 463 | else false) | |
464 | 464 | then true | |
465 | 465 | else throwErr("invalid treasury volume diff allocation coefficient")] | |
466 | 466 | if ((checks == checks)) | |
467 | 467 | then $Tuple2(nil, finalizeINTERNAL(newTreasuryVolumeInWaves, pwrManagersBonusInWaves, treasuryVolumeDiffAllocationCoef)) | |
468 | 468 | else throw("Strict value is not equal to itself.") | |
469 | 469 | } | |
470 | 470 | ||
471 | 471 | ||
472 | 472 | ||
473 | 473 | @Callable(i) | |
474 | 474 | func invest (userAddressBytes) = { | |
475 | 475 | let checkCaller = onlyFactory(i) | |
476 | 476 | if ((checkCaller == checkCaller)) | |
477 | 477 | then { | |
478 | 478 | let userAddress = Address(userAddressBytes) | |
479 | 479 | let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period")) | |
480 | 480 | let currentPriceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(currentPeriodOrFail)), wrapErr("invalid price")) | |
481 | 481 | let payment = if ((size(i.payments) == 1)) | |
482 | 482 | then i.payments[0] | |
483 | 483 | else throwErr("invalid payments") | |
484 | 484 | let $t01762417801 = if (if ((payment.assetId == unit)) | |
485 | 485 | then (payment.amount > 0) | |
486 | 486 | else false) | |
487 | 487 | then $Tuple2(payment.amount, payment.assetId) | |
488 | 488 | else throwErr("invalid payment amount") | |
489 | 489 | let paymentAmount = $t01762417801._1 | |
490 | 490 | let paymentAssetId = $t01762417801._2 | |
491 | 491 | let treasuryPart = valueOrElse(getInteger(factoryAddressOrFail, keyBusinessTreasuryPart()), 0) | |
492 | 492 | let paymentsWithoutTreasuryPart = fraction(paymentAmount, (SCALE8 - treasuryPart), SCALE8) | |
493 | 493 | let lpAssetAmount = if ((currentPriceOrFail > 0)) | |
494 | 494 | then fraction(paymentsWithoutTreasuryPart, SCALE8, currentPriceOrFail) | |
495 | 495 | else 0 | |
496 | 496 | let invested = valueOrElse(getInteger(factoryAddressOrFail, keyInvested(unit)), 0) | |
497 | 497 | let actions = [ScriptTransfer(mainTreasuryAddressOrFail, paymentsWithoutTreasuryPart, paymentAssetId), ScriptTransfer(businessTreasuryAddressOrFail, treasuryPart, paymentAssetId)] | |
498 | 498 | let factoryActions = [invoke(factoryAddressOrFail, "integerEntry", [keyInvested(unit), (invested + paymentsWithoutTreasuryPart)], nil), invoke(factoryAddressOrFail, "reissue", [lpAssetAmount], nil), invoke(factoryAddressOrFail, "transferAsset", [userAddressBytes, lpAssetAmount, lpAssetIdOrFail], nil)] | |
499 | 499 | $Tuple2(actions, factoryActions) | |
500 | 500 | } | |
501 | 501 | else throw("Strict value is not equal to itself.") | |
502 | 502 | } | |
503 | 503 | ||
504 | 504 | ||
505 | 505 | ||
506 | 506 | @Callable(i) | |
507 | 507 | func withdraw (userAddressBytes) = { | |
508 | 508 | let checkCaller = onlyFactory(i) | |
509 | 509 | if ((checkCaller == checkCaller)) | |
510 | 510 | then { | |
511 | 511 | let userAddress = Address(userAddressBytes) | |
512 | 512 | let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period")) | |
513 | 513 | let payment = if ((size(i.payments) == 1)) | |
514 | 514 | then i.payments[0] | |
515 | 515 | else throwErr(wrapErr("invalid payments")) | |
516 | 516 | let paymentAssetId = if ((payment.assetId == lpAssetIdOrFail)) | |
517 | 517 | then lpAssetIdOrFail | |
518 | 518 | else throwErr("invalid payment asset") | |
519 | 519 | let paymentAmount = if ((payment.amount > 0)) | |
520 | 520 | then payment.amount | |
521 | 521 | else throwErr("invalid payment amount") | |
522 | 522 | let withdrawal = valueOrElse(getInteger(factoryAddressOrFail, keyWithdrawal()), 0) | |
523 | 523 | let actions = [ScriptTransfer(factoryAddressOrFail, paymentAmount, paymentAssetId)] | |
524 | 524 | let factoryActions = [invoke(factoryAddressOrFail, "integerEntry", [keyWithdrawal(), (withdrawal + paymentAmount)], nil), invoke(factoryAddressOrFail, "stringEntry", [keyWithdrawalRequest(userAddress, i.transactionId), valueWithdrawalRequest(PENDING, paymentAmount, (currentPeriodOrFail + 1), unit)], nil)] | |
525 | 525 | if ((factoryActions == factoryActions)) | |
526 | 526 | then $Tuple2(actions, factoryActions) | |
527 | 527 | else throw("Strict value is not equal to itself.") | |
528 | 528 | } | |
529 | 529 | else throw("Strict value is not equal to itself.") | |
530 | 530 | } | |
531 | 531 | ||
532 | 532 | ||
533 | 533 | ||
534 | 534 | @Callable(i) | |
535 | 535 | func cancelWithdraw (userAddressBytes,txId) = { | |
536 | 536 | let checkCaller = onlyFactory(i) | |
537 | 537 | if ((checkCaller == checkCaller)) | |
538 | 538 | then { | |
539 | 539 | let userAddress = Address(userAddressBytes) | |
540 | 540 | let withdrawalRequestOption = valueOrErrorMessage(getString(factoryAddressOrFail, keyWithdrawalRequest(userAddress, txId)), wrapErr("invalid withdrawal request")) | |
541 | 541 | let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period")) | |
542 | 542 | let $t02053520648 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption) | |
543 | 543 | let status = $t02053520648._1 | |
544 | 544 | let lpAssetAmount = $t02053520648._2 | |
545 | 545 | let targetPeriod = $t02053520648._3 | |
546 | 546 | let claimTxId = $t02053520648._4 | |
547 | 547 | let checks = [if ((status == PENDING)) | |
548 | 548 | then true | |
549 | 549 | else throwErr("invalid withdrawal request status"), if ((targetPeriod > currentPeriodOrFail)) | |
550 | 550 | then true | |
551 | 551 | else throwErr("invalid withdrawal request period")] | |
552 | 552 | if ((checks == checks)) | |
553 | 553 | then { | |
554 | 554 | let withdrawal = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyWithdrawal()), wrapErr("invalid total withdrawal amount")) | |
555 | 555 | let factoryActions = [invoke(factoryAddressOrFail, "integerEntry", [keyWithdrawal(), if ((withdrawal >= lpAssetAmount)) | |
556 | 556 | then (withdrawal - lpAssetAmount) | |
557 | 557 | else throwErr("invalid withdrawal amount")], nil), invoke(factoryAddressOrFail, "deleteEntry", [keyWithdrawalRequest(userAddress, txId)], nil), invoke(factoryAddressOrFail, "transferAsset", [userAddressBytes, lpAssetAmount, lpAssetIdOrFail], nil)] | |
558 | 558 | if ((factoryActions == factoryActions)) | |
559 | 559 | then $Tuple2(nil, factoryActions) | |
560 | 560 | else throw("Strict value is not equal to itself.") | |
561 | 561 | } | |
562 | 562 | else throw("Strict value is not equal to itself.") | |
563 | 563 | } | |
564 | 564 | else throw("Strict value is not equal to itself.") | |
565 | 565 | } | |
566 | 566 | ||
567 | 567 | ||
568 | 568 | ||
569 | 569 | @Callable(i) | |
570 | 570 | func claimCollateral (userAddressBytes,txId) = { | |
571 | 571 | let checkCaller = onlyFactory(i) | |
572 | 572 | if ((checkCaller == checkCaller)) | |
573 | 573 | then { | |
574 | - | let $ | |
575 | - | let userAddress = $ | |
576 | - | let lpAssetAmount = $ | |
577 | - | let targetPeriod = $ | |
578 | - | let wavesAmount = $ | |
579 | - | let assetsString = $ | |
580 | - | let amountsString = $ | |
574 | + | let $t02163421836 = claimCollateralINTERNAL(userAddressBytes, fromBase58String(txId), i.transactionId) | |
575 | + | let userAddress = $t02163421836._1 | |
576 | + | let lpAssetAmount = $t02163421836._2 | |
577 | + | let targetPeriod = $t02163421836._3 | |
578 | + | let wavesAmount = $t02163421836._4 | |
579 | + | let assetsString = $t02163421836._5 | |
580 | + | let amountsString = $t02163421836._6 | |
581 | 581 | let assetsList = removeByIndex(split_51C(assetsString, SEP), 0) | |
582 | 582 | let amountsList = removeByIndex(split_51C(amountsString, SEP), 0) | |
583 | - | let factoryActions = [invoke(factoryAddressOrFail, "deleteEntry", [keyWithdrawalRequest(userAddress, txId)], nil), invoke(factoryAddressOrFail, "integerEntry", [keyWithdrawalHistory(userAddress, txId), lpAssetAmount], nil), invoke(factoryAddressOrFail, "transferAssets", [userAddressBytes, assetsList, amountsList], nil)] | |
583 | + | 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)] | |
584 | 584 | $Tuple2(nil, factoryActions) | |
585 | 585 | } | |
586 | 586 | else throw("Strict value is not equal to itself.") | |
587 | 587 | } | |
588 | 588 | ||
589 | 589 | ||
590 | 590 | ||
591 | 591 | @Callable(i) | |
592 | 592 | func claimCollateralBulk (userAddressBytes,txIds) = { | |
593 | 593 | let checkCaller = onlyFactory(i) | |
594 | 594 | if ((checkCaller == checkCaller)) | |
595 | 595 | then { | |
596 | 596 | func addNewAction (state,txId) = { | |
597 | - | let $ | |
598 | - | let userAddress = $ | |
599 | - | let lpAssetAmount = $ | |
600 | - | let targetPeriod = $ | |
601 | - | let wavesAmount = $ | |
602 | - | let assetsString = $ | |
603 | - | let amountsString = $ | |
597 | + | let $t02259422810 = claimCollateralINTERNAL(userAddressBytes, fromBase58String(txId), i.transactionId) | |
598 | + | let userAddress = $t02259422810._1 | |
599 | + | let lpAssetAmount = $t02259422810._2 | |
600 | + | let targetPeriod = $t02259422810._3 | |
601 | + | let wavesAmount = $t02259422810._4 | |
602 | + | let assetsString = $t02259422810._5 | |
603 | + | let amountsString = $t02259422810._6 | |
604 | 604 | let assetsList = removeByIndex(split_51C(assetsString, SEP), 0) | |
605 | 605 | let amountsList = removeByIndex(split_51C(amountsString, SEP), 0) | |
606 | - | let newActions = [invoke(factoryAddressOrFail, "deleteEntry", [keyWithdrawalRequest(userAddress, txId)], nil), invoke(factoryAddressOrFail, "integerEntry", [keyWithdrawalHistory(userAddress, txId), lpAssetAmount], nil), invoke(factoryAddressOrFail, "transferAssets", [userAddressBytes, assetsList, amountsList], nil)] | |
606 | + | 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)] | |
607 | 607 | (state ++ newActions) | |
608 | 608 | } | |
609 | 609 | ||
610 | 610 | let allFactoryActions = { | |
611 | 611 | let $l = txIds | |
612 | 612 | let $s = size($l) | |
613 | 613 | let $acc0 = nil | |
614 | 614 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
615 | 615 | then $a | |
616 | 616 | else addNewAction($a, $l[$i]) | |
617 | 617 | ||
618 | 618 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
619 | 619 | then $a | |
620 | 620 | else throw("List size exceeds 10") | |
621 | 621 | ||
622 | 622 | $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) | |
623 | 623 | } | |
624 | 624 | $Tuple2(nil, allFactoryActions) | |
625 | 625 | } | |
626 | 626 | else throw("Strict value is not equal to itself.") | |
627 | 627 | } | |
628 | 628 | ||
629 | 629 | ||
630 | 630 | ||
631 | 631 | @Callable(i) | |
632 | 632 | func claimCollateralREADONLY (userAddressBytes,txId) = { | |
633 | - | let response = claimCollateralREADONLYStringResponse(userAddressBytes, txId, i.transactionId) | |
633 | + | let response = claimCollateralREADONLYStringResponse(userAddressBytes, fromBase58String(txId), i.transactionId) | |
634 | 634 | $Tuple2(nil, response) | |
635 | 635 | } | |
636 | 636 | ||
637 | 637 | ||
638 | 638 | ||
639 | 639 | @Callable(i) | |
640 | 640 | func claimCollateralBulkREADONLY (userAddressBytes,txIds) = { | |
641 | 641 | func processTxId (state,txId) = { | |
642 | - | let response = claimCollateralREADONLYStringResponse(userAddressBytes, txId, i.transactionId) | |
642 | + | let response = claimCollateralREADONLYStringResponse(userAddressBytes, fromBase58String(txId), i.transactionId) | |
643 | 643 | (state :+ response) | |
644 | 644 | } | |
645 | 645 | ||
646 | 646 | let allResponses = { | |
647 | 647 | let $l = txIds | |
648 | 648 | let $s = size($l) | |
649 | 649 | let $acc0 = nil | |
650 | 650 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
651 | 651 | then $a | |
652 | 652 | else processTxId($a, $l[$i]) | |
653 | 653 | ||
654 | 654 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
655 | 655 | then $a | |
656 | 656 | else throw("List size exceeds 10") | |
657 | 657 | ||
658 | 658 | $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) | |
659 | 659 | } | |
660 | 660 | $Tuple2(nil, allResponses) | |
661 | 661 | } | |
662 | 662 | ||
663 | 663 | ||
664 | 664 | ||
665 | 665 | @Callable(i) | |
666 | 666 | func processBlocks (userAddressBytes) = { | |
667 | 667 | let checkCaller = onlyFactory(i) | |
668 | 668 | if ((checkCaller == checkCaller)) | |
669 | 669 | then { | |
670 | 670 | let userAddress = Address(userAddressBytes) | |
671 | 671 | let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period")) | |
672 | 672 | let periodLength = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPeriodLength()), wrapErr("invalid period length")) | |
673 | 673 | let currentStartHeight = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyStartHeight(currentPeriodOrFail)), wrapErr("invalid start height")) | |
674 | 674 | let currentPriceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(currentPeriodOrFail)), wrapErr("invalid price")) | |
675 | 675 | let nextBlockToProcess = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyNextBlockToProcess()), wrapErr("invalid next block to process")) | |
676 | 676 | let periodEndHeight = ((currentStartHeight + periodLength) - 1) | |
677 | 677 | let blocksProcessingBatchSizeMax = 40 | |
678 | 678 | let blocksProcessingBatchSize = if (if (if ((height >= nextBlockToProcess)) | |
679 | 679 | then if ((nextBlockToProcess >= currentStartHeight)) | |
680 | 680 | then true | |
681 | 681 | else (currentPeriodOrFail == 0) | |
682 | 682 | else false) | |
683 | 683 | then (periodEndHeight >= nextBlockToProcess) | |
684 | 684 | else false) | |
685 | 685 | then min([((periodEndHeight - nextBlockToProcess) + 1), blocksProcessingBatchSizeMax]) | |
686 | 686 | else throwErr(wrapErr("invalid target block")) | |
687 | 687 | let blockProcessingReward = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyBlockProcessingReward()), wrapErr("invalid block processing reward")) | |
688 | 688 | let blockProcessingRewardByGenerator = (blockProcessingReward / blocksProcessingBatchSize) | |
689 | 689 | let blockProcessingRewardByGeneratorRemainder = (blockProcessingReward - (blockProcessingRewardByGenerator * blocksProcessingBatchSize)) | |
690 | 690 | func map (acc,inc) = if ((inc >= blocksProcessingBatchSize)) | |
691 | 691 | then acc | |
692 | 692 | else { | |
693 | 693 | let targetBlockHeight = (nextBlockToProcess + inc) | |
694 | 694 | let targetBlockInfo = valueOrErrorMessage(blockInfoByHeight(targetBlockHeight), wrapErr("invalid block info")) | |
695 | 695 | let treasuryRewardOrFail = valueOrErrorMessage(rewardForOption(targetBlockInfo.rewards, proxyTreasuryAddressOrFail), wrapErr(("invalid treasury reward for height " + toString(targetBlockHeight)))) | |
696 | 696 | let generator = targetBlockInfo.generator | |
697 | 697 | let available = valueOrElse(getInteger(factoryAddressOrFail, keyAvailable(generator)), 0) | |
698 | 698 | let callerReward = if ((inc == (blocksProcessingBatchSize - 1))) | |
699 | 699 | then (blockProcessingRewardByGenerator + blockProcessingRewardByGeneratorRemainder) | |
700 | 700 | else blockProcessingRewardByGenerator | |
701 | 701 | let lpAssetAmount = if ((currentPriceOrFail > 0)) | |
702 | 702 | then fraction((treasuryRewardOrFail - callerReward), SCALE8, currentPriceOrFail) | |
703 | 703 | else 0 | |
704 | 704 | let factoryActionsSingle = [invoke(factoryAddressOrFail, "stringEntry", [keyBlockProcessed(targetBlockHeight), makeString([toBase58String(i.transactionId), toString(currentPeriodOrFail), toString(generator), toBase58String(userAddressBytes), toString(treasuryRewardOrFail), toString(callerReward), toString(lpAssetAmount)], SEP)], nil), invoke(factoryAddressOrFail, "integerEntry", [keyAvailable(generator), (available + lpAssetAmount)], nil)] | |
705 | 705 | if ((factoryActionsSingle == factoryActionsSingle)) | |
706 | 706 | then { | |
707 | - | let $ | |
708 | - | let lpAssetAcc = $ | |
709 | - | let rewardAcc = $ | |
707 | + | let $t02754827581 = acc | |
708 | + | let lpAssetAcc = $t02754827581._1 | |
709 | + | let rewardAcc = $t02754827581._2 | |
710 | 710 | $Tuple2((lpAssetAcc + lpAssetAmount), (rewardAcc + treasuryRewardOrFail)) | |
711 | 711 | } | |
712 | 712 | else throw("Strict value is not equal to itself.") | |
713 | 713 | } | |
714 | 714 | ||
715 | 715 | let list = [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, 31, 32, 33, 34, 35, 36, 37, 38, 39] | |
716 | - | let $ | |
716 | + | let $t02784827924 = { | |
717 | 717 | let $l = list | |
718 | 718 | let $s = size($l) | |
719 | 719 | let $acc0 = $Tuple2(0, 0) | |
720 | 720 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
721 | 721 | then $a | |
722 | 722 | else map($a, $l[$i]) | |
723 | 723 | ||
724 | 724 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
725 | 725 | then $a | |
726 | 726 | else throw("List size exceeds 40") | |
727 | 727 | ||
728 | 728 | $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($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), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40) | |
729 | 729 | } | |
730 | - | if (($ | |
730 | + | if (($t02784827924 == $t02784827924)) | |
731 | 731 | then { | |
732 | - | let rewardAmountTotal = $ | |
733 | - | let lpAssetAmountTotal = $ | |
732 | + | let rewardAmountTotal = $t02784827924._2 | |
733 | + | let lpAssetAmountTotal = $t02784827924._1 | |
734 | 734 | let businessTreasuryPart = valueOrElse(getInteger(factoryAddressOrFail, keyBusinessTreasuryPart()), 0) | |
735 | 735 | let rewardToBusinessTreasuryAmount = fraction(rewardAmountTotal, businessTreasuryPart, SCALE8) | |
736 | 736 | let rewardToMainTreasuryAmount = ((rewardAmountTotal - rewardToBusinessTreasuryAmount) - blockProcessingReward) | |
737 | 737 | let invested = valueOrElse(getInteger(factoryAddressOrFail, keyInvested(unit)), 0) | |
738 | 738 | 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)] | |
739 | 739 | if ((actions == actions)) | |
740 | 740 | then $Tuple2(nil, unit) | |
741 | 741 | else throw("Strict value is not equal to itself.") | |
742 | 742 | } | |
743 | 743 | else throw("Strict value is not equal to itself.") | |
744 | 744 | } | |
745 | 745 | else throw("Strict value is not equal to itself.") | |
746 | 746 | } | |
747 | 747 | ||
748 | 748 | ||
749 | 749 | @Verifier(tx) | |
750 | 750 | func verify () = { | |
751 | 751 | let publicKey = match getManagerPublicKeyOrUnit() { | |
752 | 752 | case pub: ByteVector => | |
753 | 753 | pub | |
754 | 754 | case _ => | |
755 | 755 | tx.senderPublicKey | |
756 | 756 | } | |
757 | 757 | sigVerify(tx.bodyBytes, tx.proofs[0], publicKey) | |
758 | 758 | } | |
759 | 759 |
github/deemru/w8io/169f3d6 88.75 ms ◑