tx · FZp5a9PRkYdVhgjhRfcvwv41SP13UBuFmCXvLzmkHT92 3N4QWZXfZqNf284CJVbtxzCerqARoALxJEy: -0.03700000 Waves 2022.10.06 10:42 [2260170] smart account 3N4QWZXfZqNf284CJVbtxzCerqARoALxJEy > SELF 0.00000000 Waves
{ "type": 13, "id": "FZp5a9PRkYdVhgjhRfcvwv41SP13UBuFmCXvLzmkHT92", "fee": 3700000, "feeAssetId": null, "timestamp": 1665042161809, "version": 2, "chainId": 84, "sender": "3N4QWZXfZqNf284CJVbtxzCerqARoALxJEy", "senderPublicKey": "GzEvTfwa3251fRwyTL99QzUmkDGBdn4cNr2mR6XQ1UmR", "proofs": [ "2VrxujthqFidNLfVQXajbKpiJSPrv6R94B9ZsCbi4i5XVxW8cS3q1NCTxp9FJhpUvb6v3mQ2BsrSHgrdzhiHWihG" ], "script": "base64:BgIgCAISAwoBCBIAEgMKAQESABIAEgASAwoBCBIDCgEIEgA2AA1rX3RvdGFsU3VwcGx5Ag1rX3RvdGFsU3VwcGx5AA9rX3Jld2FyZEJhbGFuY2UCD2tfcmV3YXJkQmFsYW5jZQAQa19sYXN0VXBkYXRlVGltZQIQa19sYXN0VXBkYXRlVGltZQAWa19yZXdhcmRQZXJUb2tlblN0b3JlZAIWa19yZXdhcmRQZXJUb2tlblN0b3JlZAAMa19yZXdhcmRSYXRlAgxrX3Jld2FyZFJhdGUADmtfcGVyaW9kRmluaXNoAg5rX3BlcmlvZEZpbmlzaAAJa19iYWxhbmNlAglrX2JhbGFuY2UAFGtfdXNlclJld2FyZFBlclRva2VuAhRrX3VzZXJSZXdhcmRQZXJUb2tlbgAMa191c2VyUmV3YXJkAgxrX3VzZXJSZXdhcmQADWtfaW5pdGlhbGl6ZWQCDWtfaW5pdGlhbGl6ZWQAFGtfY29vcmRpbmF0b3JBZGRyZXNzAhRrX2Nvb3JkaW5hdG9yQWRkcmVzcwASa19nb3Zlcm5hbmNlX2Fzc2V0AgtrX2dvdl9hc3NldAANa19xdW90Z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5hZG1pblB1YmxpY0tleQBsPlOF", "height": 2260170, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AZfJwranHSXKucjoToZXrfqpxi7VyY46kqZXSp8sFwUu Next: Fg769VxgVGD1eyQm9t5TBbnuSWeEnEkQsDSpstSqGSZZ Diff:
Old | New | Differences | |
---|---|---|---|
29 | 29 | ||
30 | 30 | let n = "k_admin_public_key" | |
31 | 31 | ||
32 | - | func o () = valueOrErrorMessage(addressFromString(getStringValue(this, k)), "Coordinator not set") | |
32 | + | let o = "k_manager_address" | |
33 | + | ||
34 | + | func p () = valueOrErrorMessage(addressFromString(getStringValue(this, k)), "Coordinator not set") | |
33 | 35 | ||
34 | 36 | ||
35 | - | func | |
37 | + | func q () = fromBase58String(getStringValue(p(), n)) | |
36 | 38 | ||
37 | 39 | ||
38 | - | func | |
40 | + | func r () = fromBase58String(getStringValue(p(), l)) | |
39 | 41 | ||
40 | 42 | ||
41 | - | func | |
43 | + | func s () = fromBase58String(getStringValue(p(), m)) | |
42 | 44 | ||
43 | 45 | ||
44 | - | let s = (1 * (((((((10 * 10) * 10) * 10) * 10) * 10) * 10) * 10)) | |
45 | - | ||
46 | - | let t = ((60 * 60) * 24) | |
47 | - | ||
48 | - | let u = "" | |
49 | - | ||
50 | - | let v = 0 | |
51 | - | ||
52 | - | func w (x) = (x / 100) | |
46 | + | func t () = valueOrErrorMessage(addressFromString(getStringValue(p(), o)), "Manager not set") | |
53 | 47 | ||
54 | 48 | ||
55 | - | func y (x) = (x * 100) | |
49 | + | let u = (1 * (((((((10 * 10) * 10) * 10) * 10) * 10) * 10) * 10)) | |
50 | + | ||
51 | + | let v = ((60 * 60) * 24) | |
52 | + | ||
53 | + | let w = "" | |
54 | + | ||
55 | + | let x = 0 | |
56 | + | ||
57 | + | func y (z) = (z / 100) | |
56 | 58 | ||
57 | 59 | ||
58 | - | func | |
60 | + | func A (z) = (z * 100) | |
59 | 61 | ||
60 | 62 | ||
61 | - | func | |
63 | + | func B (C,D) = fraction(C, u, D, HALFEVEN) | |
62 | 64 | ||
63 | 65 | ||
64 | - | func D (A) = if ((A > 0)) | |
65 | - | then A | |
66 | - | else -(A) | |
66 | + | func E (C,D) = fraction(C, D, u, HALFEVEN) | |
67 | 67 | ||
68 | 68 | ||
69 | - | func | |
70 | - | then | |
71 | - | else | |
69 | + | func F (C) = if ((C > 0)) | |
70 | + | then C | |
71 | + | else -(C) | |
72 | 72 | ||
73 | 73 | ||
74 | - | func F (G,H) = ((G + "_") + H) | |
74 | + | func G (C,D) = if ((C > D)) | |
75 | + | then D | |
76 | + | else C | |
75 | 77 | ||
76 | 78 | ||
77 | - | func | |
79 | + | func H (I,J) = ((I + "_") + J) | |
78 | 80 | ||
79 | 81 | ||
80 | - | func K ( | |
82 | + | func K (L) = valueOrErrorMessage(getInteger(this, L), ("no value for " + L)) | |
81 | 83 | ||
82 | 84 | ||
83 | - | func | |
85 | + | func M (L) = valueOrElse(getInteger(this, L), 0) | |
84 | 86 | ||
85 | 87 | ||
86 | - | func | |
88 | + | func N () = M(a) | |
87 | 89 | ||
88 | 90 | ||
89 | - | func | |
91 | + | func O () = M(d) | |
90 | 92 | ||
91 | 93 | ||
92 | - | func | |
94 | + | func P () = M(c) | |
93 | 95 | ||
94 | 96 | ||
95 | - | func | |
97 | + | func Q () = M(e) | |
96 | 98 | ||
97 | 99 | ||
98 | - | func | |
100 | + | func R () = M(f) | |
99 | 101 | ||
100 | 102 | ||
101 | - | func | |
103 | + | func S () = M(b) | |
102 | 104 | ||
103 | 105 | ||
104 | - | func T ( | |
106 | + | func T (U) = M(H(i, U)) | |
105 | 107 | ||
106 | 108 | ||
107 | - | func | |
109 | + | func V (U) = M(H(h, U)) | |
108 | 110 | ||
109 | 111 | ||
110 | - | func | |
112 | + | func W (U) = M(H(g, U)) | |
111 | 113 | ||
112 | 114 | ||
113 | - | func | |
115 | + | func X () = valueOrElse(getBoolean(this, j), false) | |
114 | 116 | ||
115 | 117 | ||
116 | - | func Y (Z) = [IntegerEntry( | |
118 | + | func Y (Z) = [IntegerEntry(b, (S() + Z))] | |
117 | 119 | ||
118 | 120 | ||
119 | - | func aa (ab | |
121 | + | func aa (ab) = [IntegerEntry(e, ab)] | |
120 | 122 | ||
121 | 123 | ||
122 | - | func | |
124 | + | func ac (ad,ae) = [IntegerEntry(c, ad), IntegerEntry(f, ae)] | |
123 | 125 | ||
124 | 126 | ||
125 | - | func af ( | |
127 | + | func af (ag) = [IntegerEntry(d, ag)] | |
126 | 128 | ||
127 | 129 | ||
128 | - | func | |
130 | + | func ah (U,ai,aj) = [IntegerEntry(H(i, U), ai), IntegerEntry(H(h, U), aj)] | |
129 | 131 | ||
130 | 132 | ||
131 | - | func | |
133 | + | func ak (U,Z) = [IntegerEntry(H(g, U), (W(U) + Z)), IntegerEntry(a, (N() + Z))] | |
132 | 134 | ||
133 | 135 | ||
134 | - | func | |
136 | + | func al () = (lastBlock.timestamp / 1000) | |
135 | 137 | ||
136 | 138 | ||
137 | - | func al (am) = if (((L() + am) == 0)) | |
138 | - | then M() | |
139 | + | func am () = G(al(), R()) | |
140 | + | ||
141 | + | ||
142 | + | func an (ao) = if (((N() + ao) == 0)) | |
143 | + | then O() | |
139 | 144 | else { | |
140 | - | let | |
141 | - | let | |
145 | + | let ap = (am() - P()) | |
146 | + | let aq = if ((0 > ap)) | |
142 | 147 | then 0 | |
143 | - | else | |
144 | - | let | |
145 | - | ( | |
148 | + | else ap | |
149 | + | let ar = B((Q() * aq), (N() + ao)) | |
150 | + | (O() + ar) | |
146 | 151 | } | |
147 | 152 | ||
148 | 153 | ||
149 | - | func | |
150 | - | let | |
151 | - | ( | |
154 | + | func as (U,ao) = { | |
155 | + | let at = (an(ao) - V(U)) | |
156 | + | (E((W(U) + ao), at) + T(U)) | |
152 | 157 | } | |
153 | 158 | ||
154 | 159 | ||
155 | - | func | |
156 | - | let | |
157 | - | let | |
158 | - | let | |
159 | - | then $Tuple2( | |
160 | + | func au (U,ao) = { | |
161 | + | let av = an(ao) | |
162 | + | let aw = al() | |
163 | + | let ax = if ((U != "")) | |
164 | + | then $Tuple2(as(U, ao), av) | |
160 | 165 | else $Tuple2(0, 0) | |
161 | - | let | |
162 | - | let | |
163 | - | $Tuple4( | |
166 | + | let ay = ax._1 | |
167 | + | let az = ax._2 | |
168 | + | $Tuple4(av, aw, ay, az) | |
164 | 169 | } | |
165 | 170 | ||
166 | 171 | ||
167 | - | @Callable( | |
168 | - | func initialize ( | |
172 | + | @Callable(aA) | |
173 | + | func initialize (aB) = if (X()) | |
169 | 174 | then throw("Already initialized") | |
170 | - | else [StringEntry(k, | |
175 | + | else [StringEntry(k, aB), BooleanEntry(j, true)] | |
171 | 176 | ||
172 | 177 | ||
173 | 178 | ||
174 | - | @Callable( | |
179 | + | @Callable(aA) | |
175 | 180 | func stake () = { | |
176 | - | let | |
177 | - | let | |
178 | - | if (if (( | |
181 | + | let U = toString(aA.caller) | |
182 | + | let z = aA.payments[0].amount | |
183 | + | if (if ((aA.payments[0].assetId != r())) | |
179 | 184 | then true | |
180 | - | else !( | |
185 | + | else !(X())) | |
181 | 186 | then throw("Invalid call to stake") | |
182 | 187 | else { | |
183 | - | let | |
184 | - | let | |
185 | - | let | |
186 | - | let | |
187 | - | let | |
188 | - | ((( | |
188 | + | let aC = au(U, 0) | |
189 | + | let av = aC._1 | |
190 | + | let aw = aC._2 | |
191 | + | let ay = aC._3 | |
192 | + | let az = aC._4 | |
193 | + | (((ah(U, ay, az) ++ af(av)) ++ ac(aw, R())) ++ ak(U, z)) | |
189 | 194 | } | |
190 | 195 | } | |
191 | 196 | ||
192 | 197 | ||
193 | 198 | ||
194 | - | @Callable( | |
195 | - | func unStake ( | |
196 | - | let | |
197 | - | if (if (if (( | |
199 | + | @Callable(aA) | |
200 | + | func unStake (z) = { | |
201 | + | let U = toString(aA.caller) | |
202 | + | if (if (if ((z > W(U))) | |
198 | 203 | then true | |
199 | - | else ( | |
204 | + | else (aA.payments != nil)) | |
200 | 205 | then true | |
201 | - | else !( | |
206 | + | else !(X())) | |
202 | 207 | then throw("Invalid unStake parameters") | |
203 | 208 | else { | |
204 | - | let | |
205 | - | let | |
206 | - | let | |
207 | - | let | |
208 | - | let | |
209 | - | (((( | |
209 | + | let aD = au(U, 0) | |
210 | + | let av = aD._1 | |
211 | + | let aw = aD._2 | |
212 | + | let ay = aD._3 | |
213 | + | let az = aD._4 | |
214 | + | ((((ah(U, ay, az) ++ af(av)) ++ ac(aw, R())) ++ ak(U, -(z))) ++ [ScriptTransfer(aA.caller, z, r())]) | |
210 | 215 | } | |
211 | 216 | } | |
212 | 217 | ||
213 | 218 | ||
214 | 219 | ||
215 | - | @Callable( | |
220 | + | @Callable(aA) | |
216 | 221 | func withdrawRewards () = { | |
217 | - | let | |
218 | - | let | |
219 | - | let | |
220 | - | let | |
221 | - | let | |
222 | - | let | |
223 | - | if (if ((0 >= | |
222 | + | let U = toString(aA.caller) | |
223 | + | let aE = au(U, 0) | |
224 | + | let av = aE._1 | |
225 | + | let aw = aE._2 | |
226 | + | let ay = aE._3 | |
227 | + | let az = aE._4 | |
228 | + | if (if ((0 >= ay)) | |
224 | 229 | then true | |
225 | - | else !( | |
230 | + | else !(X())) | |
226 | 231 | then throw("No reward") | |
227 | - | else ((((af(S, 0, ax) ++ ad(at)) ++ aa(au, P())) ++ W(-(aw))) ++ [ScriptTransfer(ay.caller, w(aw), r())]) | |
228 | - | } | |
229 | - | ||
230 | - | ||
231 | - | ||
232 | - | @Callable(ay) | |
233 | - | func addRewards () = if (if ((ay.payments[0].assetId != r())) | |
234 | - | then true | |
235 | - | else !(V())) | |
236 | - | then throw("Invalid addRewards params") | |
237 | - | else { | |
238 | - | let ag = y(ay.payments[0].amount) | |
239 | - | let at = as(u, v)._1 | |
240 | - | let aD = aj() | |
241 | - | let aE = if ((aD > P())) | |
242 | - | then (ag / t) | |
243 | - | else { | |
244 | - | let aF = (P() - aD) | |
245 | - | let aG = (O() * aF) | |
246 | - | ((ag + aG) / t) | |
247 | - | } | |
248 | - | (((Y(aE) ++ ad(at)) ++ W(ag)) ++ aa(aD, (aD + t))) | |
249 | - | } | |
250 | - | ||
251 | - | ||
252 | - | ||
253 | - | @Callable(ay) | |
254 | - | func ackRewards () = { | |
255 | - | let aH = y(assetBalance(this, r())) | |
256 | - | let aI = Q() | |
257 | - | let ar = (aH - aI) | |
258 | - | if ((0 >= ar)) | |
259 | - | then throw("Invalid ackRewards params") | |
260 | 232 | else { | |
261 | - | let ag = ar | |
262 | - | let at = as(u, v)._1 | |
263 | - | let aD = aj() | |
264 | - | let aE = if ((aD > P())) | |
265 | - | then (ag / t) | |
266 | - | else { | |
267 | - | let aF = (P() - aD) | |
268 | - | let aG = (O() * aF) | |
269 | - | ((ag + aG) / t) | |
270 | - | } | |
271 | - | (((Y(aE) ++ ad(at)) ++ W(ag)) ++ aa(aD, (aD + t))) | |
233 | + | let aF = invoke(t(), "withdraw", [toBase58String(s()), y(ay)], nil) | |
234 | + | if ((aF == aF)) | |
235 | + | then ((((ah(U, 0, az) ++ af(av)) ++ ac(aw, R())) ++ Y(-(ay))) ++ [ScriptTransfer(aA.caller, y(ay), s())]) | |
236 | + | else throw("Strict value is not equal to itself.") | |
272 | 237 | } | |
273 | 238 | } | |
274 | 239 | ||
275 | 240 | ||
276 | 241 | ||
277 | - | @Callable(ay) | |
278 | - | func view_reward (S) = { | |
279 | - | let aw = as(S, 0)._3 | |
280 | - | throw(toString(w(aw))) | |
242 | + | @Callable(aA) | |
243 | + | func addRewards () = if (if ((aA.payments[0].assetId != s())) | |
244 | + | then true | |
245 | + | else !(X())) | |
246 | + | then throw("Invalid addRewards params") | |
247 | + | else { | |
248 | + | let ai = A(aA.payments[0].amount) | |
249 | + | let aG = invoke(t(), "deposit", nil, [AttachedPayment(s(), y(ai))]) | |
250 | + | if ((aG == aG)) | |
251 | + | then { | |
252 | + | let av = au(w, x)._1 | |
253 | + | let aH = al() | |
254 | + | let aI = if ((aH > R())) | |
255 | + | then (ai / v) | |
256 | + | else { | |
257 | + | let aJ = (R() - aH) | |
258 | + | let aK = (Q() * aJ) | |
259 | + | ((ai + aK) / v) | |
260 | + | } | |
261 | + | (((aa(aI) ++ af(av)) ++ Y(ai)) ++ ac(aH, (aH + v))) | |
262 | + | } | |
263 | + | else throw("Strict value is not equal to itself.") | |
264 | + | } | |
265 | + | ||
266 | + | ||
267 | + | ||
268 | + | @Callable(aA) | |
269 | + | func ackRewards () = { | |
270 | + | let aL = A(assetBalance(this, s())) | |
271 | + | let aM = S() | |
272 | + | let at = (aL - aM) | |
273 | + | if ((0 >= at)) | |
274 | + | then throw("Invalid ackRewards params") | |
275 | + | else { | |
276 | + | let aG = invoke(t(), "deposit", nil, [AttachedPayment(s(), y(at))]) | |
277 | + | if ((aG == aG)) | |
278 | + | then { | |
279 | + | let ai = at | |
280 | + | let av = au(w, x)._1 | |
281 | + | let aH = al() | |
282 | + | let aI = if ((aH > R())) | |
283 | + | then (ai / v) | |
284 | + | else { | |
285 | + | let aJ = (R() - aH) | |
286 | + | let aK = (Q() * aJ) | |
287 | + | ((ai + aK) / v) | |
288 | + | } | |
289 | + | (((aa(aI) ++ af(av)) ++ Y(ai)) ++ ac(aH, (aH + v))) | |
290 | + | } | |
291 | + | else throw("Strict value is not equal to itself.") | |
292 | + | } | |
281 | 293 | } | |
282 | 294 | ||
283 | 295 | ||
284 | 296 | ||
285 | - | @Callable( | |
286 | - | func | |
287 | - | let | |
288 | - | | |
297 | + | @Callable(aA) | |
298 | + | func view_reward (U) = { | |
299 | + | let ay = au(U, 0)._3 | |
300 | + | throw(toString(y(ay))) | |
289 | 301 | } | |
290 | 302 | ||
291 | 303 | ||
292 | - | @Verifier(aJ) | |
293 | - | func aK () = sigVerify(aJ.bodyBytes, aJ.proofs[0], p()) | |
304 | + | ||
305 | + | @Callable(aA) | |
306 | + | func computeReward (U) = { | |
307 | + | let ay = au(U, 0)._3 | |
308 | + | $Tuple2(nil, ay) | |
309 | + | } | |
310 | + | ||
311 | + | ||
312 | + | ||
313 | + | @Callable(aA) | |
314 | + | func migrateLiquidity () = { | |
315 | + | let aN = y(S()) | |
316 | + | let aG = invoke(t(), "deposit", nil, [AttachedPayment(s(), aN)]) | |
317 | + | if ((aG == aG)) | |
318 | + | then nil | |
319 | + | else throw("Strict value is not equal to itself.") | |
320 | + | } | |
321 | + | ||
322 | + | ||
323 | + | @Verifier(aO) | |
324 | + | func aP () = sigVerify(aO.bodyBytes, aO.proofs[0], q()) | |
294 | 325 |
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_lastUpdateTime" | |
9 | 9 | ||
10 | 10 | let d = "k_rewardPerTokenStored" | |
11 | 11 | ||
12 | 12 | let e = "k_rewardRate" | |
13 | 13 | ||
14 | 14 | let f = "k_periodFinish" | |
15 | 15 | ||
16 | 16 | let g = "k_balance" | |
17 | 17 | ||
18 | 18 | let h = "k_userRewardPerToken" | |
19 | 19 | ||
20 | 20 | let i = "k_userReward" | |
21 | 21 | ||
22 | 22 | let j = "k_initialized" | |
23 | 23 | ||
24 | 24 | let k = "k_coordinatorAddress" | |
25 | 25 | ||
26 | 26 | let l = "k_gov_asset" | |
27 | 27 | ||
28 | 28 | let m = "k_quote_asset" | |
29 | 29 | ||
30 | 30 | let n = "k_admin_public_key" | |
31 | 31 | ||
32 | - | func o () = valueOrErrorMessage(addressFromString(getStringValue(this, k)), "Coordinator not set") | |
32 | + | let o = "k_manager_address" | |
33 | + | ||
34 | + | func p () = valueOrErrorMessage(addressFromString(getStringValue(this, k)), "Coordinator not set") | |
33 | 35 | ||
34 | 36 | ||
35 | - | func | |
37 | + | func q () = fromBase58String(getStringValue(p(), n)) | |
36 | 38 | ||
37 | 39 | ||
38 | - | func | |
40 | + | func r () = fromBase58String(getStringValue(p(), l)) | |
39 | 41 | ||
40 | 42 | ||
41 | - | func | |
43 | + | func s () = fromBase58String(getStringValue(p(), m)) | |
42 | 44 | ||
43 | 45 | ||
44 | - | let s = (1 * (((((((10 * 10) * 10) * 10) * 10) * 10) * 10) * 10)) | |
45 | - | ||
46 | - | let t = ((60 * 60) * 24) | |
47 | - | ||
48 | - | let u = "" | |
49 | - | ||
50 | - | let v = 0 | |
51 | - | ||
52 | - | func w (x) = (x / 100) | |
46 | + | func t () = valueOrErrorMessage(addressFromString(getStringValue(p(), o)), "Manager not set") | |
53 | 47 | ||
54 | 48 | ||
55 | - | func y (x) = (x * 100) | |
49 | + | let u = (1 * (((((((10 * 10) * 10) * 10) * 10) * 10) * 10) * 10)) | |
50 | + | ||
51 | + | let v = ((60 * 60) * 24) | |
52 | + | ||
53 | + | let w = "" | |
54 | + | ||
55 | + | let x = 0 | |
56 | + | ||
57 | + | func y (z) = (z / 100) | |
56 | 58 | ||
57 | 59 | ||
58 | - | func | |
60 | + | func A (z) = (z * 100) | |
59 | 61 | ||
60 | 62 | ||
61 | - | func | |
63 | + | func B (C,D) = fraction(C, u, D, HALFEVEN) | |
62 | 64 | ||
63 | 65 | ||
64 | - | func D (A) = if ((A > 0)) | |
65 | - | then A | |
66 | - | else -(A) | |
66 | + | func E (C,D) = fraction(C, D, u, HALFEVEN) | |
67 | 67 | ||
68 | 68 | ||
69 | - | func | |
70 | - | then | |
71 | - | else | |
69 | + | func F (C) = if ((C > 0)) | |
70 | + | then C | |
71 | + | else -(C) | |
72 | 72 | ||
73 | 73 | ||
74 | - | func F (G,H) = ((G + "_") + H) | |
74 | + | func G (C,D) = if ((C > D)) | |
75 | + | then D | |
76 | + | else C | |
75 | 77 | ||
76 | 78 | ||
77 | - | func | |
79 | + | func H (I,J) = ((I + "_") + J) | |
78 | 80 | ||
79 | 81 | ||
80 | - | func K ( | |
82 | + | func K (L) = valueOrErrorMessage(getInteger(this, L), ("no value for " + L)) | |
81 | 83 | ||
82 | 84 | ||
83 | - | func | |
85 | + | func M (L) = valueOrElse(getInteger(this, L), 0) | |
84 | 86 | ||
85 | 87 | ||
86 | - | func | |
88 | + | func N () = M(a) | |
87 | 89 | ||
88 | 90 | ||
89 | - | func | |
91 | + | func O () = M(d) | |
90 | 92 | ||
91 | 93 | ||
92 | - | func | |
94 | + | func P () = M(c) | |
93 | 95 | ||
94 | 96 | ||
95 | - | func | |
97 | + | func Q () = M(e) | |
96 | 98 | ||
97 | 99 | ||
98 | - | func | |
100 | + | func R () = M(f) | |
99 | 101 | ||
100 | 102 | ||
101 | - | func | |
103 | + | func S () = M(b) | |
102 | 104 | ||
103 | 105 | ||
104 | - | func T ( | |
106 | + | func T (U) = M(H(i, U)) | |
105 | 107 | ||
106 | 108 | ||
107 | - | func | |
109 | + | func V (U) = M(H(h, U)) | |
108 | 110 | ||
109 | 111 | ||
110 | - | func | |
112 | + | func W (U) = M(H(g, U)) | |
111 | 113 | ||
112 | 114 | ||
113 | - | func | |
115 | + | func X () = valueOrElse(getBoolean(this, j), false) | |
114 | 116 | ||
115 | 117 | ||
116 | - | func Y (Z) = [IntegerEntry( | |
118 | + | func Y (Z) = [IntegerEntry(b, (S() + Z))] | |
117 | 119 | ||
118 | 120 | ||
119 | - | func aa (ab | |
121 | + | func aa (ab) = [IntegerEntry(e, ab)] | |
120 | 122 | ||
121 | 123 | ||
122 | - | func | |
124 | + | func ac (ad,ae) = [IntegerEntry(c, ad), IntegerEntry(f, ae)] | |
123 | 125 | ||
124 | 126 | ||
125 | - | func af ( | |
127 | + | func af (ag) = [IntegerEntry(d, ag)] | |
126 | 128 | ||
127 | 129 | ||
128 | - | func | |
130 | + | func ah (U,ai,aj) = [IntegerEntry(H(i, U), ai), IntegerEntry(H(h, U), aj)] | |
129 | 131 | ||
130 | 132 | ||
131 | - | func | |
133 | + | func ak (U,Z) = [IntegerEntry(H(g, U), (W(U) + Z)), IntegerEntry(a, (N() + Z))] | |
132 | 134 | ||
133 | 135 | ||
134 | - | func | |
136 | + | func al () = (lastBlock.timestamp / 1000) | |
135 | 137 | ||
136 | 138 | ||
137 | - | func al (am) = if (((L() + am) == 0)) | |
138 | - | then M() | |
139 | + | func am () = G(al(), R()) | |
140 | + | ||
141 | + | ||
142 | + | func an (ao) = if (((N() + ao) == 0)) | |
143 | + | then O() | |
139 | 144 | else { | |
140 | - | let | |
141 | - | let | |
145 | + | let ap = (am() - P()) | |
146 | + | let aq = if ((0 > ap)) | |
142 | 147 | then 0 | |
143 | - | else | |
144 | - | let | |
145 | - | ( | |
148 | + | else ap | |
149 | + | let ar = B((Q() * aq), (N() + ao)) | |
150 | + | (O() + ar) | |
146 | 151 | } | |
147 | 152 | ||
148 | 153 | ||
149 | - | func | |
150 | - | let | |
151 | - | ( | |
154 | + | func as (U,ao) = { | |
155 | + | let at = (an(ao) - V(U)) | |
156 | + | (E((W(U) + ao), at) + T(U)) | |
152 | 157 | } | |
153 | 158 | ||
154 | 159 | ||
155 | - | func | |
156 | - | let | |
157 | - | let | |
158 | - | let | |
159 | - | then $Tuple2( | |
160 | + | func au (U,ao) = { | |
161 | + | let av = an(ao) | |
162 | + | let aw = al() | |
163 | + | let ax = if ((U != "")) | |
164 | + | then $Tuple2(as(U, ao), av) | |
160 | 165 | else $Tuple2(0, 0) | |
161 | - | let | |
162 | - | let | |
163 | - | $Tuple4( | |
166 | + | let ay = ax._1 | |
167 | + | let az = ax._2 | |
168 | + | $Tuple4(av, aw, ay, az) | |
164 | 169 | } | |
165 | 170 | ||
166 | 171 | ||
167 | - | @Callable( | |
168 | - | func initialize ( | |
172 | + | @Callable(aA) | |
173 | + | func initialize (aB) = if (X()) | |
169 | 174 | then throw("Already initialized") | |
170 | - | else [StringEntry(k, | |
175 | + | else [StringEntry(k, aB), BooleanEntry(j, true)] | |
171 | 176 | ||
172 | 177 | ||
173 | 178 | ||
174 | - | @Callable( | |
179 | + | @Callable(aA) | |
175 | 180 | func stake () = { | |
176 | - | let | |
177 | - | let | |
178 | - | if (if (( | |
181 | + | let U = toString(aA.caller) | |
182 | + | let z = aA.payments[0].amount | |
183 | + | if (if ((aA.payments[0].assetId != r())) | |
179 | 184 | then true | |
180 | - | else !( | |
185 | + | else !(X())) | |
181 | 186 | then throw("Invalid call to stake") | |
182 | 187 | else { | |
183 | - | let | |
184 | - | let | |
185 | - | let | |
186 | - | let | |
187 | - | let | |
188 | - | ((( | |
188 | + | let aC = au(U, 0) | |
189 | + | let av = aC._1 | |
190 | + | let aw = aC._2 | |
191 | + | let ay = aC._3 | |
192 | + | let az = aC._4 | |
193 | + | (((ah(U, ay, az) ++ af(av)) ++ ac(aw, R())) ++ ak(U, z)) | |
189 | 194 | } | |
190 | 195 | } | |
191 | 196 | ||
192 | 197 | ||
193 | 198 | ||
194 | - | @Callable( | |
195 | - | func unStake ( | |
196 | - | let | |
197 | - | if (if (if (( | |
199 | + | @Callable(aA) | |
200 | + | func unStake (z) = { | |
201 | + | let U = toString(aA.caller) | |
202 | + | if (if (if ((z > W(U))) | |
198 | 203 | then true | |
199 | - | else ( | |
204 | + | else (aA.payments != nil)) | |
200 | 205 | then true | |
201 | - | else !( | |
206 | + | else !(X())) | |
202 | 207 | then throw("Invalid unStake parameters") | |
203 | 208 | else { | |
204 | - | let | |
205 | - | let | |
206 | - | let | |
207 | - | let | |
208 | - | let | |
209 | - | (((( | |
209 | + | let aD = au(U, 0) | |
210 | + | let av = aD._1 | |
211 | + | let aw = aD._2 | |
212 | + | let ay = aD._3 | |
213 | + | let az = aD._4 | |
214 | + | ((((ah(U, ay, az) ++ af(av)) ++ ac(aw, R())) ++ ak(U, -(z))) ++ [ScriptTransfer(aA.caller, z, r())]) | |
210 | 215 | } | |
211 | 216 | } | |
212 | 217 | ||
213 | 218 | ||
214 | 219 | ||
215 | - | @Callable( | |
220 | + | @Callable(aA) | |
216 | 221 | func withdrawRewards () = { | |
217 | - | let | |
218 | - | let | |
219 | - | let | |
220 | - | let | |
221 | - | let | |
222 | - | let | |
223 | - | if (if ((0 >= | |
222 | + | let U = toString(aA.caller) | |
223 | + | let aE = au(U, 0) | |
224 | + | let av = aE._1 | |
225 | + | let aw = aE._2 | |
226 | + | let ay = aE._3 | |
227 | + | let az = aE._4 | |
228 | + | if (if ((0 >= ay)) | |
224 | 229 | then true | |
225 | - | else !( | |
230 | + | else !(X())) | |
226 | 231 | then throw("No reward") | |
227 | - | else ((((af(S, 0, ax) ++ ad(at)) ++ aa(au, P())) ++ W(-(aw))) ++ [ScriptTransfer(ay.caller, w(aw), r())]) | |
228 | - | } | |
229 | - | ||
230 | - | ||
231 | - | ||
232 | - | @Callable(ay) | |
233 | - | func addRewards () = if (if ((ay.payments[0].assetId != r())) | |
234 | - | then true | |
235 | - | else !(V())) | |
236 | - | then throw("Invalid addRewards params") | |
237 | - | else { | |
238 | - | let ag = y(ay.payments[0].amount) | |
239 | - | let at = as(u, v)._1 | |
240 | - | let aD = aj() | |
241 | - | let aE = if ((aD > P())) | |
242 | - | then (ag / t) | |
243 | - | else { | |
244 | - | let aF = (P() - aD) | |
245 | - | let aG = (O() * aF) | |
246 | - | ((ag + aG) / t) | |
247 | - | } | |
248 | - | (((Y(aE) ++ ad(at)) ++ W(ag)) ++ aa(aD, (aD + t))) | |
249 | - | } | |
250 | - | ||
251 | - | ||
252 | - | ||
253 | - | @Callable(ay) | |
254 | - | func ackRewards () = { | |
255 | - | let aH = y(assetBalance(this, r())) | |
256 | - | let aI = Q() | |
257 | - | let ar = (aH - aI) | |
258 | - | if ((0 >= ar)) | |
259 | - | then throw("Invalid ackRewards params") | |
260 | 232 | else { | |
261 | - | let ag = ar | |
262 | - | let at = as(u, v)._1 | |
263 | - | let aD = aj() | |
264 | - | let aE = if ((aD > P())) | |
265 | - | then (ag / t) | |
266 | - | else { | |
267 | - | let aF = (P() - aD) | |
268 | - | let aG = (O() * aF) | |
269 | - | ((ag + aG) / t) | |
270 | - | } | |
271 | - | (((Y(aE) ++ ad(at)) ++ W(ag)) ++ aa(aD, (aD + t))) | |
233 | + | let aF = invoke(t(), "withdraw", [toBase58String(s()), y(ay)], nil) | |
234 | + | if ((aF == aF)) | |
235 | + | then ((((ah(U, 0, az) ++ af(av)) ++ ac(aw, R())) ++ Y(-(ay))) ++ [ScriptTransfer(aA.caller, y(ay), s())]) | |
236 | + | else throw("Strict value is not equal to itself.") | |
272 | 237 | } | |
273 | 238 | } | |
274 | 239 | ||
275 | 240 | ||
276 | 241 | ||
277 | - | @Callable(ay) | |
278 | - | func view_reward (S) = { | |
279 | - | let aw = as(S, 0)._3 | |
280 | - | throw(toString(w(aw))) | |
242 | + | @Callable(aA) | |
243 | + | func addRewards () = if (if ((aA.payments[0].assetId != s())) | |
244 | + | then true | |
245 | + | else !(X())) | |
246 | + | then throw("Invalid addRewards params") | |
247 | + | else { | |
248 | + | let ai = A(aA.payments[0].amount) | |
249 | + | let aG = invoke(t(), "deposit", nil, [AttachedPayment(s(), y(ai))]) | |
250 | + | if ((aG == aG)) | |
251 | + | then { | |
252 | + | let av = au(w, x)._1 | |
253 | + | let aH = al() | |
254 | + | let aI = if ((aH > R())) | |
255 | + | then (ai / v) | |
256 | + | else { | |
257 | + | let aJ = (R() - aH) | |
258 | + | let aK = (Q() * aJ) | |
259 | + | ((ai + aK) / v) | |
260 | + | } | |
261 | + | (((aa(aI) ++ af(av)) ++ Y(ai)) ++ ac(aH, (aH + v))) | |
262 | + | } | |
263 | + | else throw("Strict value is not equal to itself.") | |
264 | + | } | |
265 | + | ||
266 | + | ||
267 | + | ||
268 | + | @Callable(aA) | |
269 | + | func ackRewards () = { | |
270 | + | let aL = A(assetBalance(this, s())) | |
271 | + | let aM = S() | |
272 | + | let at = (aL - aM) | |
273 | + | if ((0 >= at)) | |
274 | + | then throw("Invalid ackRewards params") | |
275 | + | else { | |
276 | + | let aG = invoke(t(), "deposit", nil, [AttachedPayment(s(), y(at))]) | |
277 | + | if ((aG == aG)) | |
278 | + | then { | |
279 | + | let ai = at | |
280 | + | let av = au(w, x)._1 | |
281 | + | let aH = al() | |
282 | + | let aI = if ((aH > R())) | |
283 | + | then (ai / v) | |
284 | + | else { | |
285 | + | let aJ = (R() - aH) | |
286 | + | let aK = (Q() * aJ) | |
287 | + | ((ai + aK) / v) | |
288 | + | } | |
289 | + | (((aa(aI) ++ af(av)) ++ Y(ai)) ++ ac(aH, (aH + v))) | |
290 | + | } | |
291 | + | else throw("Strict value is not equal to itself.") | |
292 | + | } | |
281 | 293 | } | |
282 | 294 | ||
283 | 295 | ||
284 | 296 | ||
285 | - | @Callable( | |
286 | - | func | |
287 | - | let | |
288 | - | | |
297 | + | @Callable(aA) | |
298 | + | func view_reward (U) = { | |
299 | + | let ay = au(U, 0)._3 | |
300 | + | throw(toString(y(ay))) | |
289 | 301 | } | |
290 | 302 | ||
291 | 303 | ||
292 | - | @Verifier(aJ) | |
293 | - | func aK () = sigVerify(aJ.bodyBytes, aJ.proofs[0], p()) | |
304 | + | ||
305 | + | @Callable(aA) | |
306 | + | func computeReward (U) = { | |
307 | + | let ay = au(U, 0)._3 | |
308 | + | $Tuple2(nil, ay) | |
309 | + | } | |
310 | + | ||
311 | + | ||
312 | + | ||
313 | + | @Callable(aA) | |
314 | + | func migrateLiquidity () = { | |
315 | + | let aN = y(S()) | |
316 | + | let aG = invoke(t(), "deposit", nil, [AttachedPayment(s(), aN)]) | |
317 | + | if ((aG == aG)) | |
318 | + | then nil | |
319 | + | else throw("Strict value is not equal to itself.") | |
320 | + | } | |
321 | + | ||
322 | + | ||
323 | + | @Verifier(aO) | |
324 | + | func aP () = sigVerify(aO.bodyBytes, aO.proofs[0], q()) | |
294 | 325 |
github/deemru/w8io/169f3d6 107.24 ms ◑