tx · 9vUSWcpSF7614QcjHSJnyULRdbCjekxd2Fd8yqYPrGzV 3N9yMmmL5cJ7LJxr8o6GFbKFUbGz4XcAjeg: -0.01000000 Waves 2022.03.28 10:03 [1983439] smart account 3N9yMmmL5cJ7LJxr8o6GFbKFUbGz4XcAjeg > SELF 0.00000000 Waves
{ "type": 13, "id": "9vUSWcpSF7614QcjHSJnyULRdbCjekxd2Fd8yqYPrGzV", "fee": 1000000, "feeAssetId": null, "timestamp": 1648451034610, "version": 2, "chainId": 84, "sender": "3N9yMmmL5cJ7LJxr8o6GFbKFUbGz4XcAjeg", "senderPublicKey": "C2aAS9D6FqfbrkCuCQCtPWAiopjyagvitFLjRuLcRPYt", "proofs": [ "29nLj7Z6NruYwhdNon9bkodGBvL5F96Skh4uh4pQSqkFm6q8bx7i2ibXZHPGYJ367rbMpgKvdQrfMoY6Q251BcyY" ], "script": "base64:AAIFAAAAAAAAAEgIAhIMCgoICAgBCAEBAQEBEgQKAggIEgQKAggEEgMKAQgSBAoCCAESABIDCgEBEgASABIDCgEBEgASAwoBARIDCgEBEgMKAQgAAAA6AAAAAAlzZXBhcmF0b3ICAAAAAl9fAAAAAA9tYXhEZXB0aERlZmF1bHQAAAAAAAAAAAoBAAAABWFzSW50AAAAAQAAAAN2YWwEAAAAByRtYXRjaDAFAAAAA3ZhbAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAZ2YWxJbnQFAAAAByRtYXRjaDAFAAAABnZhbEludAkAAAIAAAABAgAAABtGYWlsZWQgdG8gY2FzdCBpbnRvIEludGVnZXIBAAAABmFzQm9vbAAAAAEAAAADdmFsBAAAAAckbWF0Y2gwBQAAAAN2YWwDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAB0Jvb2xlYW4EAAAAB3ZhbEJvb2wFAAAAByRtYXRjaDAFAAAAB3ZhbEJvb2wJAAACAAAAAQIAAAAbRmFpbGVkIHRvIGNhc3QgaW50byBCb29sZWFuAAAAAAxrZXlGZWVBb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3hBbW91bnRBdEVuZAAAAAB177x7", "height": 1983439, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FW3zHnV1ArbfWPUQ9LnpjbYyUtVf98jFotirpxFB9rrv Next: F4pAAvH83rQBNzq6Zpq9dPz6biTGyoXjEL3bdAdKvN6W Diff:
Old | New | Differences | |
---|---|---|---|
77 | 77 | func keyVoteResultByPeriod (assetId,period) = makeString(["%s%d%s", "votingResultAtAsset", toString(period), assetId], separator) | |
78 | 78 | ||
79 | 79 | ||
80 | - | func formatVoteResult (totalYes,totalNo | |
80 | + | func formatVoteResult (totalYes,totalNo) = makeString(["%d%d", toString(totalYes), toString(totalNo)], separator) | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func parseVoteResult (input) = { | |
84 | 84 | let parts = split(input, separator) | |
85 | 85 | let totalYesIdx = 1 | |
86 | 86 | let totalNoIdx = 2 | |
87 | - | let verifiedIdx = 3 | |
88 | 87 | let totalYes = parseIntValue(parts[totalYesIdx]) | |
89 | 88 | let totalNo = parseIntValue(parts[totalNoIdx]) | |
90 | - | let verified = (parts[verifiedIdx] == "true") | |
91 | - | $Tuple3(totalYes, totalNo, verified) | |
89 | + | $Tuple2(totalYes, totalNo) | |
92 | 90 | } | |
93 | 91 | ||
94 | 92 | ||
182 | 180 | } | |
183 | 181 | ||
184 | 182 | ||
185 | - | func getVoteResultAction (assetId,total,inFavor,period | |
183 | + | func getVoteResultAction (assetId,total,inFavor,period) = { | |
186 | 184 | let voteResultKey = keyVoteResultByPeriod(assetId, period) | |
187 | - | let $ | |
185 | + | let $t054515583 = match getString(voteResultKey) { | |
188 | 186 | case s: String => | |
189 | 187 | parseVoteResult(s) | |
190 | 188 | case _: Unit => | |
191 | - | match getString(keyVoteResultByPeriod(assetId, (period - 1))) { | |
192 | - | case s: String => | |
193 | - | $Tuple3(0, 0, parseVoteResult(s)._3) | |
194 | - | case _: Unit => | |
195 | - | $Tuple3(0, 0, false) | |
196 | - | case _ => | |
197 | - | throw("Match error") | |
198 | - | } | |
189 | + | $Tuple2(0, 0) | |
199 | 190 | case _ => | |
200 | 191 | throw("Match error") | |
201 | 192 | } | |
202 | - | let oldTotalYes = $t055955898._1 | |
203 | - | let oldTotalNo = $t055955898._2 | |
204 | - | let oldVerified = $t055955898._3 | |
205 | - | StringEntry(voteResultKey, formatVoteResult((oldTotalYes + (if (inFavor) | |
193 | + | let totalYes = $t054515583._1 | |
194 | + | let totalNo = $t054515583._2 | |
195 | + | StringEntry(voteResultKey, formatVoteResult((totalYes + (if (inFavor) | |
206 | 196 | then total | |
207 | - | else 0)), ( | |
197 | + | else 0)), (totalNo + (if (inFavor) | |
208 | 198 | then 0 | |
209 | - | else total)), if ((verified == unit)) | |
210 | - | then oldVerified | |
211 | - | else value(verified))) | |
199 | + | else total)))) | |
212 | 200 | } | |
213 | 201 | ||
214 | 202 | ||
280 | 268 | if ((userPreviousVoteOrUnit == unit)) | |
281 | 269 | then nil | |
282 | 270 | else { | |
283 | - | let $ | |
284 | - | let prevTotal = $ | |
285 | - | let inFavor = $ | |
271 | + | let $t093859458 = parseUserVote(value(userPreviousVoteOrUnit)) | |
272 | + | let prevTotal = $t093859458._1 | |
273 | + | let inFavor = $t093859458._2 | |
286 | 274 | let total = min([prevTotal, userGwxAmountAtEndHeight]) | |
287 | - | [StringEntry(userVoteKey, formatUserVote(total, inFavor)), getVoteResultAction(assetId, total, inFavor, currentPeriod | |
275 | + | [StringEntry(userVoteKey, formatUserVote(total, inFavor)), getVoteResultAction(assetId, total, inFavor, currentPeriod)] | |
288 | 276 | } | |
289 | 277 | } | |
290 | 278 | else nil | |
349 | 337 | if ((burnFeeInv == burnFeeInv)) | |
350 | 338 | then { | |
351 | 339 | let addAssetActions = insertNode(assetsListName, assetId) | |
352 | - | $Tuple2((addAssetActions :+ getVoteResultAction(assetId, 0, true, currentPeriod | |
340 | + | $Tuple2((addAssetActions :+ getVoteResultAction(assetId, 0, true, currentPeriod)), unit) | |
353 | 341 | } | |
354 | 342 | else throw("Strict value is not equal to itself.") | |
355 | 343 | } | |
382 | 370 | then { | |
383 | 371 | let votesListName = getVotesListName(assetId) | |
384 | 372 | let userVoteKey = keyUserVoteByPeriod(userAddress, assetId, currentPeriod) | |
385 | - | let userVoteActions = [StringEntry(userVoteKey, formatUserVote(gwxAmountAtEnd, inFavor)), StringEntry(keyUserVoteHistory("vote", userAddress, assetId, toBase58String(i.transactionId), currentPeriod), formatUserVote(gwxAmountAtEnd, inFavor)), getVoteResultAction(assetId, gwxAmountAtEnd, inFavor, currentPeriod | |
373 | + | let userVoteActions = [StringEntry(userVoteKey, formatUserVote(gwxAmountAtEnd, inFavor)), StringEntry(keyUserVoteHistory("vote", userAddress, assetId, toBase58String(i.transactionId), currentPeriod), formatUserVote(gwxAmountAtEnd, inFavor)), getVoteResultAction(assetId, gwxAmountAtEnd, inFavor, currentPeriod)] | |
386 | 374 | let votesListActions = if (containsNode(votesListName, userAddress)) | |
387 | 375 | then nil | |
388 | 376 | else insertNode(votesListName, userAddress) | |
406 | 394 | let checkVote = valueOrElse(getString(userVoteKey), "Nothing to cancel") | |
407 | 395 | if ((checkVote == checkVote)) | |
408 | 396 | then { | |
409 | - | let $ | |
410 | - | let total = $ | |
411 | - | let inFavor = $ | |
397 | + | let $t01455514616 = parseUserVote(value(userVoteOrUnit)) | |
398 | + | let total = $t01455514616._1 | |
399 | + | let inFavor = $t01455514616._2 | |
412 | 400 | let votesListActions = deleteNode(votesListName, userAddress) | |
413 | - | let userVoteActions = [DeleteEntry(userVoteKey), StringEntry(keyUserVoteHistory("cancelVote", userAddress, assetId, toBase58String(i.transactionId), currentPeriod), formatUserVote(0, true)), getVoteResultAction(assetId, -(total), inFavor, currentPeriod | |
401 | + | let userVoteActions = [DeleteEntry(userVoteKey), StringEntry(keyUserVoteHistory("cancelVote", userAddress, assetId, toBase58String(i.transactionId), currentPeriod), formatUserVote(0, true)), getVoteResultAction(assetId, -(total), inFavor, currentPeriod)] | |
414 | 402 | $Tuple2((votesListActions ++ userVoteActions), unit) | |
415 | 403 | } | |
416 | 404 | else throw("Strict value is not equal to itself.") | |
424 | 412 | if ((checkCaller == checkCaller)) | |
425 | 413 | then { | |
426 | 414 | let voteResultKey = keyVoteResultByPeriod(assetId, period) | |
427 | - | let $ | |
415 | + | let $t01527015402 = match getString(voteResultKey) { | |
428 | 416 | case s: String => | |
429 | - | let r = parseVoteResult(s) | |
430 | - | $Tuple2(r._1, r._2) | |
417 | + | parseVoteResult(s) | |
431 | 418 | case _: Unit => | |
432 | 419 | $Tuple2(0, 0) | |
433 | 420 | case _ => | |
434 | 421 | throw("Match error") | |
435 | 422 | } | |
436 | - | let totalYes = $ | |
437 | - | let totalNo = $ | |
423 | + | let totalYes = $t01527015402._1 | |
424 | + | let totalNo = $t01527015402._2 | |
438 | 425 | let total = (totalYes + totalNo) | |
439 | 426 | let verified = if ((total >= votingThreshold)) | |
440 | 427 | then (totalYes > totalNo) | |
448 | 435 | else eliminationCheck(assetId) | |
449 | 436 | let voteResultActions = if (eliminate) | |
450 | 437 | then nil | |
451 | - | else [getVoteResultAction(assetId, 0, true, (currentPeriod + 1) | |
438 | + | else [getVoteResultAction(assetId, 0, true, (currentPeriod + 1))] | |
452 | 439 | let votesListActions = if (eliminate) | |
453 | 440 | then deleteNode(assetsListName, assetId) | |
454 | 441 | else nil |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let separator = "__" | |
5 | 5 | ||
6 | 6 | let maxDepthDefault = 10 | |
7 | 7 | ||
8 | 8 | func asInt (val) = match val { | |
9 | 9 | case valInt: Int => | |
10 | 10 | valInt | |
11 | 11 | case _ => | |
12 | 12 | throw("Failed to cast into Integer") | |
13 | 13 | } | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func asBool (val) = match val { | |
17 | 17 | case valBool: Boolean => | |
18 | 18 | valBool | |
19 | 19 | case _ => | |
20 | 20 | throw("Failed to cast into Boolean") | |
21 | 21 | } | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | let keyFeeAmount = makeString(["%s", "fee"], separator) | |
25 | 25 | ||
26 | 26 | let keyWxAssetId = makeString(["%s", "wxAssetId"], separator) | |
27 | 27 | ||
28 | 28 | let keyVotingThreshold = makeString(["%s", "votingThreshold"], separator) | |
29 | 29 | ||
30 | 30 | let keyVotingDuration = makeString(["%s", "epochLength"], separator) | |
31 | 31 | ||
32 | 32 | let keyVoteBeforeElimination = makeString(["%s", "voteBeforeElimination"], separator) | |
33 | 33 | ||
34 | 34 | let keyStartHeight = makeString(["%s", "currentVotingHeightStart"], separator) | |
35 | 35 | ||
36 | 36 | let keyCurrentPeriod = makeString(["%s", "currentEpoch"], separator) | |
37 | 37 | ||
38 | 38 | let keyBoostingContract = makeString(["%s", "boostingContract"], separator) | |
39 | 39 | ||
40 | 40 | let keyEmissionContract = makeString(["%s", "emissionContract"], separator) | |
41 | 41 | ||
42 | 42 | let keyAssetsStoreContract = makeString(["%s", "assetsStoreContract"], separator) | |
43 | 43 | ||
44 | 44 | let keyLatestProcessedAsset = makeString(["%s", "latestProcessedAsset"], separator) | |
45 | 45 | ||
46 | 46 | let keyLatestProcessedUser = makeString(["%s", "latestProcessedUser"], separator) | |
47 | 47 | ||
48 | 48 | let keyLatestProcessedAssetTransfer = makeString(["%s", "latestProcessedAssetTransfer"], separator) | |
49 | 49 | ||
50 | 50 | let keyLatestProcessedUserTransfer = makeString(["%s", "latestProcessedUserTransfer"], separator) | |
51 | 51 | ||
52 | 52 | let keyMaxDepth = makeString(["%s", "maxDepth"], separator) | |
53 | 53 | ||
54 | 54 | func keyVotesTransferFinishedByPeriod (period) = makeString(["%s", "votesTransferFinished", toString(period)], separator) | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | let assetsListName = "__assets" | |
58 | 58 | ||
59 | 59 | func getVotesListName (assetId) = ("%s__votes__" + assetId) | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func keyListHead (listName) = makeString([("%s%s" + listName), "head"], separator) | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func keyListSize (listName) = makeString([("%s%s" + listName), "size"], separator) | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func keyListPrev (listName,id) = makeString([("%s%s%s" + listName), id, "prev"], separator) | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func keyListNext (listName,id) = makeString([("%s%s%s" + listName), id, "next"], separator) | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func keyAssetVerifiedByPeriod (assetId,period) = makeString(["%s%d%s", "verifiedAt", toString(period), assetId], separator) | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func keyVoteResultByPeriod (assetId,period) = makeString(["%s%d%s", "votingResultAtAsset", toString(period), assetId], separator) | |
78 | 78 | ||
79 | 79 | ||
80 | - | func formatVoteResult (totalYes,totalNo | |
80 | + | func formatVoteResult (totalYes,totalNo) = makeString(["%d%d", toString(totalYes), toString(totalNo)], separator) | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func parseVoteResult (input) = { | |
84 | 84 | let parts = split(input, separator) | |
85 | 85 | let totalYesIdx = 1 | |
86 | 86 | let totalNoIdx = 2 | |
87 | - | let verifiedIdx = 3 | |
88 | 87 | let totalYes = parseIntValue(parts[totalYesIdx]) | |
89 | 88 | let totalNo = parseIntValue(parts[totalNoIdx]) | |
90 | - | let verified = (parts[verifiedIdx] == "true") | |
91 | - | $Tuple3(totalYes, totalNo, verified) | |
89 | + | $Tuple2(totalYes, totalNo) | |
92 | 90 | } | |
93 | 91 | ||
94 | 92 | ||
95 | 93 | func keyUserVoteByPeriod (userAddress,assetId,period) = makeString(["%s%d%s%s", "vru", toString(period), assetId, userAddress], separator) | |
96 | 94 | ||
97 | 95 | ||
98 | 96 | func formatUserVote (total,inFavor) = { | |
99 | 97 | let totalYes = if (inFavor) | |
100 | 98 | then total | |
101 | 99 | else 0 | |
102 | 100 | let totalNo = if (inFavor) | |
103 | 101 | then 0 | |
104 | 102 | else total | |
105 | 103 | makeString(["%d%d", toString(totalYes), toString(totalNo)], separator) | |
106 | 104 | } | |
107 | 105 | ||
108 | 106 | ||
109 | 107 | func parseUserVote (input) = { | |
110 | 108 | let parts = split(input, separator) | |
111 | 109 | let totalYesIdx = 1 | |
112 | 110 | let totalNoIdx = 2 | |
113 | 111 | let totalYes = parseIntValue(parts[totalYesIdx]) | |
114 | 112 | let totalNo = parseIntValue(parts[totalNoIdx]) | |
115 | 113 | let inFavor = if ((totalYes > 0)) | |
116 | 114 | then (totalNo == 0) | |
117 | 115 | else false | |
118 | 116 | let against = if ((totalYes == 0)) | |
119 | 117 | then (totalNo > 0) | |
120 | 118 | else false | |
121 | 119 | let checkTotals = if (if (inFavor) | |
122 | 120 | then true | |
123 | 121 | else against) | |
124 | 122 | then true | |
125 | 123 | else throw("Invalid user vote value") | |
126 | 124 | if ((checkTotals == checkTotals)) | |
127 | 125 | then { | |
128 | 126 | let total = if (inFavor) | |
129 | 127 | then totalYes | |
130 | 128 | else totalNo | |
131 | 129 | $Tuple2(total, inFavor) | |
132 | 130 | } | |
133 | 131 | else throw("Strict value is not equal to itself.") | |
134 | 132 | } | |
135 | 133 | ||
136 | 134 | ||
137 | 135 | func keyUserVoteHistory (type,userAddress,assetId,txId,period) = makeString(["%s%s%s%s%s%d", "history", type, assetId, userAddress, txId, toString(period)], separator) | |
138 | 136 | ||
139 | 137 | ||
140 | 138 | func thisOnly (i) = if ((i.caller == this)) | |
141 | 139 | then true | |
142 | 140 | else throw("Permission denied") | |
143 | 141 | ||
144 | 142 | ||
145 | 143 | func getIntegerOrZero (key) = valueOrElse(getInteger(this, key), 0) | |
146 | 144 | ||
147 | 145 | ||
148 | 146 | func getIntegerOrFail (key) = valueOrErrorMessage(getInteger(this, key), (key + " is not defined")) | |
149 | 147 | ||
150 | 148 | ||
151 | 149 | func getStringOrEmpty (key) = valueOrElse(getString(this, key), "") | |
152 | 150 | ||
153 | 151 | ||
154 | 152 | func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (key + " is not defined")) | |
155 | 153 | ||
156 | 154 | ||
157 | 155 | let feeAmount = getIntegerOrFail(keyFeeAmount) | |
158 | 156 | ||
159 | 157 | let wxAssetId = fromBase58String(getStringOrFail(keyWxAssetId)) | |
160 | 158 | ||
161 | 159 | let votingThreshold = getIntegerOrFail(keyVotingThreshold) | |
162 | 160 | ||
163 | 161 | let votingDuration = getIntegerOrFail(keyVotingDuration) | |
164 | 162 | ||
165 | 163 | let voteBeforeElimination = getIntegerOrFail(keyVoteBeforeElimination) | |
166 | 164 | ||
167 | 165 | let startHeight = getIntegerOrFail(keyStartHeight) | |
168 | 166 | ||
169 | 167 | let currentPeriod = getIntegerOrFail(keyCurrentPeriod) | |
170 | 168 | ||
171 | 169 | let boostingContract = addressFromStringValue(getStringOrFail(keyBoostingContract)) | |
172 | 170 | ||
173 | 171 | let emissionContract = addressFromStringValue(getStringOrFail(keyEmissionContract)) | |
174 | 172 | ||
175 | 173 | let assetsStoreContract = addressFromStringValue(getStringOrFail(keyAssetsStoreContract)) | |
176 | 174 | ||
177 | 175 | let maxDepth = valueOrElse(getInteger(keyMaxDepth), maxDepthDefault) | |
178 | 176 | ||
179 | 177 | func getUserGwxAmountAtHeight (userAddress,targetHeight) = { | |
180 | 178 | let gwxAmount = invoke(boostingContract, "getUserGwxAmountAtHeightREADONLY", [userAddress, targetHeight], nil) | |
181 | 179 | asInt(gwxAmount) | |
182 | 180 | } | |
183 | 181 | ||
184 | 182 | ||
185 | - | func getVoteResultAction (assetId,total,inFavor,period | |
183 | + | func getVoteResultAction (assetId,total,inFavor,period) = { | |
186 | 184 | let voteResultKey = keyVoteResultByPeriod(assetId, period) | |
187 | - | let $ | |
185 | + | let $t054515583 = match getString(voteResultKey) { | |
188 | 186 | case s: String => | |
189 | 187 | parseVoteResult(s) | |
190 | 188 | case _: Unit => | |
191 | - | match getString(keyVoteResultByPeriod(assetId, (period - 1))) { | |
192 | - | case s: String => | |
193 | - | $Tuple3(0, 0, parseVoteResult(s)._3) | |
194 | - | case _: Unit => | |
195 | - | $Tuple3(0, 0, false) | |
196 | - | case _ => | |
197 | - | throw("Match error") | |
198 | - | } | |
189 | + | $Tuple2(0, 0) | |
199 | 190 | case _ => | |
200 | 191 | throw("Match error") | |
201 | 192 | } | |
202 | - | let oldTotalYes = $t055955898._1 | |
203 | - | let oldTotalNo = $t055955898._2 | |
204 | - | let oldVerified = $t055955898._3 | |
205 | - | StringEntry(voteResultKey, formatVoteResult((oldTotalYes + (if (inFavor) | |
193 | + | let totalYes = $t054515583._1 | |
194 | + | let totalNo = $t054515583._2 | |
195 | + | StringEntry(voteResultKey, formatVoteResult((totalYes + (if (inFavor) | |
206 | 196 | then total | |
207 | - | else 0)), ( | |
197 | + | else 0)), (totalNo + (if (inFavor) | |
208 | 198 | then 0 | |
209 | - | else total)), if ((verified == unit)) | |
210 | - | then oldVerified | |
211 | - | else value(verified))) | |
199 | + | else total)))) | |
212 | 200 | } | |
213 | 201 | ||
214 | 202 | ||
215 | 203 | func containsNode (listName,id) = { | |
216 | 204 | let head = getString(this, keyListHead(listName)) | |
217 | 205 | let prev = getString(this, keyListPrev(listName, id)) | |
218 | 206 | let next = getString(this, keyListNext(listName, id)) | |
219 | 207 | if (if ((id == head)) | |
220 | 208 | then true | |
221 | 209 | else (prev != unit)) | |
222 | 210 | then true | |
223 | 211 | else (next != unit) | |
224 | 212 | } | |
225 | 213 | ||
226 | 214 | ||
227 | 215 | func insertNode (listName,id) = { | |
228 | 216 | let head = getString(this, keyListHead(listName)) | |
229 | 217 | let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0) | |
230 | 218 | let checkNode = if (!(containsNode(listName, id))) | |
231 | 219 | then true | |
232 | 220 | else throw("Node exists") | |
233 | 221 | if ((checkNode == checkNode)) | |
234 | 222 | then (([IntegerEntry(keyListSize(listName), (listSize + 1))] ++ (if (isDefined(head)) | |
235 | 223 | then [StringEntry(keyListNext(listName, id), value(head)), StringEntry(keyListPrev(listName, value(head)), id)] | |
236 | 224 | else nil)) ++ [StringEntry(keyListHead(listName), id)]) | |
237 | 225 | else throw("Strict value is not equal to itself.") | |
238 | 226 | } | |
239 | 227 | ||
240 | 228 | ||
241 | 229 | func deleteNode (listName,id) = { | |
242 | 230 | let head = getString(this, keyListHead(listName)) | |
243 | 231 | let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0) | |
244 | 232 | let prev = getString(this, keyListPrev(listName, id)) | |
245 | 233 | let next = getString(this, keyListNext(listName, id)) | |
246 | 234 | ([IntegerEntry(keyListSize(listName), (listSize - 1))] ++ (if (if (isDefined(prev)) | |
247 | 235 | then isDefined(next) | |
248 | 236 | else false) | |
249 | 237 | then [StringEntry(keyListNext(listName, value(prev)), value(next)), StringEntry(keyListPrev(listName, value(next)), value(prev)), DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, id))] | |
250 | 238 | else if (isDefined(next)) | |
251 | 239 | then [StringEntry(keyListHead(listName), value(next)), DeleteEntry(keyListNext(listName, id)), DeleteEntry(keyListPrev(listName, value(next)))] | |
252 | 240 | else if (isDefined(prev)) | |
253 | 241 | then [DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, value(prev)))] | |
254 | 242 | else if ((id == head)) | |
255 | 243 | then [DeleteEntry(keyListHead(listName))] | |
256 | 244 | else throw("Invalid node"))) | |
257 | 245 | } | |
258 | 246 | ||
259 | 247 | ||
260 | 248 | func processVote (assetId,userAddressOrUnit,latestProcessedAssetKey,latestProcessedUserKey) = { | |
261 | 249 | let updateLatestProcessedAssetAction = StringEntry(latestProcessedAssetKey, assetId) | |
262 | 250 | let deleteLatestProcessedUserAction = DeleteEntry(latestProcessedUserKey) | |
263 | 251 | if ((userAddressOrUnit == unit)) | |
264 | 252 | then [updateLatestProcessedAssetAction, deleteLatestProcessedUserAction] | |
265 | 253 | else { | |
266 | 254 | let endHeight = (startHeight + votingDuration) | |
267 | 255 | let userAddress = value(userAddressOrUnit) | |
268 | 256 | let updateLatestProcessedUserAction = StringEntry(latestProcessedUserKey, userAddress) | |
269 | 257 | let userVoteKey = keyUserVoteByPeriod(userAddress, assetId, currentPeriod) | |
270 | 258 | let userVoteOrUnit = getString(userVoteKey) | |
271 | 259 | let userGwxAmountAtEndHeight = getUserGwxAmountAtHeight(userAddress, endHeight) | |
272 | 260 | let voteActions = if ((userGwxAmountAtEndHeight == 0)) | |
273 | 261 | then { | |
274 | 262 | let votesListName = getVotesListName(assetId) | |
275 | 263 | deleteNode(votesListName, userAddress) | |
276 | 264 | } | |
277 | 265 | else if ((userVoteOrUnit == unit)) | |
278 | 266 | then { | |
279 | 267 | let userPreviousVoteOrUnit = getString(keyUserVoteByPeriod(userAddress, assetId, (currentPeriod - 1))) | |
280 | 268 | if ((userPreviousVoteOrUnit == unit)) | |
281 | 269 | then nil | |
282 | 270 | else { | |
283 | - | let $ | |
284 | - | let prevTotal = $ | |
285 | - | let inFavor = $ | |
271 | + | let $t093859458 = parseUserVote(value(userPreviousVoteOrUnit)) | |
272 | + | let prevTotal = $t093859458._1 | |
273 | + | let inFavor = $t093859458._2 | |
286 | 274 | let total = min([prevTotal, userGwxAmountAtEndHeight]) | |
287 | - | [StringEntry(userVoteKey, formatUserVote(total, inFavor)), getVoteResultAction(assetId, total, inFavor, currentPeriod | |
275 | + | [StringEntry(userVoteKey, formatUserVote(total, inFavor)), getVoteResultAction(assetId, total, inFavor, currentPeriod)] | |
288 | 276 | } | |
289 | 277 | } | |
290 | 278 | else nil | |
291 | 279 | ((voteActions :+ updateLatestProcessedAssetAction) :+ updateLatestProcessedUserAction) | |
292 | 280 | } | |
293 | 281 | } | |
294 | 282 | ||
295 | 283 | ||
296 | 284 | func assetShouldBeEliminated (assetId,period) = !(valueOrElse(getBoolean(keyAssetVerifiedByPeriod(assetId, period)), true)) | |
297 | 285 | ||
298 | 286 | ||
299 | 287 | func eliminationCheck (assetId) = if (if (assetShouldBeEliminated(assetId, (currentPeriod - 1))) | |
300 | 288 | then assetShouldBeEliminated(assetId, (currentPeriod - 2)) | |
301 | 289 | else false) | |
302 | 290 | then assetShouldBeEliminated(assetId, (currentPeriod - 3)) | |
303 | 291 | else false | |
304 | 292 | ||
305 | 293 | ||
306 | 294 | @Callable(i) | |
307 | 295 | func constructor (boostingContractPrm,emissionContractPrm,assetsStoreContractPrm,feeAmountPrm,wxAssetIdPrm,votingThresholdPrm,votingDurationPrm,voteBeforeEliminationPrm,startHeightPrm,maxDepthPrm) = { | |
308 | 296 | let checks = [thisOnly(i), if (isDefined(addressFromString(boostingContractPrm))) | |
309 | 297 | then true | |
310 | 298 | else throw("Invalid boosting contract address"), if (isDefined(addressFromString(emissionContractPrm))) | |
311 | 299 | then true | |
312 | 300 | else throw("Invalid emission contract address"), if (isDefined(addressFromString(assetsStoreContractPrm))) | |
313 | 301 | then true | |
314 | 302 | else throw("Invalid asset_store contract address"), if ((feeAmountPrm >= 0)) | |
315 | 303 | then true | |
316 | 304 | else throw("Invalid fee amount"), if (isDefined(assetInfo(fromBase58String(wxAssetIdPrm)))) | |
317 | 305 | then true | |
318 | 306 | else throw("Invalid WX asset ID"), if ((votingThresholdPrm >= 0)) | |
319 | 307 | then true | |
320 | 308 | else throw("Invalid voting threshold"), if ((votingDurationPrm > 0)) | |
321 | 309 | then true | |
322 | 310 | else throw("Invalid voting duration"), if (((startHeightPrm + votingDurationPrm) > height)) | |
323 | 311 | then true | |
324 | 312 | else throw("Invalid start height")] | |
325 | 313 | if ((checks == checks)) | |
326 | 314 | then $Tuple2([StringEntry(keyBoostingContract, boostingContractPrm), StringEntry(keyEmissionContract, emissionContractPrm), StringEntry(keyAssetsStoreContract, assetsStoreContractPrm), IntegerEntry(keyFeeAmount, feeAmountPrm), StringEntry(keyWxAssetId, wxAssetIdPrm), IntegerEntry(keyVotingThreshold, votingThresholdPrm), IntegerEntry(keyVotingDuration, votingDurationPrm), IntegerEntry(keyVoteBeforeElimination, voteBeforeEliminationPrm), IntegerEntry(keyStartHeight, startHeightPrm), IntegerEntry(keyCurrentPeriod, 0), IntegerEntry(keyMaxDepth, maxDepthPrm)], unit) | |
327 | 315 | else throw("Strict value is not equal to itself.") | |
328 | 316 | } | |
329 | 317 | ||
330 | 318 | ||
331 | 319 | ||
332 | 320 | @Callable(i) | |
333 | 321 | func suggest (assetId,assetImage) = { | |
334 | 322 | let info = valueOrErrorMessage(assetInfo(fromBase58String(assetId)), "Invalid asset ID") | |
335 | 323 | let payment = value(i.payments[0]) | |
336 | 324 | let checks = [if ((info.issuer == i.caller)) | |
337 | 325 | then true | |
338 | 326 | else throw("Asset can only be suggested by its issuer"), if ((value(payment.assetId) == wxAssetId)) | |
339 | 327 | then true | |
340 | 328 | else throw("Invalid fee asset"), if ((payment.amount == feeAmount)) | |
341 | 329 | then true | |
342 | 330 | else throw("Invalid fee amount")] | |
343 | 331 | if ((checks == checks)) | |
344 | 332 | then { | |
345 | 333 | let assetsStoreCreateOrUpdateInv = invoke(assetsStoreContract, "createOrUpdate", [assetId, "", assetImage, false], nil) | |
346 | 334 | if ((assetsStoreCreateOrUpdateInv == assetsStoreCreateOrUpdateInv)) | |
347 | 335 | then { | |
348 | 336 | let burnFeeInv = invoke(emissionContract, "burn", nil, [AttachedPayment(payment.assetId, payment.amount)]) | |
349 | 337 | if ((burnFeeInv == burnFeeInv)) | |
350 | 338 | then { | |
351 | 339 | let addAssetActions = insertNode(assetsListName, assetId) | |
352 | - | $Tuple2((addAssetActions :+ getVoteResultAction(assetId, 0, true, currentPeriod | |
340 | + | $Tuple2((addAssetActions :+ getVoteResultAction(assetId, 0, true, currentPeriod)), unit) | |
353 | 341 | } | |
354 | 342 | else throw("Strict value is not equal to itself.") | |
355 | 343 | } | |
356 | 344 | else throw("Strict value is not equal to itself.") | |
357 | 345 | } | |
358 | 346 | else throw("Strict value is not equal to itself.") | |
359 | 347 | } | |
360 | 348 | ||
361 | 349 | ||
362 | 350 | ||
363 | 351 | @Callable(i) | |
364 | 352 | func vote (assetId,inFavor) = { | |
365 | 353 | let endHeight = (startHeight + votingDuration) | |
366 | 354 | let checkAsset = if (containsNode(assetsListName, assetId)) | |
367 | 355 | then true | |
368 | 356 | else throw("Invalid asset") | |
369 | 357 | if ((checkAsset == checkAsset)) | |
370 | 358 | then { | |
371 | 359 | let checkHeight = if ((endHeight > height)) | |
372 | 360 | then true | |
373 | 361 | else throw("Current voting is over but results are not finalized") | |
374 | 362 | if ((checkHeight == checkHeight)) | |
375 | 363 | then { | |
376 | 364 | let userAddress = toString(i.caller) | |
377 | 365 | let gwxAmountAtEnd = getUserGwxAmountAtHeight(userAddress, endHeight) | |
378 | 366 | let checkGwxAmountAtEnd = if ((gwxAmountAtEnd > 0)) | |
379 | 367 | then true | |
380 | 368 | else throw("You'll not have gWX at the end of voting") | |
381 | 369 | if ((checkGwxAmountAtEnd == checkGwxAmountAtEnd)) | |
382 | 370 | then { | |
383 | 371 | let votesListName = getVotesListName(assetId) | |
384 | 372 | let userVoteKey = keyUserVoteByPeriod(userAddress, assetId, currentPeriod) | |
385 | - | let userVoteActions = [StringEntry(userVoteKey, formatUserVote(gwxAmountAtEnd, inFavor)), StringEntry(keyUserVoteHistory("vote", userAddress, assetId, toBase58String(i.transactionId), currentPeriod), formatUserVote(gwxAmountAtEnd, inFavor)), getVoteResultAction(assetId, gwxAmountAtEnd, inFavor, currentPeriod | |
373 | + | let userVoteActions = [StringEntry(userVoteKey, formatUserVote(gwxAmountAtEnd, inFavor)), StringEntry(keyUserVoteHistory("vote", userAddress, assetId, toBase58String(i.transactionId), currentPeriod), formatUserVote(gwxAmountAtEnd, inFavor)), getVoteResultAction(assetId, gwxAmountAtEnd, inFavor, currentPeriod)] | |
386 | 374 | let votesListActions = if (containsNode(votesListName, userAddress)) | |
387 | 375 | then nil | |
388 | 376 | else insertNode(votesListName, userAddress) | |
389 | 377 | $Tuple2((votesListActions ++ userVoteActions), unit) | |
390 | 378 | } | |
391 | 379 | else throw("Strict value is not equal to itself.") | |
392 | 380 | } | |
393 | 381 | else throw("Strict value is not equal to itself.") | |
394 | 382 | } | |
395 | 383 | else throw("Strict value is not equal to itself.") | |
396 | 384 | } | |
397 | 385 | ||
398 | 386 | ||
399 | 387 | ||
400 | 388 | @Callable(i) | |
401 | 389 | func cancelVote (assetId) = { | |
402 | 390 | let userAddress = toString(i.caller) | |
403 | 391 | let votesListName = getVotesListName(assetId) | |
404 | 392 | let userVoteKey = keyUserVoteByPeriod(userAddress, assetId, currentPeriod) | |
405 | 393 | let userVoteOrUnit = getString(userVoteKey) | |
406 | 394 | let checkVote = valueOrElse(getString(userVoteKey), "Nothing to cancel") | |
407 | 395 | if ((checkVote == checkVote)) | |
408 | 396 | then { | |
409 | - | let $ | |
410 | - | let total = $ | |
411 | - | let inFavor = $ | |
397 | + | let $t01455514616 = parseUserVote(value(userVoteOrUnit)) | |
398 | + | let total = $t01455514616._1 | |
399 | + | let inFavor = $t01455514616._2 | |
412 | 400 | let votesListActions = deleteNode(votesListName, userAddress) | |
413 | - | let userVoteActions = [DeleteEntry(userVoteKey), StringEntry(keyUserVoteHistory("cancelVote", userAddress, assetId, toBase58String(i.transactionId), currentPeriod), formatUserVote(0, true)), getVoteResultAction(assetId, -(total), inFavor, currentPeriod | |
401 | + | let userVoteActions = [DeleteEntry(userVoteKey), StringEntry(keyUserVoteHistory("cancelVote", userAddress, assetId, toBase58String(i.transactionId), currentPeriod), formatUserVote(0, true)), getVoteResultAction(assetId, -(total), inFavor, currentPeriod)] | |
414 | 402 | $Tuple2((votesListActions ++ userVoteActions), unit) | |
415 | 403 | } | |
416 | 404 | else throw("Strict value is not equal to itself.") | |
417 | 405 | } | |
418 | 406 | ||
419 | 407 | ||
420 | 408 | ||
421 | 409 | @Callable(i) | |
422 | 410 | func finalizeAssetINTERNAL (assetId,period) = { | |
423 | 411 | let checkCaller = thisOnly(i) | |
424 | 412 | if ((checkCaller == checkCaller)) | |
425 | 413 | then { | |
426 | 414 | let voteResultKey = keyVoteResultByPeriod(assetId, period) | |
427 | - | let $ | |
415 | + | let $t01527015402 = match getString(voteResultKey) { | |
428 | 416 | case s: String => | |
429 | - | let r = parseVoteResult(s) | |
430 | - | $Tuple2(r._1, r._2) | |
417 | + | parseVoteResult(s) | |
431 | 418 | case _: Unit => | |
432 | 419 | $Tuple2(0, 0) | |
433 | 420 | case _ => | |
434 | 421 | throw("Match error") | |
435 | 422 | } | |
436 | - | let totalYes = $ | |
437 | - | let totalNo = $ | |
423 | + | let totalYes = $t01527015402._1 | |
424 | + | let totalNo = $t01527015402._2 | |
438 | 425 | let total = (totalYes + totalNo) | |
439 | 426 | let verified = if ((total >= votingThreshold)) | |
440 | 427 | then (totalYes > totalNo) | |
441 | 428 | else false | |
442 | 429 | let assetVerifiedAction = [BooleanEntry(keyAssetVerifiedByPeriod(assetId, period), verified)] | |
443 | 430 | let assetsStoreSetVerifiedInv = invoke(assetsStoreContract, "setVerified", [assetId, verified], nil) | |
444 | 431 | if ((assetsStoreSetVerifiedInv == assetsStoreSetVerifiedInv)) | |
445 | 432 | then { | |
446 | 433 | let eliminate = if (verified) | |
447 | 434 | then false | |
448 | 435 | else eliminationCheck(assetId) | |
449 | 436 | let voteResultActions = if (eliminate) | |
450 | 437 | then nil | |
451 | - | else [getVoteResultAction(assetId, 0, true, (currentPeriod + 1) | |
438 | + | else [getVoteResultAction(assetId, 0, true, (currentPeriod + 1))] | |
452 | 439 | let votesListActions = if (eliminate) | |
453 | 440 | then deleteNode(assetsListName, assetId) | |
454 | 441 | else nil | |
455 | 442 | $Tuple2(((votesListActions ++ voteResultActions) ++ assetVerifiedAction), unit) | |
456 | 443 | } | |
457 | 444 | else throw("Strict value is not equal to itself.") | |
458 | 445 | } | |
459 | 446 | else throw("Strict value is not equal to itself.") | |
460 | 447 | } | |
461 | 448 | ||
462 | 449 | ||
463 | 450 | ||
464 | 451 | @Callable(i) | |
465 | 452 | func finalizeVotingHelper () = { | |
466 | 453 | let endHeight = (startHeight + votingDuration) | |
467 | 454 | if ((endHeight > height)) | |
468 | 455 | then $Tuple2(nil, false) | |
469 | 456 | else { | |
470 | 457 | let latestProcessedAssetOrUnit = getString(keyLatestProcessedAsset) | |
471 | 458 | let latestProcessedUserOrUnit = getString(keyLatestProcessedUser) | |
472 | 459 | let nextPeriodDelay = 0 | |
473 | 460 | let finish = $Tuple2([IntegerEntry(keyStartHeight, (height + nextPeriodDelay)), IntegerEntry(keyCurrentPeriod, (currentPeriod + 1)), DeleteEntry(keyLatestProcessedAsset), DeleteEntry(keyLatestProcessedUser), DeleteEntry(keyLatestProcessedAssetTransfer), DeleteEntry(keyLatestProcessedUserTransfer)], true) | |
474 | 461 | if ((latestProcessedAssetOrUnit == unit)) | |
475 | 462 | then { | |
476 | 463 | let assetsHeadOrUnit = getString(keyListHead(assetsListName)) | |
477 | 464 | if ((assetsHeadOrUnit == unit)) | |
478 | 465 | then finish | |
479 | 466 | else { | |
480 | 467 | let asset = value(assetsHeadOrUnit) | |
481 | 468 | let userAddressOrUnit = getString(keyListHead(getVotesListName(asset))) | |
482 | 469 | let processVoteActions = processVote(asset, userAddressOrUnit, keyLatestProcessedAsset, keyLatestProcessedUser) | |
483 | 470 | $Tuple2(processVoteActions, true) | |
484 | 471 | } | |
485 | 472 | } | |
486 | 473 | else { | |
487 | 474 | let latestProcessedAsset = value(latestProcessedAssetOrUnit) | |
488 | 475 | if ((latestProcessedUserOrUnit == unit)) | |
489 | 476 | then { | |
490 | 477 | let assetOrUnit = getString(keyListNext(assetsListName, latestProcessedAsset)) | |
491 | 478 | if ((assetOrUnit == assetOrUnit)) | |
492 | 479 | then { | |
493 | 480 | let finalizeAssetInv = invoke(this, "finalizeAssetINTERNAL", [latestProcessedAsset, currentPeriod], nil) | |
494 | 481 | if ((finalizeAssetInv == finalizeAssetInv)) | |
495 | 482 | then if ((assetOrUnit == unit)) | |
496 | 483 | then finish | |
497 | 484 | else { | |
498 | 485 | let asset = value(assetOrUnit) | |
499 | 486 | let userAddressOrUnit = getString(keyListHead(getVotesListName(asset))) | |
500 | 487 | let processVoteActions = processVote(asset, userAddressOrUnit, keyLatestProcessedAsset, keyLatestProcessedUser) | |
501 | 488 | $Tuple2(processVoteActions, true) | |
502 | 489 | } | |
503 | 490 | else throw("Strict value is not equal to itself.") | |
504 | 491 | } | |
505 | 492 | else throw("Strict value is not equal to itself.") | |
506 | 493 | } | |
507 | 494 | else { | |
508 | 495 | let latestProcessedUser = value(latestProcessedUserOrUnit) | |
509 | 496 | let userAddressOrUnit = getString(keyListNext(getVotesListName(latestProcessedAsset), latestProcessedUser)) | |
510 | 497 | let processVoteActions = processVote(latestProcessedAsset, userAddressOrUnit, keyLatestProcessedAsset, keyLatestProcessedUser) | |
511 | 498 | $Tuple2(processVoteActions, true) | |
512 | 499 | } | |
513 | 500 | } | |
514 | 501 | } | |
515 | 502 | } | |
516 | 503 | ||
517 | 504 | ||
518 | 505 | ||
519 | 506 | @Callable(i) | |
520 | 507 | func finalizeVotingWrapper (counter) = { | |
521 | 508 | let result = asBool(invoke(this, "finalizeVotingHelper", nil, nil)) | |
522 | 509 | if ((result == result)) | |
523 | 510 | then if (!(result)) | |
524 | 511 | then if ((counter == 0)) | |
525 | 512 | then throw("Current voting is not over yet") | |
526 | 513 | else $Tuple2(nil, unit) | |
527 | 514 | else if ((maxDepth > counter)) | |
528 | 515 | then { | |
529 | 516 | let inv = invoke(this, "finalizeVotingWrapper", [(counter + 1)], nil) | |
530 | 517 | if ((inv == inv)) | |
531 | 518 | then $Tuple2(nil, unit) | |
532 | 519 | else throw("Strict value is not equal to itself.") | |
533 | 520 | } | |
534 | 521 | else $Tuple2(nil, unit) | |
535 | 522 | else throw("Strict value is not equal to itself.") | |
536 | 523 | } | |
537 | 524 | ||
538 | 525 | ||
539 | 526 | ||
540 | 527 | @Callable(i) | |
541 | 528 | func finalizeVoting () = { | |
542 | 529 | let inv = invoke(this, "finalizeVotingWrapper", [0], nil) | |
543 | 530 | if ((inv == inv)) | |
544 | 531 | then $Tuple2(nil, unit) | |
545 | 532 | else throw("Strict value is not equal to itself.") | |
546 | 533 | } | |
547 | 534 | ||
548 | 535 | ||
549 | 536 | ||
550 | 537 | @Callable(i) | |
551 | 538 | func transferVotesHelper () = { | |
552 | 539 | let votesTransferFinishedKey = keyVotesTransferFinishedByPeriod(currentPeriod) | |
553 | 540 | let votesTransferFinished = valueOrElse(getBoolean(votesTransferFinishedKey), false) | |
554 | 541 | let endHeight = (startHeight + votingDuration) | |
555 | 542 | if (if (if ((startHeight > height)) | |
556 | 543 | then true | |
557 | 544 | else (height >= endHeight)) | |
558 | 545 | then true | |
559 | 546 | else votesTransferFinished) | |
560 | 547 | then $Tuple2(nil, false) | |
561 | 548 | else { | |
562 | 549 | let latestProcessedAssetOrUnit = getString(keyLatestProcessedAssetTransfer) | |
563 | 550 | let latestProcessedUserOrUnit = getString(keyLatestProcessedUserTransfer) | |
564 | 551 | let finish = $Tuple2([BooleanEntry(votesTransferFinishedKey, true), DeleteEntry(keyLatestProcessedAssetTransfer), DeleteEntry(keyLatestProcessedUserTransfer)], true) | |
565 | 552 | if ((latestProcessedAssetOrUnit == unit)) | |
566 | 553 | then { | |
567 | 554 | let assetsHeadOrUnit = getString(keyListHead(assetsListName)) | |
568 | 555 | if ((assetsHeadOrUnit == unit)) | |
569 | 556 | then finish | |
570 | 557 | else { | |
571 | 558 | let asset = value(assetsHeadOrUnit) | |
572 | 559 | let userAddressOrUnit = getString(keyListHead(getVotesListName(asset))) | |
573 | 560 | let processVoteActions = processVote(asset, userAddressOrUnit, keyLatestProcessedAssetTransfer, keyLatestProcessedUserTransfer) | |
574 | 561 | $Tuple2(processVoteActions, true) | |
575 | 562 | } | |
576 | 563 | } | |
577 | 564 | else { | |
578 | 565 | let latestProcessedAsset = value(latestProcessedAssetOrUnit) | |
579 | 566 | if ((latestProcessedUserOrUnit == unit)) | |
580 | 567 | then { | |
581 | 568 | let assetOrUnit = getString(keyListNext(assetsListName, latestProcessedAsset)) | |
582 | 569 | if ((assetOrUnit == unit)) | |
583 | 570 | then finish | |
584 | 571 | else { | |
585 | 572 | let asset = value(assetOrUnit) | |
586 | 573 | let userAddressOrUnit = getString(keyListHead(getVotesListName(asset))) | |
587 | 574 | let processVoteActions = processVote(asset, userAddressOrUnit, keyLatestProcessedAssetTransfer, keyLatestProcessedUserTransfer) | |
588 | 575 | $Tuple2(processVoteActions, true) | |
589 | 576 | } | |
590 | 577 | } | |
591 | 578 | else { | |
592 | 579 | let latestProcessedUser = value(latestProcessedUserOrUnit) | |
593 | 580 | let userAddressOrUnit = getString(keyListNext(getVotesListName(latestProcessedAsset), latestProcessedUser)) | |
594 | 581 | let processVoteActions = processVote(latestProcessedAsset, userAddressOrUnit, keyLatestProcessedAssetTransfer, keyLatestProcessedUserTransfer) | |
595 | 582 | $Tuple2(processVoteActions, true) | |
596 | 583 | } | |
597 | 584 | } | |
598 | 585 | } | |
599 | 586 | } | |
600 | 587 | ||
601 | 588 | ||
602 | 589 | ||
603 | 590 | @Callable(i) | |
604 | 591 | func transferVotesWrapper (counter) = { | |
605 | 592 | let result = asBool(invoke(this, "transferVotesHelper", nil, nil)) | |
606 | 593 | if ((result == result)) | |
607 | 594 | then if (!(result)) | |
608 | 595 | then if ((counter == 0)) | |
609 | 596 | then throw("Voting is not started yet") | |
610 | 597 | else $Tuple2(nil, unit) | |
611 | 598 | else if ((maxDepth > counter)) | |
612 | 599 | then { | |
613 | 600 | let inv = invoke(this, "transferVotesWrapper", [(counter + 1)], nil) | |
614 | 601 | if ((inv == inv)) | |
615 | 602 | then $Tuple2(nil, unit) | |
616 | 603 | else throw("Strict value is not equal to itself.") | |
617 | 604 | } | |
618 | 605 | else $Tuple2(nil, unit) | |
619 | 606 | else throw("Strict value is not equal to itself.") | |
620 | 607 | } | |
621 | 608 | ||
622 | 609 | ||
623 | 610 | ||
624 | 611 | @Callable(i) | |
625 | 612 | func transferVotes () = { | |
626 | 613 | let inv = invoke(this, "transferVotesWrapper", [0], nil) | |
627 | 614 | if ((inv == inv)) | |
628 | 615 | then $Tuple2(nil, unit) | |
629 | 616 | else throw("Strict value is not equal to itself.") | |
630 | 617 | } | |
631 | 618 | ||
632 | 619 | ||
633 | 620 | ||
634 | 621 | @Callable(i) | |
635 | 622 | func setVotingThreshold (newThreshold) = { | |
636 | 623 | let checkCaller = thisOnly(i) | |
637 | 624 | if ((checkCaller == checkCaller)) | |
638 | 625 | then $Tuple2([IntegerEntry(keyVotingThreshold, newThreshold)], unit) | |
639 | 626 | else throw("Strict value is not equal to itself.") | |
640 | 627 | } | |
641 | 628 | ||
642 | 629 | ||
643 | 630 | ||
644 | 631 | @Callable(i) | |
645 | 632 | func setFee (newFee) = { | |
646 | 633 | let checkCaller = thisOnly(i) | |
647 | 634 | if ((checkCaller == checkCaller)) | |
648 | 635 | then $Tuple2([IntegerEntry(keyFeeAmount, newFee)], unit) | |
649 | 636 | else throw("Strict value is not equal to itself.") | |
650 | 637 | } | |
651 | 638 | ||
652 | 639 | ||
653 | 640 | ||
654 | 641 | @Callable(i) | |
655 | 642 | func gwxAvailableForVoteREADONLY (userAddress) = { | |
656 | 643 | let endHeight = (startHeight + votingDuration) | |
657 | 644 | let gwxAmountAtEnd = getUserGwxAmountAtHeight(userAddress, endHeight) | |
658 | 645 | $Tuple2(nil, gwxAmountAtEnd) | |
659 | 646 | } | |
660 | 647 | ||
661 | 648 |
github/deemru/w8io/026f985 76.88 ms ◑