tx · 4Vnqz6fqMhAWfNBiEDS2s7rktQBgtxMuB14Yhmy3Qwvy

3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy:  -0.02700000 Waves

2023.03.06 16:04 [2478268] smart account 3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy > SELF 0.00000000 Waves

{ "type": 13, "id": "4Vnqz6fqMhAWfNBiEDS2s7rktQBgtxMuB14Yhmy3Qwvy", "fee": 2700000, "feeAssetId": null, "timestamp": 1678107864684, "version": 2, "chainId": 84, "sender": "3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy", "senderPublicKey": "9W33iCCNfmFxUbiC6XZcH5x7f6xfwC7Jb3BoExT5q2PV", "proofs": [ "4ycA7Uyh11KsiHZCbooPPzgJ6mE2YrGw1xhkYKxDXAfJJ66auijzYuhucSfBggjNWxhui2nhKeu5QDE3581vKFEw" ], "script": "base64:BgKWLwgCEggKBggIAQEBCBIFCgMBCAISAwoBARIDCgEBEgQKAggIEgQKAggIEgMKAQgSAwoBCBIECgIIARIAEgASBQoDCAgEEgMKAQgSBAoCCAgSAwoBCBIAIgNTRVAiBlNDQUxFOCIFTVVMVDgiDlBPT0xXRUlHSFRNVUxUIgd3cmFwRXJyIgNtc2ciCHRocm93RXJyIgRzdHJmIgdhZGRyZXNzIgNrZXkiA2lveiIDaW9kIgpkZWZhdWx0VmFsIgNpb2YiA2FicyIDdmFsIgNhYWwiByRtYXRjaDAiCnZhbEFueUx5c3QiAmFpIgZ2YWxJbnQiG2tleVJlZmVycmFsc0NvbnRyYWN0QWRkcmVzcyIecmVmZXJyYWxzQ29udHJhY3RBZGRyZXNzT3JGYWlsIhZrZXlSZWZlcnJhbFByb2dyYW1OYW1lIhpyZWZlcnJhbFByb2dyYW1OYW1lRGVmYXVsdCITcmVmZXJyYWxQcm9ncmFtTmFtZSIRa2V5RmFjdG9yeUFkZHJlc3MiGElkeEZhY3RvcnlDZmdTdGFraW5nRGFwcCIZSWR4RmFjdG9yeUNm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WaCGhQfAHLmYaagNHp2o6G9AZo7EtkFh Next: FzV24NVEjjqLnb7UqqJizKNRYBRrZELS3FnsSSHSfCUQ Diff:
OldNewDifferences
916916 if ((checkCaller == checkCaller))
917917 then {
918918 let actions = refreshVoteStakedIntegral(lpAssetIdStr, userAddressStr, edge)
919- $Tuple2(nil, unit)
919+ $Tuple2(actions, unit)
920920 }
921921 else throw("Strict value is not equal to itself.")
922922 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 let SCALE8 = 8
77
88 let MULT8 = 100000000
99
1010 let POOLWEIGHTMULT = MULT8
1111
1212 func wrapErr (msg) = makeString(["boosting.ride:", msg], " ")
1313
1414
1515 func throwErr (msg) = throw(wrapErr(msg))
1616
1717
1818 func strf (address,key) = valueOrErrorMessage(getString(address, key), (("mandatory this." + key) + " is not defined"))
1919
2020
2121 func ioz (address,key) = valueOrElse(getInteger(address, key), 0)
2222
2323
2424 func iod (address,key,defaultVal) = valueOrElse(getInteger(address, key), defaultVal)
2525
2626
2727 func iof (address,key) = valueOrErrorMessage(getInteger(address, key), (("mandatory this." + key) + " is not defined"))
2828
2929
3030 func abs (val) = if ((0 > val))
3131 then -(val)
3232 else val
3333
3434
3535 func aal (val) = match val {
3636 case valAnyLyst: List[Any] =>
3737 valAnyLyst
3838 case _ =>
3939 throw("fail to cast into List[Any]")
4040 }
4141
4242
4343 func ai (val) = match val {
4444 case valInt: Int =>
4545 valInt
4646 case _ =>
4747 throw("fail to cast into Int")
4848 }
4949
5050
5151 func keyReferralsContractAddress () = makeString(["%s%s", "config", "referralsContractAddress"], SEP)
5252
5353
5454 let referralsContractAddressOrFail = addressFromStringValue(strf(this, keyReferralsContractAddress()))
5555
5656 let keyReferralProgramName = makeString(["%s%s", "referral", "programName"], SEP)
5757
5858 let referralProgramNameDefault = "wxlock"
5959
6060 let referralProgramName = valueOrElse(getString(this, keyReferralProgramName), referralProgramNameDefault)
6161
6262 func keyFactoryAddress () = "%s%s__config__factoryAddress"
6363
6464
6565 let IdxFactoryCfgStakingDapp = 1
6666
6767 let IdxFactoryCfgBoostingDapp = 2
6868
6969 let IdxFactoryCfgIdoDapp = 3
7070
7171 let IdxFactoryCfgTeamDapp = 4
7272
7373 let IdxFactoryCfgEmissionDapp = 5
7474
7575 let IdxFactoryCfgRestDapp = 6
7676
7777 let IdxFactoryCfgSlippageDapp = 7
7878
7979 let IdxFactoryCfgDaoDapp = 8
8080
8181 let IdxFactoryCfgMarketingDapp = 9
8282
8383 let IdxFactoryCfgGwxRewardDapp = 10
8484
8585 let IdxFactoryCfgBirdsDapp = 11
8686
8787 func keyFactoryCfg () = "%s__factoryConfig"
8888
8989
9090 func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
9191
9292
9393 func keyFactoryLpList () = "%s__lpTokensList"
9494
9595
9696 func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
9797
9898
9999 func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP)
100100
101101
102102 func keyFactoryPoolWeightHistory (poolAddress,num) = ((("%s%s__poolWeight__" + poolAddress) + "__") + toString(num))
103103
104104
105105 func readFactoryAddressOrFail () = addressFromStringValue(strf(this, keyFactoryAddress()))
106106
107107
108108 func readLpList () = split(valueOrElse(getString(readFactoryAddressOrFail(), keyFactoryLpList()), ""), SEP)
109109
110110
111111 func readFactoryCfgOrFail (factory) = split(strf(factory, keyFactoryCfg()), SEP)
112112
113113
114114 func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp])
115115
116116
117117 func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp])
118118
119119
120120 func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp])
121121
122122
123123 func getGwxRewardAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgGwxRewardDapp])
124124
125125
126126 func keyManagerPublicKey () = "%s__managerPublicKey"
127127
128128
129129 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
130130
131131
132132 func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current"
133133
134134
135135 func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current"
136136
137137
138138 func keyEmissionStartBlock () = "%s%s__emission__startBlock"
139139
140140
141141 func keyBoostingV2LastUpdateHeight () = "%s%s__boostingV2__startBlock"
142142
143143
144144 func keyBoostingV2Integral () = "%s%s__boostingV2__integral"
145145
146146
147147 func keyEmissionDurationInBlocks () = "%s%s__emission__duration"
148148
149149
150150 func keyEmissionEndBlock () = "%s%s__emission__endBlock"
151151
152152
153153 func keyNextPeriod () = "%s__nextPeriod"
154154
155155
156156 func keyGwxRewardEmissionStartHeight () = "%s%s__gwxRewardEmissionPart__startHeight"
157157
158158
159159 let IdxCfgAssetId = 1
160160
161161 let IdxCfgMinLockAmount = 2
162162
163163 let IdxCfgMinLockDuration = 3
164164
165165 let IdxCfgMaxLockDuration = 4
166166
167167 let IdxCfgMathContract = 5
168168
169169 func keyConfig () = "%s__config"
170170
171171
172172 func readConfigArrayOrFail () = split(strf(this, keyConfig()), SEP)
173173
174174
175175 let mathContract = addressFromStringValue(readConfigArrayOrFail()[IdxCfgMathContract])
176176
177177 func formatConfigS (assetId,minLockAmount,minLockDuration,maxLockDuration,mathContract) = makeString(["%s%d%d%d", assetId, minLockAmount, minLockDuration, maxLockDuration, mathContract], SEP)
178178
179179
180180 func formatConfig (assetId,minLockAmount,minLockDuration,maxLockDuration,mathContract) = formatConfigS(assetId, toString(minLockAmount), toString(minLockDuration), toString(maxLockDuration), mathContract)
181181
182182
183183 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
184184 case s: String =>
185185 fromBase58String(s)
186186 case _: Unit =>
187187 unit
188188 case _ =>
189189 throw("Match error")
190190 }
191191
192192
193193 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
194194 case s: String =>
195195 fromBase58String(s)
196196 case _: Unit =>
197197 unit
198198 case _ =>
199199 throw("Match error")
200200 }
201201
202202
203203 func mustManager (i) = {
204204 let pd = throw("Permission denied")
205205 match managerPublicKeyOrUnit() {
206206 case pk: ByteVector =>
207207 if ((i.callerPublicKey == pk))
208208 then true
209209 else pd
210210 case _: Unit =>
211211 if ((i.caller == this))
212212 then true
213213 else pd
214214 case _ =>
215215 throw("Match error")
216216 }
217217 }
218218
219219
220220 let IdxLockUserNum = 1
221221
222222 let IdxLockAmount = 2
223223
224224 let IdxLockStart = 3
225225
226226 let IdxLockDuration = 4
227227
228228 let IdxLockParamK = 5
229229
230230 let IdxLockParamB = 6
231231
232232 func keyLockParamsRecord (userAddress) = makeString(["%s%s__lock", userAddress], SEP)
233233
234234
235235 func readLockParamsRecordOrFail (userAddress) = split(strf(this, keyLockParamsRecord(userAddress)), SEP)
236236
237237
238238 func formatLockParamsRecordS (userNum,amount,start,duration,paramK,paramB,lastUpdTimestamp,gwxAmount) = makeString(["%d%d%d%d%d%d%d%d", userNum, amount, start, duration, paramK, paramB, lastUpdTimestamp, gwxAmount], SEP)
239239
240240
241241 func formatLockParamsRecord (userNum,amount,start,duration,paramK,paramB,gwxAmount) = formatLockParamsRecordS(userNum, toString(amount), toString(start), toString(duration), toString(paramK), toString(paramB), toString(lastBlock.timestamp), toString(gwxAmount))
242242
243243
244244 func keyNextUserNum () = "%s__nextUserNum"
245245
246246
247247 func keyUser2NumMapping (userAddress) = makeString(["%s%s%s__mapping__user2num", userAddress], SEP)
248248
249249
250250 func keyNum2UserMapping (num) = makeString(["%s%s%s__mapping__num2user", num], SEP)
251251
252252
253253 func keyLockParamUserAmount (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "amount"], SEP)
254254
255255
256256 func keyLockParamStartBlock (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "start"], SEP)
257257
258258
259259 func keyLockParamDuration (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "duration"], SEP)
260260
261261
262262 func keyLockParamK (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "k"], SEP)
263263
264264
265265 func keyLockParamB (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "b"], SEP)
266266
267267
268268 func keyLockParamByPeriodK (userNum,period) = makeString(["%s%d%s%d__paramByPeriod", userNum, "k", period], SEP)
269269
270270
271271 func keyLockParamByPeriodB (userNum,period) = makeString(["%s%d%s%d__paramByPeriod", userNum, "b", period], SEP)
272272
273273
274274 func keyLockParamTotalAmount () = "%s%s__stats__activeTotalLocked"
275275
276276
277277 func keyStatsLocksDurationSumInBlocks () = "%s%s__stats__locksDurationSumInBlocks"
278278
279279
280280 func keyStatsLocksCount () = "%s%s__stats__locksCount"
281281
282282
283283 func keyStatsUsersCount () = "%s%s__stats__activeUsersCount"
284284
285285
286286 func keyUserBoostEmissionLastINTEGRAL (userNum) = makeString(["%s%d__userBoostEmissionLastIntV2", userNum], SEP)
287287
288288
289289 func keyUserLpBoostEmissionLastINTEGRAL (userNum,lpAssetId) = makeString(["%s%d__userBoostEmissionLastIntV2", userNum, lpAssetId], SEP)
290290
291291
292292 func keyUserMaxBoostINTEGRAL (userNum) = makeString(["%s%d__maxBoostInt", userNum], SEP)
293293
294294
295295 func keyTotalMaxBoostINTEGRAL () = "%s%s__maxBoostInt__total"
296296
297297
298298 func keyUserBoostAvalaibleToClaimTotal (userNum) = makeString(["%s%d__userBoostAvaliableToClaimTotal", userNum], SEP)
299299
300300
301301 func keyUserBoostClaimed (userNum) = makeString(["%s%d__userBoostClaimed", userNum], SEP)
302302
303303
304304 func keyTotalCachedGwx () = "%s%s__gwxCached__total"
305305
306306
307307 func keyTotalCachedGwxCorrective () = "%s__gwxCachedTotalCorrective"
308308
309309
310310 let factoryContract = readFactoryAddressOrFail()
311311
312312 let factoryCfg = readFactoryCfgOrFail(factoryContract)
313313
314314 let emissionContract = getEmissionAddressOrFail(factoryCfg)
315315
316316 let stakingContract = getStakingAddressOrFail(factoryCfg)
317317
318318 let gwxRewardContract = getGwxRewardAddressOrFail(factoryCfg)
319319
320320 let keyVotingEmissionContract = makeString(["%s", "votingEmissionContract"], SEP)
321321
322322 let votingEmissionContract = addressFromStringValue(getStringValue(factoryContract, keyVotingEmissionContract))
323323
324324 let boostCoeff = {
325325 let @ = invoke(emissionContract, "getBoostCoeffREADONLY", nil, nil)
326326 if ($isInstanceOf(@, "Int"))
327327 then @
328328 else throw(($getType(@) + " couldn't be cast to Int"))
329329 }
330330
331331 func getTotalCachedGwx (correct) = {
332332 let keyCurrentEpochUi = makeString(["%s", "currentEpochUi"], SEP)
333333 let currentEpochUi = getIntegerValue(votingEmissionContract, keyCurrentEpochUi)
334334 let keyTargetEpoch = makeString(["%s%s", "totalCachedGwxCorrection__activationEpoch"], SEP)
335335 let targetEpochOption = getInteger(this, keyTargetEpoch)
336336 let totalCachedGwxRaw = valueOrElse(getInteger(this, keyTotalCachedGwx()), 0)
337337 let isCorrectionActivated = if (isDefined(targetEpochOption))
338338 then (currentEpochUi >= value(targetEpochOption))
339339 else false
340340 let corrective = if (if (isCorrectionActivated)
341341 then correct
342342 else false)
343343 then valueOrElse(getInteger(this, keyTotalCachedGwxCorrective()), 0)
344344 else 0
345345 max([0, (totalCachedGwxRaw + corrective)])
346346 }
347347
348348
349349 func HistoryEntry (type,user,amount,lockStart,duration,k,b,i) = {
350350 let historyKEY = makeString(["%s%s%s%s__history", type, user, toBase58String(i.transactionId)], SEP)
351351 let historyDATA = makeString(["%d%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(amount), toString(lockStart), toString(duration), toString(k), toString(b)], SEP)
352352 StringEntry(historyKEY, historyDATA)
353353 }
354354
355355
356356 func StatsEntry (totalLockedInc,durationInc,lockCountInc,usersCountInc) = {
357357 let locksDurationSumInBlocksKEY = keyStatsLocksDurationSumInBlocks()
358358 let locksCountKEY = keyStatsLocksCount()
359359 let usersCountKEY = keyStatsUsersCount()
360360 let totalAmountKEY = keyLockParamTotalAmount()
361361 let locksDurationSumInBlocks = ioz(this, locksDurationSumInBlocksKEY)
362362 let locksCount = ioz(this, locksCountKEY)
363363 let usersCount = ioz(this, usersCountKEY)
364364 let totalAmount = ioz(this, totalAmountKEY)
365365 [IntegerEntry(locksDurationSumInBlocksKEY, (locksDurationSumInBlocks + durationInc)), IntegerEntry(locksCountKEY, (locksCount + lockCountInc)), IntegerEntry(usersCountKEY, (usersCount + usersCountInc)), IntegerEntry(totalAmountKEY, (totalAmount + totalLockedInc))]
366366 }
367367
368368
369369 func calcGwxAmount (kRaw,bRaw,h) = {
370370 let SCALE = 1000
371371 (((kRaw * h) + bRaw) / SCALE)
372372 }
373373
374374
375375 func LockParamsEntry (userAddress,userNum,amount,start,duration,k,b,period) = {
376376 let userAmountKEY = keyLockParamUserAmount(userNum)
377377 let startBlockKEY = keyLockParamStartBlock(userNum)
378378 let durationKEY = keyLockParamDuration(userNum)
379379 let kKEY = keyLockParamK(userNum)
380380 let bKEY = keyLockParamB(userNum)
381381 let kByPeriodKEY = keyLockParamByPeriodK(userNum, period)
382382 let bByPeriodKEY = keyLockParamByPeriodB(userNum, period)
383383 let gwxAmount = calcGwxAmount(k, b, height)
384384 [IntegerEntry(userAmountKEY, amount), IntegerEntry(startBlockKEY, start), IntegerEntry(durationKEY, duration), IntegerEntry(kKEY, k), IntegerEntry(bKEY, b), IntegerEntry(kByPeriodKEY, k), IntegerEntry(bByPeriodKEY, b), StringEntry(keyLockParamsRecord(userAddress), formatLockParamsRecord(userNum, amount, start, duration, k, b, gwxAmount))]
385385 }
386386
387387
388388 func extractOptionalPaymentAmountOrFail (i,expectedAssetId) = if ((size(i.payments) > 1))
389389 then throw("only one payment is allowed")
390390 else if ((size(i.payments) == 0))
391391 then 0
392392 else {
393393 let pmt = i.payments[0]
394394 if ((value(pmt.assetId) != expectedAssetId))
395395 then throw("invalid asset id in payment")
396396 else pmt.amount
397397 }
398398
399399
400400 func calcUserGwxAmountAtHeight (userAddress,targetHeight) = {
401401 let EMPTY = "empty"
402402 let user2NumMappingKEY = keyUser2NumMapping(userAddress)
403403 let userNum = valueOrElse(getString(user2NumMappingKEY), EMPTY)
404404 let k = valueOrElse(getInteger(keyLockParamK(userNum)), 0)
405405 let b = valueOrElse(getInteger(keyLockParamB(userNum)), 0)
406406 let gwxAmountCalc = calcGwxAmount(k, b, targetHeight)
407407 let gwxAmount = if ((0 > gwxAmountCalc))
408408 then 0
409409 else gwxAmountCalc
410410 gwxAmount
411411 }
412412
413413
414414 func calcCurrentGwxAmount (userAddress) = calcUserGwxAmountAtHeight(userAddress, height)
415415
416416
417417 func getVotingEmissionEpochInfo () = {
418418 let keyCurrentEpochUi = makeString(["%s", "currentEpochUi"], SEP)
419419 let $t01483815126 = {
420420 let currentEpochUi = value(getInteger(votingEmissionContract, keyCurrentEpochUi))
421421 let lastFinalizedEpoch = (currentEpochUi - 1)
422422 if ((0 > lastFinalizedEpoch))
423423 then throwErr("invalid epoch")
424424 else $Tuple2(currentEpochUi, lastFinalizedEpoch)
425425 }
426426 let currentEpochUi = $t01483815126._1
427427 let lastFinalizedEpoch = $t01483815126._2
428428 func keyStartHeightByEpoch (epoch) = makeString(["%s%d", "startHeight", toString(epoch)], SEP)
429429
430430 let currentEpochStartHeight = value(getInteger(votingEmissionContract, keyStartHeightByEpoch(currentEpochUi)))
431431 $Tuple2(lastFinalizedEpoch, currentEpochStartHeight)
432432 }
433433
434434
435435 func getPoolAssetsByLpAssetId (lpAssetIdStr) = {
436436 let idxAmountAssetId = 4
437437 let idxPriceAssetId = 5
438438 let poolCfg = {
439439 let @ = invoke(factoryContract, "getPoolConfigByLpAssetId", [lpAssetIdStr], nil)
440440 if ($isInstanceOf(@, "List[Any]"))
441441 then @
442442 else throw(($getType(@) + " couldn't be cast to List[Any]"))
443443 }
444444 let amountAssetId = {
445445 let @ = poolCfg[idxAmountAssetId]
446446 if ($isInstanceOf(@, "String"))
447447 then @
448448 else throw(($getType(@) + " couldn't be cast to String"))
449449 }
450450 let priceAssetId = {
451451 let @ = poolCfg[idxPriceAssetId]
452452 if ($isInstanceOf(@, "String"))
453453 then @
454454 else throw(($getType(@) + " couldn't be cast to String"))
455455 }
456456 $Tuple2(amountAssetId, priceAssetId)
457457 }
458458
459459
460460 func keyVote (amountAssetId,priceAssetId,address,epoch) = makeString(["%s%s%s%s%d", "vote", amountAssetId, priceAssetId, toString(address), toString(epoch)], SEP)
461461
462462
463463 func keyVotingResultStaked (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStaked", lpAssetIdStr, toString(epoch)], SEP)
464464
465465
466466 func keyVotingResultStakedIntegral (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStakedIntegral", lpAssetIdStr, toString(epoch)], SEP)
467467
468468
469469 func keyVotingResultStakedLastUpdateHeight (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStakedIntegralLastUpdateHeight", lpAssetIdStr, toString(epoch)], SEP)
470470
471471
472472 func keyVotingResultStakedIntegralLast (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "votingResultStakedIntegralLast", lpAssetIdStr, toString(address), toString(epoch)], SEP)
473473
474474
475475 func keyVoteStakedIntegral (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "voteStakedIntegral", lpAssetIdStr, toString(address), toString(epoch)], SEP)
476476
477477
478478 func keyVoteStakedLastUpdateHeight (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "voteStakedIntegralLastUpdateHeight", lpAssetIdStr, toString(address), toString(epoch)], SEP)
479479
480480
481481 func keyVoteStakedIntegralLast (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "voteStakedIntegralLast", lpAssetIdStr, toString(address), toString(epoch)], SEP)
482482
483483
484484 func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s", "staked", userAddressStr, lpAssetIdStr], SEP)
485485
486486
487487 func getUserVoteFinalized (lpAssetIdStr,userAddressStr) = {
488488 let userAddress = addressFromStringValue(userAddressStr)
489489 let $t01791617996 = getVotingEmissionEpochInfo()
490490 let lastFinalizedEpoch = $t01791617996._1
491491 let currentEpochStartHeight = $t01791617996._2
492492 let $t01799918074 = getPoolAssetsByLpAssetId(lpAssetIdStr)
493493 let amountAssetId = $t01799918074._1
494494 let priceAssetId = $t01799918074._2
495495 let userVoteKey = keyVote(amountAssetId, priceAssetId, userAddress, lastFinalizedEpoch)
496496 let userVote = valueOrElse(getInteger(votingEmissionContract, userVoteKey), 0)
497497 userVote
498498 }
499499
500500
501501 func getUserVoteStaked (lpAssetIdStr,userAddressStr) = {
502502 let stakedByUser = valueOrElse(getInteger(stakingContract, keyStakedByUser(userAddressStr, lpAssetIdStr)), 0)
503503 let userVote = getUserVoteFinalized(lpAssetIdStr, userAddressStr)
504504 if ((stakedByUser == 0))
505505 then 0
506506 else userVote
507507 }
508508
509509
510510 func getVotingResultStaked (lpAssetIdStr) = {
511511 let $t01861818698 = getVotingEmissionEpochInfo()
512512 let lastFinalizedEpoch = $t01861818698._1
513513 let currentEpochStartHeight = $t01861818698._2
514514 let votingResultStakedStart = valueOrElse(getInteger(votingEmissionContract, keyVotingResultStaked(lpAssetIdStr, lastFinalizedEpoch)), 0)
515515 let votingResultStaked = valueOrElse(getInteger(this, keyVotingResultStaked(lpAssetIdStr, lastFinalizedEpoch)), votingResultStakedStart)
516516 votingResultStaked
517517 }
518518
519519
520520 func refreshVotingResultStakedIntegral (lpAssetIdStr,stakedVoteDelta) = {
521521 let $t01921919299 = getVotingEmissionEpochInfo()
522522 let lastFinalizedEpoch = $t01921919299._1
523523 let currentEpochStartHeight = $t01921919299._2
524524 let votingResultStaked = getVotingResultStaked(lpAssetIdStr)
525525 let votingResultStakedNew = (votingResultStaked + stakedVoteDelta)
526526 let votingResultStakedIntegralKey = keyVotingResultStakedIntegral(lpAssetIdStr, lastFinalizedEpoch)
527527 let votingResultStakedIntegralPrev = valueOrElse(getInteger(this, votingResultStakedIntegralKey), 0)
528528 let votingResultLastUpdateHeightKey = keyVotingResultStakedLastUpdateHeight(lpAssetIdStr, lastFinalizedEpoch)
529529 let votingResultStakedLastUpdateHeight = valueOrElse(getInteger(this, votingResultLastUpdateHeightKey), currentEpochStartHeight)
530530 let votingResultStakedIntegralDh = (height - votingResultStakedLastUpdateHeight)
531531 let votingResultStakedIntegral = ((votingResultStakedIntegralDh * votingResultStaked) + votingResultStakedIntegralPrev)
532532 $Tuple2([IntegerEntry(keyVotingResultStaked(lpAssetIdStr, lastFinalizedEpoch), votingResultStakedNew), IntegerEntry(votingResultLastUpdateHeightKey, height), IntegerEntry(votingResultStakedIntegralKey, votingResultStakedIntegral)], votingResultStakedIntegral)
533533 }
534534
535535
536536 func refreshVoteStakedIntegral (lpAssetIdStr,userAddressStr,edge) = {
537537 let $t02049920579 = getVotingEmissionEpochInfo()
538538 let lastFinalizedEpoch = $t02049920579._1
539539 let currentEpochStartHeight = $t02049920579._2
540540 let userAddress = addressFromStringValue(userAddressStr)
541541 let idxAmountAssetId = 4
542542 let idxPriceAssetId = 5
543543 let poolCfg = {
544544 let @ = invoke(factoryContract, "getPoolConfigByLpAssetId", [lpAssetIdStr], nil)
545545 if ($isInstanceOf(@, "List[Any]"))
546546 then @
547547 else throw(($getType(@) + " couldn't be cast to List[Any]"))
548548 }
549549 let amountAssetId = {
550550 let @ = poolCfg[idxAmountAssetId]
551551 if ($isInstanceOf(@, "String"))
552552 then @
553553 else throw(($getType(@) + " couldn't be cast to String"))
554554 }
555555 let priceAssetId = {
556556 let @ = poolCfg[idxPriceAssetId]
557557 if ($isInstanceOf(@, "String"))
558558 then @
559559 else throw(($getType(@) + " couldn't be cast to String"))
560560 }
561561 let userVote = valueOrElse(getInteger(votingEmissionContract, keyVote(amountAssetId, priceAssetId, userAddress, lastFinalizedEpoch)), 0)
562562 let actions = if ((userVote == 0))
563563 then nil
564564 else {
565565 let stakedVoteDelta = if (edge)
566566 then userVote
567567 else -(userVote)
568568 let $t02118421303 = refreshVotingResultStakedIntegral(lpAssetIdStr, stakedVoteDelta)
569569 let votingResultActions = $t02118421303._1
570570 let votingResultStakedIntegral = $t02118421303._2
571571 let userVoteStaked = if (edge)
572572 then 0
573573 else userVote
574574 let userVoteStakedIntegralKey = keyVoteStakedIntegral(lpAssetIdStr, userAddress, lastFinalizedEpoch)
575575 let userVoteStakedIntegralPrev = valueOrElse(getInteger(this, userVoteStakedIntegralKey), 0)
576576 let userVoteStakedLastUpdateHeightKey = keyVoteStakedLastUpdateHeight(lpAssetIdStr, userAddress, lastFinalizedEpoch)
577577 let userVoteStakedLastUpdateHeight = valueOrElse(getInteger(this, userVoteStakedLastUpdateHeightKey), currentEpochStartHeight)
578578 let userVoteStakedIntegralDh = (height - userVoteStakedLastUpdateHeight)
579579 let userVoteStakedIntegral = ((userVoteStakedIntegralDh * userVoteStaked) + userVoteStakedIntegralPrev)
580580 let voteActions = [IntegerEntry(userVoteStakedLastUpdateHeightKey, height), IntegerEntry(userVoteStakedIntegralKey, userVoteStakedIntegral)]
581581 (votingResultActions ++ voteActions)
582582 }
583583 actions
584584 }
585585
586586
587587 func getStakedVotesIntegralsDiff (lpAssetIdStr,userAddressStr) = {
588588 let $t02229522375 = getVotingEmissionEpochInfo()
589589 let lastFinalizedEpoch = $t02229522375._1
590590 let currentEpochStartHeight = $t02229522375._2
591591 let userAddress = addressFromStringValue(userAddressStr)
592592 let userVoteStaked = getUserVoteStaked(lpAssetIdStr, userAddressStr)
593593 let votingResultStaked = getVotingResultStaked(lpAssetIdStr)
594594 let userVoteStakedIntegralPrev = valueOrElse(getInteger(this, keyVoteStakedIntegral(lpAssetIdStr, userAddress, lastFinalizedEpoch)), 0)
595595 let votingResultStakedIntegralPrev = valueOrElse(getInteger(this, keyVotingResultStakedIntegral(lpAssetIdStr, lastFinalizedEpoch)), 0)
596596 let userVoteStakedLastUpdateHeight = valueOrElse(getInteger(this, keyVoteStakedLastUpdateHeight(lpAssetIdStr, userAddress, lastFinalizedEpoch)), currentEpochStartHeight)
597597 let votingResultStakedLastUpdateHeight = valueOrElse(getInteger(this, keyVotingResultStakedLastUpdateHeight(lpAssetIdStr, lastFinalizedEpoch)), currentEpochStartHeight)
598598 let userVoteStakedIntegralKey = keyVoteStakedIntegralLast(lpAssetIdStr, userAddress, lastFinalizedEpoch)
599599 let userVoteStakedIntegralLast = valueOrElse(getInteger(this, userVoteStakedIntegralKey), 0)
600600 let votingResultStakedIntegralKey = keyVotingResultStakedIntegralLast(lpAssetIdStr, userAddress, lastFinalizedEpoch)
601601 let votingResultStakedIntegralLast = valueOrElse(getInteger(this, votingResultStakedIntegralKey), 0)
602602 let userVoteStakedIntegralDh = (height - userVoteStakedLastUpdateHeight)
603603 let votingResultStakedIntegralDh = (height - votingResultStakedLastUpdateHeight)
604604 let userVoteStakedIntegral = ((userVoteStakedIntegralDh * userVoteStaked) + userVoteStakedIntegralPrev)
605605 let votingResultStakedIntegral = ((votingResultStakedIntegralDh * votingResultStaked) + votingResultStakedIntegralPrev)
606606 let userVoteStakedIntegralDiff = (userVoteStakedIntegral - userVoteStakedIntegralLast)
607607 let votingResultStakedIntegralDiff = (votingResultStakedIntegral - votingResultStakedIntegralLast)
608608 $Tuple3([IntegerEntry(userVoteStakedIntegralKey, userVoteStakedIntegral), IntegerEntry(votingResultStakedIntegralKey, votingResultStakedIntegral)], userVoteStakedIntegralDiff, votingResultStakedIntegralDiff)
609609 }
610610
611611
612612 func refreshBoostEmissionIntegral () = {
613613 let wxEmissionPerBlock = iof(emissionContract, keyEmissionRatePerBlockCurrent())
614614 let boostingV2LastUpdateHeightOption = getInteger(emissionContract, keyBoostingV2LastUpdateHeight())
615615 let boostingV2IngergalOption = getInteger(this, keyBoostingV2Integral())
616616 let emissionEnd = iof(emissionContract, keyEmissionEndBlock())
617617 let h = if ((height > emissionEnd))
618618 then emissionEnd
619619 else height
620620 let dh = match boostingV2LastUpdateHeightOption {
621621 case lastUpdateHeight: Int =>
622622 max([(h - lastUpdateHeight), 0])
623623 case _: Unit =>
624624 0
625625 case _ =>
626626 throw("Match error")
627627 }
628628 let boostEmissionPerBlock = ((wxEmissionPerBlock * (boostCoeff - 1)) / boostCoeff)
629629 let boostEmissionIntegralPrev = valueOrElse(boostingV2IngergalOption, 0)
630630 let boostEmissionIntegral = ((boostEmissionPerBlock * dh) + boostEmissionIntegralPrev)
631631 $Tuple2([IntegerEntry(keyBoostingV2Integral(), boostEmissionIntegral), IntegerEntry(keyBoostingV2LastUpdateHeight(), height)], boostEmissionIntegral)
632632 }
633633
634634
635635 func internalClaimWxBoost (lpAssetIdStr,userAddressStr,readOnly) = {
636636 let userRecordOption = getString(this, keyLockParamsRecord(userAddressStr))
637637 if ((userRecordOption == unit))
638638 then $Tuple3(0, nil, "userRecord::is::empty")
639639 else {
640640 let userRecordArray = split(value(userRecordOption), SEP)
641641 let userNumStr = userRecordArray[IdxLockUserNum]
642642 let EMPTYSTR = "empty"
643643 let poolWeight = if ((lpAssetIdStr != EMPTYSTR))
644644 then {
645645 let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
646646 getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr))
647647 }
648648 else if (readOnly)
649649 then 0
650650 else throw(("not readonly mode: unsupported lp asset " + lpAssetIdStr))
651651 let userLpBoostEmissionLastIntegralKEY = keyUserLpBoostEmissionLastINTEGRAL(userNumStr, lpAssetIdStr)
652652 let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNumStr)
653653 let userBoostEmissionLastIntegral = valueOrElse(getInteger(this, userLpBoostEmissionLastIntegralKEY), ioz(this, userBoostEmissionLastIntegralKEY))
654654 let boostEmissionIntegral = refreshBoostEmissionIntegral()._2
655655 let userBoostEmissionIntegral = (boostEmissionIntegral - userBoostEmissionLastIntegral)
656656 if ((0 > userBoostEmissionIntegral))
657657 then throw("wrong calculations")
658658 else {
659659 let $t02690027039 = getStakedVotesIntegralsDiff(lpAssetIdStr, userAddressStr)
660660 let stakedVotesIntegralsActions = $t02690027039._1
661661 let userVoteIntegralDiff = $t02690027039._2
662662 let totalVotesIntegralDiff = $t02690027039._3
663663 let poolUserBoostEmissionIntegral = fraction(userBoostEmissionIntegral, poolWeight, POOLWEIGHTMULT)
664664 let userBoostAvaliableToClaimTotalNew = if ((totalVotesIntegralDiff == 0))
665665 then 0
666666 else fraction(poolUserBoostEmissionIntegral, userVoteIntegralDiff, totalVotesIntegralDiff)
667667 let dataState = ([IntegerEntry(userLpBoostEmissionLastIntegralKEY, boostEmissionIntegral)] ++ stakedVotesIntegralsActions)
668668 let debug = makeString([toString(userBoostEmissionLastIntegral), toString(userBoostEmissionIntegral), toString(poolWeight), toString(userVoteIntegralDiff), toString(totalVotesIntegralDiff)], ":")
669669 $Tuple3(userBoostAvaliableToClaimTotalNew, dataState, debug)
670670 }
671671 }
672672 }
673673
674674
675675 func lockActions (i,duration) = {
676676 let cfgArray = readConfigArrayOrFail()
677677 let assetIdStr = cfgArray[IdxCfgAssetId]
678678 let assetId = fromBase58String(assetIdStr)
679679 let minLockAmount = parseIntValue(cfgArray[IdxCfgMinLockAmount])
680680 let minLockDuration = parseIntValue(cfgArray[IdxCfgMinLockDuration])
681681 let maxLockDuration = parseIntValue(cfgArray[IdxCfgMaxLockDuration])
682682 if ((size(i.payments) != 1))
683683 then throw("invalid payment - exact one payment must be attached")
684684 else {
685685 let pmt = i.payments[0]
686686 let pmtAmount = pmt.amount
687687 if ((assetId != value(pmt.assetId)))
688688 then throw((("invalid asset is in payment - " + assetIdStr) + " is expected"))
689689 else {
690690 let nextUserNumKEY = keyNextUserNum()
691691 let userAddressStr = toString(i.caller)
692692 let userIsExisting = isDefined(getString(keyUser2NumMapping(userAddressStr)))
693693 let userNumStr = if (userIsExisting)
694694 then value(getString(keyUser2NumMapping(userAddressStr)))
695695 else toString(iof(this, nextUserNumKEY))
696696 let userNum = parseIntValue(userNumStr)
697697 let lockStart = height
698698 let startBlockKEY = keyLockParamStartBlock(userNumStr)
699699 let durationKEY = keyLockParamDuration(userNumStr)
700700 let userAmountKEY = keyLockParamUserAmount(userNumStr)
701701 if ((minLockAmount > pmtAmount))
702702 then throw(("amount is less then minLockAmount=" + toString(minLockAmount)))
703703 else if ((minLockDuration > duration))
704704 then throw(("passed duration is less then minLockDuration=" + toString(minLockDuration)))
705705 else if ((duration > maxLockDuration))
706706 then throw(("passed duration is greater then maxLockDuration=" + toString(maxLockDuration)))
707707 else if (if (userIsExisting)
708708 then ((iof(this, startBlockKEY) + iof(this, durationKEY)) >= lockStart)
709709 else false)
710710 then throw("there is an active lock - consider to use increaseLock")
711711 else if ((ioz(this, userAmountKEY) > 0))
712712 then throw(("there are locked WXs - consider to use increaseLock " + userAmountKEY))
713713 else {
714714 let coeffX8 = fraction(duration, MULT8, maxLockDuration)
715715 let gWxAmountStart = fraction(pmtAmount, coeffX8, MULT8)
716716 let gWxParamsResultList = aal(invoke(mathContract, "calcGwxParamsREADONLY", [gWxAmountStart, lockStart, duration], nil))
717717 let k = ai(gWxParamsResultList[0])
718718 let b = ai(gWxParamsResultList[1])
719719 let period = toString(ai(gWxParamsResultList[2]))
720720 let totalCachedGwxRaw = getTotalCachedGwx(false)
721721 let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNumStr)
722722 let boostEmissionIntegral = refreshBoostEmissionIntegral()._2
723723 let arr = if (userIsExisting)
724724 then nil
725725 else [IntegerEntry(nextUserNumKEY, (userNum + 1)), StringEntry(keyUser2NumMapping(userAddressStr), userNumStr), StringEntry(keyNum2UserMapping(userNumStr), userAddressStr)]
726726 $Tuple2(((((arr ++ LockParamsEntry(userAddressStr, userNumStr, pmtAmount, lockStart, duration, k, b, period)) ++ StatsEntry(pmtAmount, duration, 1, if (userIsExisting)
727727 then 0
728728 else 1)) :+ HistoryEntry("lock", userAddressStr, pmtAmount, lockStart, duration, k, b, i)) ++ [IntegerEntry(userBoostEmissionLastIntegralKEY, boostEmissionIntegral), IntegerEntry(keyTotalCachedGwx(), (totalCachedGwxRaw + gWxAmountStart))]), gWxAmountStart)
729729 }
730730 }
731731 }
732732 }
733733
734734
735735 @Callable(i)
736736 func constructor (factoryAddressStr,lockAssetIdStr,minLockAmount,minDuration,maxDuration,mathContract) = {
737737 let checkCaller = mustManager(i)
738738 if ((checkCaller == checkCaller))
739739 then ([IntegerEntry(keyNextUserNum(), 0), StringEntry(keyConfig(), formatConfig(lockAssetIdStr, minLockAmount, minDuration, maxDuration, mathContract)), StringEntry(keyFactoryAddress(), factoryAddressStr)] ++ StatsEntry(0, 0, 0, 0))
740740 else throw("Strict value is not equal to itself.")
741741 }
742742
743743
744744
745745 @Callable(i)
746746 func lockRef (duration,referrerAddress,signature) = {
747747 let $t03158931654 = lockActions(i, duration)
748748 let lockActionsResult = $t03158931654._1
749749 let gWxAmountStart = $t03158931654._2
750750 let referralAddress = toString(i.caller)
751751 let refInv = if (if ((referrerAddress == ""))
752752 then true
753753 else (signature == base58''))
754754 then unit
755755 else invoke(referralsContractAddressOrFail, "createPair", [referralProgramName, referrerAddress, referralAddress, signature], nil)
756756 if ((refInv == refInv))
757757 then {
758758 let updateRefActivity = invoke(mathContract, "updateReferralActivity", [toString(i.caller), gWxAmountStart], nil)
759759 if ((updateRefActivity == updateRefActivity))
760760 then $Tuple2(lockActionsResult, unit)
761761 else throw("Strict value is not equal to itself.")
762762 }
763763 else throw("Strict value is not equal to itself.")
764764 }
765765
766766
767767
768768 @Callable(i)
769769 func lock (duration) = {
770770 let $t03211232177 = lockActions(i, duration)
771771 let lockActionsResult = $t03211232177._1
772772 let gWxAmountStart = $t03211232177._2
773773 let updateRefActivity = invoke(mathContract, "updateReferralActivity", [toString(i.caller), gWxAmountStart], nil)
774774 if ((updateRefActivity == updateRefActivity))
775775 then $Tuple2(lockActionsResult, unit)
776776 else throw("Strict value is not equal to itself.")
777777 }
778778
779779
780780
781781 @Callable(i)
782782 func increaseLock (deltaDuration) = {
783783 let cfgArray = readConfigArrayOrFail()
784784 let assetIdStr = cfgArray[IdxCfgAssetId]
785785 let assetId = fromBase58String(assetIdStr)
786786 let minLockDuration = parseIntValue(cfgArray[IdxCfgMinLockDuration])
787787 let maxLockDuration = parseIntValue(cfgArray[IdxCfgMaxLockDuration])
788788 let pmtAmount = extractOptionalPaymentAmountOrFail(i, assetId)
789789 let userAddressStr = toString(i.caller)
790790 let userRecordArray = readLockParamsRecordOrFail(userAddressStr)
791791 let userNumStr = userRecordArray[IdxLockUserNum]
792792 let userAmount = parseIntValue(userRecordArray[IdxLockAmount])
793793 let lockStart = parseIntValue(userRecordArray[IdxLockStart])
794794 let lockDuration = parseIntValue(userRecordArray[IdxLockDuration])
795795 let lockEnd = (lockStart + lockDuration)
796796 let remainingDuration = max([(lockEnd - height), 0])
797797 let userAmountNew = (userAmount + pmtAmount)
798798 let lockDurationNew = (remainingDuration + deltaDuration)
799799 if ((0 > deltaDuration))
800800 then throw("duration is less then zero")
801801 else if ((minLockDuration > lockDurationNew))
802802 then throw(("lockDurationNew is less then minLockDuration=" + toString(minLockDuration)))
803803 else if ((lockDurationNew > maxLockDuration))
804804 then throw(("deltaDuration + existedLockDuration is greater then maxLockDuration=" + toString(maxLockDuration)))
805805 else {
806806 let coeffX8 = fraction(lockDurationNew, MULT8, maxLockDuration)
807807 let gWxAmountStart = fraction(userAmountNew, coeffX8, MULT8)
808808 let updateRefActivity = invoke(mathContract, "updateReferralActivity", [toString(i.caller), gWxAmountStart], nil)
809809 if ((updateRefActivity == updateRefActivity))
810810 then {
811811 let lockStartNew = height
812812 let gWxParamsResultList = aal(invoke(mathContract, "calcGwxParamsREADONLY", [gWxAmountStart, lockStartNew, lockDurationNew], nil))
813813 let k = ai(gWxParamsResultList[0])
814814 let b = ai(gWxParamsResultList[1])
815815 let period = toString(ai(gWxParamsResultList[2]))
816816 let currUserGwx = calcCurrentGwxAmount(userAddressStr)
817817 let gwxDiff = (gWxAmountStart - currUserGwx)
818818 if ((0 > gwxDiff))
819819 then throw(("gwxDiff is less then 0: " + toString(gwxDiff)))
820820 else {
821821 let totalCachedGwxRaw = getTotalCachedGwx(false)
822822 let totalCachedGwxCorrected = getTotalCachedGwx(true)
823823 (((LockParamsEntry(userAddressStr, userNumStr, userAmountNew, lockStartNew, lockDurationNew, k, b, period) ++ StatsEntry(pmtAmount, deltaDuration, 0, 0)) :+ HistoryEntry("lock", userAddressStr, pmtAmount, lockStart, lockDurationNew, k, b, i)) ++ [IntegerEntry(keyTotalCachedGwx(), (totalCachedGwxRaw + gwxDiff))])
824824 }
825825 }
826826 else throw("Strict value is not equal to itself.")
827827 }
828828 }
829829
830830
831831
832832 @Callable(i)
833833 func claimWxBoost (lpAssetIdStr,userAddressStr) = if ((stakingContract != i.caller))
834834 then throw("permissions denied")
835835 else {
836836 let $t03526435366 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false)
837837 let userBoostAvailable = $t03526435366._1
838838 let dataState = $t03526435366._2
839839 let debug = $t03526435366._3
840840 $Tuple2(dataState, [userBoostAvailable])
841841 }
842842
843843
844844
845845 @Callable(i)
846846 func claimWxBoostREADONLY (lpAssetIdStr,userAddressStr) = {
847847 let $t03549835599 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true)
848848 let userBoostAvailable = $t03549835599._1
849849 let dataState = $t03549835599._2
850850 let debug = $t03549835599._3
851851 $Tuple2(nil, [userBoostAvailable, debug])
852852 }
853853
854854
855855
856856 @Callable(i)
857857 func unlock (userAddress) = {
858858 let userRecordArray = readLockParamsRecordOrFail(userAddress)
859859 let userNumStr = userRecordArray[IdxLockUserNum]
860860 let userAmount = parseIntValue(userRecordArray[IdxLockAmount])
861861 let lockStart = parseIntValue(userRecordArray[IdxLockStart])
862862 let lockDuration = parseIntValue(userRecordArray[IdxLockDuration])
863863 let lockEnd = (lockStart + lockDuration)
864864 let cfgArray = readConfigArrayOrFail()
865865 let assetId = fromBase58String(cfgArray[IdxCfgAssetId])
866866 if ((lockEnd >= height))
867867 then throw((("wait " + toString(lockEnd)) + " to unlock"))
868868 else if ((0 >= userAmount))
869869 then throw("nothing to unlock")
870870 else {
871871 let period = valueOrElse(getInteger(mathContract, keyNextPeriod()), 0)
872872 (((LockParamsEntry(userAddress, userNumStr, 0, lockStart, lockDuration, 0, 0, toString(period)) ++ StatsEntry(-(userAmount), 0, 0, -1)) :+ HistoryEntry("unlock", userAddress, userAmount, lockStart, lockDuration, 0, 0, i)) :+ ScriptTransfer(addressFromStringValue(userAddress), userAmount, assetId))
873873 }
874874 }
875875
876876
877877
878878 @Callable(i)
879879 func gwxUserInfoREADONLY (userAddress) = {
880880 let gwxAmount = calcCurrentGwxAmount(userAddress)
881881 $Tuple2(nil, [gwxAmount])
882882 }
883883
884884
885885
886886 @Callable(i)
887887 func getUserGwxAmountAtHeightREADONLY (userAddress,targetHeight) = {
888888 let gwxAmount = calcUserGwxAmountAtHeight(userAddress, targetHeight)
889889 $Tuple2(nil, gwxAmount)
890890 }
891891
892892
893893
894894 @Callable(i)
895895 func getTotalCachedGwxREADONLY () = $Tuple2(nil, getTotalCachedGwx(true))
896896
897897
898898
899899 @Callable(i)
900900 func onBoostEmissionUpdate () = {
901901 let checkCaller = if ((i.caller == emissionContract))
902902 then true
903903 else mustManager(i)
904904 if ((checkCaller == checkCaller))
905905 then refreshBoostEmissionIntegral()
906906 else throw("Strict value is not equal to itself.")
907907 }
908908
909909
910910
911911 @Callable(i)
912912 func onStakedVoteUpdate (lpAssetIdStr,userAddressStr,edge) = {
913913 let checkCaller = if ((i.caller == stakingContract))
914914 then true
915915 else mustManager(i)
916916 if ((checkCaller == checkCaller))
917917 then {
918918 let actions = refreshVoteStakedIntegral(lpAssetIdStr, userAddressStr, edge)
919- $Tuple2(nil, unit)
919+ $Tuple2(actions, unit)
920920 }
921921 else throw("Strict value is not equal to itself.")
922922 }
923923
924924
925925
926926 @Callable(i)
927927 func getVotingResultStakedREADONLY (lpAssetIdStr) = $Tuple2(nil, getVotingResultStaked(lpAssetIdStr))
928928
929929
930930
931931 @Callable(i)
932932 func getUserVoteFinalizedREADONLY (lpAssetIdStr,userAddressStr) = $Tuple2(nil, getUserVoteFinalized(lpAssetIdStr, userAddressStr))
933933
934934
935935
936936 @Callable(i)
937937 func setManager (pendingManagerPublicKey) = {
938938 let checkCaller = mustManager(i)
939939 if ((checkCaller == checkCaller))
940940 then {
941941 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
942942 if ((checkManagerPublicKey == checkManagerPublicKey))
943943 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
944944 else throw("Strict value is not equal to itself.")
945945 }
946946 else throw("Strict value is not equal to itself.")
947947 }
948948
949949
950950
951951 @Callable(i)
952952 func confirmManager () = {
953953 let pm = pendingManagerPublicKeyOrUnit()
954954 let hasPM = if (isDefined(pm))
955955 then true
956956 else throw("No pending manager")
957957 if ((hasPM == hasPM))
958958 then {
959959 let checkPM = if ((i.callerPublicKey == value(pm)))
960960 then true
961961 else throw("You are not pending manager")
962962 if ((checkPM == checkPM))
963963 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
964964 else throw("Strict value is not equal to itself.")
965965 }
966966 else throw("Strict value is not equal to itself.")
967967 }
968968
969969
970970 @Verifier(tx)
971971 func verify () = {
972972 let targetPublicKey = match managerPublicKeyOrUnit() {
973973 case pk: ByteVector =>
974974 pk
975975 case _: Unit =>
976976 tx.senderPublicKey
977977 case _ =>
978978 throw("Match error")
979979 }
980980 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
981981 }
982982

github/deemru/w8io/026f985 
156.93 ms