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