tx · 295jyYfSD5FqVAecBXQbuLR7xsT5M9YLR34GvwjYCkfH

3N5yarEiTQccnnuerogYT3BxM5Zc5bRgDZy:  -0.04000000 Waves

2022.08.23 14:58 [2197101] smart account 3N5yarEiTQccnnuerogYT3BxM5Zc5bRgDZy > SELF 0.00000000 Waves

{ "type": 13, "id": "295jyYfSD5FqVAecBXQbuLR7xsT5M9YLR34GvwjYCkfH", "fee": 4000000, "feeAssetId": null, "timestamp": 1661256050692, "version": 1, "sender": "3N5yarEiTQccnnuerogYT3BxM5Zc5bRgDZy", "senderPublicKey": "FK9j3YFWVChXKESTn33fMZz1JseCNMMqHhfB7smxJo4e", "proofs": [ "387Qfewg4t1ARejKyGSWzbG4bh7qSkFSDrQ29C3TYiSnkENGqPxoFKMAxKF63hHyBGwFbju1mAm3cVrHmJ2LaLMS" ], "script": "base64:BgIqCAISBQoDAQgIEgASABIDCgEBEgASABIAEgMKAQgSBAoCCAESAwoBARIAUAAJc2VwYXJhdG9yAgJfXwADU0VQAgJfXwAFTVVMVDYAwIQ9AAVNVUxUOACAwtcvAAZNVUxUWDYJALYCAQUFTVVMVDYABk1VTFRYOAkAtgIBBQVNVUxUOAAHTVVMVFgxOAkAtgIBAICAkLu61q3wDQAKV0FWRVNJRFNUUgIFV0FWRVMAB1dBVkVTSUQJANkEAQUKV0FWRVNJRFNUUgAZSWR4Q29udHJvbENmZ05ldXRyaW5vRGFwcAABABhJZHhDb250cm9sQ2ZnQXVjdGlvbkRhcHAAAgAUSWR4Q29udHJvbENmZ1JwZERhcHAAAwAVSWR4Q29udHJvbENmZ01hdGhEYXBwAAQAHElkeENvbnRyb2xDZmdMaXF1aWRhdGlvbkRhcHAABQAVSWR4Q29udHJvbENmZ1Jlc3REYXBwAAYAHUlkeENvbnRyb2xDZmdOb2RlUmVnaXN0cnlEYXBwAAcAHElkeENvbnRyb2xDZmdOc2J0U3Rha2luZ0RhcHAACAAZSWR4Q29udHJvbENmZ01lZGlhdG9yRGFwcAAJABxJZHh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RYCQC2AgEFDHN0YWtlZEFtb3VudAQbdXNlclJld2FyZEZyb21EZXBvc2l0TnVtS0VZCQEba2V5VXNlclJld2FyZEZyb21EZXBvc2l0TnVtAQULdXNlckFkZHJlc3MEDmRlcG9zaXROdW1Vc2VyCQEMZ2V0SW50T3JFbHNlAgUbdXNlclJld2FyZEZyb21EZXBvc2l0TnVtS0VZAP///////////wEEDmRlcG9zaXROdW1MYXN0CQEMZ2V0SW50T3JFbHNlAgkBEWtleURlcG9zaXROdW1MYXN0AAD///////////8BCgEbZm9yRWFjaEFzc2V0Q2FjaGVVc2VyUmV3YXJkAgVhY2N1bQVhc3NldAQLJHQwODk1MjkwODcJAQpjYWxjUmV3YXJkBQULdXNlckFkZHJlc3MFBWFzc2V0BQ1zdGFrZWRBbW91bnRYBQ5kZXBvc2l0TnVtVXNlcgUOZGVwb3NpdE51bUxhc3QEC3Jld2FyZFRvdGFsCAULJHQwODk1MjkwODcCXzEEBmNhY2hlZAgFCyR0MDg5NTI5MDg3Al8yBAdkeW5hbWljCAULJHQwODk1MjkwODcCXzMEE3Jld2FyZENhY2hlZFBhcnRLRVkIBQskdDA4OTUyOTA4NwJfNAkAzQgCBQVhY2N1bQkBDEludGVnZXJFbnRyeQIFE3Jld2FyZENhY2hlZFBhcnRLRVkFC3Jld2FyZFRvdGFsAwMJAAACBQ5kZXBvc2l0TnVtTGFzdAD///////////8BCQAAAgUOZGVwb3NpdE51bVVzZXIA////////////AQcFA25pbAMDCQAAAgUOZGVwb3NpdE51bUxhc3QA////////////AQkAZgIFDmRlcG9zaXROdW1Vc2VyAP///////////wEHCQACAQIvaW52YWxpZCBkZXBvc2l0TnVtTGFzdCBhbmQgZGVwb3NpdE51bVVzZXIgc3RhdGUDAwkAZgIFDmRlcG9zaXROdW1MYXN0AP///////////wEJAGcCBQ5kZXBvc2l0TnVtVXNlcgD///////////8BBwMFCWlzTmV3VXNlcgkAzAgCCQEMSW50ZWdlckVudHJ5AgUbdXNlclJld2FyZEZyb21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2J0RnJvbVN1cmZTWVNSRUFET05MWQEHc3VyZkFtdAkAlAoCBQNuaWwJAQtzdXJmVG9HbnNidAEFB3N1cmZBbXQBaQERY29uZmlnU1lTUkVBRE9OTFkABAptaW5Mb2NrQW10CQERQGV4dHJOYXRpdmUoMTA1NSkBCQEQa2V5TWluTG9ja0Ftb3VudAAEIHN1cmZWb3RpbmdQb3dlclJlc3RyaWN0aXZlUGVyaW9kCQBoAgCgCwAOBBticlRvU3RhcnRTdXJmVHJhbnNmb3JtYXRpb24AsJhGCQCUCgIFA25pbAkAzAgCBQptaW5Mb2NrQW10CQDMCAIJAGgCBRJnbnNidEZyb21TdXJmQ29lZmYFBU1VTFQ2CQDMCAIFIHN1cmZWb3RpbmdQb3dlclJlc3RyaWN0aXZlUGVyaW9kCQDMCAIFG2JyVG9TdGFydFN1cmZUcmFuc2Zvcm1hdGlvbgUDbmlsAPwXMX4=", "chainId": 84, "height": 2197101, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8hraZNZWs8RcDguguFv4reGvojcGJg3AfgCgkfoMqnoR Next: 4baeR1NLQcGbhAvGVafwveABprDax3iCKbAwMLFjZ8Xb Diff:
OldNewDifferences
160160
161161
162162 func asSwapParamsSTRUCT (v) = match v {
163- case struct: (Int, Int, Int, Int, Int) =>
163+ case struct: (Int, Int, Int, Int, Int, Int, Int) =>
164164 struct
165165 case _ =>
166166 throw("fail to cast into Int")
226226 let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1)
227227 let depositNumLast = getIntOrElse(keyDepositNumLast(), -1)
228228 func forEachAssetCacheUserReward (accum,asset) = {
229- let $t089429077 = calcReward(userAddress, asset, stakedAmountX, depositNumUser, depositNumLast)
230- let rewardTotal = $t089429077._1
231- let cached = $t089429077._2
232- let dynamic = $t089429077._3
233- let rewardCachedPartKEY = $t089429077._4
229+ let $t089529087 = calcReward(userAddress, asset, stakedAmountX, depositNumUser, depositNumLast)
230+ let rewardTotal = $t089529087._1
231+ let cached = $t089529087._2
232+ let dynamic = $t089529087._3
233+ let rewardCachedPartKEY = $t089529087._4
234234 (accum :+ IntegerEntry(rewardCachedPartKEY, rewardTotal))
235235 }
236236
290290
291291
292292 func mergeStake (userAddress,amountToAdd) = {
293- let $t01273012840 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
294- let isNewUser = $t01273012840._1
295- let stakedAmount = $t01273012840._2
296- let vpEffectiveHeight = $t01273012840._3
293+ let $t01274012850 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
294+ let isNewUser = $t01274012850._1
295+ let stakedAmount = $t01274012850._2
296+ let vpEffectiveHeight = $t01274012850._3
297297 let stakedAmountNEW = if (isNewUser)
298298 then amountToAdd
299299 else (amountToAdd + stakedAmount)
306306
307307
308308 func commonStake (userAddress,i) = {
309- let $t01332613380 = getParamsOrFail()
310- let stakedAssetId = $t01332613380._1
311- let minLockAmount = $t01332613380._2
309+ let $t01333613390 = getParamsOrFail()
310+ let stakedAssetId = $t01333613390._1
311+ let minLockAmount = $t01333613390._2
312312 if ((size(i.payments) != 1))
313313 then throw("Invalid payments size")
314314 else {
329329 if ((minLockAmount > stakedAmountNEW))
330330 then throw(("Min lock amount is " + toString(minLockAmount)))
331331 else {
332- let $t01417914281 = StatsResult(amount, 1, if (isNewUser)
332+ let $t01418914291 = StatsResult(amount, 1, if (isNewUser)
333333 then 1
334334 else 0)
335- let statsEntries = $t01417914281._1
336- let totalStaked = $t01417914281._2
337- let totalStakedNew = $t01417914281._3
335+ let statsEntries = $t01418914291._1
336+ let totalStaked = $t01418914291._2
337+ let totalStakedNew = $t01418914291._3
338338 ((([HistoryRecordEntry("stake", userAddress, i.transactionId, stakedAmount, vpEffectiveHeight, stakedAmountNEW, vpEffectiveHeightNEW)] ++ RewardEntries(isNewUser, userAddressStr, stakedAmount)) ++ LockParamsEntry(userAddress, stakedAmountNEW, vpEffectiveHeightNEW)) ++ statsEntries)
339339 }
340340 }
347347 if ((size(i.payments) > 0))
348348 then throw("payments are not accepted")
349349 else {
350- let $t01476014865 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
351- let isNewUser = $t01476014865._1
352- let stakedAmount = $t01476014865._2
353- let stakingStart = $t01476014865._3
350+ let $t01477014875 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
351+ let isNewUser = $t01477014875._1
352+ let stakedAmount = $t01477014875._2
353+ let stakingStart = $t01477014875._3
354354 let stakedAmountX = toBigInt(stakedAmount)
355355 let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr)
356356 let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1)
357357 let depositNumLast = getIntOrElse(keyDepositNumLast(), -1)
358358 func forEachAssetCalcUnclaimedReward (accum,asset) = {
359- let $t01523615374 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
360- let rewardTotal = $t01523615374._1
361- let cached = $t01523615374._2
362- let dynamic = $t01523615374._3
363- let rewardCachedPartKEY = $t01523615374._4
359+ let $t01524615384 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
360+ let rewardTotal = $t01524615384._1
361+ let cached = $t01524615384._2
362+ let dynamic = $t01524615384._3
363+ let rewardCachedPartKEY = $t01524615384._4
364364 let claimedKEY = keyClaimed(userAddressStr, asset)
365- let $t01543415471 = accum
366- let data = $t01543415471._1
367- let claimedAmtByAsset = $t01543415471._2
365+ let $t01544415481 = accum
366+ let data = $t01544415481._1
367+ let claimedAmtByAsset = $t01544415481._2
368368 let newPart = makeString([asset, toString(rewardTotal)], ":")
369369 let claimedAmtByAssetNew = makeString([claimedAmtByAsset, newPart], "_")
370370 if ((0 >= rewardTotal))
372372 else $Tuple2((((data :+ ScriptTransfer(userAddress, rewardTotal, toAssetVect(asset))) :+ IntegerEntry(claimedKEY, (valueOrElse(getInteger(claimedKEY), 0) + rewardTotal))) :+ IntegerEntry(rewardCachedPartKEY, 0)), claimedAmtByAssetNew)
373373 }
374374
375- let $t01593116045 = {
375+ let $t01594116055 = {
376376 let $l = supportedAssetsList
377377 let $s = size($l)
378378 let $acc0 = $Tuple2(nil, "")
386386
387387 $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)
388388 }
389- let transfers = $t01593116045._1
390- let claimedAmtByAssetResult = $t01593116045._2
389+ let transfers = $t01594116055._1
390+ let claimedAmtByAssetResult = $t01594116055._2
391391 if ((0 >= size(transfers)))
392392 then nil
393393 else ((transfers :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)) :+ ClaimHistoryEntry(userAddress, i.transactionId, drop(claimedAmtByAssetResult, 1)))
418418 else {
419419 let userAddress = i.caller
420420 let userAddressStr = toString(userAddress)
421- let $t01695417008 = getParamsOrFail()
422- let stakedAssetId = $t01695417008._1
423- let minLockAmount = $t01695417008._2
424- let $t01701117095 = getUserParamsOrFail(userAddress)
425- let isNewUser = $t01701117095._1
426- let stakedAmount = $t01701117095._2
427- let vpEffectiveHeight = $t01701117095._3
421+ let $t01696417018 = getParamsOrFail()
422+ let stakedAssetId = $t01696417018._1
423+ let minLockAmount = $t01696417018._2
424+ let $t01702117105 = getUserParamsOrFail(userAddress)
425+ let isNewUser = $t01702117105._1
426+ let stakedAmount = $t01702117105._2
427+ let vpEffectiveHeight = $t01702117105._3
428428 let swapParamsSTRUCT = asSwapParamsSTRUCT(reentrantInvoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStr, 0], nil))
429- let swapLimitMax = swapParamsSTRUCT._1
430- let swapLimitSpent = swapParamsSTRUCT._2
429+ let swapLimitSpentInUsdn = swapParamsSTRUCT._2
431430 let blcks2LmtReset = swapParamsSTRUCT._3
432- if ((swapLimitSpent > 0))
431+ if ((swapLimitSpentInUsdn > 0))
433432 then throw((("You have already made a swap operation. Wait " + toString((height + blcks2LmtReset))) + " height to unstake"))
434433 else if ((0 >= stakedAmount))
435434 then throw("Nothing to unstake")
437436 then throw(((("Requested " + toString(amount)) + ", but staked only ") + toString(stakedAmount)))
438437 else {
439438 let stakedAmountNEW = (stakedAmount - amount)
440- let $t01776517923 = StatsResult(-(amount), if ((amount == stakedAmount))
439+ let $t01774317901 = StatsResult(-(amount), if ((amount == stakedAmount))
441440 then -1
442441 else 0, if ((amount == stakedAmount))
443442 then -1
444443 else 0)
445- let statsEntries = $t01776517923._1
446- let totalStaked = $t01776517923._2
447- let totalStakedNew = $t01776517923._3
444+ let statsEntries = $t01774317901._1
445+ let totalStaked = $t01774317901._2
446+ let totalStakedNew = $t01774317901._3
448447 ((([ScriptTransfer(userAddress, amount, stakedAssetId), HistoryRecordEntry("unstake", userAddress, i.transactionId, stakedAmount, vpEffectiveHeight, stakedAmountNEW, vpEffectiveHeight)] ++ RewardEntries(false, userAddressStr, stakedAmount)) ++ LockParamsEntry(userAddress, stakedAmountNEW, vpEffectiveHeight)) ++ statsEntries)
449448 }
450449 }
536535 }
537536 else {
538537 let userAddress = addressFromStringValue(userAddressStr)
539- let $t02049720602 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
540- let isNewUser = $t02049720602._1
541- let stakedAmount = $t02049720602._2
542- let stakingStart = $t02049720602._3
538+ let $t02047520580 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
539+ let isNewUser = $t02047520580._1
540+ let stakedAmount = $t02047520580._2
541+ let stakingStart = $t02047520580._3
543542 let stakedAmountX = toBigInt(stakedAmount)
544543 let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr)
545544 let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1)
546545 let depositNumLast = getIntOrElse(keyDepositNumLast(), -1)
547546 func forEachAssetCalcUnclaimedReward (accum,asset) = {
548- let $t02094821086 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
549- let rewardTotal = $t02094821086._1
550- let cached = $t02094821086._2
551- let dynamic = $t02094821086._3
552- let rewardCachedPartKEY = $t02094821086._4
547+ let $t02092621064 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
548+ let rewardTotal = $t02092621064._1
549+ let cached = $t02092621064._2
550+ let dynamic = $t02092621064._3
551+ let rewardCachedPartKEY = $t02092621064._4
553552 let claimed = valueOrElse(getInteger(keyClaimed(userAddressStr, asset)), 0)
554553 ((accum + makeString([asset, toString(rewardTotal), toString(claimed)], ":")) + "_")
555554 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let separator = "__"
55
66 let SEP = "__"
77
88 let MULT6 = 1000000
99
1010 let MULT8 = 100000000
1111
1212 let MULTX6 = toBigInt(MULT6)
1313
1414 let MULTX8 = toBigInt(MULT8)
1515
1616 let MULTX18 = toBigInt(1000000000000000000)
1717
1818 let WAVESIDSTR = "WAVES"
1919
2020 let WAVESID = fromBase58String(WAVESIDSTR)
2121
2222 let IdxControlCfgNeutrinoDapp = 1
2323
2424 let IdxControlCfgAuctionDapp = 2
2525
2626 let IdxControlCfgRpdDapp = 3
2727
2828 let IdxControlCfgMathDapp = 4
2929
3030 let IdxControlCfgLiquidationDapp = 5
3131
3232 let IdxControlCfgRestDapp = 6
3333
3434 let IdxControlCfgNodeRegistryDapp = 7
3535
3636 let IdxControlCfgNsbtStakingDapp = 8
3737
3838 let IdxControlCfgMediatorDapp = 9
3939
4040 let IdxControlCfgSurfStakingDapp = 10
4141
4242 let IdxControlCfgGnsbtControllerDapp = 11
4343
4444 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined"))
4545
4646
4747 func keyControlAddress () = "%s%s__config__controlAddress"
4848
4949
5050 func keyControlCfg () = "%s__controlConfig"
5151
5252
5353 func keyGnsbtFromSurfCoeff () = "%s%s__cfg__gnsbtFromSurfCoeff"
5454
5555
5656 func readControlCfgOrFail (control) = split(getStringOrFail(control, keyControlCfg()), SEP)
5757
5858
5959 func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx)))
6060
6161
6262 let controlContract = addressFromStringValue(valueOrElse(getString(this, keyControlAddress()), "3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx"))
6363
6464 let controlCfg = readControlCfgOrFail(controlContract)
6565
6666 let mathContract = getContractAddressOrFail(controlCfg, IdxControlCfgMathDapp)
6767
6868 let neutrinoContract = getContractAddressOrFail(controlCfg, IdxControlCfgNeutrinoDapp)
6969
7070 let auctionContract = getContractAddressOrFail(controlCfg, IdxControlCfgAuctionDapp)
7171
7272 let gnsbtFromSurfCoeff = valueOrElse(getInteger(this, keyGnsbtFromSurfCoeff()), 300)
7373
7474 func keyBondAsset () = "bond_asset_id"
7575
7676
7777 func keyAuctionContractAddress () = "auction_contract"
7878
7979
8080 func keyMinLockAmount () = "%s__minLockAmount"
8181
8282
8383 func keyStakedAssetId () = "%s__stakedAssetId"
8484
8585
8686 func keyLockParamUserAmount (userAddress) = makeString(["%s%s%s", "paramByUser", toString(userAddress), "amount"], separator)
8787
8888
8989 func keyLockParamStartBlock (userAddress) = makeString(["%s%s%s", "paramByUser", toString(userAddress), "start"], separator)
9090
9191
9292 func keyLockParamVotingPowerEffectiveHeight (userAddress) = makeString(["%s%s%s", "paramByUser", toString(userAddress), "vpEffectiveHeight"], separator)
9393
9494
9595 func keyHistoryRecord (type,userAddress,txId) = makeString(["%s%s%s%s", "history", type, toString(userAddress), toBase58String(txId)], separator)
9696
9797
9898 func keyLockParamTotalAmount () = makeString(["%s%s", "stats", "activeTotalLocked"], separator)
9999
100100
101101 func keyStatsLocksCount () = makeString(["%s%s", "stats", "locksCount"], separator)
102102
103103
104104 func keyStatsUsersCount () = makeString(["%s%s", "stats", "activeUsersCount"], separator)
105105
106106
107107 func keyNextPeriod () = "%s__nextPeriod"
108108
109109
110110 func keySupportedRewardAssets () = "supportedRewardAssets"
111111
112112
113113 func keyDepositNumLast () = makeString(["%s%s%s", "dep", "lastNum"], separator)
114114
115115
116116 func keyUserRewardFromDepositNum (userAddress) = makeString(["%s%s%s", "userRwdFromDepNum", userAddress], separator)
117117
118118
119119 func keyRewardPerNsbtSumAt (depositNum,tkn) = makeString(["%s%d", "rwdPerNsbtSumByDepNum", toString(depositNum), tkn], separator)
120120
121121
122122 func keyReward (userAddress,tkn) = makeString(["%s%s%s", "rwd", userAddress, tkn], separator)
123123
124124
125125 func keyClaimed (userAddress,tkn) = makeString(["%s%s%s", "clm", userAddress, tkn], separator)
126126
127127
128128 func keyNotDistributedReward (tkn) = makeString(["%s%s", "notDistributed", tkn], separator)
129129
130130
131131 func toX18 (origVal,origMult) = fraction(toBigInt(origVal), MULTX18, origMult)
132132
133133
134134 func getIntOrZero (key) = valueOrElse(getInteger(this, key), 0)
135135
136136
137137 func getIntOrElse (key,defaultVal) = valueOrElse(getInteger(this, key), defaultVal)
138138
139139
140140 func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), (("Mandatory this." + key) + " is not defined"))
141141
142142
143143 func getStrOrElse (key,defaultVal) = valueOrElse(getString(this, key), defaultVal)
144144
145145
146146 func toAddressOrFail (addressStr) = valueOrErrorMessage(addressFromString(addressStr), ("couldn't parse passed addressStr=" + addressStr))
147147
148148
149149 func toAssetVect (assetStr) = if ((assetStr == WAVESIDSTR))
150150 then unit
151151 else fromBase58String(assetStr)
152152
153153
154154 func asInt (val) = match val {
155155 case valInt: Int =>
156156 valInt
157157 case _ =>
158158 throw("fail to cast into Int")
159159 }
160160
161161
162162 func asSwapParamsSTRUCT (v) = match v {
163- case struct: (Int, Int, Int, Int, Int) =>
163+ case struct: (Int, Int, Int, Int, Int, Int, Int) =>
164164 struct
165165 case _ =>
166166 throw("fail to cast into Int")
167167 }
168168
169169
170170 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)
171171
172172
173173 func formatClaimHistoryRecord (user,claimedRewards) = makeString(["%s%d%d%s", user, toString(lastBlock.height), toString(lastBlock.timestamp), claimedRewards], separator)
174174
175175
176176 func HistoryRecordEntry (type,userAddress,txId,oldAmount,oldStart,newAmount,newStart) = StringEntry(keyHistoryRecord(type, userAddress, txId), formatHistoryRecord(oldAmount, oldStart, newAmount, newStart))
177177
178178
179179 func ClaimHistoryEntry (userAddress,txId,claimedRewards) = StringEntry(keyHistoryRecord("claim", userAddress, txId), formatClaimHistoryRecord(toString(userAddress), claimedRewards))
180180
181181
182182 func StatsResult (totalLockedInc,lockCountInc,usersCountInc) = {
183183 let locksCount = getIntOrZero(keyStatsLocksCount())
184184 let usersCount = getIntOrZero(keyStatsUsersCount())
185185 let totalAmount = getIntOrZero(keyLockParamTotalAmount())
186186 let totalAmountNew = (totalAmount + totalLockedInc)
187187 $Tuple3([IntegerEntry(keyStatsLocksCount(), (locksCount + lockCountInc)), IntegerEntry(keyStatsUsersCount(), (usersCount + usersCountInc)), IntegerEntry(keyLockParamTotalAmount(), totalAmountNew)], totalAmount, totalAmountNew)
188188 }
189189
190190
191191 func LockParamsEntry (userAddress,amount,votingPowerEffectiveHeight) = [IntegerEntry(keyLockParamUserAmount(userAddress), amount), IntegerEntry(keyLockParamStartBlock(userAddress), votingPowerEffectiveHeight)]
192192
193193
194194 func getParamsOrFail () = $Tuple2(fromBase58String(getStringOrFail(this, keyStakedAssetId())), getIntOrFail(keyMinLockAmount()))
195195
196196
197197 func isActiveUser (userAddress) = (getIntOrElse(keyLockParamUserAmount(userAddress), 0) > 0)
198198
199199
200200 func getUserParamsOrUnit (userAddress) = if (isActiveUser(userAddress))
201201 then $Tuple3(false, getIntOrFail(keyLockParamUserAmount(userAddress)), getIntOrFail(keyLockParamStartBlock(userAddress)))
202202 else unit
203203
204204
205205 func getUserParamsOrFail (userAddress) = valueOrErrorMessage(getUserParamsOrUnit(userAddress), (("User " + toString(userAddress)) + " is not defined"))
206206
207207
208208 let supportedAssetsStr = getStrOrElse(keySupportedRewardAssets(), "")
209209
210210 let supportedAssetsList = split(supportedAssetsStr, "_")
211211
212212 func calcReward (userAddress,assetId,stakedAmountX,depositNumUser,depositNumLast) = {
213213 let rewardPerNsbtSumLastKEY = keyRewardPerNsbtSumAt(depositNumLast, assetId)
214214 let sumLastX18 = parseBigIntValue(getStrOrElse(keyRewardPerNsbtSumAt(depositNumLast, assetId), "0"))
215215 let sumUserX18 = parseBigIntValue(getStrOrElse(keyRewardPerNsbtSumAt(depositNumUser, assetId), "0"))
216216 let rewardDynamicPart = toInt(fraction((sumLastX18 - sumUserX18), stakedAmountX, MULTX18))
217217 let rewardCachedPartKEY = keyReward(userAddress, assetId)
218218 let rewardCachedPart = getIntOrElse(rewardCachedPartKEY, 0)
219219 $Tuple4((rewardCachedPart + rewardDynamicPart), rewardCachedPart, rewardDynamicPart, rewardCachedPartKEY)
220220 }
221221
222222
223223 func RewardEntries (isNewUser,userAddress,stakedAmount) = {
224224 let stakedAmountX = toBigInt(stakedAmount)
225225 let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddress)
226226 let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1)
227227 let depositNumLast = getIntOrElse(keyDepositNumLast(), -1)
228228 func forEachAssetCacheUserReward (accum,asset) = {
229- let $t089429077 = calcReward(userAddress, asset, stakedAmountX, depositNumUser, depositNumLast)
230- let rewardTotal = $t089429077._1
231- let cached = $t089429077._2
232- let dynamic = $t089429077._3
233- let rewardCachedPartKEY = $t089429077._4
229+ let $t089529087 = calcReward(userAddress, asset, stakedAmountX, depositNumUser, depositNumLast)
230+ let rewardTotal = $t089529087._1
231+ let cached = $t089529087._2
232+ let dynamic = $t089529087._3
233+ let rewardCachedPartKEY = $t089529087._4
234234 (accum :+ IntegerEntry(rewardCachedPartKEY, rewardTotal))
235235 }
236236
237237 if (if ((depositNumLast == -1))
238238 then (depositNumUser == -1)
239239 else false)
240240 then nil
241241 else if (if ((depositNumLast == -1))
242242 then (depositNumUser > -1)
243243 else false)
244244 then throw("invalid depositNumLast and depositNumUser state")
245245 else if (if ((depositNumLast > -1))
246246 then (depositNumUser >= -1)
247247 else false)
248248 then if (isNewUser)
249249 then [IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)]
250250 else ({
251251 let $l = supportedAssetsList
252252 let $s = size($l)
253253 let $acc0 = nil
254254 func $f0_1 ($a,$i) = if (($i >= $s))
255255 then $a
256256 else forEachAssetCacheUserReward($a, $l[$i])
257257
258258 func $f0_2 ($a,$i) = if (($i >= $s))
259259 then $a
260260 else throw("List size exceeds 10")
261261
262262 $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)
263263 } :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast))
264264 else throw(((("uncovered condition: depositNumLast=" + toString(depositNumLast)) + " depositNumUser=") + toString(depositNumUser)))
265265 }
266266
267267
268268 func IncrementNotDistributedRewardEntry (tkn,amountInc) = {
269269 let notDistributedRewardKEY = keyNotDistributedReward(tkn)
270270 let notDistributedReward = getIntOrElse(notDistributedRewardKEY, 0)
271271 [IntegerEntry(notDistributedRewardKEY, (notDistributedReward + amountInc))]
272272 }
273273
274274
275275 func surfToGnsbt (surfAmt) = (surfAmt / gnsbtFromSurfCoeff)
276276
277277
278278 func mergeVotingPowerEffectiveHeight (quarantinePeriod,vpEffectiveHeight,stakedAmt,stakedAmtNEW) = {
279279 let remainingToWait = (vpEffectiveHeight - height)
280280 if ((0 >= remainingToWait))
281281 then (height + quarantinePeriod)
282282 else {
283283 let alreadyWaited = (quarantinePeriod - remainingToWait)
284284 let kX8 = if ((stakedAmtNEW != 0))
285285 then fraction(stakedAmt, MULT8, stakedAmtNEW)
286286 else vpEffectiveHeight
287287 ((quarantinePeriod + height) - fraction(alreadyWaited, kX8, MULT8))
288288 }
289289 }
290290
291291
292292 func mergeStake (userAddress,amountToAdd) = {
293- let $t01273012840 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
294- let isNewUser = $t01273012840._1
295- let stakedAmount = $t01273012840._2
296- let vpEffectiveHeight = $t01273012840._3
293+ let $t01274012850 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
294+ let isNewUser = $t01274012850._1
295+ let stakedAmount = $t01274012850._2
296+ let vpEffectiveHeight = $t01274012850._3
297297 let stakedAmountNEW = if (isNewUser)
298298 then amountToAdd
299299 else (amountToAdd + stakedAmount)
300300 let quarantinePeriod = (1440 * 14)
301301 let vpEffectiveHeightNEW = if (isNewUser)
302302 then (quarantinePeriod + height)
303303 else mergeVotingPowerEffectiveHeight(quarantinePeriod, vpEffectiveHeight, stakedAmount, stakedAmountNEW)
304304 $Tuple5(isNewUser, stakedAmount, vpEffectiveHeight, stakedAmountNEW, vpEffectiveHeightNEW)
305305 }
306306
307307
308308 func commonStake (userAddress,i) = {
309- let $t01332613380 = getParamsOrFail()
310- let stakedAssetId = $t01332613380._1
311- let minLockAmount = $t01332613380._2
309+ let $t01333613390 = getParamsOrFail()
310+ let stakedAssetId = $t01333613390._1
311+ let minLockAmount = $t01333613390._2
312312 if ((size(i.payments) != 1))
313313 then throw("Invalid payments size")
314314 else {
315315 let payment = i.payments[0]
316316 let amount = payment.amount
317317 let invalidAssetMessage = (("Invalid asset. " + toBase58String(stakedAssetId)) + " is expected")
318318 let assetId = valueOrErrorMessage(payment.assetId, invalidAssetMessage)
319319 if ((assetId != stakedAssetId))
320320 then throw(invalidAssetMessage)
321321 else {
322322 let userAddressStr = toString(userAddress)
323323 let mergedData = mergeStake(userAddress, amount)
324324 let isNewUser = mergedData._1
325325 let stakedAmount = mergedData._2
326326 let vpEffectiveHeight = mergedData._3
327327 let stakedAmountNEW = mergedData._4
328328 let vpEffectiveHeightNEW = mergedData._5
329329 if ((minLockAmount > stakedAmountNEW))
330330 then throw(("Min lock amount is " + toString(minLockAmount)))
331331 else {
332- let $t01417914281 = StatsResult(amount, 1, if (isNewUser)
332+ let $t01418914291 = StatsResult(amount, 1, if (isNewUser)
333333 then 1
334334 else 0)
335- let statsEntries = $t01417914281._1
336- let totalStaked = $t01417914281._2
337- let totalStakedNew = $t01417914281._3
335+ let statsEntries = $t01418914291._1
336+ let totalStaked = $t01418914291._2
337+ let totalStakedNew = $t01418914291._3
338338 ((([HistoryRecordEntry("stake", userAddress, i.transactionId, stakedAmount, vpEffectiveHeight, stakedAmountNEW, vpEffectiveHeightNEW)] ++ RewardEntries(isNewUser, userAddressStr, stakedAmount)) ++ LockParamsEntry(userAddress, stakedAmountNEW, vpEffectiveHeightNEW)) ++ statsEntries)
339339 }
340340 }
341341 }
342342 }
343343
344344
345345 func commonClaim (userAddress,i) = {
346346 let userAddressStr = toString(userAddress)
347347 if ((size(i.payments) > 0))
348348 then throw("payments are not accepted")
349349 else {
350- let $t01476014865 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
351- let isNewUser = $t01476014865._1
352- let stakedAmount = $t01476014865._2
353- let stakingStart = $t01476014865._3
350+ let $t01477014875 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
351+ let isNewUser = $t01477014875._1
352+ let stakedAmount = $t01477014875._2
353+ let stakingStart = $t01477014875._3
354354 let stakedAmountX = toBigInt(stakedAmount)
355355 let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr)
356356 let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1)
357357 let depositNumLast = getIntOrElse(keyDepositNumLast(), -1)
358358 func forEachAssetCalcUnclaimedReward (accum,asset) = {
359- let $t01523615374 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
360- let rewardTotal = $t01523615374._1
361- let cached = $t01523615374._2
362- let dynamic = $t01523615374._3
363- let rewardCachedPartKEY = $t01523615374._4
359+ let $t01524615384 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
360+ let rewardTotal = $t01524615384._1
361+ let cached = $t01524615384._2
362+ let dynamic = $t01524615384._3
363+ let rewardCachedPartKEY = $t01524615384._4
364364 let claimedKEY = keyClaimed(userAddressStr, asset)
365- let $t01543415471 = accum
366- let data = $t01543415471._1
367- let claimedAmtByAsset = $t01543415471._2
365+ let $t01544415481 = accum
366+ let data = $t01544415481._1
367+ let claimedAmtByAsset = $t01544415481._2
368368 let newPart = makeString([asset, toString(rewardTotal)], ":")
369369 let claimedAmtByAssetNew = makeString([claimedAmtByAsset, newPart], "_")
370370 if ((0 >= rewardTotal))
371371 then $Tuple2(data, claimedAmtByAssetNew)
372372 else $Tuple2((((data :+ ScriptTransfer(userAddress, rewardTotal, toAssetVect(asset))) :+ IntegerEntry(claimedKEY, (valueOrElse(getInteger(claimedKEY), 0) + rewardTotal))) :+ IntegerEntry(rewardCachedPartKEY, 0)), claimedAmtByAssetNew)
373373 }
374374
375- let $t01593116045 = {
375+ let $t01594116055 = {
376376 let $l = supportedAssetsList
377377 let $s = size($l)
378378 let $acc0 = $Tuple2(nil, "")
379379 func $f0_1 ($a,$i) = if (($i >= $s))
380380 then $a
381381 else forEachAssetCalcUnclaimedReward($a, $l[$i])
382382
383383 func $f0_2 ($a,$i) = if (($i >= $s))
384384 then $a
385385 else throw("List size exceeds 10")
386386
387387 $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)
388388 }
389- let transfers = $t01593116045._1
390- let claimedAmtByAssetResult = $t01593116045._2
389+ let transfers = $t01594116055._1
390+ let claimedAmtByAssetResult = $t01594116055._2
391391 if ((0 >= size(transfers)))
392392 then nil
393393 else ((transfers :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)) :+ ClaimHistoryEntry(userAddress, i.transactionId, drop(claimedAmtByAssetResult, 1)))
394394 }
395395 }
396396
397397
398398 @Callable(i)
399399 func constructor (minLockAmount,supportedRewardAssets,stakedAssetId) = if ((i.caller != this))
400400 then throw("Permission denied")
401401 else [IntegerEntry(keyMinLockAmount(), minLockAmount), StringEntry(keySupportedRewardAssets(), supportedRewardAssets), StringEntry(keyStakedAssetId(), stakedAssetId)]
402402
403403
404404
405405 @Callable(i)
406406 func stake () = commonStake(i.caller, i)
407407
408408
409409
410410 @Callable(i)
411411 func stakeByOriginCaller () = commonStake(i.originCaller, i)
412412
413413
414414
415415 @Callable(i)
416416 func unstake (amount) = if ((size(i.payments) != 0))
417417 then throw("unstake doesn't require any payment")
418418 else {
419419 let userAddress = i.caller
420420 let userAddressStr = toString(userAddress)
421- let $t01695417008 = getParamsOrFail()
422- let stakedAssetId = $t01695417008._1
423- let minLockAmount = $t01695417008._2
424- let $t01701117095 = getUserParamsOrFail(userAddress)
425- let isNewUser = $t01701117095._1
426- let stakedAmount = $t01701117095._2
427- let vpEffectiveHeight = $t01701117095._3
421+ let $t01696417018 = getParamsOrFail()
422+ let stakedAssetId = $t01696417018._1
423+ let minLockAmount = $t01696417018._2
424+ let $t01702117105 = getUserParamsOrFail(userAddress)
425+ let isNewUser = $t01702117105._1
426+ let stakedAmount = $t01702117105._2
427+ let vpEffectiveHeight = $t01702117105._3
428428 let swapParamsSTRUCT = asSwapParamsSTRUCT(reentrantInvoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStr, 0], nil))
429- let swapLimitMax = swapParamsSTRUCT._1
430- let swapLimitSpent = swapParamsSTRUCT._2
429+ let swapLimitSpentInUsdn = swapParamsSTRUCT._2
431430 let blcks2LmtReset = swapParamsSTRUCT._3
432- if ((swapLimitSpent > 0))
431+ if ((swapLimitSpentInUsdn > 0))
433432 then throw((("You have already made a swap operation. Wait " + toString((height + blcks2LmtReset))) + " height to unstake"))
434433 else if ((0 >= stakedAmount))
435434 then throw("Nothing to unstake")
436435 else if ((amount > stakedAmount))
437436 then throw(((("Requested " + toString(amount)) + ", but staked only ") + toString(stakedAmount)))
438437 else {
439438 let stakedAmountNEW = (stakedAmount - amount)
440- let $t01776517923 = StatsResult(-(amount), if ((amount == stakedAmount))
439+ let $t01774317901 = StatsResult(-(amount), if ((amount == stakedAmount))
441440 then -1
442441 else 0, if ((amount == stakedAmount))
443442 then -1
444443 else 0)
445- let statsEntries = $t01776517923._1
446- let totalStaked = $t01776517923._2
447- let totalStakedNew = $t01776517923._3
444+ let statsEntries = $t01774317901._1
445+ let totalStaked = $t01774317901._2
446+ let totalStakedNew = $t01774317901._3
448447 ((([ScriptTransfer(userAddress, amount, stakedAssetId), HistoryRecordEntry("unstake", userAddress, i.transactionId, stakedAmount, vpEffectiveHeight, stakedAmountNEW, vpEffectiveHeight)] ++ RewardEntries(false, userAddressStr, stakedAmount)) ++ LockParamsEntry(userAddress, stakedAmountNEW, vpEffectiveHeight)) ++ statsEntries)
449448 }
450449 }
451450
452451
453452
454453 @Callable(i)
455454 func deposit () = if ((size(i.payments) != 1))
456455 then throw("exact 1 payment is allowed only")
457456 else {
458457 let pmt = i.payments[0]
459458 let amount = pmt.amount
460459 let pmtAssetId = valueOrElse(pmt.assetId, WAVESID)
461460 let pmtAssetIdStr = toBase58String(pmtAssetId)
462461 let pmtMultX = if ((pmtAssetId == WAVESID))
463462 then MULTX8
464463 else MULTX6
465464 let amountX = toBigInt(amount)
466465 let totalStaked = getIntOrElse(keyLockParamTotalAmount(), 0)
467466 let totalStakedX = toBigInt(totalStaked)
468467 if ((0 > totalStaked))
469468 then throw("TODO: case is not supported")
470469 else if ((totalStaked == 0))
471470 then IncrementNotDistributedRewardEntry(pmtAssetIdStr, amount)
472471 else {
473472 let rewardPerNsbtX18 = fraction(amountX, MULTX18, totalStakedX)
474473 let depositNumLastKEY = keyDepositNumLast()
475474 let depositNumLast = getIntOrElse(depositNumLastKEY, -1)
476475 let depositNumNew = (depositNumLast + 1)
477476 if (!(contains(supportedAssetsStr, pmtAssetIdStr)))
478477 then throw(((supportedAssetsStr + " doesn't contain ") + pmtAssetIdStr))
479478 else {
480479 func refreshRewardPerNsbtSUM (accum,nextAsset) = {
481480 let rewardPerNsbtSumNewKEY = keyRewardPerNsbtSumAt(depositNumNew, nextAsset)
482481 let sumLastStr = getStrOrElse(keyRewardPerNsbtSumAt(depositNumLast, nextAsset), "0")
483482 (accum :+ (if ((nextAsset == pmtAssetIdStr))
484483 then StringEntry(rewardPerNsbtSumNewKEY, toString((parseBigIntValue(sumLastStr) + rewardPerNsbtX18)))
485484 else StringEntry(rewardPerNsbtSumNewKEY, sumLastStr)))
486485 }
487486
488487 ({
489488 let $l = supportedAssetsList
490489 let $s = size($l)
491490 let $acc0 = nil
492491 func $f0_1 ($a,$i) = if (($i >= $s))
493492 then $a
494493 else refreshRewardPerNsbtSUM($a, $l[$i])
495494
496495 func $f0_2 ($a,$i) = if (($i >= $s))
497496 then $a
498497 else throw("List size exceeds 10")
499498
500499 $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)
501500 } :+ IntegerEntry(depositNumLastKEY, depositNumNew))
502501 }
503502 }
504503 }
505504
506505
507506
508507 @Callable(i)
509508 func claimRewards () = commonClaim(i.caller, i)
510509
511510
512511
513512 @Callable(i)
514513 func claimRewardsByOriginCaller () = commonClaim(i.originCaller, i)
515514
516515
517516
518517 @Callable(i)
519518 func unclaimedRewardsREADONLY (userAddressStr) = {
520519 func forEachAssetZeroReward (accum,asset) = ((accum + makeString([asset, "0", "0"], ":")) + "_")
521520
522521 let unclaimedRewardStr = if ((userAddressStr == ""))
523522 then {
524523 let $l = supportedAssetsList
525524 let $s = size($l)
526525 let $acc0 = ""
527526 func $f0_1 ($a,$i) = if (($i >= $s))
528527 then $a
529528 else forEachAssetZeroReward($a, $l[$i])
530529
531530 func $f0_2 ($a,$i) = if (($i >= $s))
532531 then $a
533532 else throw("List size exceeds 10")
534533
535534 $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)
536535 }
537536 else {
538537 let userAddress = addressFromStringValue(userAddressStr)
539- let $t02049720602 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
540- let isNewUser = $t02049720602._1
541- let stakedAmount = $t02049720602._2
542- let stakingStart = $t02049720602._3
538+ let $t02047520580 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
539+ let isNewUser = $t02047520580._1
540+ let stakedAmount = $t02047520580._2
541+ let stakingStart = $t02047520580._3
543542 let stakedAmountX = toBigInt(stakedAmount)
544543 let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr)
545544 let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1)
546545 let depositNumLast = getIntOrElse(keyDepositNumLast(), -1)
547546 func forEachAssetCalcUnclaimedReward (accum,asset) = {
548- let $t02094821086 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
549- let rewardTotal = $t02094821086._1
550- let cached = $t02094821086._2
551- let dynamic = $t02094821086._3
552- let rewardCachedPartKEY = $t02094821086._4
547+ let $t02092621064 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
548+ let rewardTotal = $t02092621064._1
549+ let cached = $t02092621064._2
550+ let dynamic = $t02092621064._3
551+ let rewardCachedPartKEY = $t02092621064._4
553552 let claimed = valueOrElse(getInteger(keyClaimed(userAddressStr, asset)), 0)
554553 ((accum + makeString([asset, toString(rewardTotal), toString(claimed)], ":")) + "_")
555554 }
556555
557556 let $l = supportedAssetsList
558557 let $s = size($l)
559558 let $acc0 = ""
560559 func $f0_1 ($a,$i) = if (($i >= $s))
561560 then $a
562561 else forEachAssetCalcUnclaimedReward($a, $l[$i])
563562
564563 func $f0_2 ($a,$i) = if (($i >= $s))
565564 then $a
566565 else throw("List size exceeds 10")
567566
568567 $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)
569568 }
570569 $Tuple2(nil, dropRight(unclaimedRewardStr, 1))
571570 }
572571
573572
574573
575574 @Callable(i)
576575 func surfStakingSYSREADONLY (userAddressStrOrEmpty,surfDiff) = {
577576 let surfTotal = getIntOrElse(keyLockParamTotalAmount(), 0)
578577 let gnsbtFromSurfTotal = surfToGnsbt(surfTotal)
579578 if ((userAddressStrOrEmpty == ""))
580579 then $Tuple2(nil, [0, surfTotal, 0, gnsbtFromSurfTotal, 0, height, height])
581580 else {
582581 let userAddress = toAddressOrFail(userAddressStrOrEmpty)
583582 let mergedData = mergeStake(userAddress, surfDiff)
584583 let isNewUser = mergedData._1
585584 let stakedAmount = mergedData._2
586585 let vpEffectiveHeight = mergedData._3
587586 let stakedAmountNEW = mergedData._4
588587 let vpEffectiveHeightNEW = mergedData._5
589588 let surfUser = stakedAmount
590589 let gnsbtFromSurfUser = surfToGnsbt(surfUser)
591590 $Tuple2(nil, [surfUser, surfTotal, gnsbtFromSurfUser, gnsbtFromSurfTotal, vpEffectiveHeight, vpEffectiveHeightNEW])
592591 }
593592 }
594593
595594
596595
597596 @Callable(i)
598597 func gnsbtFromSurfSYSREADONLY (surfAmt) = $Tuple2(nil, surfToGnsbt(surfAmt))
599598
600599
601600
602601 @Callable(i)
603602 func configSYSREADONLY () = {
604603 let minLockAmt = getIntegerValue(keyMinLockAmount())
605604 let surfVotingPowerRestrictivePeriod = (1440 * 14)
606605 let brToStartSurfTransformation = 1150000
607606 $Tuple2(nil, [minLockAmt, (gnsbtFromSurfCoeff * MULT6), surfVotingPowerRestrictivePeriod, brToStartSurfTransformation])
608607 }
609608
610609

github/deemru/w8io/169f3d6 
118.14 ms