tx · 75H7XxBiqjXVS1RAzut7RK42aV16oZ1xhQGzPfdHXfD9 3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh: -0.01000000 Waves 2023.05.17 11:54 [2581734] smart account 3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh > SELF 0.00000000 Waves
{ "type": 13, "id": "75H7XxBiqjXVS1RAzut7RK42aV16oZ1xhQGzPfdHXfD9", "fee": 1000000, "feeAssetId": null, "timestamp": 1684313664477, "version": 2, "chainId": 84, "sender": "3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh", "senderPublicKey": "EU9obW1yVhR8qug3EmXPeew3DMagvJFQzY5Ku8bmcsU7", "proofs": [ "4dzbctMzVYvh9F9crFk96BgGDnr5NcdCik8hdcZsKAiv5MmXoVZdjk25i3sJUKnathGNpcmJNzP26Fs7yuV8hRin" ], "script": "base64:BgIbCAISBwoFCAgBAQESABIDCgEBEgASAwoBARIAHAAJc2VwYXJhdG9yAgJfXwAQY29udHJhY3RGaWxlbmFtZQIZdm90aW5nX2VtaXNzaW9uX3JhdGUucmlkZQAOa2V5RXBvY2hMZW5ndGgJALkJAgkAzAgCAgIlcwkAzAgCAgtlcG9jaExlbmd0aAUDbmlsBQlzZXBhcmF0b3IAE2tleUVtaXNzaW9uQ29udHJhY3QJALkJAgkAzAgCAgIlcwkAzAgCAhBlbWlzc2lvbkNvbnRyYWN0BQNuaWwFCXNlcGFyYXRvcgATa2V5Qm9vc3RpbmdDb250cmFjdAkAuQkCCQDMCAICAiVzCQDMCAICEGJvb3N0aW5nQ29udHJhY3QFA25pbAUJc2VwYXJhdG9yAAxrZXlUaHJlc2hvbGQJALkJAgkAzAgCAgIlcwkAzAgCAg92b3RpbmdUaHJlc2hvbGQFA25pbAUJc2VwYXJhdG9yAA9rZXlSYXRlUGVyQmxvY2sJALkJAgkAzAgCAgQlcyVzCQDMCAICDHJhdGVQZXJCbG9jawkAzAgCAgdjdXJyZW50BQNuaWwFCXNlcGFyYXRv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U3YyEyXRLTfK1G5S5TnkVVtM Next: 7ZVgY8jEJDCALb44jGL7Varwv6yL21rwCsaATfF7SH6g Diff:
Old | New | Differences | |
---|---|---|---|
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | - | let b = | |
6 | + | let b = "voting_emission_rate.ride" | |
7 | 7 | ||
8 | - | let c = makeString(["%s", " | |
8 | + | let c = makeString(["%s", "epochLength"], a) | |
9 | 9 | ||
10 | - | let d = makeString(["%s", " | |
10 | + | let d = makeString(["%s", "emissionContract"], a) | |
11 | 11 | ||
12 | - | let e = makeString(["%s", " | |
12 | + | let e = makeString(["%s", "boostingContract"], a) | |
13 | 13 | ||
14 | - | let f = makeString(["%s | |
14 | + | let f = makeString(["%s", "votingThreshold"], a) | |
15 | 15 | ||
16 | - | let g = makeString(["%s%s", " | |
16 | + | let g = makeString(["%s%s", "ratePerBlock", "current"], a) | |
17 | 17 | ||
18 | - | let h = makeString(["%s", " | |
18 | + | let h = makeString(["%s%s", "ratePerBlockMax", "current"], a) | |
19 | 19 | ||
20 | - | func i (j) = valueOrErrorMessage(getString(this, j), (j + " is not defined")) | |
20 | + | let i = makeString(["%s", "rateChangeStep"], a) | |
21 | + | ||
22 | + | func j (k) = throw(((b + ": ") + k)) | |
21 | 23 | ||
22 | 24 | ||
23 | - | func | |
25 | + | func l (m) = valueOrErrorMessage(getString(this, m), (m + " is not defined")) | |
24 | 26 | ||
25 | 27 | ||
26 | - | func | |
28 | + | func n (m) = valueOrErrorMessage(getInteger(this, m), (m + " is not defined")) | |
27 | 29 | ||
28 | 30 | ||
29 | - | func | |
31 | + | func o () = makeString(["%s", "startHeight"], a) | |
30 | 32 | ||
31 | 33 | ||
32 | - | func | |
34 | + | func p () = makeString(["%s", "votingResult"], a) | |
33 | 35 | ||
34 | 36 | ||
35 | - | func | |
37 | + | func q (r,s,t) = makeString(["%d%d%d", r, s, t], a) | |
36 | 38 | ||
37 | 39 | ||
38 | - | func t (u,v) = { | |
39 | - | let j = if ((v == 1)) | |
40 | - | then makeString(["%d%s", u, "increase"], a) | |
41 | - | else if ((v == -1)) | |
42 | - | then makeString(["%d%s", u, "decrease"], a) | |
43 | - | else makeString(["%d%s", u, "none"], a) | |
44 | - | j | |
40 | + | func u (v) = makeString(["%s%s", "vote", v], a) | |
41 | + | ||
42 | + | ||
43 | + | func w (x,y) = { | |
44 | + | let m = if ((y == 1)) | |
45 | + | then makeString(["%d%s", x, "increase"], a) | |
46 | + | else if ((y == -1)) | |
47 | + | then makeString(["%d%s", x, "decrease"], a) | |
48 | + | else makeString(["%d%s", x, "none"], a) | |
49 | + | m | |
45 | 50 | } | |
46 | 51 | ||
47 | 52 | ||
48 | - | let | |
53 | + | let z = addressFromStringValue(l(e)) | |
49 | 54 | ||
50 | - | let | |
55 | + | let A = addressFromStringValue(l(d)) | |
51 | 56 | ||
52 | - | func | |
57 | + | func B () = "%s__managerPublicKey" | |
53 | 58 | ||
54 | 59 | ||
55 | - | func | |
60 | + | func C () = "%s__managerVaultAddress" | |
56 | 61 | ||
57 | 62 | ||
58 | - | func | |
59 | - | let | |
60 | - | if ($isInstanceOf( | |
63 | + | func D () = { | |
64 | + | let E = getString(C()) | |
65 | + | if ($isInstanceOf(E, "String")) | |
61 | 66 | then { | |
62 | - | let | |
63 | - | addressFromStringValue( | |
67 | + | let k = E | |
68 | + | addressFromStringValue(k) | |
64 | 69 | } | |
65 | 70 | else this | |
66 | 71 | } | |
67 | 72 | ||
68 | 73 | ||
69 | - | func | |
70 | - | let | |
71 | - | let | |
72 | - | if ($isInstanceOf( | |
74 | + | func F () = { | |
75 | + | let G = D() | |
76 | + | let E = getString(G, B()) | |
77 | + | if ($isInstanceOf(E, "String")) | |
73 | 78 | then { | |
74 | - | let | |
75 | - | fromBase58String( | |
79 | + | let k = E | |
80 | + | fromBase58String(k) | |
76 | 81 | } | |
77 | - | else if ($isInstanceOf( | |
82 | + | else if ($isInstanceOf(E, "Unit")) | |
78 | 83 | then unit | |
79 | 84 | else throw("Match error") | |
80 | 85 | } | |
81 | 86 | ||
82 | 87 | ||
83 | - | func | |
84 | - | let | |
85 | - | if ($isInstanceOf( | |
88 | + | func H (I) = { | |
89 | + | let E = F() | |
90 | + | if ($isInstanceOf(E, "ByteVector")) | |
86 | 91 | then { | |
87 | - | let | |
88 | - | ( | |
92 | + | let J = E | |
93 | + | (I.callerPublicKey == J) | |
89 | 94 | } | |
90 | - | else if ($isInstanceOf( | |
91 | - | then ( | |
95 | + | else if ($isInstanceOf(E, "Unit")) | |
96 | + | then (I.caller == this) | |
92 | 97 | else throw("Match error") | |
93 | 98 | } | |
94 | 99 | ||
95 | 100 | ||
96 | - | func | |
101 | + | func K (I) = if (H(I)) | |
97 | 102 | then true | |
98 | - | else | |
103 | + | else j("permission denied") | |
99 | 104 | ||
100 | 105 | ||
101 | - | func | |
102 | - | let | |
103 | - | if ($isInstanceOf( | |
106 | + | func L (M) = { | |
107 | + | let E = M | |
108 | + | if ($isInstanceOf(E, "Int")) | |
104 | 109 | then { | |
105 | - | let | |
106 | - | | |
110 | + | let N = E | |
111 | + | N | |
107 | 112 | } | |
108 | - | else | |
113 | + | else j("failed to cast into Integer") | |
109 | 114 | } | |
110 | 115 | ||
111 | 116 | ||
112 | - | func | |
113 | - | let | |
114 | - | let | |
115 | - | let | |
116 | - | $Tuple3( | |
117 | + | func O (P,Q,R) = { | |
118 | + | let S = fraction(100, P, 120) | |
119 | + | let T = min([fraction((100 + R), Q, 100), S]) | |
120 | + | let U = max([fraction((100 - R), Q, 100), 0]) | |
121 | + | $Tuple3(T, Q, U) | |
117 | 122 | } | |
118 | 123 | ||
119 | 124 | ||
120 | - | func | |
121 | - | let | |
122 | - | let | |
123 | - | let | |
124 | - | | |
125 | + | func V () = { | |
126 | + | let P = getIntegerValue(A, h) | |
127 | + | let Q = getIntegerValue(A, g) | |
128 | + | let W = getIntegerValue(this, i) | |
129 | + | O(P, Q, W) | |
125 | 130 | } | |
126 | 131 | ||
127 | 132 | ||
128 | - | @Callable( | |
129 | - | func constructor ( | |
130 | - | let | |
133 | + | @Callable(I) | |
134 | + | func constructor (X,Y,Z,aa,W) = { | |
135 | + | let ab = [if (isDefined(addressFromString(X))) | |
131 | 136 | then true | |
132 | - | else | |
137 | + | else j("Invalid boosting contract address"), if (isDefined(addressFromString(Y))) | |
133 | 138 | then true | |
134 | - | else | |
139 | + | else j("Invalid emission contract address"), if ((Z > 0)) | |
135 | 140 | then true | |
136 | - | else | |
141 | + | else j("Invalid voting duration"), if ((aa > 0)) | |
137 | 142 | then true | |
138 | - | else | |
143 | + | else j("invalid threshold"), if ((W > 0)) | |
139 | 144 | then true | |
140 | - | else | |
141 | - | if (( | |
142 | - | then $Tuple2([StringEntry( | |
145 | + | else j("invalid rateChangeStep")] | |
146 | + | if ((ab == ab)) | |
147 | + | then $Tuple2([StringEntry(e, X), StringEntry(d, Y), IntegerEntry(c, Z), IntegerEntry(f, aa), IntegerEntry(i, W), IntegerEntry(o(), height), StringEntry(p(), q("0", "0", "0"))], unit) | |
143 | 148 | else throw("Strict value is not equal to itself.") | |
144 | 149 | } | |
145 | 150 | ||
146 | 151 | ||
147 | 152 | ||
148 | - | @Callable( | |
149 | - | func getRateChangeAmountsREADONLY () = $Tuple2(nil, | |
153 | + | @Callable(I) | |
154 | + | func getRateChangeAmountsREADONLY () = $Tuple2(nil, V()) | |
150 | 155 | ||
151 | 156 | ||
152 | 157 | ||
153 | - | @Callable( | |
154 | - | func vote ( | |
155 | - | let | |
156 | - | let | |
158 | + | @Callable(I) | |
159 | + | func vote (ac) = { | |
160 | + | let ad = (value(getInteger(o())) + value(getInteger(c))) | |
161 | + | let ab = [if ((ad > height)) | |
157 | 162 | then true | |
158 | - | else | |
163 | + | else j("too late to vote"), if (containsElement([1, 0, -1], ac)) | |
159 | 164 | then true | |
160 | - | else | |
161 | - | if (( | |
165 | + | else j("not valid argument")] | |
166 | + | if ((ab == ab)) | |
162 | 167 | then { | |
163 | - | let | |
164 | - | let | |
168 | + | let x = invoke(z, "getUserGwxAmountAtHeightREADONLY", [toString(I.caller), ad], nil) | |
169 | + | let ae = if ((L(x) > 0)) | |
165 | 170 | then true | |
166 | - | else | |
167 | - | if (( | |
171 | + | else j("you don't have gwx") | |
172 | + | if ((ae == ae)) | |
168 | 173 | then { | |
169 | - | let | |
170 | - | let | |
171 | - | if ($isInstanceOf( | |
174 | + | let y = { | |
175 | + | let E = getString(u(toString(I.caller))) | |
176 | + | if ($isInstanceOf(E, "String")) | |
172 | 177 | then { | |
173 | - | let | |
174 | - | let | |
175 | - | let | |
176 | - | let | |
177 | - | let | |
178 | - | then ( | |
178 | + | let k = E | |
179 | + | let y = split(k, a) | |
180 | + | let af = y[1] | |
181 | + | let ag = y[2] | |
182 | + | let ah = if (if (if ((ag == "increase")) | |
183 | + | then (ac == 1) | |
179 | 184 | else false) | |
180 | 185 | then true | |
181 | - | else if (( | |
182 | - | then ( | |
186 | + | else if ((ag == "decrease")) | |
187 | + | then (ac == -1) | |
183 | 188 | else false) | |
184 | 189 | then true | |
185 | - | else if (( | |
186 | - | then ( | |
190 | + | else if ((ag == "none")) | |
191 | + | then (ac == 0) | |
187 | 192 | else false | |
188 | - | let | |
189 | - | then ( | |
193 | + | let ai = if (ah) | |
194 | + | then (L(x) == parseIntValue(af)) | |
190 | 195 | else false | |
191 | - | let | |
192 | - | then | |
196 | + | let aj = if (if (ah) | |
197 | + | then ai | |
193 | 198 | else false) | |
194 | - | then | |
199 | + | then j("you already voted") | |
195 | 200 | else invoke(this, "cancelVote", nil, nil) | |
196 | - | | |
201 | + | aj | |
197 | 202 | } | |
198 | - | else if ($isInstanceOf( | |
203 | + | else if ($isInstanceOf(E, "Unit")) | |
199 | 204 | then { | |
200 | - | let | |
201 | - | | |
205 | + | let ak = E | |
206 | + | ak | |
202 | 207 | } | |
203 | 208 | else throw("Match error") | |
204 | 209 | } | |
205 | - | if (( | |
210 | + | if ((y == y)) | |
206 | 211 | then { | |
207 | - | let | |
208 | - | let | |
209 | - | let | |
210 | - | let | |
211 | - | let | |
212 | + | let al = split(value(getString(p())), a) | |
213 | + | let am = al[1] | |
214 | + | let an = al[2] | |
215 | + | let ao = al[3] | |
216 | + | let ap = if ((ac == 1)) | |
212 | 217 | then { | |
213 | - | let | |
214 | - | [toString( | |
218 | + | let aq = (parseIntValue(am) + L(x)) | |
219 | + | [toString(aq), an, ao] | |
215 | 220 | } | |
216 | - | else if (( | |
221 | + | else if ((ac == -1)) | |
217 | 222 | then { | |
218 | - | let | |
219 | - | [ | |
223 | + | let ar = (parseIntValue(an) + L(x)) | |
224 | + | [am, an, toString(ar)] | |
220 | 225 | } | |
221 | 226 | else { | |
222 | - | let | |
223 | - | [ | |
227 | + | let as = (parseIntValue(an) + L(x)) | |
228 | + | [am, toString(as), ao] | |
224 | 229 | } | |
225 | - | let | |
226 | - | let | |
227 | - | $Tuple2([StringEntry( | |
230 | + | let at = u(toString(I.caller)) | |
231 | + | let af = w(toString(L(x)), ac) | |
232 | + | $Tuple2([StringEntry(p(), q(ap[0], ap[1], ap[2])), StringEntry(at, af)], unit) | |
228 | 233 | } | |
229 | 234 | else throw("Strict value is not equal to itself.") | |
230 | 235 | } | |
235 | 240 | ||
236 | 241 | ||
237 | 242 | ||
238 | - | @Callable( | |
243 | + | @Callable(I) | |
239 | 244 | func cancelVote () = { | |
240 | - | let | |
241 | - | then toString( | |
242 | - | else toString( | |
243 | - | let | |
245 | + | let au = if ((I.caller == this)) | |
246 | + | then toString(I.originCaller) | |
247 | + | else toString(I.caller) | |
248 | + | let ab = [if (isDefined(getString(p()))) | |
244 | 249 | then true | |
245 | - | else | |
246 | - | if (( | |
250 | + | else j("no vote")] | |
251 | + | if ((ab == ab)) | |
247 | 252 | then { | |
248 | - | let | |
249 | - | let | |
250 | - | let | |
251 | - | let | |
252 | - | let | |
253 | - | let | |
254 | - | let | |
255 | - | let | |
253 | + | let y = split(value(getString(u(au))), a) | |
254 | + | let af = y[1] | |
255 | + | let ag = y[2] | |
256 | + | let al = split(value(getString(p())), a) | |
257 | + | let am = al[1] | |
258 | + | let an = al[2] | |
259 | + | let ao = al[3] | |
260 | + | let av = if ((ag == "increase")) | |
256 | 261 | then { | |
257 | - | let | |
258 | - | $Tuple2([StringEntry( | |
262 | + | let aw = (parseIntValue(am) - parseIntValue(af)) | |
263 | + | $Tuple2([StringEntry(p(), q(toString(aw), an, ao)), DeleteEntry(u(au))], unit) | |
259 | 264 | } | |
260 | - | else if (( | |
265 | + | else if ((ag == "decrease")) | |
261 | 266 | then { | |
262 | - | let | |
263 | - | $Tuple2([StringEntry( | |
267 | + | let ax = (parseIntValue(ao) - parseIntValue(af)) | |
268 | + | $Tuple2([StringEntry(p(), q(am, an, toString(ax))), DeleteEntry(u(au))], unit) | |
264 | 269 | } | |
265 | 270 | else { | |
266 | - | let | |
267 | - | $Tuple2([StringEntry( | |
271 | + | let as = (parseIntValue(an) - parseIntValue(af)) | |
272 | + | $Tuple2([StringEntry(p(), q(am, toString(as), ao)), DeleteEntry(u(au))], unit) | |
268 | 273 | } | |
269 | - | | |
274 | + | av | |
270 | 275 | } | |
271 | 276 | else throw("Strict value is not equal to itself.") | |
272 | 277 | } | |
273 | 278 | ||
274 | 279 | ||
275 | 280 | ||
276 | - | @Callable( | |
277 | - | func setThreshold ( | |
278 | - | let | |
281 | + | @Callable(I) | |
282 | + | func setThreshold (ay) = { | |
283 | + | let ab = [K(I), if ((ay > 0)) | |
279 | 284 | then true | |
280 | - | else | |
281 | - | if (( | |
282 | - | then $Tuple2([IntegerEntry( | |
285 | + | else j("invalid threshold")] | |
286 | + | if ((ab == ab)) | |
287 | + | then $Tuple2([IntegerEntry(f, ay)], unit) | |
283 | 288 | else throw("Strict value is not equal to itself.") | |
284 | 289 | } | |
285 | 290 | ||
286 | 291 | ||
287 | 292 | ||
288 | - | @Callable( | |
293 | + | @Callable(I) | |
289 | 294 | func finalize () = { | |
290 | - | let | |
291 | - | let | |
295 | + | let ad = (value(getInteger(o())) + value(getInteger(c))) | |
296 | + | let ab = [if ((height >= ad)) | |
292 | 297 | then true | |
293 | - | else | |
294 | - | if (( | |
298 | + | else j("insufficient height for completion")] | |
299 | + | if ((ab == ab)) | |
295 | 300 | then { | |
296 | - | let | |
297 | - | let | |
298 | - | let | |
299 | - | let | |
300 | - | let | |
301 | - | let | |
302 | - | let | |
303 | - | let | |
304 | - | let | |
305 | - | let | |
306 | - | let | |
307 | - | let | |
301 | + | let al = split(value(getString(p())), a) | |
302 | + | let am = parseIntValue(al[1]) | |
303 | + | let an = parseIntValue(al[2]) | |
304 | + | let ao = parseIntValue(al[3]) | |
305 | + | let az = ((am + an) + ao) | |
306 | + | let aa = n(f) | |
307 | + | let aA = V() | |
308 | + | let T = aA._1 | |
309 | + | let aB = aA._2 | |
310 | + | let U = aA._3 | |
311 | + | let aC = [am, an, ao] | |
312 | + | let av = if ((aa > az)) | |
308 | 313 | then nil | |
309 | - | else if (( | |
310 | - | then [StringEntry("foo", "NONE")] | |
311 | - | else if (( | |
312 | - | then [StringEntry("foo", "INC")] | |
313 | - | else [StringEntry("foo", "DEC")] | |
314 | - | ( | |
314 | + | else if ((an == max(aC))) | |
315 | + | then [StringEntry("foo", "NONE"), IntegerEntry("bar", aB)] | |
316 | + | else if ((am == max(aC))) | |
317 | + | then [StringEntry("foo", "INC"), IntegerEntry("bar", T)] | |
318 | + | else [StringEntry("foo", "DEC"), IntegerEntry("bar", U)] | |
319 | + | (av ++ [IntegerEntry(o(), height)]) | |
315 | 320 | } | |
316 | 321 | else throw("Strict value is not equal to itself.") | |
317 | 322 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | - | let b = | |
6 | + | let b = "voting_emission_rate.ride" | |
7 | 7 | ||
8 | - | let c = makeString(["%s", " | |
8 | + | let c = makeString(["%s", "epochLength"], a) | |
9 | 9 | ||
10 | - | let d = makeString(["%s", " | |
10 | + | let d = makeString(["%s", "emissionContract"], a) | |
11 | 11 | ||
12 | - | let e = makeString(["%s", " | |
12 | + | let e = makeString(["%s", "boostingContract"], a) | |
13 | 13 | ||
14 | - | let f = makeString(["%s | |
14 | + | let f = makeString(["%s", "votingThreshold"], a) | |
15 | 15 | ||
16 | - | let g = makeString(["%s%s", " | |
16 | + | let g = makeString(["%s%s", "ratePerBlock", "current"], a) | |
17 | 17 | ||
18 | - | let h = makeString(["%s", " | |
18 | + | let h = makeString(["%s%s", "ratePerBlockMax", "current"], a) | |
19 | 19 | ||
20 | - | func i (j) = valueOrErrorMessage(getString(this, j), (j + " is not defined")) | |
20 | + | let i = makeString(["%s", "rateChangeStep"], a) | |
21 | + | ||
22 | + | func j (k) = throw(((b + ": ") + k)) | |
21 | 23 | ||
22 | 24 | ||
23 | - | func | |
25 | + | func l (m) = valueOrErrorMessage(getString(this, m), (m + " is not defined")) | |
24 | 26 | ||
25 | 27 | ||
26 | - | func | |
28 | + | func n (m) = valueOrErrorMessage(getInteger(this, m), (m + " is not defined")) | |
27 | 29 | ||
28 | 30 | ||
29 | - | func | |
31 | + | func o () = makeString(["%s", "startHeight"], a) | |
30 | 32 | ||
31 | 33 | ||
32 | - | func | |
34 | + | func p () = makeString(["%s", "votingResult"], a) | |
33 | 35 | ||
34 | 36 | ||
35 | - | func | |
37 | + | func q (r,s,t) = makeString(["%d%d%d", r, s, t], a) | |
36 | 38 | ||
37 | 39 | ||
38 | - | func t (u,v) = { | |
39 | - | let j = if ((v == 1)) | |
40 | - | then makeString(["%d%s", u, "increase"], a) | |
41 | - | else if ((v == -1)) | |
42 | - | then makeString(["%d%s", u, "decrease"], a) | |
43 | - | else makeString(["%d%s", u, "none"], a) | |
44 | - | j | |
40 | + | func u (v) = makeString(["%s%s", "vote", v], a) | |
41 | + | ||
42 | + | ||
43 | + | func w (x,y) = { | |
44 | + | let m = if ((y == 1)) | |
45 | + | then makeString(["%d%s", x, "increase"], a) | |
46 | + | else if ((y == -1)) | |
47 | + | then makeString(["%d%s", x, "decrease"], a) | |
48 | + | else makeString(["%d%s", x, "none"], a) | |
49 | + | m | |
45 | 50 | } | |
46 | 51 | ||
47 | 52 | ||
48 | - | let | |
53 | + | let z = addressFromStringValue(l(e)) | |
49 | 54 | ||
50 | - | let | |
55 | + | let A = addressFromStringValue(l(d)) | |
51 | 56 | ||
52 | - | func | |
57 | + | func B () = "%s__managerPublicKey" | |
53 | 58 | ||
54 | 59 | ||
55 | - | func | |
60 | + | func C () = "%s__managerVaultAddress" | |
56 | 61 | ||
57 | 62 | ||
58 | - | func | |
59 | - | let | |
60 | - | if ($isInstanceOf( | |
63 | + | func D () = { | |
64 | + | let E = getString(C()) | |
65 | + | if ($isInstanceOf(E, "String")) | |
61 | 66 | then { | |
62 | - | let | |
63 | - | addressFromStringValue( | |
67 | + | let k = E | |
68 | + | addressFromStringValue(k) | |
64 | 69 | } | |
65 | 70 | else this | |
66 | 71 | } | |
67 | 72 | ||
68 | 73 | ||
69 | - | func | |
70 | - | let | |
71 | - | let | |
72 | - | if ($isInstanceOf( | |
74 | + | func F () = { | |
75 | + | let G = D() | |
76 | + | let E = getString(G, B()) | |
77 | + | if ($isInstanceOf(E, "String")) | |
73 | 78 | then { | |
74 | - | let | |
75 | - | fromBase58String( | |
79 | + | let k = E | |
80 | + | fromBase58String(k) | |
76 | 81 | } | |
77 | - | else if ($isInstanceOf( | |
82 | + | else if ($isInstanceOf(E, "Unit")) | |
78 | 83 | then unit | |
79 | 84 | else throw("Match error") | |
80 | 85 | } | |
81 | 86 | ||
82 | 87 | ||
83 | - | func | |
84 | - | let | |
85 | - | if ($isInstanceOf( | |
88 | + | func H (I) = { | |
89 | + | let E = F() | |
90 | + | if ($isInstanceOf(E, "ByteVector")) | |
86 | 91 | then { | |
87 | - | let | |
88 | - | ( | |
92 | + | let J = E | |
93 | + | (I.callerPublicKey == J) | |
89 | 94 | } | |
90 | - | else if ($isInstanceOf( | |
91 | - | then ( | |
95 | + | else if ($isInstanceOf(E, "Unit")) | |
96 | + | then (I.caller == this) | |
92 | 97 | else throw("Match error") | |
93 | 98 | } | |
94 | 99 | ||
95 | 100 | ||
96 | - | func | |
101 | + | func K (I) = if (H(I)) | |
97 | 102 | then true | |
98 | - | else | |
103 | + | else j("permission denied") | |
99 | 104 | ||
100 | 105 | ||
101 | - | func | |
102 | - | let | |
103 | - | if ($isInstanceOf( | |
106 | + | func L (M) = { | |
107 | + | let E = M | |
108 | + | if ($isInstanceOf(E, "Int")) | |
104 | 109 | then { | |
105 | - | let | |
106 | - | | |
110 | + | let N = E | |
111 | + | N | |
107 | 112 | } | |
108 | - | else | |
113 | + | else j("failed to cast into Integer") | |
109 | 114 | } | |
110 | 115 | ||
111 | 116 | ||
112 | - | func | |
113 | - | let | |
114 | - | let | |
115 | - | let | |
116 | - | $Tuple3( | |
117 | + | func O (P,Q,R) = { | |
118 | + | let S = fraction(100, P, 120) | |
119 | + | let T = min([fraction((100 + R), Q, 100), S]) | |
120 | + | let U = max([fraction((100 - R), Q, 100), 0]) | |
121 | + | $Tuple3(T, Q, U) | |
117 | 122 | } | |
118 | 123 | ||
119 | 124 | ||
120 | - | func | |
121 | - | let | |
122 | - | let | |
123 | - | let | |
124 | - | | |
125 | + | func V () = { | |
126 | + | let P = getIntegerValue(A, h) | |
127 | + | let Q = getIntegerValue(A, g) | |
128 | + | let W = getIntegerValue(this, i) | |
129 | + | O(P, Q, W) | |
125 | 130 | } | |
126 | 131 | ||
127 | 132 | ||
128 | - | @Callable( | |
129 | - | func constructor ( | |
130 | - | let | |
133 | + | @Callable(I) | |
134 | + | func constructor (X,Y,Z,aa,W) = { | |
135 | + | let ab = [if (isDefined(addressFromString(X))) | |
131 | 136 | then true | |
132 | - | else | |
137 | + | else j("Invalid boosting contract address"), if (isDefined(addressFromString(Y))) | |
133 | 138 | then true | |
134 | - | else | |
139 | + | else j("Invalid emission contract address"), if ((Z > 0)) | |
135 | 140 | then true | |
136 | - | else | |
141 | + | else j("Invalid voting duration"), if ((aa > 0)) | |
137 | 142 | then true | |
138 | - | else | |
143 | + | else j("invalid threshold"), if ((W > 0)) | |
139 | 144 | then true | |
140 | - | else | |
141 | - | if (( | |
142 | - | then $Tuple2([StringEntry( | |
145 | + | else j("invalid rateChangeStep")] | |
146 | + | if ((ab == ab)) | |
147 | + | then $Tuple2([StringEntry(e, X), StringEntry(d, Y), IntegerEntry(c, Z), IntegerEntry(f, aa), IntegerEntry(i, W), IntegerEntry(o(), height), StringEntry(p(), q("0", "0", "0"))], unit) | |
143 | 148 | else throw("Strict value is not equal to itself.") | |
144 | 149 | } | |
145 | 150 | ||
146 | 151 | ||
147 | 152 | ||
148 | - | @Callable( | |
149 | - | func getRateChangeAmountsREADONLY () = $Tuple2(nil, | |
153 | + | @Callable(I) | |
154 | + | func getRateChangeAmountsREADONLY () = $Tuple2(nil, V()) | |
150 | 155 | ||
151 | 156 | ||
152 | 157 | ||
153 | - | @Callable( | |
154 | - | func vote ( | |
155 | - | let | |
156 | - | let | |
158 | + | @Callable(I) | |
159 | + | func vote (ac) = { | |
160 | + | let ad = (value(getInteger(o())) + value(getInteger(c))) | |
161 | + | let ab = [if ((ad > height)) | |
157 | 162 | then true | |
158 | - | else | |
163 | + | else j("too late to vote"), if (containsElement([1, 0, -1], ac)) | |
159 | 164 | then true | |
160 | - | else | |
161 | - | if (( | |
165 | + | else j("not valid argument")] | |
166 | + | if ((ab == ab)) | |
162 | 167 | then { | |
163 | - | let | |
164 | - | let | |
168 | + | let x = invoke(z, "getUserGwxAmountAtHeightREADONLY", [toString(I.caller), ad], nil) | |
169 | + | let ae = if ((L(x) > 0)) | |
165 | 170 | then true | |
166 | - | else | |
167 | - | if (( | |
171 | + | else j("you don't have gwx") | |
172 | + | if ((ae == ae)) | |
168 | 173 | then { | |
169 | - | let | |
170 | - | let | |
171 | - | if ($isInstanceOf( | |
174 | + | let y = { | |
175 | + | let E = getString(u(toString(I.caller))) | |
176 | + | if ($isInstanceOf(E, "String")) | |
172 | 177 | then { | |
173 | - | let | |
174 | - | let | |
175 | - | let | |
176 | - | let | |
177 | - | let | |
178 | - | then ( | |
178 | + | let k = E | |
179 | + | let y = split(k, a) | |
180 | + | let af = y[1] | |
181 | + | let ag = y[2] | |
182 | + | let ah = if (if (if ((ag == "increase")) | |
183 | + | then (ac == 1) | |
179 | 184 | else false) | |
180 | 185 | then true | |
181 | - | else if (( | |
182 | - | then ( | |
186 | + | else if ((ag == "decrease")) | |
187 | + | then (ac == -1) | |
183 | 188 | else false) | |
184 | 189 | then true | |
185 | - | else if (( | |
186 | - | then ( | |
190 | + | else if ((ag == "none")) | |
191 | + | then (ac == 0) | |
187 | 192 | else false | |
188 | - | let | |
189 | - | then ( | |
193 | + | let ai = if (ah) | |
194 | + | then (L(x) == parseIntValue(af)) | |
190 | 195 | else false | |
191 | - | let | |
192 | - | then | |
196 | + | let aj = if (if (ah) | |
197 | + | then ai | |
193 | 198 | else false) | |
194 | - | then | |
199 | + | then j("you already voted") | |
195 | 200 | else invoke(this, "cancelVote", nil, nil) | |
196 | - | | |
201 | + | aj | |
197 | 202 | } | |
198 | - | else if ($isInstanceOf( | |
203 | + | else if ($isInstanceOf(E, "Unit")) | |
199 | 204 | then { | |
200 | - | let | |
201 | - | | |
205 | + | let ak = E | |
206 | + | ak | |
202 | 207 | } | |
203 | 208 | else throw("Match error") | |
204 | 209 | } | |
205 | - | if (( | |
210 | + | if ((y == y)) | |
206 | 211 | then { | |
207 | - | let | |
208 | - | let | |
209 | - | let | |
210 | - | let | |
211 | - | let | |
212 | + | let al = split(value(getString(p())), a) | |
213 | + | let am = al[1] | |
214 | + | let an = al[2] | |
215 | + | let ao = al[3] | |
216 | + | let ap = if ((ac == 1)) | |
212 | 217 | then { | |
213 | - | let | |
214 | - | [toString( | |
218 | + | let aq = (parseIntValue(am) + L(x)) | |
219 | + | [toString(aq), an, ao] | |
215 | 220 | } | |
216 | - | else if (( | |
221 | + | else if ((ac == -1)) | |
217 | 222 | then { | |
218 | - | let | |
219 | - | [ | |
223 | + | let ar = (parseIntValue(an) + L(x)) | |
224 | + | [am, an, toString(ar)] | |
220 | 225 | } | |
221 | 226 | else { | |
222 | - | let | |
223 | - | [ | |
227 | + | let as = (parseIntValue(an) + L(x)) | |
228 | + | [am, toString(as), ao] | |
224 | 229 | } | |
225 | - | let | |
226 | - | let | |
227 | - | $Tuple2([StringEntry( | |
230 | + | let at = u(toString(I.caller)) | |
231 | + | let af = w(toString(L(x)), ac) | |
232 | + | $Tuple2([StringEntry(p(), q(ap[0], ap[1], ap[2])), StringEntry(at, af)], unit) | |
228 | 233 | } | |
229 | 234 | else throw("Strict value is not equal to itself.") | |
230 | 235 | } | |
231 | 236 | else throw("Strict value is not equal to itself.") | |
232 | 237 | } | |
233 | 238 | else throw("Strict value is not equal to itself.") | |
234 | 239 | } | |
235 | 240 | ||
236 | 241 | ||
237 | 242 | ||
238 | - | @Callable( | |
243 | + | @Callable(I) | |
239 | 244 | func cancelVote () = { | |
240 | - | let | |
241 | - | then toString( | |
242 | - | else toString( | |
243 | - | let | |
245 | + | let au = if ((I.caller == this)) | |
246 | + | then toString(I.originCaller) | |
247 | + | else toString(I.caller) | |
248 | + | let ab = [if (isDefined(getString(p()))) | |
244 | 249 | then true | |
245 | - | else | |
246 | - | if (( | |
250 | + | else j("no vote")] | |
251 | + | if ((ab == ab)) | |
247 | 252 | then { | |
248 | - | let | |
249 | - | let | |
250 | - | let | |
251 | - | let | |
252 | - | let | |
253 | - | let | |
254 | - | let | |
255 | - | let | |
253 | + | let y = split(value(getString(u(au))), a) | |
254 | + | let af = y[1] | |
255 | + | let ag = y[2] | |
256 | + | let al = split(value(getString(p())), a) | |
257 | + | let am = al[1] | |
258 | + | let an = al[2] | |
259 | + | let ao = al[3] | |
260 | + | let av = if ((ag == "increase")) | |
256 | 261 | then { | |
257 | - | let | |
258 | - | $Tuple2([StringEntry( | |
262 | + | let aw = (parseIntValue(am) - parseIntValue(af)) | |
263 | + | $Tuple2([StringEntry(p(), q(toString(aw), an, ao)), DeleteEntry(u(au))], unit) | |
259 | 264 | } | |
260 | - | else if (( | |
265 | + | else if ((ag == "decrease")) | |
261 | 266 | then { | |
262 | - | let | |
263 | - | $Tuple2([StringEntry( | |
267 | + | let ax = (parseIntValue(ao) - parseIntValue(af)) | |
268 | + | $Tuple2([StringEntry(p(), q(am, an, toString(ax))), DeleteEntry(u(au))], unit) | |
264 | 269 | } | |
265 | 270 | else { | |
266 | - | let | |
267 | - | $Tuple2([StringEntry( | |
271 | + | let as = (parseIntValue(an) - parseIntValue(af)) | |
272 | + | $Tuple2([StringEntry(p(), q(am, toString(as), ao)), DeleteEntry(u(au))], unit) | |
268 | 273 | } | |
269 | - | | |
274 | + | av | |
270 | 275 | } | |
271 | 276 | else throw("Strict value is not equal to itself.") | |
272 | 277 | } | |
273 | 278 | ||
274 | 279 | ||
275 | 280 | ||
276 | - | @Callable( | |
277 | - | func setThreshold ( | |
278 | - | let | |
281 | + | @Callable(I) | |
282 | + | func setThreshold (ay) = { | |
283 | + | let ab = [K(I), if ((ay > 0)) | |
279 | 284 | then true | |
280 | - | else | |
281 | - | if (( | |
282 | - | then $Tuple2([IntegerEntry( | |
285 | + | else j("invalid threshold")] | |
286 | + | if ((ab == ab)) | |
287 | + | then $Tuple2([IntegerEntry(f, ay)], unit) | |
283 | 288 | else throw("Strict value is not equal to itself.") | |
284 | 289 | } | |
285 | 290 | ||
286 | 291 | ||
287 | 292 | ||
288 | - | @Callable( | |
293 | + | @Callable(I) | |
289 | 294 | func finalize () = { | |
290 | - | let | |
291 | - | let | |
295 | + | let ad = (value(getInteger(o())) + value(getInteger(c))) | |
296 | + | let ab = [if ((height >= ad)) | |
292 | 297 | then true | |
293 | - | else | |
294 | - | if (( | |
298 | + | else j("insufficient height for completion")] | |
299 | + | if ((ab == ab)) | |
295 | 300 | then { | |
296 | - | let | |
297 | - | let | |
298 | - | let | |
299 | - | let | |
300 | - | let | |
301 | - | let | |
302 | - | let | |
303 | - | let | |
304 | - | let | |
305 | - | let | |
306 | - | let | |
307 | - | let | |
301 | + | let al = split(value(getString(p())), a) | |
302 | + | let am = parseIntValue(al[1]) | |
303 | + | let an = parseIntValue(al[2]) | |
304 | + | let ao = parseIntValue(al[3]) | |
305 | + | let az = ((am + an) + ao) | |
306 | + | let aa = n(f) | |
307 | + | let aA = V() | |
308 | + | let T = aA._1 | |
309 | + | let aB = aA._2 | |
310 | + | let U = aA._3 | |
311 | + | let aC = [am, an, ao] | |
312 | + | let av = if ((aa > az)) | |
308 | 313 | then nil | |
309 | - | else if (( | |
310 | - | then [StringEntry("foo", "NONE")] | |
311 | - | else if (( | |
312 | - | then [StringEntry("foo", "INC")] | |
313 | - | else [StringEntry("foo", "DEC")] | |
314 | - | ( | |
314 | + | else if ((an == max(aC))) | |
315 | + | then [StringEntry("foo", "NONE"), IntegerEntry("bar", aB)] | |
316 | + | else if ((am == max(aC))) | |
317 | + | then [StringEntry("foo", "INC"), IntegerEntry("bar", T)] | |
318 | + | else [StringEntry("foo", "DEC"), IntegerEntry("bar", U)] | |
319 | + | (av ++ [IntegerEntry(o(), height)]) | |
315 | 320 | } | |
316 | 321 | else throw("Strict value is not equal to itself.") | |
317 | 322 | } | |
318 | 323 | ||
319 | 324 |
github/deemru/w8io/169f3d6 150.07 ms ◑