tx · 4fMNfSqvJT82EaiVkwSJxu7aj6KZ2PVj3VSu2n7nUXa9

3N9Zi6AcWcGbM23jQJ4fnzFsoHoTsxYDznr:  -0.02200000 Waves

2023.05.31 12:08 [2601938] smart account 3N9Zi6AcWcGbM23jQJ4fnzFsoHoTsxYDznr > SELF 0.00000000 Waves

{ "type": 13, "id": "4fMNfSqvJT82EaiVkwSJxu7aj6KZ2PVj3VSu2n7nUXa9", "fee": 2200000, "feeAssetId": null, "timestamp": 1685524141835, "version": 2, "chainId": 84, "sender": "3N9Zi6AcWcGbM23jQJ4fnzFsoHoTsxYDznr", "senderPublicKey": "GFbasS3jufhZkK4xR7tdTjjnP8K33KvJFEDHRtxXDkaJ", "proofs": [ "1249wrXecxs3ch756vxU26QekLY3UC93CupvobuYhTmQ6m8RSMc1EPiQz9TueoAsUCXY6MgagEiWWLjrhUREbwc" ], "script": "base64:BgL+FggCEgQKAggBEgcKBQgICAgBEgQKAggIEgUKAwgIARIECgIICBIDCgEBEgMKAQESBAoCCAgSBAoCCAQSABIDCgEBEgASBAoCCAgSBAoCCAgSBAoCCAgSACIJc2VwYXJhdG9yIg5wb29sV2VpZ2h0TXVsdCIPbWF4RGVwdGhEZWZhdWx0IhZmaW5hbGl6YXRpb25TdGFnZVRvdGFsIhdmaW5hbGl6YXRpb25TdGFnZVNoYXJlcyIOa2V5RXBvY2hMZW5ndGgiEWtleUVwb2NoTGVuZ3RoTmV3IhVrZXlFcG9jaExlbmd0aEJ5RXBvY2giBWVwb2NoIg9rZXlDdXJyZW50RXBvY2giC2tleU1heERlcHRoIiJrZXlWb3RpbmdFbWlzc2lvbkNhbmRpZGF0ZUNvbnRyYWN0Ih1rZXlWb3RpbmdFbWlzc2lvblJhdGVDb250cmFjdCISa2V5RmFjdG9yeUNvbnRyYWN0IhNrZXlCb29zdGluZ0NvbnRyYWN0IhJrZXlTdGFraW5nQ29udHJhY3QiFGtleUZpbmFsaXphdGlvblN0YWdlIgtrZXlOZXh0UG9vbCILa2V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zIG5vdCBlcXVhbCB0byBpdHNlbGYuAmJjAQpkZWxldGVOb2RlAgJhSAJhTAQCYkkJAQJiZQEFAmJjAwkAAAIFAmJJBQJiSQkAlAoCCQECYVUCBQJhSAUCYUwFBHVuaXQJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4CYmMBGGlzRmluYWxpemF0aW9uSW5Qcm9ncmVzcwAEAmJ1CQCaCAIFBHRoaXMFAXEEAmNBCQECIT0CBQJidQUEdW5pdAkAlAoCBQNuaWwFAmNBAQJjQgECY0MABAJjRAQBWQkBAmFaAAMJAAECBQFZAgpCeXRlVmVjdG9yBAJiZAUBWQUCYmQDCQABAgUBWQIEVW5pdAgFAmNCD3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yCQD0AwMIBQJjQglib2R5Qnl0ZXMJAJEDAggFAmNCBnByb29mcwAABQJjRKAiTk8=", "height": 2601938, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Fs8EQGC68ygA1Mc2a5Bcn3tJcoUq2SmE9cDxeMQBfKui Next: C8QbvqM2bqEtXVbgXCk8xRuegV9skWBdDD3fSkNuoV2a Diff:
OldNewDifferences
2323 let keyMaxDepth = makeString(["%s", "maxDepth"], separator)
2424
2525 let keyVotingEmissionCandidateContract = makeString(["%s", "votingEmissionCandidateContract"], separator)
26+
27+let keyVotingEmissionRateContract = makeString(["%s", "votingEmissionRateContract"], separator)
2628
2729 let keyFactoryContract = makeString(["%s", "factoryContract"], separator)
2830
5153
5254
5355 func keyInList (pool) = {
54- let $t016931733 = pool
55- let amountAssetId = $t016931733._1
56- let priceAssetId = $t016931733._2
56+ let $t017881828 = pool
57+ let amountAssetId = $t017881828._1
58+ let priceAssetId = $t017881828._2
5759 makeString(["%s%s%s", "inList", amountAssetId, priceAssetId], separator)
5860 }
5961
6264
6365
6466 func keyVote (pool,address,epoch) = {
65- let $t020072047 = pool
66- let amountAssetId = $t020072047._1
67- let priceAssetId = $t020072047._2
67+ let $t021022142 = pool
68+ let amountAssetId = $t021022142._1
69+ let priceAssetId = $t021022142._2
6870 makeString(["%s%s%s%s%d", "vote", amountAssetId, priceAssetId, toString(address), toString(epoch)], separator)
6971 }
7072
7173
7274 func keyVotingResult (pool,epoch) = {
73- let $t022292269 = pool
74- let amountAssetId = $t022292269._1
75- let priceAssetId = $t022292269._2
75+ let $t023242364 = pool
76+ let amountAssetId = $t023242364._1
77+ let priceAssetId = $t023242364._2
7678 makeString(["%s%s%s%d", "votingResult", amountAssetId, priceAssetId, toString(epoch)], separator)
7779 }
7880
8183
8284
8385 func keyPoolShare (pool,epoch) = {
84- let $t025902630 = pool
85- let amountAssetId = $t025902630._1
86- let priceAssetId = $t025902630._2
86+ let $t026852725 = pool
87+ let amountAssetId = $t026852725._1
88+ let priceAssetId = $t026852725._2
8789 makeString(["%s%s%s%d", "poolShare", amountAssetId, priceAssetId, toString(epoch)], separator)
8890 }
8991
140142 }
141143
142144
145+let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
146+
147+let IdxFactoryCfgGwxRewardDapp = 10
148+
149+func keyFactoryCfg () = "%s__factoryConfig"
150+
151+
152+func readFactoryCfgOrFail (factory) = split(getStrOrFail(factory, keyFactoryCfg()), separator)
153+
154+
155+func getGwxRewardAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgGwxRewardDapp])
156+
157+
143158 func getLpAssetByPoolAssets (amountAssetId,priceAssetId) = {
144159 func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
145160
147162
148163 func keyMappingPoolContractToLPAsset (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
149164
150- let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
151165 let amountAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amountAssetId))
152166 let priceAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAssetId))
153167 let poolContractAddress = getStrOrFail(factoryContract, keyMappingPoolAssetsToPoolContractAddress(amountAssetInternalId, priceAssetInternalId))
157171
158172
159173 func checkWxEmissionPoolLabel (pool) = {
160- let $t051685208 = pool
161- let amountAssetId = $t051685208._1
162- let priceAssetId = $t051685208._2
163- let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
174+ let $t055655605 = pool
175+ let amountAssetId = $t055655605._1
176+ let priceAssetId = $t055655605._2
164177 let @ = invoke(factoryContract, "checkWxEmissionPoolLabel", [amountAssetId, priceAssetId], nil)
165178 if ($isInstanceOf(@, "Boolean"))
166179 then @
168181 }
169182
170183
184+func gwxRewardDeposit () = {
185+ let factoryCfg = readFactoryCfgOrFail(factoryContract)
186+ let gwxRewardsContract = getGwxRewardAddressOrFail(factoryCfg)
187+ invoke(gwxRewardsContract, "deposit", nil, nil)
188+ }
189+
190+
171191 let poolsListName = "pools"
172192
173193 func getVotesListName (pool) = {
174- let $t055095549 = pool
175- let amountAssetId = $t055095549._1
176- let priceAssetId = $t055095549._2
194+ let $t060226062 = pool
195+ let amountAssetId = $t060226062._1
196+ let priceAssetId = $t060226062._2
177197 makeString(["votes", amountAssetId, priceAssetId], separator)
178198 }
179199
484504 if ((checkTargetEpoch == checkTargetEpoch))
485505 then {
486506 let pool = stringToPool(poolStr)
487- let $t01755217592 = pool
488- let amountAssetId = $t01755217592._1
489- let priceAssetId = $t01755217592._2
507+ let $t01806518105 = pool
508+ let amountAssetId = $t01806518105._1
509+ let priceAssetId = $t01806518105._2
490510 let wxEmission = checkWxEmissionPoolLabel(pool)
491511 let gwxAmountAtEndTotal = {
492512 let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeight], nil)
545565 if ((checkTargetEpoch == checkTargetEpoch))
546566 then {
547567 let pool = stringToPool(poolStr)
548- let $t01994919989 = pool
549- let amountAssetId = $t01994919989._1
550- let priceAssetId = $t01994919989._2
568+ let $t02046220502 = pool
569+ let amountAssetId = $t02046220502._1
570+ let priceAssetId = $t02046220502._2
551571 let stakingContract = addressFromStringValue(getStrOrFail(this, keyStakingContract))
552- let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
553572 let lpAssetId = getLpAssetByPoolAssets(amountAssetId, priceAssetId)
554573 let r = {
555574 let @ = invoke(stakingContract, "usersListTraversal", [lpAssetId], nil)
685704 let actions = if (force)
686705 then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced)]
687706 else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight)]
688- $Tuple2(actions, true)
707+ let gwxRewardDepositInv = gwxRewardDeposit()
708+ if ((gwxRewardDepositInv == gwxRewardDepositInv))
709+ then $Tuple2(actions, true)
710+ else throw("Strict value is not equal to itself.")
689711 case nextPoolStr: String =>
690712 $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true)
691713 case _ =>
709731 let actions = if (force)
710732 then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced), DeleteEntry(keyNextPool)]
711733 else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight), DeleteEntry(keyNextPool)]
712- $Tuple2(actions, true)
734+ let gwxRewardDepositInv = gwxRewardDeposit()
735+ if ((gwxRewardDepositInv == gwxRewardDepositInv))
736+ then $Tuple2(actions, true)
737+ else throw("Strict value is not equal to itself.")
713738 case nextPoolStr: String =>
714739 $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true)
715740 case _ =>
729754
730755 @Callable(i)
731756 func finalizeWrapper (counter) = {
757+ let votingEmissionRateContract = addressFromStringValue(getStringValue(this, keyVotingEmissionRateContract))
732758 let result = {
733759 let @ = invoke(this, "finalizeHelper", nil, nil)
734760 if ($isInstanceOf(@, "Boolean"))
739765 then if (!(result))
740766 then if ((counter == 0))
741767 then throwErr("Current voting is not over yet")
742- else $Tuple2(nil, unit)
768+ else {
769+ let inv = invoke(votingEmissionRateContract, "finalize", nil, nil)
770+ if ((inv == inv))
771+ then $Tuple2(nil, unit)
772+ else throw("Strict value is not equal to itself.")
773+ }
743774 else {
744775 let maxDepth = valueOrElse(getInteger(this, keyMaxDepth), maxDepthDefault)
745776 if ((maxDepth > counter))
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 keyEpochLengthNew = makeString(["%s%s", "epochLength__new"], separator)
1717
1818 func keyEpochLengthByEpoch (epoch) = makeString(["%s%d", "epochLength", toString(epoch)], separator)
1919
2020
2121 let keyCurrentEpoch = makeString(["%s", "currentEpoch"], separator)
2222
2323 let keyMaxDepth = makeString(["%s", "maxDepth"], separator)
2424
2525 let keyVotingEmissionCandidateContract = makeString(["%s", "votingEmissionCandidateContract"], separator)
26+
27+let keyVotingEmissionRateContract = makeString(["%s", "votingEmissionRateContract"], separator)
2628
2729 let keyFactoryContract = makeString(["%s", "factoryContract"], separator)
2830
2931 let keyBoostingContract = makeString(["%s", "boostingContract"], separator)
3032
3133 let keyStakingContract = makeString(["%s", "stakingContract"], separator)
3234
3335 let keyFinalizationStage = makeString(["%s", "finalizationStage"], separator)
3436
3537 let keyNextPool = makeString(["%s", "nextPool"], separator)
3638
3739 let keyNextUser = makeString(["%s", "nextUser"], separator)
3840
3941 let keyStartHeight = makeString(["%s", "startHeight"], separator)
4042
4143 let keyCurrentEpochUi = makeString(["%s", "currentEpochUi"], separator)
4244
4345 let keyStartHeightUi = makeString(["%s", "startHeightUi"], separator)
4446
4547 let keyFinalizationShouldBeForced = makeString(["%s", "force"], separator)
4648
4749 func keyStartHeightByEpoch (epoch) = makeString(["%s%d", "startHeight", toString(epoch)], separator)
4850
4951
5052 func keyFinalized (epoch) = makeString(["%s%d", "finalized", toString(epoch)], separator)
5153
5254
5355 func keyInList (pool) = {
54- let $t016931733 = pool
55- let amountAssetId = $t016931733._1
56- let priceAssetId = $t016931733._2
56+ let $t017881828 = pool
57+ let amountAssetId = $t017881828._1
58+ let priceAssetId = $t017881828._2
5759 makeString(["%s%s%s", "inList", amountAssetId, priceAssetId], separator)
5860 }
5961
6062
6163 func keyUsed (address,epoch) = makeString(["%s%s%d", "used", toString(address), toString(epoch)], separator)
6264
6365
6466 func keyVote (pool,address,epoch) = {
65- let $t020072047 = pool
66- let amountAssetId = $t020072047._1
67- let priceAssetId = $t020072047._2
67+ let $t021022142 = pool
68+ let amountAssetId = $t021022142._1
69+ let priceAssetId = $t021022142._2
6870 makeString(["%s%s%s%s%d", "vote", amountAssetId, priceAssetId, toString(address), toString(epoch)], separator)
6971 }
7072
7173
7274 func keyVotingResult (pool,epoch) = {
73- let $t022292269 = pool
74- let amountAssetId = $t022292269._1
75- let priceAssetId = $t022292269._2
75+ let $t023242364 = pool
76+ let amountAssetId = $t023242364._1
77+ let priceAssetId = $t023242364._2
7678 makeString(["%s%s%s%d", "votingResult", amountAssetId, priceAssetId, toString(epoch)], separator)
7779 }
7880
7981
8082 func keyVotingResultStaked (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStaked", lpAssetIdStr, toString(epoch)], separator)
8183
8284
8385 func keyPoolShare (pool,epoch) = {
84- let $t025902630 = pool
85- let amountAssetId = $t025902630._1
86- let priceAssetId = $t025902630._2
86+ let $t026852725 = pool
87+ let amountAssetId = $t026852725._1
88+ let priceAssetId = $t026852725._2
8789 makeString(["%s%s%s%d", "poolShare", amountAssetId, priceAssetId, toString(epoch)], separator)
8890 }
8991
9092
9193 func keyTotalVotes (epoch) = makeString(["%s%d", "totalVotes", toString(epoch)], separator)
9294
9395
9496 func keyStakedByUser (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s", "staked", userAddressStr, lpAssetIdStr], separator)
9597
9698
9799 func wrapErr (msg) = makeString(["voting_emission.ride:", msg], " ")
98100
99101
100102 func throwErr (msg) = throw(wrapErr(msg))
101103
102104
103105 func getValueOrFail (address,key,type) = {
104106 let error = wrapErr(makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
105107 valueOrErrorMessage( match type {
106108 case str: String =>
107109 getString(address, key)
108110 case int: Int =>
109111 getInteger(address, key)
110112 case _ =>
111113 throwErr("invalid entry type")
112114 }, error)
113115 }
114116
115117
116118 func getStrOrFail (address,key) = {
117119 let @ = getValueOrFail(address, key, "")
118120 if ($isInstanceOf(@, "String"))
119121 then @
120122 else throw(($getType(@) + " couldn't be cast to String"))
121123 }
122124
123125
124126 func getIntOrFail (address,key) = {
125127 let @ = getValueOrFail(address, key, 0)
126128 if ($isInstanceOf(@, "Int"))
127129 then @
128130 else throw(($getType(@) + " couldn't be cast to Int"))
129131 }
130132
131133
132134 func poolToString (pool) = ((pool._1 + separator) + pool._2)
133135
134136
135137 func stringToPool (str) = {
136138 let parts = split(str, separator)
137139 if ((size(parts) == 2))
138140 then $Tuple2(parts[0], parts[1])
139141 else throwErr("invalid pool string")
140142 }
141143
142144
145+let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
146+
147+let IdxFactoryCfgGwxRewardDapp = 10
148+
149+func keyFactoryCfg () = "%s__factoryConfig"
150+
151+
152+func readFactoryCfgOrFail (factory) = split(getStrOrFail(factory, keyFactoryCfg()), separator)
153+
154+
155+func getGwxRewardAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgGwxRewardDapp])
156+
157+
143158 func getLpAssetByPoolAssets (amountAssetId,priceAssetId) = {
144159 func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
145160
146161 func keyMappingPoolAssetsToPoolContractAddress (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + toString(internalAmountAssetIdStr)) + "__") + toString(internalPriceAssetIdStr)) + "__mappings__poolAssets2PoolContract")
147162
148163 func keyMappingPoolContractToLPAsset (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
149164
150- let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
151165 let amountAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amountAssetId))
152166 let priceAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAssetId))
153167 let poolContractAddress = getStrOrFail(factoryContract, keyMappingPoolAssetsToPoolContractAddress(amountAssetInternalId, priceAssetInternalId))
154168 let lpAssetId = getStrOrFail(factoryContract, keyMappingPoolContractToLPAsset(poolContractAddress))
155169 lpAssetId
156170 }
157171
158172
159173 func checkWxEmissionPoolLabel (pool) = {
160- let $t051685208 = pool
161- let amountAssetId = $t051685208._1
162- let priceAssetId = $t051685208._2
163- let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
174+ let $t055655605 = pool
175+ let amountAssetId = $t055655605._1
176+ let priceAssetId = $t055655605._2
164177 let @ = invoke(factoryContract, "checkWxEmissionPoolLabel", [amountAssetId, priceAssetId], nil)
165178 if ($isInstanceOf(@, "Boolean"))
166179 then @
167180 else throw(($getType(@) + " couldn't be cast to Boolean"))
168181 }
169182
170183
184+func gwxRewardDeposit () = {
185+ let factoryCfg = readFactoryCfgOrFail(factoryContract)
186+ let gwxRewardsContract = getGwxRewardAddressOrFail(factoryCfg)
187+ invoke(gwxRewardsContract, "deposit", nil, nil)
188+ }
189+
190+
171191 let poolsListName = "pools"
172192
173193 func getVotesListName (pool) = {
174- let $t055095549 = pool
175- let amountAssetId = $t055095549._1
176- let priceAssetId = $t055095549._2
194+ let $t060226062 = pool
195+ let amountAssetId = $t060226062._1
196+ let priceAssetId = $t060226062._2
177197 makeString(["votes", amountAssetId, priceAssetId], separator)
178198 }
179199
180200
181201 func keyListHead (listName) = {
182202 let meta = if ((listName == poolsListName))
183203 then "%s%s"
184204 else "%s%s%s%s"
185205 makeString([meta, listName, "head"], separator)
186206 }
187207
188208
189209 func keyListSize (listName) = {
190210 let meta = if ((listName == poolsListName))
191211 then "%s%s"
192212 else "%s%s%s%s"
193213 makeString([meta, listName, "size"], separator)
194214 }
195215
196216
197217 func keyListPrev (listName,id) = {
198218 let meta = if ((listName == poolsListName))
199219 then "%s%s%s%s"
200220 else "%s%s%s%s%s"
201221 makeString([meta, listName, id, "prev"], separator)
202222 }
203223
204224
205225 func keyListNext (listName,id) = {
206226 let meta = if ((listName == poolsListName))
207227 then "%s%s%s%s"
208228 else "%s%s%s%s%s"
209229 makeString([meta, listName, id, "next"], separator)
210230 }
211231
212232
213233 func containsNode (listName,id) = {
214234 let headOrUnit = getString(this, keyListHead(listName))
215235 let prevOrUnit = getString(this, keyListPrev(listName, id))
216236 let nextOrUnit = getString(this, keyListNext(listName, id))
217237 if (if ((id == valueOrElse(headOrUnit, "")))
218238 then true
219239 else (prevOrUnit != unit))
220240 then true
221241 else (nextOrUnit != unit)
222242 }
223243
224244
225245 func insertNodeActions (listName,id) = {
226246 let headOrUnit = getString(this, keyListHead(listName))
227247 let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
228248 let checkNode = if (!(containsNode(listName, id)))
229249 then true
230250 else throwErr("Node exists")
231251 if ((checkNode == checkNode))
232252 then (([IntegerEntry(keyListSize(listName), (listSize + 1))] ++ (if ((headOrUnit != unit))
233253 then [StringEntry(keyListNext(listName, id), value(headOrUnit)), StringEntry(keyListPrev(listName, value(headOrUnit)), id)]
234254 else nil)) ++ [StringEntry(keyListHead(listName), id)])
235255 else throw("Strict value is not equal to itself.")
236256 }
237257
238258
239259 func deleteNodeActions (listName,id) = {
240260 let headOrUnit = getString(this, keyListHead(listName))
241261 let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
242262 let prevOrUnit = getString(this, keyListPrev(listName, id))
243263 let nextOrUnit = getString(this, keyListNext(listName, id))
244264 ([IntegerEntry(keyListSize(listName), (listSize - 1))] ++ (if (if ((prevOrUnit != unit))
245265 then (nextOrUnit != unit)
246266 else false)
247267 then [StringEntry(keyListNext(listName, value(prevOrUnit)), value(nextOrUnit)), StringEntry(keyListPrev(listName, value(nextOrUnit)), value(prevOrUnit)), DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, id))]
248268 else if ((nextOrUnit != unit))
249269 then [StringEntry(keyListHead(listName), value(nextOrUnit)), DeleteEntry(keyListNext(listName, id)), DeleteEntry(keyListPrev(listName, value(nextOrUnit)))]
250270 else if ((prevOrUnit != unit))
251271 then [DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, value(prevOrUnit)))]
252272 else if ((id == valueOrElse(headOrUnit, "")))
253273 then [DeleteEntry(keyListHead(listName))]
254274 else throwErr(((("invalid node: " + listName) + ".") + id))))
255275 }
256276
257277
258278 func keyManagerVaultAddress () = "%s__managerVaultAddress"
259279
260280
261281 func keyManagerPublicKey () = "%s__managerPublicKey"
262282
263283
264284 func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) {
265285 case s: String =>
266286 addressFromStringValue(s)
267287 case _ =>
268288 this
269289 }
270290
271291
272292 func managerPublicKeyOrUnit () = {
273293 let managerVaultAddress = getManagerVaultAddressOrThis()
274294 match getString(managerVaultAddress, keyManagerPublicKey()) {
275295 case s: String =>
276296 fromBase58String(s)
277297 case _: Unit =>
278298 unit
279299 case _ =>
280300 throw("Match error")
281301 }
282302 }
283303
284304
285305 func isManager (i) = match managerPublicKeyOrUnit() {
286306 case pk: ByteVector =>
287307 (i.callerPublicKey == pk)
288308 case _: Unit =>
289309 (i.caller == this)
290310 case _ =>
291311 throw("Match error")
292312 }
293313
294314
295315 func mustManager (i) = if (isManager(i))
296316 then true
297317 else throw("permission denied")
298318
299319
300320 func mustThis (i) = if ((i.caller == this))
301321 then true
302322 else throw("permission denied")
303323
304324
305325 @Callable(i)
306326 func getUserGwxAmountAtHeight (userAddress,targetHeight) = {
307327 let boostingContractAddress = valueOrErrorMessage(addressFromString(getStrOrFail(this, keyBoostingContract)), wrapErr("invalid boosting contract address"))
308328 $Tuple2(nil, {
309329 let @ = invoke(boostingContractAddress, "getUserGwxAmountAtHeightREADONLY", [userAddress, targetHeight], nil)
310330 if ($isInstanceOf(@, "Int"))
311331 then @
312332 else throw(($getType(@) + " couldn't be cast to Int"))
313333 })
314334 }
315335
316336
317337
318338 @Callable(i)
319339 func constructor (factoryContract,votingEmissionCandidateContract,boostingContract,stakingContract,epochLength) = {
320340 let checks = [mustManager(i), if ((addressFromString(factoryContract) != unit))
321341 then true
322342 else "invalid factory contract address", if ((addressFromString(votingEmissionCandidateContract) != unit))
323343 then true
324344 else "invalid voting emission candidate contract address", if ((addressFromString(boostingContract) != unit))
325345 then true
326346 else "invalid boosting contract address", if ((addressFromString(stakingContract) != unit))
327347 then true
328348 else "invalid staking contract address", if ((epochLength > 0))
329349 then true
330350 else throwErr("invalid epoch length")]
331351 if ((checks == checks))
332352 then $Tuple2([StringEntry(keyFactoryContract, factoryContract), StringEntry(keyVotingEmissionCandidateContract, votingEmissionCandidateContract), StringEntry(keyBoostingContract, boostingContract), StringEntry(keyStakingContract, stakingContract), IntegerEntry(keyEpochLength, epochLength)], unit)
333353 else throw("Strict value is not equal to itself.")
334354 }
335355
336356
337357
338358 @Callable(i)
339359 func create (amountAssetId,priceAssetId) = {
340360 let checks = [if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionCandidateContract), "")))
341361 then true
342362 else mustManager(i)]
343363 if ((checks == checks))
344364 then {
345365 let pool = $Tuple2(amountAssetId, priceAssetId)
346366 let inListActions = ([BooleanEntry(keyInList(pool), true)] ++ insertNodeActions(poolsListName, poolToString(pool)))
347367 let currentEpochIsNotDefined = (getInteger(this, keyCurrentEpoch) == unit)
348368 let startHeightActions = if (currentEpochIsNotDefined)
349369 then {
350370 let epoch = 0
351371 [IntegerEntry(keyCurrentEpoch, epoch), IntegerEntry(keyStartHeightByEpoch(epoch), height), IntegerEntry(keyStartHeight, height), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, height)]
352372 }
353373 else nil
354374 $Tuple2((inListActions ++ startHeightActions), unit)
355375 }
356376 else throw("Strict value is not equal to itself.")
357377 }
358378
359379
360380
361381 @Callable(i)
362382 func vote (amountAssetId,priceAssetId,amount) = {
363383 let pool = $Tuple2(amountAssetId, priceAssetId)
364384 let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0)
365385 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
366386 let epochLength = getIntOrFail(this, keyEpochLength)
367387 let endHeight = (startHeight + epochLength)
368388 let finalizationStageOrUnit = getInteger(this, keyFinalizationStage)
369389 let used = valueOrElse(getInteger(this, keyUsed(i.caller, epoch)), 0)
370390 let vote = valueOrElse(getInteger(this, keyVote(pool, i.caller, epoch)), 0)
371391 let poolResult = valueOrElse(getInteger(this, keyVotingResult(pool, epoch)), 0)
372392 let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(epoch)), 0)
373393 let gwxAmountAtEndTotal = {
374394 let @ = invoke(this, "getUserGwxAmountAtHeight", [toBase58String(i.caller.bytes), endHeight], nil)
375395 if ($isInstanceOf(@, "Int"))
376396 then @
377397 else throw(($getType(@) + " couldn't be cast to Int"))
378398 }
379399 let available = (gwxAmountAtEndTotal - used)
380400 let newVote = (vote + amount)
381401 let wxEmission = checkWxEmissionPoolLabel(pool)
382402 let checks = [if ((getBoolean(keyInList(pool)) != unit))
383403 then true
384404 else throwErr("invalid assets"), if ((endHeight > height))
385405 then true
386406 else throwErr("invalid height"), if ((finalizationStageOrUnit == unit))
387407 then true
388408 else throwErr("finalization in progress"), if ((gwxAmountAtEndTotal > 0))
389409 then true
390410 else throwErr("you do not have gWX"), if (if ((amount > 0))
391411 then (available >= amount)
392412 else false)
393413 then true
394414 else throwErr("invalid amount"), if (wxEmission)
395415 then true
396416 else throwErr("pool hasn't WX_EMISSION label")]
397417 if ((checks == checks))
398418 then {
399419 let votesListName = getVotesListName(pool)
400420 let userAddressStr = toString(i.caller)
401421 let votesListActions = if (containsNode(votesListName, userAddressStr))
402422 then nil
403423 else insertNodeActions(votesListName, userAddressStr)
404424 $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)
405425 }
406426 else throw("Strict value is not equal to itself.")
407427 }
408428
409429
410430
411431 @Callable(i)
412432 func cancelVote (amountAssetId,priceAssetId) = {
413433 let pool = $Tuple2(amountAssetId, priceAssetId)
414434 let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0)
415435 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
416436 let epochLength = getIntOrFail(this, keyEpochLength)
417437 let endHeight = (startHeight + epochLength)
418438 let finalizationStageOrUnit = getInteger(this, keyFinalizationStage)
419439 let used = valueOrElse(getInteger(this, keyUsed(i.caller, epoch)), 0)
420440 let vote = valueOrElse(getInteger(this, keyVote(pool, i.caller, epoch)), 0)
421441 let poolResult = valueOrElse(getInteger(this, keyVotingResult(pool, epoch)), 0)
422442 let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(epoch)), 0)
423443 let checks = [if ((getBoolean(keyInList(pool)) != unit))
424444 then true
425445 else throwErr("invalid assets"), if ((endHeight > height))
426446 then true
427447 else throwErr("invalid height"), if ((finalizationStageOrUnit == unit))
428448 then true
429449 else throwErr("finalization in progress"), if ((vote > 0))
430450 then true
431451 else throwErr("no vote")]
432452 if ((checks == checks))
433453 then {
434454 let votesListName = getVotesListName(pool)
435455 let userAddressStr = toString(i.caller)
436456 $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)
437457 }
438458 else throw("Strict value is not equal to itself.")
439459 }
440460
441461
442462
443463 @Callable(i)
444464 func setEpochLength (newEpochLength) = {
445465 let checks = [mustManager(i), if ((newEpochLength > 0))
446466 then true
447467 else throwErr("invalid epoch length")]
448468 if ((checks == checks))
449469 then $Tuple2([IntegerEntry(keyEpochLengthNew, newEpochLength)], unit)
450470 else throw("Strict value is not equal to itself.")
451471 }
452472
453473
454474
455475 @Callable(i)
456476 func setMaxDepth (newMaxDepth) = {
457477 let checks = [mustManager(i), if ((newMaxDepth > 0))
458478 then true
459479 else throwErr("invalid max depth")]
460480 if ((checks == checks))
461481 then $Tuple2([IntegerEntry(keyMaxDepth, newMaxDepth)], unit)
462482 else throw("Strict value is not equal to itself.")
463483 }
464484
465485
466486
467487 @Callable(i)
468488 func processVoteINTERNAL (poolStr,userAddressStr) = {
469489 let checkCaller = mustThis(i)
470490 if ((checkCaller == checkCaller))
471491 then {
472492 let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), wrapErr(("processVoteINTERNAL: invalid user address " + userAddressStr)))
473493 let epoch = getIntOrFail(this, keyCurrentEpoch)
474494 let epochPrevious = (epoch - 1)
475495 let epochLength = getIntOrFail(this, keyEpochLength)
476496 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
477497 let endHeight = (startHeight + epochLength)
478498 let startHeightPrevious = getIntOrFail(this, keyStartHeightByEpoch(epochPrevious))
479499 let epochLengthPrevious = getIntOrFail(this, keyEpochLengthByEpoch(epochPrevious))
480500 let endHeightPrevious = (startHeightPrevious + epochLengthPrevious)
481501 let checkTargetEpoch = if ((epochPrevious >= 0))
482502 then true
483503 else throwErr("processVoteINTERNAL: invalid previous epoch")
484504 if ((checkTargetEpoch == checkTargetEpoch))
485505 then {
486506 let pool = stringToPool(poolStr)
487- let $t01755217592 = pool
488- let amountAssetId = $t01755217592._1
489- let priceAssetId = $t01755217592._2
507+ let $t01806518105 = pool
508+ let amountAssetId = $t01806518105._1
509+ let priceAssetId = $t01806518105._2
490510 let wxEmission = checkWxEmissionPoolLabel(pool)
491511 let gwxAmountAtEndTotal = {
492512 let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeight], nil)
493513 if ($isInstanceOf(@, "Int"))
494514 then @
495515 else throw(($getType(@) + " couldn't be cast to Int"))
496516 }
497517 let gwxAmountAtEndTotalPrevious = {
498518 let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeightPrevious], nil)
499519 if ($isInstanceOf(@, "Int"))
500520 then @
501521 else throw(($getType(@) + " couldn't be cast to Int"))
502522 }
503523 let totalVotes = valueOrElse(getInteger(keyTotalVotes(epoch)), 0)
504524 let votingResult = valueOrElse(getInteger(keyVotingResult(pool, epoch)), 0)
505525 let votePrevious = valueOrErrorMessage(getInteger(keyVote(pool, userAddress, epochPrevious)), wrapErr((((("processVoteINTERNAL " + poolStr) + " ") + userAddressStr) + ": no previous vote")))
506526 let used = valueOrElse(getInteger(this, keyUsed(userAddress, epoch)), 0)
507527 let lpAssetIdStr = getLpAssetByPoolAssets(amountAssetId, priceAssetId)
508528 let votingResultStakedPrevious = valueOrElse(getInteger(keyVotingResultStaked(lpAssetIdStr, epochPrevious)), 0)
509529 let stakingContract = addressFromStringValue(getStrOrFail(this, keyStakingContract))
510530 let stakedByUser = valueOrElse(getInteger(stakingContract, keyStakedByUser(lpAssetIdStr, userAddressStr)), 0)
511531 let votingResultStakedActions = if ((stakedByUser == 0))
512532 then nil
513533 else [IntegerEntry(keyVotingResultStaked(lpAssetIdStr, epochPrevious), (votingResultStakedPrevious + votePrevious))]
514534 let newVote = if ((gwxAmountAtEndTotalPrevious > 0))
515535 then fraction(votePrevious, gwxAmountAtEndTotal, gwxAmountAtEndTotalPrevious)
516536 else 0
517537 let actions = if (if ((newVote > 0))
518538 then wxEmission
519539 else false)
520540 then [IntegerEntry(keyVote(pool, userAddress, epoch), newVote), IntegerEntry(keyTotalVotes(epoch), (totalVotes + newVote)), IntegerEntry(keyVotingResult(pool, epoch), (votingResult + newVote)), IntegerEntry(keyUsed(userAddress, epoch), (used + newVote))]
521541 else deleteNodeActions(getVotesListName(pool), userAddressStr)
522542 $Tuple2((actions ++ votingResultStakedActions), unit)
523543 }
524544 else throw("Strict value is not equal to itself.")
525545 }
526546 else throw("Strict value is not equal to itself.")
527547 }
528548
529549
530550
531551 @Callable(i)
532552 func processPoolINTERNAL (poolStr,force) = {
533553 let checkCaller = mustThis(i)
534554 if ((checkCaller == checkCaller))
535555 then {
536556 let targetEpoch = {
537557 let currentEpoch = getIntOrFail(this, keyCurrentEpoch)
538558 if (force)
539559 then currentEpoch
540560 else (currentEpoch - 1)
541561 }
542562 let checkTargetEpoch = if ((targetEpoch >= 0))
543563 then true
544564 else throwErr("processPoolINTERNAL: invalid target epoch")
545565 if ((checkTargetEpoch == checkTargetEpoch))
546566 then {
547567 let pool = stringToPool(poolStr)
548- let $t01994919989 = pool
549- let amountAssetId = $t01994919989._1
550- let priceAssetId = $t01994919989._2
568+ let $t02046220502 = pool
569+ let amountAssetId = $t02046220502._1
570+ let priceAssetId = $t02046220502._2
551571 let stakingContract = addressFromStringValue(getStrOrFail(this, keyStakingContract))
552- let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
553572 let lpAssetId = getLpAssetByPoolAssets(amountAssetId, priceAssetId)
554573 let r = {
555574 let @ = invoke(stakingContract, "usersListTraversal", [lpAssetId], nil)
556575 if ($isInstanceOf(@, "Boolean"))
557576 then @
558577 else throw(($getType(@) + " couldn't be cast to Boolean"))
559578 }
560579 if ((r == r))
561580 then if (r)
562581 then $Tuple2(nil, true)
563582 else {
564583 let wxEmission = checkWxEmissionPoolLabel(pool)
565584 let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(targetEpoch)), 0)
566585 let votingResult = valueOrElse(getInteger(this, keyVotingResult(pool, targetEpoch)), 0)
567586 let share = if (if ((totalVotes == 0))
568587 then true
569588 else !(wxEmission))
570589 then 0
571590 else fraction(votingResult, poolWeightMult, totalVotes)
572591 let modifyWeightInv = invoke(factoryContract, "modifyWeight", [lpAssetId, share], nil)
573592 if ((modifyWeightInv == modifyWeightInv))
574593 then {
575594 let poolsListActions = if (if (wxEmission)
576595 then true
577596 else force)
578597 then nil
579598 else ([DeleteEntry(keyInList(pool))] ++ deleteNodeActions(poolsListName, poolStr))
580599 $Tuple2(([IntegerEntry(keyPoolShare(pool, targetEpoch), share)] ++ poolsListActions), false)
581600 }
582601 else throw("Strict value is not equal to itself.")
583602 }
584603 else throw("Strict value is not equal to itself.")
585604 }
586605 else throw("Strict value is not equal to itself.")
587606 }
588607 else throw("Strict value is not equal to itself.")
589608 }
590609
591610
592611
593612 @Callable(i)
594613 func finalizeHelper () = {
595614 let force = valueOrElse(getBoolean(keyFinalizationShouldBeForced), false)
596615 let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0)
597616 let previousEpoch = (epoch - 1)
598617 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
599618 let epochLength = getIntOrFail(this, keyEpochLength)
600619 let endHeight = (startHeight + epochLength)
601620 let finalizationStageOrUnit = getInteger(this, keyFinalizationStage)
602621 if (if (if ((height >= endHeight))
603622 then (finalizationStageOrUnit == unit)
604623 else false)
605624 then !(force)
606625 else false)
607626 then {
608627 let newEpoch = (epoch + 1)
609628 let newEpochLengthOption = getInteger(this, keyEpochLengthNew)
610629 let newEpochLengthActions = match newEpochLengthOption {
611630 case newEpochLength: Int =>
612631 [IntegerEntry(keyEpochLength, newEpochLength), DeleteEntry(keyEpochLengthNew)]
613632 case _: Unit =>
614633 nil
615634 case _ =>
616635 throw("Match error")
617636 }
618637 $Tuple2(([IntegerEntry(keyStartHeightByEpoch(newEpoch), height), IntegerEntry(keyStartHeight, height), IntegerEntry(keyCurrentEpoch, newEpoch), IntegerEntry(keyFinalizationStage, finalizationStageTotal), IntegerEntry(keyEpochLengthByEpoch(epoch), epochLength)] ++ newEpochLengthActions), true)
619638 }
620639 else if (if (force)
621640 then (finalizationStageOrUnit == unit)
622641 else false)
623642 then $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares)], true)
624643 else if ((finalizationStageOrUnit == unit))
625644 then $Tuple2(nil, false)
626645 else if ((finalizationStageOrUnit == finalizationStageTotal))
627646 then {
628647 let poolOrUnit = getString(keyNextPool)
629648 let userOrUnit = getString(keyNextUser)
630649 match poolOrUnit {
631650 case _: Unit =>
632651 match getString(keyListHead(poolsListName)) {
633652 case _: Unit =>
634653 $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true)
635654 case poolsHeadStr: String =>
636655 $Tuple2([StringEntry(keyNextPool, poolsHeadStr)], true)
637656 case _ =>
638657 throw("Match error")
639658 }
640659 case poolStr: String =>
641660 let pool = stringToPool(poolStr)
642661 let nextUserOrUnit = match userOrUnit {
643662 case _: Unit =>
644663 getString(keyListHead(getVotesListName(pool)))
645664 case user: String =>
646665 let next = getString(keyListNext(getVotesListName(pool), user))
647666 if ((next == next))
648667 then {
649668 let processVoteInv = invoke(this, "processVoteINTERNAL", [poolStr, user], nil)
650669 if ((processVoteInv == processVoteInv))
651670 then next
652671 else throw("Strict value is not equal to itself.")
653672 }
654673 else throw("Strict value is not equal to itself.")
655674 case _ =>
656675 throw("Match error")
657676 }
658677 match nextUserOrUnit {
659678 case _: Unit =>
660679 let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr))
661680 match nextPoolOrUnit {
662681 case _: Unit =>
663682 $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true)
664683 case s: String =>
665684 $Tuple2([StringEntry(keyNextPool, s), DeleteEntry(keyNextUser)], true)
666685 case _ =>
667686 throw("Match error")
668687 }
669688 case nextUser: String =>
670689 $Tuple2([StringEntry(keyNextUser, nextUser)], true)
671690 case _ =>
672691 throw("Match error")
673692 }
674693 case _ =>
675694 throw("Match error")
676695 }
677696 }
678697 else if ((finalizationStageOrUnit == finalizationStageShares))
679698 then {
680699 let poolOrUnit = getString(keyNextPool)
681700 match poolOrUnit {
682701 case _: Unit =>
683702 match getString(keyListHead(poolsListName)) {
684703 case _: Unit =>
685704 let actions = if (force)
686705 then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced)]
687706 else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight)]
688- $Tuple2(actions, true)
707+ let gwxRewardDepositInv = gwxRewardDeposit()
708+ if ((gwxRewardDepositInv == gwxRewardDepositInv))
709+ then $Tuple2(actions, true)
710+ else throw("Strict value is not equal to itself.")
689711 case nextPoolStr: String =>
690712 $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true)
691713 case _ =>
692714 throw("Match error")
693715 }
694716 case poolStr: String =>
695717 let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr))
696718 if ((nextPoolOrUnit == nextPoolOrUnit))
697719 then {
698720 let r = {
699721 let @ = invoke(this, "processPoolINTERNAL", [poolStr, force], nil)
700722 if ($isInstanceOf(@, "Boolean"))
701723 then @
702724 else throw(($getType(@) + " couldn't be cast to Boolean"))
703725 }
704726 if ((r == r))
705727 then if (r)
706728 then $Tuple2(nil, true)
707729 else match nextPoolOrUnit {
708730 case _: Unit =>
709731 let actions = if (force)
710732 then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced), DeleteEntry(keyNextPool)]
711733 else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight), DeleteEntry(keyNextPool)]
712- $Tuple2(actions, true)
734+ let gwxRewardDepositInv = gwxRewardDeposit()
735+ if ((gwxRewardDepositInv == gwxRewardDepositInv))
736+ then $Tuple2(actions, true)
737+ else throw("Strict value is not equal to itself.")
713738 case nextPoolStr: String =>
714739 $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true)
715740 case _ =>
716741 throw("Match error")
717742 }
718743 else throw("Strict value is not equal to itself.")
719744 }
720745 else throw("Strict value is not equal to itself.")
721746 case _ =>
722747 throw("Match error")
723748 }
724749 }
725750 else throwErr("finalization is broken")
726751 }
727752
728753
729754
730755 @Callable(i)
731756 func finalizeWrapper (counter) = {
757+ let votingEmissionRateContract = addressFromStringValue(getStringValue(this, keyVotingEmissionRateContract))
732758 let result = {
733759 let @ = invoke(this, "finalizeHelper", nil, nil)
734760 if ($isInstanceOf(@, "Boolean"))
735761 then @
736762 else throw(($getType(@) + " couldn't be cast to Boolean"))
737763 }
738764 if ((result == result))
739765 then if (!(result))
740766 then if ((counter == 0))
741767 then throwErr("Current voting is not over yet")
742- else $Tuple2(nil, unit)
768+ else {
769+ let inv = invoke(votingEmissionRateContract, "finalize", nil, nil)
770+ if ((inv == inv))
771+ then $Tuple2(nil, unit)
772+ else throw("Strict value is not equal to itself.")
773+ }
743774 else {
744775 let maxDepth = valueOrElse(getInteger(this, keyMaxDepth), maxDepthDefault)
745776 if ((maxDepth > counter))
746777 then {
747778 let inv = invoke(this, "finalizeWrapper", [(counter + 1)], nil)
748779 if ((inv == inv))
749780 then $Tuple2(nil, unit)
750781 else throw("Strict value is not equal to itself.")
751782 }
752783 else $Tuple2(nil, unit)
753784 }
754785 else throw("Strict value is not equal to itself.")
755786 }
756787
757788
758789
759790 @Callable(i)
760791 func finalize () = {
761792 let inv = invoke(this, "finalizeWrapper", [0], nil)
762793 if ((inv == inv))
763794 then $Tuple2(nil, unit)
764795 else throw("Strict value is not equal to itself.")
765796 }
766797
767798
768799
769800 @Callable(i)
770801 func containsNodeREADONLY (listName,id) = $Tuple2(nil, containsNode(listName, id))
771802
772803
773804
774805 @Callable(i)
775806 func insertNode (listName,id) = {
776807 let checkCaller = mustManager(i)
777808 if ((checkCaller == checkCaller))
778809 then $Tuple2(insertNodeActions(listName, id), unit)
779810 else throw("Strict value is not equal to itself.")
780811 }
781812
782813
783814
784815 @Callable(i)
785816 func deleteNode (listName,id) = {
786817 let checkCaller = mustManager(i)
787818 if ((checkCaller == checkCaller))
788819 then $Tuple2(deleteNodeActions(listName, id), unit)
789820 else throw("Strict value is not equal to itself.")
790821 }
791822
792823
793824
794825 @Callable(i)
795826 func isFinalizationInProgress () = {
796827 let finalizationStageOrUnit = getInteger(this, keyFinalizationStage)
797828 let finalizationInProgress = (finalizationStageOrUnit != unit)
798829 $Tuple2(nil, finalizationInProgress)
799830 }
800831
801832
802833 @Verifier(tx)
803834 func verify () = {
804835 let targetPublicKey = match managerPublicKeyOrUnit() {
805836 case pk: ByteVector =>
806837 pk
807838 case _: Unit =>
808839 tx.senderPublicKey
809840 case _ =>
810841 throw("Match error")
811842 }
812843 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
813844 }
814845

github/deemru/w8io/026f985 
210.52 ms