tx · 8sxpqpajxTzmu2ixUVi5Xn3m3GMR93vUaCUCcfrLV31G 3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE: -0.01400000 Waves 2022.04.04 17:01 [1993932] smart account 3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE > SELF 0.00000000 Waves
{ "type": 13, "id": "8sxpqpajxTzmu2ixUVi5Xn3m3GMR93vUaCUCcfrLV31G", "fee": 1400000, "feeAssetId": null, "timestamp": 1649080906695, "version": 1, "sender": "3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE", "senderPublicKey": "G349Uq3FTox7dRNLeAfAQeoACvwZ9iEnVSaHcEYn6j8J", "proofs": [ "4xzspTrCrv111C3BkqsfcPvzxU9jEBTbjADrMxkdop2WwS6SuTjas4btpqrJsd1KWaUSKUXYxqkTpvWQS8qXWsfy" ], "script": "base64:AAIFAAAAAAAAAGYIAhIECgIIARIHCgUCAQEBARIAEgASCQoHAgEBAQEBBBIAEgMKAQgSAwoBCBIDCgEIEgMKAQgSBQoDAQEBEgUKAwEBARIGCgQICAgBEgMKAQgSAwoBCBIAEgMKAQgSBwoFCAgICAgAAAA4AAAAAAtyZXZpc2lvbk51bQIAAAAAAAAAAANTRVACAAAAAl9fAAAAAAhNQVhERVBUSAAAAAAAAAAAEQAAAAAJVVNFUkRFUFRIAAAAAAAAAAAaAAAAAAVTQ0FMRQAAAAAAAAAD6AAAAAAFTVVMVDgAAAAAAAX14QAAAAAACnplcm9CaWdJbnQJAAE2AAAAAQAAAAAAAAAAAAEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkAAAAAAAAAAAABAAAAD2dldE51bWJlck9yRmFpbAAAAAEAAAADa2V5CQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5CQABLAAAAAIJAAEsAAAAAgIAAAAP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XzEAAAACAAAAAiRhAAAAAiRpAwkAAGcAAAACBQAAAAIkaQUAAAACJHMFAAAAAiRhCQEAAAAEY2FsYwAAAAIFAAAAAiRhCQABkQAAAAIFAAAAAiRsBQAAAAIkaQoBAAAABSRmMF8yAAAAAgAAAAIkYQAAAAIkaQMJAABnAAAAAgUAAAACJGkFAAAAAiRzBQAAAAIkYQkAAAIAAAABAgAAABNMaXN0IHNpemUgZXhjZWVkcyA3CQEAAAAFJGYwXzIAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACBQAAAAUkYWNjMAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAgAAAAAAAAAAAwAAAAAAAAAABAAAAAAAAAAABQAAAAAAAAAABgAAAAAAAAAABwQAAAAFZE5leHQIBQAAAA0kdDAyNDE1MzI0MjAzAAAAAl8xBAAAAAVkUHJldggFAAAADSR0MDI0MTUzMjQyMDMAAAACXzIEAAAABWREaWZmCQEAAAADYWJzAAAAAQkAATgAAAACBQAAAAVkTmV4dAkBAAAABXZhbHVlAAAAAQUAAAAFZFByZXYDCQABQAAAAAIFAAAAD3RhcmdldFByZWNpc2lvbgUAAAAFZERpZmYJAAUUAAAAAgUAAAADbmlsCQABpgAAAAEFAAAABWROZXh0CQAAAgAAAAEJAAEsAAAAAgIAAAAdRCBjYWxjdWxhdGlvbiBlcnJvciwgZERpZmYgPSAJAAGmAAAAAQUAAAAFZERpZmYAAAAAsvyR2A==", "chainId": 84, "height": 1993932, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GoXZZEcVuWBh2rTvBiqZ55BCVqE39ZX66mu9sM5NVL83 Next: BCd1s1aDPdqi8XjCh63aVqXMxvfK9xpLUvs8yeEgWjFt Diff:
Old | New | Differences | |
---|---|---|---|
87 | 87 | func keyNextProcessedPeriod () = "%s__nextProcessedPeriod" | |
88 | 88 | ||
89 | 89 | ||
90 | - | func keyNextUnlaimedPeriodOfUser (userIndex) = makeString(["%s%d__nextClaimedPeriod", toString(userIndex)], SEP) | |
90 | + | func keyNextUnlaimedPeriodOfUserOld (userIndex) = makeString(["%s%d__nextClaimedPeriod", toString(userIndex)], SEP) | |
91 | + | ||
92 | + | ||
93 | + | func keyNextUnlaimedPeriodOfUser (userIndex) = makeString(["%s%d__nextClaimedPeriodNew", toString(userIndex)], SEP) | |
91 | 94 | ||
92 | 95 | ||
93 | 96 | func keyLastProcessedPeriodOfUser (userIndex) = makeString(["%s%d__lastProcessedPeriod", toString(userIndex)], SEP) | |
97 | + | ||
98 | + | ||
99 | + | func keyLastProcessedPeriodOfUserForClaim (userIndex) = makeString(["%s%d__lastProcessedPeriodForClaim", toString(userIndex)], SEP) | |
94 | 100 | ||
95 | 101 | ||
96 | 102 | func keyHeightForPeriod (period) = makeString(["%s%d__startHeightForPeriod", toString(period)], SEP) | |
142 | 148 | } | |
143 | 149 | else { | |
144 | 150 | let p = getInteger(this, kLast) | |
145 | - | if (if (isDefined(p)) | |
146 | - | then (period >= value(p)) | |
147 | - | else false) | |
151 | + | if (isDefined(p)) | |
148 | 152 | then { | |
149 | 153 | let pv = value(p) | |
150 | 154 | let k = value(getInteger(boostingContractAddress, keyUserKValueForPeriod(pv, userIndex))) | |
155 | 159 | else $Tuple2(0, nil) | |
156 | 160 | } | |
157 | 161 | else $Tuple2(0, nil) | |
162 | + | } | |
163 | + | } | |
164 | + | ||
165 | + | ||
166 | + | func calcUserWeightForClaim (boostingContractAddress,heightForPeriod,period,userIndex,readonly) = { | |
167 | + | let kLast = keyLastProcessedPeriodOfUserForClaim(userIndex) | |
168 | + | let kKey = keyUserKValueForPeriod(period, userIndex) | |
169 | + | let kRaw = getInteger(boostingContractAddress, kKey) | |
170 | + | let nextUnlaimedPeriodOfUserOld = getNumberByKey(keyNextUnlaimedPeriodOfUserOld(userIndex)) | |
171 | + | let isNotClaimed = if ((period >= nextUnlaimedPeriodOfUserOld)) | |
172 | + | then (nextUnlaimedPeriodOfUserOld > 0) | |
173 | + | else false | |
174 | + | if (isDefined(kRaw)) | |
175 | + | then { | |
176 | + | let k = value(kRaw) | |
177 | + | let b = value(getInteger(boostingContractAddress, keyUserBValueForPeriod(period, userIndex))) | |
178 | + | let w = ((k * heightForPeriod) + b) | |
179 | + | let inv = if (readonly) | |
180 | + | then unit | |
181 | + | else invoke(this, "setInteger", [kLast, period], nil) | |
182 | + | if ((inv == inv)) | |
183 | + | then if (if ((w > 0)) | |
184 | + | then isNotClaimed | |
185 | + | else false) | |
186 | + | then (w / SCALE) | |
187 | + | else 0 | |
188 | + | else throw("Strict value is not equal to itself.") | |
189 | + | } | |
190 | + | else { | |
191 | + | let p = getInteger(this, kLast) | |
192 | + | if (isDefined(p)) | |
193 | + | then { | |
194 | + | let pv = value(p) | |
195 | + | let k = value(getInteger(boostingContractAddress, keyUserKValueForPeriod(pv, userIndex))) | |
196 | + | let b = value(getInteger(boostingContractAddress, keyUserBValueForPeriod(pv, userIndex))) | |
197 | + | let w = ((k * heightForPeriod) + b) | |
198 | + | if (if ((w > 0)) | |
199 | + | then isNotClaimed | |
200 | + | else false) | |
201 | + | then (w / SCALE) | |
202 | + | else 0 | |
203 | + | } | |
204 | + | else 0 | |
158 | 205 | } | |
159 | 206 | } | |
160 | 207 | ||
236 | 283 | } | |
237 | 284 | ||
238 | 285 | ||
239 | - | func invokeClaim (boostingContract,period,user,depth,totalFromMatcher,totalFromEmission) = { | |
240 | - | let result = invoke(this, "claimNextBatch", [boostingContract, period, user, depth, totalFromMatcher, totalFromEmission], nil) | |
286 | + | func invokeClaim (boostingContract,period,user,depth,totalFromMatcher,totalFromEmission,readonly) = { | |
287 | + | let result = invoke(this, "claimNextBatch", [boostingContract, period, user, depth, totalFromMatcher, totalFromEmission, readonly], nil) | |
241 | 288 | if ((result == result)) | |
242 | 289 | then match result { | |
243 | 290 | case r: (Int, Int, Int) => | |
249 | 296 | } | |
250 | 297 | ||
251 | 298 | ||
252 | - | func claimInternal (boostingContract,currentPeriod,currentUser,depth,userAccumulatedMatcher,userAccumulatedEmission) = { | |
299 | + | func claimInternal (boostingContract,currentPeriod,currentUser,depth,userAccumulatedMatcher,userAccumulatedEmission,readonly) = { | |
253 | 300 | let boostingContractAddress = Address(boostingContract) | |
254 | 301 | let latestPeriod = getNumberByKey(keyNextProcessedPeriod()) | |
255 | 302 | let totalWeight = getNumberByKey(keyTotalWeightForPeriod(currentPeriod)) | |
256 | 303 | let heightForPeriod = getNumberByKey(keyHeightForPeriod(currentPeriod)) | |
257 | - | let $t01172411836 = calcUserWeight(boostingContractAddress, heightForPeriod, currentPeriod, currentUser) | |
258 | - | let userWeight = $t01172411836._1 | |
259 | - | let ignored = $t01172411836._2 | |
304 | + | let userWeight = calcUserWeightForClaim(boostingContractAddress, heightForPeriod, currentPeriod, currentUser, readonly) | |
260 | 305 | let userAmountMatcherForPeriod = fraction(getNumberByKey(keyTotalAmountForPeriod(currentPeriod)), userWeight, totalWeight) | |
261 | 306 | let userAmountEmissionForPeriod = fraction(getNumberByKey(keyAuxEmissionRewardForPeriod(currentPeriod)), userWeight, totalWeight) | |
262 | 307 | if (if ((0 >= depth)) | |
263 | 308 | then true | |
264 | 309 | else ((currentPeriod + 1) >= latestPeriod)) | |
265 | 310 | then $Tuple3((currentPeriod + 1), (userAccumulatedMatcher + userAmountMatcherForPeriod), (userAccumulatedEmission + userAmountEmissionForPeriod)) | |
266 | - | else invokeClaim(boostingContract, (currentPeriod + 1), currentUser, (depth - 1), (userAccumulatedMatcher + userAmountMatcherForPeriod), (userAccumulatedEmission + userAmountEmissionForPeriod)) | |
311 | + | else invokeClaim(boostingContract, (currentPeriod + 1), currentUser, (depth - 1), (userAccumulatedMatcher + userAmountMatcherForPeriod), (userAccumulatedEmission + userAmountEmissionForPeriod), readonly) | |
267 | 312 | } | |
268 | 313 | ||
269 | 314 | ||
270 | - | func commonClaimReward (userAddress) = { | |
315 | + | func commonClaimReward (userAddress,readonly) = { | |
271 | 316 | let cfgArray = readConfigArrayOrFail() | |
272 | 317 | let userIdx = getUserIndexByAddress(cfgArray[IdxCfgBoostingContract], userAddress) | |
273 | 318 | let currentPeriod = getNumberByKey(keyNextUnlaimedPeriodOfUser(userIdx)) | |
276 | 321 | then throw("Nothing to claim") | |
277 | 322 | else { | |
278 | 323 | let boostingContract = fromBase58String(cfgArray[IdxCfgBoostingContract]) | |
279 | - | let $ | |
280 | - | let period = $ | |
281 | - | let amountFromMatcher = $ | |
282 | - | let amountFromEmission = $ | |
324 | + | let $t01465614792 = claimInternal(boostingContract, currentPeriod, userIdx, USERDEPTH, 0, 0, readonly) | |
325 | + | let period = $t01465614792._1 | |
326 | + | let amountFromMatcher = $t01465614792._2 | |
327 | + | let amountFromEmission = $t01465614792._3 | |
283 | 328 | $Tuple6(period, amountFromMatcher, amountFromEmission, userIdx, cfgArray, nextProcessedPeriod) | |
284 | 329 | } | |
285 | 330 | } | |
331 | + | ||
332 | + | ||
333 | + | @Callable(i) | |
334 | + | func setInteger (k,v) = { | |
335 | + | let checkCaller = if ((i.caller == this)) | |
336 | + | then true | |
337 | + | else throw("Should be called by this script only") | |
338 | + | if ((checkCaller == checkCaller)) | |
339 | + | then { | |
340 | + | let dataEntries = [IntegerEntry(k, v)] | |
341 | + | $Tuple2(dataEntries, dataEntries) | |
342 | + | } | |
343 | + | else throw("Strict value is not equal to itself.") | |
344 | + | } | |
345 | + | ||
286 | 346 | ||
287 | 347 | ||
288 | 348 | @Callable(i) | |
347 | 407 | ||
348 | 408 | ||
349 | 409 | @Callable(i) | |
350 | - | func claimNextBatch (boostingContract,currentPeriod,currentUser,depth,totalFromMatcher,totalFromEmission) = if ((i.caller != this)) | |
410 | + | func claimNextBatch (boostingContract,currentPeriod,currentUser,depth,totalFromMatcher,totalFromEmission,readonly) = if ((i.caller != this)) | |
351 | 411 | then throw("Should be called by this script only") | |
352 | 412 | else { | |
353 | - | let periodAndTotals = claimInternal(boostingContract, currentPeriod, currentUser, depth, totalFromMatcher, totalFromEmission) | |
413 | + | let periodAndTotals = claimInternal(boostingContract, currentPeriod, currentUser, depth, totalFromMatcher, totalFromEmission, readonly) | |
354 | 414 | $Tuple2(nil, periodAndTotals) | |
355 | 415 | } | |
356 | 416 | ||
359 | 419 | @Callable(i) | |
360 | 420 | func claimReward () = { | |
361 | 421 | let address = toString(i.caller) | |
362 | - | let $ | |
363 | - | let period = $ | |
364 | - | let amountFromMatcher = $ | |
365 | - | let amountFromEmission = $ | |
366 | - | let userIdx = $ | |
367 | - | let cfgArray = $ | |
368 | - | let nextProcessedPeriod = $ | |
422 | + | let $t01932219449 = commonClaimReward(address, false) | |
423 | + | let period = $t01932219449._1 | |
424 | + | let amountFromMatcher = $t01932219449._2 | |
425 | + | let amountFromEmission = $t01932219449._3 | |
426 | + | let userIdx = $t01932219449._4 | |
427 | + | let cfgArray = $t01932219449._5 | |
428 | + | let nextProcessedPeriod = $t01932219449._6 | |
369 | 429 | $Tuple2([IntegerEntry(keyNextUnlaimedPeriodOfUser(userIdx), period), ScriptTransfer(i.caller, (amountFromMatcher + amountFromEmission), fromBase58String(cfgArray[IdxCfgAssetId])), HistoryEntry("claim", address, amountFromMatcher, amountFromEmission, period, nextProcessedPeriod, i)], [amountFromMatcher, amountFromEmission]) | |
370 | 430 | } | |
371 | 431 | ||
373 | 433 | ||
374 | 434 | @Callable(i) | |
375 | 435 | func claimRewardREADONLY (address) = { | |
376 | - | let claimResults = commonClaimReward(address) | |
436 | + | let claimResults = commonClaimReward(address, true) | |
377 | 437 | let amount = (claimResults._2 + claimResults._3) | |
378 | 438 | $Tuple2(nil, amount) | |
379 | 439 | } | |
382 | 442 | ||
383 | 443 | @Callable(i) | |
384 | 444 | func claimRewardDetailedREADONLY (address) = { | |
385 | - | let $ | |
386 | - | let ignored = $ | |
387 | - | let fromMatcher = $ | |
388 | - | let fromEmission = $ | |
445 | + | let $t02019720272 = commonClaimReward(address, true) | |
446 | + | let ignored = $t02019720272._1 | |
447 | + | let fromMatcher = $t02019720272._2 | |
448 | + | let fromEmission = $t02019720272._3 | |
389 | 449 | $Tuple2(nil, makeString(["%d%d%d", toString((fromMatcher + fromEmission)), toString(fromMatcher), toString(fromEmission)], SEP)) | |
390 | 450 | } | |
391 | 451 | ||
476 | 536 | let ann = (amp * nCoins) | |
477 | 537 | let arr = [1, 2, 3, 4, 5, 6, 7] | |
478 | 538 | func calc (acc,cur) = { | |
479 | - | let $ | |
480 | - | let d = $ | |
481 | - | let dPrev = $ | |
539 | + | let $t02375123940 = acc | |
540 | + | let d = $t02375123940._1 | |
541 | + | let dPrev = $t02375123940._2 | |
482 | 542 | let dp = (((d * d) * d) / (((x1 * x2) * nCoins) * nCoins)) | |
483 | 543 | let dNext = (((((ann * s) / aPrecision) + (dp * nCoins)) * d) / ((((ann - aPrecision) * d) / aPrecision) + ((nCoins + toBigInt(1)) * dp))) | |
484 | 544 | $Tuple2(dNext, d) | |
485 | 545 | } | |
486 | 546 | ||
487 | - | let $ | |
547 | + | let $t02415324203 = { | |
488 | 548 | let $l = arr | |
489 | 549 | let $s = size($l) | |
490 | 550 | let $acc0 = $Tuple2(s, unit) | |
498 | 558 | ||
499 | 559 | $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) | |
500 | 560 | } | |
501 | - | let dNext = $ | |
502 | - | let dPrev = $ | |
561 | + | let dNext = $t02415324203._1 | |
562 | + | let dPrev = $t02415324203._2 | |
503 | 563 | let dDiff = abs((dNext - value(dPrev))) | |
504 | 564 | if ((targetPrecision >= dDiff)) | |
505 | 565 | then $Tuple2(nil, toString(dNext)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let revisionNum = "" | |
5 | 5 | ||
6 | 6 | let SEP = "__" | |
7 | 7 | ||
8 | 8 | let MAXDEPTH = 17 | |
9 | 9 | ||
10 | 10 | let USERDEPTH = 26 | |
11 | 11 | ||
12 | 12 | let SCALE = 1000 | |
13 | 13 | ||
14 | 14 | let MULT8 = 100000000 | |
15 | 15 | ||
16 | 16 | let zeroBigInt = toBigInt(0) | |
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(key), (("mandatory this." + key) + " is not defined")) | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func abs (val) = if ((zeroBigInt > val)) | |
31 | 31 | then -(val) | |
32 | 32 | else val | |
33 | 33 | ||
34 | 34 | ||
35 | 35 | func keyFactoryAddress () = "%s%s__config__factoryAddress" | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | let factoryAddressStr = getStringOrFail(keyFactoryAddress()) | |
39 | 39 | ||
40 | 40 | let factoryContract = addressFromStringValue(factoryAddressStr) | |
41 | 41 | ||
42 | 42 | func keyEmissionAddress () = "%s%s__config__emissionAddress" | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | let emissionAddressStr = getStringOrFail(keyEmissionAddress()) | |
46 | 46 | ||
47 | 47 | let emissionContract = addressFromStringValue(emissionAddressStr) | |
48 | 48 | ||
49 | 49 | let IdxCfgAssetId = 1 | |
50 | 50 | ||
51 | 51 | let IdxCfgPacemakerAddress = 2 | |
52 | 52 | ||
53 | 53 | let IdxCfgBoostingContract = 3 | |
54 | 54 | ||
55 | 55 | let IdxCfgMaxDepth = 4 | |
56 | 56 | ||
57 | 57 | func keyConfig () = "%s__config" | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func readConfigArrayOrFail () = split(getStringOrFail(keyConfig()), SEP) | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func formatConfig (wxAssetIdStr,matcherPacemakerAddressStr,boostingContractAddressStr,maxDepth) = makeString(["%s%s%s%d", wxAssetIdStr, matcherPacemakerAddressStr, boostingContractAddressStr, toString(maxDepth)], SEP) | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func keyGwxRewardEmissionStartHeight () = "%s%s__gwxRewardEmissionPart__startHeight" | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func keyUsersCount () = "%s__nextUserNum" | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func keyRatePerBlockCurrent () = "%s%s__ratePerBlock__current" | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func keyPoolWeightVirtual () = "%s%s__poolWeight__GWXvirtualPOOL" | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func keyNextProcessedUser () = "%s__nextProcessedUser" | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func keyLatestPeriod () = "%s__latestPeriod" | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func keyNextPeriod () = "%s__nextPeriod" | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func keyNextProcessedPeriod () = "%s__nextProcessedPeriod" | |
88 | 88 | ||
89 | 89 | ||
90 | - | func keyNextUnlaimedPeriodOfUser (userIndex) = makeString(["%s%d__nextClaimedPeriod", toString(userIndex)], SEP) | |
90 | + | func keyNextUnlaimedPeriodOfUserOld (userIndex) = makeString(["%s%d__nextClaimedPeriod", toString(userIndex)], SEP) | |
91 | + | ||
92 | + | ||
93 | + | func keyNextUnlaimedPeriodOfUser (userIndex) = makeString(["%s%d__nextClaimedPeriodNew", toString(userIndex)], SEP) | |
91 | 94 | ||
92 | 95 | ||
93 | 96 | func keyLastProcessedPeriodOfUser (userIndex) = makeString(["%s%d__lastProcessedPeriod", toString(userIndex)], SEP) | |
97 | + | ||
98 | + | ||
99 | + | func keyLastProcessedPeriodOfUserForClaim (userIndex) = makeString(["%s%d__lastProcessedPeriodForClaim", toString(userIndex)], SEP) | |
94 | 100 | ||
95 | 101 | ||
96 | 102 | func keyHeightForPeriod (period) = makeString(["%s%d__startHeightForPeriod", toString(period)], SEP) | |
97 | 103 | ||
98 | 104 | ||
99 | 105 | func keyAuxEmissionRewardForPeriod (period) = makeString(["%s%d__auxEmissionReward", toString(period)], SEP) | |
100 | 106 | ||
101 | 107 | ||
102 | 108 | func keyTotalAmountForPeriod (period) = makeString(["%s%d__totalAmountForPeriod", toString(period)], SEP) | |
103 | 109 | ||
104 | 110 | ||
105 | 111 | func keyLastPayoutInfo () = "%s__lastPayoutInfo" | |
106 | 112 | ||
107 | 113 | ||
108 | 114 | func PeriodPayoutInfo (period,matcherReward,emissionReward) = makeString(["%d%d%d", toString(period), toString(matcherReward), toString(emissionReward)], SEP) | |
109 | 115 | ||
110 | 116 | ||
111 | 117 | func keyPayoutHistoryInfo (period) = makeString(["%s%s%d__payouts__history", toString(period)], SEP) | |
112 | 118 | ||
113 | 119 | ||
114 | 120 | func keyTotalWeightForPeriod (period) = makeString(["%s%d__totalWeightForPeriod", toString(period)], SEP) | |
115 | 121 | ||
116 | 122 | ||
117 | 123 | func keyUserKValueForPeriod (period,userIndex) = makeString(["%s%d%s%d__paramByPeriod", toString(userIndex), "k", toString(period)], SEP) | |
118 | 124 | ||
119 | 125 | ||
120 | 126 | func keyUserBValueForPeriod (period,userIndex) = makeString(["%s%d%s%d__paramByPeriod", toString(userIndex), "b", toString(period)], SEP) | |
121 | 127 | ||
122 | 128 | ||
123 | 129 | func HistoryEntry (type,user,amountFromMatcher,amountFromEmission,currentPeriod,latestPeriod,i) = { | |
124 | 130 | let historyKEY = makeString(["%s%s%s%s__history", type, user, toBase58String(i.transactionId)], SEP) | |
125 | 131 | let historyDATA = makeString(["%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(amountFromMatcher), toString(amountFromEmission), toString(currentPeriod), toString(latestPeriod)], SEP) | |
126 | 132 | StringEntry(historyKEY, historyDATA) | |
127 | 133 | } | |
128 | 134 | ||
129 | 135 | ||
130 | 136 | func calcUserWeight (boostingContractAddress,heightForPeriod,period,userIndex) = { | |
131 | 137 | let kLast = keyLastProcessedPeriodOfUser(userIndex) | |
132 | 138 | let kKey = keyUserKValueForPeriod(period, userIndex) | |
133 | 139 | let kRaw = getInteger(boostingContractAddress, kKey) | |
134 | 140 | if (isDefined(kRaw)) | |
135 | 141 | then { | |
136 | 142 | let k = value(kRaw) | |
137 | 143 | let b = value(getInteger(boostingContractAddress, keyUserBValueForPeriod(period, userIndex))) | |
138 | 144 | let w = ((k * heightForPeriod) + b) | |
139 | 145 | if ((w > 0)) | |
140 | 146 | then $Tuple2((w / SCALE), [IntegerEntry(kLast, period)]) | |
141 | 147 | else $Tuple2(0, nil) | |
142 | 148 | } | |
143 | 149 | else { | |
144 | 150 | let p = getInteger(this, kLast) | |
145 | - | if (if (isDefined(p)) | |
146 | - | then (period >= value(p)) | |
147 | - | else false) | |
151 | + | if (isDefined(p)) | |
148 | 152 | then { | |
149 | 153 | let pv = value(p) | |
150 | 154 | let k = value(getInteger(boostingContractAddress, keyUserKValueForPeriod(pv, userIndex))) | |
151 | 155 | let b = value(getInteger(boostingContractAddress, keyUserBValueForPeriod(pv, userIndex))) | |
152 | 156 | let w = ((k * heightForPeriod) + b) | |
153 | 157 | if ((w > 0)) | |
154 | 158 | then $Tuple2((w / SCALE), nil) | |
155 | 159 | else $Tuple2(0, nil) | |
156 | 160 | } | |
157 | 161 | else $Tuple2(0, nil) | |
162 | + | } | |
163 | + | } | |
164 | + | ||
165 | + | ||
166 | + | func calcUserWeightForClaim (boostingContractAddress,heightForPeriod,period,userIndex,readonly) = { | |
167 | + | let kLast = keyLastProcessedPeriodOfUserForClaim(userIndex) | |
168 | + | let kKey = keyUserKValueForPeriod(period, userIndex) | |
169 | + | let kRaw = getInteger(boostingContractAddress, kKey) | |
170 | + | let nextUnlaimedPeriodOfUserOld = getNumberByKey(keyNextUnlaimedPeriodOfUserOld(userIndex)) | |
171 | + | let isNotClaimed = if ((period >= nextUnlaimedPeriodOfUserOld)) | |
172 | + | then (nextUnlaimedPeriodOfUserOld > 0) | |
173 | + | else false | |
174 | + | if (isDefined(kRaw)) | |
175 | + | then { | |
176 | + | let k = value(kRaw) | |
177 | + | let b = value(getInteger(boostingContractAddress, keyUserBValueForPeriod(period, userIndex))) | |
178 | + | let w = ((k * heightForPeriod) + b) | |
179 | + | let inv = if (readonly) | |
180 | + | then unit | |
181 | + | else invoke(this, "setInteger", [kLast, period], nil) | |
182 | + | if ((inv == inv)) | |
183 | + | then if (if ((w > 0)) | |
184 | + | then isNotClaimed | |
185 | + | else false) | |
186 | + | then (w / SCALE) | |
187 | + | else 0 | |
188 | + | else throw("Strict value is not equal to itself.") | |
189 | + | } | |
190 | + | else { | |
191 | + | let p = getInteger(this, kLast) | |
192 | + | if (isDefined(p)) | |
193 | + | then { | |
194 | + | let pv = value(p) | |
195 | + | let k = value(getInteger(boostingContractAddress, keyUserKValueForPeriod(pv, userIndex))) | |
196 | + | let b = value(getInteger(boostingContractAddress, keyUserBValueForPeriod(pv, userIndex))) | |
197 | + | let w = ((k * heightForPeriod) + b) | |
198 | + | if (if ((w > 0)) | |
199 | + | then isNotClaimed | |
200 | + | else false) | |
201 | + | then (w / SCALE) | |
202 | + | else 0 | |
203 | + | } | |
204 | + | else 0 | |
158 | 205 | } | |
159 | 206 | } | |
160 | 207 | ||
161 | 208 | ||
162 | 209 | func getUserIndexByAddress (boostingContractAddressStr,userAddress) = { | |
163 | 210 | let key = makeString(["%s%s%s", "mapping", "user2num", userAddress], SEP) | |
164 | 211 | parseIntValue(valueOrErrorMessage(getString(Address(fromBase58String(boostingContractAddressStr)), key), ((("User address " + userAddress) + " is not found in boosting contract data, key=") + key))) | |
165 | 212 | } | |
166 | 213 | ||
167 | 214 | ||
168 | 215 | func nextPeriod () = getNumberByKey(keyNextPeriod()) | |
169 | 216 | ||
170 | 217 | ||
171 | 218 | func invokeProcess (boostingContract,period,user,depth,weight) = { | |
172 | 219 | let result = invoke(this, "processNextBatch", [boostingContract, period, user, depth, weight], nil) | |
173 | 220 | if ((result == result)) | |
174 | 221 | then match result { | |
175 | 222 | case r: (Int, Int, Int) => | |
176 | 223 | r | |
177 | 224 | case _ => | |
178 | 225 | throw("Incorrect invoke result") | |
179 | 226 | } | |
180 | 227 | else throw("Strict value is not equal to itself.") | |
181 | 228 | } | |
182 | 229 | ||
183 | 230 | ||
184 | 231 | func processNextBatchInternal (boostingContract,currentPeriod,currentUser,depth,totalWeight) = { | |
185 | 232 | let boostingContractAddress = Address(boostingContract) | |
186 | 233 | let latestPeriod = getNumberByKey(keyLatestPeriod()) | |
187 | 234 | let usersCount = valueOrElse(getInteger(boostingContractAddress, keyUsersCount()), 0) | |
188 | 235 | let totalWeightKey = keyTotalWeightForPeriod(currentPeriod) | |
189 | 236 | let heightForPeriod = getNumberByKey(keyHeightForPeriod(currentPeriod)) | |
190 | 237 | if (if ((depth > 0)) | |
191 | 238 | then (latestPeriod >= currentPeriod) | |
192 | 239 | else false) | |
193 | 240 | then { | |
194 | 241 | let t0 = calcUserWeight(boostingContractAddress, heightForPeriod, currentPeriod, currentUser) | |
195 | 242 | let weight0 = (totalWeight + t0._1) | |
196 | 243 | if ((usersCount > (currentUser + 1))) | |
197 | 244 | then { | |
198 | 245 | let t1 = calcUserWeight(boostingContractAddress, heightForPeriod, currentPeriod, (currentUser + 1)) | |
199 | 246 | let weight1 = (weight0 + t1._1) | |
200 | 247 | if ((usersCount > (currentUser + 2))) | |
201 | 248 | then { | |
202 | 249 | let t2 = calcUserWeight(boostingContractAddress, heightForPeriod, currentPeriod, (currentUser + 2)) | |
203 | 250 | let weight2 = (weight1 + t2._1) | |
204 | 251 | if ((usersCount > (currentUser + 3))) | |
205 | 252 | then { | |
206 | 253 | let t3 = calcUserWeight(boostingContractAddress, heightForPeriod, currentPeriod, (currentUser + 3)) | |
207 | 254 | let weight3 = (weight2 + t3._1) | |
208 | 255 | if ((usersCount > (currentUser + 4))) | |
209 | 256 | then { | |
210 | 257 | let t4 = calcUserWeight(boostingContractAddress, heightForPeriod, currentPeriod, (currentUser + 4)) | |
211 | 258 | let weight4 = (weight3 + t4._1) | |
212 | 259 | if ((usersCount > (currentUser + 5))) | |
213 | 260 | then { | |
214 | 261 | let t5 = calcUserWeight(boostingContractAddress, heightForPeriod, currentPeriod, (currentUser + 5)) | |
215 | 262 | let weight5 = (weight4 + t5._1) | |
216 | 263 | if ((usersCount > (currentUser + 6))) | |
217 | 264 | then { | |
218 | 265 | let r5 = invokeProcess(boostingContract, currentPeriod, (currentUser + 6), (depth - 1), weight5) | |
219 | 266 | $Tuple4((((((t0._2 ++ t1._2) ++ t2._2) ++ t3._2) ++ t4._2) ++ t5._2), r5._1, r5._2, r5._3) | |
220 | 267 | } | |
221 | 268 | else $Tuple4((((((([IntegerEntry(totalWeightKey, weight5)] ++ t0._2) ++ t1._2) ++ t2._2) ++ t3._2) ++ t4._2) ++ t5._2), (currentPeriod + 1), 0, 0) | |
222 | 269 | } | |
223 | 270 | else $Tuple4(((((([IntegerEntry(totalWeightKey, weight4)] ++ t0._2) ++ t1._2) ++ t2._2) ++ t3._2) ++ t4._2), (currentPeriod + 1), 0, 0) | |
224 | 271 | } | |
225 | 272 | else $Tuple4((((([IntegerEntry(totalWeightKey, weight3)] ++ t0._2) ++ t1._2) ++ t2._2) ++ t3._2), (currentPeriod + 1), 0, 0) | |
226 | 273 | } | |
227 | 274 | else $Tuple4(((([IntegerEntry(totalWeightKey, weight2)] ++ t0._2) ++ t1._2) ++ t2._2), (currentPeriod + 1), 0, 0) | |
228 | 275 | } | |
229 | 276 | else $Tuple4((([IntegerEntry(totalWeightKey, weight1)] ++ t0._2) ++ t1._2), (currentPeriod + 1), 0, 0) | |
230 | 277 | } | |
231 | 278 | else $Tuple4(([IntegerEntry(totalWeightKey, weight0)] ++ t0._2), (currentPeriod + 1), 0, 0) | |
232 | 279 | } | |
233 | 280 | else if ((currentUser == 0)) | |
234 | 281 | then $Tuple4(nil, currentPeriod, 0, 0) | |
235 | 282 | else $Tuple4([IntegerEntry(totalWeightKey, totalWeight)], currentPeriod, currentUser, 0) | |
236 | 283 | } | |
237 | 284 | ||
238 | 285 | ||
239 | - | func invokeClaim (boostingContract,period,user,depth,totalFromMatcher,totalFromEmission) = { | |
240 | - | let result = invoke(this, "claimNextBatch", [boostingContract, period, user, depth, totalFromMatcher, totalFromEmission], nil) | |
286 | + | func invokeClaim (boostingContract,period,user,depth,totalFromMatcher,totalFromEmission,readonly) = { | |
287 | + | let result = invoke(this, "claimNextBatch", [boostingContract, period, user, depth, totalFromMatcher, totalFromEmission, readonly], nil) | |
241 | 288 | if ((result == result)) | |
242 | 289 | then match result { | |
243 | 290 | case r: (Int, Int, Int) => | |
244 | 291 | r | |
245 | 292 | case _ => | |
246 | 293 | throw("Incorrect invoke result") | |
247 | 294 | } | |
248 | 295 | else throw("Strict value is not equal to itself.") | |
249 | 296 | } | |
250 | 297 | ||
251 | 298 | ||
252 | - | func claimInternal (boostingContract,currentPeriod,currentUser,depth,userAccumulatedMatcher,userAccumulatedEmission) = { | |
299 | + | func claimInternal (boostingContract,currentPeriod,currentUser,depth,userAccumulatedMatcher,userAccumulatedEmission,readonly) = { | |
253 | 300 | let boostingContractAddress = Address(boostingContract) | |
254 | 301 | let latestPeriod = getNumberByKey(keyNextProcessedPeriod()) | |
255 | 302 | let totalWeight = getNumberByKey(keyTotalWeightForPeriod(currentPeriod)) | |
256 | 303 | let heightForPeriod = getNumberByKey(keyHeightForPeriod(currentPeriod)) | |
257 | - | let $t01172411836 = calcUserWeight(boostingContractAddress, heightForPeriod, currentPeriod, currentUser) | |
258 | - | let userWeight = $t01172411836._1 | |
259 | - | let ignored = $t01172411836._2 | |
304 | + | let userWeight = calcUserWeightForClaim(boostingContractAddress, heightForPeriod, currentPeriod, currentUser, readonly) | |
260 | 305 | let userAmountMatcherForPeriod = fraction(getNumberByKey(keyTotalAmountForPeriod(currentPeriod)), userWeight, totalWeight) | |
261 | 306 | let userAmountEmissionForPeriod = fraction(getNumberByKey(keyAuxEmissionRewardForPeriod(currentPeriod)), userWeight, totalWeight) | |
262 | 307 | if (if ((0 >= depth)) | |
263 | 308 | then true | |
264 | 309 | else ((currentPeriod + 1) >= latestPeriod)) | |
265 | 310 | then $Tuple3((currentPeriod + 1), (userAccumulatedMatcher + userAmountMatcherForPeriod), (userAccumulatedEmission + userAmountEmissionForPeriod)) | |
266 | - | else invokeClaim(boostingContract, (currentPeriod + 1), currentUser, (depth - 1), (userAccumulatedMatcher + userAmountMatcherForPeriod), (userAccumulatedEmission + userAmountEmissionForPeriod)) | |
311 | + | else invokeClaim(boostingContract, (currentPeriod + 1), currentUser, (depth - 1), (userAccumulatedMatcher + userAmountMatcherForPeriod), (userAccumulatedEmission + userAmountEmissionForPeriod), readonly) | |
267 | 312 | } | |
268 | 313 | ||
269 | 314 | ||
270 | - | func commonClaimReward (userAddress) = { | |
315 | + | func commonClaimReward (userAddress,readonly) = { | |
271 | 316 | let cfgArray = readConfigArrayOrFail() | |
272 | 317 | let userIdx = getUserIndexByAddress(cfgArray[IdxCfgBoostingContract], userAddress) | |
273 | 318 | let currentPeriod = getNumberByKey(keyNextUnlaimedPeriodOfUser(userIdx)) | |
274 | 319 | let nextProcessedPeriod = getNumberByKey(keyNextProcessedPeriod()) | |
275 | 320 | if ((currentPeriod >= nextProcessedPeriod)) | |
276 | 321 | then throw("Nothing to claim") | |
277 | 322 | else { | |
278 | 323 | let boostingContract = fromBase58String(cfgArray[IdxCfgBoostingContract]) | |
279 | - | let $ | |
280 | - | let period = $ | |
281 | - | let amountFromMatcher = $ | |
282 | - | let amountFromEmission = $ | |
324 | + | let $t01465614792 = claimInternal(boostingContract, currentPeriod, userIdx, USERDEPTH, 0, 0, readonly) | |
325 | + | let period = $t01465614792._1 | |
326 | + | let amountFromMatcher = $t01465614792._2 | |
327 | + | let amountFromEmission = $t01465614792._3 | |
283 | 328 | $Tuple6(period, amountFromMatcher, amountFromEmission, userIdx, cfgArray, nextProcessedPeriod) | |
284 | 329 | } | |
285 | 330 | } | |
331 | + | ||
332 | + | ||
333 | + | @Callable(i) | |
334 | + | func setInteger (k,v) = { | |
335 | + | let checkCaller = if ((i.caller == this)) | |
336 | + | then true | |
337 | + | else throw("Should be called by this script only") | |
338 | + | if ((checkCaller == checkCaller)) | |
339 | + | then { | |
340 | + | let dataEntries = [IntegerEntry(k, v)] | |
341 | + | $Tuple2(dataEntries, dataEntries) | |
342 | + | } | |
343 | + | else throw("Strict value is not equal to itself.") | |
344 | + | } | |
345 | + | ||
286 | 346 | ||
287 | 347 | ||
288 | 348 | @Callable(i) | |
289 | 349 | func processNextBatch (boostingContract,currentPeriod,currentUser,depth,totalWeight) = if ((i.caller != this)) | |
290 | 350 | then throw("Should be called by this script only") | |
291 | 351 | else { | |
292 | 352 | let tpl = processNextBatchInternal(boostingContract, currentPeriod, currentUser, depth, totalWeight) | |
293 | 353 | $Tuple2(tpl._1, $Tuple3(tpl._2, tpl._3, tpl._4)) | |
294 | 354 | } | |
295 | 355 | ||
296 | 356 | ||
297 | 357 | ||
298 | 358 | @Callable(i) | |
299 | 359 | func processPendingPeriodsAndUsers () = { | |
300 | 360 | let currentPeriod = getNumberByKey(keyNextProcessedPeriod()) | |
301 | 361 | if ((currentPeriod > getNumberByKey(keyLatestPeriod()))) | |
302 | 362 | then throw("Nothing to process") | |
303 | 363 | else { | |
304 | 364 | let cfgArray = readConfigArrayOrFail() | |
305 | 365 | let depth = parseIntValue(cfgArray[IdxCfgMaxDepth]) | |
306 | 366 | if ((depth > MAXDEPTH)) | |
307 | 367 | then throw("Depth exceeds MAXDEPTH") | |
308 | 368 | else { | |
309 | 369 | let boostingContract = fromBase58String(cfgArray[IdxCfgBoostingContract]) | |
310 | 370 | let currentUser = getNumberByKey(keyNextProcessedUser()) | |
311 | 371 | let totalWeight = getNumberByKey(keyTotalWeightForPeriod(currentPeriod)) | |
312 | 372 | let r = processNextBatchInternal(boostingContract, currentPeriod, currentUser, depth, totalWeight) | |
313 | 373 | ((r._1 :+ IntegerEntry(keyNextProcessedPeriod(), r._2)) :+ IntegerEntry(keyNextProcessedUser(), r._3)) | |
314 | 374 | } | |
315 | 375 | } | |
316 | 376 | } | |
317 | 377 | ||
318 | 378 | ||
319 | 379 | ||
320 | 380 | @Callable(i) | |
321 | 381 | func deposit () = { | |
322 | 382 | let cfgArray = readConfigArrayOrFail() | |
323 | 383 | if ((i.caller != Address(fromBase58String(cfgArray[IdxCfgPacemakerAddress])))) | |
324 | 384 | then throw("Wrong caller address") | |
325 | 385 | else { | |
326 | 386 | let assetId = value(value(i.payments[0]).assetId) | |
327 | 387 | if ((assetId != fromBase58String(cfgArray[IdxCfgAssetId]))) | |
328 | 388 | then throw("Wrong payment asset") | |
329 | 389 | else { | |
330 | 390 | let period = nextPeriod() | |
331 | 391 | let deltaH = (height - getNumberOrFail(keyGwxRewardEmissionStartHeight())) | |
332 | 392 | let emissionRate = valueOrErrorMessage(getInteger(emissionContract, keyRatePerBlockCurrent()), (("mandatory emission_contract." + keyRatePerBlockCurrent()) + " is not defined")) | |
333 | 393 | let weight = valueOrErrorMessage(getInteger(factoryContract, keyPoolWeightVirtual()), (("mandatory factory_contract." + keyPoolWeightVirtual()) + " is not defined")) | |
334 | 394 | let auxAmount = fraction((deltaH * weight), emissionRate, MULT8) | |
335 | 395 | let em = invoke(emissionContract, "emit", [auxAmount], nil) | |
336 | 396 | if ((em == em)) | |
337 | 397 | then { | |
338 | 398 | let matcherPart = value(i.payments[0]).amount | |
339 | 399 | let payoutInfo = PeriodPayoutInfo(period, matcherPart, auxAmount) | |
340 | 400 | [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)] | |
341 | 401 | } | |
342 | 402 | else throw("Strict value is not equal to itself.") | |
343 | 403 | } | |
344 | 404 | } | |
345 | 405 | } | |
346 | 406 | ||
347 | 407 | ||
348 | 408 | ||
349 | 409 | @Callable(i) | |
350 | - | func claimNextBatch (boostingContract,currentPeriod,currentUser,depth,totalFromMatcher,totalFromEmission) = if ((i.caller != this)) | |
410 | + | func claimNextBatch (boostingContract,currentPeriod,currentUser,depth,totalFromMatcher,totalFromEmission,readonly) = if ((i.caller != this)) | |
351 | 411 | then throw("Should be called by this script only") | |
352 | 412 | else { | |
353 | - | let periodAndTotals = claimInternal(boostingContract, currentPeriod, currentUser, depth, totalFromMatcher, totalFromEmission) | |
413 | + | let periodAndTotals = claimInternal(boostingContract, currentPeriod, currentUser, depth, totalFromMatcher, totalFromEmission, readonly) | |
354 | 414 | $Tuple2(nil, periodAndTotals) | |
355 | 415 | } | |
356 | 416 | ||
357 | 417 | ||
358 | 418 | ||
359 | 419 | @Callable(i) | |
360 | 420 | func claimReward () = { | |
361 | 421 | let address = toString(i.caller) | |
362 | - | let $ | |
363 | - | let period = $ | |
364 | - | let amountFromMatcher = $ | |
365 | - | let amountFromEmission = $ | |
366 | - | let userIdx = $ | |
367 | - | let cfgArray = $ | |
368 | - | let nextProcessedPeriod = $ | |
422 | + | let $t01932219449 = commonClaimReward(address, false) | |
423 | + | let period = $t01932219449._1 | |
424 | + | let amountFromMatcher = $t01932219449._2 | |
425 | + | let amountFromEmission = $t01932219449._3 | |
426 | + | let userIdx = $t01932219449._4 | |
427 | + | let cfgArray = $t01932219449._5 | |
428 | + | let nextProcessedPeriod = $t01932219449._6 | |
369 | 429 | $Tuple2([IntegerEntry(keyNextUnlaimedPeriodOfUser(userIdx), period), ScriptTransfer(i.caller, (amountFromMatcher + amountFromEmission), fromBase58String(cfgArray[IdxCfgAssetId])), HistoryEntry("claim", address, amountFromMatcher, amountFromEmission, period, nextProcessedPeriod, i)], [amountFromMatcher, amountFromEmission]) | |
370 | 430 | } | |
371 | 431 | ||
372 | 432 | ||
373 | 433 | ||
374 | 434 | @Callable(i) | |
375 | 435 | func claimRewardREADONLY (address) = { | |
376 | - | let claimResults = commonClaimReward(address) | |
436 | + | let claimResults = commonClaimReward(address, true) | |
377 | 437 | let amount = (claimResults._2 + claimResults._3) | |
378 | 438 | $Tuple2(nil, amount) | |
379 | 439 | } | |
380 | 440 | ||
381 | 441 | ||
382 | 442 | ||
383 | 443 | @Callable(i) | |
384 | 444 | func claimRewardDetailedREADONLY (address) = { | |
385 | - | let $ | |
386 | - | let ignored = $ | |
387 | - | let fromMatcher = $ | |
388 | - | let fromEmission = $ | |
445 | + | let $t02019720272 = commonClaimReward(address, true) | |
446 | + | let ignored = $t02019720272._1 | |
447 | + | let fromMatcher = $t02019720272._2 | |
448 | + | let fromEmission = $t02019720272._3 | |
389 | 449 | $Tuple2(nil, makeString(["%d%d%d", toString((fromMatcher + fromEmission)), toString(fromMatcher), toString(fromEmission)], SEP)) | |
390 | 450 | } | |
391 | 451 | ||
392 | 452 | ||
393 | 453 | ||
394 | 454 | @Callable(i) | |
395 | 455 | func latestFinalizedPeriodREADONLY (address) = $Tuple2(nil, valueOrElse(getInteger(this, keyLatestPeriod()), -1)) | |
396 | 456 | ||
397 | 457 | ||
398 | 458 | ||
399 | 459 | @Callable(i) | |
400 | 460 | func latestFinalizedPeriodInfoREADONLY (address) = $Tuple2(nil, getStringByKey(keyLastPayoutInfo())) | |
401 | 461 | ||
402 | 462 | ||
403 | 463 | ||
404 | 464 | @Callable(i) | |
405 | 465 | func calcGwxParamsREADONLY (gwxAmountStart,lockStartHeight,lockDurationBlocks) = { | |
406 | 466 | let lockEndHeight = (lockStartHeight + lockDurationBlocks) | |
407 | 467 | let scale8ParamK = -(fraction(gwxAmountStart, SCALE, lockDurationBlocks)) | |
408 | 468 | let scale8ParamB = (fraction(gwxAmountStart, SCALE, lockDurationBlocks) * lockEndHeight) | |
409 | 469 | $Tuple2(nil, [scale8ParamK, scale8ParamB, nextPeriod()]) | |
410 | 470 | } | |
411 | 471 | ||
412 | 472 | ||
413 | 473 | ||
414 | 474 | @Callable(i) | |
415 | 475 | func calcGwxAmountStartREADONLY (wxLockAmount,lockDuration,maxLockDuration) = { | |
416 | 476 | let coeffX8 = fraction(lockDuration, MULT8, maxLockDuration) | |
417 | 477 | let gWxAmountStart = fraction(wxLockAmount, coeffX8, MULT8) | |
418 | 478 | $Tuple2(nil, [gWxAmountStart]) | |
419 | 479 | } | |
420 | 480 | ||
421 | 481 | ||
422 | 482 | ||
423 | 483 | @Callable(i) | |
424 | 484 | func constructor (wxAssetIdStr,matcherPacemakerAddressStr,boostingContractAddressStr,maxDepth) = if ((this != i.caller)) | |
425 | 485 | then throw("not authorized") | |
426 | 486 | else [StringEntry(keyConfig(), formatConfig(wxAssetIdStr, matcherPacemakerAddressStr, boostingContractAddressStr, maxDepth))] | |
427 | 487 | ||
428 | 488 | ||
429 | 489 | ||
430 | 490 | @Callable(i) | |
431 | 491 | func constructorV2 (factoryAddress) = if ((this != i.caller)) | |
432 | 492 | then throw("not authorized") | |
433 | 493 | else [StringEntry(keyFactoryAddress(), factoryAddress)] | |
434 | 494 | ||
435 | 495 | ||
436 | 496 | ||
437 | 497 | @Callable(i) | |
438 | 498 | func constructorV3 (emissionAddress) = if ((this != i.caller)) | |
439 | 499 | then throw("not authorized") | |
440 | 500 | else { | |
441 | 501 | let initLatestPeriod = if (isDefined(getInteger(this, keyLatestPeriod()))) | |
442 | 502 | then nil | |
443 | 503 | else [IntegerEntry(keyLatestPeriod(), -1)] | |
444 | 504 | (initLatestPeriod :+ StringEntry(keyEmissionAddress(), emissionAddress)) | |
445 | 505 | } | |
446 | 506 | ||
447 | 507 | ||
448 | 508 | ||
449 | 509 | @Callable(i) | |
450 | 510 | func onEmissionForGwxStart () = if ((i.caller != factoryContract)) | |
451 | 511 | then throw("permissions denied") | |
452 | 512 | else [IntegerEntry(keyGwxRewardEmissionStartHeight(), height)] | |
453 | 513 | ||
454 | 514 | ||
455 | 515 | ||
456 | 516 | @Callable(i) | |
457 | 517 | func latestPeriodEmissionRewardsREADONLY (address) = { | |
458 | 518 | let period = nextPeriod() | |
459 | 519 | $Tuple2(nil, [getNumberByKey(keyAuxEmissionRewardForPeriod(period))]) | |
460 | 520 | } | |
461 | 521 | ||
462 | 522 | ||
463 | 523 | ||
464 | 524 | @Callable(i) | |
465 | 525 | func calcD (x1BigIntStr,x2BigIntStr,ampBigIntStr,aPrecisionBigIntStr,targetPrecisionBigIntStr) = { | |
466 | 526 | let nCoins = toBigInt(2) | |
467 | 527 | let aPrecision = parseBigIntValue(aPrecisionBigIntStr) | |
468 | 528 | let targetPrecision = parseBigIntValue(targetPrecisionBigIntStr) | |
469 | 529 | let x1 = parseBigIntValue(x1BigIntStr) | |
470 | 530 | let x2 = parseBigIntValue(x2BigIntStr) | |
471 | 531 | let amp = (parseBigIntValue(ampBigIntStr) * aPrecision) | |
472 | 532 | let s = (x1 + x2) | |
473 | 533 | if ((s == zeroBigInt)) | |
474 | 534 | then $Tuple2(nil, toString(zeroBigInt)) | |
475 | 535 | else { | |
476 | 536 | let ann = (amp * nCoins) | |
477 | 537 | let arr = [1, 2, 3, 4, 5, 6, 7] | |
478 | 538 | func calc (acc,cur) = { | |
479 | - | let $ | |
480 | - | let d = $ | |
481 | - | let dPrev = $ | |
539 | + | let $t02375123940 = acc | |
540 | + | let d = $t02375123940._1 | |
541 | + | let dPrev = $t02375123940._2 | |
482 | 542 | let dp = (((d * d) * d) / (((x1 * x2) * nCoins) * nCoins)) | |
483 | 543 | let dNext = (((((ann * s) / aPrecision) + (dp * nCoins)) * d) / ((((ann - aPrecision) * d) / aPrecision) + ((nCoins + toBigInt(1)) * dp))) | |
484 | 544 | $Tuple2(dNext, d) | |
485 | 545 | } | |
486 | 546 | ||
487 | - | let $ | |
547 | + | let $t02415324203 = { | |
488 | 548 | let $l = arr | |
489 | 549 | let $s = size($l) | |
490 | 550 | let $acc0 = $Tuple2(s, unit) | |
491 | 551 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
492 | 552 | then $a | |
493 | 553 | else calc($a, $l[$i]) | |
494 | 554 | ||
495 | 555 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
496 | 556 | then $a | |
497 | 557 | else throw("List size exceeds 7") | |
498 | 558 | ||
499 | 559 | $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) | |
500 | 560 | } | |
501 | - | let dNext = $ | |
502 | - | let dPrev = $ | |
561 | + | let dNext = $t02415324203._1 | |
562 | + | let dPrev = $t02415324203._2 | |
503 | 563 | let dDiff = abs((dNext - value(dPrev))) | |
504 | 564 | if ((targetPrecision >= dDiff)) | |
505 | 565 | then $Tuple2(nil, toString(dNext)) | |
506 | 566 | else throw(("D calculation error, dDiff = " + toString(dDiff))) | |
507 | 567 | } | |
508 | 568 | } | |
509 | 569 | ||
510 | 570 |
github/deemru/w8io/169f3d6 119.75 ms ◑