tx · DpmvtTasrt98ejUqEgP7ocHmstWxCAMJf5kLLgK9RQnz

3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh:  -0.01000000 Waves

2023.05.17 10:52 [2581673] smart account 3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh > SELF 0.00000000 Waves

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

github/deemru/w8io/026f985 
52.05 ms