tx · DNvSMRFDobjtEsCMh7HiyYVbXfbMeNsc8TdmnjMo3Fyq 3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz: -0.02300000 Waves 2023.02.28 14:56 [2469523] smart account 3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz > SELF 0.00000000 Waves
{ "type": 13, "id": "DNvSMRFDobjtEsCMh7HiyYVbXfbMeNsc8TdmnjMo3Fyq", "fee": 2300000, "feeAssetId": null, "timestamp": 1677585438879, "version": 2, "chainId": 84, "sender": "3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz", "senderPublicKey": "D28XoueZWsMfm8Y5pa6C5ZFuYoWgre2Wm8tzJANJgMnq", "proofs": [ "2qzDgFXKpc54vJ3fG4TQw9BYpk45uUeN3wN5rpTZVySHpVJ8EabryR6ZudW9W1GUyXarBthrZ7Mk8GAj2Rg9qBtv" ], "script": "base64:BgL5HwgCEgMKAQgSAwoBCBIDCgEIEgASABIECgIIARIGCgQCAQICEgMKAQgSAwoBCBIFCgMICAQSBgoEARgIGBIECgIYCBIECgIICBIECgIICBIDCgEIEgQKAggIIgZTQ0FMRTgiBU1VTFQ4IgdTQ0FMRTE4IgZNVUxUMTgiA1NFUCIOUE9PTFdFSUdIVE1VTFQiCnplcm9CaWdJbnQiCW9uZUJpZ0ludCIHd3JhcEVyciIDbXNnIgh0aHJvd0VyciIJYXNBbnlMaXN0IgN2YWwiByRtYXRjaDAiCnZhbEFueUx5c3QiBWFzSW50IgZ2YWxJbnQiCGFzU3RyaW5nIgZ2YWxTdHIiDGFzQnl0ZVZlY3RvciIGdmFsQmluIg9nZXRTdHJpbmdPckZhaWwiB2FkZHJlc3MiA2tleSIYZ2V0U3RyaW5nQnlBZGRyZXNzT3JGYWlsIgxnZXRJbnRPclplcm8iD2dldEludE9yRGVmYXVsdCIKZGVmYXVsdFZhbCIMZ2V0SW50T3JGYWlsIhlnZXRCaWdJbnRGcm9tU3RyaW5nT3JaZXJvIhxnZXR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c2VsZi4JAAIBAgtNYXRjaCBlcnJvcgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgJjbAEOb25Nb2RpZnlXZWlnaHQCAmF0AmJ4AwkBAiE9AggFAmNsBmNhbGxlcgUCYVgJAAIBAhJwZXJtaXNzaW9ucyBkZW5pZWQEAmR5CQECYncDBQJhdAUCYngAAAQCYnUIBQJkeQJfMQQCYlcIBQJkeQJfMgQCYlgIBQJkeQJfMwUCYlcBAmR6AQJkQQAEAmRCBAFuCQECY2gAAwkAAQIFAW4CCkJ5dGVWZWN0b3IEAmNuBQFuBQJjbgMJAAECBQFuAgRVbml0CAUCZHoPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IJAPQDAwgFAmR6CWJvZHlCeXRlcwkAkQMCCAUCZHoGcHJvb2ZzAAAFAmRCMU9Meg==", "height": 2469523, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: ALtC3XNS9GqZwkD4e9R528GegaScZPP52ExxmxjFf7Q2 Next: 9wdw25zHJFRAv4HbHsdQntcoacSpWEMTi5Ue4KoWDW6m Diff:
Old | New | Differences | |
---|---|---|---|
17 | 17 | ||
18 | 18 | let h = toBigInt(1) | |
19 | 19 | ||
20 | - | func i (j) = { | |
21 | - | let k = j | |
22 | - | if ($isInstanceOf(k, "List[Any]")) | |
20 | + | func i (j) = makeString(["staking.ride:", toString(this), j], " ") | |
21 | + | ||
22 | + | ||
23 | + | func k (j) = throw(i(j)) | |
24 | + | ||
25 | + | ||
26 | + | func l (m) = { | |
27 | + | let n = m | |
28 | + | if ($isInstanceOf(n, "List[Any]")) | |
23 | 29 | then { | |
24 | - | let | |
25 | - | | |
30 | + | let o = n | |
31 | + | o | |
26 | 32 | } | |
27 | 33 | else throw("fail to cast into List[Any]") | |
28 | 34 | } | |
29 | 35 | ||
30 | 36 | ||
31 | - | func | |
32 | - | let | |
33 | - | if ($isInstanceOf( | |
37 | + | func p (m) = { | |
38 | + | let n = m | |
39 | + | if ($isInstanceOf(n, "Int")) | |
34 | 40 | then { | |
35 | - | let | |
36 | - | | |
41 | + | let q = n | |
42 | + | q | |
37 | 43 | } | |
38 | 44 | else throw("fail to cast into Int") | |
39 | 45 | } | |
40 | 46 | ||
41 | 47 | ||
42 | - | func | |
43 | - | let | |
44 | - | if ($isInstanceOf( | |
48 | + | func r (m) = { | |
49 | + | let n = m | |
50 | + | if ($isInstanceOf(n, "String")) | |
45 | 51 | then { | |
46 | - | let | |
47 | - | | |
52 | + | let s = n | |
53 | + | s | |
48 | 54 | } | |
49 | 55 | else throw("fail to cast into Int") | |
50 | 56 | } | |
51 | 57 | ||
52 | 58 | ||
53 | - | func | |
54 | - | let | |
55 | - | if ($isInstanceOf( | |
59 | + | func t (m) = { | |
60 | + | let n = m | |
61 | + | if ($isInstanceOf(n, "ByteVector")) | |
56 | 62 | then { | |
57 | - | let | |
58 | - | | |
63 | + | let u = n | |
64 | + | u | |
59 | 65 | } | |
60 | 66 | else throw("fail to cast into Int") | |
61 | 67 | } | |
62 | 68 | ||
63 | 69 | ||
64 | - | func | |
70 | + | func v (w,x) = valueOrErrorMessage(getString(w, x), (("mandatory this." + x) + " is not defined")) | |
65 | 71 | ||
66 | 72 | ||
67 | - | func | |
73 | + | func y (w,x) = valueOrErrorMessage(getString(w, x), (((("mandatory " + toString(w)) + ".") + x) + " is not defined")) | |
68 | 74 | ||
69 | 75 | ||
70 | - | func | |
76 | + | func z (w,x) = valueOrElse(getInteger(w, x), 0) | |
71 | 77 | ||
72 | 78 | ||
73 | - | func | |
79 | + | func A (w,x,B) = valueOrElse(getInteger(w, x), B) | |
74 | 80 | ||
75 | 81 | ||
76 | - | func | |
82 | + | func C (w,x) = valueOrErrorMessage(getInteger(w, x), (("mandatory this." + x) + " is not defined")) | |
77 | 83 | ||
78 | 84 | ||
79 | - | func | |
85 | + | func D (w,x) = value(parseBigInt(valueOrElse(getString(w, x), "0"))) | |
80 | 86 | ||
81 | 87 | ||
82 | - | func | |
83 | - | let | |
84 | - | if ($isInstanceOf( | |
88 | + | func E (w,x,B) = { | |
89 | + | let n = getString(w, x) | |
90 | + | if ($isInstanceOf(n, "String")) | |
85 | 91 | then { | |
86 | - | let | |
87 | - | value(parseBigInt( | |
92 | + | let F = n | |
93 | + | value(parseBigInt(F)) | |
88 | 94 | } | |
89 | - | else if ($isInstanceOf( | |
90 | - | then | |
95 | + | else if ($isInstanceOf(n, "Unit")) | |
96 | + | then B | |
91 | 97 | else throw("Match error") | |
92 | 98 | } | |
93 | 99 | ||
94 | 100 | ||
95 | - | func | |
101 | + | func G (H,I) = fraction(toBigInt(H), d, toBigInt(I)) | |
96 | 102 | ||
97 | 103 | ||
98 | - | func | |
104 | + | func J (m,K) = toInt(fraction(m, toBigInt(K), d)) | |
99 | 105 | ||
100 | 106 | ||
101 | - | func | |
107 | + | func L () = "%s%s__config__factoryAddress" | |
102 | 108 | ||
103 | 109 | ||
104 | - | func | |
110 | + | func M () = "%s__votingEmissionContract" | |
105 | 111 | ||
106 | 112 | ||
107 | - | let | |
113 | + | let N = 1 | |
108 | 114 | ||
109 | - | let | |
115 | + | let O = 2 | |
110 | 116 | ||
111 | - | let | |
117 | + | let P = 3 | |
112 | 118 | ||
113 | - | let | |
119 | + | let Q = 4 | |
114 | 120 | ||
115 | - | let | |
121 | + | let R = 5 | |
116 | 122 | ||
117 | - | let | |
123 | + | let S = 6 | |
118 | 124 | ||
119 | - | let | |
125 | + | let T = 7 | |
120 | 126 | ||
121 | - | func | |
127 | + | func U () = "%s__factoryConfig" | |
122 | 128 | ||
123 | 129 | ||
124 | - | func | |
130 | + | func V () = "%s__managerPublicKey" | |
125 | 131 | ||
126 | 132 | ||
127 | - | func | |
133 | + | func W () = "%s__pendingManagerPublicKey" | |
128 | 134 | ||
129 | 135 | ||
130 | - | func | |
136 | + | func X () = "%s__stablePoolAddonAddr" | |
131 | 137 | ||
132 | 138 | ||
133 | - | func | |
139 | + | func Y () = "%s__addonAddr" | |
134 | 140 | ||
135 | 141 | ||
136 | - | func | |
142 | + | func Z (aa) = makeString(["%s%s%s", aa, "mappings__lpAsset2PoolContract"], e) | |
137 | 143 | ||
138 | 144 | ||
139 | - | func | |
145 | + | func ab () = "%s__lpTokensList" | |
140 | 146 | ||
141 | 147 | ||
142 | - | func | |
148 | + | func ac (aa) = makeString(["%s%s%s", aa, "mappings__lpAsset2PoolContract"], e) | |
143 | 149 | ||
144 | 150 | ||
145 | - | func | |
151 | + | func ad (ae) = makeString(["%s%s", "poolWeight", ae], e) | |
146 | 152 | ||
147 | 153 | ||
148 | - | func | |
154 | + | func af (ag) = split(valueOrElse(getString(ag, ab()), ""), e) | |
149 | 155 | ||
150 | 156 | ||
151 | - | func | |
157 | + | func ah (ag) = split(y(ag, U()), e) | |
152 | 158 | ||
153 | 159 | ||
154 | - | func | |
160 | + | func ai (aj) = addressFromStringValue(aj[O]) | |
155 | 161 | ||
156 | 162 | ||
157 | - | func | |
163 | + | func ak (aj) = addressFromStringValue(aj[R]) | |
158 | 164 | ||
159 | 165 | ||
160 | - | func | |
166 | + | func al (aj) = addressFromStringValue(aj[N]) | |
161 | 167 | ||
162 | 168 | ||
163 | - | func | |
169 | + | func am () = "%s%s__ratePerBlock__current" | |
164 | 170 | ||
165 | 171 | ||
166 | - | func | |
172 | + | func an () = "%s%s__ratePerBlockMax__current" | |
167 | 173 | ||
168 | 174 | ||
169 | - | func | |
175 | + | func ao () = "%s%s__emission__startBlock" | |
170 | 176 | ||
171 | 177 | ||
172 | - | func | |
178 | + | func ap () = "%s%s__emission__duration" | |
173 | 179 | ||
174 | 180 | ||
175 | - | func | |
181 | + | func aq () = "%s%s__emission__endBlock" | |
176 | 182 | ||
177 | 183 | ||
178 | - | func | |
184 | + | func ar (as,at) = makeString(["%s%s%s__staked", as, at], e) | |
179 | 185 | ||
180 | 186 | ||
181 | - | func | |
187 | + | func au (at) = ("%s%s%s__staked__total__" + at) | |
182 | 188 | ||
183 | 189 | ||
184 | - | func | |
190 | + | func av (at,as) = makeString(["%s%s%s__claimed", as, at], e) | |
185 | 191 | ||
186 | 192 | ||
187 | - | func | |
193 | + | func aw (at,as) = makeString(["%s%s%s__claimedMinReward", as, at], e) | |
188 | 194 | ||
189 | 195 | ||
190 | - | func | |
196 | + | func ax (at,as) = makeString(["%s%s%s__claimedBoostReward", as, at], e) | |
191 | 197 | ||
192 | 198 | ||
193 | - | func | |
199 | + | func ay (at) = makeString(["%s%s%s__claimed__total", at], e) | |
194 | 200 | ||
195 | 201 | ||
196 | - | func | |
202 | + | func az (x) = valueOrElse(getInteger(this, x), 0) | |
197 | 203 | ||
198 | 204 | ||
199 | - | func | |
205 | + | func aA (aB) = makeString(["%s%s%s", aB, "total", "bal"], e) | |
200 | 206 | ||
201 | 207 | ||
202 | - | func | |
208 | + | func aC (aB,aD) = makeString(["%s%s%s", aB, aD, "bal"], e) | |
203 | 209 | ||
204 | 210 | ||
205 | - | func | |
211 | + | func aE (aB) = makeString(["%s%s%s", aB, "total", "balINT"], e) | |
206 | 212 | ||
207 | 213 | ||
208 | - | func | |
214 | + | func aF (aB,aD) = makeString(["%s%s%s", aB, aD, "balINT"], e) | |
209 | 215 | ||
210 | 216 | ||
211 | - | func | |
217 | + | func aG (aB) = makeString(["%s%s%s", aB, "total", "lastUpd"], e) | |
212 | 218 | ||
213 | 219 | ||
214 | - | func | |
220 | + | func aH (aB,aD) = makeString(["%s%s%s", aB, aD, "lastUpd"], e) | |
215 | 221 | ||
216 | 222 | ||
217 | - | func | |
223 | + | func aI (aB) = makeString(["%s%s%s%s", aB, "common", "lpInt"], e) | |
218 | 224 | ||
219 | 225 | ||
220 | - | func | |
226 | + | func aJ (aB) = makeString(["%s%s%s%s", aB, "common", "lpIntH"], e) | |
221 | 227 | ||
222 | 228 | ||
223 | - | func | |
229 | + | func aK (aB,aD) = makeString(["%s%s%s%s", aB, aD, "lpInt"], e) | |
224 | 230 | ||
225 | 231 | ||
226 | - | func | |
232 | + | func aL (aB,aD) = makeString(["%s%s%s%s", aB, aD, "lpIntH"], e) | |
227 | 233 | ||
228 | 234 | ||
229 | - | func | |
235 | + | func aM (aB) = makeString(["%s", aB, "wxPerLp"], e) | |
230 | 236 | ||
231 | 237 | ||
232 | - | func | |
238 | + | func aN (aB) = makeString(["%s", aB, "wxPerLpX18"], e) | |
233 | 239 | ||
234 | 240 | ||
235 | - | func | |
241 | + | func aO (aB,aD) = makeString(["%s%s%s%s", aB, aD, "uIntL"], e) | |
236 | 242 | ||
237 | 243 | ||
238 | - | func | |
244 | + | func aP (aQ,aD,aR) = makeString(["%s%s%s%s__history", aQ, aD, aR], e) | |
239 | 245 | ||
240 | 246 | ||
241 | - | func | |
247 | + | func aS (aD,aB,aQ,aT) = makeString(["%s%s%s%d%d%d", aD, aB, aQ, toString(height), toString(lastBlock.timestamp), toString(aT)], e) | |
242 | 248 | ||
243 | 249 | ||
244 | - | func | |
250 | + | func aU (aQ,aD,aB,aT,aV) = StringEntry(aP(aQ, aD, toBase58String(aV)), aS(aD, aB, aQ, aT)) | |
245 | 251 | ||
246 | 252 | ||
247 | - | let | |
253 | + | let aW = v(this, L()) | |
248 | 254 | ||
249 | - | let | |
255 | + | let aX = addressFromStringValue(aW) | |
250 | 256 | ||
251 | - | let | |
257 | + | let aj = ah(aX) | |
252 | 258 | ||
253 | - | let | |
259 | + | let aY = ak(aj) | |
254 | 260 | ||
255 | - | let | |
261 | + | let aZ = ai(aj) | |
256 | 262 | ||
257 | - | func aX (ay) = makeString(["%s%s", ay, "nextUser"], e) | |
263 | + | let ba = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(makeString(["%s", "lpStakingPoolsContract"], e)), i("lp_staking_pools contract address is undefined"))), i("invalid lp_staking_pools contract address")) | |
264 | + | ||
265 | + | func bb (aB) = makeString(["%s%s", aB, "nextUser"], e) | |
258 | 266 | ||
259 | 267 | ||
260 | - | func | |
268 | + | func bc (aB) = makeString(["users", aB], e) | |
261 | 269 | ||
262 | 270 | ||
263 | - | func | |
271 | + | func bd (be) = makeString(["%s%s%s", be, "head"], e) | |
264 | 272 | ||
265 | 273 | ||
266 | - | func | |
274 | + | func bf (be) = makeString(["%s%s%s", be, "size"], e) | |
267 | 275 | ||
268 | 276 | ||
269 | - | func | |
277 | + | func bg (be,bh) = makeString(["%s%s%s%s", be, bh, "prev"], e) | |
270 | 278 | ||
271 | 279 | ||
272 | - | func | |
280 | + | func bi (be,bh) = makeString(["%s%s%s%s", be, bh, "next"], e) | |
273 | 281 | ||
274 | 282 | ||
275 | - | func | |
276 | - | let | |
277 | - | let | |
278 | - | let | |
279 | - | if (if (( | |
283 | + | func bj (be,bh) = { | |
284 | + | let bk = getString(this, bd(be)) | |
285 | + | let bl = getString(this, bg(be, bh)) | |
286 | + | let bm = getString(this, bi(be, bh)) | |
287 | + | if (if ((bh == valueOrElse(bk, ""))) | |
280 | 288 | then true | |
281 | - | else ( | |
289 | + | else (bl != unit)) | |
282 | 290 | then true | |
283 | - | else ( | |
291 | + | else (bm != unit) | |
284 | 292 | } | |
285 | 293 | ||
286 | 294 | ||
287 | - | func | |
288 | - | let | |
289 | - | let | |
290 | - | let | |
295 | + | func bn (be,bh) = { | |
296 | + | let bk = getString(this, bd(be)) | |
297 | + | let bo = valueOrElse(getInteger(this, bf(be)), 0) | |
298 | + | let bp = if (!(bj(be, bh))) | |
291 | 299 | then true | |
292 | 300 | else throw("Node exists") | |
293 | - | if (( | |
294 | - | then (([IntegerEntry( | |
295 | - | then [StringEntry(be | |
296 | - | else nil)) ++ [StringEntry( | |
301 | + | if ((bp == bp)) | |
302 | + | then (([IntegerEntry(bf(be), (bo + 1))] ++ (if ((bk != unit)) | |
303 | + | then [StringEntry(bi(be, bh), value(bk)), StringEntry(bg(be, value(bk)), bh)] | |
304 | + | else nil)) ++ [StringEntry(bd(be), bh)]) | |
297 | 305 | else throw("Strict value is not equal to itself.") | |
298 | 306 | } | |
299 | 307 | ||
300 | 308 | ||
301 | - | func | |
302 | - | let | |
303 | - | let | |
304 | - | let | |
305 | - | let | |
306 | - | ([IntegerEntry( | |
307 | - | then ( | |
309 | + | func bq (be,bh) = { | |
310 | + | let bk = getString(this, bd(be)) | |
311 | + | let bo = valueOrElse(getInteger(this, bf(be)), 0) | |
312 | + | let bl = getString(this, bg(be, bh)) | |
313 | + | let bm = getString(this, bi(be, bh)) | |
314 | + | ([IntegerEntry(bf(be), (bo - 1))] ++ (if (if ((bl != unit)) | |
315 | + | then (bm != unit) | |
308 | 316 | else false) | |
309 | - | then [StringEntry(be | |
310 | - | else if (( | |
311 | - | then [StringEntry( | |
312 | - | else if (( | |
313 | - | then [DeleteEntry( | |
314 | - | else if (( | |
315 | - | then [DeleteEntry( | |
316 | - | else throw(((("invalid node: " + | |
317 | + | then [StringEntry(bi(be, value(bl)), value(bm)), StringEntry(bg(be, value(bm)), value(bl)), DeleteEntry(bg(be, bh)), DeleteEntry(bi(be, bh))] | |
318 | + | else if ((bm != unit)) | |
319 | + | then [StringEntry(bd(be), value(bm)), DeleteEntry(bi(be, bh)), DeleteEntry(bg(be, value(bm)))] | |
320 | + | else if ((bl != unit)) | |
321 | + | then [DeleteEntry(bg(be, bh)), DeleteEntry(bi(be, value(bl)))] | |
322 | + | else if ((bh == valueOrElse(bk, ""))) | |
323 | + | then [DeleteEntry(bd(be))] | |
324 | + | else throw(((("invalid node: " + be) + ".") + bh)))) | |
317 | 325 | } | |
318 | 326 | ||
319 | 327 | ||
320 | - | func | |
321 | - | then ( | |
328 | + | func br (bs,bt,bu,bv) = if (if ((bt == g)) | |
329 | + | then (bs > g) | |
322 | 330 | else false) | |
323 | 331 | then g | |
324 | - | else if (( | |
325 | - | then | |
326 | - | else if (if (( | |
327 | - | then ( | |
332 | + | else if ((bs == g)) | |
333 | + | then bu | |
334 | + | else if (if ((bt > g)) | |
335 | + | then (bs > g) | |
328 | 336 | else false) | |
329 | - | then value(parseBigInt( | |
337 | + | then value(parseBigInt(v(this, bv))) | |
330 | 338 | else throw("calcWxPerLpIntegralUserLast: unexpected state") | |
331 | 339 | ||
332 | 340 | ||
333 | - | func | |
334 | - | let | |
335 | - | let | |
336 | - | let | |
341 | + | func bw (at,bx,by) = { | |
342 | + | let bz = au(at) | |
343 | + | let bA = toBigInt(az(bz)) | |
344 | + | let bB = if ((bA == g)) | |
337 | 345 | then h | |
338 | - | else | |
339 | - | let | |
340 | - | let | |
341 | - | let | |
342 | - | let | |
343 | - | let | |
344 | - | let | |
345 | - | let | |
346 | - | let | |
347 | - | let | |
348 | - | let | |
349 | - | let | |
350 | - | let | |
351 | - | let | |
352 | - | then toBigInt( | |
353 | - | else fraction(toBigInt( | |
354 | - | let | |
355 | - | let | |
346 | + | else bA | |
347 | + | let bC = getIntegerValue(aX, ad(bx)) | |
348 | + | let bD = C(aY, ao()) | |
349 | + | let bE = 1000 | |
350 | + | let bF = (C(aY, am()) * bE) | |
351 | + | let bG = fraction(bF, bC, (f * 3)) | |
352 | + | let bH = aI(at) | |
353 | + | let bI = aJ(at) | |
354 | + | let bJ = aM(at) | |
355 | + | let bK = A(this, bI, bD) | |
356 | + | let bL = D(this, bH) | |
357 | + | let bM = 0 | |
358 | + | let bN = max([(height - bK), 0]) | |
359 | + | let bO = if ((bM != 0)) | |
360 | + | then toBigInt(bM) | |
361 | + | else fraction(toBigInt(bG), toBigInt(b), bB) | |
362 | + | let bP = (bA + toBigInt(by)) | |
363 | + | let bQ = if ((bP == g)) | |
356 | 364 | then h | |
357 | - | else | |
358 | - | let | |
359 | - | let | |
360 | - | let | |
361 | - | let | |
362 | - | $Tuple3( | |
365 | + | else bP | |
366 | + | let bu = (bL + (bO * toBigInt(bN))) | |
367 | + | let bR = (toBigInt(bG) / bQ) | |
368 | + | let bS = height | |
369 | + | let bT = makeString([toString(bu), toString(bN), toString(bO), toString(bA), toString(bG), toString(bF), toString(bC)], "::") | |
370 | + | $Tuple3(bu, [StringEntry(bH, toString(bu)), IntegerEntry(bI, bS), StringEntry(bJ, toString(bR))], bT) | |
363 | 371 | } | |
364 | 372 | ||
365 | 373 | ||
366 | - | func | |
367 | - | let | |
368 | - | let | |
369 | - | let | |
370 | - | let | |
371 | - | let | |
372 | - | let | |
373 | - | let | |
374 | - | let | |
375 | - | let | |
376 | - | let | |
377 | - | let | |
378 | - | let | |
379 | - | let | |
380 | - | let | |
381 | - | let | |
382 | - | let | |
383 | - | let | |
384 | - | let | |
385 | - | $Tuple3( | |
374 | + | func bU (at,as,bx,by) = { | |
375 | + | let bV = bw(at, bx, by) | |
376 | + | let bu = bV._1 | |
377 | + | let bW = bV._2 | |
378 | + | let bX = bV._3 | |
379 | + | let bE = 1000 | |
380 | + | let bY = ar(as, at) | |
381 | + | let bs = az(bY) | |
382 | + | let bZ = aK(at, as) | |
383 | + | let ca = aL(at, as) | |
384 | + | let bv = aO(at, as) | |
385 | + | let cb = D(this, bZ) | |
386 | + | let bt = z(this, ca) | |
387 | + | let cc = br(toBigInt(bs), toBigInt(bt), bu, bv) | |
388 | + | let cd = (b * bE) | |
389 | + | let ce = max([(cb + fraction((bu - cc), toBigInt(bs), toBigInt(cd))), g]) | |
390 | + | let cf = bu | |
391 | + | let cg = height | |
392 | + | let bT = makeString([toString(cb), toString(cc), toString(bs), bX, toString(height)], "::") | |
393 | + | $Tuple3(ce, (bW ++ [StringEntry(bZ, toString(ce)), IntegerEntry(ca, cg), StringEntry(bv, toString(cf))]), bT) | |
386 | 394 | } | |
387 | 395 | ||
388 | 396 | ||
389 | - | func | |
390 | - | let | |
391 | - | if ($isInstanceOf( | |
397 | + | func ch () = { | |
398 | + | let n = getString(V()) | |
399 | + | if ($isInstanceOf(n, "String")) | |
392 | 400 | then { | |
393 | - | let | |
394 | - | fromBase58String( | |
401 | + | let F = n | |
402 | + | fromBase58String(F) | |
395 | 403 | } | |
396 | - | else if ($isInstanceOf( | |
404 | + | else if ($isInstanceOf(n, "Unit")) | |
397 | 405 | then unit | |
398 | 406 | else throw("Match error") | |
399 | 407 | } | |
400 | 408 | ||
401 | 409 | ||
402 | - | func | |
403 | - | let | |
404 | - | if ($isInstanceOf( | |
410 | + | func ci () = { | |
411 | + | let n = getString(W()) | |
412 | + | if ($isInstanceOf(n, "String")) | |
405 | 413 | then { | |
406 | - | let | |
407 | - | fromBase58String( | |
414 | + | let F = n | |
415 | + | fromBase58String(F) | |
408 | 416 | } | |
409 | - | else if ($isInstanceOf( | |
417 | + | else if ($isInstanceOf(n, "Unit")) | |
410 | 418 | then unit | |
411 | 419 | else throw("Match error") | |
412 | 420 | } | |
413 | 421 | ||
414 | 422 | ||
415 | - | let | |
423 | + | let cj = throw("Permission denied") | |
416 | 424 | ||
417 | - | func | |
425 | + | func ck (cl) = if ((cl.caller == this)) | |
418 | 426 | then true | |
419 | - | else | |
427 | + | else cj | |
420 | 428 | ||
421 | 429 | ||
422 | - | func | |
423 | - | let | |
424 | - | if ($isInstanceOf( | |
430 | + | func cm (cl) = { | |
431 | + | let n = ch() | |
432 | + | if ($isInstanceOf(n, "ByteVector")) | |
425 | 433 | then { | |
426 | - | let | |
427 | - | if (( | |
434 | + | let cn = n | |
435 | + | if ((cl.callerPublicKey == cn)) | |
428 | 436 | then true | |
429 | - | else | |
437 | + | else cj | |
430 | 438 | } | |
431 | - | else if ($isInstanceOf( | |
432 | - | then if (( | |
439 | + | else if ($isInstanceOf(n, "Unit")) | |
440 | + | then if ((cl.caller == this)) | |
433 | 441 | then true | |
434 | - | else | |
442 | + | else cj | |
435 | 443 | else throw("Match error") | |
436 | 444 | } | |
437 | 445 | ||
438 | 446 | ||
439 | - | @Callable(ch) | |
440 | - | func constructor (ck) = { | |
441 | - | let cl = ci(ch) | |
442 | - | if ((cl == cl)) | |
443 | - | then [StringEntry(I(), ck)] | |
447 | + | func co (cl,aB,cp,aD,cq,aT) = { | |
448 | + | let as = toString(aD) | |
449 | + | let at = toBase58String(aB) | |
450 | + | let bx = toString(cp) | |
451 | + | let bY = ar(as, at) | |
452 | + | let bz = au(at) | |
453 | + | let bs = az(bY) | |
454 | + | let bA = az(bz) | |
455 | + | let cr = bU(at, as, bx, -(aT))._2 | |
456 | + | let be = bc(at) | |
457 | + | let cs = if (if (bj(be, as)) | |
458 | + | then (aT == bs) | |
459 | + | else false) | |
460 | + | then bq(be, as) | |
461 | + | else nil | |
462 | + | let ct = D(this, aw(at, as)) | |
463 | + | let ce = bU(at, as, bx, 0)._1 | |
464 | + | let cu = (ce - ct) | |
465 | + | let cv = true | |
466 | + | let cw = if ((cu > g)) | |
467 | + | then invoke(this, "claimWxINTERNAL", [at, as, cv], nil) | |
468 | + | else unit | |
469 | + | if ((cw == cw)) | |
470 | + | then if ((aT > bs)) | |
471 | + | then throw(((((((("passed amount=" + toString(aT)) + " is greater than available=") + toString(bs)) + ". lpAssetId=") + at) + ". stakedByUserKEY=") + bY)) | |
472 | + | else (([IntegerEntry(bY, (bs - aT)), IntegerEntry(bz, (bA - aT)), ScriptTransfer(cq, aT, aB), aU("unstake", as, at, aT, cl.transactionId)] ++ cr) ++ cs) | |
473 | + | else throw("Strict value is not equal to itself.") | |
474 | + | } | |
475 | + | ||
476 | + | ||
477 | + | @Callable(cl) | |
478 | + | func constructor (cx) = { | |
479 | + | let cy = cm(cl) | |
480 | + | if ((cy == cy)) | |
481 | + | then [StringEntry(L(), cx)] | |
444 | 482 | else throw("Strict value is not equal to itself.") | |
445 | 483 | } | |
446 | 484 | ||
447 | 485 | ||
448 | 486 | ||
449 | - | @Callable( | |
450 | - | func constructorV2 ( | |
451 | - | let | |
487 | + | @Callable(cl) | |
488 | + | func constructorV2 (cz) = { | |
489 | + | let cA = [cm(cl), if ((addressFromString(cz) != unit)) | |
452 | 490 | then true | |
453 | 491 | else "invalid voting emission contract address"] | |
454 | - | if (( | |
455 | - | then [StringEntry( | |
492 | + | if ((cA == cA)) | |
493 | + | then [StringEntry(M(), cz)] | |
456 | 494 | else throw("Strict value is not equal to itself.") | |
457 | 495 | } | |
458 | 496 | ||
459 | 497 | ||
460 | 498 | ||
461 | - | @Callable( | |
462 | - | func setManager ( | |
463 | - | let | |
464 | - | if (( | |
499 | + | @Callable(cl) | |
500 | + | func setManager (cB) = { | |
501 | + | let cy = cm(cl) | |
502 | + | if ((cy == cy)) | |
465 | 503 | then { | |
466 | - | let | |
467 | - | if (( | |
468 | - | then [StringEntry( | |
504 | + | let cC = fromBase58String(cB) | |
505 | + | if ((cC == cC)) | |
506 | + | then [StringEntry(W(), cB)] | |
469 | 507 | else throw("Strict value is not equal to itself.") | |
470 | 508 | } | |
471 | 509 | else throw("Strict value is not equal to itself.") | |
473 | 511 | ||
474 | 512 | ||
475 | 513 | ||
476 | - | @Callable( | |
514 | + | @Callable(cl) | |
477 | 515 | func confirmManager () = { | |
478 | - | let | |
479 | - | let | |
516 | + | let cD = ci() | |
517 | + | let cE = if (isDefined(cD)) | |
480 | 518 | then true | |
481 | 519 | else throw("No pending manager") | |
482 | - | if (( | |
520 | + | if ((cE == cE)) | |
483 | 521 | then { | |
484 | - | let | |
522 | + | let cF = if ((cl.callerPublicKey == value(cD))) | |
485 | 523 | then true | |
486 | 524 | else throw("You are not pending manager") | |
487 | - | if (( | |
488 | - | then [StringEntry( | |
525 | + | if ((cF == cF)) | |
526 | + | then [StringEntry(V(), toBase58String(value(cD))), DeleteEntry(W())] | |
489 | 527 | else throw("Strict value is not equal to itself.") | |
490 | 528 | } | |
491 | 529 | else throw("Strict value is not equal to itself.") | |
493 | 531 | ||
494 | 532 | ||
495 | 533 | ||
496 | - | @Callable( | |
497 | - | func stake () = if ((size( | |
534 | + | @Callable(cl) | |
535 | + | func stake () = if ((size(cl.payments) != 1)) | |
498 | 536 | then throw("invalid payment - exact one payment must be attached") | |
499 | 537 | else { | |
500 | - | let | |
501 | - | let | |
502 | - | let | |
503 | - | let | |
504 | - | let | |
505 | - | let | |
506 | - | let | |
507 | - | then toString( | |
508 | - | else | |
509 | - | let | |
510 | - | let | |
511 | - | let | |
512 | - | let | |
513 | - | let | |
514 | - | let | |
515 | - | let | |
516 | - | let | |
517 | - | let | |
518 | - | let | |
538 | + | let cG = cl.payments[0] | |
539 | + | let aB = value(cG.assetId) | |
540 | + | let at = toBase58String(aB) | |
541 | + | let aT = cG.amount | |
542 | + | let bx = valueOrErrorMessage(getString(aX, Z(at)), ("unsupported lp asset " + at)) | |
543 | + | let cH = toString(cl.caller) | |
544 | + | let as = if ((cH == bx)) | |
545 | + | then toString(cl.originCaller) | |
546 | + | else cH | |
547 | + | let bY = ar(as, at) | |
548 | + | let bz = au(at) | |
549 | + | let bs = az(bY) | |
550 | + | let bA = az(bz) | |
551 | + | let cI = bU(at, as, bx, aT) | |
552 | + | let ce = cI._1 | |
553 | + | let cr = cI._2 | |
554 | + | let bT = cI._3 | |
555 | + | let be = bc(at) | |
556 | + | let cs = if (bj(be, as)) | |
519 | 557 | then nil | |
520 | - | else | |
521 | - | (([IntegerEntry( | |
558 | + | else bn(be, as) | |
559 | + | (([IntegerEntry(bY, (bs + aT)), IntegerEntry(bz, (bA + aT)), aU("stake", as, at, aT, cl.transactionId)] ++ cr) ++ cs) | |
522 | 560 | } | |
523 | 561 | ||
524 | 562 | ||
525 | 563 | ||
526 | - | @Callable(ch) | |
527 | - | func unstake (aq,aQ) = { | |
528 | - | let ay = fromBase58String(aq) | |
529 | - | let bt = valueOrErrorMessage(getString(aU, W(aq)), ("unsupported lp asset " + aq)) | |
530 | - | let cy = valueOrElse(getString(addressFromStringValue(bt), V()), bt) | |
531 | - | let cu = toString(ch.caller) | |
532 | - | let ap = if (if ((cu == bt)) | |
564 | + | @Callable(cl) | |
565 | + | func unstake (at,aT) = { | |
566 | + | let aB = fromBase58String(at) | |
567 | + | let bx = valueOrErrorMessage(getString(aX, Z(at)), ("unsupported lp asset " + at)) | |
568 | + | let cp = addressFromStringValue(bx) | |
569 | + | let cJ = valueOrElse(getString(cp, Y()), bx) | |
570 | + | let cH = toString(cl.caller) | |
571 | + | let aD = if (if ((cH == bx)) | |
533 | 572 | then true | |
534 | - | else (cu == cy)) | |
535 | - | then toString(ch.originCaller) | |
536 | - | else cu | |
537 | - | let bU = ao(ap, aq) | |
538 | - | let bv = ar(aq) | |
539 | - | let bo = aw(bU) | |
540 | - | let bw = aw(bv) | |
541 | - | let cw = bQ(aq, ap, bt, -(aQ))._2 | |
542 | - | let ba = aY(aq) | |
543 | - | let cx = if (if (bf(ba, ap)) | |
544 | - | then (aQ == bo) | |
545 | - | else false) | |
546 | - | then bm(ba, ap) | |
547 | - | else nil | |
548 | - | let cz = A(this, at(aq, ap)) | |
549 | - | let cA = v(aU, Z(aq)) | |
550 | - | let ca = bQ(aq, ap, cA, 0)._1 | |
551 | - | let cB = (ca - cz) | |
552 | - | let cC = if ((cB > g)) | |
553 | - | then invoke(this, "claimWxINTERNAL", [aq, ap], nil) | |
554 | - | else unit | |
555 | - | if ((cC == cC)) | |
556 | - | then if ((aQ > bo)) | |
557 | - | then throw(((((((("passed amount=" + toString(aQ)) + " is greater than available=") + toString(bo)) + ". lpAssetId=") + aq) + ". stakedByUserKEY=") + bU)) | |
558 | - | else (([IntegerEntry(bU, (bo - aQ)), IntegerEntry(bv, (bw - aQ)), ScriptTransfer(ch.caller, aQ, ay), aR("unstake", ap, aq, aQ, ch.transactionId)] ++ cw) ++ cx) | |
573 | + | else (cH == cJ)) | |
574 | + | then cl.originCaller | |
575 | + | else cl.caller | |
576 | + | let cq = cl.caller | |
577 | + | co(cl, aB, cp, aD, cq, aT) | |
578 | + | } | |
579 | + | ||
580 | + | ||
581 | + | ||
582 | + | @Callable(cl) | |
583 | + | func unstakeINTERNAL (aB,aT,aD,cq) = { | |
584 | + | let at = toBase58String(aB) | |
585 | + | let cp = addressFromStringValue(valueOrErrorMessage(getString(aX, Z(at)), ("unsupported lp asset " + at))) | |
586 | + | let cy = if ((cl.caller == cp)) | |
587 | + | then true | |
588 | + | else cj | |
589 | + | if ((cy == cy)) | |
590 | + | then co(cl, aB, cp, Address(aD), Address(cq), aT) | |
559 | 591 | else throw("Strict value is not equal to itself.") | |
560 | 592 | } | |
561 | 593 | ||
562 | 594 | ||
563 | 595 | ||
564 | - | @Callable(ch) | |
565 | - | func claimWx (aq) = { | |
566 | - | let ap = toString(ch.caller) | |
567 | - | let cD = invoke(this, "claimWxINTERNAL", [aq, ap], nil) | |
568 | - | $Tuple2(nil, cD) | |
596 | + | @Callable(cl) | |
597 | + | func claimWx (at) = { | |
598 | + | let as = toString(cl.caller) | |
599 | + | let cv = true | |
600 | + | let cK = invoke(this, "claimWxINTERNAL", [at, as, cv], nil) | |
601 | + | $Tuple2(nil, cK) | |
569 | 602 | } | |
570 | 603 | ||
571 | 604 | ||
572 | 605 | ||
573 | - | @Callable(ch) | |
574 | - | func claimWxINTERNAL (aq,ap) = { | |
575 | - | let cl = cg(ch) | |
576 | - | if ((cl == cl)) | |
606 | + | @Callable(cl) | |
607 | + | func claimWxDoNotThrow (at) = { | |
608 | + | let as = toString(cl.caller) | |
609 | + | let cv = false | |
610 | + | let cK = invoke(this, "claimWxINTERNAL", [at, as, cv], nil) | |
611 | + | $Tuple2(nil, cK) | |
612 | + | } | |
613 | + | ||
614 | + | ||
615 | + | ||
616 | + | @Callable(cl) | |
617 | + | func claimWxINTERNAL (at,as,cv) = { | |
618 | + | let cy = ck(cl) | |
619 | + | if ((cy == cy)) | |
577 | 620 | then { | |
578 | - | let aA = valueOrErrorMessage(addressFromString(ap), "claimWxINTERNAL: invalid user address") | |
579 | - | let bt = v(aU, Z(aq)) | |
580 | - | let cE = as(aq, ap) | |
581 | - | let cF = av(aq) | |
582 | - | let cG = at(aq, ap) | |
583 | - | let cH = au(aq, ap) | |
584 | - | let cI = A(this, cE) | |
585 | - | let cz = A(this, cG) | |
586 | - | let cJ = A(this, cH) | |
587 | - | let cK = A(this, cF) | |
588 | - | let cL = bQ(aq, ap, bt, 0) | |
589 | - | let ca = cL._1 | |
590 | - | let cw = cL._2 | |
591 | - | let bP = cL._3 | |
592 | - | let cB = max([(ca - cz), g]) | |
593 | - | if ((g >= cB)) | |
594 | - | then throw("nothing to claim") | |
621 | + | let aD = valueOrErrorMessage(addressFromString(as), "claimWxINTERNAL: invalid user address") | |
622 | + | let bx = y(aX, ac(at)) | |
623 | + | let cL = av(at, as) | |
624 | + | let cM = ay(at) | |
625 | + | let cN = aw(at, as) | |
626 | + | let cO = ax(at, as) | |
627 | + | let cP = D(this, cL) | |
628 | + | let ct = D(this, cN) | |
629 | + | let cQ = D(this, cO) | |
630 | + | let cR = D(this, cM) | |
631 | + | let cS = bU(at, as, bx, 0) | |
632 | + | let ce = cS._1 | |
633 | + | let cr = cS._2 | |
634 | + | let bT = cS._3 | |
635 | + | let cu = max([(ce - ct), g]) | |
636 | + | if ((g >= cu)) | |
637 | + | then if (cv) | |
638 | + | then throw("nothing to claim") | |
639 | + | else $Tuple2(nil, 0) | |
595 | 640 | else { | |
596 | - | let cM = max([m(i(invoke(aW, "claimWxBoost", [aq, ap], nil))[0]), 0]) | |
597 | - | let cN = cB | |
598 | - | let cO = min([(cN * toBigInt(2)), toBigInt(cM)]) | |
599 | - | let cP = q(i(invoke(aV, "emit", [toInt(cN)], nil))[0]) | |
600 | - | let cQ = i(invoke(aV, "emit", [toInt(cO)], nil)) | |
601 | - | if ((cQ == cQ)) | |
641 | + | let cT = max([p(l(invoke(aZ, "claimWxBoost", [at, as], nil))[0]), 0]) | |
642 | + | let cU = cu | |
643 | + | let cV = min([(cU * toBigInt(2)), toBigInt(cT)]) | |
644 | + | let cW = (cU + cV) | |
645 | + | let cX = t(l(invoke(aY, "emit", [toInt(cU)], nil))[0]) | |
646 | + | let cY = l(invoke(aY, "emit", [toInt(cV)], nil)) | |
647 | + | if ((cY == cY)) | |
602 | 648 | then { | |
603 | - | let | |
604 | - | let | |
605 | - | let | |
606 | - | let | |
607 | - | [StringEntry( | |
649 | + | let cZ = ((cP + cU) + cV) | |
650 | + | let da = (ct + cU) | |
651 | + | let db = (cQ + cV) | |
652 | + | let dc = (cR + cu) | |
653 | + | $Tuple2([StringEntry(cL, toString(cZ)), StringEntry(cN, toString(da)), StringEntry(cO, toString(db)), StringEntry(cM, toString(dc)), ScriptTransfer(aD, toInt(cU), cX), ScriptTransfer(aD, toInt(cV), cX), aU("claim", as, at, toInt(cu), cl.transactionId)], toInt(cW)) | |
608 | 654 | } | |
609 | 655 | else throw("Strict value is not equal to itself.") | |
610 | 656 | } | |
614 | 660 | ||
615 | 661 | ||
616 | 662 | ||
617 | - | @Callable( | |
618 | - | func claimWxBulkInternalREADONLY ( | |
619 | - | then $Tuple2(nil, | |
663 | + | @Callable(cl) | |
664 | + | func claimWxBulkInternalREADONLY (dd,de,as,df) = if ((dd == size(de))) | |
665 | + | then $Tuple2(nil, df) | |
620 | 666 | else { | |
621 | - | let | |
622 | - | let | |
623 | - | let | |
624 | - | if ($isInstanceOf( | |
625 | - | then | |
626 | - | else throw(($getType( | |
667 | + | let aB = de[dd] | |
668 | + | let dg = split({ | |
669 | + | let dh = invoke(this, "claimWxREADONLY", [aB, as], nil) | |
670 | + | if ($isInstanceOf(dh, "String")) | |
671 | + | then dh | |
672 | + | else throw(($getType(dh) + " couldn't be cast to String")) | |
627 | 673 | }, e) | |
628 | - | let | |
629 | - | let | |
630 | - | let | |
631 | - | let | |
632 | - | let | |
633 | - | if ($isInstanceOf( | |
634 | - | then | |
635 | - | else throw(($getType( | |
674 | + | let di = dg[3] | |
675 | + | let dj = dg[4] | |
676 | + | let dk = (df :+ makeString(["%d%d", di, dj], e)) | |
677 | + | let dl = { | |
678 | + | let dh = invoke(this, "claimWxBulkInternalREADONLY", [(dd + 1), de, as, dk], nil) | |
679 | + | if ($isInstanceOf(dh, "List[Any]")) | |
680 | + | then dh | |
681 | + | else throw(($getType(dh) + " couldn't be cast to List[Any]")) | |
636 | 682 | } | |
637 | - | if (( | |
638 | - | then $Tuple2(nil, | |
683 | + | if ((dl == dl)) | |
684 | + | then $Tuple2(nil, dl) | |
639 | 685 | else throw("Strict value is not equal to itself.") | |
640 | 686 | } | |
641 | 687 | ||
642 | 688 | ||
643 | 689 | ||
644 | - | @Callable( | |
645 | - | func claimWxBulkREADONLY ( | |
646 | - | let | |
647 | - | $Tuple2(nil, | |
690 | + | @Callable(cl) | |
691 | + | func claimWxBulkREADONLY (de,as) = { | |
692 | + | let dk = invoke(this, "claimWxBulkInternalREADONLY", [0, de, as, nil], nil) | |
693 | + | $Tuple2(nil, dk) | |
648 | 694 | } | |
649 | 695 | ||
650 | 696 | ||
651 | 697 | ||
652 | - | @Callable( | |
653 | - | func claimWxREADONLY ( | |
654 | - | let | |
655 | - | let | |
656 | - | let | |
657 | - | let | |
658 | - | let | |
659 | - | let | |
660 | - | let | |
661 | - | let | |
662 | - | let | |
663 | - | let | |
664 | - | let | |
665 | - | let | |
666 | - | let | |
698 | + | @Callable(cl) | |
699 | + | func claimWxREADONLY (at,as) = { | |
700 | + | let bY = ar(as, at) | |
701 | + | let bz = au(at) | |
702 | + | let cL = av(at, as) | |
703 | + | let cN = aw(at, as) | |
704 | + | let bs = az(bY) | |
705 | + | let bA = az(bz) | |
706 | + | let cP = D(this, cL) | |
707 | + | let ct = D(this, cN) | |
708 | + | let bx = y(aX, ac(at)) | |
709 | + | let bC = getIntegerValue(aX, ad(bx)) | |
710 | + | let dm = C(aY, am()) | |
711 | + | let bD = C(aY, ao()) | |
712 | + | let dn = if ((bD > height)) | |
667 | 713 | then 0 | |
668 | - | else (height - | |
669 | - | let | |
670 | - | let | |
671 | - | let | |
672 | - | let | |
673 | - | let | |
674 | - | let | |
675 | - | let | |
676 | - | let | |
677 | - | let | |
678 | - | let | |
679 | - | let | |
680 | - | let | |
681 | - | let | |
682 | - | $Tuple2(nil, makeString(["%s%s%d%d%d%d%s", | |
714 | + | else (height - bD) | |
715 | + | let do = fraction((dm * dn), bC, f) | |
716 | + | let dp = fraction(do, bs, bA) | |
717 | + | let dq = bU(at, as, bx, 0) | |
718 | + | let ce = dq._1 | |
719 | + | let cr = dq._2 | |
720 | + | let bT = dq._3 | |
721 | + | let cu = max([(ce - ct), g]) | |
722 | + | let dr = l(invoke(aZ, "claimWxBoostREADONLY", [at, as], nil)) | |
723 | + | let cT = max([p(dr[0]), 0]) | |
724 | + | let ds = r(dr[1]) | |
725 | + | let cU = cu | |
726 | + | let cV = min([(cU * toBigInt(2)), toBigInt(cT)]) | |
727 | + | let cW = (cU + cV) | |
728 | + | $Tuple2(nil, makeString(["%s%s%d%d%d%d%s", at, as, toString(cW), toString(cP), toString(cU), toString(cV), "soon"], e)) | |
683 | 729 | } | |
684 | 730 | ||
685 | 731 | ||
686 | 732 | ||
687 | - | @Callable(ch) | |
688 | - | func usersListTraversal (ay) = { | |
689 | - | let cl = if ((toBase58String(ch.caller.bytes) == valueOrElse(getString(this, J()), ""))) | |
733 | + | @Callable(cl) | |
734 | + | func stakedByUserREADONLY (at,as) = { | |
735 | + | let bs = valueOrElse(getInteger(ar(as, at)), 0) | |
736 | + | $Tuple2(nil, bs) | |
737 | + | } | |
738 | + | ||
739 | + | ||
740 | + | ||
741 | + | @Callable(cl) | |
742 | + | func usersListTraversal (aB) = { | |
743 | + | let cy = if ((toBase58String(cl.caller.bytes) == valueOrElse(getString(this, M()), ""))) | |
690 | 744 | then true | |
691 | - | else | |
692 | - | if (( | |
745 | + | else cm(cl) | |
746 | + | if ((cy == cy)) | |
693 | 747 | then { | |
694 | - | let | |
695 | - | let | |
696 | - | let | |
697 | - | let | |
698 | - | if ($isInstanceOf( | |
748 | + | let be = bc(aB) | |
749 | + | let dt = getString(bb(aB)) | |
750 | + | let bk = getString(bd(be)) | |
751 | + | let n = dt | |
752 | + | if ($isInstanceOf(n, "Unit")) | |
699 | 753 | then { | |
700 | - | let | |
701 | - | if ($isInstanceOf( | |
754 | + | let du = bk | |
755 | + | if ($isInstanceOf(du, "Unit")) | |
702 | 756 | then $Tuple2(nil, false) | |
703 | - | else if ($isInstanceOf( | |
757 | + | else if ($isInstanceOf(du, "String")) | |
704 | 758 | then { | |
705 | - | let | |
706 | - | $Tuple2([StringEntry( | |
759 | + | let dv = du | |
760 | + | $Tuple2([StringEntry(bb(aB), dv)], true) | |
707 | 761 | } | |
708 | 762 | else throw("Match error") | |
709 | 763 | } | |
710 | - | else if ($isInstanceOf( | |
764 | + | else if ($isInstanceOf(n, "String")) | |
711 | 765 | then { | |
712 | - | let aA = k | |
713 | - | let cz = A(this, at(ay, aA)) | |
714 | - | let cA = v(aU, Z(ay)) | |
715 | - | let ca = bQ(ay, aA, cA, 0)._1 | |
716 | - | let cB = (ca - cz) | |
717 | - | let cC = if ((cB > g)) | |
718 | - | then invoke(this, "claimWxINTERNAL", [ay, aA], nil) | |
766 | + | let aD = n | |
767 | + | let ct = D(this, aw(aB, aD)) | |
768 | + | let cp = y(aX, ac(aB)) | |
769 | + | let ce = bU(aB, aD, cp, 0)._1 | |
770 | + | let cu = (ce - ct) | |
771 | + | let cv = true | |
772 | + | let cw = if ((cu > g)) | |
773 | + | then invoke(this, "claimWxINTERNAL", [aB, aD, cv], nil) | |
719 | 774 | else unit | |
720 | - | if (( | |
775 | + | if ((cw == cw)) | |
721 | 776 | then { | |
722 | - | let | |
723 | - | let | |
724 | - | if ($isInstanceOf( | |
725 | - | then $Tuple2([DeleteEntry( | |
726 | - | else if ($isInstanceOf( | |
777 | + | let dw = getString(bi(be, aD)) | |
778 | + | let du = dw | |
779 | + | if ($isInstanceOf(du, "Unit")) | |
780 | + | then $Tuple2([DeleteEntry(bb(aB))], false) | |
781 | + | else if ($isInstanceOf(du, "String")) | |
727 | 782 | then { | |
728 | - | let | |
729 | - | $Tuple2([StringEntry( | |
783 | + | let dx = du | |
784 | + | $Tuple2([StringEntry(bb(aB), dx)], true) | |
730 | 785 | } | |
731 | 786 | else throw("Match error") | |
732 | 787 | } | |
739 | 794 | ||
740 | 795 | ||
741 | 796 | ||
742 | - | @Callable( | |
743 | - | func onModifyWeight ( | |
797 | + | @Callable(cl) | |
798 | + | func onModifyWeight (at,bx) = if ((cl.caller != aX)) | |
744 | 799 | then throw("permissions denied") | |
745 | 800 | else { | |
746 | - | let | |
747 | - | let | |
748 | - | let | |
749 | - | let | |
750 | - | | |
801 | + | let dy = bw(at, bx, 0) | |
802 | + | let bu = dy._1 | |
803 | + | let bW = dy._2 | |
804 | + | let bX = dy._3 | |
805 | + | bW | |
751 | 806 | } | |
752 | 807 | ||
753 | 808 | ||
754 | - | @Verifier( | |
755 | - | func | |
756 | - | let | |
757 | - | let | |
758 | - | if ($isInstanceOf( | |
809 | + | @Verifier(dz) | |
810 | + | func dA () = { | |
811 | + | let dB = { | |
812 | + | let n = ch() | |
813 | + | if ($isInstanceOf(n, "ByteVector")) | |
759 | 814 | then { | |
760 | - | let | |
761 | - | | |
815 | + | let cn = n | |
816 | + | cn | |
762 | 817 | } | |
763 | - | else if ($isInstanceOf( | |
764 | - | then | |
818 | + | else if ($isInstanceOf(n, "Unit")) | |
819 | + | then dz.senderPublicKey | |
765 | 820 | else throw("Match error") | |
766 | 821 | } | |
767 | - | sigVerify( | |
822 | + | sigVerify(dz.bodyBytes, dz.proofs[0], dB) | |
768 | 823 | } | |
769 | 824 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 8 | |
5 | 5 | ||
6 | 6 | let b = 100000000 | |
7 | 7 | ||
8 | 8 | let c = 18 | |
9 | 9 | ||
10 | 10 | let d = toBigInt(1000000000000000000) | |
11 | 11 | ||
12 | 12 | let e = "__" | |
13 | 13 | ||
14 | 14 | let f = b | |
15 | 15 | ||
16 | 16 | let g = toBigInt(0) | |
17 | 17 | ||
18 | 18 | let h = toBigInt(1) | |
19 | 19 | ||
20 | - | func i (j) = { | |
21 | - | let k = j | |
22 | - | if ($isInstanceOf(k, "List[Any]")) | |
20 | + | func i (j) = makeString(["staking.ride:", toString(this), j], " ") | |
21 | + | ||
22 | + | ||
23 | + | func k (j) = throw(i(j)) | |
24 | + | ||
25 | + | ||
26 | + | func l (m) = { | |
27 | + | let n = m | |
28 | + | if ($isInstanceOf(n, "List[Any]")) | |
23 | 29 | then { | |
24 | - | let | |
25 | - | | |
30 | + | let o = n | |
31 | + | o | |
26 | 32 | } | |
27 | 33 | else throw("fail to cast into List[Any]") | |
28 | 34 | } | |
29 | 35 | ||
30 | 36 | ||
31 | - | func | |
32 | - | let | |
33 | - | if ($isInstanceOf( | |
37 | + | func p (m) = { | |
38 | + | let n = m | |
39 | + | if ($isInstanceOf(n, "Int")) | |
34 | 40 | then { | |
35 | - | let | |
36 | - | | |
41 | + | let q = n | |
42 | + | q | |
37 | 43 | } | |
38 | 44 | else throw("fail to cast into Int") | |
39 | 45 | } | |
40 | 46 | ||
41 | 47 | ||
42 | - | func | |
43 | - | let | |
44 | - | if ($isInstanceOf( | |
48 | + | func r (m) = { | |
49 | + | let n = m | |
50 | + | if ($isInstanceOf(n, "String")) | |
45 | 51 | then { | |
46 | - | let | |
47 | - | | |
52 | + | let s = n | |
53 | + | s | |
48 | 54 | } | |
49 | 55 | else throw("fail to cast into Int") | |
50 | 56 | } | |
51 | 57 | ||
52 | 58 | ||
53 | - | func | |
54 | - | let | |
55 | - | if ($isInstanceOf( | |
59 | + | func t (m) = { | |
60 | + | let n = m | |
61 | + | if ($isInstanceOf(n, "ByteVector")) | |
56 | 62 | then { | |
57 | - | let | |
58 | - | | |
63 | + | let u = n | |
64 | + | u | |
59 | 65 | } | |
60 | 66 | else throw("fail to cast into Int") | |
61 | 67 | } | |
62 | 68 | ||
63 | 69 | ||
64 | - | func | |
70 | + | func v (w,x) = valueOrErrorMessage(getString(w, x), (("mandatory this." + x) + " is not defined")) | |
65 | 71 | ||
66 | 72 | ||
67 | - | func | |
73 | + | func y (w,x) = valueOrErrorMessage(getString(w, x), (((("mandatory " + toString(w)) + ".") + x) + " is not defined")) | |
68 | 74 | ||
69 | 75 | ||
70 | - | func | |
76 | + | func z (w,x) = valueOrElse(getInteger(w, x), 0) | |
71 | 77 | ||
72 | 78 | ||
73 | - | func | |
79 | + | func A (w,x,B) = valueOrElse(getInteger(w, x), B) | |
74 | 80 | ||
75 | 81 | ||
76 | - | func | |
82 | + | func C (w,x) = valueOrErrorMessage(getInteger(w, x), (("mandatory this." + x) + " is not defined")) | |
77 | 83 | ||
78 | 84 | ||
79 | - | func | |
85 | + | func D (w,x) = value(parseBigInt(valueOrElse(getString(w, x), "0"))) | |
80 | 86 | ||
81 | 87 | ||
82 | - | func | |
83 | - | let | |
84 | - | if ($isInstanceOf( | |
88 | + | func E (w,x,B) = { | |
89 | + | let n = getString(w, x) | |
90 | + | if ($isInstanceOf(n, "String")) | |
85 | 91 | then { | |
86 | - | let | |
87 | - | value(parseBigInt( | |
92 | + | let F = n | |
93 | + | value(parseBigInt(F)) | |
88 | 94 | } | |
89 | - | else if ($isInstanceOf( | |
90 | - | then | |
95 | + | else if ($isInstanceOf(n, "Unit")) | |
96 | + | then B | |
91 | 97 | else throw("Match error") | |
92 | 98 | } | |
93 | 99 | ||
94 | 100 | ||
95 | - | func | |
101 | + | func G (H,I) = fraction(toBigInt(H), d, toBigInt(I)) | |
96 | 102 | ||
97 | 103 | ||
98 | - | func | |
104 | + | func J (m,K) = toInt(fraction(m, toBigInt(K), d)) | |
99 | 105 | ||
100 | 106 | ||
101 | - | func | |
107 | + | func L () = "%s%s__config__factoryAddress" | |
102 | 108 | ||
103 | 109 | ||
104 | - | func | |
110 | + | func M () = "%s__votingEmissionContract" | |
105 | 111 | ||
106 | 112 | ||
107 | - | let | |
113 | + | let N = 1 | |
108 | 114 | ||
109 | - | let | |
115 | + | let O = 2 | |
110 | 116 | ||
111 | - | let | |
117 | + | let P = 3 | |
112 | 118 | ||
113 | - | let | |
119 | + | let Q = 4 | |
114 | 120 | ||
115 | - | let | |
121 | + | let R = 5 | |
116 | 122 | ||
117 | - | let | |
123 | + | let S = 6 | |
118 | 124 | ||
119 | - | let | |
125 | + | let T = 7 | |
120 | 126 | ||
121 | - | func | |
127 | + | func U () = "%s__factoryConfig" | |
122 | 128 | ||
123 | 129 | ||
124 | - | func | |
130 | + | func V () = "%s__managerPublicKey" | |
125 | 131 | ||
126 | 132 | ||
127 | - | func | |
133 | + | func W () = "%s__pendingManagerPublicKey" | |
128 | 134 | ||
129 | 135 | ||
130 | - | func | |
136 | + | func X () = "%s__stablePoolAddonAddr" | |
131 | 137 | ||
132 | 138 | ||
133 | - | func | |
139 | + | func Y () = "%s__addonAddr" | |
134 | 140 | ||
135 | 141 | ||
136 | - | func | |
142 | + | func Z (aa) = makeString(["%s%s%s", aa, "mappings__lpAsset2PoolContract"], e) | |
137 | 143 | ||
138 | 144 | ||
139 | - | func | |
145 | + | func ab () = "%s__lpTokensList" | |
140 | 146 | ||
141 | 147 | ||
142 | - | func | |
148 | + | func ac (aa) = makeString(["%s%s%s", aa, "mappings__lpAsset2PoolContract"], e) | |
143 | 149 | ||
144 | 150 | ||
145 | - | func | |
151 | + | func ad (ae) = makeString(["%s%s", "poolWeight", ae], e) | |
146 | 152 | ||
147 | 153 | ||
148 | - | func | |
154 | + | func af (ag) = split(valueOrElse(getString(ag, ab()), ""), e) | |
149 | 155 | ||
150 | 156 | ||
151 | - | func | |
157 | + | func ah (ag) = split(y(ag, U()), e) | |
152 | 158 | ||
153 | 159 | ||
154 | - | func | |
160 | + | func ai (aj) = addressFromStringValue(aj[O]) | |
155 | 161 | ||
156 | 162 | ||
157 | - | func | |
163 | + | func ak (aj) = addressFromStringValue(aj[R]) | |
158 | 164 | ||
159 | 165 | ||
160 | - | func | |
166 | + | func al (aj) = addressFromStringValue(aj[N]) | |
161 | 167 | ||
162 | 168 | ||
163 | - | func | |
169 | + | func am () = "%s%s__ratePerBlock__current" | |
164 | 170 | ||
165 | 171 | ||
166 | - | func | |
172 | + | func an () = "%s%s__ratePerBlockMax__current" | |
167 | 173 | ||
168 | 174 | ||
169 | - | func | |
175 | + | func ao () = "%s%s__emission__startBlock" | |
170 | 176 | ||
171 | 177 | ||
172 | - | func | |
178 | + | func ap () = "%s%s__emission__duration" | |
173 | 179 | ||
174 | 180 | ||
175 | - | func | |
181 | + | func aq () = "%s%s__emission__endBlock" | |
176 | 182 | ||
177 | 183 | ||
178 | - | func | |
184 | + | func ar (as,at) = makeString(["%s%s%s__staked", as, at], e) | |
179 | 185 | ||
180 | 186 | ||
181 | - | func | |
187 | + | func au (at) = ("%s%s%s__staked__total__" + at) | |
182 | 188 | ||
183 | 189 | ||
184 | - | func | |
190 | + | func av (at,as) = makeString(["%s%s%s__claimed", as, at], e) | |
185 | 191 | ||
186 | 192 | ||
187 | - | func | |
193 | + | func aw (at,as) = makeString(["%s%s%s__claimedMinReward", as, at], e) | |
188 | 194 | ||
189 | 195 | ||
190 | - | func | |
196 | + | func ax (at,as) = makeString(["%s%s%s__claimedBoostReward", as, at], e) | |
191 | 197 | ||
192 | 198 | ||
193 | - | func | |
199 | + | func ay (at) = makeString(["%s%s%s__claimed__total", at], e) | |
194 | 200 | ||
195 | 201 | ||
196 | - | func | |
202 | + | func az (x) = valueOrElse(getInteger(this, x), 0) | |
197 | 203 | ||
198 | 204 | ||
199 | - | func | |
205 | + | func aA (aB) = makeString(["%s%s%s", aB, "total", "bal"], e) | |
200 | 206 | ||
201 | 207 | ||
202 | - | func | |
208 | + | func aC (aB,aD) = makeString(["%s%s%s", aB, aD, "bal"], e) | |
203 | 209 | ||
204 | 210 | ||
205 | - | func | |
211 | + | func aE (aB) = makeString(["%s%s%s", aB, "total", "balINT"], e) | |
206 | 212 | ||
207 | 213 | ||
208 | - | func | |
214 | + | func aF (aB,aD) = makeString(["%s%s%s", aB, aD, "balINT"], e) | |
209 | 215 | ||
210 | 216 | ||
211 | - | func | |
217 | + | func aG (aB) = makeString(["%s%s%s", aB, "total", "lastUpd"], e) | |
212 | 218 | ||
213 | 219 | ||
214 | - | func | |
220 | + | func aH (aB,aD) = makeString(["%s%s%s", aB, aD, "lastUpd"], e) | |
215 | 221 | ||
216 | 222 | ||
217 | - | func | |
223 | + | func aI (aB) = makeString(["%s%s%s%s", aB, "common", "lpInt"], e) | |
218 | 224 | ||
219 | 225 | ||
220 | - | func | |
226 | + | func aJ (aB) = makeString(["%s%s%s%s", aB, "common", "lpIntH"], e) | |
221 | 227 | ||
222 | 228 | ||
223 | - | func | |
229 | + | func aK (aB,aD) = makeString(["%s%s%s%s", aB, aD, "lpInt"], e) | |
224 | 230 | ||
225 | 231 | ||
226 | - | func | |
232 | + | func aL (aB,aD) = makeString(["%s%s%s%s", aB, aD, "lpIntH"], e) | |
227 | 233 | ||
228 | 234 | ||
229 | - | func | |
235 | + | func aM (aB) = makeString(["%s", aB, "wxPerLp"], e) | |
230 | 236 | ||
231 | 237 | ||
232 | - | func | |
238 | + | func aN (aB) = makeString(["%s", aB, "wxPerLpX18"], e) | |
233 | 239 | ||
234 | 240 | ||
235 | - | func | |
241 | + | func aO (aB,aD) = makeString(["%s%s%s%s", aB, aD, "uIntL"], e) | |
236 | 242 | ||
237 | 243 | ||
238 | - | func | |
244 | + | func aP (aQ,aD,aR) = makeString(["%s%s%s%s__history", aQ, aD, aR], e) | |
239 | 245 | ||
240 | 246 | ||
241 | - | func | |
247 | + | func aS (aD,aB,aQ,aT) = makeString(["%s%s%s%d%d%d", aD, aB, aQ, toString(height), toString(lastBlock.timestamp), toString(aT)], e) | |
242 | 248 | ||
243 | 249 | ||
244 | - | func | |
250 | + | func aU (aQ,aD,aB,aT,aV) = StringEntry(aP(aQ, aD, toBase58String(aV)), aS(aD, aB, aQ, aT)) | |
245 | 251 | ||
246 | 252 | ||
247 | - | let | |
253 | + | let aW = v(this, L()) | |
248 | 254 | ||
249 | - | let | |
255 | + | let aX = addressFromStringValue(aW) | |
250 | 256 | ||
251 | - | let | |
257 | + | let aj = ah(aX) | |
252 | 258 | ||
253 | - | let | |
259 | + | let aY = ak(aj) | |
254 | 260 | ||
255 | - | let | |
261 | + | let aZ = ai(aj) | |
256 | 262 | ||
257 | - | func aX (ay) = makeString(["%s%s", ay, "nextUser"], e) | |
263 | + | let ba = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(makeString(["%s", "lpStakingPoolsContract"], e)), i("lp_staking_pools contract address is undefined"))), i("invalid lp_staking_pools contract address")) | |
264 | + | ||
265 | + | func bb (aB) = makeString(["%s%s", aB, "nextUser"], e) | |
258 | 266 | ||
259 | 267 | ||
260 | - | func | |
268 | + | func bc (aB) = makeString(["users", aB], e) | |
261 | 269 | ||
262 | 270 | ||
263 | - | func | |
271 | + | func bd (be) = makeString(["%s%s%s", be, "head"], e) | |
264 | 272 | ||
265 | 273 | ||
266 | - | func | |
274 | + | func bf (be) = makeString(["%s%s%s", be, "size"], e) | |
267 | 275 | ||
268 | 276 | ||
269 | - | func | |
277 | + | func bg (be,bh) = makeString(["%s%s%s%s", be, bh, "prev"], e) | |
270 | 278 | ||
271 | 279 | ||
272 | - | func | |
280 | + | func bi (be,bh) = makeString(["%s%s%s%s", be, bh, "next"], e) | |
273 | 281 | ||
274 | 282 | ||
275 | - | func | |
276 | - | let | |
277 | - | let | |
278 | - | let | |
279 | - | if (if (( | |
283 | + | func bj (be,bh) = { | |
284 | + | let bk = getString(this, bd(be)) | |
285 | + | let bl = getString(this, bg(be, bh)) | |
286 | + | let bm = getString(this, bi(be, bh)) | |
287 | + | if (if ((bh == valueOrElse(bk, ""))) | |
280 | 288 | then true | |
281 | - | else ( | |
289 | + | else (bl != unit)) | |
282 | 290 | then true | |
283 | - | else ( | |
291 | + | else (bm != unit) | |
284 | 292 | } | |
285 | 293 | ||
286 | 294 | ||
287 | - | func | |
288 | - | let | |
289 | - | let | |
290 | - | let | |
295 | + | func bn (be,bh) = { | |
296 | + | let bk = getString(this, bd(be)) | |
297 | + | let bo = valueOrElse(getInteger(this, bf(be)), 0) | |
298 | + | let bp = if (!(bj(be, bh))) | |
291 | 299 | then true | |
292 | 300 | else throw("Node exists") | |
293 | - | if (( | |
294 | - | then (([IntegerEntry( | |
295 | - | then [StringEntry(be | |
296 | - | else nil)) ++ [StringEntry( | |
301 | + | if ((bp == bp)) | |
302 | + | then (([IntegerEntry(bf(be), (bo + 1))] ++ (if ((bk != unit)) | |
303 | + | then [StringEntry(bi(be, bh), value(bk)), StringEntry(bg(be, value(bk)), bh)] | |
304 | + | else nil)) ++ [StringEntry(bd(be), bh)]) | |
297 | 305 | else throw("Strict value is not equal to itself.") | |
298 | 306 | } | |
299 | 307 | ||
300 | 308 | ||
301 | - | func | |
302 | - | let | |
303 | - | let | |
304 | - | let | |
305 | - | let | |
306 | - | ([IntegerEntry( | |
307 | - | then ( | |
309 | + | func bq (be,bh) = { | |
310 | + | let bk = getString(this, bd(be)) | |
311 | + | let bo = valueOrElse(getInteger(this, bf(be)), 0) | |
312 | + | let bl = getString(this, bg(be, bh)) | |
313 | + | let bm = getString(this, bi(be, bh)) | |
314 | + | ([IntegerEntry(bf(be), (bo - 1))] ++ (if (if ((bl != unit)) | |
315 | + | then (bm != unit) | |
308 | 316 | else false) | |
309 | - | then [StringEntry(be | |
310 | - | else if (( | |
311 | - | then [StringEntry( | |
312 | - | else if (( | |
313 | - | then [DeleteEntry( | |
314 | - | else if (( | |
315 | - | then [DeleteEntry( | |
316 | - | else throw(((("invalid node: " + | |
317 | + | then [StringEntry(bi(be, value(bl)), value(bm)), StringEntry(bg(be, value(bm)), value(bl)), DeleteEntry(bg(be, bh)), DeleteEntry(bi(be, bh))] | |
318 | + | else if ((bm != unit)) | |
319 | + | then [StringEntry(bd(be), value(bm)), DeleteEntry(bi(be, bh)), DeleteEntry(bg(be, value(bm)))] | |
320 | + | else if ((bl != unit)) | |
321 | + | then [DeleteEntry(bg(be, bh)), DeleteEntry(bi(be, value(bl)))] | |
322 | + | else if ((bh == valueOrElse(bk, ""))) | |
323 | + | then [DeleteEntry(bd(be))] | |
324 | + | else throw(((("invalid node: " + be) + ".") + bh)))) | |
317 | 325 | } | |
318 | 326 | ||
319 | 327 | ||
320 | - | func | |
321 | - | then ( | |
328 | + | func br (bs,bt,bu,bv) = if (if ((bt == g)) | |
329 | + | then (bs > g) | |
322 | 330 | else false) | |
323 | 331 | then g | |
324 | - | else if (( | |
325 | - | then | |
326 | - | else if (if (( | |
327 | - | then ( | |
332 | + | else if ((bs == g)) | |
333 | + | then bu | |
334 | + | else if (if ((bt > g)) | |
335 | + | then (bs > g) | |
328 | 336 | else false) | |
329 | - | then value(parseBigInt( | |
337 | + | then value(parseBigInt(v(this, bv))) | |
330 | 338 | else throw("calcWxPerLpIntegralUserLast: unexpected state") | |
331 | 339 | ||
332 | 340 | ||
333 | - | func | |
334 | - | let | |
335 | - | let | |
336 | - | let | |
341 | + | func bw (at,bx,by) = { | |
342 | + | let bz = au(at) | |
343 | + | let bA = toBigInt(az(bz)) | |
344 | + | let bB = if ((bA == g)) | |
337 | 345 | then h | |
338 | - | else | |
339 | - | let | |
340 | - | let | |
341 | - | let | |
342 | - | let | |
343 | - | let | |
344 | - | let | |
345 | - | let | |
346 | - | let | |
347 | - | let | |
348 | - | let | |
349 | - | let | |
350 | - | let | |
351 | - | let | |
352 | - | then toBigInt( | |
353 | - | else fraction(toBigInt( | |
354 | - | let | |
355 | - | let | |
346 | + | else bA | |
347 | + | let bC = getIntegerValue(aX, ad(bx)) | |
348 | + | let bD = C(aY, ao()) | |
349 | + | let bE = 1000 | |
350 | + | let bF = (C(aY, am()) * bE) | |
351 | + | let bG = fraction(bF, bC, (f * 3)) | |
352 | + | let bH = aI(at) | |
353 | + | let bI = aJ(at) | |
354 | + | let bJ = aM(at) | |
355 | + | let bK = A(this, bI, bD) | |
356 | + | let bL = D(this, bH) | |
357 | + | let bM = 0 | |
358 | + | let bN = max([(height - bK), 0]) | |
359 | + | let bO = if ((bM != 0)) | |
360 | + | then toBigInt(bM) | |
361 | + | else fraction(toBigInt(bG), toBigInt(b), bB) | |
362 | + | let bP = (bA + toBigInt(by)) | |
363 | + | let bQ = if ((bP == g)) | |
356 | 364 | then h | |
357 | - | else | |
358 | - | let | |
359 | - | let | |
360 | - | let | |
361 | - | let | |
362 | - | $Tuple3( | |
365 | + | else bP | |
366 | + | let bu = (bL + (bO * toBigInt(bN))) | |
367 | + | let bR = (toBigInt(bG) / bQ) | |
368 | + | let bS = height | |
369 | + | let bT = makeString([toString(bu), toString(bN), toString(bO), toString(bA), toString(bG), toString(bF), toString(bC)], "::") | |
370 | + | $Tuple3(bu, [StringEntry(bH, toString(bu)), IntegerEntry(bI, bS), StringEntry(bJ, toString(bR))], bT) | |
363 | 371 | } | |
364 | 372 | ||
365 | 373 | ||
366 | - | func | |
367 | - | let | |
368 | - | let | |
369 | - | let | |
370 | - | let | |
371 | - | let | |
372 | - | let | |
373 | - | let | |
374 | - | let | |
375 | - | let | |
376 | - | let | |
377 | - | let | |
378 | - | let | |
379 | - | let | |
380 | - | let | |
381 | - | let | |
382 | - | let | |
383 | - | let | |
384 | - | let | |
385 | - | $Tuple3( | |
374 | + | func bU (at,as,bx,by) = { | |
375 | + | let bV = bw(at, bx, by) | |
376 | + | let bu = bV._1 | |
377 | + | let bW = bV._2 | |
378 | + | let bX = bV._3 | |
379 | + | let bE = 1000 | |
380 | + | let bY = ar(as, at) | |
381 | + | let bs = az(bY) | |
382 | + | let bZ = aK(at, as) | |
383 | + | let ca = aL(at, as) | |
384 | + | let bv = aO(at, as) | |
385 | + | let cb = D(this, bZ) | |
386 | + | let bt = z(this, ca) | |
387 | + | let cc = br(toBigInt(bs), toBigInt(bt), bu, bv) | |
388 | + | let cd = (b * bE) | |
389 | + | let ce = max([(cb + fraction((bu - cc), toBigInt(bs), toBigInt(cd))), g]) | |
390 | + | let cf = bu | |
391 | + | let cg = height | |
392 | + | let bT = makeString([toString(cb), toString(cc), toString(bs), bX, toString(height)], "::") | |
393 | + | $Tuple3(ce, (bW ++ [StringEntry(bZ, toString(ce)), IntegerEntry(ca, cg), StringEntry(bv, toString(cf))]), bT) | |
386 | 394 | } | |
387 | 395 | ||
388 | 396 | ||
389 | - | func | |
390 | - | let | |
391 | - | if ($isInstanceOf( | |
397 | + | func ch () = { | |
398 | + | let n = getString(V()) | |
399 | + | if ($isInstanceOf(n, "String")) | |
392 | 400 | then { | |
393 | - | let | |
394 | - | fromBase58String( | |
401 | + | let F = n | |
402 | + | fromBase58String(F) | |
395 | 403 | } | |
396 | - | else if ($isInstanceOf( | |
404 | + | else if ($isInstanceOf(n, "Unit")) | |
397 | 405 | then unit | |
398 | 406 | else throw("Match error") | |
399 | 407 | } | |
400 | 408 | ||
401 | 409 | ||
402 | - | func | |
403 | - | let | |
404 | - | if ($isInstanceOf( | |
410 | + | func ci () = { | |
411 | + | let n = getString(W()) | |
412 | + | if ($isInstanceOf(n, "String")) | |
405 | 413 | then { | |
406 | - | let | |
407 | - | fromBase58String( | |
414 | + | let F = n | |
415 | + | fromBase58String(F) | |
408 | 416 | } | |
409 | - | else if ($isInstanceOf( | |
417 | + | else if ($isInstanceOf(n, "Unit")) | |
410 | 418 | then unit | |
411 | 419 | else throw("Match error") | |
412 | 420 | } | |
413 | 421 | ||
414 | 422 | ||
415 | - | let | |
423 | + | let cj = throw("Permission denied") | |
416 | 424 | ||
417 | - | func | |
425 | + | func ck (cl) = if ((cl.caller == this)) | |
418 | 426 | then true | |
419 | - | else | |
427 | + | else cj | |
420 | 428 | ||
421 | 429 | ||
422 | - | func | |
423 | - | let | |
424 | - | if ($isInstanceOf( | |
430 | + | func cm (cl) = { | |
431 | + | let n = ch() | |
432 | + | if ($isInstanceOf(n, "ByteVector")) | |
425 | 433 | then { | |
426 | - | let | |
427 | - | if (( | |
434 | + | let cn = n | |
435 | + | if ((cl.callerPublicKey == cn)) | |
428 | 436 | then true | |
429 | - | else | |
437 | + | else cj | |
430 | 438 | } | |
431 | - | else if ($isInstanceOf( | |
432 | - | then if (( | |
439 | + | else if ($isInstanceOf(n, "Unit")) | |
440 | + | then if ((cl.caller == this)) | |
433 | 441 | then true | |
434 | - | else | |
442 | + | else cj | |
435 | 443 | else throw("Match error") | |
436 | 444 | } | |
437 | 445 | ||
438 | 446 | ||
439 | - | @Callable(ch) | |
440 | - | func constructor (ck) = { | |
441 | - | let cl = ci(ch) | |
442 | - | if ((cl == cl)) | |
443 | - | then [StringEntry(I(), ck)] | |
447 | + | func co (cl,aB,cp,aD,cq,aT) = { | |
448 | + | let as = toString(aD) | |
449 | + | let at = toBase58String(aB) | |
450 | + | let bx = toString(cp) | |
451 | + | let bY = ar(as, at) | |
452 | + | let bz = au(at) | |
453 | + | let bs = az(bY) | |
454 | + | let bA = az(bz) | |
455 | + | let cr = bU(at, as, bx, -(aT))._2 | |
456 | + | let be = bc(at) | |
457 | + | let cs = if (if (bj(be, as)) | |
458 | + | then (aT == bs) | |
459 | + | else false) | |
460 | + | then bq(be, as) | |
461 | + | else nil | |
462 | + | let ct = D(this, aw(at, as)) | |
463 | + | let ce = bU(at, as, bx, 0)._1 | |
464 | + | let cu = (ce - ct) | |
465 | + | let cv = true | |
466 | + | let cw = if ((cu > g)) | |
467 | + | then invoke(this, "claimWxINTERNAL", [at, as, cv], nil) | |
468 | + | else unit | |
469 | + | if ((cw == cw)) | |
470 | + | then if ((aT > bs)) | |
471 | + | then throw(((((((("passed amount=" + toString(aT)) + " is greater than available=") + toString(bs)) + ". lpAssetId=") + at) + ". stakedByUserKEY=") + bY)) | |
472 | + | else (([IntegerEntry(bY, (bs - aT)), IntegerEntry(bz, (bA - aT)), ScriptTransfer(cq, aT, aB), aU("unstake", as, at, aT, cl.transactionId)] ++ cr) ++ cs) | |
473 | + | else throw("Strict value is not equal to itself.") | |
474 | + | } | |
475 | + | ||
476 | + | ||
477 | + | @Callable(cl) | |
478 | + | func constructor (cx) = { | |
479 | + | let cy = cm(cl) | |
480 | + | if ((cy == cy)) | |
481 | + | then [StringEntry(L(), cx)] | |
444 | 482 | else throw("Strict value is not equal to itself.") | |
445 | 483 | } | |
446 | 484 | ||
447 | 485 | ||
448 | 486 | ||
449 | - | @Callable( | |
450 | - | func constructorV2 ( | |
451 | - | let | |
487 | + | @Callable(cl) | |
488 | + | func constructorV2 (cz) = { | |
489 | + | let cA = [cm(cl), if ((addressFromString(cz) != unit)) | |
452 | 490 | then true | |
453 | 491 | else "invalid voting emission contract address"] | |
454 | - | if (( | |
455 | - | then [StringEntry( | |
492 | + | if ((cA == cA)) | |
493 | + | then [StringEntry(M(), cz)] | |
456 | 494 | else throw("Strict value is not equal to itself.") | |
457 | 495 | } | |
458 | 496 | ||
459 | 497 | ||
460 | 498 | ||
461 | - | @Callable( | |
462 | - | func setManager ( | |
463 | - | let | |
464 | - | if (( | |
499 | + | @Callable(cl) | |
500 | + | func setManager (cB) = { | |
501 | + | let cy = cm(cl) | |
502 | + | if ((cy == cy)) | |
465 | 503 | then { | |
466 | - | let | |
467 | - | if (( | |
468 | - | then [StringEntry( | |
504 | + | let cC = fromBase58String(cB) | |
505 | + | if ((cC == cC)) | |
506 | + | then [StringEntry(W(), cB)] | |
469 | 507 | else throw("Strict value is not equal to itself.") | |
470 | 508 | } | |
471 | 509 | else throw("Strict value is not equal to itself.") | |
472 | 510 | } | |
473 | 511 | ||
474 | 512 | ||
475 | 513 | ||
476 | - | @Callable( | |
514 | + | @Callable(cl) | |
477 | 515 | func confirmManager () = { | |
478 | - | let | |
479 | - | let | |
516 | + | let cD = ci() | |
517 | + | let cE = if (isDefined(cD)) | |
480 | 518 | then true | |
481 | 519 | else throw("No pending manager") | |
482 | - | if (( | |
520 | + | if ((cE == cE)) | |
483 | 521 | then { | |
484 | - | let | |
522 | + | let cF = if ((cl.callerPublicKey == value(cD))) | |
485 | 523 | then true | |
486 | 524 | else throw("You are not pending manager") | |
487 | - | if (( | |
488 | - | then [StringEntry( | |
525 | + | if ((cF == cF)) | |
526 | + | then [StringEntry(V(), toBase58String(value(cD))), DeleteEntry(W())] | |
489 | 527 | else throw("Strict value is not equal to itself.") | |
490 | 528 | } | |
491 | 529 | else throw("Strict value is not equal to itself.") | |
492 | 530 | } | |
493 | 531 | ||
494 | 532 | ||
495 | 533 | ||
496 | - | @Callable( | |
497 | - | func stake () = if ((size( | |
534 | + | @Callable(cl) | |
535 | + | func stake () = if ((size(cl.payments) != 1)) | |
498 | 536 | then throw("invalid payment - exact one payment must be attached") | |
499 | 537 | else { | |
500 | - | let | |
501 | - | let | |
502 | - | let | |
503 | - | let | |
504 | - | let | |
505 | - | let | |
506 | - | let | |
507 | - | then toString( | |
508 | - | else | |
509 | - | let | |
510 | - | let | |
511 | - | let | |
512 | - | let | |
513 | - | let | |
514 | - | let | |
515 | - | let | |
516 | - | let | |
517 | - | let | |
518 | - | let | |
538 | + | let cG = cl.payments[0] | |
539 | + | let aB = value(cG.assetId) | |
540 | + | let at = toBase58String(aB) | |
541 | + | let aT = cG.amount | |
542 | + | let bx = valueOrErrorMessage(getString(aX, Z(at)), ("unsupported lp asset " + at)) | |
543 | + | let cH = toString(cl.caller) | |
544 | + | let as = if ((cH == bx)) | |
545 | + | then toString(cl.originCaller) | |
546 | + | else cH | |
547 | + | let bY = ar(as, at) | |
548 | + | let bz = au(at) | |
549 | + | let bs = az(bY) | |
550 | + | let bA = az(bz) | |
551 | + | let cI = bU(at, as, bx, aT) | |
552 | + | let ce = cI._1 | |
553 | + | let cr = cI._2 | |
554 | + | let bT = cI._3 | |
555 | + | let be = bc(at) | |
556 | + | let cs = if (bj(be, as)) | |
519 | 557 | then nil | |
520 | - | else | |
521 | - | (([IntegerEntry( | |
558 | + | else bn(be, as) | |
559 | + | (([IntegerEntry(bY, (bs + aT)), IntegerEntry(bz, (bA + aT)), aU("stake", as, at, aT, cl.transactionId)] ++ cr) ++ cs) | |
522 | 560 | } | |
523 | 561 | ||
524 | 562 | ||
525 | 563 | ||
526 | - | @Callable(ch) | |
527 | - | func unstake (aq,aQ) = { | |
528 | - | let ay = fromBase58String(aq) | |
529 | - | let bt = valueOrErrorMessage(getString(aU, W(aq)), ("unsupported lp asset " + aq)) | |
530 | - | let cy = valueOrElse(getString(addressFromStringValue(bt), V()), bt) | |
531 | - | let cu = toString(ch.caller) | |
532 | - | let ap = if (if ((cu == bt)) | |
564 | + | @Callable(cl) | |
565 | + | func unstake (at,aT) = { | |
566 | + | let aB = fromBase58String(at) | |
567 | + | let bx = valueOrErrorMessage(getString(aX, Z(at)), ("unsupported lp asset " + at)) | |
568 | + | let cp = addressFromStringValue(bx) | |
569 | + | let cJ = valueOrElse(getString(cp, Y()), bx) | |
570 | + | let cH = toString(cl.caller) | |
571 | + | let aD = if (if ((cH == bx)) | |
533 | 572 | then true | |
534 | - | else (cu == cy)) | |
535 | - | then toString(ch.originCaller) | |
536 | - | else cu | |
537 | - | let bU = ao(ap, aq) | |
538 | - | let bv = ar(aq) | |
539 | - | let bo = aw(bU) | |
540 | - | let bw = aw(bv) | |
541 | - | let cw = bQ(aq, ap, bt, -(aQ))._2 | |
542 | - | let ba = aY(aq) | |
543 | - | let cx = if (if (bf(ba, ap)) | |
544 | - | then (aQ == bo) | |
545 | - | else false) | |
546 | - | then bm(ba, ap) | |
547 | - | else nil | |
548 | - | let cz = A(this, at(aq, ap)) | |
549 | - | let cA = v(aU, Z(aq)) | |
550 | - | let ca = bQ(aq, ap, cA, 0)._1 | |
551 | - | let cB = (ca - cz) | |
552 | - | let cC = if ((cB > g)) | |
553 | - | then invoke(this, "claimWxINTERNAL", [aq, ap], nil) | |
554 | - | else unit | |
555 | - | if ((cC == cC)) | |
556 | - | then if ((aQ > bo)) | |
557 | - | then throw(((((((("passed amount=" + toString(aQ)) + " is greater than available=") + toString(bo)) + ". lpAssetId=") + aq) + ". stakedByUserKEY=") + bU)) | |
558 | - | else (([IntegerEntry(bU, (bo - aQ)), IntegerEntry(bv, (bw - aQ)), ScriptTransfer(ch.caller, aQ, ay), aR("unstake", ap, aq, aQ, ch.transactionId)] ++ cw) ++ cx) | |
573 | + | else (cH == cJ)) | |
574 | + | then cl.originCaller | |
575 | + | else cl.caller | |
576 | + | let cq = cl.caller | |
577 | + | co(cl, aB, cp, aD, cq, aT) | |
578 | + | } | |
579 | + | ||
580 | + | ||
581 | + | ||
582 | + | @Callable(cl) | |
583 | + | func unstakeINTERNAL (aB,aT,aD,cq) = { | |
584 | + | let at = toBase58String(aB) | |
585 | + | let cp = addressFromStringValue(valueOrErrorMessage(getString(aX, Z(at)), ("unsupported lp asset " + at))) | |
586 | + | let cy = if ((cl.caller == cp)) | |
587 | + | then true | |
588 | + | else cj | |
589 | + | if ((cy == cy)) | |
590 | + | then co(cl, aB, cp, Address(aD), Address(cq), aT) | |
559 | 591 | else throw("Strict value is not equal to itself.") | |
560 | 592 | } | |
561 | 593 | ||
562 | 594 | ||
563 | 595 | ||
564 | - | @Callable(ch) | |
565 | - | func claimWx (aq) = { | |
566 | - | let ap = toString(ch.caller) | |
567 | - | let cD = invoke(this, "claimWxINTERNAL", [aq, ap], nil) | |
568 | - | $Tuple2(nil, cD) | |
596 | + | @Callable(cl) | |
597 | + | func claimWx (at) = { | |
598 | + | let as = toString(cl.caller) | |
599 | + | let cv = true | |
600 | + | let cK = invoke(this, "claimWxINTERNAL", [at, as, cv], nil) | |
601 | + | $Tuple2(nil, cK) | |
569 | 602 | } | |
570 | 603 | ||
571 | 604 | ||
572 | 605 | ||
573 | - | @Callable(ch) | |
574 | - | func claimWxINTERNAL (aq,ap) = { | |
575 | - | let cl = cg(ch) | |
576 | - | if ((cl == cl)) | |
606 | + | @Callable(cl) | |
607 | + | func claimWxDoNotThrow (at) = { | |
608 | + | let as = toString(cl.caller) | |
609 | + | let cv = false | |
610 | + | let cK = invoke(this, "claimWxINTERNAL", [at, as, cv], nil) | |
611 | + | $Tuple2(nil, cK) | |
612 | + | } | |
613 | + | ||
614 | + | ||
615 | + | ||
616 | + | @Callable(cl) | |
617 | + | func claimWxINTERNAL (at,as,cv) = { | |
618 | + | let cy = ck(cl) | |
619 | + | if ((cy == cy)) | |
577 | 620 | then { | |
578 | - | let aA = valueOrErrorMessage(addressFromString(ap), "claimWxINTERNAL: invalid user address") | |
579 | - | let bt = v(aU, Z(aq)) | |
580 | - | let cE = as(aq, ap) | |
581 | - | let cF = av(aq) | |
582 | - | let cG = at(aq, ap) | |
583 | - | let cH = au(aq, ap) | |
584 | - | let cI = A(this, cE) | |
585 | - | let cz = A(this, cG) | |
586 | - | let cJ = A(this, cH) | |
587 | - | let cK = A(this, cF) | |
588 | - | let cL = bQ(aq, ap, bt, 0) | |
589 | - | let ca = cL._1 | |
590 | - | let cw = cL._2 | |
591 | - | let bP = cL._3 | |
592 | - | let cB = max([(ca - cz), g]) | |
593 | - | if ((g >= cB)) | |
594 | - | then throw("nothing to claim") | |
621 | + | let aD = valueOrErrorMessage(addressFromString(as), "claimWxINTERNAL: invalid user address") | |
622 | + | let bx = y(aX, ac(at)) | |
623 | + | let cL = av(at, as) | |
624 | + | let cM = ay(at) | |
625 | + | let cN = aw(at, as) | |
626 | + | let cO = ax(at, as) | |
627 | + | let cP = D(this, cL) | |
628 | + | let ct = D(this, cN) | |
629 | + | let cQ = D(this, cO) | |
630 | + | let cR = D(this, cM) | |
631 | + | let cS = bU(at, as, bx, 0) | |
632 | + | let ce = cS._1 | |
633 | + | let cr = cS._2 | |
634 | + | let bT = cS._3 | |
635 | + | let cu = max([(ce - ct), g]) | |
636 | + | if ((g >= cu)) | |
637 | + | then if (cv) | |
638 | + | then throw("nothing to claim") | |
639 | + | else $Tuple2(nil, 0) | |
595 | 640 | else { | |
596 | - | let cM = max([m(i(invoke(aW, "claimWxBoost", [aq, ap], nil))[0]), 0]) | |
597 | - | let cN = cB | |
598 | - | let cO = min([(cN * toBigInt(2)), toBigInt(cM)]) | |
599 | - | let cP = q(i(invoke(aV, "emit", [toInt(cN)], nil))[0]) | |
600 | - | let cQ = i(invoke(aV, "emit", [toInt(cO)], nil)) | |
601 | - | if ((cQ == cQ)) | |
641 | + | let cT = max([p(l(invoke(aZ, "claimWxBoost", [at, as], nil))[0]), 0]) | |
642 | + | let cU = cu | |
643 | + | let cV = min([(cU * toBigInt(2)), toBigInt(cT)]) | |
644 | + | let cW = (cU + cV) | |
645 | + | let cX = t(l(invoke(aY, "emit", [toInt(cU)], nil))[0]) | |
646 | + | let cY = l(invoke(aY, "emit", [toInt(cV)], nil)) | |
647 | + | if ((cY == cY)) | |
602 | 648 | then { | |
603 | - | let | |
604 | - | let | |
605 | - | let | |
606 | - | let | |
607 | - | [StringEntry( | |
649 | + | let cZ = ((cP + cU) + cV) | |
650 | + | let da = (ct + cU) | |
651 | + | let db = (cQ + cV) | |
652 | + | let dc = (cR + cu) | |
653 | + | $Tuple2([StringEntry(cL, toString(cZ)), StringEntry(cN, toString(da)), StringEntry(cO, toString(db)), StringEntry(cM, toString(dc)), ScriptTransfer(aD, toInt(cU), cX), ScriptTransfer(aD, toInt(cV), cX), aU("claim", as, at, toInt(cu), cl.transactionId)], toInt(cW)) | |
608 | 654 | } | |
609 | 655 | else throw("Strict value is not equal to itself.") | |
610 | 656 | } | |
611 | 657 | } | |
612 | 658 | else throw("Strict value is not equal to itself.") | |
613 | 659 | } | |
614 | 660 | ||
615 | 661 | ||
616 | 662 | ||
617 | - | @Callable( | |
618 | - | func claimWxBulkInternalREADONLY ( | |
619 | - | then $Tuple2(nil, | |
663 | + | @Callable(cl) | |
664 | + | func claimWxBulkInternalREADONLY (dd,de,as,df) = if ((dd == size(de))) | |
665 | + | then $Tuple2(nil, df) | |
620 | 666 | else { | |
621 | - | let | |
622 | - | let | |
623 | - | let | |
624 | - | if ($isInstanceOf( | |
625 | - | then | |
626 | - | else throw(($getType( | |
667 | + | let aB = de[dd] | |
668 | + | let dg = split({ | |
669 | + | let dh = invoke(this, "claimWxREADONLY", [aB, as], nil) | |
670 | + | if ($isInstanceOf(dh, "String")) | |
671 | + | then dh | |
672 | + | else throw(($getType(dh) + " couldn't be cast to String")) | |
627 | 673 | }, e) | |
628 | - | let | |
629 | - | let | |
630 | - | let | |
631 | - | let | |
632 | - | let | |
633 | - | if ($isInstanceOf( | |
634 | - | then | |
635 | - | else throw(($getType( | |
674 | + | let di = dg[3] | |
675 | + | let dj = dg[4] | |
676 | + | let dk = (df :+ makeString(["%d%d", di, dj], e)) | |
677 | + | let dl = { | |
678 | + | let dh = invoke(this, "claimWxBulkInternalREADONLY", [(dd + 1), de, as, dk], nil) | |
679 | + | if ($isInstanceOf(dh, "List[Any]")) | |
680 | + | then dh | |
681 | + | else throw(($getType(dh) + " couldn't be cast to List[Any]")) | |
636 | 682 | } | |
637 | - | if (( | |
638 | - | then $Tuple2(nil, | |
683 | + | if ((dl == dl)) | |
684 | + | then $Tuple2(nil, dl) | |
639 | 685 | else throw("Strict value is not equal to itself.") | |
640 | 686 | } | |
641 | 687 | ||
642 | 688 | ||
643 | 689 | ||
644 | - | @Callable( | |
645 | - | func claimWxBulkREADONLY ( | |
646 | - | let | |
647 | - | $Tuple2(nil, | |
690 | + | @Callable(cl) | |
691 | + | func claimWxBulkREADONLY (de,as) = { | |
692 | + | let dk = invoke(this, "claimWxBulkInternalREADONLY", [0, de, as, nil], nil) | |
693 | + | $Tuple2(nil, dk) | |
648 | 694 | } | |
649 | 695 | ||
650 | 696 | ||
651 | 697 | ||
652 | - | @Callable( | |
653 | - | func claimWxREADONLY ( | |
654 | - | let | |
655 | - | let | |
656 | - | let | |
657 | - | let | |
658 | - | let | |
659 | - | let | |
660 | - | let | |
661 | - | let | |
662 | - | let | |
663 | - | let | |
664 | - | let | |
665 | - | let | |
666 | - | let | |
698 | + | @Callable(cl) | |
699 | + | func claimWxREADONLY (at,as) = { | |
700 | + | let bY = ar(as, at) | |
701 | + | let bz = au(at) | |
702 | + | let cL = av(at, as) | |
703 | + | let cN = aw(at, as) | |
704 | + | let bs = az(bY) | |
705 | + | let bA = az(bz) | |
706 | + | let cP = D(this, cL) | |
707 | + | let ct = D(this, cN) | |
708 | + | let bx = y(aX, ac(at)) | |
709 | + | let bC = getIntegerValue(aX, ad(bx)) | |
710 | + | let dm = C(aY, am()) | |
711 | + | let bD = C(aY, ao()) | |
712 | + | let dn = if ((bD > height)) | |
667 | 713 | then 0 | |
668 | - | else (height - | |
669 | - | let | |
670 | - | let | |
671 | - | let | |
672 | - | let | |
673 | - | let | |
674 | - | let | |
675 | - | let | |
676 | - | let | |
677 | - | let | |
678 | - | let | |
679 | - | let | |
680 | - | let | |
681 | - | let | |
682 | - | $Tuple2(nil, makeString(["%s%s%d%d%d%d%s", | |
714 | + | else (height - bD) | |
715 | + | let do = fraction((dm * dn), bC, f) | |
716 | + | let dp = fraction(do, bs, bA) | |
717 | + | let dq = bU(at, as, bx, 0) | |
718 | + | let ce = dq._1 | |
719 | + | let cr = dq._2 | |
720 | + | let bT = dq._3 | |
721 | + | let cu = max([(ce - ct), g]) | |
722 | + | let dr = l(invoke(aZ, "claimWxBoostREADONLY", [at, as], nil)) | |
723 | + | let cT = max([p(dr[0]), 0]) | |
724 | + | let ds = r(dr[1]) | |
725 | + | let cU = cu | |
726 | + | let cV = min([(cU * toBigInt(2)), toBigInt(cT)]) | |
727 | + | let cW = (cU + cV) | |
728 | + | $Tuple2(nil, makeString(["%s%s%d%d%d%d%s", at, as, toString(cW), toString(cP), toString(cU), toString(cV), "soon"], e)) | |
683 | 729 | } | |
684 | 730 | ||
685 | 731 | ||
686 | 732 | ||
687 | - | @Callable(ch) | |
688 | - | func usersListTraversal (ay) = { | |
689 | - | let cl = if ((toBase58String(ch.caller.bytes) == valueOrElse(getString(this, J()), ""))) | |
733 | + | @Callable(cl) | |
734 | + | func stakedByUserREADONLY (at,as) = { | |
735 | + | let bs = valueOrElse(getInteger(ar(as, at)), 0) | |
736 | + | $Tuple2(nil, bs) | |
737 | + | } | |
738 | + | ||
739 | + | ||
740 | + | ||
741 | + | @Callable(cl) | |
742 | + | func usersListTraversal (aB) = { | |
743 | + | let cy = if ((toBase58String(cl.caller.bytes) == valueOrElse(getString(this, M()), ""))) | |
690 | 744 | then true | |
691 | - | else | |
692 | - | if (( | |
745 | + | else cm(cl) | |
746 | + | if ((cy == cy)) | |
693 | 747 | then { | |
694 | - | let | |
695 | - | let | |
696 | - | let | |
697 | - | let | |
698 | - | if ($isInstanceOf( | |
748 | + | let be = bc(aB) | |
749 | + | let dt = getString(bb(aB)) | |
750 | + | let bk = getString(bd(be)) | |
751 | + | let n = dt | |
752 | + | if ($isInstanceOf(n, "Unit")) | |
699 | 753 | then { | |
700 | - | let | |
701 | - | if ($isInstanceOf( | |
754 | + | let du = bk | |
755 | + | if ($isInstanceOf(du, "Unit")) | |
702 | 756 | then $Tuple2(nil, false) | |
703 | - | else if ($isInstanceOf( | |
757 | + | else if ($isInstanceOf(du, "String")) | |
704 | 758 | then { | |
705 | - | let | |
706 | - | $Tuple2([StringEntry( | |
759 | + | let dv = du | |
760 | + | $Tuple2([StringEntry(bb(aB), dv)], true) | |
707 | 761 | } | |
708 | 762 | else throw("Match error") | |
709 | 763 | } | |
710 | - | else if ($isInstanceOf( | |
764 | + | else if ($isInstanceOf(n, "String")) | |
711 | 765 | then { | |
712 | - | let aA = k | |
713 | - | let cz = A(this, at(ay, aA)) | |
714 | - | let cA = v(aU, Z(ay)) | |
715 | - | let ca = bQ(ay, aA, cA, 0)._1 | |
716 | - | let cB = (ca - cz) | |
717 | - | let cC = if ((cB > g)) | |
718 | - | then invoke(this, "claimWxINTERNAL", [ay, aA], nil) | |
766 | + | let aD = n | |
767 | + | let ct = D(this, aw(aB, aD)) | |
768 | + | let cp = y(aX, ac(aB)) | |
769 | + | let ce = bU(aB, aD, cp, 0)._1 | |
770 | + | let cu = (ce - ct) | |
771 | + | let cv = true | |
772 | + | let cw = if ((cu > g)) | |
773 | + | then invoke(this, "claimWxINTERNAL", [aB, aD, cv], nil) | |
719 | 774 | else unit | |
720 | - | if (( | |
775 | + | if ((cw == cw)) | |
721 | 776 | then { | |
722 | - | let | |
723 | - | let | |
724 | - | if ($isInstanceOf( | |
725 | - | then $Tuple2([DeleteEntry( | |
726 | - | else if ($isInstanceOf( | |
777 | + | let dw = getString(bi(be, aD)) | |
778 | + | let du = dw | |
779 | + | if ($isInstanceOf(du, "Unit")) | |
780 | + | then $Tuple2([DeleteEntry(bb(aB))], false) | |
781 | + | else if ($isInstanceOf(du, "String")) | |
727 | 782 | then { | |
728 | - | let | |
729 | - | $Tuple2([StringEntry( | |
783 | + | let dx = du | |
784 | + | $Tuple2([StringEntry(bb(aB), dx)], true) | |
730 | 785 | } | |
731 | 786 | else throw("Match error") | |
732 | 787 | } | |
733 | 788 | else throw("Strict value is not equal to itself.") | |
734 | 789 | } | |
735 | 790 | else throw("Match error") | |
736 | 791 | } | |
737 | 792 | else throw("Strict value is not equal to itself.") | |
738 | 793 | } | |
739 | 794 | ||
740 | 795 | ||
741 | 796 | ||
742 | - | @Callable( | |
743 | - | func onModifyWeight ( | |
797 | + | @Callable(cl) | |
798 | + | func onModifyWeight (at,bx) = if ((cl.caller != aX)) | |
744 | 799 | then throw("permissions denied") | |
745 | 800 | else { | |
746 | - | let | |
747 | - | let | |
748 | - | let | |
749 | - | let | |
750 | - | | |
801 | + | let dy = bw(at, bx, 0) | |
802 | + | let bu = dy._1 | |
803 | + | let bW = dy._2 | |
804 | + | let bX = dy._3 | |
805 | + | bW | |
751 | 806 | } | |
752 | 807 | ||
753 | 808 | ||
754 | - | @Verifier( | |
755 | - | func | |
756 | - | let | |
757 | - | let | |
758 | - | if ($isInstanceOf( | |
809 | + | @Verifier(dz) | |
810 | + | func dA () = { | |
811 | + | let dB = { | |
812 | + | let n = ch() | |
813 | + | if ($isInstanceOf(n, "ByteVector")) | |
759 | 814 | then { | |
760 | - | let | |
761 | - | | |
815 | + | let cn = n | |
816 | + | cn | |
762 | 817 | } | |
763 | - | else if ($isInstanceOf( | |
764 | - | then | |
818 | + | else if ($isInstanceOf(n, "Unit")) | |
819 | + | then dz.senderPublicKey | |
765 | 820 | else throw("Match error") | |
766 | 821 | } | |
767 | - | sigVerify( | |
822 | + | sigVerify(dz.bodyBytes, dz.proofs[0], dB) | |
768 | 823 | } | |
769 | 824 |
github/deemru/w8io/026f985 327.99 ms ◑