tx · 5xyV5DreQwUrG6MptNFBGysfgzpq4U1WF4Bc4AhsAsjn

3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh:  -0.01000000 Waves

2023.05.18 16:47 [2583473] smart account 3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh > SELF 0.00000000 Waves

{ "type": 13, "id": "5xyV5DreQwUrG6MptNFBGysfgzpq4U1WF4Bc4AhsAsjn", "fee": 1000000, "feeAssetId": null, "timestamp": 1684417671204, "version": 2, "chainId": 84, "sender": "3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh", "senderPublicKey": "EU9obW1yVhR8qug3EmXPeew3DMagvJFQzY5Ku8bmcsU7", "proofs": [ "5hjJ8qNUizibfpqNvMifM3uQrgCE5nY1FJWa9U2NmkXXk6VGVQiy5MVE95RzjircY7qUhxzJHHtSfaxUAQWvF4b8" ], "script": "base64:BgIbCAISBwoFCAgBAQESABIDCgEBEgASAwoBARIAHAAJc2VwYXJhdG9yAgJfXwAQY29udHJhY3RGaWxlbmFtZQIZdm90aW5nX2VtaXNzaW9uX3JhdGUucmlkZQAOa2V5RXBvY2hMZW5ndGgJALkJAgkAzAgCAgIlcwkAzAgCAgtlcG9jaExlbmd0aAUDbmlsBQlzZXBhcmF0b3IAE2tleUVtaXNzaW9uQ29udHJhY3QJALkJAgkAzAgCAgIlcwkAzAgCAhBlbWlzc2lvbkNvbnRyYWN0BQNuaWwFCXNlcGFyYXRvcgATa2V5Qm9vc3RpbmdDb250cmFjdAkAuQkCCQDMCAICAiVzCQDMCAICEGJvb3N0aW5nQ29udHJhY3QFA25pbAUJc2VwYXJhdG9yAAxrZXlUaHJlc2hvbGQJALkJAgkAzAgCAgIlcwkAzAgCAg92b3RpbmdUaHJlc2hvbGQFA25pbAUJc2VwYXJhdG9yAA9rZXlSYXRlUGVyQmxvY2sJALkJAgkAzAgCAgQlcyVzCQDMCAICDHJhdGVQZXJCbG9jawkAzAgCAgdjdXJyZW50BQNuaWwFCXNlcG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icationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5DHqA3M2YdRrmdfsQpq33J9SEPAjaTbp5wQLUFoUQrem Next: F4oAcLBWoAZZQbi34R7R99kog8qC8JARp3afVFSfNXyW Diff:
OldNewDifferences
303303 else if ((votesForIncrease == max(votesList)))
304304 then increasedRate
305305 else decreasedRate
306- let changeRateInvoke = match newRate {
307- case rate: Int =>
308- invoke(emissionContract, "changeRatePerBlock", [rate], nil)
309- case _ =>
310- unit
311- }
312- if ((changeRateInvoke == changeRateInvoke))
313- then [IntegerEntry(keyStartHeight(), height), StringEntry(keyVotingResult(), totalVotes("0", "0", "0"))]
314- else throw("Strict value is not equal to itself.")
306+[IntegerEntry(keyStartHeight(), height), StringEntry(keyVotingResult(), totalVotes("0", "0", "0"))]
315307 }
316308 else throw("Strict value is not equal to itself.")
317309 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let separator = "__"
55
66 let contractFilename = "voting_emission_rate.ride"
77
88 let keyEpochLength = makeString(["%s", "epochLength"], separator)
99
1010 let keyEmissionContract = makeString(["%s", "emissionContract"], separator)
1111
1212 let keyBoostingContract = makeString(["%s", "boostingContract"], separator)
1313
1414 let keyThreshold = makeString(["%s", "votingThreshold"], separator)
1515
1616 let keyRatePerBlock = makeString(["%s%s", "ratePerBlock", "current"], separator)
1717
1818 let keyRatePerBlockMax = makeString(["%s%s", "ratePerBlockMax", "current"], separator)
1919
2020 let keyRateChangeStep = makeString(["%s", "rateChangeStep"], separator)
2121
2222 func throwErr (s) = throw(((contractFilename + ": ") + s))
2323
2424
2525 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (key + " is not defined"))
2626
2727
2828 func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), (key + " is not defined"))
2929
3030
3131 func keyStartHeight () = makeString(["%s", "startHeight"], separator)
3232
3333
3434 func keyVotingResult () = makeString(["%s", "votingResult"], separator)
3535
3636
3737 func totalVotes (totalIncrease,totalNone,totalDecrease) = makeString(["%d%d%d", totalIncrease, totalNone, totalDecrease], separator)
3838
3939
4040 func keyVote (voterAddress,startHeight) = makeString(["%s%s%d", "vote", voterAddress, toString(startHeight)], separator)
4141
4242
4343 func keyVoteValue (gwxAmount,vote) = {
4444 let key = if ((vote == 1))
4545 then makeString(["%d%s", gwxAmount, "increase"], separator)
4646 else if ((vote == -1))
4747 then makeString(["%d%s", gwxAmount, "decrease"], separator)
4848 else makeString(["%d%s", gwxAmount, "current"], separator)
4949 key
5050 }
5151
5252
5353 let boostingContract = addressFromStringValue(getStringOrFail(keyBoostingContract))
5454
5555 let emissionContract = addressFromStringValue(getStringOrFail(keyEmissionContract))
5656
5757 func keyManagerPublicKey () = "%s__managerPublicKey"
5858
5959
6060 func keyManagerVaultAddress () = "%s__managerVaultAddress"
6161
6262
6363 func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) {
6464 case s: String =>
6565 addressFromStringValue(s)
6666 case _ =>
6767 this
6868 }
6969
7070
7171 func managerPublicKeyOrUnit () = {
7272 let managerVaultAddress = getManagerVaultAddressOrThis()
7373 match getString(managerVaultAddress, keyManagerPublicKey()) {
7474 case s: String =>
7575 fromBase58String(s)
7676 case _: Unit =>
7777 unit
7878 case _ =>
7979 throw("Match error")
8080 }
8181 }
8282
8383
8484 func isManager (i) = match managerPublicKeyOrUnit() {
8585 case pk: ByteVector =>
8686 (i.callerPublicKey == pk)
8787 case _: Unit =>
8888 (i.caller == this)
8989 case _ =>
9090 throw("Match error")
9191 }
9292
9393
9494 func mustManager (i) = if (isManager(i))
9595 then true
9696 else throwErr("permission denied")
9797
9898
9999 func asInt (val) = match val {
100100 case valInt: Int =>
101101 valInt
102102 case _ =>
103103 throwErr("failed to cast into Integer")
104104 }
105105
106106
107107 func calcNewRate (ratePerBlockMax,ratePerBlock,changeStep) = {
108108 let maxAllowed = fraction(100, ratePerBlockMax, 120)
109109 let increasedRate = min([fraction((100 + changeStep), ratePerBlock, 100), maxAllowed])
110110 let decreasedRate = max([fraction((100 - changeStep), ratePerBlock, 100), 0])
111111 $Tuple3(increasedRate, ratePerBlock, decreasedRate)
112112 }
113113
114114
115115 func getRateChangeAmountsINTERNAL () = {
116116 let ratePerBlockMax = getIntegerValue(emissionContract, keyRatePerBlockMax)
117117 let ratePerBlock = getIntegerValue(emissionContract, keyRatePerBlock)
118118 let rateChangeStep = getIntegerValue(this, keyRateChangeStep)
119119 calcNewRate(ratePerBlockMax, ratePerBlock, rateChangeStep)
120120 }
121121
122122
123123 @Callable(i)
124124 func constructor (boostingContractPrm,emissionContractPrm,votingDurationPrm,threshold,rateChangeStep) = {
125125 let checks = [if (isDefined(addressFromString(boostingContractPrm)))
126126 then true
127127 else throwErr("Invalid boosting contract address"), if (isDefined(addressFromString(emissionContractPrm)))
128128 then true
129129 else throwErr("Invalid emission contract address"), if ((votingDurationPrm > 0))
130130 then true
131131 else throwErr("Invalid voting duration"), if ((threshold > 0))
132132 then true
133133 else throwErr("invalid threshold"), if ((rateChangeStep > 0))
134134 then true
135135 else throwErr("invalid rateChangeStep")]
136136 if ((checks == checks))
137137 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)
138138 else throw("Strict value is not equal to itself.")
139139 }
140140
141141
142142
143143 @Callable(i)
144144 func getRateChangeAmountsREADONLY () = $Tuple2(nil, getRateChangeAmountsINTERNAL())
145145
146146
147147
148148 @Callable(i)
149149 func vote (inFavor) = {
150150 let startHeight = getIntegerValue(keyStartHeight())
151151 let votingFinishHeight = (startHeight + value(getInteger(keyEpochLength)))
152152 let checks = [if ((votingFinishHeight > height))
153153 then true
154154 else throwErr("too late to vote"), if (containsElement([1, 0, -1], inFavor))
155155 then true
156156 else throwErr("not valid argument")]
157157 if ((checks == checks))
158158 then {
159159 let gwxAmount = invoke(boostingContract, "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), votingFinishHeight], nil)
160160 let notZero = if ((asInt(gwxAmount) > 0))
161161 then true
162162 else throwErr("you don't have gwx")
163163 if ((notZero == notZero))
164164 then {
165165 let vote = match getString(keyVote(toString(i.caller), startHeight)) {
166166 case s: String =>
167167 let vote = split(s, separator)
168168 let voteValue = vote[1]
169169 let voteType = vote[2]
170170 let isVoteTypeSimilar = if (if (if ((voteType == "increase"))
171171 then (inFavor == 1)
172172 else false)
173173 then true
174174 else if ((voteType == "decrease"))
175175 then (inFavor == -1)
176176 else false)
177177 then true
178178 else if ((voteType == "current"))
179179 then (inFavor == 0)
180180 else false
181181 let isVoteValueSimilar = if (isVoteTypeSimilar)
182182 then (asInt(gwxAmount) == parseIntValue(voteValue))
183183 else false
184184 let isNewVoteSimilar = if (if (isVoteTypeSimilar)
185185 then isVoteValueSimilar
186186 else false)
187187 then throwErr("you already voted")
188188 else invoke(this, "cancelVote", nil, nil)
189189 isNewVoteSimilar
190190 case u: Unit =>
191191 u
192192 case _ =>
193193 throw("Match error")
194194 }
195195 if ((vote == vote))
196196 then {
197197 let votingResult = split(value(getString(keyVotingResult())), separator)
198198 let votesForIncrease = votingResult[1]
199199 let votesForCurrent = votingResult[2]
200200 let votesForDecrease = votingResult[3]
201201 let newPositiveAndNegativeVotes = if ((inFavor == 1))
202202 then {
203203 let newPositiveVotes = (parseIntValue(votesForIncrease) + asInt(gwxAmount))
204204 [toString(newPositiveVotes), votesForCurrent, votesForDecrease]
205205 }
206206 else if ((inFavor == -1))
207207 then {
208208 let newNegativeVotes = (parseIntValue(votesForCurrent) + asInt(gwxAmount))
209209 [votesForIncrease, votesForCurrent, toString(newNegativeVotes)]
210210 }
211211 else {
212212 let newNoneVotes = (parseIntValue(votesForCurrent) + asInt(gwxAmount))
213213 [votesForIncrease, toString(newNoneVotes), votesForDecrease]
214214 }
215215 let voteKey = keyVote(toString(i.caller), startHeight)
216216 let voteValue = keyVoteValue(toString(asInt(gwxAmount)), inFavor)
217217 $Tuple2([StringEntry(keyVotingResult(), totalVotes(newPositiveAndNegativeVotes[0], newPositiveAndNegativeVotes[1], newPositiveAndNegativeVotes[2])), StringEntry(voteKey, voteValue)], unit)
218218 }
219219 else throw("Strict value is not equal to itself.")
220220 }
221221 else throw("Strict value is not equal to itself.")
222222 }
223223 else throw("Strict value is not equal to itself.")
224224 }
225225
226226
227227
228228 @Callable(i)
229229 func cancelVote () = {
230230 let startHeight = getIntegerValue(keyStartHeight())
231231 let userAddress = if ((i.caller == this))
232232 then toString(i.originCaller)
233233 else toString(i.caller)
234234 let checks = [if (isDefined(getString(keyVotingResult())))
235235 then true
236236 else throwErr("no vote")]
237237 if ((checks == checks))
238238 then {
239239 let vote = split(value(getString(keyVote(userAddress, startHeight))), separator)
240240 let voteValue = vote[1]
241241 let voteType = vote[2]
242242 let votingResult = split(value(getString(keyVotingResult())), separator)
243243 let votesForIncrease = votingResult[1]
244244 let votesForCurrent = votingResult[2]
245245 let votesForDecrease = votingResult[3]
246246 let actions = if ((voteType == "increase"))
247247 then {
248248 let newIncreaseVotes = (parseIntValue(votesForIncrease) - parseIntValue(voteValue))
249249 [StringEntry(keyVotingResult(), totalVotes(toString(newIncreaseVotes), votesForCurrent, votesForDecrease))]
250250 }
251251 else if ((voteType == "decrease"))
252252 then {
253253 let newDecreaseVotes = (parseIntValue(votesForDecrease) - parseIntValue(voteValue))
254254 [StringEntry(keyVotingResult(), totalVotes(votesForIncrease, votesForCurrent, toString(newDecreaseVotes)))]
255255 }
256256 else {
257257 let newCurrentVotes = (parseIntValue(votesForCurrent) - parseIntValue(voteValue))
258258 [StringEntry(keyVotingResult(), totalVotes(votesForIncrease, toString(newCurrentVotes), votesForDecrease))]
259259 }
260260 let defaultActions = [DeleteEntry(keyVote(userAddress, startHeight))]
261261 (actions ++ defaultActions)
262262 }
263263 else throw("Strict value is not equal to itself.")
264264 }
265265
266266
267267
268268 @Callable(i)
269269 func setThreshold (newThreshold) = {
270270 let checks = [mustManager(i), if ((newThreshold > 0))
271271 then true
272272 else throwErr("invalid threshold")]
273273 if ((checks == checks))
274274 then $Tuple2([IntegerEntry(keyThreshold, newThreshold)], unit)
275275 else throw("Strict value is not equal to itself.")
276276 }
277277
278278
279279
280280 @Callable(i)
281281 func finalize () = {
282282 let votingFinishHeight = (value(getInteger(keyStartHeight())) + value(getInteger(keyEpochLength)))
283283 let checks = [if ((height >= votingFinishHeight))
284284 then true
285285 else throwErr("insufficient height for completion")]
286286 if ((checks == checks))
287287 then {
288288 let votingResult = split(value(getString(keyVotingResult())), separator)
289289 let votesForIncrease = parseIntValue(votingResult[1])
290290 let votesForCurrent = parseIntValue(votingResult[2])
291291 let votesForDecrease = parseIntValue(votingResult[3])
292292 let allVotes = ((votesForIncrease + votesForCurrent) + votesForDecrease)
293293 let threshold = getIntOrFail(keyThreshold)
294294 let $t092319311 = getRateChangeAmountsINTERNAL()
295295 let increasedRate = $t092319311._1
296296 let currentRate = $t092319311._2
297297 let decreasedRate = $t092319311._3
298298 let votesList = [votesForIncrease, votesForCurrent, votesForDecrease]
299299 let newRate = if (if ((threshold > allVotes))
300300 then true
301301 else (votesForCurrent == max(votesList)))
302302 then unit
303303 else if ((votesForIncrease == max(votesList)))
304304 then increasedRate
305305 else decreasedRate
306- let changeRateInvoke = match newRate {
307- case rate: Int =>
308- invoke(emissionContract, "changeRatePerBlock", [rate], nil)
309- case _ =>
310- unit
311- }
312- if ((changeRateInvoke == changeRateInvoke))
313- then [IntegerEntry(keyStartHeight(), height), StringEntry(keyVotingResult(), totalVotes("0", "0", "0"))]
314- else throw("Strict value is not equal to itself.")
306+[IntegerEntry(keyStartHeight(), height), StringEntry(keyVotingResult(), totalVotes("0", "0", "0"))]
315307 }
316308 else throw("Strict value is not equal to itself.")
317309 }
318310
319311

github/deemru/w8io/026f985 
117.29 ms