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