tx · 5onWkaJRBHfGjUcqGk4tUz1cA8dbDDN5R6GxnRP47dPB

3MyVvNfXht9piazyf1e5BVFsqv1R7z5cWJL:  -0.02700000 Waves

2022.06.22 15:39 [2107616] smart account 3MyVvNfXht9piazyf1e5BVFsqv1R7z5cWJL > SELF 0.00000000 Waves

{ "type": 13, "id": "5onWkaJRBHfGjUcqGk4tUz1cA8dbDDN5R6GxnRP47dPB", "fee": 2700000, "feeAssetId": null, "timestamp": 1655901585247, "version": 1, "sender": "3MyVvNfXht9piazyf1e5BVFsqv1R7z5cWJL", "senderPublicKey": "DnPyGWCgpQChvoQrnXQRcC9FtN32mPGrcog2wcKHdkVn", "proofs": [ "3uruPgJMtyCvacfoaKaUsXwNkMt5W6Gonc8YLukrhvo342uEy6pg5PQKaeCJWiAtXj1RgCXiiXULLCPdaUg9TLCf" ], "script": "base64:BgJgCAISAwoBCBIAEgQKAggBEgcKBQgICAgBEgQKAggIEgUKAwgIARIECgIICBIDCgEBEgMKAQESBAoCCAgSAwoBCBIAEgMKAQESABIDCgEIEgQKAggIEgQKAggIEgQKAggIMAAJc2VwYXJhdG9yAgJfXwAOcG9vbFdlaWdodE11bHQAgMLXLwAPbWF4RGVwdGhEZWZhdWx0AAoAFmZpbmFsaXphdGlvblN0YWdlVG90YWwAAAAXZmluYWxpemF0aW9uU3RhZ2VTaGFyZXMAAQAOa2V5RXBvY2hMZW5ndGgJALkJAgkAzAgCAgIlcwkAzAgCAgtlcG9jaExlbmd0aAUDbmlsBQlzZXBhcmF0b3IAD2tleUN1cnJlbnRFcG9jaAkAuQkCCQDMCAICAiVzCQDMCAICDGN1cnJlbnRFcG9jaAUDbmlsBQlzZXBhcmF0b3IAC2tleU1heERlcHRoCQC5CQIJAMwIAgICJXMJAMwIAgIIbWF4RGVwdGgFA25pbAUJc2VwYXJhdG9yACJrZXlWb3RpbmdFbWlzc2lvbkNhbmRpZGF0ZUNvbnRyYWN0CQC5CQIJAMwIAgICJXMJAMwIAgIfdm90aW5nR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y2gwAgpCeXRlVmVjdG9yBAJwawUHJG1hdGNoMAUCcGsDCQABAgUHJG1hdGNoMAIEVW5pdAgFAnR4D3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQ90YXJnZXRQdWJsaWNLZXmSfpi/", "chainId": 84, "height": 2107616, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: G8yejSpwF5hyzLV1QvMVZjFfe1Gs1HZ9pWqeogxv5CHX Next: AXzJC9BUQaA72N1C1gr4GTjq79rfc4Xrgevf5Zt8QNGy Diff:
OldNewDifferences
121121 }
122122
123123
124+func getLpAssetByPoolAssets (amountAssetId,priceAssetId) = {
125+ func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
126+
127+ func keyMappingPoolAssetsToPoolContractAddress (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + toString(internalAmountAssetIdStr)) + "__") + toString(internalPriceAssetIdStr)) + "__mappings__poolAssets2PoolContract")
128+
129+ func keyMappingPoolContractToLPAsset (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
130+
131+ let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
132+ let amountAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amountAssetId))
133+ let priceAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAssetId))
134+ let poolContractAddress = getStrOrFail(factoryContract, keyMappingPoolAssetsToPoolContractAddress(amountAssetInternalId, priceAssetInternalId))
135+ let lpAssetId = getStrOrFail(factoryContract, keyMappingPoolContractToLPAsset(poolContractAddress))
136+ lpAssetId
137+ }
138+
139+
124140 let poolsListName = "pools"
125141
126142 func getVotesListName (pool) = {
127- let $t033233363 = pool
128- let amountAssetId = $t033233363._1
129- let priceAssetId = $t033233363._2
143+ let $t045034543 = pool
144+ let amountAssetId = $t045034543._1
145+ let priceAssetId = $t045034543._2
130146 makeString(["votes", amountAssetId, priceAssetId], separator)
131147 }
132148
507523 if ((checkTargetEpoch == checkTargetEpoch))
508524 then {
509525 let pool = stringToPool(poolStr)
510- let $t01703017070 = pool
511- let amountAssetId = $t01703017070._1
512- let priceAssetId = $t01703017070._2
526+ let $t01821018250 = pool
527+ let amountAssetId = $t01821018250._1
528+ let priceAssetId = $t01821018250._2
513529 let stakingContract = addressFromStringValue(getStrOrFail(this, keyStakingContract))
514530 let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
515- let $t01724817422 = {
516- let @ = invoke(factoryContract, "getPoolContractAddressAndLpAssetByAssetsREADONLY", [amountAssetId, priceAssetId], nil)
517- if ($isInstanceOf(@, "(String, String)"))
518- then @
519- else throw(($getType(invoke(factoryContract, "getPoolContractAddressAndLpAssetByAssetsREADONLY", [amountAssetId, priceAssetId], nil)) + " couldn't be cast to (String, String)"))
520- }
521- let poolContractAddress = $t01724817422._1
522- let lpAssetId = $t01724817422._2
531+ let lpAssetId = getLpAssetByPoolAssets(amountAssetId, priceAssetId)
523532 let r = {
524533 let @ = invoke(stakingContract, "usersListTraversal", [lpAssetId], nil)
525534 if ($isInstanceOf(@, "Boolean"))
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 func keyStartHeightByEpoch (epoch) = makeString(["%s%d", "startHeight", toString(epoch)], separator)
4141
4242
4343 func keyFinalized (epoch) = makeString(["%s%d", "finalized", toString(epoch)], separator)
4444
4545
4646 func keyInList (pool) = {
4747 let $t014361476 = pool
4848 let amountAssetId = $t014361476._1
4949 let priceAssetId = $t014361476._2
5050 makeString(["%s%s%s", "inList", amountAssetId, priceAssetId], separator)
5151 }
5252
5353
5454 func keyUsed (address,epoch) = makeString(["%s%s%d", "used", toString(address), toString(epoch)], separator)
5555
5656
5757 func keyVote (pool,address,epoch) = {
5858 let $t017501790 = pool
5959 let amountAssetId = $t017501790._1
6060 let priceAssetId = $t017501790._2
6161 makeString(["%s%s%s%s%d", "vote", amountAssetId, priceAssetId, toString(address), toString(epoch)], separator)
6262 }
6363
6464
6565 func keyVotingResult (pool,epoch) = {
6666 let $t019722012 = pool
6767 let amountAssetId = $t019722012._1
6868 let priceAssetId = $t019722012._2
6969 makeString(["%s%s%s%d", "votingResult", amountAssetId, priceAssetId, toString(epoch)], separator)
7070 }
7171
7272
7373 func keyPoolShare (pool,epoch) = {
7474 let $t021772217 = pool
7575 let amountAssetId = $t021772217._1
7676 let priceAssetId = $t021772217._2
7777 makeString(["%s%s%s%d", "poolShare", amountAssetId, priceAssetId, toString(epoch)], separator)
7878 }
7979
8080
8181 func keyTotalVotes (epoch) = makeString(["%s%d", "totalVotes", toString(epoch)], separator)
8282
8383
8484 func getValueOrFail (address,key,type) = {
8585 let error = makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")
8686 valueOrErrorMessage( match type {
8787 case str: String =>
8888 getString(address, key)
8989 case int: Int =>
9090 getInteger(address, key)
9191 case _ =>
9292 throw("invalid entry type")
9393 }, error)
9494 }
9595
9696
9797 func getStrOrFail (address,key) = {
9898 let @ = getValueOrFail(address, key, "")
9999 if ($isInstanceOf(@, "String"))
100100 then @
101101 else throw(($getType(getValueOrFail(address, key, "")) + " couldn't be cast to String"))
102102 }
103103
104104
105105 func getIntOrFail (address,key) = {
106106 let @ = getValueOrFail(address, key, 0)
107107 if ($isInstanceOf(@, "Int"))
108108 then @
109109 else throw(($getType(getValueOrFail(address, key, 0)) + " couldn't be cast to Int"))
110110 }
111111
112112
113113 func poolToString (pool) = ((pool._1 + separator) + pool._2)
114114
115115
116116 func stringToPool (str) = {
117117 let parts = split(str, separator)
118118 if ((size(parts) == 2))
119119 then $Tuple2(parts[0], parts[1])
120120 else throw("invalid pool string")
121121 }
122122
123123
124+func getLpAssetByPoolAssets (amountAssetId,priceAssetId) = {
125+ func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
126+
127+ func keyMappingPoolAssetsToPoolContractAddress (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + toString(internalAmountAssetIdStr)) + "__") + toString(internalPriceAssetIdStr)) + "__mappings__poolAssets2PoolContract")
128+
129+ func keyMappingPoolContractToLPAsset (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
130+
131+ let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
132+ let amountAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amountAssetId))
133+ let priceAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAssetId))
134+ let poolContractAddress = getStrOrFail(factoryContract, keyMappingPoolAssetsToPoolContractAddress(amountAssetInternalId, priceAssetInternalId))
135+ let lpAssetId = getStrOrFail(factoryContract, keyMappingPoolContractToLPAsset(poolContractAddress))
136+ lpAssetId
137+ }
138+
139+
124140 let poolsListName = "pools"
125141
126142 func getVotesListName (pool) = {
127- let $t033233363 = pool
128- let amountAssetId = $t033233363._1
129- let priceAssetId = $t033233363._2
143+ let $t045034543 = pool
144+ let amountAssetId = $t045034543._1
145+ let priceAssetId = $t045034543._2
130146 makeString(["votes", amountAssetId, priceAssetId], separator)
131147 }
132148
133149
134150 func keyListHead (listName) = {
135151 let meta = if ((listName == poolsListName))
136152 then "%s%s"
137153 else "%s%s%s%s"
138154 makeString([meta, listName, "head"], separator)
139155 }
140156
141157
142158 func keyListSize (listName) = {
143159 let meta = if ((listName == poolsListName))
144160 then "%s%s"
145161 else "%s%s%s%s"
146162 makeString([meta, listName, "size"], separator)
147163 }
148164
149165
150166 func keyListPrev (listName,id) = {
151167 let meta = if ((listName == poolsListName))
152168 then "%s%s%s%s"
153169 else "%s%s%s%s%s"
154170 makeString([meta, listName, id, "prev"], separator)
155171 }
156172
157173
158174 func keyListNext (listName,id) = {
159175 let meta = if ((listName == poolsListName))
160176 then "%s%s%s%s"
161177 else "%s%s%s%s%s"
162178 makeString([meta, listName, id, "next"], separator)
163179 }
164180
165181
166182 func containsNode (listName,id) = {
167183 let headOrUnit = getString(this, keyListHead(listName))
168184 let prevOrUnit = getString(this, keyListPrev(listName, id))
169185 let nextOrUnit = getString(this, keyListNext(listName, id))
170186 if (if ((id == valueOrElse(headOrUnit, "")))
171187 then true
172188 else (prevOrUnit != unit))
173189 then true
174190 else (nextOrUnit != unit)
175191 }
176192
177193
178194 func insertNodeActions (listName,id) = {
179195 let headOrUnit = getString(this, keyListHead(listName))
180196 let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
181197 let checkNode = if (!(containsNode(listName, id)))
182198 then true
183199 else throw("Node exists")
184200 if ((checkNode == checkNode))
185201 then (([IntegerEntry(keyListSize(listName), (listSize + 1))] ++ (if ((headOrUnit != unit))
186202 then [StringEntry(keyListNext(listName, id), value(headOrUnit)), StringEntry(keyListPrev(listName, value(headOrUnit)), id)]
187203 else nil)) ++ [StringEntry(keyListHead(listName), id)])
188204 else throw("Strict value is not equal to itself.")
189205 }
190206
191207
192208 func deleteNodeActions (listName,id) = {
193209 let headOrUnit = getString(this, keyListHead(listName))
194210 let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
195211 let prevOrUnit = getString(this, keyListPrev(listName, id))
196212 let nextOrUnit = getString(this, keyListNext(listName, id))
197213 ([IntegerEntry(keyListSize(listName), (listSize - 1))] ++ (if (if ((prevOrUnit != unit))
198214 then (nextOrUnit != unit)
199215 else false)
200216 then [StringEntry(keyListNext(listName, value(prevOrUnit)), value(nextOrUnit)), StringEntry(keyListPrev(listName, value(nextOrUnit)), value(prevOrUnit)), DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, id))]
201217 else if ((nextOrUnit != unit))
202218 then [StringEntry(keyListHead(listName), value(nextOrUnit)), DeleteEntry(keyListNext(listName, id)), DeleteEntry(keyListPrev(listName, value(nextOrUnit)))]
203219 else if ((prevOrUnit != unit))
204220 then [DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, value(prevOrUnit)))]
205221 else if ((id == valueOrElse(headOrUnit, "")))
206222 then [DeleteEntry(keyListHead(listName))]
207223 else throw(((("invalid node: " + listName) + ".") + id))))
208224 }
209225
210226
211227 func keyManagerPublicKey () = "%s__managerPublicKey"
212228
213229
214230 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
215231
216232
217233 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
218234 case s: String =>
219235 fromBase58String(s)
220236 case _: Unit =>
221237 unit
222238 case _ =>
223239 throw("Match error")
224240 }
225241
226242
227243 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
228244 case s: String =>
229245 fromBase58String(s)
230246 case _: Unit =>
231247 unit
232248 case _ =>
233249 throw("Match error")
234250 }
235251
236252
237253 let permissionDeniedError = throw("Permission denied")
238254
239255 func mustThis (i) = if ((i.caller == this))
240256 then true
241257 else permissionDeniedError
242258
243259
244260 func mustManager (i) = match managerPublicKeyOrUnit() {
245261 case pk: ByteVector =>
246262 if ((i.callerPublicKey == pk))
247263 then true
248264 else permissionDeniedError
249265 case _: Unit =>
250266 mustThis(i)
251267 case _ =>
252268 throw("Match error")
253269 }
254270
255271
256272 @Callable(i)
257273 func setManager (pendingManagerPublicKey) = {
258274 let checkCaller = mustManager(i)
259275 if ((checkCaller == checkCaller))
260276 then {
261277 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
262278 if ((checkManagerPublicKey == checkManagerPublicKey))
263279 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
264280 else throw("Strict value is not equal to itself.")
265281 }
266282 else throw("Strict value is not equal to itself.")
267283 }
268284
269285
270286
271287 @Callable(i)
272288 func confirmManager () = {
273289 let pm = pendingManagerPublicKeyOrUnit()
274290 let hasPM = if (isDefined(pm))
275291 then true
276292 else throw("No pending manager")
277293 if ((hasPM == hasPM))
278294 then {
279295 let checkPM = if ((i.callerPublicKey == value(pm)))
280296 then true
281297 else throw("You are not pending manager")
282298 if ((checkPM == checkPM))
283299 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
284300 else throw("Strict value is not equal to itself.")
285301 }
286302 else throw("Strict value is not equal to itself.")
287303 }
288304
289305
290306
291307 @Callable(i)
292308 func getUserGwxAmountAtHeight (userAddress,targetHeight) = {
293309 let boostingContractAddress = valueOrErrorMessage(addressFromString(getStrOrFail(this, keyBoostingContract)), "invalid boosting contract address")
294310 $Tuple2(nil, {
295311 let @ = invoke(boostingContractAddress, "getUserGwxAmountAtHeightREADONLY", [userAddress, targetHeight], nil)
296312 if ($isInstanceOf(@, "Int"))
297313 then @
298314 else throw(($getType(invoke(boostingContractAddress, "getUserGwxAmountAtHeightREADONLY", [userAddress, targetHeight], nil)) + " couldn't be cast to Int"))
299315 })
300316 }
301317
302318
303319
304320 @Callable(i)
305321 func constructor (factoryContract,votingEmissionCandidateContract,boostingContract,stakingContract,epochLength) = {
306322 let cheks = [mustManager(i), if ((addressFromString(factoryContract) != unit))
307323 then true
308324 else "invalid factory contract address", if ((addressFromString(votingEmissionCandidateContract) != unit))
309325 then true
310326 else "invalid voting emission candidate contract address", if ((addressFromString(boostingContract) != unit))
311327 then true
312328 else "invalid boosting contract address", if ((addressFromString(stakingContract) != unit))
313329 then true
314330 else "invalid staking contract address", if ((epochLength > 0))
315331 then true
316332 else throw("invalid epoch length")]
317333 if ((cheks == cheks))
318334 then $Tuple2([StringEntry(keyFactoryContract, factoryContract), StringEntry(keyVotingEmissionCandidateContract, votingEmissionCandidateContract), StringEntry(keyBoostingContract, boostingContract), StringEntry(keyStakingContract, stakingContract), IntegerEntry(keyEpochLength, epochLength)], unit)
319335 else throw("Strict value is not equal to itself.")
320336 }
321337
322338
323339
324340 @Callable(i)
325341 func create (amountAssetId,priceAssetId) = {
326342 let checks = [if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionCandidateContract), "")))
327343 then true
328344 else mustManager(i)]
329345 if ((checks == checks))
330346 then {
331347 let pool = $Tuple2(amountAssetId, priceAssetId)
332348 let inListActions = ([BooleanEntry(keyInList(pool), true)] ++ insertNodeActions(poolsListName, poolToString(pool)))
333349 let currentEpochIsNotDefined = (getInteger(this, keyCurrentEpoch) == unit)
334350 let startHeightActions = if (currentEpochIsNotDefined)
335351 then {
336352 let epoch = 0
337353 [IntegerEntry(keyCurrentEpoch, epoch), IntegerEntry(keyStartHeightByEpoch(epoch), height), IntegerEntry(keyStartHeight, height), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, height)]
338354 }
339355 else nil
340356 $Tuple2((inListActions ++ startHeightActions), unit)
341357 }
342358 else throw("Strict value is not equal to itself.")
343359 }
344360
345361
346362
347363 @Callable(i)
348364 func vote (amountAssetId,priceAssetId,amount) = {
349365 let pool = $Tuple2(amountAssetId, priceAssetId)
350366 let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0)
351367 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
352368 let epochLength = getIntOrFail(this, keyEpochLength)
353369 let endHeight = (startHeight + epochLength)
354370 let finalizationStageOrUnit = getInteger(this, keyFinalizationStage)
355371 let used = valueOrElse(getInteger(this, keyUsed(i.caller, epoch)), 0)
356372 let vote = valueOrElse(getInteger(this, keyVote(pool, i.caller, epoch)), 0)
357373 let poolResult = valueOrElse(getInteger(this, keyVotingResult(pool, epoch)), 0)
358374 let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(epoch)), 0)
359375 let gwxAmountAtEndTotal = {
360376 let @ = invoke(this, "getUserGwxAmountAtHeight", [toBase58String(i.caller.bytes), endHeight], nil)
361377 if ($isInstanceOf(@, "Int"))
362378 then @
363379 else throw(($getType(invoke(this, "getUserGwxAmountAtHeight", [toBase58String(i.caller.bytes), endHeight], nil)) + " couldn't be cast to Int"))
364380 }
365381 let available = (gwxAmountAtEndTotal - used)
366382 let newVote = (vote + amount)
367383 let checks = [if ((getBoolean(keyInList(pool)) != unit))
368384 then true
369385 else throw("invalid assets"), if ((endHeight > height))
370386 then true
371387 else throw("invalid height"), if ((finalizationStageOrUnit == unit))
372388 then true
373389 else throw("finalization in progress"), if ((gwxAmountAtEndTotal > 0))
374390 then true
375391 else throw("you do not have gWX"), if (if ((amount > 0))
376392 then (available >= amount)
377393 else false)
378394 then true
379395 else throw("invalid amount")]
380396 if ((checks == checks))
381397 then {
382398 let votesListName = getVotesListName(pool)
383399 let userAddressStr = toString(i.caller)
384400 let votesListActions = if (containsNode(votesListName, userAddressStr))
385401 then nil
386402 else insertNodeActions(votesListName, userAddressStr)
387403 $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)
388404 }
389405 else throw("Strict value is not equal to itself.")
390406 }
391407
392408
393409
394410 @Callable(i)
395411 func cancelVote (amountAssetId,priceAssetId) = {
396412 let pool = $Tuple2(amountAssetId, priceAssetId)
397413 let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0)
398414 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
399415 let epochLength = getIntOrFail(this, keyEpochLength)
400416 let endHeight = (startHeight + epochLength)
401417 let finalizationStageOrUnit = getInteger(this, keyFinalizationStage)
402418 let used = valueOrElse(getInteger(this, keyUsed(i.caller, epoch)), 0)
403419 let vote = valueOrElse(getInteger(this, keyVote(pool, i.caller, epoch)), 0)
404420 let poolResult = valueOrElse(getInteger(this, keyVotingResult(pool, epoch)), 0)
405421 let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(epoch)), 0)
406422 let checks = [if ((getBoolean(keyInList(pool)) != unit))
407423 then true
408424 else throw("invalid assets"), if ((endHeight > height))
409425 then true
410426 else throw("invalid height"), if ((finalizationStageOrUnit == unit))
411427 then true
412428 else throw("finalization in progress"), if ((vote > 0))
413429 then true
414430 else throw("no vote")]
415431 if ((checks == checks))
416432 then {
417433 let votesListName = getVotesListName(pool)
418434 let userAddressStr = toString(i.caller)
419435 $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)
420436 }
421437 else throw("Strict value is not equal to itself.")
422438 }
423439
424440
425441
426442 @Callable(i)
427443 func setEpochLength (newEpochLength) = {
428444 let cheks = [mustManager(i), if ((newEpochLength > 0))
429445 then true
430446 else throw("invalid epoch length")]
431447 if ((cheks == cheks))
432448 then $Tuple2([IntegerEntry(keyEpochLength, newEpochLength)], unit)
433449 else throw("Strict value is not equal to itself.")
434450 }
435451
436452
437453
438454 @Callable(i)
439455 func setMaxDepth (newMaxDepth) = {
440456 let cheks = [mustManager(i), if ((newMaxDepth > 0))
441457 then true
442458 else throw("invalid max depth")]
443459 if ((cheks == cheks))
444460 then $Tuple2([IntegerEntry(keyMaxDepth, newMaxDepth)], unit)
445461 else throw("Strict value is not equal to itself.")
446462 }
447463
448464
449465
450466 @Callable(i)
451467 func processVoteINTERNAL (poolStr,userAddressStr) = {
452468 let checkCaller = mustThis(i)
453469 if ((checkCaller == checkCaller))
454470 then {
455471 let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), ("processVoteINTERNAL: invalid user address " + userAddressStr))
456472 let epoch = getIntOrFail(this, keyCurrentEpoch)
457473 let epochPrevious = (epoch - 1)
458474 let epochLength = getIntOrFail(this, keyEpochLength)
459475 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
460476 let endHeight = (startHeight + epochLength)
461477 let startHeightPrevious = getIntOrFail(this, keyStartHeightByEpoch(epochPrevious))
462478 let endHeightPrevious = (startHeightPrevious + epochLength)
463479 let checkTargetEpoch = if ((epochPrevious >= 0))
464480 then true
465481 else throw("processVoteINTERNAL: invalid previous epoch")
466482 if ((checkTargetEpoch == checkTargetEpoch))
467483 then {
468484 let pool = stringToPool(poolStr)
469485 let gwxAmountAtEndTotal = {
470486 let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeight], nil)
471487 if ($isInstanceOf(@, "Int"))
472488 then @
473489 else throw(($getType(invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeight], nil)) + " couldn't be cast to Int"))
474490 }
475491 let gwxAmountAtEndTotalPrevious = {
476492 let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeightPrevious], nil)
477493 if ($isInstanceOf(@, "Int"))
478494 then @
479495 else throw(($getType(invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeightPrevious], nil)) + " couldn't be cast to Int"))
480496 }
481497 let totalVotes = valueOrElse(getInteger(keyTotalVotes(epoch)), 0)
482498 let votingResult = valueOrElse(getInteger(keyVotingResult(pool, epoch)), 0)
483499 let votePrevious = valueOrErrorMessage(getInteger(keyVote(pool, userAddress, epochPrevious)), (((("processVoteINTERNAL " + poolStr) + " ") + userAddressStr) + ": no previous vote"))
484500 let used = valueOrElse(getInteger(this, keyUsed(userAddress, epoch)), 0)
485501 let newVote = fraction(votePrevious, gwxAmountAtEndTotal, gwxAmountAtEndTotalPrevious)
486502 let actions = if ((newVote > 0))
487503 then [IntegerEntry(keyVote(pool, userAddress, epoch), newVote), IntegerEntry(keyTotalVotes(epoch), (totalVotes + newVote)), IntegerEntry(keyVotingResult(pool, epoch), (votingResult + newVote)), IntegerEntry(keyUsed(userAddress, epoch), (used + newVote))]
488504 else deleteNodeActions(getVotesListName(pool), userAddressStr)
489505 $Tuple2(actions, unit)
490506 }
491507 else throw("Strict value is not equal to itself.")
492508 }
493509 else throw("Strict value is not equal to itself.")
494510 }
495511
496512
497513
498514 @Callable(i)
499515 func processPoolINTERNAL (poolStr) = {
500516 let checkCaller = mustThis(i)
501517 if ((checkCaller == checkCaller))
502518 then {
503519 let targetEpoch = (getIntOrFail(this, keyCurrentEpoch) - 1)
504520 let checkTargetEpoch = if ((targetEpoch >= 0))
505521 then true
506522 else throw("processPoolINTERNAL: invalid target epoch")
507523 if ((checkTargetEpoch == checkTargetEpoch))
508524 then {
509525 let pool = stringToPool(poolStr)
510- let $t01703017070 = pool
511- let amountAssetId = $t01703017070._1
512- let priceAssetId = $t01703017070._2
526+ let $t01821018250 = pool
527+ let amountAssetId = $t01821018250._1
528+ let priceAssetId = $t01821018250._2
513529 let stakingContract = addressFromStringValue(getStrOrFail(this, keyStakingContract))
514530 let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract))
515- let $t01724817422 = {
516- let @ = invoke(factoryContract, "getPoolContractAddressAndLpAssetByAssetsREADONLY", [amountAssetId, priceAssetId], nil)
517- if ($isInstanceOf(@, "(String, String)"))
518- then @
519- else throw(($getType(invoke(factoryContract, "getPoolContractAddressAndLpAssetByAssetsREADONLY", [amountAssetId, priceAssetId], nil)) + " couldn't be cast to (String, String)"))
520- }
521- let poolContractAddress = $t01724817422._1
522- let lpAssetId = $t01724817422._2
531+ let lpAssetId = getLpAssetByPoolAssets(amountAssetId, priceAssetId)
523532 let r = {
524533 let @ = invoke(stakingContract, "usersListTraversal", [lpAssetId], nil)
525534 if ($isInstanceOf(@, "Boolean"))
526535 then @
527536 else throw(($getType(invoke(stakingContract, "usersListTraversal", [lpAssetId], nil)) + " couldn't be cast to Boolean"))
528537 }
529538 if ((r == r))
530539 then if (r)
531540 then $Tuple2(nil, true)
532541 else {
533542 let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(targetEpoch)), 0)
534543 let votingResult = valueOrElse(getInteger(this, keyVotingResult(pool, targetEpoch)), 0)
535544 let share = if ((totalVotes == 0))
536545 then 0
537546 else fraction(votingResult, poolWeightMult, totalVotes)
538547 let modifyWeightInv = invoke(factoryContract, "modifyWeight", [lpAssetId, share], nil)
539548 if ((modifyWeightInv == modifyWeightInv))
540549 then $Tuple2([IntegerEntry(keyPoolShare(pool, targetEpoch), share)], false)
541550 else throw("Strict value is not equal to itself.")
542551 }
543552 else throw("Strict value is not equal to itself.")
544553 }
545554 else throw("Strict value is not equal to itself.")
546555 }
547556 else throw("Strict value is not equal to itself.")
548557 }
549558
550559
551560
552561 @Callable(i)
553562 func finalizeHelper () = {
554563 let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0)
555564 let previousEpoch = (epoch - 1)
556565 let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch))
557566 let epochLength = getIntOrFail(this, keyEpochLength)
558567 let endHeight = (startHeight + epochLength)
559568 let finalizationStageOrUnit = getInteger(this, keyFinalizationStage)
560569 if ((height >= endHeight))
561570 then {
562571 let newEpoch = (epoch + 1)
563572 $Tuple2([IntegerEntry(keyStartHeightByEpoch(newEpoch), height), IntegerEntry(keyStartHeight, height), IntegerEntry(keyCurrentEpoch, newEpoch), IntegerEntry(keyFinalizationStage, finalizationStageTotal)], true)
564573 }
565574 else if ((finalizationStageOrUnit == unit))
566575 then $Tuple2(nil, false)
567576 else if ((finalizationStageOrUnit == finalizationStageTotal))
568577 then {
569578 let poolOrUnit = getString(keyNextPool)
570579 let userOrUnit = getString(keyNextUser)
571580 match poolOrUnit {
572581 case _: Unit =>
573582 match getString(keyListHead(poolsListName)) {
574583 case _: Unit =>
575584 $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true)
576585 case poolsHeadStr: String =>
577586 $Tuple2([StringEntry(keyNextPool, poolsHeadStr)], true)
578587 case _ =>
579588 throw("Match error")
580589 }
581590 case poolStr: String =>
582591 let pool = stringToPool(poolStr)
583592 let nextUserOrUnit = match userOrUnit {
584593 case _: Unit =>
585594 getString(keyListHead(getVotesListName(pool)))
586595 case user: String =>
587596 let processVoteInv = invoke(this, "processVoteINTERNAL", [poolStr, user], nil)
588597 if ((processVoteInv == processVoteInv))
589598 then getString(keyListNext(getVotesListName(pool), user))
590599 else throw("Strict value is not equal to itself.")
591600 case _ =>
592601 throw("Match error")
593602 }
594603 match nextUserOrUnit {
595604 case _: Unit =>
596605 let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr))
597606 match nextPoolOrUnit {
598607 case _: Unit =>
599608 $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true)
600609 case s: String =>
601610 $Tuple2([StringEntry(keyNextPool, s), DeleteEntry(keyNextUser)], true)
602611 case _ =>
603612 throw("Match error")
604613 }
605614 case nextUser: String =>
606615 $Tuple2([StringEntry(keyNextUser, nextUser)], true)
607616 case _ =>
608617 throw("Match error")
609618 }
610619 case _ =>
611620 throw("Match error")
612621 }
613622 }
614623 else if ((finalizationStageOrUnit == finalizationStageShares))
615624 then {
616625 let poolOrUnit = getString(keyNextPool)
617626 match poolOrUnit {
618627 case _: Unit =>
619628 match getString(keyListHead(poolsListName)) {
620629 case _: Unit =>
621630 $Tuple2([DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight)], true)
622631 case nextPoolStr: String =>
623632 $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true)
624633 case _ =>
625634 throw("Match error")
626635 }
627636 case poolStr: String =>
628637 let r = {
629638 let @ = invoke(this, "processPoolINTERNAL", [poolStr], nil)
630639 if ($isInstanceOf(@, "Boolean"))
631640 then @
632641 else throw(($getType(invoke(this, "processPoolINTERNAL", [poolStr], nil)) + " couldn't be cast to Boolean"))
633642 }
634643 if ((r == r))
635644 then if (r)
636645 then $Tuple2(nil, true)
637646 else {
638647 let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr))
639648 match nextPoolOrUnit {
640649 case _: Unit =>
641650 $Tuple2([DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight), DeleteEntry(keyNextPool)], true)
642651 case nextPoolStr: String =>
643652 $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true)
644653 case _ =>
645654 throw("Match error")
646655 }
647656 }
648657 else throw("Strict value is not equal to itself.")
649658 case _ =>
650659 throw("Match error")
651660 }
652661 }
653662 else throw("finalization is broken")
654663 }
655664
656665
657666
658667 @Callable(i)
659668 func finalizeWrapper (counter) = {
660669 let result = {
661670 let @ = invoke(this, "finalizeHelper", nil, nil)
662671 if ($isInstanceOf(@, "Boolean"))
663672 then @
664673 else throw(($getType(invoke(this, "finalizeHelper", nil, nil)) + " couldn't be cast to Boolean"))
665674 }
666675 if ((result == result))
667676 then if (!(result))
668677 then if ((counter == 0))
669678 then throw("Current voting is not over yet")
670679 else $Tuple2(nil, unit)
671680 else {
672681 let maxDepth = valueOrElse(getInteger(this, keyMaxDepth), maxDepthDefault)
673682 if ((maxDepth > counter))
674683 then {
675684 let inv = invoke(this, "finalizeWrapper", [(counter + 1)], nil)
676685 if ((inv == inv))
677686 then $Tuple2(nil, unit)
678687 else throw("Strict value is not equal to itself.")
679688 }
680689 else $Tuple2(nil, unit)
681690 }
682691 else throw("Strict value is not equal to itself.")
683692 }
684693
685694
686695
687696 @Callable(i)
688697 func finalize () = {
689698 let inv = invoke(this, "finalizeWrapper", [0], nil)
690699 if ((inv == inv))
691700 then $Tuple2(nil, unit)
692701 else throw("Strict value is not equal to itself.")
693702 }
694703
695704
696705
697706 @Callable(i)
698707 func onVerificationLoss (assetId) = $Tuple2(nil, unit)
699708
700709
701710
702711 @Callable(i)
703712 func containsNodeREADONLY (listName,id) = $Tuple2(nil, containsNode(listName, id))
704713
705714
706715
707716 @Callable(i)
708717 func insertNode (listName,id) = {
709718 let checkCaller = mustManager(i)
710719 if ((checkCaller == checkCaller))
711720 then $Tuple2(insertNodeActions(listName, id), unit)
712721 else throw("Strict value is not equal to itself.")
713722 }
714723
715724
716725
717726 @Callable(i)
718727 func deleteNode (listName,id) = {
719728 let checkCaller = mustManager(i)
720729 if ((checkCaller == checkCaller))
721730 then $Tuple2(deleteNodeActions(listName, id), unit)
722731 else throw("Strict value is not equal to itself.")
723732 }
724733
725734
726735 @Verifier(tx)
727736 func verify () = {
728737 let targetPublicKey = match managerPublicKeyOrUnit() {
729738 case pk: ByteVector =>
730739 pk
731740 case _: Unit =>
732741 tx.senderPublicKey
733742 case _ =>
734743 throw("Match error")
735744 }
736745 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
737746 }
738747

github/deemru/w8io/169f3d6 
83.39 ms