tx · 2UkJjQh9QMRq5BjRmfaPuSKKhzJkqm61LzTk12uTAD9C

3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh:  -0.01000000 Waves

2023.05.19 09:46 [2584489] smart account 3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh > SELF 0.00000000 Waves

{ "type": 13, "id": "2UkJjQh9QMRq5BjRmfaPuSKKhzJkqm61LzTk12uTAD9C", "fee": 1000000, "feeAssetId": null, "timestamp": 1684478831256, "version": 2, "chainId": 84, "sender": "3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh", "senderPublicKey": "EU9obW1yVhR8qug3EmXPeew3DMagvJFQzY5Ku8bmcsU7", "proofs": [ "7EMkiQkjx6XC2ebSB8iqnNoQTm8V5fEv1hRLMs4QHcVxwndpd76EWnJFDBQn5BDs26Z5X7u3h3P1fQvwEsxMxrf" ], "script": "base64:BgIbCAISBwoFCAgBAQESABIDCgEBEgASAwoBARIAHAAJc2VwYXJhdG9yAgJfXwAQY29udHJhY3RGaWxlbmFtZQIZdm90aW5nX2VtaXNzaW9uX3JhdGUucmlkZQAOa2V5RXBvY2hMZW5ndGgJALkJAgkAzAgCAgIlcwkAzAgCAgtlcG9jaExlbmd0aAUDbmlsBQlzZXBhcmF0b3IAE2tleUVtaXNzaW9uQ29udHJhY3QJALkJAgkAzAgCAgIlcwkAzAgCAhBlbWlzc2lvbkNvbnRyYWN0BQNuaWwFCXNlcGFyYXRvcgATa2V5Qm9vc3RpbmdDb250cmFjdAkAuQkCCQDMCAICAiVzCQDMCAICEGJvb3N0aW5nQ29udHJhY3QFA25pbAUJc2VwYXJhdG9yAAxrZXlUaHJlc2hvbGQJALkJAgkAzAgCAgIlcwkAzAgCAg92b3RpbmdUaHJlc2hvbGQFA25pbAUJc2VwYXJhdG9yAA9rZXlSYXRlUGVyQmxvY2sJALkJAgkAzAgCAgQlcyVzCQDMCAICDHJhdGVQZXJCbG9jawkAzAgCAgdjdXJyZW50BQNuaWwFCXNl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CWAwEFCXZvdGVzTGlzdAUEdW5pdAMJAAACBRB2b3Rlc0ZvckluY3JlYXNlCQCWAwEFCXZvdGVzTGlzdAUNaW5jcmVhc2VkUmF0ZQUNZGVjcmVhc2VkUmF0ZQQKbmV3UmF0ZUludAQHJG1hdGNoMAUHbmV3UmF0ZQMJAAECBQckbWF0Y2gwAgNJbnQEAXQFByRtYXRjaDAFAXQA////////////AQkAzAgCCQEMSW50ZWdlckVudHJ5AgUOa2V5U3RhcnRIZWlnaHQFBmhlaWdodAkAzAgCCQELU3RyaW5nRW50cnkCBQ9rZXlWb3RpbmdSZXN1bHQJAQp0b3RhbFZvdGVzAwIBMAIBMAIBMAkAzAgCCQEMSW50ZWdlckVudHJ5AgIDZm9vBQpuZXdSYXRlSW50BQNuaWwJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AK5NjMg==", "height": 2584489, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2m2XsiApYTNCzQgh22k4Psu3ddHks28YbK3dncW4SYqr Next: none Diff:
OldNewDifferences
146146 @Callable(i)
147147 func vote (inFavor) = {
148148 let startHeight = getIntegerValue(keyStartHeight)
149- let votingFinishHeight = (startHeight + value(getInteger(keyEpochLength)))
149+ let votingFinishHeight = (startHeight + getIntegerValue(keyEpochLength))
150150 let checks = [if ((votingFinishHeight > height))
151151 then true
152152 else throwErr("too late to vote"), if (containsElement([1, 0, -1], inFavor))
226226 @Callable(i)
227227 func cancelVote () = {
228228 let startHeight = getIntegerValue(keyStartHeight)
229+ let votingFinishHeight = (startHeight + getIntegerValue(keyEpochLength))
229230 let userAddress = if ((i.caller == this))
230231 then toString(i.originCaller)
231232 else toString(i.caller)
232- let checks = [if (isDefined(getString(keyVotingResult)))
233+ let checks = [if ((votingFinishHeight > height))
234+ then true
235+ else throwErr("too late to cancel vote"), if (isDefined(getString(keyVotingResult)))
233236 then true
234237 else throwErr("no vote"), if (isDefined(getString(keyVote(userAddress, startHeight))))
235238 then true
291294 let votesForDecrease = parseIntValue(votingResult[3])
292295 let allVotes = ((votesForIncrease + votesForCurrent) + votesForDecrease)
293296 let threshold = getIntOrFail(keyThreshold)
294- let $t093189398 = getRateChangeAmountsINTERNAL()
295- let increasedRate = $t093189398._1
296- let currentRate = $t093189398._2
297- let decreasedRate = $t093189398._3
297+ let $t094649544 = getRateChangeAmountsINTERNAL()
298+ let increasedRate = $t094649544._1
299+ let currentRate = $t094649544._2
300+ let decreasedRate = $t094649544._3
298301 let votesList = [votesForIncrease, votesForCurrent, votesForDecrease]
299302 let newRate = if (if ((threshold > allVotes))
300303 then true
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 let keyStartHeight = makeString(["%s", "startHeight"], separator)
2323
2424 let keyVotingResult = makeString(["%s", "votingResult"], separator)
2525
2626 func throwErr (s) = throw(((contractFilename + ": ") + s))
2727
2828
2929 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (key + " is not defined"))
3030
3131
3232 func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), (key + " is not defined"))
3333
3434
3535 func totalVotes (totalIncrease,totalCurrent,totalDecrease) = makeString(["%d%d%d", totalIncrease, totalCurrent, totalDecrease], separator)
3636
3737
3838 func keyVote (voterAddress,startHeight) = makeString(["%s%s%d", "vote", voterAddress, toString(startHeight)], separator)
3939
4040
4141 func keyVoteValue (gwxAmount,vote) = {
4242 let key = if ((vote == 1))
4343 then makeString(["%d%s", gwxAmount, "increase"], separator)
4444 else if ((vote == -1))
4545 then makeString(["%d%s", gwxAmount, "decrease"], separator)
4646 else makeString(["%d%s", gwxAmount, "current"], separator)
4747 key
4848 }
4949
5050
5151 let boostingContract = addressFromStringValue(getStringOrFail(keyBoostingContract))
5252
5353 let emissionContract = addressFromStringValue(getStringOrFail(keyEmissionContract))
5454
5555 func keyManagerPublicKey () = "%s__managerPublicKey"
5656
5757
5858 func keyManagerVaultAddress () = "%s__managerVaultAddress"
5959
6060
6161 func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) {
6262 case s: String =>
6363 addressFromStringValue(s)
6464 case _ =>
6565 this
6666 }
6767
6868
6969 func managerPublicKeyOrUnit () = {
7070 let managerVaultAddress = getManagerVaultAddressOrThis()
7171 match getString(managerVaultAddress, keyManagerPublicKey()) {
7272 case s: String =>
7373 fromBase58String(s)
7474 case _: Unit =>
7575 unit
7676 case _ =>
7777 throw("Match error")
7878 }
7979 }
8080
8181
8282 func isManager (i) = match managerPublicKeyOrUnit() {
8383 case pk: ByteVector =>
8484 (i.callerPublicKey == pk)
8585 case _: Unit =>
8686 (i.caller == this)
8787 case _ =>
8888 throw("Match error")
8989 }
9090
9191
9292 func mustManager (i) = if (isManager(i))
9393 then true
9494 else throwErr("permission denied")
9595
9696
9797 func asInt (val) = match val {
9898 case valInt: Int =>
9999 valInt
100100 case _ =>
101101 throwErr("failed to cast into Integer")
102102 }
103103
104104
105105 func calcNewRate (ratePerBlockMax,ratePerBlock,changeStep) = {
106106 let maxAllowed = fraction(100, ratePerBlockMax, 120)
107107 let increasedRate = min([fraction((100 + changeStep), ratePerBlock, 100), maxAllowed])
108108 let decreasedRate = max([fraction((100 - changeStep), ratePerBlock, 100), 0])
109109 $Tuple3(increasedRate, ratePerBlock, decreasedRate)
110110 }
111111
112112
113113 func getRateChangeAmountsINTERNAL () = {
114114 let ratePerBlockMax = getIntegerValue(emissionContract, keyRatePerBlockMax)
115115 let ratePerBlock = getIntegerValue(emissionContract, keyRatePerBlock)
116116 let rateChangeStep = getIntegerValue(this, keyRateChangeStep)
117117 calcNewRate(ratePerBlockMax, ratePerBlock, rateChangeStep)
118118 }
119119
120120
121121 @Callable(i)
122122 func constructor (boostingContractPrm,emissionContractPrm,votingDurationPrm,threshold,rateChangeStep) = {
123123 let checks = [if (isDefined(addressFromString(boostingContractPrm)))
124124 then true
125125 else throwErr("Invalid boosting contract address"), if (isDefined(addressFromString(emissionContractPrm)))
126126 then true
127127 else throwErr("Invalid emission contract address"), if ((votingDurationPrm > 0))
128128 then true
129129 else throwErr("Invalid voting duration"), if ((threshold > 0))
130130 then true
131131 else throwErr("invalid threshold"), if ((rateChangeStep > 0))
132132 then true
133133 else throwErr("invalid rateChangeStep")]
134134 if ((checks == checks))
135135 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)
136136 else throw("Strict value is not equal to itself.")
137137 }
138138
139139
140140
141141 @Callable(i)
142142 func getRateChangeAmountsREADONLY () = $Tuple2(nil, getRateChangeAmountsINTERNAL())
143143
144144
145145
146146 @Callable(i)
147147 func vote (inFavor) = {
148148 let startHeight = getIntegerValue(keyStartHeight)
149- let votingFinishHeight = (startHeight + value(getInteger(keyEpochLength)))
149+ let votingFinishHeight = (startHeight + getIntegerValue(keyEpochLength))
150150 let checks = [if ((votingFinishHeight > height))
151151 then true
152152 else throwErr("too late to vote"), if (containsElement([1, 0, -1], inFavor))
153153 then true
154154 else throwErr("not valid argument")]
155155 if ((checks == checks))
156156 then {
157157 let gwxAmount = invoke(boostingContract, "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), votingFinishHeight], nil)
158158 let notZero = if ((asInt(gwxAmount) > 0))
159159 then true
160160 else throwErr("you don't have gwx")
161161 if ((notZero == notZero))
162162 then {
163163 let vote = match getString(keyVote(toString(i.caller), startHeight)) {
164164 case s: String =>
165165 let vote = split(s, separator)
166166 let voteValue = vote[1]
167167 let voteType = vote[2]
168168 let isVoteTypeSimilar = if (if (if ((voteType == "increase"))
169169 then (inFavor == 1)
170170 else false)
171171 then true
172172 else if ((voteType == "decrease"))
173173 then (inFavor == -1)
174174 else false)
175175 then true
176176 else if ((voteType == "current"))
177177 then (inFavor == 0)
178178 else false
179179 let isVoteValueSimilar = if (isVoteTypeSimilar)
180180 then (asInt(gwxAmount) == parseIntValue(voteValue))
181181 else false
182182 let isNewVoteSimilar = if (if (isVoteTypeSimilar)
183183 then isVoteValueSimilar
184184 else false)
185185 then throwErr("you already voted")
186186 else invoke(this, "cancelVote", nil, nil)
187187 isNewVoteSimilar
188188 case u: Unit =>
189189 u
190190 case _ =>
191191 throw("Match error")
192192 }
193193 if ((vote == vote))
194194 then {
195195 let votingResult = split(getStringValue(keyVotingResult), separator)
196196 let votesForIncrease = votingResult[1]
197197 let votesForCurrent = votingResult[2]
198198 let votesForDecrease = votingResult[3]
199199 let newPositiveAndNegativeVotes = if ((inFavor == 1))
200200 then {
201201 let newPositiveVotes = (parseIntValue(votesForIncrease) + asInt(gwxAmount))
202202 [toString(newPositiveVotes), votesForCurrent, votesForDecrease]
203203 }
204204 else if ((inFavor == -1))
205205 then {
206206 let newNegativeVotes = (parseIntValue(votesForCurrent) + asInt(gwxAmount))
207207 [votesForIncrease, votesForCurrent, toString(newNegativeVotes)]
208208 }
209209 else {
210210 let newCurrentVotes = (parseIntValue(votesForCurrent) + asInt(gwxAmount))
211211 [votesForIncrease, toString(newCurrentVotes), votesForDecrease]
212212 }
213213 let voteKey = keyVote(toString(i.caller), startHeight)
214214 let voteValue = keyVoteValue(toString(asInt(gwxAmount)), inFavor)
215215 $Tuple2([StringEntry(keyVotingResult, totalVotes(newPositiveAndNegativeVotes[0], newPositiveAndNegativeVotes[1], newPositiveAndNegativeVotes[2])), StringEntry(voteKey, voteValue)], unit)
216216 }
217217 else throw("Strict value is not equal to itself.")
218218 }
219219 else throw("Strict value is not equal to itself.")
220220 }
221221 else throw("Strict value is not equal to itself.")
222222 }
223223
224224
225225
226226 @Callable(i)
227227 func cancelVote () = {
228228 let startHeight = getIntegerValue(keyStartHeight)
229+ let votingFinishHeight = (startHeight + getIntegerValue(keyEpochLength))
229230 let userAddress = if ((i.caller == this))
230231 then toString(i.originCaller)
231232 else toString(i.caller)
232- let checks = [if (isDefined(getString(keyVotingResult)))
233+ let checks = [if ((votingFinishHeight > height))
234+ then true
235+ else throwErr("too late to cancel vote"), if (isDefined(getString(keyVotingResult)))
233236 then true
234237 else throwErr("no vote"), if (isDefined(getString(keyVote(userAddress, startHeight))))
235238 then true
236239 else throwErr("no user vote")]
237240 if ((checks == checks))
238241 then {
239242 let vote = split(getStringValue(keyVote(userAddress, startHeight)), separator)
240243 let voteValue = vote[1]
241244 let voteType = vote[2]
242245 let votingResult = split(getStringValue(keyVotingResult), separator)
243246 let votesForIncrease = votingResult[1]
244247 let votesForCurrent = votingResult[2]
245248 let votesForDecrease = votingResult[3]
246249 let actions = if ((voteType == "increase"))
247250 then {
248251 let newIncreaseVotes = (parseIntValue(votesForIncrease) - parseIntValue(voteValue))
249252 [StringEntry(keyVotingResult, totalVotes(toString(newIncreaseVotes), votesForCurrent, votesForDecrease))]
250253 }
251254 else if ((voteType == "decrease"))
252255 then {
253256 let newDecreaseVotes = (parseIntValue(votesForDecrease) - parseIntValue(voteValue))
254257 [StringEntry(keyVotingResult, totalVotes(votesForIncrease, votesForCurrent, toString(newDecreaseVotes)))]
255258 }
256259 else {
257260 let newCurrentVotes = (parseIntValue(votesForCurrent) - parseIntValue(voteValue))
258261 [StringEntry(keyVotingResult, totalVotes(votesForIncrease, toString(newCurrentVotes), votesForDecrease))]
259262 }
260263 let defaultActions = [DeleteEntry(keyVote(userAddress, startHeight))]
261264 (actions ++ defaultActions)
262265 }
263266 else throw("Strict value is not equal to itself.")
264267 }
265268
266269
267270
268271 @Callable(i)
269272 func setThreshold (newThreshold) = {
270273 let checks = [mustManager(i), if ((newThreshold > 0))
271274 then true
272275 else throwErr("invalid threshold")]
273276 if ((checks == checks))
274277 then $Tuple2([IntegerEntry(keyThreshold, newThreshold)], unit)
275278 else throw("Strict value is not equal to itself.")
276279 }
277280
278281
279282
280283 @Callable(i)
281284 func finalize () = {
282285 let votingFinishHeight = (getIntegerValue(keyStartHeight) + value(getInteger(keyEpochLength)))
283286 let checks = [if ((height >= votingFinishHeight))
284287 then true
285288 else throwErr("insufficient height for completion")]
286289 if ((checks == checks))
287290 then {
288291 let votingResult = split(value(getString(keyVotingResult)), separator)
289292 let votesForIncrease = parseIntValue(votingResult[1])
290293 let votesForCurrent = parseIntValue(votingResult[2])
291294 let votesForDecrease = parseIntValue(votingResult[3])
292295 let allVotes = ((votesForIncrease + votesForCurrent) + votesForDecrease)
293296 let threshold = getIntOrFail(keyThreshold)
294- let $t093189398 = getRateChangeAmountsINTERNAL()
295- let increasedRate = $t093189398._1
296- let currentRate = $t093189398._2
297- let decreasedRate = $t093189398._3
297+ let $t094649544 = getRateChangeAmountsINTERNAL()
298+ let increasedRate = $t094649544._1
299+ let currentRate = $t094649544._2
300+ let decreasedRate = $t094649544._3
298301 let votesList = [votesForIncrease, votesForCurrent, votesForDecrease]
299302 let newRate = if (if ((threshold > allVotes))
300303 then true
301304 else (votesForCurrent == max(votesList)))
302305 then unit
303306 else if ((votesForIncrease == max(votesList)))
304307 then increasedRate
305308 else decreasedRate
306309 let newRateInt = match newRate {
307310 case t: Int =>
308311 t
309312 case _ =>
310313 -1
311314 }
312315 [IntegerEntry(keyStartHeight, height), StringEntry(keyVotingResult, totalVotes("0", "0", "0")), IntegerEntry("foo", newRateInt)]
313316 }
314317 else throw("Strict value is not equal to itself.")
315318 }
316319
317320

github/deemru/w8io/026f985 
41.23 ms