tx · DzUyomnXgB3XRAcVbZWkTHxtw22wtkdjdyE17gsFQVFt

3N9Zi6AcWcGbM23jQJ4fnzFsoHoTsxYDznr:  -0.02200000 Waves

2023.06.02 16:20 [2605116] smart account 3N9Zi6AcWcGbM23jQJ4fnzFsoHoTsxYDznr > SELF 0.00000000 Waves

{ "type": 13, "id": "DzUyomnXgB3XRAcVbZWkTHxtw22wtkdjdyE17gsFQVFt", "fee": 2200000, "feeAssetId": null, "timestamp": 1685712027440, "version": 2, "chainId": 84, "sender": "3N9Zi6AcWcGbM23jQJ4fnzFsoHoTsxYDznr", "senderPublicKey": "GFbasS3jufhZkK4xR7tdTjjnP8K33KvJFEDHRtxXDkaJ", "proofs": [ "3WDhtJS69sJVJem4aF5x2rHREbxn5W4bdMXQaHtYFngHzrSHDqjj6EoGBPJ4Dzeq4qEQBMt7zzgZn7SXTLF6xHFw" ], "script": "base64:BgKXFQgCEgQKAggBEgcKBQgICAgBEgQKAggIEgUKAwgIARIECgIICBIDCgEBEgMKAQESBAoCCAgSBAoCCAQSABIDCgEBEgASBAoCCAgSBAoCCAgSBAoCCAgSACIJc2VwYXJhdG9yIg5wb29sV2VpZ2h0TXVsdCIPbWF4RGVwdGhEZWZhdWx0IhZmaW5hbGl6YXRpb25TdGFnZVRvdGFsIhdmaW5hbGl6YXRpb25TdGFnZVNoYXJlcyIOa2V5RXBvY2hMZW5ndGgiEWtleUVwb2NoTGVuZ3RoTmV3IhVrZXlFcG9jaExlbmd0aEJ5RXBvY2giBWVwb2NoIg9rZXlDdXJyZW50RXBvY2giC2tleU1heERlcHRoIiJrZXlWb3RpbmdFbWlzc2lvbkNhbmRpZGF0ZUNvbnRyYWN0IhJrZXlGYWN0b3J5Q29udHJhY3QiE2tleUJvb3N0aW5nQ29udHJhY3QiEmtleVN0YWtpbmdDb250cmFjdCIUa2V5RmluYWxpemF0aW9uU3RhZ2UiC2tleU5leHRQb29sIgtrZXlOZXh0VXNlciIOa2V5U3RhcnRIZWlnaHQiEWt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zTm9kZVJFQURPTkxZAgJheQJhQwkAlAoCBQNuaWwJAQJhRQIFAmF5BQJhQwJhVAEKaW5zZXJ0Tm9kZQICYXkCYUMEAmJ6CQECYVYBBQJhVAMJAAACBQJiegUCYnoJAJQKAgkBAmFJAgUCYXkFAmFDBQR1bml0CQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAmFUAQpkZWxldGVOb2RlAgJheQJhQwQCYnoJAQJhVgEFAmFUAwkAAAIFAmJ6BQJiegkAlAoCCQECYUwCBQJheQUCYUMFBHVuaXQJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4CYVQBGGlzRmluYWxpemF0aW9uSW5Qcm9ncmVzcwAEAmJsCQCaCAIFBHRoaXMFAXAEAmNwCQECIT0CBQJibAUEdW5pdAkAlAoCBQNuaWwFAmNwAQJjcQECY3IABAJjcwQBWAkBAmFRAAMJAAECBQFYAgpCeXRlVmVjdG9yBAJhVQUBWAUCYVUDCQABAgUBWAIEVW5pdAgFAmNxD3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yCQD0AwMIBQJjcQlib2R5Qnl0ZXMJAJEDAggFAmNxBnByb29mcwAABQJjcx07sug=", "height": 2605116, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5kgukao7QtUdYscifwwMwk49TTcjoykra9FMENNFcinL Next: 6oW2jiwvAYtWw4a7BSBBmrP8aduUyeJ864P63TQnAd2H 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)
2826
2927 let keyFactoryContract = makeString(["%s", "factoryContract"], separator)
3028
5351
5452
5553 func keyInList (pool) = {
56- let $t017881828 = pool
57- let amountAssetId = $t017881828._1
58- let priceAssetId = $t017881828._2
54+ let $t016931733 = pool
55+ let amountAssetId = $t016931733._1
56+ let priceAssetId = $t016931733._2
5957 makeString(["%s%s%s", "inList", amountAssetId, priceAssetId], separator)
6058 }
6159
6462
6563
6664 func keyVote (pool,address,epoch) = {
67- let $t021022142 = pool
68- let amountAssetId = $t021022142._1
69- let priceAssetId = $t021022142._2
65+ let $t020072047 = pool
66+ let amountAssetId = $t020072047._1
67+ let priceAssetId = $t020072047._2
7068 makeString(["%s%s%s%s%d", "vote", amountAssetId, priceAssetId, toString(address), toString(epoch)], separator)
7169 }
7270
7371
7472 func keyVotingResult (pool,epoch) = {
75- let $t023242364 = pool
76- let amountAssetId = $t023242364._1
77- let priceAssetId = $t023242364._2
73+ let $t022292269 = pool
74+ let amountAssetId = $t022292269._1
75+ let priceAssetId = $t022292269._2
7876 makeString(["%s%s%s%d", "votingResult", amountAssetId, priceAssetId, toString(epoch)], separator)
7977 }
8078
8381
8482
8583 func keyPoolShare (pool,epoch) = {
86- let $t026852725 = pool
87- let amountAssetId = $t026852725._1
88- let priceAssetId = $t026852725._2
84+ let $t025902630 = pool
85+ let amountAssetId = $t025902630._1
86+ let priceAssetId = $t025902630._2
8987 makeString(["%s%s%s%d", "poolShare", amountAssetId, priceAssetId, toString(epoch)], separator)
9088 }
9189
142140 }
143141
144142
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-
158143 func getLpAssetByPoolAssets (amountAssetId,priceAssetId) = {
159144 func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
160145
162147
163148 func keyMappingPoolContractToLPAsset (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
164149
150+ let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
165151 let amountAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amountAssetId))
166152 let priceAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAssetId))
167153 let poolContractAddress = getStrOrFail(factoryContract, keyMappingPoolAssetsToPoolContractAddress(amountAssetInternalId, priceAssetInternalId))
171157
172158
173159 func checkWxEmissionPoolLabel (pool) = {
174- let $t055655605 = pool
175- let amountAssetId = $t055655605._1
176- let priceAssetId = $t055655605._2
160+ let $t051685208 = pool
161+ let amountAssetId = $t051685208._1
162+ let priceAssetId = $t051685208._2
163+ let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
177164 let @ = invoke(factoryContract, "checkWxEmissionPoolLabel", [amountAssetId, priceAssetId], nil)
178165 if ($isInstanceOf(@, "Boolean"))
179166 then @
181168 }
182169
183170
184-func gwxRewardDeposit () = {
185- let factoryCfg = readFactoryCfgOrFail(factoryContract)
186- let gwxRewardsContract = getGwxRewardAddressOrFail(factoryCfg)
187- invoke(gwxRewardsContract, "deposit", nil, nil)
188- }
189-
190-
191171 let poolsListName = "pools"
192172
193173 func getVotesListName (pool) = {
194- let $t060226062 = pool
195- let amountAssetId = $t060226062._1
196- let priceAssetId = $t060226062._2
174+ let $t055095549 = pool
175+ let amountAssetId = $t055095549._1
176+ let priceAssetId = $t055095549._2
197177 makeString(["votes", amountAssetId, priceAssetId], separator)
198178 }
199179
504484 if ((checkTargetEpoch == checkTargetEpoch))
505485 then {
506486 let pool = stringToPool(poolStr)
507- let $t01806518105 = pool
508- let amountAssetId = $t01806518105._1
509- let priceAssetId = $t01806518105._2
487+ let $t01755217592 = pool
488+ let amountAssetId = $t01755217592._1
489+ let priceAssetId = $t01755217592._2
510490 let wxEmission = checkWxEmissionPoolLabel(pool)
511491 let gwxAmountAtEndTotal = {
512492 let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeight], nil)
565545 if ((checkTargetEpoch == checkTargetEpoch))
566546 then {
567547 let pool = stringToPool(poolStr)
568- let $t02046220502 = pool
569- let amountAssetId = $t02046220502._1
570- let priceAssetId = $t02046220502._2
548+ let $t01994919989 = pool
549+ let amountAssetId = $t01994919989._1
550+ let priceAssetId = $t01994919989._2
571551 let stakingContract = addressFromStringValue(getStrOrFail(this, keyStakingContract))
552+ let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
572553 let lpAssetId = getLpAssetByPoolAssets(amountAssetId, priceAssetId)
573554 let r = {
574555 let @ = invoke(stakingContract, "usersListTraversal", [lpAssetId], nil)
704685 let actions = if (force)
705686 then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced)]
706687 else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight)]
707- let gwxRewardDepositInv = gwxRewardDeposit()
708- if ((gwxRewardDepositInv == gwxRewardDepositInv))
709- then $Tuple2(actions, true)
710- else throw("Strict value is not equal to itself.")
688+ $Tuple2(actions, true)
711689 case nextPoolStr: String =>
712690 $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true)
713691 case _ =>
731709 let actions = if (force)
732710 then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced), DeleteEntry(keyNextPool)]
733711 else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight), DeleteEntry(keyNextPool)]
734- let gwxRewardDepositInv = gwxRewardDeposit()
735- if ((gwxRewardDepositInv == gwxRewardDepositInv))
736- then $Tuple2(actions, true)
737- else throw("Strict value is not equal to itself.")
712+ $Tuple2(actions, true)
738713 case nextPoolStr: String =>
739714 $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true)
740715 case _ =>
754729
755730 @Callable(i)
756731 func finalizeWrapper (counter) = {
757- let votingEmissionRateContract = addressFromStringValue(getStringValue(this, keyVotingEmissionRateContract))
758732 let result = {
759733 let @ = invoke(this, "finalizeHelper", nil, nil)
760734 if ($isInstanceOf(@, "Boolean"))
765739 then if (!(result))
766740 then if ((counter == 0))
767741 then throwErr("Current voting is not over yet")
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- }
742+ else $Tuple2(nil, unit)
774743 else {
775744 let maxDepth = valueOrElse(getInteger(this, keyMaxDepth), maxDepthDefault)
776745 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)
2826
2927 let keyFactoryContract = makeString(["%s", "factoryContract"], separator)
3028
3129 let keyBoostingContract = makeString(["%s", "boostingContract"], separator)
3230
3331 let keyStakingContract = makeString(["%s", "stakingContract"], separator)
3432
3533 let keyFinalizationStage = makeString(["%s", "finalizationStage"], separator)
3634
3735 let keyNextPool = makeString(["%s", "nextPool"], separator)
3836
3937 let keyNextUser = makeString(["%s", "nextUser"], separator)
4038
4139 let keyStartHeight = makeString(["%s", "startHeight"], separator)
4240
4341 let keyCurrentEpochUi = makeString(["%s", "currentEpochUi"], separator)
4442
4543 let keyStartHeightUi = makeString(["%s", "startHeightUi"], separator)
4644
4745 let keyFinalizationShouldBeForced = makeString(["%s", "force"], separator)
4846
4947 func keyStartHeightByEpoch (epoch) = makeString(["%s%d", "startHeight", toString(epoch)], separator)
5048
5149
5250 func keyFinalized (epoch) = makeString(["%s%d", "finalized", toString(epoch)], separator)
5351
5452
5553 func keyInList (pool) = {
56- let $t017881828 = pool
57- let amountAssetId = $t017881828._1
58- let priceAssetId = $t017881828._2
54+ let $t016931733 = pool
55+ let amountAssetId = $t016931733._1
56+ let priceAssetId = $t016931733._2
5957 makeString(["%s%s%s", "inList", amountAssetId, priceAssetId], separator)
6058 }
6159
6260
6361 func keyUsed (address,epoch) = makeString(["%s%s%d", "used", toString(address), toString(epoch)], separator)
6462
6563
6664 func keyVote (pool,address,epoch) = {
67- let $t021022142 = pool
68- let amountAssetId = $t021022142._1
69- let priceAssetId = $t021022142._2
65+ let $t020072047 = pool
66+ let amountAssetId = $t020072047._1
67+ let priceAssetId = $t020072047._2
7068 makeString(["%s%s%s%s%d", "vote", amountAssetId, priceAssetId, toString(address), toString(epoch)], separator)
7169 }
7270
7371
7472 func keyVotingResult (pool,epoch) = {
75- let $t023242364 = pool
76- let amountAssetId = $t023242364._1
77- let priceAssetId = $t023242364._2
73+ let $t022292269 = pool
74+ let amountAssetId = $t022292269._1
75+ let priceAssetId = $t022292269._2
7876 makeString(["%s%s%s%d", "votingResult", amountAssetId, priceAssetId, toString(epoch)], separator)
7977 }
8078
8179
8280 func keyVotingResultStaked (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStaked", lpAssetIdStr, toString(epoch)], separator)
8381
8482
8583 func keyPoolShare (pool,epoch) = {
86- let $t026852725 = pool
87- let amountAssetId = $t026852725._1
88- let priceAssetId = $t026852725._2
84+ let $t025902630 = pool
85+ let amountAssetId = $t025902630._1
86+ let priceAssetId = $t025902630._2
8987 makeString(["%s%s%s%d", "poolShare", amountAssetId, priceAssetId, toString(epoch)], separator)
9088 }
9189
9290
9391 func keyTotalVotes (epoch) = makeString(["%s%d", "totalVotes", toString(epoch)], separator)
9492
9593
9694 func keyStakedByUser (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s", "staked", userAddressStr, lpAssetIdStr], separator)
9795
9896
9997 func wrapErr (msg) = makeString(["voting_emission.ride:", msg], " ")
10098
10199
102100 func throwErr (msg) = throw(wrapErr(msg))
103101
104102
105103 func getValueOrFail (address,key,type) = {
106104 let error = wrapErr(makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
107105 valueOrErrorMessage( match type {
108106 case str: String =>
109107 getString(address, key)
110108 case int: Int =>
111109 getInteger(address, key)
112110 case _ =>
113111 throwErr("invalid entry type")
114112 }, error)
115113 }
116114
117115
118116 func getStrOrFail (address,key) = {
119117 let @ = getValueOrFail(address, key, "")
120118 if ($isInstanceOf(@, "String"))
121119 then @
122120 else throw(($getType(@) + " couldn't be cast to String"))
123121 }
124122
125123
126124 func getIntOrFail (address,key) = {
127125 let @ = getValueOrFail(address, key, 0)
128126 if ($isInstanceOf(@, "Int"))
129127 then @
130128 else throw(($getType(@) + " couldn't be cast to Int"))
131129 }
132130
133131
134132 func poolToString (pool) = ((pool._1 + separator) + pool._2)
135133
136134
137135 func stringToPool (str) = {
138136 let parts = split(str, separator)
139137 if ((size(parts) == 2))
140138 then $Tuple2(parts[0], parts[1])
141139 else throwErr("invalid pool string")
142140 }
143141
144142
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-
158143 func getLpAssetByPoolAssets (amountAssetId,priceAssetId) = {
159144 func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
160145
161146 func keyMappingPoolAssetsToPoolContractAddress (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + toString(internalAmountAssetIdStr)) + "__") + toString(internalPriceAssetIdStr)) + "__mappings__poolAssets2PoolContract")
162147
163148 func keyMappingPoolContractToLPAsset (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
164149
150+ let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
165151 let amountAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amountAssetId))
166152 let priceAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAssetId))
167153 let poolContractAddress = getStrOrFail(factoryContract, keyMappingPoolAssetsToPoolContractAddress(amountAssetInternalId, priceAssetInternalId))
168154 let lpAssetId = getStrOrFail(factoryContract, keyMappingPoolContractToLPAsset(poolContractAddress))
169155 lpAssetId
170156 }
171157
172158
173159 func checkWxEmissionPoolLabel (pool) = {
174- let $t055655605 = pool
175- let amountAssetId = $t055655605._1
176- let priceAssetId = $t055655605._2
160+ let $t051685208 = pool
161+ let amountAssetId = $t051685208._1
162+ let priceAssetId = $t051685208._2
163+ let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
177164 let @ = invoke(factoryContract, "checkWxEmissionPoolLabel", [amountAssetId, priceAssetId], nil)
178165 if ($isInstanceOf(@, "Boolean"))
179166 then @
180167 else throw(($getType(@) + " couldn't be cast to Boolean"))
181168 }
182169
183170
184-func gwxRewardDeposit () = {
185- let factoryCfg = readFactoryCfgOrFail(factoryContract)
186- let gwxRewardsContract = getGwxRewardAddressOrFail(factoryCfg)
187- invoke(gwxRewardsContract, "deposit", nil, nil)
188- }
189-
190-
191171 let poolsListName = "pools"
192172
193173 func getVotesListName (pool) = {
194- let $t060226062 = pool
195- let amountAssetId = $t060226062._1
196- let priceAssetId = $t060226062._2
174+ let $t055095549 = pool
175+ let amountAssetId = $t055095549._1
176+ let priceAssetId = $t055095549._2
197177 makeString(["votes", amountAssetId, priceAssetId], separator)
198178 }
199179
200180
201181 func keyListHead (listName) = {
202182 let meta = if ((listName == poolsListName))
203183 then "%s%s"
204184 else "%s%s%s%s"
205185 makeString([meta, listName, "head"], separator)
206186 }
207187
208188
209189 func keyListSize (listName) = {
210190 let meta = if ((listName == poolsListName))
211191 then "%s%s"
212192 else "%s%s%s%s"
213193 makeString([meta, listName, "size"], separator)
214194 }
215195
216196
217197 func keyListPrev (listName,id) = {
218198 let meta = if ((listName == poolsListName))
219199 then "%s%s%s%s"
220200 else "%s%s%s%s%s"
221201 makeString([meta, listName, id, "prev"], separator)
222202 }
223203
224204
225205 func keyListNext (listName,id) = {
226206 let meta = if ((listName == poolsListName))
227207 then "%s%s%s%s"
228208 else "%s%s%s%s%s"
229209 makeString([meta, listName, id, "next"], separator)
230210 }
231211
232212
233213 func containsNode (listName,id) = {
234214 let headOrUnit = getString(this, keyListHead(listName))
235215 let prevOrUnit = getString(this, keyListPrev(listName, id))
236216 let nextOrUnit = getString(this, keyListNext(listName, id))
237217 if (if ((id == valueOrElse(headOrUnit, "")))
238218 then true
239219 else (prevOrUnit != unit))
240220 then true
241221 else (nextOrUnit != unit)
242222 }
243223
244224
245225 func insertNodeActions (listName,id) = {
246226 let headOrUnit = getString(this, keyListHead(listName))
247227 let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
248228 let checkNode = if (!(containsNode(listName, id)))
249229 then true
250230 else throwErr("Node exists")
251231 if ((checkNode == checkNode))
252232 then (([IntegerEntry(keyListSize(listName), (listSize + 1))] ++ (if ((headOrUnit != unit))
253233 then [StringEntry(keyListNext(listName, id), value(headOrUnit)), StringEntry(keyListPrev(listName, value(headOrUnit)), id)]
254234 else nil)) ++ [StringEntry(keyListHead(listName), id)])
255235 else throw("Strict value is not equal to itself.")
256236 }
257237
258238
259239 func deleteNodeActions (listName,id) = {
260240 let headOrUnit = getString(this, keyListHead(listName))
261241 let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
262242 let prevOrUnit = getString(this, keyListPrev(listName, id))
263243 let nextOrUnit = getString(this, keyListNext(listName, id))
264244 ([IntegerEntry(keyListSize(listName), (listSize - 1))] ++ (if (if ((prevOrUnit != unit))
265245 then (nextOrUnit != unit)
266246 else false)
267247 then [StringEntry(keyListNext(listName, value(prevOrUnit)), value(nextOrUnit)), StringEntry(keyListPrev(listName, value(nextOrUnit)), value(prevOrUnit)), DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, id))]
268248 else if ((nextOrUnit != unit))
269249 then [StringEntry(keyListHead(listName), value(nextOrUnit)), DeleteEntry(keyListNext(listName, id)), DeleteEntry(keyListPrev(listName, value(nextOrUnit)))]
270250 else if ((prevOrUnit != unit))
271251 then [DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, value(prevOrUnit)))]
272252 else if ((id == valueOrElse(headOrUnit, "")))
273253 then [DeleteEntry(keyListHead(listName))]
274254 else throwErr(((("invalid node: " + listName) + ".") + id))))
275255 }
276256
277257
278258 func keyManagerVaultAddress () = "%s__managerVaultAddress"
279259
280260
281261 func keyManagerPublicKey () = "%s__managerPublicKey"
282262
283263
284264 func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) {
285265 case s: String =>
286266 addressFromStringValue(s)
287267 case _ =>
288268 this
289269 }
290270
291271
292272 func managerPublicKeyOrUnit () = {
293273 let managerVaultAddress = getManagerVaultAddressOrThis()
294274 match getString(managerVaultAddress, keyManagerPublicKey()) {
295275 case s: String =>
296276 fromBase58String(s)
297277 case _: Unit =>
298278 unit
299279 case _ =>
300280 throw("Match error")
301281 }
302282 }
303283
304284
305285 func isManager (i) = match managerPublicKeyOrUnit() {
306286 case pk: ByteVector =>
307287 (i.callerPublicKey == pk)
308288 case _: Unit =>
309289 (i.caller == this)
310290 case _ =>
311291 throw("Match error")
312292 }
313293
314294
315295 func mustManager (i) = if (isManager(i))
316296 then true
317297 else throw("permission denied")
318298
319299
320300 func mustThis (i) = if ((i.caller == this))
321301 then true
322302 else throw("permission denied")
323303
324304
325305 @Callable(i)
326306 func getUserGwxAmountAtHeight (userAddress,targetHeight) = {
327307 let boostingContractAddress = valueOrErrorMessage(addressFromString(getStrOrFail(this, keyBoostingContract)), wrapErr("invalid boosting contract address"))
328308 $Tuple2(nil, {
329309 let @ = invoke(boostingContractAddress, "getUserGwxAmountAtHeightREADONLY", [userAddress, targetHeight], nil)
330310 if ($isInstanceOf(@, "Int"))
331311 then @
332312 else throw(($getType(@) + " couldn't be cast to Int"))
333313 })
334314 }
335315
336316
337317
338318 @Callable(i)
339319 func constructor (factoryContract,votingEmissionCandidateContract,boostingContract,stakingContract,epochLength) = {
340320 let checks = [mustManager(i), if ((addressFromString(factoryContract) != unit))
341321 then true
342322 else "invalid factory contract address", if ((addressFromString(votingEmissionCandidateContract) != unit))
343323 then true
344324 else "invalid voting emission candidate contract address", if ((addressFromString(boostingContract) != unit))
345325 then true
346326 else "invalid boosting contract address", if ((addressFromString(stakingContract) != unit))
347327 then true
348328 else "invalid staking contract address", if ((epochLength > 0))
349329 then true
350330 else throwErr("invalid epoch length")]
351331 if ((checks == checks))
352332 then $Tuple2([StringEntry(keyFactoryContract, factoryContract), StringEntry(keyVotingEmissionCandidateContract, votingEmissionCandidateContract), StringEntry(keyBoostingContract, boostingContract), StringEntry(keyStakingContract, stakingContract), IntegerEntry(keyEpochLength, epochLength)], unit)
353333 else throw("Strict value is not equal to itself.")
354334 }
355335
356336
357337
358338 @Callable(i)
359339 func create (amountAssetId,priceAssetId) = {
360340 let checks = [if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionCandidateContract), "")))
361341 then true
362342 else mustManager(i)]
363343 if ((checks == checks))
364344 then {
365345 let pool = $Tuple2(amountAssetId, priceAssetId)
366346 let inListActions = ([BooleanEntry(keyInList(pool), true)] ++ insertNodeActions(poolsListName, poolToString(pool)))
367347 let currentEpochIsNotDefined = (getInteger(this, keyCurrentEpoch) == unit)
368348 let startHeightActions = if (currentEpochIsNotDefined)
369349 then {
370350 let epoch = 0
371351 [IntegerEntry(keyCurrentEpoch, epoch), IntegerEntry(keyStartHeightByEpoch(epoch), height), IntegerEntry(keyStartHeight, height), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, height)]
372352 }
373353 else nil
374354 $Tuple2((inListActions ++ startHeightActions), unit)
375355 }
376356 else throw("Strict value is not equal to itself.")
377357 }
378358
379359
380360
381361 @Callable(i)
382362 func vote (amountAssetId,priceAssetId,amount) = {
383363 let pool = $Tuple2(amountAssetId, priceAssetId)
384364 let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0)
385365 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
386366 let epochLength = getIntOrFail(this, keyEpochLength)
387367 let endHeight = (startHeight + epochLength)
388368 let finalizationStageOrUnit = getInteger(this, keyFinalizationStage)
389369 let used = valueOrElse(getInteger(this, keyUsed(i.caller, epoch)), 0)
390370 let vote = valueOrElse(getInteger(this, keyVote(pool, i.caller, epoch)), 0)
391371 let poolResult = valueOrElse(getInteger(this, keyVotingResult(pool, epoch)), 0)
392372 let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(epoch)), 0)
393373 let gwxAmountAtEndTotal = {
394374 let @ = invoke(this, "getUserGwxAmountAtHeight", [toBase58String(i.caller.bytes), endHeight], nil)
395375 if ($isInstanceOf(@, "Int"))
396376 then @
397377 else throw(($getType(@) + " couldn't be cast to Int"))
398378 }
399379 let available = (gwxAmountAtEndTotal - used)
400380 let newVote = (vote + amount)
401381 let wxEmission = checkWxEmissionPoolLabel(pool)
402382 let checks = [if ((getBoolean(keyInList(pool)) != unit))
403383 then true
404384 else throwErr("invalid assets"), if ((endHeight > height))
405385 then true
406386 else throwErr("invalid height"), if ((finalizationStageOrUnit == unit))
407387 then true
408388 else throwErr("finalization in progress"), if ((gwxAmountAtEndTotal > 0))
409389 then true
410390 else throwErr("you do not have gWX"), if (if ((amount > 0))
411391 then (available >= amount)
412392 else false)
413393 then true
414394 else throwErr("invalid amount"), if (wxEmission)
415395 then true
416396 else throwErr("pool hasn't WX_EMISSION label")]
417397 if ((checks == checks))
418398 then {
419399 let votesListName = getVotesListName(pool)
420400 let userAddressStr = toString(i.caller)
421401 let votesListActions = if (containsNode(votesListName, userAddressStr))
422402 then nil
423403 else insertNodeActions(votesListName, userAddressStr)
424404 $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)
425405 }
426406 else throw("Strict value is not equal to itself.")
427407 }
428408
429409
430410
431411 @Callable(i)
432412 func cancelVote (amountAssetId,priceAssetId) = {
433413 let pool = $Tuple2(amountAssetId, priceAssetId)
434414 let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0)
435415 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
436416 let epochLength = getIntOrFail(this, keyEpochLength)
437417 let endHeight = (startHeight + epochLength)
438418 let finalizationStageOrUnit = getInteger(this, keyFinalizationStage)
439419 let used = valueOrElse(getInteger(this, keyUsed(i.caller, epoch)), 0)
440420 let vote = valueOrElse(getInteger(this, keyVote(pool, i.caller, epoch)), 0)
441421 let poolResult = valueOrElse(getInteger(this, keyVotingResult(pool, epoch)), 0)
442422 let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(epoch)), 0)
443423 let checks = [if ((getBoolean(keyInList(pool)) != unit))
444424 then true
445425 else throwErr("invalid assets"), if ((endHeight > height))
446426 then true
447427 else throwErr("invalid height"), if ((finalizationStageOrUnit == unit))
448428 then true
449429 else throwErr("finalization in progress"), if ((vote > 0))
450430 then true
451431 else throwErr("no vote")]
452432 if ((checks == checks))
453433 then {
454434 let votesListName = getVotesListName(pool)
455435 let userAddressStr = toString(i.caller)
456436 $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)
457437 }
458438 else throw("Strict value is not equal to itself.")
459439 }
460440
461441
462442
463443 @Callable(i)
464444 func setEpochLength (newEpochLength) = {
465445 let checks = [mustManager(i), if ((newEpochLength > 0))
466446 then true
467447 else throwErr("invalid epoch length")]
468448 if ((checks == checks))
469449 then $Tuple2([IntegerEntry(keyEpochLengthNew, newEpochLength)], unit)
470450 else throw("Strict value is not equal to itself.")
471451 }
472452
473453
474454
475455 @Callable(i)
476456 func setMaxDepth (newMaxDepth) = {
477457 let checks = [mustManager(i), if ((newMaxDepth > 0))
478458 then true
479459 else throwErr("invalid max depth")]
480460 if ((checks == checks))
481461 then $Tuple2([IntegerEntry(keyMaxDepth, newMaxDepth)], unit)
482462 else throw("Strict value is not equal to itself.")
483463 }
484464
485465
486466
487467 @Callable(i)
488468 func processVoteINTERNAL (poolStr,userAddressStr) = {
489469 let checkCaller = mustThis(i)
490470 if ((checkCaller == checkCaller))
491471 then {
492472 let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), wrapErr(("processVoteINTERNAL: invalid user address " + userAddressStr)))
493473 let epoch = getIntOrFail(this, keyCurrentEpoch)
494474 let epochPrevious = (epoch - 1)
495475 let epochLength = getIntOrFail(this, keyEpochLength)
496476 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
497477 let endHeight = (startHeight + epochLength)
498478 let startHeightPrevious = getIntOrFail(this, keyStartHeightByEpoch(epochPrevious))
499479 let epochLengthPrevious = getIntOrFail(this, keyEpochLengthByEpoch(epochPrevious))
500480 let endHeightPrevious = (startHeightPrevious + epochLengthPrevious)
501481 let checkTargetEpoch = if ((epochPrevious >= 0))
502482 then true
503483 else throwErr("processVoteINTERNAL: invalid previous epoch")
504484 if ((checkTargetEpoch == checkTargetEpoch))
505485 then {
506486 let pool = stringToPool(poolStr)
507- let $t01806518105 = pool
508- let amountAssetId = $t01806518105._1
509- let priceAssetId = $t01806518105._2
487+ let $t01755217592 = pool
488+ let amountAssetId = $t01755217592._1
489+ let priceAssetId = $t01755217592._2
510490 let wxEmission = checkWxEmissionPoolLabel(pool)
511491 let gwxAmountAtEndTotal = {
512492 let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeight], nil)
513493 if ($isInstanceOf(@, "Int"))
514494 then @
515495 else throw(($getType(@) + " couldn't be cast to Int"))
516496 }
517497 let gwxAmountAtEndTotalPrevious = {
518498 let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeightPrevious], nil)
519499 if ($isInstanceOf(@, "Int"))
520500 then @
521501 else throw(($getType(@) + " couldn't be cast to Int"))
522502 }
523503 let totalVotes = valueOrElse(getInteger(keyTotalVotes(epoch)), 0)
524504 let votingResult = valueOrElse(getInteger(keyVotingResult(pool, epoch)), 0)
525505 let votePrevious = valueOrErrorMessage(getInteger(keyVote(pool, userAddress, epochPrevious)), wrapErr((((("processVoteINTERNAL " + poolStr) + " ") + userAddressStr) + ": no previous vote")))
526506 let used = valueOrElse(getInteger(this, keyUsed(userAddress, epoch)), 0)
527507 let lpAssetIdStr = getLpAssetByPoolAssets(amountAssetId, priceAssetId)
528508 let votingResultStakedPrevious = valueOrElse(getInteger(keyVotingResultStaked(lpAssetIdStr, epochPrevious)), 0)
529509 let stakingContract = addressFromStringValue(getStrOrFail(this, keyStakingContract))
530510 let stakedByUser = valueOrElse(getInteger(stakingContract, keyStakedByUser(lpAssetIdStr, userAddressStr)), 0)
531511 let votingResultStakedActions = if ((stakedByUser == 0))
532512 then nil
533513 else [IntegerEntry(keyVotingResultStaked(lpAssetIdStr, epochPrevious), (votingResultStakedPrevious + votePrevious))]
534514 let newVote = if ((gwxAmountAtEndTotalPrevious > 0))
535515 then fraction(votePrevious, gwxAmountAtEndTotal, gwxAmountAtEndTotalPrevious)
536516 else 0
537517 let actions = if (if ((newVote > 0))
538518 then wxEmission
539519 else false)
540520 then [IntegerEntry(keyVote(pool, userAddress, epoch), newVote), IntegerEntry(keyTotalVotes(epoch), (totalVotes + newVote)), IntegerEntry(keyVotingResult(pool, epoch), (votingResult + newVote)), IntegerEntry(keyUsed(userAddress, epoch), (used + newVote))]
541521 else deleteNodeActions(getVotesListName(pool), userAddressStr)
542522 $Tuple2((actions ++ votingResultStakedActions), unit)
543523 }
544524 else throw("Strict value is not equal to itself.")
545525 }
546526 else throw("Strict value is not equal to itself.")
547527 }
548528
549529
550530
551531 @Callable(i)
552532 func processPoolINTERNAL (poolStr,force) = {
553533 let checkCaller = mustThis(i)
554534 if ((checkCaller == checkCaller))
555535 then {
556536 let targetEpoch = {
557537 let currentEpoch = getIntOrFail(this, keyCurrentEpoch)
558538 if (force)
559539 then currentEpoch
560540 else (currentEpoch - 1)
561541 }
562542 let checkTargetEpoch = if ((targetEpoch >= 0))
563543 then true
564544 else throwErr("processPoolINTERNAL: invalid target epoch")
565545 if ((checkTargetEpoch == checkTargetEpoch))
566546 then {
567547 let pool = stringToPool(poolStr)
568- let $t02046220502 = pool
569- let amountAssetId = $t02046220502._1
570- let priceAssetId = $t02046220502._2
548+ let $t01994919989 = pool
549+ let amountAssetId = $t01994919989._1
550+ let priceAssetId = $t01994919989._2
571551 let stakingContract = addressFromStringValue(getStrOrFail(this, keyStakingContract))
552+ let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
572553 let lpAssetId = getLpAssetByPoolAssets(amountAssetId, priceAssetId)
573554 let r = {
574555 let @ = invoke(stakingContract, "usersListTraversal", [lpAssetId], nil)
575556 if ($isInstanceOf(@, "Boolean"))
576557 then @
577558 else throw(($getType(@) + " couldn't be cast to Boolean"))
578559 }
579560 if ((r == r))
580561 then if (r)
581562 then $Tuple2(nil, true)
582563 else {
583564 let wxEmission = checkWxEmissionPoolLabel(pool)
584565 let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(targetEpoch)), 0)
585566 let votingResult = valueOrElse(getInteger(this, keyVotingResult(pool, targetEpoch)), 0)
586567 let share = if (if ((totalVotes == 0))
587568 then true
588569 else !(wxEmission))
589570 then 0
590571 else fraction(votingResult, poolWeightMult, totalVotes)
591572 let modifyWeightInv = invoke(factoryContract, "modifyWeight", [lpAssetId, share], nil)
592573 if ((modifyWeightInv == modifyWeightInv))
593574 then {
594575 let poolsListActions = if (if (wxEmission)
595576 then true
596577 else force)
597578 then nil
598579 else ([DeleteEntry(keyInList(pool))] ++ deleteNodeActions(poolsListName, poolStr))
599580 $Tuple2(([IntegerEntry(keyPoolShare(pool, targetEpoch), share)] ++ poolsListActions), false)
600581 }
601582 else throw("Strict value is not equal to itself.")
602583 }
603584 else throw("Strict value is not equal to itself.")
604585 }
605586 else throw("Strict value is not equal to itself.")
606587 }
607588 else throw("Strict value is not equal to itself.")
608589 }
609590
610591
611592
612593 @Callable(i)
613594 func finalizeHelper () = {
614595 let force = valueOrElse(getBoolean(keyFinalizationShouldBeForced), false)
615596 let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0)
616597 let previousEpoch = (epoch - 1)
617598 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
618599 let epochLength = getIntOrFail(this, keyEpochLength)
619600 let endHeight = (startHeight + epochLength)
620601 let finalizationStageOrUnit = getInteger(this, keyFinalizationStage)
621602 if (if (if ((height >= endHeight))
622603 then (finalizationStageOrUnit == unit)
623604 else false)
624605 then !(force)
625606 else false)
626607 then {
627608 let newEpoch = (epoch + 1)
628609 let newEpochLengthOption = getInteger(this, keyEpochLengthNew)
629610 let newEpochLengthActions = match newEpochLengthOption {
630611 case newEpochLength: Int =>
631612 [IntegerEntry(keyEpochLength, newEpochLength), DeleteEntry(keyEpochLengthNew)]
632613 case _: Unit =>
633614 nil
634615 case _ =>
635616 throw("Match error")
636617 }
637618 $Tuple2(([IntegerEntry(keyStartHeightByEpoch(newEpoch), height), IntegerEntry(keyStartHeight, height), IntegerEntry(keyCurrentEpoch, newEpoch), IntegerEntry(keyFinalizationStage, finalizationStageTotal), IntegerEntry(keyEpochLengthByEpoch(epoch), epochLength)] ++ newEpochLengthActions), true)
638619 }
639620 else if (if (force)
640621 then (finalizationStageOrUnit == unit)
641622 else false)
642623 then $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares)], true)
643624 else if ((finalizationStageOrUnit == unit))
644625 then $Tuple2(nil, false)
645626 else if ((finalizationStageOrUnit == finalizationStageTotal))
646627 then {
647628 let poolOrUnit = getString(keyNextPool)
648629 let userOrUnit = getString(keyNextUser)
649630 match poolOrUnit {
650631 case _: Unit =>
651632 match getString(keyListHead(poolsListName)) {
652633 case _: Unit =>
653634 $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true)
654635 case poolsHeadStr: String =>
655636 $Tuple2([StringEntry(keyNextPool, poolsHeadStr)], true)
656637 case _ =>
657638 throw("Match error")
658639 }
659640 case poolStr: String =>
660641 let pool = stringToPool(poolStr)
661642 let nextUserOrUnit = match userOrUnit {
662643 case _: Unit =>
663644 getString(keyListHead(getVotesListName(pool)))
664645 case user: String =>
665646 let next = getString(keyListNext(getVotesListName(pool), user))
666647 if ((next == next))
667648 then {
668649 let processVoteInv = invoke(this, "processVoteINTERNAL", [poolStr, user], nil)
669650 if ((processVoteInv == processVoteInv))
670651 then next
671652 else throw("Strict value is not equal to itself.")
672653 }
673654 else throw("Strict value is not equal to itself.")
674655 case _ =>
675656 throw("Match error")
676657 }
677658 match nextUserOrUnit {
678659 case _: Unit =>
679660 let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr))
680661 match nextPoolOrUnit {
681662 case _: Unit =>
682663 $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true)
683664 case s: String =>
684665 $Tuple2([StringEntry(keyNextPool, s), DeleteEntry(keyNextUser)], true)
685666 case _ =>
686667 throw("Match error")
687668 }
688669 case nextUser: String =>
689670 $Tuple2([StringEntry(keyNextUser, nextUser)], true)
690671 case _ =>
691672 throw("Match error")
692673 }
693674 case _ =>
694675 throw("Match error")
695676 }
696677 }
697678 else if ((finalizationStageOrUnit == finalizationStageShares))
698679 then {
699680 let poolOrUnit = getString(keyNextPool)
700681 match poolOrUnit {
701682 case _: Unit =>
702683 match getString(keyListHead(poolsListName)) {
703684 case _: Unit =>
704685 let actions = if (force)
705686 then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced)]
706687 else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight)]
707- let gwxRewardDepositInv = gwxRewardDeposit()
708- if ((gwxRewardDepositInv == gwxRewardDepositInv))
709- then $Tuple2(actions, true)
710- else throw("Strict value is not equal to itself.")
688+ $Tuple2(actions, true)
711689 case nextPoolStr: String =>
712690 $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true)
713691 case _ =>
714692 throw("Match error")
715693 }
716694 case poolStr: String =>
717695 let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr))
718696 if ((nextPoolOrUnit == nextPoolOrUnit))
719697 then {
720698 let r = {
721699 let @ = invoke(this, "processPoolINTERNAL", [poolStr, force], nil)
722700 if ($isInstanceOf(@, "Boolean"))
723701 then @
724702 else throw(($getType(@) + " couldn't be cast to Boolean"))
725703 }
726704 if ((r == r))
727705 then if (r)
728706 then $Tuple2(nil, true)
729707 else match nextPoolOrUnit {
730708 case _: Unit =>
731709 let actions = if (force)
732710 then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced), DeleteEntry(keyNextPool)]
733711 else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight), DeleteEntry(keyNextPool)]
734- let gwxRewardDepositInv = gwxRewardDeposit()
735- if ((gwxRewardDepositInv == gwxRewardDepositInv))
736- then $Tuple2(actions, true)
737- else throw("Strict value is not equal to itself.")
712+ $Tuple2(actions, true)
738713 case nextPoolStr: String =>
739714 $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true)
740715 case _ =>
741716 throw("Match error")
742717 }
743718 else throw("Strict value is not equal to itself.")
744719 }
745720 else throw("Strict value is not equal to itself.")
746721 case _ =>
747722 throw("Match error")
748723 }
749724 }
750725 else throwErr("finalization is broken")
751726 }
752727
753728
754729
755730 @Callable(i)
756731 func finalizeWrapper (counter) = {
757- let votingEmissionRateContract = addressFromStringValue(getStringValue(this, keyVotingEmissionRateContract))
758732 let result = {
759733 let @ = invoke(this, "finalizeHelper", nil, nil)
760734 if ($isInstanceOf(@, "Boolean"))
761735 then @
762736 else throw(($getType(@) + " couldn't be cast to Boolean"))
763737 }
764738 if ((result == result))
765739 then if (!(result))
766740 then if ((counter == 0))
767741 then throwErr("Current voting is not over yet")
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- }
742+ else $Tuple2(nil, unit)
774743 else {
775744 let maxDepth = valueOrElse(getInteger(this, keyMaxDepth), maxDepthDefault)
776745 if ((maxDepth > counter))
777746 then {
778747 let inv = invoke(this, "finalizeWrapper", [(counter + 1)], nil)
779748 if ((inv == inv))
780749 then $Tuple2(nil, unit)
781750 else throw("Strict value is not equal to itself.")
782751 }
783752 else $Tuple2(nil, unit)
784753 }
785754 else throw("Strict value is not equal to itself.")
786755 }
787756
788757
789758
790759 @Callable(i)
791760 func finalize () = {
792761 let inv = invoke(this, "finalizeWrapper", [0], nil)
793762 if ((inv == inv))
794763 then $Tuple2(nil, unit)
795764 else throw("Strict value is not equal to itself.")
796765 }
797766
798767
799768
800769 @Callable(i)
801770 func containsNodeREADONLY (listName,id) = $Tuple2(nil, containsNode(listName, id))
802771
803772
804773
805774 @Callable(i)
806775 func insertNode (listName,id) = {
807776 let checkCaller = mustManager(i)
808777 if ((checkCaller == checkCaller))
809778 then $Tuple2(insertNodeActions(listName, id), unit)
810779 else throw("Strict value is not equal to itself.")
811780 }
812781
813782
814783
815784 @Callable(i)
816785 func deleteNode (listName,id) = {
817786 let checkCaller = mustManager(i)
818787 if ((checkCaller == checkCaller))
819788 then $Tuple2(deleteNodeActions(listName, id), unit)
820789 else throw("Strict value is not equal to itself.")
821790 }
822791
823792
824793
825794 @Callable(i)
826795 func isFinalizationInProgress () = {
827796 let finalizationStageOrUnit = getInteger(this, keyFinalizationStage)
828797 let finalizationInProgress = (finalizationStageOrUnit != unit)
829798 $Tuple2(nil, finalizationInProgress)
830799 }
831800
832801
833802 @Verifier(tx)
834803 func verify () = {
835804 let targetPublicKey = match managerPublicKeyOrUnit() {
836805 case pk: ByteVector =>
837806 pk
838807 case _: Unit =>
839808 tx.senderPublicKey
840809 case _ =>
841810 throw("Match error")
842811 }
843812 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
844813 }
845814

github/deemru/w8io/026f985 
81.54 ms