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