tx · H8kkox836HAEzoz5veDTdsgn3zraMnVuebgCNHmJjTsg

3N4QFkEYPsR9D54c1pHRQzqRARjubXcbGuA:  -0.02000000 Waves

2023.07.04 17:29 [2651278] smart account 3N4QFkEYPsR9D54c1pHRQzqRARjubXcbGuA > SELF 0.00000000 Waves

{ "type": 13, "id": "H8kkox836HAEzoz5veDTdsgn3zraMnVuebgCNHmJjTsg", "fee": 2000000, "feeAssetId": null, "timestamp": 1688480965733, "version": 1, "sender": "3N4QFkEYPsR9D54c1pHRQzqRARjubXcbGuA", "senderPublicKey": "8nr9XxGKmrRg6E6Zss6YPynBYEFbCf39Z2D9WvVuUgzY", "proofs": [ "2PWcQKpXp8Q3FyMM3wcdAiFkM12yv4DENDesr7mXHDQWNPPfUDzG2YP19hBFfej3HMTBnDJzQtechRzivtX4ph4r" ], "script": "base64:BwIqCAISAwoBAhIGCgQCAQEBEgMKAQISAwoBAhIECgICAhIECgICAhIDCgECKgADU0VQAgJfXwANQ09OVFJBQ1RfTkFNRQIPY2FsY3VsYXRvci5yaWRlAAZTQ0FMRTgAgMLXLwAHUEVORElORwIHUEVORElORwAIRklOSVNIRUQCCEZJTklTSEVEAAVXQVZFUwIFV0FWRVMBB3dyYXBFcnIBAXMJAKwCAgkArAICBQ1DT05UUkFDVF9OQU1FAgI6IAUBcwEIdGhyb3dFcnIBAXMJAAIBCQEHd3JhcEVycgEFAXMBD2Fzc2V0SWRUb1N0cmluZwEHYXNzZXRJZAQHJG1hdGNoMAUHYXNzZXRJZAMJAAECBQckbWF0Y2gwAgpCeXRlVmVjdG9yBAFiBQckbWF0Y2gwCQDYBAEFAWIDCQABAgUHJG1hdGNoMAIEVW5pdAUFV0FWRVMJAAIBAgtNYXRjaCBlcnJvcgEDYWJzAQFuAwkAZgIAAAUBbgkBAS0BBQFuBQFuARFrZXlGYWN0b3J5QWRkcmVzcwAJALkJAgkAzAgCAgIlcwkAzAgCAgdmYWN0b3J5BQNuaWwFA1NFUAETa2V5TWFuYWdlclB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RtYXRjaDAJARlnZXRNYW5hZ2VyUHVibGljS2V5T3JVbml0AAMJAAECBQckbWF0Y2gwAgpCeXRlVmVjdG9yBANwdWIFByRtYXRjaDAFA3B1YggFAnR4D3NlbmRlclB1YmxpY0tleQkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUJcHVibGljS2V5WUHQag==", "chainId": 84, "height": 2651278, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 44m9yjWpS7gNhmv6EENXArPuAkciZcSLmL6kCRfkzgjP Next: 6V5NjdS5m2hEkJJMi5ymcKJDFwHGbqYuxh5DL8xVcwGS Diff:
OldNewDifferences
3535
3636
3737 func keyFactoryAddress () = makeString(["%s", "factory"], SEP)
38+
39+
40+func keyManagerPublicKey () = makeString(["%s", "managerPublicKey"], SEP)
3841
3942
4043 func keyLpAssetId () = makeString(["%s", "lpAssetId"], SEP)
159162
160163 let proxyTreasuryAddressOrFail = valueOrErrorMessage(proxyTreasuryAddressOption, wrapErr("invalid proxy treasury address"))
161164
162-let featureTreasuryAddressOption = match factoryAddressOption {
165+let mainTreasuryAddressOption = match factoryAddressOption {
163166 case a: Address =>
164167 match getString(a, keyMainTreasuryAddress()) {
165168 case s: String =>
175178 throw("Match error")
176179 }
177180
178-let featureTreasuryAddressOrFail = valueOrErrorMessage(featureTreasuryAddressOption, wrapErr("invalid feature treasury address"))
181+let mainTreasuryAddressOrFail = valueOrErrorMessage(mainTreasuryAddressOption, wrapErr("invalid main treasury address"))
182+
183+func getManagerPublicKeyOrUnit () = match factoryAddressOption {
184+ case fa: Address =>
185+ match getString(fa, keyManagerPublicKey()) {
186+ case pub: String =>
187+ fromBase58String(pub)
188+ case _ =>
189+ unit
190+ }
191+ case _ =>
192+ unit
193+}
194+
179195
180196 func onlyAddress (i,address) = if ((i.caller == address))
181197 then true
187203
188204 func rewardForOption (rewards,target) = {
189205 let s = size(rewards)
190- let $t042874312 = rewards[0]
191- let a0 = $t042874312._1
192- let r0 = $t042874312._2
193- let $t043154340 = rewards[1]
194- let a1 = $t043154340._1
195- let r1 = $t043154340._2
196- let $t043434368 = rewards[2]
197- let a2 = $t043434368._1
198- let r2 = $t043434368._2
206+ let $t046294654 = rewards[0]
207+ let a0 = $t046294654._1
208+ let r0 = $t046294654._2
209+ let $t046574682 = rewards[1]
210+ let a1 = $t046574682._1
211+ let r1 = $t046574682._2
212+ let $t046854710 = rewards[2]
213+ let a2 = $t046854710._1
214+ let r2 = $t046854710._2
199215 if (if ((s > 0))
200216 then (a0 == target)
201217 else false)
241257 let currentPriceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(currentPeriodOrFail)), wrapErr("invalid price"))
242258 let nextBlockToProcess = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyNextBlockToProcess()), wrapErr("invalid next block to process"))
243259 let periodEndHeight = ((currentStartHeight + periodLength) - 1)
244- let checks = [if ((i.originCaller == featureTreasuryAddressOrFail))
260+ let checks = [if ((i.originCaller == mainTreasuryAddressOrFail))
245261 then true
246262 else throwErr("permission denied"), if ((nextBlockToProcess > periodEndHeight))
247263 then true
330346 let payment = if ((size(i.payments) == 1))
331347 then i.payments[0]
332348 else throwErr("invalid payments")
333- let $t01089211069 = if (if ((payment.assetId == unit))
349+ let $t01123111408 = if (if ((payment.assetId == unit))
334350 then (payment.amount > 0)
335351 else false)
336352 then $Tuple2(payment.amount, payment.assetId)
337353 else throwErr("invalid payment amount")
338- let paymentAmount = $t01089211069._1
339- let paymentAssetId = $t01089211069._2
354+ let paymentAmount = $t01123111408._1
355+ let paymentAssetId = $t01123111408._2
340356 let lpAssetAmount = if ((currentPriceOrFail > 0))
341357 then fraction(paymentAmount, SCALE8, currentPriceOrFail)
342358 else 0
343359 let invested = valueOrElse(getInteger(factoryAddressOrFail, keyInvested(unit)), 0)
344- let actions = [ScriptTransfer(featureTreasuryAddressOrFail, paymentAmount, paymentAssetId)]
360+ let actions = [ScriptTransfer(mainTreasuryAddressOrFail, paymentAmount, paymentAssetId)]
345361 let factoryActions = [invoke(factoryAddressOrFail, "integerEntry", [keyInvested(unit), (invested + paymentAmount)], nil), invoke(factoryAddressOrFail, "reissue", [lpAssetAmount], nil), invoke(factoryAddressOrFail, "transferAsset", [userAddressBytes, lpAssetAmount, lpAssetIdOrFail], nil)]
346362 $Tuple2(actions, factoryActions)
347363 }
386402 let userAddress = Address(userAddressBytes)
387403 let withdrawalRequestOption = valueOrErrorMessage(getString(factoryAddressOrFail, keyWithdrawalRequest(userAddress, txId)), wrapErr("invalid withdrawal request"))
388404 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
389- let $t01347913592 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
390- let status = $t01347913592._1
391- let lpAssetAmount = $t01347913592._2
392- let targetPeriod = $t01347913592._3
393- let claimTxId = $t01347913592._4
405+ let $t01381513928 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
406+ let status = $t01381513928._1
407+ let lpAssetAmount = $t01381513928._2
408+ let targetPeriod = $t01381513928._3
409+ let claimTxId = $t01381513928._4
394410 let checks = [if ((status == PENDING))
395411 then true
396412 else throwErr("invalid withdrawal request status"), if ((targetPeriod > currentPeriodOrFail))
421437 let userAddress = Address(userAddressBytes)
422438 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
423439 let withdrawalRequestOption = valueOrErrorMessage(getString(factoryAddressOrFail, keyWithdrawalRequest(userAddress, txId)), wrapErr("invalid withdrawal request"))
424- let $t01492415037 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
425- let status = $t01492415037._1
426- let lpAssetAmount = $t01492415037._2
427- let targetPeriod = $t01492415037._3
428- let claimTxId = $t01492415037._4
440+ let $t01526015373 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
441+ let status = $t01526015373._1
442+ let lpAssetAmount = $t01526015373._2
443+ let targetPeriod = $t01526015373._3
444+ let claimTxId = $t01526015373._4
429445 if ((status == FINISHED))
430446 then throwErr("invalid withdrawal request status")
431447 else if ((targetPeriod > currentPeriodOrFail))
486502 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)]
487503 if ((factoryActionsSingle == factoryActionsSingle))
488504 then {
489- let $t01927319306 = acc
490- let lpAssetAcc = $t01927319306._1
491- let rewardAcc = $t01927319306._2
505+ let $t01960919642 = acc
506+ let lpAssetAcc = $t01960919642._1
507+ let rewardAcc = $t01960919642._2
492508 $Tuple2((lpAssetAcc + lpAssetAmount), (rewardAcc + treasuryRewardOrFail))
493509 }
494510 else throw("Strict value is not equal to itself.")
495511 }
496512
497513 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 $t01957319649 = {
514+ let $t01990919985 = {
499515 let $l = list
500516 let $s = size($l)
501517 let $acc0 = $Tuple2(0, 0)
509525
510526 $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)
511527 }
512- if (($t01957319649 == $t01957319649))
528+ if (($t01990919985 == $t01990919985))
513529 then {
514- let rewardAmountTotal = $t01957319649._2
515- let lpAssetAmountTotal = $t01957319649._1
530+ let rewardAmountTotal = $t01990919985._2
531+ let lpAssetAmountTotal = $t01990919985._1
516532 let rewardToMainTreasuryAmount = (rewardAmountTotal - blockProcessingReward)
517533 let invested = valueOrElse(getInteger(factoryAddressOrFail, keyInvested(unit)), 0)
518- let actions = [invoke(factoryAddressOrFail, "reissue", [lpAssetAmountTotal], nil), invoke(factoryAddressOrFail, "integerEntry", [keyNextBlockToProcess(), (nextBlockToProcess + blocksProcessingBatchSize)], nil), invoke(factoryAddressOrFail, "transferFromProxyTreasury", [featureTreasuryAddressOrFail.bytes, rewardToMainTreasuryAmount], nil), invoke(factoryAddressOrFail, "transferFromProxyTreasury", [userAddressBytes, blockProcessingReward], nil), invoke(factoryAddressOrFail, "integerEntry", [keyInvested(unit), (invested + rewardToMainTreasuryAmount)], nil)]
534+ let actions = [invoke(factoryAddressOrFail, "reissue", [lpAssetAmountTotal], nil), invoke(factoryAddressOrFail, "integerEntry", [keyNextBlockToProcess(), (nextBlockToProcess + blocksProcessingBatchSize)], nil), invoke(factoryAddressOrFail, "transferFromProxyTreasury", [mainTreasuryAddressOrFail.bytes, rewardToMainTreasuryAmount], nil), invoke(factoryAddressOrFail, "transferFromProxyTreasury", [userAddressBytes, blockProcessingReward], nil), invoke(factoryAddressOrFail, "integerEntry", [keyInvested(unit), (invested + rewardToMainTreasuryAmount)], nil)]
519535 if ((actions == actions))
520536 then $Tuple2(nil, unit)
521537 else throw("Strict value is not equal to itself.")
527543
528544
529545 @Verifier(tx)
530-func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
546+func verify () = {
547+ let publicKey = match getManagerPublicKeyOrUnit() {
548+ case pub: ByteVector =>
549+ pub
550+ case _ =>
551+ tx.senderPublicKey
552+ }
553+ sigVerify(tx.bodyBytes, tx.proofs[0], publicKey)
554+ }
531555
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"
1515
1616 func wrapErr (s) = ((CONTRACT_NAME + ": ") + s)
1717
1818
1919 func throwErr (s) = throw(wrapErr(s))
2020
2121
2222 func assetIdToString (assetId) = match assetId {
2323 case b: ByteVector =>
2424 toBase58String(b)
2525 case _: Unit =>
2626 WAVES
2727 case _ =>
2828 throw("Match error")
2929 }
3030
3131
3232 func abs (n) = if ((0 > n))
3333 then -(n)
3434 else n
3535
3636
3737 func keyFactoryAddress () = makeString(["%s", "factory"], SEP)
38+
39+
40+func keyManagerPublicKey () = makeString(["%s", "managerPublicKey"], SEP)
3841
3942
4043 func keyLpAssetId () = makeString(["%s", "lpAssetId"], SEP)
4144
4245
4346 func keyProxyTreasuryAddress () = makeString(["%s", "proxyTreasury"], SEP)
4447
4548
4649 func keyMainTreasuryAddress () = makeString(["%s", "mainTreasury"], SEP)
4750
4851
4952 func keyInvested (assetId) = makeString(["%s%s", "invested", assetIdToString(assetId)], SEP)
5053
5154
5255 func keyDonated (assetId) = makeString(["%s%s", "donated", assetIdToString(assetId)], SEP)
5356
5457
5558 func keyAvailable (userAddress) = makeString(["%s%s", "available", toString(userAddress)], SEP)
5659
5760
5861 func keyClaimed (userAddress) = makeString(["%s%s", "claimed", toString(userAddress)], SEP)
5962
6063
6164 func keyCurrentPeriod () = makeString(["%s", "currentPeriod"], SEP)
6265
6366
6467 func keyPriceForPeriod (period) = makeString(["%s%d", "price", toString(period)], SEP)
6568
6669
6770 func keyStartHeight (period) = makeString(["%s%d", "startHeight", toString(period)], SEP)
6871
6972
7073 func keyPeriodLength () = "%s__periodLength"
7174
7275
7376 func keyBlockProcessingReward () = "%s__blockProcessingReward"
7477
7578
7679 func keyNextBlockToProcess () = "%s__nextBlockToProcess"
7780
7881
7982 func keyBlockProcessed (height) = makeString(["%s%d", "blockProcessed", toString(height)], SEP)
8083
8184
8285 func keyWithdrawal () = "%s__withdrawal"
8386
8487
8588 func keyWithdrawalRequest (userAddress,txId) = makeString(["%s%s%s", "withdrawal", toString(userAddress), toBase58String(txId)], SEP)
8689
8790
8891 func valueWithdrawalRequest (status,lpAssetAmount,targetPeriod,claimTxId) = {
8992 let claimTxIdStr = match claimTxId {
9093 case b: ByteVector =>
9194 toBase58String(b)
9295 case _: Unit =>
9396 "SOON"
9497 case _ =>
9598 throw("Match error")
9699 }
97100 makeString(["%s%d%d%s", status, toString(lpAssetAmount), toString(targetPeriod), claimTxIdStr], SEP)
98101 }
99102
100103
101104 func parseWithdrawalRequestValueOrFail (s) = {
102105 let parts = split(s, SEP)
103106 if ((size(parts) == 5))
104107 then {
105108 let status = parts[1]
106109 let lpAssetAmount = valueOrErrorMessage(parseInt(parts[2]), wrapErr("invalid lpAssetAmount"))
107110 let targetPeriod = valueOrErrorMessage(parseInt(parts[3]), wrapErr("invalid targetPeriod"))
108111 let claimTxId = parts[4]
109112 $Tuple4(status, lpAssetAmount, targetPeriod, claimTxId)
110113 }
111114 else throwErr("invalid withdrawal request value")
112115 }
113116
114117
115118 let factoryAddressOption = match getString(this, keyFactoryAddress()) {
116119 case s: String =>
117120 addressFromString(s)
118121 case _: Unit =>
119122 unit
120123 case _ =>
121124 throw("Match error")
122125 }
123126
124127 let factoryAddressOrFail = valueOrErrorMessage(factoryAddressOption, wrapErr("invalid factory address"))
125128
126129 let lpAssetIdOption = match factoryAddressOption {
127130 case a: Address =>
128131 match getString(a, keyLpAssetId()) {
129132 case s: String =>
130133 fromBase58String(s)
131134 case _: Unit =>
132135 unit
133136 case _ =>
134137 throw("Match error")
135138 }
136139 case _: Unit =>
137140 unit
138141 case _ =>
139142 throw("Match error")
140143 }
141144
142145 let lpAssetIdOrFail = valueOrErrorMessage(lpAssetIdOption, wrapErr("invalid lpAssetId"))
143146
144147 let proxyTreasuryAddressOption = match factoryAddressOption {
145148 case a: Address =>
146149 match getString(a, keyProxyTreasuryAddress()) {
147150 case s: String =>
148151 addressFromString(s)
149152 case _: Unit =>
150153 unit
151154 case _ =>
152155 throw("Match error")
153156 }
154157 case _: Unit =>
155158 unit
156159 case _ =>
157160 throw("Match error")
158161 }
159162
160163 let proxyTreasuryAddressOrFail = valueOrErrorMessage(proxyTreasuryAddressOption, wrapErr("invalid proxy treasury address"))
161164
162-let featureTreasuryAddressOption = match factoryAddressOption {
165+let mainTreasuryAddressOption = match factoryAddressOption {
163166 case a: Address =>
164167 match getString(a, keyMainTreasuryAddress()) {
165168 case s: String =>
166169 addressFromString(s)
167170 case _: Unit =>
168171 unit
169172 case _ =>
170173 throw("Match error")
171174 }
172175 case _: Unit =>
173176 unit
174177 case _ =>
175178 throw("Match error")
176179 }
177180
178-let featureTreasuryAddressOrFail = valueOrErrorMessage(featureTreasuryAddressOption, wrapErr("invalid feature treasury address"))
181+let mainTreasuryAddressOrFail = valueOrErrorMessage(mainTreasuryAddressOption, wrapErr("invalid main treasury address"))
182+
183+func getManagerPublicKeyOrUnit () = match factoryAddressOption {
184+ case fa: Address =>
185+ match getString(fa, keyManagerPublicKey()) {
186+ case pub: String =>
187+ fromBase58String(pub)
188+ case _ =>
189+ unit
190+ }
191+ case _ =>
192+ unit
193+}
194+
179195
180196 func onlyAddress (i,address) = if ((i.caller == address))
181197 then true
182198 else throwErr("permission denied")
183199
184200
185201 func onlyFactory (i) = onlyAddress(i, factoryAddressOrFail)
186202
187203
188204 func rewardForOption (rewards,target) = {
189205 let s = size(rewards)
190- let $t042874312 = rewards[0]
191- let a0 = $t042874312._1
192- let r0 = $t042874312._2
193- let $t043154340 = rewards[1]
194- let a1 = $t043154340._1
195- let r1 = $t043154340._2
196- let $t043434368 = rewards[2]
197- let a2 = $t043434368._1
198- let r2 = $t043434368._2
206+ let $t046294654 = rewards[0]
207+ let a0 = $t046294654._1
208+ let r0 = $t046294654._2
209+ let $t046574682 = rewards[1]
210+ let a1 = $t046574682._1
211+ let r1 = $t046574682._2
212+ let $t046854710 = rewards[2]
213+ let a2 = $t046854710._1
214+ let r2 = $t046854710._2
199215 if (if ((s > 0))
200216 then (a0 == target)
201217 else false)
202218 then r0
203219 else if (if ((s > 1))
204220 then (a1 == target)
205221 else false)
206222 then r1
207223 else if (if ((s > 2))
208224 then (a2 == target)
209225 else false)
210226 then r2
211227 else unit
212228 }
213229
214230
215231 @Callable(i)
216232 func claimLP (userAddressBytes) = {
217233 let checkCaller = onlyFactory(i)
218234 if ((checkCaller == checkCaller))
219235 then {
220236 let userAddress = Address(userAddressBytes)
221237 let available = valueOrElse(getInteger(factoryAddressOrFail, keyAvailable(userAddress)), 0)
222238 let claimed = valueOrElse(getInteger(factoryAddressOrFail, keyClaimed(userAddress)), 0)
223239 let factoryActions = if ((available > 0))
224240 then [invoke(factoryAddressOrFail, "transferAsset", [userAddressBytes, available, lpAssetIdOrFail], nil), invoke(factoryAddressOrFail, "integerEntry", [keyAvailable(userAddress), 0], nil), invoke(factoryAddressOrFail, "integerEntry", [keyClaimed(userAddress), (claimed + available)], nil)]
225241 else throwErr("nothing to claim")
226242 $Tuple2(nil, factoryActions)
227243 }
228244 else throw("Strict value is not equal to itself.")
229245 }
230246
231247
232248
233249 @Callable(i)
234250 func finalize (userAddressBytes,newTreasuryVolumeInWaves,pwrManagersBonusInWaves,treasuryVolumeDiffAllocationCoef) = {
235251 let checkCaller = onlyFactory(i)
236252 if ((checkCaller == checkCaller))
237253 then {
238254 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
239255 let periodLength = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPeriodLength()), wrapErr("invalid period length"))
240256 let currentStartHeight = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyStartHeight(currentPeriodOrFail)), wrapErr("invalid start height"))
241257 let currentPriceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(currentPeriodOrFail)), wrapErr("invalid price"))
242258 let nextBlockToProcess = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyNextBlockToProcess()), wrapErr("invalid next block to process"))
243259 let periodEndHeight = ((currentStartHeight + periodLength) - 1)
244- let checks = [if ((i.originCaller == featureTreasuryAddressOrFail))
260+ let checks = [if ((i.originCaller == mainTreasuryAddressOrFail))
245261 then true
246262 else throwErr("permission denied"), if ((nextBlockToProcess > periodEndHeight))
247263 then true
248264 else throwErr("unprocessed blocks"), if ((newTreasuryVolumeInWaves >= 0))
249265 then true
250266 else throwErr("invalid new treasury volume"), if ((pwrManagersBonusInWaves >= 0))
251267 then true
252268 else throwErr("invalid PWR managers bonus"), if (if ((treasuryVolumeDiffAllocationCoef >= -(SCALE8)))
253269 then (SCALE8 >= treasuryVolumeDiffAllocationCoef)
254270 else false)
255271 then true
256272 else throwErr("invalid treasury volume diff allocation coefficient")]
257273 if ((checks == checks))
258274 then {
259275 let donatedWavesAmount = valueOrElse(getInteger(factoryAddressOrFail, keyDonated(unit)), 0)
260276 let investedWavesAmount = valueOrElse(getInteger(factoryAddressOrFail, keyInvested(unit)), 0)
261277 let currentTreasuryVolumeInWaves = (donatedWavesAmount + investedWavesAmount)
262278 let profitRaw = (newTreasuryVolumeInWaves - currentTreasuryVolumeInWaves)
263279 let pwrManagersBonusAmount = if (if ((profitRaw > 0))
264280 then (profitRaw >= pwrManagersBonusInWaves)
265281 else false)
266282 then pwrManagersBonusInWaves
267283 else 0
268284 let profit = (profitRaw - pwrManagersBonusAmount)
269285 let donationPart = if ((currentTreasuryVolumeInWaves > 0))
270286 then fraction(donatedWavesAmount, SCALE8, currentTreasuryVolumeInWaves)
271287 else 0
272288 let donationProfitPartRaw = fraction(profit, donationPart, SCALE8)
273289 let investmentProfitPartRaw = (profit - donationProfitPartRaw)
274290 let treasuryVolumeDiffAllocationCoefAbs = abs(treasuryVolumeDiffAllocationCoef)
275291 let amountToDonation = fraction(investmentProfitPartRaw, if ((0 > treasuryVolumeDiffAllocationCoef))
276292 then treasuryVolumeDiffAllocationCoefAbs
277293 else 0, SCALE8)
278294 let amountToInvestment = fraction(donationProfitPartRaw, if ((treasuryVolumeDiffAllocationCoef > 0))
279295 then treasuryVolumeDiffAllocationCoefAbs
280296 else 0, SCALE8)
281297 let donationProfitPart = ((donationProfitPartRaw - amountToInvestment) + amountToDonation)
282298 let investmentProfitPart = ((investmentProfitPartRaw - amountToDonation) + amountToInvestment)
283299 let investedWavesAmountNew = (investedWavesAmount + investmentProfitPart)
284300 let newPeriod = (currentPeriodOrFail + 1)
285301 let lpAssetQuantity = valueOrErrorMessage(assetInfo(lpAssetIdOrFail), wrapErr("invalid lpAsset info")).quantity
286302 let newPrice = fraction(investedWavesAmountNew, SCALE8, lpAssetQuantity)
287303 let lpAssetAmountToBurn = valueOrElse(getInteger(factoryAddressOrFail, keyWithdrawal()), 0)
288304 let newLpAmount = (lpAssetQuantity - lpAssetAmountToBurn)
289305 let newInvestAmount = max([0, fraction(newLpAmount, newPrice, SCALE8)])
290306 let paymentAmountMin = max([0, fraction(lpAssetAmountToBurn, newPrice, SCALE8)])
291307 let paymentOption = if ((size(i.payments) > 0))
292308 then i.payments[0]
293309 else unit
294310 let paymentAmount = value(paymentOption).amount
295311 let paymentAssetId = value(paymentOption).assetId
296312 let checkPayment = if (if ((paymentAmountMin == 0))
297313 then true
298314 else if (if ((paymentOption != unit))
299315 then (paymentAssetId == unit)
300316 else false)
301317 then (paymentAmount >= paymentAmountMin)
302318 else false)
303319 then true
304320 else throwErr(("invalid payments, payment amount min: " + toString(paymentAmountMin)))
305321 if ((checkPayment == checkPayment))
306322 then {
307323 let actions = if ((paymentOption != unit))
308324 then [ScriptTransfer(factoryAddressOrFail, paymentAmount, paymentAssetId)]
309325 else nil
310326 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), invoke(factoryAddressOrFail, "integerEntry", [keyInvested(unit), newInvestAmount], nil)]
311327 $Tuple2(actions, factoryActions)
312328 }
313329 else throw("Strict value is not equal to itself.")
314330 }
315331 else throw("Strict value is not equal to itself.")
316332 }
317333 else throw("Strict value is not equal to itself.")
318334 }
319335
320336
321337
322338 @Callable(i)
323339 func invest (userAddressBytes) = {
324340 let checkCaller = onlyFactory(i)
325341 if ((checkCaller == checkCaller))
326342 then {
327343 let userAddress = Address(userAddressBytes)
328344 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
329345 let currentPriceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(currentPeriodOrFail)), wrapErr("invalid price"))
330346 let payment = if ((size(i.payments) == 1))
331347 then i.payments[0]
332348 else throwErr("invalid payments")
333- let $t01089211069 = if (if ((payment.assetId == unit))
349+ let $t01123111408 = if (if ((payment.assetId == unit))
334350 then (payment.amount > 0)
335351 else false)
336352 then $Tuple2(payment.amount, payment.assetId)
337353 else throwErr("invalid payment amount")
338- let paymentAmount = $t01089211069._1
339- let paymentAssetId = $t01089211069._2
354+ let paymentAmount = $t01123111408._1
355+ let paymentAssetId = $t01123111408._2
340356 let lpAssetAmount = if ((currentPriceOrFail > 0))
341357 then fraction(paymentAmount, SCALE8, currentPriceOrFail)
342358 else 0
343359 let invested = valueOrElse(getInteger(factoryAddressOrFail, keyInvested(unit)), 0)
344- let actions = [ScriptTransfer(featureTreasuryAddressOrFail, paymentAmount, paymentAssetId)]
360+ let actions = [ScriptTransfer(mainTreasuryAddressOrFail, paymentAmount, paymentAssetId)]
345361 let factoryActions = [invoke(factoryAddressOrFail, "integerEntry", [keyInvested(unit), (invested + paymentAmount)], nil), invoke(factoryAddressOrFail, "reissue", [lpAssetAmount], nil), invoke(factoryAddressOrFail, "transferAsset", [userAddressBytes, lpAssetAmount, lpAssetIdOrFail], nil)]
346362 $Tuple2(actions, factoryActions)
347363 }
348364 else throw("Strict value is not equal to itself.")
349365 }
350366
351367
352368
353369 @Callable(i)
354370 func withdraw (userAddressBytes) = {
355371 let checkCaller = onlyFactory(i)
356372 if ((checkCaller == checkCaller))
357373 then {
358374 let userAddress = Address(userAddressBytes)
359375 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
360376 let payment = if ((size(i.payments) == 1))
361377 then i.payments[0]
362378 else throwErr(wrapErr("invalid payments"))
363379 let paymentAssetId = if ((payment.assetId == lpAssetIdOrFail))
364380 then lpAssetIdOrFail
365381 else throwErr("invalid payment asset")
366382 let paymentAmount = if ((payment.amount > 0))
367383 then payment.amount
368384 else throwErr("invalid payment amount")
369385 let withdrawal = valueOrElse(getInteger(factoryAddressOrFail, keyWithdrawal()), 0)
370386 let actions = [ScriptTransfer(factoryAddressOrFail, paymentAmount, paymentAssetId)]
371387 let factoryActions = [invoke(factoryAddressOrFail, "integerEntry", [keyWithdrawal(), (withdrawal + paymentAmount)], nil), invoke(factoryAddressOrFail, "stringEntry", [keyWithdrawalRequest(userAddress, i.transactionId), valueWithdrawalRequest(PENDING, paymentAmount, (currentPeriodOrFail + 1), unit)], nil)]
372388 if ((factoryActions == factoryActions))
373389 then $Tuple2(actions, factoryActions)
374390 else throw("Strict value is not equal to itself.")
375391 }
376392 else throw("Strict value is not equal to itself.")
377393 }
378394
379395
380396
381397 @Callable(i)
382398 func cancelWithdraw (userAddressBytes,txId) = {
383399 let checkCaller = onlyFactory(i)
384400 if ((checkCaller == checkCaller))
385401 then {
386402 let userAddress = Address(userAddressBytes)
387403 let withdrawalRequestOption = valueOrErrorMessage(getString(factoryAddressOrFail, keyWithdrawalRequest(userAddress, txId)), wrapErr("invalid withdrawal request"))
388404 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
389- let $t01347913592 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
390- let status = $t01347913592._1
391- let lpAssetAmount = $t01347913592._2
392- let targetPeriod = $t01347913592._3
393- let claimTxId = $t01347913592._4
405+ let $t01381513928 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
406+ let status = $t01381513928._1
407+ let lpAssetAmount = $t01381513928._2
408+ let targetPeriod = $t01381513928._3
409+ let claimTxId = $t01381513928._4
394410 let checks = [if ((status == PENDING))
395411 then true
396412 else throwErr("invalid withdrawal request status"), if ((targetPeriod > currentPeriodOrFail))
397413 then true
398414 else throwErr("invalid withdrawal request period")]
399415 if ((checks == checks))
400416 then {
401417 let withdrawal = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyWithdrawal()), wrapErr("invalid total withdrawal amount"))
402418 let factoryActions = [invoke(factoryAddressOrFail, "integerEntry", [keyWithdrawal(), if ((withdrawal >= lpAssetAmount))
403419 then (withdrawal - lpAssetAmount)
404420 else throwErr("invalid withdrawal amount")], nil), invoke(factoryAddressOrFail, "deleteEntry", [keyWithdrawalRequest(userAddress, txId)], nil), invoke(factoryAddressOrFail, "transferAsset", [userAddressBytes, lpAssetAmount, lpAssetIdOrFail], nil)]
405421 if ((factoryActions == factoryActions))
406422 then $Tuple2(nil, factoryActions)
407423 else throw("Strict value is not equal to itself.")
408424 }
409425 else throw("Strict value is not equal to itself.")
410426 }
411427 else throw("Strict value is not equal to itself.")
412428 }
413429
414430
415431
416432 @Callable(i)
417433 func claimWaves (userAddressBytes,txId) = {
418434 let checkCaller = onlyFactory(i)
419435 if ((checkCaller == checkCaller))
420436 then {
421437 let userAddress = Address(userAddressBytes)
422438 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
423439 let withdrawalRequestOption = valueOrErrorMessage(getString(factoryAddressOrFail, keyWithdrawalRequest(userAddress, txId)), wrapErr("invalid withdrawal request"))
424- let $t01492415037 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
425- let status = $t01492415037._1
426- let lpAssetAmount = $t01492415037._2
427- let targetPeriod = $t01492415037._3
428- let claimTxId = $t01492415037._4
440+ let $t01526015373 = parseWithdrawalRequestValueOrFail(withdrawalRequestOption)
441+ let status = $t01526015373._1
442+ let lpAssetAmount = $t01526015373._2
443+ let targetPeriod = $t01526015373._3
444+ let claimTxId = $t01526015373._4
429445 if ((status == FINISHED))
430446 then throwErr("invalid withdrawal request status")
431447 else if ((targetPeriod > currentPeriodOrFail))
432448 then throwErr("invalid withdrawal request period")
433449 else {
434450 let priceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(targetPeriod)), wrapErr("invalid price"))
435451 let amount = if ((priceOrFail > 0))
436452 then fraction(lpAssetAmount, priceOrFail, SCALE8)
437453 else 0
438454 let factoryActions = [invoke(factoryAddressOrFail, "stringEntry", [keyWithdrawalRequest(userAddress, txId), valueWithdrawalRequest(FINISHED, lpAssetAmount, targetPeriod, i.transactionId)], nil), invoke(factoryAddressOrFail, "transferWaves", [userAddressBytes, amount], nil)]
439455 $Tuple2(nil, factoryActions)
440456 }
441457 }
442458 else throw("Strict value is not equal to itself.")
443459 }
444460
445461
446462
447463 @Callable(i)
448464 func processBlocks (userAddressBytes) = {
449465 let checkCaller = onlyFactory(i)
450466 if ((checkCaller == checkCaller))
451467 then {
452468 let userAddress = Address(userAddressBytes)
453469 let currentPeriodOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyCurrentPeriod()), wrapErr("invalid period"))
454470 let periodLength = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPeriodLength()), wrapErr("invalid period length"))
455471 let currentStartHeight = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyStartHeight(currentPeriodOrFail)), wrapErr("invalid start height"))
456472 let currentPriceOrFail = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyPriceForPeriod(currentPeriodOrFail)), wrapErr("invalid price"))
457473 let nextBlockToProcess = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyNextBlockToProcess()), wrapErr("invalid next block to process"))
458474 let periodEndHeight = ((currentStartHeight + periodLength) - 1)
459475 let blocksProcessingBatchSizeMax = 40
460476 let blocksProcessingBatchSize = if (if (if ((height >= nextBlockToProcess))
461477 then if ((nextBlockToProcess >= currentStartHeight))
462478 then true
463479 else (currentPeriodOrFail == 0)
464480 else false)
465481 then (periodEndHeight >= nextBlockToProcess)
466482 else false)
467483 then min([((periodEndHeight - nextBlockToProcess) + 1), blocksProcessingBatchSizeMax])
468484 else throwErr(wrapErr("invalid target block"))
469485 let blockProcessingReward = valueOrErrorMessage(getInteger(factoryAddressOrFail, keyBlockProcessingReward()), wrapErr("invalid block processing reward"))
470486 let blockProcessingRewardByGenerator = (blockProcessingReward / blocksProcessingBatchSize)
471487 let blockProcessingRewardByGeneratorRemainder = (blockProcessingReward - (blockProcessingRewardByGenerator * blocksProcessingBatchSize))
472488 func map (acc,inc) = if ((inc >= blocksProcessingBatchSize))
473489 then acc
474490 else {
475491 let targetBlockHeight = (nextBlockToProcess + inc)
476492 let targetBlockInfo = valueOrErrorMessage(blockInfoByHeight(targetBlockHeight), wrapErr("invalid block info"))
477493 let treasuryRewardOrFail = valueOrErrorMessage(rewardForOption(targetBlockInfo.rewards, proxyTreasuryAddressOrFail), wrapErr(("invalid treasury reward for height " + toString(targetBlockHeight))))
478494 let generator = targetBlockInfo.generator
479495 let available = valueOrElse(getInteger(factoryAddressOrFail, keyAvailable(generator)), 0)
480496 let callerReward = if ((inc == (blocksProcessingBatchSize - 1)))
481497 then (blockProcessingRewardByGenerator + blockProcessingRewardByGeneratorRemainder)
482498 else blockProcessingRewardByGenerator
483499 let lpAssetAmount = if ((currentPriceOrFail > 0))
484500 then fraction((treasuryRewardOrFail - callerReward), SCALE8, currentPriceOrFail)
485501 else 0
486502 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)]
487503 if ((factoryActionsSingle == factoryActionsSingle))
488504 then {
489- let $t01927319306 = acc
490- let lpAssetAcc = $t01927319306._1
491- let rewardAcc = $t01927319306._2
505+ let $t01960919642 = acc
506+ let lpAssetAcc = $t01960919642._1
507+ let rewardAcc = $t01960919642._2
492508 $Tuple2((lpAssetAcc + lpAssetAmount), (rewardAcc + treasuryRewardOrFail))
493509 }
494510 else throw("Strict value is not equal to itself.")
495511 }
496512
497513 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 $t01957319649 = {
514+ let $t01990919985 = {
499515 let $l = list
500516 let $s = size($l)
501517 let $acc0 = $Tuple2(0, 0)
502518 func $f0_1 ($a,$i) = if (($i >= $s))
503519 then $a
504520 else map($a, $l[$i])
505521
506522 func $f0_2 ($a,$i) = if (($i >= $s))
507523 then $a
508524 else throw("List size exceeds 40")
509525
510526 $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)
511527 }
512- if (($t01957319649 == $t01957319649))
528+ if (($t01990919985 == $t01990919985))
513529 then {
514- let rewardAmountTotal = $t01957319649._2
515- let lpAssetAmountTotal = $t01957319649._1
530+ let rewardAmountTotal = $t01990919985._2
531+ let lpAssetAmountTotal = $t01990919985._1
516532 let rewardToMainTreasuryAmount = (rewardAmountTotal - blockProcessingReward)
517533 let invested = valueOrElse(getInteger(factoryAddressOrFail, keyInvested(unit)), 0)
518- let actions = [invoke(factoryAddressOrFail, "reissue", [lpAssetAmountTotal], nil), invoke(factoryAddressOrFail, "integerEntry", [keyNextBlockToProcess(), (nextBlockToProcess + blocksProcessingBatchSize)], nil), invoke(factoryAddressOrFail, "transferFromProxyTreasury", [featureTreasuryAddressOrFail.bytes, rewardToMainTreasuryAmount], nil), invoke(factoryAddressOrFail, "transferFromProxyTreasury", [userAddressBytes, blockProcessingReward], nil), invoke(factoryAddressOrFail, "integerEntry", [keyInvested(unit), (invested + rewardToMainTreasuryAmount)], nil)]
534+ let actions = [invoke(factoryAddressOrFail, "reissue", [lpAssetAmountTotal], nil), invoke(factoryAddressOrFail, "integerEntry", [keyNextBlockToProcess(), (nextBlockToProcess + blocksProcessingBatchSize)], nil), invoke(factoryAddressOrFail, "transferFromProxyTreasury", [mainTreasuryAddressOrFail.bytes, rewardToMainTreasuryAmount], nil), invoke(factoryAddressOrFail, "transferFromProxyTreasury", [userAddressBytes, blockProcessingReward], nil), invoke(factoryAddressOrFail, "integerEntry", [keyInvested(unit), (invested + rewardToMainTreasuryAmount)], nil)]
519535 if ((actions == actions))
520536 then $Tuple2(nil, unit)
521537 else throw("Strict value is not equal to itself.")
522538 }
523539 else throw("Strict value is not equal to itself.")
524540 }
525541 else throw("Strict value is not equal to itself.")
526542 }
527543
528544
529545 @Verifier(tx)
530-func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
546+func verify () = {
547+ let publicKey = match getManagerPublicKeyOrUnit() {
548+ case pub: ByteVector =>
549+ pub
550+ case _ =>
551+ tx.senderPublicKey
552+ }
553+ sigVerify(tx.bodyBytes, tx.proofs[0], publicKey)
554+ }
531555

github/deemru/w8io/169f3d6 
121.99 ms