tx · FFYCwJFGmeUJNTzFug8KKXGm2fuXWAmtVZZd3Bzvx6fs

3N5yarEiTQccnnuerogYT3BxM5Zc5bRgDZy:  -0.04000000 Waves

2022.08.03 11:07 [2168046] smart account 3N5yarEiTQccnnuerogYT3BxM5Zc5bRgDZy > SELF 0.00000000 Waves

{ "type": 13, "id": "FFYCwJFGmeUJNTzFug8KKXGm2fuXWAmtVZZd3Bzvx6fs", "fee": 4000000, "feeAssetId": null, "timestamp": 1659514062931, "version": 1, "sender": "3N5yarEiTQccnnuerogYT3BxM5Zc5bRgDZy", "senderPublicKey": "FK9j3YFWVChXKESTn33fMZz1JseCNMMqHhfB7smxJo4e", "proofs": [ "VysCXZeXGuRgHpHCBmxyY9v6hg8UKMXFvhnLHQo2WUfxCQgoXUcwmQdx9XoxhXmDevPU9LF4jt32jphk9YNmvcQ" ], "script": "base64:BgIkCAISBQoDAQgIEgASABIDCgEBEgASABIAEgMKAQgSAwoBCBIASgAJc2VwYXJhdG9yAgJfXwADU0VQAgJfXwAFTVVMVDYAwIQ9AAVNVUxUOACAwtcvAAZNVUxUWDYJALYCAQUFTVVMVDYABk1VTFRYOAkAtgIBBQVNVUxUOAAHTVVMVFgxOAkAtgIBAICAkLu61q3wDQAKV0FWRVNJRFNUUgIFV0FWRVMAB1dBVkVTSUQJANkEAQUKV0FWRVNJRFNUUgAZSWR4Q29udHJvbENmZ05ldXRyaW5vRGFwcAABABhJZHhDb250cm9sQ2ZnQXVjdGlvbkRhcHAAAgAUSWR4Q29udHJvbENmZ1JwZERhcHAAAwAVSWR4Q29udHJvbENmZ01hdGhEYXBwAAQAHElkeENvbnRyb2xDZmdMaXF1aWRhdGlvbkRhcHAABQAVSWR4Q29udHJvbENmZ1Jlc3REYXBwAAYAHUlkeENvbnRyb2xDZmdOb2RlUmVnaXN0cnlEYXBwAAcAHElkeENvbnRyb2xDZmdOc2J0U3Rha2luZ0RhcHAACAAZSWR4Q29udHJvbENmZ01lZGlhdG9yRGFwcAAJABxJZH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xlS0=", "chainId": 84, "height": 2168046, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Eo87tBzH1CUTSnwEXnthCU22SUvdKfdfKxHTDrWjKJw6 Next: 5HtetvPxVF4qncRXZvhm9D3z1uCBUy7ehSNoELQHYnro 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 readControlCfgOrFail (control) = split(getStringOrFail(control, keyControlCfg()), SEP)
5454
5555
5656 func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx)))
5757
5858
5959 let controlContract = addressFromStringValue(valueOrElse(getString(this, keyControlAddress()), "3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx"))
6060
6161 let controlCfg = readControlCfgOrFail(controlContract)
6262
6363 let mathContract = getContractAddressOrFail(controlCfg, IdxControlCfgMathDapp)
6464
6565 let neutrinoContract = getContractAddressOrFail(controlCfg, IdxControlCfgNeutrinoDapp)
6666
6767 let auctionContract = getContractAddressOrFail(controlCfg, IdxControlCfgAuctionDapp)
6868
6969 func keyBondAsset () = "bond_asset_id"
7070
7171
7272 func keyAuctionContractAddress () = "auction_contract"
7373
7474
7575 func keyMinLockAmount () = "%s__minLockAmount"
7676
7777
7878 func keyStakedAssetId () = "%s__stakedAssetId"
7979
8080
8181 func keyLockParamUserAmount (userAddress) = makeString(["%s%s%s", "paramByUser", toString(userAddress), "amount"], separator)
8282
8383
8484 func keyLockParamStartBlock (userAddress) = makeString(["%s%s%s", "paramByUser", toString(userAddress), "start"], separator)
8585
8686
8787 func keyHistoryRecord (type,userAddress,txId) = makeString(["%s%s%s%s", "history", type, toString(userAddress), toBase58String(txId)], separator)
8888
8989
9090 func keyLockParamTotalAmount () = makeString(["%s%s", "stats", "activeTotalLocked"], separator)
9191
9292
9393 func keyStatsLocksCount () = makeString(["%s%s", "stats", "locksCount"], separator)
9494
9595
9696 func keyStatsUsersCount () = makeString(["%s%s", "stats", "activeUsersCount"], separator)
9797
9898
9999 func keyNextPeriod () = "%s__nextPeriod"
100100
101101
102102 func keySupportedRewardAssets () = "supportedRewardAssets"
103103
104104
105105 func keyDepositNumLast () = makeString(["%s%s%s", "dep", "lastNum"], separator)
106106
107107
108108 func keyUserRewardFromDepositNum (userAddress) = makeString(["%s%s%s", "userRwdFromDepNum", userAddress], separator)
109109
110110
111111 func keyRewardPerNsbtSumAt (depositNum,tkn) = makeString(["%s%d", "rwdPerNsbtSumByDepNum", toString(depositNum), tkn], separator)
112112
113113
114114 func keyReward (userAddress,tkn) = makeString(["%s%s%s", "rwd", userAddress, tkn], separator)
115115
116116
117117 func keyClaimed (userAddress,tkn) = makeString(["%s%s%s", "clm", userAddress, tkn], separator)
118118
119119
120120 func keyNotDistributedReward (tkn) = makeString(["%s%s", "notDistributed", tkn], separator)
121121
122122
123123 func toX18 (origVal,origMult) = fraction(toBigInt(origVal), MULTX18, origMult)
124124
125125
126126 func getIntOrZero (key) = valueOrElse(getInteger(this, key), 0)
127127
128128
129129 func getIntOrElse (key,defaultVal) = valueOrElse(getInteger(this, key), defaultVal)
130130
131131
132132 func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), (("Mandatory this." + key) + " is not defined"))
133133
134134
135135 func getStrOrElse (key,defaultVal) = valueOrElse(getString(this, key), defaultVal)
136136
137137
138138 func toAddressOrFail (addressStr) = valueOrErrorMessage(addressFromString(addressStr), ("couldn't parse passed addressStr=" + addressStr))
139139
140140
141141 func toAssetVect (assetStr) = if ((assetStr == WAVESIDSTR))
142142 then unit
143143 else fromBase58String(assetStr)
144144
145145
146146 func asInt (val) = match val {
147147 case valInt: Int =>
148148 valInt
149149 case _ =>
150150 throw("fail to cast into Int")
151151 }
152152
153153
154154 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)
155155
156156
157157 func formatClaimHistoryRecord (user,claimedRewards) = makeString(["%s%d%d%s", user, toString(lastBlock.height), toString(lastBlock.timestamp), claimedRewards], separator)
158158
159159
160160 func HistoryRecordEntry (type,userAddress,txId,oldAmount,oldStart,newAmount,newStart) = StringEntry(keyHistoryRecord(type, userAddress, txId), formatHistoryRecord(oldAmount, oldStart, newAmount, newStart))
161161
162162
163163 func ClaimHistoryEntry (userAddress,txId,claimedRewards) = StringEntry(keyHistoryRecord("claim", userAddress, txId), formatClaimHistoryRecord(toString(userAddress), claimedRewards))
164164
165165
166166 func StatsResult (totalLockedInc,lockCountInc,usersCountInc) = {
167167 let locksCount = getIntOrZero(keyStatsLocksCount())
168168 let usersCount = getIntOrZero(keyStatsUsersCount())
169169 let totalAmount = getIntOrZero(keyLockParamTotalAmount())
170170 let totalAmountNew = (totalAmount + totalLockedInc)
171171 $Tuple3([IntegerEntry(keyStatsLocksCount(), (locksCount + lockCountInc)), IntegerEntry(keyStatsUsersCount(), (usersCount + usersCountInc)), IntegerEntry(keyLockParamTotalAmount(), totalAmountNew)], totalAmount, totalAmountNew)
172172 }
173173
174174
175175 func LockParamsEntry (userAddress,amount,start) = [IntegerEntry(keyLockParamUserAmount(userAddress), amount), IntegerEntry(keyLockParamStartBlock(userAddress), start)]
176176
177177
178178 func getParamsOrFail () = $Tuple2(fromBase58String(getStringOrFail(this, keyStakedAssetId())), getIntOrFail(keyMinLockAmount()))
179179
180180
181181 func isActiveUser (userAddress) = (getIntOrElse(keyLockParamUserAmount(userAddress), 0) > 0)
182182
183183
184184 func getUserParamsOrUnit (userAddress) = if (isActiveUser(userAddress))
185185 then $Tuple3(false, getIntOrFail(keyLockParamUserAmount(userAddress)), getIntOrFail(keyLockParamStartBlock(userAddress)))
186186 else unit
187187
188188
189189 func getUserParamsOrFail (userAddress) = valueOrErrorMessage(getUserParamsOrUnit(userAddress), (("User " + toString(userAddress)) + " is not defined"))
190190
191191
192192 let supportedAssetsStr = getStrOrElse(keySupportedRewardAssets(), "")
193193
194194 let supportedAssetsList = split(supportedAssetsStr, "_")
195195
196196 func calcReward (userAddress,assetId,stakedAmountX,depositNumUser,depositNumLast) = {
197197 let rewardPerNsbtSumLastKEY = keyRewardPerNsbtSumAt(depositNumLast, assetId)
198198 let sumLastX18 = parseBigIntValue(getStrOrElse(keyRewardPerNsbtSumAt(depositNumLast, assetId), "0"))
199199 let sumUserX18 = parseBigIntValue(getStrOrElse(keyRewardPerNsbtSumAt(depositNumUser, assetId), "0"))
200200 let rewardDynamicPart = toInt(fraction((sumLastX18 - sumUserX18), stakedAmountX, MULTX18))
201201 let rewardCachedPartKEY = keyReward(userAddress, assetId)
202202 let rewardCachedPart = getIntOrElse(rewardCachedPartKEY, 0)
203203 $Tuple4((rewardCachedPart + rewardDynamicPart), rewardCachedPart, rewardDynamicPart, rewardCachedPartKEY)
204204 }
205205
206206
207207 func RewardEntries (isNewUser,userAddress,stakedAmount) = {
208208 let stakedAmountX = toBigInt(stakedAmount)
209209 let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddress)
210210 let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1)
211211 let depositNumLast = getIntOrElse(keyDepositNumLast(), -1)
212212 func forEachAssetCacheUserReward (accum,asset) = {
213213 let $t084368571 = calcReward(userAddress, asset, stakedAmountX, depositNumUser, depositNumLast)
214214 let rewardTotal = $t084368571._1
215215 let cached = $t084368571._2
216216 let dynamic = $t084368571._3
217217 let rewardCachedPartKEY = $t084368571._4
218218 (accum :+ IntegerEntry(rewardCachedPartKEY, rewardTotal))
219219 }
220220
221221 if (if ((depositNumLast == -1))
222222 then (depositNumUser == -1)
223223 else false)
224224 then nil
225225 else if (if ((depositNumLast == -1))
226226 then (depositNumUser > -1)
227227 else false)
228228 then throw("invalid depositNumLast and depositNumUser state")
229229 else if (if ((depositNumLast > -1))
230230 then (depositNumUser >= -1)
231231 else false)
232232 then if (isNewUser)
233233 then [IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)]
234234 else ({
235235 let $l = supportedAssetsList
236236 let $s = size($l)
237237 let $acc0 = nil
238238 func $f0_1 ($a,$i) = if (($i >= $s))
239239 then $a
240240 else forEachAssetCacheUserReward($a, $l[$i])
241241
242242 func $f0_2 ($a,$i) = if (($i >= $s))
243243 then $a
244244 else throw("List size exceeds 10")
245245
246246 $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)
247247 } :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast))
248248 else throw(((("uncovered condition: depositNumLast=" + toString(depositNumLast)) + " depositNumUser=") + toString(depositNumUser)))
249249 }
250250
251251
252252 func IncrementNotDistributedRewardEntry (tkn,amountInc) = {
253253 let notDistributedRewardKEY = keyNotDistributedReward(tkn)
254254 let notDistributedReward = getIntOrElse(notDistributedRewardKEY, 0)
255255 [IntegerEntry(notDistributedRewardKEY, (notDistributedReward + amountInc))]
256256 }
257257
258258
259259 func surfToGnsbt (surfAmt) = (surfAmt / 60)
260260
261261
262262 func commonStake (userAddress,i) = {
263263 let $t01145511509 = getParamsOrFail()
264264 let stakedAssetId = $t01145511509._1
265265 let minLockAmount = $t01145511509._2
266266 if ((size(i.payments) != 1))
267267 then throw("Invalid payments size")
268268 else {
269269 let payment = i.payments[0]
270270 let amount = payment.amount
271271 let invalidAssetMessage = (("Invalid asset. " + toBase58String(stakedAssetId)) + " is expected")
272272 let assetId = valueOrErrorMessage(payment.assetId, invalidAssetMessage)
273273 if ((assetId != stakedAssetId))
274274 then throw(invalidAssetMessage)
275275 else {
276276 let userAddressStr = toString(userAddress)
277277 let gnsbtAmtUser = 0
278278 let gnsbtAmtTotal = 0
279279 let $t01197812087 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, -1))
280280 let isNewUser = $t01197812087._1
281281 let stakedAmount = $t01197812087._2
282282 let lockStartHeight = $t01197812087._3
283283 let stakedAmountNew = if (isNewUser)
284284 then amount
285285 else (amount + stakedAmount)
286286 let mergedStartHeight = if (isNewUser)
287287 then height
288288 else (height + (1440 * 14))
289289 if ((minLockAmount > stakedAmountNew))
290290 then throw(("Min lock amount is " + toString(minLockAmount)))
291291 else {
292292 let $t01239012492 = StatsResult(amount, 1, if (isNewUser)
293293 then 1
294294 else 0)
295295 let statsEntries = $t01239012492._1
296296 let totalStaked = $t01239012492._2
297297 let totalStakedNew = $t01239012492._3
298298 ((([HistoryRecordEntry("stake", userAddress, i.transactionId, stakedAmount, lockStartHeight, stakedAmountNew, mergedStartHeight)] ++ RewardEntries(isNewUser, userAddressStr, stakedAmount)) ++ LockParamsEntry(userAddress, stakedAmountNew, mergedStartHeight)) ++ statsEntries)
299299 }
300300 }
301301 }
302302 }
303303
304304
305305 func commonClaim (userAddress,i) = {
306306 let userAddressStr = toString(userAddress)
307307 if ((size(i.payments) > 0))
308308 then throw("payments are not accepted")
309309 else {
310310 let $t01296313068 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
311311 let isNewUser = $t01296313068._1
312312 let stakedAmount = $t01296313068._2
313313 let stakingStart = $t01296313068._3
314314 let stakedAmountX = toBigInt(stakedAmount)
315315 let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr)
316316 let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1)
317317 let depositNumLast = getIntOrElse(keyDepositNumLast(), -1)
318318 func forEachAssetCalcUnclaimedReward (accum,asset) = {
319319 let $t01343913577 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
320320 let rewardTotal = $t01343913577._1
321321 let cached = $t01343913577._2
322322 let dynamic = $t01343913577._3
323323 let rewardCachedPartKEY = $t01343913577._4
324324 let claimedKEY = keyClaimed(userAddressStr, asset)
325325 let $t01363713674 = accum
326326 let data = $t01363713674._1
327327 let claimedAmtByAsset = $t01363713674._2
328328 let newPart = makeString([asset, toString(rewardTotal)], ":")
329329 let claimedAmtByAssetNew = makeString([claimedAmtByAsset, newPart], "_")
330330 if ((0 >= rewardTotal))
331331 then $Tuple2(data, claimedAmtByAssetNew)
332332 else $Tuple2((((data :+ ScriptTransfer(userAddress, rewardTotal, toAssetVect(asset))) :+ IntegerEntry(claimedKEY, (valueOrElse(getInteger(claimedKEY), 0) + rewardTotal))) :+ IntegerEntry(rewardCachedPartKEY, 0)), claimedAmtByAssetNew)
333333 }
334334
335335 let $t01413414248 = {
336336 let $l = supportedAssetsList
337337 let $s = size($l)
338338 let $acc0 = $Tuple2(nil, "")
339339 func $f0_1 ($a,$i) = if (($i >= $s))
340340 then $a
341341 else forEachAssetCalcUnclaimedReward($a, $l[$i])
342342
343343 func $f0_2 ($a,$i) = if (($i >= $s))
344344 then $a
345345 else throw("List size exceeds 10")
346346
347347 $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)
348348 }
349349 let transfers = $t01413414248._1
350350 let claimedAmtByAssetResult = $t01413414248._2
351351 if ((0 >= size(transfers)))
352352 then nil
353353 else ((transfers :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)) :+ ClaimHistoryEntry(userAddress, i.transactionId, drop(claimedAmtByAssetResult, 1)))
354354 }
355355 }
356356
357357
358358 @Callable(i)
359359 func constructor (minLockAmount,supportedRewardAssets,stakedAssetId) = if ((i.caller != this))
360360 then throw("Permission denied")
361361 else [IntegerEntry(keyMinLockAmount(), minLockAmount), StringEntry(keySupportedRewardAssets(), supportedRewardAssets), StringEntry(keyStakedAssetId(), stakedAssetId)]
362362
363363
364364
365365 @Callable(i)
366366 func stake () = commonStake(i.caller, i)
367367
368368
369369
370370 @Callable(i)
371371 func stakeByOriginCaller () = commonStake(i.originCaller, i)
372372
373373
374374
375375 @Callable(i)
376376 func unstake (amount) = if ((size(i.payments) != 0))
377377 then throw("unstake doesn't require any payment")
378378 else {
379379 let userAddress = i.caller
380380 let userAddressStr = toString(userAddress)
381381 let $t01515715211 = getParamsOrFail()
382382 let stakedAssetId = $t01515715211._1
383383 let minLockAmount = $t01515715211._2
384384 let $t01521415288 = getUserParamsOrFail(userAddress)
385385 let isNewUser = $t01521415288._1
386386 let lockAmount = $t01521415288._2
387387 let lockStart = $t01521415288._3
388388 if ((0 >= lockAmount))
389389 then throw("Nothing to unstake")
390390 else if ((amount > lockAmount))
391391 then throw(((("Requested " + toString(amount)) + ", but staked only ") + toString(lockAmount)))
392392 else {
393393 let $t01547815632 = StatsResult(-(amount), if ((amount == lockAmount))
394394 then -1
395395 else 0, if ((amount == lockAmount))
396396 then -1
397397 else 0)
398398 let statsEntries = $t01547815632._1
399399 let totalStaked = $t01547815632._2
400400 let totalStakedNew = $t01547815632._3
401401 ((([ScriptTransfer(userAddress, amount, stakedAssetId), HistoryRecordEntry("unstake", userAddress, i.transactionId, lockAmount, lockStart, (lockAmount - amount), lockStart)] ++ RewardEntries(false, userAddressStr, lockAmount)) ++ LockParamsEntry(userAddress, (lockAmount - amount), lockStart)) ++ statsEntries)
402402 }
403403 }
404404
405405
406406
407407 @Callable(i)
408408 func deposit () = if ((size(i.payments) != 1))
409409 then throw("exact 1 payment is allowed only")
410410 else {
411411 let pmt = i.payments[0]
412412 let amount = pmt.amount
413413 let pmtAssetId = valueOrElse(pmt.assetId, WAVESID)
414414 let pmtAssetIdStr = toBase58String(pmtAssetId)
415415 let pmtMultX = if ((pmtAssetId == WAVESID))
416416 then MULTX8
417417 else MULTX6
418418 let amountX = toBigInt(amount)
419419 let totalStaked = getIntOrElse(keyLockParamTotalAmount(), 0)
420420 let totalStakedX = toBigInt(totalStaked)
421421 if ((0 > totalStaked))
422422 then throw("TODO: case is not supported")
423423 else if ((totalStaked == 0))
424424 then IncrementNotDistributedRewardEntry(pmtAssetIdStr, amount)
425425 else {
426426 let rewardPerNsbtX18 = fraction(amountX, MULTX18, totalStakedX)
427427 let depositNumLastKEY = keyDepositNumLast()
428428 let depositNumLast = getIntOrElse(depositNumLastKEY, -1)
429429 let depositNumNew = (depositNumLast + 1)
430430 if (!(contains(supportedAssetsStr, pmtAssetIdStr)))
431431 then throw(((supportedAssetsStr + " doesn't contain ") + pmtAssetIdStr))
432432 else {
433433 func refreshRewardPerNsbtSUM (accum,nextAsset) = {
434434 let rewardPerNsbtSumNewKEY = keyRewardPerNsbtSumAt(depositNumNew, nextAsset)
435435 let sumLastStr = getStrOrElse(keyRewardPerNsbtSumAt(depositNumLast, nextAsset), "0")
436436 (accum :+ (if ((nextAsset == pmtAssetIdStr))
437437 then StringEntry(rewardPerNsbtSumNewKEY, toString((parseBigIntValue(sumLastStr) + rewardPerNsbtX18)))
438438 else StringEntry(rewardPerNsbtSumNewKEY, sumLastStr)))
439439 }
440440
441441 ({
442442 let $l = supportedAssetsList
443443 let $s = size($l)
444444 let $acc0 = nil
445445 func $f0_1 ($a,$i) = if (($i >= $s))
446446 then $a
447447 else refreshRewardPerNsbtSUM($a, $l[$i])
448448
449449 func $f0_2 ($a,$i) = if (($i >= $s))
450450 then $a
451451 else throw("List size exceeds 10")
452452
453453 $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)
454454 } :+ IntegerEntry(depositNumLastKEY, depositNumNew))
455455 }
456456 }
457457 }
458458
459459
460460
461461 @Callable(i)
462462 func claimRewards () = commonClaim(i.caller, i)
463463
464464
465465
466466 @Callable(i)
467467 func claimRewardsByOriginCaller () = commonClaim(i.originCaller, i)
468468
469469
470470
471471 @Callable(i)
472472 func unclaimedRewardsREADONLY (userAddressStr) = {
473473 func forEachAssetZeroReward (accum,asset) = ((accum + makeString([asset, "0", "0"], ":")) + "_")
474474
475475 let unclaimedRewardStr = if ((userAddressStr == ""))
476476 then {
477477 let $l = supportedAssetsList
478478 let $s = size($l)
479479 let $acc0 = ""
480480 func $f0_1 ($a,$i) = if (($i >= $s))
481481 then $a
482482 else forEachAssetZeroReward($a, $l[$i])
483483
484484 func $f0_2 ($a,$i) = if (($i >= $s))
485485 then $a
486486 else throw("List size exceeds 10")
487487
488488 $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)
489489 }
490490 else {
491491 let userAddress = addressFromStringValue(userAddressStr)
492492 let $t01818618291 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
493493 let isNewUser = $t01818618291._1
494494 let stakedAmount = $t01818618291._2
495495 let stakingStart = $t01818618291._3
496496 let stakedAmountX = toBigInt(stakedAmount)
497497 let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr)
498498 let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1)
499499 let depositNumLast = getIntOrElse(keyDepositNumLast(), -1)
500500 func forEachAssetCalcUnclaimedReward (accum,asset) = {
501501 let $t01863718775 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
502502 let rewardTotal = $t01863718775._1
503503 let cached = $t01863718775._2
504504 let dynamic = $t01863718775._3
505505 let rewardCachedPartKEY = $t01863718775._4
506506 let claimed = valueOrElse(getInteger(keyClaimed(userAddressStr, asset)), 0)
507507 ((accum + makeString([asset, toString(rewardTotal), toString(claimed)], ":")) + "_")
508508 }
509509
510510 let $l = supportedAssetsList
511511 let $s = size($l)
512512 let $acc0 = ""
513513 func $f0_1 ($a,$i) = if (($i >= $s))
514514 then $a
515515 else forEachAssetCalcUnclaimedReward($a, $l[$i])
516516
517517 func $f0_2 ($a,$i) = if (($i >= $s))
518518 then $a
519519 else throw("List size exceeds 10")
520520
521521 $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)
522522 }
523523 $Tuple2(nil, dropRight(unclaimedRewardStr, 1))
524524 }
525525
526526
527527
528528 @Callable(i)
529529 func surfStakingSYSREADONLY (userAddressStrOrEmpty) = {
530530 let surfTotal = getIntOrElse(keyLockParamTotalAmount(), 0)
531531 let gnsbtFromSurfTotal = surfToGnsbt(surfTotal)
532532 if ((userAddressStrOrEmpty == ""))
533533 then $Tuple2(nil, [0, surfTotal, 0, gnsbtFromSurfTotal, 0])
534534 else {
535535 let userAddress = toAddressOrFail(userAddressStrOrEmpty)
536536 let $t01946719568 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
537537 let isNewUser = $t01946719568._1
538538 let surfUser = $t01946719568._2
539539 let stakingStart = $t01946719568._3
540540 let gnsbtFromSurfUser = surfToGnsbt(surfUser)
541541 $Tuple2(nil, [surfUser, surfTotal, gnsbtFromSurfUser, gnsbtFromSurfTotal, stakingStart])
542542 }
543543 }
544544
545545
546546
547547 @Callable(i)
548548 func configSYSREADONLY () = {
549549 let minLockAmt = getIntegerValue(keyMinLockAmount())
550550 let gnsbtFromSurfCoeff = (60 * MULT6)
551551 let surfVotingPowerRestrictivePeriod = (1440 * 14)
552552 let brToStartSurfTransformation = 1200000
553553 $Tuple2(nil, [minLockAmt, gnsbtFromSurfCoeff, surfVotingPowerRestrictivePeriod, brToStartSurfTransformation])
554554 }
555555
556556

github/deemru/w8io/026f985 
49.02 ms