tx · 8jMpDxhfGn11M1m7QqTccXb6n7P8EDQju6YCe2kjdH2J

3N5yarEiTQccnnuerogYT3BxM5Zc5bRgDZy:  -0.04000000 Waves

2022.10.18 13:26 [2277712] smart account 3N5yarEiTQccnnuerogYT3BxM5Zc5bRgDZy > SELF 0.00000000 Waves

{ "type": 13, "id": "8jMpDxhfGn11M1m7QqTccXb6n7P8EDQju6YCe2kjdH2J", "fee": 4000000, "feeAssetId": null, "timestamp": 1666088867713, "version": 1, "sender": "3N5yarEiTQccnnuerogYT3BxM5Zc5bRgDZy", "senderPublicKey": "FK9j3YFWVChXKESTn33fMZz1JseCNMMqHhfB7smxJo4e", "proofs": [ "5wdxxtSn2ojBbaofB4x6kbXSgTopDYWyMhYvDpbamzX381vsNPg4UBRFqb6fYQkP7tvt61nT3qU41mwXem38mKJW" ], "script": "base64:BgIqCAISBQoDAQgIEgASABIDCgEBEgASABIAEgMKAQgSBAoCCAESAwoBARIAWAAJc2VwYXJhdG9yAgJfXwADU0VQAgJfXwAFTVVMVDYAwIQ9AAVNVUxUOACAwtcvAAZNVUxUWDYJALYCAQUFTVVMVDYABk1VTFRYOAkAtgIBBQVNVUxUOAAHTVVMVFgxOAkAtgIBAICAkLu61q3wDQAKV0FWRVNJRFNUUgIFV0FWRVMAB1dBVkVTSUQJANkEAQUKV0FWRVNJRFNUUgAJREFZTUlMTElTAIC4mSkAGUlkeENvbnRyb2xDZmdOZXV0cmlub0RhcHAAAQAYSWR4Q29udHJvbENmZ0F1Y3Rpb25EYXBwAAIAFElkeENvbnRyb2xDZmdScGREYXBwAAMAFUlkeENvbnRyb2xDZmdNYXRoRGFwcAAEABxJZHhDb250cm9sQ2ZnTGlxdWlkYXRpb25EYXBwAAUAFUlkeENvbnRyb2xDZmdSZXN0RGFwcAAGAB1JZHhDb250cm9sQ2ZnTm9kZVJlZ2lzdHJ5RGFwcAAHABxJZHhDb250cm9sQ2ZnTnNidFN0YWtpbmdEYXBwAAgAGUlkeENvbnRyb2xDZmd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2VkRGF0YQJfMgQRdnBFZmZlY3RpdmVIZWlnaHQIBQptZXJnZWREYXRhAl8zBA9zdGFrZWRBbW91bnRORVcIBQptZXJnZWREYXRhAl80BBR2cEVmZmVjdGl2ZUhlaWdodE5FVwgFCm1lcmdlZERhdGECXzUECHN1cmZVc2VyBQxzdGFrZWRBbW91bnQEEWduc2J0RnJvbVN1cmZVc2VyCQELc3VyZlRvR25zYnQBBQhzdXJmVXNlcgkAlAoCBQNuaWwJAMwIAgUIc3VyZlVzZXIJAMwIAgUJc3VyZlRvdGFsCQDMCAIFEWduc2J0RnJvbVN1cmZVc2VyCQDMCAIFEmduc2J0RnJvbVN1cmZUb3RhbAkAzAgCBRF2cEVmZmVjdGl2ZUhlaWdodAkAzAgCBRR2cEVmZmVjdGl2ZUhlaWdodE5FVwUDbmlsAWkBGGduc2J0RnJvbVN1cmZTWVNSRUFET05MWQEHc3VyZkFtdAkAlAoCBQNuaWwJAQtzdXJmVG9HbnNidAEFB3N1cmZBbXQBaQERY29uZmlnU1lTUkVBRE9OTFkABAptaW5Mb2NrQW10CQERQGV4dHJOYXRpdmUoMTA1NSkBCQEQa2V5TWluTG9ja0Ftb3VudAAEIHN1cmZWb3RpbmdQb3dlclJlc3RyaWN0aXZlUGVyaW9kCQBoAgCgCwAOBBticlRvU3RhcnRTdXJmVHJhbnNmb3JtYXRpb24AsJhGCQCUCgIFA25pbAkAzAgCBQptaW5Mb2NrQW10CQDMCAIJAGgCBRJnbnNidEZyb21TdXJmQ29lZmYFBU1VTFQ2CQDMCAIFIHN1cmZWb3RpbmdQb3dlclJlc3RyaWN0aXZlUGVyaW9kCQDMCAIFG2JyVG9TdGFydFN1cmZUcmFuc2Zvcm1hdGlvbgUDbmlsABIHYnc=", "chainId": 84, "height": 2277712, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: D3PVQH9UExw5C2NusxkZETYytjddhiEAZnHRQ1xrbhwi Next: Ct8W11t2G1ttQsodNs5mHhYVhHNptaAmvS9NpgtE5rCK Diff:
OldNewDifferences
5555 func keyGnsbtFromSurfCoeff () = "%s%s__cfg__gnsbtFromSurfCoeff"
5656
5757
58-func readControlCfgOrFail (control) = split(getStringOrFail(control, keyControlCfg()), SEP)
58+func readControlCfgOrFail (control) = split_4C(getStringOrFail(control, keyControlCfg()), SEP)
5959
6060
6161 func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx)))
272272 let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1)
273273 let depositNumLast = getIntOrElse(keyDepositNumLast(), -1)
274274 func forEachAssetCacheUserReward (accum,asset) = {
275- let $t01112011255 = calcReward(userAddress, asset, stakedAmountX, depositNumUser, depositNumLast)
276- let rewardTotal = $t01112011255._1
277- let cached = $t01112011255._2
278- let dynamic = $t01112011255._3
279- let rewardCachedPartKEY = $t01112011255._4
275+ let $t01108411219 = calcReward(userAddress, asset, stakedAmountX, depositNumUser, depositNumLast)
276+ let rewardTotal = $t01108411219._1
277+ let cached = $t01108411219._2
278+ let dynamic = $t01108411219._3
279+ let rewardCachedPartKEY = $t01108411219._4
280280 (accum :+ IntegerEntry(rewardCachedPartKEY, rewardTotal))
281281 }
282282
336336
337337
338338 func mergeStake (userAddress,amountToAdd) = {
339- let $t01490715017 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
340- let isNewUser = $t01490715017._1
341- let stakedAmount = $t01490715017._2
342- let vpEffectiveHeight = $t01490715017._3
339+ let $t01487114981 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
340+ let isNewUser = $t01487114981._1
341+ let stakedAmount = $t01487114981._2
342+ let vpEffectiveHeight = $t01487114981._3
343343 let stakedAmountNEW = if (isNewUser)
344344 then amountToAdd
345345 else (amountToAdd + stakedAmount)
352352
353353
354354 func commonStake (userAddress,i) = {
355- let $t01550315557 = getParamsOrFail()
356- let stakedAssetId = $t01550315557._1
357- let minLockAmount = $t01550315557._2
355+ let $t01546715521 = getParamsOrFail()
356+ let stakedAssetId = $t01546715521._1
357+ let minLockAmount = $t01546715521._2
358358 if ((size(i.payments) != 1))
359359 then throw("Invalid payments size")
360360 else {
375375 if ((minLockAmount > stakedAmountNEW))
376376 then throw(("Min lock amount is " + toString(minLockAmount)))
377377 else {
378- let $t01635616458 = StatsResult(amount, 1, if (isNewUser)
378+ let $t01632016422 = StatsResult(amount, 1, if (isNewUser)
379379 then 1
380380 else 0)
381- let statsEntries = $t01635616458._1
382- let totalStaked = $t01635616458._2
383- let totalStakedNew = $t01635616458._3
381+ let statsEntries = $t01632016422._1
382+ let totalStaked = $t01632016422._2
383+ let totalStakedNew = $t01632016422._3
384384 ((([HistoryRecordEntry("stake", userAddress, i.transactionId, stakedAmount, vpEffectiveHeight, stakedAmountNEW, vpEffectiveHeightNEW)] ++ RewardEntries(isNewUser, userAddressStr, stakedAmount)) ++ LockParamsEntry(userAddress, stakedAmountNEW, vpEffectiveHeightNEW)) ++ statsEntries)
385385 }
386386 }
393393 if ((size(i.payments) > 0))
394394 then throw("payments are not accepted")
395395 else {
396- let $t01693717042 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
397- let isNewUser = $t01693717042._1
398- let stakedAmount = $t01693717042._2
399- let stakingStart = $t01693717042._3
396+ let $t01690117006 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
397+ let isNewUser = $t01690117006._1
398+ let stakedAmount = $t01690117006._2
399+ let stakingStart = $t01690117006._3
400400 let stakedAmountX = toBigInt(stakedAmount)
401401 let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr)
402402 let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1)
403403 let depositNumLast = getIntOrElse(keyDepositNumLast(), -1)
404404 func forEachAssetCalcUnclaimedReward (accum,asset) = {
405- let $t01741317551 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
406- let rewardTotal = $t01741317551._1
407- let cached = $t01741317551._2
408- let dynamic = $t01741317551._3
409- let rewardCachedPartKEY = $t01741317551._4
405+ let $t01737717515 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
406+ let rewardTotal = $t01737717515._1
407+ let cached = $t01737717515._2
408+ let dynamic = $t01737717515._3
409+ let rewardCachedPartKEY = $t01737717515._4
410410 let claimedKEY = keyClaimed(userAddressStr, asset)
411- let $t01761117648 = accum
412- let data = $t01761117648._1
413- let claimedAmtByAsset = $t01761117648._2
411+ let $t01757517612 = accum
412+ let data = $t01757517612._1
413+ let claimedAmtByAsset = $t01757517612._2
414414 let newPart = makeString([asset, toString(rewardTotal)], ":")
415415 let claimedAmtByAssetNew = makeString([claimedAmtByAsset, newPart], "_")
416416 if ((0 >= rewardTotal))
418418 else $Tuple2((((data :+ ScriptTransfer(userAddress, rewardTotal, toAssetVect(asset))) :+ IntegerEntry(claimedKEY, (valueOrElse(getInteger(claimedKEY), 0) + rewardTotal))) :+ IntegerEntry(rewardCachedPartKEY, 0)), claimedAmtByAssetNew)
419419 }
420420
421- let $t01810818221 = {
421+ let $t01807218185 = {
422422 let $l = supportedAssetsList
423423 let $s = size($l)
424424 let $acc0 = $Tuple2(nil, "")
432432
433433 $f0_2($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)
434434 }
435- let transfers = $t01810818221._1
436- let claimedAmtByAssetResult = $t01810818221._2
435+ let transfers = $t01807218185._1
436+ let claimedAmtByAssetResult = $t01807218185._2
437437 if ((0 >= size(transfers)))
438438 then $Tuple2(nil, 0)
439439 else $Tuple2(((transfers :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)) :+ ClaimHistoryEntry(userAddress, i.transactionId, drop(claimedAmtByAssetResult, 1))), size(transfers))
464464 else {
465465 let userAddress = i.caller
466466 let userAddressStr = toString(userAddress)
467- let $t01915519209 = getParamsOrFail()
468- let stakedAssetId = $t01915519209._1
469- let minLockAmount = $t01915519209._2
470- let $t01921219296 = getUserParamsOrFail(userAddress)
471- let isNewUser = $t01921219296._1
472- let stakedAmount = $t01921219296._2
473- let vpEffectiveHeight = $t01921219296._3
467+ let $t01911919173 = getParamsOrFail()
468+ let stakedAssetId = $t01911919173._1
469+ let minLockAmount = $t01911919173._2
470+ let $t01917619260 = getUserParamsOrFail(userAddress)
471+ let isNewUser = $t01917619260._1
472+ let stakedAmount = $t01917619260._2
473+ let vpEffectiveHeight = $t01917619260._3
474474 let swapParamsSTRUCT = asSwapParamsSTRUCT(reentrantInvoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStr, 0], nil))
475475 let swapLimitSpentInUsdn = swapParamsSTRUCT._2
476476 let blcks2LmtReset = swapParamsSTRUCT._3
482482 then throw(((("Requested " + toString(amount)) + ", but staked only ") + toString(stakedAmount)))
483483 else {
484484 let stakedAmountNEW = (stakedAmount - amount)
485- let $t01993420092 = StatsResult(-(amount), if ((amount == stakedAmount))
485+ let $t01989820056 = StatsResult(-(amount), if ((amount == stakedAmount))
486486 then -1
487487 else 0, if ((amount == stakedAmount))
488488 then -1
489489 else 0)
490- let statsEntries = $t01993420092._1
491- let totalStaked = $t01993420092._2
492- let totalStakedNew = $t01993420092._3
490+ let statsEntries = $t01989820056._1
491+ let totalStaked = $t01989820056._2
492+ let totalStakedNew = $t01989820056._3
493493 ((([ScriptTransfer(userAddress, amount, stakedAssetId), HistoryRecordEntry("unstake", userAddress, i.transactionId, stakedAmount, vpEffectiveHeight, stakedAmountNEW, vpEffectiveHeight)] ++ RewardEntries(false, userAddressStr, stakedAmount)) ++ LockParamsEntry(userAddress, stakedAmountNEW, vpEffectiveHeight)) ++ statsEntries)
494494 }
495495 }
581581 }
582582 else {
583583 let userAddress = addressFromStringValue(userAddressStr)
584- let $t02271622821 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
585- let isNewUser = $t02271622821._1
586- let stakedAmount = $t02271622821._2
587- let stakingStart = $t02271622821._3
584+ let $t02268022785 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
585+ let isNewUser = $t02268022785._1
586+ let stakedAmount = $t02268022785._2
587+ let stakingStart = $t02268022785._3
588588 let stakedAmountX = toBigInt(stakedAmount)
589589 let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr)
590590 let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1)
591591 let depositNumLast = getIntOrElse(keyDepositNumLast(), -1)
592592 func forEachAssetCalcUnclaimedReward (accum,asset) = {
593- let $t02316723305 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
594- let rewardTotal = $t02316723305._1
595- let cached = $t02316723305._2
596- let dynamic = $t02316723305._3
597- let rewardCachedPartKEY = $t02316723305._4
593+ let $t02313123269 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
594+ let rewardTotal = $t02313123269._1
595+ let cached = $t02313123269._2
596+ let dynamic = $t02313123269._3
597+ let rewardCachedPartKEY = $t02313123269._4
598598 let claimed = valueOrElse(getInteger(keyClaimed(userAddressStr, asset)), 0)
599599 ((accum + makeString([asset, toString(rewardTotal), toString(claimed)], ":")) + "_")
600600 }
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 DAYMILLIS = 86400000
2323
2424 let IdxControlCfgNeutrinoDapp = 1
2525
2626 let IdxControlCfgAuctionDapp = 2
2727
2828 let IdxControlCfgRpdDapp = 3
2929
3030 let IdxControlCfgMathDapp = 4
3131
3232 let IdxControlCfgLiquidationDapp = 5
3333
3434 let IdxControlCfgRestDapp = 6
3535
3636 let IdxControlCfgNodeRegistryDapp = 7
3737
3838 let IdxControlCfgNsbtStakingDapp = 8
3939
4040 let IdxControlCfgMediatorDapp = 9
4141
4242 let IdxControlCfgSurfStakingDapp = 10
4343
4444 let IdxControlCfgGnsbtControllerDapp = 11
4545
4646 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined"))
4747
4848
4949 func keyControlAddress () = "%s%s__config__controlAddress"
5050
5151
5252 func keyControlCfg () = "%s__controlConfig"
5353
5454
5555 func keyGnsbtFromSurfCoeff () = "%s%s__cfg__gnsbtFromSurfCoeff"
5656
5757
58-func readControlCfgOrFail (control) = split(getStringOrFail(control, keyControlCfg()), SEP)
58+func readControlCfgOrFail (control) = split_4C(getStringOrFail(control, keyControlCfg()), SEP)
5959
6060
6161 func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx)))
6262
6363
6464 let controlContract = addressFromStringValue(valueOrElse(getString(this, keyControlAddress()), "3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx"))
6565
6666 let controlCfg = readControlCfgOrFail(controlContract)
6767
6868 let mathContract = getContractAddressOrFail(controlCfg, IdxControlCfgMathDapp)
6969
7070 let neutrinoContract = getContractAddressOrFail(controlCfg, IdxControlCfgNeutrinoDapp)
7171
7272 let auctionContract = getContractAddressOrFail(controlCfg, IdxControlCfgAuctionDapp)
7373
7474 let gnsbtFromSurfCoeff = valueOrElse(getInteger(this, keyGnsbtFromSurfCoeff()), 300)
7575
7676 func keyBondAsset () = "bond_asset_id"
7777
7878
7979 func keyAuctionContractAddress () = "auction_contract"
8080
8181
8282 func keyMinLockAmount () = "%s__minLockAmount"
8383
8484
8585 func keyStakedAssetId () = "%s__stakedAssetId"
8686
8787
8888 func keyLockParamUserAmount (userAddress) = makeString(["%s%s%s", "paramByUser", toString(userAddress), "amount"], separator)
8989
9090
9191 func keyLockParamStartBlock (userAddress) = makeString(["%s%s%s", "paramByUser", toString(userAddress), "start"], separator)
9292
9393
9494 func keyLockParamVotingPowerEffectiveHeight (userAddress) = makeString(["%s%s%s", "paramByUser", toString(userAddress), "vpEffectiveHeight"], separator)
9595
9696
9797 func keyHistoryRecord (type,userAddress,txId) = makeString(["%s%s%s%s", "history", type, toString(userAddress), toBase58String(txId)], separator)
9898
9999
100100 func keyLockParamTotalAmount () = makeString(["%s%s", "stats", "activeTotalLocked"], separator)
101101
102102
103103 func keyStatsLocksCount () = makeString(["%s%s", "stats", "locksCount"], separator)
104104
105105
106106 func keyStatsUsersCount () = makeString(["%s%s", "stats", "activeUsersCount"], separator)
107107
108108
109109 func keyStatsDepositAmtByDay (timestamp) = makeString(["%s%s%d", "stats", "depositAmtByDay", toString(timestamp)], separator)
110110
111111
112112 func keyStatsDepositAmtTotals () = makeString(["%s%s%d", "stats", "depositAmtTotals"], separator)
113113
114114
115115 func keyNextPeriod () = "%s__nextPeriod"
116116
117117
118118 func keySupportedRewardAssets () = "supportedRewardAssets"
119119
120120
121121 func keyDepositNumLast () = makeString(["%s%s%s", "dep", "lastNum"], separator)
122122
123123
124124 func keyUserRewardFromDepositNum (userAddress) = makeString(["%s%s%s", "userRwdFromDepNum", userAddress], separator)
125125
126126
127127 func keyRewardPerNsbtSumAt (depositNum,tkn) = makeString(["%s%d", "rwdPerNsbtSumByDepNum", toString(depositNum), tkn], separator)
128128
129129
130130 func keyReward (userAddress,tkn) = makeString(["%s%s%s", "rwd", userAddress, tkn], separator)
131131
132132
133133 func keyClaimed (userAddress,tkn) = makeString(["%s%s%s", "clm", userAddress, tkn], separator)
134134
135135
136136 func keyNotDistributedReward (tkn) = makeString(["%s%s", "notDistributed", tkn], separator)
137137
138138
139139 func toX18 (origVal,origMult) = fraction(toBigInt(origVal), MULTX18, origMult)
140140
141141
142142 func getIntOrZero (key) = valueOrElse(getInteger(this, key), 0)
143143
144144
145145 func getIntOrElse (key,defaultVal) = valueOrElse(getInteger(this, key), defaultVal)
146146
147147
148148 func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), (("Mandatory this." + key) + " is not defined"))
149149
150150
151151 func getStrOrElse (key,defaultVal) = valueOrElse(getString(this, key), defaultVal)
152152
153153
154154 func toAddressOrFail (addressStr) = valueOrErrorMessage(addressFromString(addressStr), ("couldn't parse passed addressStr=" + addressStr))
155155
156156
157157 func toAssetVect (assetStr) = if ((assetStr == WAVESIDSTR))
158158 then unit
159159 else fromBase58String(assetStr)
160160
161161
162162 func asInt (val) = match val {
163163 case valInt: Int =>
164164 valInt
165165 case _ =>
166166 throw("fail to cast into Int")
167167 }
168168
169169
170170 func asSwapParamsSTRUCT (v) = match v {
171171 case struct: (Int, Int, Int, Int, Int, Int, Int) =>
172172 struct
173173 case _ =>
174174 throw("fail to cast into Int")
175175 }
176176
177177
178178 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)
179179
180180
181181 func formatClaimHistoryRecord (user,claimedRewards) = makeString(["%s%d%d%s", user, toString(lastBlock.height), toString(lastBlock.timestamp), claimedRewards], separator)
182182
183183
184184 func HistoryRecordEntry (type,userAddress,txId,oldAmount,oldStart,newAmount,newStart) = StringEntry(keyHistoryRecord(type, userAddress, txId), formatHistoryRecord(oldAmount, oldStart, newAmount, newStart))
185185
186186
187187 func ClaimHistoryEntry (userAddress,txId,claimedRewards) = StringEntry(keyHistoryRecord("claim", userAddress, txId), formatClaimHistoryRecord(toString(userAddress), claimedRewards))
188188
189189
190190 func StatsResult (totalLockedInc,lockCountInc,usersCountInc) = {
191191 let locksCount = getIntOrZero(keyStatsLocksCount())
192192 let usersCount = getIntOrZero(keyStatsUsersCount())
193193 let totalAmount = getIntOrZero(keyLockParamTotalAmount())
194194 let totalAmountNew = (totalAmount + totalLockedInc)
195195 $Tuple3([IntegerEntry(keyStatsLocksCount(), (locksCount + lockCountInc)), IntegerEntry(keyStatsUsersCount(), (usersCount + usersCountInc)), IntegerEntry(keyLockParamTotalAmount(), totalAmountNew)], totalAmount, totalAmountNew)
196196 }
197197
198198
199199 func LockParamsEntry (userAddress,amount,votingPowerEffectiveHeight) = [IntegerEntry(keyLockParamUserAmount(userAddress), amount), IntegerEntry(keyLockParamStartBlock(userAddress), votingPowerEffectiveHeight)]
200200
201201
202202 func getParamsOrFail () = $Tuple2(fromBase58String(getStringOrFail(this, keyStakedAssetId())), getIntOrFail(keyMinLockAmount()))
203203
204204
205205 func isActiveUser (userAddress) = (getIntOrElse(keyLockParamUserAmount(userAddress), 0) > 0)
206206
207207
208208 func getUserParamsOrUnit (userAddress) = if (isActiveUser(userAddress))
209209 then $Tuple3(false, getIntOrFail(keyLockParamUserAmount(userAddress)), getIntOrFail(keyLockParamStartBlock(userAddress)))
210210 else unit
211211
212212
213213 func getUserParamsOrFail (userAddress) = valueOrErrorMessage(getUserParamsOrUnit(userAddress), (("User " + toString(userAddress)) + " is not defined"))
214214
215215
216216 let supportedAssetsStr = getStrOrElse(keySupportedRewardAssets(), "")
217217
218218 let supportedAssetsList = split(supportedAssetsStr, "_")
219219
220220 func calcReward (userAddress,assetId,stakedAmountX,depositNumUser,depositNumLast) = {
221221 let rewardPerNsbtSumLastKEY = keyRewardPerNsbtSumAt(depositNumLast, assetId)
222222 let sumLastX18 = parseBigIntValue(getStrOrElse(keyRewardPerNsbtSumAt(depositNumLast, assetId), "0"))
223223 let sumUserX18 = parseBigIntValue(getStrOrElse(keyRewardPerNsbtSumAt(depositNumUser, assetId), "0"))
224224 let rewardDynamicPart = toInt(fraction((sumLastX18 - sumUserX18), stakedAmountX, MULTX18))
225225 let rewardCachedPartKEY = keyReward(userAddress, assetId)
226226 let rewardCachedPart = getIntOrElse(rewardCachedPartKEY, 0)
227227 $Tuple4((rewardCachedPart + rewardDynamicPart), rewardCachedPart, rewardDynamicPart, rewardCachedPartKEY)
228228 }
229229
230230
231231 func toStartOfDay (timestamp) = ((timestamp / DAYMILLIS) * DAYMILLIS)
232232
233233
234234 func findElementPosition (src,element,sep) = {
235235 let elementStart = valueOrErrorMessage(indexOf(src, element), ((("there is no substring " + element) + " in ") + src))
236236 if ((elementStart == 0))
237237 then 0
238238 else {
239239 let left = take(src, elementStart)
240240 (size(split(left, sep)) - 1)
241241 }
242242 }
243243
244244
245245 let DepositTotalsPREFIX = "%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d"
246246
247247 func updateDepositTotals (currVal,idxToUpdate,deltaAmt) = {
248248 let currArr = split(currVal, SEP)
249249 func updDepTotByIdx (idx) = if ((idx != idxToUpdate))
250250 then currArr[idx]
251251 else toString((parseIntValue(currArr[idx]) + deltaAmt))
252252
253253 makeString([DepositTotalsPREFIX, updDepTotByIdx(1), updDepTotByIdx(2), updDepTotByIdx(3), updDepTotByIdx(4), updDepTotByIdx(5), updDepTotByIdx(6), updDepTotByIdx(7), updDepTotByIdx(8), updDepTotByIdx(9), updDepTotByIdx(10), updDepTotByIdx(11), updDepTotByIdx(12), updDepTotByIdx(13), updDepTotByIdx(14), updDepTotByIdx(15), updDepTotByIdx(16), updDepTotByIdx(17), updDepTotByIdx(18)], SEP)
254254 }
255255
256256
257257 func DepositsTotalsEntries (depositAmount,assetIdStr) = {
258258 let startOfDay = toStartOfDay(lastBlock.timestamp)
259259 let byDayKEY = keyStatsDepositAmtByDay(startOfDay)
260260 let totalsKEY = keyStatsDepositAmtTotals()
261261 let position = findElementPosition(supportedAssetsStr, assetIdStr, "_")
262262 let defaultDATA = (DepositTotalsPREFIX + "__0__0__0__0__0__0__0__0__0__0__0__0__0__0__0__0__0__0")
263263 let currTotalsDATA = valueOrElse(getString(this, totalsKEY), defaultDATA)
264264 let newTotalsDATA = updateDepositTotals(currTotalsDATA, (position + 1), depositAmount)
265265 [StringEntry(totalsKEY, newTotalsDATA), StringEntry(byDayKEY, newTotalsDATA)]
266266 }
267267
268268
269269 func RewardEntries (isNewUser,userAddress,stakedAmount) = {
270270 let stakedAmountX = toBigInt(stakedAmount)
271271 let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddress)
272272 let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1)
273273 let depositNumLast = getIntOrElse(keyDepositNumLast(), -1)
274274 func forEachAssetCacheUserReward (accum,asset) = {
275- let $t01112011255 = calcReward(userAddress, asset, stakedAmountX, depositNumUser, depositNumLast)
276- let rewardTotal = $t01112011255._1
277- let cached = $t01112011255._2
278- let dynamic = $t01112011255._3
279- let rewardCachedPartKEY = $t01112011255._4
275+ let $t01108411219 = calcReward(userAddress, asset, stakedAmountX, depositNumUser, depositNumLast)
276+ let rewardTotal = $t01108411219._1
277+ let cached = $t01108411219._2
278+ let dynamic = $t01108411219._3
279+ let rewardCachedPartKEY = $t01108411219._4
280280 (accum :+ IntegerEntry(rewardCachedPartKEY, rewardTotal))
281281 }
282282
283283 if (if ((depositNumLast == -1))
284284 then (depositNumUser == -1)
285285 else false)
286286 then nil
287287 else if (if ((depositNumLast == -1))
288288 then (depositNumUser > -1)
289289 else false)
290290 then throw("invalid depositNumLast and depositNumUser state")
291291 else if (if ((depositNumLast > -1))
292292 then (depositNumUser >= -1)
293293 else false)
294294 then if (isNewUser)
295295 then [IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)]
296296 else ({
297297 let $l = supportedAssetsList
298298 let $s = size($l)
299299 let $acc0 = nil
300300 func $f0_1 ($a,$i) = if (($i >= $s))
301301 then $a
302302 else forEachAssetCacheUserReward($a, $l[$i])
303303
304304 func $f0_2 ($a,$i) = if (($i >= $s))
305305 then $a
306306 else throw("List size exceeds 9")
307307
308308 $f0_2($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)
309309 } :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast))
310310 else throw(((("uncovered condition: depositNumLast=" + toString(depositNumLast)) + " depositNumUser=") + toString(depositNumUser)))
311311 }
312312
313313
314314 func IncrementNotDistributedRewardEntry (tkn,amountInc) = {
315315 let notDistributedRewardKEY = keyNotDistributedReward(tkn)
316316 let notDistributedReward = getIntOrElse(notDistributedRewardKEY, 0)
317317 [IntegerEntry(notDistributedRewardKEY, (notDistributedReward + amountInc))]
318318 }
319319
320320
321321 func surfToGnsbt (surfAmt) = (surfAmt / gnsbtFromSurfCoeff)
322322
323323
324324 func mergeVotingPowerEffectiveHeight (quarantinePeriod,vpEffectiveHeight,stakedAmt,stakedAmtNEW) = {
325325 let remainingToWait = (vpEffectiveHeight - height)
326326 if ((0 >= remainingToWait))
327327 then (height + quarantinePeriod)
328328 else {
329329 let alreadyWaited = (quarantinePeriod - remainingToWait)
330330 let kX8 = if ((stakedAmtNEW != 0))
331331 then fraction(stakedAmt, MULT8, stakedAmtNEW)
332332 else vpEffectiveHeight
333333 ((quarantinePeriod + height) - fraction(alreadyWaited, kX8, MULT8))
334334 }
335335 }
336336
337337
338338 func mergeStake (userAddress,amountToAdd) = {
339- let $t01490715017 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
340- let isNewUser = $t01490715017._1
341- let stakedAmount = $t01490715017._2
342- let vpEffectiveHeight = $t01490715017._3
339+ let $t01487114981 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
340+ let isNewUser = $t01487114981._1
341+ let stakedAmount = $t01487114981._2
342+ let vpEffectiveHeight = $t01487114981._3
343343 let stakedAmountNEW = if (isNewUser)
344344 then amountToAdd
345345 else (amountToAdd + stakedAmount)
346346 let quarantinePeriod = (1440 * 14)
347347 let vpEffectiveHeightNEW = if (isNewUser)
348348 then (quarantinePeriod + height)
349349 else mergeVotingPowerEffectiveHeight(quarantinePeriod, vpEffectiveHeight, stakedAmount, stakedAmountNEW)
350350 $Tuple5(isNewUser, stakedAmount, vpEffectiveHeight, stakedAmountNEW, vpEffectiveHeightNEW)
351351 }
352352
353353
354354 func commonStake (userAddress,i) = {
355- let $t01550315557 = getParamsOrFail()
356- let stakedAssetId = $t01550315557._1
357- let minLockAmount = $t01550315557._2
355+ let $t01546715521 = getParamsOrFail()
356+ let stakedAssetId = $t01546715521._1
357+ let minLockAmount = $t01546715521._2
358358 if ((size(i.payments) != 1))
359359 then throw("Invalid payments size")
360360 else {
361361 let payment = i.payments[0]
362362 let amount = payment.amount
363363 let invalidAssetMessage = (("Invalid asset. " + toBase58String(stakedAssetId)) + " is expected")
364364 let assetId = valueOrErrorMessage(payment.assetId, invalidAssetMessage)
365365 if ((assetId != stakedAssetId))
366366 then throw(invalidAssetMessage)
367367 else {
368368 let userAddressStr = toString(userAddress)
369369 let mergedData = mergeStake(userAddress, amount)
370370 let isNewUser = mergedData._1
371371 let stakedAmount = mergedData._2
372372 let vpEffectiveHeight = mergedData._3
373373 let stakedAmountNEW = mergedData._4
374374 let vpEffectiveHeightNEW = mergedData._5
375375 if ((minLockAmount > stakedAmountNEW))
376376 then throw(("Min lock amount is " + toString(minLockAmount)))
377377 else {
378- let $t01635616458 = StatsResult(amount, 1, if (isNewUser)
378+ let $t01632016422 = StatsResult(amount, 1, if (isNewUser)
379379 then 1
380380 else 0)
381- let statsEntries = $t01635616458._1
382- let totalStaked = $t01635616458._2
383- let totalStakedNew = $t01635616458._3
381+ let statsEntries = $t01632016422._1
382+ let totalStaked = $t01632016422._2
383+ let totalStakedNew = $t01632016422._3
384384 ((([HistoryRecordEntry("stake", userAddress, i.transactionId, stakedAmount, vpEffectiveHeight, stakedAmountNEW, vpEffectiveHeightNEW)] ++ RewardEntries(isNewUser, userAddressStr, stakedAmount)) ++ LockParamsEntry(userAddress, stakedAmountNEW, vpEffectiveHeightNEW)) ++ statsEntries)
385385 }
386386 }
387387 }
388388 }
389389
390390
391391 func commonClaim (userAddress,i) = {
392392 let userAddressStr = toString(userAddress)
393393 if ((size(i.payments) > 0))
394394 then throw("payments are not accepted")
395395 else {
396- let $t01693717042 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
397- let isNewUser = $t01693717042._1
398- let stakedAmount = $t01693717042._2
399- let stakingStart = $t01693717042._3
396+ let $t01690117006 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
397+ let isNewUser = $t01690117006._1
398+ let stakedAmount = $t01690117006._2
399+ let stakingStart = $t01690117006._3
400400 let stakedAmountX = toBigInt(stakedAmount)
401401 let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr)
402402 let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1)
403403 let depositNumLast = getIntOrElse(keyDepositNumLast(), -1)
404404 func forEachAssetCalcUnclaimedReward (accum,asset) = {
405- let $t01741317551 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
406- let rewardTotal = $t01741317551._1
407- let cached = $t01741317551._2
408- let dynamic = $t01741317551._3
409- let rewardCachedPartKEY = $t01741317551._4
405+ let $t01737717515 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
406+ let rewardTotal = $t01737717515._1
407+ let cached = $t01737717515._2
408+ let dynamic = $t01737717515._3
409+ let rewardCachedPartKEY = $t01737717515._4
410410 let claimedKEY = keyClaimed(userAddressStr, asset)
411- let $t01761117648 = accum
412- let data = $t01761117648._1
413- let claimedAmtByAsset = $t01761117648._2
411+ let $t01757517612 = accum
412+ let data = $t01757517612._1
413+ let claimedAmtByAsset = $t01757517612._2
414414 let newPart = makeString([asset, toString(rewardTotal)], ":")
415415 let claimedAmtByAssetNew = makeString([claimedAmtByAsset, newPart], "_")
416416 if ((0 >= rewardTotal))
417417 then $Tuple2(data, claimedAmtByAssetNew)
418418 else $Tuple2((((data :+ ScriptTransfer(userAddress, rewardTotal, toAssetVect(asset))) :+ IntegerEntry(claimedKEY, (valueOrElse(getInteger(claimedKEY), 0) + rewardTotal))) :+ IntegerEntry(rewardCachedPartKEY, 0)), claimedAmtByAssetNew)
419419 }
420420
421- let $t01810818221 = {
421+ let $t01807218185 = {
422422 let $l = supportedAssetsList
423423 let $s = size($l)
424424 let $acc0 = $Tuple2(nil, "")
425425 func $f0_1 ($a,$i) = if (($i >= $s))
426426 then $a
427427 else forEachAssetCalcUnclaimedReward($a, $l[$i])
428428
429429 func $f0_2 ($a,$i) = if (($i >= $s))
430430 then $a
431431 else throw("List size exceeds 9")
432432
433433 $f0_2($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)
434434 }
435- let transfers = $t01810818221._1
436- let claimedAmtByAssetResult = $t01810818221._2
435+ let transfers = $t01807218185._1
436+ let claimedAmtByAssetResult = $t01807218185._2
437437 if ((0 >= size(transfers)))
438438 then $Tuple2(nil, 0)
439439 else $Tuple2(((transfers :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)) :+ ClaimHistoryEntry(userAddress, i.transactionId, drop(claimedAmtByAssetResult, 1))), size(transfers))
440440 }
441441 }
442442
443443
444444 @Callable(i)
445445 func constructor (minLockAmount,supportedRewardAssets,stakedAssetId) = if ((i.caller != this))
446446 then throw("Permission denied")
447447 else [IntegerEntry(keyMinLockAmount(), minLockAmount), StringEntry(keySupportedRewardAssets(), supportedRewardAssets), StringEntry(keyStakedAssetId(), stakedAssetId)]
448448
449449
450450
451451 @Callable(i)
452452 func stake () = commonStake(i.caller, i)
453453
454454
455455
456456 @Callable(i)
457457 func stakeByOriginCaller () = commonStake(i.originCaller, i)
458458
459459
460460
461461 @Callable(i)
462462 func unstake (amount) = if ((size(i.payments) != 0))
463463 then throw("unstake doesn't require any payment")
464464 else {
465465 let userAddress = i.caller
466466 let userAddressStr = toString(userAddress)
467- let $t01915519209 = getParamsOrFail()
468- let stakedAssetId = $t01915519209._1
469- let minLockAmount = $t01915519209._2
470- let $t01921219296 = getUserParamsOrFail(userAddress)
471- let isNewUser = $t01921219296._1
472- let stakedAmount = $t01921219296._2
473- let vpEffectiveHeight = $t01921219296._3
467+ let $t01911919173 = getParamsOrFail()
468+ let stakedAssetId = $t01911919173._1
469+ let minLockAmount = $t01911919173._2
470+ let $t01917619260 = getUserParamsOrFail(userAddress)
471+ let isNewUser = $t01917619260._1
472+ let stakedAmount = $t01917619260._2
473+ let vpEffectiveHeight = $t01917619260._3
474474 let swapParamsSTRUCT = asSwapParamsSTRUCT(reentrantInvoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStr, 0], nil))
475475 let swapLimitSpentInUsdn = swapParamsSTRUCT._2
476476 let blcks2LmtReset = swapParamsSTRUCT._3
477477 if ((swapLimitSpentInUsdn > 0))
478478 then throw((("You have already made a swap operation. Wait " + toString((height + blcks2LmtReset))) + " height to unstake"))
479479 else if ((0 >= stakedAmount))
480480 then throw("Nothing to unstake")
481481 else if ((amount > stakedAmount))
482482 then throw(((("Requested " + toString(amount)) + ", but staked only ") + toString(stakedAmount)))
483483 else {
484484 let stakedAmountNEW = (stakedAmount - amount)
485- let $t01993420092 = StatsResult(-(amount), if ((amount == stakedAmount))
485+ let $t01989820056 = StatsResult(-(amount), if ((amount == stakedAmount))
486486 then -1
487487 else 0, if ((amount == stakedAmount))
488488 then -1
489489 else 0)
490- let statsEntries = $t01993420092._1
491- let totalStaked = $t01993420092._2
492- let totalStakedNew = $t01993420092._3
490+ let statsEntries = $t01989820056._1
491+ let totalStaked = $t01989820056._2
492+ let totalStakedNew = $t01989820056._3
493493 ((([ScriptTransfer(userAddress, amount, stakedAssetId), HistoryRecordEntry("unstake", userAddress, i.transactionId, stakedAmount, vpEffectiveHeight, stakedAmountNEW, vpEffectiveHeight)] ++ RewardEntries(false, userAddressStr, stakedAmount)) ++ LockParamsEntry(userAddress, stakedAmountNEW, vpEffectiveHeight)) ++ statsEntries)
494494 }
495495 }
496496
497497
498498
499499 @Callable(i)
500500 func deposit () = if ((size(i.payments) != 1))
501501 then throw("exact 1 payment is allowed only")
502502 else {
503503 let pmt = i.payments[0]
504504 let amount = pmt.amount
505505 let pmtAssetId = valueOrElse(pmt.assetId, WAVESID)
506506 let pmtAssetIdStr = toBase58String(pmtAssetId)
507507 let pmtMultX = if ((pmtAssetId == WAVESID))
508508 then MULTX8
509509 else MULTX6
510510 let amountX = toBigInt(amount)
511511 let totalStaked = getIntOrElse(keyLockParamTotalAmount(), 0)
512512 let totalStakedX = toBigInt(totalStaked)
513513 if ((0 > totalStaked))
514514 then throw("TODO: case is not supported")
515515 else if ((totalStaked == 0))
516516 then IncrementNotDistributedRewardEntry(pmtAssetIdStr, amount)
517517 else {
518518 let rewardPerNsbtX18 = fraction(amountX, MULTX18, totalStakedX)
519519 let depositNumLastKEY = keyDepositNumLast()
520520 let depositNumLast = getIntOrElse(depositNumLastKEY, -1)
521521 let depositNumNew = (depositNumLast + 1)
522522 if (!(contains(supportedAssetsStr, pmtAssetIdStr)))
523523 then throw(((supportedAssetsStr + " doesn't contain ") + pmtAssetIdStr))
524524 else {
525525 func refreshRewardPerNsbtSUM (accum,nextAsset) = {
526526 let rewardPerNsbtSumNewKEY = keyRewardPerNsbtSumAt(depositNumNew, nextAsset)
527527 let sumLastStr = getStrOrElse(keyRewardPerNsbtSumAt(depositNumLast, nextAsset), "0")
528528 (accum :+ (if ((nextAsset == pmtAssetIdStr))
529529 then StringEntry(rewardPerNsbtSumNewKEY, toString((parseBigIntValue(sumLastStr) + rewardPerNsbtX18)))
530530 else StringEntry(rewardPerNsbtSumNewKEY, sumLastStr)))
531531 }
532532
533533 (({
534534 let $l = supportedAssetsList
535535 let $s = size($l)
536536 let $acc0 = nil
537537 func $f0_1 ($a,$i) = if (($i >= $s))
538538 then $a
539539 else refreshRewardPerNsbtSUM($a, $l[$i])
540540
541541 func $f0_2 ($a,$i) = if (($i >= $s))
542542 then $a
543543 else throw("List size exceeds 9")
544544
545545 $f0_2($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)
546546 } :+ IntegerEntry(depositNumLastKEY, depositNumNew)) ++ DepositsTotalsEntries(amount, pmtAssetIdStr))
547547 }
548548 }
549549 }
550550
551551
552552
553553 @Callable(i)
554554 func claimRewards () = commonClaim(i.caller, i)
555555
556556
557557
558558 @Callable(i)
559559 func claimRewardsByOriginCaller () = commonClaim(i.originCaller, i)
560560
561561
562562
563563 @Callable(i)
564564 func unclaimedRewardsREADONLY (userAddressStr) = {
565565 func forEachAssetZeroReward (accum,asset) = ((accum + makeString([asset, "0", "0"], ":")) + "_")
566566
567567 let unclaimedRewardStr = if ((userAddressStr == ""))
568568 then {
569569 let $l = supportedAssetsList
570570 let $s = size($l)
571571 let $acc0 = ""
572572 func $f0_1 ($a,$i) = if (($i >= $s))
573573 then $a
574574 else forEachAssetZeroReward($a, $l[$i])
575575
576576 func $f0_2 ($a,$i) = if (($i >= $s))
577577 then $a
578578 else throw("List size exceeds 9")
579579
580580 $f0_2($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)
581581 }
582582 else {
583583 let userAddress = addressFromStringValue(userAddressStr)
584- let $t02271622821 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
585- let isNewUser = $t02271622821._1
586- let stakedAmount = $t02271622821._2
587- let stakingStart = $t02271622821._3
584+ let $t02268022785 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
585+ let isNewUser = $t02268022785._1
586+ let stakedAmount = $t02268022785._2
587+ let stakingStart = $t02268022785._3
588588 let stakedAmountX = toBigInt(stakedAmount)
589589 let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr)
590590 let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1)
591591 let depositNumLast = getIntOrElse(keyDepositNumLast(), -1)
592592 func forEachAssetCalcUnclaimedReward (accum,asset) = {
593- let $t02316723305 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
594- let rewardTotal = $t02316723305._1
595- let cached = $t02316723305._2
596- let dynamic = $t02316723305._3
597- let rewardCachedPartKEY = $t02316723305._4
593+ let $t02313123269 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
594+ let rewardTotal = $t02313123269._1
595+ let cached = $t02313123269._2
596+ let dynamic = $t02313123269._3
597+ let rewardCachedPartKEY = $t02313123269._4
598598 let claimed = valueOrElse(getInteger(keyClaimed(userAddressStr, asset)), 0)
599599 ((accum + makeString([asset, toString(rewardTotal), toString(claimed)], ":")) + "_")
600600 }
601601
602602 let $l = supportedAssetsList
603603 let $s = size($l)
604604 let $acc0 = ""
605605 func $f0_1 ($a,$i) = if (($i >= $s))
606606 then $a
607607 else forEachAssetCalcUnclaimedReward($a, $l[$i])
608608
609609 func $f0_2 ($a,$i) = if (($i >= $s))
610610 then $a
611611 else throw("List size exceeds 9")
612612
613613 $f0_2($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)
614614 }
615615 $Tuple2(nil, dropRight(unclaimedRewardStr, 1))
616616 }
617617
618618
619619
620620 @Callable(i)
621621 func surfStakingSYSREADONLY (userAddressStrOrEmpty,surfDiff) = {
622622 let surfTotal = getIntOrElse(keyLockParamTotalAmount(), 0)
623623 let gnsbtFromSurfTotal = surfToGnsbt(surfTotal)
624624 if ((userAddressStrOrEmpty == ""))
625625 then $Tuple2(nil, [0, surfTotal, 0, gnsbtFromSurfTotal, 0, height, height])
626626 else {
627627 let userAddress = toAddressOrFail(userAddressStrOrEmpty)
628628 let mergedData = mergeStake(userAddress, surfDiff)
629629 let isNewUser = mergedData._1
630630 let stakedAmount = mergedData._2
631631 let vpEffectiveHeight = mergedData._3
632632 let stakedAmountNEW = mergedData._4
633633 let vpEffectiveHeightNEW = mergedData._5
634634 let surfUser = stakedAmount
635635 let gnsbtFromSurfUser = surfToGnsbt(surfUser)
636636 $Tuple2(nil, [surfUser, surfTotal, gnsbtFromSurfUser, gnsbtFromSurfTotal, vpEffectiveHeight, vpEffectiveHeightNEW])
637637 }
638638 }
639639
640640
641641
642642 @Callable(i)
643643 func gnsbtFromSurfSYSREADONLY (surfAmt) = $Tuple2(nil, surfToGnsbt(surfAmt))
644644
645645
646646
647647 @Callable(i)
648648 func configSYSREADONLY () = {
649649 let minLockAmt = getIntegerValue(keyMinLockAmount())
650650 let surfVotingPowerRestrictivePeriod = (1440 * 14)
651651 let brToStartSurfTransformation = 1150000
652652 $Tuple2(nil, [minLockAmt, (gnsbtFromSurfCoeff * MULT6), surfVotingPowerRestrictivePeriod, brToStartSurfTransformation])
653653 }
654654
655655

github/deemru/w8io/169f3d6 
117.54 ms