tx · HhKNyXaTEfB9NFUSwjYCwTkFkx1F9pTvVgiKFeQ6dYht

3N6HSS7Toat1RhyEsyqVGgVSRzH19W1FTbP:  -0.01900000 Waves

2023.06.22 12:30 [2633664] smart account 3N6HSS7Toat1RhyEsyqVGgVSRzH19W1FTbP > SELF 0.00000000 Waves

{ "type": 13, "id": "HhKNyXaTEfB9NFUSwjYCwTkFkx1F9pTvVgiKFeQ6dYht", "fee": 1900000, "feeAssetId": null, "timestamp": 1687426281608, "version": 2, "chainId": 84, "sender": "3N6HSS7Toat1RhyEsyqVGgVSRzH19W1FTbP", "senderPublicKey": "AoKo4segKHU4DeJnxXQYJj2u7J6XJeux6r8KLW52cd2Q", "proofs": [ "4CT3v2zqAS6ViczAr78Y7XNaHtka7ZZ1DJuRMWrh8MbxBpgSZGRQWEv6Z95NxcZGEq5w66bgfBygsUbuEiChaz6P" ], "script": "base64:BwIrCAISAwoBAhIHCgUCAQEBARIDCgECEgMKAQISBAoCAgISBAoCAgISAwoBAikAA1NFUAICX18ADUNPTlRSQUNUX05BTUUCD2NhbGN1bGF0b3IucmlkZQAGU0NBTEU4AIDC1y8AB1BFTkRJTkcCB1BFTkRJTkcACEZJTklTSEVEAghGSU5JU0hFRAAFV0FWRVMCBVdBVkVTAA13YXZlc0RlY2ltYWxzAAgAC3h0bkRlY2ltYWxzAAYBB3dyYXBFcnIBAXMJAKwCAgkArAICBQ1DT05UUkFDVF9OQU1FAgI6IAUBcwEIdGhyb3dFcnIBAXMJAAIBCQEHd3JhcEVycgEFAXMBD2Fzc2V0SWRUb1N0cmluZwEHYXNzZXRJZAQHJG1hdGNoMAUHYXNzZXRJZAMJAAECBQckbWF0Y2gwAgpCeXRlVmVjdG9yBAFiBQckbWF0Y2gwCQDYBAEFAWIDCQABAgUHJG1hdGNoMAIEVW5pdAUFV0FWRVMJAAIBAgtNYXRjaCBlcnJvcgEDYWJzAQFuAwkAZgIAAAUBbgkBAS0BBQFuBQFuARFrZXlGYWN0b3J5QWRkcm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ZWdlckVudHJ5CQDMCAIJARVrZXlOZXh0QmxvY2tUb1Byb2Nlc3MACQDMCAIJAGQCBRJuZXh0QmxvY2tUb1Byb2Nlc3MFGWJsb2Nrc1Byb2Nlc3NpbmdCYXRjaFNpemUFA25pbAUDbmlsBQNuaWwDCQAAAgUHYWN0aW9ucwUHYWN0aW9ucwkAlAoCBQNuaWwFBHVuaXQJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5GV7SCg==", "height": 2633664, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BrRNVGS6tk4V9Ri3MbwPXjBDSpewSt9dohMQPrcWqqvq Next: 7ZnmG9nsCR5qWzhQqeoZZSTe3kBgc8DbjD3uaYPyc9fA Diff:
OldNewDifferences
1212 let FINISHED = "FINISHED"
1313
1414 let WAVES = "WAVES"
15+
16+let wavesDecimals = 8
17+
18+let xtnDecimals = 6
1519
1620 func wrapErr (s) = ((CONTRACT_NAME + ": ") + s)
1721
184188
185189 func rewardForOption (rewards,target) = {
186190 let s = size(rewards)
187- let $t040734098 = rewards[0]
188- let a0 = $t040734098._1
189- let r0 = $t040734098._2
190- let $t041014126 = rewards[1]
191- let a1 = $t041014126._1
192- let r1 = $t041014126._2
193- let $t041294154 = rewards[2]
194- let a2 = $t041294154._1
195- let r2 = $t041294154._2
191+ let $t041154140 = rewards[0]
192+ let a0 = $t041154140._1
193+ let r0 = $t041154140._2
194+ let $t041434168 = rewards[1]
195+ let a1 = $t041434168._1
196+ let r1 = $t041434168._2
197+ let $t041714196 = rewards[2]
198+ let a2 = $t041714196._1
199+ let r2 = $t041714196._2
196200 if (if ((s > 0))
197201 then (a0 == target)
198202 else false)
259263 then {
260264 let investedXtnAmount = valueOrElse(getInteger(factoryAddressOrFail, keyInvested(xtnAssetIdOrFail)), 0)
261265 let investedWavesAmount = valueOrElse(getInteger(factoryAddressOrFail, keyInvested(unit)), 0)
262- let investedXtnAmountInWaves = fraction(investedXtnAmount, xtnPrice, SCALE8)
266+ let investedXtnAmountInWaves = fraction(investedXtnAmount, (xtnPrice * wavesDecimals), (SCALE8 * xtnDecimals))
263267 let currentTreasuryVolumeInWaves = (investedXtnAmountInWaves + investedWavesAmount)
264268 let profitRaw = (newTreasuryVolumeInWaves - currentTreasuryVolumeInWaves)
265269 let pwrManagersBonusAmount = if ((profitRaw > 0))
281285 let donationProfitPart = ((donationProfitPartRaw - amountToInvestment) + amountToDonation)
282286 let investmentProfitPart = ((investmentProfitPartRaw - amountToDonation) + amountToInvestment)
283287 let investedWavesAmountNew = (investedWavesAmount + investmentProfitPart)
284- let investedXtnAmountNew = fraction((investedXtnAmountInWaves + donationProfitPart), SCALE8, xtnPrice)
288+ let investedXtnAmountNew = fraction((investedXtnAmountInWaves + donationProfitPart), (SCALE8 * xtnDecimals), (xtnPrice * wavesDecimals))
285289 let newPeriod = (currentPeriodOrFail + 1)
286290 let lpAssetQuantity = valueOrErrorMessage(assetInfo(lpAssetIdOrFail), wrapErr("invalid lpAsset info")).quantity
287291 let newPrice = fraction(investedWavesAmountNew, SCALE8, lpAssetQuantity)
373377 let userAddress = Address(userAddressBytes)
374378 let withdrawalRequestOption = valueOrErrorMessage(getString(factoryAddressOrFail, keyWithdrawalRequest(userAddress, txId)), wrapErr("invalid withdrawal request"))
375379 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
376- let $t01295613069 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
377- let status = $t01295613069._1
378- let lpAssetAmount = $t01295613069._2
379- let targetPeriod = $t01295613069._3
380- let claimTxId = $t01295613069._4
380+ let $t01307413187 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
381+ let status = $t01307413187._1
382+ let lpAssetAmount = $t01307413187._2
383+ let targetPeriod = $t01307413187._3
384+ let claimTxId = $t01307413187._4
381385 let checks = [if ((status == PENDING))
382386 then true
383387 else throwErr("invalid withdrawal request status"), if ((targetPeriod > currentPeriodOrFail))
408412 let userAddress = Address(userAddressBytes)
409413 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
410414 let withdrawalRequestOption = valueOrErrorMessage(getString(factoryAddressOrFail, keyWithdrawalRequest(userAddress, txId)), wrapErr("invalid withdrawal request"))
411- let $t01440114514 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
412- let status = $t01440114514._1
413- let lpAssetAmount = $t01440114514._2
414- let targetPeriod = $t01440114514._3
415- let claimTxId = $t01440114514._4
415+ let $t01451914632 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
416+ let status = $t01451914632._1
417+ let lpAssetAmount = $t01451914632._2
418+ let targetPeriod = $t01451914632._3
419+ let claimTxId = $t01451914632._4
416420 if ((status == FINISHED))
417421 then throwErr("invalid withdrawal request status")
418422 else if ((targetPeriod > currentPeriodOrFail))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 7 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 let CONTRACT_NAME = "calculator.ride"
77
88 let SCALE8 = 100000000
99
1010 let PENDING = "PENDING"
1111
1212 let FINISHED = "FINISHED"
1313
1414 let WAVES = "WAVES"
15+
16+let wavesDecimals = 8
17+
18+let xtnDecimals = 6
1519
1620 func wrapErr (s) = ((CONTRACT_NAME + ": ") + s)
1721
1822
1923 func throwErr (s) = throw(wrapErr(s))
2024
2125
2226 func assetIdToString (assetId) = match assetId {
2327 case b: ByteVector =>
2428 toBase58String(b)
2529 case _: Unit =>
2630 WAVES
2731 case _ =>
2832 throw("Match error")
2933 }
3034
3135
3236 func abs (n) = if ((0 > n))
3337 then -(n)
3438 else n
3539
3640
3741 func keyFactoryAddress () = makeString(["%s", "factory"], SEP)
3842
3943
4044 func keyLpAssetId () = makeString(["%s", "lpAssetId"], SEP)
4145
4246
4347 func keyXtnAssetId () = makeString(["%s", "xtnAssetId"], SEP)
4448
4549
4650 func keyTreasuryAddress () = makeString(["%s", "treasury"], SEP)
4751
4852
4953 func keyInvested (assetId) = makeString(["%s%s", "invested", assetIdToString(assetId)], SEP)
5054
5155
5256 func keyAvailable (userAddress) = makeString(["%s%s", "available", toString(userAddress)], SEP)
5357
5458
5559 func keyClaimed (userAddress) = makeString(["%s%s", "claimed", toString(userAddress)], SEP)
5660
5761
5862 func keyCurrentPeriod () = makeString(["%s", "currentPeriod"], SEP)
5963
6064
6165 func keyPriceForPeriod (period) = makeString(["%s%d", "price", toString(period)], SEP)
6266
6367
6468 func keyStartHeight (period) = makeString(["%s%d", "startHeight", toString(period)], SEP)
6569
6670
6771 func keyPeriodLength () = "%s__periodLength"
6872
6973
7074 func keyBlockProcessingReward () = "%s__blockProcessingReward"
7175
7276
7377 func keyNextBlockToProcess () = "%s__nextBlockToProcess"
7478
7579
7680 func keyBlockProcessed (height) = makeString(["%s%d", "blockProcessed", toString(height)], SEP)
7781
7882
7983 func keyWithdrawal () = "%s__withdrawal"
8084
8185
8286 func keyWithdrawalRequest (userAddress,txId) = makeString(["%s%s%s", "withdrawal", toString(userAddress), toBase58String(txId)], SEP)
8387
8488
8589 func valueWithdrawalRequest (status,lpAssetAmount,targetPeriod,claimTxId) = {
8690 let claimTxIdStr = match claimTxId {
8791 case b: ByteVector =>
8892 toBase58String(b)
8993 case _: Unit =>
9094 "SOON"
9195 case _ =>
9296 throw("Match error")
9397 }
9498 makeString(["%s%d%d%s", status, toString(lpAssetAmount), toString(targetPeriod), claimTxIdStr], SEP)
9599 }
96100
97101
98102 func parseWithdrawalRequestValueOrFail (s) = {
99103 let parts = split(s, SEP)
100104 if ((size(parts) == 5))
101105 then {
102106 let status = parts[1]
103107 let lpAssetAmount = valueOrErrorMessage(parseInt(parts[2]), wrapErr("invalid lpAssetAmount"))
104108 let targetPeriod = valueOrErrorMessage(parseInt(parts[3]), wrapErr("invalid targetPeriod"))
105109 let claimTxId = parts[4]
106110 $Tuple4(status, lpAssetAmount, targetPeriod, claimTxId)
107111 }
108112 else throwErr("invalid withdrawal request value")
109113 }
110114
111115
112116 let factoryAddressOption = match getString(this, keyFactoryAddress()) {
113117 case s: String =>
114118 addressFromString(s)
115119 case _: Unit =>
116120 unit
117121 case _ =>
118122 throw("Match error")
119123 }
120124
121125 let factoryAddressOrFail = valueOrErrorMessage(factoryAddressOption, wrapErr("invalid factory address"))
122126
123127 let lpAssetIdOption = match factoryAddressOption {
124128 case a: Address =>
125129 match getString(a, keyLpAssetId()) {
126130 case s: String =>
127131 fromBase58String(s)
128132 case _: Unit =>
129133 unit
130134 case _ =>
131135 throw("Match error")
132136 }
133137 case _: Unit =>
134138 unit
135139 case _ =>
136140 throw("Match error")
137141 }
138142
139143 let lpAssetIdOrFail = valueOrErrorMessage(lpAssetIdOption, wrapErr("invalid lpAssetId"))
140144
141145 let xtnAssetIdOption = match factoryAddressOption {
142146 case a: Address =>
143147 match getString(a, keyXtnAssetId()) {
144148 case s: String =>
145149 fromBase58String(s)
146150 case _: Unit =>
147151 unit
148152 case _ =>
149153 throw("Match error")
150154 }
151155 case _: Unit =>
152156 unit
153157 case _ =>
154158 throw("Match error")
155159 }
156160
157161 let xtnAssetIdOrFail = valueOrErrorMessage(xtnAssetIdOption, wrapErr("invalid xtnAssetId"))
158162
159163 let treasuryAddressOption = match factoryAddressOption {
160164 case a: Address =>
161165 match getString(a, keyTreasuryAddress()) {
162166 case s: String =>
163167 addressFromString(s)
164168 case _: Unit =>
165169 unit
166170 case _ =>
167171 throw("Match error")
168172 }
169173 case _: Unit =>
170174 unit
171175 case _ =>
172176 throw("Match error")
173177 }
174178
175179 let treasuryAddressOrFail = valueOrErrorMessage(treasuryAddressOption, wrapErr("invalid treasury address"))
176180
177181 func onlyAddress (i,address) = if ((i.caller == address))
178182 then true
179183 else throwErr("permission denied")
180184
181185
182186 func onlyFactory (i) = onlyAddress(i, factoryAddressOrFail)
183187
184188
185189 func rewardForOption (rewards,target) = {
186190 let s = size(rewards)
187- let $t040734098 = rewards[0]
188- let a0 = $t040734098._1
189- let r0 = $t040734098._2
190- let $t041014126 = rewards[1]
191- let a1 = $t041014126._1
192- let r1 = $t041014126._2
193- let $t041294154 = rewards[2]
194- let a2 = $t041294154._1
195- let r2 = $t041294154._2
191+ let $t041154140 = rewards[0]
192+ let a0 = $t041154140._1
193+ let r0 = $t041154140._2
194+ let $t041434168 = rewards[1]
195+ let a1 = $t041434168._1
196+ let r1 = $t041434168._2
197+ let $t041714196 = rewards[2]
198+ let a2 = $t041714196._1
199+ let r2 = $t041714196._2
196200 if (if ((s > 0))
197201 then (a0 == target)
198202 else false)
199203 then r0
200204 else if (if ((s > 1))
201205 then (a1 == target)
202206 else false)
203207 then r1
204208 else if (if ((s > 2))
205209 then (a2 == target)
206210 else false)
207211 then r2
208212 else unit
209213 }
210214
211215
212216 @Callable(i)
213217 func claimLP (userAddressBytes) = {
214218 let checkCaller = onlyFactory(i)
215219 if ((checkCaller == checkCaller))
216220 then {
217221 let userAddress = Address(userAddressBytes)
218222 let available = valueOrElse(getInteger(factoryAddressOrFail, keyAvailable(userAddress)), 0)
219223 let claimed = valueOrElse(getInteger(factoryAddressOrFail, keyClaimed(userAddress)), 0)
220224 let factoryActions = if ((available > 0))
221225 then [invoke(factoryAddressOrFail, "transferAsset", [userAddressBytes, available, lpAssetIdOrFail], nil), invoke(factoryAddressOrFail, "integerEntry", [keyAvailable(userAddress), 0], nil), invoke(factoryAddressOrFail, "integerEntry", [keyClaimed(userAddress), (claimed + available)], nil)]
222226 else throwErr("nothing to claim")
223227 $Tuple2(nil, factoryActions)
224228 }
225229 else throw("Strict value is not equal to itself.")
226230 }
227231
228232
229233
230234 @Callable(i)
231235 func finalize (userAddressBytes,newTreasuryVolumeInWaves,xtnPrice,pwrManagersBonus,treasuryVolumeDiffAllocationCoef) = {
232236 let checkCaller = onlyFactory(i)
233237 if ((checkCaller == checkCaller))
234238 then {
235239 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
236240 let periodLength = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPeriodLength()), wrapErr("invalid period length"))
237241 let currentStartHeight = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyStartHeight(currentPeriodOrFail)), wrapErr("invalid start height"))
238242 let currentPriceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(currentPeriodOrFail)), wrapErr("invalid price"))
239243 let nextBlockToProcess = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyNextBlockToProcess()), wrapErr("invalid next block to process"))
240244 let periodEndHeight = ((currentStartHeight + periodLength) - 1)
241245 let checks = [if ((i.originCaller == treasuryAddressOrFail))
242246 then true
243247 else throwErr("permission denied"), if ((nextBlockToProcess > periodEndHeight))
244248 then true
245249 else throwErr("unprocessed blocks"), if ((newTreasuryVolumeInWaves >= 0))
246250 then true
247251 else throwErr("invalid new treasury volume"), if ((xtnPrice >= 0))
248252 then true
249253 else throwErr("invalid XTN price"), if (if ((pwrManagersBonus >= 0))
250254 then (SCALE8 >= pwrManagersBonus)
251255 else false)
252256 then true
253257 else throwErr("invalid PWR managers bonus"), if (if ((treasuryVolumeDiffAllocationCoef >= -(SCALE8)))
254258 then (SCALE8 >= treasuryVolumeDiffAllocationCoef)
255259 else false)
256260 then true
257261 else throwErr("invalid treasury volume diff allocation coefficient")]
258262 if ((checks == checks))
259263 then {
260264 let investedXtnAmount = valueOrElse(getInteger(factoryAddressOrFail, keyInvested(xtnAssetIdOrFail)), 0)
261265 let investedWavesAmount = valueOrElse(getInteger(factoryAddressOrFail, keyInvested(unit)), 0)
262- let investedXtnAmountInWaves = fraction(investedXtnAmount, xtnPrice, SCALE8)
266+ let investedXtnAmountInWaves = fraction(investedXtnAmount, (xtnPrice * wavesDecimals), (SCALE8 * xtnDecimals))
263267 let currentTreasuryVolumeInWaves = (investedXtnAmountInWaves + investedWavesAmount)
264268 let profitRaw = (newTreasuryVolumeInWaves - currentTreasuryVolumeInWaves)
265269 let pwrManagersBonusAmount = if ((profitRaw > 0))
266270 then fraction(profitRaw, pwrManagersBonus, SCALE8)
267271 else 0
268272 let profit = (profitRaw - pwrManagersBonusAmount)
269273 let donationPart = if ((currentTreasuryVolumeInWaves > 0))
270274 then fraction(investedXtnAmountInWaves, SCALE8, currentTreasuryVolumeInWaves)
271275 else 0
272276 let donationProfitPartRaw = fraction(profit, donationPart, SCALE8)
273277 let investmentProfitPartRaw = (profit - donationProfitPartRaw)
274278 let treasuryVolumeDiffAllocationCoefAbs = abs(treasuryVolumeDiffAllocationCoef)
275279 let amountToDonation = fraction(investmentProfitPartRaw, if ((0 > treasuryVolumeDiffAllocationCoef))
276280 then treasuryVolumeDiffAllocationCoefAbs
277281 else 0, SCALE8)
278282 let amountToInvestment = fraction(donationProfitPartRaw, if ((treasuryVolumeDiffAllocationCoef > 0))
279283 then treasuryVolumeDiffAllocationCoefAbs
280284 else 0, SCALE8)
281285 let donationProfitPart = ((donationProfitPartRaw - amountToInvestment) + amountToDonation)
282286 let investmentProfitPart = ((investmentProfitPartRaw - amountToDonation) + amountToInvestment)
283287 let investedWavesAmountNew = (investedWavesAmount + investmentProfitPart)
284- let investedXtnAmountNew = fraction((investedXtnAmountInWaves + donationProfitPart), SCALE8, xtnPrice)
288+ let investedXtnAmountNew = fraction((investedXtnAmountInWaves + donationProfitPart), (SCALE8 * xtnDecimals), (xtnPrice * wavesDecimals))
285289 let newPeriod = (currentPeriodOrFail + 1)
286290 let lpAssetQuantity = valueOrErrorMessage(assetInfo(lpAssetIdOrFail), wrapErr("invalid lpAsset info")).quantity
287291 let newPrice = fraction(investedWavesAmountNew, SCALE8, lpAssetQuantity)
288292 let lpAssetAmountToBurn = valueOrElse(getInteger(factoryAddressOrFail, keyWithdrawal()), 0)
289293 let paymentAmountMin = fraction(lpAssetAmountToBurn, newPrice, SCALE8)
290294 let checkPaymentAmount = if (if ((paymentAmountMin == 0))
291295 then true
292296 else if (if ((size(i.payments) == 1))
293297 then (i.payments[0].assetId == unit)
294298 else false)
295299 then (i.payments[0].amount >= paymentAmountMin)
296300 else false)
297301 then true
298302 else throwErr(("invalid payments, payment amount min: " + toString(paymentAmountMin)))
299303 if ((checkPaymentAmount == checkPaymentAmount))
300304 then {
301305 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)]
302306 $Tuple2(nil, factoryActions)
303307 }
304308 else throw("Strict value is not equal to itself.")
305309 }
306310 else throw("Strict value is not equal to itself.")
307311 }
308312 else throw("Strict value is not equal to itself.")
309313 }
310314
311315
312316
313317 @Callable(i)
314318 func invest (userAddressBytes) = {
315319 let checkCaller = onlyFactory(i)
316320 if ((checkCaller == checkCaller))
317321 then {
318322 let userAddress = Address(userAddressBytes)
319323 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
320324 let currentPriceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(currentPeriodOrFail)), wrapErr("invalid price"))
321325 let payment = if ((size(i.payments) == 1))
322326 then i.payments[0]
323327 else throwErr("invalid payments")
324328 let paymentAmount = if (if ((payment.assetId == unit))
325329 then (payment.amount > 0)
326330 else false)
327331 then payment.amount
328332 else throwErr("invalid payment amount")
329333 let lpAssetAmount = if ((currentPriceOrFail > 0))
330334 then fraction(paymentAmount, SCALE8, currentPriceOrFail)
331335 else 0
332336 let invested = valueOrElse(getInteger(factoryAddressOrFail, keyInvested(unit)), 0)
333337 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)])]
334338 $Tuple2(nil, factoryActions)
335339 }
336340 else throw("Strict value is not equal to itself.")
337341 }
338342
339343
340344
341345 @Callable(i)
342346 func withdraw (userAddressBytes) = {
343347 let checkCaller = onlyFactory(i)
344348 if ((checkCaller == checkCaller))
345349 then {
346350 let userAddress = Address(userAddressBytes)
347351 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
348352 let payment = if ((size(i.payments) == 1))
349353 then i.payments[0]
350354 else throwErr(wrapErr("invalid payments"))
351355 let paymentAssetId = if ((payment.assetId == lpAssetIdOrFail))
352356 then lpAssetIdOrFail
353357 else throwErr("invalid payment asset")
354358 let paymentAmount = if ((payment.amount > 0))
355359 then payment.amount
356360 else throwErr("invalid payment amount")
357361 let withdrawal = valueOrElse(getInteger(factoryAddressOrFail, keyWithdrawal()), 0)
358362 let factoryActions = [invoke(factoryAddressOrFail, "integerEntry", [keyWithdrawal(), (withdrawal + paymentAmount)], nil), invoke(factoryAddressOrFail, "stringEntry", [keyWithdrawalRequest(userAddress, i.transactionId), valueWithdrawalRequest(PENDING, paymentAmount, (currentPeriodOrFail + 1), unit)], nil)]
359363 if ((factoryActions == factoryActions))
360364 then $Tuple2([ScriptTransfer(factoryAddressOrFail, paymentAmount, paymentAssetId)], factoryActions)
361365 else throw("Strict value is not equal to itself.")
362366 }
363367 else throw("Strict value is not equal to itself.")
364368 }
365369
366370
367371
368372 @Callable(i)
369373 func cancelWithdraw (userAddressBytes,txId) = {
370374 let checkCaller = onlyFactory(i)
371375 if ((checkCaller == checkCaller))
372376 then {
373377 let userAddress = Address(userAddressBytes)
374378 let withdrawalRequestOption = valueOrErrorMessage(getString(factoryAddressOrFail, keyWithdrawalRequest(userAddress, txId)), wrapErr("invalid withdrawal request"))
375379 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
376- let $t01295613069 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
377- let status = $t01295613069._1
378- let lpAssetAmount = $t01295613069._2
379- let targetPeriod = $t01295613069._3
380- let claimTxId = $t01295613069._4
380+ let $t01307413187 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
381+ let status = $t01307413187._1
382+ let lpAssetAmount = $t01307413187._2
383+ let targetPeriod = $t01307413187._3
384+ let claimTxId = $t01307413187._4
381385 let checks = [if ((status == PENDING))
382386 then true
383387 else throwErr("invalid withdrawal request status"), if ((targetPeriod > currentPeriodOrFail))
384388 then true
385389 else throwErr("invalid withdrawal request period")]
386390 if ((checks == checks))
387391 then {
388392 let withdrawal = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyWithdrawal()), wrapErr("invalid total withdrawal amount"))
389393 let factoryActions = [invoke(factoryAddressOrFail, "integerEntry", [keyWithdrawal(), if ((withdrawal >= lpAssetAmount))
390394 then (withdrawal - lpAssetAmount)
391395 else throwErr("invalid withdrawal amount")], nil), invoke(factoryAddressOrFail, "deleteEntry", [keyWithdrawalRequest(userAddress, txId)], nil), invoke(factoryAddressOrFail, "transferAsset", [userAddressBytes, lpAssetAmount, lpAssetIdOrFail], nil)]
392396 if ((factoryActions == factoryActions))
393397 then $Tuple2(nil, factoryActions)
394398 else throw("Strict value is not equal to itself.")
395399 }
396400 else throw("Strict value is not equal to itself.")
397401 }
398402 else throw("Strict value is not equal to itself.")
399403 }
400404
401405
402406
403407 @Callable(i)
404408 func claimWaves (userAddressBytes,txId) = {
405409 let checkCaller = onlyFactory(i)
406410 if ((checkCaller == checkCaller))
407411 then {
408412 let userAddress = Address(userAddressBytes)
409413 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
410414 let withdrawalRequestOption = valueOrErrorMessage(getString(factoryAddressOrFail, keyWithdrawalRequest(userAddress, txId)), wrapErr("invalid withdrawal request"))
411- let $t01440114514 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
412- let status = $t01440114514._1
413- let lpAssetAmount = $t01440114514._2
414- let targetPeriod = $t01440114514._3
415- let claimTxId = $t01440114514._4
415+ let $t01451914632 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
416+ let status = $t01451914632._1
417+ let lpAssetAmount = $t01451914632._2
418+ let targetPeriod = $t01451914632._3
419+ let claimTxId = $t01451914632._4
416420 if ((status == FINISHED))
417421 then throwErr("invalid withdrawal request status")
418422 else if ((targetPeriod > currentPeriodOrFail))
419423 then throwErr("invalid withdrawal request period")
420424 else {
421425 let priceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(targetPeriod)), wrapErr("invalid price"))
422426 let amount = if ((priceOrFail > 0))
423427 then fraction(lpAssetAmount, priceOrFail, SCALE8)
424428 else 0
425429 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)]
426430 $Tuple2(nil, factoryActions)
427431 }
428432 }
429433 else throw("Strict value is not equal to itself.")
430434 }
431435
432436
433437
434438 @Callable(i)
435439 func processBlocks (userAddressBytes) = {
436440 let checkCaller = onlyFactory(i)
437441 if ((checkCaller == checkCaller))
438442 then {
439443 let userAddress = Address(userAddressBytes)
440444 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
441445 let periodLength = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPeriodLength()), wrapErr("invalid period length"))
442446 let currentStartHeight = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyStartHeight(currentPeriodOrFail)), wrapErr("invalid start height"))
443447 let currentPriceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(currentPeriodOrFail)), wrapErr("invalid price"))
444448 let nextBlockToProcess = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyNextBlockToProcess()), wrapErr("invalid next block to process"))
445449 let periodEndHeight = ((currentStartHeight + periodLength) - 1)
446450 let blocksProcessingBatchSizeMax = 40
447451 let blocksProcessingBatchSize = if (if (if ((height >= nextBlockToProcess))
448452 then if ((nextBlockToProcess >= currentStartHeight))
449453 then true
450454 else (currentPeriodOrFail == 0)
451455 else false)
452456 then (periodEndHeight >= nextBlockToProcess)
453457 else false)
454458 then min([((periodEndHeight - nextBlockToProcess) + 1), blocksProcessingBatchSizeMax])
455459 else throwErr(wrapErr("invalid target block"))
456460 let blockProcessingReward = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyBlockProcessingReward()), wrapErr("invalid block processing reward"))
457461 let blockProcessingRewardByGenerator = (blockProcessingReward / blocksProcessingBatchSize)
458462 let blockProcessingRewardByGeneratorRemainder = (blockProcessingReward - (blockProcessingRewardByGenerator * blocksProcessingBatchSize))
459463 func map (acc,inc) = if ((inc >= blocksProcessingBatchSize))
460464 then acc
461465 else {
462466 let targetBlockHeight = (nextBlockToProcess + inc)
463467 let targetBlockInfo = valueOrErrorMessage(blockInfoByHeight(targetBlockHeight), wrapErr("invalid block info"))
464468 let treasuryRewardOrFail = valueOrErrorMessage(rewardForOption(targetBlockInfo.rewards, treasuryAddressOrFail), wrapErr(("invalid treasury reward for height " + toString(targetBlockHeight))))
465469 let generator = targetBlockInfo.generator
466470 let available = valueOrElse(getInteger(factoryAddressOrFail, keyAvailable(generator)), 0)
467471 let callerReward = if ((inc == (blocksProcessingBatchSize - 1)))
468472 then (blockProcessingRewardByGenerator + blockProcessingRewardByGeneratorRemainder)
469473 else blockProcessingRewardByGenerator
470474 let lpAssetAmount = if ((currentPriceOrFail > 0))
471475 then fraction((treasuryRewardOrFail - callerReward), SCALE8, currentPriceOrFail)
472476 else 0
473477 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)]
474478 if ((factoryActionsSingle == factoryActionsSingle))
475479 then (acc + lpAssetAmount)
476480 else throw("Strict value is not equal to itself.")
477481 }
478482
479483 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]
480484 let lpAssetAmountTotal = {
481485 let $l = list
482486 let $s = size($l)
483487 let $acc0 = 0
484488 func $f0_1 ($a,$i) = if (($i >= $s))
485489 then $a
486490 else map($a, $l[$i])
487491
488492 func $f0_2 ($a,$i) = if (($i >= $s))
489493 then $a
490494 else throw("List size exceeds 40")
491495
492496 $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)
493497 }
494498 if ((lpAssetAmountTotal == lpAssetAmountTotal))
495499 then {
496500 let actions = [invoke(factoryAddressOrFail, "transferWaves", [userAddressBytes, blockProcessingReward], nil), invoke(factoryAddressOrFail, "reissue", [lpAssetAmountTotal], nil), invoke(factoryAddressOrFail, "integerEntry", [keyNextBlockToProcess(), (nextBlockToProcess + blocksProcessingBatchSize)], nil)]
497501 if ((actions == actions))
498502 then $Tuple2(nil, unit)
499503 else throw("Strict value is not equal to itself.")
500504 }
501505 else throw("Strict value is not equal to itself.")
502506 }
503507 else throw("Strict value is not equal to itself.")
504508 }
505509
506510
507511 @Verifier(tx)
508512 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
509513

github/deemru/w8io/026f985 
76.75 ms