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