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