tx · CTRfpKuBhPrSohAaLoopKiyvAn2htBoPoc2NepCTSjXs

3Mp3nG9T5fKGziHW8mcCqx3jMFx3towh3WA:  -0.02400000 Waves

2022.12.09 11:38 [2352549] smart account 3Mp3nG9T5fKGziHW8mcCqx3jMFx3towh3WA > SELF 0.00000000 Waves

{ "type": 13, "id": "CTRfpKuBhPrSohAaLoopKiyvAn2htBoPoc2NepCTSjXs", "fee": 2400000, "feeAssetId": null, "timestamp": 1670575073088, "version": 2, "chainId": 84, "sender": "3Mp3nG9T5fKGziHW8mcCqx3jMFx3towh3WA", "senderPublicKey": "D46gQxzmdzdCTYRg6dMcwFoUrc6ZmxF6GKd5ZoTkvzp1", "proofs": [ "2DNTj9ocPvM7TSErQy1qK3PWA5uYVSCPeHnk9CV9vHHw1toscFid1ZsLkzMEEJeR3XzAyvZmqqUezVck1LGN3gkC" ], "script": "base64:BgJcCAISAwoBCBIAEgQKAggBEgcKBQgICAgBEgQKAggIEgUKAwgIARIECgIICBIDCgEBEgMKAQESBAoCCAgSBAoCCAQSABIDCgEBEgASBAoCCAgSBAoCCAgSBAoCCAgyAAlzZXBhcmF0b3ICAl9fAA5wb29sV2VpZ2h0TXVsdACAwtcvAA9tYXhEZXB0aERlZmF1bHQACgAWZmluYWxpemF0aW9uU3RhZ2VUb3RhbAAAABdmaW5hbGl6YXRpb25TdGFnZVNoYXJlcwABAA5rZXlFcG9jaExlbmd0aAkAuQkCCQDMCAICAiVzCQDMCAICC2Vwb2NoTGVuZ3RoBQNuaWwFCXNlcGFyYXRvcgAPa2V5Q3VycmVudEVwb2NoCQC5CQIJAMwIAgICJXMJAMwIAgIMY3VycmVudEVwb2NoBQNuaWwFCXNlcGFyYXRvcgALa2V5TWF4RGVwdGgJALkJAgkAzAgCAgIlcwkAzAgCAghtYXhEZXB0aAUDbmlsBQlzZXBhcmF0b3IAImtleVZvdGluZ0VtaXNzaW9uQ2FuZGlkYXRlQ29udHJhY3QJALkJAgkAzAgCAgIlcwkAzAgCAh92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FpAQpkZWxldGVOb2RlAghsaXN0TmFtZQJpZAQLY2hlY2tDYWxsZXIJAQttdXN0TWFuYWdlcgEFAWkDCQAAAgULY2hlY2tDYWxsZXIFC2NoZWNrQ2FsbGVyCQCUCgIJARFkZWxldGVOb2RlQWN0aW9ucwIFCGxpc3ROYW1lBQJpZAUEdW5pdAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECdHgBBnZlcmlmeQAED3RhcmdldFB1YmxpY0tleQQHJG1hdGNoMAkBFm1hbmFnZXJQdWJsaWNLZXlPclVuaXQAAwkAAQIFByRtYXRjaDACCkJ5dGVWZWN0b3IEAnBrBQckbWF0Y2gwBQJwawMJAAECBQckbWF0Y2gwAgRVbml0CAUCdHgPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFD3RhcmdldFB1YmxpY0tleYZ5hVI=", "height": 2352549, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7kgLpjyXegDCmDuWXnPDFboirXWvnwiMqHX2pS7dR5fE Next: H1K2u4rQ2pRmD3uGHNEUoJimbdsBVXhfL6seYoYTnzkv Diff:
OldNewDifferences
3737
3838 let keyStartHeightUi = makeString(["%s", "startHeightUi"], separator)
3939
40+let keyFinalizationShouldBeForced = makeString(["%s", "force"], separator)
41+
4042 func keyStartHeightByEpoch (epoch) = makeString(["%s%d", "startHeight", toString(epoch)], separator)
4143
4244
4446
4547
4648 func keyInList (pool) = {
47- let $t014361476 = pool
48- let amountAssetId = $t014361476._1
49- let priceAssetId = $t014361476._2
49+ let $t015111551 = pool
50+ let amountAssetId = $t015111551._1
51+ let priceAssetId = $t015111551._2
5052 makeString(["%s%s%s", "inList", amountAssetId, priceAssetId], separator)
5153 }
5254
5557
5658
5759 func keyVote (pool,address,epoch) = {
58- let $t017501790 = pool
59- let amountAssetId = $t017501790._1
60- let priceAssetId = $t017501790._2
60+ let $t018251865 = pool
61+ let amountAssetId = $t018251865._1
62+ let priceAssetId = $t018251865._2
6163 makeString(["%s%s%s%s%d", "vote", amountAssetId, priceAssetId, toString(address), toString(epoch)], separator)
6264 }
6365
6466
6567 func keyVotingResult (pool,epoch) = {
66- let $t019722012 = pool
67- let amountAssetId = $t019722012._1
68- let priceAssetId = $t019722012._2
68+ let $t020472087 = pool
69+ let amountAssetId = $t020472087._1
70+ let priceAssetId = $t020472087._2
6971 makeString(["%s%s%s%d", "votingResult", amountAssetId, priceAssetId, toString(epoch)], separator)
7072 }
7173
7274
7375 func keyPoolShare (pool,epoch) = {
74- let $t021772217 = pool
75- let amountAssetId = $t021772217._1
76- let priceAssetId = $t021772217._2
76+ let $t022522292 = pool
77+ let amountAssetId = $t022522292._1
78+ let priceAssetId = $t022522292._2
7779 makeString(["%s%s%s%d", "poolShare", amountAssetId, priceAssetId, toString(epoch)], separator)
7880 }
7981
138140
139141
140142 func checkWxEmissionPoolLabel (pool) = {
141- let $t044594499 = pool
142- let amountAssetId = $t044594499._1
143- let priceAssetId = $t044594499._2
143+ let $t045344574 = pool
144+ let amountAssetId = $t045344574._1
145+ let priceAssetId = $t045344574._2
144146 let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
145147 let @ = invoke(factoryContract, "checkWxEmissionPoolLabel", [amountAssetId, priceAssetId], nil)
146148 if ($isInstanceOf(@, "Boolean"))
152154 let poolsListName = "pools"
153155
154156 func getVotesListName (pool) = {
155- let $t048004840 = pool
156- let amountAssetId = $t048004840._1
157- let priceAssetId = $t048004840._2
157+ let $t048754915 = pool
158+ let amountAssetId = $t048754915._1
159+ let priceAssetId = $t048754915._2
158160 makeString(["votes", amountAssetId, priceAssetId], separator)
159161 }
160162
497499 if ((checkTargetEpoch == checkTargetEpoch))
498500 then {
499501 let pool = stringToPool(poolStr)
500- let $t01719517235 = pool
501- let amountAssetId = $t01719517235._1
502- let priceAssetId = $t01719517235._2
502+ let $t01727017310 = pool
503+ let amountAssetId = $t01727017310._1
504+ let priceAssetId = $t01727017310._2
503505 let wxEmission = checkWxEmissionPoolLabel(pool)
504506 let gwxAmountAtEndTotal = {
505507 let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeight], nil)
535537
536538
537539 @Callable(i)
538-func processPoolINTERNAL (poolStr) = {
540+func processPoolINTERNAL (poolStr,force) = {
539541 let checkCaller = mustThis(i)
540542 if ((checkCaller == checkCaller))
541543 then {
542- let targetEpoch = (getIntOrFail(this, keyCurrentEpoch) - 1)
544+ let targetEpoch = {
545+ let currentEpoch = getIntOrFail(this, keyCurrentEpoch)
546+ if (force)
547+ then currentEpoch
548+ else (currentEpoch - 1)
549+ }
543550 let checkTargetEpoch = if ((targetEpoch >= 0))
544551 then true
545552 else throw("processPoolINTERNAL: invalid target epoch")
546553 if ((checkTargetEpoch == checkTargetEpoch))
547554 then {
548555 let pool = stringToPool(poolStr)
549- let $t01880118841 = pool
550- let amountAssetId = $t01880118841._1
551- let priceAssetId = $t01880118841._2
556+ let $t01903619076 = pool
557+ let amountAssetId = $t01903619076._1
558+ let priceAssetId = $t01903619076._2
552559 let stakingContract = addressFromStringValue(getStrOrFail(this, keyStakingContract))
553560 let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
554561 let lpAssetId = getLpAssetByPoolAssets(amountAssetId, priceAssetId)
573580 let modifyWeightInv = invoke(factoryContract, "modifyWeight", [lpAssetId, share], nil)
574581 if ((modifyWeightInv == modifyWeightInv))
575582 then {
576- let poolsListActions = if (wxEmission)
583+ let poolsListActions = if (if (wxEmission)
584+ then true
585+ else force)
577586 then nil
578587 else ([DeleteEntry(keyInList(pool))] ++ deleteNodeActions(poolsListName, poolStr))
579588 $Tuple2(([IntegerEntry(keyPoolShare(pool, targetEpoch), share)] ++ poolsListActions), false)
591600
592601 @Callable(i)
593602 func finalizeHelper () = {
603+ let force = valueOrElse(getBoolean(keyFinalizationShouldBeForced), false)
594604 let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0)
595605 let previousEpoch = (epoch - 1)
596606 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
597607 let epochLength = getIntOrFail(this, keyEpochLength)
598608 let endHeight = (startHeight + epochLength)
599609 let finalizationStageOrUnit = getInteger(this, keyFinalizationStage)
600- if (if ((height >= endHeight))
610+ if (if (if ((height >= endHeight))
601611 then (finalizationStageOrUnit == unit)
612+ else false)
613+ then !(force)
602614 else false)
603615 then {
604616 let newEpoch = (epoch + 1)
605617 $Tuple2([IntegerEntry(keyStartHeightByEpoch(newEpoch), height), IntegerEntry(keyStartHeight, height), IntegerEntry(keyCurrentEpoch, newEpoch), IntegerEntry(keyFinalizationStage, finalizationStageTotal)], true)
606618 }
607- else if ((finalizationStageOrUnit == unit))
608- then $Tuple2(nil, false)
609- else if ((finalizationStageOrUnit == finalizationStageTotal))
610- then {
611- let poolOrUnit = getString(keyNextPool)
612- let userOrUnit = getString(keyNextUser)
613- match poolOrUnit {
614- case _: Unit =>
615- match getString(keyListHead(poolsListName)) {
619+ else if (if (force)
620+ then (finalizationStageOrUnit == unit)
621+ else false)
622+ then $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares)], true)
623+ else if ((finalizationStageOrUnit == unit))
624+ then $Tuple2(nil, false)
625+ else if ((finalizationStageOrUnit == finalizationStageTotal))
626+ then {
627+ let poolOrUnit = getString(keyNextPool)
628+ let userOrUnit = getString(keyNextUser)
629+ match poolOrUnit {
630+ case _: Unit =>
631+ match getString(keyListHead(poolsListName)) {
632+ case _: Unit =>
633+ $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true)
634+ case poolsHeadStr: String =>
635+ $Tuple2([StringEntry(keyNextPool, poolsHeadStr)], true)
636+ case _ =>
637+ throw("Match error")
638+ }
639+ case poolStr: String =>
640+ let pool = stringToPool(poolStr)
641+ let nextUserOrUnit = match userOrUnit {
642+ case _: Unit =>
643+ getString(keyListHead(getVotesListName(pool)))
644+ case user: String =>
645+ let next = getString(keyListNext(getVotesListName(pool), user))
646+ if ((next == next))
647+ then {
648+ let processVoteInv = invoke(this, "processVoteINTERNAL", [poolStr, user], nil)
649+ if ((processVoteInv == processVoteInv))
650+ then next
651+ else throw("Strict value is not equal to itself.")
652+ }
653+ else throw("Strict value is not equal to itself.")
654+ case _ =>
655+ throw("Match error")
656+ }
657+ match nextUserOrUnit {
658+ case _: Unit =>
659+ let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr))
660+ match nextPoolOrUnit {
661+ case _: Unit =>
662+ $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true)
663+ case s: String =>
664+ $Tuple2([StringEntry(keyNextPool, s), DeleteEntry(keyNextUser)], true)
665+ case _ =>
666+ throw("Match error")
667+ }
668+ case nextUser: String =>
669+ $Tuple2([StringEntry(keyNextUser, nextUser)], true)
670+ case _ =>
671+ throw("Match error")
672+ }
673+ case _ =>
674+ throw("Match error")
675+ }
676+ }
677+ else if ((finalizationStageOrUnit == finalizationStageShares))
678+ then {
679+ let poolOrUnit = getString(keyNextPool)
680+ match poolOrUnit {
616681 case _: Unit =>
617- $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true)
618- case poolsHeadStr: String =>
619- $Tuple2([StringEntry(keyNextPool, poolsHeadStr)], true)
620- case _ =>
621- throw("Match error")
622- }
623- case poolStr: String =>
624- let pool = stringToPool(poolStr)
625- let nextUserOrUnit = match userOrUnit {
626- case _: Unit =>
627- getString(keyListHead(getVotesListName(pool)))
628- case user: String =>
629- let next = getString(keyListNext(getVotesListName(pool), user))
630- if ((next == next))
682+ match getString(keyListHead(poolsListName)) {
683+ case _: Unit =>
684+ let actions = if (force)
685+ then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced)]
686+ else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight)]
687+ $Tuple2(actions, true)
688+ case nextPoolStr: String =>
689+ $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true)
690+ case _ =>
691+ throw("Match error")
692+ }
693+ case poolStr: String =>
694+ let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr))
695+ if ((nextPoolOrUnit == nextPoolOrUnit))
631696 then {
632- let processVoteInv = invoke(this, "processVoteINTERNAL", [poolStr, user], nil)
633- if ((processVoteInv == processVoteInv))
634- then next
697+ let r = {
698+ let @ = invoke(this, "processPoolINTERNAL", [poolStr, force], nil)
699+ if ($isInstanceOf(@, "Boolean"))
700+ then @
701+ else throw(($getType(@) + " couldn't be cast to Boolean"))
702+ }
703+ if ((r == r))
704+ then if (r)
705+ then $Tuple2(nil, true)
706+ else match nextPoolOrUnit {
707+ case _: Unit =>
708+ let actions = if (force)
709+ then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced), DeleteEntry(keyNextPool)]
710+ else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight), DeleteEntry(keyNextPool)]
711+ $Tuple2(actions, true)
712+ case nextPoolStr: String =>
713+ $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true)
714+ case _ =>
715+ throw("Match error")
716+ }
635717 else throw("Strict value is not equal to itself.")
636718 }
637719 else throw("Strict value is not equal to itself.")
638720 case _ =>
639721 throw("Match error")
640722 }
641- match nextUserOrUnit {
642- case _: Unit =>
643- let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr))
644- match nextPoolOrUnit {
645- case _: Unit =>
646- $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true)
647- case s: String =>
648- $Tuple2([StringEntry(keyNextPool, s), DeleteEntry(keyNextUser)], true)
649- case _ =>
650- throw("Match error")
651- }
652- case nextUser: String =>
653- $Tuple2([StringEntry(keyNextUser, nextUser)], true)
654- case _ =>
655- throw("Match error")
656723 }
657- case _ =>
658- throw("Match error")
659- }
660- }
661- else if ((finalizationStageOrUnit == finalizationStageShares))
662- then {
663- let poolOrUnit = getString(keyNextPool)
664- match poolOrUnit {
665- case _: Unit =>
666- match getString(keyListHead(poolsListName)) {
667- case _: Unit =>
668- $Tuple2([DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight)], true)
669- case nextPoolStr: String =>
670- $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true)
671- case _ =>
672- throw("Match error")
673- }
674- case poolStr: String =>
675- let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr))
676- if ((nextPoolOrUnit == nextPoolOrUnit))
677- then {
678- let r = {
679- let @ = invoke(this, "processPoolINTERNAL", [poolStr], nil)
680- if ($isInstanceOf(@, "Boolean"))
681- then @
682- else throw(($getType(@) + " couldn't be cast to Boolean"))
683- }
684- if ((r == r))
685- then if (r)
686- then $Tuple2(nil, true)
687- else match nextPoolOrUnit {
688- case _: Unit =>
689- $Tuple2([DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight), DeleteEntry(keyNextPool)], true)
690- case nextPoolStr: String =>
691- $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true)
692- case _ =>
693- throw("Match error")
694- }
695- else throw("Strict value is not equal to itself.")
696- }
697- else throw("Strict value is not equal to itself.")
698- case _ =>
699- throw("Match error")
700- }
701- }
702- else throw("finalization is broken")
724+ else throw("finalization is broken")
703725 }
704726
705727
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let separator = "__"
55
66 let poolWeightMult = 100000000
77
88 let maxDepthDefault = 10
99
1010 let finalizationStageTotal = 0
1111
1212 let finalizationStageShares = 1
1313
1414 let keyEpochLength = makeString(["%s", "epochLength"], separator)
1515
1616 let keyCurrentEpoch = makeString(["%s", "currentEpoch"], separator)
1717
1818 let keyMaxDepth = makeString(["%s", "maxDepth"], separator)
1919
2020 let keyVotingEmissionCandidateContract = makeString(["%s", "votingEmissionCandidateContract"], separator)
2121
2222 let keyFactoryContract = makeString(["%s", "factoryContract"], separator)
2323
2424 let keyBoostingContract = makeString(["%s", "boostingContract"], separator)
2525
2626 let keyStakingContract = makeString(["%s", "stakingContract"], separator)
2727
2828 let keyFinalizationStage = makeString(["%s", "finalizationStage"], separator)
2929
3030 let keyNextPool = makeString(["%s", "nextPool"], separator)
3131
3232 let keyNextUser = makeString(["%s", "nextUser"], separator)
3333
3434 let keyStartHeight = makeString(["%s", "startHeight"], separator)
3535
3636 let keyCurrentEpochUi = makeString(["%s", "currentEpochUi"], separator)
3737
3838 let keyStartHeightUi = makeString(["%s", "startHeightUi"], separator)
3939
40+let keyFinalizationShouldBeForced = makeString(["%s", "force"], separator)
41+
4042 func keyStartHeightByEpoch (epoch) = makeString(["%s%d", "startHeight", toString(epoch)], separator)
4143
4244
4345 func keyFinalized (epoch) = makeString(["%s%d", "finalized", toString(epoch)], separator)
4446
4547
4648 func keyInList (pool) = {
47- let $t014361476 = pool
48- let amountAssetId = $t014361476._1
49- let priceAssetId = $t014361476._2
49+ let $t015111551 = pool
50+ let amountAssetId = $t015111551._1
51+ let priceAssetId = $t015111551._2
5052 makeString(["%s%s%s", "inList", amountAssetId, priceAssetId], separator)
5153 }
5254
5355
5456 func keyUsed (address,epoch) = makeString(["%s%s%d", "used", toString(address), toString(epoch)], separator)
5557
5658
5759 func keyVote (pool,address,epoch) = {
58- let $t017501790 = pool
59- let amountAssetId = $t017501790._1
60- let priceAssetId = $t017501790._2
60+ let $t018251865 = pool
61+ let amountAssetId = $t018251865._1
62+ let priceAssetId = $t018251865._2
6163 makeString(["%s%s%s%s%d", "vote", amountAssetId, priceAssetId, toString(address), toString(epoch)], separator)
6264 }
6365
6466
6567 func keyVotingResult (pool,epoch) = {
66- let $t019722012 = pool
67- let amountAssetId = $t019722012._1
68- let priceAssetId = $t019722012._2
68+ let $t020472087 = pool
69+ let amountAssetId = $t020472087._1
70+ let priceAssetId = $t020472087._2
6971 makeString(["%s%s%s%d", "votingResult", amountAssetId, priceAssetId, toString(epoch)], separator)
7072 }
7173
7274
7375 func keyPoolShare (pool,epoch) = {
74- let $t021772217 = pool
75- let amountAssetId = $t021772217._1
76- let priceAssetId = $t021772217._2
76+ let $t022522292 = pool
77+ let amountAssetId = $t022522292._1
78+ let priceAssetId = $t022522292._2
7779 makeString(["%s%s%s%d", "poolShare", amountAssetId, priceAssetId, toString(epoch)], separator)
7880 }
7981
8082
8183 func keyTotalVotes (epoch) = makeString(["%s%d", "totalVotes", toString(epoch)], separator)
8284
8385
8486 func getValueOrFail (address,key,type) = {
8587 let error = makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")
8688 valueOrErrorMessage( match type {
8789 case str: String =>
8890 getString(address, key)
8991 case int: Int =>
9092 getInteger(address, key)
9193 case _ =>
9294 throw("invalid entry type")
9395 }, error)
9496 }
9597
9698
9799 func getStrOrFail (address,key) = {
98100 let @ = getValueOrFail(address, key, "")
99101 if ($isInstanceOf(@, "String"))
100102 then @
101103 else throw(($getType(@) + " couldn't be cast to String"))
102104 }
103105
104106
105107 func getIntOrFail (address,key) = {
106108 let @ = getValueOrFail(address, key, 0)
107109 if ($isInstanceOf(@, "Int"))
108110 then @
109111 else throw(($getType(@) + " couldn't be cast to Int"))
110112 }
111113
112114
113115 func poolToString (pool) = ((pool._1 + separator) + pool._2)
114116
115117
116118 func stringToPool (str) = {
117119 let parts = split(str, separator)
118120 if ((size(parts) == 2))
119121 then $Tuple2(parts[0], parts[1])
120122 else throw("invalid pool string")
121123 }
122124
123125
124126 func getLpAssetByPoolAssets (amountAssetId,priceAssetId) = {
125127 func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
126128
127129 func keyMappingPoolAssetsToPoolContractAddress (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + toString(internalAmountAssetIdStr)) + "__") + toString(internalPriceAssetIdStr)) + "__mappings__poolAssets2PoolContract")
128130
129131 func keyMappingPoolContractToLPAsset (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
130132
131133 let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
132134 let amountAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amountAssetId))
133135 let priceAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAssetId))
134136 let poolContractAddress = getStrOrFail(factoryContract, keyMappingPoolAssetsToPoolContractAddress(amountAssetInternalId, priceAssetInternalId))
135137 let lpAssetId = getStrOrFail(factoryContract, keyMappingPoolContractToLPAsset(poolContractAddress))
136138 lpAssetId
137139 }
138140
139141
140142 func checkWxEmissionPoolLabel (pool) = {
141- let $t044594499 = pool
142- let amountAssetId = $t044594499._1
143- let priceAssetId = $t044594499._2
143+ let $t045344574 = pool
144+ let amountAssetId = $t045344574._1
145+ let priceAssetId = $t045344574._2
144146 let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
145147 let @ = invoke(factoryContract, "checkWxEmissionPoolLabel", [amountAssetId, priceAssetId], nil)
146148 if ($isInstanceOf(@, "Boolean"))
147149 then @
148150 else throw(($getType(@) + " couldn't be cast to Boolean"))
149151 }
150152
151153
152154 let poolsListName = "pools"
153155
154156 func getVotesListName (pool) = {
155- let $t048004840 = pool
156- let amountAssetId = $t048004840._1
157- let priceAssetId = $t048004840._2
157+ let $t048754915 = pool
158+ let amountAssetId = $t048754915._1
159+ let priceAssetId = $t048754915._2
158160 makeString(["votes", amountAssetId, priceAssetId], separator)
159161 }
160162
161163
162164 func keyListHead (listName) = {
163165 let meta = if ((listName == poolsListName))
164166 then "%s%s"
165167 else "%s%s%s%s"
166168 makeString([meta, listName, "head"], separator)
167169 }
168170
169171
170172 func keyListSize (listName) = {
171173 let meta = if ((listName == poolsListName))
172174 then "%s%s"
173175 else "%s%s%s%s"
174176 makeString([meta, listName, "size"], separator)
175177 }
176178
177179
178180 func keyListPrev (listName,id) = {
179181 let meta = if ((listName == poolsListName))
180182 then "%s%s%s%s"
181183 else "%s%s%s%s%s"
182184 makeString([meta, listName, id, "prev"], separator)
183185 }
184186
185187
186188 func keyListNext (listName,id) = {
187189 let meta = if ((listName == poolsListName))
188190 then "%s%s%s%s"
189191 else "%s%s%s%s%s"
190192 makeString([meta, listName, id, "next"], separator)
191193 }
192194
193195
194196 func containsNode (listName,id) = {
195197 let headOrUnit = getString(this, keyListHead(listName))
196198 let prevOrUnit = getString(this, keyListPrev(listName, id))
197199 let nextOrUnit = getString(this, keyListNext(listName, id))
198200 if (if ((id == valueOrElse(headOrUnit, "")))
199201 then true
200202 else (prevOrUnit != unit))
201203 then true
202204 else (nextOrUnit != unit)
203205 }
204206
205207
206208 func insertNodeActions (listName,id) = {
207209 let headOrUnit = getString(this, keyListHead(listName))
208210 let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
209211 let checkNode = if (!(containsNode(listName, id)))
210212 then true
211213 else throw("Node exists")
212214 if ((checkNode == checkNode))
213215 then (([IntegerEntry(keyListSize(listName), (listSize + 1))] ++ (if ((headOrUnit != unit))
214216 then [StringEntry(keyListNext(listName, id), value(headOrUnit)), StringEntry(keyListPrev(listName, value(headOrUnit)), id)]
215217 else nil)) ++ [StringEntry(keyListHead(listName), id)])
216218 else throw("Strict value is not equal to itself.")
217219 }
218220
219221
220222 func deleteNodeActions (listName,id) = {
221223 let headOrUnit = getString(this, keyListHead(listName))
222224 let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
223225 let prevOrUnit = getString(this, keyListPrev(listName, id))
224226 let nextOrUnit = getString(this, keyListNext(listName, id))
225227 ([IntegerEntry(keyListSize(listName), (listSize - 1))] ++ (if (if ((prevOrUnit != unit))
226228 then (nextOrUnit != unit)
227229 else false)
228230 then [StringEntry(keyListNext(listName, value(prevOrUnit)), value(nextOrUnit)), StringEntry(keyListPrev(listName, value(nextOrUnit)), value(prevOrUnit)), DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, id))]
229231 else if ((nextOrUnit != unit))
230232 then [StringEntry(keyListHead(listName), value(nextOrUnit)), DeleteEntry(keyListNext(listName, id)), DeleteEntry(keyListPrev(listName, value(nextOrUnit)))]
231233 else if ((prevOrUnit != unit))
232234 then [DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, value(prevOrUnit)))]
233235 else if ((id == valueOrElse(headOrUnit, "")))
234236 then [DeleteEntry(keyListHead(listName))]
235237 else throw(((("invalid node: " + listName) + ".") + id))))
236238 }
237239
238240
239241 func keyManagerPublicKey () = "%s__managerPublicKey"
240242
241243
242244 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
243245
244246
245247 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
246248 case s: String =>
247249 fromBase58String(s)
248250 case _: Unit =>
249251 unit
250252 case _ =>
251253 throw("Match error")
252254 }
253255
254256
255257 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
256258 case s: String =>
257259 fromBase58String(s)
258260 case _: Unit =>
259261 unit
260262 case _ =>
261263 throw("Match error")
262264 }
263265
264266
265267 let permissionDeniedError = throw("Permission denied")
266268
267269 func mustThis (i) = if ((i.caller == this))
268270 then true
269271 else permissionDeniedError
270272
271273
272274 func mustManager (i) = match managerPublicKeyOrUnit() {
273275 case pk: ByteVector =>
274276 if ((i.callerPublicKey == pk))
275277 then true
276278 else permissionDeniedError
277279 case _: Unit =>
278280 mustThis(i)
279281 case _ =>
280282 throw("Match error")
281283 }
282284
283285
284286 @Callable(i)
285287 func setManager (pendingManagerPublicKey) = {
286288 let checkCaller = mustManager(i)
287289 if ((checkCaller == checkCaller))
288290 then {
289291 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
290292 if ((checkManagerPublicKey == checkManagerPublicKey))
291293 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
292294 else throw("Strict value is not equal to itself.")
293295 }
294296 else throw("Strict value is not equal to itself.")
295297 }
296298
297299
298300
299301 @Callable(i)
300302 func confirmManager () = {
301303 let pm = pendingManagerPublicKeyOrUnit()
302304 let hasPM = if (isDefined(pm))
303305 then true
304306 else throw("No pending manager")
305307 if ((hasPM == hasPM))
306308 then {
307309 let checkPM = if ((i.callerPublicKey == value(pm)))
308310 then true
309311 else throw("You are not pending manager")
310312 if ((checkPM == checkPM))
311313 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
312314 else throw("Strict value is not equal to itself.")
313315 }
314316 else throw("Strict value is not equal to itself.")
315317 }
316318
317319
318320
319321 @Callable(i)
320322 func getUserGwxAmountAtHeight (userAddress,targetHeight) = {
321323 let boostingContractAddress = valueOrErrorMessage(addressFromString(getStrOrFail(this, keyBoostingContract)), "invalid boosting contract address")
322324 $Tuple2(nil, {
323325 let @ = invoke(boostingContractAddress, "getUserGwxAmountAtHeightREADONLY", [userAddress, targetHeight], nil)
324326 if ($isInstanceOf(@, "Int"))
325327 then @
326328 else throw(($getType(@) + " couldn't be cast to Int"))
327329 })
328330 }
329331
330332
331333
332334 @Callable(i)
333335 func constructor (factoryContract,votingEmissionCandidateContract,boostingContract,stakingContract,epochLength) = {
334336 let checks = [mustManager(i), if ((addressFromString(factoryContract) != unit))
335337 then true
336338 else "invalid factory contract address", if ((addressFromString(votingEmissionCandidateContract) != unit))
337339 then true
338340 else "invalid voting emission candidate contract address", if ((addressFromString(boostingContract) != unit))
339341 then true
340342 else "invalid boosting contract address", if ((addressFromString(stakingContract) != unit))
341343 then true
342344 else "invalid staking contract address", if ((epochLength > 0))
343345 then true
344346 else throw("invalid epoch length")]
345347 if ((checks == checks))
346348 then $Tuple2([StringEntry(keyFactoryContract, factoryContract), StringEntry(keyVotingEmissionCandidateContract, votingEmissionCandidateContract), StringEntry(keyBoostingContract, boostingContract), StringEntry(keyStakingContract, stakingContract), IntegerEntry(keyEpochLength, epochLength)], unit)
347349 else throw("Strict value is not equal to itself.")
348350 }
349351
350352
351353
352354 @Callable(i)
353355 func create (amountAssetId,priceAssetId) = {
354356 let checks = [if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionCandidateContract), "")))
355357 then true
356358 else mustManager(i)]
357359 if ((checks == checks))
358360 then {
359361 let pool = $Tuple2(amountAssetId, priceAssetId)
360362 let inListActions = ([BooleanEntry(keyInList(pool), true)] ++ insertNodeActions(poolsListName, poolToString(pool)))
361363 let currentEpochIsNotDefined = (getInteger(this, keyCurrentEpoch) == unit)
362364 let startHeightActions = if (currentEpochIsNotDefined)
363365 then {
364366 let epoch = 0
365367 [IntegerEntry(keyCurrentEpoch, epoch), IntegerEntry(keyStartHeightByEpoch(epoch), height), IntegerEntry(keyStartHeight, height), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, height)]
366368 }
367369 else nil
368370 $Tuple2((inListActions ++ startHeightActions), unit)
369371 }
370372 else throw("Strict value is not equal to itself.")
371373 }
372374
373375
374376
375377 @Callable(i)
376378 func vote (amountAssetId,priceAssetId,amount) = {
377379 let pool = $Tuple2(amountAssetId, priceAssetId)
378380 let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0)
379381 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
380382 let epochLength = getIntOrFail(this, keyEpochLength)
381383 let endHeight = (startHeight + epochLength)
382384 let finalizationStageOrUnit = getInteger(this, keyFinalizationStage)
383385 let used = valueOrElse(getInteger(this, keyUsed(i.caller, epoch)), 0)
384386 let vote = valueOrElse(getInteger(this, keyVote(pool, i.caller, epoch)), 0)
385387 let poolResult = valueOrElse(getInteger(this, keyVotingResult(pool, epoch)), 0)
386388 let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(epoch)), 0)
387389 let gwxAmountAtEndTotal = {
388390 let @ = invoke(this, "getUserGwxAmountAtHeight", [toBase58String(i.caller.bytes), endHeight], nil)
389391 if ($isInstanceOf(@, "Int"))
390392 then @
391393 else throw(($getType(@) + " couldn't be cast to Int"))
392394 }
393395 let available = (gwxAmountAtEndTotal - used)
394396 let newVote = (vote + amount)
395397 let wxEmission = checkWxEmissionPoolLabel(pool)
396398 let checks = [if ((getBoolean(keyInList(pool)) != unit))
397399 then true
398400 else throw("invalid assets"), if ((endHeight > height))
399401 then true
400402 else throw("invalid height"), if ((finalizationStageOrUnit == unit))
401403 then true
402404 else throw("finalization in progress"), if ((gwxAmountAtEndTotal > 0))
403405 then true
404406 else throw("you do not have gWX"), if (if ((amount > 0))
405407 then (available >= amount)
406408 else false)
407409 then true
408410 else throw("invalid amount"), if (wxEmission)
409411 then true
410412 else throw("pool hasn't WX_EMISSION label")]
411413 if ((checks == checks))
412414 then {
413415 let votesListName = getVotesListName(pool)
414416 let userAddressStr = toString(i.caller)
415417 let votesListActions = if (containsNode(votesListName, userAddressStr))
416418 then nil
417419 else insertNodeActions(votesListName, userAddressStr)
418420 $Tuple2(([IntegerEntry(keyUsed(i.caller, epoch), (used + amount)), IntegerEntry(keyVote(pool, i.caller, epoch), newVote), IntegerEntry(keyVotingResult(pool, epoch), (poolResult + amount)), IntegerEntry(keyTotalVotes(epoch), (totalVotes + amount))] ++ votesListActions), unit)
419421 }
420422 else throw("Strict value is not equal to itself.")
421423 }
422424
423425
424426
425427 @Callable(i)
426428 func cancelVote (amountAssetId,priceAssetId) = {
427429 let pool = $Tuple2(amountAssetId, priceAssetId)
428430 let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0)
429431 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
430432 let epochLength = getIntOrFail(this, keyEpochLength)
431433 let endHeight = (startHeight + epochLength)
432434 let finalizationStageOrUnit = getInteger(this, keyFinalizationStage)
433435 let used = valueOrElse(getInteger(this, keyUsed(i.caller, epoch)), 0)
434436 let vote = valueOrElse(getInteger(this, keyVote(pool, i.caller, epoch)), 0)
435437 let poolResult = valueOrElse(getInteger(this, keyVotingResult(pool, epoch)), 0)
436438 let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(epoch)), 0)
437439 let checks = [if ((getBoolean(keyInList(pool)) != unit))
438440 then true
439441 else throw("invalid assets"), if ((endHeight > height))
440442 then true
441443 else throw("invalid height"), if ((finalizationStageOrUnit == unit))
442444 then true
443445 else throw("finalization in progress"), if ((vote > 0))
444446 then true
445447 else throw("no vote")]
446448 if ((checks == checks))
447449 then {
448450 let votesListName = getVotesListName(pool)
449451 let userAddressStr = toString(i.caller)
450452 $Tuple2(([IntegerEntry(keyUsed(i.caller, epoch), max([(used - vote), 0])), DeleteEntry(keyVote(pool, i.caller, epoch)), IntegerEntry(keyVotingResult(pool, epoch), (poolResult - vote)), IntegerEntry(keyTotalVotes(epoch), (totalVotes - vote))] ++ deleteNodeActions(votesListName, userAddressStr)), unit)
451453 }
452454 else throw("Strict value is not equal to itself.")
453455 }
454456
455457
456458
457459 @Callable(i)
458460 func setEpochLength (newEpochLength) = {
459461 let checks = [mustManager(i), if ((newEpochLength > 0))
460462 then true
461463 else throw("invalid epoch length")]
462464 if ((checks == checks))
463465 then $Tuple2([IntegerEntry(keyEpochLength, newEpochLength)], unit)
464466 else throw("Strict value is not equal to itself.")
465467 }
466468
467469
468470
469471 @Callable(i)
470472 func setMaxDepth (newMaxDepth) = {
471473 let checks = [mustManager(i), if ((newMaxDepth > 0))
472474 then true
473475 else throw("invalid max depth")]
474476 if ((checks == checks))
475477 then $Tuple2([IntegerEntry(keyMaxDepth, newMaxDepth)], unit)
476478 else throw("Strict value is not equal to itself.")
477479 }
478480
479481
480482
481483 @Callable(i)
482484 func processVoteINTERNAL (poolStr,userAddressStr) = {
483485 let checkCaller = mustThis(i)
484486 if ((checkCaller == checkCaller))
485487 then {
486488 let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), ("processVoteINTERNAL: invalid user address " + userAddressStr))
487489 let epoch = getIntOrFail(this, keyCurrentEpoch)
488490 let epochPrevious = (epoch - 1)
489491 let epochLength = getIntOrFail(this, keyEpochLength)
490492 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
491493 let endHeight = (startHeight + epochLength)
492494 let startHeightPrevious = getIntOrFail(this, keyStartHeightByEpoch(epochPrevious))
493495 let endHeightPrevious = (startHeightPrevious + epochLength)
494496 let checkTargetEpoch = if ((epochPrevious >= 0))
495497 then true
496498 else throw("processVoteINTERNAL: invalid previous epoch")
497499 if ((checkTargetEpoch == checkTargetEpoch))
498500 then {
499501 let pool = stringToPool(poolStr)
500- let $t01719517235 = pool
501- let amountAssetId = $t01719517235._1
502- let priceAssetId = $t01719517235._2
502+ let $t01727017310 = pool
503+ let amountAssetId = $t01727017310._1
504+ let priceAssetId = $t01727017310._2
503505 let wxEmission = checkWxEmissionPoolLabel(pool)
504506 let gwxAmountAtEndTotal = {
505507 let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeight], nil)
506508 if ($isInstanceOf(@, "Int"))
507509 then @
508510 else throw(($getType(@) + " couldn't be cast to Int"))
509511 }
510512 let gwxAmountAtEndTotalPrevious = {
511513 let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeightPrevious], nil)
512514 if ($isInstanceOf(@, "Int"))
513515 then @
514516 else throw(($getType(@) + " couldn't be cast to Int"))
515517 }
516518 let totalVotes = valueOrElse(getInteger(keyTotalVotes(epoch)), 0)
517519 let votingResult = valueOrElse(getInteger(keyVotingResult(pool, epoch)), 0)
518520 let votePrevious = valueOrErrorMessage(getInteger(keyVote(pool, userAddress, epochPrevious)), (((("processVoteINTERNAL " + poolStr) + " ") + userAddressStr) + ": no previous vote"))
519521 let used = valueOrElse(getInteger(this, keyUsed(userAddress, epoch)), 0)
520522 let newVote = if ((gwxAmountAtEndTotalPrevious > 0))
521523 then fraction(votePrevious, gwxAmountAtEndTotal, gwxAmountAtEndTotalPrevious)
522524 else 0
523525 let actions = if (if ((newVote > 0))
524526 then wxEmission
525527 else false)
526528 then [IntegerEntry(keyVote(pool, userAddress, epoch), newVote), IntegerEntry(keyTotalVotes(epoch), (totalVotes + newVote)), IntegerEntry(keyVotingResult(pool, epoch), (votingResult + newVote)), IntegerEntry(keyUsed(userAddress, epoch), (used + newVote))]
527529 else deleteNodeActions(getVotesListName(pool), userAddressStr)
528530 $Tuple2(actions, unit)
529531 }
530532 else throw("Strict value is not equal to itself.")
531533 }
532534 else throw("Strict value is not equal to itself.")
533535 }
534536
535537
536538
537539 @Callable(i)
538-func processPoolINTERNAL (poolStr) = {
540+func processPoolINTERNAL (poolStr,force) = {
539541 let checkCaller = mustThis(i)
540542 if ((checkCaller == checkCaller))
541543 then {
542- let targetEpoch = (getIntOrFail(this, keyCurrentEpoch) - 1)
544+ let targetEpoch = {
545+ let currentEpoch = getIntOrFail(this, keyCurrentEpoch)
546+ if (force)
547+ then currentEpoch
548+ else (currentEpoch - 1)
549+ }
543550 let checkTargetEpoch = if ((targetEpoch >= 0))
544551 then true
545552 else throw("processPoolINTERNAL: invalid target epoch")
546553 if ((checkTargetEpoch == checkTargetEpoch))
547554 then {
548555 let pool = stringToPool(poolStr)
549- let $t01880118841 = pool
550- let amountAssetId = $t01880118841._1
551- let priceAssetId = $t01880118841._2
556+ let $t01903619076 = pool
557+ let amountAssetId = $t01903619076._1
558+ let priceAssetId = $t01903619076._2
552559 let stakingContract = addressFromStringValue(getStrOrFail(this, keyStakingContract))
553560 let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
554561 let lpAssetId = getLpAssetByPoolAssets(amountAssetId, priceAssetId)
555562 let r = {
556563 let @ = invoke(stakingContract, "usersListTraversal", [lpAssetId], nil)
557564 if ($isInstanceOf(@, "Boolean"))
558565 then @
559566 else throw(($getType(@) + " couldn't be cast to Boolean"))
560567 }
561568 if ((r == r))
562569 then if (r)
563570 then $Tuple2(nil, true)
564571 else {
565572 let wxEmission = checkWxEmissionPoolLabel(pool)
566573 let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(targetEpoch)), 0)
567574 let votingResult = valueOrElse(getInteger(this, keyVotingResult(pool, targetEpoch)), 0)
568575 let share = if (if ((totalVotes == 0))
569576 then true
570577 else !(wxEmission))
571578 then 0
572579 else fraction(votingResult, poolWeightMult, totalVotes)
573580 let modifyWeightInv = invoke(factoryContract, "modifyWeight", [lpAssetId, share], nil)
574581 if ((modifyWeightInv == modifyWeightInv))
575582 then {
576- let poolsListActions = if (wxEmission)
583+ let poolsListActions = if (if (wxEmission)
584+ then true
585+ else force)
577586 then nil
578587 else ([DeleteEntry(keyInList(pool))] ++ deleteNodeActions(poolsListName, poolStr))
579588 $Tuple2(([IntegerEntry(keyPoolShare(pool, targetEpoch), share)] ++ poolsListActions), false)
580589 }
581590 else throw("Strict value is not equal to itself.")
582591 }
583592 else throw("Strict value is not equal to itself.")
584593 }
585594 else throw("Strict value is not equal to itself.")
586595 }
587596 else throw("Strict value is not equal to itself.")
588597 }
589598
590599
591600
592601 @Callable(i)
593602 func finalizeHelper () = {
603+ let force = valueOrElse(getBoolean(keyFinalizationShouldBeForced), false)
594604 let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0)
595605 let previousEpoch = (epoch - 1)
596606 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
597607 let epochLength = getIntOrFail(this, keyEpochLength)
598608 let endHeight = (startHeight + epochLength)
599609 let finalizationStageOrUnit = getInteger(this, keyFinalizationStage)
600- if (if ((height >= endHeight))
610+ if (if (if ((height >= endHeight))
601611 then (finalizationStageOrUnit == unit)
612+ else false)
613+ then !(force)
602614 else false)
603615 then {
604616 let newEpoch = (epoch + 1)
605617 $Tuple2([IntegerEntry(keyStartHeightByEpoch(newEpoch), height), IntegerEntry(keyStartHeight, height), IntegerEntry(keyCurrentEpoch, newEpoch), IntegerEntry(keyFinalizationStage, finalizationStageTotal)], true)
606618 }
607- else if ((finalizationStageOrUnit == unit))
608- then $Tuple2(nil, false)
609- else if ((finalizationStageOrUnit == finalizationStageTotal))
610- then {
611- let poolOrUnit = getString(keyNextPool)
612- let userOrUnit = getString(keyNextUser)
613- match poolOrUnit {
614- case _: Unit =>
615- match getString(keyListHead(poolsListName)) {
619+ else if (if (force)
620+ then (finalizationStageOrUnit == unit)
621+ else false)
622+ then $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares)], true)
623+ else if ((finalizationStageOrUnit == unit))
624+ then $Tuple2(nil, false)
625+ else if ((finalizationStageOrUnit == finalizationStageTotal))
626+ then {
627+ let poolOrUnit = getString(keyNextPool)
628+ let userOrUnit = getString(keyNextUser)
629+ match poolOrUnit {
630+ case _: Unit =>
631+ match getString(keyListHead(poolsListName)) {
632+ case _: Unit =>
633+ $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true)
634+ case poolsHeadStr: String =>
635+ $Tuple2([StringEntry(keyNextPool, poolsHeadStr)], true)
636+ case _ =>
637+ throw("Match error")
638+ }
639+ case poolStr: String =>
640+ let pool = stringToPool(poolStr)
641+ let nextUserOrUnit = match userOrUnit {
642+ case _: Unit =>
643+ getString(keyListHead(getVotesListName(pool)))
644+ case user: String =>
645+ let next = getString(keyListNext(getVotesListName(pool), user))
646+ if ((next == next))
647+ then {
648+ let processVoteInv = invoke(this, "processVoteINTERNAL", [poolStr, user], nil)
649+ if ((processVoteInv == processVoteInv))
650+ then next
651+ else throw("Strict value is not equal to itself.")
652+ }
653+ else throw("Strict value is not equal to itself.")
654+ case _ =>
655+ throw("Match error")
656+ }
657+ match nextUserOrUnit {
658+ case _: Unit =>
659+ let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr))
660+ match nextPoolOrUnit {
661+ case _: Unit =>
662+ $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true)
663+ case s: String =>
664+ $Tuple2([StringEntry(keyNextPool, s), DeleteEntry(keyNextUser)], true)
665+ case _ =>
666+ throw("Match error")
667+ }
668+ case nextUser: String =>
669+ $Tuple2([StringEntry(keyNextUser, nextUser)], true)
670+ case _ =>
671+ throw("Match error")
672+ }
673+ case _ =>
674+ throw("Match error")
675+ }
676+ }
677+ else if ((finalizationStageOrUnit == finalizationStageShares))
678+ then {
679+ let poolOrUnit = getString(keyNextPool)
680+ match poolOrUnit {
616681 case _: Unit =>
617- $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true)
618- case poolsHeadStr: String =>
619- $Tuple2([StringEntry(keyNextPool, poolsHeadStr)], true)
620- case _ =>
621- throw("Match error")
622- }
623- case poolStr: String =>
624- let pool = stringToPool(poolStr)
625- let nextUserOrUnit = match userOrUnit {
626- case _: Unit =>
627- getString(keyListHead(getVotesListName(pool)))
628- case user: String =>
629- let next = getString(keyListNext(getVotesListName(pool), user))
630- if ((next == next))
682+ match getString(keyListHead(poolsListName)) {
683+ case _: Unit =>
684+ let actions = if (force)
685+ then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced)]
686+ else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight)]
687+ $Tuple2(actions, true)
688+ case nextPoolStr: String =>
689+ $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true)
690+ case _ =>
691+ throw("Match error")
692+ }
693+ case poolStr: String =>
694+ let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr))
695+ if ((nextPoolOrUnit == nextPoolOrUnit))
631696 then {
632- let processVoteInv = invoke(this, "processVoteINTERNAL", [poolStr, user], nil)
633- if ((processVoteInv == processVoteInv))
634- then next
697+ let r = {
698+ let @ = invoke(this, "processPoolINTERNAL", [poolStr, force], nil)
699+ if ($isInstanceOf(@, "Boolean"))
700+ then @
701+ else throw(($getType(@) + " couldn't be cast to Boolean"))
702+ }
703+ if ((r == r))
704+ then if (r)
705+ then $Tuple2(nil, true)
706+ else match nextPoolOrUnit {
707+ case _: Unit =>
708+ let actions = if (force)
709+ then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced), DeleteEntry(keyNextPool)]
710+ else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight), DeleteEntry(keyNextPool)]
711+ $Tuple2(actions, true)
712+ case nextPoolStr: String =>
713+ $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true)
714+ case _ =>
715+ throw("Match error")
716+ }
635717 else throw("Strict value is not equal to itself.")
636718 }
637719 else throw("Strict value is not equal to itself.")
638720 case _ =>
639721 throw("Match error")
640722 }
641- match nextUserOrUnit {
642- case _: Unit =>
643- let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr))
644- match nextPoolOrUnit {
645- case _: Unit =>
646- $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true)
647- case s: String =>
648- $Tuple2([StringEntry(keyNextPool, s), DeleteEntry(keyNextUser)], true)
649- case _ =>
650- throw("Match error")
651- }
652- case nextUser: String =>
653- $Tuple2([StringEntry(keyNextUser, nextUser)], true)
654- case _ =>
655- throw("Match error")
656723 }
657- case _ =>
658- throw("Match error")
659- }
660- }
661- else if ((finalizationStageOrUnit == finalizationStageShares))
662- then {
663- let poolOrUnit = getString(keyNextPool)
664- match poolOrUnit {
665- case _: Unit =>
666- match getString(keyListHead(poolsListName)) {
667- case _: Unit =>
668- $Tuple2([DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight)], true)
669- case nextPoolStr: String =>
670- $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true)
671- case _ =>
672- throw("Match error")
673- }
674- case poolStr: String =>
675- let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr))
676- if ((nextPoolOrUnit == nextPoolOrUnit))
677- then {
678- let r = {
679- let @ = invoke(this, "processPoolINTERNAL", [poolStr], nil)
680- if ($isInstanceOf(@, "Boolean"))
681- then @
682- else throw(($getType(@) + " couldn't be cast to Boolean"))
683- }
684- if ((r == r))
685- then if (r)
686- then $Tuple2(nil, true)
687- else match nextPoolOrUnit {
688- case _: Unit =>
689- $Tuple2([DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight), DeleteEntry(keyNextPool)], true)
690- case nextPoolStr: String =>
691- $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true)
692- case _ =>
693- throw("Match error")
694- }
695- else throw("Strict value is not equal to itself.")
696- }
697- else throw("Strict value is not equal to itself.")
698- case _ =>
699- throw("Match error")
700- }
701- }
702- else throw("finalization is broken")
724+ else throw("finalization is broken")
703725 }
704726
705727
706728
707729 @Callable(i)
708730 func finalizeWrapper (counter) = {
709731 let result = {
710732 let @ = invoke(this, "finalizeHelper", nil, nil)
711733 if ($isInstanceOf(@, "Boolean"))
712734 then @
713735 else throw(($getType(@) + " couldn't be cast to Boolean"))
714736 }
715737 if ((result == result))
716738 then if (!(result))
717739 then if ((counter == 0))
718740 then throw("Current voting is not over yet")
719741 else $Tuple2(nil, unit)
720742 else {
721743 let maxDepth = valueOrElse(getInteger(this, keyMaxDepth), maxDepthDefault)
722744 if ((maxDepth > counter))
723745 then {
724746 let inv = invoke(this, "finalizeWrapper", [(counter + 1)], nil)
725747 if ((inv == inv))
726748 then $Tuple2(nil, unit)
727749 else throw("Strict value is not equal to itself.")
728750 }
729751 else $Tuple2(nil, unit)
730752 }
731753 else throw("Strict value is not equal to itself.")
732754 }
733755
734756
735757
736758 @Callable(i)
737759 func finalize () = {
738760 let inv = invoke(this, "finalizeWrapper", [0], nil)
739761 if ((inv == inv))
740762 then $Tuple2(nil, unit)
741763 else throw("Strict value is not equal to itself.")
742764 }
743765
744766
745767
746768 @Callable(i)
747769 func containsNodeREADONLY (listName,id) = $Tuple2(nil, containsNode(listName, id))
748770
749771
750772
751773 @Callable(i)
752774 func insertNode (listName,id) = {
753775 let checkCaller = mustManager(i)
754776 if ((checkCaller == checkCaller))
755777 then $Tuple2(insertNodeActions(listName, id), unit)
756778 else throw("Strict value is not equal to itself.")
757779 }
758780
759781
760782
761783 @Callable(i)
762784 func deleteNode (listName,id) = {
763785 let checkCaller = mustManager(i)
764786 if ((checkCaller == checkCaller))
765787 then $Tuple2(deleteNodeActions(listName, id), unit)
766788 else throw("Strict value is not equal to itself.")
767789 }
768790
769791
770792 @Verifier(tx)
771793 func verify () = {
772794 let targetPublicKey = match managerPublicKeyOrUnit() {
773795 case pk: ByteVector =>
774796 pk
775797 case _: Unit =>
776798 tx.senderPublicKey
777799 case _ =>
778800 throw("Match error")
779801 }
780802 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
781803 }
782804

github/deemru/w8io/026f985 
105.69 ms