tx · HUdWaWuUtAgmgcCdQUQbdpTBwiR6mwRrM2S2qKGKVfut

3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE:  -0.02500000 Waves

2022.07.26 10:59 [2156499] smart account 3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE > SELF 0.00000000 Waves

{ "type": 13, "id": "HUdWaWuUtAgmgcCdQUQbdpTBwiR6mwRrM2S2qKGKVfut", "fee": 2500000, "feeAssetId": null, "timestamp": 1658822406290, "version": 1, "sender": "3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE", "senderPublicKey": "G349Uq3FTox7dRNLeAfAQeoACvwZ9iEnVSaHcEYn6j8J", "proofs": [ "2amDAMJHE6djLeV7AEupXEc4dvKvrL2Z1jS5T5fSaREsqH9UfyN1A3k3dADxb4EKvcB8payJN3UaNqevaFSaEu3A" ], "script": "base64:BgJwCAISABIDCgEBEgASABIICgYCAQEBAQESABIDCgEIEgQKAggBEgMKAQgSBAoCCAESAwoBCBIDCgEIEgUKAwEBARIFCgMBAQESBgoECAgIARIDCgEIEgMKAQgSABIDCgEIEgcKBQgICAgIEgMKAQgSAE8AA1NFUAICX18ACVVTRVJERVBUSAAaAAVTQ0FMRQDoBwAFTVVMVDgAgMLXLwAKemVyb0JpZ0ludAkAtgIBAAAAFHByb2Nlc3NpbmdTdGFnZVRvdGFsAAAAFXByb2Nlc3NpbmdTdGFnZVNoYXJlcwABAQ5nZXROdW1iZXJCeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMFA2tleQAAAQ9nZXROdW1iZXJPckZhaWwBA2tleQkBE3ZhbHVlT3JFcnJvck1lc3NhZ2UCCQCaCAIFBHRoaXMFA2tleQkArAICCQCsAgICD21hbmRhdG9yeSB0aGlzLgUDa2V5Ag8gaXMgbm90IGRlZmluZWQBDmdldFN0cmluZ0J5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwUDa2V5AgABD2dldFN0cmluZ09yRmFp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FXb9Gf Diff:
OldNewDifferences
319319 then throw("Nothing to claim")
320320 else {
321321 let boostingContract = fromBase58String(cfgArray[IdxCfgBoostingContract])
322- let $t01256012686 = claimInternal(boostingContract, currentPeriod, userIdx, USERDEPTH, 0, 0)
323- let period = $t01256012686._1
324- let amountFromMatcher = $t01256012686._2
325- let amountFromEmission = $t01256012686._3
322+ let $t01256912695 = claimInternal(boostingContract, currentPeriod, userIdx, USERDEPTH, 0, 0)
323+ let period = $t01256912695._1
324+ let amountFromMatcher = $t01256912695._2
325+ let amountFromEmission = $t01256912695._3
326326 $Tuple6(period, amountFromMatcher, amountFromEmission, userIdx, cfgArray, nextProcessedPeriod)
327327 }
328328 }
342342 then $Tuple2(nil, false)
343343 else if ((processingStage == processingStageTotal))
344344 then {
345- let $t01367613792 = calcUserWeight(boostingContractOrFail(), heightForPeriod, currentPeriod, currentUser)
346- let userWeight = $t01367613792._1
347- let userActions = $t01367613792._2
345+ let $t01368513801 = calcUserWeight(boostingContractOrFail(), heightForPeriod, currentPeriod, currentUser)
346+ let userWeight = $t01368513801._1
347+ let userActions = $t01368513801._2
348348 let totalWeightNew = (totalWeight + userWeight)
349349 let processingActions = if ((usersCount > currentUser))
350350 then [IntegerEntry(keyNextProcessedUser(), (currentUser + 1))]
450450 @Callable(i)
451451 func claimReward () = {
452452 let address = toString(i.caller)
453- let $t01903019156 = commonClaimReward(address, unit)
454- let period = $t01903019156._1
455- let amountFromMatcher = $t01903019156._2
456- let amountFromEmission = $t01903019156._3
457- let userIdx = $t01903019156._4
458- let cfgArray = $t01903019156._5
459- let nextProcessedPeriod = $t01903019156._6
453+ let $t01903919165 = commonClaimReward(address, unit)
454+ let period = $t01903919165._1
455+ let amountFromMatcher = $t01903919165._2
456+ let amountFromEmission = $t01903919165._3
457+ let userIdx = $t01903919165._4
458+ let cfgArray = $t01903919165._5
459+ let nextProcessedPeriod = $t01903919165._6
460460 $Tuple2([IntegerEntry(keyNextUnlaimedPeriodOfUser(userIdx), period), ScriptTransfer(i.caller, (amountFromMatcher + amountFromEmission), fromBase58String(cfgArray[IdxCfgAssetId])), HistoryEntry("claim", address, amountFromMatcher, amountFromEmission, period, nextProcessedPeriod, i)], [amountFromMatcher, amountFromEmission])
461461 }
462462
473473
474474 @Callable(i)
475475 func claimRewardPaginatedREADONLY (address,startPeriod) = {
476- let $t01989920016 = commonClaimReward(address, if ((0 > startPeriod))
476+ let $t01990820025 = commonClaimReward(address, if ((0 > startPeriod))
477477 then unit
478478 else startPeriod)
479- let period = $t01989920016._1
480- let fromMatcher = $t01989920016._2
481- let fromEmission = $t01989920016._3
479+ let period = $t01990820025._1
480+ let fromMatcher = $t01990820025._2
481+ let fromEmission = $t01990820025._3
482482 let amount = (fromMatcher + fromEmission)
483483 $Tuple2(nil, $Tuple2(amount, period))
484484 }
487487
488488 @Callable(i)
489489 func claimRewardDetailedREADONLY (address) = {
490- let $t02026720342 = commonClaimReward(address, unit)
491- let ignored = $t02026720342._1
492- let fromMatcher = $t02026720342._2
493- let fromEmission = $t02026720342._3
490+ let $t02027620351 = commonClaimReward(address, unit)
491+ let ignored = $t02027620351._1
492+ let fromMatcher = $t02027620351._2
493+ let fromEmission = $t02027620351._3
494494 $Tuple2(nil, makeString(["%d%d%d", toString((fromMatcher + fromEmission)), toString(fromMatcher), toString(fromEmission)], SEP))
495495 }
496496
498498
499499 @Callable(i)
500500 func claimRewardDetailedPaginatedREADONLY (address,startPeriod) = {
501- let $t02063820755 = commonClaimReward(address, if ((0 > startPeriod))
501+ let $t02064720764 = commonClaimReward(address, if ((0 > startPeriod))
502502 then unit
503503 else startPeriod)
504- let period = $t02063820755._1
505- let fromMatcher = $t02063820755._2
506- let fromEmission = $t02063820755._3
504+ let period = $t02064720764._1
505+ let fromMatcher = $t02064720764._2
506+ let fromEmission = $t02064720764._3
507507 $Tuple2(nil, $Tuple2(makeString(["%d%d%d", toString((fromMatcher + fromEmission)), toString(fromMatcher), toString(fromEmission)], SEP), period))
508508 }
509509
594594 let ann = (amp * nCoins)
595595 let arr = [1, 2, 3, 4, 5, 6, 7]
596596 func calc (acc,cur) = {
597- let $t02424424433 = acc
598- let d = $t02424424433._1
599- let dPrev = $t02424424433._2
597+ let $t02425324442 = acc
598+ let d = $t02425324442._1
599+ let dPrev = $t02425324442._2
600600 let dp = (((d * d) * d) / (((x1 * x2) * nCoins) * nCoins))
601601 let dNext = (((((ann * s) / aPrecision) + (dp * nCoins)) * d) / ((((ann - aPrecision) * d) / aPrecision) + ((nCoins + toBigInt(1)) * dp)))
602602 $Tuple2(dNext, d)
603603 }
604604
605- let $t02464624696 = {
605+ let $t02465524705 = {
606606 let $l = arr
607607 let $s = size($l)
608608 let $acc0 = $Tuple2(s, unit)
616616
617617 $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)
618618 }
619- let dNext = $t02464624696._1
620- let dPrev = $t02464624696._2
619+ let dNext = $t02465524705._1
620+ let dPrev = $t02465524705._2
621621 let dDiff = abs((dNext - value(dPrev)))
622622 if ((targetPrecision >= dDiff))
623623 then $Tuple2(nil, toString(dNext))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 let USERDEPTH = 26
77
88 let SCALE = 1000
99
1010 let MULT8 = 100000000
1111
1212 let zeroBigInt = toBigInt(0)
1313
1414 let processingStageTotal = 0
1515
1616 let processingStageShares = 1
1717
1818 func getNumberByKey (key) = valueOrElse(getInteger(this, key), 0)
1919
2020
2121 func getNumberOrFail (key) = valueOrErrorMessage(getInteger(this, key), (("mandatory this." + key) + " is not defined"))
2222
2323
2424 func getStringByKey (key) = valueOrElse(getString(this, key), "")
2525
2626
2727 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (("mandatory this." + key) + " is not defined"))
2828
2929
3030 func abs (val) = if ((zeroBigInt > val))
3131 then -(val)
3232 else val
3333
3434
3535 let keyMaxDepth = "%s__maxDepth"
3636
3737 let maxDepthDefault = 30
3838
3939 let maxDepth = valueOrElse(getInteger(this, keyMaxDepth), maxDepthDefault)
4040
4141 func keyFactoryAddress () = "%s%s__config__factoryAddress"
4242
4343
4444 let factoryAddressStr = getStringOrFail(keyFactoryAddress())
4545
4646 let factoryContract = addressFromStringValue(factoryAddressStr)
4747
4848 func keyEmissionAddress () = "%s%s__config__emissionAddress"
4949
5050
5151 func keyNumToUserMapping (num) = makeString(["%s%s%s", "mapping", "num2user", toString(num)], SEP)
5252
5353
5454 let keyReferralProgramName = makeString(["%s%s", "referral", "programName"], SEP)
5555
5656 let referralProgramNameDefault = "wxlock"
5757
5858 let referralProgramName = valueOrElse(getString(this, keyReferralProgramName), referralProgramNameDefault)
5959
6060 let keyReferralMinGWxAmount = makeString(["%s%s", "referral", "minGWxAmount"], SEP)
6161
6262 let referralMinGWxAmountDefault = (500 * MULT8)
6363
6464 let referralMinGWxAmount = valueOrElse(getInteger(this, keyReferralMinGWxAmount), referralMinGWxAmountDefault)
6565
6666 let keyReferrerRewardPermille = makeString(["%s%s", "referral", "referrerRewardPermille"], SEP)
6767
6868 let referrerRewardPermilleDefault = 50
6969
7070 let referrerRewardPermille = valueOrElse(getInteger(this, keyReferrerRewardPermille), referrerRewardPermilleDefault)
7171
7272 let keyReferralRewardPermille = makeString(["%s%s", "referral", "referralRewardPermille"], SEP)
7373
7474 let referralRewardPermilleDefault = 50
7575
7676 let referralRewardPermille = valueOrElse(getInteger(this, keyReferralRewardPermille), referralRewardPermilleDefault)
7777
7878 func keyReferrer (referralAddress) = makeString(["%s%s%s", "referrer", referralProgramName, referralAddress], SEP)
7979
8080
8181 let emissionAddressStr = getStringOrFail(keyEmissionAddress())
8282
8383 let emissionContract = addressFromStringValue(emissionAddressStr)
8484
8585 let IdxCfgAssetId = 1
8686
8787 let IdxCfgPacemakerAddress = 2
8888
8989 let IdxCfgBoostingContract = 3
9090
9191 let IdxCfgMaxDepth = 4
9292
9393 func keyConfig () = "%s__config"
9494
9595
9696 func readConfigArrayOrFail () = split(getStringOrFail(keyConfig()), SEP)
9797
9898
9999 func formatConfig (wxAssetIdStr,matcherPacemakerAddressStr,boostingContractAddressStr,maxDepth) = makeString(["%s%s%s%d", wxAssetIdStr, matcherPacemakerAddressStr, boostingContractAddressStr, toString(maxDepth)], SEP)
100100
101101
102102 func boostingContractOrFail () = {
103103 let cfgArray = readConfigArrayOrFail()
104104 valueOrErrorMessage(addressFromString(cfgArray[IdxCfgBoostingContract]), "boosting contract address is not defined")
105105 }
106106
107107
108108 func keyGwxRewardEmissionStartHeight () = "%s%s__gwxRewardEmissionPart__startHeight"
109109
110110
111111 func keyUsersCount () = "%s__nextUserNum"
112112
113113
114114 func keyRatePerBlockCurrent () = "%s%s__ratePerBlock__current"
115115
116116
117117 func keyPoolWeightVirtual () = "%s%s__poolWeight__GWXvirtualPOOL"
118118
119119
120120 func keyNextProcessedUser () = "%s__nextProcessedUser"
121121
122122
123123 func keyLatestPeriod () = "%s__latestPeriod"
124124
125125
126126 func keyNextPeriod () = "%s__nextPeriod"
127127
128128
129129 func keyProcessingStage () = "%s__processingStage"
130130
131131
132132 func keyNextProcessedPeriod () = "%s__nextProcessedPeriod"
133133
134134
135135 func keyNextUnlaimedPeriodOfUser (userIndex) = makeString(["%s%d__nextClaimedPeriod", toString(userIndex)], SEP)
136136
137137
138138 func keyLastProcessedPeriodOfUser (userIndex) = makeString(["%s%d__lastProcessedPeriod", toString(userIndex)], SEP)
139139
140140
141141 func keyHeightForPeriod (period) = makeString(["%s%d__startHeightForPeriod", toString(period)], SEP)
142142
143143
144144 func keyAuxEmissionRewardForPeriod (period) = makeString(["%s%d__auxEmissionReward", toString(period)], SEP)
145145
146146
147147 func keyTotalAmountForPeriod (period) = makeString(["%s%d__totalAmountForPeriod", toString(period)], SEP)
148148
149149
150150 func keyLastPayoutInfo () = "%s__lastPayoutInfo"
151151
152152
153153 func PeriodPayoutInfo (period,matcherReward,emissionReward) = makeString(["%d%d%d", toString(period), toString(matcherReward), toString(emissionReward)], SEP)
154154
155155
156156 func keyPayoutHistoryInfo (period) = makeString(["%s%s%d__payouts__history", toString(period)], SEP)
157157
158158
159159 func keyTotalWeightForPeriod (period) = makeString(["%s%d__totalWeightForPeriod", toString(period)], SEP)
160160
161161
162162 func keyUserKValueForPeriod (period,userIndex) = makeString(["%s%d%s%d__paramByPeriod", toString(userIndex), "k", toString(period)], SEP)
163163
164164
165165 func keyUserBValueForPeriod (period,userIndex) = makeString(["%s%d%s%d__paramByPeriod", toString(userIndex), "b", toString(period)], SEP)
166166
167167
168168 func keyUserWeightForPeriod (period,userIndex) = makeString(["%s%d%s%d__paramByPeriod", toString(userIndex), "weight", toString(period)], SEP)
169169
170170
171171 func keyReferralsContractAddress () = makeString(["%s%s", "config", "referralsContractAddress"], SEP)
172172
173173
174174 let referralsContractAddressOrFail = addressFromStringValue(getStringOrFail(keyReferralsContractAddress()))
175175
176176 func HistoryEntry (type,user,amountFromMatcher,amountFromEmission,currentPeriod,latestPeriod,i) = {
177177 let historyKEY = makeString(["%s%s%s%s__history", type, user, toBase58String(i.transactionId)], SEP)
178178 let historyDATA = makeString(["%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(amountFromMatcher), toString(amountFromEmission), toString(currentPeriod), toString(latestPeriod)], SEP)
179179 StringEntry(historyKEY, historyDATA)
180180 }
181181
182182
183183 func keyManagerPublicKey () = "%s__managerPublicKey"
184184
185185
186186 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
187187
188188
189189 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
190190 case s: String =>
191191 fromBase58String(s)
192192 case _: Unit =>
193193 unit
194194 case _ =>
195195 throw("Match error")
196196 }
197197
198198
199199 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
200200 case s: String =>
201201 fromBase58String(s)
202202 case _: Unit =>
203203 unit
204204 case _ =>
205205 throw("Match error")
206206 }
207207
208208
209209 func mustManager (i) = {
210210 let pd = throw("Permission denied")
211211 match managerPublicKeyOrUnit() {
212212 case pk: ByteVector =>
213213 if ((i.callerPublicKey == pk))
214214 then true
215215 else pd
216216 case _: Unit =>
217217 if ((i.caller == this))
218218 then true
219219 else pd
220220 case _ =>
221221 throw("Match error")
222222 }
223223 }
224224
225225
226226 func calcUserWeight (boostingContractAddress,heightForPeriod,period,userIndex) = {
227227 let kLast = keyLastProcessedPeriodOfUser(userIndex)
228228 let kKey = keyUserKValueForPeriod(period, userIndex)
229229 let kRaw = getInteger(boostingContractAddress, kKey)
230230 let kUserWeight = keyUserWeightForPeriod(period, userIndex)
231231 if (isDefined(kRaw))
232232 then {
233233 let k = value(kRaw)
234234 let b = value(getInteger(boostingContractAddress, keyUserBValueForPeriod(period, userIndex)))
235235 let w = ((k * heightForPeriod) + b)
236236 if ((w > 0))
237237 then $Tuple2((w / SCALE), [IntegerEntry(kLast, period), IntegerEntry(kUserWeight, w)])
238238 else $Tuple2(0, nil)
239239 }
240240 else {
241241 let p = getInteger(this, kLast)
242242 if (if (isDefined(p))
243243 then (period >= value(p))
244244 else false)
245245 then {
246246 let pv = value(p)
247247 let k = value(getInteger(boostingContractAddress, keyUserKValueForPeriod(pv, userIndex)))
248248 let b = value(getInteger(boostingContractAddress, keyUserBValueForPeriod(pv, userIndex)))
249249 let w = ((k * heightForPeriod) + b)
250250 if ((w > 0))
251251 then $Tuple2((w / SCALE), [IntegerEntry(kUserWeight, w)])
252252 else $Tuple2(0, nil)
253253 }
254254 else $Tuple2(0, nil)
255255 }
256256 }
257257
258258
259259 func calcUserWeightForClaim (boostingContractAddress,heightForPeriod,period,userIndex) = {
260260 let kUserWeight = keyUserWeightForPeriod(period, userIndex)
261261 let userWeightOrUnit = getInteger(kUserWeight)
262262 match userWeightOrUnit {
263263 case _: Unit =>
264264 0
265265 case w: Int =>
266266 (w / SCALE)
267267 case _ =>
268268 throw("Match error")
269269 }
270270 }
271271
272272
273273 func getUserIndexByAddress (boostingContractAddressStr,userAddress) = {
274274 let key = makeString(["%s%s%s", "mapping", "user2num", userAddress], SEP)
275275 parseIntValue(valueOrErrorMessage(getString(Address(fromBase58String(boostingContractAddressStr)), key), ((("User address " + userAddress) + " is not found in boosting contract data, key=") + key)))
276276 }
277277
278278
279279 func nextPeriod () = getNumberByKey(keyNextPeriod())
280280
281281
282282 func invokeClaim (boostingContract,period,user,depth,totalFromMatcher,totalFromEmission) = {
283283 let result = invoke(this, "claimNextBatch", [boostingContract, period, user, depth, totalFromMatcher, totalFromEmission], nil)
284284 if ((result == result))
285285 then match result {
286286 case r: (Int, Int, Int) =>
287287 r
288288 case _ =>
289289 throw("Incorrect invoke result")
290290 }
291291 else throw("Strict value is not equal to itself.")
292292 }
293293
294294
295295 func claimInternal (boostingContract,currentPeriod,currentUser,depth,userAccumulatedMatcher,userAccumulatedEmission) = {
296296 let boostingContractAddress = Address(boostingContract)
297297 let latestPeriod = getNumberByKey(keyNextProcessedPeriod())
298298 let totalWeight = getNumberByKey(keyTotalWeightForPeriod(currentPeriod))
299299 let heightForPeriod = getNumberByKey(keyHeightForPeriod(currentPeriod))
300300 let userWeight = calcUserWeightForClaim(boostingContractAddress, heightForPeriod, currentPeriod, currentUser)
301301 let userAmountMatcherForPeriod = fraction(getNumberByKey(keyTotalAmountForPeriod(currentPeriod)), userWeight, totalWeight)
302302 let userAmountEmissionForPeriod = fraction(getNumberByKey(keyAuxEmissionRewardForPeriod(currentPeriod)), userWeight, totalWeight)
303303 if (if ((0 >= depth))
304304 then true
305305 else ((currentPeriod + 1) >= latestPeriod))
306306 then $Tuple3((currentPeriod + 1), (userAccumulatedMatcher + userAmountMatcherForPeriod), (userAccumulatedEmission + userAmountEmissionForPeriod))
307307 else invokeClaim(boostingContract, (currentPeriod + 1), currentUser, (depth - 1), (userAccumulatedMatcher + userAmountMatcherForPeriod), (userAccumulatedEmission + userAmountEmissionForPeriod))
308308 }
309309
310310
311311 func commonClaimReward (userAddress,startPeriod) = {
312312 let cfgArray = readConfigArrayOrFail()
313313 let userIdx = getUserIndexByAddress(cfgArray[IdxCfgBoostingContract], userAddress)
314314 let currentPeriod = if ((startPeriod != unit))
315315 then value(startPeriod)
316316 else getNumberByKey(keyNextUnlaimedPeriodOfUser(userIdx))
317317 let nextProcessedPeriod = getNumberByKey(keyNextProcessedPeriod())
318318 if ((currentPeriod >= nextProcessedPeriod))
319319 then throw("Nothing to claim")
320320 else {
321321 let boostingContract = fromBase58String(cfgArray[IdxCfgBoostingContract])
322- let $t01256012686 = claimInternal(boostingContract, currentPeriod, userIdx, USERDEPTH, 0, 0)
323- let period = $t01256012686._1
324- let amountFromMatcher = $t01256012686._2
325- let amountFromEmission = $t01256012686._3
322+ let $t01256912695 = claimInternal(boostingContract, currentPeriod, userIdx, USERDEPTH, 0, 0)
323+ let period = $t01256912695._1
324+ let amountFromMatcher = $t01256912695._2
325+ let amountFromEmission = $t01256912695._3
326326 $Tuple6(period, amountFromMatcher, amountFromEmission, userIdx, cfgArray, nextProcessedPeriod)
327327 }
328328 }
329329
330330
331331 @Callable(i)
332332 func finalizeHelper () = {
333333 let processingStage = valueOrElse(getInteger(keyProcessingStage()), processingStageTotal)
334334 let currentPeriod = getNumberByKey(keyNextProcessedPeriod())
335335 let currentUser = getNumberByKey(keyNextProcessedUser())
336336 let latestPeriod = getNumberByKey(keyLatestPeriod())
337337 let usersCount = valueOrElse(getInteger(boostingContractOrFail(), keyUsersCount()), 0)
338338 let totalWeightKey = keyTotalWeightForPeriod(currentPeriod)
339339 let totalWeight = getNumberByKey(keyTotalWeightForPeriod(currentPeriod))
340340 let heightForPeriod = getNumberByKey(keyHeightForPeriod(currentPeriod))
341341 if ((currentPeriod > latestPeriod))
342342 then $Tuple2(nil, false)
343343 else if ((processingStage == processingStageTotal))
344344 then {
345- let $t01367613792 = calcUserWeight(boostingContractOrFail(), heightForPeriod, currentPeriod, currentUser)
346- let userWeight = $t01367613792._1
347- let userActions = $t01367613792._2
345+ let $t01368513801 = calcUserWeight(boostingContractOrFail(), heightForPeriod, currentPeriod, currentUser)
346+ let userWeight = $t01368513801._1
347+ let userActions = $t01368513801._2
348348 let totalWeightNew = (totalWeight + userWeight)
349349 let processingActions = if ((usersCount > currentUser))
350350 then [IntegerEntry(keyNextProcessedUser(), (currentUser + 1))]
351351 else [IntegerEntry(keyProcessingStage(), processingStageShares), IntegerEntry(keyNextProcessedUser(), 0)]
352352 $Tuple2((([IntegerEntry(totalWeightKey, totalWeightNew)] ++ processingActions) ++ userActions), true)
353353 }
354354 else if ((processingStage == processingStageShares))
355355 then {
356356 let userWeight = calcUserWeightForClaim(boostingContractOrFail(), heightForPeriod, currentPeriod, currentUser)
357357 let userAmountMatcherForPeriod = fraction(getNumberByKey(keyTotalAmountForPeriod(currentPeriod)), userWeight, totalWeight)
358358 let userAmountEmissionForPeriod = fraction(getNumberByKey(keyAuxEmissionRewardForPeriod(currentPeriod)), userWeight, totalWeight)
359359 let userTotalAmount = (userAmountEmissionForPeriod + userAmountMatcherForPeriod)
360360 let userAddress = getStringValue(boostingContractOrFail(), keyNumToUserMapping(currentUser))
361361 let referrer = getString(referralsContractAddressOrFail, keyReferrer(userAddress))
362362 let referralInv = if (if ((referrer == unit))
363363 then true
364364 else (referralMinGWxAmount > userWeight))
365365 then unit
366366 else {
367367 let referrerReward = fraction(userTotalAmount, referrerRewardPermille, SCALE)
368368 let referralReward = fraction(userTotalAmount, referralRewardPermille, SCALE)
369369 invoke(referralsContractAddressOrFail, "incUnclaimed", [referralProgramName, userAddress, referrerReward, referralReward], nil)
370370 }
371371 if ((referralInv == referralInv))
372372 then {
373373 let processingActions = if ((usersCount > currentUser))
374374 then [IntegerEntry(keyNextProcessedUser(), (currentUser + 1))]
375375 else [IntegerEntry(keyNextProcessedPeriod(), (currentPeriod + 1)), IntegerEntry(keyNextProcessedUser(), 0)]
376376 $Tuple2(processingActions, true)
377377 }
378378 else throw("Strict value is not equal to itself.")
379379 }
380380 else throw("invalid processing stage")
381381 }
382382
383383
384384
385385 @Callable(i)
386386 func finalizeWrapper (counter) = {
387387 let result = {
388388 let @ = invoke(this, "finalizeHelper", nil, nil)
389389 if ($isInstanceOf(@, "Boolean"))
390390 then @
391391 else throw(($getType(invoke(this, "finalizeHelper", nil, nil)) + " couldn't be cast to Boolean"))
392392 }
393393 if ((result == result))
394394 then if (if (!(result))
395395 then (counter == maxDepth)
396396 else false)
397397 then throw("Nothing to process")
398398 else if ((counter > 0))
399399 then $Tuple2(nil, invoke(this, "finalizeWrapper", [(counter - 1)], nil))
400400 else $Tuple2(nil, unit)
401401 else throw("Strict value is not equal to itself.")
402402 }
403403
404404
405405
406406 @Callable(i)
407407 func processPendingPeriodsAndUsers () = $Tuple2(nil, invoke(this, "finalizeWrapper", [maxDepth], nil))
408408
409409
410410
411411 @Callable(i)
412412 func deposit () = {
413413 let cfgArray = readConfigArrayOrFail()
414414 if ((i.caller != Address(fromBase58String(cfgArray[IdxCfgPacemakerAddress]))))
415415 then throw("Wrong caller address")
416416 else {
417417 let assetId = value(value(i.payments[0]).assetId)
418418 if ((assetId != fromBase58String(cfgArray[IdxCfgAssetId])))
419419 then throw("Wrong payment asset")
420420 else {
421421 let period = nextPeriod()
422422 let deltaH = (height - getNumberOrFail(keyGwxRewardEmissionStartHeight()))
423423 let emissionRate = valueOrErrorMessage(getInteger(emissionContract, keyRatePerBlockCurrent()), (("mandatory emission_contract." + keyRatePerBlockCurrent()) + " is not defined"))
424424 let weight = valueOrErrorMessage(getInteger(factoryContract, keyPoolWeightVirtual()), (("mandatory factory_contract." + keyPoolWeightVirtual()) + " is not defined"))
425425 let auxAmount = fraction((deltaH * weight), emissionRate, MULT8)
426426 let em = invoke(emissionContract, "emit", [auxAmount], nil)
427427 if ((em == em))
428428 then {
429429 let matcherPart = value(i.payments[0]).amount
430430 let payoutInfo = PeriodPayoutInfo(period, matcherPart, auxAmount)
431431 [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)]
432432 }
433433 else throw("Strict value is not equal to itself.")
434434 }
435435 }
436436 }
437437
438438
439439
440440 @Callable(i)
441441 func claimNextBatch (boostingContract,currentPeriod,currentUser,depth,totalFromMatcher,totalFromEmission) = if ((i.caller != this))
442442 then throw("Should be called by this script only")
443443 else {
444444 let periodAndTotals = claimInternal(boostingContract, currentPeriod, currentUser, depth, totalFromMatcher, totalFromEmission)
445445 $Tuple2(nil, periodAndTotals)
446446 }
447447
448448
449449
450450 @Callable(i)
451451 func claimReward () = {
452452 let address = toString(i.caller)
453- let $t01903019156 = commonClaimReward(address, unit)
454- let period = $t01903019156._1
455- let amountFromMatcher = $t01903019156._2
456- let amountFromEmission = $t01903019156._3
457- let userIdx = $t01903019156._4
458- let cfgArray = $t01903019156._5
459- let nextProcessedPeriod = $t01903019156._6
453+ let $t01903919165 = commonClaimReward(address, unit)
454+ let period = $t01903919165._1
455+ let amountFromMatcher = $t01903919165._2
456+ let amountFromEmission = $t01903919165._3
457+ let userIdx = $t01903919165._4
458+ let cfgArray = $t01903919165._5
459+ let nextProcessedPeriod = $t01903919165._6
460460 $Tuple2([IntegerEntry(keyNextUnlaimedPeriodOfUser(userIdx), period), ScriptTransfer(i.caller, (amountFromMatcher + amountFromEmission), fromBase58String(cfgArray[IdxCfgAssetId])), HistoryEntry("claim", address, amountFromMatcher, amountFromEmission, period, nextProcessedPeriod, i)], [amountFromMatcher, amountFromEmission])
461461 }
462462
463463
464464
465465 @Callable(i)
466466 func claimRewardREADONLY (address) = {
467467 let claimResults = commonClaimReward(address, unit)
468468 let amount = (claimResults._2 + claimResults._3)
469469 $Tuple2(nil, amount)
470470 }
471471
472472
473473
474474 @Callable(i)
475475 func claimRewardPaginatedREADONLY (address,startPeriod) = {
476- let $t01989920016 = commonClaimReward(address, if ((0 > startPeriod))
476+ let $t01990820025 = commonClaimReward(address, if ((0 > startPeriod))
477477 then unit
478478 else startPeriod)
479- let period = $t01989920016._1
480- let fromMatcher = $t01989920016._2
481- let fromEmission = $t01989920016._3
479+ let period = $t01990820025._1
480+ let fromMatcher = $t01990820025._2
481+ let fromEmission = $t01990820025._3
482482 let amount = (fromMatcher + fromEmission)
483483 $Tuple2(nil, $Tuple2(amount, period))
484484 }
485485
486486
487487
488488 @Callable(i)
489489 func claimRewardDetailedREADONLY (address) = {
490- let $t02026720342 = commonClaimReward(address, unit)
491- let ignored = $t02026720342._1
492- let fromMatcher = $t02026720342._2
493- let fromEmission = $t02026720342._3
490+ let $t02027620351 = commonClaimReward(address, unit)
491+ let ignored = $t02027620351._1
492+ let fromMatcher = $t02027620351._2
493+ let fromEmission = $t02027620351._3
494494 $Tuple2(nil, makeString(["%d%d%d", toString((fromMatcher + fromEmission)), toString(fromMatcher), toString(fromEmission)], SEP))
495495 }
496496
497497
498498
499499 @Callable(i)
500500 func claimRewardDetailedPaginatedREADONLY (address,startPeriod) = {
501- let $t02063820755 = commonClaimReward(address, if ((0 > startPeriod))
501+ let $t02064720764 = commonClaimReward(address, if ((0 > startPeriod))
502502 then unit
503503 else startPeriod)
504- let period = $t02063820755._1
505- let fromMatcher = $t02063820755._2
506- let fromEmission = $t02063820755._3
504+ let period = $t02064720764._1
505+ let fromMatcher = $t02064720764._2
506+ let fromEmission = $t02064720764._3
507507 $Tuple2(nil, $Tuple2(makeString(["%d%d%d", toString((fromMatcher + fromEmission)), toString(fromMatcher), toString(fromEmission)], SEP), period))
508508 }
509509
510510
511511
512512 @Callable(i)
513513 func latestFinalizedPeriodREADONLY (address) = $Tuple2(nil, valueOrElse(getInteger(this, keyLatestPeriod()), -1))
514514
515515
516516
517517 @Callable(i)
518518 func latestFinalizedPeriodInfoREADONLY (address) = $Tuple2(nil, getStringByKey(keyLastPayoutInfo()))
519519
520520
521521
522522 @Callable(i)
523523 func calcGwxParamsREADONLY (gwxAmountStart,lockStartHeight,lockDurationBlocks) = {
524524 let lockEndHeight = (lockStartHeight + lockDurationBlocks)
525525 let scale8ParamK = -(fraction(gwxAmountStart, SCALE, lockDurationBlocks))
526526 let scale8ParamB = (fraction(gwxAmountStart, SCALE, lockDurationBlocks) * lockEndHeight)
527527 $Tuple2(nil, [scale8ParamK, scale8ParamB, nextPeriod()])
528528 }
529529
530530
531531
532532 @Callable(i)
533533 func calcGwxAmountStartREADONLY (wxLockAmount,lockDuration,maxLockDuration) = {
534534 let coeffX8 = fraction(lockDuration, MULT8, maxLockDuration)
535535 let gWxAmountStart = fraction(wxLockAmount, coeffX8, MULT8)
536536 $Tuple2(nil, [gWxAmountStart])
537537 }
538538
539539
540540
541541 @Callable(i)
542542 func constructor (wxAssetIdStr,matcherPacemakerAddressStr,boostingContractAddressStr,maxDepth) = if ((this != i.caller))
543543 then throw("not authorized")
544544 else [StringEntry(keyConfig(), formatConfig(wxAssetIdStr, matcherPacemakerAddressStr, boostingContractAddressStr, maxDepth))]
545545
546546
547547
548548 @Callable(i)
549549 func constructorV2 (factoryAddress) = if ((this != i.caller))
550550 then throw("not authorized")
551551 else [StringEntry(keyFactoryAddress(), factoryAddress)]
552552
553553
554554
555555 @Callable(i)
556556 func constructorV3 (emissionAddress) = if ((this != i.caller))
557557 then throw("not authorized")
558558 else {
559559 let initLatestPeriod = if (isDefined(getInteger(this, keyLatestPeriod())))
560560 then nil
561561 else [IntegerEntry(keyLatestPeriod(), -1)]
562562 (initLatestPeriod :+ StringEntry(keyEmissionAddress(), emissionAddress))
563563 }
564564
565565
566566
567567 @Callable(i)
568568 func onEmissionForGwxStart () = if ((i.caller != factoryContract))
569569 then throw("permissions denied")
570570 else [IntegerEntry(keyGwxRewardEmissionStartHeight(), height)]
571571
572572
573573
574574 @Callable(i)
575575 func latestPeriodEmissionRewardsREADONLY (address) = {
576576 let period = nextPeriod()
577577 $Tuple2(nil, [getNumberByKey(keyAuxEmissionRewardForPeriod(period))])
578578 }
579579
580580
581581
582582 @Callable(i)
583583 func calcD (x1BigIntStr,x2BigIntStr,ampBigIntStr,aPrecisionBigIntStr,targetPrecisionBigIntStr) = {
584584 let nCoins = toBigInt(2)
585585 let aPrecision = parseBigIntValue(aPrecisionBigIntStr)
586586 let targetPrecision = parseBigIntValue(targetPrecisionBigIntStr)
587587 let x1 = parseBigIntValue(x1BigIntStr)
588588 let x2 = parseBigIntValue(x2BigIntStr)
589589 let amp = (parseBigIntValue(ampBigIntStr) * aPrecision)
590590 let s = (x1 + x2)
591591 if ((s == zeroBigInt))
592592 then $Tuple2(nil, toString(zeroBigInt))
593593 else {
594594 let ann = (amp * nCoins)
595595 let arr = [1, 2, 3, 4, 5, 6, 7]
596596 func calc (acc,cur) = {
597- let $t02424424433 = acc
598- let d = $t02424424433._1
599- let dPrev = $t02424424433._2
597+ let $t02425324442 = acc
598+ let d = $t02425324442._1
599+ let dPrev = $t02425324442._2
600600 let dp = (((d * d) * d) / (((x1 * x2) * nCoins) * nCoins))
601601 let dNext = (((((ann * s) / aPrecision) + (dp * nCoins)) * d) / ((((ann - aPrecision) * d) / aPrecision) + ((nCoins + toBigInt(1)) * dp)))
602602 $Tuple2(dNext, d)
603603 }
604604
605- let $t02464624696 = {
605+ let $t02465524705 = {
606606 let $l = arr
607607 let $s = size($l)
608608 let $acc0 = $Tuple2(s, unit)
609609 func $f0_1 ($a,$i) = if (($i >= $s))
610610 then $a
611611 else calc($a, $l[$i])
612612
613613 func $f0_2 ($a,$i) = if (($i >= $s))
614614 then $a
615615 else throw("List size exceeds 7")
616616
617617 $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)
618618 }
619- let dNext = $t02464624696._1
620- let dPrev = $t02464624696._2
619+ let dNext = $t02465524705._1
620+ let dPrev = $t02465524705._2
621621 let dDiff = abs((dNext - value(dPrev)))
622622 if ((targetPrecision >= dDiff))
623623 then $Tuple2(nil, toString(dNext))
624624 else throw(("D calculation error, dDiff = " + toString(dDiff)))
625625 }
626626 }
627627
628628
629629
630630 @Callable(i)
631631 func setManager (pendingManagerPublicKey) = {
632632 let checkCaller = mustManager(i)
633633 if ((checkCaller == checkCaller))
634634 then {
635635 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
636636 if ((checkManagerPublicKey == checkManagerPublicKey))
637637 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
638638 else throw("Strict value is not equal to itself.")
639639 }
640640 else throw("Strict value is not equal to itself.")
641641 }
642642
643643
644644
645645 @Callable(i)
646646 func confirmManager () = {
647647 let pm = pendingManagerPublicKeyOrUnit()
648648 let hasPM = if (isDefined(pm))
649649 then true
650650 else throw("No pending manager")
651651 if ((hasPM == hasPM))
652652 then {
653653 let checkPM = if ((i.callerPublicKey == value(pm)))
654654 then true
655655 else throw("You are not pending manager")
656656 if ((checkPM == checkPM))
657657 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
658658 else throw("Strict value is not equal to itself.")
659659 }
660660 else throw("Strict value is not equal to itself.")
661661 }
662662
663663
664664 @Verifier(tx)
665665 func verify () = {
666666 let targetPublicKey = match managerPublicKeyOrUnit() {
667667 case pk: ByteVector =>
668668 pk
669669 case _: Unit =>
670670 tx.senderPublicKey
671671 case _ =>
672672 throw("Match error")
673673 }
674674 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
675675 }
676676

github/deemru/w8io/026f985 
97.62 ms