tx · 4THcn7Ks9pm4T91eUrorvHvzBTNusSHv7wFnk862wsxX

3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy:  -0.02700000 Waves

2023.03.27 18:11 [2508531] smart account 3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy > SELF 0.00000000 Waves

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

github/deemru/w8io/026f985 
176.27 ms