tx · 7ZnmG9nsCR5qWzhQqeoZZSTe3kBgc8DbjD3uaYPyc9fA

3N6HSS7Toat1RhyEsyqVGgVSRzH19W1FTbP:  -0.01900000 Waves

2023.06.22 12:41 [2633674] smart account 3N6HSS7Toat1RhyEsyqVGgVSRzH19W1FTbP > SELF 0.00000000 Waves

{ "type": 13, "id": "7ZnmG9nsCR5qWzhQqeoZZSTe3kBgc8DbjD3uaYPyc9fA", "fee": 1900000, "feeAssetId": null, "timestamp": 1687426881286, "version": 2, "chainId": 84, "sender": "3N6HSS7Toat1RhyEsyqVGgVSRzH19W1FTbP", "senderPublicKey": "AoKo4segKHU4DeJnxXQYJj2u7J6XJeux6r8KLW52cd2Q", "proofs": [ "32XLvfSvhy7HATaZAhGgz8eYxsDkHXiv4Z7Sqyjatuet2pc1nFtVwD5p41khZACiHjLdTfmRppoNaugG5H5Ayhmd" ], "script": "base64:BwIrCAISAwoBAhIHCgUCAQEBARIDCgECEgMKAQISBAoCAgISBAoCAgISAwoBAigAA1NFUAICX18ADUNPTlRSQUNUX05BTUUCD2NhbGN1bGF0b3IucmlkZQAGU0NBTEU4AIDC1y8ABlNDQUxFNgDAhD0AB1BFTkRJTkcCB1BFTkRJTkcACEZJTklTSEVEAghGSU5JU0hFRAAFV0FWRVMCBVdBVkVTAQd3cmFwRXJyAQFzCQCsAgIJAKwCAgUNQ09OVFJBQ1RfTkFNRQICOiAFAXMBCHRocm93RXJyAQFzCQACAQkBB3dyYXBFcnIBBQFzAQ9hc3NldElkVG9TdHJpbmcBB2Fzc2V0SWQEByRtYXRjaDAFB2Fzc2V0SWQDCQABAgUHJG1hdGNoMAIKQnl0ZVZlY3RvcgQBYgUHJG1hdGNoMAkA2AQBBQFiAwkAAQIFByRtYXRjaDACBFVuaXQFBVdBVkVTCQACAQILTWF0Y2ggZXJyb3IBA2FicwEBbgMJAGYCAAAFAW4JAQEtAQUBbgUBbgERa2V5RmFjdG9yeUFkZHJlc3MACQC5CQIJAMwIAgICJXMJAMwIA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AJQKAgUDbmlsBQR1bml0CQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleSK1//U=", "height": 2633674, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HhKNyXaTEfB9NFUSwjYCwTkFkx1F9pTvVgiKFeQ6dYht Next: 4eGwYzfrhm5M6ohyQsDHjMFGTCcMVxqnmZDhv5PdH5eU Diff:
OldNewDifferences
77
88 let SCALE8 = 100000000
99
10+let SCALE6 = 1000000
11+
1012 let PENDING = "PENDING"
1113
1214 let FINISHED = "FINISHED"
1315
1416 let WAVES = "WAVES"
15-
16-let wavesDecimals = 8
17-
18-let xtnDecimals = 6
1917
2018 func wrapErr (s) = ((CONTRACT_NAME + ": ") + s)
2119
188186
189187 func rewardForOption (rewards,target) = {
190188 let s = size(rewards)
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
189+ let $t040964121 = rewards[0]
190+ let a0 = $t040964121._1
191+ let r0 = $t040964121._2
192+ let $t041244149 = rewards[1]
193+ let a1 = $t041244149._1
194+ let r1 = $t041244149._2
195+ let $t041524177 = rewards[2]
196+ let a2 = $t041524177._1
197+ let r2 = $t041524177._2
200198 if (if ((s > 0))
201199 then (a0 == target)
202200 else false)
263261 then {
264262 let investedXtnAmount = valueOrElse(getInteger(factoryAddressOrFail, keyInvested(xtnAssetIdOrFail)), 0)
265263 let investedWavesAmount = valueOrElse(getInteger(factoryAddressOrFail, keyInvested(unit)), 0)
266- let investedXtnAmountInWaves = fraction(investedXtnAmount, (xtnPrice * wavesDecimals), (SCALE8 * xtnDecimals))
264+ let investedXtnAmountInWaves = fraction(investedXtnAmount, xtnPrice, SCALE6)
267265 let currentTreasuryVolumeInWaves = (investedXtnAmountInWaves + investedWavesAmount)
268266 let profitRaw = (newTreasuryVolumeInWaves - currentTreasuryVolumeInWaves)
269267 let pwrManagersBonusAmount = if ((profitRaw > 0))
285283 let donationProfitPart = ((donationProfitPartRaw - amountToInvestment) + amountToDonation)
286284 let investmentProfitPart = ((investmentProfitPartRaw - amountToDonation) + amountToInvestment)
287285 let investedWavesAmountNew = (investedWavesAmount + investmentProfitPart)
288- let investedXtnAmountNew = fraction((investedXtnAmountInWaves + donationProfitPart), (SCALE8 * xtnDecimals), (xtnPrice * wavesDecimals))
286+ let investedXtnAmountNew = fraction((investedXtnAmountInWaves + donationProfitPart), SCALE6, xtnPrice)
289287 let newPeriod = (currentPeriodOrFail + 1)
290288 let lpAssetQuantity = valueOrErrorMessage(assetInfo(lpAssetIdOrFail), wrapErr("invalid lpAsset info")).quantity
291289 let newPrice = fraction(investedWavesAmountNew, SCALE8, lpAssetQuantity)
377375 let userAddress = Address(userAddressBytes)
378376 let withdrawalRequestOption = valueOrErrorMessage(getString(factoryAddressOrFail, keyWithdrawalRequest(userAddress, txId)), wrapErr("invalid withdrawal request"))
379377 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
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
378+ let $t01299513108 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
379+ let status = $t01299513108._1
380+ let lpAssetAmount = $t01299513108._2
381+ let targetPeriod = $t01299513108._3
382+ let claimTxId = $t01299513108._4
385383 let checks = [if ((status == PENDING))
386384 then true
387385 else throwErr("invalid withdrawal request status"), if ((targetPeriod > currentPeriodOrFail))
412410 let userAddress = Address(userAddressBytes)
413411 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
414412 let withdrawalRequestOption = valueOrErrorMessage(getString(factoryAddressOrFail, keyWithdrawalRequest(userAddress, txId)), wrapErr("invalid withdrawal request"))
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
413+ let $t01444014553 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
414+ let status = $t01444014553._1
415+ let lpAssetAmount = $t01444014553._2
416+ let targetPeriod = $t01444014553._3
417+ let claimTxId = $t01444014553._4
420418 if ((status == FINISHED))
421419 then throwErr("invalid withdrawal request status")
422420 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
10+let SCALE6 = 1000000
11+
1012 let PENDING = "PENDING"
1113
1214 let FINISHED = "FINISHED"
1315
1416 let WAVES = "WAVES"
15-
16-let wavesDecimals = 8
17-
18-let xtnDecimals = 6
1917
2018 func wrapErr (s) = ((CONTRACT_NAME + ": ") + s)
2119
2220
2321 func throwErr (s) = throw(wrapErr(s))
2422
2523
2624 func assetIdToString (assetId) = match assetId {
2725 case b: ByteVector =>
2826 toBase58String(b)
2927 case _: Unit =>
3028 WAVES
3129 case _ =>
3230 throw("Match error")
3331 }
3432
3533
3634 func abs (n) = if ((0 > n))
3735 then -(n)
3836 else n
3937
4038
4139 func keyFactoryAddress () = makeString(["%s", "factory"], SEP)
4240
4341
4442 func keyLpAssetId () = makeString(["%s", "lpAssetId"], SEP)
4543
4644
4745 func keyXtnAssetId () = makeString(["%s", "xtnAssetId"], SEP)
4846
4947
5048 func keyTreasuryAddress () = makeString(["%s", "treasury"], SEP)
5149
5250
5351 func keyInvested (assetId) = makeString(["%s%s", "invested", assetIdToString(assetId)], SEP)
5452
5553
5654 func keyAvailable (userAddress) = makeString(["%s%s", "available", toString(userAddress)], SEP)
5755
5856
5957 func keyClaimed (userAddress) = makeString(["%s%s", "claimed", toString(userAddress)], SEP)
6058
6159
6260 func keyCurrentPeriod () = makeString(["%s", "currentPeriod"], SEP)
6361
6462
6563 func keyPriceForPeriod (period) = makeString(["%s%d", "price", toString(period)], SEP)
6664
6765
6866 func keyStartHeight (period) = makeString(["%s%d", "startHeight", toString(period)], SEP)
6967
7068
7169 func keyPeriodLength () = "%s__periodLength"
7270
7371
7472 func keyBlockProcessingReward () = "%s__blockProcessingReward"
7573
7674
7775 func keyNextBlockToProcess () = "%s__nextBlockToProcess"
7876
7977
8078 func keyBlockProcessed (height) = makeString(["%s%d", "blockProcessed", toString(height)], SEP)
8179
8280
8381 func keyWithdrawal () = "%s__withdrawal"
8482
8583
8684 func keyWithdrawalRequest (userAddress,txId) = makeString(["%s%s%s", "withdrawal", toString(userAddress), toBase58String(txId)], SEP)
8785
8886
8987 func valueWithdrawalRequest (status,lpAssetAmount,targetPeriod,claimTxId) = {
9088 let claimTxIdStr = match claimTxId {
9189 case b: ByteVector =>
9290 toBase58String(b)
9391 case _: Unit =>
9492 "SOON"
9593 case _ =>
9694 throw("Match error")
9795 }
9896 makeString(["%s%d%d%s", status, toString(lpAssetAmount), toString(targetPeriod), claimTxIdStr], SEP)
9997 }
10098
10199
102100 func parseWithdrawalRequestValueOrFail (s) = {
103101 let parts = split(s, SEP)
104102 if ((size(parts) == 5))
105103 then {
106104 let status = parts[1]
107105 let lpAssetAmount = valueOrErrorMessage(parseInt(parts[2]), wrapErr("invalid lpAssetAmount"))
108106 let targetPeriod = valueOrErrorMessage(parseInt(parts[3]), wrapErr("invalid targetPeriod"))
109107 let claimTxId = parts[4]
110108 $Tuple4(status, lpAssetAmount, targetPeriod, claimTxId)
111109 }
112110 else throwErr("invalid withdrawal request value")
113111 }
114112
115113
116114 let factoryAddressOption = match getString(this, keyFactoryAddress()) {
117115 case s: String =>
118116 addressFromString(s)
119117 case _: Unit =>
120118 unit
121119 case _ =>
122120 throw("Match error")
123121 }
124122
125123 let factoryAddressOrFail = valueOrErrorMessage(factoryAddressOption, wrapErr("invalid factory address"))
126124
127125 let lpAssetIdOption = match factoryAddressOption {
128126 case a: Address =>
129127 match getString(a, keyLpAssetId()) {
130128 case s: String =>
131129 fromBase58String(s)
132130 case _: Unit =>
133131 unit
134132 case _ =>
135133 throw("Match error")
136134 }
137135 case _: Unit =>
138136 unit
139137 case _ =>
140138 throw("Match error")
141139 }
142140
143141 let lpAssetIdOrFail = valueOrErrorMessage(lpAssetIdOption, wrapErr("invalid lpAssetId"))
144142
145143 let xtnAssetIdOption = match factoryAddressOption {
146144 case a: Address =>
147145 match getString(a, keyXtnAssetId()) {
148146 case s: String =>
149147 fromBase58String(s)
150148 case _: Unit =>
151149 unit
152150 case _ =>
153151 throw("Match error")
154152 }
155153 case _: Unit =>
156154 unit
157155 case _ =>
158156 throw("Match error")
159157 }
160158
161159 let xtnAssetIdOrFail = valueOrErrorMessage(xtnAssetIdOption, wrapErr("invalid xtnAssetId"))
162160
163161 let treasuryAddressOption = match factoryAddressOption {
164162 case a: Address =>
165163 match getString(a, keyTreasuryAddress()) {
166164 case s: String =>
167165 addressFromString(s)
168166 case _: Unit =>
169167 unit
170168 case _ =>
171169 throw("Match error")
172170 }
173171 case _: Unit =>
174172 unit
175173 case _ =>
176174 throw("Match error")
177175 }
178176
179177 let treasuryAddressOrFail = valueOrErrorMessage(treasuryAddressOption, wrapErr("invalid treasury address"))
180178
181179 func onlyAddress (i,address) = if ((i.caller == address))
182180 then true
183181 else throwErr("permission denied")
184182
185183
186184 func onlyFactory (i) = onlyAddress(i, factoryAddressOrFail)
187185
188186
189187 func rewardForOption (rewards,target) = {
190188 let s = size(rewards)
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
189+ let $t040964121 = rewards[0]
190+ let a0 = $t040964121._1
191+ let r0 = $t040964121._2
192+ let $t041244149 = rewards[1]
193+ let a1 = $t041244149._1
194+ let r1 = $t041244149._2
195+ let $t041524177 = rewards[2]
196+ let a2 = $t041524177._1
197+ let r2 = $t041524177._2
200198 if (if ((s > 0))
201199 then (a0 == target)
202200 else false)
203201 then r0
204202 else if (if ((s > 1))
205203 then (a1 == target)
206204 else false)
207205 then r1
208206 else if (if ((s > 2))
209207 then (a2 == target)
210208 else false)
211209 then r2
212210 else unit
213211 }
214212
215213
216214 @Callable(i)
217215 func claimLP (userAddressBytes) = {
218216 let checkCaller = onlyFactory(i)
219217 if ((checkCaller == checkCaller))
220218 then {
221219 let userAddress = Address(userAddressBytes)
222220 let available = valueOrElse(getInteger(factoryAddressOrFail, keyAvailable(userAddress)), 0)
223221 let claimed = valueOrElse(getInteger(factoryAddressOrFail, keyClaimed(userAddress)), 0)
224222 let factoryActions = if ((available > 0))
225223 then [invoke(factoryAddressOrFail, "transferAsset", [userAddressBytes, available, lpAssetIdOrFail], nil), invoke(factoryAddressOrFail, "integerEntry", [keyAvailable(userAddress), 0], nil), invoke(factoryAddressOrFail, "integerEntry", [keyClaimed(userAddress), (claimed + available)], nil)]
226224 else throwErr("nothing to claim")
227225 $Tuple2(nil, factoryActions)
228226 }
229227 else throw("Strict value is not equal to itself.")
230228 }
231229
232230
233231
234232 @Callable(i)
235233 func finalize (userAddressBytes,newTreasuryVolumeInWaves,xtnPrice,pwrManagersBonus,treasuryVolumeDiffAllocationCoef) = {
236234 let checkCaller = onlyFactory(i)
237235 if ((checkCaller == checkCaller))
238236 then {
239237 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
240238 let periodLength = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPeriodLength()), wrapErr("invalid period length"))
241239 let currentStartHeight = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyStartHeight(currentPeriodOrFail)), wrapErr("invalid start height"))
242240 let currentPriceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(currentPeriodOrFail)), wrapErr("invalid price"))
243241 let nextBlockToProcess = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyNextBlockToProcess()), wrapErr("invalid next block to process"))
244242 let periodEndHeight = ((currentStartHeight + periodLength) - 1)
245243 let checks = [if ((i.originCaller == treasuryAddressOrFail))
246244 then true
247245 else throwErr("permission denied"), if ((nextBlockToProcess > periodEndHeight))
248246 then true
249247 else throwErr("unprocessed blocks"), if ((newTreasuryVolumeInWaves >= 0))
250248 then true
251249 else throwErr("invalid new treasury volume"), if ((xtnPrice >= 0))
252250 then true
253251 else throwErr("invalid XTN price"), if (if ((pwrManagersBonus >= 0))
254252 then (SCALE8 >= pwrManagersBonus)
255253 else false)
256254 then true
257255 else throwErr("invalid PWR managers bonus"), if (if ((treasuryVolumeDiffAllocationCoef >= -(SCALE8)))
258256 then (SCALE8 >= treasuryVolumeDiffAllocationCoef)
259257 else false)
260258 then true
261259 else throwErr("invalid treasury volume diff allocation coefficient")]
262260 if ((checks == checks))
263261 then {
264262 let investedXtnAmount = valueOrElse(getInteger(factoryAddressOrFail, keyInvested(xtnAssetIdOrFail)), 0)
265263 let investedWavesAmount = valueOrElse(getInteger(factoryAddressOrFail, keyInvested(unit)), 0)
266- let investedXtnAmountInWaves = fraction(investedXtnAmount, (xtnPrice * wavesDecimals), (SCALE8 * xtnDecimals))
264+ let investedXtnAmountInWaves = fraction(investedXtnAmount, xtnPrice, SCALE6)
267265 let currentTreasuryVolumeInWaves = (investedXtnAmountInWaves + investedWavesAmount)
268266 let profitRaw = (newTreasuryVolumeInWaves - currentTreasuryVolumeInWaves)
269267 let pwrManagersBonusAmount = if ((profitRaw > 0))
270268 then fraction(profitRaw, pwrManagersBonus, SCALE8)
271269 else 0
272270 let profit = (profitRaw - pwrManagersBonusAmount)
273271 let donationPart = if ((currentTreasuryVolumeInWaves > 0))
274272 then fraction(investedXtnAmountInWaves, SCALE8, currentTreasuryVolumeInWaves)
275273 else 0
276274 let donationProfitPartRaw = fraction(profit, donationPart, SCALE8)
277275 let investmentProfitPartRaw = (profit - donationProfitPartRaw)
278276 let treasuryVolumeDiffAllocationCoefAbs = abs(treasuryVolumeDiffAllocationCoef)
279277 let amountToDonation = fraction(investmentProfitPartRaw, if ((0 > treasuryVolumeDiffAllocationCoef))
280278 then treasuryVolumeDiffAllocationCoefAbs
281279 else 0, SCALE8)
282280 let amountToInvestment = fraction(donationProfitPartRaw, if ((treasuryVolumeDiffAllocationCoef > 0))
283281 then treasuryVolumeDiffAllocationCoefAbs
284282 else 0, SCALE8)
285283 let donationProfitPart = ((donationProfitPartRaw - amountToInvestment) + amountToDonation)
286284 let investmentProfitPart = ((investmentProfitPartRaw - amountToDonation) + amountToInvestment)
287285 let investedWavesAmountNew = (investedWavesAmount + investmentProfitPart)
288- let investedXtnAmountNew = fraction((investedXtnAmountInWaves + donationProfitPart), (SCALE8 * xtnDecimals), (xtnPrice * wavesDecimals))
286+ let investedXtnAmountNew = fraction((investedXtnAmountInWaves + donationProfitPart), SCALE6, xtnPrice)
289287 let newPeriod = (currentPeriodOrFail + 1)
290288 let lpAssetQuantity = valueOrErrorMessage(assetInfo(lpAssetIdOrFail), wrapErr("invalid lpAsset info")).quantity
291289 let newPrice = fraction(investedWavesAmountNew, SCALE8, lpAssetQuantity)
292290 let lpAssetAmountToBurn = valueOrElse(getInteger(factoryAddressOrFail, keyWithdrawal()), 0)
293291 let paymentAmountMin = fraction(lpAssetAmountToBurn, newPrice, SCALE8)
294292 let checkPaymentAmount = if (if ((paymentAmountMin == 0))
295293 then true
296294 else if (if ((size(i.payments) == 1))
297295 then (i.payments[0].assetId == unit)
298296 else false)
299297 then (i.payments[0].amount >= paymentAmountMin)
300298 else false)
301299 then true
302300 else throwErr(("invalid payments, payment amount min: " + toString(paymentAmountMin)))
303301 if ((checkPaymentAmount == checkPaymentAmount))
304302 then {
305303 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)]
306304 $Tuple2(nil, factoryActions)
307305 }
308306 else throw("Strict value is not equal to itself.")
309307 }
310308 else throw("Strict value is not equal to itself.")
311309 }
312310 else throw("Strict value is not equal to itself.")
313311 }
314312
315313
316314
317315 @Callable(i)
318316 func invest (userAddressBytes) = {
319317 let checkCaller = onlyFactory(i)
320318 if ((checkCaller == checkCaller))
321319 then {
322320 let userAddress = Address(userAddressBytes)
323321 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
324322 let currentPriceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(currentPeriodOrFail)), wrapErr("invalid price"))
325323 let payment = if ((size(i.payments) == 1))
326324 then i.payments[0]
327325 else throwErr("invalid payments")
328326 let paymentAmount = if (if ((payment.assetId == unit))
329327 then (payment.amount > 0)
330328 else false)
331329 then payment.amount
332330 else throwErr("invalid payment amount")
333331 let lpAssetAmount = if ((currentPriceOrFail > 0))
334332 then fraction(paymentAmount, SCALE8, currentPriceOrFail)
335333 else 0
336334 let invested = valueOrElse(getInteger(factoryAddressOrFail, keyInvested(unit)), 0)
337335 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)])]
338336 $Tuple2(nil, factoryActions)
339337 }
340338 else throw("Strict value is not equal to itself.")
341339 }
342340
343341
344342
345343 @Callable(i)
346344 func withdraw (userAddressBytes) = {
347345 let checkCaller = onlyFactory(i)
348346 if ((checkCaller == checkCaller))
349347 then {
350348 let userAddress = Address(userAddressBytes)
351349 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
352350 let payment = if ((size(i.payments) == 1))
353351 then i.payments[0]
354352 else throwErr(wrapErr("invalid payments"))
355353 let paymentAssetId = if ((payment.assetId == lpAssetIdOrFail))
356354 then lpAssetIdOrFail
357355 else throwErr("invalid payment asset")
358356 let paymentAmount = if ((payment.amount > 0))
359357 then payment.amount
360358 else throwErr("invalid payment amount")
361359 let withdrawal = valueOrElse(getInteger(factoryAddressOrFail, keyWithdrawal()), 0)
362360 let factoryActions = [invoke(factoryAddressOrFail, "integerEntry", [keyWithdrawal(), (withdrawal + paymentAmount)], nil), invoke(factoryAddressOrFail, "stringEntry", [keyWithdrawalRequest(userAddress, i.transactionId), valueWithdrawalRequest(PENDING, paymentAmount, (currentPeriodOrFail + 1), unit)], nil)]
363361 if ((factoryActions == factoryActions))
364362 then $Tuple2([ScriptTransfer(factoryAddressOrFail, paymentAmount, paymentAssetId)], factoryActions)
365363 else throw("Strict value is not equal to itself.")
366364 }
367365 else throw("Strict value is not equal to itself.")
368366 }
369367
370368
371369
372370 @Callable(i)
373371 func cancelWithdraw (userAddressBytes,txId) = {
374372 let checkCaller = onlyFactory(i)
375373 if ((checkCaller == checkCaller))
376374 then {
377375 let userAddress = Address(userAddressBytes)
378376 let withdrawalRequestOption = valueOrErrorMessage(getString(factoryAddressOrFail, keyWithdrawalRequest(userAddress, txId)), wrapErr("invalid withdrawal request"))
379377 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
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
378+ let $t01299513108 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
379+ let status = $t01299513108._1
380+ let lpAssetAmount = $t01299513108._2
381+ let targetPeriod = $t01299513108._3
382+ let claimTxId = $t01299513108._4
385383 let checks = [if ((status == PENDING))
386384 then true
387385 else throwErr("invalid withdrawal request status"), if ((targetPeriod > currentPeriodOrFail))
388386 then true
389387 else throwErr("invalid withdrawal request period")]
390388 if ((checks == checks))
391389 then {
392390 let withdrawal = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyWithdrawal()), wrapErr("invalid total withdrawal amount"))
393391 let factoryActions = [invoke(factoryAddressOrFail, "integerEntry", [keyWithdrawal(), if ((withdrawal >= lpAssetAmount))
394392 then (withdrawal - lpAssetAmount)
395393 else throwErr("invalid withdrawal amount")], nil), invoke(factoryAddressOrFail, "deleteEntry", [keyWithdrawalRequest(userAddress, txId)], nil), invoke(factoryAddressOrFail, "transferAsset", [userAddressBytes, lpAssetAmount, lpAssetIdOrFail], nil)]
396394 if ((factoryActions == factoryActions))
397395 then $Tuple2(nil, factoryActions)
398396 else throw("Strict value is not equal to itself.")
399397 }
400398 else throw("Strict value is not equal to itself.")
401399 }
402400 else throw("Strict value is not equal to itself.")
403401 }
404402
405403
406404
407405 @Callable(i)
408406 func claimWaves (userAddressBytes,txId) = {
409407 let checkCaller = onlyFactory(i)
410408 if ((checkCaller == checkCaller))
411409 then {
412410 let userAddress = Address(userAddressBytes)
413411 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
414412 let withdrawalRequestOption = valueOrErrorMessage(getString(factoryAddressOrFail, keyWithdrawalRequest(userAddress, txId)), wrapErr("invalid withdrawal request"))
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
413+ let $t01444014553 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
414+ let status = $t01444014553._1
415+ let lpAssetAmount = $t01444014553._2
416+ let targetPeriod = $t01444014553._3
417+ let claimTxId = $t01444014553._4
420418 if ((status == FINISHED))
421419 then throwErr("invalid withdrawal request status")
422420 else if ((targetPeriod > currentPeriodOrFail))
423421 then throwErr("invalid withdrawal request period")
424422 else {
425423 let priceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(targetPeriod)), wrapErr("invalid price"))
426424 let amount = if ((priceOrFail > 0))
427425 then fraction(lpAssetAmount, priceOrFail, SCALE8)
428426 else 0
429427 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)]
430428 $Tuple2(nil, factoryActions)
431429 }
432430 }
433431 else throw("Strict value is not equal to itself.")
434432 }
435433
436434
437435
438436 @Callable(i)
439437 func processBlocks (userAddressBytes) = {
440438 let checkCaller = onlyFactory(i)
441439 if ((checkCaller == checkCaller))
442440 then {
443441 let userAddress = Address(userAddressBytes)
444442 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
445443 let periodLength = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPeriodLength()), wrapErr("invalid period length"))
446444 let currentStartHeight = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyStartHeight(currentPeriodOrFail)), wrapErr("invalid start height"))
447445 let currentPriceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(currentPeriodOrFail)), wrapErr("invalid price"))
448446 let nextBlockToProcess = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyNextBlockToProcess()), wrapErr("invalid next block to process"))
449447 let periodEndHeight = ((currentStartHeight + periodLength) - 1)
450448 let blocksProcessingBatchSizeMax = 40
451449 let blocksProcessingBatchSize = if (if (if ((height >= nextBlockToProcess))
452450 then if ((nextBlockToProcess >= currentStartHeight))
453451 then true
454452 else (currentPeriodOrFail == 0)
455453 else false)
456454 then (periodEndHeight >= nextBlockToProcess)
457455 else false)
458456 then min([((periodEndHeight - nextBlockToProcess) + 1), blocksProcessingBatchSizeMax])
459457 else throwErr(wrapErr("invalid target block"))
460458 let blockProcessingReward = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyBlockProcessingReward()), wrapErr("invalid block processing reward"))
461459 let blockProcessingRewardByGenerator = (blockProcessingReward / blocksProcessingBatchSize)
462460 let blockProcessingRewardByGeneratorRemainder = (blockProcessingReward - (blockProcessingRewardByGenerator * blocksProcessingBatchSize))
463461 func map (acc,inc) = if ((inc >= blocksProcessingBatchSize))
464462 then acc
465463 else {
466464 let targetBlockHeight = (nextBlockToProcess + inc)
467465 let targetBlockInfo = valueOrErrorMessage(blockInfoByHeight(targetBlockHeight), wrapErr("invalid block info"))
468466 let treasuryRewardOrFail = valueOrErrorMessage(rewardForOption(targetBlockInfo.rewards, treasuryAddressOrFail), wrapErr(("invalid treasury reward for height " + toString(targetBlockHeight))))
469467 let generator = targetBlockInfo.generator
470468 let available = valueOrElse(getInteger(factoryAddressOrFail, keyAvailable(generator)), 0)
471469 let callerReward = if ((inc == (blocksProcessingBatchSize - 1)))
472470 then (blockProcessingRewardByGenerator + blockProcessingRewardByGeneratorRemainder)
473471 else blockProcessingRewardByGenerator
474472 let lpAssetAmount = if ((currentPriceOrFail > 0))
475473 then fraction((treasuryRewardOrFail - callerReward), SCALE8, currentPriceOrFail)
476474 else 0
477475 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)]
478476 if ((factoryActionsSingle == factoryActionsSingle))
479477 then (acc + lpAssetAmount)
480478 else throw("Strict value is not equal to itself.")
481479 }
482480
483481 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]
484482 let lpAssetAmountTotal = {
485483 let $l = list
486484 let $s = size($l)
487485 let $acc0 = 0
488486 func $f0_1 ($a,$i) = if (($i >= $s))
489487 then $a
490488 else map($a, $l[$i])
491489
492490 func $f0_2 ($a,$i) = if (($i >= $s))
493491 then $a
494492 else throw("List size exceeds 40")
495493
496494 $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)
497495 }
498496 if ((lpAssetAmountTotal == lpAssetAmountTotal))
499497 then {
500498 let actions = [invoke(factoryAddressOrFail, "transferWaves", [userAddressBytes, blockProcessingReward], nil), invoke(factoryAddressOrFail, "reissue", [lpAssetAmountTotal], nil), invoke(factoryAddressOrFail, "integerEntry", [keyNextBlockToProcess(), (nextBlockToProcess + blocksProcessingBatchSize)], nil)]
501499 if ((actions == actions))
502500 then $Tuple2(nil, unit)
503501 else throw("Strict value is not equal to itself.")
504502 }
505503 else throw("Strict value is not equal to itself.")
506504 }
507505 else throw("Strict value is not equal to itself.")
508506 }
509507
510508
511509 @Verifier(tx)
512510 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
513511

github/deemru/w8io/169f3d6 
62.99 ms