tx · 2exwXVqToTEqykJyzsPpZ5H9hRhvUQxk17HzDyuyARnJ 3N6HSS7Toat1RhyEsyqVGgVSRzH19W1FTbP: -0.01900000 Waves 2023.06.23 10:55 [2635020] smart account 3N6HSS7Toat1RhyEsyqVGgVSRzH19W1FTbP > SELF 0.00000000 Waves
{ "type": 13, "id": "2exwXVqToTEqykJyzsPpZ5H9hRhvUQxk17HzDyuyARnJ", "fee": 1900000, "feeAssetId": null, "timestamp": 1687506965854, "version": 2, "chainId": 84, "sender": "3N6HSS7Toat1RhyEsyqVGgVSRzH19W1FTbP", "senderPublicKey": "AoKo4segKHU4DeJnxXQYJj2u7J6XJeux6r8KLW52cd2Q", "proofs": [ "4SqDSJxJxRMw7VUSR7xdwJWUzfLncRy8hWN7WvWTYfBVNUfRTrbHYy3HAAtLE2k3xe1mHfceksMY5TtgGWNbPzPL" ], "script": "base64:BwIrCAISAwoBAhIHCgUCAQEBARIDCgECEgMKAQISBAoCAgISBAoCAgISAwoBAigAA1NFUAICX18ADUNPTlRSQUNUX05BTUUCD2NhbGN1bGF0b3IucmlkZQAGU0NBTEU4AIDC1y8ABlNDQUxFNgDAhD0AB1BFTkRJTkcCB1BFTkRJTkcACEZJTklTSEVEAghGSU5JU0hFRAAFV0FWRVMCBVdBVkVTAQd3cmFwRXJyAQFzCQCsAgIJAKwCAgUNQ09OVFJBQ1RfTkFNRQICOiAFAXMBCHRocm93RXJyAQFzCQACAQkBB3dyYXBFcnIBBQFzAQ9hc3NldElkVG9TdHJpbmcBB2Fzc2V0SWQEByRtYXRjaDAFB2Fzc2V0SWQDCQABAgUHJG1hdGNoMAIKQnl0ZVZlY3RvcgQBYgUHJG1hdGNoMAkA2AQBBQFiAwkAAQIFByRtYXRjaDACBFVuaXQFBVdBVkVTCQACAQILTWF0Y2ggZXJyb3IBA2FicwEBbgMJAGYCAAAFAW4JAQEtAQUBbgUBbgERa2V5RmFjdG9yeUFkZHJlc3MACQC5CQIJAMwIAgICJXMJAMwIAgIHZmF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W50ZWdlckVudHJ5CQDMCAIJARVrZXlOZXh0QmxvY2tUb1Byb2Nlc3MACQDMCAIJAGQCBRJuZXh0QmxvY2tUb1Byb2Nlc3MFGWJsb2Nrc1Byb2Nlc3NpbmdCYXRjaFNpemUFA25pbAUDbmlsBQNuaWwDCQAAAgUHYWN0aW9ucwUHYWN0aW9ucwkAlAoCBQNuaWwFBHVuaXQJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5Z2XG7g==", "height": 2635020, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4eGwYzfrhm5M6ohyQsDHjMFGTCcMVxqnmZDhv5PdH5eU Next: 5jKFfKGXisRRwPZWTzWMaWd65RF2gEkYvZz5ghmjyy2U Diff:
Old | New | Differences | |
---|---|---|---|
472 | 472 | let lpAssetAmount = if ((currentPriceOrFail > 0)) | |
473 | 473 | then fraction((treasuryRewardOrFail - callerReward), SCALE8, currentPriceOrFail) | |
474 | 474 | else 0 | |
475 | - | let factoryActionsSingle = [invoke(factoryAddressOrFail, "stringEntry", [keyBlockProcessed(targetBlockHeight), makeString([toBase58String(i.transactionId), toBase58String(userAddressBytes), toString(treasuryRewardOrFail), toString(callerReward), toString(lpAssetAmount)], SEP)], nil), invoke(factoryAddressOrFail, "integerEntry", [keyAvailable(generator), (available + lpAssetAmount)], nil)] | |
475 | + | 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)] | |
476 | 476 | if ((factoryActionsSingle == factoryActionsSingle)) | |
477 | 477 | then (acc + lpAssetAmount) | |
478 | 478 | else throw("Strict value is not equal to itself.") |
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 SCALE6 = 1000000 | |
11 | 11 | ||
12 | 12 | let PENDING = "PENDING" | |
13 | 13 | ||
14 | 14 | let FINISHED = "FINISHED" | |
15 | 15 | ||
16 | 16 | let WAVES = "WAVES" | |
17 | 17 | ||
18 | 18 | func wrapErr (s) = ((CONTRACT_NAME + ": ") + s) | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func throwErr (s) = throw(wrapErr(s)) | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | func assetIdToString (assetId) = match assetId { | |
25 | 25 | case b: ByteVector => | |
26 | 26 | toBase58String(b) | |
27 | 27 | case _: Unit => | |
28 | 28 | WAVES | |
29 | 29 | case _ => | |
30 | 30 | throw("Match error") | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func abs (n) = if ((0 > n)) | |
35 | 35 | then -(n) | |
36 | 36 | else n | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func keyFactoryAddress () = makeString(["%s", "factory"], SEP) | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func keyLpAssetId () = makeString(["%s", "lpAssetId"], SEP) | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func keyXtnAssetId () = makeString(["%s", "xtnAssetId"], SEP) | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func keyTreasuryAddress () = makeString(["%s", "treasury"], SEP) | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func keyInvested (assetId) = makeString(["%s%s", "invested", assetIdToString(assetId)], SEP) | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func keyAvailable (userAddress) = makeString(["%s%s", "available", toString(userAddress)], SEP) | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func keyClaimed (userAddress) = makeString(["%s%s", "claimed", toString(userAddress)], SEP) | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func keyCurrentPeriod () = makeString(["%s", "currentPeriod"], SEP) | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func keyPriceForPeriod (period) = makeString(["%s%d", "price", toString(period)], SEP) | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func keyStartHeight (period) = makeString(["%s%d", "startHeight", toString(period)], SEP) | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func keyPeriodLength () = "%s__periodLength" | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func keyBlockProcessingReward () = "%s__blockProcessingReward" | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func keyNextBlockToProcess () = "%s__nextBlockToProcess" | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func keyBlockProcessed (height) = makeString(["%s%d", "blockProcessed", toString(height)], SEP) | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func keyWithdrawal () = "%s__withdrawal" | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func keyWithdrawalRequest (userAddress,txId) = makeString(["%s%s%s", "withdrawal", toString(userAddress), toBase58String(txId)], SEP) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func valueWithdrawalRequest (status,lpAssetAmount,targetPeriod,claimTxId) = { | |
88 | 88 | let claimTxIdStr = match claimTxId { | |
89 | 89 | case b: ByteVector => | |
90 | 90 | toBase58String(b) | |
91 | 91 | case _: Unit => | |
92 | 92 | "SOON" | |
93 | 93 | case _ => | |
94 | 94 | throw("Match error") | |
95 | 95 | } | |
96 | 96 | makeString(["%s%d%d%s", status, toString(lpAssetAmount), toString(targetPeriod), claimTxIdStr], SEP) | |
97 | 97 | } | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func parseWithdrawalRequestValueOrFail (s) = { | |
101 | 101 | let parts = split(s, SEP) | |
102 | 102 | if ((size(parts) == 5)) | |
103 | 103 | then { | |
104 | 104 | let status = parts[1] | |
105 | 105 | let lpAssetAmount = valueOrErrorMessage(parseInt(parts[2]), wrapErr("invalid lpAssetAmount")) | |
106 | 106 | let targetPeriod = valueOrErrorMessage(parseInt(parts[3]), wrapErr("invalid targetPeriod")) | |
107 | 107 | let claimTxId = parts[4] | |
108 | 108 | $Tuple4(status, lpAssetAmount, targetPeriod, claimTxId) | |
109 | 109 | } | |
110 | 110 | else throwErr("invalid withdrawal request value") | |
111 | 111 | } | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | let factoryAddressOption = match getString(this, keyFactoryAddress()) { | |
115 | 115 | case s: String => | |
116 | 116 | addressFromString(s) | |
117 | 117 | case _: Unit => | |
118 | 118 | unit | |
119 | 119 | case _ => | |
120 | 120 | throw("Match error") | |
121 | 121 | } | |
122 | 122 | ||
123 | 123 | let factoryAddressOrFail = valueOrErrorMessage(factoryAddressOption, wrapErr("invalid factory address")) | |
124 | 124 | ||
125 | 125 | let lpAssetIdOption = match factoryAddressOption { | |
126 | 126 | case a: Address => | |
127 | 127 | match getString(a, keyLpAssetId()) { | |
128 | 128 | case s: String => | |
129 | 129 | fromBase58String(s) | |
130 | 130 | case _: Unit => | |
131 | 131 | unit | |
132 | 132 | case _ => | |
133 | 133 | throw("Match error") | |
134 | 134 | } | |
135 | 135 | case _: Unit => | |
136 | 136 | unit | |
137 | 137 | case _ => | |
138 | 138 | throw("Match error") | |
139 | 139 | } | |
140 | 140 | ||
141 | 141 | let lpAssetIdOrFail = valueOrErrorMessage(lpAssetIdOption, wrapErr("invalid lpAssetId")) | |
142 | 142 | ||
143 | 143 | let xtnAssetIdOption = match factoryAddressOption { | |
144 | 144 | case a: Address => | |
145 | 145 | match getString(a, keyXtnAssetId()) { | |
146 | 146 | case s: String => | |
147 | 147 | fromBase58String(s) | |
148 | 148 | case _: Unit => | |
149 | 149 | unit | |
150 | 150 | case _ => | |
151 | 151 | throw("Match error") | |
152 | 152 | } | |
153 | 153 | case _: Unit => | |
154 | 154 | unit | |
155 | 155 | case _ => | |
156 | 156 | throw("Match error") | |
157 | 157 | } | |
158 | 158 | ||
159 | 159 | let xtnAssetIdOrFail = valueOrErrorMessage(xtnAssetIdOption, wrapErr("invalid xtnAssetId")) | |
160 | 160 | ||
161 | 161 | let treasuryAddressOption = match factoryAddressOption { | |
162 | 162 | case a: Address => | |
163 | 163 | match getString(a, keyTreasuryAddress()) { | |
164 | 164 | case s: String => | |
165 | 165 | addressFromString(s) | |
166 | 166 | case _: Unit => | |
167 | 167 | unit | |
168 | 168 | case _ => | |
169 | 169 | throw("Match error") | |
170 | 170 | } | |
171 | 171 | case _: Unit => | |
172 | 172 | unit | |
173 | 173 | case _ => | |
174 | 174 | throw("Match error") | |
175 | 175 | } | |
176 | 176 | ||
177 | 177 | let treasuryAddressOrFail = valueOrErrorMessage(treasuryAddressOption, wrapErr("invalid treasury address")) | |
178 | 178 | ||
179 | 179 | func onlyAddress (i,address) = if ((i.caller == address)) | |
180 | 180 | then true | |
181 | 181 | else throwErr("permission denied") | |
182 | 182 | ||
183 | 183 | ||
184 | 184 | func onlyFactory (i) = onlyAddress(i, factoryAddressOrFail) | |
185 | 185 | ||
186 | 186 | ||
187 | 187 | func rewardForOption (rewards,target) = { | |
188 | 188 | let s = size(rewards) | |
189 | 189 | let $t040964121 = rewards[0] | |
190 | 190 | let a0 = $t040964121._1 | |
191 | 191 | let r0 = $t040964121._2 | |
192 | 192 | let $t041244149 = rewards[1] | |
193 | 193 | let a1 = $t041244149._1 | |
194 | 194 | let r1 = $t041244149._2 | |
195 | 195 | let $t041524177 = rewards[2] | |
196 | 196 | let a2 = $t041524177._1 | |
197 | 197 | let r2 = $t041524177._2 | |
198 | 198 | if (if ((s > 0)) | |
199 | 199 | then (a0 == target) | |
200 | 200 | else false) | |
201 | 201 | then r0 | |
202 | 202 | else if (if ((s > 1)) | |
203 | 203 | then (a1 == target) | |
204 | 204 | else false) | |
205 | 205 | then r1 | |
206 | 206 | else if (if ((s > 2)) | |
207 | 207 | then (a2 == target) | |
208 | 208 | else false) | |
209 | 209 | then r2 | |
210 | 210 | else unit | |
211 | 211 | } | |
212 | 212 | ||
213 | 213 | ||
214 | 214 | @Callable(i) | |
215 | 215 | func claimLP (userAddressBytes) = { | |
216 | 216 | let checkCaller = onlyFactory(i) | |
217 | 217 | if ((checkCaller == checkCaller)) | |
218 | 218 | then { | |
219 | 219 | let userAddress = Address(userAddressBytes) | |
220 | 220 | let available = valueOrElse(getInteger(factoryAddressOrFail, keyAvailable(userAddress)), 0) | |
221 | 221 | let claimed = valueOrElse(getInteger(factoryAddressOrFail, keyClaimed(userAddress)), 0) | |
222 | 222 | let factoryActions = if ((available > 0)) | |
223 | 223 | then [invoke(factoryAddressOrFail, "transferAsset", [userAddressBytes, available, lpAssetIdOrFail], nil), invoke(factoryAddressOrFail, "integerEntry", [keyAvailable(userAddress), 0], nil), invoke(factoryAddressOrFail, "integerEntry", [keyClaimed(userAddress), (claimed + available)], nil)] | |
224 | 224 | else throwErr("nothing to claim") | |
225 | 225 | $Tuple2(nil, factoryActions) | |
226 | 226 | } | |
227 | 227 | else throw("Strict value is not equal to itself.") | |
228 | 228 | } | |
229 | 229 | ||
230 | 230 | ||
231 | 231 | ||
232 | 232 | @Callable(i) | |
233 | 233 | func finalize (userAddressBytes,newTreasuryVolumeInWaves,xtnPrice,pwrManagersBonus,treasuryVolumeDiffAllocationCoef) = { | |
234 | 234 | let checkCaller = onlyFactory(i) | |
235 | 235 | if ((checkCaller == checkCaller)) | |
236 | 236 | then { | |
237 | 237 | let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period")) | |
238 | 238 | let periodLength = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPeriodLength()), wrapErr("invalid period length")) | |
239 | 239 | let currentStartHeight = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyStartHeight(currentPeriodOrFail)), wrapErr("invalid start height")) | |
240 | 240 | let currentPriceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(currentPeriodOrFail)), wrapErr("invalid price")) | |
241 | 241 | let nextBlockToProcess = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyNextBlockToProcess()), wrapErr("invalid next block to process")) | |
242 | 242 | let periodEndHeight = ((currentStartHeight + periodLength) - 1) | |
243 | 243 | let checks = [if ((i.originCaller == treasuryAddressOrFail)) | |
244 | 244 | then true | |
245 | 245 | else throwErr("permission denied"), if ((nextBlockToProcess > periodEndHeight)) | |
246 | 246 | then true | |
247 | 247 | else throwErr("unprocessed blocks"), if ((newTreasuryVolumeInWaves >= 0)) | |
248 | 248 | then true | |
249 | 249 | else throwErr("invalid new treasury volume"), if ((xtnPrice >= 0)) | |
250 | 250 | then true | |
251 | 251 | else throwErr("invalid XTN price"), if (if ((pwrManagersBonus >= 0)) | |
252 | 252 | then (SCALE8 >= pwrManagersBonus) | |
253 | 253 | else false) | |
254 | 254 | then true | |
255 | 255 | else throwErr("invalid PWR managers bonus"), if (if ((treasuryVolumeDiffAllocationCoef >= -(SCALE8))) | |
256 | 256 | then (SCALE8 >= treasuryVolumeDiffAllocationCoef) | |
257 | 257 | else false) | |
258 | 258 | then true | |
259 | 259 | else throwErr("invalid treasury volume diff allocation coefficient")] | |
260 | 260 | if ((checks == checks)) | |
261 | 261 | then { | |
262 | 262 | let investedXtnAmount = valueOrElse(getInteger(factoryAddressOrFail, keyInvested(xtnAssetIdOrFail)), 0) | |
263 | 263 | let investedWavesAmount = valueOrElse(getInteger(factoryAddressOrFail, keyInvested(unit)), 0) | |
264 | 264 | let investedXtnAmountInWaves = fraction(investedXtnAmount, xtnPrice, SCALE6) | |
265 | 265 | let currentTreasuryVolumeInWaves = (investedXtnAmountInWaves + investedWavesAmount) | |
266 | 266 | let profitRaw = (newTreasuryVolumeInWaves - currentTreasuryVolumeInWaves) | |
267 | 267 | let pwrManagersBonusAmount = if ((profitRaw > 0)) | |
268 | 268 | then fraction(profitRaw, pwrManagersBonus, SCALE8) | |
269 | 269 | else 0 | |
270 | 270 | let profit = (profitRaw - pwrManagersBonusAmount) | |
271 | 271 | let donationPart = if ((currentTreasuryVolumeInWaves > 0)) | |
272 | 272 | then fraction(investedXtnAmountInWaves, SCALE8, currentTreasuryVolumeInWaves) | |
273 | 273 | else 0 | |
274 | 274 | let donationProfitPartRaw = fraction(profit, donationPart, SCALE8) | |
275 | 275 | let investmentProfitPartRaw = (profit - donationProfitPartRaw) | |
276 | 276 | let treasuryVolumeDiffAllocationCoefAbs = abs(treasuryVolumeDiffAllocationCoef) | |
277 | 277 | let amountToDonation = fraction(investmentProfitPartRaw, if ((0 > treasuryVolumeDiffAllocationCoef)) | |
278 | 278 | then treasuryVolumeDiffAllocationCoefAbs | |
279 | 279 | else 0, SCALE8) | |
280 | 280 | let amountToInvestment = fraction(donationProfitPartRaw, if ((treasuryVolumeDiffAllocationCoef > 0)) | |
281 | 281 | then treasuryVolumeDiffAllocationCoefAbs | |
282 | 282 | else 0, SCALE8) | |
283 | 283 | let donationProfitPart = ((donationProfitPartRaw - amountToInvestment) + amountToDonation) | |
284 | 284 | let investmentProfitPart = ((investmentProfitPartRaw - amountToDonation) + amountToInvestment) | |
285 | 285 | let investedWavesAmountNew = (investedWavesAmount + investmentProfitPart) | |
286 | 286 | let investedXtnAmountNew = fraction((investedXtnAmountInWaves + donationProfitPart), SCALE6, xtnPrice) | |
287 | 287 | let newPeriod = (currentPeriodOrFail + 1) | |
288 | 288 | let lpAssetQuantity = valueOrErrorMessage(assetInfo(lpAssetIdOrFail), wrapErr("invalid lpAsset info")).quantity | |
289 | 289 | let newPrice = fraction(investedWavesAmountNew, SCALE8, lpAssetQuantity) | |
290 | 290 | let lpAssetAmountToBurn = valueOrElse(getInteger(factoryAddressOrFail, keyWithdrawal()), 0) | |
291 | 291 | let paymentAmountMin = max([0, fraction(lpAssetAmountToBurn, newPrice, SCALE8)]) | |
292 | 292 | let checkPaymentAmount = if (if ((paymentAmountMin == 0)) | |
293 | 293 | then true | |
294 | 294 | else if (if ((size(i.payments) == 1)) | |
295 | 295 | then (i.payments[0].assetId == unit) | |
296 | 296 | else false) | |
297 | 297 | then (i.payments[0].amount >= paymentAmountMin) | |
298 | 298 | else false) | |
299 | 299 | then true | |
300 | 300 | else throwErr(("invalid payments, payment amount min: " + toString(paymentAmountMin))) | |
301 | 301 | if ((checkPaymentAmount == checkPaymentAmount)) | |
302 | 302 | then { | |
303 | 303 | let factoryActions = [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)] | |
304 | 304 | $Tuple2(nil, factoryActions) | |
305 | 305 | } | |
306 | 306 | else throw("Strict value is not equal to itself.") | |
307 | 307 | } | |
308 | 308 | else throw("Strict value is not equal to itself.") | |
309 | 309 | } | |
310 | 310 | else throw("Strict value is not equal to itself.") | |
311 | 311 | } | |
312 | 312 | ||
313 | 313 | ||
314 | 314 | ||
315 | 315 | @Callable(i) | |
316 | 316 | func invest (userAddressBytes) = { | |
317 | 317 | let checkCaller = onlyFactory(i) | |
318 | 318 | if ((checkCaller == checkCaller)) | |
319 | 319 | then { | |
320 | 320 | let userAddress = Address(userAddressBytes) | |
321 | 321 | let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period")) | |
322 | 322 | let currentPriceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(currentPeriodOrFail)), wrapErr("invalid price")) | |
323 | 323 | let payment = if ((size(i.payments) == 1)) | |
324 | 324 | then i.payments[0] | |
325 | 325 | else throwErr("invalid payments") | |
326 | 326 | let paymentAmount = if (if ((payment.assetId == unit)) | |
327 | 327 | then (payment.amount > 0) | |
328 | 328 | else false) | |
329 | 329 | then payment.amount | |
330 | 330 | else throwErr("invalid payment amount") | |
331 | 331 | let lpAssetAmount = if ((currentPriceOrFail > 0)) | |
332 | 332 | then fraction(paymentAmount, SCALE8, currentPriceOrFail) | |
333 | 333 | else 0 | |
334 | 334 | let invested = valueOrElse(getInteger(factoryAddressOrFail, keyInvested(unit)), 0) | |
335 | 335 | let factoryActions = [invoke(factoryAddressOrFail, "integerEntry", [keyInvested(unit), (invested + paymentAmount)], nil), invoke(factoryAddressOrFail, "reissue", [lpAssetAmount], nil), invoke(factoryAddressOrFail, "transferAsset", [userAddressBytes, lpAssetAmount, lpAssetIdOrFail], nil), invoke(factoryAddressOrFail, "transferWaves", [treasuryAddressOrFail.bytes, paymentAmount], [AttachedPayment(unit, paymentAmount)])] | |
336 | 336 | $Tuple2(nil, factoryActions) | |
337 | 337 | } | |
338 | 338 | else throw("Strict value is not equal to itself.") | |
339 | 339 | } | |
340 | 340 | ||
341 | 341 | ||
342 | 342 | ||
343 | 343 | @Callable(i) | |
344 | 344 | func withdraw (userAddressBytes) = { | |
345 | 345 | let checkCaller = onlyFactory(i) | |
346 | 346 | if ((checkCaller == checkCaller)) | |
347 | 347 | then { | |
348 | 348 | let userAddress = Address(userAddressBytes) | |
349 | 349 | let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period")) | |
350 | 350 | let payment = if ((size(i.payments) == 1)) | |
351 | 351 | then i.payments[0] | |
352 | 352 | else throwErr(wrapErr("invalid payments")) | |
353 | 353 | let paymentAssetId = if ((payment.assetId == lpAssetIdOrFail)) | |
354 | 354 | then lpAssetIdOrFail | |
355 | 355 | else throwErr("invalid payment asset") | |
356 | 356 | let paymentAmount = if ((payment.amount > 0)) | |
357 | 357 | then payment.amount | |
358 | 358 | else throwErr("invalid payment amount") | |
359 | 359 | let withdrawal = valueOrElse(getInteger(factoryAddressOrFail, keyWithdrawal()), 0) | |
360 | 360 | let factoryActions = [invoke(factoryAddressOrFail, "integerEntry", [keyWithdrawal(), (withdrawal + paymentAmount)], nil), invoke(factoryAddressOrFail, "stringEntry", [keyWithdrawalRequest(userAddress, i.transactionId), valueWithdrawalRequest(PENDING, paymentAmount, (currentPeriodOrFail + 1), unit)], nil)] | |
361 | 361 | if ((factoryActions == factoryActions)) | |
362 | 362 | then $Tuple2([ScriptTransfer(factoryAddressOrFail, paymentAmount, paymentAssetId)], factoryActions) | |
363 | 363 | else throw("Strict value is not equal to itself.") | |
364 | 364 | } | |
365 | 365 | else throw("Strict value is not equal to itself.") | |
366 | 366 | } | |
367 | 367 | ||
368 | 368 | ||
369 | 369 | ||
370 | 370 | @Callable(i) | |
371 | 371 | func cancelWithdraw (userAddressBytes,txId) = { | |
372 | 372 | let checkCaller = onlyFactory(i) | |
373 | 373 | if ((checkCaller == checkCaller)) | |
374 | 374 | then { | |
375 | 375 | let userAddress = Address(userAddressBytes) | |
376 | 376 | let withdrawalRequestOption = valueOrErrorMessage(getString(factoryAddressOrFail, keyWithdrawalRequest(userAddress, txId)), wrapErr("invalid withdrawal request")) | |
377 | 377 | let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period")) | |
378 | 378 | let $t01330013413 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption) | |
379 | 379 | let status = $t01330013413._1 | |
380 | 380 | let lpAssetAmount = $t01330013413._2 | |
381 | 381 | let targetPeriod = $t01330013413._3 | |
382 | 382 | let claimTxId = $t01330013413._4 | |
383 | 383 | let checks = [if ((status == PENDING)) | |
384 | 384 | then true | |
385 | 385 | else throwErr("invalid withdrawal request status"), if ((targetPeriod > currentPeriodOrFail)) | |
386 | 386 | then true | |
387 | 387 | else throwErr("invalid withdrawal request period")] | |
388 | 388 | if ((checks == checks)) | |
389 | 389 | then { | |
390 | 390 | let withdrawal = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyWithdrawal()), wrapErr("invalid total withdrawal amount")) | |
391 | 391 | let factoryActions = [invoke(factoryAddressOrFail, "integerEntry", [keyWithdrawal(), if ((withdrawal >= lpAssetAmount)) | |
392 | 392 | then (withdrawal - lpAssetAmount) | |
393 | 393 | else throwErr("invalid withdrawal amount")], nil), invoke(factoryAddressOrFail, "deleteEntry", [keyWithdrawalRequest(userAddress, txId)], nil), invoke(factoryAddressOrFail, "transferAsset", [userAddressBytes, lpAssetAmount, lpAssetIdOrFail], nil)] | |
394 | 394 | if ((factoryActions == factoryActions)) | |
395 | 395 | then $Tuple2(nil, factoryActions) | |
396 | 396 | else throw("Strict value is not equal to itself.") | |
397 | 397 | } | |
398 | 398 | else throw("Strict value is not equal to itself.") | |
399 | 399 | } | |
400 | 400 | else throw("Strict value is not equal to itself.") | |
401 | 401 | } | |
402 | 402 | ||
403 | 403 | ||
404 | 404 | ||
405 | 405 | @Callable(i) | |
406 | 406 | func claimWaves (userAddressBytes,txId) = { | |
407 | 407 | let checkCaller = onlyFactory(i) | |
408 | 408 | if ((checkCaller == checkCaller)) | |
409 | 409 | then { | |
410 | 410 | let userAddress = Address(userAddressBytes) | |
411 | 411 | let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period")) | |
412 | 412 | let withdrawalRequestOption = valueOrErrorMessage(getString(factoryAddressOrFail, keyWithdrawalRequest(userAddress, txId)), wrapErr("invalid withdrawal request")) | |
413 | 413 | let $t01474514858 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption) | |
414 | 414 | let status = $t01474514858._1 | |
415 | 415 | let lpAssetAmount = $t01474514858._2 | |
416 | 416 | let targetPeriod = $t01474514858._3 | |
417 | 417 | let claimTxId = $t01474514858._4 | |
418 | 418 | if ((status == FINISHED)) | |
419 | 419 | then throwErr("invalid withdrawal request status") | |
420 | 420 | else if ((targetPeriod > currentPeriodOrFail)) | |
421 | 421 | then throwErr("invalid withdrawal request period") | |
422 | 422 | else { | |
423 | 423 | let priceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(targetPeriod)), wrapErr("invalid price")) | |
424 | 424 | let amount = if ((priceOrFail > 0)) | |
425 | 425 | then fraction(lpAssetAmount, priceOrFail, SCALE8) | |
426 | 426 | else 0 | |
427 | 427 | let factoryActions = [invoke(factoryAddressOrFail, "stringEntry", [keyWithdrawalRequest(userAddress, txId), valueWithdrawalRequest(FINISHED, lpAssetAmount, targetPeriod, i.transactionId)], nil), invoke(factoryAddressOrFail, "burn", [lpAssetAmount], nil), invoke(factoryAddressOrFail, "transferWaves", [userAddressBytes, amount], nil)] | |
428 | 428 | $Tuple2(nil, factoryActions) | |
429 | 429 | } | |
430 | 430 | } | |
431 | 431 | else throw("Strict value is not equal to itself.") | |
432 | 432 | } | |
433 | 433 | ||
434 | 434 | ||
435 | 435 | ||
436 | 436 | @Callable(i) | |
437 | 437 | func processBlocks (userAddressBytes) = { | |
438 | 438 | let checkCaller = onlyFactory(i) | |
439 | 439 | if ((checkCaller == checkCaller)) | |
440 | 440 | then { | |
441 | 441 | let userAddress = Address(userAddressBytes) | |
442 | 442 | let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period")) | |
443 | 443 | let periodLength = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPeriodLength()), wrapErr("invalid period length")) | |
444 | 444 | let currentStartHeight = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyStartHeight(currentPeriodOrFail)), wrapErr("invalid start height")) | |
445 | 445 | let currentPriceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(currentPeriodOrFail)), wrapErr("invalid price")) | |
446 | 446 | let nextBlockToProcess = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyNextBlockToProcess()), wrapErr("invalid next block to process")) | |
447 | 447 | let periodEndHeight = ((currentStartHeight + periodLength) - 1) | |
448 | 448 | let blocksProcessingBatchSizeMax = 40 | |
449 | 449 | let blocksProcessingBatchSize = if (if (if ((height >= nextBlockToProcess)) | |
450 | 450 | then if ((nextBlockToProcess >= currentStartHeight)) | |
451 | 451 | then true | |
452 | 452 | else (currentPeriodOrFail == 0) | |
453 | 453 | else false) | |
454 | 454 | then (periodEndHeight >= nextBlockToProcess) | |
455 | 455 | else false) | |
456 | 456 | then min([((periodEndHeight - nextBlockToProcess) + 1), blocksProcessingBatchSizeMax]) | |
457 | 457 | else throwErr(wrapErr("invalid target block")) | |
458 | 458 | let blockProcessingReward = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyBlockProcessingReward()), wrapErr("invalid block processing reward")) | |
459 | 459 | let blockProcessingRewardByGenerator = (blockProcessingReward / blocksProcessingBatchSize) | |
460 | 460 | let blockProcessingRewardByGeneratorRemainder = (blockProcessingReward - (blockProcessingRewardByGenerator * blocksProcessingBatchSize)) | |
461 | 461 | func map (acc,inc) = if ((inc >= blocksProcessingBatchSize)) | |
462 | 462 | then acc | |
463 | 463 | else { | |
464 | 464 | let targetBlockHeight = (nextBlockToProcess + inc) | |
465 | 465 | let targetBlockInfo = valueOrErrorMessage(blockInfoByHeight(targetBlockHeight), wrapErr("invalid block info")) | |
466 | 466 | let treasuryRewardOrFail = valueOrErrorMessage(rewardForOption(targetBlockInfo.rewards, treasuryAddressOrFail), wrapErr(("invalid treasury reward for height " + toString(targetBlockHeight)))) | |
467 | 467 | let generator = targetBlockInfo.generator | |
468 | 468 | let available = valueOrElse(getInteger(factoryAddressOrFail, keyAvailable(generator)), 0) | |
469 | 469 | let callerReward = if ((inc == (blocksProcessingBatchSize - 1))) | |
470 | 470 | then (blockProcessingRewardByGenerator + blockProcessingRewardByGeneratorRemainder) | |
471 | 471 | else blockProcessingRewardByGenerator | |
472 | 472 | let lpAssetAmount = if ((currentPriceOrFail > 0)) | |
473 | 473 | then fraction((treasuryRewardOrFail - callerReward), SCALE8, currentPriceOrFail) | |
474 | 474 | else 0 | |
475 | - | let factoryActionsSingle = [invoke(factoryAddressOrFail, "stringEntry", [keyBlockProcessed(targetBlockHeight), makeString([toBase58String(i.transactionId), toBase58String(userAddressBytes), toString(treasuryRewardOrFail), toString(callerReward), toString(lpAssetAmount)], SEP)], nil), invoke(factoryAddressOrFail, "integerEntry", [keyAvailable(generator), (available + lpAssetAmount)], nil)] | |
475 | + | 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)] | |
476 | 476 | if ((factoryActionsSingle == factoryActionsSingle)) | |
477 | 477 | then (acc + lpAssetAmount) | |
478 | 478 | else throw("Strict value is not equal to itself.") | |
479 | 479 | } | |
480 | 480 | ||
481 | 481 | 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] | |
482 | 482 | let lpAssetAmountTotal = { | |
483 | 483 | let $l = list | |
484 | 484 | let $s = size($l) | |
485 | 485 | let $acc0 = 0 | |
486 | 486 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
487 | 487 | then $a | |
488 | 488 | else map($a, $l[$i]) | |
489 | 489 | ||
490 | 490 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
491 | 491 | then $a | |
492 | 492 | else throw("List size exceeds 40") | |
493 | 493 | ||
494 | 494 | $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) | |
495 | 495 | } | |
496 | 496 | if ((lpAssetAmountTotal == lpAssetAmountTotal)) | |
497 | 497 | then { | |
498 | 498 | let actions = [invoke(factoryAddressOrFail, "transferWaves", [userAddressBytes, blockProcessingReward], nil), invoke(factoryAddressOrFail, "reissue", [lpAssetAmountTotal], nil), invoke(factoryAddressOrFail, "integerEntry", [keyNextBlockToProcess(), (nextBlockToProcess + blocksProcessingBatchSize)], nil)] | |
499 | 499 | if ((actions == actions)) | |
500 | 500 | then $Tuple2(nil, unit) | |
501 | 501 | else throw("Strict value is not equal to itself.") | |
502 | 502 | } | |
503 | 503 | else throw("Strict value is not equal to itself.") | |
504 | 504 | } | |
505 | 505 | else throw("Strict value is not equal to itself.") | |
506 | 506 | } | |
507 | 507 | ||
508 | 508 | ||
509 | 509 | @Verifier(tx) | |
510 | 510 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
511 | 511 |
github/deemru/w8io/026f985 118.38 ms ◑