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