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