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