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