tx · 9WWceSDgNsALAgLzTKevALZyJJ7rXd3XQJFnFqMLtzmA

3Mp3nG9T5fKGziHW8mcCqx3jMFx3towh3WA:  -0.02300000 Waves

2023.02.15 13:44 [2450618] smart account 3Mp3nG9T5fKGziHW8mcCqx3jMFx3towh3WA > SELF 0.00000000 Waves

{ "type": 13, "id": "9WWceSDgNsALAgLzTKevALZyJJ7rXd3XQJFnFqMLtzmA", "fee": 2300000, "feeAssetId": null, "timestamp": 1676457863817, "version": 2, "chainId": 84, "sender": "3Mp3nG9T5fKGziHW8mcCqx3jMFx3towh3WA", "senderPublicKey": "D46gQxzmdzdCTYRg6dMcwFoUrc6ZmxF6GKd5ZoTkvzp1", "proofs": [ "5DBU47mAwL8JpfqWwT6EX6iqyibLftmHhtXVSjCqdqYK9WsNwGSvdTMfsVmV41jExE6MT7zntVT7hJmppMoEegfV" ], "script": "base64:BgKnFQgCEgMKAQgSABIECgIIARIHCgUICAgIARIECgIICBIFCgMICAESBAoCCAgSAwoBARIDCgEBEgQKAggIEgQKAggEEgASAwoBARIAEgQKAggIEgQKAggIEgQKAggIEgQKAggIIglzZXBhcmF0b3IiDnBvb2xXZWlnaHRNdWx0Ig9tYXhEZXB0aERlZmF1bHQiFmZpbmFsaXphdGlvblN0YWdlVG90YWwiF2ZpbmFsaXphdGlvblN0YWdlU2hhcmVzIg5rZXlFcG9jaExlbmd0aCIRa2V5RXBvY2hMZW5ndGhOZXciFWtleUVwb2NoTGVuZ3RoQnlFcG9jaCIFZXBvY2giD2tleUN1cnJlbnRFcG9jaCILa2V5TWF4RGVwdGgiImtleVZvdGluZ0VtaXNzaW9uQ2FuZGlkYXRlQ29udHJhY3QiEmtleUZhY3RvcnlDb250cmFjdCITa2V5Qm9vc3RpbmdDb250cmFjdCISa2V5U3Rha2luZ0NvbnRyYWN0IhRrZXlGaW5hbGl6YXRpb25TdGFnZSILa2V5TmV4dFBvb2wiC2tleU5leHRVc2VyIg5rZXlTdGFydEhlaWdodCIRa2V5Q3Vyc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QgZXBvY2gFAWkEAXoJAJQKAgUBQgUBQwQCY3MJAQt2YWx1ZU9yRWxzZQIJAJoIAgUEdGhpcwkBAUYDBQF6BQJhWQUCY3IAAAQCYnAJAQt2YWx1ZU9yRWxzZQIJAJoIAgUEdGhpcwkBAUgCBQF6BQJjcgAACQCUCgIFA25pbAkAlAoCBQJjcwUCYnABAmN0AQJjdQAEAmN2BAFUCQECYUsAAwkAAQIFAVQCCkJ5dGVWZWN0b3IEAmFSBQFUBQJhUgMJAAECBQFUAgRVbml0CAUCY3QPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IJAPQDAwgFAmN0CWJvZHlCeXRlcwkAkQMCCAUCY3QGcHJvb2ZzAAAFAmN2KKQz7g==", "height": 2450618, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: C2TKiv8yMgfGBvHDGNFcHnkpWt4BM2DsPF9gb8TuCEpp Next: 9wNALryRHbvVdvYgPVX7w4vGaoXZQLuQt8cmdKQu1BjK Diff:
OldNewDifferences
8888 func keyTotalVotes (epoch) = makeString(["%s%d", "totalVotes", toString(epoch)], separator)
8989
9090
91+func wrapErr (msg) = makeString(["voting_emission.ride:", msg], " ")
92+
93+
94+func throwErr (msg) = throw(wrapErr(msg))
95+
96+
9197 func getValueOrFail (address,key,type) = {
9298 let error = makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")
9399 valueOrErrorMessage( match type {
145151
146152
147153 func checkWxEmissionPoolLabel (pool) = {
148- let $t047164756 = pool
149- let amountAssetId = $t047164756._1
150- let priceAssetId = $t047164756._2
154+ let $t048434883 = pool
155+ let amountAssetId = $t048434883._1
156+ let priceAssetId = $t048434883._2
151157 let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
152158 let @ = invoke(factoryContract, "checkWxEmissionPoolLabel", [amountAssetId, priceAssetId], nil)
153159 if ($isInstanceOf(@, "Boolean"))
159165 let poolsListName = "pools"
160166
161167 func getVotesListName (pool) = {
162- let $t050575097 = pool
163- let amountAssetId = $t050575097._1
164- let priceAssetId = $t050575097._2
168+ let $t051845224 = pool
169+ let amountAssetId = $t051845224._1
170+ let priceAssetId = $t051845224._2
165171 makeString(["votes", amountAssetId, priceAssetId], separator)
166172 }
167173
505511 if ((checkTargetEpoch == checkTargetEpoch))
506512 then {
507513 let pool = stringToPool(poolStr)
508- let $t01754817588 = pool
509- let amountAssetId = $t01754817588._1
510- let priceAssetId = $t01754817588._2
514+ let $t01767517715 = pool
515+ let amountAssetId = $t01767517715._1
516+ let priceAssetId = $t01767517715._2
511517 let wxEmission = checkWxEmissionPoolLabel(pool)
512518 let gwxAmountAtEndTotal = {
513519 let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeight], nil)
559565 if ((checkTargetEpoch == checkTargetEpoch))
560566 then {
561567 let pool = stringToPool(poolStr)
562- let $t01931419354 = pool
563- let amountAssetId = $t01931419354._1
564- let priceAssetId = $t01931419354._2
568+ let $t01944119481 = pool
569+ let amountAssetId = $t01944119481._1
570+ let priceAssetId = $t01944119481._2
565571 let stakingContract = addressFromStringValue(getStrOrFail(this, keyStakingContract))
566572 let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
567573 let lpAssetId = getLpAssetByPoolAssets(amountAssetId, priceAssetId)
804810 }
805811
806812
813+
814+@Callable(i)
815+func getVoteInfoREADONLY (lpAssetIdStr,userAddressStr) = {
816+ let userAddress = addressFromStringValue(userAddressStr)
817+ let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
818+ let idxAmountAssetId = 4
819+ let idxPriceAssetId = 5
820+ let poolCfg = {
821+ let @ = invoke(factoryContract, "getPoolConfigByLpAssetId", [lpAssetIdStr], nil)
822+ if ($isInstanceOf(@, "List[Any]"))
823+ then @
824+ else throw(($getType(@) + " couldn't be cast to List[Any]"))
825+ }
826+ let amountAssetId = {
827+ let @ = poolCfg[idxAmountAssetId]
828+ if ($isInstanceOf(@, "String"))
829+ then @
830+ else throw(($getType(@) + " couldn't be cast to String"))
831+ }
832+ let priceAssetId = {
833+ let @ = poolCfg[idxPriceAssetId]
834+ if ($isInstanceOf(@, "String"))
835+ then @
836+ else throw(($getType(@) + " couldn't be cast to String"))
837+ }
838+ let lastFinalizedEpoch = {
839+ let epoch = (value(getInteger(this, keyCurrentEpoch)) - 1)
840+ if ((0 > epoch))
841+ then throwErr("invalid epoch")
842+ else epoch
843+ }
844+ let pool = $Tuple2(amountAssetId, priceAssetId)
845+ let userVote = valueOrElse(getInteger(this, keyVote(pool, userAddress, lastFinalizedEpoch)), 0)
846+ let poolResult = valueOrElse(getInteger(this, keyVotingResult(pool, lastFinalizedEpoch)), 0)
847+ $Tuple2(nil, $Tuple2(userVote, poolResult))
848+ }
849+
850+
807851 @Verifier(tx)
808852 func verify () = {
809853 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 keyPoolShare (pool,epoch) = {
8181 let $t024342474 = pool
8282 let amountAssetId = $t024342474._1
8383 let priceAssetId = $t024342474._2
8484 makeString(["%s%s%s%d", "poolShare", amountAssetId, priceAssetId, toString(epoch)], separator)
8585 }
8686
8787
8888 func keyTotalVotes (epoch) = makeString(["%s%d", "totalVotes", toString(epoch)], separator)
8989
9090
91+func wrapErr (msg) = makeString(["voting_emission.ride:", msg], " ")
92+
93+
94+func throwErr (msg) = throw(wrapErr(msg))
95+
96+
9197 func getValueOrFail (address,key,type) = {
9298 let error = makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")
9399 valueOrErrorMessage( match type {
94100 case str: String =>
95101 getString(address, key)
96102 case int: Int =>
97103 getInteger(address, key)
98104 case _ =>
99105 throw("invalid entry type")
100106 }, error)
101107 }
102108
103109
104110 func getStrOrFail (address,key) = {
105111 let @ = getValueOrFail(address, key, "")
106112 if ($isInstanceOf(@, "String"))
107113 then @
108114 else throw(($getType(@) + " couldn't be cast to String"))
109115 }
110116
111117
112118 func getIntOrFail (address,key) = {
113119 let @ = getValueOrFail(address, key, 0)
114120 if ($isInstanceOf(@, "Int"))
115121 then @
116122 else throw(($getType(@) + " couldn't be cast to Int"))
117123 }
118124
119125
120126 func poolToString (pool) = ((pool._1 + separator) + pool._2)
121127
122128
123129 func stringToPool (str) = {
124130 let parts = split(str, separator)
125131 if ((size(parts) == 2))
126132 then $Tuple2(parts[0], parts[1])
127133 else throw("invalid pool string")
128134 }
129135
130136
131137 func getLpAssetByPoolAssets (amountAssetId,priceAssetId) = {
132138 func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
133139
134140 func keyMappingPoolAssetsToPoolContractAddress (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + toString(internalAmountAssetIdStr)) + "__") + toString(internalPriceAssetIdStr)) + "__mappings__poolAssets2PoolContract")
135141
136142 func keyMappingPoolContractToLPAsset (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
137143
138144 let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
139145 let amountAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amountAssetId))
140146 let priceAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAssetId))
141147 let poolContractAddress = getStrOrFail(factoryContract, keyMappingPoolAssetsToPoolContractAddress(amountAssetInternalId, priceAssetInternalId))
142148 let lpAssetId = getStrOrFail(factoryContract, keyMappingPoolContractToLPAsset(poolContractAddress))
143149 lpAssetId
144150 }
145151
146152
147153 func checkWxEmissionPoolLabel (pool) = {
148- let $t047164756 = pool
149- let amountAssetId = $t047164756._1
150- let priceAssetId = $t047164756._2
154+ let $t048434883 = pool
155+ let amountAssetId = $t048434883._1
156+ let priceAssetId = $t048434883._2
151157 let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
152158 let @ = invoke(factoryContract, "checkWxEmissionPoolLabel", [amountAssetId, priceAssetId], nil)
153159 if ($isInstanceOf(@, "Boolean"))
154160 then @
155161 else throw(($getType(@) + " couldn't be cast to Boolean"))
156162 }
157163
158164
159165 let poolsListName = "pools"
160166
161167 func getVotesListName (pool) = {
162- let $t050575097 = pool
163- let amountAssetId = $t050575097._1
164- let priceAssetId = $t050575097._2
168+ let $t051845224 = pool
169+ let amountAssetId = $t051845224._1
170+ let priceAssetId = $t051845224._2
165171 makeString(["votes", amountAssetId, priceAssetId], separator)
166172 }
167173
168174
169175 func keyListHead (listName) = {
170176 let meta = if ((listName == poolsListName))
171177 then "%s%s"
172178 else "%s%s%s%s"
173179 makeString([meta, listName, "head"], separator)
174180 }
175181
176182
177183 func keyListSize (listName) = {
178184 let meta = if ((listName == poolsListName))
179185 then "%s%s"
180186 else "%s%s%s%s"
181187 makeString([meta, listName, "size"], separator)
182188 }
183189
184190
185191 func keyListPrev (listName,id) = {
186192 let meta = if ((listName == poolsListName))
187193 then "%s%s%s%s"
188194 else "%s%s%s%s%s"
189195 makeString([meta, listName, id, "prev"], separator)
190196 }
191197
192198
193199 func keyListNext (listName,id) = {
194200 let meta = if ((listName == poolsListName))
195201 then "%s%s%s%s"
196202 else "%s%s%s%s%s"
197203 makeString([meta, listName, id, "next"], separator)
198204 }
199205
200206
201207 func containsNode (listName,id) = {
202208 let headOrUnit = getString(this, keyListHead(listName))
203209 let prevOrUnit = getString(this, keyListPrev(listName, id))
204210 let nextOrUnit = getString(this, keyListNext(listName, id))
205211 if (if ((id == valueOrElse(headOrUnit, "")))
206212 then true
207213 else (prevOrUnit != unit))
208214 then true
209215 else (nextOrUnit != unit)
210216 }
211217
212218
213219 func insertNodeActions (listName,id) = {
214220 let headOrUnit = getString(this, keyListHead(listName))
215221 let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
216222 let checkNode = if (!(containsNode(listName, id)))
217223 then true
218224 else throw("Node exists")
219225 if ((checkNode == checkNode))
220226 then (([IntegerEntry(keyListSize(listName), (listSize + 1))] ++ (if ((headOrUnit != unit))
221227 then [StringEntry(keyListNext(listName, id), value(headOrUnit)), StringEntry(keyListPrev(listName, value(headOrUnit)), id)]
222228 else nil)) ++ [StringEntry(keyListHead(listName), id)])
223229 else throw("Strict value is not equal to itself.")
224230 }
225231
226232
227233 func deleteNodeActions (listName,id) = {
228234 let headOrUnit = getString(this, keyListHead(listName))
229235 let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
230236 let prevOrUnit = getString(this, keyListPrev(listName, id))
231237 let nextOrUnit = getString(this, keyListNext(listName, id))
232238 ([IntegerEntry(keyListSize(listName), (listSize - 1))] ++ (if (if ((prevOrUnit != unit))
233239 then (nextOrUnit != unit)
234240 else false)
235241 then [StringEntry(keyListNext(listName, value(prevOrUnit)), value(nextOrUnit)), StringEntry(keyListPrev(listName, value(nextOrUnit)), value(prevOrUnit)), DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, id))]
236242 else if ((nextOrUnit != unit))
237243 then [StringEntry(keyListHead(listName), value(nextOrUnit)), DeleteEntry(keyListNext(listName, id)), DeleteEntry(keyListPrev(listName, value(nextOrUnit)))]
238244 else if ((prevOrUnit != unit))
239245 then [DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, value(prevOrUnit)))]
240246 else if ((id == valueOrElse(headOrUnit, "")))
241247 then [DeleteEntry(keyListHead(listName))]
242248 else throw(((("invalid node: " + listName) + ".") + id))))
243249 }
244250
245251
246252 func keyManagerPublicKey () = "%s__managerPublicKey"
247253
248254
249255 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
250256
251257
252258 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
253259 case s: String =>
254260 fromBase58String(s)
255261 case _: Unit =>
256262 unit
257263 case _ =>
258264 throw("Match error")
259265 }
260266
261267
262268 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
263269 case s: String =>
264270 fromBase58String(s)
265271 case _: Unit =>
266272 unit
267273 case _ =>
268274 throw("Match error")
269275 }
270276
271277
272278 let permissionDeniedError = throw("Permission denied")
273279
274280 func mustThis (i) = if ((i.caller == this))
275281 then true
276282 else permissionDeniedError
277283
278284
279285 func mustManager (i) = match managerPublicKeyOrUnit() {
280286 case pk: ByteVector =>
281287 if ((i.callerPublicKey == pk))
282288 then true
283289 else permissionDeniedError
284290 case _: Unit =>
285291 mustThis(i)
286292 case _ =>
287293 throw("Match error")
288294 }
289295
290296
291297 @Callable(i)
292298 func setManager (pendingManagerPublicKey) = {
293299 let checkCaller = mustManager(i)
294300 if ((checkCaller == checkCaller))
295301 then {
296302 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
297303 if ((checkManagerPublicKey == checkManagerPublicKey))
298304 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
299305 else throw("Strict value is not equal to itself.")
300306 }
301307 else throw("Strict value is not equal to itself.")
302308 }
303309
304310
305311
306312 @Callable(i)
307313 func confirmManager () = {
308314 let pm = pendingManagerPublicKeyOrUnit()
309315 let hasPM = if (isDefined(pm))
310316 then true
311317 else throw("No pending manager")
312318 if ((hasPM == hasPM))
313319 then {
314320 let checkPM = if ((i.callerPublicKey == value(pm)))
315321 then true
316322 else throw("You are not pending manager")
317323 if ((checkPM == checkPM))
318324 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
319325 else throw("Strict value is not equal to itself.")
320326 }
321327 else throw("Strict value is not equal to itself.")
322328 }
323329
324330
325331
326332 @Callable(i)
327333 func getUserGwxAmountAtHeight (userAddress,targetHeight) = {
328334 let boostingContractAddress = valueOrErrorMessage(addressFromString(getStrOrFail(this, keyBoostingContract)), "invalid boosting contract address")
329335 $Tuple2(nil, {
330336 let @ = invoke(boostingContractAddress, "getUserGwxAmountAtHeightREADONLY", [userAddress, targetHeight], nil)
331337 if ($isInstanceOf(@, "Int"))
332338 then @
333339 else throw(($getType(@) + " couldn't be cast to Int"))
334340 })
335341 }
336342
337343
338344
339345 @Callable(i)
340346 func constructor (factoryContract,votingEmissionCandidateContract,boostingContract,stakingContract,epochLength) = {
341347 let checks = [mustManager(i), if ((addressFromString(factoryContract) != unit))
342348 then true
343349 else "invalid factory contract address", if ((addressFromString(votingEmissionCandidateContract) != unit))
344350 then true
345351 else "invalid voting emission candidate contract address", if ((addressFromString(boostingContract) != unit))
346352 then true
347353 else "invalid boosting contract address", if ((addressFromString(stakingContract) != unit))
348354 then true
349355 else "invalid staking contract address", if ((epochLength > 0))
350356 then true
351357 else throw("invalid epoch length")]
352358 if ((checks == checks))
353359 then $Tuple2([StringEntry(keyFactoryContract, factoryContract), StringEntry(keyVotingEmissionCandidateContract, votingEmissionCandidateContract), StringEntry(keyBoostingContract, boostingContract), StringEntry(keyStakingContract, stakingContract), IntegerEntry(keyEpochLength, epochLength)], unit)
354360 else throw("Strict value is not equal to itself.")
355361 }
356362
357363
358364
359365 @Callable(i)
360366 func create (amountAssetId,priceAssetId) = {
361367 let checks = [if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionCandidateContract), "")))
362368 then true
363369 else mustManager(i)]
364370 if ((checks == checks))
365371 then {
366372 let pool = $Tuple2(amountAssetId, priceAssetId)
367373 let inListActions = ([BooleanEntry(keyInList(pool), true)] ++ insertNodeActions(poolsListName, poolToString(pool)))
368374 let currentEpochIsNotDefined = (getInteger(this, keyCurrentEpoch) == unit)
369375 let startHeightActions = if (currentEpochIsNotDefined)
370376 then {
371377 let epoch = 0
372378 [IntegerEntry(keyCurrentEpoch, epoch), IntegerEntry(keyStartHeightByEpoch(epoch), height), IntegerEntry(keyStartHeight, height), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, height)]
373379 }
374380 else nil
375381 $Tuple2((inListActions ++ startHeightActions), unit)
376382 }
377383 else throw("Strict value is not equal to itself.")
378384 }
379385
380386
381387
382388 @Callable(i)
383389 func vote (amountAssetId,priceAssetId,amount) = {
384390 let pool = $Tuple2(amountAssetId, priceAssetId)
385391 let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0)
386392 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
387393 let epochLength = getIntOrFail(this, keyEpochLength)
388394 let endHeight = (startHeight + epochLength)
389395 let finalizationStageOrUnit = getInteger(this, keyFinalizationStage)
390396 let used = valueOrElse(getInteger(this, keyUsed(i.caller, epoch)), 0)
391397 let vote = valueOrElse(getInteger(this, keyVote(pool, i.caller, epoch)), 0)
392398 let poolResult = valueOrElse(getInteger(this, keyVotingResult(pool, epoch)), 0)
393399 let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(epoch)), 0)
394400 let gwxAmountAtEndTotal = {
395401 let @ = invoke(this, "getUserGwxAmountAtHeight", [toBase58String(i.caller.bytes), endHeight], nil)
396402 if ($isInstanceOf(@, "Int"))
397403 then @
398404 else throw(($getType(@) + " couldn't be cast to Int"))
399405 }
400406 let available = (gwxAmountAtEndTotal - used)
401407 let newVote = (vote + amount)
402408 let wxEmission = checkWxEmissionPoolLabel(pool)
403409 let checks = [if ((getBoolean(keyInList(pool)) != unit))
404410 then true
405411 else throw("invalid assets"), if ((endHeight > height))
406412 then true
407413 else throw("invalid height"), if ((finalizationStageOrUnit == unit))
408414 then true
409415 else throw("finalization in progress"), if ((gwxAmountAtEndTotal > 0))
410416 then true
411417 else throw("you do not have gWX"), if (if ((amount > 0))
412418 then (available >= amount)
413419 else false)
414420 then true
415421 else throw("invalid amount"), if (wxEmission)
416422 then true
417423 else throw("pool hasn't WX_EMISSION label")]
418424 if ((checks == checks))
419425 then {
420426 let votesListName = getVotesListName(pool)
421427 let userAddressStr = toString(i.caller)
422428 let votesListActions = if (containsNode(votesListName, userAddressStr))
423429 then nil
424430 else insertNodeActions(votesListName, userAddressStr)
425431 $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)
426432 }
427433 else throw("Strict value is not equal to itself.")
428434 }
429435
430436
431437
432438 @Callable(i)
433439 func cancelVote (amountAssetId,priceAssetId) = {
434440 let pool = $Tuple2(amountAssetId, priceAssetId)
435441 let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0)
436442 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
437443 let epochLength = getIntOrFail(this, keyEpochLength)
438444 let endHeight = (startHeight + epochLength)
439445 let finalizationStageOrUnit = getInteger(this, keyFinalizationStage)
440446 let used = valueOrElse(getInteger(this, keyUsed(i.caller, epoch)), 0)
441447 let vote = valueOrElse(getInteger(this, keyVote(pool, i.caller, epoch)), 0)
442448 let poolResult = valueOrElse(getInteger(this, keyVotingResult(pool, epoch)), 0)
443449 let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(epoch)), 0)
444450 let checks = [if ((getBoolean(keyInList(pool)) != unit))
445451 then true
446452 else throw("invalid assets"), if ((endHeight > height))
447453 then true
448454 else throw("invalid height"), if ((finalizationStageOrUnit == unit))
449455 then true
450456 else throw("finalization in progress"), if ((vote > 0))
451457 then true
452458 else throw("no vote")]
453459 if ((checks == checks))
454460 then {
455461 let votesListName = getVotesListName(pool)
456462 let userAddressStr = toString(i.caller)
457463 $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)
458464 }
459465 else throw("Strict value is not equal to itself.")
460466 }
461467
462468
463469
464470 @Callable(i)
465471 func setEpochLength (newEpochLength) = {
466472 let checks = [mustManager(i), if ((newEpochLength > 0))
467473 then true
468474 else throw("invalid epoch length")]
469475 if ((checks == checks))
470476 then $Tuple2([IntegerEntry(keyEpochLengthNew, newEpochLength)], unit)
471477 else throw("Strict value is not equal to itself.")
472478 }
473479
474480
475481
476482 @Callable(i)
477483 func setMaxDepth (newMaxDepth) = {
478484 let checks = [mustManager(i), if ((newMaxDepth > 0))
479485 then true
480486 else throw("invalid max depth")]
481487 if ((checks == checks))
482488 then $Tuple2([IntegerEntry(keyMaxDepth, newMaxDepth)], unit)
483489 else throw("Strict value is not equal to itself.")
484490 }
485491
486492
487493
488494 @Callable(i)
489495 func processVoteINTERNAL (poolStr,userAddressStr) = {
490496 let checkCaller = mustThis(i)
491497 if ((checkCaller == checkCaller))
492498 then {
493499 let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), ("processVoteINTERNAL: invalid user address " + userAddressStr))
494500 let epoch = getIntOrFail(this, keyCurrentEpoch)
495501 let epochPrevious = (epoch - 1)
496502 let epochLength = getIntOrFail(this, keyEpochLength)
497503 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
498504 let endHeight = (startHeight + epochLength)
499505 let startHeightPrevious = getIntOrFail(this, keyStartHeightByEpoch(epochPrevious))
500506 let epochLengthPrevious = getIntOrFail(this, keyEpochLengthByEpoch(epochPrevious))
501507 let endHeightPrevious = (startHeightPrevious + epochLengthPrevious)
502508 let checkTargetEpoch = if ((epochPrevious >= 0))
503509 then true
504510 else throw("processVoteINTERNAL: invalid previous epoch")
505511 if ((checkTargetEpoch == checkTargetEpoch))
506512 then {
507513 let pool = stringToPool(poolStr)
508- let $t01754817588 = pool
509- let amountAssetId = $t01754817588._1
510- let priceAssetId = $t01754817588._2
514+ let $t01767517715 = pool
515+ let amountAssetId = $t01767517715._1
516+ let priceAssetId = $t01767517715._2
511517 let wxEmission = checkWxEmissionPoolLabel(pool)
512518 let gwxAmountAtEndTotal = {
513519 let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeight], nil)
514520 if ($isInstanceOf(@, "Int"))
515521 then @
516522 else throw(($getType(@) + " couldn't be cast to Int"))
517523 }
518524 let gwxAmountAtEndTotalPrevious = {
519525 let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeightPrevious], nil)
520526 if ($isInstanceOf(@, "Int"))
521527 then @
522528 else throw(($getType(@) + " couldn't be cast to Int"))
523529 }
524530 let totalVotes = valueOrElse(getInteger(keyTotalVotes(epoch)), 0)
525531 let votingResult = valueOrElse(getInteger(keyVotingResult(pool, epoch)), 0)
526532 let votePrevious = valueOrErrorMessage(getInteger(keyVote(pool, userAddress, epochPrevious)), (((("processVoteINTERNAL " + poolStr) + " ") + userAddressStr) + ": no previous vote"))
527533 let used = valueOrElse(getInteger(this, keyUsed(userAddress, epoch)), 0)
528534 let newVote = if ((gwxAmountAtEndTotalPrevious > 0))
529535 then fraction(votePrevious, gwxAmountAtEndTotal, gwxAmountAtEndTotalPrevious)
530536 else 0
531537 let actions = if (if ((newVote > 0))
532538 then wxEmission
533539 else false)
534540 then [IntegerEntry(keyVote(pool, userAddress, epoch), newVote), IntegerEntry(keyTotalVotes(epoch), (totalVotes + newVote)), IntegerEntry(keyVotingResult(pool, epoch), (votingResult + newVote)), IntegerEntry(keyUsed(userAddress, epoch), (used + newVote))]
535541 else deleteNodeActions(getVotesListName(pool), userAddressStr)
536542 $Tuple2(actions, unit)
537543 }
538544 else throw("Strict value is not equal to itself.")
539545 }
540546 else throw("Strict value is not equal to itself.")
541547 }
542548
543549
544550
545551 @Callable(i)
546552 func processPoolINTERNAL (poolStr,force) = {
547553 let checkCaller = mustThis(i)
548554 if ((checkCaller == checkCaller))
549555 then {
550556 let targetEpoch = {
551557 let currentEpoch = getIntOrFail(this, keyCurrentEpoch)
552558 if (force)
553559 then currentEpoch
554560 else (currentEpoch - 1)
555561 }
556562 let checkTargetEpoch = if ((targetEpoch >= 0))
557563 then true
558564 else throw("processPoolINTERNAL: invalid target epoch")
559565 if ((checkTargetEpoch == checkTargetEpoch))
560566 then {
561567 let pool = stringToPool(poolStr)
562- let $t01931419354 = pool
563- let amountAssetId = $t01931419354._1
564- let priceAssetId = $t01931419354._2
568+ let $t01944119481 = pool
569+ let amountAssetId = $t01944119481._1
570+ let priceAssetId = $t01944119481._2
565571 let stakingContract = addressFromStringValue(getStrOrFail(this, keyStakingContract))
566572 let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
567573 let lpAssetId = getLpAssetByPoolAssets(amountAssetId, priceAssetId)
568574 let r = {
569575 let @ = invoke(stakingContract, "usersListTraversal", [lpAssetId], nil)
570576 if ($isInstanceOf(@, "Boolean"))
571577 then @
572578 else throw(($getType(@) + " couldn't be cast to Boolean"))
573579 }
574580 if ((r == r))
575581 then if (r)
576582 then $Tuple2(nil, true)
577583 else {
578584 let wxEmission = checkWxEmissionPoolLabel(pool)
579585 let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(targetEpoch)), 0)
580586 let votingResult = valueOrElse(getInteger(this, keyVotingResult(pool, targetEpoch)), 0)
581587 let share = if (if ((totalVotes == 0))
582588 then true
583589 else !(wxEmission))
584590 then 0
585591 else fraction(votingResult, poolWeightMult, totalVotes)
586592 let modifyWeightInv = invoke(factoryContract, "modifyWeight", [lpAssetId, share], nil)
587593 if ((modifyWeightInv == modifyWeightInv))
588594 then {
589595 let poolsListActions = if (if (wxEmission)
590596 then true
591597 else force)
592598 then nil
593599 else ([DeleteEntry(keyInList(pool))] ++ deleteNodeActions(poolsListName, poolStr))
594600 $Tuple2(([IntegerEntry(keyPoolShare(pool, targetEpoch), share)] ++ poolsListActions), false)
595601 }
596602 else throw("Strict value is not equal to itself.")
597603 }
598604 else throw("Strict value is not equal to itself.")
599605 }
600606 else throw("Strict value is not equal to itself.")
601607 }
602608 else throw("Strict value is not equal to itself.")
603609 }
604610
605611
606612
607613 @Callable(i)
608614 func finalizeHelper () = {
609615 let force = valueOrElse(getBoolean(keyFinalizationShouldBeForced), false)
610616 let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0)
611617 let previousEpoch = (epoch - 1)
612618 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
613619 let epochLength = getIntOrFail(this, keyEpochLength)
614620 let endHeight = (startHeight + epochLength)
615621 let finalizationStageOrUnit = getInteger(this, keyFinalizationStage)
616622 if (if (if ((height >= endHeight))
617623 then (finalizationStageOrUnit == unit)
618624 else false)
619625 then !(force)
620626 else false)
621627 then {
622628 let newEpoch = (epoch + 1)
623629 let newEpochLengthOption = getInteger(this, keyEpochLengthNew)
624630 let newEpochLengthActions = match newEpochLengthOption {
625631 case newEpochLength: Int =>
626632 [IntegerEntry(keyEpochLength, newEpochLength), DeleteEntry(keyEpochLengthNew)]
627633 case _: Unit =>
628634 nil
629635 case _ =>
630636 throw("Match error")
631637 }
632638 $Tuple2(([IntegerEntry(keyStartHeightByEpoch(newEpoch), height), IntegerEntry(keyStartHeight, height), IntegerEntry(keyCurrentEpoch, newEpoch), IntegerEntry(keyFinalizationStage, finalizationStageTotal), IntegerEntry(keyEpochLengthByEpoch(epoch), epochLength)] ++ newEpochLengthActions), true)
633639 }
634640 else if (if (force)
635641 then (finalizationStageOrUnit == unit)
636642 else false)
637643 then $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares)], true)
638644 else if ((finalizationStageOrUnit == unit))
639645 then $Tuple2(nil, false)
640646 else if ((finalizationStageOrUnit == finalizationStageTotal))
641647 then {
642648 let poolOrUnit = getString(keyNextPool)
643649 let userOrUnit = getString(keyNextUser)
644650 match poolOrUnit {
645651 case _: Unit =>
646652 match getString(keyListHead(poolsListName)) {
647653 case _: Unit =>
648654 $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true)
649655 case poolsHeadStr: String =>
650656 $Tuple2([StringEntry(keyNextPool, poolsHeadStr)], true)
651657 case _ =>
652658 throw("Match error")
653659 }
654660 case poolStr: String =>
655661 let pool = stringToPool(poolStr)
656662 let nextUserOrUnit = match userOrUnit {
657663 case _: Unit =>
658664 getString(keyListHead(getVotesListName(pool)))
659665 case user: String =>
660666 let next = getString(keyListNext(getVotesListName(pool), user))
661667 if ((next == next))
662668 then {
663669 let processVoteInv = invoke(this, "processVoteINTERNAL", [poolStr, user], nil)
664670 if ((processVoteInv == processVoteInv))
665671 then next
666672 else throw("Strict value is not equal to itself.")
667673 }
668674 else throw("Strict value is not equal to itself.")
669675 case _ =>
670676 throw("Match error")
671677 }
672678 match nextUserOrUnit {
673679 case _: Unit =>
674680 let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr))
675681 match nextPoolOrUnit {
676682 case _: Unit =>
677683 $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true)
678684 case s: String =>
679685 $Tuple2([StringEntry(keyNextPool, s), DeleteEntry(keyNextUser)], true)
680686 case _ =>
681687 throw("Match error")
682688 }
683689 case nextUser: String =>
684690 $Tuple2([StringEntry(keyNextUser, nextUser)], true)
685691 case _ =>
686692 throw("Match error")
687693 }
688694 case _ =>
689695 throw("Match error")
690696 }
691697 }
692698 else if ((finalizationStageOrUnit == finalizationStageShares))
693699 then {
694700 let poolOrUnit = getString(keyNextPool)
695701 match poolOrUnit {
696702 case _: Unit =>
697703 match getString(keyListHead(poolsListName)) {
698704 case _: Unit =>
699705 let actions = if (force)
700706 then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced)]
701707 else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight)]
702708 $Tuple2(actions, true)
703709 case nextPoolStr: String =>
704710 $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true)
705711 case _ =>
706712 throw("Match error")
707713 }
708714 case poolStr: String =>
709715 let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr))
710716 if ((nextPoolOrUnit == nextPoolOrUnit))
711717 then {
712718 let r = {
713719 let @ = invoke(this, "processPoolINTERNAL", [poolStr, force], nil)
714720 if ($isInstanceOf(@, "Boolean"))
715721 then @
716722 else throw(($getType(@) + " couldn't be cast to Boolean"))
717723 }
718724 if ((r == r))
719725 then if (r)
720726 then $Tuple2(nil, true)
721727 else match nextPoolOrUnit {
722728 case _: Unit =>
723729 let actions = if (force)
724730 then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced), DeleteEntry(keyNextPool)]
725731 else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight), DeleteEntry(keyNextPool)]
726732 $Tuple2(actions, true)
727733 case nextPoolStr: String =>
728734 $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true)
729735 case _ =>
730736 throw("Match error")
731737 }
732738 else throw("Strict value is not equal to itself.")
733739 }
734740 else throw("Strict value is not equal to itself.")
735741 case _ =>
736742 throw("Match error")
737743 }
738744 }
739745 else throw("finalization is broken")
740746 }
741747
742748
743749
744750 @Callable(i)
745751 func finalizeWrapper (counter) = {
746752 let result = {
747753 let @ = invoke(this, "finalizeHelper", nil, nil)
748754 if ($isInstanceOf(@, "Boolean"))
749755 then @
750756 else throw(($getType(@) + " couldn't be cast to Boolean"))
751757 }
752758 if ((result == result))
753759 then if (!(result))
754760 then if ((counter == 0))
755761 then throw("Current voting is not over yet")
756762 else $Tuple2(nil, unit)
757763 else {
758764 let maxDepth = valueOrElse(getInteger(this, keyMaxDepth), maxDepthDefault)
759765 if ((maxDepth > counter))
760766 then {
761767 let inv = invoke(this, "finalizeWrapper", [(counter + 1)], nil)
762768 if ((inv == inv))
763769 then $Tuple2(nil, unit)
764770 else throw("Strict value is not equal to itself.")
765771 }
766772 else $Tuple2(nil, unit)
767773 }
768774 else throw("Strict value is not equal to itself.")
769775 }
770776
771777
772778
773779 @Callable(i)
774780 func finalize () = {
775781 let inv = invoke(this, "finalizeWrapper", [0], nil)
776782 if ((inv == inv))
777783 then $Tuple2(nil, unit)
778784 else throw("Strict value is not equal to itself.")
779785 }
780786
781787
782788
783789 @Callable(i)
784790 func containsNodeREADONLY (listName,id) = $Tuple2(nil, containsNode(listName, id))
785791
786792
787793
788794 @Callable(i)
789795 func insertNode (listName,id) = {
790796 let checkCaller = mustManager(i)
791797 if ((checkCaller == checkCaller))
792798 then $Tuple2(insertNodeActions(listName, id), unit)
793799 else throw("Strict value is not equal to itself.")
794800 }
795801
796802
797803
798804 @Callable(i)
799805 func deleteNode (listName,id) = {
800806 let checkCaller = mustManager(i)
801807 if ((checkCaller == checkCaller))
802808 then $Tuple2(deleteNodeActions(listName, id), unit)
803809 else throw("Strict value is not equal to itself.")
804810 }
805811
806812
813+
814+@Callable(i)
815+func getVoteInfoREADONLY (lpAssetIdStr,userAddressStr) = {
816+ let userAddress = addressFromStringValue(userAddressStr)
817+ let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
818+ let idxAmountAssetId = 4
819+ let idxPriceAssetId = 5
820+ let poolCfg = {
821+ let @ = invoke(factoryContract, "getPoolConfigByLpAssetId", [lpAssetIdStr], nil)
822+ if ($isInstanceOf(@, "List[Any]"))
823+ then @
824+ else throw(($getType(@) + " couldn't be cast to List[Any]"))
825+ }
826+ let amountAssetId = {
827+ let @ = poolCfg[idxAmountAssetId]
828+ if ($isInstanceOf(@, "String"))
829+ then @
830+ else throw(($getType(@) + " couldn't be cast to String"))
831+ }
832+ let priceAssetId = {
833+ let @ = poolCfg[idxPriceAssetId]
834+ if ($isInstanceOf(@, "String"))
835+ then @
836+ else throw(($getType(@) + " couldn't be cast to String"))
837+ }
838+ let lastFinalizedEpoch = {
839+ let epoch = (value(getInteger(this, keyCurrentEpoch)) - 1)
840+ if ((0 > epoch))
841+ then throwErr("invalid epoch")
842+ else epoch
843+ }
844+ let pool = $Tuple2(amountAssetId, priceAssetId)
845+ let userVote = valueOrElse(getInteger(this, keyVote(pool, userAddress, lastFinalizedEpoch)), 0)
846+ let poolResult = valueOrElse(getInteger(this, keyVotingResult(pool, lastFinalizedEpoch)), 0)
847+ $Tuple2(nil, $Tuple2(userVote, poolResult))
848+ }
849+
850+
807851 @Verifier(tx)
808852 func verify () = {
809853 let targetPublicKey = match managerPublicKeyOrUnit() {
810854 case pk: ByteVector =>
811855 pk
812856 case _: Unit =>
813857 tx.senderPublicKey
814858 case _ =>
815859 throw("Match error")
816860 }
817861 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
818862 }
819863

github/deemru/w8io/169f3d6 
101.27 ms