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