tx · E6ymV3TCGHeDYTWv8To4AEEWe4vvHWWiwxmfeeztwd3Y 3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz: -0.02300000 Waves 2023.03.14 17:27 [2489836] smart account 3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz > SELF 0.00000000 Waves
{ "type": 13, "id": "E6ymV3TCGHeDYTWv8To4AEEWe4vvHWWiwxmfeeztwd3Y", "fee": 2300000, "feeAssetId": null, "timestamp": 1678804117826, "version": 2, "chainId": 84, "sender": "3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz", "senderPublicKey": "D28XoueZWsMfm8Y5pa6C5ZFuYoWgre2Wm8tzJANJgMnq", "proofs": [ "4kKarC7P1e5Lc4mNGi6498fpyEEdLnuetRbA1bAUEzTr1m2rC88MSsBcCjwgPqRmwUYFEF4u8y17JN9yy9hWzqok" ], "script": "base64:BgKMIAgCEgMKAQgSAwoBCBIDCgEIEgASABIECgIIARIGCgQCAQICEgMKAQgSAwoBCBIFCgMICAQSBgoEARgIGBIECgIYCBIECgIICBIECgIICBIDCgEIEgQKAggIIgZTQ0FMRTgiBU1VTFQ4IgdTQ0FMRTE4IgZNVUxUMTgiA1NFUCIOUE9PTFdFSUdIVE1VTFQiCnplcm9CaWdJbnQiCW9uZUJpZ0ludCIHd3JhcEVyciIDbXNnIgh0aHJvd0VyciIJYXNBbnlMaXN0IgN2YWwiByRtYXRjaDAiCnZhbEFueUx5c3QiBWFzSW50IgZ2YWxJbnQiCGFzU3RyaW5nIgZ2YWxTdHIiDGFzQnl0ZVZlY3RvciIGdmFsQmluIg9nZXRTdHJpbmdPckZhaWwiB2FkZHJlc3MiA2tleSIYZ2V0U3RyaW5nQnlBZGRyZXNzT3JGYWlsIgxnZXRJbnRPclplcm8iD2dldEludE9yRGVmYXVsdCIKZGVmYXVsdFZhbCIMZ2V0SW50T3JGYWlsIhlnZXRCaWdJbnRGcm9tU3RyaW5nT3JaZXJvIhxnZXRCaWdJb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AJjdwYEAmN4AwkAvwICBQJjdgUBZwkA/AcEBQR0aGlzAg9jbGFpbVd4SU5URVJOQUwJAMwIAgUCYUIJAMwIAgUCYUQJAMwIAgUCY3cFA25pbAUDbmlsBQR1bml0AwkAAAIFAmN4BQJjeAQCZHgJAKIIAQkBAmJpAgUCYmUFAmFEBAJkdgUCZHgDCQABAgUCZHYCBFVuaXQJAJQKAgkAzAgCCQELRGVsZXRlRW50cnkBCQECYmIBBQJhQgUDbmlsBwMJAAECBQJkdgIGU3RyaW5nBAJkeQUCZHYJAJQKAgkAzAgCCQELU3RyaW5nRW50cnkCCQECYmIBBQJhQgUCZHkFA25pbAYJAAIBAgtNYXRjaCBlcnJvcgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECC01hdGNoIGVycm9yCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAmNsAQ5vbk1vZGlmeVdlaWdodAICYXQCYngDCQECIT0CCAUCY2wGY2FsbGVyBQJhWAkAAgECEnBlcm1pc3Npb25zIGRlbmllZAQCZHoJAQJidwMFAmF0BQJieAAABAJidQgFAmR6Al8xBAJiVwgFAmR6Al8yBAJiWAgFAmR6Al8zBQJiVwECZEEBAmRCAAQCZEMEAW4JAQJjaAADCQABAgUBbgIKQnl0ZVZlY3RvcgQCY24FAW4FAmNuAwkAAQIFAW4CBFVuaXQIBQJkQQ9zZW5kZXJQdWJsaWNLZXkJAAIBAgtNYXRjaCBlcnJvcgkA9AMDCAUCZEEJYm9keUJ5dGVzCQCRAwIIBQJkQQZwcm9vZnMAAAUCZEMBNGCg", "height": 2489836, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7Y1wP5ciJW8VBgJh1GZXXdZ6tprzYgk2NzNLmWfkS6K1 Next: 2927fdxeRkwHc8UuDZ7L7eycjotnwaJbTBtKKB35PQaM 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 | |
455 | - | let | |
456 | - | let | |
457 | - | let | |
458 | - | let | |
459 | - | let | |
460 | - | let | |
461 | - | let | |
462 | - | let | |
463 | - | let | |
464 | - | let | |
465 | - | then ( | |
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) | |
466 | 459 | else false) | |
467 | - | then | |
460 | + | then bq(be, as) | |
468 | 461 | else nil | |
469 | - | let | |
470 | - | then invoke( | |
462 | + | let ct = if ((aT == bs)) | |
463 | + | then invoke(aZ, "onStakedVoteUpdate", [at, as, false], nil) | |
471 | 464 | else unit | |
472 | - | if (( | |
465 | + | if ((ct == ct)) | |
473 | 466 | then { | |
474 | - | let | |
475 | - | let | |
476 | - | let | |
477 | - | let | |
478 | - | let | |
479 | - | then invoke(this, "claimWxINTERNAL", [ | |
467 | + | let cu = D(this, aw(at, as)) | |
468 | + | let ce = bU(at, as, bx, 0)._1 | |
469 | + | let cv = (ce - cu) | |
470 | + | let cw = true | |
471 | + | let cx = if ((cv > g)) | |
472 | + | then invoke(this, "claimWxINTERNAL", [at, as, cw], nil) | |
480 | 473 | else unit | |
481 | - | if (( | |
482 | - | then if (( | |
483 | - | then throw(((((((("passed amount=" + toString( | |
484 | - | else (([IntegerEntry( | |
474 | + | if ((cx == cx)) | |
475 | + | then if ((aT > bs)) | |
476 | + | then throw(((((((("passed amount=" + toString(aT)) + " is greater than available=") + toString(bs)) + ". lpAssetId=") + at) + ". stakedByUserKEY=") + bY)) | |
477 | + | else (([IntegerEntry(bY, (bs - aT)), IntegerEntry(bz, (bA - aT)), ScriptTransfer(cq, aT, aB), aU("unstake", as, at, aT, cl.transactionId)] ++ cr) ++ cs) | |
485 | 478 | else throw("Strict value is not equal to itself.") | |
486 | 479 | } | |
487 | 480 | else throw("Strict value is not equal to itself.") | |
488 | 481 | } | |
489 | 482 | ||
490 | 483 | ||
491 | - | @Callable(cn) | |
492 | - | func constructor (cA) = { | |
493 | - | let cB = co(cn) | |
484 | + | @Callable(cl) | |
485 | + | func constructor (cy) = { | |
486 | + | let cz = cm(cl) | |
487 | + | if ((cz == cz)) | |
488 | + | then [StringEntry(L(), cy)] | |
489 | + | else throw("Strict value is not equal to itself.") | |
490 | + | } | |
491 | + | ||
492 | + | ||
493 | + | ||
494 | + | @Callable(cl) | |
495 | + | func constructorV2 (cA) = { | |
496 | + | let cB = [cm(cl), if ((addressFromString(cA) != unit)) | |
497 | + | then true | |
498 | + | else "invalid voting emission contract address"] | |
494 | 499 | if ((cB == cB)) | |
495 | 500 | then [StringEntry(M(), cA)] | |
496 | 501 | else throw("Strict value is not equal to itself.") | |
498 | 503 | ||
499 | 504 | ||
500 | 505 | ||
501 | - | @Callable(cn) | |
502 | - | func constructorV2 (cC) = { | |
503 | - | let cD = [co(cn), if ((addressFromString(cC) != unit)) | |
504 | - | then true | |
505 | - | else "invalid voting emission contract address"] | |
506 | - | if ((cD == cD)) | |
507 | - | then [StringEntry(N(), cC)] | |
508 | - | else throw("Strict value is not equal to itself.") | |
509 | - | } | |
510 | - | ||
511 | - | ||
512 | - | ||
513 | - | @Callable(cn) | |
514 | - | func setManager (cE) = { | |
515 | - | let cB = co(cn) | |
516 | - | if ((cB == cB)) | |
506 | + | @Callable(cl) | |
507 | + | func setManager (cC) = { | |
508 | + | let cz = cm(cl) | |
509 | + | if ((cz == cz)) | |
517 | 510 | then { | |
518 | - | let | |
519 | - | if (( | |
520 | - | then [StringEntry( | |
511 | + | let cD = fromBase58String(cC) | |
512 | + | if ((cD == cD)) | |
513 | + | then [StringEntry(W(), cC)] | |
521 | 514 | else throw("Strict value is not equal to itself.") | |
522 | 515 | } | |
523 | 516 | else throw("Strict value is not equal to itself.") | |
525 | 518 | ||
526 | 519 | ||
527 | 520 | ||
528 | - | @Callable( | |
521 | + | @Callable(cl) | |
529 | 522 | func confirmManager () = { | |
530 | - | let | |
531 | - | let | |
523 | + | let cE = ci() | |
524 | + | let cF = if (isDefined(cE)) | |
532 | 525 | then true | |
533 | 526 | else throw("No pending manager") | |
534 | - | if (( | |
527 | + | if ((cF == cF)) | |
535 | 528 | then { | |
536 | - | let | |
529 | + | let cG = if ((cl.callerPublicKey == value(cE))) | |
537 | 530 | then true | |
538 | 531 | else throw("You are not pending manager") | |
539 | - | if (( | |
540 | - | then [StringEntry( | |
532 | + | if ((cG == cG)) | |
533 | + | then [StringEntry(V(), toBase58String(value(cE))), DeleteEntry(W())] | |
541 | 534 | else throw("Strict value is not equal to itself.") | |
542 | 535 | } | |
543 | 536 | else throw("Strict value is not equal to itself.") | |
545 | 538 | ||
546 | 539 | ||
547 | 540 | ||
548 | - | @Callable( | |
549 | - | func stake () = if ((size( | |
541 | + | @Callable(cl) | |
542 | + | func stake () = if ((size(cl.payments) != 1)) | |
550 | 543 | then throw("invalid payment - exact one payment must be attached") | |
551 | 544 | else { | |
552 | - | let | |
553 | - | let | |
554 | - | let | |
555 | - | let | |
556 | - | let | |
557 | - | let | |
558 | - | let | |
559 | - | then toString( | |
560 | - | else | |
561 | - | let | |
562 | - | let | |
563 | - | let | |
564 | - | let | |
565 | - | then invoke( | |
545 | + | let cH = cl.payments[0] | |
546 | + | let aB = value(cH.assetId) | |
547 | + | let at = toBase58String(aB) | |
548 | + | let aT = cH.amount | |
549 | + | let bx = valueOrErrorMessage(getString(aX, Z(at)), ("unsupported lp asset " + at)) | |
550 | + | let cI = toString(cl.caller) | |
551 | + | let as = if ((cI == bx)) | |
552 | + | then toString(cl.originCaller) | |
553 | + | else cI | |
554 | + | let bY = ar(as, at) | |
555 | + | let bz = au(at) | |
556 | + | let bs = az(bY) | |
557 | + | let ct = if ((bs == 0)) | |
558 | + | then invoke(aZ, "onStakedVoteUpdate", [at, as, true], nil) | |
566 | 559 | else unit | |
567 | - | if (( | |
560 | + | if ((ct == ct)) | |
568 | 561 | then { | |
569 | - | let | |
570 | - | let | |
571 | - | let | |
572 | - | let | |
573 | - | let | |
574 | - | let | |
575 | - | let | |
562 | + | let bA = az(bz) | |
563 | + | let cJ = bU(at, as, bx, aT) | |
564 | + | let ce = cJ._1 | |
565 | + | let cr = cJ._2 | |
566 | + | let bT = cJ._3 | |
567 | + | let be = bc(at) | |
568 | + | let cs = if (bj(be, as)) | |
576 | 569 | then nil | |
577 | - | else | |
578 | - | (([IntegerEntry( | |
570 | + | else bn(be, as) | |
571 | + | (([IntegerEntry(bY, (bs + aT)), IntegerEntry(bz, (bA + aT)), aU("stake", as, at, aT, cl.transactionId)] ++ cr) ++ cs) | |
579 | 572 | } | |
580 | 573 | else throw("Strict value is not equal to itself.") | |
581 | 574 | } | |
582 | 575 | ||
583 | 576 | ||
584 | 577 | ||
585 | - | @Callable( | |
586 | - | func unstake ( | |
587 | - | let | |
588 | - | let | |
589 | - | let | |
590 | - | let | |
591 | - | let | |
592 | - | let | |
578 | + | @Callable(cl) | |
579 | + | func unstake (at,aT) = { | |
580 | + | let aB = fromBase58String(at) | |
581 | + | let bx = valueOrErrorMessage(getString(aX, Z(at)), ("unsupported lp asset " + at)) | |
582 | + | let cp = addressFromStringValue(bx) | |
583 | + | let cK = valueOrElse(getString(cp, Y()), bx) | |
584 | + | let cI = toString(cl.caller) | |
585 | + | let aD = if (if ((cI == bx)) | |
593 | 586 | then true | |
594 | - | else ( | |
595 | - | then | |
596 | - | else | |
597 | - | let | |
598 | - | | |
587 | + | else (cI == cK)) | |
588 | + | then cl.originCaller | |
589 | + | else cl.caller | |
590 | + | let cq = cl.caller | |
591 | + | co(cl, aB, cp, aD, cq, aT) | |
599 | 592 | } | |
600 | 593 | ||
601 | 594 | ||
602 | 595 | ||
603 | - | @Callable( | |
604 | - | func unstakeINTERNAL ( | |
605 | - | let | |
606 | - | let | |
607 | - | let | |
596 | + | @Callable(cl) | |
597 | + | func unstakeINTERNAL (aB,aT,aD,cq) = { | |
598 | + | let at = toBase58String(aB) | |
599 | + | let cp = addressFromStringValue(valueOrErrorMessage(getString(aX, Z(at)), ("unsupported lp asset " + at))) | |
600 | + | let cz = if ((cl.caller == cp)) | |
608 | 601 | then true | |
609 | - | else | |
610 | - | if (( | |
611 | - | then | |
602 | + | else cj | |
603 | + | if ((cz == cz)) | |
604 | + | then co(cl, aB, cp, Address(aD), Address(cq), aT) | |
612 | 605 | else throw("Strict value is not equal to itself.") | |
613 | 606 | } | |
614 | 607 | ||
615 | 608 | ||
616 | 609 | ||
617 | - | @Callable( | |
618 | - | func claimWx ( | |
619 | - | let | |
620 | - | let | |
621 | - | let | |
622 | - | $Tuple2(nil, | |
610 | + | @Callable(cl) | |
611 | + | func claimWx (at) = { | |
612 | + | let as = toString(cl.caller) | |
613 | + | let cw = true | |
614 | + | let cL = invoke(this, "claimWxINTERNAL", [at, as, cw], nil) | |
615 | + | $Tuple2(nil, cL) | |
623 | 616 | } | |
624 | 617 | ||
625 | 618 | ||
626 | 619 | ||
627 | - | @Callable( | |
628 | - | func claimWxDoNotThrow ( | |
629 | - | let | |
630 | - | let | |
631 | - | let | |
632 | - | $Tuple2(nil, | |
620 | + | @Callable(cl) | |
621 | + | func claimWxDoNotThrow (at) = { | |
622 | + | let as = toString(cl.caller) | |
623 | + | let cw = false | |
624 | + | let cL = invoke(this, "claimWxINTERNAL", [at, as, cw], nil) | |
625 | + | $Tuple2(nil, cL) | |
633 | 626 | } | |
634 | 627 | ||
635 | 628 | ||
636 | 629 | ||
637 | - | @Callable( | |
638 | - | func claimWxINTERNAL ( | |
639 | - | let | |
640 | - | if (( | |
630 | + | @Callable(cl) | |
631 | + | func claimWxINTERNAL (at,as,cw) = { | |
632 | + | let cz = ck(cl) | |
633 | + | if ((cz == cz)) | |
641 | 634 | then { | |
642 | - | let | |
643 | - | let | |
644 | - | let | |
645 | - | let | |
646 | - | let | |
647 | - | let | |
648 | - | let | |
649 | - | let | |
650 | - | let | |
651 | - | let | |
652 | - | let | |
653 | - | let | |
654 | - | let | |
655 | - | let | |
656 | - | let | |
657 | - | if (( | |
658 | - | then if ( | |
635 | + | let aD = valueOrErrorMessage(addressFromString(as), "claimWxINTERNAL: invalid user address") | |
636 | + | let bx = y(aX, ac(at)) | |
637 | + | let cM = av(at, as) | |
638 | + | let cN = ay(at) | |
639 | + | let cO = aw(at, as) | |
640 | + | let cP = ax(at, as) | |
641 | + | let cQ = D(this, cM) | |
642 | + | let cu = D(this, cO) | |
643 | + | let cR = D(this, cP) | |
644 | + | let cS = D(this, cN) | |
645 | + | let cT = bU(at, as, bx, 0) | |
646 | + | let ce = cT._1 | |
647 | + | let cr = cT._2 | |
648 | + | let bT = cT._3 | |
649 | + | let cv = max([(ce - cu), g]) | |
650 | + | if ((g >= cv)) | |
651 | + | then if (cw) | |
659 | 652 | then throw("nothing to claim") | |
660 | 653 | else $Tuple2(nil, 0) | |
661 | 654 | else { | |
662 | - | let | |
663 | - | let | |
664 | - | let | |
665 | - | let | |
666 | - | let | |
667 | - | let | |
668 | - | if (( | |
655 | + | let cU = max([p(l(invoke(aZ, "claimWxBoost", [at, as], nil))[0]), 0]) | |
656 | + | let cV = cv | |
657 | + | let cW = min([(cV * toBigInt(2)), toBigInt(cU)]) | |
658 | + | let cX = (cV + cW) | |
659 | + | let cY = t(l(invoke(aY, "emit", [toInt(cV)], nil))[0]) | |
660 | + | let cZ = l(invoke(aY, "emit", [toInt(cW)], nil)) | |
661 | + | if ((cZ == cZ)) | |
669 | 662 | then { | |
670 | - | let | |
671 | - | let | |
672 | - | let | |
673 | - | let | |
674 | - | $Tuple2([StringEntry(cO, toString(dc)), StringEntry( | |
663 | + | let da = ((cQ + cV) + cW) | |
664 | + | let db = (cu + cV) | |
665 | + | let dc = (cR + cW) | |
666 | + | let dd = (cS + cv) | |
667 | + | $Tuple2([StringEntry(cM, toString(da)), StringEntry(cO, toString(db)), StringEntry(cP, toString(dc)), StringEntry(cN, toString(dd)), ScriptTransfer(aD, toInt(cV), cY), ScriptTransfer(aD, toInt(cW), cY), aU("claim", as, at, toInt(cv), cl.transactionId)], toInt(cX)) | |
675 | 668 | } | |
676 | 669 | else throw("Strict value is not equal to itself.") | |
677 | 670 | } | |
681 | 674 | ||
682 | 675 | ||
683 | 676 | ||
684 | - | @Callable( | |
685 | - | func claimWxBulkInternalREADONLY (dg | |
686 | - | then $Tuple2(nil, | |
677 | + | @Callable(cl) | |
678 | + | func claimWxBulkInternalREADONLY (de,df,as,dg) = if ((de == size(df))) | |
679 | + | then $Tuple2(nil, dg) | |
687 | 680 | 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] | |
681 | + | let aB = df[de] | |
682 | + | let dh = split({ | |
683 | + | let di = invoke(this, "claimWxREADONLY", [aB, as], nil) | |
684 | + | if ($isInstanceOf(di, "String")) | |
685 | + | then di | |
686 | + | else throw(($getType(di) + " couldn't be cast to String")) | |
687 | + | }, e) | |
688 | + | let dj = dh[3] | |
689 | + | let dk = dh[4] | |
690 | + | let dl = (dg :+ makeString(["%d%d", dj, dk], e)) | |
697 | 691 | let dm = { | |
698 | - | let | |
699 | - | if ($isInstanceOf( | |
700 | - | then | |
701 | - | else throw(($getType( | |
692 | + | let di = invoke(this, "claimWxBulkInternalREADONLY", [(de + 1), df, as, dl], nil) | |
693 | + | if ($isInstanceOf(di, "List[Any]")) | |
694 | + | then di | |
695 | + | else throw(($getType(di) + " couldn't be cast to List[Any]")) | |
702 | 696 | } | |
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) | |
697 | + | if ((dm == dm)) | |
698 | + | then $Tuple2(nil, dm) | |
712 | 699 | else throw("Strict value is not equal to itself.") | |
713 | 700 | } | |
714 | 701 | ||
715 | 702 | ||
716 | 703 | ||
717 | - | @Callable( | |
718 | - | func claimWxBulkREADONLY ( | |
719 | - | let | |
720 | - | $Tuple2(nil, | |
704 | + | @Callable(cl) | |
705 | + | func claimWxBulkREADONLY (df,as) = { | |
706 | + | let dl = invoke(this, "claimWxBulkInternalREADONLY", [0, df, as, nil], nil) | |
707 | + | $Tuple2(nil, dl) | |
721 | 708 | } | |
722 | 709 | ||
723 | 710 | ||
724 | 711 | ||
725 | - | @Callable( | |
726 | - | func claimWxREADONLY ( | |
727 | - | let | |
728 | - | let | |
729 | - | let | |
730 | - | let | |
731 | - | let | |
732 | - | let | |
733 | - | let | |
734 | - | let | |
735 | - | let | |
736 | - | let | |
737 | - | let | |
738 | - | let | |
739 | - | let | |
712 | + | @Callable(cl) | |
713 | + | func claimWxREADONLY (at,as) = { | |
714 | + | let bY = ar(as, at) | |
715 | + | let bz = au(at) | |
716 | + | let cM = av(at, as) | |
717 | + | let cO = aw(at, as) | |
718 | + | let bs = az(bY) | |
719 | + | let bA = az(bz) | |
720 | + | let cQ = D(this, cM) | |
721 | + | let cu = D(this, cO) | |
722 | + | let bx = y(aX, ac(at)) | |
723 | + | let bC = getIntegerValue(aX, ad(bx)) | |
724 | + | let dn = C(aY, am()) | |
725 | + | let bD = C(aY, ao()) | |
726 | + | let do = if ((bD > height)) | |
740 | 727 | then 0 | |
741 | - | else (height - | |
742 | - | let | |
743 | - | let | |
744 | - | let | |
745 | - | let | |
746 | - | let | |
747 | - | let | |
748 | - | let | |
749 | - | let | |
750 | - | let | |
751 | - | let | |
752 | - | let | |
753 | - | let | |
754 | - | let | |
755 | - | $Tuple2(nil, makeString(["%s%s%d%d%d%d%s", | |
728 | + | else (height - bD) | |
729 | + | let dp = fraction((dn * do), bC, f) | |
730 | + | let dq = fraction(dp, bs, bA) | |
731 | + | let dr = bU(at, as, bx, 0) | |
732 | + | let ce = dr._1 | |
733 | + | let cr = dr._2 | |
734 | + | let bT = dr._3 | |
735 | + | let cv = max([(ce - cu), g]) | |
736 | + | let ds = l(invoke(aZ, "claimWxBoostREADONLY", [at, as], nil)) | |
737 | + | let cU = max([p(ds[0]), 0]) | |
738 | + | let dt = r(ds[1]) | |
739 | + | let cV = cv | |
740 | + | let cW = min([(cV * toBigInt(2)), toBigInt(cU)]) | |
741 | + | let cX = (cV + cW) | |
742 | + | $Tuple2(nil, makeString(["%s%s%d%d%d%d%s", at, as, toString(cX), toString(cQ), toString(cV), toString(cW), "soon"], e)) | |
756 | 743 | } | |
757 | 744 | ||
758 | 745 | ||
759 | 746 | ||
760 | - | @Callable( | |
761 | - | func stakedByUserREADONLY ( | |
762 | - | let | |
763 | - | $Tuple2(nil, | |
747 | + | @Callable(cl) | |
748 | + | func stakedByUserREADONLY (at,as) = { | |
749 | + | let bs = valueOrElse(getInteger(ar(as, at)), 0) | |
750 | + | $Tuple2(nil, bs) | |
764 | 751 | } | |
765 | 752 | ||
766 | 753 | ||
767 | 754 | ||
768 | - | @Callable( | |
769 | - | func usersListTraversal ( | |
770 | - | let | |
755 | + | @Callable(cl) | |
756 | + | func usersListTraversal (aB) = { | |
757 | + | let cz = if ((toBase58String(cl.caller.bytes) == valueOrElse(getString(this, M()), ""))) | |
771 | 758 | then true | |
772 | - | else | |
773 | - | if (( | |
759 | + | else cm(cl) | |
760 | + | if ((cz == cz)) | |
774 | 761 | then { | |
775 | - | let | |
776 | - | let | |
777 | - | let | |
778 | - | let | |
779 | - | if ($isInstanceOf( | |
762 | + | let be = bc(aB) | |
763 | + | let du = getString(bb(aB)) | |
764 | + | let bk = getString(bd(be)) | |
765 | + | let n = du | |
766 | + | if ($isInstanceOf(n, "Unit")) | |
780 | 767 | then { | |
781 | - | let | |
782 | - | if ($isInstanceOf( | |
768 | + | let dv = bk | |
769 | + | if ($isInstanceOf(dv, "Unit")) | |
783 | 770 | then $Tuple2(nil, false) | |
784 | - | else if ($isInstanceOf( | |
771 | + | else if ($isInstanceOf(dv, "String")) | |
785 | 772 | then { | |
786 | - | let | |
787 | - | $Tuple2([StringEntry( | |
773 | + | let dw = dv | |
774 | + | $Tuple2([StringEntry(bb(aB), dw)], true) | |
788 | 775 | } | |
789 | 776 | else throw("Match error") | |
790 | 777 | } | |
791 | - | else if ($isInstanceOf( | |
778 | + | else if ($isInstanceOf(n, "String")) | |
792 | 779 | then { | |
793 | - | let | |
794 | - | let | |
795 | - | let | |
796 | - | let | |
797 | - | let | |
798 | - | let | |
799 | - | let | |
800 | - | then invoke(this, "claimWxINTERNAL", [ | |
780 | + | let aD = n | |
781 | + | let cu = D(this, aw(aB, aD)) | |
782 | + | let cp = y(aX, ac(aB)) | |
783 | + | let ce = bU(aB, aD, cp, 0)._1 | |
784 | + | let cv = (ce - cu) | |
785 | + | let cw = true | |
786 | + | let cx = if ((cv > g)) | |
787 | + | then invoke(this, "claimWxINTERNAL", [aB, aD, cw], nil) | |
801 | 788 | else unit | |
802 | - | if (( | |
789 | + | if ((cx == cx)) | |
803 | 790 | then { | |
804 | - | let | |
805 | - | let | |
806 | - | if ($isInstanceOf( | |
807 | - | then $Tuple2([DeleteEntry( | |
808 | - | else if ($isInstanceOf( | |
791 | + | let dx = getString(bi(be, aD)) | |
792 | + | let dv = dx | |
793 | + | if ($isInstanceOf(dv, "Unit")) | |
794 | + | then $Tuple2([DeleteEntry(bb(aB))], false) | |
795 | + | else if ($isInstanceOf(dv, "String")) | |
809 | 796 | then { | |
810 | - | let | |
811 | - | $Tuple2([StringEntry( | |
797 | + | let dy = dv | |
798 | + | $Tuple2([StringEntry(bb(aB), dy)], true) | |
812 | 799 | } | |
813 | 800 | else throw("Match error") | |
814 | 801 | } | |
821 | 808 | ||
822 | 809 | ||
823 | 810 | ||
824 | - | @Callable( | |
825 | - | func onModifyWeight ( | |
811 | + | @Callable(cl) | |
812 | + | func onModifyWeight (at,bx) = if ((cl.caller != aX)) | |
826 | 813 | then throw("permissions denied") | |
827 | 814 | else { | |
828 | - | let | |
829 | - | let | |
830 | - | let | |
831 | - | let | |
832 | - | | |
815 | + | let dz = bw(at, bx, 0) | |
816 | + | let bu = dz._1 | |
817 | + | let bW = dz._2 | |
818 | + | let bX = dz._3 | |
819 | + | bW | |
833 | 820 | } | |
834 | 821 | ||
835 | 822 | ||
836 | - | @Verifier( | |
837 | - | func | |
838 | - | let | |
839 | - | let | |
840 | - | if ($isInstanceOf( | |
823 | + | @Verifier(dA) | |
824 | + | func dB () = { | |
825 | + | let dC = { | |
826 | + | let n = ch() | |
827 | + | if ($isInstanceOf(n, "ByteVector")) | |
841 | 828 | then { | |
842 | - | let | |
843 | - | | |
829 | + | let cn = n | |
830 | + | cn | |
844 | 831 | } | |
845 | - | else if ($isInstanceOf( | |
846 | - | then | |
832 | + | else if ($isInstanceOf(n, "Unit")) | |
833 | + | then dA.senderPublicKey | |
847 | 834 | else throw("Match error") | |
848 | 835 | } | |
849 | - | sigVerify( | |
836 | + | sigVerify(dA.bodyBytes, dA.proofs[0], dC) | |
850 | 837 | } | |
851 | 838 |
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 | |
455 | - | let | |
456 | - | let | |
457 | - | let | |
458 | - | let | |
459 | - | let | |
460 | - | let | |
461 | - | let | |
462 | - | let | |
463 | - | let | |
464 | - | let | |
465 | - | then ( | |
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) | |
466 | 459 | else false) | |
467 | - | then | |
460 | + | then bq(be, as) | |
468 | 461 | else nil | |
469 | - | let | |
470 | - | then invoke( | |
462 | + | let ct = if ((aT == bs)) | |
463 | + | then invoke(aZ, "onStakedVoteUpdate", [at, as, false], nil) | |
471 | 464 | else unit | |
472 | - | if (( | |
465 | + | if ((ct == ct)) | |
473 | 466 | then { | |
474 | - | let | |
475 | - | let | |
476 | - | let | |
477 | - | let | |
478 | - | let | |
479 | - | then invoke(this, "claimWxINTERNAL", [ | |
467 | + | let cu = D(this, aw(at, as)) | |
468 | + | let ce = bU(at, as, bx, 0)._1 | |
469 | + | let cv = (ce - cu) | |
470 | + | let cw = true | |
471 | + | let cx = if ((cv > g)) | |
472 | + | then invoke(this, "claimWxINTERNAL", [at, as, cw], nil) | |
480 | 473 | else unit | |
481 | - | if (( | |
482 | - | then if (( | |
483 | - | then throw(((((((("passed amount=" + toString( | |
484 | - | else (([IntegerEntry( | |
474 | + | if ((cx == cx)) | |
475 | + | then if ((aT > bs)) | |
476 | + | then throw(((((((("passed amount=" + toString(aT)) + " is greater than available=") + toString(bs)) + ". lpAssetId=") + at) + ". stakedByUserKEY=") + bY)) | |
477 | + | else (([IntegerEntry(bY, (bs - aT)), IntegerEntry(bz, (bA - aT)), ScriptTransfer(cq, aT, aB), aU("unstake", as, at, aT, cl.transactionId)] ++ cr) ++ cs) | |
485 | 478 | else throw("Strict value is not equal to itself.") | |
486 | 479 | } | |
487 | 480 | else throw("Strict value is not equal to itself.") | |
488 | 481 | } | |
489 | 482 | ||
490 | 483 | ||
491 | - | @Callable(cn) | |
492 | - | func constructor (cA) = { | |
493 | - | let cB = co(cn) | |
484 | + | @Callable(cl) | |
485 | + | func constructor (cy) = { | |
486 | + | let cz = cm(cl) | |
487 | + | if ((cz == cz)) | |
488 | + | then [StringEntry(L(), cy)] | |
489 | + | else throw("Strict value is not equal to itself.") | |
490 | + | } | |
491 | + | ||
492 | + | ||
493 | + | ||
494 | + | @Callable(cl) | |
495 | + | func constructorV2 (cA) = { | |
496 | + | let cB = [cm(cl), if ((addressFromString(cA) != unit)) | |
497 | + | then true | |
498 | + | else "invalid voting emission contract address"] | |
494 | 499 | if ((cB == cB)) | |
495 | 500 | then [StringEntry(M(), cA)] | |
496 | 501 | else throw("Strict value is not equal to itself.") | |
497 | 502 | } | |
498 | 503 | ||
499 | 504 | ||
500 | 505 | ||
501 | - | @Callable(cn) | |
502 | - | func constructorV2 (cC) = { | |
503 | - | let cD = [co(cn), if ((addressFromString(cC) != unit)) | |
504 | - | then true | |
505 | - | else "invalid voting emission contract address"] | |
506 | - | if ((cD == cD)) | |
507 | - | then [StringEntry(N(), cC)] | |
508 | - | else throw("Strict value is not equal to itself.") | |
509 | - | } | |
510 | - | ||
511 | - | ||
512 | - | ||
513 | - | @Callable(cn) | |
514 | - | func setManager (cE) = { | |
515 | - | let cB = co(cn) | |
516 | - | if ((cB == cB)) | |
506 | + | @Callable(cl) | |
507 | + | func setManager (cC) = { | |
508 | + | let cz = cm(cl) | |
509 | + | if ((cz == cz)) | |
517 | 510 | then { | |
518 | - | let | |
519 | - | if (( | |
520 | - | then [StringEntry( | |
511 | + | let cD = fromBase58String(cC) | |
512 | + | if ((cD == cD)) | |
513 | + | then [StringEntry(W(), cC)] | |
521 | 514 | else throw("Strict value is not equal to itself.") | |
522 | 515 | } | |
523 | 516 | else throw("Strict value is not equal to itself.") | |
524 | 517 | } | |
525 | 518 | ||
526 | 519 | ||
527 | 520 | ||
528 | - | @Callable( | |
521 | + | @Callable(cl) | |
529 | 522 | func confirmManager () = { | |
530 | - | let | |
531 | - | let | |
523 | + | let cE = ci() | |
524 | + | let cF = if (isDefined(cE)) | |
532 | 525 | then true | |
533 | 526 | else throw("No pending manager") | |
534 | - | if (( | |
527 | + | if ((cF == cF)) | |
535 | 528 | then { | |
536 | - | let | |
529 | + | let cG = if ((cl.callerPublicKey == value(cE))) | |
537 | 530 | then true | |
538 | 531 | else throw("You are not pending manager") | |
539 | - | if (( | |
540 | - | then [StringEntry( | |
532 | + | if ((cG == cG)) | |
533 | + | then [StringEntry(V(), toBase58String(value(cE))), DeleteEntry(W())] | |
541 | 534 | else throw("Strict value is not equal to itself.") | |
542 | 535 | } | |
543 | 536 | else throw("Strict value is not equal to itself.") | |
544 | 537 | } | |
545 | 538 | ||
546 | 539 | ||
547 | 540 | ||
548 | - | @Callable( | |
549 | - | func stake () = if ((size( | |
541 | + | @Callable(cl) | |
542 | + | func stake () = if ((size(cl.payments) != 1)) | |
550 | 543 | then throw("invalid payment - exact one payment must be attached") | |
551 | 544 | else { | |
552 | - | let | |
553 | - | let | |
554 | - | let | |
555 | - | let | |
556 | - | let | |
557 | - | let | |
558 | - | let | |
559 | - | then toString( | |
560 | - | else | |
561 | - | let | |
562 | - | let | |
563 | - | let | |
564 | - | let | |
565 | - | then invoke( | |
545 | + | let cH = cl.payments[0] | |
546 | + | let aB = value(cH.assetId) | |
547 | + | let at = toBase58String(aB) | |
548 | + | let aT = cH.amount | |
549 | + | let bx = valueOrErrorMessage(getString(aX, Z(at)), ("unsupported lp asset " + at)) | |
550 | + | let cI = toString(cl.caller) | |
551 | + | let as = if ((cI == bx)) | |
552 | + | then toString(cl.originCaller) | |
553 | + | else cI | |
554 | + | let bY = ar(as, at) | |
555 | + | let bz = au(at) | |
556 | + | let bs = az(bY) | |
557 | + | let ct = if ((bs == 0)) | |
558 | + | then invoke(aZ, "onStakedVoteUpdate", [at, as, true], nil) | |
566 | 559 | else unit | |
567 | - | if (( | |
560 | + | if ((ct == ct)) | |
568 | 561 | then { | |
569 | - | let | |
570 | - | let | |
571 | - | let | |
572 | - | let | |
573 | - | let | |
574 | - | let | |
575 | - | let | |
562 | + | let bA = az(bz) | |
563 | + | let cJ = bU(at, as, bx, aT) | |
564 | + | let ce = cJ._1 | |
565 | + | let cr = cJ._2 | |
566 | + | let bT = cJ._3 | |
567 | + | let be = bc(at) | |
568 | + | let cs = if (bj(be, as)) | |
576 | 569 | then nil | |
577 | - | else | |
578 | - | (([IntegerEntry( | |
570 | + | else bn(be, as) | |
571 | + | (([IntegerEntry(bY, (bs + aT)), IntegerEntry(bz, (bA + aT)), aU("stake", as, at, aT, cl.transactionId)] ++ cr) ++ cs) | |
579 | 572 | } | |
580 | 573 | else throw("Strict value is not equal to itself.") | |
581 | 574 | } | |
582 | 575 | ||
583 | 576 | ||
584 | 577 | ||
585 | - | @Callable( | |
586 | - | func unstake ( | |
587 | - | let | |
588 | - | let | |
589 | - | let | |
590 | - | let | |
591 | - | let | |
592 | - | let | |
578 | + | @Callable(cl) | |
579 | + | func unstake (at,aT) = { | |
580 | + | let aB = fromBase58String(at) | |
581 | + | let bx = valueOrErrorMessage(getString(aX, Z(at)), ("unsupported lp asset " + at)) | |
582 | + | let cp = addressFromStringValue(bx) | |
583 | + | let cK = valueOrElse(getString(cp, Y()), bx) | |
584 | + | let cI = toString(cl.caller) | |
585 | + | let aD = if (if ((cI == bx)) | |
593 | 586 | then true | |
594 | - | else ( | |
595 | - | then | |
596 | - | else | |
597 | - | let | |
598 | - | | |
587 | + | else (cI == cK)) | |
588 | + | then cl.originCaller | |
589 | + | else cl.caller | |
590 | + | let cq = cl.caller | |
591 | + | co(cl, aB, cp, aD, cq, aT) | |
599 | 592 | } | |
600 | 593 | ||
601 | 594 | ||
602 | 595 | ||
603 | - | @Callable( | |
604 | - | func unstakeINTERNAL ( | |
605 | - | let | |
606 | - | let | |
607 | - | let | |
596 | + | @Callable(cl) | |
597 | + | func unstakeINTERNAL (aB,aT,aD,cq) = { | |
598 | + | let at = toBase58String(aB) | |
599 | + | let cp = addressFromStringValue(valueOrErrorMessage(getString(aX, Z(at)), ("unsupported lp asset " + at))) | |
600 | + | let cz = if ((cl.caller == cp)) | |
608 | 601 | then true | |
609 | - | else | |
610 | - | if (( | |
611 | - | then | |
602 | + | else cj | |
603 | + | if ((cz == cz)) | |
604 | + | then co(cl, aB, cp, Address(aD), Address(cq), aT) | |
612 | 605 | else throw("Strict value is not equal to itself.") | |
613 | 606 | } | |
614 | 607 | ||
615 | 608 | ||
616 | 609 | ||
617 | - | @Callable( | |
618 | - | func claimWx ( | |
619 | - | let | |
620 | - | let | |
621 | - | let | |
622 | - | $Tuple2(nil, | |
610 | + | @Callable(cl) | |
611 | + | func claimWx (at) = { | |
612 | + | let as = toString(cl.caller) | |
613 | + | let cw = true | |
614 | + | let cL = invoke(this, "claimWxINTERNAL", [at, as, cw], nil) | |
615 | + | $Tuple2(nil, cL) | |
623 | 616 | } | |
624 | 617 | ||
625 | 618 | ||
626 | 619 | ||
627 | - | @Callable( | |
628 | - | func claimWxDoNotThrow ( | |
629 | - | let | |
630 | - | let | |
631 | - | let | |
632 | - | $Tuple2(nil, | |
620 | + | @Callable(cl) | |
621 | + | func claimWxDoNotThrow (at) = { | |
622 | + | let as = toString(cl.caller) | |
623 | + | let cw = false | |
624 | + | let cL = invoke(this, "claimWxINTERNAL", [at, as, cw], nil) | |
625 | + | $Tuple2(nil, cL) | |
633 | 626 | } | |
634 | 627 | ||
635 | 628 | ||
636 | 629 | ||
637 | - | @Callable( | |
638 | - | func claimWxINTERNAL ( | |
639 | - | let | |
640 | - | if (( | |
630 | + | @Callable(cl) | |
631 | + | func claimWxINTERNAL (at,as,cw) = { | |
632 | + | let cz = ck(cl) | |
633 | + | if ((cz == cz)) | |
641 | 634 | then { | |
642 | - | let | |
643 | - | let | |
644 | - | let | |
645 | - | let | |
646 | - | let | |
647 | - | let | |
648 | - | let | |
649 | - | let | |
650 | - | let | |
651 | - | let | |
652 | - | let | |
653 | - | let | |
654 | - | let | |
655 | - | let | |
656 | - | let | |
657 | - | if (( | |
658 | - | then if ( | |
635 | + | let aD = valueOrErrorMessage(addressFromString(as), "claimWxINTERNAL: invalid user address") | |
636 | + | let bx = y(aX, ac(at)) | |
637 | + | let cM = av(at, as) | |
638 | + | let cN = ay(at) | |
639 | + | let cO = aw(at, as) | |
640 | + | let cP = ax(at, as) | |
641 | + | let cQ = D(this, cM) | |
642 | + | let cu = D(this, cO) | |
643 | + | let cR = D(this, cP) | |
644 | + | let cS = D(this, cN) | |
645 | + | let cT = bU(at, as, bx, 0) | |
646 | + | let ce = cT._1 | |
647 | + | let cr = cT._2 | |
648 | + | let bT = cT._3 | |
649 | + | let cv = max([(ce - cu), g]) | |
650 | + | if ((g >= cv)) | |
651 | + | then if (cw) | |
659 | 652 | then throw("nothing to claim") | |
660 | 653 | else $Tuple2(nil, 0) | |
661 | 654 | else { | |
662 | - | let | |
663 | - | let | |
664 | - | let | |
665 | - | let | |
666 | - | let | |
667 | - | let | |
668 | - | if (( | |
655 | + | let cU = max([p(l(invoke(aZ, "claimWxBoost", [at, as], nil))[0]), 0]) | |
656 | + | let cV = cv | |
657 | + | let cW = min([(cV * toBigInt(2)), toBigInt(cU)]) | |
658 | + | let cX = (cV + cW) | |
659 | + | let cY = t(l(invoke(aY, "emit", [toInt(cV)], nil))[0]) | |
660 | + | let cZ = l(invoke(aY, "emit", [toInt(cW)], nil)) | |
661 | + | if ((cZ == cZ)) | |
669 | 662 | then { | |
670 | - | let | |
671 | - | let | |
672 | - | let | |
673 | - | let | |
674 | - | $Tuple2([StringEntry(cO, toString(dc)), StringEntry( | |
663 | + | let da = ((cQ + cV) + cW) | |
664 | + | let db = (cu + cV) | |
665 | + | let dc = (cR + cW) | |
666 | + | let dd = (cS + cv) | |
667 | + | $Tuple2([StringEntry(cM, toString(da)), StringEntry(cO, toString(db)), StringEntry(cP, toString(dc)), StringEntry(cN, toString(dd)), ScriptTransfer(aD, toInt(cV), cY), ScriptTransfer(aD, toInt(cW), cY), aU("claim", as, at, toInt(cv), cl.transactionId)], toInt(cX)) | |
675 | 668 | } | |
676 | 669 | else throw("Strict value is not equal to itself.") | |
677 | 670 | } | |
678 | 671 | } | |
679 | 672 | else throw("Strict value is not equal to itself.") | |
680 | 673 | } | |
681 | 674 | ||
682 | 675 | ||
683 | 676 | ||
684 | - | @Callable( | |
685 | - | func claimWxBulkInternalREADONLY (dg | |
686 | - | then $Tuple2(nil, | |
677 | + | @Callable(cl) | |
678 | + | func claimWxBulkInternalREADONLY (de,df,as,dg) = if ((de == size(df))) | |
679 | + | then $Tuple2(nil, dg) | |
687 | 680 | 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] | |
681 | + | let aB = df[de] | |
682 | + | let dh = split({ | |
683 | + | let di = invoke(this, "claimWxREADONLY", [aB, as], nil) | |
684 | + | if ($isInstanceOf(di, "String")) | |
685 | + | then di | |
686 | + | else throw(($getType(di) + " couldn't be cast to String")) | |
687 | + | }, e) | |
688 | + | let dj = dh[3] | |
689 | + | let dk = dh[4] | |
690 | + | let dl = (dg :+ makeString(["%d%d", dj, dk], e)) | |
697 | 691 | let dm = { | |
698 | - | let | |
699 | - | if ($isInstanceOf( | |
700 | - | then | |
701 | - | else throw(($getType( | |
692 | + | let di = invoke(this, "claimWxBulkInternalREADONLY", [(de + 1), df, as, dl], nil) | |
693 | + | if ($isInstanceOf(di, "List[Any]")) | |
694 | + | then di | |
695 | + | else throw(($getType(di) + " couldn't be cast to List[Any]")) | |
702 | 696 | } | |
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) | |
697 | + | if ((dm == dm)) | |
698 | + | then $Tuple2(nil, dm) | |
712 | 699 | else throw("Strict value is not equal to itself.") | |
713 | 700 | } | |
714 | 701 | ||
715 | 702 | ||
716 | 703 | ||
717 | - | @Callable( | |
718 | - | func claimWxBulkREADONLY ( | |
719 | - | let | |
720 | - | $Tuple2(nil, | |
704 | + | @Callable(cl) | |
705 | + | func claimWxBulkREADONLY (df,as) = { | |
706 | + | let dl = invoke(this, "claimWxBulkInternalREADONLY", [0, df, as, nil], nil) | |
707 | + | $Tuple2(nil, dl) | |
721 | 708 | } | |
722 | 709 | ||
723 | 710 | ||
724 | 711 | ||
725 | - | @Callable( | |
726 | - | func claimWxREADONLY ( | |
727 | - | let | |
728 | - | let | |
729 | - | let | |
730 | - | let | |
731 | - | let | |
732 | - | let | |
733 | - | let | |
734 | - | let | |
735 | - | let | |
736 | - | let | |
737 | - | let | |
738 | - | let | |
739 | - | let | |
712 | + | @Callable(cl) | |
713 | + | func claimWxREADONLY (at,as) = { | |
714 | + | let bY = ar(as, at) | |
715 | + | let bz = au(at) | |
716 | + | let cM = av(at, as) | |
717 | + | let cO = aw(at, as) | |
718 | + | let bs = az(bY) | |
719 | + | let bA = az(bz) | |
720 | + | let cQ = D(this, cM) | |
721 | + | let cu = D(this, cO) | |
722 | + | let bx = y(aX, ac(at)) | |
723 | + | let bC = getIntegerValue(aX, ad(bx)) | |
724 | + | let dn = C(aY, am()) | |
725 | + | let bD = C(aY, ao()) | |
726 | + | let do = if ((bD > height)) | |
740 | 727 | then 0 | |
741 | - | else (height - | |
742 | - | let | |
743 | - | let | |
744 | - | let | |
745 | - | let | |
746 | - | let | |
747 | - | let | |
748 | - | let | |
749 | - | let | |
750 | - | let | |
751 | - | let | |
752 | - | let | |
753 | - | let | |
754 | - | let | |
755 | - | $Tuple2(nil, makeString(["%s%s%d%d%d%d%s", | |
728 | + | else (height - bD) | |
729 | + | let dp = fraction((dn * do), bC, f) | |
730 | + | let dq = fraction(dp, bs, bA) | |
731 | + | let dr = bU(at, as, bx, 0) | |
732 | + | let ce = dr._1 | |
733 | + | let cr = dr._2 | |
734 | + | let bT = dr._3 | |
735 | + | let cv = max([(ce - cu), g]) | |
736 | + | let ds = l(invoke(aZ, "claimWxBoostREADONLY", [at, as], nil)) | |
737 | + | let cU = max([p(ds[0]), 0]) | |
738 | + | let dt = r(ds[1]) | |
739 | + | let cV = cv | |
740 | + | let cW = min([(cV * toBigInt(2)), toBigInt(cU)]) | |
741 | + | let cX = (cV + cW) | |
742 | + | $Tuple2(nil, makeString(["%s%s%d%d%d%d%s", at, as, toString(cX), toString(cQ), toString(cV), toString(cW), "soon"], e)) | |
756 | 743 | } | |
757 | 744 | ||
758 | 745 | ||
759 | 746 | ||
760 | - | @Callable( | |
761 | - | func stakedByUserREADONLY ( | |
762 | - | let | |
763 | - | $Tuple2(nil, | |
747 | + | @Callable(cl) | |
748 | + | func stakedByUserREADONLY (at,as) = { | |
749 | + | let bs = valueOrElse(getInteger(ar(as, at)), 0) | |
750 | + | $Tuple2(nil, bs) | |
764 | 751 | } | |
765 | 752 | ||
766 | 753 | ||
767 | 754 | ||
768 | - | @Callable( | |
769 | - | func usersListTraversal ( | |
770 | - | let | |
755 | + | @Callable(cl) | |
756 | + | func usersListTraversal (aB) = { | |
757 | + | let cz = if ((toBase58String(cl.caller.bytes) == valueOrElse(getString(this, M()), ""))) | |
771 | 758 | then true | |
772 | - | else | |
773 | - | if (( | |
759 | + | else cm(cl) | |
760 | + | if ((cz == cz)) | |
774 | 761 | then { | |
775 | - | let | |
776 | - | let | |
777 | - | let | |
778 | - | let | |
779 | - | if ($isInstanceOf( | |
762 | + | let be = bc(aB) | |
763 | + | let du = getString(bb(aB)) | |
764 | + | let bk = getString(bd(be)) | |
765 | + | let n = du | |
766 | + | if ($isInstanceOf(n, "Unit")) | |
780 | 767 | then { | |
781 | - | let | |
782 | - | if ($isInstanceOf( | |
768 | + | let dv = bk | |
769 | + | if ($isInstanceOf(dv, "Unit")) | |
783 | 770 | then $Tuple2(nil, false) | |
784 | - | else if ($isInstanceOf( | |
771 | + | else if ($isInstanceOf(dv, "String")) | |
785 | 772 | then { | |
786 | - | let | |
787 | - | $Tuple2([StringEntry( | |
773 | + | let dw = dv | |
774 | + | $Tuple2([StringEntry(bb(aB), dw)], true) | |
788 | 775 | } | |
789 | 776 | else throw("Match error") | |
790 | 777 | } | |
791 | - | else if ($isInstanceOf( | |
778 | + | else if ($isInstanceOf(n, "String")) | |
792 | 779 | then { | |
793 | - | let | |
794 | - | let | |
795 | - | let | |
796 | - | let | |
797 | - | let | |
798 | - | let | |
799 | - | let | |
800 | - | then invoke(this, "claimWxINTERNAL", [ | |
780 | + | let aD = n | |
781 | + | let cu = D(this, aw(aB, aD)) | |
782 | + | let cp = y(aX, ac(aB)) | |
783 | + | let ce = bU(aB, aD, cp, 0)._1 | |
784 | + | let cv = (ce - cu) | |
785 | + | let cw = true | |
786 | + | let cx = if ((cv > g)) | |
787 | + | then invoke(this, "claimWxINTERNAL", [aB, aD, cw], nil) | |
801 | 788 | else unit | |
802 | - | if (( | |
789 | + | if ((cx == cx)) | |
803 | 790 | then { | |
804 | - | let | |
805 | - | let | |
806 | - | if ($isInstanceOf( | |
807 | - | then $Tuple2([DeleteEntry( | |
808 | - | else if ($isInstanceOf( | |
791 | + | let dx = getString(bi(be, aD)) | |
792 | + | let dv = dx | |
793 | + | if ($isInstanceOf(dv, "Unit")) | |
794 | + | then $Tuple2([DeleteEntry(bb(aB))], false) | |
795 | + | else if ($isInstanceOf(dv, "String")) | |
809 | 796 | then { | |
810 | - | let | |
811 | - | $Tuple2([StringEntry( | |
797 | + | let dy = dv | |
798 | + | $Tuple2([StringEntry(bb(aB), dy)], true) | |
812 | 799 | } | |
813 | 800 | else throw("Match error") | |
814 | 801 | } | |
815 | 802 | else throw("Strict value is not equal to itself.") | |
816 | 803 | } | |
817 | 804 | else throw("Match error") | |
818 | 805 | } | |
819 | 806 | else throw("Strict value is not equal to itself.") | |
820 | 807 | } | |
821 | 808 | ||
822 | 809 | ||
823 | 810 | ||
824 | - | @Callable( | |
825 | - | func onModifyWeight ( | |
811 | + | @Callable(cl) | |
812 | + | func onModifyWeight (at,bx) = if ((cl.caller != aX)) | |
826 | 813 | then throw("permissions denied") | |
827 | 814 | else { | |
828 | - | let | |
829 | - | let | |
830 | - | let | |
831 | - | let | |
832 | - | | |
815 | + | let dz = bw(at, bx, 0) | |
816 | + | let bu = dz._1 | |
817 | + | let bW = dz._2 | |
818 | + | let bX = dz._3 | |
819 | + | bW | |
833 | 820 | } | |
834 | 821 | ||
835 | 822 | ||
836 | - | @Verifier( | |
837 | - | func | |
838 | - | let | |
839 | - | let | |
840 | - | if ($isInstanceOf( | |
823 | + | @Verifier(dA) | |
824 | + | func dB () = { | |
825 | + | let dC = { | |
826 | + | let n = ch() | |
827 | + | if ($isInstanceOf(n, "ByteVector")) | |
841 | 828 | then { | |
842 | - | let | |
843 | - | | |
829 | + | let cn = n | |
830 | + | cn | |
844 | 831 | } | |
845 | - | else if ($isInstanceOf( | |
846 | - | then | |
832 | + | else if ($isInstanceOf(n, "Unit")) | |
833 | + | then dA.senderPublicKey | |
847 | 834 | else throw("Match error") | |
848 | 835 | } | |
849 | - | sigVerify( | |
836 | + | sigVerify(dA.bodyBytes, dA.proofs[0], dC) | |
850 | 837 | } | |
851 | 838 |
github/deemru/w8io/fabc49c 349.90 ms ◑