tx · 7dm32yV1cPE9e3ZdD3TSp1K33oSUkK7YTN4DwLjue5mU

3Mp3nG9T5fKGziHW8mcCqx3jMFx3towh3WA:  -0.02300000 Waves

2023.03.14 11:15 [2489456] smart account 3Mp3nG9T5fKGziHW8mcCqx3jMFx3towh3WA > SELF 0.00000000 Waves

{ "type": 13, "id": "7dm32yV1cPE9e3ZdD3TSp1K33oSUkK7YTN4DwLjue5mU", "fee": 2300000, "feeAssetId": null, "timestamp": 1678781737285, "version": 2, "chainId": 84, "sender": "3Mp3nG9T5fKGziHW8mcCqx3jMFx3towh3WA", "senderPublicKey": "D46gQxzmdzdCTYRg6dMcwFoUrc6ZmxF6GKd5ZoTkvzp1", "proofs": [ "22KrXJzBzxRnJNd5hR2WMyzjXPHj3tP37EFCNrth5nkjq9btjDzD8VnzYM5gxcJJo1z7MFu5eiPCkD74TsGh97oZ" ], "script": "base64:BgLEFQgCEgMKAQgSABIECgIIARIHCgUICAgIARIECgIICBIFCgMICAESBAoCCAgSAwoBARIDCgEBEgQKAggIEgQKAggEEgASAwoBARIAEgQKAggIEgQKAggIEgQKAggIIglzZXBhcmF0b3IiDnBvb2xXZWlnaHRNdWx0Ig9tYXhEZXB0aERlZmF1bHQiFmZpbmFsaXphdGlvblN0YWdlVG90YWwiF2ZpbmFsaXphdGlvblN0YWdlU2hhcmVzIg5rZXlFcG9jaExlbmd0aCIRa2V5RXBvY2hMZW5ndGhOZXciFWtleUVwb2NoTGVuZ3RoQnlFcG9jaCIFZXBvY2giD2tleUN1cnJlbnRFcG9jaCILa2V5TWF4RGVwdGgiImtleVZvdGluZ0VtaXNzaW9uQ2FuZGlkYXRlQ29udHJhY3QiEmtleUZhY3RvcnlDb250cmFjdCITa2V5Qm9vc3RpbmdDb250cmFjdCISa2V5U3Rha2luZ0NvbnRyYWN0IhRrZXlGaW5hbGl6YXRpb25TdGFnZSILa2V5TmV4dFBvb2wiC2tleU5leHRVc2VyIg5rZXlTdGFydEhlaWdodCIRa2V5Q3VycmV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GljS2V5CQACAQILTWF0Y2ggZXJyb3IJAPQDAwgFAmN0CWJvZHlCeXRlcwkAkQMCCAUCY3QGcHJvb2ZzAAAFAmN2kCt4wA==", "height": 2489456, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: A4Y8NgoKZAi6bn8LtwQQ2u2MaLzM4gE5GEyU9V4s5CAm Next: 5sxn6MPQ4bXP2paRo5nsofkeoVNTebTgeWMgDgeKC6XH Diff:
OldNewDifferences
7777 }
7878
7979
80+func keyVotingResultStaked (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStaked", lpAssetIdStr, toString(epoch)], separator)
81+
82+
8083 func keyPoolShare (pool,epoch) = {
81- let $t024342474 = pool
82- let amountAssetId = $t024342474._1
83- let priceAssetId = $t024342474._2
84+ let $t025902630 = pool
85+ let amountAssetId = $t025902630._1
86+ let priceAssetId = $t025902630._2
8487 makeString(["%s%s%s%d", "poolShare", amountAssetId, priceAssetId, toString(epoch)], separator)
8588 }
8689
8790
8891 func keyTotalVotes (epoch) = makeString(["%s%d", "totalVotes", toString(epoch)], separator)
92+
93+
94+func keyStakedByUser (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s", "staked", userAddressStr, lpAssetIdStr], separator)
95+
96+
97+func wrapErr (msg) = makeString(["voting_emission.ride:", msg], " ")
98+
99+
100+func throwErr (msg) = throw(wrapErr(msg))
89101
90102
91103 func getValueOrFail (address,key,type) = {
145157
146158
147159 func checkWxEmissionPoolLabel (pool) = {
148- let $t047164756 = pool
149- let amountAssetId = $t047164756._1
150- let priceAssetId = $t047164756._2
160+ let $t051525192 = pool
161+ let amountAssetId = $t051525192._1
162+ let priceAssetId = $t051525192._2
151163 let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
152164 let @ = invoke(factoryContract, "checkWxEmissionPoolLabel", [amountAssetId, priceAssetId], nil)
153165 if ($isInstanceOf(@, "Boolean"))
159171 let poolsListName = "pools"
160172
161173 func getVotesListName (pool) = {
162- let $t050575097 = pool
163- let amountAssetId = $t050575097._1
164- let priceAssetId = $t050575097._2
174+ let $t054935533 = pool
175+ let amountAssetId = $t054935533._1
176+ let priceAssetId = $t054935533._2
165177 makeString(["votes", amountAssetId, priceAssetId], separator)
166178 }
167179
505517 if ((checkTargetEpoch == checkTargetEpoch))
506518 then {
507519 let pool = stringToPool(poolStr)
508- let $t01754817588 = pool
509- let amountAssetId = $t01754817588._1
510- let priceAssetId = $t01754817588._2
520+ let $t01798418024 = pool
521+ let amountAssetId = $t01798418024._1
522+ let priceAssetId = $t01798418024._2
511523 let wxEmission = checkWxEmissionPoolLabel(pool)
512524 let gwxAmountAtEndTotal = {
513525 let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeight], nil)
525537 let votingResult = valueOrElse(getInteger(keyVotingResult(pool, epoch)), 0)
526538 let votePrevious = valueOrErrorMessage(getInteger(keyVote(pool, userAddress, epochPrevious)), (((("processVoteINTERNAL " + poolStr) + " ") + userAddressStr) + ": no previous vote"))
527539 let used = valueOrElse(getInteger(this, keyUsed(userAddress, epoch)), 0)
540+ let lpAssetIdStr = getLpAssetByPoolAssets(amountAssetId, priceAssetId)
541+ let votingResultStakedPrevious = valueOrElse(getInteger(keyVotingResultStaked(lpAssetIdStr, epochPrevious)), 0)
542+ let stakingContract = addressFromStringValue(getStrOrFail(this, keyStakingContract))
543+ let stakedByUser = valueOrElse(getInteger(stakingContract, keyStakedByUser(lpAssetIdStr, userAddressStr)), 0)
544+ let votingResultStakedActions = if ((stakedByUser == 0))
545+ then nil
546+ else [IntegerEntry(keyVotingResultStaked(lpAssetIdStr, epochPrevious), (votingResultStakedPrevious + votePrevious))]
528547 let newVote = if ((gwxAmountAtEndTotalPrevious > 0))
529548 then fraction(votePrevious, gwxAmountAtEndTotal, gwxAmountAtEndTotalPrevious)
530549 else 0
533552 else false)
534553 then [IntegerEntry(keyVote(pool, userAddress, epoch), newVote), IntegerEntry(keyTotalVotes(epoch), (totalVotes + newVote)), IntegerEntry(keyVotingResult(pool, epoch), (votingResult + newVote)), IntegerEntry(keyUsed(userAddress, epoch), (used + newVote))]
535554 else deleteNodeActions(getVotesListName(pool), userAddressStr)
536- $Tuple2(actions, unit)
555+ $Tuple2((actions ++ votingResultStakedActions), unit)
537556 }
538557 else throw("Strict value is not equal to itself.")
539558 }
559578 if ((checkTargetEpoch == checkTargetEpoch))
560579 then {
561580 let pool = stringToPool(poolStr)
562- let $t01931419354 = pool
563- let amountAssetId = $t01931419354._1
564- let priceAssetId = $t01931419354._2
581+ let $t02036620406 = pool
582+ let amountAssetId = $t02036620406._1
583+ let priceAssetId = $t02036620406._2
565584 let stakingContract = addressFromStringValue(getStrOrFail(this, keyStakingContract))
566585 let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
567586 let lpAssetId = getLpAssetByPoolAssets(amountAssetId, priceAssetId)
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
80+func keyVotingResultStaked (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStaked", lpAssetIdStr, toString(epoch)], separator)
81+
82+
8083 func keyPoolShare (pool,epoch) = {
81- let $t024342474 = pool
82- let amountAssetId = $t024342474._1
83- let priceAssetId = $t024342474._2
84+ let $t025902630 = pool
85+ let amountAssetId = $t025902630._1
86+ let priceAssetId = $t025902630._2
8487 makeString(["%s%s%s%d", "poolShare", amountAssetId, priceAssetId, toString(epoch)], separator)
8588 }
8689
8790
8891 func keyTotalVotes (epoch) = makeString(["%s%d", "totalVotes", toString(epoch)], separator)
92+
93+
94+func keyStakedByUser (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s", "staked", userAddressStr, lpAssetIdStr], separator)
95+
96+
97+func wrapErr (msg) = makeString(["voting_emission.ride:", msg], " ")
98+
99+
100+func throwErr (msg) = throw(wrapErr(msg))
89101
90102
91103 func getValueOrFail (address,key,type) = {
92104 let error = makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")
93105 valueOrErrorMessage( match type {
94106 case str: String =>
95107 getString(address, key)
96108 case int: Int =>
97109 getInteger(address, key)
98110 case _ =>
99111 throw("invalid entry type")
100112 }, error)
101113 }
102114
103115
104116 func getStrOrFail (address,key) = {
105117 let @ = getValueOrFail(address, key, "")
106118 if ($isInstanceOf(@, "String"))
107119 then @
108120 else throw(($getType(@) + " couldn't be cast to String"))
109121 }
110122
111123
112124 func getIntOrFail (address,key) = {
113125 let @ = getValueOrFail(address, key, 0)
114126 if ($isInstanceOf(@, "Int"))
115127 then @
116128 else throw(($getType(@) + " couldn't be cast to Int"))
117129 }
118130
119131
120132 func poolToString (pool) = ((pool._1 + separator) + pool._2)
121133
122134
123135 func stringToPool (str) = {
124136 let parts = split(str, separator)
125137 if ((size(parts) == 2))
126138 then $Tuple2(parts[0], parts[1])
127139 else throw("invalid pool string")
128140 }
129141
130142
131143 func getLpAssetByPoolAssets (amountAssetId,priceAssetId) = {
132144 func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
133145
134146 func keyMappingPoolAssetsToPoolContractAddress (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + toString(internalAmountAssetIdStr)) + "__") + toString(internalPriceAssetIdStr)) + "__mappings__poolAssets2PoolContract")
135147
136148 func keyMappingPoolContractToLPAsset (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
137149
138150 let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
139151 let amountAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amountAssetId))
140152 let priceAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAssetId))
141153 let poolContractAddress = getStrOrFail(factoryContract, keyMappingPoolAssetsToPoolContractAddress(amountAssetInternalId, priceAssetInternalId))
142154 let lpAssetId = getStrOrFail(factoryContract, keyMappingPoolContractToLPAsset(poolContractAddress))
143155 lpAssetId
144156 }
145157
146158
147159 func checkWxEmissionPoolLabel (pool) = {
148- let $t047164756 = pool
149- let amountAssetId = $t047164756._1
150- let priceAssetId = $t047164756._2
160+ let $t051525192 = pool
161+ let amountAssetId = $t051525192._1
162+ let priceAssetId = $t051525192._2
151163 let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
152164 let @ = invoke(factoryContract, "checkWxEmissionPoolLabel", [amountAssetId, priceAssetId], nil)
153165 if ($isInstanceOf(@, "Boolean"))
154166 then @
155167 else throw(($getType(@) + " couldn't be cast to Boolean"))
156168 }
157169
158170
159171 let poolsListName = "pools"
160172
161173 func getVotesListName (pool) = {
162- let $t050575097 = pool
163- let amountAssetId = $t050575097._1
164- let priceAssetId = $t050575097._2
174+ let $t054935533 = pool
175+ let amountAssetId = $t054935533._1
176+ let priceAssetId = $t054935533._2
165177 makeString(["votes", amountAssetId, priceAssetId], separator)
166178 }
167179
168180
169181 func keyListHead (listName) = {
170182 let meta = if ((listName == poolsListName))
171183 then "%s%s"
172184 else "%s%s%s%s"
173185 makeString([meta, listName, "head"], separator)
174186 }
175187
176188
177189 func keyListSize (listName) = {
178190 let meta = if ((listName == poolsListName))
179191 then "%s%s"
180192 else "%s%s%s%s"
181193 makeString([meta, listName, "size"], separator)
182194 }
183195
184196
185197 func keyListPrev (listName,id) = {
186198 let meta = if ((listName == poolsListName))
187199 then "%s%s%s%s"
188200 else "%s%s%s%s%s"
189201 makeString([meta, listName, id, "prev"], separator)
190202 }
191203
192204
193205 func keyListNext (listName,id) = {
194206 let meta = if ((listName == poolsListName))
195207 then "%s%s%s%s"
196208 else "%s%s%s%s%s"
197209 makeString([meta, listName, id, "next"], separator)
198210 }
199211
200212
201213 func containsNode (listName,id) = {
202214 let headOrUnit = getString(this, keyListHead(listName))
203215 let prevOrUnit = getString(this, keyListPrev(listName, id))
204216 let nextOrUnit = getString(this, keyListNext(listName, id))
205217 if (if ((id == valueOrElse(headOrUnit, "")))
206218 then true
207219 else (prevOrUnit != unit))
208220 then true
209221 else (nextOrUnit != unit)
210222 }
211223
212224
213225 func insertNodeActions (listName,id) = {
214226 let headOrUnit = getString(this, keyListHead(listName))
215227 let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
216228 let checkNode = if (!(containsNode(listName, id)))
217229 then true
218230 else throw("Node exists")
219231 if ((checkNode == checkNode))
220232 then (([IntegerEntry(keyListSize(listName), (listSize + 1))] ++ (if ((headOrUnit != unit))
221233 then [StringEntry(keyListNext(listName, id), value(headOrUnit)), StringEntry(keyListPrev(listName, value(headOrUnit)), id)]
222234 else nil)) ++ [StringEntry(keyListHead(listName), id)])
223235 else throw("Strict value is not equal to itself.")
224236 }
225237
226238
227239 func deleteNodeActions (listName,id) = {
228240 let headOrUnit = getString(this, keyListHead(listName))
229241 let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
230242 let prevOrUnit = getString(this, keyListPrev(listName, id))
231243 let nextOrUnit = getString(this, keyListNext(listName, id))
232244 ([IntegerEntry(keyListSize(listName), (listSize - 1))] ++ (if (if ((prevOrUnit != unit))
233245 then (nextOrUnit != unit)
234246 else false)
235247 then [StringEntry(keyListNext(listName, value(prevOrUnit)), value(nextOrUnit)), StringEntry(keyListPrev(listName, value(nextOrUnit)), value(prevOrUnit)), DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, id))]
236248 else if ((nextOrUnit != unit))
237249 then [StringEntry(keyListHead(listName), value(nextOrUnit)), DeleteEntry(keyListNext(listName, id)), DeleteEntry(keyListPrev(listName, value(nextOrUnit)))]
238250 else if ((prevOrUnit != unit))
239251 then [DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, value(prevOrUnit)))]
240252 else if ((id == valueOrElse(headOrUnit, "")))
241253 then [DeleteEntry(keyListHead(listName))]
242254 else throw(((("invalid node: " + listName) + ".") + id))))
243255 }
244256
245257
246258 func keyManagerPublicKey () = "%s__managerPublicKey"
247259
248260
249261 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
250262
251263
252264 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
253265 case s: String =>
254266 fromBase58String(s)
255267 case _: Unit =>
256268 unit
257269 case _ =>
258270 throw("Match error")
259271 }
260272
261273
262274 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
263275 case s: String =>
264276 fromBase58String(s)
265277 case _: Unit =>
266278 unit
267279 case _ =>
268280 throw("Match error")
269281 }
270282
271283
272284 let permissionDeniedError = throw("Permission denied")
273285
274286 func mustThis (i) = if ((i.caller == this))
275287 then true
276288 else permissionDeniedError
277289
278290
279291 func mustManager (i) = match managerPublicKeyOrUnit() {
280292 case pk: ByteVector =>
281293 if ((i.callerPublicKey == pk))
282294 then true
283295 else permissionDeniedError
284296 case _: Unit =>
285297 mustThis(i)
286298 case _ =>
287299 throw("Match error")
288300 }
289301
290302
291303 @Callable(i)
292304 func setManager (pendingManagerPublicKey) = {
293305 let checkCaller = mustManager(i)
294306 if ((checkCaller == checkCaller))
295307 then {
296308 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
297309 if ((checkManagerPublicKey == checkManagerPublicKey))
298310 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
299311 else throw("Strict value is not equal to itself.")
300312 }
301313 else throw("Strict value is not equal to itself.")
302314 }
303315
304316
305317
306318 @Callable(i)
307319 func confirmManager () = {
308320 let pm = pendingManagerPublicKeyOrUnit()
309321 let hasPM = if (isDefined(pm))
310322 then true
311323 else throw("No pending manager")
312324 if ((hasPM == hasPM))
313325 then {
314326 let checkPM = if ((i.callerPublicKey == value(pm)))
315327 then true
316328 else throw("You are not pending manager")
317329 if ((checkPM == checkPM))
318330 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
319331 else throw("Strict value is not equal to itself.")
320332 }
321333 else throw("Strict value is not equal to itself.")
322334 }
323335
324336
325337
326338 @Callable(i)
327339 func getUserGwxAmountAtHeight (userAddress,targetHeight) = {
328340 let boostingContractAddress = valueOrErrorMessage(addressFromString(getStrOrFail(this, keyBoostingContract)), "invalid boosting contract address")
329341 $Tuple2(nil, {
330342 let @ = invoke(boostingContractAddress, "getUserGwxAmountAtHeightREADONLY", [userAddress, targetHeight], nil)
331343 if ($isInstanceOf(@, "Int"))
332344 then @
333345 else throw(($getType(@) + " couldn't be cast to Int"))
334346 })
335347 }
336348
337349
338350
339351 @Callable(i)
340352 func constructor (factoryContract,votingEmissionCandidateContract,boostingContract,stakingContract,epochLength) = {
341353 let checks = [mustManager(i), if ((addressFromString(factoryContract) != unit))
342354 then true
343355 else "invalid factory contract address", if ((addressFromString(votingEmissionCandidateContract) != unit))
344356 then true
345357 else "invalid voting emission candidate contract address", if ((addressFromString(boostingContract) != unit))
346358 then true
347359 else "invalid boosting contract address", if ((addressFromString(stakingContract) != unit))
348360 then true
349361 else "invalid staking contract address", if ((epochLength > 0))
350362 then true
351363 else throw("invalid epoch length")]
352364 if ((checks == checks))
353365 then $Tuple2([StringEntry(keyFactoryContract, factoryContract), StringEntry(keyVotingEmissionCandidateContract, votingEmissionCandidateContract), StringEntry(keyBoostingContract, boostingContract), StringEntry(keyStakingContract, stakingContract), IntegerEntry(keyEpochLength, epochLength)], unit)
354366 else throw("Strict value is not equal to itself.")
355367 }
356368
357369
358370
359371 @Callable(i)
360372 func create (amountAssetId,priceAssetId) = {
361373 let checks = [if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionCandidateContract), "")))
362374 then true
363375 else mustManager(i)]
364376 if ((checks == checks))
365377 then {
366378 let pool = $Tuple2(amountAssetId, priceAssetId)
367379 let inListActions = ([BooleanEntry(keyInList(pool), true)] ++ insertNodeActions(poolsListName, poolToString(pool)))
368380 let currentEpochIsNotDefined = (getInteger(this, keyCurrentEpoch) == unit)
369381 let startHeightActions = if (currentEpochIsNotDefined)
370382 then {
371383 let epoch = 0
372384 [IntegerEntry(keyCurrentEpoch, epoch), IntegerEntry(keyStartHeightByEpoch(epoch), height), IntegerEntry(keyStartHeight, height), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, height)]
373385 }
374386 else nil
375387 $Tuple2((inListActions ++ startHeightActions), unit)
376388 }
377389 else throw("Strict value is not equal to itself.")
378390 }
379391
380392
381393
382394 @Callable(i)
383395 func vote (amountAssetId,priceAssetId,amount) = {
384396 let pool = $Tuple2(amountAssetId, priceAssetId)
385397 let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0)
386398 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
387399 let epochLength = getIntOrFail(this, keyEpochLength)
388400 let endHeight = (startHeight + epochLength)
389401 let finalizationStageOrUnit = getInteger(this, keyFinalizationStage)
390402 let used = valueOrElse(getInteger(this, keyUsed(i.caller, epoch)), 0)
391403 let vote = valueOrElse(getInteger(this, keyVote(pool, i.caller, epoch)), 0)
392404 let poolResult = valueOrElse(getInteger(this, keyVotingResult(pool, epoch)), 0)
393405 let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(epoch)), 0)
394406 let gwxAmountAtEndTotal = {
395407 let @ = invoke(this, "getUserGwxAmountAtHeight", [toBase58String(i.caller.bytes), endHeight], nil)
396408 if ($isInstanceOf(@, "Int"))
397409 then @
398410 else throw(($getType(@) + " couldn't be cast to Int"))
399411 }
400412 let available = (gwxAmountAtEndTotal - used)
401413 let newVote = (vote + amount)
402414 let wxEmission = checkWxEmissionPoolLabel(pool)
403415 let checks = [if ((getBoolean(keyInList(pool)) != unit))
404416 then true
405417 else throw("invalid assets"), if ((endHeight > height))
406418 then true
407419 else throw("invalid height"), if ((finalizationStageOrUnit == unit))
408420 then true
409421 else throw("finalization in progress"), if ((gwxAmountAtEndTotal > 0))
410422 then true
411423 else throw("you do not have gWX"), if (if ((amount > 0))
412424 then (available >= amount)
413425 else false)
414426 then true
415427 else throw("invalid amount"), if (wxEmission)
416428 then true
417429 else throw("pool hasn't WX_EMISSION label")]
418430 if ((checks == checks))
419431 then {
420432 let votesListName = getVotesListName(pool)
421433 let userAddressStr = toString(i.caller)
422434 let votesListActions = if (containsNode(votesListName, userAddressStr))
423435 then nil
424436 else insertNodeActions(votesListName, userAddressStr)
425437 $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)
426438 }
427439 else throw("Strict value is not equal to itself.")
428440 }
429441
430442
431443
432444 @Callable(i)
433445 func cancelVote (amountAssetId,priceAssetId) = {
434446 let pool = $Tuple2(amountAssetId, priceAssetId)
435447 let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0)
436448 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
437449 let epochLength = getIntOrFail(this, keyEpochLength)
438450 let endHeight = (startHeight + epochLength)
439451 let finalizationStageOrUnit = getInteger(this, keyFinalizationStage)
440452 let used = valueOrElse(getInteger(this, keyUsed(i.caller, epoch)), 0)
441453 let vote = valueOrElse(getInteger(this, keyVote(pool, i.caller, epoch)), 0)
442454 let poolResult = valueOrElse(getInteger(this, keyVotingResult(pool, epoch)), 0)
443455 let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(epoch)), 0)
444456 let checks = [if ((getBoolean(keyInList(pool)) != unit))
445457 then true
446458 else throw("invalid assets"), if ((endHeight > height))
447459 then true
448460 else throw("invalid height"), if ((finalizationStageOrUnit == unit))
449461 then true
450462 else throw("finalization in progress"), if ((vote > 0))
451463 then true
452464 else throw("no vote")]
453465 if ((checks == checks))
454466 then {
455467 let votesListName = getVotesListName(pool)
456468 let userAddressStr = toString(i.caller)
457469 $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)
458470 }
459471 else throw("Strict value is not equal to itself.")
460472 }
461473
462474
463475
464476 @Callable(i)
465477 func setEpochLength (newEpochLength) = {
466478 let checks = [mustManager(i), if ((newEpochLength > 0))
467479 then true
468480 else throw("invalid epoch length")]
469481 if ((checks == checks))
470482 then $Tuple2([IntegerEntry(keyEpochLengthNew, newEpochLength)], unit)
471483 else throw("Strict value is not equal to itself.")
472484 }
473485
474486
475487
476488 @Callable(i)
477489 func setMaxDepth (newMaxDepth) = {
478490 let checks = [mustManager(i), if ((newMaxDepth > 0))
479491 then true
480492 else throw("invalid max depth")]
481493 if ((checks == checks))
482494 then $Tuple2([IntegerEntry(keyMaxDepth, newMaxDepth)], unit)
483495 else throw("Strict value is not equal to itself.")
484496 }
485497
486498
487499
488500 @Callable(i)
489501 func processVoteINTERNAL (poolStr,userAddressStr) = {
490502 let checkCaller = mustThis(i)
491503 if ((checkCaller == checkCaller))
492504 then {
493505 let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), ("processVoteINTERNAL: invalid user address " + userAddressStr))
494506 let epoch = getIntOrFail(this, keyCurrentEpoch)
495507 let epochPrevious = (epoch - 1)
496508 let epochLength = getIntOrFail(this, keyEpochLength)
497509 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
498510 let endHeight = (startHeight + epochLength)
499511 let startHeightPrevious = getIntOrFail(this, keyStartHeightByEpoch(epochPrevious))
500512 let epochLengthPrevious = getIntOrFail(this, keyEpochLengthByEpoch(epochPrevious))
501513 let endHeightPrevious = (startHeightPrevious + epochLengthPrevious)
502514 let checkTargetEpoch = if ((epochPrevious >= 0))
503515 then true
504516 else throw("processVoteINTERNAL: invalid previous epoch")
505517 if ((checkTargetEpoch == checkTargetEpoch))
506518 then {
507519 let pool = stringToPool(poolStr)
508- let $t01754817588 = pool
509- let amountAssetId = $t01754817588._1
510- let priceAssetId = $t01754817588._2
520+ let $t01798418024 = pool
521+ let amountAssetId = $t01798418024._1
522+ let priceAssetId = $t01798418024._2
511523 let wxEmission = checkWxEmissionPoolLabel(pool)
512524 let gwxAmountAtEndTotal = {
513525 let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeight], nil)
514526 if ($isInstanceOf(@, "Int"))
515527 then @
516528 else throw(($getType(@) + " couldn't be cast to Int"))
517529 }
518530 let gwxAmountAtEndTotalPrevious = {
519531 let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeightPrevious], nil)
520532 if ($isInstanceOf(@, "Int"))
521533 then @
522534 else throw(($getType(@) + " couldn't be cast to Int"))
523535 }
524536 let totalVotes = valueOrElse(getInteger(keyTotalVotes(epoch)), 0)
525537 let votingResult = valueOrElse(getInteger(keyVotingResult(pool, epoch)), 0)
526538 let votePrevious = valueOrErrorMessage(getInteger(keyVote(pool, userAddress, epochPrevious)), (((("processVoteINTERNAL " + poolStr) + " ") + userAddressStr) + ": no previous vote"))
527539 let used = valueOrElse(getInteger(this, keyUsed(userAddress, epoch)), 0)
540+ let lpAssetIdStr = getLpAssetByPoolAssets(amountAssetId, priceAssetId)
541+ let votingResultStakedPrevious = valueOrElse(getInteger(keyVotingResultStaked(lpAssetIdStr, epochPrevious)), 0)
542+ let stakingContract = addressFromStringValue(getStrOrFail(this, keyStakingContract))
543+ let stakedByUser = valueOrElse(getInteger(stakingContract, keyStakedByUser(lpAssetIdStr, userAddressStr)), 0)
544+ let votingResultStakedActions = if ((stakedByUser == 0))
545+ then nil
546+ else [IntegerEntry(keyVotingResultStaked(lpAssetIdStr, epochPrevious), (votingResultStakedPrevious + votePrevious))]
528547 let newVote = if ((gwxAmountAtEndTotalPrevious > 0))
529548 then fraction(votePrevious, gwxAmountAtEndTotal, gwxAmountAtEndTotalPrevious)
530549 else 0
531550 let actions = if (if ((newVote > 0))
532551 then wxEmission
533552 else false)
534553 then [IntegerEntry(keyVote(pool, userAddress, epoch), newVote), IntegerEntry(keyTotalVotes(epoch), (totalVotes + newVote)), IntegerEntry(keyVotingResult(pool, epoch), (votingResult + newVote)), IntegerEntry(keyUsed(userAddress, epoch), (used + newVote))]
535554 else deleteNodeActions(getVotesListName(pool), userAddressStr)
536- $Tuple2(actions, unit)
555+ $Tuple2((actions ++ votingResultStakedActions), unit)
537556 }
538557 else throw("Strict value is not equal to itself.")
539558 }
540559 else throw("Strict value is not equal to itself.")
541560 }
542561
543562
544563
545564 @Callable(i)
546565 func processPoolINTERNAL (poolStr,force) = {
547566 let checkCaller = mustThis(i)
548567 if ((checkCaller == checkCaller))
549568 then {
550569 let targetEpoch = {
551570 let currentEpoch = getIntOrFail(this, keyCurrentEpoch)
552571 if (force)
553572 then currentEpoch
554573 else (currentEpoch - 1)
555574 }
556575 let checkTargetEpoch = if ((targetEpoch >= 0))
557576 then true
558577 else throw("processPoolINTERNAL: invalid target epoch")
559578 if ((checkTargetEpoch == checkTargetEpoch))
560579 then {
561580 let pool = stringToPool(poolStr)
562- let $t01931419354 = pool
563- let amountAssetId = $t01931419354._1
564- let priceAssetId = $t01931419354._2
581+ let $t02036620406 = pool
582+ let amountAssetId = $t02036620406._1
583+ let priceAssetId = $t02036620406._2
565584 let stakingContract = addressFromStringValue(getStrOrFail(this, keyStakingContract))
566585 let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
567586 let lpAssetId = getLpAssetByPoolAssets(amountAssetId, priceAssetId)
568587 let r = {
569588 let @ = invoke(stakingContract, "usersListTraversal", [lpAssetId], nil)
570589 if ($isInstanceOf(@, "Boolean"))
571590 then @
572591 else throw(($getType(@) + " couldn't be cast to Boolean"))
573592 }
574593 if ((r == r))
575594 then if (r)
576595 then $Tuple2(nil, true)
577596 else {
578597 let wxEmission = checkWxEmissionPoolLabel(pool)
579598 let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(targetEpoch)), 0)
580599 let votingResult = valueOrElse(getInteger(this, keyVotingResult(pool, targetEpoch)), 0)
581600 let share = if (if ((totalVotes == 0))
582601 then true
583602 else !(wxEmission))
584603 then 0
585604 else fraction(votingResult, poolWeightMult, totalVotes)
586605 let modifyWeightInv = invoke(factoryContract, "modifyWeight", [lpAssetId, share], nil)
587606 if ((modifyWeightInv == modifyWeightInv))
588607 then {
589608 let poolsListActions = if (if (wxEmission)
590609 then true
591610 else force)
592611 then nil
593612 else ([DeleteEntry(keyInList(pool))] ++ deleteNodeActions(poolsListName, poolStr))
594613 $Tuple2(([IntegerEntry(keyPoolShare(pool, targetEpoch), share)] ++ poolsListActions), false)
595614 }
596615 else throw("Strict value is not equal to itself.")
597616 }
598617 else throw("Strict value is not equal to itself.")
599618 }
600619 else throw("Strict value is not equal to itself.")
601620 }
602621 else throw("Strict value is not equal to itself.")
603622 }
604623
605624
606625
607626 @Callable(i)
608627 func finalizeHelper () = {
609628 let force = valueOrElse(getBoolean(keyFinalizationShouldBeForced), false)
610629 let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0)
611630 let previousEpoch = (epoch - 1)
612631 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
613632 let epochLength = getIntOrFail(this, keyEpochLength)
614633 let endHeight = (startHeight + epochLength)
615634 let finalizationStageOrUnit = getInteger(this, keyFinalizationStage)
616635 if (if (if ((height >= endHeight))
617636 then (finalizationStageOrUnit == unit)
618637 else false)
619638 then !(force)
620639 else false)
621640 then {
622641 let newEpoch = (epoch + 1)
623642 let newEpochLengthOption = getInteger(this, keyEpochLengthNew)
624643 let newEpochLengthActions = match newEpochLengthOption {
625644 case newEpochLength: Int =>
626645 [IntegerEntry(keyEpochLength, newEpochLength), DeleteEntry(keyEpochLengthNew)]
627646 case _: Unit =>
628647 nil
629648 case _ =>
630649 throw("Match error")
631650 }
632651 $Tuple2(([IntegerEntry(keyStartHeightByEpoch(newEpoch), height), IntegerEntry(keyStartHeight, height), IntegerEntry(keyCurrentEpoch, newEpoch), IntegerEntry(keyFinalizationStage, finalizationStageTotal), IntegerEntry(keyEpochLengthByEpoch(epoch), epochLength)] ++ newEpochLengthActions), true)
633652 }
634653 else if (if (force)
635654 then (finalizationStageOrUnit == unit)
636655 else false)
637656 then $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares)], true)
638657 else if ((finalizationStageOrUnit == unit))
639658 then $Tuple2(nil, false)
640659 else if ((finalizationStageOrUnit == finalizationStageTotal))
641660 then {
642661 let poolOrUnit = getString(keyNextPool)
643662 let userOrUnit = getString(keyNextUser)
644663 match poolOrUnit {
645664 case _: Unit =>
646665 match getString(keyListHead(poolsListName)) {
647666 case _: Unit =>
648667 $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true)
649668 case poolsHeadStr: String =>
650669 $Tuple2([StringEntry(keyNextPool, poolsHeadStr)], true)
651670 case _ =>
652671 throw("Match error")
653672 }
654673 case poolStr: String =>
655674 let pool = stringToPool(poolStr)
656675 let nextUserOrUnit = match userOrUnit {
657676 case _: Unit =>
658677 getString(keyListHead(getVotesListName(pool)))
659678 case user: String =>
660679 let next = getString(keyListNext(getVotesListName(pool), user))
661680 if ((next == next))
662681 then {
663682 let processVoteInv = invoke(this, "processVoteINTERNAL", [poolStr, user], nil)
664683 if ((processVoteInv == processVoteInv))
665684 then next
666685 else throw("Strict value is not equal to itself.")
667686 }
668687 else throw("Strict value is not equal to itself.")
669688 case _ =>
670689 throw("Match error")
671690 }
672691 match nextUserOrUnit {
673692 case _: Unit =>
674693 let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr))
675694 match nextPoolOrUnit {
676695 case _: Unit =>
677696 $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true)
678697 case s: String =>
679698 $Tuple2([StringEntry(keyNextPool, s), DeleteEntry(keyNextUser)], true)
680699 case _ =>
681700 throw("Match error")
682701 }
683702 case nextUser: String =>
684703 $Tuple2([StringEntry(keyNextUser, nextUser)], true)
685704 case _ =>
686705 throw("Match error")
687706 }
688707 case _ =>
689708 throw("Match error")
690709 }
691710 }
692711 else if ((finalizationStageOrUnit == finalizationStageShares))
693712 then {
694713 let poolOrUnit = getString(keyNextPool)
695714 match poolOrUnit {
696715 case _: Unit =>
697716 match getString(keyListHead(poolsListName)) {
698717 case _: Unit =>
699718 let actions = if (force)
700719 then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced)]
701720 else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight)]
702721 $Tuple2(actions, true)
703722 case nextPoolStr: String =>
704723 $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true)
705724 case _ =>
706725 throw("Match error")
707726 }
708727 case poolStr: String =>
709728 let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr))
710729 if ((nextPoolOrUnit == nextPoolOrUnit))
711730 then {
712731 let r = {
713732 let @ = invoke(this, "processPoolINTERNAL", [poolStr, force], nil)
714733 if ($isInstanceOf(@, "Boolean"))
715734 then @
716735 else throw(($getType(@) + " couldn't be cast to Boolean"))
717736 }
718737 if ((r == r))
719738 then if (r)
720739 then $Tuple2(nil, true)
721740 else match nextPoolOrUnit {
722741 case _: Unit =>
723742 let actions = if (force)
724743 then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced), DeleteEntry(keyNextPool)]
725744 else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight), DeleteEntry(keyNextPool)]
726745 $Tuple2(actions, true)
727746 case nextPoolStr: String =>
728747 $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true)
729748 case _ =>
730749 throw("Match error")
731750 }
732751 else throw("Strict value is not equal to itself.")
733752 }
734753 else throw("Strict value is not equal to itself.")
735754 case _ =>
736755 throw("Match error")
737756 }
738757 }
739758 else throw("finalization is broken")
740759 }
741760
742761
743762
744763 @Callable(i)
745764 func finalizeWrapper (counter) = {
746765 let result = {
747766 let @ = invoke(this, "finalizeHelper", nil, nil)
748767 if ($isInstanceOf(@, "Boolean"))
749768 then @
750769 else throw(($getType(@) + " couldn't be cast to Boolean"))
751770 }
752771 if ((result == result))
753772 then if (!(result))
754773 then if ((counter == 0))
755774 then throw("Current voting is not over yet")
756775 else $Tuple2(nil, unit)
757776 else {
758777 let maxDepth = valueOrElse(getInteger(this, keyMaxDepth), maxDepthDefault)
759778 if ((maxDepth > counter))
760779 then {
761780 let inv = invoke(this, "finalizeWrapper", [(counter + 1)], nil)
762781 if ((inv == inv))
763782 then $Tuple2(nil, unit)
764783 else throw("Strict value is not equal to itself.")
765784 }
766785 else $Tuple2(nil, unit)
767786 }
768787 else throw("Strict value is not equal to itself.")
769788 }
770789
771790
772791
773792 @Callable(i)
774793 func finalize () = {
775794 let inv = invoke(this, "finalizeWrapper", [0], nil)
776795 if ((inv == inv))
777796 then $Tuple2(nil, unit)
778797 else throw("Strict value is not equal to itself.")
779798 }
780799
781800
782801
783802 @Callable(i)
784803 func containsNodeREADONLY (listName,id) = $Tuple2(nil, containsNode(listName, id))
785804
786805
787806
788807 @Callable(i)
789808 func insertNode (listName,id) = {
790809 let checkCaller = mustManager(i)
791810 if ((checkCaller == checkCaller))
792811 then $Tuple2(insertNodeActions(listName, id), unit)
793812 else throw("Strict value is not equal to itself.")
794813 }
795814
796815
797816
798817 @Callable(i)
799818 func deleteNode (listName,id) = {
800819 let checkCaller = mustManager(i)
801820 if ((checkCaller == checkCaller))
802821 then $Tuple2(deleteNodeActions(listName, id), unit)
803822 else throw("Strict value is not equal to itself.")
804823 }
805824
806825
807826 @Verifier(tx)
808827 func verify () = {
809828 let targetPublicKey = match managerPublicKeyOrUnit() {
810829 case pk: ByteVector =>
811830 pk
812831 case _: Unit =>
813832 tx.senderPublicKey
814833 case _ =>
815834 throw("Match error")
816835 }
817836 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
818837 }
819838

github/deemru/w8io/169f3d6 
87.18 ms