tx · H1K2u4rQ2pRmD3uGHNEUoJimbdsBVXhfL6seYoYTnzkv

3Mp3nG9T5fKGziHW8mcCqx3jMFx3towh3WA:  -0.02100000 Waves

2022.12.09 14:18 [2352704] smart account 3Mp3nG9T5fKGziHW8mcCqx3jMFx3towh3WA > SELF 0.00000000 Waves

{ "type": 13, "id": "H1K2u4rQ2pRmD3uGHNEUoJimbdsBVXhfL6seYoYTnzkv", "fee": 2100000, "feeAssetId": null, "timestamp": 1670584711514, "version": 1, "sender": "3Mp3nG9T5fKGziHW8mcCqx3jMFx3towh3WA", "senderPublicKey": "D46gQxzmdzdCTYRg6dMcwFoUrc6ZmxF6GKd5ZoTkvzp1", "proofs": [ "4xMHEzXi2M7ywA4VDodDUFaev7UN4Mv8FvUAeBzr2WnkbQNF1PvFZfR5ssPh7FpFSpJiDp97JCVqCSsj5frwkb5g" ], "script": "base64:BgLFEwgCEgMKAQgSABIECgIIARIHCgUICAgIARIECgIICBIFCgMICAESBAoCCAgSAwoBARIDCgEBEgQKAggIEgQKAggEEgASAwoBARIAEgQKAggIEgQKAggIEgQKAggIIglzZXBhcmF0b3IiDnBvb2xXZWlnaHRNdWx0Ig9tYXhEZXB0aERlZmF1bHQiFmZpbmFsaXphdGlvblN0YWdlVG90YWwiF2ZpbmFsaXphdGlvblN0YWdlU2hhcmVzIg5rZXlFcG9jaExlbmd0aCIPa2V5Q3VycmVudEVwb2NoIgtrZXlNYXhEZXB0aCIia2V5Vm90aW5nRW1pc3Npb25DYW5kaWRhdGVDb250cmFjdCISa2V5RmFjdG9yeUNvbnRyYWN0IhNrZXlCb29zdGluZ0NvbnRyYWN0IhJrZXlTdGFraW5nQ29udHJhY3QiFGtleUZpbmFsaXphdGlvblN0YWdlIgtrZXlOZXh0UG9vbCILa2V5TmV4dFVzZXIiDmtleVN0YXJ0SGVpZ2h0IhFrZXlDdXJyZW50RXBvY2hVaSIQa2V5U3RhcnRIZWlnaHRVaSIda2V5RmluYWxpemF0aW9uU2hvdWxkQm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lbGYuCQCUCgIFA25pbAUEdW5pdAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgJhSwEIZmluYWxpemUABAJjZQkA/AcEBQR0aGlzAg9maW5hbGl6ZVdyYXBwZXIJAMwIAgAABQNuaWwFA25pbAMJAAACBQJjZQUCY2UJAJQKAgUDbmlsBQR1bml0CQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAmFLARRjb250YWluc05vZGVSRUFET05MWQICYXACYXQJAJQKAgUDbmlsCQECYXYCBQJhcAUCYXQCYUsBCmluc2VydE5vZGUCAmFwAmF0BAJhTwkBAmFMAQUCYUsDCQAAAgUCYU8FAmFPCQCUCgIJAQJhegIFAmFwBQJhdAUEdW5pdAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgJhSwEKZGVsZXRlTm9kZQICYXACYXQEAmFPCQECYUwBBQJhSwMJAAACBQJhTwUCYU8JAJQKAgkBAmFDAgUCYXAFAmF0BQR1bml0CQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAQJjZgECY2cABAJjaAQBTwkBAmFGAAMJAAECBQFPAgpCeXRlVmVjdG9yBAJhTQUBTwUCYU0DCQABAgUBTwIEVW5pdAgFAmNmD3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yCQD0AwMIBQJjZglib2R5Qnl0ZXMJAJEDAggFAmNmBnByb29mcwAABQJjaE88kmM=", "chainId": 84, "height": 2352704, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CTRfpKuBhPrSohAaLoopKiyvAn2htBoPoc2NepCTSjXs Next: Bjrq5ZKKTXBH7kVYjFrqip8Zue5XQsyunE7JCEV1FkxF 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 keyCurrentEpoch = makeString(["%s", "currentEpoch"], separator)
1717
1818 let keyMaxDepth = makeString(["%s", "maxDepth"], separator)
1919
2020 let keyVotingEmissionCandidateContract = makeString(["%s", "votingEmissionCandidateContract"], separator)
2121
2222 let keyFactoryContract = makeString(["%s", "factoryContract"], separator)
2323
2424 let keyBoostingContract = makeString(["%s", "boostingContract"], separator)
2525
2626 let keyStakingContract = makeString(["%s", "stakingContract"], separator)
2727
2828 let keyFinalizationStage = makeString(["%s", "finalizationStage"], separator)
2929
3030 let keyNextPool = makeString(["%s", "nextPool"], separator)
3131
3232 let keyNextUser = makeString(["%s", "nextUser"], separator)
3333
3434 let keyStartHeight = makeString(["%s", "startHeight"], separator)
3535
3636 let keyCurrentEpochUi = makeString(["%s", "currentEpochUi"], separator)
3737
3838 let keyStartHeightUi = makeString(["%s", "startHeightUi"], separator)
3939
4040 let keyFinalizationShouldBeForced = makeString(["%s", "force"], separator)
4141
4242 func keyStartHeightByEpoch (epoch) = makeString(["%s%d", "startHeight", toString(epoch)], separator)
4343
4444
4545 func keyFinalized (epoch) = makeString(["%s%d", "finalized", toString(epoch)], separator)
4646
4747
4848 func keyInList (pool) = {
4949 let $t015111551 = pool
5050 let amountAssetId = $t015111551._1
5151 let priceAssetId = $t015111551._2
5252 makeString(["%s%s%s", "inList", amountAssetId, priceAssetId], separator)
5353 }
5454
5555
5656 func keyUsed (address,epoch) = makeString(["%s%s%d", "used", toString(address), toString(epoch)], separator)
5757
5858
5959 func keyVote (pool,address,epoch) = {
6060 let $t018251865 = pool
6161 let amountAssetId = $t018251865._1
6262 let priceAssetId = $t018251865._2
6363 makeString(["%s%s%s%s%d", "vote", amountAssetId, priceAssetId, toString(address), toString(epoch)], separator)
6464 }
6565
6666
6767 func keyVotingResult (pool,epoch) = {
6868 let $t020472087 = pool
6969 let amountAssetId = $t020472087._1
7070 let priceAssetId = $t020472087._2
7171 makeString(["%s%s%s%d", "votingResult", amountAssetId, priceAssetId, toString(epoch)], separator)
7272 }
7373
7474
7575 func keyPoolShare (pool,epoch) = {
7676 let $t022522292 = pool
7777 let amountAssetId = $t022522292._1
7878 let priceAssetId = $t022522292._2
7979 makeString(["%s%s%s%d", "poolShare", amountAssetId, priceAssetId, toString(epoch)], separator)
8080 }
8181
8282
8383 func keyTotalVotes (epoch) = makeString(["%s%d", "totalVotes", toString(epoch)], separator)
8484
8585
8686 func getValueOrFail (address,key,type) = {
8787 let error = makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")
8888 valueOrErrorMessage( match type {
8989 case str: String =>
9090 getString(address, key)
9191 case int: Int =>
9292 getInteger(address, key)
9393 case _ =>
9494 throw("invalid entry type")
9595 }, error)
9696 }
9797
9898
9999 func getStrOrFail (address,key) = {
100100 let @ = getValueOrFail(address, key, "")
101101 if ($isInstanceOf(@, "String"))
102102 then @
103103 else throw(($getType(@) + " couldn't be cast to String"))
104104 }
105105
106106
107107 func getIntOrFail (address,key) = {
108108 let @ = getValueOrFail(address, key, 0)
109109 if ($isInstanceOf(@, "Int"))
110110 then @
111111 else throw(($getType(@) + " couldn't be cast to Int"))
112112 }
113113
114114
115115 func poolToString (pool) = ((pool._1 + separator) + pool._2)
116116
117117
118118 func stringToPool (str) = {
119119 let parts = split(str, separator)
120120 if ((size(parts) == 2))
121121 then $Tuple2(parts[0], parts[1])
122122 else throw("invalid pool string")
123123 }
124124
125125
126126 func getLpAssetByPoolAssets (amountAssetId,priceAssetId) = {
127127 func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
128128
129129 func keyMappingPoolAssetsToPoolContractAddress (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + toString(internalAmountAssetIdStr)) + "__") + toString(internalPriceAssetIdStr)) + "__mappings__poolAssets2PoolContract")
130130
131131 func keyMappingPoolContractToLPAsset (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
132132
133133 let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
134134 let amountAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amountAssetId))
135135 let priceAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAssetId))
136136 let poolContractAddress = getStrOrFail(factoryContract, keyMappingPoolAssetsToPoolContractAddress(amountAssetInternalId, priceAssetInternalId))
137137 let lpAssetId = getStrOrFail(factoryContract, keyMappingPoolContractToLPAsset(poolContractAddress))
138138 lpAssetId
139139 }
140140
141141
142142 func checkWxEmissionPoolLabel (pool) = {
143143 let $t045344574 = pool
144144 let amountAssetId = $t045344574._1
145145 let priceAssetId = $t045344574._2
146146 let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
147147 let @ = invoke(factoryContract, "checkWxEmissionPoolLabel", [amountAssetId, priceAssetId], nil)
148148 if ($isInstanceOf(@, "Boolean"))
149149 then @
150150 else throw(($getType(@) + " couldn't be cast to Boolean"))
151151 }
152152
153153
154154 let poolsListName = "pools"
155155
156156 func getVotesListName (pool) = {
157157 let $t048754915 = pool
158158 let amountAssetId = $t048754915._1
159159 let priceAssetId = $t048754915._2
160160 makeString(["votes", amountAssetId, priceAssetId], separator)
161161 }
162162
163163
164164 func keyListHead (listName) = {
165165 let meta = if ((listName == poolsListName))
166166 then "%s%s"
167167 else "%s%s%s%s"
168168 makeString([meta, listName, "head"], separator)
169169 }
170170
171171
172172 func keyListSize (listName) = {
173173 let meta = if ((listName == poolsListName))
174174 then "%s%s"
175175 else "%s%s%s%s"
176176 makeString([meta, listName, "size"], separator)
177177 }
178178
179179
180180 func keyListPrev (listName,id) = {
181181 let meta = if ((listName == poolsListName))
182182 then "%s%s%s%s"
183183 else "%s%s%s%s%s"
184184 makeString([meta, listName, id, "prev"], separator)
185185 }
186186
187187
188188 func keyListNext (listName,id) = {
189189 let meta = if ((listName == poolsListName))
190190 then "%s%s%s%s"
191191 else "%s%s%s%s%s"
192192 makeString([meta, listName, id, "next"], separator)
193193 }
194194
195195
196196 func containsNode (listName,id) = {
197197 let headOrUnit = getString(this, keyListHead(listName))
198198 let prevOrUnit = getString(this, keyListPrev(listName, id))
199199 let nextOrUnit = getString(this, keyListNext(listName, id))
200200 if (if ((id == valueOrElse(headOrUnit, "")))
201201 then true
202202 else (prevOrUnit != unit))
203203 then true
204204 else (nextOrUnit != unit)
205205 }
206206
207207
208208 func insertNodeActions (listName,id) = {
209209 let headOrUnit = getString(this, keyListHead(listName))
210210 let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
211211 let checkNode = if (!(containsNode(listName, id)))
212212 then true
213213 else throw("Node exists")
214214 if ((checkNode == checkNode))
215215 then (([IntegerEntry(keyListSize(listName), (listSize + 1))] ++ (if ((headOrUnit != unit))
216216 then [StringEntry(keyListNext(listName, id), value(headOrUnit)), StringEntry(keyListPrev(listName, value(headOrUnit)), id)]
217217 else nil)) ++ [StringEntry(keyListHead(listName), id)])
218218 else throw("Strict value is not equal to itself.")
219219 }
220220
221221
222222 func deleteNodeActions (listName,id) = {
223223 let headOrUnit = getString(this, keyListHead(listName))
224224 let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
225225 let prevOrUnit = getString(this, keyListPrev(listName, id))
226226 let nextOrUnit = getString(this, keyListNext(listName, id))
227227 ([IntegerEntry(keyListSize(listName), (listSize - 1))] ++ (if (if ((prevOrUnit != unit))
228228 then (nextOrUnit != unit)
229229 else false)
230230 then [StringEntry(keyListNext(listName, value(prevOrUnit)), value(nextOrUnit)), StringEntry(keyListPrev(listName, value(nextOrUnit)), value(prevOrUnit)), DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, id))]
231231 else if ((nextOrUnit != unit))
232232 then [StringEntry(keyListHead(listName), value(nextOrUnit)), DeleteEntry(keyListNext(listName, id)), DeleteEntry(keyListPrev(listName, value(nextOrUnit)))]
233233 else if ((prevOrUnit != unit))
234234 then [DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, value(prevOrUnit)))]
235235 else if ((id == valueOrElse(headOrUnit, "")))
236236 then [DeleteEntry(keyListHead(listName))]
237237 else throw(((("invalid node: " + listName) + ".") + id))))
238238 }
239239
240240
241241 func keyManagerPublicKey () = "%s__managerPublicKey"
242242
243243
244244 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
245245
246246
247247 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
248248 case s: String =>
249249 fromBase58String(s)
250250 case _: Unit =>
251251 unit
252252 case _ =>
253253 throw("Match error")
254254 }
255255
256256
257257 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
258258 case s: String =>
259259 fromBase58String(s)
260260 case _: Unit =>
261261 unit
262262 case _ =>
263263 throw("Match error")
264264 }
265265
266266
267267 let permissionDeniedError = throw("Permission denied")
268268
269269 func mustThis (i) = if ((i.caller == this))
270270 then true
271271 else permissionDeniedError
272272
273273
274274 func mustManager (i) = match managerPublicKeyOrUnit() {
275275 case pk: ByteVector =>
276276 if ((i.callerPublicKey == pk))
277277 then true
278278 else permissionDeniedError
279279 case _: Unit =>
280280 mustThis(i)
281281 case _ =>
282282 throw("Match error")
283283 }
284284
285285
286286 @Callable(i)
287287 func setManager (pendingManagerPublicKey) = {
288288 let checkCaller = mustManager(i)
289289 if ((checkCaller == checkCaller))
290290 then {
291291 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
292292 if ((checkManagerPublicKey == checkManagerPublicKey))
293293 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
294294 else throw("Strict value is not equal to itself.")
295295 }
296296 else throw("Strict value is not equal to itself.")
297297 }
298298
299299
300300
301301 @Callable(i)
302302 func confirmManager () = {
303303 let pm = pendingManagerPublicKeyOrUnit()
304304 let hasPM = if (isDefined(pm))
305305 then true
306306 else throw("No pending manager")
307307 if ((hasPM == hasPM))
308308 then {
309309 let checkPM = if ((i.callerPublicKey == value(pm)))
310310 then true
311311 else throw("You are not pending manager")
312312 if ((checkPM == checkPM))
313313 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
314314 else throw("Strict value is not equal to itself.")
315315 }
316316 else throw("Strict value is not equal to itself.")
317317 }
318318
319319
320320
321321 @Callable(i)
322322 func getUserGwxAmountAtHeight (userAddress,targetHeight) = {
323323 let boostingContractAddress = valueOrErrorMessage(addressFromString(getStrOrFail(this, keyBoostingContract)), "invalid boosting contract address")
324324 $Tuple2(nil, {
325325 let @ = invoke(boostingContractAddress, "getUserGwxAmountAtHeightREADONLY", [userAddress, targetHeight], nil)
326326 if ($isInstanceOf(@, "Int"))
327327 then @
328328 else throw(($getType(@) + " couldn't be cast to Int"))
329329 })
330330 }
331331
332332
333333
334334 @Callable(i)
335335 func constructor (factoryContract,votingEmissionCandidateContract,boostingContract,stakingContract,epochLength) = {
336336 let checks = [mustManager(i), if ((addressFromString(factoryContract) != unit))
337337 then true
338338 else "invalid factory contract address", if ((addressFromString(votingEmissionCandidateContract) != unit))
339339 then true
340340 else "invalid voting emission candidate contract address", if ((addressFromString(boostingContract) != unit))
341341 then true
342342 else "invalid boosting contract address", if ((addressFromString(stakingContract) != unit))
343343 then true
344344 else "invalid staking contract address", if ((epochLength > 0))
345345 then true
346346 else throw("invalid epoch length")]
347347 if ((checks == checks))
348348 then $Tuple2([StringEntry(keyFactoryContract, factoryContract), StringEntry(keyVotingEmissionCandidateContract, votingEmissionCandidateContract), StringEntry(keyBoostingContract, boostingContract), StringEntry(keyStakingContract, stakingContract), IntegerEntry(keyEpochLength, epochLength)], unit)
349349 else throw("Strict value is not equal to itself.")
350350 }
351351
352352
353353
354354 @Callable(i)
355355 func create (amountAssetId,priceAssetId) = {
356356 let checks = [if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionCandidateContract), "")))
357357 then true
358358 else mustManager(i)]
359359 if ((checks == checks))
360360 then {
361361 let pool = $Tuple2(amountAssetId, priceAssetId)
362362 let inListActions = ([BooleanEntry(keyInList(pool), true)] ++ insertNodeActions(poolsListName, poolToString(pool)))
363363 let currentEpochIsNotDefined = (getInteger(this, keyCurrentEpoch) == unit)
364364 let startHeightActions = if (currentEpochIsNotDefined)
365365 then {
366366 let epoch = 0
367367 [IntegerEntry(keyCurrentEpoch, epoch), IntegerEntry(keyStartHeightByEpoch(epoch), height), IntegerEntry(keyStartHeight, height), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, height)]
368368 }
369369 else nil
370370 $Tuple2((inListActions ++ startHeightActions), unit)
371371 }
372372 else throw("Strict value is not equal to itself.")
373373 }
374374
375375
376376
377377 @Callable(i)
378378 func vote (amountAssetId,priceAssetId,amount) = {
379379 let pool = $Tuple2(amountAssetId, priceAssetId)
380380 let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0)
381381 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
382382 let epochLength = getIntOrFail(this, keyEpochLength)
383383 let endHeight = (startHeight + epochLength)
384384 let finalizationStageOrUnit = getInteger(this, keyFinalizationStage)
385385 let used = valueOrElse(getInteger(this, keyUsed(i.caller, epoch)), 0)
386386 let vote = valueOrElse(getInteger(this, keyVote(pool, i.caller, epoch)), 0)
387387 let poolResult = valueOrElse(getInteger(this, keyVotingResult(pool, epoch)), 0)
388388 let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(epoch)), 0)
389389 let gwxAmountAtEndTotal = {
390390 let @ = invoke(this, "getUserGwxAmountAtHeight", [toBase58String(i.caller.bytes), endHeight], nil)
391391 if ($isInstanceOf(@, "Int"))
392392 then @
393393 else throw(($getType(@) + " couldn't be cast to Int"))
394394 }
395395 let available = (gwxAmountAtEndTotal - used)
396396 let newVote = (vote + amount)
397397 let wxEmission = checkWxEmissionPoolLabel(pool)
398398 let checks = [if ((getBoolean(keyInList(pool)) != unit))
399399 then true
400400 else throw("invalid assets"), if ((endHeight > height))
401401 then true
402402 else throw("invalid height"), if ((finalizationStageOrUnit == unit))
403403 then true
404404 else throw("finalization in progress"), if ((gwxAmountAtEndTotal > 0))
405405 then true
406406 else throw("you do not have gWX"), if (if ((amount > 0))
407407 then (available >= amount)
408408 else false)
409409 then true
410410 else throw("invalid amount"), if (wxEmission)
411411 then true
412412 else throw("pool hasn't WX_EMISSION label")]
413413 if ((checks == checks))
414414 then {
415415 let votesListName = getVotesListName(pool)
416416 let userAddressStr = toString(i.caller)
417417 let votesListActions = if (containsNode(votesListName, userAddressStr))
418418 then nil
419419 else insertNodeActions(votesListName, userAddressStr)
420420 $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)
421421 }
422422 else throw("Strict value is not equal to itself.")
423423 }
424424
425425
426426
427427 @Callable(i)
428428 func cancelVote (amountAssetId,priceAssetId) = {
429429 let pool = $Tuple2(amountAssetId, priceAssetId)
430430 let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0)
431431 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
432432 let epochLength = getIntOrFail(this, keyEpochLength)
433433 let endHeight = (startHeight + epochLength)
434434 let finalizationStageOrUnit = getInteger(this, keyFinalizationStage)
435435 let used = valueOrElse(getInteger(this, keyUsed(i.caller, epoch)), 0)
436436 let vote = valueOrElse(getInteger(this, keyVote(pool, i.caller, epoch)), 0)
437437 let poolResult = valueOrElse(getInteger(this, keyVotingResult(pool, epoch)), 0)
438438 let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(epoch)), 0)
439439 let checks = [if ((getBoolean(keyInList(pool)) != unit))
440440 then true
441441 else throw("invalid assets"), if ((endHeight > height))
442442 then true
443443 else throw("invalid height"), if ((finalizationStageOrUnit == unit))
444444 then true
445445 else throw("finalization in progress"), if ((vote > 0))
446446 then true
447447 else throw("no vote")]
448448 if ((checks == checks))
449449 then {
450450 let votesListName = getVotesListName(pool)
451451 let userAddressStr = toString(i.caller)
452452 $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)
453453 }
454454 else throw("Strict value is not equal to itself.")
455455 }
456456
457457
458458
459459 @Callable(i)
460460 func setEpochLength (newEpochLength) = {
461461 let checks = [mustManager(i), if ((newEpochLength > 0))
462462 then true
463463 else throw("invalid epoch length")]
464464 if ((checks == checks))
465465 then $Tuple2([IntegerEntry(keyEpochLength, newEpochLength)], unit)
466466 else throw("Strict value is not equal to itself.")
467467 }
468468
469469
470470
471471 @Callable(i)
472472 func setMaxDepth (newMaxDepth) = {
473473 let checks = [mustManager(i), if ((newMaxDepth > 0))
474474 then true
475475 else throw("invalid max depth")]
476476 if ((checks == checks))
477477 then $Tuple2([IntegerEntry(keyMaxDepth, newMaxDepth)], unit)
478478 else throw("Strict value is not equal to itself.")
479479 }
480480
481481
482482
483483 @Callable(i)
484484 func processVoteINTERNAL (poolStr,userAddressStr) = {
485485 let checkCaller = mustThis(i)
486486 if ((checkCaller == checkCaller))
487487 then {
488488 let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), ("processVoteINTERNAL: invalid user address " + userAddressStr))
489489 let epoch = getIntOrFail(this, keyCurrentEpoch)
490490 let epochPrevious = (epoch - 1)
491491 let epochLength = getIntOrFail(this, keyEpochLength)
492492 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
493493 let endHeight = (startHeight + epochLength)
494494 let startHeightPrevious = getIntOrFail(this, keyStartHeightByEpoch(epochPrevious))
495495 let endHeightPrevious = (startHeightPrevious + epochLength)
496496 let checkTargetEpoch = if ((epochPrevious >= 0))
497497 then true
498498 else throw("processVoteINTERNAL: invalid previous epoch")
499499 if ((checkTargetEpoch == checkTargetEpoch))
500500 then {
501501 let pool = stringToPool(poolStr)
502502 let $t01727017310 = pool
503503 let amountAssetId = $t01727017310._1
504504 let priceAssetId = $t01727017310._2
505505 let wxEmission = checkWxEmissionPoolLabel(pool)
506506 let gwxAmountAtEndTotal = {
507507 let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeight], nil)
508508 if ($isInstanceOf(@, "Int"))
509509 then @
510510 else throw(($getType(@) + " couldn't be cast to Int"))
511511 }
512512 let gwxAmountAtEndTotalPrevious = {
513513 let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeightPrevious], nil)
514514 if ($isInstanceOf(@, "Int"))
515515 then @
516516 else throw(($getType(@) + " couldn't be cast to Int"))
517517 }
518518 let totalVotes = valueOrElse(getInteger(keyTotalVotes(epoch)), 0)
519519 let votingResult = valueOrElse(getInteger(keyVotingResult(pool, epoch)), 0)
520520 let votePrevious = valueOrErrorMessage(getInteger(keyVote(pool, userAddress, epochPrevious)), (((("processVoteINTERNAL " + poolStr) + " ") + userAddressStr) + ": no previous vote"))
521521 let used = valueOrElse(getInteger(this, keyUsed(userAddress, epoch)), 0)
522522 let newVote = if ((gwxAmountAtEndTotalPrevious > 0))
523523 then fraction(votePrevious, gwxAmountAtEndTotal, gwxAmountAtEndTotalPrevious)
524524 else 0
525525 let actions = if (if ((newVote > 0))
526526 then wxEmission
527527 else false)
528528 then [IntegerEntry(keyVote(pool, userAddress, epoch), newVote), IntegerEntry(keyTotalVotes(epoch), (totalVotes + newVote)), IntegerEntry(keyVotingResult(pool, epoch), (votingResult + newVote)), IntegerEntry(keyUsed(userAddress, epoch), (used + newVote))]
529529 else deleteNodeActions(getVotesListName(pool), userAddressStr)
530530 $Tuple2(actions, unit)
531531 }
532532 else throw("Strict value is not equal to itself.")
533533 }
534534 else throw("Strict value is not equal to itself.")
535535 }
536536
537537
538538
539539 @Callable(i)
540540 func processPoolINTERNAL (poolStr,force) = {
541541 let checkCaller = mustThis(i)
542542 if ((checkCaller == checkCaller))
543543 then {
544544 let targetEpoch = {
545545 let currentEpoch = getIntOrFail(this, keyCurrentEpoch)
546546 if (force)
547547 then currentEpoch
548548 else (currentEpoch - 1)
549549 }
550550 let checkTargetEpoch = if ((targetEpoch >= 0))
551551 then true
552552 else throw("processPoolINTERNAL: invalid target epoch")
553553 if ((checkTargetEpoch == checkTargetEpoch))
554554 then {
555555 let pool = stringToPool(poolStr)
556556 let $t01903619076 = pool
557557 let amountAssetId = $t01903619076._1
558558 let priceAssetId = $t01903619076._2
559559 let stakingContract = addressFromStringValue(getStrOrFail(this, keyStakingContract))
560560 let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
561561 let lpAssetId = getLpAssetByPoolAssets(amountAssetId, priceAssetId)
562562 let r = {
563563 let @ = invoke(stakingContract, "usersListTraversal", [lpAssetId], nil)
564564 if ($isInstanceOf(@, "Boolean"))
565565 then @
566566 else throw(($getType(@) + " couldn't be cast to Boolean"))
567567 }
568568 if ((r == r))
569569 then if (r)
570570 then $Tuple2(nil, true)
571571 else {
572572 let wxEmission = checkWxEmissionPoolLabel(pool)
573573 let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(targetEpoch)), 0)
574574 let votingResult = valueOrElse(getInteger(this, keyVotingResult(pool, targetEpoch)), 0)
575575 let share = if (if ((totalVotes == 0))
576576 then true
577577 else !(wxEmission))
578578 then 0
579579 else fraction(votingResult, poolWeightMult, totalVotes)
580580 let modifyWeightInv = invoke(factoryContract, "modifyWeight", [lpAssetId, share], nil)
581581 if ((modifyWeightInv == modifyWeightInv))
582582 then {
583583 let poolsListActions = if (if (wxEmission)
584584 then true
585585 else force)
586586 then nil
587587 else ([DeleteEntry(keyInList(pool))] ++ deleteNodeActions(poolsListName, poolStr))
588588 $Tuple2(([IntegerEntry(keyPoolShare(pool, targetEpoch), share)] ++ poolsListActions), false)
589589 }
590590 else throw("Strict value is not equal to itself.")
591591 }
592592 else throw("Strict value is not equal to itself.")
593593 }
594594 else throw("Strict value is not equal to itself.")
595595 }
596596 else throw("Strict value is not equal to itself.")
597597 }
598598
599599
600600
601601 @Callable(i)
602602 func finalizeHelper () = {
603603 let force = valueOrElse(getBoolean(keyFinalizationShouldBeForced), false)
604604 let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0)
605605 let previousEpoch = (epoch - 1)
606606 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
607607 let epochLength = getIntOrFail(this, keyEpochLength)
608608 let endHeight = (startHeight + epochLength)
609609 let finalizationStageOrUnit = getInteger(this, keyFinalizationStage)
610610 if (if (if ((height >= endHeight))
611611 then (finalizationStageOrUnit == unit)
612612 else false)
613613 then !(force)
614614 else false)
615615 then {
616616 let newEpoch = (epoch + 1)
617617 $Tuple2([IntegerEntry(keyStartHeightByEpoch(newEpoch), height), IntegerEntry(keyStartHeight, height), IntegerEntry(keyCurrentEpoch, newEpoch), IntegerEntry(keyFinalizationStage, finalizationStageTotal)], true)
618618 }
619619 else if (if (force)
620620 then (finalizationStageOrUnit == unit)
621621 else false)
622622 then $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares)], true)
623623 else if ((finalizationStageOrUnit == unit))
624624 then $Tuple2(nil, false)
625625 else if ((finalizationStageOrUnit == finalizationStageTotal))
626626 then {
627627 let poolOrUnit = getString(keyNextPool)
628628 let userOrUnit = getString(keyNextUser)
629629 match poolOrUnit {
630630 case _: Unit =>
631631 match getString(keyListHead(poolsListName)) {
632632 case _: Unit =>
633633 $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true)
634634 case poolsHeadStr: String =>
635635 $Tuple2([StringEntry(keyNextPool, poolsHeadStr)], true)
636636 case _ =>
637637 throw("Match error")
638638 }
639639 case poolStr: String =>
640640 let pool = stringToPool(poolStr)
641641 let nextUserOrUnit = match userOrUnit {
642642 case _: Unit =>
643643 getString(keyListHead(getVotesListName(pool)))
644644 case user: String =>
645645 let next = getString(keyListNext(getVotesListName(pool), user))
646646 if ((next == next))
647647 then {
648648 let processVoteInv = invoke(this, "processVoteINTERNAL", [poolStr, user], nil)
649649 if ((processVoteInv == processVoteInv))
650650 then next
651651 else throw("Strict value is not equal to itself.")
652652 }
653653 else throw("Strict value is not equal to itself.")
654654 case _ =>
655655 throw("Match error")
656656 }
657657 match nextUserOrUnit {
658658 case _: Unit =>
659659 let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr))
660660 match nextPoolOrUnit {
661661 case _: Unit =>
662662 $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true)
663663 case s: String =>
664664 $Tuple2([StringEntry(keyNextPool, s), DeleteEntry(keyNextUser)], true)
665665 case _ =>
666666 throw("Match error")
667667 }
668668 case nextUser: String =>
669669 $Tuple2([StringEntry(keyNextUser, nextUser)], true)
670670 case _ =>
671671 throw("Match error")
672672 }
673673 case _ =>
674674 throw("Match error")
675675 }
676676 }
677677 else if ((finalizationStageOrUnit == finalizationStageShares))
678678 then {
679679 let poolOrUnit = getString(keyNextPool)
680680 match poolOrUnit {
681681 case _: Unit =>
682682 match getString(keyListHead(poolsListName)) {
683683 case _: Unit =>
684684 let actions = if (force)
685685 then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced)]
686686 else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight)]
687687 $Tuple2(actions, true)
688688 case nextPoolStr: String =>
689689 $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true)
690690 case _ =>
691691 throw("Match error")
692692 }
693693 case poolStr: String =>
694694 let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr))
695695 if ((nextPoolOrUnit == nextPoolOrUnit))
696696 then {
697697 let r = {
698698 let @ = invoke(this, "processPoolINTERNAL", [poolStr, force], nil)
699699 if ($isInstanceOf(@, "Boolean"))
700700 then @
701701 else throw(($getType(@) + " couldn't be cast to Boolean"))
702702 }
703703 if ((r == r))
704704 then if (r)
705705 then $Tuple2(nil, true)
706706 else match nextPoolOrUnit {
707707 case _: Unit =>
708708 let actions = if (force)
709709 then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced), DeleteEntry(keyNextPool)]
710710 else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight), DeleteEntry(keyNextPool)]
711711 $Tuple2(actions, true)
712712 case nextPoolStr: String =>
713713 $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true)
714714 case _ =>
715715 throw("Match error")
716716 }
717717 else throw("Strict value is not equal to itself.")
718718 }
719719 else throw("Strict value is not equal to itself.")
720720 case _ =>
721721 throw("Match error")
722722 }
723723 }
724724 else throw("finalization is broken")
725725 }
726726
727727
728728
729729 @Callable(i)
730730 func finalizeWrapper (counter) = {
731731 let result = {
732732 let @ = invoke(this, "finalizeHelper", nil, nil)
733733 if ($isInstanceOf(@, "Boolean"))
734734 then @
735735 else throw(($getType(@) + " couldn't be cast to Boolean"))
736736 }
737737 if ((result == result))
738738 then if (!(result))
739739 then if ((counter == 0))
740740 then throw("Current voting is not over yet")
741741 else $Tuple2(nil, unit)
742742 else {
743743 let maxDepth = valueOrElse(getInteger(this, keyMaxDepth), maxDepthDefault)
744744 if ((maxDepth > counter))
745745 then {
746746 let inv = invoke(this, "finalizeWrapper", [(counter + 1)], nil)
747747 if ((inv == inv))
748748 then $Tuple2(nil, unit)
749749 else throw("Strict value is not equal to itself.")
750750 }
751751 else $Tuple2(nil, unit)
752752 }
753753 else throw("Strict value is not equal to itself.")
754754 }
755755
756756
757757
758758 @Callable(i)
759759 func finalize () = {
760760 let inv = invoke(this, "finalizeWrapper", [0], nil)
761761 if ((inv == inv))
762762 then $Tuple2(nil, unit)
763763 else throw("Strict value is not equal to itself.")
764764 }
765765
766766
767767
768768 @Callable(i)
769769 func containsNodeREADONLY (listName,id) = $Tuple2(nil, containsNode(listName, id))
770770
771771
772772
773773 @Callable(i)
774774 func insertNode (listName,id) = {
775775 let checkCaller = mustManager(i)
776776 if ((checkCaller == checkCaller))
777777 then $Tuple2(insertNodeActions(listName, id), unit)
778778 else throw("Strict value is not equal to itself.")
779779 }
780780
781781
782782
783783 @Callable(i)
784784 func deleteNode (listName,id) = {
785785 let checkCaller = mustManager(i)
786786 if ((checkCaller == checkCaller))
787787 then $Tuple2(deleteNodeActions(listName, id), unit)
788788 else throw("Strict value is not equal to itself.")
789789 }
790790
791791
792792 @Verifier(tx)
793793 func verify () = {
794794 let targetPublicKey = match managerPublicKeyOrUnit() {
795795 case pk: ByteVector =>
796796 pk
797797 case _: Unit =>
798798 tx.senderPublicKey
799799 case _ =>
800800 throw("Match error")
801801 }
802802 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
803803 }
804804

github/deemru/w8io/026f985 
75.66 ms