tx · 9jhVTEgXfRXWDH2D1zrFnskFRYyh8hVuUgxsi9VPGi3h 3MuGfNhF98CNBCfthhoJEo6SYUv7zTgkK4J: -0.03000000 Waves 2023.10.12 10:28 [2795087] smart account 3MuGfNhF98CNBCfthhoJEo6SYUv7zTgkK4J > SELF 0.00000000 Waves
{ "type": 13, "id": "9jhVTEgXfRXWDH2D1zrFnskFRYyh8hVuUgxsi9VPGi3h", "fee": 3000000, "feeAssetId": null, "timestamp": 1697095733198, "version": 2, "chainId": 84, "sender": "3MuGfNhF98CNBCfthhoJEo6SYUv7zTgkK4J", "senderPublicKey": "4DthuG3xjZV9WtZ34Y66AummdAr67wRzwWsVQL4y2bob", "proofs": [ "2mRrx8nCy4fkzrF8ZoNhEShghLv22uHSLTiaw6vtgkfYPZZRkaSUJNhVqLX9B9kmNjwMsEqoYaVH44SFVoAssEhH", "5xJgt8gVubkLTVQ5ApDErWyZYHL9ZpgJWVzDJaKweSJ1yd3XEMUEePhvq1FSfJkxynJNfZsyuxXW4bG6xPdYxMUN", "4AnBbPFC1iVsWtXcGPknyEnwgDNr3ZknGX17x2YMcR2pKw4jH55aPHwSoPZbxg3aDoenFHhBokhha4p2WswyjMDk" ], "script": "base64:BgIzCAISBwoFCAgBAQgSBAoCAQESABIDCgEBEgASABIAEgASABIDCgEIEgQKAggBEgQKAggBXwAJc2VwYXJhdG9yAgJfXwADU0VQAgJfXwAFTVVMVDYAwIQ9AAVNVUxUOACAwtcvAAZNVUxUWDYJALYCAQUFTVVMVDYABk1VTFRYOAkAtgIBBQVNVUxUOAAHTVVMVFgxOAkAtgIBAICAkLu61q3wDQAKV0FWRVNJRFNUUgIFV0FWRVMAB1dBVkVTSUQJANkEAQUKV0FWRVNJRFNUUgAJREFZTUlMTElTAIC4mSkACU1BWEJBU0tFVAAJABlJZHhDb250cm9sQ2ZnTmV1dHJpbm9EYXBwAAEAGElkeENvbnRyb2xDZmdBdWN0aW9uRGFwcAACABRJZHhDb250cm9sQ2ZnUnBkRG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AAIAAQAAAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAwkA2QQBCQCRAwIFEHB1YktleUFkbWluc0xpc3QAAwACAAAJAGcCBQVjb3VudAAD86fOXQ==", "height": 2795087, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HD72t3xgpSkMgXpcCMTnkF2JHPpQN3rPRgYYatgnBTMq Next: none Diff:
Old | New | Differences | |
---|---|---|---|
75 | 75 | let auctionContract = getContractAddressOrFail(controlCfg, IdxControlCfgAuctionDapp) | |
76 | 76 | ||
77 | 77 | let govContract = getContractAddressOrFail(controlCfg, IdxControlCfgGovernanceDapp) | |
78 | + | ||
79 | + | let neutrinoDaoContract = addressFromStringValue("3PEiiJRkV66T1NW7MoY3DGgCaxoDRCez8fL") | |
78 | 80 | ||
79 | 81 | let RENEW_START_HEIGHT = valueOrElse(getInteger(this, keyCfgX2GnsbtOfferHeightStart()), 0) | |
80 | 82 | ||
314 | 316 | let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1) | |
315 | 317 | let depositNumLast = getIntOrElse(keyDepositNumLast(), -1) | |
316 | 318 | func forEachAssetCacheUserReward (accum,asset) = { | |
317 | - | let $ | |
318 | - | let rewardTotal = $ | |
319 | - | let cached = $ | |
320 | - | let dynamic = $ | |
321 | - | let rewardCachedPartKEY = $ | |
319 | + | let $t01148211617 = calcReward(userAddress, asset, stakedAmountX, depositNumUser, depositNumLast) | |
320 | + | let rewardTotal = $t01148211617._1 | |
321 | + | let cached = $t01148211617._2 | |
322 | + | let dynamic = $t01148211617._3 | |
323 | + | let rewardCachedPartKEY = $t01148211617._4 | |
322 | 324 | (accum :+ IntegerEntry(rewardCachedPartKEY, rewardTotal)) | |
323 | 325 | } | |
324 | 326 | ||
365 | 367 | if ((size(i.payments) > 0)) | |
366 | 368 | then throw("payments are not accepted") | |
367 | 369 | else { | |
368 | - | let $ | |
369 | - | let isNewUser = $ | |
370 | - | let stakedAmount = $ | |
371 | - | let stakingStart = $ | |
372 | - | let gNsbtAmount = $ | |
370 | + | let $t01455814679 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple4(true, 0, 0, 0)) | |
371 | + | let isNewUser = $t01455814679._1 | |
372 | + | let stakedAmount = $t01455814679._2 | |
373 | + | let stakingStart = $t01455814679._3 | |
374 | + | let gNsbtAmount = $t01455814679._4 | |
373 | 375 | let stakedAmountX = toBigInt(gNsbtAmount) | |
374 | 376 | let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr) | |
375 | 377 | let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1) | |
376 | 378 | let depositNumLast = getIntOrElse(keyDepositNumLast(), -1) | |
377 | 379 | func forEachAssetCalcUnclaimedReward (accum,asset) = { | |
378 | - | let $ | |
379 | - | let rewardTotal = $ | |
380 | - | let cached = $ | |
381 | - | let dynamic = $ | |
382 | - | let rewardCachedPartKEY = $ | |
380 | + | let $t01504915187 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast) | |
381 | + | let rewardTotal = $t01504915187._1 | |
382 | + | let cached = $t01504915187._2 | |
383 | + | let dynamic = $t01504915187._3 | |
384 | + | let rewardCachedPartKEY = $t01504915187._4 | |
383 | 385 | let claimedKEY = keyClaimed(userAddressStr, asset) | |
384 | - | let $ | |
385 | - | let data = $ | |
386 | - | let claimedAmtByAsset = $ | |
386 | + | let $t01524715284 = accum | |
387 | + | let data = $t01524715284._1 | |
388 | + | let claimedAmtByAsset = $t01524715284._2 | |
387 | 389 | let newPart = makeString([asset, toString(rewardTotal)], ":") | |
388 | 390 | let claimedAmtByAssetNew = makeString([claimedAmtByAsset, newPart], "_") | |
389 | 391 | if ((0 >= rewardTotal)) | |
391 | 393 | else $Tuple2((((data :+ ScriptTransfer(userAddress, rewardTotal, toAssetVect(asset))) :+ IntegerEntry(claimedKEY, (valueOrElse(getInteger(claimedKEY), 0) + rewardTotal))) :+ IntegerEntry(rewardCachedPartKEY, 0)), claimedAmtByAssetNew) | |
392 | 394 | } | |
393 | 395 | ||
394 | - | let $ | |
396 | + | let $t01574415857 = { | |
395 | 397 | let $l = supportedAssetsList | |
396 | 398 | let $s = size($l) | |
397 | 399 | let $acc0 = $Tuple2(nil, "") | |
405 | 407 | ||
406 | 408 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9) | |
407 | 409 | } | |
408 | - | let transfers = $ | |
409 | - | let claimedAmtByAssetResult = $ | |
410 | + | let transfers = $t01574415857._1 | |
411 | + | let claimedAmtByAssetResult = $t01574415857._2 | |
410 | 412 | if ((0 >= size(transfers))) | |
411 | 413 | then $Tuple2(nil, 0) | |
412 | 414 | else $Tuple2(((transfers :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)) :+ ClaimHistoryEntry(userAddress, i.transactionId, drop(claimedAmtByAssetResult, 1))), size(transfers)) | |
424 | 426 | func commonX2Gnsbt (userAddress,i) = if (!(isBonusPeriod(height))) | |
425 | 427 | then throw("No 'Double gNSBT action' available now") | |
426 | 428 | else { | |
427 | - | let $ | |
428 | - | let claimActions = $ | |
429 | - | let claimResult = $ | |
430 | - | let $ | |
431 | - | let isNewUser = $ | |
432 | - | let lockAmount = $ | |
433 | - | let lockStartHeight = $ | |
434 | - | let currUserGnsbt = $ | |
429 | + | let $t01641916480 = commonClaim(userAddress, i) | |
430 | + | let claimActions = $t01641916480._1 | |
431 | + | let claimResult = $t01641916480._2 | |
432 | + | let $t01648316608 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple4(true, 0, -1, 0)) | |
433 | + | let isNewUser = $t01648316608._1 | |
434 | + | let lockAmount = $t01648316608._2 | |
435 | + | let lockStartHeight = $t01648316608._3 | |
436 | + | let currUserGnsbt = $t01648316608._4 | |
435 | 437 | if (isNewUser) | |
436 | 438 | then throw("You have nothing to restake") | |
437 | 439 | else { | |
443 | 445 | if (userConsentedToX2Gnsbt) | |
444 | 446 | then throw("User has already doubled its gNSBT value") | |
445 | 447 | else { | |
446 | - | let $ | |
447 | - | let statsEntries = $ | |
448 | - | let totalStaked = $ | |
449 | - | let totalStakedNew = $ | |
448 | + | let $t01702517111 = StatsResult(0, 0, 0, deltaUserGnsbt) | |
449 | + | let statsEntries = $t01702517111._1 | |
450 | + | let totalStaked = $t01702517111._2 | |
451 | + | let totalStakedNew = $t01702517111._3 | |
450 | 452 | $Tuple2((((claimActions ++ LockParamsEntry(userAddress, lockAmount, height, newUserGnsbt)) ++ statsEntries) :+ BooleanEntry(userConsentedToX2GnsbtKEY, true)), claimResult) | |
451 | 453 | } | |
452 | 454 | } | |
469 | 471 | ||
470 | 472 | @Callable(i) | |
471 | 473 | func stake () = { | |
472 | - | let $ | |
473 | - | let bondAssetId = $ | |
474 | - | let minLockAmount = $ | |
475 | - | let halfLife = $ | |
474 | + | let $t01821718279 = getParamsOrFail() | |
475 | + | let bondAssetId = $t01821718279._1 | |
476 | + | let minLockAmount = $t01821718279._2 | |
477 | + | let halfLife = $t01821718279._3 | |
476 | 478 | if ((size(i.payments) != 1)) | |
477 | 479 | then throw("Invalid payments size") | |
478 | 480 | else { | |
485 | 487 | else { | |
486 | 488 | let userAddress = i.caller | |
487 | 489 | let userAddressStr = toString(i.caller) | |
488 | - | let $ | |
489 | - | let isNewUser = $ | |
490 | - | let lockAmount = $ | |
491 | - | let lockStartHeight = $ | |
492 | - | let currUserGnsbt = $ | |
490 | + | let $t01882118946 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple4(true, 0, -1, 0)) | |
491 | + | let isNewUser = $t01882118946._1 | |
492 | + | let lockAmount = $t01882118946._2 | |
493 | + | let lockStartHeight = $t01882118946._3 | |
494 | + | let currUserGnsbt = $t01882118946._4 | |
493 | 495 | let mergedAmount = if (isNewUser) | |
494 | 496 | then amount | |
495 | 497 | else (amount + lockAmount) | |
512 | 514 | let x2GnsbtConsentEntry = if (isNewUser) | |
513 | 515 | then [BooleanEntry(userConsentedToX2GnsbtKEY, true)] | |
514 | 516 | else nil | |
515 | - | let $ | |
517 | + | let $t01995020068 = StatsResult(amount, 1, if (isNewUser) | |
516 | 518 | then 1 | |
517 | 519 | else 0, deltaUserGnsbt) | |
518 | - | let statsEntries = $ | |
519 | - | let totalStaked = $ | |
520 | - | let totalStakedNew = $ | |
520 | + | let statsEntries = $t01995020068._1 | |
521 | + | let totalStaked = $t01995020068._2 | |
522 | + | let totalStakedNew = $t01995020068._3 | |
521 | 523 | (((([HistoryRecordEntry("stake", userAddress, i.transactionId, lockAmount, lockStartHeight, mergedAmount, mergedStartHeight)] ++ RewardEntries(isNewUser, userAddressStr, currUserGnsbt)) ++ LockParamsEntry(userAddress, mergedAmount, mergedStartHeight, (currUserGnsbt + deltaUserGnsbt))) ++ statsEntries) ++ x2GnsbtConsentEntry) | |
522 | 524 | } | |
523 | 525 | } | |
532 | 534 | else { | |
533 | 535 | let userAddress = i.caller | |
534 | 536 | let userAddressStr = toString(userAddress) | |
535 | - | let $ | |
536 | - | let bondAssetId = $ | |
537 | - | let minLockAmount = $ | |
538 | - | let halfLife = $ | |
539 | - | let $ | |
540 | - | let isNewUser = $ | |
541 | - | let lockAmount = $ | |
542 | - | let lockStart = $ | |
543 | - | let currUserGnsbt = $ | |
537 | + | let $t02061420676 = getParamsOrFail() | |
538 | + | let bondAssetId = $t02061420676._1 | |
539 | + | let minLockAmount = $t02061420676._2 | |
540 | + | let halfLife = $t02061420676._3 | |
541 | + | let $t02067920768 = getUserParamsOrFail(userAddress) | |
542 | + | let isNewUser = $t02067920768._1 | |
543 | + | let lockAmount = $t02067920768._2 | |
544 | + | let lockStart = $t02067920768._3 | |
545 | + | let currUserGnsbt = $t02067920768._4 | |
544 | 546 | if ((0 >= lockAmount)) | |
545 | 547 | then throw("Nothing to unstake") | |
546 | 548 | else if ((amount > lockAmount)) | |
555 | 557 | let bonusGnsbtPart = (currUserGnsbt - lockAmount) | |
556 | 558 | let bonusNsbtAmount = min([amount, bonusGnsbtPart]) | |
557 | 559 | let deltaGnsbt = (bonusNsbtAmount + amount) | |
558 | - | let $ | |
560 | + | let $t02160621777 = StatsResult(-(amount), if ((amount == lockAmount)) | |
559 | 561 | then -1 | |
560 | 562 | else 0, if ((amount == lockAmount)) | |
561 | 563 | then -1 | |
562 | 564 | else 0, -(deltaGnsbt)) | |
563 | - | let statsEntries = $ | |
564 | - | let totalStaked = $ | |
565 | - | let totalStakedNew = $ | |
565 | + | let statsEntries = $t02160621777._1 | |
566 | + | let totalStaked = $t02160621777._2 | |
567 | + | let totalStakedNew = $t02160621777._3 | |
566 | 568 | ((([ScriptTransfer(userAddress, (amount - comissionAmount), bondAssetId), ScriptTransfer(auctionContract, comissionAmount, bondAssetId), HistoryRecordEntry("unstake", userAddress, i.transactionId, lockAmount, lockStart, (lockAmount - amount), lockStart)] ++ RewardEntries(false, userAddressStr, currUserGnsbt)) ++ LockParamsEntry(userAddress, (lockAmount - amount), lockStart, (currUserGnsbt - deltaGnsbt))) ++ statsEntries) | |
567 | 569 | } | |
568 | 570 | } | |
685 | 687 | } | |
686 | 688 | else { | |
687 | 689 | let userAddress = addressFromStringValue(userAddressStr) | |
688 | - | let $ | |
689 | - | let isNewUser = $ | |
690 | - | let stakedAmount = $ | |
691 | - | let stakingStart = $ | |
692 | - | let userGnsbt = $ | |
690 | + | let $t02584425963 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple4(true, 0, 0, 0)) | |
691 | + | let isNewUser = $t02584425963._1 | |
692 | + | let stakedAmount = $t02584425963._2 | |
693 | + | let stakingStart = $t02584425963._3 | |
694 | + | let userGnsbt = $t02584425963._4 | |
693 | 695 | let stakedAmountX = toBigInt(userGnsbt) | |
694 | 696 | let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr) | |
695 | 697 | let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1) | |
696 | 698 | let depositNumLast = getIntOrElse(keyDepositNumLast(), -1) | |
697 | 699 | func forEachAssetCalcUnclaimedReward (accum,asset) = { | |
698 | - | let $ | |
699 | - | let rewardTotal = $ | |
700 | - | let cached = $ | |
701 | - | let dynamic = $ | |
702 | - | let rewardCachedPartKEY = $ | |
700 | + | let $t02630626444 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast) | |
701 | + | let rewardTotal = $t02630626444._1 | |
702 | + | let cached = $t02630626444._2 | |
703 | + | let dynamic = $t02630626444._3 | |
704 | + | let rewardCachedPartKEY = $t02630626444._4 | |
703 | 705 | let claimed = valueOrElse(getInteger(keyClaimed(userAddressStr, asset)), 0) | |
704 | 706 | ((accum + makeString([asset, toString(rewardTotal), toString(claimed)], ":")) + "_") | |
705 | 707 | } | |
756 | 758 | let totalNsbtAmt = getIntOrElse(keyLockParamTotalAmount(), 0) | |
757 | 759 | let totalGnsbt = getIntOrElse(keyLockParamTotalGnsbt(), totalNsbtAmt) | |
758 | 760 | if ((userAddressStr == "")) | |
759 | - | then $Tuple2(nil, [0, totalNsbtAmt, 0, 0, totalGnsbt]) | |
761 | + | then $Tuple2(nil, [0, totalNsbtAmt, 0, 0, totalGnsbt, (nsbtDiff * 2)]) | |
760 | 762 | else { | |
761 | 763 | let userAddress = toAddressOrFail(userAddressStr) | |
762 | - | let $ | |
763 | - | let isNewUser = $ | |
764 | - | let userNsbtAmt = $ | |
765 | - | let stakingStart = $ | |
766 | - | let currentUserGnsbt = $ | |
764 | + | let $t02824628371 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple4(true, 0, 0, 0)) | |
765 | + | let isNewUser = $t02824628371._1 | |
766 | + | let userNsbtAmt = $t02824628371._2 | |
767 | + | let stakingStart = $t02824628371._3 | |
768 | + | let currentUserGnsbt = $t02824628371._4 | |
767 | 769 | let userConsentTuple = readUserConsentToX2Gnsbt(addressFromStringValue(userAddressStr)) | |
768 | 770 | let userConsentedToX2GnsbtKEY = userConsentTuple._1 | |
769 | 771 | let userConsentedToX2Gnsbt = userConsentTuple._2 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let separator = "__" | |
5 | 5 | ||
6 | 6 | let SEP = "__" | |
7 | 7 | ||
8 | 8 | let MULT6 = 1000000 | |
9 | 9 | ||
10 | 10 | let MULT8 = 100000000 | |
11 | 11 | ||
12 | 12 | let MULTX6 = toBigInt(MULT6) | |
13 | 13 | ||
14 | 14 | let MULTX8 = toBigInt(MULT8) | |
15 | 15 | ||
16 | 16 | let MULTX18 = toBigInt(1000000000000000000) | |
17 | 17 | ||
18 | 18 | let WAVESIDSTR = "WAVES" | |
19 | 19 | ||
20 | 20 | let WAVESID = fromBase58String(WAVESIDSTR) | |
21 | 21 | ||
22 | 22 | let DAYMILLIS = 86400000 | |
23 | 23 | ||
24 | 24 | let MAXBASKET = 9 | |
25 | 25 | ||
26 | 26 | let IdxControlCfgNeutrinoDapp = 1 | |
27 | 27 | ||
28 | 28 | let IdxControlCfgAuctionDapp = 2 | |
29 | 29 | ||
30 | 30 | let IdxControlCfgRpdDapp = 3 | |
31 | 31 | ||
32 | 32 | let IdxControlCfgMathDapp = 4 | |
33 | 33 | ||
34 | 34 | let IdxControlCfgLiquidationDapp = 5 | |
35 | 35 | ||
36 | 36 | let IdxControlCfgRestDapp = 6 | |
37 | 37 | ||
38 | 38 | let IdxControlCfgNodeRegistryDapp = 7 | |
39 | 39 | ||
40 | 40 | let IdxControlCfgNsbtStakingDapp = 8 | |
41 | 41 | ||
42 | 42 | let IdxControlCfgMediatorDapp = 9 | |
43 | 43 | ||
44 | 44 | let IdxControlCfgGovernanceDapp = 13 | |
45 | 45 | ||
46 | 46 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined")) | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func keyCfgX2GnsbtOfferHeightStart () = "%s%s__config__x2GnsbtOfferHeightStart" | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func keyCfgX2GnsbtOfferHeightEnd () = "%s%s__config__x2GnsbtOfferHeightEnd" | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func keyControlAddress () = "%s%s__config__controlAddress" | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func keyControlCfg () = "%s__controlConfig" | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func readControlCfgOrFail (control) = split_4C(getStringOrFail(control, keyControlCfg()), SEP) | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx))) | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | let controlContract = addressFromStringValue(valueOrElse(getString(this, keyControlAddress()), "3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx")) | |
68 | 68 | ||
69 | 69 | let controlCfg = readControlCfgOrFail(controlContract) | |
70 | 70 | ||
71 | 71 | let mathContract = getContractAddressOrFail(controlCfg, IdxControlCfgMathDapp) | |
72 | 72 | ||
73 | 73 | let neutrinoContract = getContractAddressOrFail(controlCfg, IdxControlCfgNeutrinoDapp) | |
74 | 74 | ||
75 | 75 | let auctionContract = getContractAddressOrFail(controlCfg, IdxControlCfgAuctionDapp) | |
76 | 76 | ||
77 | 77 | let govContract = getContractAddressOrFail(controlCfg, IdxControlCfgGovernanceDapp) | |
78 | + | ||
79 | + | let neutrinoDaoContract = addressFromStringValue("3PEiiJRkV66T1NW7MoY3DGgCaxoDRCez8fL") | |
78 | 80 | ||
79 | 81 | let RENEW_START_HEIGHT = valueOrElse(getInteger(this, keyCfgX2GnsbtOfferHeightStart()), 0) | |
80 | 82 | ||
81 | 83 | let RENEW_END_HEIGHT = valueOrElse(getInteger(this, keyCfgX2GnsbtOfferHeightEnd()), 0) | |
82 | 84 | ||
83 | 85 | func keyBondAsset () = "bond_asset_id" | |
84 | 86 | ||
85 | 87 | ||
86 | 88 | func keyUserGnsbtReleaseTime (userAddr) = ("%s%s_userGnsbtReleaseTime__" + userAddr) | |
87 | 89 | ||
88 | 90 | ||
89 | 91 | func keyNeutrinoContractAddress () = "%s__neutrinoContractAddress" | |
90 | 92 | ||
91 | 93 | ||
92 | 94 | func keyMathContractAddress () = "%s__mathContract" | |
93 | 95 | ||
94 | 96 | ||
95 | 97 | func keyMinLockAmount () = "%s__minLockAmount" | |
96 | 98 | ||
97 | 99 | ||
98 | 100 | func keyHalfLife () = "%s__halfLife" | |
99 | 101 | ||
100 | 102 | ||
101 | 103 | func keyLockParamUserAmount (userAddress) = makeString(["%s%s%s", "paramByUser", toString(userAddress), "amount"], separator) | |
102 | 104 | ||
103 | 105 | ||
104 | 106 | func keyLockParamStartBlock (userAddress) = makeString(["%s%s%s", "paramByUser", toString(userAddress), "start"], separator) | |
105 | 107 | ||
106 | 108 | ||
107 | 109 | func keyLockParamUserGnsbt (userAddress) = makeString(["%s%s%s", "paramByUser", toString(userAddress), "gNsbt"], separator) | |
108 | 110 | ||
109 | 111 | ||
110 | 112 | func keyUserConsentedToX2Gnsbt (userAddress) = makeString(["%s%s%s", "paramByUser", toString(userAddress), "consentedToX2Gnsbt"], separator) | |
111 | 113 | ||
112 | 114 | ||
113 | 115 | func keyHistoryRecord (type,userAddress,txId) = makeString(["%s%s%s%s", "history", type, toString(userAddress), toBase58String(txId)], separator) | |
114 | 116 | ||
115 | 117 | ||
116 | 118 | func keyLockParamTotalAmount () = makeString(["%s%s", "stats", "activeTotalLocked"], separator) | |
117 | 119 | ||
118 | 120 | ||
119 | 121 | func keyLockParamTotalGnsbt () = makeString(["%s%s", "stats", "activeTotalGnsbt"], separator) | |
120 | 122 | ||
121 | 123 | ||
122 | 124 | func keyStatsLocksCount () = makeString(["%s%s", "stats", "locksCount"], separator) | |
123 | 125 | ||
124 | 126 | ||
125 | 127 | func keyStatsUsersCount () = makeString(["%s%s", "stats", "activeUsersCount"], separator) | |
126 | 128 | ||
127 | 129 | ||
128 | 130 | func keyStatsDepositAmtByDay (timestamp) = makeString(["%s%s%d", "stats", "depositAmtByDay", toString(timestamp)], separator) | |
129 | 131 | ||
130 | 132 | ||
131 | 133 | func keyStatsDepositAmtTotals () = makeString(["%s%s%d", "stats", "depositAmtTotals"], separator) | |
132 | 134 | ||
133 | 135 | ||
134 | 136 | func keyNextPeriod () = "%s__nextPeriod" | |
135 | 137 | ||
136 | 138 | ||
137 | 139 | func keySupportedRewardAssets () = "supportedRewardAssets" | |
138 | 140 | ||
139 | 141 | ||
140 | 142 | func keyDepositNumLast () = makeString(["%s%s%s", "dep", "lastNum"], separator) | |
141 | 143 | ||
142 | 144 | ||
143 | 145 | func keyUserRewardFromDepositNum (userAddress) = makeString(["%s%s%s", "userRwdFromDepNum", userAddress], separator) | |
144 | 146 | ||
145 | 147 | ||
146 | 148 | func keyRewardPerNsbtSumAt (depositNum,tkn) = makeString(["%s%d", "rwdPerNsbtSumByDepNum", toString(depositNum), tkn], separator) | |
147 | 149 | ||
148 | 150 | ||
149 | 151 | func keyReward (userAddress,tkn) = makeString(["%s%s%s", "rwd", userAddress, tkn], separator) | |
150 | 152 | ||
151 | 153 | ||
152 | 154 | func keyClaimed (userAddress,tkn) = makeString(["%s%s%s", "clm", userAddress, tkn], separator) | |
153 | 155 | ||
154 | 156 | ||
155 | 157 | func keyNotDistributedReward (tkn) = makeString(["%s%s", "notDistributed", tkn], separator) | |
156 | 158 | ||
157 | 159 | ||
158 | 160 | func toX18 (origVal,origMult) = fraction(toBigInt(origVal), MULTX18, origMult) | |
159 | 161 | ||
160 | 162 | ||
161 | 163 | func getIntOrZero (key) = valueOrElse(getInteger(this, key), 0) | |
162 | 164 | ||
163 | 165 | ||
164 | 166 | func getIntOrElse (key,defaultVal) = valueOrElse(getInteger(this, key), defaultVal) | |
165 | 167 | ||
166 | 168 | ||
167 | 169 | func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), (("Mandatory this." + key) + " is not defined")) | |
168 | 170 | ||
169 | 171 | ||
170 | 172 | func getStrOrElse (key,defaultVal) = valueOrElse(getString(this, key), defaultVal) | |
171 | 173 | ||
172 | 174 | ||
173 | 175 | func toAddressOrFail (addressStr) = valueOrErrorMessage(addressFromString(addressStr), ("couldn't parse passed addressStr=" + addressStr)) | |
174 | 176 | ||
175 | 177 | ||
176 | 178 | func toAssetVect (assetStr) = if ((assetStr == WAVESIDSTR)) | |
177 | 179 | then unit | |
178 | 180 | else fromBase58String(assetStr) | |
179 | 181 | ||
180 | 182 | ||
181 | 183 | func asInt (val) = match val { | |
182 | 184 | case valInt: Int => | |
183 | 185 | valInt | |
184 | 186 | case _ => | |
185 | 187 | throw("fail to cast into Int") | |
186 | 188 | } | |
187 | 189 | ||
188 | 190 | ||
189 | 191 | func formatHistoryRecord (oldAmount,oldStart,newAmount,newStart) = makeString(["%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(oldAmount), toString(oldStart), toString(newAmount), toString(newStart)], separator) | |
190 | 192 | ||
191 | 193 | ||
192 | 194 | func formatClaimHistoryRecord (user,claimedRewards) = makeString(["%s%d%d%s", user, toString(lastBlock.height), toString(lastBlock.timestamp), claimedRewards], separator) | |
193 | 195 | ||
194 | 196 | ||
195 | 197 | func HistoryRecordEntry (type,userAddress,txId,oldAmount,oldStart,newAmount,newStart) = StringEntry(keyHistoryRecord(type, userAddress, txId), formatHistoryRecord(oldAmount, oldStart, newAmount, newStart)) | |
196 | 198 | ||
197 | 199 | ||
198 | 200 | func ClaimHistoryEntry (userAddress,txId,claimedRewards) = StringEntry(keyHistoryRecord("claim", userAddress, txId), formatClaimHistoryRecord(toString(userAddress), claimedRewards)) | |
199 | 201 | ||
200 | 202 | ||
201 | 203 | func StatsResult (totalLockedInc,lockCountInc,usersCountInc,totalGnsbtInc) = { | |
202 | 204 | let locksCount = getIntOrZero(keyStatsLocksCount()) | |
203 | 205 | let usersCount = getIntOrZero(keyStatsUsersCount()) | |
204 | 206 | let totalAmount = getIntOrZero(keyLockParamTotalAmount()) | |
205 | 207 | let totalAmountNew = (totalAmount + totalLockedInc) | |
206 | 208 | let totalGnsbt = getIntOrElse(keyLockParamTotalGnsbt(), totalAmount) | |
207 | 209 | $Tuple3([IntegerEntry(keyStatsLocksCount(), (locksCount + lockCountInc)), IntegerEntry(keyStatsUsersCount(), (usersCount + usersCountInc)), IntegerEntry(keyLockParamTotalAmount(), totalAmountNew), IntegerEntry(keyLockParamTotalGnsbt(), (totalGnsbt + totalGnsbtInc))], totalAmount, totalAmountNew) | |
208 | 210 | } | |
209 | 211 | ||
210 | 212 | ||
211 | 213 | func LockParamsEntry (userAddress,nsbtAmount,start,gNsbtAmount) = [IntegerEntry(keyLockParamUserAmount(userAddress), nsbtAmount), IntegerEntry(keyLockParamUserGnsbt(userAddress), gNsbtAmount), IntegerEntry(keyLockParamStartBlock(userAddress), start)] | |
212 | 214 | ||
213 | 215 | ||
214 | 216 | func getParamsOrFail () = $Tuple3(fromBase58String(getStringValue(neutrinoContract, keyBondAsset())), getIntOrFail(keyMinLockAmount()), getIntOrFail(keyHalfLife())) | |
215 | 217 | ||
216 | 218 | ||
217 | 219 | func isActiveUser (userAddress) = (getIntOrElse(keyLockParamUserAmount(userAddress), 0) > 0) | |
218 | 220 | ||
219 | 221 | ||
220 | 222 | func isBonusPeriod (h) = if ((h >= RENEW_START_HEIGHT)) | |
221 | 223 | then (RENEW_END_HEIGHT >= h) | |
222 | 224 | else false | |
223 | 225 | ||
224 | 226 | ||
225 | 227 | func getUserParamsOrUnit (userAddress) = if (isActiveUser(userAddress)) | |
226 | 228 | then { | |
227 | 229 | let amount = getIntOrFail(keyLockParamUserAmount(userAddress)) | |
228 | 230 | $Tuple4(false, amount, getIntOrFail(keyLockParamStartBlock(userAddress)), getIntOrElse(keyLockParamUserGnsbt(userAddress), amount)) | |
229 | 231 | } | |
230 | 232 | else unit | |
231 | 233 | ||
232 | 234 | ||
233 | 235 | func getUserParamsOrFail (userAddress) = valueOrErrorMessage(getUserParamsOrUnit(userAddress), (("User " + toString(userAddress)) + " is not defined")) | |
234 | 236 | ||
235 | 237 | ||
236 | 238 | let supportedAssetsStr = getStrOrElse(keySupportedRewardAssets(), "") | |
237 | 239 | ||
238 | 240 | let supportedAssetsList = split(supportedAssetsStr, "_") | |
239 | 241 | ||
240 | 242 | func calcReward (userAddress,assetId,stakedAmountX,depositNumUser,depositNumLast) = { | |
241 | 243 | let rewardPerNsbtSumLastKEY = keyRewardPerNsbtSumAt(depositNumLast, assetId) | |
242 | 244 | let sumLastX18 = parseBigIntValue(getStrOrElse(keyRewardPerNsbtSumAt(depositNumLast, assetId), "0")) | |
243 | 245 | let sumUserX18 = parseBigIntValue(getStrOrElse(keyRewardPerNsbtSumAt(depositNumUser, assetId), "0")) | |
244 | 246 | let rewardDynamicPart = toInt(fraction((sumLastX18 - sumUserX18), stakedAmountX, MULTX18)) | |
245 | 247 | let rewardCachedPartKEY = keyReward(userAddress, assetId) | |
246 | 248 | let rewardCachedPart = getIntOrElse(rewardCachedPartKEY, 0) | |
247 | 249 | $Tuple4((rewardCachedPart + rewardDynamicPart), rewardCachedPart, rewardDynamicPart, rewardCachedPartKEY) | |
248 | 250 | } | |
249 | 251 | ||
250 | 252 | ||
251 | 253 | func toStartOfDay (timestamp) = ((timestamp / DAYMILLIS) * DAYMILLIS) | |
252 | 254 | ||
253 | 255 | ||
254 | 256 | func findElementPosition (src,element,sep) = { | |
255 | 257 | let elementStart = valueOrErrorMessage(indexOf(src, element), ((("there is no substring " + element) + " in ") + src)) | |
256 | 258 | if ((elementStart == 0)) | |
257 | 259 | then 0 | |
258 | 260 | else { | |
259 | 261 | let left = take(src, elementStart) | |
260 | 262 | (size(split(left, sep)) - 1) | |
261 | 263 | } | |
262 | 264 | } | |
263 | 265 | ||
264 | 266 | ||
265 | 267 | let DepositTotalsPREFIX = "%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d" | |
266 | 268 | ||
267 | 269 | let defaultTotalsDATA = (DepositTotalsPREFIX + "__0__0__0__0__0__0__0__0__0__0__0__0__0__0__0__0__0__0") | |
268 | 270 | ||
269 | 271 | func padList (in) = { | |
270 | 272 | let currSize = (size(in) - 1) | |
271 | 273 | func listPadder (acc,idx) = if ((currSize > idx)) | |
272 | 274 | then acc | |
273 | 275 | else (acc :+ "0") | |
274 | 276 | ||
275 | 277 | let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17] | |
276 | 278 | let $s = size($l) | |
277 | 279 | let $acc0 = in | |
278 | 280 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
279 | 281 | then $a | |
280 | 282 | else listPadder($a, $l[$i]) | |
281 | 283 | ||
282 | 284 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
283 | 285 | then $a | |
284 | 286 | else throw("List size exceeds 18") | |
285 | 287 | ||
286 | 288 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18) | |
287 | 289 | } | |
288 | 290 | ||
289 | 291 | ||
290 | 292 | func padString (in) = { | |
291 | 293 | let currSize = (size(split_4C(in, SEP)) - 1) | |
292 | 294 | func strPadder (acc,idx) = if ((currSize > idx)) | |
293 | 295 | then acc | |
294 | 296 | else (acc + "__0") | |
295 | 297 | ||
296 | 298 | let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17] | |
297 | 299 | let $s = size($l) | |
298 | 300 | let $acc0 = in | |
299 | 301 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
300 | 302 | then $a | |
301 | 303 | else strPadder($a, $l[$i]) | |
302 | 304 | ||
303 | 305 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
304 | 306 | then $a | |
305 | 307 | else throw("List size exceeds 18") | |
306 | 308 | ||
307 | 309 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18) | |
308 | 310 | } | |
309 | 311 | ||
310 | 312 | ||
311 | 313 | func RewardEntries (isNewUser,userAddress,stakedAmount) = { | |
312 | 314 | let stakedAmountX = toBigInt(stakedAmount) | |
313 | 315 | let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddress) | |
314 | 316 | let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1) | |
315 | 317 | let depositNumLast = getIntOrElse(keyDepositNumLast(), -1) | |
316 | 318 | func forEachAssetCacheUserReward (accum,asset) = { | |
317 | - | let $ | |
318 | - | let rewardTotal = $ | |
319 | - | let cached = $ | |
320 | - | let dynamic = $ | |
321 | - | let rewardCachedPartKEY = $ | |
319 | + | let $t01148211617 = calcReward(userAddress, asset, stakedAmountX, depositNumUser, depositNumLast) | |
320 | + | let rewardTotal = $t01148211617._1 | |
321 | + | let cached = $t01148211617._2 | |
322 | + | let dynamic = $t01148211617._3 | |
323 | + | let rewardCachedPartKEY = $t01148211617._4 | |
322 | 324 | (accum :+ IntegerEntry(rewardCachedPartKEY, rewardTotal)) | |
323 | 325 | } | |
324 | 326 | ||
325 | 327 | if (if ((depositNumLast == -1)) | |
326 | 328 | then (depositNumUser == -1) | |
327 | 329 | else false) | |
328 | 330 | then nil | |
329 | 331 | else if (if ((depositNumLast == -1)) | |
330 | 332 | then (depositNumUser > -1) | |
331 | 333 | else false) | |
332 | 334 | then throw("invalid depositNumLast and depositNumUser state") | |
333 | 335 | else if (if ((depositNumLast > -1)) | |
334 | 336 | then (depositNumUser >= -1) | |
335 | 337 | else false) | |
336 | 338 | then if (isNewUser) | |
337 | 339 | then [IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)] | |
338 | 340 | else ({ | |
339 | 341 | let $l = supportedAssetsList | |
340 | 342 | let $s = size($l) | |
341 | 343 | let $acc0 = nil | |
342 | 344 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
343 | 345 | then $a | |
344 | 346 | else forEachAssetCacheUserReward($a, $l[$i]) | |
345 | 347 | ||
346 | 348 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
347 | 349 | then $a | |
348 | 350 | else throw("List size exceeds 9") | |
349 | 351 | ||
350 | 352 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9) | |
351 | 353 | } :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)) | |
352 | 354 | else throw(((("uncovered condition: depositNumLast=" + toString(depositNumLast)) + " depositNumUser=") + toString(depositNumUser))) | |
353 | 355 | } | |
354 | 356 | ||
355 | 357 | ||
356 | 358 | func IncrementNotDistributedRewardEntry (tkn,amountInc) = { | |
357 | 359 | let notDistributedRewardKEY = keyNotDistributedReward(tkn) | |
358 | 360 | let notDistributedReward = getIntOrElse(notDistributedRewardKEY, 0) | |
359 | 361 | IntegerEntry(notDistributedRewardKEY, (notDistributedReward + amountInc)) | |
360 | 362 | } | |
361 | 363 | ||
362 | 364 | ||
363 | 365 | func commonClaim (userAddress,i) = { | |
364 | 366 | let userAddressStr = toString(userAddress) | |
365 | 367 | if ((size(i.payments) > 0)) | |
366 | 368 | then throw("payments are not accepted") | |
367 | 369 | else { | |
368 | - | let $ | |
369 | - | let isNewUser = $ | |
370 | - | let stakedAmount = $ | |
371 | - | let stakingStart = $ | |
372 | - | let gNsbtAmount = $ | |
370 | + | let $t01455814679 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple4(true, 0, 0, 0)) | |
371 | + | let isNewUser = $t01455814679._1 | |
372 | + | let stakedAmount = $t01455814679._2 | |
373 | + | let stakingStart = $t01455814679._3 | |
374 | + | let gNsbtAmount = $t01455814679._4 | |
373 | 375 | let stakedAmountX = toBigInt(gNsbtAmount) | |
374 | 376 | let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr) | |
375 | 377 | let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1) | |
376 | 378 | let depositNumLast = getIntOrElse(keyDepositNumLast(), -1) | |
377 | 379 | func forEachAssetCalcUnclaimedReward (accum,asset) = { | |
378 | - | let $ | |
379 | - | let rewardTotal = $ | |
380 | - | let cached = $ | |
381 | - | let dynamic = $ | |
382 | - | let rewardCachedPartKEY = $ | |
380 | + | let $t01504915187 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast) | |
381 | + | let rewardTotal = $t01504915187._1 | |
382 | + | let cached = $t01504915187._2 | |
383 | + | let dynamic = $t01504915187._3 | |
384 | + | let rewardCachedPartKEY = $t01504915187._4 | |
383 | 385 | let claimedKEY = keyClaimed(userAddressStr, asset) | |
384 | - | let $ | |
385 | - | let data = $ | |
386 | - | let claimedAmtByAsset = $ | |
386 | + | let $t01524715284 = accum | |
387 | + | let data = $t01524715284._1 | |
388 | + | let claimedAmtByAsset = $t01524715284._2 | |
387 | 389 | let newPart = makeString([asset, toString(rewardTotal)], ":") | |
388 | 390 | let claimedAmtByAssetNew = makeString([claimedAmtByAsset, newPart], "_") | |
389 | 391 | if ((0 >= rewardTotal)) | |
390 | 392 | then $Tuple2(data, claimedAmtByAssetNew) | |
391 | 393 | else $Tuple2((((data :+ ScriptTransfer(userAddress, rewardTotal, toAssetVect(asset))) :+ IntegerEntry(claimedKEY, (valueOrElse(getInteger(claimedKEY), 0) + rewardTotal))) :+ IntegerEntry(rewardCachedPartKEY, 0)), claimedAmtByAssetNew) | |
392 | 394 | } | |
393 | 395 | ||
394 | - | let $ | |
396 | + | let $t01574415857 = { | |
395 | 397 | let $l = supportedAssetsList | |
396 | 398 | let $s = size($l) | |
397 | 399 | let $acc0 = $Tuple2(nil, "") | |
398 | 400 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
399 | 401 | then $a | |
400 | 402 | else forEachAssetCalcUnclaimedReward($a, $l[$i]) | |
401 | 403 | ||
402 | 404 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
403 | 405 | then $a | |
404 | 406 | else throw("List size exceeds 9") | |
405 | 407 | ||
406 | 408 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9) | |
407 | 409 | } | |
408 | - | let transfers = $ | |
409 | - | let claimedAmtByAssetResult = $ | |
410 | + | let transfers = $t01574415857._1 | |
411 | + | let claimedAmtByAssetResult = $t01574415857._2 | |
410 | 412 | if ((0 >= size(transfers))) | |
411 | 413 | then $Tuple2(nil, 0) | |
412 | 414 | else $Tuple2(((transfers :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)) :+ ClaimHistoryEntry(userAddress, i.transactionId, drop(claimedAmtByAssetResult, 1))), size(transfers)) | |
413 | 415 | } | |
414 | 416 | } | |
415 | 417 | ||
416 | 418 | ||
417 | 419 | func readUserConsentToX2Gnsbt (userAddress) = { | |
418 | 420 | let key = keyUserConsentedToX2Gnsbt(userAddress) | |
419 | 421 | let val = valueOrElse(getBoolean(this, key), false) | |
420 | 422 | $Tuple2(key, val) | |
421 | 423 | } | |
422 | 424 | ||
423 | 425 | ||
424 | 426 | func commonX2Gnsbt (userAddress,i) = if (!(isBonusPeriod(height))) | |
425 | 427 | then throw("No 'Double gNSBT action' available now") | |
426 | 428 | else { | |
427 | - | let $ | |
428 | - | let claimActions = $ | |
429 | - | let claimResult = $ | |
430 | - | let $ | |
431 | - | let isNewUser = $ | |
432 | - | let lockAmount = $ | |
433 | - | let lockStartHeight = $ | |
434 | - | let currUserGnsbt = $ | |
429 | + | let $t01641916480 = commonClaim(userAddress, i) | |
430 | + | let claimActions = $t01641916480._1 | |
431 | + | let claimResult = $t01641916480._2 | |
432 | + | let $t01648316608 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple4(true, 0, -1, 0)) | |
433 | + | let isNewUser = $t01648316608._1 | |
434 | + | let lockAmount = $t01648316608._2 | |
435 | + | let lockStartHeight = $t01648316608._3 | |
436 | + | let currUserGnsbt = $t01648316608._4 | |
435 | 437 | if (isNewUser) | |
436 | 438 | then throw("You have nothing to restake") | |
437 | 439 | else { | |
438 | 440 | let deltaUserGnsbt = currUserGnsbt | |
439 | 441 | let newUserGnsbt = (currUserGnsbt + deltaUserGnsbt) | |
440 | 442 | let userConsentTuple = readUserConsentToX2Gnsbt(userAddress) | |
441 | 443 | let userConsentedToX2GnsbtKEY = userConsentTuple._1 | |
442 | 444 | let userConsentedToX2Gnsbt = userConsentTuple._2 | |
443 | 445 | if (userConsentedToX2Gnsbt) | |
444 | 446 | then throw("User has already doubled its gNSBT value") | |
445 | 447 | else { | |
446 | - | let $ | |
447 | - | let statsEntries = $ | |
448 | - | let totalStaked = $ | |
449 | - | let totalStakedNew = $ | |
448 | + | let $t01702517111 = StatsResult(0, 0, 0, deltaUserGnsbt) | |
449 | + | let statsEntries = $t01702517111._1 | |
450 | + | let totalStaked = $t01702517111._2 | |
451 | + | let totalStakedNew = $t01702517111._3 | |
450 | 452 | $Tuple2((((claimActions ++ LockParamsEntry(userAddress, lockAmount, height, newUserGnsbt)) ++ statsEntries) :+ BooleanEntry(userConsentedToX2GnsbtKEY, true)), claimResult) | |
451 | 453 | } | |
452 | 454 | } | |
453 | 455 | } | |
454 | 456 | ||
455 | 457 | ||
456 | 458 | @Callable(i) | |
457 | 459 | func constructorV1 (neutrinoContractAddress,mathContractAddress,minLockAmount,halfLife,supportedRewardAssets) = if ((i.caller != this)) | |
458 | 460 | then throw("Permission denied") | |
459 | 461 | else [StringEntry(keyNeutrinoContractAddress(), neutrinoContractAddress), StringEntry(keyMathContractAddress(), mathContractAddress), IntegerEntry(keyMinLockAmount(), minLockAmount), IntegerEntry(keyHalfLife(), halfLife), StringEntry(keySupportedRewardAssets(), supportedRewardAssets)] | |
460 | 462 | ||
461 | 463 | ||
462 | 464 | ||
463 | 465 | @Callable(i) | |
464 | 466 | func constructorV2 (x2GnsbtOfferHeightStart,x2GnsbtOfferHeightEnd) = if ((i.caller != this)) | |
465 | 467 | then throw("Permission denied") | |
466 | 468 | else [IntegerEntry(keyCfgX2GnsbtOfferHeightStart(), x2GnsbtOfferHeightStart), IntegerEntry(keyCfgX2GnsbtOfferHeightEnd(), x2GnsbtOfferHeightEnd)] | |
467 | 469 | ||
468 | 470 | ||
469 | 471 | ||
470 | 472 | @Callable(i) | |
471 | 473 | func stake () = { | |
472 | - | let $ | |
473 | - | let bondAssetId = $ | |
474 | - | let minLockAmount = $ | |
475 | - | let halfLife = $ | |
474 | + | let $t01821718279 = getParamsOrFail() | |
475 | + | let bondAssetId = $t01821718279._1 | |
476 | + | let minLockAmount = $t01821718279._2 | |
477 | + | let halfLife = $t01821718279._3 | |
476 | 478 | if ((size(i.payments) != 1)) | |
477 | 479 | then throw("Invalid payments size") | |
478 | 480 | else { | |
479 | 481 | let payment = i.payments[0] | |
480 | 482 | let amount = payment.amount | |
481 | 483 | let invalidAssetMessage = (("Invalid asset. " + toBase58String(bondAssetId)) + " is expected") | |
482 | 484 | let assetId = valueOrErrorMessage(payment.assetId, invalidAssetMessage) | |
483 | 485 | if ((assetId != bondAssetId)) | |
484 | 486 | then throw(invalidAssetMessage) | |
485 | 487 | else { | |
486 | 488 | let userAddress = i.caller | |
487 | 489 | let userAddressStr = toString(i.caller) | |
488 | - | let $ | |
489 | - | let isNewUser = $ | |
490 | - | let lockAmount = $ | |
491 | - | let lockStartHeight = $ | |
492 | - | let currUserGnsbt = $ | |
490 | + | let $t01882118946 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple4(true, 0, -1, 0)) | |
491 | + | let isNewUser = $t01882118946._1 | |
492 | + | let lockAmount = $t01882118946._2 | |
493 | + | let lockStartHeight = $t01882118946._3 | |
494 | + | let currUserGnsbt = $t01882118946._4 | |
493 | 495 | let mergedAmount = if (isNewUser) | |
494 | 496 | then amount | |
495 | 497 | else (amount + lockAmount) | |
496 | 498 | let mergedStartHeight = if (isNewUser) | |
497 | 499 | then height | |
498 | 500 | else asInt(invoke(mathContract, "mergeStakesREADONLY", [amount, height, lockAmount, lockStartHeight, halfLife], nil)) | |
499 | 501 | if ((minLockAmount > mergedAmount)) | |
500 | 502 | then throw(("Min lock amount is " + toString(minLockAmount))) | |
501 | 503 | else { | |
502 | 504 | let userConsentTuple = readUserConsentToX2Gnsbt(userAddress) | |
503 | 505 | let userConsentedToX2GnsbtKEY = userConsentTuple._1 | |
504 | 506 | let userConsentedToX2Gnsbt = userConsentTuple._2 | |
505 | 507 | let deltaUserGnsbt = if (if (isBonusPeriod(height)) | |
506 | 508 | then if (isNewUser) | |
507 | 509 | then true | |
508 | 510 | else userConsentedToX2Gnsbt | |
509 | 511 | else false) | |
510 | 512 | then (2 * amount) | |
511 | 513 | else amount | |
512 | 514 | let x2GnsbtConsentEntry = if (isNewUser) | |
513 | 515 | then [BooleanEntry(userConsentedToX2GnsbtKEY, true)] | |
514 | 516 | else nil | |
515 | - | let $ | |
517 | + | let $t01995020068 = StatsResult(amount, 1, if (isNewUser) | |
516 | 518 | then 1 | |
517 | 519 | else 0, deltaUserGnsbt) | |
518 | - | let statsEntries = $ | |
519 | - | let totalStaked = $ | |
520 | - | let totalStakedNew = $ | |
520 | + | let statsEntries = $t01995020068._1 | |
521 | + | let totalStaked = $t01995020068._2 | |
522 | + | let totalStakedNew = $t01995020068._3 | |
521 | 523 | (((([HistoryRecordEntry("stake", userAddress, i.transactionId, lockAmount, lockStartHeight, mergedAmount, mergedStartHeight)] ++ RewardEntries(isNewUser, userAddressStr, currUserGnsbt)) ++ LockParamsEntry(userAddress, mergedAmount, mergedStartHeight, (currUserGnsbt + deltaUserGnsbt))) ++ statsEntries) ++ x2GnsbtConsentEntry) | |
522 | 524 | } | |
523 | 525 | } | |
524 | 526 | } | |
525 | 527 | } | |
526 | 528 | ||
527 | 529 | ||
528 | 530 | ||
529 | 531 | @Callable(i) | |
530 | 532 | func unstake (amount) = if ((size(i.payments) != 0)) | |
531 | 533 | then throw("unstake doesn't require any payment") | |
532 | 534 | else { | |
533 | 535 | let userAddress = i.caller | |
534 | 536 | let userAddressStr = toString(userAddress) | |
535 | - | let $ | |
536 | - | let bondAssetId = $ | |
537 | - | let minLockAmount = $ | |
538 | - | let halfLife = $ | |
539 | - | let $ | |
540 | - | let isNewUser = $ | |
541 | - | let lockAmount = $ | |
542 | - | let lockStart = $ | |
543 | - | let currUserGnsbt = $ | |
537 | + | let $t02061420676 = getParamsOrFail() | |
538 | + | let bondAssetId = $t02061420676._1 | |
539 | + | let minLockAmount = $t02061420676._2 | |
540 | + | let halfLife = $t02061420676._3 | |
541 | + | let $t02067920768 = getUserParamsOrFail(userAddress) | |
542 | + | let isNewUser = $t02067920768._1 | |
543 | + | let lockAmount = $t02067920768._2 | |
544 | + | let lockStart = $t02067920768._3 | |
545 | + | let currUserGnsbt = $t02067920768._4 | |
544 | 546 | if ((0 >= lockAmount)) | |
545 | 547 | then throw("Nothing to unstake") | |
546 | 548 | else if ((amount > lockAmount)) | |
547 | 549 | then throw(((("Requested " + toString(amount)) + ", but staked only ") + toString(lockAmount))) | |
548 | 550 | else { | |
549 | 551 | let t = value(blockInfoByHeight(height)).timestamp | |
550 | 552 | let releaseTime = valueOrElse(getInteger(govContract, keyUserGnsbtReleaseTime(userAddressStr)), 0) | |
551 | 553 | if ((releaseTime >= t)) | |
552 | 554 | then throw(("Your gNsbt are taking part in voting, cannot unstake until " + toString(releaseTime))) | |
553 | 555 | else { | |
554 | 556 | let comissionAmount = asInt(invoke(mathContract, "getUnstakeComissionAmountREADONLY", [amount, lockStart, halfLife], nil)) | |
555 | 557 | let bonusGnsbtPart = (currUserGnsbt - lockAmount) | |
556 | 558 | let bonusNsbtAmount = min([amount, bonusGnsbtPart]) | |
557 | 559 | let deltaGnsbt = (bonusNsbtAmount + amount) | |
558 | - | let $ | |
560 | + | let $t02160621777 = StatsResult(-(amount), if ((amount == lockAmount)) | |
559 | 561 | then -1 | |
560 | 562 | else 0, if ((amount == lockAmount)) | |
561 | 563 | then -1 | |
562 | 564 | else 0, -(deltaGnsbt)) | |
563 | - | let statsEntries = $ | |
564 | - | let totalStaked = $ | |
565 | - | let totalStakedNew = $ | |
565 | + | let statsEntries = $t02160621777._1 | |
566 | + | let totalStaked = $t02160621777._2 | |
567 | + | let totalStakedNew = $t02160621777._3 | |
566 | 568 | ((([ScriptTransfer(userAddress, (amount - comissionAmount), bondAssetId), ScriptTransfer(auctionContract, comissionAmount, bondAssetId), HistoryRecordEntry("unstake", userAddress, i.transactionId, lockAmount, lockStart, (lockAmount - amount), lockStart)] ++ RewardEntries(false, userAddressStr, currUserGnsbt)) ++ LockParamsEntry(userAddress, (lockAmount - amount), lockStart, (currUserGnsbt - deltaGnsbt))) ++ statsEntries) | |
567 | 569 | } | |
568 | 570 | } | |
569 | 571 | } | |
570 | 572 | ||
571 | 573 | ||
572 | 574 | ||
573 | 575 | @Callable(i) | |
574 | 576 | func deposit () = { | |
575 | 577 | let totalStaked = getIntOrElse(keyLockParamTotalGnsbt(), getIntOrElse(keyLockParamTotalAmount(), 0)) | |
576 | 578 | if ((0 > totalStaked)) | |
577 | 579 | then throw("TODO: case is not supported") | |
578 | 580 | else { | |
579 | 581 | let depositNumLastKEY = keyDepositNumLast() | |
580 | 582 | let depositNumLast = getIntOrElse(depositNumLastKEY, -1) | |
581 | 583 | let depositNumNew = (depositNumLast + 1) | |
582 | 584 | let totalsKEY = keyStatsDepositAmtTotals() | |
583 | 585 | let byDayKEY = keyStatsDepositAmtByDay(toStartOfDay(lastBlock.timestamp)) | |
584 | 586 | let currTotals = padList(split(valueOrElse(getString(totalsKEY), defaultTotalsDATA), SEP)) | |
585 | 587 | func dep (acc,pmt) = { | |
586 | 588 | let amount = pmt.amount | |
587 | 589 | let pmtAssetIdStr = toBase58String(valueOrElse(pmt.assetId, WAVESID)) | |
588 | 590 | if (!(contains(supportedAssetsStr, pmtAssetIdStr))) | |
589 | 591 | then throw(((supportedAssetsStr + " doesn't contain ") + pmtAssetIdStr)) | |
590 | 592 | else if ((totalStaked == 0)) | |
591 | 593 | then $Tuple4((acc._1 :+ IncrementNotDistributedRewardEntry(pmtAssetIdStr, amount)), (acc._2 :+ pmtAssetIdStr), (acc._3 :+ toBigInt(0)), (acc._4 :+ amount)) | |
592 | 594 | else { | |
593 | 595 | let rewardPerNsbtX18 = fraction(toBigInt(amount), MULTX18, toBigInt(totalStaked)) | |
594 | 596 | $Tuple4(acc._1, (acc._2 :+ pmtAssetIdStr), (acc._3 :+ rewardPerNsbtX18), (acc._4 :+ amount)) | |
595 | 597 | } | |
596 | 598 | } | |
597 | 599 | ||
598 | 600 | let pmtsResult = { | |
599 | 601 | let $l = i.payments | |
600 | 602 | let $s = size($l) | |
601 | 603 | let $acc0 = $Tuple4(nil, nil, nil, nil) | |
602 | 604 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
603 | 605 | then $a | |
604 | 606 | else dep($a, $l[$i]) | |
605 | 607 | ||
606 | 608 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
607 | 609 | then $a | |
608 | 610 | else throw("List size exceeds 10") | |
609 | 611 | ||
610 | 612 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
611 | 613 | } | |
612 | 614 | func refreshRewardUpdateTotals (accum,nextAsset) = { | |
613 | 615 | let k = accum._3 | |
614 | 616 | let sumLastStr = getStrOrElse(keyRewardPerNsbtSumAt(depositNumLast, nextAsset), "0") | |
615 | 617 | let idx = indexOf(pmtsResult._2, nextAsset) | |
616 | 618 | let sum = if (isDefined(idx)) | |
617 | 619 | then { | |
618 | 620 | let j = value(idx) | |
619 | 621 | let statsDelta = pmtsResult._4[j] | |
620 | 622 | $Tuple2(toString((parseBigIntValue(sumLastStr) + pmtsResult._3[j])), toString((parseIntValue(currTotals[(k + 1)]) + statsDelta))) | |
621 | 623 | } | |
622 | 624 | else $Tuple2(sumLastStr, currTotals[(k + 1)]) | |
623 | 625 | $Tuple3((accum._1 :+ StringEntry(keyRewardPerNsbtSumAt(depositNumNew, nextAsset), sum._1)), ((accum._2 + SEP) + sum._2), (k + 1)) | |
624 | 626 | } | |
625 | 627 | ||
626 | 628 | let assetsResult = { | |
627 | 629 | let $l = supportedAssetsList | |
628 | 630 | let $s = size($l) | |
629 | 631 | let $acc0 = $Tuple3(nil, DepositTotalsPREFIX, 0) | |
630 | 632 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
631 | 633 | then $a | |
632 | 634 | else refreshRewardUpdateTotals($a, $l[$i]) | |
633 | 635 | ||
634 | 636 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
635 | 637 | then $a | |
636 | 638 | else throw("List size exceeds 9") | |
637 | 639 | ||
638 | 640 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9) | |
639 | 641 | } | |
640 | 642 | let totals = padString(assetsResult._2) | |
641 | 643 | $Tuple2(((((pmtsResult._1 ++ assetsResult._1) :+ IntegerEntry(depositNumLastKEY, depositNumNew)) :+ StringEntry(totalsKEY, totals)) :+ StringEntry(byDayKEY, totals)), depositNumNew) | |
642 | 644 | } | |
643 | 645 | } | |
644 | 646 | ||
645 | 647 | ||
646 | 648 | ||
647 | 649 | @Callable(i) | |
648 | 650 | func claimRewards () = commonClaim(i.caller, i) | |
649 | 651 | ||
650 | 652 | ||
651 | 653 | ||
652 | 654 | @Callable(i) | |
653 | 655 | func claimRewardsByOriginCaller () = commonClaim(i.originCaller, i) | |
654 | 656 | ||
655 | 657 | ||
656 | 658 | ||
657 | 659 | @Callable(i) | |
658 | 660 | func x2Gnsbt () = commonX2Gnsbt(i.caller, i) | |
659 | 661 | ||
660 | 662 | ||
661 | 663 | ||
662 | 664 | @Callable(i) | |
663 | 665 | func x2GnsbtByOriginCaller () = commonX2Gnsbt(i.originCaller, i) | |
664 | 666 | ||
665 | 667 | ||
666 | 668 | ||
667 | 669 | @Callable(i) | |
668 | 670 | func unclaimedRewardsREADONLY (userAddressStr) = { | |
669 | 671 | func forEachAssetZeroReward (accum,asset) = ((accum + makeString([asset, "0", "0"], ":")) + "_") | |
670 | 672 | ||
671 | 673 | let unclaimedRewardStr = if ((userAddressStr == "")) | |
672 | 674 | then { | |
673 | 675 | let $l = supportedAssetsList | |
674 | 676 | let $s = size($l) | |
675 | 677 | let $acc0 = "" | |
676 | 678 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
677 | 679 | then $a | |
678 | 680 | else forEachAssetZeroReward($a, $l[$i]) | |
679 | 681 | ||
680 | 682 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
681 | 683 | then $a | |
682 | 684 | else throw("List size exceeds 9") | |
683 | 685 | ||
684 | 686 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9) | |
685 | 687 | } | |
686 | 688 | else { | |
687 | 689 | let userAddress = addressFromStringValue(userAddressStr) | |
688 | - | let $ | |
689 | - | let isNewUser = $ | |
690 | - | let stakedAmount = $ | |
691 | - | let stakingStart = $ | |
692 | - | let userGnsbt = $ | |
690 | + | let $t02584425963 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple4(true, 0, 0, 0)) | |
691 | + | let isNewUser = $t02584425963._1 | |
692 | + | let stakedAmount = $t02584425963._2 | |
693 | + | let stakingStart = $t02584425963._3 | |
694 | + | let userGnsbt = $t02584425963._4 | |
693 | 695 | let stakedAmountX = toBigInt(userGnsbt) | |
694 | 696 | let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr) | |
695 | 697 | let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1) | |
696 | 698 | let depositNumLast = getIntOrElse(keyDepositNumLast(), -1) | |
697 | 699 | func forEachAssetCalcUnclaimedReward (accum,asset) = { | |
698 | - | let $ | |
699 | - | let rewardTotal = $ | |
700 | - | let cached = $ | |
701 | - | let dynamic = $ | |
702 | - | let rewardCachedPartKEY = $ | |
700 | + | let $t02630626444 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast) | |
701 | + | let rewardTotal = $t02630626444._1 | |
702 | + | let cached = $t02630626444._2 | |
703 | + | let dynamic = $t02630626444._3 | |
704 | + | let rewardCachedPartKEY = $t02630626444._4 | |
703 | 705 | let claimed = valueOrElse(getInteger(keyClaimed(userAddressStr, asset)), 0) | |
704 | 706 | ((accum + makeString([asset, toString(rewardTotal), toString(claimed)], ":")) + "_") | |
705 | 707 | } | |
706 | 708 | ||
707 | 709 | let $l = supportedAssetsList | |
708 | 710 | let $s = size($l) | |
709 | 711 | let $acc0 = "" | |
710 | 712 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
711 | 713 | then $a | |
712 | 714 | else forEachAssetCalcUnclaimedReward($a, $l[$i]) | |
713 | 715 | ||
714 | 716 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
715 | 717 | then $a | |
716 | 718 | else throw("List size exceeds 9") | |
717 | 719 | ||
718 | 720 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9) | |
719 | 721 | } | |
720 | 722 | $Tuple2(nil, dropRight(unclaimedRewardStr, 1)) | |
721 | 723 | } | |
722 | 724 | ||
723 | 725 | ||
724 | 726 | ||
725 | 727 | @Callable(i) | |
726 | 728 | func nsbtUnstakingSYSREADONLY (userAddressStrOrEmpty,unstakeAmtP) = { | |
727 | 729 | let resultArray = if ((userAddressStrOrEmpty == "")) | |
728 | 730 | then [0, 0, 0, 0] | |
729 | 731 | else { | |
730 | 732 | let userAddress = addressFromStringValue(userAddressStrOrEmpty) | |
731 | 733 | let cfgDATA = getParamsOrFail() | |
732 | 734 | let nsbtAssetId = cfgDATA._1 | |
733 | 735 | let minLockAmount = cfgDATA._2 | |
734 | 736 | let halfLife = cfgDATA._3 | |
735 | 737 | let userDATA = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple4(true, 0, 0, 0)) | |
736 | 738 | let isNewUser = userDATA._1 | |
737 | 739 | let stakedAmount = userDATA._2 | |
738 | 740 | let lockStart = userDATA._3 | |
739 | 741 | let unstakeAmt = if ((unstakeAmtP > stakedAmount)) | |
740 | 742 | then stakedAmount | |
741 | 743 | else unstakeAmtP | |
742 | 744 | let stakedAmountNEW = (stakedAmount - unstakeAmt) | |
743 | 745 | let comissionAmount = if ((unstakeAmt == 0)) | |
744 | 746 | then 0 | |
745 | 747 | else asInt(invoke(mathContract, "getUnstakeComissionAmountREADONLY", [unstakeAmt, lockStart, halfLife], nil)) | |
746 | 748 | let receiveAmount = (unstakeAmt - comissionAmount) | |
747 | 749 | [stakedAmount, stakedAmountNEW, receiveAmount, comissionAmount] | |
748 | 750 | } | |
749 | 751 | $Tuple2(nil, resultArray) | |
750 | 752 | } | |
751 | 753 | ||
752 | 754 | ||
753 | 755 | ||
754 | 756 | @Callable(i) | |
755 | 757 | func nsbtStakingSYSREADONLY (userAddressStr,nsbtDiff) = { | |
756 | 758 | let totalNsbtAmt = getIntOrElse(keyLockParamTotalAmount(), 0) | |
757 | 759 | let totalGnsbt = getIntOrElse(keyLockParamTotalGnsbt(), totalNsbtAmt) | |
758 | 760 | if ((userAddressStr == "")) | |
759 | - | then $Tuple2(nil, [0, totalNsbtAmt, 0, 0, totalGnsbt]) | |
761 | + | then $Tuple2(nil, [0, totalNsbtAmt, 0, 0, totalGnsbt, (nsbtDiff * 2)]) | |
760 | 762 | else { | |
761 | 763 | let userAddress = toAddressOrFail(userAddressStr) | |
762 | - | let $ | |
763 | - | let isNewUser = $ | |
764 | - | let userNsbtAmt = $ | |
765 | - | let stakingStart = $ | |
766 | - | let currentUserGnsbt = $ | |
764 | + | let $t02824628371 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple4(true, 0, 0, 0)) | |
765 | + | let isNewUser = $t02824628371._1 | |
766 | + | let userNsbtAmt = $t02824628371._2 | |
767 | + | let stakingStart = $t02824628371._3 | |
768 | + | let currentUserGnsbt = $t02824628371._4 | |
767 | 769 | let userConsentTuple = readUserConsentToX2Gnsbt(addressFromStringValue(userAddressStr)) | |
768 | 770 | let userConsentedToX2GnsbtKEY = userConsentTuple._1 | |
769 | 771 | let userConsentedToX2Gnsbt = userConsentTuple._2 | |
770 | 772 | let deltaUserGnsbt = if (if (isBonusPeriod(height)) | |
771 | 773 | then if (isNewUser) | |
772 | 774 | then true | |
773 | 775 | else userConsentedToX2Gnsbt | |
774 | 776 | else false) | |
775 | 777 | then (2 * nsbtDiff) | |
776 | 778 | else nsbtDiff | |
777 | 779 | $Tuple2(nil, [userNsbtAmt, totalNsbtAmt, stakingStart, currentUserGnsbt, totalGnsbt, deltaUserGnsbt]) | |
778 | 780 | } | |
779 | 781 | } | |
780 | 782 | ||
781 | 783 | ||
782 | 784 | @Verifier(tx) | |
783 | 785 | func verify () = { | |
784 | 786 | let pubKeyAdminsListStr = makeString(["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR"], SEP) | |
785 | 787 | let pubKeyAdminsList = split(valueOrElse(getString(controlContract, "%s__multisig"), pubKeyAdminsListStr), SEP) | |
786 | 788 | let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0]))) | |
787 | 789 | then 1 | |
788 | 790 | else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1]))) | |
789 | 791 | then 1 | |
790 | 792 | else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[2], fromBase58String(pubKeyAdminsList[2]))) | |
791 | 793 | then 1 | |
792 | 794 | else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[3], fromBase58String(pubKeyAdminsList[3]))) | |
793 | 795 | then 2 | |
794 | 796 | else 0)) | |
795 | 797 | (count >= 3) | |
796 | 798 | } | |
797 | 799 |
github/deemru/w8io/169f3d6 111.06 ms ◑