tx · 6dE1gqpaf9zpKivoEwrQki2CfnyWWU8EdDSXpQKEPL6m 3MuGfNhF98CNBCfthhoJEo6SYUv7zTgkK4J: -0.01400000 Waves 2022.03.25 16:23 [1979511] smart account 3MuGfNhF98CNBCfthhoJEo6SYUv7zTgkK4J > SELF 0.00000000 Waves
{ "type": 13, "id": "6dE1gqpaf9zpKivoEwrQki2CfnyWWU8EdDSXpQKEPL6m", "fee": 1400000, "feeAssetId": null, "timestamp": 1648214625330, "version": 1, "sender": "3MuGfNhF98CNBCfthhoJEo6SYUv7zTgkK4J", "senderPublicKey": "4DthuG3xjZV9WtZ34Y66AummdAr67wRzwWsVQL4y2bob", "proofs": [ "4z5Wmt9nw26tPWpnnurHr26pX1azd8n46XhdzXskZCER2SkQ5FL2cURdDotLZ6JDddkdCj79brxr4TwUSWwVsaL9" ], "script": "base64:AAIFAAAAAAAAACAIAhIHCgUICAEBCBIAEgMKAQESABIAEgMKAQgSAwoBCAAAADUAAAAAC3JldmlzaW9uTnVtAgAAAAAAAAAACXNlcGFyYXRvcgIAAAACX18AAAAABU1VTFQ2AAAAAAAAD0JAAAAAAAVNVUxUOAAAAAAABfXhAAAAAAAGTVVMVFg2CQABNgAAAAEFAAAABU1VTFQ2AAAAAAZNVUxUWDgJAAE2AAAAAQUAAAAFTVVMVDgAAAAAB01VTFRYMTgJAAE2AAAAAQAN4Lazp2QAAAAAAAAKV0FWRVNJRFNUUgIAAAAFV0FWRVMAAAAAB1dBVkVTSUQJAAJZAAAAAQUAAAAKV0FWRVNJRFNUUgEAAAAMa2V5Qm9uZEFzc2V0AAAAAAIAAAANYm9uZF9hc3NldF9pZAEAAAAZa2V5QXVjdGlvbkNvbnRyYWN0QWRkcmVzcwAAAAACAAAAEGF1Y3Rpb25fY29udHJhY3QBAAAAGmtleU5ldXRyaW5vQ29udHJhY3RBZGRyZXNzAAAAAAIAAAAbJXNfX25ldXRyaW5vQ29udHJhY3RBZGRyZXNzAQAAABZrZXlNYXRoQ29udHJhY3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8yBAAAAAxzdGFraW5nU3RhcnQIBQAAAA0kdDAxODk4NzE5MDkxAAAAAl8zCQAFFAAAAAIFAAAAA25pbAkABEwAAAACBQAAAAt1c2VyTnNidEFtdAkABEwAAAACBQAAAAx0b3RhbE5zYnRBbXQJAARMAAAAAgUAAAAMc3Rha2luZ1N0YXJ0BQAAAANuaWwAAAAAD9rPZQ==", "chainId": 84, "height": 1979511, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Fz8XGheAiqPy5iQSzyAZibArWH7mqsxfC91NZ4Xy29vc Next: 5WiKyA1KQfvsWUt4BFKaDJfAKLpeyhebAVsEceEqi5FU Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let revisionNum = "" | |
5 | + | ||
4 | 6 | let separator = "__" | |
5 | 7 | ||
6 | 8 | let MULT6 = 1000000 | |
173 | 175 | let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1) | |
174 | 176 | let depositNumLast = getIntOrElse(keyDepositNumLast(), -1) | |
175 | 177 | func forEachAssetCacheUserReward (accum,asset) = { | |
176 | - | let $ | |
177 | - | let rewardTotal = $ | |
178 | - | let cached = $ | |
179 | - | let dynamic = $ | |
180 | - | let rewardCachedPartKEY = $ | |
178 | + | let $t073617496 = calcReward(userAddress, asset, stakedAmountX, depositNumUser, depositNumLast) | |
179 | + | let rewardTotal = $t073617496._1 | |
180 | + | let cached = $t073617496._2 | |
181 | + | let dynamic = $t073617496._3 | |
182 | + | let rewardCachedPartKEY = $t073617496._4 | |
181 | 183 | (accum :+ IntegerEntry(rewardCachedPartKEY, rewardTotal)) | |
182 | 184 | } | |
183 | 185 | ||
247 | 249 | ||
248 | 250 | @Callable(i) | |
249 | 251 | func stake () = { | |
250 | - | let $ | |
251 | - | let auctionContract = $ | |
252 | - | let bondAssetId = $ | |
253 | - | let minLockAmount = $ | |
254 | - | let halfLife = $ | |
252 | + | let $t01115011229 = getParamsOrFail() | |
253 | + | let auctionContract = $t01115011229._1 | |
254 | + | let bondAssetId = $t01115011229._2 | |
255 | + | let minLockAmount = $t01115011229._3 | |
256 | + | let halfLife = $t01115011229._4 | |
255 | 257 | if ((size(i.payments) != 1)) | |
256 | 258 | then throw("Invalid payments size") | |
257 | 259 | else { | |
264 | 266 | else { | |
265 | 267 | let userAddress = i.caller | |
266 | 268 | let userAddressStr = toString(i.caller) | |
267 | - | let $ | |
268 | - | let isNewUser = $ | |
269 | - | let lockAmount = $ | |
270 | - | let lockStartHeight = $ | |
269 | + | let $t01177111878 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, -1)) | |
270 | + | let isNewUser = $t01177111878._1 | |
271 | + | let lockAmount = $t01177111878._2 | |
272 | + | let lockStartHeight = $t01177111878._3 | |
271 | 273 | let mergedAmount = if (isNewUser) | |
272 | 274 | then amount | |
273 | 275 | else (amount + lockAmount) | |
280 | 282 | if ((minLockAmount > mergedAmount)) | |
281 | 283 | then throw(("Min lock amount is " + toString(minLockAmount))) | |
282 | 284 | else { | |
283 | - | let $ | |
285 | + | let $t01232812430 = StatsResult(amount, 1, if (isNewUser) | |
284 | 286 | then 1 | |
285 | 287 | else 0) | |
286 | - | let statsEntries = $ | |
287 | - | let totalStaked = $ | |
288 | - | let totalStakedNew = $ | |
288 | + | let statsEntries = $t01232812430._1 | |
289 | + | let totalStaked = $t01232812430._2 | |
290 | + | let totalStakedNew = $t01232812430._3 | |
289 | 291 | ((([HistoryRecordEntry("stake", userAddress, i.transactionId, lockAmount, lockStartHeight, mergedAmount, mergedStartHeight)] ++ RewardEntries(isNewUser, userAddressStr, lockAmount)) ++ LockParamsEntry(userAddress, mergedAmount, mergedStartHeight)) ++ statsEntries) | |
290 | 292 | } | |
291 | 293 | } | |
300 | 302 | else { | |
301 | 303 | let userAddress = i.caller | |
302 | 304 | let userAddressStr = toString(userAddress) | |
303 | - | let $ | |
304 | - | let auctionAddress = $ | |
305 | - | let bondAssetId = $ | |
306 | - | let minLockAmount = $ | |
307 | - | let halfLife = $ | |
308 | - | let $ | |
309 | - | let isNewUser = $ | |
310 | - | let lockAmount = $ | |
311 | - | let lockStart = $ | |
305 | + | let $t01291612994 = getParamsOrFail() | |
306 | + | let auctionAddress = $t01291612994._1 | |
307 | + | let bondAssetId = $t01291612994._2 | |
308 | + | let minLockAmount = $t01291612994._3 | |
309 | + | let halfLife = $t01291612994._4 | |
310 | + | let $t01299713071 = getUserParamsOrFail(userAddress) | |
311 | + | let isNewUser = $t01299713071._1 | |
312 | + | let lockAmount = $t01299713071._2 | |
313 | + | let lockStart = $t01299713071._3 | |
312 | 314 | if ((0 >= lockAmount)) | |
313 | 315 | then throw("Nothing to unstake") | |
314 | 316 | else if ((amount > lockAmount)) | |
316 | 318 | else { | |
317 | 319 | let mathContract = addressFromStringValue(getStringOrFail(keyMathContractAddress())) | |
318 | 320 | let comissionAmount = asInt(invoke(mathContract, "getUnstakeComissionAmountREADONLY", [amount, lockStart, halfLife], nil)) | |
319 | - | let $ | |
321 | + | let $t01347213626 = StatsResult(-(amount), if ((amount == lockAmount)) | |
320 | 322 | then -1 | |
321 | 323 | else 0, if ((amount == lockAmount)) | |
322 | 324 | then -1 | |
323 | 325 | else 0) | |
324 | - | let statsEntries = $ | |
325 | - | let totalStaked = $ | |
326 | - | let totalStakedNew = $ | |
326 | + | let statsEntries = $t01347213626._1 | |
327 | + | let totalStaked = $t01347213626._2 | |
328 | + | let totalStakedNew = $t01347213626._3 | |
327 | 329 | ((([ScriptTransfer(userAddress, (amount - comissionAmount), bondAssetId), ScriptTransfer(Address(auctionAddress), comissionAmount, bondAssetId), HistoryRecordEntry("unstake", userAddress, i.transactionId, lockAmount, lockStart, (lockAmount - amount), lockStart)] ++ RewardEntries(false, userAddressStr, lockAmount)) ++ LockParamsEntry(userAddress, (lockAmount - amount), lockStart)) ++ statsEntries) | |
328 | 330 | } | |
329 | 331 | } | |
391 | 393 | if ((size(i.payments) > 0)) | |
392 | 394 | then throw("payments are not accepted") | |
393 | 395 | else { | |
394 | - | let $ | |
395 | - | let isNewUser = $ | |
396 | - | let stakedAmount = $ | |
397 | - | let stakingStart = $ | |
396 | + | let $t01588215987 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0)) | |
397 | + | let isNewUser = $t01588215987._1 | |
398 | + | let stakedAmount = $t01588215987._2 | |
399 | + | let stakingStart = $t01588215987._3 | |
398 | 400 | let stakedAmountX = toBigInt(stakedAmount) | |
399 | 401 | let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr) | |
400 | 402 | let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1) | |
401 | 403 | let depositNumLast = getIntOrElse(keyDepositNumLast(), -1) | |
402 | 404 | func forEachAssetCalcUnclaimedReward (accum,asset) = { | |
403 | - | let $ | |
404 | - | let rewardTotal = $ | |
405 | - | let cached = $ | |
406 | - | let dynamic = $ | |
407 | - | let rewardCachedPartKEY = $ | |
405 | + | let $t01635816496 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast) | |
406 | + | let rewardTotal = $t01635816496._1 | |
407 | + | let cached = $t01635816496._2 | |
408 | + | let dynamic = $t01635816496._3 | |
409 | + | let rewardCachedPartKEY = $t01635816496._4 | |
408 | 410 | let claimedKEY = keyClaimed(userAddressStr, asset) | |
409 | - | let $ | |
410 | - | let data = $ | |
411 | - | let claimedAmtByAsset = $ | |
411 | + | let $t01655616593 = accum | |
412 | + | let data = $t01655616593._1 | |
413 | + | let claimedAmtByAsset = $t01655616593._2 | |
412 | 414 | let newPart = makeString([asset, toString(rewardTotal)], ":") | |
413 | 415 | let claimedAmtByAssetNew = makeString([claimedAmtByAsset, newPart], "_") | |
414 | 416 | if ((0 >= rewardTotal)) | |
416 | 418 | else $Tuple2((((data :+ ScriptTransfer(userAddress, rewardTotal, toAssetVect(asset))) :+ IntegerEntry(claimedKEY, (valueOrElse(getInteger(claimedKEY), 0) + rewardTotal))) :+ IntegerEntry(rewardCachedPartKEY, 0)), claimedAmtByAssetNew) | |
417 | 419 | } | |
418 | 420 | ||
419 | - | let $ | |
421 | + | let $t01705317167 = { | |
420 | 422 | let $l = supportedAssetsList | |
421 | 423 | let $s = size($l) | |
422 | 424 | let $acc0 = $Tuple2(nil, "") | |
430 | 432 | ||
431 | 433 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
432 | 434 | } | |
433 | - | let transfers = $ | |
434 | - | let claimedAmtByAssetResult = $ | |
435 | + | let transfers = $t01705317167._1 | |
436 | + | let claimedAmtByAssetResult = $t01705317167._2 | |
435 | 437 | if ((0 >= size(transfers))) | |
436 | 438 | then throw("nothing to claim") | |
437 | 439 | else ((transfers :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)) :+ ClaimHistoryEntry(userAddress, i.transactionId, drop(claimedAmtByAssetResult, 1))) | |
461 | 463 | } | |
462 | 464 | else { | |
463 | 465 | let userAddress = addressFromStringValue(userAddressStr) | |
464 | - | let $ | |
465 | - | let isNewUser = $ | |
466 | - | let stakedAmount = $ | |
467 | - | let stakingStart = $ | |
466 | + | let $t01782617931 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0)) | |
467 | + | let isNewUser = $t01782617931._1 | |
468 | + | let stakedAmount = $t01782617931._2 | |
469 | + | let stakingStart = $t01782617931._3 | |
468 | 470 | let stakedAmountX = toBigInt(stakedAmount) | |
469 | 471 | let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr) | |
470 | 472 | let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1) | |
471 | 473 | let depositNumLast = getIntOrElse(keyDepositNumLast(), -1) | |
472 | 474 | func forEachAssetCalcUnclaimedReward (accum,asset) = { | |
473 | - | let $ | |
474 | - | let rewardTotal = $ | |
475 | - | let cached = $ | |
476 | - | let dynamic = $ | |
477 | - | let rewardCachedPartKEY = $ | |
475 | + | let $t01827718415 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast) | |
476 | + | let rewardTotal = $t01827718415._1 | |
477 | + | let cached = $t01827718415._2 | |
478 | + | let dynamic = $t01827718415._3 | |
479 | + | let rewardCachedPartKEY = $t01827718415._4 | |
478 | 480 | let claimed = valueOrElse(getInteger(keyClaimed(userAddressStr, asset)), 0) | |
479 | - | ((accum + makeString([asset, | |
481 | + | ((accum + makeString([asset, "10", "10"], ":")) + "_") | |
480 | 482 | } | |
481 | 483 | ||
482 | 484 | let $l = supportedAssetsList | |
504 | 506 | then $Tuple2(nil, [0, totalNsbtAmt, 0]) | |
505 | 507 | else { | |
506 | 508 | let userAddress = toAddressOrFail(userAddressStr) | |
507 | - | let $ | |
508 | - | let isNewUser = $ | |
509 | - | let userNsbtAmt = $ | |
510 | - | let stakingStart = $ | |
509 | + | let $t01898719091 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0)) | |
510 | + | let isNewUser = $t01898719091._1 | |
511 | + | let userNsbtAmt = $t01898719091._2 | |
512 | + | let stakingStart = $t01898719091._3 | |
511 | 513 | $Tuple2(nil, [userNsbtAmt, totalNsbtAmt, stakingStart]) | |
512 | 514 | } | |
513 | 515 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let revisionNum = "" | |
5 | + | ||
4 | 6 | let separator = "__" | |
5 | 7 | ||
6 | 8 | let MULT6 = 1000000 | |
7 | 9 | ||
8 | 10 | let MULT8 = 100000000 | |
9 | 11 | ||
10 | 12 | let MULTX6 = toBigInt(MULT6) | |
11 | 13 | ||
12 | 14 | let MULTX8 = toBigInt(MULT8) | |
13 | 15 | ||
14 | 16 | let MULTX18 = toBigInt(1000000000000000000) | |
15 | 17 | ||
16 | 18 | let WAVESIDSTR = "WAVES" | |
17 | 19 | ||
18 | 20 | let WAVESID = fromBase58String(WAVESIDSTR) | |
19 | 21 | ||
20 | 22 | func keyBondAsset () = "bond_asset_id" | |
21 | 23 | ||
22 | 24 | ||
23 | 25 | func keyAuctionContractAddress () = "auction_contract" | |
24 | 26 | ||
25 | 27 | ||
26 | 28 | func keyNeutrinoContractAddress () = "%s__neutrinoContractAddress" | |
27 | 29 | ||
28 | 30 | ||
29 | 31 | func keyMathContractAddress () = "%s__mathContract" | |
30 | 32 | ||
31 | 33 | ||
32 | 34 | func keyMinLockAmount () = "%s__minLockAmount" | |
33 | 35 | ||
34 | 36 | ||
35 | 37 | func keyHalfLife () = "%s__halfLife" | |
36 | 38 | ||
37 | 39 | ||
38 | 40 | func keyLockParamUserAmount (userAddress) = makeString(["%s%s%s", "paramByUser", toString(userAddress), "amount"], separator) | |
39 | 41 | ||
40 | 42 | ||
41 | 43 | func keyLockParamStartBlock (userAddress) = makeString(["%s%s%s", "paramByUser", toString(userAddress), "start"], separator) | |
42 | 44 | ||
43 | 45 | ||
44 | 46 | func keyHistoryRecord (type,userAddress,txId) = makeString(["%s%s%s%s", "history", type, toString(userAddress), toBase58String(txId)], separator) | |
45 | 47 | ||
46 | 48 | ||
47 | 49 | func keyLockParamTotalAmount () = makeString(["%s%s", "stats", "activeTotalLocked"], separator) | |
48 | 50 | ||
49 | 51 | ||
50 | 52 | func keyStatsLocksCount () = makeString(["%s%s", "stats", "locksCount"], separator) | |
51 | 53 | ||
52 | 54 | ||
53 | 55 | func keyStatsUsersCount () = makeString(["%s%s", "stats", "activeUsersCount"], separator) | |
54 | 56 | ||
55 | 57 | ||
56 | 58 | func keyNextPeriod () = "%s__nextPeriod" | |
57 | 59 | ||
58 | 60 | ||
59 | 61 | func keySupportedRewardAssets () = "supportedRewardAssets" | |
60 | 62 | ||
61 | 63 | ||
62 | 64 | func keyDepositNumLast () = makeString(["%s%s%s", "dep", "lastNum"], separator) | |
63 | 65 | ||
64 | 66 | ||
65 | 67 | func keyUserRewardFromDepositNum (userAddress) = makeString(["%s%s%s", "userRwdFromDepNum", userAddress], separator) | |
66 | 68 | ||
67 | 69 | ||
68 | 70 | func keyRewardPerNsbtSumAt (depositNum,tkn) = makeString(["%s%d", "rwdPerNsbtSumByDepNum", toString(depositNum), tkn], separator) | |
69 | 71 | ||
70 | 72 | ||
71 | 73 | func keyReward (userAddress,tkn) = makeString(["%s%s%s", "rwd", userAddress, tkn], separator) | |
72 | 74 | ||
73 | 75 | ||
74 | 76 | func keyClaimed (userAddress,tkn) = makeString(["%s%s%s", "clm", userAddress, tkn], separator) | |
75 | 77 | ||
76 | 78 | ||
77 | 79 | func keyNotDistributedReward (tkn) = makeString(["%s%s", "notDistributed", tkn], separator) | |
78 | 80 | ||
79 | 81 | ||
80 | 82 | func toX18 (origVal,origMult) = fraction(toBigInt(origVal), MULTX18, origMult) | |
81 | 83 | ||
82 | 84 | ||
83 | 85 | func getIntOrZero (key) = valueOrElse(getInteger(this, key), 0) | |
84 | 86 | ||
85 | 87 | ||
86 | 88 | func getIntOrElse (key,defaultVal) = valueOrElse(getInteger(this, key), defaultVal) | |
87 | 89 | ||
88 | 90 | ||
89 | 91 | func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), (("Mandatory this." + key) + " is not defined")) | |
90 | 92 | ||
91 | 93 | ||
92 | 94 | func getStrOrElse (key,defaultVal) = valueOrElse(getString(this, key), defaultVal) | |
93 | 95 | ||
94 | 96 | ||
95 | 97 | func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (("Mandatory this." + key) + " is not defined")) | |
96 | 98 | ||
97 | 99 | ||
98 | 100 | func toAddressOrFail (addressStr) = valueOrErrorMessage(addressFromString(addressStr), ("couldn't parse passed addressStr=" + addressStr)) | |
99 | 101 | ||
100 | 102 | ||
101 | 103 | func toAssetVect (assetStr) = if ((assetStr == WAVESIDSTR)) | |
102 | 104 | then unit | |
103 | 105 | else fromBase58String(assetStr) | |
104 | 106 | ||
105 | 107 | ||
106 | 108 | func asInt (val) = match val { | |
107 | 109 | case valInt: Int => | |
108 | 110 | valInt | |
109 | 111 | case _ => | |
110 | 112 | throw("fail to cast into Int") | |
111 | 113 | } | |
112 | 114 | ||
113 | 115 | ||
114 | 116 | func formatHistoryRecord (oldAmount,oldStart,newAmount,newStart) = makeString(["%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(oldAmount), toString(oldStart), toString(newAmount), toString(newStart)], separator) | |
115 | 117 | ||
116 | 118 | ||
117 | 119 | func formatClaimHistoryRecord (user,claimedRewards) = makeString(["%s%d%d%s", user, toString(lastBlock.height), toString(lastBlock.timestamp), claimedRewards], separator) | |
118 | 120 | ||
119 | 121 | ||
120 | 122 | func HistoryRecordEntry (type,userAddress,txId,oldAmount,oldStart,newAmount,newStart) = StringEntry(keyHistoryRecord(type, userAddress, txId), formatHistoryRecord(oldAmount, oldStart, newAmount, newStart)) | |
121 | 123 | ||
122 | 124 | ||
123 | 125 | func ClaimHistoryEntry (userAddress,txId,claimedRewards) = StringEntry(keyHistoryRecord("claim", userAddress, txId), formatClaimHistoryRecord(toString(userAddress), claimedRewards)) | |
124 | 126 | ||
125 | 127 | ||
126 | 128 | func StatsResult (totalLockedInc,lockCountInc,usersCountInc) = { | |
127 | 129 | let locksCount = getIntOrZero(keyStatsLocksCount()) | |
128 | 130 | let usersCount = getIntOrZero(keyStatsUsersCount()) | |
129 | 131 | let totalAmount = getIntOrZero(keyLockParamTotalAmount()) | |
130 | 132 | let totalAmountNew = (totalAmount + totalLockedInc) | |
131 | 133 | $Tuple3([IntegerEntry(keyStatsLocksCount(), (locksCount + lockCountInc)), IntegerEntry(keyStatsUsersCount(), (usersCount + usersCountInc)), IntegerEntry(keyLockParamTotalAmount(), totalAmountNew)], totalAmount, totalAmountNew) | |
132 | 134 | } | |
133 | 135 | ||
134 | 136 | ||
135 | 137 | func LockParamsEntry (userAddress,amount,start) = [IntegerEntry(keyLockParamUserAmount(userAddress), amount), IntegerEntry(keyLockParamStartBlock(userAddress), start)] | |
136 | 138 | ||
137 | 139 | ||
138 | 140 | func getParamsOrFail () = { | |
139 | 141 | let neutrinoContract = addressFromStringValue(getStringOrFail(keyNeutrinoContractAddress())) | |
140 | 142 | $Tuple4(fromBase58String(getStringValue(neutrinoContract, keyAuctionContractAddress())), fromBase58String(getStringValue(neutrinoContract, keyBondAsset())), getIntOrFail(keyMinLockAmount()), getIntOrFail(keyHalfLife())) | |
141 | 143 | } | |
142 | 144 | ||
143 | 145 | ||
144 | 146 | func isActiveUser (userAddress) = (getIntOrElse(keyLockParamUserAmount(userAddress), 0) > 0) | |
145 | 147 | ||
146 | 148 | ||
147 | 149 | func getUserParamsOrUnit (userAddress) = if (isActiveUser(userAddress)) | |
148 | 150 | then $Tuple3(false, getIntOrFail(keyLockParamUserAmount(userAddress)), getIntOrFail(keyLockParamStartBlock(userAddress))) | |
149 | 151 | else unit | |
150 | 152 | ||
151 | 153 | ||
152 | 154 | func getUserParamsOrFail (userAddress) = valueOrErrorMessage(getUserParamsOrUnit(userAddress), (("User " + toString(userAddress)) + " is not defined")) | |
153 | 155 | ||
154 | 156 | ||
155 | 157 | let supportedAssetsStr = getStrOrElse(keySupportedRewardAssets(), "") | |
156 | 158 | ||
157 | 159 | let supportedAssetsList = split(supportedAssetsStr, "_") | |
158 | 160 | ||
159 | 161 | func calcReward (userAddress,assetId,stakedAmountX,depositNumUser,depositNumLast) = { | |
160 | 162 | let rewardPerNsbtSumLastKEY = keyRewardPerNsbtSumAt(depositNumLast, assetId) | |
161 | 163 | let sumLastX18 = parseBigIntValue(getStrOrElse(keyRewardPerNsbtSumAt(depositNumLast, assetId), "0")) | |
162 | 164 | let sumUserX18 = parseBigIntValue(getStrOrElse(keyRewardPerNsbtSumAt(depositNumUser, assetId), "0")) | |
163 | 165 | let rewardDynamicPart = toInt(fraction((sumLastX18 - sumUserX18), stakedAmountX, MULTX18)) | |
164 | 166 | let rewardCachedPartKEY = keyReward(userAddress, assetId) | |
165 | 167 | let rewardCachedPart = getIntOrElse(rewardCachedPartKEY, 0) | |
166 | 168 | $Tuple4((rewardCachedPart + rewardDynamicPart), rewardCachedPart, rewardDynamicPart, rewardCachedPartKEY) | |
167 | 169 | } | |
168 | 170 | ||
169 | 171 | ||
170 | 172 | func RewardEntries (isNewUser,userAddress,stakedAmount) = { | |
171 | 173 | let stakedAmountX = toBigInt(stakedAmount) | |
172 | 174 | let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddress) | |
173 | 175 | let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1) | |
174 | 176 | let depositNumLast = getIntOrElse(keyDepositNumLast(), -1) | |
175 | 177 | func forEachAssetCacheUserReward (accum,asset) = { | |
176 | - | let $ | |
177 | - | let rewardTotal = $ | |
178 | - | let cached = $ | |
179 | - | let dynamic = $ | |
180 | - | let rewardCachedPartKEY = $ | |
178 | + | let $t073617496 = calcReward(userAddress, asset, stakedAmountX, depositNumUser, depositNumLast) | |
179 | + | let rewardTotal = $t073617496._1 | |
180 | + | let cached = $t073617496._2 | |
181 | + | let dynamic = $t073617496._3 | |
182 | + | let rewardCachedPartKEY = $t073617496._4 | |
181 | 183 | (accum :+ IntegerEntry(rewardCachedPartKEY, rewardTotal)) | |
182 | 184 | } | |
183 | 185 | ||
184 | 186 | if (if ((depositNumLast == -1)) | |
185 | 187 | then (depositNumUser == -1) | |
186 | 188 | else false) | |
187 | 189 | then nil | |
188 | 190 | else if (if ((depositNumLast == -1)) | |
189 | 191 | then (depositNumUser > -1) | |
190 | 192 | else false) | |
191 | 193 | then throw("invalid depositNumLast and depositNumUser state") | |
192 | 194 | else if (if ((depositNumLast > -1)) | |
193 | 195 | then (depositNumUser == -1) | |
194 | 196 | else false) | |
195 | 197 | then if (isNewUser) | |
196 | 198 | then [IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)] | |
197 | 199 | else ({ | |
198 | 200 | let $l = supportedAssetsList | |
199 | 201 | let $s = size($l) | |
200 | 202 | let $acc0 = nil | |
201 | 203 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
202 | 204 | then $a | |
203 | 205 | else forEachAssetCacheUserReward($a, $l[$i]) | |
204 | 206 | ||
205 | 207 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
206 | 208 | then $a | |
207 | 209 | else throw("List size exceeds 10") | |
208 | 210 | ||
209 | 211 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
210 | 212 | } :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)) | |
211 | 213 | else if (if ((depositNumLast > -1)) | |
212 | 214 | then (depositNumUser > -1) | |
213 | 215 | else false) | |
214 | 216 | then if (isNewUser) | |
215 | 217 | then [IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)] | |
216 | 218 | else ({ | |
217 | 219 | let $l = supportedAssetsList | |
218 | 220 | let $s = size($l) | |
219 | 221 | let $acc0 = nil | |
220 | 222 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
221 | 223 | then $a | |
222 | 224 | else forEachAssetCacheUserReward($a, $l[$i]) | |
223 | 225 | ||
224 | 226 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
225 | 227 | then $a | |
226 | 228 | else throw("List size exceeds 10") | |
227 | 229 | ||
228 | 230 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
229 | 231 | } :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)) | |
230 | 232 | else throw(((("uncovered condition: depositNumLast=" + toString(depositNumLast)) + " depositNumUser=") + toString(depositNumUser))) | |
231 | 233 | } | |
232 | 234 | ||
233 | 235 | ||
234 | 236 | func IncrementNotDistributedRewardEntry (tkn,amountInc) = { | |
235 | 237 | let notDistributedRewardKEY = keyNotDistributedReward(tkn) | |
236 | 238 | let notDistributedReward = getIntOrElse(notDistributedRewardKEY, 0) | |
237 | 239 | [IntegerEntry(notDistributedRewardKEY, (notDistributedReward + amountInc))] | |
238 | 240 | } | |
239 | 241 | ||
240 | 242 | ||
241 | 243 | @Callable(i) | |
242 | 244 | func constructor (neutrinoContractAddress,mathContractAddress,minLockAmount,halfLife,supportedRewardAssets) = if ((i.caller != this)) | |
243 | 245 | then throw("Permission denied") | |
244 | 246 | else [StringEntry(keyNeutrinoContractAddress(), neutrinoContractAddress), StringEntry(keyMathContractAddress(), mathContractAddress), IntegerEntry(keyMinLockAmount(), minLockAmount), IntegerEntry(keyHalfLife(), halfLife), StringEntry(keySupportedRewardAssets(), supportedRewardAssets)] | |
245 | 247 | ||
246 | 248 | ||
247 | 249 | ||
248 | 250 | @Callable(i) | |
249 | 251 | func stake () = { | |
250 | - | let $ | |
251 | - | let auctionContract = $ | |
252 | - | let bondAssetId = $ | |
253 | - | let minLockAmount = $ | |
254 | - | let halfLife = $ | |
252 | + | let $t01115011229 = getParamsOrFail() | |
253 | + | let auctionContract = $t01115011229._1 | |
254 | + | let bondAssetId = $t01115011229._2 | |
255 | + | let minLockAmount = $t01115011229._3 | |
256 | + | let halfLife = $t01115011229._4 | |
255 | 257 | if ((size(i.payments) != 1)) | |
256 | 258 | then throw("Invalid payments size") | |
257 | 259 | else { | |
258 | 260 | let payment = i.payments[0] | |
259 | 261 | let amount = payment.amount | |
260 | 262 | let invalidAssetMessage = (("Invalid asset. " + toBase58String(bondAssetId)) + " is expected") | |
261 | 263 | let assetId = valueOrErrorMessage(payment.assetId, invalidAssetMessage) | |
262 | 264 | if ((assetId != bondAssetId)) | |
263 | 265 | then throw(invalidAssetMessage) | |
264 | 266 | else { | |
265 | 267 | let userAddress = i.caller | |
266 | 268 | let userAddressStr = toString(i.caller) | |
267 | - | let $ | |
268 | - | let isNewUser = $ | |
269 | - | let lockAmount = $ | |
270 | - | let lockStartHeight = $ | |
269 | + | let $t01177111878 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, -1)) | |
270 | + | let isNewUser = $t01177111878._1 | |
271 | + | let lockAmount = $t01177111878._2 | |
272 | + | let lockStartHeight = $t01177111878._3 | |
271 | 273 | let mergedAmount = if (isNewUser) | |
272 | 274 | then amount | |
273 | 275 | else (amount + lockAmount) | |
274 | 276 | let mergedStartHeight = if (isNewUser) | |
275 | 277 | then height | |
276 | 278 | else { | |
277 | 279 | let mathContract = addressFromStringValue(getStringOrFail(keyMathContractAddress())) | |
278 | 280 | asInt(invoke(mathContract, "mergeStakesREADONLY", [amount, height, lockAmount, lockStartHeight, halfLife], nil)) | |
279 | 281 | } | |
280 | 282 | if ((minLockAmount > mergedAmount)) | |
281 | 283 | then throw(("Min lock amount is " + toString(minLockAmount))) | |
282 | 284 | else { | |
283 | - | let $ | |
285 | + | let $t01232812430 = StatsResult(amount, 1, if (isNewUser) | |
284 | 286 | then 1 | |
285 | 287 | else 0) | |
286 | - | let statsEntries = $ | |
287 | - | let totalStaked = $ | |
288 | - | let totalStakedNew = $ | |
288 | + | let statsEntries = $t01232812430._1 | |
289 | + | let totalStaked = $t01232812430._2 | |
290 | + | let totalStakedNew = $t01232812430._3 | |
289 | 291 | ((([HistoryRecordEntry("stake", userAddress, i.transactionId, lockAmount, lockStartHeight, mergedAmount, mergedStartHeight)] ++ RewardEntries(isNewUser, userAddressStr, lockAmount)) ++ LockParamsEntry(userAddress, mergedAmount, mergedStartHeight)) ++ statsEntries) | |
290 | 292 | } | |
291 | 293 | } | |
292 | 294 | } | |
293 | 295 | } | |
294 | 296 | ||
295 | 297 | ||
296 | 298 | ||
297 | 299 | @Callable(i) | |
298 | 300 | func unstake (amount) = if ((size(i.payments) != 0)) | |
299 | 301 | then throw("unstake doesn't require any payment") | |
300 | 302 | else { | |
301 | 303 | let userAddress = i.caller | |
302 | 304 | let userAddressStr = toString(userAddress) | |
303 | - | let $ | |
304 | - | let auctionAddress = $ | |
305 | - | let bondAssetId = $ | |
306 | - | let minLockAmount = $ | |
307 | - | let halfLife = $ | |
308 | - | let $ | |
309 | - | let isNewUser = $ | |
310 | - | let lockAmount = $ | |
311 | - | let lockStart = $ | |
305 | + | let $t01291612994 = getParamsOrFail() | |
306 | + | let auctionAddress = $t01291612994._1 | |
307 | + | let bondAssetId = $t01291612994._2 | |
308 | + | let minLockAmount = $t01291612994._3 | |
309 | + | let halfLife = $t01291612994._4 | |
310 | + | let $t01299713071 = getUserParamsOrFail(userAddress) | |
311 | + | let isNewUser = $t01299713071._1 | |
312 | + | let lockAmount = $t01299713071._2 | |
313 | + | let lockStart = $t01299713071._3 | |
312 | 314 | if ((0 >= lockAmount)) | |
313 | 315 | then throw("Nothing to unstake") | |
314 | 316 | else if ((amount > lockAmount)) | |
315 | 317 | then throw(((("Requested " + toString(amount)) + ", but staked only ") + toString(lockAmount))) | |
316 | 318 | else { | |
317 | 319 | let mathContract = addressFromStringValue(getStringOrFail(keyMathContractAddress())) | |
318 | 320 | let comissionAmount = asInt(invoke(mathContract, "getUnstakeComissionAmountREADONLY", [amount, lockStart, halfLife], nil)) | |
319 | - | let $ | |
321 | + | let $t01347213626 = StatsResult(-(amount), if ((amount == lockAmount)) | |
320 | 322 | then -1 | |
321 | 323 | else 0, if ((amount == lockAmount)) | |
322 | 324 | then -1 | |
323 | 325 | else 0) | |
324 | - | let statsEntries = $ | |
325 | - | let totalStaked = $ | |
326 | - | let totalStakedNew = $ | |
326 | + | let statsEntries = $t01347213626._1 | |
327 | + | let totalStaked = $t01347213626._2 | |
328 | + | let totalStakedNew = $t01347213626._3 | |
327 | 329 | ((([ScriptTransfer(userAddress, (amount - comissionAmount), bondAssetId), ScriptTransfer(Address(auctionAddress), comissionAmount, bondAssetId), HistoryRecordEntry("unstake", userAddress, i.transactionId, lockAmount, lockStart, (lockAmount - amount), lockStart)] ++ RewardEntries(false, userAddressStr, lockAmount)) ++ LockParamsEntry(userAddress, (lockAmount - amount), lockStart)) ++ statsEntries) | |
328 | 330 | } | |
329 | 331 | } | |
330 | 332 | ||
331 | 333 | ||
332 | 334 | ||
333 | 335 | @Callable(i) | |
334 | 336 | func deposit () = if ((size(i.payments) != 1)) | |
335 | 337 | then throw("exact 1 payment is allowed only") | |
336 | 338 | else { | |
337 | 339 | let pmt = i.payments[0] | |
338 | 340 | let amount = pmt.amount | |
339 | 341 | let pmtAssetId = valueOrElse(pmt.assetId, WAVESID) | |
340 | 342 | let pmtAssetIdStr = toBase58String(pmtAssetId) | |
341 | 343 | let pmtMultX = if ((pmtAssetId == WAVESID)) | |
342 | 344 | then MULTX8 | |
343 | 345 | else MULTX6 | |
344 | 346 | let amountX = toBigInt(amount) | |
345 | 347 | let totalStaked = getIntOrElse(keyLockParamTotalAmount(), 0) | |
346 | 348 | let totalStakedX = toBigInt(totalStaked) | |
347 | 349 | if ((0 > totalStaked)) | |
348 | 350 | then throw("TODO: case is not supported") | |
349 | 351 | else if ((totalStaked == 0)) | |
350 | 352 | then IncrementNotDistributedRewardEntry(pmtAssetIdStr, amount) | |
351 | 353 | else { | |
352 | 354 | let rewardPerNsbtX18 = fraction(amountX, MULTX18, totalStakedX) | |
353 | 355 | let depositNumLastKEY = keyDepositNumLast() | |
354 | 356 | let depositNumLast = getIntOrElse(depositNumLastKEY, -1) | |
355 | 357 | let depositNumNew = (depositNumLast + 1) | |
356 | 358 | if (!(contains(supportedAssetsStr, pmtAssetIdStr))) | |
357 | 359 | then throw(((supportedAssetsStr + " doesn't contain ") + pmtAssetIdStr)) | |
358 | 360 | else { | |
359 | 361 | func refreshRewardPerNsbtSUM (accum,nextAsset) = { | |
360 | 362 | let rewardPerNsbtSumNewKEY = keyRewardPerNsbtSumAt(depositNumNew, nextAsset) | |
361 | 363 | let sumLastStr = getStrOrElse(keyRewardPerNsbtSumAt(depositNumLast, nextAsset), "0") | |
362 | 364 | (accum :+ (if ((nextAsset == pmtAssetIdStr)) | |
363 | 365 | then StringEntry(rewardPerNsbtSumNewKEY, toString((parseBigIntValue(sumLastStr) + rewardPerNsbtX18))) | |
364 | 366 | else StringEntry(rewardPerNsbtSumNewKEY, sumLastStr))) | |
365 | 367 | } | |
366 | 368 | ||
367 | 369 | ({ | |
368 | 370 | let $l = supportedAssetsList | |
369 | 371 | let $s = size($l) | |
370 | 372 | let $acc0 = nil | |
371 | 373 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
372 | 374 | then $a | |
373 | 375 | else refreshRewardPerNsbtSUM($a, $l[$i]) | |
374 | 376 | ||
375 | 377 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
376 | 378 | then $a | |
377 | 379 | else throw("List size exceeds 10") | |
378 | 380 | ||
379 | 381 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
380 | 382 | } :+ IntegerEntry(depositNumLastKEY, depositNumNew)) | |
381 | 383 | } | |
382 | 384 | } | |
383 | 385 | } | |
384 | 386 | ||
385 | 387 | ||
386 | 388 | ||
387 | 389 | @Callable(i) | |
388 | 390 | func claimRewards () = { | |
389 | 391 | let userAddress = i.caller | |
390 | 392 | let userAddressStr = toString(userAddress) | |
391 | 393 | if ((size(i.payments) > 0)) | |
392 | 394 | then throw("payments are not accepted") | |
393 | 395 | else { | |
394 | - | let $ | |
395 | - | let isNewUser = $ | |
396 | - | let stakedAmount = $ | |
397 | - | let stakingStart = $ | |
396 | + | let $t01588215987 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0)) | |
397 | + | let isNewUser = $t01588215987._1 | |
398 | + | let stakedAmount = $t01588215987._2 | |
399 | + | let stakingStart = $t01588215987._3 | |
398 | 400 | let stakedAmountX = toBigInt(stakedAmount) | |
399 | 401 | let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr) | |
400 | 402 | let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1) | |
401 | 403 | let depositNumLast = getIntOrElse(keyDepositNumLast(), -1) | |
402 | 404 | func forEachAssetCalcUnclaimedReward (accum,asset) = { | |
403 | - | let $ | |
404 | - | let rewardTotal = $ | |
405 | - | let cached = $ | |
406 | - | let dynamic = $ | |
407 | - | let rewardCachedPartKEY = $ | |
405 | + | let $t01635816496 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast) | |
406 | + | let rewardTotal = $t01635816496._1 | |
407 | + | let cached = $t01635816496._2 | |
408 | + | let dynamic = $t01635816496._3 | |
409 | + | let rewardCachedPartKEY = $t01635816496._4 | |
408 | 410 | let claimedKEY = keyClaimed(userAddressStr, asset) | |
409 | - | let $ | |
410 | - | let data = $ | |
411 | - | let claimedAmtByAsset = $ | |
411 | + | let $t01655616593 = accum | |
412 | + | let data = $t01655616593._1 | |
413 | + | let claimedAmtByAsset = $t01655616593._2 | |
412 | 414 | let newPart = makeString([asset, toString(rewardTotal)], ":") | |
413 | 415 | let claimedAmtByAssetNew = makeString([claimedAmtByAsset, newPart], "_") | |
414 | 416 | if ((0 >= rewardTotal)) | |
415 | 417 | then $Tuple2(data, claimedAmtByAssetNew) | |
416 | 418 | else $Tuple2((((data :+ ScriptTransfer(userAddress, rewardTotal, toAssetVect(asset))) :+ IntegerEntry(claimedKEY, (valueOrElse(getInteger(claimedKEY), 0) + rewardTotal))) :+ IntegerEntry(rewardCachedPartKEY, 0)), claimedAmtByAssetNew) | |
417 | 419 | } | |
418 | 420 | ||
419 | - | let $ | |
421 | + | let $t01705317167 = { | |
420 | 422 | let $l = supportedAssetsList | |
421 | 423 | let $s = size($l) | |
422 | 424 | let $acc0 = $Tuple2(nil, "") | |
423 | 425 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
424 | 426 | then $a | |
425 | 427 | else forEachAssetCalcUnclaimedReward($a, $l[$i]) | |
426 | 428 | ||
427 | 429 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
428 | 430 | then $a | |
429 | 431 | else throw("List size exceeds 10") | |
430 | 432 | ||
431 | 433 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
432 | 434 | } | |
433 | - | let transfers = $ | |
434 | - | let claimedAmtByAssetResult = $ | |
435 | + | let transfers = $t01705317167._1 | |
436 | + | let claimedAmtByAssetResult = $t01705317167._2 | |
435 | 437 | if ((0 >= size(transfers))) | |
436 | 438 | then throw("nothing to claim") | |
437 | 439 | else ((transfers :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)) :+ ClaimHistoryEntry(userAddress, i.transactionId, drop(claimedAmtByAssetResult, 1))) | |
438 | 440 | } | |
439 | 441 | } | |
440 | 442 | ||
441 | 443 | ||
442 | 444 | ||
443 | 445 | @Callable(i) | |
444 | 446 | func unclaimedRewardsREADONLY (userAddressStr) = { | |
445 | 447 | func forEachAssetZeroReward (accum,asset) = ((accum + makeString([asset, "0", "0"], ":")) + "_") | |
446 | 448 | ||
447 | 449 | let unclaimedRewardStr = if ((userAddressStr == "")) | |
448 | 450 | then { | |
449 | 451 | let $l = supportedAssetsList | |
450 | 452 | let $s = size($l) | |
451 | 453 | let $acc0 = "" | |
452 | 454 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
453 | 455 | then $a | |
454 | 456 | else forEachAssetZeroReward($a, $l[$i]) | |
455 | 457 | ||
456 | 458 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
457 | 459 | then $a | |
458 | 460 | else throw("List size exceeds 10") | |
459 | 461 | ||
460 | 462 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
461 | 463 | } | |
462 | 464 | else { | |
463 | 465 | let userAddress = addressFromStringValue(userAddressStr) | |
464 | - | let $ | |
465 | - | let isNewUser = $ | |
466 | - | let stakedAmount = $ | |
467 | - | let stakingStart = $ | |
466 | + | let $t01782617931 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0)) | |
467 | + | let isNewUser = $t01782617931._1 | |
468 | + | let stakedAmount = $t01782617931._2 | |
469 | + | let stakingStart = $t01782617931._3 | |
468 | 470 | let stakedAmountX = toBigInt(stakedAmount) | |
469 | 471 | let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr) | |
470 | 472 | let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1) | |
471 | 473 | let depositNumLast = getIntOrElse(keyDepositNumLast(), -1) | |
472 | 474 | func forEachAssetCalcUnclaimedReward (accum,asset) = { | |
473 | - | let $ | |
474 | - | let rewardTotal = $ | |
475 | - | let cached = $ | |
476 | - | let dynamic = $ | |
477 | - | let rewardCachedPartKEY = $ | |
475 | + | let $t01827718415 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast) | |
476 | + | let rewardTotal = $t01827718415._1 | |
477 | + | let cached = $t01827718415._2 | |
478 | + | let dynamic = $t01827718415._3 | |
479 | + | let rewardCachedPartKEY = $t01827718415._4 | |
478 | 480 | let claimed = valueOrElse(getInteger(keyClaimed(userAddressStr, asset)), 0) | |
479 | - | ((accum + makeString([asset, | |
481 | + | ((accum + makeString([asset, "10", "10"], ":")) + "_") | |
480 | 482 | } | |
481 | 483 | ||
482 | 484 | let $l = supportedAssetsList | |
483 | 485 | let $s = size($l) | |
484 | 486 | let $acc0 = "" | |
485 | 487 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
486 | 488 | then $a | |
487 | 489 | else forEachAssetCalcUnclaimedReward($a, $l[$i]) | |
488 | 490 | ||
489 | 491 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
490 | 492 | then $a | |
491 | 493 | else throw("List size exceeds 10") | |
492 | 494 | ||
493 | 495 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
494 | 496 | } | |
495 | 497 | $Tuple2(nil, dropRight(unclaimedRewardStr, 1)) | |
496 | 498 | } | |
497 | 499 | ||
498 | 500 | ||
499 | 501 | ||
500 | 502 | @Callable(i) | |
501 | 503 | func nsbtStakingSYSREADONLY (userAddressStr) = { | |
502 | 504 | let totalNsbtAmt = getIntOrElse(keyLockParamTotalAmount(), 0) | |
503 | 505 | if ((userAddressStr == "")) | |
504 | 506 | then $Tuple2(nil, [0, totalNsbtAmt, 0]) | |
505 | 507 | else { | |
506 | 508 | let userAddress = toAddressOrFail(userAddressStr) | |
507 | - | let $ | |
508 | - | let isNewUser = $ | |
509 | - | let userNsbtAmt = $ | |
510 | - | let stakingStart = $ | |
509 | + | let $t01898719091 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0)) | |
510 | + | let isNewUser = $t01898719091._1 | |
511 | + | let userNsbtAmt = $t01898719091._2 | |
512 | + | let stakingStart = $t01898719091._3 | |
511 | 513 | $Tuple2(nil, [userNsbtAmt, totalNsbtAmt, stakingStart]) | |
512 | 514 | } | |
513 | 515 | } | |
514 | 516 | ||
515 | 517 |
github/deemru/w8io/169f3d6 89.70 ms ◑