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