tx · 12yZeEmQxn2mM5zoUaNVe8BfiAjibCYzyHGrNZ8FWXyb

3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy:  -0.02800000 Waves

2023.03.15 11:15 [2490890] smart account 3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy > SELF 0.00000000 Waves

{ "type": 13, "id": "12yZeEmQxn2mM5zoUaNVe8BfiAjibCYzyHGrNZ8FWXyb", "fee": 2800000, "feeAssetId": null, "timestamp": 1678868162059, "version": 2, "chainId": 84, "sender": "3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy", "senderPublicKey": "9W33iCCNfmFxUbiC6XZcH5x7f6xfwC7Jb3BoExT5q2PV", "proofs": [ "2zUcoBvyBaySBBte6vbDZPS4nzcAHruCj5HHiehgwLBmv6xu9dBNaikpmqQahAeYAAwmoHeSsZ1BeUujn8YuVort" ], "script": "base64:BgLFLwgCEggKBggIAQEBCBIFCgMBCAISAwoBARIDCgEBEgQKAggIEgQKAggIEgMKAQgSAwoBCBIDCgEIEgQKAggBEgASABIFCgMICAQSAwoBCBIECgIICBIDCgEIEgAiA1NFUCIGU0NBTEU4IgVNVUxUOCIOUE9PTFdFSUdIVE1VTFQiB3dyYXBFcnIiA21zZyIIdGhyb3dFcnIiBHN0cmYiB2FkZHJlc3MiA2tleSIDaW96IgNpb2QiCmRlZmF1bHRWYWwiA2lvZiIDYWJzIgN2YWwiA2FhbCIHJG1hdGNoMCIKdmFsQW55THlzdCICYWkiBnZhbEludCIba2V5UmVmZXJyYWxzQ29udHJhY3RBZGRyZXNzIh5yZWZlcnJhbHNDb250cmFjdEFkZHJlc3NPckZhaWwiFmtleVJlZmVycmFsUHJvZ3JhbU5hbWUiGnJlZmVycmFsUHJvZ3JhbU5hbWVEZWZhdWx0IhNyZWZlcnJhbFByb2dyYW1OYW1lIhFrZXlGYWN0b3J5QWRkcmVzcyIYSWR4RmFjdG9yeUNmZ1N0YWtpbmdEYXBwIhlJZHhGYWN0b3J5Q2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Gl0c2VsZi4CYUkBDmNvbmZpcm1NYW5hZ2VyAAQCZnAJAQJhRwAEAmZxAwkBCWlzRGVmaW5lZAEFAmZwBgkAAgECEk5vIHBlbmRpbmcgbWFuYWdlcgMJAAACBQJmcQUCZnEEAmZyAwkAAAIIBQJhSQ9jYWxsZXJQdWJsaWNLZXkJAQV2YWx1ZQEFAmZwBgkAAgECG1lvdSBhcmUgbm90IHBlbmRpbmcgbWFuYWdlcgMJAAACBQJmcgUCZnIJAMwIAgkBC1N0cmluZ0VudHJ5AgkBAmFmAAkA2AQBCQEFdmFsdWUBBQJmcAkAzAgCCQELRGVsZXRlRW50cnkBCQECYWcABQNuaWwJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAmZzAQJmdAAEAmZ1BAFyCQECYUUAAwkAAQIFAXICCkJ5dGVWZWN0b3IEAmFLBQFyBQJhSwMJAAECBQFyAgRVbml0CAUCZnMPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IJAPQDAwgFAmZzCWJvZHlCeXRlcwkAkQMCCAUCZnMGcHJvb2ZzAAAFAmZ1IazonQ==", "height": 2490890, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2VJzFgHogPw7zKhEX9MPGZxoc47AriXfqNixh92oVFQb Next: 7p38ousfrmmnwAANUTtjcJDT1pbtJwYKiFWETf2a6zDx Diff:
OldNewDifferences
307307 func keyTotalCachedGwxCorrective () = "%s__gwxCachedTotalCorrective"
308308
309309
310+func keyVote (amountAssetId,priceAssetId,address,epoch) = makeString(["%s%s%s%s%d", "vote", amountAssetId, priceAssetId, toString(address), toString(epoch)], SEP)
311+
312+
313+func keyStartHeightByEpoch (epoch) = makeString(["%s%d", "startHeight", toString(epoch)], SEP)
314+
315+
316+func keyCurrentEpochUi () = makeString(["%s", "currentEpochUi"], SEP)
317+
318+
319+func keyVotingResultStaked (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStaked", lpAssetIdStr, toString(epoch)], SEP)
320+
321+
322+func keyVotingResultStakedIntegral (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStakedIntegral", lpAssetIdStr, toString(epoch)], SEP)
323+
324+
325+func keyVotingResultStakedLastUpdateHeight (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStakedIntegralLastUpdateHeight", lpAssetIdStr, toString(epoch)], SEP)
326+
327+
328+func keyVotingResultStakedIntegralLast (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "votingResultStakedIntegralLast", lpAssetIdStr, toString(address), toString(epoch)], SEP)
329+
330+
331+func keyVoteStakedIntegral (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "voteStakedIntegral", lpAssetIdStr, toString(address), toString(epoch)], SEP)
332+
333+
334+func keyVoteStakedLastUpdateHeight (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "voteStakedIntegralLastUpdateHeight", lpAssetIdStr, toString(address), toString(epoch)], SEP)
335+
336+
337+func keyVoteStakedIntegralLast (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "voteStakedIntegralLast", lpAssetIdStr, toString(address), toString(epoch)], SEP)
338+
339+
340+func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s", "staked", userAddressStr, lpAssetIdStr], SEP)
341+
342+
310343 let factoryContract = readFactoryAddressOrFail()
311344
312345 let factoryCfg = readFactoryCfgOrFail(factoryContract)
331364 }
332365
333366 func getTotalCachedGwx (correct) = {
334- let keyCurrentEpochUi = makeString(["%s", "currentEpochUi"], SEP)
335- let currentEpochUi = getIntegerValue(votingEmissionContract, keyCurrentEpochUi)
367+ let currentEpochUi = getIntegerValue(votingEmissionContract, keyCurrentEpochUi())
336368 let keyTargetEpoch = makeString(["%s%s", "totalCachedGwxCorrection__activationEpoch"], SEP)
337369 let targetEpochOption = getInteger(this, keyTargetEpoch)
338370 let totalCachedGwxRaw = valueOrElse(getInteger(this, keyTotalCachedGwx()), 0)
417449
418450
419451 func getVotingEmissionEpochInfo () = {
420- let keyCurrentEpochUi = makeString(["%s", "currentEpochUi"], SEP)
421- let $t01515015438 = {
422- let currentEpochUi = value(getInteger(votingEmissionContract, keyCurrentEpochUi))
452+ let $t01719017480 = {
453+ let currentEpochUi = value(getInteger(votingEmissionContract, keyCurrentEpochUi()))
423454 let lastFinalizedEpoch = (currentEpochUi - 1)
424455 if ((0 > lastFinalizedEpoch))
425456 then throwErr("invalid epoch")
426457 else $Tuple2(currentEpochUi, lastFinalizedEpoch)
427458 }
428- let currentEpochUi = $t01515015438._1
429- let lastFinalizedEpoch = $t01515015438._2
430- func keyStartHeightByEpoch (epoch) = makeString(["%s%d", "startHeight", toString(epoch)], SEP)
431-
459+ let currentEpochUi = $t01719017480._1
460+ let lastFinalizedEpoch = $t01719017480._2
432461 let currentEpochStartHeight = value(getInteger(votingEmissionContract, keyStartHeightByEpoch(currentEpochUi)))
433462 $Tuple2(lastFinalizedEpoch, currentEpochStartHeight)
434463 }
438467 let idxAmountAssetId = 4
439468 let idxPriceAssetId = 5
440469 let poolCfg = {
441- let @ = invoke(factoryContract, "getPoolConfigByLpAssetId", [lpAssetIdStr], nil)
470+ let @ = invoke(factoryContract, "getPoolConfigByLpAssetIdREADONLY", [lpAssetIdStr], nil)
442471 if ($isInstanceOf(@, "List[Any]"))
443472 then @
444473 else throw(($getType(@) + " couldn't be cast to List[Any]"))
459488 }
460489
461490
462-func keyVote (amountAssetId,priceAssetId,address,epoch) = makeString(["%s%s%s%s%d", "vote", amountAssetId, priceAssetId, toString(address), toString(epoch)], SEP)
463-
464-
465-func keyVotingResultStaked (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStaked", lpAssetIdStr, toString(epoch)], SEP)
466-
467-
468-func keyVotingResultStakedIntegral (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStakedIntegral", lpAssetIdStr, toString(epoch)], SEP)
469-
470-
471-func keyVotingResultStakedLastUpdateHeight (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStakedIntegralLastUpdateHeight", lpAssetIdStr, toString(epoch)], SEP)
472-
473-
474-func keyVotingResultStakedIntegralLast (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "votingResultStakedIntegralLast", lpAssetIdStr, toString(address), toString(epoch)], SEP)
475-
476-
477-func keyVoteStakedIntegral (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "voteStakedIntegral", lpAssetIdStr, toString(address), toString(epoch)], SEP)
478-
479-
480-func keyVoteStakedLastUpdateHeight (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "voteStakedIntegralLastUpdateHeight", lpAssetIdStr, toString(address), toString(epoch)], SEP)
481-
482-
483-func keyVoteStakedIntegralLast (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "voteStakedIntegralLast", lpAssetIdStr, toString(address), toString(epoch)], SEP)
484-
485-
486-func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s", "staked", userAddressStr, lpAssetIdStr], SEP)
487-
488-
489491 func getUserVoteFinalized (lpAssetIdStr,userAddressStr) = {
490492 let userAddress = addressFromStringValue(userAddressStr)
491- let $t01822818308 = getVotingEmissionEpochInfo()
492- let lastFinalizedEpoch = $t01822818308._1
493- let currentEpochStartHeight = $t01822818308._2
494- let $t01831118386 = getPoolAssetsByLpAssetId(lpAssetIdStr)
495- let amountAssetId = $t01831118386._1
496- let priceAssetId = $t01831118386._2
493+ let $t01817118251 = getVotingEmissionEpochInfo()
494+ let lastFinalizedEpoch = $t01817118251._1
495+ let currentEpochStartHeight = $t01817118251._2
496+ let $t01825418329 = getPoolAssetsByLpAssetId(lpAssetIdStr)
497+ let amountAssetId = $t01825418329._1
498+ let priceAssetId = $t01825418329._2
497499 let userVoteKey = keyVote(amountAssetId, priceAssetId, userAddress, lastFinalizedEpoch)
498500 let userVote = valueOrElse(getInteger(votingEmissionContract, userVoteKey), 0)
499501 userVote
510512
511513
512514 func getVotingResultStaked (lpAssetIdStr) = {
513- let $t01893019010 = getVotingEmissionEpochInfo()
514- let lastFinalizedEpoch = $t01893019010._1
515- let currentEpochStartHeight = $t01893019010._2
515+ let $t01887318953 = getVotingEmissionEpochInfo()
516+ let lastFinalizedEpoch = $t01887318953._1
517+ let currentEpochStartHeight = $t01887318953._2
516518 let votingResultStakedStart = valueOrElse(getInteger(votingEmissionContract, keyVotingResultStaked(lpAssetIdStr, lastFinalizedEpoch)), 0)
517519 let votingResultStaked = valueOrElse(getInteger(this, keyVotingResultStaked(lpAssetIdStr, lastFinalizedEpoch)), votingResultStakedStart)
518520 votingResultStaked
520522
521523
522524 func refreshVotingResultStakedIntegral (lpAssetIdStr,stakedVoteDelta) = {
523- let $t01953119611 = getVotingEmissionEpochInfo()
524- let lastFinalizedEpoch = $t01953119611._1
525- let currentEpochStartHeight = $t01953119611._2
525+ let $t01947419554 = getVotingEmissionEpochInfo()
526+ let lastFinalizedEpoch = $t01947419554._1
527+ let currentEpochStartHeight = $t01947419554._2
526528 let votingResultStaked = getVotingResultStaked(lpAssetIdStr)
527529 let votingResultStakedNew = (votingResultStaked + stakedVoteDelta)
528530 let votingResultStakedIntegralKey = keyVotingResultStakedIntegral(lpAssetIdStr, lastFinalizedEpoch)
536538
537539
538540 func refreshVoteStakedIntegral (lpAssetIdStr,userAddressStr,edge) = {
539- let $t02081120891 = getVotingEmissionEpochInfo()
540- let lastFinalizedEpoch = $t02081120891._1
541- let currentEpochStartHeight = $t02081120891._2
541+ let $t02075420834 = getVotingEmissionEpochInfo()
542+ let lastFinalizedEpoch = $t02075420834._1
543+ let currentEpochStartHeight = $t02075420834._2
542544 let userAddress = addressFromStringValue(userAddressStr)
543545 let idxAmountAssetId = 4
544546 let idxPriceAssetId = 5
545547 let poolCfg = {
546- let @ = invoke(factoryContract, "getPoolConfigByLpAssetId", [lpAssetIdStr], nil)
548+ let @ = invoke(factoryContract, "getPoolConfigByLpAssetIdREADONLY", [lpAssetIdStr], nil)
547549 if ($isInstanceOf(@, "List[Any]"))
548550 then @
549551 else throw(($getType(@) + " couldn't be cast to List[Any]"))
567569 let stakedVoteDelta = if (edge)
568570 then userVote
569571 else -(userVote)
570- let $t02149621615 = refreshVotingResultStakedIntegral(lpAssetIdStr, stakedVoteDelta)
571- let votingResultActions = $t02149621615._1
572- let votingResultStakedIntegral = $t02149621615._2
572+ let $t02144721566 = refreshVotingResultStakedIntegral(lpAssetIdStr, stakedVoteDelta)
573+ let votingResultActions = $t02144721566._1
574+ let votingResultStakedIntegral = $t02144721566._2
573575 let userVoteStaked = if (edge)
574576 then 0
575577 else userVote
587589
588590
589591 func getStakedVotesIntegralsDiff (lpAssetIdStr,userAddressStr) = {
590- let $t02260722687 = getVotingEmissionEpochInfo()
591- let lastFinalizedEpoch = $t02260722687._1
592- let currentEpochStartHeight = $t02260722687._2
592+ let $t02255822638 = getVotingEmissionEpochInfo()
593+ let lastFinalizedEpoch = $t02255822638._1
594+ let currentEpochStartHeight = $t02255822638._2
593595 let userAddress = addressFromStringValue(userAddressStr)
594596 let userVoteStaked = getUserVoteStaked(lpAssetIdStr, userAddressStr)
595597 let votingResultStaked = getVotingResultStaked(lpAssetIdStr)
658660 if ((0 > userBoostEmissionIntegral))
659661 then throw("wrong calculations")
660662 else {
661- let $t02721227351 = getStakedVotesIntegralsDiff(lpAssetIdStr, userAddressStr)
662- let stakedVotesIntegralsActions = $t02721227351._1
663- let userVoteIntegralDiff = $t02721227351._2
664- let totalVotesIntegralDiff = $t02721227351._3
663+ let $t02716327302 = getStakedVotesIntegralsDiff(lpAssetIdStr, userAddressStr)
664+ let stakedVotesIntegralsActions = $t02716327302._1
665+ let userVoteIntegralDiff = $t02716327302._2
666+ let totalVotesIntegralDiff = $t02716327302._3
665667 let poolUserBoostEmissionIntegral = fraction(userBoostEmissionIntegral, poolWeight, POOLWEIGHTMULT)
666668 let userBoostAvaliableToClaimTotalNew = if ((totalVotesIntegralDiff == 0))
667669 then 0
748750
749751 @Callable(i)
750752 func lockRef (duration,referrerAddress,signature) = {
751- let $t03194132006 = lockActions(i, duration)
752- let lockActionsResult = $t03194132006._1
753- let gWxAmountStart = $t03194132006._2
753+ let $t03189231957 = lockActions(i, duration)
754+ let lockActionsResult = $t03189231957._1
755+ let gWxAmountStart = $t03189231957._2
754756 let referralAddress = toString(i.caller)
755757 let refInv = if (if ((referrerAddress == ""))
756758 then true
771773
772774 @Callable(i)
773775 func lock (duration) = {
774- let $t03246432529 = lockActions(i, duration)
775- let lockActionsResult = $t03246432529._1
776- let gWxAmountStart = $t03246432529._2
776+ let $t03241532480 = lockActions(i, duration)
777+ let lockActionsResult = $t03241532480._1
778+ let gWxAmountStart = $t03241532480._2
777779 let updateRefActivity = invoke(mathContract, "updateReferralActivity", [toString(i.caller), gWxAmountStart], nil)
778780 if ((updateRefActivity == updateRefActivity))
779781 then $Tuple2(lockActionsResult, unit)
837839 func claimWxBoost (lpAssetIdStr,userAddressStr) = if ((stakingContract != i.caller))
838840 then throw("permissions denied")
839841 else {
840- let $t03561635718 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false)
841- let userBoostAvailable = $t03561635718._1
842- let dataState = $t03561635718._2
843- let debug = $t03561635718._3
842+ let $t03556735669 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false)
843+ let userBoostAvailable = $t03556735669._1
844+ let dataState = $t03556735669._2
845+ let debug = $t03556735669._3
844846 $Tuple2(dataState, [userBoostAvailable])
845847 }
846848
848850
849851 @Callable(i)
850852 func claimWxBoostREADONLY (lpAssetIdStr,userAddressStr) = {
851- let $t03585035951 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true)
852- let userBoostAvailable = $t03585035951._1
853- let dataState = $t03585035951._2
854- let debug = $t03585035951._3
853+ let $t03580135902 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true)
854+ let userBoostAvailable = $t03580135902._1
855+ let dataState = $t03580135902._2
856+ let debug = $t03580135902._3
855857 $Tuple2(nil, [userBoostAvailable, debug])
856858 }
857859
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
310+func keyVote (amountAssetId,priceAssetId,address,epoch) = makeString(["%s%s%s%s%d", "vote", amountAssetId, priceAssetId, toString(address), toString(epoch)], SEP)
311+
312+
313+func keyStartHeightByEpoch (epoch) = makeString(["%s%d", "startHeight", toString(epoch)], SEP)
314+
315+
316+func keyCurrentEpochUi () = makeString(["%s", "currentEpochUi"], SEP)
317+
318+
319+func keyVotingResultStaked (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStaked", lpAssetIdStr, toString(epoch)], SEP)
320+
321+
322+func keyVotingResultStakedIntegral (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStakedIntegral", lpAssetIdStr, toString(epoch)], SEP)
323+
324+
325+func keyVotingResultStakedLastUpdateHeight (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStakedIntegralLastUpdateHeight", lpAssetIdStr, toString(epoch)], SEP)
326+
327+
328+func keyVotingResultStakedIntegralLast (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "votingResultStakedIntegralLast", lpAssetIdStr, toString(address), toString(epoch)], SEP)
329+
330+
331+func keyVoteStakedIntegral (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "voteStakedIntegral", lpAssetIdStr, toString(address), toString(epoch)], SEP)
332+
333+
334+func keyVoteStakedLastUpdateHeight (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "voteStakedIntegralLastUpdateHeight", lpAssetIdStr, toString(address), toString(epoch)], SEP)
335+
336+
337+func keyVoteStakedIntegralLast (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "voteStakedIntegralLast", lpAssetIdStr, toString(address), toString(epoch)], SEP)
338+
339+
340+func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s", "staked", userAddressStr, lpAssetIdStr], SEP)
341+
342+
310343 let factoryContract = readFactoryAddressOrFail()
311344
312345 let factoryCfg = readFactoryCfgOrFail(factoryContract)
313346
314347 let emissionContract = getEmissionAddressOrFail(factoryCfg)
315348
316349 let stakingContract = getStakingAddressOrFail(factoryCfg)
317350
318351 let gwxRewardContract = getGwxRewardAddressOrFail(factoryCfg)
319352
320353 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"))
321354
322355 let keyVotingEmissionContract = makeString(["%s", "votingEmissionContract"], SEP)
323356
324357 let votingEmissionContract = addressFromStringValue(getStringValue(factoryContract, keyVotingEmissionContract))
325358
326359 let boostCoeff = {
327360 let @ = invoke(emissionContract, "getBoostCoeffREADONLY", nil, nil)
328361 if ($isInstanceOf(@, "Int"))
329362 then @
330363 else throw(($getType(@) + " couldn't be cast to Int"))
331364 }
332365
333366 func getTotalCachedGwx (correct) = {
334- let keyCurrentEpochUi = makeString(["%s", "currentEpochUi"], SEP)
335- let currentEpochUi = getIntegerValue(votingEmissionContract, keyCurrentEpochUi)
367+ let currentEpochUi = getIntegerValue(votingEmissionContract, keyCurrentEpochUi())
336368 let keyTargetEpoch = makeString(["%s%s", "totalCachedGwxCorrection__activationEpoch"], SEP)
337369 let targetEpochOption = getInteger(this, keyTargetEpoch)
338370 let totalCachedGwxRaw = valueOrElse(getInteger(this, keyTotalCachedGwx()), 0)
339371 let isCorrectionActivated = if (isDefined(targetEpochOption))
340372 then (currentEpochUi >= value(targetEpochOption))
341373 else false
342374 let corrective = if (if (isCorrectionActivated)
343375 then correct
344376 else false)
345377 then valueOrElse(getInteger(this, keyTotalCachedGwxCorrective()), 0)
346378 else 0
347379 max([0, (totalCachedGwxRaw + corrective)])
348380 }
349381
350382
351383 func HistoryEntry (type,user,amount,lockStart,duration,k,b,i) = {
352384 let historyKEY = makeString(["%s%s%s%s__history", type, user, toBase58String(i.transactionId)], SEP)
353385 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)
354386 StringEntry(historyKEY, historyDATA)
355387 }
356388
357389
358390 func StatsEntry (totalLockedInc,durationInc,lockCountInc,usersCountInc) = {
359391 let locksDurationSumInBlocksKEY = keyStatsLocksDurationSumInBlocks()
360392 let locksCountKEY = keyStatsLocksCount()
361393 let usersCountKEY = keyStatsUsersCount()
362394 let totalAmountKEY = keyLockParamTotalAmount()
363395 let locksDurationSumInBlocks = ioz(this, locksDurationSumInBlocksKEY)
364396 let locksCount = ioz(this, locksCountKEY)
365397 let usersCount = ioz(this, usersCountKEY)
366398 let totalAmount = ioz(this, totalAmountKEY)
367399 [IntegerEntry(locksDurationSumInBlocksKEY, (locksDurationSumInBlocks + durationInc)), IntegerEntry(locksCountKEY, (locksCount + lockCountInc)), IntegerEntry(usersCountKEY, (usersCount + usersCountInc)), IntegerEntry(totalAmountKEY, (totalAmount + totalLockedInc))]
368400 }
369401
370402
371403 func calcGwxAmount (kRaw,bRaw,h) = {
372404 let SCALE = 1000
373405 (((kRaw * h) + bRaw) / SCALE)
374406 }
375407
376408
377409 func LockParamsEntry (userAddress,userNum,amount,start,duration,k,b,period) = {
378410 let userAmountKEY = keyLockParamUserAmount(userNum)
379411 let startBlockKEY = keyLockParamStartBlock(userNum)
380412 let durationKEY = keyLockParamDuration(userNum)
381413 let kKEY = keyLockParamK(userNum)
382414 let bKEY = keyLockParamB(userNum)
383415 let kByPeriodKEY = keyLockParamByPeriodK(userNum, period)
384416 let bByPeriodKEY = keyLockParamByPeriodB(userNum, period)
385417 let gwxAmount = calcGwxAmount(k, b, height)
386418 [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))]
387419 }
388420
389421
390422 func extractOptionalPaymentAmountOrFail (i,expectedAssetId) = if ((size(i.payments) > 1))
391423 then throw("only one payment is allowed")
392424 else if ((size(i.payments) == 0))
393425 then 0
394426 else {
395427 let pmt = i.payments[0]
396428 if ((value(pmt.assetId) != expectedAssetId))
397429 then throw("invalid asset id in payment")
398430 else pmt.amount
399431 }
400432
401433
402434 func calcUserGwxAmountAtHeight (userAddress,targetHeight) = {
403435 let EMPTY = "empty"
404436 let user2NumMappingKEY = keyUser2NumMapping(userAddress)
405437 let userNum = valueOrElse(getString(user2NumMappingKEY), EMPTY)
406438 let k = valueOrElse(getInteger(keyLockParamK(userNum)), 0)
407439 let b = valueOrElse(getInteger(keyLockParamB(userNum)), 0)
408440 let gwxAmountCalc = calcGwxAmount(k, b, targetHeight)
409441 let gwxAmount = if ((0 > gwxAmountCalc))
410442 then 0
411443 else gwxAmountCalc
412444 gwxAmount
413445 }
414446
415447
416448 func calcCurrentGwxAmount (userAddress) = calcUserGwxAmountAtHeight(userAddress, height)
417449
418450
419451 func getVotingEmissionEpochInfo () = {
420- let keyCurrentEpochUi = makeString(["%s", "currentEpochUi"], SEP)
421- let $t01515015438 = {
422- let currentEpochUi = value(getInteger(votingEmissionContract, keyCurrentEpochUi))
452+ let $t01719017480 = {
453+ let currentEpochUi = value(getInteger(votingEmissionContract, keyCurrentEpochUi()))
423454 let lastFinalizedEpoch = (currentEpochUi - 1)
424455 if ((0 > lastFinalizedEpoch))
425456 then throwErr("invalid epoch")
426457 else $Tuple2(currentEpochUi, lastFinalizedEpoch)
427458 }
428- let currentEpochUi = $t01515015438._1
429- let lastFinalizedEpoch = $t01515015438._2
430- func keyStartHeightByEpoch (epoch) = makeString(["%s%d", "startHeight", toString(epoch)], SEP)
431-
459+ let currentEpochUi = $t01719017480._1
460+ let lastFinalizedEpoch = $t01719017480._2
432461 let currentEpochStartHeight = value(getInteger(votingEmissionContract, keyStartHeightByEpoch(currentEpochUi)))
433462 $Tuple2(lastFinalizedEpoch, currentEpochStartHeight)
434463 }
435464
436465
437466 func getPoolAssetsByLpAssetId (lpAssetIdStr) = {
438467 let idxAmountAssetId = 4
439468 let idxPriceAssetId = 5
440469 let poolCfg = {
441- let @ = invoke(factoryContract, "getPoolConfigByLpAssetId", [lpAssetIdStr], nil)
470+ let @ = invoke(factoryContract, "getPoolConfigByLpAssetIdREADONLY", [lpAssetIdStr], nil)
442471 if ($isInstanceOf(@, "List[Any]"))
443472 then @
444473 else throw(($getType(@) + " couldn't be cast to List[Any]"))
445474 }
446475 let amountAssetId = {
447476 let @ = poolCfg[idxAmountAssetId]
448477 if ($isInstanceOf(@, "String"))
449478 then @
450479 else throw(($getType(@) + " couldn't be cast to String"))
451480 }
452481 let priceAssetId = {
453482 let @ = poolCfg[idxPriceAssetId]
454483 if ($isInstanceOf(@, "String"))
455484 then @
456485 else throw(($getType(@) + " couldn't be cast to String"))
457486 }
458487 $Tuple2(amountAssetId, priceAssetId)
459488 }
460489
461490
462-func keyVote (amountAssetId,priceAssetId,address,epoch) = makeString(["%s%s%s%s%d", "vote", amountAssetId, priceAssetId, toString(address), toString(epoch)], SEP)
463-
464-
465-func keyVotingResultStaked (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStaked", lpAssetIdStr, toString(epoch)], SEP)
466-
467-
468-func keyVotingResultStakedIntegral (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStakedIntegral", lpAssetIdStr, toString(epoch)], SEP)
469-
470-
471-func keyVotingResultStakedLastUpdateHeight (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStakedIntegralLastUpdateHeight", lpAssetIdStr, toString(epoch)], SEP)
472-
473-
474-func keyVotingResultStakedIntegralLast (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "votingResultStakedIntegralLast", lpAssetIdStr, toString(address), toString(epoch)], SEP)
475-
476-
477-func keyVoteStakedIntegral (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "voteStakedIntegral", lpAssetIdStr, toString(address), toString(epoch)], SEP)
478-
479-
480-func keyVoteStakedLastUpdateHeight (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "voteStakedIntegralLastUpdateHeight", lpAssetIdStr, toString(address), toString(epoch)], SEP)
481-
482-
483-func keyVoteStakedIntegralLast (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "voteStakedIntegralLast", lpAssetIdStr, toString(address), toString(epoch)], SEP)
484-
485-
486-func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s", "staked", userAddressStr, lpAssetIdStr], SEP)
487-
488-
489491 func getUserVoteFinalized (lpAssetIdStr,userAddressStr) = {
490492 let userAddress = addressFromStringValue(userAddressStr)
491- let $t01822818308 = getVotingEmissionEpochInfo()
492- let lastFinalizedEpoch = $t01822818308._1
493- let currentEpochStartHeight = $t01822818308._2
494- let $t01831118386 = getPoolAssetsByLpAssetId(lpAssetIdStr)
495- let amountAssetId = $t01831118386._1
496- let priceAssetId = $t01831118386._2
493+ let $t01817118251 = getVotingEmissionEpochInfo()
494+ let lastFinalizedEpoch = $t01817118251._1
495+ let currentEpochStartHeight = $t01817118251._2
496+ let $t01825418329 = getPoolAssetsByLpAssetId(lpAssetIdStr)
497+ let amountAssetId = $t01825418329._1
498+ let priceAssetId = $t01825418329._2
497499 let userVoteKey = keyVote(amountAssetId, priceAssetId, userAddress, lastFinalizedEpoch)
498500 let userVote = valueOrElse(getInteger(votingEmissionContract, userVoteKey), 0)
499501 userVote
500502 }
501503
502504
503505 func getUserVoteStaked (lpAssetIdStr,userAddressStr) = {
504506 let stakedByUser = valueOrElse(getInteger(stakingContract, keyStakedByUser(userAddressStr, lpAssetIdStr)), 0)
505507 let userVote = getUserVoteFinalized(lpAssetIdStr, userAddressStr)
506508 if ((stakedByUser == 0))
507509 then 0
508510 else userVote
509511 }
510512
511513
512514 func getVotingResultStaked (lpAssetIdStr) = {
513- let $t01893019010 = getVotingEmissionEpochInfo()
514- let lastFinalizedEpoch = $t01893019010._1
515- let currentEpochStartHeight = $t01893019010._2
515+ let $t01887318953 = getVotingEmissionEpochInfo()
516+ let lastFinalizedEpoch = $t01887318953._1
517+ let currentEpochStartHeight = $t01887318953._2
516518 let votingResultStakedStart = valueOrElse(getInteger(votingEmissionContract, keyVotingResultStaked(lpAssetIdStr, lastFinalizedEpoch)), 0)
517519 let votingResultStaked = valueOrElse(getInteger(this, keyVotingResultStaked(lpAssetIdStr, lastFinalizedEpoch)), votingResultStakedStart)
518520 votingResultStaked
519521 }
520522
521523
522524 func refreshVotingResultStakedIntegral (lpAssetIdStr,stakedVoteDelta) = {
523- let $t01953119611 = getVotingEmissionEpochInfo()
524- let lastFinalizedEpoch = $t01953119611._1
525- let currentEpochStartHeight = $t01953119611._2
525+ let $t01947419554 = getVotingEmissionEpochInfo()
526+ let lastFinalizedEpoch = $t01947419554._1
527+ let currentEpochStartHeight = $t01947419554._2
526528 let votingResultStaked = getVotingResultStaked(lpAssetIdStr)
527529 let votingResultStakedNew = (votingResultStaked + stakedVoteDelta)
528530 let votingResultStakedIntegralKey = keyVotingResultStakedIntegral(lpAssetIdStr, lastFinalizedEpoch)
529531 let votingResultStakedIntegralPrev = valueOrElse(getInteger(this, votingResultStakedIntegralKey), 0)
530532 let votingResultLastUpdateHeightKey = keyVotingResultStakedLastUpdateHeight(lpAssetIdStr, lastFinalizedEpoch)
531533 let votingResultStakedLastUpdateHeight = valueOrElse(getInteger(this, votingResultLastUpdateHeightKey), currentEpochStartHeight)
532534 let votingResultStakedIntegralDh = (height - votingResultStakedLastUpdateHeight)
533535 let votingResultStakedIntegral = ((votingResultStakedIntegralDh * votingResultStaked) + votingResultStakedIntegralPrev)
534536 $Tuple2([IntegerEntry(keyVotingResultStaked(lpAssetIdStr, lastFinalizedEpoch), votingResultStakedNew), IntegerEntry(votingResultLastUpdateHeightKey, height), IntegerEntry(votingResultStakedIntegralKey, votingResultStakedIntegral)], votingResultStakedIntegral)
535537 }
536538
537539
538540 func refreshVoteStakedIntegral (lpAssetIdStr,userAddressStr,edge) = {
539- let $t02081120891 = getVotingEmissionEpochInfo()
540- let lastFinalizedEpoch = $t02081120891._1
541- let currentEpochStartHeight = $t02081120891._2
541+ let $t02075420834 = getVotingEmissionEpochInfo()
542+ let lastFinalizedEpoch = $t02075420834._1
543+ let currentEpochStartHeight = $t02075420834._2
542544 let userAddress = addressFromStringValue(userAddressStr)
543545 let idxAmountAssetId = 4
544546 let idxPriceAssetId = 5
545547 let poolCfg = {
546- let @ = invoke(factoryContract, "getPoolConfigByLpAssetId", [lpAssetIdStr], nil)
548+ let @ = invoke(factoryContract, "getPoolConfigByLpAssetIdREADONLY", [lpAssetIdStr], nil)
547549 if ($isInstanceOf(@, "List[Any]"))
548550 then @
549551 else throw(($getType(@) + " couldn't be cast to List[Any]"))
550552 }
551553 let amountAssetId = {
552554 let @ = poolCfg[idxAmountAssetId]
553555 if ($isInstanceOf(@, "String"))
554556 then @
555557 else throw(($getType(@) + " couldn't be cast to String"))
556558 }
557559 let priceAssetId = {
558560 let @ = poolCfg[idxPriceAssetId]
559561 if ($isInstanceOf(@, "String"))
560562 then @
561563 else throw(($getType(@) + " couldn't be cast to String"))
562564 }
563565 let userVote = valueOrElse(getInteger(votingEmissionContract, keyVote(amountAssetId, priceAssetId, userAddress, lastFinalizedEpoch)), 0)
564566 let actions = if ((userVote == 0))
565567 then nil
566568 else {
567569 let stakedVoteDelta = if (edge)
568570 then userVote
569571 else -(userVote)
570- let $t02149621615 = refreshVotingResultStakedIntegral(lpAssetIdStr, stakedVoteDelta)
571- let votingResultActions = $t02149621615._1
572- let votingResultStakedIntegral = $t02149621615._2
572+ let $t02144721566 = refreshVotingResultStakedIntegral(lpAssetIdStr, stakedVoteDelta)
573+ let votingResultActions = $t02144721566._1
574+ let votingResultStakedIntegral = $t02144721566._2
573575 let userVoteStaked = if (edge)
574576 then 0
575577 else userVote
576578 let userVoteStakedIntegralKey = keyVoteStakedIntegral(lpAssetIdStr, userAddress, lastFinalizedEpoch)
577579 let userVoteStakedIntegralPrev = valueOrElse(getInteger(this, userVoteStakedIntegralKey), 0)
578580 let userVoteStakedLastUpdateHeightKey = keyVoteStakedLastUpdateHeight(lpAssetIdStr, userAddress, lastFinalizedEpoch)
579581 let userVoteStakedLastUpdateHeight = valueOrElse(getInteger(this, userVoteStakedLastUpdateHeightKey), currentEpochStartHeight)
580582 let userVoteStakedIntegralDh = (height - userVoteStakedLastUpdateHeight)
581583 let userVoteStakedIntegral = ((userVoteStakedIntegralDh * userVoteStaked) + userVoteStakedIntegralPrev)
582584 let voteActions = [IntegerEntry(userVoteStakedLastUpdateHeightKey, height), IntegerEntry(userVoteStakedIntegralKey, userVoteStakedIntegral)]
583585 (votingResultActions ++ voteActions)
584586 }
585587 actions
586588 }
587589
588590
589591 func getStakedVotesIntegralsDiff (lpAssetIdStr,userAddressStr) = {
590- let $t02260722687 = getVotingEmissionEpochInfo()
591- let lastFinalizedEpoch = $t02260722687._1
592- let currentEpochStartHeight = $t02260722687._2
592+ let $t02255822638 = getVotingEmissionEpochInfo()
593+ let lastFinalizedEpoch = $t02255822638._1
594+ let currentEpochStartHeight = $t02255822638._2
593595 let userAddress = addressFromStringValue(userAddressStr)
594596 let userVoteStaked = getUserVoteStaked(lpAssetIdStr, userAddressStr)
595597 let votingResultStaked = getVotingResultStaked(lpAssetIdStr)
596598 let userVoteStakedIntegralPrev = valueOrElse(getInteger(this, keyVoteStakedIntegral(lpAssetIdStr, userAddress, lastFinalizedEpoch)), 0)
597599 let votingResultStakedIntegralPrev = valueOrElse(getInteger(this, keyVotingResultStakedIntegral(lpAssetIdStr, lastFinalizedEpoch)), 0)
598600 let userVoteStakedLastUpdateHeight = valueOrElse(getInteger(this, keyVoteStakedLastUpdateHeight(lpAssetIdStr, userAddress, lastFinalizedEpoch)), currentEpochStartHeight)
599601 let votingResultStakedLastUpdateHeight = valueOrElse(getInteger(this, keyVotingResultStakedLastUpdateHeight(lpAssetIdStr, lastFinalizedEpoch)), currentEpochStartHeight)
600602 let userVoteStakedIntegralKey = keyVoteStakedIntegralLast(lpAssetIdStr, userAddress, lastFinalizedEpoch)
601603 let userVoteStakedIntegralLast = valueOrElse(getInteger(this, userVoteStakedIntegralKey), 0)
602604 let votingResultStakedIntegralKey = keyVotingResultStakedIntegralLast(lpAssetIdStr, userAddress, lastFinalizedEpoch)
603605 let votingResultStakedIntegralLast = valueOrElse(getInteger(this, votingResultStakedIntegralKey), 0)
604606 let userVoteStakedIntegralDh = (height - userVoteStakedLastUpdateHeight)
605607 let votingResultStakedIntegralDh = (height - votingResultStakedLastUpdateHeight)
606608 let userVoteStakedIntegral = ((userVoteStakedIntegralDh * userVoteStaked) + userVoteStakedIntegralPrev)
607609 let votingResultStakedIntegral = ((votingResultStakedIntegralDh * votingResultStaked) + votingResultStakedIntegralPrev)
608610 let userVoteStakedIntegralDiff = (userVoteStakedIntegral - userVoteStakedIntegralLast)
609611 let votingResultStakedIntegralDiff = (votingResultStakedIntegral - votingResultStakedIntegralLast)
610612 $Tuple3([IntegerEntry(userVoteStakedIntegralKey, userVoteStakedIntegral), IntegerEntry(votingResultStakedIntegralKey, votingResultStakedIntegral)], userVoteStakedIntegralDiff, votingResultStakedIntegralDiff)
611613 }
612614
613615
614616 func refreshBoostEmissionIntegral () = {
615617 let wxEmissionPerBlock = iof(emissionContract, keyEmissionRatePerBlockCurrent())
616618 let boostingV2LastUpdateHeightOption = getInteger(emissionContract, keyBoostingV2LastUpdateHeight())
617619 let boostingV2IngergalOption = getInteger(this, keyBoostingV2Integral())
618620 let emissionEnd = iof(emissionContract, keyEmissionEndBlock())
619621 let h = if ((height > emissionEnd))
620622 then emissionEnd
621623 else height
622624 let dh = match boostingV2LastUpdateHeightOption {
623625 case lastUpdateHeight: Int =>
624626 max([(h - lastUpdateHeight), 0])
625627 case _: Unit =>
626628 0
627629 case _ =>
628630 throw("Match error")
629631 }
630632 let boostEmissionPerBlock = ((wxEmissionPerBlock * (boostCoeff - 1)) / boostCoeff)
631633 let boostEmissionIntegralPrev = valueOrElse(boostingV2IngergalOption, 0)
632634 let boostEmissionIntegral = ((boostEmissionPerBlock * dh) + boostEmissionIntegralPrev)
633635 $Tuple2([IntegerEntry(keyBoostingV2Integral(), boostEmissionIntegral), IntegerEntry(keyBoostingV2LastUpdateHeight(), height)], boostEmissionIntegral)
634636 }
635637
636638
637639 func internalClaimWxBoost (lpAssetIdStr,userAddressStr,readOnly) = {
638640 let userRecordOption = getString(this, keyLockParamsRecord(userAddressStr))
639641 if ((userRecordOption == unit))
640642 then $Tuple3(0, nil, "userRecord::is::empty")
641643 else {
642644 let userRecordArray = split(value(userRecordOption), SEP)
643645 let userNumStr = userRecordArray[IdxLockUserNum]
644646 let EMPTYSTR = "empty"
645647 let poolWeight = if ((lpAssetIdStr != EMPTYSTR))
646648 then {
647649 let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
648650 getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr))
649651 }
650652 else if (readOnly)
651653 then 0
652654 else throw(("not readonly mode: unsupported lp asset " + lpAssetIdStr))
653655 let userLpBoostEmissionLastIntegralKEY = keyUserLpBoostEmissionLastINTEGRAL(userNumStr, lpAssetIdStr)
654656 let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNumStr)
655657 let userBoostEmissionLastIntegral = valueOrElse(getInteger(this, userLpBoostEmissionLastIntegralKEY), ioz(this, userBoostEmissionLastIntegralKEY))
656658 let boostEmissionIntegral = refreshBoostEmissionIntegral()._2
657659 let userBoostEmissionIntegral = (boostEmissionIntegral - userBoostEmissionLastIntegral)
658660 if ((0 > userBoostEmissionIntegral))
659661 then throw("wrong calculations")
660662 else {
661- let $t02721227351 = getStakedVotesIntegralsDiff(lpAssetIdStr, userAddressStr)
662- let stakedVotesIntegralsActions = $t02721227351._1
663- let userVoteIntegralDiff = $t02721227351._2
664- let totalVotesIntegralDiff = $t02721227351._3
663+ let $t02716327302 = getStakedVotesIntegralsDiff(lpAssetIdStr, userAddressStr)
664+ let stakedVotesIntegralsActions = $t02716327302._1
665+ let userVoteIntegralDiff = $t02716327302._2
666+ let totalVotesIntegralDiff = $t02716327302._3
665667 let poolUserBoostEmissionIntegral = fraction(userBoostEmissionIntegral, poolWeight, POOLWEIGHTMULT)
666668 let userBoostAvaliableToClaimTotalNew = if ((totalVotesIntegralDiff == 0))
667669 then 0
668670 else fraction(poolUserBoostEmissionIntegral, userVoteIntegralDiff, totalVotesIntegralDiff)
669671 let dataState = ([IntegerEntry(userLpBoostEmissionLastIntegralKEY, boostEmissionIntegral)] ++ stakedVotesIntegralsActions)
670672 let debug = makeString([toString(userBoostEmissionLastIntegral), toString(userBoostEmissionIntegral), toString(poolWeight), toString(userVoteIntegralDiff), toString(totalVotesIntegralDiff)], ":")
671673 $Tuple3(userBoostAvaliableToClaimTotalNew, dataState, debug)
672674 }
673675 }
674676 }
675677
676678
677679 func lockActions (i,duration) = {
678680 let cfgArray = readConfigArrayOrFail()
679681 let assetIdStr = cfgArray[IdxCfgAssetId]
680682 let assetId = fromBase58String(assetIdStr)
681683 let minLockAmount = parseIntValue(cfgArray[IdxCfgMinLockAmount])
682684 let minLockDuration = parseIntValue(cfgArray[IdxCfgMinLockDuration])
683685 let maxLockDuration = parseIntValue(cfgArray[IdxCfgMaxLockDuration])
684686 if ((size(i.payments) != 1))
685687 then throw("invalid payment - exact one payment must be attached")
686688 else {
687689 let pmt = i.payments[0]
688690 let pmtAmount = pmt.amount
689691 if ((assetId != value(pmt.assetId)))
690692 then throw((("invalid asset is in payment - " + assetIdStr) + " is expected"))
691693 else {
692694 let nextUserNumKEY = keyNextUserNum()
693695 let userAddressStr = toString(i.caller)
694696 let userIsExisting = isDefined(getString(keyUser2NumMapping(userAddressStr)))
695697 let userNumStr = if (userIsExisting)
696698 then value(getString(keyUser2NumMapping(userAddressStr)))
697699 else toString(iof(this, nextUserNumKEY))
698700 let userNum = parseIntValue(userNumStr)
699701 let lockStart = height
700702 let startBlockKEY = keyLockParamStartBlock(userNumStr)
701703 let durationKEY = keyLockParamDuration(userNumStr)
702704 let userAmountKEY = keyLockParamUserAmount(userNumStr)
703705 if (if ((minLockAmount > pmtAmount))
704706 then (i.caller != lpStakingPoolsContract)
705707 else false)
706708 then throw(("amount is less then minLockAmount=" + toString(minLockAmount)))
707709 else if ((minLockDuration > duration))
708710 then throw(("passed duration is less then minLockDuration=" + toString(minLockDuration)))
709711 else if ((duration > maxLockDuration))
710712 then throw(("passed duration is greater then maxLockDuration=" + toString(maxLockDuration)))
711713 else if (if (userIsExisting)
712714 then ((iof(this, startBlockKEY) + iof(this, durationKEY)) >= lockStart)
713715 else false)
714716 then throw("there is an active lock - consider to use increaseLock")
715717 else if ((ioz(this, userAmountKEY) > 0))
716718 then throw(("there are locked WXs - consider to use increaseLock " + userAmountKEY))
717719 else {
718720 let coeffX8 = fraction(duration, MULT8, maxLockDuration)
719721 let gWxAmountStart = fraction(pmtAmount, coeffX8, MULT8)
720722 let gWxParamsResultList = aal(invoke(mathContract, "calcGwxParamsREADONLY", [gWxAmountStart, lockStart, duration], nil))
721723 let k = ai(gWxParamsResultList[0])
722724 let b = ai(gWxParamsResultList[1])
723725 let period = toString(ai(gWxParamsResultList[2]))
724726 let totalCachedGwxRaw = getTotalCachedGwx(false)
725727 let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNumStr)
726728 let boostEmissionIntegral = refreshBoostEmissionIntegral()._2
727729 let arr = if (userIsExisting)
728730 then nil
729731 else [IntegerEntry(nextUserNumKEY, (userNum + 1)), StringEntry(keyUser2NumMapping(userAddressStr), userNumStr), StringEntry(keyNum2UserMapping(userNumStr), userAddressStr)]
730732 $Tuple2(((((arr ++ LockParamsEntry(userAddressStr, userNumStr, pmtAmount, lockStart, duration, k, b, period)) ++ StatsEntry(pmtAmount, duration, 1, if (userIsExisting)
731733 then 0
732734 else 1)) :+ HistoryEntry("lock", userAddressStr, pmtAmount, lockStart, duration, k, b, i)) ++ [IntegerEntry(userBoostEmissionLastIntegralKEY, boostEmissionIntegral), IntegerEntry(keyTotalCachedGwx(), (totalCachedGwxRaw + gWxAmountStart))]), gWxAmountStart)
733735 }
734736 }
735737 }
736738 }
737739
738740
739741 @Callable(i)
740742 func constructor (factoryAddressStr,lockAssetIdStr,minLockAmount,minDuration,maxDuration,mathContract) = {
741743 let checkCaller = mustManager(i)
742744 if ((checkCaller == checkCaller))
743745 then ([IntegerEntry(keyNextUserNum(), 0), StringEntry(keyConfig(), formatConfig(lockAssetIdStr, minLockAmount, minDuration, maxDuration, mathContract)), StringEntry(keyFactoryAddress(), factoryAddressStr)] ++ StatsEntry(0, 0, 0, 0))
744746 else throw("Strict value is not equal to itself.")
745747 }
746748
747749
748750
749751 @Callable(i)
750752 func lockRef (duration,referrerAddress,signature) = {
751- let $t03194132006 = lockActions(i, duration)
752- let lockActionsResult = $t03194132006._1
753- let gWxAmountStart = $t03194132006._2
753+ let $t03189231957 = lockActions(i, duration)
754+ let lockActionsResult = $t03189231957._1
755+ let gWxAmountStart = $t03189231957._2
754756 let referralAddress = toString(i.caller)
755757 let refInv = if (if ((referrerAddress == ""))
756758 then true
757759 else (signature == base58''))
758760 then unit
759761 else invoke(referralsContractAddressOrFail, "createPair", [referralProgramName, referrerAddress, referralAddress, signature], nil)
760762 if ((refInv == refInv))
761763 then {
762764 let updateRefActivity = invoke(mathContract, "updateReferralActivity", [toString(i.caller), gWxAmountStart], nil)
763765 if ((updateRefActivity == updateRefActivity))
764766 then $Tuple2(lockActionsResult, unit)
765767 else throw("Strict value is not equal to itself.")
766768 }
767769 else throw("Strict value is not equal to itself.")
768770 }
769771
770772
771773
772774 @Callable(i)
773775 func lock (duration) = {
774- let $t03246432529 = lockActions(i, duration)
775- let lockActionsResult = $t03246432529._1
776- let gWxAmountStart = $t03246432529._2
776+ let $t03241532480 = lockActions(i, duration)
777+ let lockActionsResult = $t03241532480._1
778+ let gWxAmountStart = $t03241532480._2
777779 let updateRefActivity = invoke(mathContract, "updateReferralActivity", [toString(i.caller), gWxAmountStart], nil)
778780 if ((updateRefActivity == updateRefActivity))
779781 then $Tuple2(lockActionsResult, unit)
780782 else throw("Strict value is not equal to itself.")
781783 }
782784
783785
784786
785787 @Callable(i)
786788 func increaseLock (deltaDuration) = {
787789 let cfgArray = readConfigArrayOrFail()
788790 let assetIdStr = cfgArray[IdxCfgAssetId]
789791 let assetId = fromBase58String(assetIdStr)
790792 let minLockDuration = parseIntValue(cfgArray[IdxCfgMinLockDuration])
791793 let maxLockDuration = parseIntValue(cfgArray[IdxCfgMaxLockDuration])
792794 let pmtAmount = extractOptionalPaymentAmountOrFail(i, assetId)
793795 let userAddressStr = toString(i.caller)
794796 let userRecordArray = readLockParamsRecordOrFail(userAddressStr)
795797 let userNumStr = userRecordArray[IdxLockUserNum]
796798 let userAmount = parseIntValue(userRecordArray[IdxLockAmount])
797799 let lockStart = parseIntValue(userRecordArray[IdxLockStart])
798800 let lockDuration = parseIntValue(userRecordArray[IdxLockDuration])
799801 let lockEnd = (lockStart + lockDuration)
800802 let remainingDuration = max([(lockEnd - height), 0])
801803 let userAmountNew = (userAmount + pmtAmount)
802804 let lockDurationNew = (remainingDuration + deltaDuration)
803805 if ((0 > deltaDuration))
804806 then throw("duration is less then zero")
805807 else if ((minLockDuration > lockDurationNew))
806808 then throw(("lockDurationNew is less then minLockDuration=" + toString(minLockDuration)))
807809 else if ((lockDurationNew > maxLockDuration))
808810 then throw(("deltaDuration + existedLockDuration is greater then maxLockDuration=" + toString(maxLockDuration)))
809811 else {
810812 let coeffX8 = fraction(lockDurationNew, MULT8, maxLockDuration)
811813 let gWxAmountStart = fraction(userAmountNew, coeffX8, MULT8)
812814 let updateRefActivity = invoke(mathContract, "updateReferralActivity", [toString(i.caller), gWxAmountStart], nil)
813815 if ((updateRefActivity == updateRefActivity))
814816 then {
815817 let lockStartNew = height
816818 let gWxParamsResultList = aal(invoke(mathContract, "calcGwxParamsREADONLY", [gWxAmountStart, lockStartNew, lockDurationNew], nil))
817819 let k = ai(gWxParamsResultList[0])
818820 let b = ai(gWxParamsResultList[1])
819821 let period = toString(ai(gWxParamsResultList[2]))
820822 let currUserGwx = calcCurrentGwxAmount(userAddressStr)
821823 let gwxDiff = (gWxAmountStart - currUserGwx)
822824 if ((0 > gwxDiff))
823825 then throw(("gwxDiff is less then 0: " + toString(gwxDiff)))
824826 else {
825827 let totalCachedGwxRaw = getTotalCachedGwx(false)
826828 let totalCachedGwxCorrected = getTotalCachedGwx(true)
827829 (((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))])
828830 }
829831 }
830832 else throw("Strict value is not equal to itself.")
831833 }
832834 }
833835
834836
835837
836838 @Callable(i)
837839 func claimWxBoost (lpAssetIdStr,userAddressStr) = if ((stakingContract != i.caller))
838840 then throw("permissions denied")
839841 else {
840- let $t03561635718 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false)
841- let userBoostAvailable = $t03561635718._1
842- let dataState = $t03561635718._2
843- let debug = $t03561635718._3
842+ let $t03556735669 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false)
843+ let userBoostAvailable = $t03556735669._1
844+ let dataState = $t03556735669._2
845+ let debug = $t03556735669._3
844846 $Tuple2(dataState, [userBoostAvailable])
845847 }
846848
847849
848850
849851 @Callable(i)
850852 func claimWxBoostREADONLY (lpAssetIdStr,userAddressStr) = {
851- let $t03585035951 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true)
852- let userBoostAvailable = $t03585035951._1
853- let dataState = $t03585035951._2
854- let debug = $t03585035951._3
853+ let $t03580135902 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true)
854+ let userBoostAvailable = $t03580135902._1
855+ let dataState = $t03580135902._2
856+ let debug = $t03580135902._3
855857 $Tuple2(nil, [userBoostAvailable, debug])
856858 }
857859
858860
859861
860862 @Callable(i)
861863 func unlock (userAddress) = {
862864 let userRecordArray = readLockParamsRecordOrFail(userAddress)
863865 let userNumStr = userRecordArray[IdxLockUserNum]
864866 let userAmount = parseIntValue(userRecordArray[IdxLockAmount])
865867 let lockStart = parseIntValue(userRecordArray[IdxLockStart])
866868 let lockDuration = parseIntValue(userRecordArray[IdxLockDuration])
867869 let lockEnd = (lockStart + lockDuration)
868870 let cfgArray = readConfigArrayOrFail()
869871 let assetId = fromBase58String(cfgArray[IdxCfgAssetId])
870872 if ((lockEnd >= height))
871873 then throw((("wait " + toString(lockEnd)) + " to unlock"))
872874 else if ((0 >= userAmount))
873875 then throw("nothing to unlock")
874876 else {
875877 let period = valueOrElse(getInteger(mathContract, keyNextPeriod()), 0)
876878 (((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))
877879 }
878880 }
879881
880882
881883
882884 @Callable(i)
883885 func gwxUserInfoREADONLY (userAddress) = {
884886 let gwxAmount = calcCurrentGwxAmount(userAddress)
885887 $Tuple2(nil, [gwxAmount])
886888 }
887889
888890
889891
890892 @Callable(i)
891893 func userMaxDurationREADONLY (userAddressStr) = {
892894 let cfgArray = readConfigArrayOrFail()
893895 let maxLockDuration = parseIntValue(cfgArray[IdxCfgMaxLockDuration])
894896 let userRecordOption = getString(this, keyLockParamsRecord(userAddressStr))
895897 if ((userRecordOption == unit))
896898 then $Tuple2(nil, $Tuple2("lock", maxLockDuration))
897899 else {
898900 let userRecordArray = split(value(userRecordOption), SEP)
899901 let lockStart = parseIntValue(userRecordArray[IdxLockStart])
900902 let lockDuration = parseIntValue(userRecordArray[IdxLockDuration])
901903 let lockEnd = (lockStart + lockDuration)
902904 let remainingDuration = max([(lockEnd - height), 0])
903905 let maxDeltaDuration = (maxLockDuration - remainingDuration)
904906 $Tuple2(nil, $Tuple2("increaseLock", maxDeltaDuration))
905907 }
906908 }
907909
908910
909911
910912 @Callable(i)
911913 func getUserGwxAmountAtHeightREADONLY (userAddress,targetHeight) = {
912914 let gwxAmount = calcUserGwxAmountAtHeight(userAddress, targetHeight)
913915 $Tuple2(nil, gwxAmount)
914916 }
915917
916918
917919
918920 @Callable(i)
919921 func getTotalCachedGwxREADONLY () = $Tuple2(nil, getTotalCachedGwx(true))
920922
921923
922924
923925 @Callable(i)
924926 func onBoostEmissionUpdate () = {
925927 let checkCaller = if ((i.caller == emissionContract))
926928 then true
927929 else mustManager(i)
928930 if ((checkCaller == checkCaller))
929931 then refreshBoostEmissionIntegral()
930932 else throw("Strict value is not equal to itself.")
931933 }
932934
933935
934936
935937 @Callable(i)
936938 func onStakedVoteUpdate (lpAssetIdStr,userAddressStr,edge) = {
937939 let checkCaller = if ((i.caller == stakingContract))
938940 then true
939941 else mustManager(i)
940942 if ((checkCaller == checkCaller))
941943 then {
942944 let actions = refreshVoteStakedIntegral(lpAssetIdStr, userAddressStr, edge)
943945 $Tuple2(actions, unit)
944946 }
945947 else throw("Strict value is not equal to itself.")
946948 }
947949
948950
949951
950952 @Callable(i)
951953 func getVotingResultStakedREADONLY (lpAssetIdStr) = $Tuple2(nil, getVotingResultStaked(lpAssetIdStr))
952954
953955
954956
955957 @Callable(i)
956958 func getUserVoteFinalizedREADONLY (lpAssetIdStr,userAddressStr) = $Tuple2(nil, getUserVoteFinalized(lpAssetIdStr, userAddressStr))
957959
958960
959961
960962 @Callable(i)
961963 func setManager (pendingManagerPublicKey) = {
962964 let checkCaller = mustManager(i)
963965 if ((checkCaller == checkCaller))
964966 then {
965967 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
966968 if ((checkManagerPublicKey == checkManagerPublicKey))
967969 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
968970 else throw("Strict value is not equal to itself.")
969971 }
970972 else throw("Strict value is not equal to itself.")
971973 }
972974
973975
974976
975977 @Callable(i)
976978 func confirmManager () = {
977979 let pm = pendingManagerPublicKeyOrUnit()
978980 let hasPM = if (isDefined(pm))
979981 then true
980982 else throw("No pending manager")
981983 if ((hasPM == hasPM))
982984 then {
983985 let checkPM = if ((i.callerPublicKey == value(pm)))
984986 then true
985987 else throw("You are not pending manager")
986988 if ((checkPM == checkPM))
987989 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
988990 else throw("Strict value is not equal to itself.")
989991 }
990992 else throw("Strict value is not equal to itself.")
991993 }
992994
993995
994996 @Verifier(tx)
995997 func verify () = {
996998 let targetPublicKey = match managerPublicKeyOrUnit() {
997999 case pk: ByteVector =>
9981000 pk
9991001 case _: Unit =>
10001002 tx.senderPublicKey
10011003 case _ =>
10021004 throw("Match error")
10031005 }
10041006 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
10051007 }
10061008

github/deemru/w8io/026f985 
150.67 ms