tx · 6HAYEmA4ZGBVsGuw6R1KU3YyEyXRLTfK1G5S5TnkVVtM 3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh: -0.01000000 Waves 2023.05.17 11:17 [2581698] smart account 3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh > SELF 0.00000000 Waves
{ "type": 13, "id": "6HAYEmA4ZGBVsGuw6R1KU3YyEyXRLTfK1G5S5TnkVVtM", "fee": 1000000, "feeAssetId": null, "timestamp": 1684311497743, "version": 2, "chainId": 84, "sender": "3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh", "senderPublicKey": "EU9obW1yVhR8qug3EmXPeew3DMagvJFQzY5Ku8bmcsU7", "proofs": [ "2GxGs1M3zD34fzSDa6Q1Ki4EEdNAtgJE1D97Cvez1ujNPAxG6CJvkYd6P1zzXBYBhy1H35vyXoJekpmwrpDfgZro" ], "script": "base64:BgIbCAISBwoFCAgBAQESABIDCgEBEgASAwoBARIAGgAJc2VwYXJhdG9yAgJfXwAOa2V5RXBvY2hMZW5ndGgJALkJAgkAzAgCAgIlcwkAzAgCAgtlcG9jaExlbmd0aAUDbmlsBQlzZXBhcmF0b3IAE2tleUVtaXNzaW9uQ29udHJhY3QJALkJAgkAzAgCAgIlcwkAzAgCAhBlbWlzc2lvbkNvbnRyYWN0BQNuaWwFCXNlcGFyYXRvcgATa2V5Qm9vc3RpbmdDb250cmFjdAkAuQkCCQDMCAICAiVzCQDMCAICEGJvb3N0aW5nQ29udHJhY3QFA25pbAUJc2VwYXJhdG9yAAxrZXlUaHJlc2hvbGQJALkJAgkAzAgCAgIlcwkAzAgCAg92b3RpbmdUaHJlc2hvbGQFA25pbAUJc2VwYXJhdG9yAA9rZXlSYXRlUGVyQmxvY2sJALkJAgkAzAgCAgQlcyVzCQDMCAICDHJhdGVQZXJCbG9jawkAzAgCAgdjdXJyZW50BQNuaWwFCXNlcGFyYXRvcgASa2V5UmF0ZVBlckJsb2NrTWF4CQC5CQIJAMwIAgIE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WFzZWRSYXRlCAULJHQwODgwOTg4ODkCXzMECXZvdGVzTGlzdAkAzAgCBQ92b3Rlc1RvSW5jcmVhc2UJAMwIAgULdm90ZXNUb05vbmUJAMwIAgUPdm90ZXNUb0RlY3JlYXNlBQNuaWwEB2FjdGlvbnMDCQBmAgUJdGhyZXNob2xkBQhhbGxWb3RlcwUDbmlsAwkAAAIFC3ZvdGVzVG9Ob25lCQCWAwEFCXZvdGVzTGlzdAkAzAgCCQELU3RyaW5nRW50cnkCAgNmb28CBE5PTkUFA25pbAMJAAACBQ92b3Rlc1RvSW5jcmVhc2UJAJYDAQUJdm90ZXNMaXN0CQDMCAIJAQtTdHJpbmdFbnRyeQICA2ZvbwIDSU5DBQNuaWwJAMwIAgkBC1N0cmluZ0VudHJ5AgIDZm9vAgNERUMFA25pbAkAzggCBQdhY3Rpb25zCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQEOa2V5U3RhcnRIZWlnaHQABQZoZWlnaHQFA25pbAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgBlgtUC", "height": 2581698, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3rumRM2sxAoLHRrmj6QFirWw72dUrnBugoEkG5231xGq Next: 75H7XxBiqjXVS1RAzut7RK42aV16oZ1xhQGzPfdHXfD9 Diff:
Old | New | Differences | |
---|---|---|---|
295 | 295 | else if ((votesToIncrease == max(votesList))) | |
296 | 296 | then [StringEntry("foo", "INC")] | |
297 | 297 | else [StringEntry("foo", "DEC")] | |
298 | - | actions | |
298 | + | (actions ++ [IntegerEntry(keyStartHeight(), height)]) | |
299 | 299 | } | |
300 | 300 | else throw("Strict value is not equal to itself.") | |
301 | 301 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let separator = "__" | |
5 | 5 | ||
6 | 6 | let keyEpochLength = makeString(["%s", "epochLength"], separator) | |
7 | 7 | ||
8 | 8 | let keyEmissionContract = makeString(["%s", "emissionContract"], separator) | |
9 | 9 | ||
10 | 10 | let keyBoostingContract = makeString(["%s", "boostingContract"], separator) | |
11 | 11 | ||
12 | 12 | let keyThreshold = makeString(["%s", "votingThreshold"], separator) | |
13 | 13 | ||
14 | 14 | let keyRatePerBlock = makeString(["%s%s", "ratePerBlock", "current"], separator) | |
15 | 15 | ||
16 | 16 | let keyRatePerBlockMax = makeString(["%s%s", "ratePerBlockMax", "current"], separator) | |
17 | 17 | ||
18 | 18 | let keyRateChangeStep = makeString(["%s", "rateChangeStep"], separator) | |
19 | 19 | ||
20 | 20 | func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (key + " is not defined")) | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), (key + " is not defined")) | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | func keyStartHeight () = makeString(["%s", "startHeight"], separator) | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | func keyVotingResult () = makeString(["%s", "votingResult"], separator) | |
30 | 30 | ||
31 | 31 | ||
32 | 32 | func totalVotes (totalIncrease,totalNone,totalDecrease) = makeString(["%d%d%d", totalIncrease, totalNone, totalDecrease], separator) | |
33 | 33 | ||
34 | 34 | ||
35 | 35 | func keyVote (voterAddress) = makeString(["%s%s", "vote", voterAddress], separator) | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | func keyVoteValue (gwxAmount,vote) = { | |
39 | 39 | let key = if ((vote == 1)) | |
40 | 40 | then makeString(["%d%s", gwxAmount, "increase"], separator) | |
41 | 41 | else if ((vote == -1)) | |
42 | 42 | then makeString(["%d%s", gwxAmount, "decrease"], separator) | |
43 | 43 | else makeString(["%d%s", gwxAmount, "none"], separator) | |
44 | 44 | key | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | let boostingContract = addressFromStringValue(getStringOrFail(keyBoostingContract)) | |
49 | 49 | ||
50 | 50 | let emissionContract = addressFromStringValue(getStringOrFail(keyEmissionContract)) | |
51 | 51 | ||
52 | 52 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func keyManagerVaultAddress () = "%s__managerVaultAddress" | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) { | |
59 | 59 | case s: String => | |
60 | 60 | addressFromStringValue(s) | |
61 | 61 | case _ => | |
62 | 62 | this | |
63 | 63 | } | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func managerPublicKeyOrUnit () = { | |
67 | 67 | let managerVaultAddress = getManagerVaultAddressOrThis() | |
68 | 68 | match getString(managerVaultAddress, keyManagerPublicKey()) { | |
69 | 69 | case s: String => | |
70 | 70 | fromBase58String(s) | |
71 | 71 | case _: Unit => | |
72 | 72 | unit | |
73 | 73 | case _ => | |
74 | 74 | throw("Match error") | |
75 | 75 | } | |
76 | 76 | } | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func isManager (i) = match managerPublicKeyOrUnit() { | |
80 | 80 | case pk: ByteVector => | |
81 | 81 | (i.callerPublicKey == pk) | |
82 | 82 | case _: Unit => | |
83 | 83 | (i.caller == this) | |
84 | 84 | case _ => | |
85 | 85 | throw("Match error") | |
86 | 86 | } | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func mustManager (i) = if (isManager(i)) | |
90 | 90 | then true | |
91 | 91 | else throw("permission denied") | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func asInt (val) = match val { | |
95 | 95 | case valInt: Int => | |
96 | 96 | valInt | |
97 | 97 | case _ => | |
98 | 98 | throw("failed to cast into Integer") | |
99 | 99 | } | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func calcNewRate (ratePerBlockMax,ratePerBlock,changeStep) = { | |
103 | 103 | let maxAllowed = fraction(100, ratePerBlockMax, 120) | |
104 | 104 | let increasedRate = min([fraction((100 + changeStep), ratePerBlock, 100), maxAllowed]) | |
105 | 105 | let decreasedRate = max([fraction((100 - changeStep), ratePerBlock, 100), 0]) | |
106 | 106 | $Tuple3(increasedRate, ratePerBlock, decreasedRate) | |
107 | 107 | } | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func getRateChangeAmountsINTERNAL () = { | |
111 | 111 | let ratePerBlockMax = getIntegerValue(emissionContract, keyRatePerBlockMax) | |
112 | 112 | let ratePerBlock = getIntegerValue(emissionContract, keyRatePerBlock) | |
113 | 113 | let rateChangeStep = getIntegerValue(this, keyRateChangeStep) | |
114 | 114 | calcNewRate(ratePerBlockMax, ratePerBlock, rateChangeStep) | |
115 | 115 | } | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | @Callable(i) | |
119 | 119 | func constructor (boostingContractPrm,emissionContractPrm,votingDurationPrm,threshold,rateChangeStep) = { | |
120 | 120 | let checks = [if (isDefined(addressFromString(boostingContractPrm))) | |
121 | 121 | then true | |
122 | 122 | else throw("Invalid boosting contract address"), if (isDefined(addressFromString(emissionContractPrm))) | |
123 | 123 | then true | |
124 | 124 | else throw("Invalid emission contract address"), if ((votingDurationPrm > 0)) | |
125 | 125 | then true | |
126 | 126 | else throw("Invalid voting duration"), if ((threshold > 0)) | |
127 | 127 | then true | |
128 | 128 | else throw("invalid threshold"), if ((rateChangeStep > 0)) | |
129 | 129 | then true | |
130 | 130 | else throw("invalid rateChangeStep")] | |
131 | 131 | if ((checks == checks)) | |
132 | 132 | then $Tuple2([StringEntry(keyBoostingContract, boostingContractPrm), StringEntry(keyEmissionContract, emissionContractPrm), IntegerEntry(keyEpochLength, votingDurationPrm), IntegerEntry(keyThreshold, threshold), IntegerEntry(keyRateChangeStep, rateChangeStep), IntegerEntry(keyStartHeight(), height), StringEntry(keyVotingResult(), totalVotes("0", "0", "0"))], unit) | |
133 | 133 | else throw("Strict value is not equal to itself.") | |
134 | 134 | } | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | ||
138 | 138 | @Callable(i) | |
139 | 139 | func getRateChangeAmountsREADONLY () = $Tuple2(nil, getRateChangeAmountsINTERNAL()) | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | ||
143 | 143 | @Callable(i) | |
144 | 144 | func vote (inFavor) = { | |
145 | 145 | let votingFinishHeight = (value(getInteger(keyStartHeight())) + value(getInteger(keyEpochLength))) | |
146 | 146 | let checks = [if ((votingFinishHeight > height)) | |
147 | 147 | then true | |
148 | 148 | else throw("too late to vote"), if (containsElement([1, 0, -1], inFavor)) | |
149 | 149 | then true | |
150 | 150 | else throw("not valid argument")] | |
151 | 151 | if ((checks == checks)) | |
152 | 152 | then { | |
153 | 153 | let gwxAmount = invoke(boostingContract, "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), votingFinishHeight], nil) | |
154 | 154 | let notZero = if ((asInt(gwxAmount) > 0)) | |
155 | 155 | then true | |
156 | 156 | else throw("you don't have gwx") | |
157 | 157 | if ((notZero == notZero)) | |
158 | 158 | then { | |
159 | 159 | let vote = match getString(keyVote(toString(i.caller))) { | |
160 | 160 | case s: String => | |
161 | 161 | let vote = split(s, separator) | |
162 | 162 | let voteValue = vote[1] | |
163 | 163 | let voteType = vote[2] | |
164 | 164 | let isVoteTypeSimilar = if (if (if ((voteType == "increase")) | |
165 | 165 | then (inFavor == 1) | |
166 | 166 | else false) | |
167 | 167 | then true | |
168 | 168 | else if ((voteType == "decrease")) | |
169 | 169 | then (inFavor == -1) | |
170 | 170 | else false) | |
171 | 171 | then true | |
172 | 172 | else if ((voteType == "none")) | |
173 | 173 | then (inFavor == 0) | |
174 | 174 | else false | |
175 | 175 | let isVoteValueSimilar = if (isVoteTypeSimilar) | |
176 | 176 | then (asInt(gwxAmount) == parseIntValue(voteValue)) | |
177 | 177 | else false | |
178 | 178 | let isNewVoteSimilar = if (if (isVoteTypeSimilar) | |
179 | 179 | then isVoteValueSimilar | |
180 | 180 | else false) | |
181 | 181 | then throw("you already voted") | |
182 | 182 | else invoke(this, "cancelVote", nil, nil) | |
183 | 183 | isNewVoteSimilar | |
184 | 184 | case u: Unit => | |
185 | 185 | u | |
186 | 186 | case _ => | |
187 | 187 | throw("Match error") | |
188 | 188 | } | |
189 | 189 | if ((vote == vote)) | |
190 | 190 | then { | |
191 | 191 | let votingResult = split(value(getString(keyVotingResult())), separator) | |
192 | 192 | let votesToIncrease = votingResult[1] | |
193 | 193 | let votesToNone = votingResult[2] | |
194 | 194 | let votesToDecrease = votingResult[3] | |
195 | 195 | let newPositiveAndNegativeVotes = if ((inFavor == 1)) | |
196 | 196 | then { | |
197 | 197 | let newPositiveVotes = (parseIntValue(votesToIncrease) + asInt(gwxAmount)) | |
198 | 198 | [toString(newPositiveVotes), votesToNone, votesToDecrease] | |
199 | 199 | } | |
200 | 200 | else if ((inFavor == -1)) | |
201 | 201 | then { | |
202 | 202 | let newNegativeVotes = (parseIntValue(votesToNone) + asInt(gwxAmount)) | |
203 | 203 | [votesToIncrease, votesToNone, toString(newNegativeVotes)] | |
204 | 204 | } | |
205 | 205 | else { | |
206 | 206 | let newNoneVotes = (parseIntValue(votesToNone) + asInt(gwxAmount)) | |
207 | 207 | [votesToIncrease, toString(newNoneVotes), votesToDecrease] | |
208 | 208 | } | |
209 | 209 | let voteKey = keyVote(toString(i.caller)) | |
210 | 210 | let voteValue = keyVoteValue(toString(asInt(gwxAmount)), inFavor) | |
211 | 211 | $Tuple2([StringEntry(keyVotingResult(), totalVotes(newPositiveAndNegativeVotes[0], newPositiveAndNegativeVotes[1], newPositiveAndNegativeVotes[2])), StringEntry(voteKey, voteValue)], unit) | |
212 | 212 | } | |
213 | 213 | else throw("Strict value is not equal to itself.") | |
214 | 214 | } | |
215 | 215 | else throw("Strict value is not equal to itself.") | |
216 | 216 | } | |
217 | 217 | else throw("Strict value is not equal to itself.") | |
218 | 218 | } | |
219 | 219 | ||
220 | 220 | ||
221 | 221 | ||
222 | 222 | @Callable(i) | |
223 | 223 | func cancelVote () = { | |
224 | 224 | let userAddress = if ((i.caller == this)) | |
225 | 225 | then toString(i.originCaller) | |
226 | 226 | else toString(i.caller) | |
227 | 227 | let checks = [if (isDefined(getString(keyVotingResult()))) | |
228 | 228 | then true | |
229 | 229 | else throw("no vote")] | |
230 | 230 | if ((checks == checks)) | |
231 | 231 | then { | |
232 | 232 | let vote = split(value(getString(keyVote(userAddress))), separator) | |
233 | 233 | let voteValue = vote[1] | |
234 | 234 | let voteType = vote[2] | |
235 | 235 | let votingResult = split(value(getString(keyVotingResult())), separator) | |
236 | 236 | let votesToIncrease = votingResult[1] | |
237 | 237 | let votesToNone = votingResult[2] | |
238 | 238 | let votesToDecrease = votingResult[3] | |
239 | 239 | let actions = if ((voteType == "increase")) | |
240 | 240 | then { | |
241 | 241 | let newIncreaseVotes = (parseIntValue(votesToIncrease) - parseIntValue(voteValue)) | |
242 | 242 | $Tuple2([StringEntry(keyVotingResult(), totalVotes(toString(newIncreaseVotes), votesToNone, votesToDecrease)), DeleteEntry(keyVote(userAddress))], unit) | |
243 | 243 | } | |
244 | 244 | else if ((voteType == "decrease")) | |
245 | 245 | then { | |
246 | 246 | let newDecreaseVotes = (parseIntValue(votesToDecrease) - parseIntValue(voteValue)) | |
247 | 247 | $Tuple2([StringEntry(keyVotingResult(), totalVotes(votesToIncrease, votesToNone, toString(newDecreaseVotes))), DeleteEntry(keyVote(userAddress))], unit) | |
248 | 248 | } | |
249 | 249 | else { | |
250 | 250 | let newNoneVotes = (parseIntValue(votesToNone) - parseIntValue(voteValue)) | |
251 | 251 | $Tuple2([StringEntry(keyVotingResult(), totalVotes(votesToIncrease, toString(newNoneVotes), votesToDecrease)), DeleteEntry(keyVote(userAddress))], unit) | |
252 | 252 | } | |
253 | 253 | actions | |
254 | 254 | } | |
255 | 255 | else throw("Strict value is not equal to itself.") | |
256 | 256 | } | |
257 | 257 | ||
258 | 258 | ||
259 | 259 | ||
260 | 260 | @Callable(i) | |
261 | 261 | func setThreshold (newThreshold) = { | |
262 | 262 | let checks = [mustManager(i), if ((newThreshold > 0)) | |
263 | 263 | then true | |
264 | 264 | else throw("invalid threshold")] | |
265 | 265 | if ((checks == checks)) | |
266 | 266 | then $Tuple2([IntegerEntry(keyThreshold, newThreshold)], unit) | |
267 | 267 | else throw("Strict value is not equal to itself.") | |
268 | 268 | } | |
269 | 269 | ||
270 | 270 | ||
271 | 271 | ||
272 | 272 | @Callable(i) | |
273 | 273 | func finalize () = { | |
274 | 274 | let votingFinishHeight = (value(getInteger(keyStartHeight())) + value(getInteger(keyEpochLength))) | |
275 | 275 | let checks = [if ((height >= votingFinishHeight)) | |
276 | 276 | then true | |
277 | 277 | else throw("insufficient height for completion")] | |
278 | 278 | if ((checks == checks)) | |
279 | 279 | then { | |
280 | 280 | let votingResult = split(value(getString(keyVotingResult())), separator) | |
281 | 281 | let votesToIncrease = parseIntValue(votingResult[1]) | |
282 | 282 | let votesToNone = parseIntValue(votingResult[2]) | |
283 | 283 | let votesToDecrease = parseIntValue(votingResult[3]) | |
284 | 284 | let allVotes = ((votesToIncrease + votesToNone) + votesToDecrease) | |
285 | 285 | let threshold = getIntOrFail(keyThreshold) | |
286 | 286 | let $t088098889 = getRateChangeAmountsINTERNAL() | |
287 | 287 | let increasedRate = $t088098889._1 | |
288 | 288 | let currentRate = $t088098889._2 | |
289 | 289 | let decreasedRate = $t088098889._3 | |
290 | 290 | let votesList = [votesToIncrease, votesToNone, votesToDecrease] | |
291 | 291 | let actions = if ((threshold > allVotes)) | |
292 | 292 | then nil | |
293 | 293 | else if ((votesToNone == max(votesList))) | |
294 | 294 | then [StringEntry("foo", "NONE")] | |
295 | 295 | else if ((votesToIncrease == max(votesList))) | |
296 | 296 | then [StringEntry("foo", "INC")] | |
297 | 297 | else [StringEntry("foo", "DEC")] | |
298 | - | actions | |
298 | + | (actions ++ [IntegerEntry(keyStartHeight(), height)]) | |
299 | 299 | } | |
300 | 300 | else throw("Strict value is not equal to itself.") | |
301 | 301 | } | |
302 | 302 | ||
303 | 303 |
github/deemru/w8io/169f3d6 75.95 ms ◑