tx · 29mtBhKRAQh5dMH7TYqryWqcsiUQQSZiwH2q7VG5JL8L 3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE: -0.02000000 Waves 2023.04.19 16:48 [2541523] smart account 3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE > SELF 0.00000000 Waves
{ "type": 13, "id": "29mtBhKRAQh5dMH7TYqryWqcsiUQQSZiwH2q7VG5JL8L", "fee": 2000000, "feeAssetId": null, "timestamp": 1681912178892, "version": 2, "chainId": 84, "sender": "3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE", "senderPublicKey": "G349Uq3FTox7dRNLeAfAQeoACvwZ9iEnVSaHcEYn6j8J", "proofs": [ "43nD94nAeS9XXD2VHdqRkLpZLs4KY7vzPv6H7JrSwvuNaaNmpAadMQyQpCrm9nW84mb9SST7K71zKj5HpQWHErjs" ], "script": "base64:BgKBHQgCEgYKBAEYEQESBAoCCAESABIDCgEBEgASABIAEgMKAQgSAwoBCBIDCgEIEgUKAwEBARIFCgMBAQESABIDCgEIEgcKBQgICAgIEgQKAhgREgMKAQgSACIDU0VQIgVTQ0FMRSIFTVVMVDgiCnplcm9CaWdJbnQiFHByb2Nlc3NpbmdTdGFnZVRvdGFsIhVwcm9jZXNzaW5nU3RhZ2VTaGFyZXMiC3dhdmVzU3RyaW5nIg5nZXROdW1iZXJCeUtleSIDa2V5Ig9nZXROdW1iZXJPckZhaWwiDmdldFN0cmluZ0J5S2V5Ig9nZXRTdHJpbmdPckZhaWwiDHBhcnNlQXNzZXRJZCIFaW5wdXQiB3dyYXBFcnIiA21zZyIIdGhyb3dFcnIiA2FicyIDdmFsIglhYnNCaWdJbnQiC2tleU1heERlcHRoIg9tYXhEZXB0aERlZmF1bHQiCG1heERlcHRoIhFrZXlGYWN0b3J5QWRkcmVzcyIRZmFjdG9yeUFkZHJlc3NTdHIiD2ZhY3RvcnlDb250cmFjdCISa2V5RW1pc3Npb25BZGRyZXNzIhlrZXlWb3RpbmdFbWlzc2lvbkNv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kFAmJkBQJiaQMJAAECBQJiZAIEVW5pdAgFAmRDD3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yCQD0AwMIBQJkQwlib2R5Qnl0ZXMJAJEDAggFAmRDBnByb29mcwAABQJkRUdeVbE=", "height": 2541523, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7XZdzfB3UDxSNaT5fGVgffHP3ZCa4PhVm4ErnowPNAaP Next: 958jHzAm97nACCBdSrVUWCfUuN6RBimQU8Rf2Q2Wjz3k Diff:
Old | New | Differences | |
---|---|---|---|
37 | 37 | ||
38 | 38 | func throwErr (msg) = throw(wrapErr(msg)) | |
39 | 39 | ||
40 | - | ||
41 | - | func keyWxAssetId () = makeString(["%s", "wxAssetId"], SEP) | |
42 | - | ||
43 | - | ||
44 | - | let wxAssetId = parseAssetId(getStringValue(this, keyWxAssetId())) | |
45 | 40 | ||
46 | 41 | func abs (val) = if ((0 > val)) | |
47 | 42 | then -(val) | |
121 | 116 | ||
122 | 117 | func keyConfig () = "%s__config" | |
123 | 118 | ||
119 | + | ||
120 | + | func getEmissionAddress () = addressFromStringValue(valueOrErrorMessage(getString(this, keyEmissionAddress()), (("mandatory this." + keyEmissionAddress()) + " is not defined"))) | |
121 | + | ||
122 | + | ||
123 | + | let emissionAddress = getEmissionAddress() | |
124 | + | ||
125 | + | let wxAssetIdStr = split(value(getString(emissionAddress, keyConfig())), SEP)[1] | |
126 | + | ||
127 | + | let wxAssetId = fromBase58String(wxAssetIdStr) | |
124 | 128 | ||
125 | 129 | func readConfigArrayOrFail () = split(getStringOrFail(keyConfig()), SEP) | |
126 | 130 | ||
214 | 218 | func keyTradingRewardHistory (user,i) = makeString(["%s%s%s%s", "tradingReward", "history", user, toBase58String(i.transactionId)], SEP) | |
215 | 219 | ||
216 | 220 | ||
217 | - | func keyMaxRecipients () = makeString(["%s | |
221 | + | func keyMaxRecipients () = makeString(["%s", "maxRecipients"], SEP) | |
218 | 222 | ||
219 | 223 | ||
220 | 224 | func HistoryEntry (type,user,amount,i) = { | |
342 | 346 | func tradeRewardInternal (paymentAmountLeftOver,userAddresses,rewards,currentIter) = if ((currentIter == size(userAddresses))) | |
343 | 347 | then nil | |
344 | 348 | else { | |
345 | - | let | |
349 | + | let checks = [if ((i.caller == this)) | |
346 | 350 | then true | |
347 | - | else throwErr("insufficient payment assetId") | |
348 | - | if ((insufficientFundsCheck == insufficientFundsCheck)) | |
351 | + | else throwErr("Permission denied"), if ((paymentAmountLeftOver >= rewards[currentIter])) | |
352 | + | then true | |
353 | + | else throwErr("insufficient payment assetId")] | |
354 | + | if ((checks == checks)) | |
349 | 355 | then { | |
350 | 356 | let tradeRewardInternal = invoke(this, "tradeRewardInternal", [(paymentAmountLeftOver - rewards[currentIter]), userAddresses, rewards, (currentIter + 1)], nil) | |
351 | 357 | if ((tradeRewardInternal == tradeRewardInternal)) | |
388 | 394 | then $Tuple2(nil, false) | |
389 | 395 | else if ((processingStage == processingStageTotal)) | |
390 | 396 | then { | |
391 | - | let $ | |
392 | - | let userWeight = $ | |
393 | - | let userActions = $ | |
397 | + | let $t01418114297 = calcUserWeight(boostingContractOrFail(), heightForPeriod, currentPeriod, currentUser) | |
398 | + | let userWeight = $t01418114297._1 | |
399 | + | let userActions = $t01418114297._2 | |
394 | 400 | let totalWeightNew = (totalWeight + userWeight) | |
395 | 401 | let processingActions = if (((usersCount - 1) > currentUser)) | |
396 | 402 | then [IntegerEntry(keyNextProcessedUser(), (currentUser + 1))] | |
515 | 521 | func claimReward () = { | |
516 | 522 | let cfgArray = readConfigArrayOrFail() | |
517 | 523 | let address = toString(i.caller) | |
518 | - | let $ | |
519 | - | let amount = $ | |
520 | - | let actions = $ | |
524 | + | let $t01948619536 = commonClaimReward(address) | |
525 | + | let amount = $t01948619536._1 | |
526 | + | let actions = $t01948619536._2 | |
521 | 527 | let checkAmount = if ((amount > 0)) | |
522 | 528 | then true | |
523 | 529 | else throw("Nothing to claim") | |
540 | 546 | ||
541 | 547 | @Callable(i) | |
542 | 548 | func claimRewardREADONLY (address) = { | |
543 | - | let $ | |
544 | - | let amount = $ | |
545 | - | let actions = $ | |
549 | + | let $t02010920159 = commonClaimReward(address) | |
550 | + | let amount = $t02010920159._1 | |
551 | + | let actions = $t02010920159._2 | |
546 | 552 | let referralUnclaimed = valueOrElse(getInteger(referralsContractAddressOrFail, keyUnclaimedReferral(referralProgramName, address)), 0) | |
547 | 553 | let totalAmount = (amount + referralUnclaimed) | |
548 | 554 | $Tuple2(nil, totalAmount) | |
609 | 615 | let ann = (amp * nCoins) | |
610 | 616 | let arr = [0, 1, 2, 3, 4, 5, 6] | |
611 | 617 | func calc (acc,cur) = { | |
612 | - | let $ | |
613 | - | let d = $ | |
614 | - | let dPrev = $ | |
615 | - | let found = $ | |
618 | + | let $t02279222819 = acc | |
619 | + | let d = $t02279222819._1 | |
620 | + | let dPrev = $t02279222819._2 | |
621 | + | let found = $t02279222819._3 | |
616 | 622 | if ((found != unit)) | |
617 | 623 | then acc | |
618 | 624 | else { | |
625 | 631 | } | |
626 | 632 | } | |
627 | 633 | ||
628 | - | let $ | |
634 | + | let $t02341723480 = { | |
629 | 635 | let $l = arr | |
630 | 636 | let $s = size($l) | |
631 | 637 | let $acc0 = $Tuple3(s, unit, unit) | |
639 | 645 | ||
640 | 646 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7) | |
641 | 647 | } | |
642 | - | let dNext = $ | |
643 | - | let dPrev = $ | |
644 | - | let found = $ | |
648 | + | let dNext = $t02341723480._1 | |
649 | + | let dPrev = $t02341723480._2 | |
650 | + | let found = $t02341723480._3 | |
645 | 651 | if ((found != unit)) | |
646 | 652 | then $Tuple2(nil, toString(dNext)) | |
647 | 653 | else { | |
660 | 666 | let payment = i.payments[0] | |
661 | 667 | let paymentAssetId = payment.assetId | |
662 | 668 | let paymentAmount = payment.amount | |
663 | - | let checks = [if ((size(userAddresses) | |
669 | + | let checks = [if ((maxRecipients >= size(userAddresses))) | |
664 | 670 | then true | |
665 | 671 | else throwErr("Too many recipients"), if (argsComparison) | |
666 | 672 | then true |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | 5 | ||
6 | 6 | let SCALE = 1000 | |
7 | 7 | ||
8 | 8 | let MULT8 = 100000000 | |
9 | 9 | ||
10 | 10 | let zeroBigInt = toBigInt(0) | |
11 | 11 | ||
12 | 12 | let processingStageTotal = 0 | |
13 | 13 | ||
14 | 14 | let processingStageShares = 1 | |
15 | 15 | ||
16 | 16 | let wavesString = "WAVES" | |
17 | 17 | ||
18 | 18 | func getNumberByKey (key) = valueOrElse(getInteger(this, key), 0) | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func getNumberOrFail (key) = valueOrErrorMessage(getInteger(this, key), (("mandatory this." + key) + " is not defined")) | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | func getStringByKey (key) = valueOrElse(getString(this, key), "") | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (("mandatory this." + key) + " is not defined")) | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func parseAssetId (input) = if ((input == wavesString)) | |
31 | 31 | then unit | |
32 | 32 | else fromBase58String(input) | |
33 | 33 | ||
34 | 34 | ||
35 | 35 | func wrapErr (msg) = makeString(["gwx_reward.ride:", msg], " ") | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | func throwErr (msg) = throw(wrapErr(msg)) | |
39 | 39 | ||
40 | - | ||
41 | - | func keyWxAssetId () = makeString(["%s", "wxAssetId"], SEP) | |
42 | - | ||
43 | - | ||
44 | - | let wxAssetId = parseAssetId(getStringValue(this, keyWxAssetId())) | |
45 | 40 | ||
46 | 41 | func abs (val) = if ((0 > val)) | |
47 | 42 | then -(val) | |
48 | 43 | else val | |
49 | 44 | ||
50 | 45 | ||
51 | 46 | func absBigInt (val) = if ((zeroBigInt > val)) | |
52 | 47 | then -(val) | |
53 | 48 | else val | |
54 | 49 | ||
55 | 50 | ||
56 | 51 | let keyMaxDepth = "%s__maxDepth" | |
57 | 52 | ||
58 | 53 | let maxDepthDefault = 30 | |
59 | 54 | ||
60 | 55 | let maxDepth = valueOrElse(getInteger(this, keyMaxDepth), maxDepthDefault) | |
61 | 56 | ||
62 | 57 | func keyFactoryAddress () = "%s%s__config__factoryAddress" | |
63 | 58 | ||
64 | 59 | ||
65 | 60 | let factoryAddressStr = getStringOrFail(keyFactoryAddress()) | |
66 | 61 | ||
67 | 62 | let factoryContract = addressFromStringValue(factoryAddressStr) | |
68 | 63 | ||
69 | 64 | func keyEmissionAddress () = "%s%s__config__emissionAddress" | |
70 | 65 | ||
71 | 66 | ||
72 | 67 | func keyVotingEmissionContract () = makeString(["%s", "votingEmissionContract"], SEP) | |
73 | 68 | ||
74 | 69 | ||
75 | 70 | let votingEmissionContract = addressFromStringValue(getStringValue(factoryContract, keyVotingEmissionContract())) | |
76 | 71 | ||
77 | 72 | func keyNumToUserMapping (num) = makeString(["%s%s%s", "mapping", "num2user", toString(num)], SEP) | |
78 | 73 | ||
79 | 74 | ||
80 | 75 | let keyReferralProgramName = makeString(["%s%s", "referral", "programName"], SEP) | |
81 | 76 | ||
82 | 77 | let referralProgramNameDefault = "wxlock" | |
83 | 78 | ||
84 | 79 | let referralProgramName = valueOrElse(getString(this, keyReferralProgramName), referralProgramNameDefault) | |
85 | 80 | ||
86 | 81 | let keyReferralMinGWxAmount = makeString(["%s%s", "referral", "minGWxAmount"], SEP) | |
87 | 82 | ||
88 | 83 | let referralMinGWxAmountDefault = (500 * MULT8) | |
89 | 84 | ||
90 | 85 | let referralMinGWxAmount = valueOrElse(getInteger(this, keyReferralMinGWxAmount), referralMinGWxAmountDefault) | |
91 | 86 | ||
92 | 87 | let keyReferrerRewardPermille = makeString(["%s%s", "referral", "referrerRewardPermille"], SEP) | |
93 | 88 | ||
94 | 89 | let referrerRewardPermilleDefault = 50 | |
95 | 90 | ||
96 | 91 | let referrerRewardPermille = valueOrElse(getInteger(this, keyReferrerRewardPermille), referrerRewardPermilleDefault) | |
97 | 92 | ||
98 | 93 | let keyReferralRewardPermille = makeString(["%s%s", "referral", "referralRewardPermille"], SEP) | |
99 | 94 | ||
100 | 95 | let referralRewardPermilleDefault = 50 | |
101 | 96 | ||
102 | 97 | let referralRewardPermille = valueOrElse(getInteger(this, keyReferralRewardPermille), referralRewardPermilleDefault) | |
103 | 98 | ||
104 | 99 | func keyReferrer (referralAddress) = makeString(["%s%s%s", "referrer", referralProgramName, referralAddress], SEP) | |
105 | 100 | ||
106 | 101 | ||
107 | 102 | func keyUnclaimedReferral (programName,claimerAddress) = makeString(["%s%s%s", "unclaimedReferral", programName, claimerAddress], SEP) | |
108 | 103 | ||
109 | 104 | ||
110 | 105 | let emissionAddressStr = getStringOrFail(keyEmissionAddress()) | |
111 | 106 | ||
112 | 107 | let emissionContract = addressFromStringValue(emissionAddressStr) | |
113 | 108 | ||
114 | 109 | let IdxCfgAssetId = 1 | |
115 | 110 | ||
116 | 111 | let IdxCfgPacemakerAddress = 2 | |
117 | 112 | ||
118 | 113 | let IdxCfgBoostingContract = 3 | |
119 | 114 | ||
120 | 115 | let IdxCfgMaxDepth = 4 | |
121 | 116 | ||
122 | 117 | func keyConfig () = "%s__config" | |
123 | 118 | ||
119 | + | ||
120 | + | func getEmissionAddress () = addressFromStringValue(valueOrErrorMessage(getString(this, keyEmissionAddress()), (("mandatory this." + keyEmissionAddress()) + " is not defined"))) | |
121 | + | ||
122 | + | ||
123 | + | let emissionAddress = getEmissionAddress() | |
124 | + | ||
125 | + | let wxAssetIdStr = split(value(getString(emissionAddress, keyConfig())), SEP)[1] | |
126 | + | ||
127 | + | let wxAssetId = fromBase58String(wxAssetIdStr) | |
124 | 128 | ||
125 | 129 | func readConfigArrayOrFail () = split(getStringOrFail(keyConfig()), SEP) | |
126 | 130 | ||
127 | 131 | ||
128 | 132 | func formatConfig (wxAssetIdStr,matcherPacemakerAddressStr,boostingContractAddressStr,maxDepth) = makeString(["%s%s%s%d", wxAssetIdStr, matcherPacemakerAddressStr, boostingContractAddressStr, toString(maxDepth)], SEP) | |
129 | 133 | ||
130 | 134 | ||
131 | 135 | func boostingContractOrFail () = { | |
132 | 136 | let cfgArray = readConfigArrayOrFail() | |
133 | 137 | valueOrErrorMessage(addressFromString(cfgArray[IdxCfgBoostingContract]), "boosting contract address is not defined") | |
134 | 138 | } | |
135 | 139 | ||
136 | 140 | ||
137 | 141 | func keyGwxRewardEmissionStartHeight () = "%s%s__gwxRewardEmissionPart__startHeight" | |
138 | 142 | ||
139 | 143 | ||
140 | 144 | func keyUsersCount () = "%s__nextUserNum" | |
141 | 145 | ||
142 | 146 | ||
143 | 147 | func keyRatePerBlockCurrent () = "%s%s__ratePerBlock__current" | |
144 | 148 | ||
145 | 149 | ||
146 | 150 | func keyGwxHoldersRewardCurrent () = "%s%s__gwxHoldersReward__current" | |
147 | 151 | ||
148 | 152 | ||
149 | 153 | func keyGwxHoldersRewardNext () = "%s%s__gwxHoldersReward__next" | |
150 | 154 | ||
151 | 155 | ||
152 | 156 | func keyPoolWeightVirtual () = "%s%s__poolWeight__GWXvirtualPOOL" | |
153 | 157 | ||
154 | 158 | ||
155 | 159 | func keyNextProcessedUser () = "%s__nextProcessedUser" | |
156 | 160 | ||
157 | 161 | ||
158 | 162 | func keyLatestPeriod () = "%s__latestPeriod" | |
159 | 163 | ||
160 | 164 | ||
161 | 165 | func keyNextPeriod () = "%s__nextPeriod" | |
162 | 166 | ||
163 | 167 | ||
164 | 168 | func keyProcessingStage () = "%s__processingStage" | |
165 | 169 | ||
166 | 170 | ||
167 | 171 | func keyNextProcessedPeriod () = "%s__nextProcessedPeriod" | |
168 | 172 | ||
169 | 173 | ||
170 | 174 | func keyUserUnclaimed (userIndex) = makeString(["%s%d", "userUnclaimed", toString(userIndex)], SEP) | |
171 | 175 | ||
172 | 176 | ||
173 | 177 | func keyNextUnlaimedPeriodOfUser (userIndex) = makeString(["%s%d__nextClaimedPeriod", toString(userIndex)], SEP) | |
174 | 178 | ||
175 | 179 | ||
176 | 180 | func keyLastProcessedPeriodOfUser (userIndex) = makeString(["%s%d__lastProcessedPeriod", toString(userIndex)], SEP) | |
177 | 181 | ||
178 | 182 | ||
179 | 183 | func keyHeightForPeriod (period) = makeString(["%s%d__startHeightForPeriod", toString(period)], SEP) | |
180 | 184 | ||
181 | 185 | ||
182 | 186 | func keyAuxEmissionRewardForPeriod (period) = makeString(["%s%d__auxEmissionReward", toString(period)], SEP) | |
183 | 187 | ||
184 | 188 | ||
185 | 189 | func keyTotalAmountForPeriod (period) = makeString(["%s%d__totalAmountForPeriod", toString(period)], SEP) | |
186 | 190 | ||
187 | 191 | ||
188 | 192 | func keyLastPayoutInfo () = "%s__lastPayoutInfo" | |
189 | 193 | ||
190 | 194 | ||
191 | 195 | func PeriodPayoutInfo (period,matcherReward,emissionReward) = makeString(["%d%d%d", toString(period), toString(matcherReward), toString(emissionReward)], SEP) | |
192 | 196 | ||
193 | 197 | ||
194 | 198 | func keyPayoutHistoryInfo (period) = makeString(["%s%s%d__payouts__history", toString(period)], SEP) | |
195 | 199 | ||
196 | 200 | ||
197 | 201 | func keyTotalWeightForPeriod (period) = makeString(["%s%d__totalWeightForPeriod", toString(period)], SEP) | |
198 | 202 | ||
199 | 203 | ||
200 | 204 | func keyUserKValueForPeriod (period,userIndex) = makeString(["%s%d%s%d__paramByPeriod", toString(userIndex), "k", toString(period)], SEP) | |
201 | 205 | ||
202 | 206 | ||
203 | 207 | func keyUserBValueForPeriod (period,userIndex) = makeString(["%s%d%s%d__paramByPeriod", toString(userIndex), "b", toString(period)], SEP) | |
204 | 208 | ||
205 | 209 | ||
206 | 210 | func keyUserWeightForPeriod (period,userIndex) = makeString(["%s%d%s%d__paramByPeriod", toString(userIndex), "weight", toString(period)], SEP) | |
207 | 211 | ||
208 | 212 | ||
209 | 213 | func keyReferralsContractAddress () = makeString(["%s%s", "config", "referralsContractAddress"], SEP) | |
210 | 214 | ||
211 | 215 | ||
212 | 216 | let referralsContractAddressOrFail = addressFromStringValue(getStringOrFail(keyReferralsContractAddress())) | |
213 | 217 | ||
214 | 218 | func keyTradingRewardHistory (user,i) = makeString(["%s%s%s%s", "tradingReward", "history", user, toBase58String(i.transactionId)], SEP) | |
215 | 219 | ||
216 | 220 | ||
217 | - | func keyMaxRecipients () = makeString(["%s | |
221 | + | func keyMaxRecipients () = makeString(["%s", "maxRecipients"], SEP) | |
218 | 222 | ||
219 | 223 | ||
220 | 224 | func HistoryEntry (type,user,amount,i) = { | |
221 | 225 | let historyKEY = makeString(["%s%s%s%s__history", type, user, toBase58String(i.transactionId)], SEP) | |
222 | 226 | let historyDATA = makeString(["%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(amount)], SEP) | |
223 | 227 | StringEntry(historyKEY, historyDATA) | |
224 | 228 | } | |
225 | 229 | ||
226 | 230 | ||
227 | 231 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
228 | 232 | ||
229 | 233 | ||
230 | 234 | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
231 | 235 | ||
232 | 236 | ||
233 | 237 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
234 | 238 | case s: String => | |
235 | 239 | fromBase58String(s) | |
236 | 240 | case _: Unit => | |
237 | 241 | unit | |
238 | 242 | case _ => | |
239 | 243 | throw("Match error") | |
240 | 244 | } | |
241 | 245 | ||
242 | 246 | ||
243 | 247 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
244 | 248 | case s: String => | |
245 | 249 | fromBase58String(s) | |
246 | 250 | case _: Unit => | |
247 | 251 | unit | |
248 | 252 | case _ => | |
249 | 253 | throw("Match error") | |
250 | 254 | } | |
251 | 255 | ||
252 | 256 | ||
253 | 257 | func mustManager (i) = { | |
254 | 258 | let pd = throw("Permission denied") | |
255 | 259 | match managerPublicKeyOrUnit() { | |
256 | 260 | case pk: ByteVector => | |
257 | 261 | if ((i.callerPublicKey == pk)) | |
258 | 262 | then true | |
259 | 263 | else pd | |
260 | 264 | case _: Unit => | |
261 | 265 | if ((i.caller == this)) | |
262 | 266 | then true | |
263 | 267 | else pd | |
264 | 268 | case _ => | |
265 | 269 | throw("Match error") | |
266 | 270 | } | |
267 | 271 | } | |
268 | 272 | ||
269 | 273 | ||
270 | 274 | func calcUserWeight (boostingContractAddress,heightForPeriod,period,userIndex) = { | |
271 | 275 | let kLast = keyLastProcessedPeriodOfUser(userIndex) | |
272 | 276 | let kKey = keyUserKValueForPeriod(period, userIndex) | |
273 | 277 | let kRaw = getInteger(boostingContractAddress, kKey) | |
274 | 278 | let kUserWeight = keyUserWeightForPeriod(period, userIndex) | |
275 | 279 | if (isDefined(kRaw)) | |
276 | 280 | then { | |
277 | 281 | let k = value(kRaw) | |
278 | 282 | let b = value(getInteger(boostingContractAddress, keyUserBValueForPeriod(period, userIndex))) | |
279 | 283 | let w = ((k * heightForPeriod) + b) | |
280 | 284 | if ((w > 0)) | |
281 | 285 | then $Tuple2((w / SCALE), [IntegerEntry(kLast, period), IntegerEntry(kUserWeight, w)]) | |
282 | 286 | else $Tuple2(0, nil) | |
283 | 287 | } | |
284 | 288 | else { | |
285 | 289 | let p = getInteger(this, kLast) | |
286 | 290 | if (if (isDefined(p)) | |
287 | 291 | then (period >= value(p)) | |
288 | 292 | else false) | |
289 | 293 | then { | |
290 | 294 | let pv = value(p) | |
291 | 295 | let k = value(getInteger(boostingContractAddress, keyUserKValueForPeriod(pv, userIndex))) | |
292 | 296 | let b = value(getInteger(boostingContractAddress, keyUserBValueForPeriod(pv, userIndex))) | |
293 | 297 | let w = ((k * heightForPeriod) + b) | |
294 | 298 | if ((w > 0)) | |
295 | 299 | then $Tuple2((w / SCALE), [IntegerEntry(kUserWeight, w)]) | |
296 | 300 | else $Tuple2(0, nil) | |
297 | 301 | } | |
298 | 302 | else $Tuple2(0, nil) | |
299 | 303 | } | |
300 | 304 | } | |
301 | 305 | ||
302 | 306 | ||
303 | 307 | func calcUserWeightForClaim (boostingContractAddress,heightForPeriod,period,userIndex) = { | |
304 | 308 | let kUserWeight = keyUserWeightForPeriod(period, userIndex) | |
305 | 309 | let userWeightOrUnit = getInteger(kUserWeight) | |
306 | 310 | match userWeightOrUnit { | |
307 | 311 | case _: Unit => | |
308 | 312 | 0 | |
309 | 313 | case w: Int => | |
310 | 314 | (w / SCALE) | |
311 | 315 | case _ => | |
312 | 316 | throw("Match error") | |
313 | 317 | } | |
314 | 318 | } | |
315 | 319 | ||
316 | 320 | ||
317 | 321 | func getUserIndexByAddress (boostingContractAddressStr,userAddress) = { | |
318 | 322 | let key = makeString(["%s%s%s", "mapping", "user2num", userAddress], SEP) | |
319 | 323 | parseIntValue(valueOrErrorMessage(getString(Address(fromBase58String(boostingContractAddressStr)), key), ((("User address " + userAddress) + " is not found in boosting contract data, key=") + key))) | |
320 | 324 | } | |
321 | 325 | ||
322 | 326 | ||
323 | 327 | func nextPeriod () = getNumberByKey(keyNextPeriod()) | |
324 | 328 | ||
325 | 329 | ||
326 | 330 | func commonClaimReward (userAddress) = { | |
327 | 331 | let cfgArray = readConfigArrayOrFail() | |
328 | 332 | let userIdx = getUserIndexByAddress(cfgArray[IdxCfgBoostingContract], userAddress) | |
329 | 333 | let userUnclaimedOption = getInteger(keyUserUnclaimed(userIdx)) | |
330 | 334 | match userUnclaimedOption { | |
331 | 335 | case _: Unit => | |
332 | 336 | $Tuple2(0, nil) | |
333 | 337 | case u: Int => | |
334 | 338 | $Tuple2(u, [IntegerEntry(keyUserUnclaimed(userIdx), 0)]) | |
335 | 339 | case _ => | |
336 | 340 | throw("Match error") | |
337 | 341 | } | |
338 | 342 | } | |
339 | 343 | ||
340 | 344 | ||
341 | 345 | @Callable(i) | |
342 | 346 | func tradeRewardInternal (paymentAmountLeftOver,userAddresses,rewards,currentIter) = if ((currentIter == size(userAddresses))) | |
343 | 347 | then nil | |
344 | 348 | else { | |
345 | - | let | |
349 | + | let checks = [if ((i.caller == this)) | |
346 | 350 | then true | |
347 | - | else throwErr("insufficient payment assetId") | |
348 | - | if ((insufficientFundsCheck == insufficientFundsCheck)) | |
351 | + | else throwErr("Permission denied"), if ((paymentAmountLeftOver >= rewards[currentIter])) | |
352 | + | then true | |
353 | + | else throwErr("insufficient payment assetId")] | |
354 | + | if ((checks == checks)) | |
349 | 355 | then { | |
350 | 356 | let tradeRewardInternal = invoke(this, "tradeRewardInternal", [(paymentAmountLeftOver - rewards[currentIter]), userAddresses, rewards, (currentIter + 1)], nil) | |
351 | 357 | if ((tradeRewardInternal == tradeRewardInternal)) | |
352 | 358 | then { | |
353 | 359 | let tradingRewardHistoryKey = keyTradingRewardHistory(userAddresses[currentIter], i) | |
354 | 360 | let userAddress = addressFromStringValue(userAddresses[currentIter]) | |
355 | 361 | $Tuple2([IntegerEntry(tradingRewardHistoryKey, rewards[currentIter]), ScriptTransfer(userAddress, rewards[currentIter], wxAssetId)], tradeRewardInternal) | |
356 | 362 | } | |
357 | 363 | else throw("Strict value is not equal to itself.") | |
358 | 364 | } | |
359 | 365 | else throw("Strict value is not equal to itself.") | |
360 | 366 | } | |
361 | 367 | ||
362 | 368 | ||
363 | 369 | ||
364 | 370 | @Callable(i) | |
365 | 371 | func updateReferralActivity (userAddress,gWxAmountStart) = { | |
366 | 372 | let referrer = getString(referralsContractAddressOrFail, keyReferrer(userAddress)) | |
367 | 373 | let activeReferralInv = if ((referrer == unit)) | |
368 | 374 | then unit | |
369 | 375 | else invoke(referralsContractAddressOrFail, "updateReferralActivity", [referralProgramName, userAddress, (gWxAmountStart >= referralMinGWxAmount)], nil) | |
370 | 376 | if ((activeReferralInv == activeReferralInv)) | |
371 | 377 | then $Tuple2(nil, unit) | |
372 | 378 | else throw("Strict value is not equal to itself.") | |
373 | 379 | } | |
374 | 380 | ||
375 | 381 | ||
376 | 382 | ||
377 | 383 | @Callable(i) | |
378 | 384 | func finalizeHelper () = { | |
379 | 385 | let processingStage = valueOrElse(getInteger(keyProcessingStage()), processingStageTotal) | |
380 | 386 | let currentPeriod = getNumberByKey(keyNextProcessedPeriod()) | |
381 | 387 | let currentUser = getNumberByKey(keyNextProcessedUser()) | |
382 | 388 | let latestPeriod = getNumberByKey(keyLatestPeriod()) | |
383 | 389 | let usersCount = valueOrElse(getInteger(boostingContractOrFail(), keyUsersCount()), 0) | |
384 | 390 | let totalWeightKey = keyTotalWeightForPeriod(currentPeriod) | |
385 | 391 | let totalWeight = getNumberByKey(keyTotalWeightForPeriod(currentPeriod)) | |
386 | 392 | let heightForPeriod = getNumberByKey(keyHeightForPeriod(currentPeriod)) | |
387 | 393 | if ((currentPeriod > latestPeriod)) | |
388 | 394 | then $Tuple2(nil, false) | |
389 | 395 | else if ((processingStage == processingStageTotal)) | |
390 | 396 | then { | |
391 | - | let $ | |
392 | - | let userWeight = $ | |
393 | - | let userActions = $ | |
397 | + | let $t01418114297 = calcUserWeight(boostingContractOrFail(), heightForPeriod, currentPeriod, currentUser) | |
398 | + | let userWeight = $t01418114297._1 | |
399 | + | let userActions = $t01418114297._2 | |
394 | 400 | let totalWeightNew = (totalWeight + userWeight) | |
395 | 401 | let processingActions = if (((usersCount - 1) > currentUser)) | |
396 | 402 | then [IntegerEntry(keyNextProcessedUser(), (currentUser + 1))] | |
397 | 403 | else [IntegerEntry(keyProcessingStage(), processingStageShares), IntegerEntry(keyNextProcessedUser(), 0)] | |
398 | 404 | $Tuple2((([IntegerEntry(totalWeightKey, totalWeightNew)] ++ processingActions) ++ userActions), true) | |
399 | 405 | } | |
400 | 406 | else if ((processingStage == processingStageShares)) | |
401 | 407 | then { | |
402 | 408 | let userWeight = calcUserWeightForClaim(boostingContractOrFail(), heightForPeriod, currentPeriod, currentUser) | |
403 | 409 | let userAmountMatcherForPeriod = fraction(getNumberByKey(keyTotalAmountForPeriod(currentPeriod)), userWeight, totalWeight) | |
404 | 410 | let userAmountEmissionForPeriod = fraction(getNumberByKey(keyAuxEmissionRewardForPeriod(currentPeriod)), userWeight, totalWeight) | |
405 | 411 | let userTotalAmount = (userAmountEmissionForPeriod + userAmountMatcherForPeriod) | |
406 | 412 | let userUnclaimedOption = getInteger(keyUserUnclaimed(currentUser)) | |
407 | 413 | let userAddress = getStringValue(boostingContractOrFail(), keyNumToUserMapping(currentUser)) | |
408 | 414 | let referrer = getString(referralsContractAddressOrFail, keyReferrer(userAddress)) | |
409 | 415 | let activeReferralInv = if ((referrer == unit)) | |
410 | 416 | then unit | |
411 | 417 | else invoke(referralsContractAddressOrFail, "updateReferralActivity", [referralProgramName, userAddress, (userWeight >= referralMinGWxAmount)], nil) | |
412 | 418 | if ((activeReferralInv == activeReferralInv)) | |
413 | 419 | then { | |
414 | 420 | let referralInv = if (if ((referrer == unit)) | |
415 | 421 | then true | |
416 | 422 | else (referralMinGWxAmount > userWeight)) | |
417 | 423 | then unit | |
418 | 424 | else { | |
419 | 425 | let referrerReward = fraction(userTotalAmount, referrerRewardPermille, SCALE) | |
420 | 426 | let referralReward = fraction(userTotalAmount, referralRewardPermille, SCALE) | |
421 | 427 | invoke(referralsContractAddressOrFail, "incUnclaimed", [referralProgramName, userAddress, referrerReward, referralReward], nil) | |
422 | 428 | } | |
423 | 429 | if ((referralInv == referralInv)) | |
424 | 430 | then { | |
425 | 431 | let unclaimedActions = [IntegerEntry(keyUserUnclaimed(currentUser), (valueOrElse(userUnclaimedOption, 0) + userTotalAmount))] | |
426 | 432 | let processingActions = if (((usersCount - 1) > currentUser)) | |
427 | 433 | then [IntegerEntry(keyNextProcessedUser(), (currentUser + 1))] | |
428 | 434 | else [IntegerEntry(keyNextProcessedPeriod(), (currentPeriod + 1)), IntegerEntry(keyNextProcessedUser(), 0), DeleteEntry(keyProcessingStage())] | |
429 | 435 | $Tuple2((unclaimedActions ++ processingActions), true) | |
430 | 436 | } | |
431 | 437 | else throw("Strict value is not equal to itself.") | |
432 | 438 | } | |
433 | 439 | else throw("Strict value is not equal to itself.") | |
434 | 440 | } | |
435 | 441 | else throw("invalid processing stage") | |
436 | 442 | } | |
437 | 443 | ||
438 | 444 | ||
439 | 445 | ||
440 | 446 | @Callable(i) | |
441 | 447 | func finalizeWrapper (counter) = { | |
442 | 448 | let result = { | |
443 | 449 | let @ = invoke(this, "finalizeHelper", nil, nil) | |
444 | 450 | if ($isInstanceOf(@, "Boolean")) | |
445 | 451 | then @ | |
446 | 452 | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
447 | 453 | } | |
448 | 454 | if ((result == result)) | |
449 | 455 | then if (!(result)) | |
450 | 456 | then if ((counter == maxDepth)) | |
451 | 457 | then throw("Nothing to process") | |
452 | 458 | else $Tuple2(nil, unit) | |
453 | 459 | else if ((counter > 0)) | |
454 | 460 | then $Tuple2(nil, invoke(this, "finalizeWrapper", [(counter - 1)], nil)) | |
455 | 461 | else $Tuple2(nil, unit) | |
456 | 462 | else throw("Strict value is not equal to itself.") | |
457 | 463 | } | |
458 | 464 | ||
459 | 465 | ||
460 | 466 | ||
461 | 467 | @Callable(i) | |
462 | 468 | func processPendingPeriodsAndUsers () = $Tuple2(nil, invoke(this, "finalizeWrapper", [maxDepth], nil)) | |
463 | 469 | ||
464 | 470 | ||
465 | 471 | ||
466 | 472 | @Callable(i) | |
467 | 473 | func deposit () = { | |
468 | 474 | let checkCaller = if ((i.caller == votingEmissionContract)) | |
469 | 475 | then true | |
470 | 476 | else mustManager(i) | |
471 | 477 | if ((checkCaller == checkCaller)) | |
472 | 478 | then { | |
473 | 479 | let period = nextPeriod() | |
474 | 480 | let deltaH = (height - getNumberOrFail(keyGwxRewardEmissionStartHeight())) | |
475 | 481 | let emissionRate = valueOrErrorMessage(getInteger(emissionContract, keyRatePerBlockCurrent()), (("mandatory emission_contract." + keyRatePerBlockCurrent()) + " is not defined")) | |
476 | 482 | let gwxHoldersRewardCurrent = valueOrElse(getInteger(emissionContract, keyGwxHoldersRewardCurrent()), 0) | |
477 | 483 | if ((gwxHoldersRewardCurrent == gwxHoldersRewardCurrent)) | |
478 | 484 | then { | |
479 | 485 | let auxAmount = fraction((deltaH * gwxHoldersRewardCurrent), emissionRate, MULT8) | |
480 | 486 | let em = if ((auxAmount > 0)) | |
481 | 487 | then invoke(emissionContract, "emit", [auxAmount], nil) | |
482 | 488 | else unit | |
483 | 489 | if ((em == em)) | |
484 | 490 | then { | |
485 | 491 | let matcherPart = 0 | |
486 | 492 | let payoutInfo = PeriodPayoutInfo(period, matcherPart, auxAmount) | |
487 | 493 | let gwxHoldersRewardUpdated = { | |
488 | 494 | let @ = invoke(emissionContract, "gwxHoldersRewardUpdate", nil, nil) | |
489 | 495 | if ($isInstanceOf(@, "Boolean")) | |
490 | 496 | then @ | |
491 | 497 | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
492 | 498 | } | |
493 | 499 | if ((gwxHoldersRewardUpdated == gwxHoldersRewardUpdated)) | |
494 | 500 | then { | |
495 | 501 | let totalReward = (matcherPart + auxAmount) | |
496 | 502 | let actions = if (if ((totalReward == 0)) | |
497 | 503 | then !(gwxHoldersRewardUpdated) | |
498 | 504 | else false) | |
499 | 505 | then nil | |
500 | 506 | else [IntegerEntry(keyLatestPeriod(), period), IntegerEntry(keyHeightForPeriod(period), height), IntegerEntry(keyAuxEmissionRewardForPeriod(period), auxAmount), IntegerEntry(keyGwxRewardEmissionStartHeight(), height), IntegerEntry(keyTotalAmountForPeriod(period), matcherPart), IntegerEntry(keyNextPeriod(), (period + 1)), StringEntry(keyLastPayoutInfo(), payoutInfo), StringEntry(keyPayoutHistoryInfo(period), payoutInfo)] | |
501 | 507 | $Tuple2(actions, unit) | |
502 | 508 | } | |
503 | 509 | else throw("Strict value is not equal to itself.") | |
504 | 510 | } | |
505 | 511 | else throw("Strict value is not equal to itself.") | |
506 | 512 | } | |
507 | 513 | else throw("Strict value is not equal to itself.") | |
508 | 514 | } | |
509 | 515 | else throw("Strict value is not equal to itself.") | |
510 | 516 | } | |
511 | 517 | ||
512 | 518 | ||
513 | 519 | ||
514 | 520 | @Callable(i) | |
515 | 521 | func claimReward () = { | |
516 | 522 | let cfgArray = readConfigArrayOrFail() | |
517 | 523 | let address = toString(i.caller) | |
518 | - | let $ | |
519 | - | let amount = $ | |
520 | - | let actions = $ | |
524 | + | let $t01948619536 = commonClaimReward(address) | |
525 | + | let amount = $t01948619536._1 | |
526 | + | let actions = $t01948619536._2 | |
521 | 527 | let checkAmount = if ((amount > 0)) | |
522 | 528 | then true | |
523 | 529 | else throw("Nothing to claim") | |
524 | 530 | if ((checkAmount == checkAmount)) | |
525 | 531 | then { | |
526 | 532 | let amountFromEmission = 0 | |
527 | 533 | let claimedReferral = { | |
528 | 534 | let @ = invoke(referralsContractAddressOrFail, "claim", [referralProgramName], nil) | |
529 | 535 | if ($isInstanceOf(@, "Int")) | |
530 | 536 | then @ | |
531 | 537 | else throw(($getType(@) + " couldn't be cast to Int")) | |
532 | 538 | } | |
533 | 539 | let totalAmount = (amount + claimedReferral) | |
534 | 540 | $Tuple2(([ScriptTransfer(i.caller, totalAmount, fromBase58String(cfgArray[IdxCfgAssetId])), HistoryEntry("claim", address, amount, i)] ++ actions), [totalAmount, amountFromEmission]) | |
535 | 541 | } | |
536 | 542 | else throw("Strict value is not equal to itself.") | |
537 | 543 | } | |
538 | 544 | ||
539 | 545 | ||
540 | 546 | ||
541 | 547 | @Callable(i) | |
542 | 548 | func claimRewardREADONLY (address) = { | |
543 | - | let $ | |
544 | - | let amount = $ | |
545 | - | let actions = $ | |
549 | + | let $t02010920159 = commonClaimReward(address) | |
550 | + | let amount = $t02010920159._1 | |
551 | + | let actions = $t02010920159._2 | |
546 | 552 | let referralUnclaimed = valueOrElse(getInteger(referralsContractAddressOrFail, keyUnclaimedReferral(referralProgramName, address)), 0) | |
547 | 553 | let totalAmount = (amount + referralUnclaimed) | |
548 | 554 | $Tuple2(nil, totalAmount) | |
549 | 555 | } | |
550 | 556 | ||
551 | 557 | ||
552 | 558 | ||
553 | 559 | @Callable(i) | |
554 | 560 | func latestFinalizedPeriodREADONLY (address) = $Tuple2(nil, valueOrElse(getInteger(this, keyLatestPeriod()), -1)) | |
555 | 561 | ||
556 | 562 | ||
557 | 563 | ||
558 | 564 | @Callable(i) | |
559 | 565 | func latestFinalizedPeriodInfoREADONLY (address) = $Tuple2(nil, getStringByKey(keyLastPayoutInfo())) | |
560 | 566 | ||
561 | 567 | ||
562 | 568 | ||
563 | 569 | @Callable(i) | |
564 | 570 | func calcGwxParamsREADONLY (gwxAmountStart,lockStartHeight,lockDurationBlocks) = { | |
565 | 571 | let lockEndHeight = (lockStartHeight + lockDurationBlocks) | |
566 | 572 | let scale8ParamK = -(fraction(gwxAmountStart, SCALE, lockDurationBlocks)) | |
567 | 573 | let scale8ParamB = (fraction(gwxAmountStart, SCALE, lockDurationBlocks) * lockEndHeight) | |
568 | 574 | $Tuple2(nil, [scale8ParamK, scale8ParamB, nextPeriod()]) | |
569 | 575 | } | |
570 | 576 | ||
571 | 577 | ||
572 | 578 | ||
573 | 579 | @Callable(i) | |
574 | 580 | func calcGwxAmountStartREADONLY (wxLockAmount,lockDuration,maxLockDuration) = { | |
575 | 581 | let coeffX8 = fraction(lockDuration, MULT8, maxLockDuration) | |
576 | 582 | let gWxAmountStart = fraction(wxLockAmount, coeffX8, MULT8) | |
577 | 583 | $Tuple2(nil, [gWxAmountStart]) | |
578 | 584 | } | |
579 | 585 | ||
580 | 586 | ||
581 | 587 | ||
582 | 588 | @Callable(i) | |
583 | 589 | func onEmissionForGwxStart () = if ((i.caller != factoryContract)) | |
584 | 590 | then throw("permissions denied") | |
585 | 591 | else [IntegerEntry(keyGwxRewardEmissionStartHeight(), height)] | |
586 | 592 | ||
587 | 593 | ||
588 | 594 | ||
589 | 595 | @Callable(i) | |
590 | 596 | func latestPeriodEmissionRewardsREADONLY (address) = { | |
591 | 597 | let period = nextPeriod() | |
592 | 598 | $Tuple2(nil, [getNumberByKey(keyAuxEmissionRewardForPeriod(period))]) | |
593 | 599 | } | |
594 | 600 | ||
595 | 601 | ||
596 | 602 | ||
597 | 603 | @Callable(i) | |
598 | 604 | func calcD (x1BigIntStr,x2BigIntStr,ampBigIntStr,aPrecisionBigIntStr,targetPrecisionBigIntStr) = { | |
599 | 605 | let nCoins = toBigInt(2) | |
600 | 606 | let aPrecision = parseBigIntValue(aPrecisionBigIntStr) | |
601 | 607 | let targetPrecision = parseBigIntValue(targetPrecisionBigIntStr) | |
602 | 608 | let x1 = parseBigIntValue(x1BigIntStr) | |
603 | 609 | let x2 = parseBigIntValue(x2BigIntStr) | |
604 | 610 | let amp = (parseBigIntValue(ampBigIntStr) * aPrecision) | |
605 | 611 | let s = (x1 + x2) | |
606 | 612 | if ((s == zeroBigInt)) | |
607 | 613 | then $Tuple2(nil, toString(zeroBigInt)) | |
608 | 614 | else { | |
609 | 615 | let ann = (amp * nCoins) | |
610 | 616 | let arr = [0, 1, 2, 3, 4, 5, 6] | |
611 | 617 | func calc (acc,cur) = { | |
612 | - | let $ | |
613 | - | let d = $ | |
614 | - | let dPrev = $ | |
615 | - | let found = $ | |
618 | + | let $t02279222819 = acc | |
619 | + | let d = $t02279222819._1 | |
620 | + | let dPrev = $t02279222819._2 | |
621 | + | let found = $t02279222819._3 | |
616 | 622 | if ((found != unit)) | |
617 | 623 | then acc | |
618 | 624 | else { | |
619 | 625 | let dp = (((d * d) * d) / (((x1 * x2) * nCoins) * nCoins)) | |
620 | 626 | let dNext = (((((ann * s) / aPrecision) + (dp * nCoins)) * d) / ((((ann - aPrecision) * d) / aPrecision) + ((nCoins + toBigInt(1)) * dp))) | |
621 | 627 | let dDiff = absBigInt((dNext - value(d))) | |
622 | 628 | if ((targetPrecision >= dDiff)) | |
623 | 629 | then $Tuple3(dNext, d, cur) | |
624 | 630 | else $Tuple3(dNext, d, unit) | |
625 | 631 | } | |
626 | 632 | } | |
627 | 633 | ||
628 | - | let $ | |
634 | + | let $t02341723480 = { | |
629 | 635 | let $l = arr | |
630 | 636 | let $s = size($l) | |
631 | 637 | let $acc0 = $Tuple3(s, unit, unit) | |
632 | 638 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
633 | 639 | then $a | |
634 | 640 | else calc($a, $l[$i]) | |
635 | 641 | ||
636 | 642 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
637 | 643 | then $a | |
638 | 644 | else throw("List size exceeds 7") | |
639 | 645 | ||
640 | 646 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7) | |
641 | 647 | } | |
642 | - | let dNext = $ | |
643 | - | let dPrev = $ | |
644 | - | let found = $ | |
648 | + | let dNext = $t02341723480._1 | |
649 | + | let dPrev = $t02341723480._2 | |
650 | + | let found = $t02341723480._3 | |
645 | 651 | if ((found != unit)) | |
646 | 652 | then $Tuple2(nil, toString(dNext)) | |
647 | 653 | else { | |
648 | 654 | let dDiff = absBigInt((dNext - value(dPrev))) | |
649 | 655 | throw(("D calculation error, dDiff = " + toString(dDiff))) | |
650 | 656 | } | |
651 | 657 | } | |
652 | 658 | } | |
653 | 659 | ||
654 | 660 | ||
655 | 661 | ||
656 | 662 | @Callable(i) | |
657 | 663 | func tradeReward (userAddresses,rewards) = { | |
658 | 664 | let argsComparison = (size(userAddresses) == size(rewards)) | |
659 | 665 | let maxRecipients = valueOrElse(getInteger(keyMaxRecipients()), 0) | |
660 | 666 | let payment = i.payments[0] | |
661 | 667 | let paymentAssetId = payment.assetId | |
662 | 668 | let paymentAmount = payment.amount | |
663 | - | let checks = [if ((size(userAddresses) | |
669 | + | let checks = [if ((maxRecipients >= size(userAddresses))) | |
664 | 670 | then true | |
665 | 671 | else throwErr("Too many recipients"), if (argsComparison) | |
666 | 672 | then true | |
667 | 673 | else throwErr("Arguments size mismatch"), if ((paymentAssetId == wxAssetId)) | |
668 | 674 | then true | |
669 | 675 | else throwErr("Wrong asset payment")] | |
670 | 676 | if ((checks == checks)) | |
671 | 677 | then { | |
672 | 678 | let tradeRewardInternal = invoke(this, "tradeRewardInternal", [paymentAmount, userAddresses, rewards, 0], nil) | |
673 | 679 | if ((tradeRewardInternal == tradeRewardInternal)) | |
674 | 680 | then $Tuple2(nil, tradeRewardInternal) | |
675 | 681 | else throw("Strict value is not equal to itself.") | |
676 | 682 | } | |
677 | 683 | else throw("Strict value is not equal to itself.") | |
678 | 684 | } | |
679 | 685 | ||
680 | 686 | ||
681 | 687 | ||
682 | 688 | @Callable(i) | |
683 | 689 | func setManager (pendingManagerPublicKey) = { | |
684 | 690 | let checkCaller = mustManager(i) | |
685 | 691 | if ((checkCaller == checkCaller)) | |
686 | 692 | then { | |
687 | 693 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
688 | 694 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
689 | 695 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
690 | 696 | else throw("Strict value is not equal to itself.") | |
691 | 697 | } | |
692 | 698 | else throw("Strict value is not equal to itself.") | |
693 | 699 | } | |
694 | 700 | ||
695 | 701 | ||
696 | 702 | ||
697 | 703 | @Callable(i) | |
698 | 704 | func confirmManager () = { | |
699 | 705 | let pm = pendingManagerPublicKeyOrUnit() | |
700 | 706 | let hasPM = if (isDefined(pm)) | |
701 | 707 | then true | |
702 | 708 | else throw("No pending manager") | |
703 | 709 | if ((hasPM == hasPM)) | |
704 | 710 | then { | |
705 | 711 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
706 | 712 | then true | |
707 | 713 | else throw("You are not pending manager") | |
708 | 714 | if ((checkPM == checkPM)) | |
709 | 715 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
710 | 716 | else throw("Strict value is not equal to itself.") | |
711 | 717 | } | |
712 | 718 | else throw("Strict value is not equal to itself.") | |
713 | 719 | } | |
714 | 720 | ||
715 | 721 | ||
716 | 722 | @Verifier(tx) | |
717 | 723 | func verify () = { | |
718 | 724 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
719 | 725 | case pk: ByteVector => | |
720 | 726 | pk | |
721 | 727 | case _: Unit => | |
722 | 728 | tx.senderPublicKey | |
723 | 729 | case _ => | |
724 | 730 | throw("Match error") | |
725 | 731 | } | |
726 | 732 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
727 | 733 | } | |
728 | 734 |
github/deemru/w8io/026f985 212.78 ms ◑