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:BgIbCAISBwoFCAgBAQESABIDCgEBEgASAwoBARIAHAAJc2VwYXJhdG9yAgJfXwAQY29udHJhY3RGaWxlbmFtZQIZdm90aW5nX2VtaXNzaW9uX3JhdGUucmlkZQAOa2V5RXBvY2hMZW5ndGgJALkJAgkAzAgCAgIlcwkAzAgCAgtlcG9jaExlbmd0aAUDbmlsBQlzZXBhcmF0b3IAE2tleUVtaXNzaW9uQ29udHJhY3QJALkJAgkAzAgCAgIlcwkAzAgCAhBlbWlzc2lvbkNvbnRyYWN0BQNuaWwFCXNlcGFyYXRvcgATa2V5Qm9vc3RpbmdDb250cmFjdAkAuQkCCQDMCAICAiVzCQDMCAICEGJvb3N0aW5nQ29udHJhY3QFA25pbAUJc2VwYXJhdG9yAAxrZXlUaHJlc2hvbGQJALkJAgkAzAgCAgIlcwkAzAgCAg92b3RpbmdUaHJlc2hvbGQFA25pbAUJc2VwYXJhdG9yAA9rZXlSYXRlUGVyQmxvY2sJALkJAgkAzAgCAgQlcyVzCQDMCAICDHJhdGVQZXJCbG9jawkAzAgCAgdjdXJyZW50BQNuaWwFCXNlcGFyYXRv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ludAQBdAUHJG1hdGNoMAUBdAD///////////8BCQDMCAIJAQxJbnRlZ2VyRW50cnkCBQ5rZXlTdGFydEhlaWdodAUGaGVpZ2h0CQDMCAIJAQtTdHJpbmdFbnRyeQIFD2tleVZvdGluZ1Jlc3VsdAkBCnRvdGFsVm90ZXMDAgEwAgEwAgEwCQDMCAIJAQxJbnRlZ2VyRW50cnkCAgNmb28FCm5ld1JhdGVJbnQFA25pbAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgDQAnhO", "height": 2584474, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Ben3kgAXbXqQe9uc7Qq16u8tebBuwJw561LRWV6SB6oa Next: 2UkJjQh9QMRq5BjRmfaPuSKKhzJkqm61LzTk12uTAD9C Diff:
OldNewDifferences
303303 else if ((votesForIncrease == max(votesList)))
304304 then increasedRate
305305 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)]
307313 }
308314 else throw("Strict value is not equal to itself.")
309315 }
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)
149149 let votingFinishHeight = (startHeight + value(getInteger(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)
229229 let userAddress = if ((i.caller == this))
230230 then toString(i.originCaller)
231231 else toString(i.caller)
232232 let checks = [if (isDefined(getString(keyVotingResult)))
233233 then true
234234 else throwErr("no vote"), if (isDefined(getString(keyVote(userAddress, startHeight))))
235235 then true
236236 else throwErr("no user vote")]
237237 if ((checks == checks))
238238 then {
239239 let vote = split(getStringValue(keyVote(userAddress, startHeight)), separator)
240240 let voteValue = vote[1]
241241 let voteType = vote[2]
242242 let votingResult = split(getStringValue(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 = (getIntegerValue(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 $t093189398 = getRateChangeAmountsINTERNAL()
295295 let increasedRate = $t093189398._1
296296 let currentRate = $t093189398._2
297297 let decreasedRate = $t093189398._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-[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)]
307313 }
308314 else throw("Strict value is not equal to itself.")
309315 }
310316
311317

github/deemru/w8io/026f985 
56.02 ms