tx · 2V66ayuceomPtycJq1dZKenYVewFUuAR3XRcxwPU6bi4 3NBEuUXKfGqe1ZKUfx8b8YsguJKYLhy2bTJ: -0.03700000 Waves 2023.05.24 17:20 [2592174] smart account 3NBEuUXKfGqe1ZKUfx8b8YsguJKYLhy2bTJ > SELF 0.00000000 Waves
{ "type": 13, "id": "2V66ayuceomPtycJq1dZKenYVewFUuAR3XRcxwPU6bi4", "fee": 3700000, "feeAssetId": null, "timestamp": 1684938025304, "version": 2, "chainId": 84, "sender": "3NBEuUXKfGqe1ZKUfx8b8YsguJKYLhy2bTJ", "senderPublicKey": "2NgVCitn1k18yzwhrzdQXHDEygzSkjbXS4A1koTt14db", "proofs": [ "5fa3V6PYiN6To2eG2WM5XYLqmND33YA5KzbCCndTjx8qVQcGa4EkvdsNwNV3PqQhYb2S42c2so9ArmF2qgWZYFDe" ], "script": "base64:BgI8CAISABIFCgMICAESABIDCgEBEgASABIAEgMKAQESAwoBARIDCgEBEgASABIAEgMKAQgSAwoBCBIDCgEIYAANa190b3RhbFN1cHBseQINa190b3RhbFN1cHBseQAPa19yZXdhcmRCYWxhbmNlAg9rX3Jld2FyZEJhbGFuY2UAD2tfbG9ja2VkQmFsYW5jZQIPa19sb2NrZWRCYWxhbmNlAA1rX2ZyZWVCYWxhbmNlAg1rX2ZyZWVCYWxhbmNlAA9rX2V4Y2Vzc0JhbGFuY2UCD2tfZXhjZXNzQmFsYW5jZQAMa192YXVsdEFzc2V0AgxrX3ZhdWx0QXNzZXQAFGtfdmF1bHRBc3NldERlY2ltYWxzAhRrX3ZhdWx0QXNzZXREZWNpbWFscwAUa19tYXhTcG90VXRpbGl6YXRpb24CFGtfbWF4U3BvdFV0aWxpemF0aW9uAAZrX3JhdGUCBmtfcmF0ZQAQa19sYXN0VXBkYXRlVGltZQIQa19sYXN0VXBkYXRlVGltZQAWa19yZXdhcmRQZXJUb2tlblN0b3JlZAIWa19yZXdhcmRQZXJUb2tlblN0b3JlZAAMa19yZXdhcmRSYXR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ZVJld2FyZAIFB19zdGFrZXIAAAJfMwkAAgEJAKQDAQkBEWFzc2V0RnJvbURlY2ltYWxzAQUMc3Rha2VyRWFybmVkAWkBEnZpZXdfd2l0aGRyYXdMaW1pdAEHX3N0YWtlcgQRd2l0aGRyYXdMaW1pdExlZnQICQEUZ2V0V2l0aGRyYXdMaW1pdExlZnQBBQdfc3Rha2VyAl8yBAxsaW1pdEluQXNzZXQJARFhc3NldEZyb21EZWNpbWFscwEJAQRtdWxkAgURd2l0aGRyYXdMaW1pdExlZnQJAQRyYXRlAAkAAgEJAKQDAQUMbGltaXRJbkFzc2V0AQJ0eAEGdmVyaWZ5AAQOY29vcmRpbmF0b3JTdHIJAJ0IAgUEdGhpcwUUa19jb29yZGluYXRvckFkZHJlc3MDCQEJaXNEZWZpbmVkAQUOY29vcmRpbmF0b3JTdHIEBWFkbWluCQCdCAIJARFAZXh0ck5hdGl2ZSgxMDYyKQEJAQV2YWx1ZQEFDmNvb3JkaW5hdG9yU3RyBQ9rX2FkbWluX2FkZHJlc3MDCQEJaXNEZWZpbmVkAQUFYWRtaW4JAQt2YWx1ZU9yRWxzZQIJAJsIAgkBEUBleHRyTmF0aXZlKDEwNjIpAQkBBXZhbHVlAQUFYWRtaW4JAKwCAgkArAICCQCsAgICB3N0YXR1c18JAKUIAQUEdGhpcwIBXwkA2AQBCAUCdHgCaWQHCQACAQIudW5hYmxlIHRvIHZlcmlmeTogYWRtaW4gbm90IHNldCBpbiBjb29yZGluYXRvcgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleWZxXM4=", "height": 2592174, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4Q8aTwvsuvBCZwaVPcpBpxNRzQVB8Ga495FPtbZjN6o7 Next: J8nzxg7GTPk9bJgsLU4fEaJbhJofYdLkKkpk7jfqxesv Diff:
Old | New | Differences | |
---|---|---|---|
71 | 71 | func I (F) = valueOrElse(getBoolean(G(), D(w, F)), false) | |
72 | 72 | ||
73 | 73 | ||
74 | - | func J () = | |
74 | + | func J () = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(G(), B), "Spot address not set")), "Spot address invalid") | |
75 | 75 | ||
76 | 76 | ||
77 | - | func K () = fromBase58String( | |
77 | + | func K () = fromBase58String(valueOrErrorMessage(getString(G(), x), "Governance asset not set")) | |
78 | 78 | ||
79 | 79 | ||
80 | - | func L () = | |
80 | + | func L () = fromBase58String(getStringValue(G(), y)) | |
81 | 81 | ||
82 | 82 | ||
83 | - | func M () = { | |
84 | - | let N = L() | |
85 | - | if ((N == "WAVES")) | |
83 | + | func M () = valueOrErrorMessage(getString(this, f), "Vault asset not set") | |
84 | + | ||
85 | + | ||
86 | + | func N () = { | |
87 | + | let O = M() | |
88 | + | if ((O == "WAVES")) | |
86 | 89 | then unit | |
87 | - | else fromBase58String( | |
90 | + | else fromBase58String(O) | |
88 | 91 | } | |
89 | 92 | ||
90 | 93 | ||
91 | - | func | |
94 | + | func P () = valueOrErrorMessage(getInteger(this, g), "Vault asset decimals not set") | |
92 | 95 | ||
93 | 96 | ||
94 | - | func | |
97 | + | func Q () = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(G(), A), "Manager address not set")), "Manager address invalid") | |
95 | 98 | ||
96 | 99 | ||
97 | - | let | |
100 | + | let R = (1 * (((((((10 * 10) * 10) * 10) * 10) * 10) * 10) * 10)) | |
98 | 101 | ||
99 | - | let | |
102 | + | let S = (((7 * 60) * 60) * 24) | |
100 | 103 | ||
101 | - | let | |
104 | + | let T = "" | |
102 | 105 | ||
103 | - | let | |
106 | + | let U = 0 | |
104 | 107 | ||
105 | - | func | |
106 | - | let | |
107 | - | if (( | |
108 | - | then ( | |
109 | - | else if (( | |
110 | - | then | |
108 | + | func V (W) = { | |
109 | + | let X = P() | |
110 | + | if ((X == 6)) | |
111 | + | then (W / 100) | |
112 | + | else if ((X == 8)) | |
113 | + | then W | |
111 | 114 | else throw("Invalid asset decimals") | |
112 | 115 | } | |
113 | 116 | ||
114 | 117 | ||
115 | - | func | |
116 | - | let | |
117 | - | if (( | |
118 | - | then ( | |
119 | - | else if (( | |
120 | - | then | |
118 | + | func Y (W) = { | |
119 | + | let X = P() | |
120 | + | if ((X == 6)) | |
121 | + | then (W * 100) | |
122 | + | else if ((X == 8)) | |
123 | + | then W | |
121 | 124 | else throw("Invalid asset decimals") | |
122 | 125 | } | |
123 | 126 | ||
124 | 127 | ||
125 | - | func | |
128 | + | func Z (aa,ab) = fraction(aa, R, ab, HALFEVEN) | |
126 | 129 | ||
127 | 130 | ||
128 | - | func | |
131 | + | func ac (aa,ab) = fraction(aa, ab, R, HALFEVEN) | |
129 | 132 | ||
130 | 133 | ||
131 | - | func | |
132 | - | then | |
133 | - | else -( | |
134 | + | func ad (aa) = if ((aa > 0)) | |
135 | + | then aa | |
136 | + | else -(aa) | |
134 | 137 | ||
135 | 138 | ||
136 | - | func | |
137 | - | then | |
138 | - | else | |
139 | + | func ae (aa,ab) = if ((aa > ab)) | |
140 | + | then ab | |
141 | + | else aa | |
139 | 142 | ||
140 | 143 | ||
141 | - | let | |
144 | + | let af = (86400 * 1000) | |
142 | 145 | ||
143 | - | let | |
146 | + | let ag = Z((1 * R), (4 * R)) | |
144 | 147 | ||
145 | - | func | |
148 | + | func ah (ai) = valueOrErrorMessage(getInteger(this, ai), ("no value for " + ai)) | |
146 | 149 | ||
147 | 150 | ||
148 | - | func | |
151 | + | func aj (ai) = valueOrElse(getInteger(this, ai), 0) | |
149 | 152 | ||
150 | 153 | ||
151 | - | func | |
154 | + | func ak (ai) = valueOrElse(getInteger(this, ai), R) | |
152 | 155 | ||
153 | 156 | ||
154 | - | func | |
157 | + | func al () = aj(a) | |
155 | 158 | ||
156 | 159 | ||
157 | - | func | |
160 | + | func am () = ak(i) | |
158 | 161 | ||
159 | 162 | ||
160 | - | func | |
163 | + | func an (ao) = aj(D(p, ao)) | |
161 | 164 | ||
162 | 165 | ||
163 | - | func | |
166 | + | func ap (ao) = aj(D(q, ao)) | |
164 | 167 | ||
165 | 168 | ||
166 | - | func | |
169 | + | func aq (ao) = aj(D(r, ao)) | |
167 | 170 | ||
168 | 171 | ||
169 | - | func | |
172 | + | func ar (ao) = aj(D(t, ao)) | |
170 | 173 | ||
171 | 174 | ||
172 | - | func | |
175 | + | func as (ao) = aj(D(s, ao)) | |
173 | 176 | ||
174 | 177 | ||
175 | - | func | |
178 | + | func at () = aj(d) | |
176 | 179 | ||
177 | 180 | ||
178 | - | func | |
181 | + | func au () = aj(c) | |
179 | 182 | ||
180 | 183 | ||
181 | - | func | |
184 | + | func av () = aj(e) | |
182 | 185 | ||
183 | 186 | ||
184 | - | func | |
187 | + | func aw () = aj(k) | |
185 | 188 | ||
186 | 189 | ||
187 | - | func | |
190 | + | func ax () = aj(j) | |
188 | 191 | ||
189 | 192 | ||
190 | - | func | |
193 | + | func ay () = aj(l) | |
191 | 194 | ||
192 | 195 | ||
193 | - | func | |
196 | + | func az () = aj(m) | |
194 | 197 | ||
195 | 198 | ||
196 | - | func | |
199 | + | func aA () = aj(b) | |
197 | 200 | ||
198 | 201 | ||
199 | - | func | |
202 | + | func aB (ao) = aj(D(o, ao)) | |
200 | 203 | ||
201 | 204 | ||
202 | - | func | |
205 | + | func aC (ao) = aj(D(n, ao)) | |
203 | 206 | ||
204 | 207 | ||
205 | - | func | |
208 | + | func aD () = aj(h) | |
206 | 209 | ||
207 | 210 | ||
208 | - | func | |
211 | + | func aE () = valueOrElse(getBoolean(this, u), false) | |
209 | 212 | ||
210 | 213 | ||
211 | - | func | |
214 | + | func aF () = lastBlock.timestamp | |
212 | 215 | ||
213 | 216 | ||
214 | - | func | |
217 | + | func aG () = (aF() / 1000) | |
215 | 218 | ||
216 | 219 | ||
217 | - | func | |
218 | - | let | |
219 | - | let | |
220 | - | let | |
221 | - | then $Tuple3( | |
222 | - | else $Tuple3( | |
223 | - | let | |
224 | - | let | |
225 | - | let | |
226 | - | $Tuple3( | |
220 | + | func aH (ao) = { | |
221 | + | let aI = aF() | |
222 | + | let aJ = as(ao) | |
223 | + | let aK = if (((aI - aJ) > af)) | |
224 | + | then $Tuple3(aI, aq(ao), 0) | |
225 | + | else $Tuple3(aJ, (aq(ao) - ar(ao)), ar(ao)) | |
226 | + | let aL = aK._1 | |
227 | + | let aM = aK._2 | |
228 | + | let aN = aK._3 | |
229 | + | $Tuple3(aL, aM, aN) | |
227 | 230 | } | |
228 | 231 | ||
229 | 232 | ||
230 | - | func | |
231 | - | let | |
232 | - | then | |
233 | - | else | |
234 | - | | |
233 | + | func aO (aP) = { | |
234 | + | let aQ = if ((al() > 0)) | |
235 | + | then Z((at() + aP), al()) | |
236 | + | else R | |
237 | + | aQ | |
235 | 238 | } | |
236 | 239 | ||
237 | 240 | ||
238 | - | func | |
241 | + | func aR () = ae(aG(), az()) | |
239 | 242 | ||
240 | 243 | ||
241 | - | func | |
242 | - | then | |
244 | + | func aS (aT) = if (((al() + aT) == 0)) | |
245 | + | then aw() | |
243 | 246 | else { | |
244 | - | let | |
245 | - | let | |
247 | + | let aU = (aR() - ax()) | |
248 | + | let aV = if ((0 > aU)) | |
246 | 249 | then 0 | |
247 | - | else | |
248 | - | let | |
249 | - | ( | |
250 | + | else aU | |
251 | + | let aW = Z((ay() * aV), (al() + aT)) | |
252 | + | (aw() + aW) | |
250 | 253 | } | |
251 | 254 | ||
252 | 255 | ||
253 | - | func | |
254 | - | let | |
255 | - | ( | |
256 | + | func aX (ao,aT) = { | |
257 | + | let aY = (aS(aT) - aC(ao)) | |
258 | + | (ac((an(ao) + aT), aY) + aB(ao)) | |
256 | 259 | } | |
257 | 260 | ||
258 | 261 | ||
259 | - | func | |
260 | - | let | |
261 | - | let | |
262 | - | let | |
263 | - | then $Tuple2( | |
262 | + | func aZ (ao,aT) = { | |
263 | + | let ba = aS(aT) | |
264 | + | let bb = aG() | |
265 | + | let bc = if ((ao != "")) | |
266 | + | then $Tuple2(aX(ao, aT), ba) | |
264 | 267 | else $Tuple2(0, 0) | |
265 | - | let | |
266 | - | let | |
267 | - | $Tuple4( | |
268 | + | let bd = bc._1 | |
269 | + | let be = bc._2 | |
270 | + | $Tuple4(ba, bb, bd, be) | |
268 | 271 | } | |
269 | 272 | ||
270 | 273 | ||
271 | - | func | |
272 | - | then [IntegerEntry(D(p, | |
273 | - | else throw(((("Vault: can not update user balance. Balance: " + toString( | |
274 | + | func bf (bg,bh) = if (((an(bg) + bh) >= 0)) | |
275 | + | then [IntegerEntry(D(p, bg), (an(bg) + bh))] | |
276 | + | else throw(((("Vault: can not update user balance. Balance: " + toString(an(bg))) + " change: ") + toString(bh))) | |
274 | 277 | ||
275 | 278 | ||
276 | - | func | |
279 | + | func bi (bg,bj) = [IntegerEntry(D(r, bg), bj)] | |
277 | 280 | ||
278 | 281 | ||
279 | - | func | |
282 | + | func bk (bg,bj) = [IntegerEntry(D(q, bg), bj)] | |
280 | 283 | ||
281 | 284 | ||
282 | - | func | |
283 | - | let | |
284 | - | if ((( | |
285 | - | then [IntegerEntry(d, ( | |
286 | - | else throw(((("Vault: can not update free balance. Balance: " + toString( | |
285 | + | func bl (bh) = { | |
286 | + | let bm = at() | |
287 | + | if (((bm + bh) >= 0)) | |
288 | + | then [IntegerEntry(d, (bm + bh))] | |
289 | + | else throw(((("Vault: can not update free balance. Balance: " + toString(bm)) + " change: ") + toString(bh))) | |
287 | 290 | } | |
288 | 291 | ||
289 | 292 | ||
290 | - | func | |
291 | - | let | |
292 | - | if ((( | |
293 | - | then [IntegerEntry(c, ( | |
294 | - | else throw(((("Vault: can not update locked balance. Balance: " + toString( | |
293 | + | func bn (bh) = { | |
294 | + | let bm = au() | |
295 | + | if (((bm + bh) >= 0)) | |
296 | + | then [IntegerEntry(c, (bm + bh))] | |
297 | + | else throw(((("Vault: can not update locked balance. Balance: " + toString(bm)) + " change: ") + toString(bh))) | |
295 | 298 | } | |
296 | 299 | ||
297 | 300 | ||
298 | - | func | |
299 | - | let | |
300 | - | let | |
301 | - | if (( | |
302 | - | then [IntegerEntry(e, | |
303 | - | else throw(((((((("Vault: can not update excess balance. Balance: " + toString( | |
301 | + | func bo (bh) = { | |
302 | + | let bp = (av() + bh) | |
303 | + | let bq = Z(ad(bp), at()) | |
304 | + | if ((aD() > bq)) | |
305 | + | then [IntegerEntry(e, bp)] | |
306 | + | else throw(((((((("Vault: can not update excess balance. Balance: " + toString(av())) + " change: ") + toString(bh)) + " utilization rate: ") + toString(bq)) + " max utilization rate: ") + toString(aD()))) | |
304 | 307 | } | |
305 | 308 | ||
306 | 309 | ||
307 | - | func | |
310 | + | func br (bh) = [IntegerEntry(a, (al() + bh))] | |
308 | 311 | ||
309 | 312 | ||
310 | - | func | |
313 | + | func bs (bj) = [IntegerEntry(i, bj)] | |
311 | 314 | ||
312 | 315 | ||
313 | - | func | |
316 | + | func bt (bg,bu,bv) = [IntegerEntry(D(s, bg), bu), IntegerEntry(D(t, bg), bv)] | |
314 | 317 | ||
315 | 318 | ||
316 | - | func | |
319 | + | func bw (bx) = [IntegerEntry(b, (aA() + bx))] | |
317 | 320 | ||
318 | 321 | ||
319 | - | func | |
322 | + | func by (bz) = [IntegerEntry(l, bz)] | |
320 | 323 | ||
321 | 324 | ||
322 | - | func | |
325 | + | func bA (bB,bC) = [IntegerEntry(j, bB), IntegerEntry(m, bC)] | |
323 | 326 | ||
324 | 327 | ||
325 | - | func | |
328 | + | func bD (bE) = [IntegerEntry(k, bE)] | |
326 | 329 | ||
327 | 330 | ||
328 | - | func | |
331 | + | func bF (ao,bG,bH) = [IntegerEntry(D(o, ao), bG), IntegerEntry(D(n, ao), bH)] | |
329 | 332 | ||
330 | 333 | ||
331 | - | @Callable( | |
332 | - | func migrate () = if (( | |
334 | + | @Callable(bI) | |
335 | + | func migrate () = if ((bI.caller != H())) | |
333 | 336 | then throw("Invalid migrate parameters") | |
334 | 337 | else { | |
335 | - | let | |
336 | - | let | |
338 | + | let bJ = toBase58String(L()) | |
339 | + | let X = if ((bJ == "WAVES")) | |
337 | 340 | then 8 | |
338 | 341 | else { | |
339 | - | let | |
340 | - | | |
342 | + | let bK = valueOrErrorMessage(assetInfo(fromBase58String(bJ)), ("Invalid token id: " + bJ)) | |
343 | + | bK.decimals | |
341 | 344 | } | |
342 | - | [StringEntry(f, | |
345 | + | [StringEntry(f, bJ), IntegerEntry(g, X), IntegerEntry(h, 0)] | |
343 | 346 | } | |
344 | 347 | ||
345 | 348 | ||
346 | 349 | ||
347 | - | @Callable( | |
348 | - | func initialize ( | |
350 | + | @Callable(bI) | |
351 | + | func initialize (bL,bJ,bM) = if (if (if (if (aE()) | |
349 | 352 | then true | |
350 | - | else ( | |
353 | + | else (bI.caller != this)) | |
351 | 354 | then true | |
352 | - | else (0 > | |
355 | + | else (0 > bM)) | |
353 | 356 | then true | |
354 | - | else ( | |
357 | + | else (bM > R)) | |
355 | 358 | then throw("Unable to initialize") | |
356 | 359 | else { | |
357 | - | let | |
360 | + | let X = if ((bJ == "WAVES")) | |
358 | 361 | then 8 | |
359 | 362 | else { | |
360 | - | let | |
361 | - | | |
363 | + | let bK = valueOrErrorMessage(assetInfo(fromBase58String(bJ)), ("Invalid token id: " + bJ)) | |
364 | + | bK.decimals | |
362 | 365 | } | |
363 | - | [StringEntry(v, toString(valueOrErrorMessage(addressFromString( | |
366 | + | [StringEntry(v, toString(valueOrErrorMessage(addressFromString(bL), "Invalid coordinator address"))), StringEntry(f, bJ), IntegerEntry(g, X), IntegerEntry(h, bM), BooleanEntry(u, true)] | |
364 | 367 | } | |
365 | 368 | ||
366 | 369 | ||
367 | 370 | ||
368 | - | @Callable( | |
371 | + | @Callable(bI) | |
369 | 372 | func stake () = { | |
370 | - | let | |
371 | - | let | |
372 | - | if (if (if (( | |
373 | + | let ao = toString(bI.caller) | |
374 | + | let W = Y(bI.payments[0].amount) | |
375 | + | if (if (if ((bI.payments[0].assetId != N())) | |
373 | 376 | then true | |
374 | - | else (size( | |
377 | + | else (size(bI.payments) != 1)) | |
375 | 378 | then true | |
376 | - | else !( | |
379 | + | else !(aE())) | |
377 | 380 | then throw("Invalid call to stake") | |
378 | 381 | else { | |
379 | - | let bM = aY(an, 0) | |
380 | - | let aZ = bM._1 | |
381 | - | let ba = bM._2 | |
382 | - | let bc = bM._3 | |
383 | - | let bd = bM._4 | |
384 | - | let bN = al() | |
385 | - | let bO = ao(an) | |
386 | - | let bP = Y(V, bN) | |
387 | - | let bQ = Y((ab(bP, bN) + ab(am(an), bO)), (bP + am(an))) | |
388 | - | let bR = (bP + am(an)) | |
389 | - | let bS = ab(bR, af) | |
390 | - | let bT = invoke(P(), "deposit", nil, [AttachedPayment(M(), U(V))]) | |
391 | - | if ((bT == bT)) | |
392 | - | then (((((((bE(an, bc, bd) ++ bC(aZ)) ++ bz(ba, ay())) ++ bk(V)) ++ be(an, bP)) ++ bj(an, bQ)) ++ bh(an, bS)) ++ bq(bP)) | |
382 | + | let bN = aZ(ao, 0) | |
383 | + | let ba = bN._1 | |
384 | + | let bb = bN._2 | |
385 | + | let bd = bN._3 | |
386 | + | let be = bN._4 | |
387 | + | let bO = am() | |
388 | + | let bP = ap(ao) | |
389 | + | let bQ = Z(W, bO) | |
390 | + | let bR = Z((ac(bQ, bO) + ac(an(ao), bP)), (bQ + an(ao))) | |
391 | + | let bS = (bQ + an(ao)) | |
392 | + | let bT = ac(bS, ag) | |
393 | + | let bU = invoke(Q(), "deposit", nil, [AttachedPayment(N(), V(W))]) | |
394 | + | if ((bU == bU)) | |
395 | + | then { | |
396 | + | let bV = invoke(J(), "notifyVaultBalanceChange", [M(), W], nil) | |
397 | + | if ((bV == bV)) | |
398 | + | then (((((((bF(ao, bd, be) ++ bD(ba)) ++ bA(bb, az())) ++ bl(W)) ++ bf(ao, bQ)) ++ bk(ao, bR)) ++ bi(ao, bT)) ++ br(bQ)) | |
399 | + | else throw("Strict value is not equal to itself.") | |
400 | + | } | |
393 | 401 | else throw("Strict value is not equal to itself.") | |
394 | 402 | } | |
395 | 403 | } | |
396 | 404 | ||
397 | 405 | ||
398 | 406 | ||
399 | - | @Callable( | |
400 | - | func unStake ( | |
401 | - | let | |
402 | - | let | |
403 | - | if (if (if (( | |
407 | + | @Callable(bI) | |
408 | + | func unStake (W) = { | |
409 | + | let ao = toString(bI.caller) | |
410 | + | let bW = Y(W) | |
411 | + | if (if (if ((bI.payments != nil)) | |
404 | 412 | then true | |
405 | - | else (0 >= | |
413 | + | else (0 >= bW)) | |
406 | 414 | then true | |
407 | - | else !( | |
415 | + | else !(aE())) | |
408 | 416 | then throw("Invalid call to unStake") | |
409 | 417 | else { | |
410 | - | let | |
411 | - | let | |
412 | - | let | |
413 | - | let | |
414 | - | let | |
415 | - | let | |
416 | - | let | |
417 | - | let | |
418 | - | let | |
419 | - | let | |
420 | - | if (( | |
418 | + | let bX = aZ(ao, 0) | |
419 | + | let ba = bX._1 | |
420 | + | let bb = bX._2 | |
421 | + | let bd = bX._3 | |
422 | + | let be = bX._4 | |
423 | + | let bY = aH(ao) | |
424 | + | let aL = bY._1 | |
425 | + | let aM = bY._2 | |
426 | + | let aN = bY._3 | |
427 | + | let bQ = Z(bW, am()) | |
428 | + | if ((bQ > aM)) | |
421 | 429 | then throw("Invalid call to unStake: withdraw over limit") | |
422 | 430 | else { | |
423 | - | let | |
424 | - | if (( | |
431 | + | let bZ = (aN + bQ) | |
432 | + | if ((bW > at())) | |
425 | 433 | then throw("Invalid call to unStake: balance too low") | |
426 | 434 | else { | |
427 | - | let bY = invoke(P(), "withdraw", [L(), U(bU)], nil) | |
428 | - | if ((bY == bY)) | |
429 | - | then (((((((bE(an, bc, bd) ++ bC(aZ)) ++ bz(ba, ay())) ++ bk(-(bU))) ++ be(an, -(bP))) ++ bq(-(bP))) ++ bs(an, aK, bX)) ++ [ScriptTransfer(bH.caller, U(bU), M())]) | |
435 | + | let ca = invoke(Q(), "withdraw", [M(), V(bW)], nil) | |
436 | + | if ((ca == ca)) | |
437 | + | then { | |
438 | + | let bV = invoke(J(), "notifyVaultBalanceChange", [M(), -(bW)], nil) | |
439 | + | if ((bV == bV)) | |
440 | + | then (((((((bF(ao, bd, be) ++ bD(ba)) ++ bA(bb, az())) ++ bl(-(bW))) ++ bf(ao, -(bQ))) ++ br(-(bQ))) ++ bt(ao, aL, bZ)) ++ [ScriptTransfer(bI.caller, V(bW), N())]) | |
441 | + | else throw("Strict value is not equal to itself.") | |
442 | + | } | |
430 | 443 | else throw("Strict value is not equal to itself.") | |
431 | 444 | } | |
432 | 445 | } | |
435 | 448 | ||
436 | 449 | ||
437 | 450 | ||
438 | - | @Callable( | |
451 | + | @Callable(bI) | |
439 | 452 | func withdrawRewards () = { | |
440 | - | let | |
441 | - | let | |
442 | - | let | |
443 | - | let | |
444 | - | let | |
445 | - | let | |
446 | - | if (if ((0 >= | |
453 | + | let ao = toString(bI.caller) | |
454 | + | let cb = aZ(ao, 0) | |
455 | + | let ba = cb._1 | |
456 | + | let bb = cb._2 | |
457 | + | let bd = cb._3 | |
458 | + | let be = cb._4 | |
459 | + | if (if ((0 >= bd)) | |
447 | 460 | then true | |
448 | - | else !( | |
461 | + | else !(aE())) | |
449 | 462 | then throw("No reward: Vault") | |
450 | - | else (((( | |
463 | + | else ((((bF(ao, 0, be) ++ bD(ba)) ++ bA(bb, az())) ++ bw(-(bd))) ++ [ScriptTransfer(bI.caller, bd, K())]) | |
451 | 464 | } | |
452 | 465 | ||
453 | 466 | ||
454 | 467 | ||
455 | - | @Callable( | |
468 | + | @Callable(bI) | |
456 | 469 | func addFree () = { | |
457 | - | let | |
458 | - | if (if (if (if (( | |
470 | + | let W = Y(bI.payments[0].amount) | |
471 | + | if (if (if (if ((bI.payments[0].assetId != N())) | |
459 | 472 | then true | |
460 | - | else (size( | |
473 | + | else (size(bI.payments) != 1)) | |
461 | 474 | then true | |
462 | - | else !( | |
475 | + | else !(aE())) | |
463 | 476 | then true | |
464 | - | else !(if (I(toString( | |
477 | + | else !(if (if (I(toString(bI.caller))) | |
465 | 478 | then true | |
466 | - | else (bH.caller == H()))) | |
479 | + | else (bI.caller == J())) | |
480 | + | then true | |
481 | + | else (bI.caller == H()))) | |
467 | 482 | then throw("Invalid addFree params") | |
468 | 483 | else { | |
469 | - | let | |
470 | - | let | |
471 | - | if (( | |
472 | - | then ( | |
484 | + | let aQ = aO(W) | |
485 | + | let bU = invoke(Q(), "deposit", nil, [AttachedPayment(N(), V(W))]) | |
486 | + | if ((bU == bU)) | |
487 | + | then (bl(W) ++ bs(aQ)) | |
473 | 488 | else throw("Strict value is not equal to itself.") | |
474 | 489 | } | |
475 | 490 | } | |
476 | 491 | ||
477 | 492 | ||
478 | 493 | ||
479 | - | @Callable( | |
494 | + | @Callable(bI) | |
480 | 495 | func addLocked () = { | |
481 | - | let | |
482 | - | if (if (if (if (( | |
496 | + | let W = Y(bI.payments[0].amount) | |
497 | + | if (if (if (if ((bI.payments[0].assetId != N())) | |
483 | 498 | then true | |
484 | - | else (size( | |
499 | + | else (size(bI.payments) != 1)) | |
485 | 500 | then true | |
486 | - | else !( | |
501 | + | else !(aE())) | |
487 | 502 | then true | |
488 | - | else !(if (I(toString( | |
503 | + | else !(if (I(toString(bI.caller))) | |
489 | 504 | then true | |
490 | - | else ( | |
505 | + | else (bI.caller == H()))) | |
491 | 506 | then throw("Invalid addLocked params") | |
492 | 507 | else { | |
493 | - | let | |
494 | - | if (( | |
495 | - | then | |
508 | + | let ca = invoke(Q(), "deposit", nil, [AttachedPayment(N(), V(W))]) | |
509 | + | if ((ca == ca)) | |
510 | + | then bn(W) | |
496 | 511 | else throw("Strict value is not equal to itself.") | |
497 | 512 | } | |
498 | 513 | } | |
499 | 514 | ||
500 | 515 | ||
501 | 516 | ||
502 | - | @Callable( | |
503 | - | func exchangeFreeAndLocked ( | |
517 | + | @Callable(bI) | |
518 | + | func exchangeFreeAndLocked (W) = if (if (!(aE())) | |
504 | 519 | then true | |
505 | - | else if (!(I(toString( | |
506 | - | then ( | |
520 | + | else if (!(I(toString(bI.caller)))) | |
521 | + | then (bI.caller != H()) | |
507 | 522 | else false) | |
508 | 523 | then throw("Invalid exchangeFreeAndLocked params") | |
509 | 524 | else { | |
510 | - | let | |
511 | - | let | |
512 | - | (( | |
525 | + | let bW = Y(W) | |
526 | + | let aQ = aO(-(bW)) | |
527 | + | ((bn(bW) ++ bl(-(bW))) ++ bs(aQ)) | |
513 | 528 | } | |
514 | 529 | ||
515 | 530 | ||
516 | 531 | ||
517 | - | @Callable( | |
518 | - | func withdrawLocked ( | |
532 | + | @Callable(bI) | |
533 | + | func withdrawLocked (W) = if (if (if (!(aE())) | |
519 | 534 | then true | |
520 | - | else (0 >= | |
535 | + | else (0 >= W)) | |
521 | 536 | then true | |
522 | - | else !(I(toString( | |
537 | + | else !(I(toString(bI.caller)))) | |
523 | 538 | then throw("Invalid withdrawLocked params") | |
524 | 539 | else { | |
525 | - | let | |
526 | - | let | |
527 | - | if (( | |
528 | - | then ( | |
540 | + | let bW = Y(W) | |
541 | + | let ca = invoke(Q(), "withdraw", [M(), V(bW)], nil) | |
542 | + | if ((ca == ca)) | |
543 | + | then (bn(-(bW)) ++ [ScriptTransfer(bI.caller, V(bW), N())]) | |
529 | 544 | else throw("Strict value is not equal to itself.") | |
530 | 545 | } | |
531 | 546 | ||
532 | 547 | ||
533 | 548 | ||
534 | - | @Callable( | |
535 | - | func | |
549 | + | @Callable(bI) | |
550 | + | func borrow (W) = if (if (if (!(aE())) | |
536 | 551 | then true | |
537 | - | else ( | |
552 | + | else (0 >= W)) | |
538 | 553 | then true | |
539 | - | else !( | |
540 | - | then throw("Invalid | |
554 | + | else !((bI.caller == J()))) | |
555 | + | then throw("Invalid borrow params") | |
541 | 556 | else { | |
542 | - | let bF = bH.payments[0].amount | |
543 | - | let aZ = aY(S, T)._1 | |
544 | - | let ca = aF() | |
545 | - | let cb = if ((ca > ay())) | |
546 | - | then (bF / R) | |
547 | - | else { | |
548 | - | let cc = (ay() - ca) | |
549 | - | let cd = (ax() * cc) | |
550 | - | ((bF + cd) / R) | |
551 | - | } | |
552 | - | (((bx(cb) ++ bC(aZ)) ++ bv(bF)) ++ bz(ca, (ca + R))) | |
557 | + | let bW = Y(W) | |
558 | + | let ca = invoke(Q(), "withdraw", [M(), V(bW)], nil) | |
559 | + | if ((ca == ca)) | |
560 | + | then (bo(-(bW)) ++ [ScriptTransfer(bI.caller, V(bW), N())]) | |
561 | + | else throw("Strict value is not equal to itself.") | |
553 | 562 | } | |
554 | 563 | ||
555 | 564 | ||
556 | 565 | ||
557 | - | @Callable(bH) | |
566 | + | @Callable(bI) | |
567 | + | func repay () = { | |
568 | + | let W = Y(bI.payments[0].amount) | |
569 | + | if (if (if (if ((bI.payments[0].assetId != N())) | |
570 | + | then true | |
571 | + | else (size(bI.payments) != 1)) | |
572 | + | then true | |
573 | + | else !(aE())) | |
574 | + | then true | |
575 | + | else !(if ((bI.caller == J())) | |
576 | + | then true | |
577 | + | else (bI.caller == H()))) | |
578 | + | then throw("Invalid repay params") | |
579 | + | else { | |
580 | + | let ca = invoke(Q(), "deposit", nil, [AttachedPayment(N(), V(W))]) | |
581 | + | if ((ca == ca)) | |
582 | + | then bo(W) | |
583 | + | else throw("Strict value is not equal to itself.") | |
584 | + | } | |
585 | + | } | |
586 | + | ||
587 | + | ||
588 | + | ||
589 | + | @Callable(bI) | |
590 | + | func addRewards () = if (if (if ((bI.payments[0].assetId != K())) | |
591 | + | then true | |
592 | + | else (size(bI.payments) != 1)) | |
593 | + | then true | |
594 | + | else !(aE())) | |
595 | + | then throw("Invalid addRewards params") | |
596 | + | else { | |
597 | + | let bG = bI.payments[0].amount | |
598 | + | let ba = aZ(T, U)._1 | |
599 | + | let cc = aG() | |
600 | + | let cd = if ((cc > az())) | |
601 | + | then (bG / S) | |
602 | + | else { | |
603 | + | let ce = (az() - cc) | |
604 | + | let cf = (ay() * ce) | |
605 | + | ((bG + cf) / S) | |
606 | + | } | |
607 | + | (((by(cd) ++ bD(ba)) ++ bw(bG)) ++ bA(cc, (cc + S))) | |
608 | + | } | |
609 | + | ||
610 | + | ||
611 | + | ||
612 | + | @Callable(bI) | |
558 | 613 | func ackRewards () = { | |
559 | - | let | |
560 | - | if (( | |
614 | + | let cg = invoke(Q(), "claimProfit", [M()], nil) | |
615 | + | if ((cg == cg)) | |
561 | 616 | then { | |
562 | - | let | |
563 | - | let | |
564 | - | if ($isInstanceOf( | |
617 | + | let ch = { | |
618 | + | let ci = cg | |
619 | + | if ($isInstanceOf(ci, "Int")) | |
565 | 620 | then { | |
566 | - | let | |
567 | - | | |
621 | + | let cj = ci | |
622 | + | Y(cj) | |
568 | 623 | } | |
569 | 624 | else throw("Invalid claimProfit response") | |
570 | 625 | } | |
571 | - | let | |
626 | + | let ck = if ((ch > 0)) | |
572 | 627 | then { | |
573 | - | let | |
574 | - | let | |
575 | - | if (( | |
576 | - | then ( | |
628 | + | let aQ = aO(ch) | |
629 | + | let bU = invoke(Q(), "deposit", nil, [AttachedPayment(N(), V(ch))]) | |
630 | + | if ((bU == bU)) | |
631 | + | then (bl(ch) ++ bs(aQ)) | |
577 | 632 | else throw("Strict value is not equal to itself.") | |
578 | 633 | } | |
579 | 634 | else nil | |
580 | - | if (( | |
581 | - | then | |
635 | + | if ((ck == ck)) | |
636 | + | then ck | |
582 | 637 | else throw("Strict value is not equal to itself.") | |
583 | 638 | } | |
584 | 639 | else throw("Strict value is not equal to itself.") | |
586 | 641 | ||
587 | 642 | ||
588 | 643 | ||
589 | - | @Callable( | |
590 | - | func view_reward ( | |
591 | - | let | |
592 | - | let | |
593 | - | let | |
594 | - | let | |
595 | - | throw(toString( | |
644 | + | @Callable(bI) | |
645 | + | func view_reward (ao) = { | |
646 | + | let bm = an(ao) | |
647 | + | let cl = ac(ap(ao), bm) | |
648 | + | let cm = ac(am(), bm) | |
649 | + | let cn = (cm - cl) | |
650 | + | throw(toString(cn)) | |
596 | 651 | } | |
597 | 652 | ||
598 | 653 | ||
599 | 654 | ||
600 | - | @Callable( | |
601 | - | func view_stakingReward ( | |
602 | - | let | |
603 | - | throw(toString( | |
655 | + | @Callable(bI) | |
656 | + | func view_stakingReward (ao) = { | |
657 | + | let bd = aZ(ao, 0)._3 | |
658 | + | throw(toString(V(bd))) | |
604 | 659 | } | |
605 | 660 | ||
606 | 661 | ||
607 | 662 | ||
608 | - | @Callable( | |
609 | - | func view_withdrawLimit ( | |
610 | - | let | |
611 | - | let | |
612 | - | throw(toString( | |
663 | + | @Callable(bI) | |
664 | + | func view_withdrawLimit (ao) = { | |
665 | + | let aM = aH(ao)._2 | |
666 | + | let co = V(ac(aM, am())) | |
667 | + | throw(toString(co)) | |
613 | 668 | } | |
614 | 669 | ||
615 | 670 | ||
616 | - | @Verifier( | |
617 | - | func | |
618 | - | let | |
619 | - | if (isDefined( | |
671 | + | @Verifier(cp) | |
672 | + | func cq () = { | |
673 | + | let cr = getString(this, v) | |
674 | + | if (isDefined(cr)) | |
620 | 675 | then { | |
621 | - | let | |
622 | - | if (isDefined( | |
623 | - | then valueOrElse(getBoolean(addressFromStringValue(value( | |
676 | + | let cs = getString(addressFromStringValue(value(cr)), z) | |
677 | + | if (isDefined(cs)) | |
678 | + | then valueOrElse(getBoolean(addressFromStringValue(value(cs)), ((("status_" + toString(this)) + "_") + toBase58String(cp.id))), false) | |
624 | 679 | else throw("unable to verify: admin not set in coordinator") | |
625 | 680 | } | |
626 | - | else sigVerify( | |
681 | + | else sigVerify(cp.bodyBytes, cp.proofs[0], cp.senderPublicKey) | |
627 | 682 | } | |
628 | 683 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "k_totalSupply" | |
5 | 5 | ||
6 | 6 | let b = "k_rewardBalance" | |
7 | 7 | ||
8 | 8 | let c = "k_lockedBalance" | |
9 | 9 | ||
10 | 10 | let d = "k_freeBalance" | |
11 | 11 | ||
12 | 12 | let e = "k_excessBalance" | |
13 | 13 | ||
14 | 14 | let f = "k_vaultAsset" | |
15 | 15 | ||
16 | 16 | let g = "k_vaultAssetDecimals" | |
17 | 17 | ||
18 | 18 | let h = "k_maxSpotUtilization" | |
19 | 19 | ||
20 | 20 | let i = "k_rate" | |
21 | 21 | ||
22 | 22 | let j = "k_lastUpdateTime" | |
23 | 23 | ||
24 | 24 | let k = "k_rewardPerTokenStored" | |
25 | 25 | ||
26 | 26 | let l = "k_rewardRate" | |
27 | 27 | ||
28 | 28 | let m = "k_periodFinish" | |
29 | 29 | ||
30 | 30 | let n = "k_userRewardPerToken" | |
31 | 31 | ||
32 | 32 | let o = "k_userReward" | |
33 | 33 | ||
34 | 34 | let p = "k_balance" | |
35 | 35 | ||
36 | 36 | let q = "k_average_rate" | |
37 | 37 | ||
38 | 38 | let r = "k_withdraw_limit" | |
39 | 39 | ||
40 | 40 | let s = "k_last_withdraw_date" | |
41 | 41 | ||
42 | 42 | let t = "k_withdraw_in_period" | |
43 | 43 | ||
44 | 44 | let u = "k_initialized" | |
45 | 45 | ||
46 | 46 | let v = "k_coordinatorAddress" | |
47 | 47 | ||
48 | 48 | let w = "k_amm" | |
49 | 49 | ||
50 | 50 | let x = "k_gov_asset" | |
51 | 51 | ||
52 | 52 | let y = "k_quote_asset" | |
53 | 53 | ||
54 | 54 | let z = "k_admin_address" | |
55 | 55 | ||
56 | 56 | let A = "k_manager_address" | |
57 | 57 | ||
58 | 58 | let B = "k_spot_address" | |
59 | 59 | ||
60 | 60 | let C = "k_collateral_address" | |
61 | 61 | ||
62 | 62 | func D (E,F) = ((E + "_") + F) | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func G () = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(this, v), "Coordinator not set")), "Coordinator address invalid") | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func H () = addressFromString(valueOrErrorMessage(getString(G(), z), "Admin address not set")) | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func I (F) = valueOrElse(getBoolean(G(), D(w, F)), false) | |
72 | 72 | ||
73 | 73 | ||
74 | - | func J () = | |
74 | + | func J () = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(G(), B), "Spot address not set")), "Spot address invalid") | |
75 | 75 | ||
76 | 76 | ||
77 | - | func K () = fromBase58String( | |
77 | + | func K () = fromBase58String(valueOrErrorMessage(getString(G(), x), "Governance asset not set")) | |
78 | 78 | ||
79 | 79 | ||
80 | - | func L () = | |
80 | + | func L () = fromBase58String(getStringValue(G(), y)) | |
81 | 81 | ||
82 | 82 | ||
83 | - | func M () = { | |
84 | - | let N = L() | |
85 | - | if ((N == "WAVES")) | |
83 | + | func M () = valueOrErrorMessage(getString(this, f), "Vault asset not set") | |
84 | + | ||
85 | + | ||
86 | + | func N () = { | |
87 | + | let O = M() | |
88 | + | if ((O == "WAVES")) | |
86 | 89 | then unit | |
87 | - | else fromBase58String( | |
90 | + | else fromBase58String(O) | |
88 | 91 | } | |
89 | 92 | ||
90 | 93 | ||
91 | - | func | |
94 | + | func P () = valueOrErrorMessage(getInteger(this, g), "Vault asset decimals not set") | |
92 | 95 | ||
93 | 96 | ||
94 | - | func | |
97 | + | func Q () = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(G(), A), "Manager address not set")), "Manager address invalid") | |
95 | 98 | ||
96 | 99 | ||
97 | - | let | |
100 | + | let R = (1 * (((((((10 * 10) * 10) * 10) * 10) * 10) * 10) * 10)) | |
98 | 101 | ||
99 | - | let | |
102 | + | let S = (((7 * 60) * 60) * 24) | |
100 | 103 | ||
101 | - | let | |
104 | + | let T = "" | |
102 | 105 | ||
103 | - | let | |
106 | + | let U = 0 | |
104 | 107 | ||
105 | - | func | |
106 | - | let | |
107 | - | if (( | |
108 | - | then ( | |
109 | - | else if (( | |
110 | - | then | |
108 | + | func V (W) = { | |
109 | + | let X = P() | |
110 | + | if ((X == 6)) | |
111 | + | then (W / 100) | |
112 | + | else if ((X == 8)) | |
113 | + | then W | |
111 | 114 | else throw("Invalid asset decimals") | |
112 | 115 | } | |
113 | 116 | ||
114 | 117 | ||
115 | - | func | |
116 | - | let | |
117 | - | if (( | |
118 | - | then ( | |
119 | - | else if (( | |
120 | - | then | |
118 | + | func Y (W) = { | |
119 | + | let X = P() | |
120 | + | if ((X == 6)) | |
121 | + | then (W * 100) | |
122 | + | else if ((X == 8)) | |
123 | + | then W | |
121 | 124 | else throw("Invalid asset decimals") | |
122 | 125 | } | |
123 | 126 | ||
124 | 127 | ||
125 | - | func | |
128 | + | func Z (aa,ab) = fraction(aa, R, ab, HALFEVEN) | |
126 | 129 | ||
127 | 130 | ||
128 | - | func | |
131 | + | func ac (aa,ab) = fraction(aa, ab, R, HALFEVEN) | |
129 | 132 | ||
130 | 133 | ||
131 | - | func | |
132 | - | then | |
133 | - | else -( | |
134 | + | func ad (aa) = if ((aa > 0)) | |
135 | + | then aa | |
136 | + | else -(aa) | |
134 | 137 | ||
135 | 138 | ||
136 | - | func | |
137 | - | then | |
138 | - | else | |
139 | + | func ae (aa,ab) = if ((aa > ab)) | |
140 | + | then ab | |
141 | + | else aa | |
139 | 142 | ||
140 | 143 | ||
141 | - | let | |
144 | + | let af = (86400 * 1000) | |
142 | 145 | ||
143 | - | let | |
146 | + | let ag = Z((1 * R), (4 * R)) | |
144 | 147 | ||
145 | - | func | |
148 | + | func ah (ai) = valueOrErrorMessage(getInteger(this, ai), ("no value for " + ai)) | |
146 | 149 | ||
147 | 150 | ||
148 | - | func | |
151 | + | func aj (ai) = valueOrElse(getInteger(this, ai), 0) | |
149 | 152 | ||
150 | 153 | ||
151 | - | func | |
154 | + | func ak (ai) = valueOrElse(getInteger(this, ai), R) | |
152 | 155 | ||
153 | 156 | ||
154 | - | func | |
157 | + | func al () = aj(a) | |
155 | 158 | ||
156 | 159 | ||
157 | - | func | |
160 | + | func am () = ak(i) | |
158 | 161 | ||
159 | 162 | ||
160 | - | func | |
163 | + | func an (ao) = aj(D(p, ao)) | |
161 | 164 | ||
162 | 165 | ||
163 | - | func | |
166 | + | func ap (ao) = aj(D(q, ao)) | |
164 | 167 | ||
165 | 168 | ||
166 | - | func | |
169 | + | func aq (ao) = aj(D(r, ao)) | |
167 | 170 | ||
168 | 171 | ||
169 | - | func | |
172 | + | func ar (ao) = aj(D(t, ao)) | |
170 | 173 | ||
171 | 174 | ||
172 | - | func | |
175 | + | func as (ao) = aj(D(s, ao)) | |
173 | 176 | ||
174 | 177 | ||
175 | - | func | |
178 | + | func at () = aj(d) | |
176 | 179 | ||
177 | 180 | ||
178 | - | func | |
181 | + | func au () = aj(c) | |
179 | 182 | ||
180 | 183 | ||
181 | - | func | |
184 | + | func av () = aj(e) | |
182 | 185 | ||
183 | 186 | ||
184 | - | func | |
187 | + | func aw () = aj(k) | |
185 | 188 | ||
186 | 189 | ||
187 | - | func | |
190 | + | func ax () = aj(j) | |
188 | 191 | ||
189 | 192 | ||
190 | - | func | |
193 | + | func ay () = aj(l) | |
191 | 194 | ||
192 | 195 | ||
193 | - | func | |
196 | + | func az () = aj(m) | |
194 | 197 | ||
195 | 198 | ||
196 | - | func | |
199 | + | func aA () = aj(b) | |
197 | 200 | ||
198 | 201 | ||
199 | - | func | |
202 | + | func aB (ao) = aj(D(o, ao)) | |
200 | 203 | ||
201 | 204 | ||
202 | - | func | |
205 | + | func aC (ao) = aj(D(n, ao)) | |
203 | 206 | ||
204 | 207 | ||
205 | - | func | |
208 | + | func aD () = aj(h) | |
206 | 209 | ||
207 | 210 | ||
208 | - | func | |
211 | + | func aE () = valueOrElse(getBoolean(this, u), false) | |
209 | 212 | ||
210 | 213 | ||
211 | - | func | |
214 | + | func aF () = lastBlock.timestamp | |
212 | 215 | ||
213 | 216 | ||
214 | - | func | |
217 | + | func aG () = (aF() / 1000) | |
215 | 218 | ||
216 | 219 | ||
217 | - | func | |
218 | - | let | |
219 | - | let | |
220 | - | let | |
221 | - | then $Tuple3( | |
222 | - | else $Tuple3( | |
223 | - | let | |
224 | - | let | |
225 | - | let | |
226 | - | $Tuple3( | |
220 | + | func aH (ao) = { | |
221 | + | let aI = aF() | |
222 | + | let aJ = as(ao) | |
223 | + | let aK = if (((aI - aJ) > af)) | |
224 | + | then $Tuple3(aI, aq(ao), 0) | |
225 | + | else $Tuple3(aJ, (aq(ao) - ar(ao)), ar(ao)) | |
226 | + | let aL = aK._1 | |
227 | + | let aM = aK._2 | |
228 | + | let aN = aK._3 | |
229 | + | $Tuple3(aL, aM, aN) | |
227 | 230 | } | |
228 | 231 | ||
229 | 232 | ||
230 | - | func | |
231 | - | let | |
232 | - | then | |
233 | - | else | |
234 | - | | |
233 | + | func aO (aP) = { | |
234 | + | let aQ = if ((al() > 0)) | |
235 | + | then Z((at() + aP), al()) | |
236 | + | else R | |
237 | + | aQ | |
235 | 238 | } | |
236 | 239 | ||
237 | 240 | ||
238 | - | func | |
241 | + | func aR () = ae(aG(), az()) | |
239 | 242 | ||
240 | 243 | ||
241 | - | func | |
242 | - | then | |
244 | + | func aS (aT) = if (((al() + aT) == 0)) | |
245 | + | then aw() | |
243 | 246 | else { | |
244 | - | let | |
245 | - | let | |
247 | + | let aU = (aR() - ax()) | |
248 | + | let aV = if ((0 > aU)) | |
246 | 249 | then 0 | |
247 | - | else | |
248 | - | let | |
249 | - | ( | |
250 | + | else aU | |
251 | + | let aW = Z((ay() * aV), (al() + aT)) | |
252 | + | (aw() + aW) | |
250 | 253 | } | |
251 | 254 | ||
252 | 255 | ||
253 | - | func | |
254 | - | let | |
255 | - | ( | |
256 | + | func aX (ao,aT) = { | |
257 | + | let aY = (aS(aT) - aC(ao)) | |
258 | + | (ac((an(ao) + aT), aY) + aB(ao)) | |
256 | 259 | } | |
257 | 260 | ||
258 | 261 | ||
259 | - | func | |
260 | - | let | |
261 | - | let | |
262 | - | let | |
263 | - | then $Tuple2( | |
262 | + | func aZ (ao,aT) = { | |
263 | + | let ba = aS(aT) | |
264 | + | let bb = aG() | |
265 | + | let bc = if ((ao != "")) | |
266 | + | then $Tuple2(aX(ao, aT), ba) | |
264 | 267 | else $Tuple2(0, 0) | |
265 | - | let | |
266 | - | let | |
267 | - | $Tuple4( | |
268 | + | let bd = bc._1 | |
269 | + | let be = bc._2 | |
270 | + | $Tuple4(ba, bb, bd, be) | |
268 | 271 | } | |
269 | 272 | ||
270 | 273 | ||
271 | - | func | |
272 | - | then [IntegerEntry(D(p, | |
273 | - | else throw(((("Vault: can not update user balance. Balance: " + toString( | |
274 | + | func bf (bg,bh) = if (((an(bg) + bh) >= 0)) | |
275 | + | then [IntegerEntry(D(p, bg), (an(bg) + bh))] | |
276 | + | else throw(((("Vault: can not update user balance. Balance: " + toString(an(bg))) + " change: ") + toString(bh))) | |
274 | 277 | ||
275 | 278 | ||
276 | - | func | |
279 | + | func bi (bg,bj) = [IntegerEntry(D(r, bg), bj)] | |
277 | 280 | ||
278 | 281 | ||
279 | - | func | |
282 | + | func bk (bg,bj) = [IntegerEntry(D(q, bg), bj)] | |
280 | 283 | ||
281 | 284 | ||
282 | - | func | |
283 | - | let | |
284 | - | if ((( | |
285 | - | then [IntegerEntry(d, ( | |
286 | - | else throw(((("Vault: can not update free balance. Balance: " + toString( | |
285 | + | func bl (bh) = { | |
286 | + | let bm = at() | |
287 | + | if (((bm + bh) >= 0)) | |
288 | + | then [IntegerEntry(d, (bm + bh))] | |
289 | + | else throw(((("Vault: can not update free balance. Balance: " + toString(bm)) + " change: ") + toString(bh))) | |
287 | 290 | } | |
288 | 291 | ||
289 | 292 | ||
290 | - | func | |
291 | - | let | |
292 | - | if ((( | |
293 | - | then [IntegerEntry(c, ( | |
294 | - | else throw(((("Vault: can not update locked balance. Balance: " + toString( | |
293 | + | func bn (bh) = { | |
294 | + | let bm = au() | |
295 | + | if (((bm + bh) >= 0)) | |
296 | + | then [IntegerEntry(c, (bm + bh))] | |
297 | + | else throw(((("Vault: can not update locked balance. Balance: " + toString(bm)) + " change: ") + toString(bh))) | |
295 | 298 | } | |
296 | 299 | ||
297 | 300 | ||
298 | - | func | |
299 | - | let | |
300 | - | let | |
301 | - | if (( | |
302 | - | then [IntegerEntry(e, | |
303 | - | else throw(((((((("Vault: can not update excess balance. Balance: " + toString( | |
301 | + | func bo (bh) = { | |
302 | + | let bp = (av() + bh) | |
303 | + | let bq = Z(ad(bp), at()) | |
304 | + | if ((aD() > bq)) | |
305 | + | then [IntegerEntry(e, bp)] | |
306 | + | else throw(((((((("Vault: can not update excess balance. Balance: " + toString(av())) + " change: ") + toString(bh)) + " utilization rate: ") + toString(bq)) + " max utilization rate: ") + toString(aD()))) | |
304 | 307 | } | |
305 | 308 | ||
306 | 309 | ||
307 | - | func | |
310 | + | func br (bh) = [IntegerEntry(a, (al() + bh))] | |
308 | 311 | ||
309 | 312 | ||
310 | - | func | |
313 | + | func bs (bj) = [IntegerEntry(i, bj)] | |
311 | 314 | ||
312 | 315 | ||
313 | - | func | |
316 | + | func bt (bg,bu,bv) = [IntegerEntry(D(s, bg), bu), IntegerEntry(D(t, bg), bv)] | |
314 | 317 | ||
315 | 318 | ||
316 | - | func | |
319 | + | func bw (bx) = [IntegerEntry(b, (aA() + bx))] | |
317 | 320 | ||
318 | 321 | ||
319 | - | func | |
322 | + | func by (bz) = [IntegerEntry(l, bz)] | |
320 | 323 | ||
321 | 324 | ||
322 | - | func | |
325 | + | func bA (bB,bC) = [IntegerEntry(j, bB), IntegerEntry(m, bC)] | |
323 | 326 | ||
324 | 327 | ||
325 | - | func | |
328 | + | func bD (bE) = [IntegerEntry(k, bE)] | |
326 | 329 | ||
327 | 330 | ||
328 | - | func | |
331 | + | func bF (ao,bG,bH) = [IntegerEntry(D(o, ao), bG), IntegerEntry(D(n, ao), bH)] | |
329 | 332 | ||
330 | 333 | ||
331 | - | @Callable( | |
332 | - | func migrate () = if (( | |
334 | + | @Callable(bI) | |
335 | + | func migrate () = if ((bI.caller != H())) | |
333 | 336 | then throw("Invalid migrate parameters") | |
334 | 337 | else { | |
335 | - | let | |
336 | - | let | |
338 | + | let bJ = toBase58String(L()) | |
339 | + | let X = if ((bJ == "WAVES")) | |
337 | 340 | then 8 | |
338 | 341 | else { | |
339 | - | let | |
340 | - | | |
342 | + | let bK = valueOrErrorMessage(assetInfo(fromBase58String(bJ)), ("Invalid token id: " + bJ)) | |
343 | + | bK.decimals | |
341 | 344 | } | |
342 | - | [StringEntry(f, | |
345 | + | [StringEntry(f, bJ), IntegerEntry(g, X), IntegerEntry(h, 0)] | |
343 | 346 | } | |
344 | 347 | ||
345 | 348 | ||
346 | 349 | ||
347 | - | @Callable( | |
348 | - | func initialize ( | |
350 | + | @Callable(bI) | |
351 | + | func initialize (bL,bJ,bM) = if (if (if (if (aE()) | |
349 | 352 | then true | |
350 | - | else ( | |
353 | + | else (bI.caller != this)) | |
351 | 354 | then true | |
352 | - | else (0 > | |
355 | + | else (0 > bM)) | |
353 | 356 | then true | |
354 | - | else ( | |
357 | + | else (bM > R)) | |
355 | 358 | then throw("Unable to initialize") | |
356 | 359 | else { | |
357 | - | let | |
360 | + | let X = if ((bJ == "WAVES")) | |
358 | 361 | then 8 | |
359 | 362 | else { | |
360 | - | let | |
361 | - | | |
363 | + | let bK = valueOrErrorMessage(assetInfo(fromBase58String(bJ)), ("Invalid token id: " + bJ)) | |
364 | + | bK.decimals | |
362 | 365 | } | |
363 | - | [StringEntry(v, toString(valueOrErrorMessage(addressFromString( | |
366 | + | [StringEntry(v, toString(valueOrErrorMessage(addressFromString(bL), "Invalid coordinator address"))), StringEntry(f, bJ), IntegerEntry(g, X), IntegerEntry(h, bM), BooleanEntry(u, true)] | |
364 | 367 | } | |
365 | 368 | ||
366 | 369 | ||
367 | 370 | ||
368 | - | @Callable( | |
371 | + | @Callable(bI) | |
369 | 372 | func stake () = { | |
370 | - | let | |
371 | - | let | |
372 | - | if (if (if (( | |
373 | + | let ao = toString(bI.caller) | |
374 | + | let W = Y(bI.payments[0].amount) | |
375 | + | if (if (if ((bI.payments[0].assetId != N())) | |
373 | 376 | then true | |
374 | - | else (size( | |
377 | + | else (size(bI.payments) != 1)) | |
375 | 378 | then true | |
376 | - | else !( | |
379 | + | else !(aE())) | |
377 | 380 | then throw("Invalid call to stake") | |
378 | 381 | else { | |
379 | - | let bM = aY(an, 0) | |
380 | - | let aZ = bM._1 | |
381 | - | let ba = bM._2 | |
382 | - | let bc = bM._3 | |
383 | - | let bd = bM._4 | |
384 | - | let bN = al() | |
385 | - | let bO = ao(an) | |
386 | - | let bP = Y(V, bN) | |
387 | - | let bQ = Y((ab(bP, bN) + ab(am(an), bO)), (bP + am(an))) | |
388 | - | let bR = (bP + am(an)) | |
389 | - | let bS = ab(bR, af) | |
390 | - | let bT = invoke(P(), "deposit", nil, [AttachedPayment(M(), U(V))]) | |
391 | - | if ((bT == bT)) | |
392 | - | then (((((((bE(an, bc, bd) ++ bC(aZ)) ++ bz(ba, ay())) ++ bk(V)) ++ be(an, bP)) ++ bj(an, bQ)) ++ bh(an, bS)) ++ bq(bP)) | |
382 | + | let bN = aZ(ao, 0) | |
383 | + | let ba = bN._1 | |
384 | + | let bb = bN._2 | |
385 | + | let bd = bN._3 | |
386 | + | let be = bN._4 | |
387 | + | let bO = am() | |
388 | + | let bP = ap(ao) | |
389 | + | let bQ = Z(W, bO) | |
390 | + | let bR = Z((ac(bQ, bO) + ac(an(ao), bP)), (bQ + an(ao))) | |
391 | + | let bS = (bQ + an(ao)) | |
392 | + | let bT = ac(bS, ag) | |
393 | + | let bU = invoke(Q(), "deposit", nil, [AttachedPayment(N(), V(W))]) | |
394 | + | if ((bU == bU)) | |
395 | + | then { | |
396 | + | let bV = invoke(J(), "notifyVaultBalanceChange", [M(), W], nil) | |
397 | + | if ((bV == bV)) | |
398 | + | then (((((((bF(ao, bd, be) ++ bD(ba)) ++ bA(bb, az())) ++ bl(W)) ++ bf(ao, bQ)) ++ bk(ao, bR)) ++ bi(ao, bT)) ++ br(bQ)) | |
399 | + | else throw("Strict value is not equal to itself.") | |
400 | + | } | |
393 | 401 | else throw("Strict value is not equal to itself.") | |
394 | 402 | } | |
395 | 403 | } | |
396 | 404 | ||
397 | 405 | ||
398 | 406 | ||
399 | - | @Callable( | |
400 | - | func unStake ( | |
401 | - | let | |
402 | - | let | |
403 | - | if (if (if (( | |
407 | + | @Callable(bI) | |
408 | + | func unStake (W) = { | |
409 | + | let ao = toString(bI.caller) | |
410 | + | let bW = Y(W) | |
411 | + | if (if (if ((bI.payments != nil)) | |
404 | 412 | then true | |
405 | - | else (0 >= | |
413 | + | else (0 >= bW)) | |
406 | 414 | then true | |
407 | - | else !( | |
415 | + | else !(aE())) | |
408 | 416 | then throw("Invalid call to unStake") | |
409 | 417 | else { | |
410 | - | let | |
411 | - | let | |
412 | - | let | |
413 | - | let | |
414 | - | let | |
415 | - | let | |
416 | - | let | |
417 | - | let | |
418 | - | let | |
419 | - | let | |
420 | - | if (( | |
418 | + | let bX = aZ(ao, 0) | |
419 | + | let ba = bX._1 | |
420 | + | let bb = bX._2 | |
421 | + | let bd = bX._3 | |
422 | + | let be = bX._4 | |
423 | + | let bY = aH(ao) | |
424 | + | let aL = bY._1 | |
425 | + | let aM = bY._2 | |
426 | + | let aN = bY._3 | |
427 | + | let bQ = Z(bW, am()) | |
428 | + | if ((bQ > aM)) | |
421 | 429 | then throw("Invalid call to unStake: withdraw over limit") | |
422 | 430 | else { | |
423 | - | let | |
424 | - | if (( | |
431 | + | let bZ = (aN + bQ) | |
432 | + | if ((bW > at())) | |
425 | 433 | then throw("Invalid call to unStake: balance too low") | |
426 | 434 | else { | |
427 | - | let bY = invoke(P(), "withdraw", [L(), U(bU)], nil) | |
428 | - | if ((bY == bY)) | |
429 | - | then (((((((bE(an, bc, bd) ++ bC(aZ)) ++ bz(ba, ay())) ++ bk(-(bU))) ++ be(an, -(bP))) ++ bq(-(bP))) ++ bs(an, aK, bX)) ++ [ScriptTransfer(bH.caller, U(bU), M())]) | |
435 | + | let ca = invoke(Q(), "withdraw", [M(), V(bW)], nil) | |
436 | + | if ((ca == ca)) | |
437 | + | then { | |
438 | + | let bV = invoke(J(), "notifyVaultBalanceChange", [M(), -(bW)], nil) | |
439 | + | if ((bV == bV)) | |
440 | + | then (((((((bF(ao, bd, be) ++ bD(ba)) ++ bA(bb, az())) ++ bl(-(bW))) ++ bf(ao, -(bQ))) ++ br(-(bQ))) ++ bt(ao, aL, bZ)) ++ [ScriptTransfer(bI.caller, V(bW), N())]) | |
441 | + | else throw("Strict value is not equal to itself.") | |
442 | + | } | |
430 | 443 | else throw("Strict value is not equal to itself.") | |
431 | 444 | } | |
432 | 445 | } | |
433 | 446 | } | |
434 | 447 | } | |
435 | 448 | ||
436 | 449 | ||
437 | 450 | ||
438 | - | @Callable( | |
451 | + | @Callable(bI) | |
439 | 452 | func withdrawRewards () = { | |
440 | - | let | |
441 | - | let | |
442 | - | let | |
443 | - | let | |
444 | - | let | |
445 | - | let | |
446 | - | if (if ((0 >= | |
453 | + | let ao = toString(bI.caller) | |
454 | + | let cb = aZ(ao, 0) | |
455 | + | let ba = cb._1 | |
456 | + | let bb = cb._2 | |
457 | + | let bd = cb._3 | |
458 | + | let be = cb._4 | |
459 | + | if (if ((0 >= bd)) | |
447 | 460 | then true | |
448 | - | else !( | |
461 | + | else !(aE())) | |
449 | 462 | then throw("No reward: Vault") | |
450 | - | else (((( | |
463 | + | else ((((bF(ao, 0, be) ++ bD(ba)) ++ bA(bb, az())) ++ bw(-(bd))) ++ [ScriptTransfer(bI.caller, bd, K())]) | |
451 | 464 | } | |
452 | 465 | ||
453 | 466 | ||
454 | 467 | ||
455 | - | @Callable( | |
468 | + | @Callable(bI) | |
456 | 469 | func addFree () = { | |
457 | - | let | |
458 | - | if (if (if (if (( | |
470 | + | let W = Y(bI.payments[0].amount) | |
471 | + | if (if (if (if ((bI.payments[0].assetId != N())) | |
459 | 472 | then true | |
460 | - | else (size( | |
473 | + | else (size(bI.payments) != 1)) | |
461 | 474 | then true | |
462 | - | else !( | |
475 | + | else !(aE())) | |
463 | 476 | then true | |
464 | - | else !(if (I(toString( | |
477 | + | else !(if (if (I(toString(bI.caller))) | |
465 | 478 | then true | |
466 | - | else (bH.caller == H()))) | |
479 | + | else (bI.caller == J())) | |
480 | + | then true | |
481 | + | else (bI.caller == H()))) | |
467 | 482 | then throw("Invalid addFree params") | |
468 | 483 | else { | |
469 | - | let | |
470 | - | let | |
471 | - | if (( | |
472 | - | then ( | |
484 | + | let aQ = aO(W) | |
485 | + | let bU = invoke(Q(), "deposit", nil, [AttachedPayment(N(), V(W))]) | |
486 | + | if ((bU == bU)) | |
487 | + | then (bl(W) ++ bs(aQ)) | |
473 | 488 | else throw("Strict value is not equal to itself.") | |
474 | 489 | } | |
475 | 490 | } | |
476 | 491 | ||
477 | 492 | ||
478 | 493 | ||
479 | - | @Callable( | |
494 | + | @Callable(bI) | |
480 | 495 | func addLocked () = { | |
481 | - | let | |
482 | - | if (if (if (if (( | |
496 | + | let W = Y(bI.payments[0].amount) | |
497 | + | if (if (if (if ((bI.payments[0].assetId != N())) | |
483 | 498 | then true | |
484 | - | else (size( | |
499 | + | else (size(bI.payments) != 1)) | |
485 | 500 | then true | |
486 | - | else !( | |
501 | + | else !(aE())) | |
487 | 502 | then true | |
488 | - | else !(if (I(toString( | |
503 | + | else !(if (I(toString(bI.caller))) | |
489 | 504 | then true | |
490 | - | else ( | |
505 | + | else (bI.caller == H()))) | |
491 | 506 | then throw("Invalid addLocked params") | |
492 | 507 | else { | |
493 | - | let | |
494 | - | if (( | |
495 | - | then | |
508 | + | let ca = invoke(Q(), "deposit", nil, [AttachedPayment(N(), V(W))]) | |
509 | + | if ((ca == ca)) | |
510 | + | then bn(W) | |
496 | 511 | else throw("Strict value is not equal to itself.") | |
497 | 512 | } | |
498 | 513 | } | |
499 | 514 | ||
500 | 515 | ||
501 | 516 | ||
502 | - | @Callable( | |
503 | - | func exchangeFreeAndLocked ( | |
517 | + | @Callable(bI) | |
518 | + | func exchangeFreeAndLocked (W) = if (if (!(aE())) | |
504 | 519 | then true | |
505 | - | else if (!(I(toString( | |
506 | - | then ( | |
520 | + | else if (!(I(toString(bI.caller)))) | |
521 | + | then (bI.caller != H()) | |
507 | 522 | else false) | |
508 | 523 | then throw("Invalid exchangeFreeAndLocked params") | |
509 | 524 | else { | |
510 | - | let | |
511 | - | let | |
512 | - | (( | |
525 | + | let bW = Y(W) | |
526 | + | let aQ = aO(-(bW)) | |
527 | + | ((bn(bW) ++ bl(-(bW))) ++ bs(aQ)) | |
513 | 528 | } | |
514 | 529 | ||
515 | 530 | ||
516 | 531 | ||
517 | - | @Callable( | |
518 | - | func withdrawLocked ( | |
532 | + | @Callable(bI) | |
533 | + | func withdrawLocked (W) = if (if (if (!(aE())) | |
519 | 534 | then true | |
520 | - | else (0 >= | |
535 | + | else (0 >= W)) | |
521 | 536 | then true | |
522 | - | else !(I(toString( | |
537 | + | else !(I(toString(bI.caller)))) | |
523 | 538 | then throw("Invalid withdrawLocked params") | |
524 | 539 | else { | |
525 | - | let | |
526 | - | let | |
527 | - | if (( | |
528 | - | then ( | |
540 | + | let bW = Y(W) | |
541 | + | let ca = invoke(Q(), "withdraw", [M(), V(bW)], nil) | |
542 | + | if ((ca == ca)) | |
543 | + | then (bn(-(bW)) ++ [ScriptTransfer(bI.caller, V(bW), N())]) | |
529 | 544 | else throw("Strict value is not equal to itself.") | |
530 | 545 | } | |
531 | 546 | ||
532 | 547 | ||
533 | 548 | ||
534 | - | @Callable( | |
535 | - | func | |
549 | + | @Callable(bI) | |
550 | + | func borrow (W) = if (if (if (!(aE())) | |
536 | 551 | then true | |
537 | - | else ( | |
552 | + | else (0 >= W)) | |
538 | 553 | then true | |
539 | - | else !( | |
540 | - | then throw("Invalid | |
554 | + | else !((bI.caller == J()))) | |
555 | + | then throw("Invalid borrow params") | |
541 | 556 | else { | |
542 | - | let bF = bH.payments[0].amount | |
543 | - | let aZ = aY(S, T)._1 | |
544 | - | let ca = aF() | |
545 | - | let cb = if ((ca > ay())) | |
546 | - | then (bF / R) | |
547 | - | else { | |
548 | - | let cc = (ay() - ca) | |
549 | - | let cd = (ax() * cc) | |
550 | - | ((bF + cd) / R) | |
551 | - | } | |
552 | - | (((bx(cb) ++ bC(aZ)) ++ bv(bF)) ++ bz(ca, (ca + R))) | |
557 | + | let bW = Y(W) | |
558 | + | let ca = invoke(Q(), "withdraw", [M(), V(bW)], nil) | |
559 | + | if ((ca == ca)) | |
560 | + | then (bo(-(bW)) ++ [ScriptTransfer(bI.caller, V(bW), N())]) | |
561 | + | else throw("Strict value is not equal to itself.") | |
553 | 562 | } | |
554 | 563 | ||
555 | 564 | ||
556 | 565 | ||
557 | - | @Callable(bH) | |
566 | + | @Callable(bI) | |
567 | + | func repay () = { | |
568 | + | let W = Y(bI.payments[0].amount) | |
569 | + | if (if (if (if ((bI.payments[0].assetId != N())) | |
570 | + | then true | |
571 | + | else (size(bI.payments) != 1)) | |
572 | + | then true | |
573 | + | else !(aE())) | |
574 | + | then true | |
575 | + | else !(if ((bI.caller == J())) | |
576 | + | then true | |
577 | + | else (bI.caller == H()))) | |
578 | + | then throw("Invalid repay params") | |
579 | + | else { | |
580 | + | let ca = invoke(Q(), "deposit", nil, [AttachedPayment(N(), V(W))]) | |
581 | + | if ((ca == ca)) | |
582 | + | then bo(W) | |
583 | + | else throw("Strict value is not equal to itself.") | |
584 | + | } | |
585 | + | } | |
586 | + | ||
587 | + | ||
588 | + | ||
589 | + | @Callable(bI) | |
590 | + | func addRewards () = if (if (if ((bI.payments[0].assetId != K())) | |
591 | + | then true | |
592 | + | else (size(bI.payments) != 1)) | |
593 | + | then true | |
594 | + | else !(aE())) | |
595 | + | then throw("Invalid addRewards params") | |
596 | + | else { | |
597 | + | let bG = bI.payments[0].amount | |
598 | + | let ba = aZ(T, U)._1 | |
599 | + | let cc = aG() | |
600 | + | let cd = if ((cc > az())) | |
601 | + | then (bG / S) | |
602 | + | else { | |
603 | + | let ce = (az() - cc) | |
604 | + | let cf = (ay() * ce) | |
605 | + | ((bG + cf) / S) | |
606 | + | } | |
607 | + | (((by(cd) ++ bD(ba)) ++ bw(bG)) ++ bA(cc, (cc + S))) | |
608 | + | } | |
609 | + | ||
610 | + | ||
611 | + | ||
612 | + | @Callable(bI) | |
558 | 613 | func ackRewards () = { | |
559 | - | let | |
560 | - | if (( | |
614 | + | let cg = invoke(Q(), "claimProfit", [M()], nil) | |
615 | + | if ((cg == cg)) | |
561 | 616 | then { | |
562 | - | let | |
563 | - | let | |
564 | - | if ($isInstanceOf( | |
617 | + | let ch = { | |
618 | + | let ci = cg | |
619 | + | if ($isInstanceOf(ci, "Int")) | |
565 | 620 | then { | |
566 | - | let | |
567 | - | | |
621 | + | let cj = ci | |
622 | + | Y(cj) | |
568 | 623 | } | |
569 | 624 | else throw("Invalid claimProfit response") | |
570 | 625 | } | |
571 | - | let | |
626 | + | let ck = if ((ch > 0)) | |
572 | 627 | then { | |
573 | - | let | |
574 | - | let | |
575 | - | if (( | |
576 | - | then ( | |
628 | + | let aQ = aO(ch) | |
629 | + | let bU = invoke(Q(), "deposit", nil, [AttachedPayment(N(), V(ch))]) | |
630 | + | if ((bU == bU)) | |
631 | + | then (bl(ch) ++ bs(aQ)) | |
577 | 632 | else throw("Strict value is not equal to itself.") | |
578 | 633 | } | |
579 | 634 | else nil | |
580 | - | if (( | |
581 | - | then | |
635 | + | if ((ck == ck)) | |
636 | + | then ck | |
582 | 637 | else throw("Strict value is not equal to itself.") | |
583 | 638 | } | |
584 | 639 | else throw("Strict value is not equal to itself.") | |
585 | 640 | } | |
586 | 641 | ||
587 | 642 | ||
588 | 643 | ||
589 | - | @Callable( | |
590 | - | func view_reward ( | |
591 | - | let | |
592 | - | let | |
593 | - | let | |
594 | - | let | |
595 | - | throw(toString( | |
644 | + | @Callable(bI) | |
645 | + | func view_reward (ao) = { | |
646 | + | let bm = an(ao) | |
647 | + | let cl = ac(ap(ao), bm) | |
648 | + | let cm = ac(am(), bm) | |
649 | + | let cn = (cm - cl) | |
650 | + | throw(toString(cn)) | |
596 | 651 | } | |
597 | 652 | ||
598 | 653 | ||
599 | 654 | ||
600 | - | @Callable( | |
601 | - | func view_stakingReward ( | |
602 | - | let | |
603 | - | throw(toString( | |
655 | + | @Callable(bI) | |
656 | + | func view_stakingReward (ao) = { | |
657 | + | let bd = aZ(ao, 0)._3 | |
658 | + | throw(toString(V(bd))) | |
604 | 659 | } | |
605 | 660 | ||
606 | 661 | ||
607 | 662 | ||
608 | - | @Callable( | |
609 | - | func view_withdrawLimit ( | |
610 | - | let | |
611 | - | let | |
612 | - | throw(toString( | |
663 | + | @Callable(bI) | |
664 | + | func view_withdrawLimit (ao) = { | |
665 | + | let aM = aH(ao)._2 | |
666 | + | let co = V(ac(aM, am())) | |
667 | + | throw(toString(co)) | |
613 | 668 | } | |
614 | 669 | ||
615 | 670 | ||
616 | - | @Verifier( | |
617 | - | func | |
618 | - | let | |
619 | - | if (isDefined( | |
671 | + | @Verifier(cp) | |
672 | + | func cq () = { | |
673 | + | let cr = getString(this, v) | |
674 | + | if (isDefined(cr)) | |
620 | 675 | then { | |
621 | - | let | |
622 | - | if (isDefined( | |
623 | - | then valueOrElse(getBoolean(addressFromStringValue(value( | |
676 | + | let cs = getString(addressFromStringValue(value(cr)), z) | |
677 | + | if (isDefined(cs)) | |
678 | + | then valueOrElse(getBoolean(addressFromStringValue(value(cs)), ((("status_" + toString(this)) + "_") + toBase58String(cp.id))), false) | |
624 | 679 | else throw("unable to verify: admin not set in coordinator") | |
625 | 680 | } | |
626 | - | else sigVerify( | |
681 | + | else sigVerify(cp.bodyBytes, cp.proofs[0], cp.senderPublicKey) | |
627 | 682 | } | |
628 | 683 |
github/deemru/w8io/03bedc9 192.14 ms ◑![]()