tx · AvWs3riEyaiksSpfXbSPf7KrQHhacfsxUpmXji25PZN1

3N9Zi6AcWcGbM23jQJ4fnzFsoHoTsxYDznr:  -0.02200000 Waves

2023.05.19 15:30 [2584845] smart account 3N9Zi6AcWcGbM23jQJ4fnzFsoHoTsxYDznr > SELF 0.00000000 Waves

{ "type": 13, "id": "AvWs3riEyaiksSpfXbSPf7KrQHhacfsxUpmXji25PZN1", "fee": 2200000, "feeAssetId": null, "timestamp": 1684499488580, "version": 2, "chainId": 84, "sender": "3N9Zi6AcWcGbM23jQJ4fnzFsoHoTsxYDznr", "senderPublicKey": "GFbasS3jufhZkK4xR7tdTjjnP8K33KvJFEDHRtxXDkaJ", "proofs": [ "4he3jtPYkEmXCdsyWehBMM3bJJj4okWxp7yMBSTwXX4351VexuGAaBApWmSS8g7tTh1KqEiXETYugD7cLjrUu6Nb" ], "script": "base64:BgKXFQgCEgQKAggBEgcKBQgICAgBEgQKAggIEgUKAwgIARIECgIICBIDCgEBEgMKAQESBAoCCAgSBAoCCAQSABIDCgEBEgASBAoCCAgSBAoCCAgSBAoCCAgSACIJc2VwYXJhdG9yIg5wb29sV2VpZ2h0TXVsdCIPbWF4RGVwdGhEZWZhdWx0IhZmaW5hbGl6YXRpb25TdGFnZVRvdGFsIhdmaW5hbGl6YXRpb25TdGFnZVNoYXJlcyIOa2V5RXBvY2hMZW5ndGgiEWtleUVwb2NoTGVuZ3RoTmV3IhVrZXlFcG9jaExlbmd0aEJ5RXBvY2giBWVwb2NoIg9rZXlDdXJyZW50RXBvY2giC2tleU1heERlcHRoIiJrZXlWb3RpbmdFbWlzc2lvbkNhbmRpZGF0ZUNvbnRyYWN0IhJrZXlGYWN0b3J5Q29udHJhY3QiE2tleUJvb3N0aW5nQ29udHJhY3QiEmtleVN0YWtpbmdDb250cmFjdCIUa2V5RmluYWxpemF0aW9uU3RhZ2UiC2tleU5leHRQb29sIgtrZXlOZXh0VXNlciIOa2V5U3RhcnRIZWlnaHQiEWtleUN1cnJlbn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URPTkxZAgJheQJhQwkAlAoCBQNuaWwJAQJhRQIFAmF5BQJhQwJhVAEKaW5zZXJ0Tm9kZQICYXkCYUMEAmJ6CQECYVYBBQJhVAMJAAACBQJiegUCYnoJAJQKAgkBAmFJAgUCYXkFAmFDBQR1bml0CQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAmFUAQpkZWxldGVOb2RlAgJheQJhQwQCYnoJAQJhVgEFAmFUAwkAAAIFAmJ6BQJiegkAlAoCCQECYUwCBQJheQUCYUMFBHVuaXQJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4CYVQBGGlzRmluYWxpemF0aW9uSW5Qcm9ncmVzcwAEAmJsCQCaCAIFBHRoaXMFAXAEAmNwCQECIT0CBQJibAUEdW5pdAkAlAoCBQNuaWwFAmNwAQJjcQECY3IABAJjcwQBWAkBAmFRAAMJAAECBQFYAgpCeXRlVmVjdG9yBAJhVQUBWAUCYVUDCQABAgUBWAIEVW5pdAgFAmNxD3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yCQD0AwMIBQJjcQlib2R5Qnl0ZXMJAJEDAggFAmNxBnByb29mcwAABQJjcx07sug=", "height": 2584845, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HjGqyxJs9QCdAWgkxTxzhgJ6CdBn6LedTwjXjm6Neh4t Next: 5mdwckWoBuwHGxXrUXHeYhvZFyg7PfnXgoE6CtGxbTWw Diff:
OldNewDifferences
140140 }
141141
142142
143-let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
144-
145-let IdxFactoryCfgGwxRewardDapp = 10
146-
147-func keyFactoryCfg () = "%s__factoryConfig"
148-
149-
150-func readFactoryCfgOrFail (factory) = split(getStrOrFail(factory, keyFactoryCfg()), separator)
151-
152-
153-func getGwxRewardAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgGwxRewardDapp])
154-
155-
156143 func getLpAssetByPoolAssets (amountAssetId,priceAssetId) = {
157144 func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
158145
160147
161148 func keyMappingPoolContractToLPAsset (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
162149
150+ let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
163151 let amountAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amountAssetId))
164152 let priceAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAssetId))
165153 let poolContractAddress = getStrOrFail(factoryContract, keyMappingPoolAssetsToPoolContractAddress(amountAssetInternalId, priceAssetInternalId))
169157
170158
171159 func checkWxEmissionPoolLabel (pool) = {
172- let $t054705510 = pool
173- let amountAssetId = $t054705510._1
174- let priceAssetId = $t054705510._2
160+ let $t051685208 = pool
161+ let amountAssetId = $t051685208._1
162+ let priceAssetId = $t051685208._2
163+ let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
175164 let @ = invoke(factoryContract, "checkWxEmissionPoolLabel", [amountAssetId, priceAssetId], nil)
176165 if ($isInstanceOf(@, "Boolean"))
177166 then @
179168 }
180169
181170
182-func gwxRewardDeposit () = {
183- let factoryCfg = readFactoryCfgOrFail(factoryContract)
184- let gwxRewardsContract = getGwxRewardAddressOrFail(factoryCfg)
185- invoke(gwxRewardsContract, "deposit", nil, nil)
186- }
187-
188-
189171 let poolsListName = "pools"
190172
191173 func getVotesListName (pool) = {
192- let $t059275967 = pool
193- let amountAssetId = $t059275967._1
194- let priceAssetId = $t059275967._2
174+ let $t055095549 = pool
175+ let amountAssetId = $t055095549._1
176+ let priceAssetId = $t055095549._2
195177 makeString(["votes", amountAssetId, priceAssetId], separator)
196178 }
197179
502484 if ((checkTargetEpoch == checkTargetEpoch))
503485 then {
504486 let pool = stringToPool(poolStr)
505- let $t01797018010 = pool
506- let amountAssetId = $t01797018010._1
507- let priceAssetId = $t01797018010._2
487+ let $t01755217592 = pool
488+ let amountAssetId = $t01755217592._1
489+ let priceAssetId = $t01755217592._2
508490 let wxEmission = checkWxEmissionPoolLabel(pool)
509491 let gwxAmountAtEndTotal = {
510492 let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeight], nil)
563545 if ((checkTargetEpoch == checkTargetEpoch))
564546 then {
565547 let pool = stringToPool(poolStr)
566- let $t02036720407 = pool
567- let amountAssetId = $t02036720407._1
568- let priceAssetId = $t02036720407._2
548+ let $t01994919989 = pool
549+ let amountAssetId = $t01994919989._1
550+ let priceAssetId = $t01994919989._2
569551 let stakingContract = addressFromStringValue(getStrOrFail(this, keyStakingContract))
552+ let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
570553 let lpAssetId = getLpAssetByPoolAssets(amountAssetId, priceAssetId)
571554 let r = {
572555 let @ = invoke(stakingContract, "usersListTraversal", [lpAssetId], nil)
702685 let actions = if (force)
703686 then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced)]
704687 else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight)]
705- let gwxRewardDepositInv = gwxRewardDeposit()
706- if ((gwxRewardDepositInv == gwxRewardDepositInv))
707- then $Tuple2(actions, true)
708- else throw("Strict value is not equal to itself.")
688+ $Tuple2(actions, true)
709689 case nextPoolStr: String =>
710690 $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true)
711691 case _ =>
729709 let actions = if (force)
730710 then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced), DeleteEntry(keyNextPool)]
731711 else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight), DeleteEntry(keyNextPool)]
732- let gwxRewardDepositInv = gwxRewardDeposit()
733- if ((gwxRewardDepositInv == gwxRewardDepositInv))
734- then $Tuple2(actions, true)
735- else throw("Strict value is not equal to itself.")
712+ $Tuple2(actions, true)
736713 case nextPoolStr: String =>
737714 $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true)
738715 case _ =>
813790 }
814791
815792
793+
794+@Callable(i)
795+func isFinalizationInProgress () = {
796+ let finalizationStageOrUnit = getInteger(this, keyFinalizationStage)
797+ let finalizationInProgress = (finalizationStageOrUnit != unit)
798+ $Tuple2(nil, finalizationInProgress)
799+ }
800+
801+
816802 @Verifier(tx)
817803 func verify () = {
818804 let targetPublicKey = match managerPublicKeyOrUnit() {
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)
2626
2727 let keyFactoryContract = makeString(["%s", "factoryContract"], separator)
2828
2929 let keyBoostingContract = makeString(["%s", "boostingContract"], separator)
3030
3131 let keyStakingContract = makeString(["%s", "stakingContract"], separator)
3232
3333 let keyFinalizationStage = makeString(["%s", "finalizationStage"], separator)
3434
3535 let keyNextPool = makeString(["%s", "nextPool"], separator)
3636
3737 let keyNextUser = makeString(["%s", "nextUser"], separator)
3838
3939 let keyStartHeight = makeString(["%s", "startHeight"], separator)
4040
4141 let keyCurrentEpochUi = makeString(["%s", "currentEpochUi"], separator)
4242
4343 let keyStartHeightUi = makeString(["%s", "startHeightUi"], separator)
4444
4545 let keyFinalizationShouldBeForced = makeString(["%s", "force"], separator)
4646
4747 func keyStartHeightByEpoch (epoch) = makeString(["%s%d", "startHeight", toString(epoch)], separator)
4848
4949
5050 func keyFinalized (epoch) = makeString(["%s%d", "finalized", toString(epoch)], separator)
5151
5252
5353 func keyInList (pool) = {
5454 let $t016931733 = pool
5555 let amountAssetId = $t016931733._1
5656 let priceAssetId = $t016931733._2
5757 makeString(["%s%s%s", "inList", amountAssetId, priceAssetId], separator)
5858 }
5959
6060
6161 func keyUsed (address,epoch) = makeString(["%s%s%d", "used", toString(address), toString(epoch)], separator)
6262
6363
6464 func keyVote (pool,address,epoch) = {
6565 let $t020072047 = pool
6666 let amountAssetId = $t020072047._1
6767 let priceAssetId = $t020072047._2
6868 makeString(["%s%s%s%s%d", "vote", amountAssetId, priceAssetId, toString(address), toString(epoch)], separator)
6969 }
7070
7171
7272 func keyVotingResult (pool,epoch) = {
7373 let $t022292269 = pool
7474 let amountAssetId = $t022292269._1
7575 let priceAssetId = $t022292269._2
7676 makeString(["%s%s%s%d", "votingResult", amountAssetId, priceAssetId, toString(epoch)], separator)
7777 }
7878
7979
8080 func keyVotingResultStaked (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStaked", lpAssetIdStr, toString(epoch)], separator)
8181
8282
8383 func keyPoolShare (pool,epoch) = {
8484 let $t025902630 = pool
8585 let amountAssetId = $t025902630._1
8686 let priceAssetId = $t025902630._2
8787 makeString(["%s%s%s%d", "poolShare", amountAssetId, priceAssetId, toString(epoch)], separator)
8888 }
8989
9090
9191 func keyTotalVotes (epoch) = makeString(["%s%d", "totalVotes", toString(epoch)], separator)
9292
9393
9494 func keyStakedByUser (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s", "staked", userAddressStr, lpAssetIdStr], separator)
9595
9696
9797 func wrapErr (msg) = makeString(["voting_emission.ride:", msg], " ")
9898
9999
100100 func throwErr (msg) = throw(wrapErr(msg))
101101
102102
103103 func getValueOrFail (address,key,type) = {
104104 let error = wrapErr(makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
105105 valueOrErrorMessage( match type {
106106 case str: String =>
107107 getString(address, key)
108108 case int: Int =>
109109 getInteger(address, key)
110110 case _ =>
111111 throwErr("invalid entry type")
112112 }, error)
113113 }
114114
115115
116116 func getStrOrFail (address,key) = {
117117 let @ = getValueOrFail(address, key, "")
118118 if ($isInstanceOf(@, "String"))
119119 then @
120120 else throw(($getType(@) + " couldn't be cast to String"))
121121 }
122122
123123
124124 func getIntOrFail (address,key) = {
125125 let @ = getValueOrFail(address, key, 0)
126126 if ($isInstanceOf(@, "Int"))
127127 then @
128128 else throw(($getType(@) + " couldn't be cast to Int"))
129129 }
130130
131131
132132 func poolToString (pool) = ((pool._1 + separator) + pool._2)
133133
134134
135135 func stringToPool (str) = {
136136 let parts = split(str, separator)
137137 if ((size(parts) == 2))
138138 then $Tuple2(parts[0], parts[1])
139139 else throwErr("invalid pool string")
140140 }
141141
142142
143-let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
144-
145-let IdxFactoryCfgGwxRewardDapp = 10
146-
147-func keyFactoryCfg () = "%s__factoryConfig"
148-
149-
150-func readFactoryCfgOrFail (factory) = split(getStrOrFail(factory, keyFactoryCfg()), separator)
151-
152-
153-func getGwxRewardAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgGwxRewardDapp])
154-
155-
156143 func getLpAssetByPoolAssets (amountAssetId,priceAssetId) = {
157144 func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
158145
159146 func keyMappingPoolAssetsToPoolContractAddress (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + toString(internalAmountAssetIdStr)) + "__") + toString(internalPriceAssetIdStr)) + "__mappings__poolAssets2PoolContract")
160147
161148 func keyMappingPoolContractToLPAsset (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
162149
150+ let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
163151 let amountAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amountAssetId))
164152 let priceAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAssetId))
165153 let poolContractAddress = getStrOrFail(factoryContract, keyMappingPoolAssetsToPoolContractAddress(amountAssetInternalId, priceAssetInternalId))
166154 let lpAssetId = getStrOrFail(factoryContract, keyMappingPoolContractToLPAsset(poolContractAddress))
167155 lpAssetId
168156 }
169157
170158
171159 func checkWxEmissionPoolLabel (pool) = {
172- let $t054705510 = pool
173- let amountAssetId = $t054705510._1
174- let priceAssetId = $t054705510._2
160+ let $t051685208 = pool
161+ let amountAssetId = $t051685208._1
162+ let priceAssetId = $t051685208._2
163+ let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
175164 let @ = invoke(factoryContract, "checkWxEmissionPoolLabel", [amountAssetId, priceAssetId], nil)
176165 if ($isInstanceOf(@, "Boolean"))
177166 then @
178167 else throw(($getType(@) + " couldn't be cast to Boolean"))
179168 }
180169
181170
182-func gwxRewardDeposit () = {
183- let factoryCfg = readFactoryCfgOrFail(factoryContract)
184- let gwxRewardsContract = getGwxRewardAddressOrFail(factoryCfg)
185- invoke(gwxRewardsContract, "deposit", nil, nil)
186- }
187-
188-
189171 let poolsListName = "pools"
190172
191173 func getVotesListName (pool) = {
192- let $t059275967 = pool
193- let amountAssetId = $t059275967._1
194- let priceAssetId = $t059275967._2
174+ let $t055095549 = pool
175+ let amountAssetId = $t055095549._1
176+ let priceAssetId = $t055095549._2
195177 makeString(["votes", amountAssetId, priceAssetId], separator)
196178 }
197179
198180
199181 func keyListHead (listName) = {
200182 let meta = if ((listName == poolsListName))
201183 then "%s%s"
202184 else "%s%s%s%s"
203185 makeString([meta, listName, "head"], separator)
204186 }
205187
206188
207189 func keyListSize (listName) = {
208190 let meta = if ((listName == poolsListName))
209191 then "%s%s"
210192 else "%s%s%s%s"
211193 makeString([meta, listName, "size"], separator)
212194 }
213195
214196
215197 func keyListPrev (listName,id) = {
216198 let meta = if ((listName == poolsListName))
217199 then "%s%s%s%s"
218200 else "%s%s%s%s%s"
219201 makeString([meta, listName, id, "prev"], separator)
220202 }
221203
222204
223205 func keyListNext (listName,id) = {
224206 let meta = if ((listName == poolsListName))
225207 then "%s%s%s%s"
226208 else "%s%s%s%s%s"
227209 makeString([meta, listName, id, "next"], separator)
228210 }
229211
230212
231213 func containsNode (listName,id) = {
232214 let headOrUnit = getString(this, keyListHead(listName))
233215 let prevOrUnit = getString(this, keyListPrev(listName, id))
234216 let nextOrUnit = getString(this, keyListNext(listName, id))
235217 if (if ((id == valueOrElse(headOrUnit, "")))
236218 then true
237219 else (prevOrUnit != unit))
238220 then true
239221 else (nextOrUnit != unit)
240222 }
241223
242224
243225 func insertNodeActions (listName,id) = {
244226 let headOrUnit = getString(this, keyListHead(listName))
245227 let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
246228 let checkNode = if (!(containsNode(listName, id)))
247229 then true
248230 else throwErr("Node exists")
249231 if ((checkNode == checkNode))
250232 then (([IntegerEntry(keyListSize(listName), (listSize + 1))] ++ (if ((headOrUnit != unit))
251233 then [StringEntry(keyListNext(listName, id), value(headOrUnit)), StringEntry(keyListPrev(listName, value(headOrUnit)), id)]
252234 else nil)) ++ [StringEntry(keyListHead(listName), id)])
253235 else throw("Strict value is not equal to itself.")
254236 }
255237
256238
257239 func deleteNodeActions (listName,id) = {
258240 let headOrUnit = getString(this, keyListHead(listName))
259241 let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
260242 let prevOrUnit = getString(this, keyListPrev(listName, id))
261243 let nextOrUnit = getString(this, keyListNext(listName, id))
262244 ([IntegerEntry(keyListSize(listName), (listSize - 1))] ++ (if (if ((prevOrUnit != unit))
263245 then (nextOrUnit != unit)
264246 else false)
265247 then [StringEntry(keyListNext(listName, value(prevOrUnit)), value(nextOrUnit)), StringEntry(keyListPrev(listName, value(nextOrUnit)), value(prevOrUnit)), DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, id))]
266248 else if ((nextOrUnit != unit))
267249 then [StringEntry(keyListHead(listName), value(nextOrUnit)), DeleteEntry(keyListNext(listName, id)), DeleteEntry(keyListPrev(listName, value(nextOrUnit)))]
268250 else if ((prevOrUnit != unit))
269251 then [DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, value(prevOrUnit)))]
270252 else if ((id == valueOrElse(headOrUnit, "")))
271253 then [DeleteEntry(keyListHead(listName))]
272254 else throwErr(((("invalid node: " + listName) + ".") + id))))
273255 }
274256
275257
276258 func keyManagerVaultAddress () = "%s__managerVaultAddress"
277259
278260
279261 func keyManagerPublicKey () = "%s__managerPublicKey"
280262
281263
282264 func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) {
283265 case s: String =>
284266 addressFromStringValue(s)
285267 case _ =>
286268 this
287269 }
288270
289271
290272 func managerPublicKeyOrUnit () = {
291273 let managerVaultAddress = getManagerVaultAddressOrThis()
292274 match getString(managerVaultAddress, keyManagerPublicKey()) {
293275 case s: String =>
294276 fromBase58String(s)
295277 case _: Unit =>
296278 unit
297279 case _ =>
298280 throw("Match error")
299281 }
300282 }
301283
302284
303285 func isManager (i) = match managerPublicKeyOrUnit() {
304286 case pk: ByteVector =>
305287 (i.callerPublicKey == pk)
306288 case _: Unit =>
307289 (i.caller == this)
308290 case _ =>
309291 throw("Match error")
310292 }
311293
312294
313295 func mustManager (i) = if (isManager(i))
314296 then true
315297 else throw("permission denied")
316298
317299
318300 func mustThis (i) = if ((i.caller == this))
319301 then true
320302 else throw("permission denied")
321303
322304
323305 @Callable(i)
324306 func getUserGwxAmountAtHeight (userAddress,targetHeight) = {
325307 let boostingContractAddress = valueOrErrorMessage(addressFromString(getStrOrFail(this, keyBoostingContract)), wrapErr("invalid boosting contract address"))
326308 $Tuple2(nil, {
327309 let @ = invoke(boostingContractAddress, "getUserGwxAmountAtHeightREADONLY", [userAddress, targetHeight], nil)
328310 if ($isInstanceOf(@, "Int"))
329311 then @
330312 else throw(($getType(@) + " couldn't be cast to Int"))
331313 })
332314 }
333315
334316
335317
336318 @Callable(i)
337319 func constructor (factoryContract,votingEmissionCandidateContract,boostingContract,stakingContract,epochLength) = {
338320 let checks = [mustManager(i), if ((addressFromString(factoryContract) != unit))
339321 then true
340322 else "invalid factory contract address", if ((addressFromString(votingEmissionCandidateContract) != unit))
341323 then true
342324 else "invalid voting emission candidate contract address", if ((addressFromString(boostingContract) != unit))
343325 then true
344326 else "invalid boosting contract address", if ((addressFromString(stakingContract) != unit))
345327 then true
346328 else "invalid staking contract address", if ((epochLength > 0))
347329 then true
348330 else throwErr("invalid epoch length")]
349331 if ((checks == checks))
350332 then $Tuple2([StringEntry(keyFactoryContract, factoryContract), StringEntry(keyVotingEmissionCandidateContract, votingEmissionCandidateContract), StringEntry(keyBoostingContract, boostingContract), StringEntry(keyStakingContract, stakingContract), IntegerEntry(keyEpochLength, epochLength)], unit)
351333 else throw("Strict value is not equal to itself.")
352334 }
353335
354336
355337
356338 @Callable(i)
357339 func create (amountAssetId,priceAssetId) = {
358340 let checks = [if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionCandidateContract), "")))
359341 then true
360342 else mustManager(i)]
361343 if ((checks == checks))
362344 then {
363345 let pool = $Tuple2(amountAssetId, priceAssetId)
364346 let inListActions = ([BooleanEntry(keyInList(pool), true)] ++ insertNodeActions(poolsListName, poolToString(pool)))
365347 let currentEpochIsNotDefined = (getInteger(this, keyCurrentEpoch) == unit)
366348 let startHeightActions = if (currentEpochIsNotDefined)
367349 then {
368350 let epoch = 0
369351 [IntegerEntry(keyCurrentEpoch, epoch), IntegerEntry(keyStartHeightByEpoch(epoch), height), IntegerEntry(keyStartHeight, height), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, height)]
370352 }
371353 else nil
372354 $Tuple2((inListActions ++ startHeightActions), unit)
373355 }
374356 else throw("Strict value is not equal to itself.")
375357 }
376358
377359
378360
379361 @Callable(i)
380362 func vote (amountAssetId,priceAssetId,amount) = {
381363 let pool = $Tuple2(amountAssetId, priceAssetId)
382364 let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0)
383365 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
384366 let epochLength = getIntOrFail(this, keyEpochLength)
385367 let endHeight = (startHeight + epochLength)
386368 let finalizationStageOrUnit = getInteger(this, keyFinalizationStage)
387369 let used = valueOrElse(getInteger(this, keyUsed(i.caller, epoch)), 0)
388370 let vote = valueOrElse(getInteger(this, keyVote(pool, i.caller, epoch)), 0)
389371 let poolResult = valueOrElse(getInteger(this, keyVotingResult(pool, epoch)), 0)
390372 let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(epoch)), 0)
391373 let gwxAmountAtEndTotal = {
392374 let @ = invoke(this, "getUserGwxAmountAtHeight", [toBase58String(i.caller.bytes), endHeight], nil)
393375 if ($isInstanceOf(@, "Int"))
394376 then @
395377 else throw(($getType(@) + " couldn't be cast to Int"))
396378 }
397379 let available = (gwxAmountAtEndTotal - used)
398380 let newVote = (vote + amount)
399381 let wxEmission = checkWxEmissionPoolLabel(pool)
400382 let checks = [if ((getBoolean(keyInList(pool)) != unit))
401383 then true
402384 else throwErr("invalid assets"), if ((endHeight > height))
403385 then true
404386 else throwErr("invalid height"), if ((finalizationStageOrUnit == unit))
405387 then true
406388 else throwErr("finalization in progress"), if ((gwxAmountAtEndTotal > 0))
407389 then true
408390 else throwErr("you do not have gWX"), if (if ((amount > 0))
409391 then (available >= amount)
410392 else false)
411393 then true
412394 else throwErr("invalid amount"), if (wxEmission)
413395 then true
414396 else throwErr("pool hasn't WX_EMISSION label")]
415397 if ((checks == checks))
416398 then {
417399 let votesListName = getVotesListName(pool)
418400 let userAddressStr = toString(i.caller)
419401 let votesListActions = if (containsNode(votesListName, userAddressStr))
420402 then nil
421403 else insertNodeActions(votesListName, userAddressStr)
422404 $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)
423405 }
424406 else throw("Strict value is not equal to itself.")
425407 }
426408
427409
428410
429411 @Callable(i)
430412 func cancelVote (amountAssetId,priceAssetId) = {
431413 let pool = $Tuple2(amountAssetId, priceAssetId)
432414 let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0)
433415 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
434416 let epochLength = getIntOrFail(this, keyEpochLength)
435417 let endHeight = (startHeight + epochLength)
436418 let finalizationStageOrUnit = getInteger(this, keyFinalizationStage)
437419 let used = valueOrElse(getInteger(this, keyUsed(i.caller, epoch)), 0)
438420 let vote = valueOrElse(getInteger(this, keyVote(pool, i.caller, epoch)), 0)
439421 let poolResult = valueOrElse(getInteger(this, keyVotingResult(pool, epoch)), 0)
440422 let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(epoch)), 0)
441423 let checks = [if ((getBoolean(keyInList(pool)) != unit))
442424 then true
443425 else throwErr("invalid assets"), if ((endHeight > height))
444426 then true
445427 else throwErr("invalid height"), if ((finalizationStageOrUnit == unit))
446428 then true
447429 else throwErr("finalization in progress"), if ((vote > 0))
448430 then true
449431 else throwErr("no vote")]
450432 if ((checks == checks))
451433 then {
452434 let votesListName = getVotesListName(pool)
453435 let userAddressStr = toString(i.caller)
454436 $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)
455437 }
456438 else throw("Strict value is not equal to itself.")
457439 }
458440
459441
460442
461443 @Callable(i)
462444 func setEpochLength (newEpochLength) = {
463445 let checks = [mustManager(i), if ((newEpochLength > 0))
464446 then true
465447 else throwErr("invalid epoch length")]
466448 if ((checks == checks))
467449 then $Tuple2([IntegerEntry(keyEpochLengthNew, newEpochLength)], unit)
468450 else throw("Strict value is not equal to itself.")
469451 }
470452
471453
472454
473455 @Callable(i)
474456 func setMaxDepth (newMaxDepth) = {
475457 let checks = [mustManager(i), if ((newMaxDepth > 0))
476458 then true
477459 else throwErr("invalid max depth")]
478460 if ((checks == checks))
479461 then $Tuple2([IntegerEntry(keyMaxDepth, newMaxDepth)], unit)
480462 else throw("Strict value is not equal to itself.")
481463 }
482464
483465
484466
485467 @Callable(i)
486468 func processVoteINTERNAL (poolStr,userAddressStr) = {
487469 let checkCaller = mustThis(i)
488470 if ((checkCaller == checkCaller))
489471 then {
490472 let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), wrapErr(("processVoteINTERNAL: invalid user address " + userAddressStr)))
491473 let epoch = getIntOrFail(this, keyCurrentEpoch)
492474 let epochPrevious = (epoch - 1)
493475 let epochLength = getIntOrFail(this, keyEpochLength)
494476 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
495477 let endHeight = (startHeight + epochLength)
496478 let startHeightPrevious = getIntOrFail(this, keyStartHeightByEpoch(epochPrevious))
497479 let epochLengthPrevious = getIntOrFail(this, keyEpochLengthByEpoch(epochPrevious))
498480 let endHeightPrevious = (startHeightPrevious + epochLengthPrevious)
499481 let checkTargetEpoch = if ((epochPrevious >= 0))
500482 then true
501483 else throwErr("processVoteINTERNAL: invalid previous epoch")
502484 if ((checkTargetEpoch == checkTargetEpoch))
503485 then {
504486 let pool = stringToPool(poolStr)
505- let $t01797018010 = pool
506- let amountAssetId = $t01797018010._1
507- let priceAssetId = $t01797018010._2
487+ let $t01755217592 = pool
488+ let amountAssetId = $t01755217592._1
489+ let priceAssetId = $t01755217592._2
508490 let wxEmission = checkWxEmissionPoolLabel(pool)
509491 let gwxAmountAtEndTotal = {
510492 let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeight], nil)
511493 if ($isInstanceOf(@, "Int"))
512494 then @
513495 else throw(($getType(@) + " couldn't be cast to Int"))
514496 }
515497 let gwxAmountAtEndTotalPrevious = {
516498 let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeightPrevious], nil)
517499 if ($isInstanceOf(@, "Int"))
518500 then @
519501 else throw(($getType(@) + " couldn't be cast to Int"))
520502 }
521503 let totalVotes = valueOrElse(getInteger(keyTotalVotes(epoch)), 0)
522504 let votingResult = valueOrElse(getInteger(keyVotingResult(pool, epoch)), 0)
523505 let votePrevious = valueOrErrorMessage(getInteger(keyVote(pool, userAddress, epochPrevious)), wrapErr((((("processVoteINTERNAL " + poolStr) + " ") + userAddressStr) + ": no previous vote")))
524506 let used = valueOrElse(getInteger(this, keyUsed(userAddress, epoch)), 0)
525507 let lpAssetIdStr = getLpAssetByPoolAssets(amountAssetId, priceAssetId)
526508 let votingResultStakedPrevious = valueOrElse(getInteger(keyVotingResultStaked(lpAssetIdStr, epochPrevious)), 0)
527509 let stakingContract = addressFromStringValue(getStrOrFail(this, keyStakingContract))
528510 let stakedByUser = valueOrElse(getInteger(stakingContract, keyStakedByUser(lpAssetIdStr, userAddressStr)), 0)
529511 let votingResultStakedActions = if ((stakedByUser == 0))
530512 then nil
531513 else [IntegerEntry(keyVotingResultStaked(lpAssetIdStr, epochPrevious), (votingResultStakedPrevious + votePrevious))]
532514 let newVote = if ((gwxAmountAtEndTotalPrevious > 0))
533515 then fraction(votePrevious, gwxAmountAtEndTotal, gwxAmountAtEndTotalPrevious)
534516 else 0
535517 let actions = if (if ((newVote > 0))
536518 then wxEmission
537519 else false)
538520 then [IntegerEntry(keyVote(pool, userAddress, epoch), newVote), IntegerEntry(keyTotalVotes(epoch), (totalVotes + newVote)), IntegerEntry(keyVotingResult(pool, epoch), (votingResult + newVote)), IntegerEntry(keyUsed(userAddress, epoch), (used + newVote))]
539521 else deleteNodeActions(getVotesListName(pool), userAddressStr)
540522 $Tuple2((actions ++ votingResultStakedActions), unit)
541523 }
542524 else throw("Strict value is not equal to itself.")
543525 }
544526 else throw("Strict value is not equal to itself.")
545527 }
546528
547529
548530
549531 @Callable(i)
550532 func processPoolINTERNAL (poolStr,force) = {
551533 let checkCaller = mustThis(i)
552534 if ((checkCaller == checkCaller))
553535 then {
554536 let targetEpoch = {
555537 let currentEpoch = getIntOrFail(this, keyCurrentEpoch)
556538 if (force)
557539 then currentEpoch
558540 else (currentEpoch - 1)
559541 }
560542 let checkTargetEpoch = if ((targetEpoch >= 0))
561543 then true
562544 else throwErr("processPoolINTERNAL: invalid target epoch")
563545 if ((checkTargetEpoch == checkTargetEpoch))
564546 then {
565547 let pool = stringToPool(poolStr)
566- let $t02036720407 = pool
567- let amountAssetId = $t02036720407._1
568- let priceAssetId = $t02036720407._2
548+ let $t01994919989 = pool
549+ let amountAssetId = $t01994919989._1
550+ let priceAssetId = $t01994919989._2
569551 let stakingContract = addressFromStringValue(getStrOrFail(this, keyStakingContract))
552+ let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
570553 let lpAssetId = getLpAssetByPoolAssets(amountAssetId, priceAssetId)
571554 let r = {
572555 let @ = invoke(stakingContract, "usersListTraversal", [lpAssetId], nil)
573556 if ($isInstanceOf(@, "Boolean"))
574557 then @
575558 else throw(($getType(@) + " couldn't be cast to Boolean"))
576559 }
577560 if ((r == r))
578561 then if (r)
579562 then $Tuple2(nil, true)
580563 else {
581564 let wxEmission = checkWxEmissionPoolLabel(pool)
582565 let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(targetEpoch)), 0)
583566 let votingResult = valueOrElse(getInteger(this, keyVotingResult(pool, targetEpoch)), 0)
584567 let share = if (if ((totalVotes == 0))
585568 then true
586569 else !(wxEmission))
587570 then 0
588571 else fraction(votingResult, poolWeightMult, totalVotes)
589572 let modifyWeightInv = invoke(factoryContract, "modifyWeight", [lpAssetId, share], nil)
590573 if ((modifyWeightInv == modifyWeightInv))
591574 then {
592575 let poolsListActions = if (if (wxEmission)
593576 then true
594577 else force)
595578 then nil
596579 else ([DeleteEntry(keyInList(pool))] ++ deleteNodeActions(poolsListName, poolStr))
597580 $Tuple2(([IntegerEntry(keyPoolShare(pool, targetEpoch), share)] ++ poolsListActions), false)
598581 }
599582 else throw("Strict value is not equal to itself.")
600583 }
601584 else throw("Strict value is not equal to itself.")
602585 }
603586 else throw("Strict value is not equal to itself.")
604587 }
605588 else throw("Strict value is not equal to itself.")
606589 }
607590
608591
609592
610593 @Callable(i)
611594 func finalizeHelper () = {
612595 let force = valueOrElse(getBoolean(keyFinalizationShouldBeForced), false)
613596 let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0)
614597 let previousEpoch = (epoch - 1)
615598 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
616599 let epochLength = getIntOrFail(this, keyEpochLength)
617600 let endHeight = (startHeight + epochLength)
618601 let finalizationStageOrUnit = getInteger(this, keyFinalizationStage)
619602 if (if (if ((height >= endHeight))
620603 then (finalizationStageOrUnit == unit)
621604 else false)
622605 then !(force)
623606 else false)
624607 then {
625608 let newEpoch = (epoch + 1)
626609 let newEpochLengthOption = getInteger(this, keyEpochLengthNew)
627610 let newEpochLengthActions = match newEpochLengthOption {
628611 case newEpochLength: Int =>
629612 [IntegerEntry(keyEpochLength, newEpochLength), DeleteEntry(keyEpochLengthNew)]
630613 case _: Unit =>
631614 nil
632615 case _ =>
633616 throw("Match error")
634617 }
635618 $Tuple2(([IntegerEntry(keyStartHeightByEpoch(newEpoch), height), IntegerEntry(keyStartHeight, height), IntegerEntry(keyCurrentEpoch, newEpoch), IntegerEntry(keyFinalizationStage, finalizationStageTotal), IntegerEntry(keyEpochLengthByEpoch(epoch), epochLength)] ++ newEpochLengthActions), true)
636619 }
637620 else if (if (force)
638621 then (finalizationStageOrUnit == unit)
639622 else false)
640623 then $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares)], true)
641624 else if ((finalizationStageOrUnit == unit))
642625 then $Tuple2(nil, false)
643626 else if ((finalizationStageOrUnit == finalizationStageTotal))
644627 then {
645628 let poolOrUnit = getString(keyNextPool)
646629 let userOrUnit = getString(keyNextUser)
647630 match poolOrUnit {
648631 case _: Unit =>
649632 match getString(keyListHead(poolsListName)) {
650633 case _: Unit =>
651634 $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true)
652635 case poolsHeadStr: String =>
653636 $Tuple2([StringEntry(keyNextPool, poolsHeadStr)], true)
654637 case _ =>
655638 throw("Match error")
656639 }
657640 case poolStr: String =>
658641 let pool = stringToPool(poolStr)
659642 let nextUserOrUnit = match userOrUnit {
660643 case _: Unit =>
661644 getString(keyListHead(getVotesListName(pool)))
662645 case user: String =>
663646 let next = getString(keyListNext(getVotesListName(pool), user))
664647 if ((next == next))
665648 then {
666649 let processVoteInv = invoke(this, "processVoteINTERNAL", [poolStr, user], nil)
667650 if ((processVoteInv == processVoteInv))
668651 then next
669652 else throw("Strict value is not equal to itself.")
670653 }
671654 else throw("Strict value is not equal to itself.")
672655 case _ =>
673656 throw("Match error")
674657 }
675658 match nextUserOrUnit {
676659 case _: Unit =>
677660 let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr))
678661 match nextPoolOrUnit {
679662 case _: Unit =>
680663 $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true)
681664 case s: String =>
682665 $Tuple2([StringEntry(keyNextPool, s), DeleteEntry(keyNextUser)], true)
683666 case _ =>
684667 throw("Match error")
685668 }
686669 case nextUser: String =>
687670 $Tuple2([StringEntry(keyNextUser, nextUser)], true)
688671 case _ =>
689672 throw("Match error")
690673 }
691674 case _ =>
692675 throw("Match error")
693676 }
694677 }
695678 else if ((finalizationStageOrUnit == finalizationStageShares))
696679 then {
697680 let poolOrUnit = getString(keyNextPool)
698681 match poolOrUnit {
699682 case _: Unit =>
700683 match getString(keyListHead(poolsListName)) {
701684 case _: Unit =>
702685 let actions = if (force)
703686 then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced)]
704687 else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight)]
705- let gwxRewardDepositInv = gwxRewardDeposit()
706- if ((gwxRewardDepositInv == gwxRewardDepositInv))
707- then $Tuple2(actions, true)
708- else throw("Strict value is not equal to itself.")
688+ $Tuple2(actions, true)
709689 case nextPoolStr: String =>
710690 $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true)
711691 case _ =>
712692 throw("Match error")
713693 }
714694 case poolStr: String =>
715695 let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr))
716696 if ((nextPoolOrUnit == nextPoolOrUnit))
717697 then {
718698 let r = {
719699 let @ = invoke(this, "processPoolINTERNAL", [poolStr, force], nil)
720700 if ($isInstanceOf(@, "Boolean"))
721701 then @
722702 else throw(($getType(@) + " couldn't be cast to Boolean"))
723703 }
724704 if ((r == r))
725705 then if (r)
726706 then $Tuple2(nil, true)
727707 else match nextPoolOrUnit {
728708 case _: Unit =>
729709 let actions = if (force)
730710 then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced), DeleteEntry(keyNextPool)]
731711 else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight), DeleteEntry(keyNextPool)]
732- let gwxRewardDepositInv = gwxRewardDeposit()
733- if ((gwxRewardDepositInv == gwxRewardDepositInv))
734- then $Tuple2(actions, true)
735- else throw("Strict value is not equal to itself.")
712+ $Tuple2(actions, true)
736713 case nextPoolStr: String =>
737714 $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true)
738715 case _ =>
739716 throw("Match error")
740717 }
741718 else throw("Strict value is not equal to itself.")
742719 }
743720 else throw("Strict value is not equal to itself.")
744721 case _ =>
745722 throw("Match error")
746723 }
747724 }
748725 else throwErr("finalization is broken")
749726 }
750727
751728
752729
753730 @Callable(i)
754731 func finalizeWrapper (counter) = {
755732 let result = {
756733 let @ = invoke(this, "finalizeHelper", nil, nil)
757734 if ($isInstanceOf(@, "Boolean"))
758735 then @
759736 else throw(($getType(@) + " couldn't be cast to Boolean"))
760737 }
761738 if ((result == result))
762739 then if (!(result))
763740 then if ((counter == 0))
764741 then throwErr("Current voting is not over yet")
765742 else $Tuple2(nil, unit)
766743 else {
767744 let maxDepth = valueOrElse(getInteger(this, keyMaxDepth), maxDepthDefault)
768745 if ((maxDepth > counter))
769746 then {
770747 let inv = invoke(this, "finalizeWrapper", [(counter + 1)], nil)
771748 if ((inv == inv))
772749 then $Tuple2(nil, unit)
773750 else throw("Strict value is not equal to itself.")
774751 }
775752 else $Tuple2(nil, unit)
776753 }
777754 else throw("Strict value is not equal to itself.")
778755 }
779756
780757
781758
782759 @Callable(i)
783760 func finalize () = {
784761 let inv = invoke(this, "finalizeWrapper", [0], nil)
785762 if ((inv == inv))
786763 then $Tuple2(nil, unit)
787764 else throw("Strict value is not equal to itself.")
788765 }
789766
790767
791768
792769 @Callable(i)
793770 func containsNodeREADONLY (listName,id) = $Tuple2(nil, containsNode(listName, id))
794771
795772
796773
797774 @Callable(i)
798775 func insertNode (listName,id) = {
799776 let checkCaller = mustManager(i)
800777 if ((checkCaller == checkCaller))
801778 then $Tuple2(insertNodeActions(listName, id), unit)
802779 else throw("Strict value is not equal to itself.")
803780 }
804781
805782
806783
807784 @Callable(i)
808785 func deleteNode (listName,id) = {
809786 let checkCaller = mustManager(i)
810787 if ((checkCaller == checkCaller))
811788 then $Tuple2(deleteNodeActions(listName, id), unit)
812789 else throw("Strict value is not equal to itself.")
813790 }
814791
815792
793+
794+@Callable(i)
795+func isFinalizationInProgress () = {
796+ let finalizationStageOrUnit = getInteger(this, keyFinalizationStage)
797+ let finalizationInProgress = (finalizationStageOrUnit != unit)
798+ $Tuple2(nil, finalizationInProgress)
799+ }
800+
801+
816802 @Verifier(tx)
817803 func verify () = {
818804 let targetPublicKey = match managerPublicKeyOrUnit() {
819805 case pk: ByteVector =>
820806 pk
821807 case _: Unit =>
822808 tx.senderPublicKey
823809 case _ =>
824810 throw("Match error")
825811 }
826812 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
827813 }
828814

github/deemru/w8io/026f985 
83.98 ms