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